diff options
| author | iamcheeseman <[email protected]> | 2026-05-12 16:41:37 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-12 16:41:37 -0400 |
| commit | 897a153d290ed4d3647ad9e0100d1b717f580b5f (patch) | |
| tree | 844dee0b3b2b7d869cd8e1ba27ffb403e8d51d99 /teensy/teensy_context.c | |
| parent | c1dd3ce9850fb2906aa5937b4374d1c0fc74ccf7 (diff) | |
typedef all structs and rename to Ada_Case
There isn't really a technical reason that I made this change. I just
wanted to use Ada_Case. All types were prefixed with ty_, e.g. ty_Image.
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]; } |
