Skip to content

Commit

Permalink
Fix bg2demo's load screen
Browse files Browse the repository at this point in the history
  * do not display (broken) mosaic images; they are not
    used in the original either
  • Loading branch information
edheldil committed Jan 15, 2014
1 parent 785f158 commit efaf26f
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions gemrb/GUIScripts/bg2/LoadScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,24 @@ def StartLoadScreen ():
LoadScreen = GemRB.LoadWindow (0)
LoadScreen.SetFrame ()
Middle = LoadScreen.GetControl (3)
LoadPic = GemRB.GetGameString (STR_LOADMOS)
if LoadPic == "":
#the addition of 1 is not an error, bg2 loadpic resrefs are GTRSK002-GTRSK006
LoadPic = "GTRSK00"+str(GemRB.Roll(1,5,1) )
Middle.SetMOS (LoadPic)

if not GameCheck.IsBG2Demo():
LoadPic = GemRB.GetGameString (STR_LOADMOS)
if LoadPic == "":
#the addition of 1 is not an error, bg2 loadpic resrefs are GTRSK002-GTRSK006
LoadPic = "GTRSK00"+str(GemRB.Roll(1,5,1) )
Middle.SetMOS (LoadPic)
else:
# During loading, this fn is called at 0% and 70%, so take advantage of that
# and display the "quiet" frame first and the "flaming" frame the second time.
# It would be even better to display the phases inbetween as well; however,
# the bg2demo does not either, even though the frames are there.
Progress = GemRB.GetVar ("Progress")
if Progress:
Middle.SetBAM ("COADCNTR", 1, 0)
else:
Middle.SetBAM ("COADCNTR", 0, 0)

Progress = 0
GemRB.SetVar ("Progress", Progress)
if GameCheck.HasTOB():
Expand All @@ -60,6 +73,10 @@ def StartLoadScreen ():
LoadScreen.SetVisible (WINDOW_VISIBLE)

def EndLoadScreen ():
if GameCheck.IsBG2Demo():
Middle = LoadScreen.GetControl (3)
Middle.SetBAM ("COADCNTR", 1, 0)

LoadScreen.SetVisible (WINDOW_VISIBLE)
LoadScreen.Unload()
return
Expand Down

0 comments on commit efaf26f

Please sign in to comment.