From 1e2fa0f4dad96d33535e3dd3d85fbf9219c0d1bc Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 3 Apr 2007 19:56:26 +0200 Subject: [PATCH] rnd-20070403-2-src * added new pseudo game mode "PANEL" to define panel fonts and graphics - panel fonts now use ".PANEL" suffix instead of ".PLAYING" suffix - panel graphics now use ".PANEL" suffix instead of ".DOOR" suffix (else graphics would have to use ".PLAYING", which would be confusing) --- ChangeLog | 6 ++++++ src/conf_fnt.c | 4 ++-- src/conf_gfx.c | 4 ++-- src/conf_gfx.h | 2 +- src/conftime.h | 2 +- src/game.c | 6 +++++- src/main.c | 1 + src/main.h | 16 +++++++++------- src/tools.c | 4 ++-- src/tools.h | 2 +- 10 files changed, 30 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6198cbd2..52c3f76c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-03 + * added new pseudo game mode "PANEL" to define panel fonts and graphics + - panel fonts now use ".PANEL" suffix instead of ".PLAYING" suffix + - panel graphics now use ".PANEL" suffix instead of ".DOOR" suffix + (else graphics would have to use ".PLAYING", which would be confusing) + 2007-04-02 * added attribute ".tile_size" for element style game panel controls diff --git a/src/conf_fnt.c b/src/conf_fnt.c index 8eb96e51..a0f6dcff 100644 --- a/src/conf_fnt.c +++ b/src/conf_fnt.c @@ -92,8 +92,8 @@ font_to_graphic[] = IMG_FONT_TEXT_1_ACTIVE_SCORES }, { - FONT_TEXT_1, GFX_SPECIAL_ARG_PLAYING, - IMG_FONT_TEXT_1_PLAYING + FONT_TEXT_1, GFX_SPECIAL_ARG_PANEL, + IMG_FONT_TEXT_1_PANEL }, { FONT_TEXT_1, GFX_SPECIAL_ARG_DOOR, diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 7034a099..8bbf6186 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -4690,8 +4690,8 @@ struct ConfigInfo image_config[] = { "font.text_1.active.SCORES.y", "0" }, { "font.text_1.active.SCORES.width", "16" }, { "font.text_1.active.SCORES.height", "32" }, - { "font.text_1.PLAYING", UNDEFINED_FILENAME }, - { "font.text_1.PLAYING.clone_from", "font.level_number" }, + { "font.text_1.PANEL", UNDEFINED_FILENAME }, + { "font.text_1.PANEL.clone_from", "font.level_number" }, { "font.text_1.DOOR", UNDEFINED_FILENAME }, { "font.text_1.DOOR.clone_from", "font.level_number" }, { "font.text_2", "RocksFontSmall.pcx" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index fe72c69f..e827cfba 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1684,7 +1684,7 @@ #define IMG_FONT_TEXT_1_PREVIEW 1663 #define IMG_FONT_TEXT_1_SCORES 1664 #define IMG_FONT_TEXT_1_ACTIVE_SCORES 1665 -#define IMG_FONT_TEXT_1_PLAYING 1666 +#define IMG_FONT_TEXT_1_PANEL 1666 #define IMG_FONT_TEXT_1_DOOR 1667 #define IMG_FONT_TEXT_2 1668 #define IMG_FONT_TEXT_2_MAIN 1669 diff --git a/src/conftime.h b/src/conftime.h index 16409a5d..1489e6f9 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-04-03 01:38" +#define COMPILE_DATE_STRING "2007-04-03 19:40" diff --git a/src/game.c b/src/game.c index 9fb95c23..d2787a10 100644 --- a/src/game.c +++ b/src/game.c @@ -2027,6 +2027,8 @@ void DisplayGameControlValues() { int i; + game_status = GAME_MODE_PSEUDO_PANEL; + for (i = 0; game_controls[i].nr != -1; i++) { int nr = game_controls[i].nr; @@ -2101,7 +2103,7 @@ void DisplayGameControlValues() } else { - int graphic = el2doorimg(value); + int graphic = el2panelimg(value); DrawSizedGraphicExt(drawto, dst_x, dst_y, graphic, size); } @@ -2124,6 +2126,8 @@ void DisplayGameControlValues() redraw_mask |= REDRAW_DOOR_1; } + + game_status = GAME_MODE_PLAYING; } void DrawGameValue_Emeralds(int value) diff --git a/src/main.c b/src/main.c index 5174a162..e6401836 100644 --- a/src/main.c +++ b/src/main.c @@ -5376,6 +5376,7 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, + { ".PANEL", GFX_SPECIAL_ARG_PANEL, }, { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, diff --git a/src/main.h b/src/main.h index 97e8ff19..3bd3d6be 100644 --- a/src/main.h +++ b/src/main.h @@ -1734,10 +1734,11 @@ #define GFX_SPECIAL_ARG_SETUP 8 #define GFX_SPECIAL_ARG_PLAYING 9 #define GFX_SPECIAL_ARG_DOOR 10 -#define GFX_SPECIAL_ARG_PREVIEW 11 -#define GFX_SPECIAL_ARG_CRUMBLED 12 +#define GFX_SPECIAL_ARG_PANEL 11 +#define GFX_SPECIAL_ARG_PREVIEW 12 +#define GFX_SPECIAL_ARG_CRUMBLED 13 -#define NUM_SPECIAL_GFX_ARGS 13 +#define NUM_SPECIAL_GFX_ARGS 14 /* these additional definitions are currently only used for draw offsets */ #define GFX_SPECIAL_ARG_INFO_MAIN 0 @@ -1884,12 +1885,13 @@ #define GAME_MODE_SETUP 8 #define GAME_MODE_PLAYING 9 #define GAME_MODE_PSEUDO_DOOR 10 -#define GAME_MODE_PSEUDO_PREVIEW 11 -#define GAME_MODE_PSEUDO_CRUMBLED 12 +#define GAME_MODE_PSEUDO_PANEL 11 +#define GAME_MODE_PSEUDO_PREVIEW 12 +#define GAME_MODE_PSEUDO_CRUMBLED 13 /* there are no special config file suffixes for these modes */ -#define GAME_MODE_PSEUDO_TYPENAME 13 -#define GAME_MODE_QUIT 14 +#define GAME_MODE_PSEUDO_TYPENAME 14 +#define GAME_MODE_QUIT 15 /* special definitions currently only used for custom artwork configuration */ #define MUSIC_PREFIX_BACKGROUND 0 diff --git a/src/tools.c b/src/tools.c index 074b232b..be4218cc 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5755,11 +5755,11 @@ int el2preimg(int element) return element_info[element].special_graphic[GFX_SPECIAL_ARG_PREVIEW]; } -int el2doorimg(int element) +int el2panelimg(int element) { element = GFX_ELEMENT(element); - return element_info[element].special_graphic[GFX_SPECIAL_ARG_DOOR]; + return element_info[element].special_graphic[GFX_SPECIAL_ARG_PANEL]; } int font2baseimg(int font_nr) diff --git a/src/tools.h b/src/tools.h index 80f76114..795e4c25 100644 --- a/src/tools.h +++ b/src/tools.h @@ -185,7 +185,7 @@ int el2baseimg(int); int el2img(int); int el2edimg(int); int el2preimg(int); -int el2doorimg(int); +int el2panelimg(int); int font2baseimg(int); int getBeltNrFromBeltElement(int); -- 2.34.1