diff options
Diffstat (limited to 'teensy/teensy_context.c')
| -rw-r--r-- | teensy/teensy_context.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/teensy/teensy_context.c b/teensy/teensy_context.c index 9dff405..547a5dd 100644 --- a/teensy/teensy_context.c +++ b/teensy/teensy_context.c @@ -1,13 +1,12 @@ #include "teensy_context.h" -#include "teensy_renderer.h" #include <math.h> #include <time.h> #include "teensy_platform.h" +#include "teensy_renderer.h" -struct ty_ctx ctx; -extern struct ty_renderer r; +ty_Ctx ctx; bool is_init(void) { @@ -15,7 +14,7 @@ bool is_init(void) return scr_size > 0; } -void ty_init(struct ty_hints hints) +void ty_init(ty_Hints hints) { ty_init_mem(); @@ -35,15 +34,15 @@ void ty_deinit(void) ty_deinit_mem(); } -bool ty_button_down(enum ty_button btn) +bool ty_button_down(ty_Button btn) { - assert(btn >= 0 && btn < TY_BTN_COUNT); + assert(btn < TY_BTN_COUNT); return ctx.down[btn]; } -bool ty_button_pressed(enum ty_button btn) +bool ty_button_pressed(ty_Button btn) { - assert(btn >= 0 && btn < TY_BTN_COUNT); + assert(btn < TY_BTN_COUNT); return ctx.pressed[btn]; } |
