From 5df07dbf538d951275a23206fac3c0b9b0a2b27b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 03 Aug 2021 16:55:06 -0400 Subject: ttf: Rename to widget --- (limited to 'src') diff --git a/src/local.mk b/src/local.mk index a357b2d..647e371 100644 --- a/src/local.mk +++ b/src/local.mk @@ -7,7 +7,7 @@ mazefight_SOURCES += \ %reldir%/maze.h \ %reldir%/splash.c \ %reldir%/splash.h \ - %reldir%/ttf.c \ - %reldir%/ttf.h \ %reldir%/util.c \ - %reldir%/util.h + %reldir%/util.h \ + %reldir%/widget.c \ + %reldir%/widget.h diff --git a/src/splash.c b/src/splash.c index c11d76b..a2d0f47 100644 --- a/src/splash.c +++ b/src/splash.c @@ -25,8 +25,8 @@ #include "dirs.h" #include "maze.h" #include "splash.h" -#include "ttf.h" #include "util.h" +#include "widget.h" int mf_splash(SDL_Renderer *renderer) @@ -57,7 +57,7 @@ mf_splash(SDL_Renderer *renderer) free(font_path); return -1; } - title_texture = mf_ttf_render(font, "Maze Fight", &text_color, + title_texture = mf_widget_text(font, "Maze Fight", &text_color, renderer, &title_rect); if (title_texture == NULL) { goto err; diff --git a/src/ttf.c b/src/widget.c index 2bc24cf..0b6929c 100644 --- a/src/ttf.c +++ b/src/widget.c @@ -20,10 +20,10 @@ #include #include #include -#include "ttf.h" +#include "widget.h" SDL_Texture * -mf_ttf_render(TTF_Font *font, const char *text, SDL_Color *color, +mf_widget_text(TTF_Font *font, const char *text, SDL_Color *color, SDL_Renderer *renderer, SDL_Rect *rect) { SDL_Surface *surface; diff --git a/src/ttf.h b/src/widget.h index 5254eb2..04a6767 100644 --- a/src/ttf.h +++ b/src/widget.h @@ -17,14 +17,13 @@ * along with Maze Fight. If not, see . */ -#ifndef MF_TTF_H_ -#define MF_TTF_H_ +#ifndef MF_WIDGET_H_ +#define MF_WIDGET_H_ #include SDL_Texture * -mf_ttf_render(TTF_Font *font, const char *text, SDL_Color *color, +mf_widget_text(TTF_Font *font, const char *text, SDL_Color *color, SDL_Renderer *renderer, SDL_Rect *rect); -#endif /* MF_TTF_H_ */ - +#endif /* MF_WIDGET_H_ */ -- cgit v0.9.1