From 34a081fccd2bcbbd16b8ccb3eabab28347c2d6f7 Mon Sep 17 00:00:00 2001 From: wanp Date: Mon, 23 Sep 2024 15:06:58 -0300 Subject: [PATCH] rename get_text_width() to text_get_width() --- apps/testgame/scenes/title.c | 2 +- include/twn_rendering.h | 2 +- src/rendering/twn_text.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/testgame/scenes/title.c b/apps/testgame/scenes/title.c index 7839ea2..a795382 100644 --- a/apps/testgame/scenes/title.c +++ b/apps/testgame/scenes/title.c @@ -28,7 +28,7 @@ static void title_tick(State *state) { const char *font = "fonts/kenney-pixel.ttf"; int text_h = 32; - int text_w = get_text_width(text_str, text_h, font); + int text_w = text_get_width(text_str, text_h, font); push_rectangle( (Rect) { diff --git a/include/twn_rendering.h b/include/twn_rendering.h index 17ead8e..d7041c4 100644 --- a/include/twn_rendering.h +++ b/include/twn_rendering.h @@ -36,7 +36,7 @@ TWN_API void push_rectangle(Rect rect, Color color); TWN_API void push_circle(Vec2 position, float radius, Color color); TWN_API void push_text(char *string, Vec2 position, int height_px, Color color, const char *font_path); -TWN_API int get_text_width(char *string, int height_px, const char *font_path); +TWN_API int text_get_width(char *string, int height_px, const char *font_path); /* pushes a textured 3d triangle onto the render queue */ /* vertices are in absolute coordinates, relative to world origin */ diff --git a/src/rendering/twn_text.c b/src/rendering/twn_text.c index 59f99ae..eefc6cf 100644 --- a/src/rendering/twn_text.c +++ b/src/rendering/twn_text.c @@ -184,7 +184,7 @@ void push_text(char *string, Vec2 position, int height_px, Color color, const ch } -int get_text_width(char *string, int height_px, const char *font_path) { +int text_get_width(char *string, int height_px, const char *font_path) { ensure_font_cache(font_path, height_px); FontData *font_data = get_font_data(font_path, height_px);