From: Holger Schemel Date: Sat, 4 Jan 2025 16:16:34 +0000 (+0100) Subject: added support to show level set name in game panel X-Git-Tag: 4.4.0.1~58 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=88cdc59300b0930460647b3984b08f196a36cc2e;p=rocksndiamonds.git added support to show level set name in game panel --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index cc9b0615..034873ae 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -11017,6 +11017,17 @@ struct ConfigInfo image_config[] = { "game.panel.player_name.class", "none" }, { "game.panel.player_name.style", "none" }, + { "game.panel.levelset_name.x", "-1" }, + { "game.panel.levelset_name.y", "-1" }, + { "game.panel.levelset_name.align", "left" }, + { "game.panel.levelset_name.valign", "top" }, + { "game.panel.levelset_name.chars", "-1" }, + { "game.panel.levelset_name.font", "font.text_2" }, + { "game.panel.levelset_name.draw_masked", "true" }, + { "game.panel.levelset_name.draw_order", "0" }, + { "game.panel.levelset_name.class", "none" }, + { "game.panel.levelset_name.style", "none" }, + { "game.panel.level_name.x", "-1" }, { "game.panel.level_name.y", "-1" }, { "game.panel.level_name.align", "left" }, @@ -11027,6 +11038,7 @@ struct ConfigInfo image_config[] = { "game.panel.level_name.draw_order", "0" }, { "game.panel.level_name.class", "none" }, { "game.panel.level_name.style", "none" }, + { "game.panel.level_author.x", "-1" }, { "game.panel.level_author.y", "-1" }, { "game.panel.level_author.align", "left" }, diff --git a/src/game.c b/src/game.c index 3a6662c3..66935e7f 100644 --- a/src/game.c +++ b/src/game.c @@ -205,10 +205,11 @@ #define GAME_PANEL_CE_SCORE_7_ELEMENT 115 #define GAME_PANEL_CE_SCORE_8_ELEMENT 116 #define GAME_PANEL_PLAYER_NAME 117 -#define GAME_PANEL_LEVEL_NAME 118 -#define GAME_PANEL_LEVEL_AUTHOR 119 +#define GAME_PANEL_LEVELSET_NAME 118 +#define GAME_PANEL_LEVEL_NAME 119 +#define GAME_PANEL_LEVEL_AUTHOR 120 -#define NUM_GAME_PANEL_CONTROLS 120 +#define NUM_GAME_PANEL_CONTROLS 121 struct GamePanelOrderInfo { @@ -831,6 +832,11 @@ static struct GamePanelControlInfo game_panel_controls[] = &game.panel.player_name, TYPE_STRING, }, + { + GAME_PANEL_LEVELSET_NAME, + &game.panel.levelset_name, + TYPE_STRING, + }, { GAME_PANEL_LEVEL_NAME, &game.panel.level_name, @@ -2642,6 +2648,7 @@ static void UpdateGameControlValues(void) EL_UNDEFINED); game_panel_controls[GAME_PANEL_PLAYER_NAME].value = 0; + game_panel_controls[GAME_PANEL_LEVELSET_NAME].value = 0; game_panel_controls[GAME_PANEL_LEVEL_NAME].value = 0; game_panel_controls[GAME_PANEL_LEVEL_AUTHOR].value = 0; @@ -2955,6 +2962,7 @@ static void DisplayGameControlValues(void) char *state = (active ? state_active : state_normal); char *s = (nr == GAME_PANEL_GRAVITY_STATE ? state : nr == GAME_PANEL_PLAYER_NAME ? setup.player_name : + nr == GAME_PANEL_LEVELSET_NAME ? leveldir_current->name : nr == GAME_PANEL_LEVEL_NAME ? level.name : nr == GAME_PANEL_LEVEL_AUTHOR ? level.author : NULL); diff --git a/src/game.h b/src/game.h index 430e3775..41f7931c 100644 --- a/src/game.h +++ b/src/game.h @@ -106,6 +106,7 @@ struct GamePanelInfo struct TextPosInfo ce_score[NUM_PANEL_CE_SCORE]; struct TextPosInfo ce_score_element[NUM_PANEL_CE_SCORE]; struct TextPosInfo player_name; + struct TextPosInfo levelset_name; struct TextPosInfo level_name; struct TextPosInfo level_author;