From: Holger Schemel Date: Fri, 16 Mar 2007 02:59:22 +0000 (+0100) Subject: rnd-20070316-1-src X-Git-Tag: 3.2.4^2~67 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9f7cd608c28ded86b2c2e649c776220ae27df038;p=rocksndiamonds.git rnd-20070316-1-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 80574cea..7b2b9190 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -4927,7 +4927,9 @@ struct ConfigInfo image_config[] = { "background.envelope_4.draw_masked", "false" }, { "background", UNDEFINED_FILENAME }, + { "background.TITLE_INITIAL", UNDEFINED_FILENAME }, { "background.TITLE", UNDEFINED_FILENAME }, + { "background.MESSAGE_INITIAL", UNDEFINED_FILENAME }, { "background.MESSAGE", UNDEFINED_FILENAME }, { "background.MAIN", UNDEFINED_FILENAME }, { "background.LEVELS", UNDEFINED_FILENAME }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 74d371b1..271c38f0 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1735,32 +1735,34 @@ #define IMG_BACKGROUND_ENVELOPE_3 1714 #define IMG_BACKGROUND_ENVELOPE_4 1715 #define IMG_BACKGROUND 1716 -#define IMG_BACKGROUND_TITLE 1717 -#define IMG_BACKGROUND_MESSAGE 1718 -#define IMG_BACKGROUND_MAIN 1719 -#define IMG_BACKGROUND_LEVELS 1720 -#define IMG_BACKGROUND_SCORES 1721 -#define IMG_BACKGROUND_EDITOR 1722 -#define IMG_BACKGROUND_INFO 1723 -#define IMG_BACKGROUND_INFO_ELEMENTS 1724 -#define IMG_BACKGROUND_INFO_MUSIC 1725 -#define IMG_BACKGROUND_INFO_CREDITS 1726 -#define IMG_BACKGROUND_INFO_PROGRAM 1727 -#define IMG_BACKGROUND_INFO_VERSION 1728 -#define IMG_BACKGROUND_INFO_LEVELSET 1729 -#define IMG_BACKGROUND_SETUP 1730 -#define IMG_BACKGROUND_DOOR 1731 -#define IMG_TITLESCREEN_INITIAL_1 1732 -#define IMG_TITLESCREEN_INITIAL_2 1733 -#define IMG_TITLESCREEN_INITIAL_3 1734 -#define IMG_TITLESCREEN_INITIAL_4 1735 -#define IMG_TITLESCREEN_INITIAL_5 1736 -#define IMG_TITLESCREEN_1 1737 -#define IMG_TITLESCREEN_2 1738 -#define IMG_TITLESCREEN_3 1739 -#define IMG_TITLESCREEN_4 1740 -#define IMG_TITLESCREEN_5 1741 +#define IMG_BACKGROUND_TITLE_INITIAL 1717 +#define IMG_BACKGROUND_TITLE 1718 +#define IMG_BACKGROUND_MESSAGE_INITIAL 1719 +#define IMG_BACKGROUND_MESSAGE 1720 +#define IMG_BACKGROUND_MAIN 1721 +#define IMG_BACKGROUND_LEVELS 1722 +#define IMG_BACKGROUND_SCORES 1723 +#define IMG_BACKGROUND_EDITOR 1724 +#define IMG_BACKGROUND_INFO 1725 +#define IMG_BACKGROUND_INFO_ELEMENTS 1726 +#define IMG_BACKGROUND_INFO_MUSIC 1727 +#define IMG_BACKGROUND_INFO_CREDITS 1728 +#define IMG_BACKGROUND_INFO_PROGRAM 1729 +#define IMG_BACKGROUND_INFO_VERSION 1730 +#define IMG_BACKGROUND_INFO_LEVELSET 1731 +#define IMG_BACKGROUND_SETUP 1732 +#define IMG_BACKGROUND_DOOR 1733 +#define IMG_TITLESCREEN_INITIAL_1 1734 +#define IMG_TITLESCREEN_INITIAL_2 1735 +#define IMG_TITLESCREEN_INITIAL_3 1736 +#define IMG_TITLESCREEN_INITIAL_4 1737 +#define IMG_TITLESCREEN_INITIAL_5 1738 +#define IMG_TITLESCREEN_1 1739 +#define IMG_TITLESCREEN_2 1740 +#define IMG_TITLESCREEN_3 1741 +#define IMG_TITLESCREEN_4 1742 +#define IMG_TITLESCREEN_5 1743 -#define NUM_IMAGE_FILES 1742 +#define NUM_IMAGE_FILES 1744 #endif /* CONF_GFX_H */ diff --git a/src/conftime.h b/src/conftime.h index 27965c93..5791a874 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-03-15 03:32" +#define COMPILE_DATE_STRING "2007-03-16 01:17" diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index fed6bcdf..b443991d 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -27,6 +27,7 @@ (8 - frame) * ply[p].y) * TILEY / 8 \ - ((SCR_FIELDY - 1) * TILEY) / 2) +#define USE_EXTENDED_GRAPHICS_ENGINE 0 int frame; /* current screen frame */ int screen_x; /* current scroll position */ @@ -149,7 +150,7 @@ static void DrawLevelField_EM(int x, int y, int sx, int sy, int tile = Draw[y][x]; struct GraphicInfo_EM *g = &graphic_info_em_object[tile][frame]; -#if 1 +#if USE_EXTENDED_GRAPHICS_ENGINE getGraphicSourceObjectExt_EM(tile, frame, &g->bitmap, &g->src_x, &g->src_y, x - 2, y - 2); #endif @@ -254,7 +255,7 @@ static void DrawLevelPlayer_EM(int x1, int y1, int player_nr, int anim, { struct GraphicInfo_EM *g = &graphic_info_em_player[player_nr][anim][frame]; -#if 1 +#if USE_EXTENDED_GRAPHICS_ENGINE getGraphicSourcePlayerExt_EM(player_nr, anim, frame, &g->bitmap, &g->src_x, &g->src_y); #endif @@ -368,7 +369,11 @@ static void animscreen(void) } /* only redraw screen tiles if they (or their crumbled state) changed */ +#if USE_EXTENDED_GRAPHICS_ENGINE // if (screentiles[sy][sx] != obj || crumbled_state[sy][sx] != crm) +#else + if (screentiles[sy][sx] != obj || crumbled_state[sy][sx] != crm) +#endif { DrawLevelField_EM(x, y, sx, sy, FALSE); DrawLevelFieldCrumbled_EM(x, y, sx, sy, crm, FALSE); diff --git a/src/init.c b/src/init.c index 95d9a1ca..c78a3420 100644 --- a/src/init.c +++ b/src/init.c @@ -167,7 +167,8 @@ static int getFontBitmapID(int font_nr) { int special = -1; - if (game_status >= GAME_MODE_TITLE && game_status <= GAME_MODE_PSEUDO_PREVIEW) + if (game_status >= GAME_MODE_TITLE_INITIAL && + game_status <= GAME_MODE_PSEUDO_PREVIEW) special = game_status; else if (game_status == GAME_MODE_PSEUDO_TYPENAME) special = GFX_SPECIAL_ARG_MAIN; @@ -1287,7 +1288,9 @@ static void InitGraphicInfo() IMG_BACKGROUND_ENVELOPE_4, IMG_BACKGROUND, + IMG_BACKGROUND_TITLE_INITIAL, IMG_BACKGROUND_TITLE, + IMG_BACKGROUND_MESSAGE_INITIAL, IMG_BACKGROUND_MESSAGE, IMG_BACKGROUND_MAIN, IMG_BACKGROUND_LEVELS, diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 985c160a..bc8a1a34 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1609,11 +1609,15 @@ static void printSetupFileHash(SetupFileHash *hash) #define ALLOW_TOKEN_VALUE_SEPARATOR_BEING_WHITESPACE 1 #define CHECK_TOKEN_VALUE_SEPARATOR__WARN_IF_MISSING 0 +#define CHECK_TOKEN__WARN_IF_ALREADY_EXISTS_IN_HASH 0 static boolean token_value_separator_found = FALSE; #if CHECK_TOKEN_VALUE_SEPARATOR__WARN_IF_MISSING static boolean token_value_separator_warning = FALSE; #endif +#if CHECK_TOKEN__WARN_IF_ALREADY_EXISTS_IN_HASH +static boolean token_already_exists_warning = FALSE; +#endif static boolean getTokenValueFromSetupLineExt(char *line, char **token_ptr, char **value_ptr, @@ -1776,6 +1780,10 @@ static boolean loadSetupFileData(void *setup_file_data, char *filename, token_value_separator_warning = FALSE; #endif +#if CHECK_TOKEN__WARN_IF_ALREADY_EXISTS_IN_HASH + token_already_exists_warning = FALSE; +#endif + if (!(file = fopen(filename, MODE_READ))) { Error(ERR_WARN, "cannot open configuration file '%s'", filename); @@ -1874,9 +1882,34 @@ static boolean loadSetupFileData(void *setup_file_data, char *filename, else { if (is_hash) + { +#if CHECK_TOKEN__WARN_IF_ALREADY_EXISTS_IN_HASH + char *old_value = + getHashEntry((SetupFileHash *)setup_file_data, token); + + if (old_value != NULL) + { + if (!token_already_exists_warning) + { + Error(ERR_INFO_LINE, "-"); + Error(ERR_WARN, "duplicate token(s) found in config file:"); + Error(ERR_INFO, "- config file: '%s'", filename); + + token_already_exists_warning = TRUE; + } + + Error(ERR_INFO, "- token: '%s' (in line %d)", token, line_nr); + Error(ERR_INFO, " old value: '%s'", old_value); + Error(ERR_INFO, " new value: '%s'", value); + } +#endif + setHashEntry((SetupFileHash *)setup_file_data, token, value); + } else + { insert_ptr = addListEntry((SetupFileList *)insert_ptr, token, value); + } token_count++; } @@ -1890,6 +1923,11 @@ static boolean loadSetupFileData(void *setup_file_data, char *filename, Error(ERR_INFO_LINE, "-"); #endif +#if CHECK_TOKEN__WARN_IF_ALREADY_EXISTS_IN_HASH + if (token_already_exists_warning) + Error(ERR_INFO_LINE, "-"); +#endif + if (token_count == 0) Error(ERR_WARN, "configuration file '%s' is empty", filename); diff --git a/src/main.c b/src/main.c index cd8e962e..f49c8c6b 100644 --- a/src/main.c +++ b/src/main.c @@ -5347,983 +5347,44 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] = struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] = { - { ".left", MV_BIT_LEFT }, - { ".right", MV_BIT_RIGHT }, - { ".up", MV_BIT_UP }, - { ".down", MV_BIT_DOWN }, - { ".upleft", MV_BIT_UP }, - { ".upright", MV_BIT_RIGHT }, - { ".downleft", MV_BIT_LEFT }, - { ".downright", MV_BIT_DOWN }, + { ".left", MV_BIT_LEFT }, + { ".right", MV_BIT_RIGHT }, + { ".up", MV_BIT_UP }, + { ".down", MV_BIT_DOWN }, + { ".upleft", MV_BIT_UP }, + { ".upright", MV_BIT_RIGHT }, + { ".downleft", MV_BIT_LEFT }, + { ".downright", MV_BIT_DOWN }, - { NULL, 0 } + { NULL, 0 } }; struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { - { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, }, - { ".TITLE", GFX_SPECIAL_ARG_TITLE, }, - { ".MESSAGE", GFX_SPECIAL_ARG_MESSAGE, }, - { ".MAIN", GFX_SPECIAL_ARG_MAIN, }, - { ".LEVELS", GFX_SPECIAL_ARG_LEVELS }, - { ".SCORES", GFX_SPECIAL_ARG_SCORES, }, - { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, }, - { ".INFO", GFX_SPECIAL_ARG_INFO, }, - { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, - { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, - { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, - { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, - { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, + { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, }, + { ".TITLE_INITIAL", GFX_SPECIAL_ARG_TITLE_INITIAL, }, + { ".TITLE", GFX_SPECIAL_ARG_TITLE, }, + { ".MESSAGE_INITIAL", GFX_SPECIAL_ARG_MESSAGE_INITIAL, }, + { ".MESSAGE", GFX_SPECIAL_ARG_MESSAGE, }, + { ".MAIN", GFX_SPECIAL_ARG_MAIN, }, + { ".LEVELS", GFX_SPECIAL_ARG_LEVELS }, + { ".SCORES", GFX_SPECIAL_ARG_SCORES, }, + { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, }, + { ".INFO", GFX_SPECIAL_ARG_INFO, }, + { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, + { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, + { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, + { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, + { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, /* empty suffix always matches -- check as last entry in InitMusicInfo() */ - { "", GFX_SPECIAL_ARG_DEFAULT, }, + { "", GFX_SPECIAL_ARG_DEFAULT, }, - { NULL, 0, } + { NULL, 0, } }; -#if 1 - #include "conf_var.c" /* include auto-generated data structure definitions */ -#else -struct TokenIntPtrInfo image_config_vars[] = -{ - { - "titlemessage_initial_1.x", - &titlemessage_initial[0].x - }, - { - "titlemessage_initial_1.y", - &titlemessage_initial[0].y - }, - { - "titlemessage_initial_1.width", - &titlemessage_initial[0].width - }, - { - "titlemessage_initial_1.height", - &titlemessage_initial[0].height - }, - { - "titlemessage_initial_1.chars", - &titlemessage_initial[0].chars - }, - { - "titlemessage_initial_1.lines", - &titlemessage_initial[0].lines - }, - { - "titlemessage_initial_1.align", - &titlemessage_initial[0].align - }, - { - "titlemessage_initial_1.font", - &titlemessage_initial[0].font - }, - { - "titlemessage_initial_1.autowrap", - &titlemessage_initial[0].autowrap - }, - { - "titlemessage_initial_1.centered", - &titlemessage_initial[0].centered - }, - { - "titlemessage_initial_1.skip_comments", - &titlemessage_initial[0].skip_comments - }, - { - "titlemessage_initial_1.sort_priority", - &titlemessage_initial[0].sort_priority - }, - { - "titlemessage_initial_2.x", - &titlemessage_initial[1].x - }, - { - "titlemessage_initial_2.y", - &titlemessage_initial[1].y - }, - { - "titlemessage_initial_2.width", - &titlemessage_initial[1].width - }, - { - "titlemessage_initial_2.height", - &titlemessage_initial[1].height - }, - { - "titlemessage_initial_2.chars", - &titlemessage_initial[1].chars - }, - { - "titlemessage_initial_2.lines", - &titlemessage_initial[1].lines - }, - { - "titlemessage_initial_2.align", - &titlemessage_initial[1].align - }, - { - "titlemessage_initial_2.font", - &titlemessage_initial[1].font - }, - { - "titlemessage_initial_2.autowrap", - &titlemessage_initial[1].autowrap - }, - { - "titlemessage_initial_2.centered", - &titlemessage_initial[1].centered - }, - { - "titlemessage_initial_2.skip_comments", - &titlemessage_initial[1].skip_comments - }, - { - "titlemessage_initial_2.sort_priority", - &titlemessage_initial[1].sort_priority - }, - { - "titlemessage_initial_3.x", - &titlemessage_initial[2].x - }, - { - "titlemessage_initial_3.y", - &titlemessage_initial[2].y - }, - { - "titlemessage_initial_3.width", - &titlemessage_initial[2].width - }, - { - "titlemessage_initial_3.height", - &titlemessage_initial[2].height - }, - { - "titlemessage_initial_3.chars", - &titlemessage_initial[2].chars - }, - { - "titlemessage_initial_3.lines", - &titlemessage_initial[2].lines - }, - { - "titlemessage_initial_3.align", - &titlemessage_initial[2].align - }, - { - "titlemessage_initial_3.font", - &titlemessage_initial[2].font - }, - { - "titlemessage_initial_3.autowrap", - &titlemessage_initial[2].autowrap - }, - { - "titlemessage_initial_3.centered", - &titlemessage_initial[2].centered - }, - { - "titlemessage_initial_3.skip_comments", - &titlemessage_initial[2].skip_comments - }, - { - "titlemessage_initial_3.sort_priority", - &titlemessage_initial[2].sort_priority - }, - { - "titlemessage_initial_4.x", - &titlemessage_initial[3].x - }, - { - "titlemessage_initial_4.y", - &titlemessage_initial[3].y - }, - { - "titlemessage_initial_4.width", - &titlemessage_initial[3].width - }, - { - "titlemessage_initial_4.height", - &titlemessage_initial[3].height - }, - { - "titlemessage_initial_4.chars", - &titlemessage_initial[3].chars - }, - { - "titlemessage_initial_4.lines", - &titlemessage_initial[3].lines - }, - { - "titlemessage_initial_4.align", - &titlemessage_initial[3].align - }, - { - "titlemessage_initial_4.font", - &titlemessage_initial[3].font - }, - { - "titlemessage_initial_4.autowrap", - &titlemessage_initial[3].autowrap - }, - { - "titlemessage_initial_4.centered", - &titlemessage_initial[3].centered - }, - { - "titlemessage_initial_4.skip_comments", - &titlemessage_initial[3].skip_comments - }, - { - "titlemessage_initial_4.sort_priority", - &titlemessage_initial[3].sort_priority - }, - { - "titlemessage_initial_5.x", - &titlemessage_initial[4].x - }, - { - "titlemessage_initial_5.y", - &titlemessage_initial[4].y - }, - { - "titlemessage_initial_5.width", - &titlemessage_initial[4].width - }, - { - "titlemessage_initial_5.height", - &titlemessage_initial[4].height - }, - { - "titlemessage_initial_5.chars", - &titlemessage_initial[4].chars - }, - { - "titlemessage_initial_5.lines", - &titlemessage_initial[4].lines - }, - { - "titlemessage_initial_5.align", - &titlemessage_initial[4].align - }, - { - "titlemessage_initial_5.font", - &titlemessage_initial[4].font - }, - { - "titlemessage_initial_5.autowrap", - &titlemessage_initial[4].autowrap - }, - { - "titlemessage_initial_5.centered", - &titlemessage_initial[4].centered - }, - { - "titlemessage_initial_5.skip_comments", - &titlemessage_initial[4].skip_comments - }, - { - "titlemessage_initial_5.sort_priority", - &titlemessage_initial[4].sort_priority - }, - { - "titlemessage_1.x", - &titlemessage[0].x - }, - { - "titlemessage_1.y", - &titlemessage[0].y - }, - { - "titlemessage_1.width", - &titlemessage[0].width - }, - { - "titlemessage_1.height", - &titlemessage[0].height - }, - { - "titlemessage_1.chars", - &titlemessage[0].chars - }, - { - "titlemessage_1.lines", - &titlemessage[0].lines - }, - { - "titlemessage_1.align", - &titlemessage[0].align - }, - { - "titlemessage_1.font", - &titlemessage[0].font - }, - { - "titlemessage_1.autowrap", - &titlemessage[0].autowrap - }, - { - "titlemessage_1.centered", - &titlemessage[0].centered - }, - { - "titlemessage_1.skip_comments", - &titlemessage[0].skip_comments - }, - { - "titlemessage_1.sort_priority", - &titlemessage[0].sort_priority - }, - { - "titlemessage_2.x", - &titlemessage[1].x - }, - { - "titlemessage_2.y", - &titlemessage[1].y - }, - { - "titlemessage_2.width", - &titlemessage[1].width - }, - { - "titlemessage_2.height", - &titlemessage[1].height - }, - { - "titlemessage_2.chars", - &titlemessage[1].chars - }, - { - "titlemessage_2.lines", - &titlemessage[1].lines - }, - { - "titlemessage_2.align", - &titlemessage[1].align - }, - { - "titlemessage_2.font", - &titlemessage[1].font - }, - { - "titlemessage_2.autowrap", - &titlemessage[1].autowrap - }, - { - "titlemessage_2.centered", - &titlemessage[1].centered - }, - { - "titlemessage_2.skip_comments", - &titlemessage[1].skip_comments - }, - { - "titlemessage_2.sort_priority", - &titlemessage[1].sort_priority - }, - { - "titlemessage_3.x", - &titlemessage[2].x - }, - { - "titlemessage_3.y", - &titlemessage[2].y - }, - { - "titlemessage_3.width", - &titlemessage[2].width - }, - { - "titlemessage_3.height", - &titlemessage[2].height - }, - { - "titlemessage_3.chars", - &titlemessage[2].chars - }, - { - "titlemessage_3.lines", - &titlemessage[2].lines - }, - { - "titlemessage_3.align", - &titlemessage[2].align - }, - { - "titlemessage_3.font", - &titlemessage[2].font - }, - { - "titlemessage_3.autowrap", - &titlemessage[2].autowrap - }, - { - "titlemessage_3.centered", - &titlemessage[2].centered - }, - { - "titlemessage_3.skip_comments", - &titlemessage[2].skip_comments - }, - { - "titlemessage_3.sort_priority", - &titlemessage[2].sort_priority - }, - { - "titlemessage_4.x", - &titlemessage[3].x - }, - { - "titlemessage_4.y", - &titlemessage[3].y - }, - { - "titlemessage_4.width", - &titlemessage[3].width - }, - { - "titlemessage_4.height", - &titlemessage[3].height - }, - { - "titlemessage_4.chars", - &titlemessage[3].chars - }, - { - "titlemessage_4.lines", - &titlemessage[3].lines - }, - { - "titlemessage_4.align", - &titlemessage[3].align - }, - { - "titlemessage_4.font", - &titlemessage[3].font - }, - { - "titlemessage_4.autowrap", - &titlemessage[3].autowrap - }, - { - "titlemessage_4.centered", - &titlemessage[3].centered - }, - { - "titlemessage_4.skip_comments", - &titlemessage[3].skip_comments - }, - { - "titlemessage_4.sort_priority", - &titlemessage[3].sort_priority - }, - { - "titlemessage_5.x", - &titlemessage[4].x - }, - { - "titlemessage_5.y", - &titlemessage[4].y - }, - { - "titlemessage_5.width", - &titlemessage[4].width - }, - { - "titlemessage_5.height", - &titlemessage[4].height - }, - { - "titlemessage_5.chars", - &titlemessage[4].chars - }, - { - "titlemessage_5.lines", - &titlemessage[4].lines - }, - { - "titlemessage_5.align", - &titlemessage[4].align - }, - { - "titlemessage_5.font", - &titlemessage[4].font - }, - { - "titlemessage_5.autowrap", - &titlemessage[4].autowrap - }, - { - "titlemessage_5.centered", - &titlemessage[4].centered - }, - { - "titlemessage_5.skip_comments", - &titlemessage[4].skip_comments - }, - { - "titlemessage_5.sort_priority", - &titlemessage[4].sort_priority - }, - - { - "readme.x", - &readme.x - }, - { - "readme.y", - &readme.y - }, - { - "readme.width", - &readme.width - }, - { - "readme.height", - &readme.height - }, - { - "readme.chars", - &readme.chars - }, - { - "readme.lines", - &readme.lines - }, - { - "readme.align", - &readme.align - }, - { - "readme.font", - &readme.font - }, - { - "readme.autowrap", - &readme.autowrap - }, - { - "readme.centered", - &readme.centered - }, - { - "readme.skip_comments", - &readme.skip_comments - }, - { - "readme.sort_priority", - &readme.sort_priority - }, - - { - "global.num_toons", - &global.num_toons - }, - - { - "border.draw_masked.TITLE", - &border.draw_masked[GFX_SPECIAL_ARG_TITLE] - }, - { - "border.draw_masked.MAIN", - &border.draw_masked[GFX_SPECIAL_ARG_MAIN] - }, - { - "border.draw_masked.LEVELS", - &border.draw_masked[GFX_SPECIAL_ARG_LEVELS] - }, - { - "border.draw_masked.SCORES", - &border.draw_masked[GFX_SPECIAL_ARG_SCORES] - }, - { - "border.draw_masked.EDITOR", - &border.draw_masked[GFX_SPECIAL_ARG_EDITOR] - }, - { - "border.draw_masked.INFO", - &border.draw_masked[GFX_SPECIAL_ARG_INFO] - }, - { - "border.draw_masked.SETUP", - &border.draw_masked[GFX_SPECIAL_ARG_SETUP] - }, - { - "border.draw_masked.PLAYING", - &border.draw_masked[GFX_SPECIAL_ARG_PLAYING] - }, - { - "border.draw_masked.DOOR", - &border.draw_masked[GFX_SPECIAL_ARG_DOOR] - }, - - { - "title.fade_delay", - &title.fade_delay - }, - { - "title.post_delay", - &title.post_delay - }, - { - "title.auto_delay", - &title.auto_delay - }, - - { - "menu.fade_delay", - &menu.fade_delay - }, - { - "menu.post_delay", - &menu.post_delay - }, - { - "menu.auto_delay", - &menu.auto_delay - }, - - { - "menu.draw_xoffset", - &menu.draw_xoffset[GFX_SPECIAL_ARG_DEFAULT] - }, - { - "menu.draw_yoffset", - &menu.draw_yoffset[GFX_SPECIAL_ARG_DEFAULT] - }, - { - "menu.draw_xoffset.MAIN", - &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN] - }, - { - "menu.draw_yoffset.MAIN", - &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN] - }, - { - "menu.draw_xoffset.LEVELS", - &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS] - }, - { - "menu.draw_yoffset.LEVELS", - &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS] - }, - { - "menu.draw_xoffset.SCORES", - &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES] - }, - { - "menu.draw_yoffset.SCORES", - &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES] - }, - { - "menu.draw_xoffset.EDITOR", - &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR] - }, - { - "menu.draw_yoffset.EDITOR", - &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] - }, - { - "menu.draw_xoffset.INFO", - &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO] - }, - { - "menu.draw_yoffset.INFO", - &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO] - }, - { - "menu.draw_xoffset.INFO[ELEMENTS]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] - }, - { - "menu.draw_yoffset.INFO[ELEMENTS]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] - }, - { - "menu.draw_xoffset.INFO[MUSIC]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] - }, - { - "menu.draw_yoffset.INFO[MUSIC]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] - }, - { - "menu.draw_xoffset.INFO[CREDITS]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] - }, - { - "menu.draw_yoffset.INFO[CREDITS]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] - }, - { - "menu.draw_xoffset.INFO[PROGRAM]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] - }, - { - "menu.draw_yoffset.INFO[PROGRAM]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] - }, - { - "menu.draw_xoffset.INFO[VERSION]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] - }, - { - "menu.draw_yoffset.INFO[VERSION]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] - }, - { - "menu.draw_xoffset.INFO[LEVELSET]", - &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] - }, - { - "menu.draw_yoffset.INFO[LEVELSET]", - &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] - }, - { - "menu.draw_xoffset.SETUP", - &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP] - }, - { - "menu.draw_yoffset.SETUP", - &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP] - }, - - { - "menu.scrollbar_xoffset", - &menu.scrollbar_xoffset - }, - - { - "menu.list_size", - &menu.list_size[GFX_SPECIAL_ARG_DEFAULT] - }, - { - "menu.list_size.LEVELS", - &menu.list_size[GFX_SPECIAL_ARG_LEVELS] - }, - { - "menu.list_size.SCORES", - &menu.list_size[GFX_SPECIAL_ARG_SCORES] - }, - { - "menu.list_size.INFO", - &menu.list_size[GFX_SPECIAL_ARG_INFO] - }, - - { "main.button.name.x", &menu.main.button.name.x }, - { "main.button.name.y", &menu.main.button.name.y }, - { "main.button.levels.x", &menu.main.button.levels.x }, - { "main.button.levels.y", &menu.main.button.levels.y }, - { "main.button.scores.x", &menu.main.button.scores.x }, - { "main.button.scores.y", &menu.main.button.scores.y }, - { "main.button.editor.x", &menu.main.button.editor.x }, - { "main.button.editor.y", &menu.main.button.editor.y }, - { "main.button.info.x", &menu.main.button.info.x }, - { "main.button.info.y", &menu.main.button.info.y }, - { "main.button.game.x", &menu.main.button.game.x }, - { "main.button.game.y", &menu.main.button.game.y }, - { "main.button.setup.x", &menu.main.button.setup.x }, - { "main.button.setup.y", &menu.main.button.setup.y }, - { "main.button.quit.x", &menu.main.button.quit.x }, - { "main.button.quit.y", &menu.main.button.quit.y }, - - { "main.button.prev_level.x", &menu.main.button.prev_level.x }, - { "main.button.prev_level.y", &menu.main.button.prev_level.y }, - { "main.button.next_level.x", &menu.main.button.next_level.x }, - { "main.button.next_level.y", &menu.main.button.next_level.y }, - - { "main.text.name.x", &menu.main.text.name.x }, - { "main.text.name.y", &menu.main.text.name.y }, - { "main.text.name.width", &menu.main.text.name.width }, - { "main.text.name.height", &menu.main.text.name.height }, - { "main.text.name.align", &menu.main.text.name.align }, - { "main.text.name.font", &menu.main.text.name.font }, - { "main.text.levels.x", &menu.main.text.levels.x }, - { "main.text.levels.y", &menu.main.text.levels.y }, - { "main.text.levels.width", &menu.main.text.levels.width }, - { "main.text.levels.height", &menu.main.text.levels.height }, - { "main.text.levels.align", &menu.main.text.levels.align }, - { "main.text.levels.font", &menu.main.text.levels.font }, - { "main.text.scores.x", &menu.main.text.scores.x }, - { "main.text.scores.y", &menu.main.text.scores.y }, - { "main.text.scores.width", &menu.main.text.scores.width }, - { "main.text.scores.height", &menu.main.text.scores.height }, - { "main.text.scores.align", &menu.main.text.scores.align }, - { "main.text.scores.font", &menu.main.text.scores.font }, - { "main.text.editor.x", &menu.main.text.editor.x }, - { "main.text.editor.y", &menu.main.text.editor.y }, - { "main.text.editor.width", &menu.main.text.editor.width }, - { "main.text.editor.height", &menu.main.text.editor.height }, - { "main.text.editor.align", &menu.main.text.editor.align }, - { "main.text.editor.font", &menu.main.text.editor.font }, - { "main.text.info.x", &menu.main.text.info.x }, - { "main.text.info.y", &menu.main.text.info.y }, - { "main.text.info.width", &menu.main.text.info.width }, - { "main.text.info.height", &menu.main.text.info.height }, - { "main.text.info.align", &menu.main.text.info.align }, - { "main.text.info.font", &menu.main.text.info.font }, - { "main.text.game.x", &menu.main.text.game.x }, - { "main.text.game.y", &menu.main.text.game.y }, - { "main.text.game.width", &menu.main.text.game.width }, - { "main.text.game.height", &menu.main.text.game.height }, - { "main.text.game.align", &menu.main.text.game.align }, - { "main.text.game.font", &menu.main.text.game.font }, - { "main.text.setup.x", &menu.main.text.setup.x }, - { "main.text.setup.y", &menu.main.text.setup.y }, - { "main.text.setup.width", &menu.main.text.setup.width }, - { "main.text.setup.height", &menu.main.text.setup.height }, - { "main.text.setup.align", &menu.main.text.setup.align }, - { "main.text.setup.font", &menu.main.text.setup.font }, - { "main.text.quit.x", &menu.main.text.quit.x }, - { "main.text.quit.y", &menu.main.text.quit.y }, - { "main.text.quit.width", &menu.main.text.quit.width }, - { "main.text.quit.height", &menu.main.text.quit.height }, - { "main.text.quit.align", &menu.main.text.quit.align }, - { "main.text.quit.font", &menu.main.text.quit.font }, - - { "main.text.current_level.x", &menu.main.text.current_level.x }, - { "main.text.current_level.y", &menu.main.text.current_level.y }, - { "main.text.current_level.align", &menu.main.text.current_level.align }, - { "main.text.current_level.font", &menu.main.text.current_level.font }, - { "main.text.first_level.x", &menu.main.text.first_level.x }, - { "main.text.first_level.y", &menu.main.text.first_level.y }, - { "main.text.first_level.align", &menu.main.text.first_level.align }, - { "main.text.first_level.font", &menu.main.text.first_level.font }, - { "main.text.last_level.x", &menu.main.text.last_level.x }, - { "main.text.last_level.y", &menu.main.text.last_level.y }, - { "main.text.last_level.align", &menu.main.text.last_level.align }, - { "main.text.last_level.font", &menu.main.text.last_level.font }, - { "main.text.level_info_1.x", &menu.main.text.level_info_1.x }, - { "main.text.level_info_1.y", &menu.main.text.level_info_1.y }, - { "main.text.level_info_1.align", &menu.main.text.level_info_1.align }, - { "main.text.level_info_1.chars", &menu.main.text.level_info_1.chars }, - { "main.text.level_info_1.font", &menu.main.text.level_info_1.font }, - { "main.text.level_info_2.x", &menu.main.text.level_info_2.x }, - { "main.text.level_info_2.y", &menu.main.text.level_info_2.y }, - { "main.text.level_info_2.align", &menu.main.text.level_info_2.align }, - { "main.text.level_info_2.chars", &menu.main.text.level_info_2.chars }, - { "main.text.level_info_2.font", &menu.main.text.level_info_2.font }, - { "main.text.level_info_2.font_header",&menu.main.text.level_info_2.font_alt}, - { "main.text.level_name.x", &menu.main.text.level_name.x }, - { "main.text.level_name.y", &menu.main.text.level_name.y }, - { "main.text.level_name.align", &menu.main.text.level_name.align }, - { "main.text.level_name.chars", &menu.main.text.level_name.chars }, - { "main.text.level_name.font", &menu.main.text.level_name.font }, - { "main.text.level_author.x", &menu.main.text.level_author.x }, - { "main.text.level_author.y", &menu.main.text.level_author.y }, - { "main.text.level_author.align", &menu.main.text.level_author.align }, - { "main.text.level_author.chars", &menu.main.text.level_author.chars }, - { "main.text.level_author.font", &menu.main.text.level_author.font }, - { "main.text.level_year.x", &menu.main.text.level_year.x }, - { "main.text.level_year.y", &menu.main.text.level_year.y }, - { "main.text.level_year.align", &menu.main.text.level_year.align }, - { "main.text.level_year.chars", &menu.main.text.level_year.chars }, - { "main.text.level_year.font", &menu.main.text.level_year.font }, - { "main.text.level_imported_from.x", &menu.main.text.level_imported_from.x }, - { "main.text.level_imported_from.y", &menu.main.text.level_imported_from.y }, - { "main.text.level_imported_from.align", - &menu.main.text.level_imported_from.align }, - { "main.text.level_imported_from.chars", - &menu.main.text.level_imported_from.chars }, - { "main.text.level_imported_from.font", - &menu.main.text.level_imported_from.font }, - { "main.text.level_imported_by.x", &menu.main.text.level_imported_by.x }, - { "main.text.level_imported_by.y", &menu.main.text.level_imported_by.y }, - { "main.text.level_imported_by.align", - &menu.main.text.level_imported_by.align }, - { "main.text.level_imported_by.chars", - &menu.main.text.level_imported_by.chars }, - { "main.text.level_imported_by.font", - &menu.main.text.level_imported_by.font }, - { "main.text.level_tested_by.x", &menu.main.text.level_tested_by.x }, - { "main.text.level_tested_by.y", &menu.main.text.level_tested_by.y }, - { "main.text.level_tested_by.align", &menu.main.text.level_tested_by.align }, - { "main.text.level_tested_by.chars", &menu.main.text.level_tested_by.chars }, - { "main.text.level_tested_by.font", &menu.main.text.level_tested_by.font }, - { "main.text.title_1.x", &menu.main.text.title_1.x }, - { "main.text.title_1.y", &menu.main.text.title_1.y }, - { "main.text.title_1.align", &menu.main.text.title_1.align }, - { "main.text.title_1.font", &menu.main.text.title_1.font }, - { "main.text.title_2.x", &menu.main.text.title_2.x }, - { "main.text.title_2.y", &menu.main.text.title_2.y }, - { "main.text.title_2.align", &menu.main.text.title_2.align }, - { "main.text.title_2.font", &menu.main.text.title_2.font }, - { "main.text.title_3.x", &menu.main.text.title_3.x }, - { "main.text.title_3.y", &menu.main.text.title_3.y }, - { "main.text.title_3.align", &menu.main.text.title_3.align }, - { "main.text.title_3.font", &menu.main.text.title_3.font }, - - { "main.input.name.x", &menu.main.input.name.x }, - { "main.input.name.y", &menu.main.input.name.y }, - { "main.input.name.align", &menu.main.input.name.align }, - { "main.input.name.font", &menu.main.input.name.font }, - - { "preview.x", &preview.x }, - { "preview.y", &preview.y }, - { "preview.align", &preview.align }, - { "preview.xsize", &preview.xsize }, - { "preview.ysize", &preview.ysize }, - { "preview.xoffset", &preview.xoffset }, - { "preview.yoffset", &preview.yoffset }, - { "preview.tile_size", &preview.tile_size }, - { "preview.step_offset", &preview.step_offset }, - { "preview.step_delay", &preview.step_delay }, - { "preview.anim_mode", &preview.anim_mode }, - - { "door_1.width", &door_1.width }, - { "door_1.height", &door_1.height }, - { "door_1.step_offset", &door_1.step_offset }, - { "door_1.step_delay", &door_1.step_delay }, - { "door_1.anim_mode", &door_1.anim_mode }, - { "door_2.width", &door_2.width }, - { "door_2.height", &door_2.height }, - { "door_2.step_offset", &door_2.step_offset }, - { "door_2.step_delay", &door_2.step_delay }, - { "door_2.anim_mode", &door_2.anim_mode }, - - { "game.panel.level.x", &game.panel.level.x }, - { "game.panel.level.y", &game.panel.level.y }, - { "game.panel.level.align", &game.panel.level.align }, - { "game.panel.level.chars", &game.panel.level.chars }, - { "game.panel.level.font", &game.panel.level.font }, - { "game.panel.level.font_narrow", &game.panel.level.font_alt }, - { "game.panel.gems.x", &game.panel.gems.x }, - { "game.panel.gems.y", &game.panel.gems.y }, - { "game.panel.gems.align", &game.panel.gems.align }, - { "game.panel.gems.chars", &game.panel.gems.chars }, - { "game.panel.gems.font", &game.panel.gems.font }, - { "game.panel.inventory.x", &game.panel.inventory.x }, - { "game.panel.inventory.y", &game.panel.inventory.y }, - { "game.panel.inventory.align", &game.panel.inventory.align }, - { "game.panel.inventory.chars", &game.panel.inventory.chars }, - { "game.panel.inventory.font", &game.panel.inventory.font }, - { "game.panel.keys.x", &game.panel.keys.x }, - { "game.panel.keys.y", &game.panel.keys.y }, - { "game.panel.keys.align", &game.panel.keys.align }, - { "game.panel.score.x", &game.panel.score.x }, - { "game.panel.score.y", &game.panel.score.y }, - { "game.panel.score.align", &game.panel.score.align }, - { "game.panel.score.chars", &game.panel.score.chars }, - { "game.panel.score.font", &game.panel.score.font }, - { "game.panel.time.x", &game.panel.time.x }, - { "game.panel.time.y", &game.panel.time.y }, - { "game.panel.time.align", &game.panel.time.align }, - { "game.panel.time.chars", &game.panel.time.chars }, - { "game.panel.time.font", &game.panel.time.font }, - { "game.panel.time.font_narrow", &game.panel.time.font_alt }, - - { "[player].boring_delay_fixed", &game.player_boring_delay_fixed }, - { "[player].boring_delay_random", &game.player_boring_delay_random }, - { "[player].sleeping_delay_fixed", &game.player_sleeping_delay_fixed }, - { "[player].sleeping_delay_random", &game.player_sleeping_delay_random }, - - { NULL, NULL, } -}; -#endif - /* ------------------------------------------------------------------------- */ /* font definitions */ diff --git a/src/main.h b/src/main.h index 6d80a9b2..29858c32 100644 --- a/src/main.h +++ b/src/main.h @@ -1720,20 +1720,22 @@ /* values for special image configuration suffixes (must match game mode) */ #define GFX_SPECIAL_ARG_DEFAULT 0 -#define GFX_SPECIAL_ARG_TITLE 1 -#define GFX_SPECIAL_ARG_MESSAGE 2 -#define GFX_SPECIAL_ARG_MAIN 3 -#define GFX_SPECIAL_ARG_LEVELS 4 -#define GFX_SPECIAL_ARG_SCORES 5 -#define GFX_SPECIAL_ARG_EDITOR 6 -#define GFX_SPECIAL_ARG_INFO 7 -#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 NUM_SPECIAL_GFX_ARGS 13 +#define GFX_SPECIAL_ARG_TITLE_INITIAL 1 +#define GFX_SPECIAL_ARG_TITLE 2 +#define GFX_SPECIAL_ARG_MESSAGE_INITIAL 3 +#define GFX_SPECIAL_ARG_MESSAGE 4 +#define GFX_SPECIAL_ARG_MAIN 5 +#define GFX_SPECIAL_ARG_LEVELS 6 +#define GFX_SPECIAL_ARG_SCORES 7 +#define GFX_SPECIAL_ARG_EDITOR 8 +#define GFX_SPECIAL_ARG_INFO 9 +#define GFX_SPECIAL_ARG_SETUP 10 +#define GFX_SPECIAL_ARG_PLAYING 11 +#define GFX_SPECIAL_ARG_DOOR 12 +#define GFX_SPECIAL_ARG_PREVIEW 13 +#define GFX_SPECIAL_ARG_CRUMBLED 14 + +#define NUM_SPECIAL_GFX_ARGS 15 /* these additional definitions are currently only used for draw offsets */ #define GFX_SPECIAL_ARG_INFO_MAIN 0 @@ -1869,22 +1871,24 @@ /* values for game_status (must match special image configuration suffixes) */ #define GAME_MODE_DEFAULT 0 -#define GAME_MODE_TITLE 1 -#define GAME_MODE_MESSAGE 2 -#define GAME_MODE_MAIN 3 -#define GAME_MODE_LEVELS 4 -#define GAME_MODE_SCORES 5 -#define GAME_MODE_EDITOR 6 -#define GAME_MODE_INFO 7 -#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_TITLE_INITIAL 1 +#define GAME_MODE_TITLE 2 +#define GAME_MODE_MESSAGE_INITIAL 3 +#define GAME_MODE_MESSAGE 4 +#define GAME_MODE_MAIN 5 +#define GAME_MODE_LEVELS 6 +#define GAME_MODE_SCORES 7 +#define GAME_MODE_EDITOR 8 +#define GAME_MODE_INFO 9 +#define GAME_MODE_SETUP 10 +#define GAME_MODE_PLAYING 11 +#define GAME_MODE_PSEUDO_DOOR 12 +#define GAME_MODE_PSEUDO_PREVIEW 13 +#define GAME_MODE_PSEUDO_CRUMBLED 14 /* 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 15 +#define GAME_MODE_QUIT 16 /* special definitions currently only used for custom artwork configuration */ #define MUSIC_PREFIX_BACKGROUND 0 diff --git a/src/screens.c b/src/screens.c index a1ef1ce3..5c194180 100644 --- a/src/screens.c +++ b/src/screens.c @@ -494,6 +494,21 @@ static struct TitleMessageInfo *getTitleMessageInfo(int nr, boolean initial) return (initial ? &titlemessage_initial[nr] : &titlemessage[nr]); } +static int getTitleMessageGameMode(boolean initial) +{ + return (initial ? GAME_MODE_MESSAGE_INITIAL : GAME_MODE_MESSAGE); +} + +static int getTitleScreenBackground(boolean initial) +{ + return (initial ? IMG_BACKGROUND_TITLE_INITIAL : IMG_BACKGROUND_TITLE); +} + +static int getTitleMessageBackground(boolean initial) +{ + return (initial ? IMG_BACKGROUND_MESSAGE_INITIAL : IMG_BACKGROUND_MESSAGE); +} + static int compareTitleControlInfo(const void *object1, const void *object2) { const struct TitleControlInfo *tci1 = (struct TitleControlInfo *)object1; @@ -926,11 +941,12 @@ void DrawTitleScreenImage(int nr, boolean initial) height = WIN_YSIZE; } + /* always display title screens centered */ dst_x = (WIN_XSIZE - width) / 2; dst_y = (WIN_YSIZE - height) / 2; SetDrawBackgroundMask(REDRAW_ALL); - SetWindowBackgroundImage(IMG_BACKGROUND_TITLE); + SetWindowBackgroundImage(getTitleScreenBackground(initial)); ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE); @@ -976,7 +992,7 @@ void DrawTitleScreenMessage(int nr, boolean initial) return; /* force MESSAGE font on title message screen */ - game_status = GAME_MODE_MESSAGE; + game_status = getTitleMessageGameMode(initial); /* if chars set to "-1", automatically determine by text and font width */ if (tmi->chars == -1) @@ -991,7 +1007,7 @@ void DrawTitleScreenMessage(int nr, boolean initial) tmi->height = tmi->lines * getFontHeight(tmi->font); SetDrawBackgroundMask(REDRAW_ALL); - SetWindowBackgroundImage(IMG_BACKGROUND_MESSAGE); + SetWindowBackgroundImage(getTitleMessageBackground(initial)); ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE); diff --git a/src/tools.c b/src/tools.c index 558e83a6..6529d447 100644 --- a/src/tools.c +++ b/src/tools.c @@ -242,8 +242,7 @@ void DrawMaskedBorder_ALL() void DrawMaskedBorder(int redraw_mask) { /* do not draw masked screen borders when displaying title screens */ - if (effectiveGameStatus() == GAME_MODE_TITLE || - effectiveGameStatus() == GAME_MODE_MESSAGE) + if (effectiveGameStatus() == GAME_MODE_TITLE) return; if (redraw_mask & REDRAW_ALL) @@ -1766,11 +1765,7 @@ static void DrawPreviewLevelExt(int from_x, int from_y) int real_preview_xsize = MIN(level_xsize, preview.xsize); int real_preview_ysize = MIN(level_ysize, preview.ysize); int dst_x = SX + ALIGNED_XPOS(preview.x, preview_width, preview.align); -#if 1 int dst_y = SY + ALIGNED_YPOS(preview.y, preview_height, preview.valign); -#else - int dst_y = SY + preview.y; -#endif int x, y; DrawBackground(dst_x, dst_y, preview_width, preview_height);