From b1f855a82b40f1caeaf4d672638f2cfc933c8040 Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 5 Jan 2023 03:46:31 -0500 Subject: add debug text function + some cleanup --- include/rodeo.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/rodeo.h b/include/rodeo.h index e468c11..86505f1 100644 --- a/include/rodeo.h +++ b/include/rodeo.h @@ -5,7 +5,7 @@ typedef struct Rodeo__\ -Data_t +data_t { SDL_Window* window; SDL_Surface* screen_surface; @@ -14,12 +14,23 @@ Data_t int screen_height; SDL_Event sdl_event; bool quit; -} Rodeo__Data_t; +} Rodeo__data_t; + +typedef +struct +Rodeo__\ +color_t +{ + float red; + float green; + float blue; + float alpha; +} Rodeo__color_t; void Rodeo__\ init_window( - Rodeo__Data_t* state, + Rodeo__data_t* state, int screen_height, int screen_width, char* title @@ -27,7 +38,7 @@ init_window( void Rodeo__\ -deinit_window(Rodeo__Data_t* state); +deinit_window(Rodeo__data_t* state); void Rodeo__\ @@ -35,8 +46,13 @@ quit(); void Rodeo__\ -begin(Rodeo__Data_t* state); +begin(Rodeo__data_t* state); void Rodeo__\ -end(Rodeo__Data_t* state); +end(Rodeo__data_t* state); + +void +Rodeo__\ +draw_debug_text(u_int16_t x, u_int16_t y, const char *format, ...); + -- cgit v1.2.3