summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-03 16:55:06 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-03 16:56:46 (EDT)
commit5df07dbf538d951275a23206fac3c0b9b0a2b27b (patch)
treee3da3d22fa3ecd4da151245354495c2a7f47b082 /src
parent8bab7926c95c0a785e05ee9197401332a70af92b (diff)
downloadmazefight-5df07dbf538d951275a23206fac3c0b9b0a2b27b.zip
mazefight-5df07dbf538d951275a23206fac3c0b9b0a2b27b.tar.gz
mazefight-5df07dbf538d951275a23206fac3c0b9b0a2b27b.tar.bz2
ttf: Rename to widget
Diffstat (limited to 'src')
-rw-r--r--src/local.mk6
-rw-r--r--src/splash.c4
-rw-r--r--src/widget.c (renamed from src/ttf.c)4
-rw-r--r--src/widget.h (renamed from src/ttf.h)9
4 files changed, 11 insertions, 12 deletions
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 <SDL.h>
#include <SDL_ttf.h>
#include <stdlib.h>
-#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 <http://www.gnu.org/licenses/>.
*/
-#ifndef MF_TTF_H_
-#define MF_TTF_H_
+#ifndef MF_WIDGET_H_
+#define MF_WIDGET_H_
#include <SDL.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);
-#endif /* MF_TTF_H_ */
-
+#endif /* MF_WIDGET_H_ */