From: Holger Schemel Date: Sat, 16 Mar 2024 11:59:54 +0000 (+0100) Subject: added showing optional title screen for native BD cavesets X-Git-Tag: 4.4.0.0-test-1~181 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4ed68b54ed9bed72d87eac4dd7b117fc4b8022d6;p=rocksndiamonds.git added showing optional title screen for native BD cavesets --- diff --git a/src/screens.c b/src/screens.c index aadbe74d..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;