From 72582501e94989c79f16fbbcbf149c75e10a786c Mon Sep 17 00:00:00 2001 From: Shadooow Date: Wed, 26 May 2021 21:22:45 +0000 Subject: [PATCH] fix for undeground sectors showing LS_DAYGENERIC.sti instead of assigned custom loadscreen that is only in PNG format git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9053 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Loading Screen.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Loading Screen.cpp b/Loading Screen.cpp index d5da574d..2ed5e7ef 100644 --- a/Loading Screen.cpp +++ b/Loading Screen.cpp @@ -432,11 +432,18 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID ) if ( !FileExists(vs_desc.ImageFile) ) { - std::string strImage("LOADSCREENS\\"); - - BuildLoadscreenFilename(strImage, LoadScreenNames[1], 0, imageFormat.c_str()); + std::string strImage; + BuildLoadscreenFilename(strImage, imagePath.c_str(), 0, "png"); + strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile) - 1); - strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1); + if (!FileExists(vs_desc.ImageFile)) + { + std::string strImage("LOADSCREENS\\"); + + BuildLoadscreenFilename(strImage, LoadScreenNames[1], 0, imageFormat.c_str()); + + strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile) - 1); + } } } else