From 48766267e881ec3420bb17c53e12b29b03f43fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=82=A6=E8=A7=A3=E8=AF=B4?= Date: Sat, 29 Oct 2022 20:02:50 +0800 Subject: [PATCH] Fix loadingscreen bug --- Game.bb | 4 +++- Source Code/Menu_Core.bb | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Game.bb b/Game.bb index 83d4d8d7d..d1e3afd19 100644 --- a/Game.bb +++ b/Game.bb @@ -1,6 +1,6 @@ ; ~ The main file of the game ;---------------------------------------------------------------------------------------------------------------------------------------------------- -; ~ SCP - Containment Breach Ultimate Edition v1.0.3 +; ~ SCP - Containment Breach Ultimate Edition v1.0.4 ;---------------------------------------------------------------------------------------------------------------------------------------------------- ; ~ This is a modification of the game "SCP - Containment Breach" ; ~ The mod is developed by the "Ultimate Edition Team" (https://www.moddb.com/company/ultimate-edition-team) @@ -37,6 +37,7 @@ Function SetLanguage%(Language$) IniWriteBuffer_(lang\LanguagePath + LanguageFile, 1) IniWriteBuffer_(lang\LanguagePath + SubtitlesFile, 1) IniWriteBuffer_(lang\LanguagePath + AchievementsFile, 1) + IniWriteBuffer_(lang\LanguagePath + LoadingScreensFile, 1) opt\Language = Language End Function @@ -60,6 +61,7 @@ Global lang.Language = New Language IniWriteBuffer_(LanguageFile, 1) IniWriteBuffer_(SubtitlesFile, 1) IniWriteBuffer_(AchievementsFile, 1) +IniWriteBuffer_(LoadingScreensFile, 1) Include "Source Code\KeyBinds_Core.bb" Include "Source Code\INI_Core.bb" diff --git a/Source Code/Menu_Core.bb b/Source Code/Menu_Core.bb index 0355c460c..8a09fe91a 100644 --- a/Source Code/Menu_Core.bb +++ b/Source Code/Menu_Core.bb @@ -2081,7 +2081,7 @@ End Type Function InitLoadingScreens%(File$) Local TemporaryString$, i% Local ls.LoadingScreens - Local f% = OpenFile(File) + Local f% = OpenFile_Strict(File) While (Not Eof(f)) TemporaryString = Trim(ReadLine(f)) @@ -2093,16 +2093,16 @@ Function InitLoadingScreens%(File$) ls\ID = LoadingScreenAmount ls\Title = TemporaryString - ls\ImgPath = GetINIString(File, TemporaryString, "ImgPath") + ls\ImgPath = GetFileLocalString(File, TemporaryString, "ImgPath", "") For i = 0 To 4 - ls\Txt[i] = GetINIString(File, TemporaryString, "Desc" + (i + 1)) + ls\Txt[i] = GetFileLocalString(File, TemporaryString, "Desc" + (i + 1)) If ls\Txt[i] <> "" Then ls\TxtAmount = ls\TxtAmount + 1 Next - ls\DisableBackground = GetINIInt(File, TemporaryString, "DisableBackground") + ls\DisableBackground = Int(GetFileLocalString(File, TemporaryString, "DisableBackground", 0)) - Select GetINIString(File, TemporaryString, "Align X") + Select GetFileLocalString(File, TemporaryString, "Align X") Case "Left" ;[Block] ls\AlignX = -1 @@ -2117,7 +2117,7 @@ Function InitLoadingScreens%(File$) ;[End Block] End Select - Select GetINIString(File, TemporaryString, "Align Y") + Select GetFileLocalString(File, TemporaryString, "Align Y") Case "Top", "Up" ;[Block] ls\AlignY = -1