From 897a153d290ed4d3647ad9e0100d1b717f580b5f Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Tue, 12 May 2026 16:41:37 -0400 Subject: 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. --- teensy/teensy_context.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'teensy/teensy_context.c') 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 #include #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]; } -- cgit v1.3-2-g0d8e