diff --git a/src/display.c b/src/display.c index 849991d..6bb4f02 100644 --- a/src/display.c +++ b/src/display.c @@ -133,7 +133,7 @@ inline void display_update(void) #endif // DEBUG >= 1 } -int display_draw_texture(texture_t *texture, rect_t *src_rect, frect_t *dst_frect, bool flip) +int display_draw_texture(texture_t *texture, const rect_t *src_rect, const frect_t *dst_frect, bool flip) { frect_t src_frect; rect_to_frect(src_rect, &src_frect); @@ -147,7 +147,7 @@ int display_draw_texture(texture_t *texture, rect_t *src_rect, frect_t *dst_frec return EXIT_SUCCESS; } -int display_draw_frect(frect_t *frect, unsigned int r, unsigned int g, unsigned int b, unsigned int a) +int display_draw_frect(const frect_t *frect, unsigned int r, unsigned int g, unsigned int b, unsigned int a) { if(!SDL_SetRenderDrawColor(renderer, r, g, b, a)) { diff --git a/src/headers/display.h b/src/headers/display.h index fd10ed5..37c80f8 100644 --- a/src/headers/display.h +++ b/src/headers/display.h @@ -27,7 +27,7 @@ void display_exit(void); int display_clear(void); void display_update(void); -int display_draw_texture(texture_t *texture, rect_t *src_rect, frect_t *dst_frect, bool flip); -int display_draw_frect(frect_t *frect, unsigned int r, unsigned int g, unsigned int b, unsigned int a); +int display_draw_texture(texture_t *texture, const rect_t *src_rect, const frect_t *dst_frect, bool flip); +int display_draw_frect(const frect_t *frect, unsigned int r, unsigned int g, unsigned int b, unsigned int a); #endif // DISPLAY_H \ No newline at end of file diff --git a/src/headers/ecs.h b/src/headers/ecs.h index 41fb1f8..95bfcd8 100644 --- a/src/headers/ecs.h +++ b/src/headers/ecs.h @@ -18,7 +18,7 @@ typedef int (*component_init_t)(component_t *component); // Component update function. It is called in the main loop to update the component. This function is necessary. typedef int (*component_update_t)(component_t *component); // Component draw function. It is called in the main loop to draw the component on screen. This function is not necessary. -typedef int (*component_draw_t)(component_t *component); +typedef int (*component_draw_t)(const component_t *component); // Component deleter function. It is called when the component is removed. It should free the data in the component data but not the component itself. typedef int (*component_deleter_t)(component_t *component);