diff libmlk-rpg/mlk/rpg/battle-bar-default.c @ 495:2af25db99273

ui: theme -> mlk_theme
author David Demelier <markand@malikania.fr>
date Tue, 28 Feb 2023 13:40:55 +0100
parents fce3b3c4b496
children 52a305833381
line wrap: on
line diff
--- a/libmlk-rpg/mlk/rpg/battle-bar-default.c	Tue Feb 28 13:32:01 2023 +0100
+++ b/libmlk-rpg/mlk/rpg/battle-bar-default.c	Tue Feb 28 13:40:55 2023 +0100
@@ -42,7 +42,7 @@
 #include "item.h"
 #include "spell.h"
 
-#define THEME(bar) ((bar)->theme ? (bar)->theme : theme_default())
+#define THEME(bar) ((bar)->theme ? (bar)->theme : mlk_theme_default())
 
 struct geo {
 	int x, y;
@@ -155,7 +155,7 @@
 	battle_state_selection(bt, &sel);
 
 	/* A cursor should be present. */
-	if (!mlk_sprite_ok(BATTLE_THEME(bt)->sprites[THEME_SPRITE_CURSOR]))
+	if (!mlk_sprite_ok(BATTLE_THEME(bt)->sprites[MLK_THEME_SPRITE_CURSOR]))
 		mlk_tracef("battle: no cursor sprite in theme");
 }
 
@@ -228,13 +228,13 @@
                             int y,
                             unsigned int h)
 {
-	const struct theme *theme = THEME(bar);
+	const struct mlk_theme *theme = THEME(bar);
 	struct mlk_label label;
 	unsigned int spacing, lw, lh;
 	char line[64];
 
 	/* Compute spacing between elements. */
-	spacing = h - (mlk_font_height(theme->fonts[THEME_FONT_INTERFACE]) * 3);
+	spacing = h - (mlk_font_height(theme->fonts[MLK_THEME_FONT_INTERFACE]) * 3);
 	spacing /= 4;
 
 	/* Reuse the same label. */
@@ -353,7 +353,7 @@
 		}
 	};
 
-	const struct theme *theme = THEME(bar);
+	const struct mlk_theme *theme = THEME(bar);
 	int bx, by;
 	unsigned int bw, bh;