X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgame%2Fsprite_font.c;h=0c32f3073b6345087018a99391916b4724b1cc97;hb=b4ef3cf733d60f4c2fac0bbf9f8d2a991642307d;hp=6514f216f5281a52a0a89d0eb40ee0f77a14012c;hpb=e711343482f00c2186726ea88a897c0f54cf934c;p=nothing.git diff --git a/src/game/sprite_font.c b/src/game/sprite_font.c index 6514f216..0c32f307 100644 --- a/src/game/sprite_font.c +++ b/src/game/sprite_font.c @@ -1,4 +1,4 @@ -#include +#include #include "system/stacktrace.h" #include #include @@ -24,10 +24,7 @@ Sprite_font *create_sprite_font_from_file(const char *bmp_file_path, trace_assert(bmp_file_path); trace_assert(renderer); - Lt * const lt = create_lt(); - if (lt == NULL) { - return NULL; - } + Lt *lt = create_lt(); Sprite_font * const sprite_font = PUSH_LT(lt, nth_calloc(1, sizeof(Sprite_font)), free); if (sprite_font == NULL) { @@ -89,8 +86,8 @@ static SDL_Rect sprite_font_char_rect(const Sprite_font *sprite_font, char x) int sprite_font_render_text(const Sprite_font *sprite_font, SDL_Renderer *renderer, - Vec position, - Vec size, + Vec2f position, + Vec2f size, Color color, const char *text) { @@ -128,8 +125,8 @@ int sprite_font_render_text(const Sprite_font *sprite_font, } Rect sprite_font_boundary_box(const Sprite_font *sprite_font, - Vec position, - Vec size, + Vec2f position, + Vec2f size, const char *text) { trace_assert(sprite_font);