Skip to content

Commit

Permalink
Merge pull request #43 from ZiYueCommentary/multilang
Browse files Browse the repository at this point in the history
Fix loadingscreen bug
  • Loading branch information
Jabka666 authored Oct 29, 2022
2 parents d85b45f + 4876626 commit 5adcff1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Game.bb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions Source Code/Menu_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5adcff1

Please # to comment.