X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=0d7c6dd8079dae94976c2b85059b54430c2b8fb4;hb=4ed68b54ed9bed72d87eac4dd7b117fc4b8022d6;hp=f623a7a551c41ab14bc3e0799f5511d35e1de7cc;hpb=5888edfa42bf4f5cf1772453b60937c7cedffe08;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index f623a7a5..0d7c6dd8 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1142,8 +1142,13 @@ static void InitializeTitleControls_CheckTitleInfo(boolean initial) int graphic = getTitleScreenGraphic(i, initial); Bitmap *bitmap = graphic_info[graphic].bitmap; int sort_priority = graphic_info[graphic].sort_priority; + boolean has_title_screen = (bitmap != NULL); - if (bitmap != NULL) + // check for optional title screen of native BD style level set + if (!has_title_screen && level.game_engine_type == GAME_ENGINE_TYPE_BD && !initial && i == 0) + has_title_screen = (GetTitleScreen_BD() != NULL); + + if (has_title_screen) InitializeTitleControlsExt_AddTitleInfo(TRUE, initial, i, sort_priority); } @@ -1605,6 +1610,20 @@ static void DrawTitleScreenImage(int nr, boolean initial) int src_y = graphic_info[graphic].src_y; int dst_x, dst_y; + // check for optional title screen of native BD style level set + if (bitmap == NULL && level.game_engine_type == GAME_ENGINE_TYPE_BD && !initial && nr == 0) + { + bitmap = GetTitleScreen_BD(); + + if (bitmap != NULL) + { + width = bitmap->width; + height = bitmap->height; + src_x = 0; + src_y = 0; + } + } + if (bitmap == NULL) return; @@ -1785,6 +1804,15 @@ void DrawMainMenu(void) // store first level of this level set for "level_nr" style animations SetAnimationFirstLevel(leveldir_current->first_level); + // level_nr may have been set to value over handicap with level editor + if (setup.handicap && level_nr > leveldir_current->handicap_level) + level_nr = leveldir_current->handicap_level; + + LoadLevel(level_nr); + LoadScore(level_nr); + + SaveLevelSetup_SeriesInfo(); + // needed if last screen (level choice) changed graphics, sounds or music ReloadCustomArtwork(0); @@ -1810,15 +1838,6 @@ void DrawMainMenu(void) SetDrawtoField(DRAW_TO_BACKBUFFER); - // level_nr may have been set to value over handicap with level editor - if (setup.handicap && level_nr > leveldir_current->handicap_level) - level_nr = leveldir_current->handicap_level; - - LoadLevel(level_nr); - LoadScore(level_nr); - - SaveLevelSetup_SeriesInfo(); - // set this after "ChangeViewportPropertiesIfNeeded()" (which may reset it) SetDrawDeactivationMask(REDRAW_NONE); SetDrawBackgroundMask(REDRAW_FIELD);