Adding const identifiers.
This commit is contained in:
parent
778a9ecbfd
commit
24d2ac6564
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue