Skip to content

Commit

Permalink
Remove the multi-scene-loading prevention hacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
stump committed Jan 6, 2013
1 parent ad7828c commit 4c87b0d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/GameEngine.py
Expand Up @@ -151,7 +151,6 @@ def __init__(self, config = None):
Log.debug("GameEngine class init (GameEngine.py)...")
self.mainMenu = None #placeholder for main menu object - to prevent reinstantiation

self.createdGuitarScene = False #MFH - so we only create ONE guitarscene...!
self.currentScene = None

self.versionString = version #stump: other version stuff moved to allow full version string to be retrieved without instantiating GameEngine
Expand Down
8 changes: 2 additions & 6 deletions src/GameResultsScene.py
Expand Up @@ -29,7 +29,7 @@

from __future__ import with_statement

from Scene import Scene, SuppressScene
from Scene import Scene
import Scorekeeper
import Dialogs
import Song
Expand All @@ -53,11 +53,7 @@ class GameResultsScene(Scene):
def __init__(self, engine, libraryName, songName, scores = None, coOpType = False, careerMode = False):
Scene.__init__(self, engine)

if self.engine.world.sceneName == "GameResultsScene": #MFH - dual / triple loading cycle fix
Log.warn("Extra GameResultsScene was instantiated, but detected and shut down. Cause unknown.")
raise SuppressScene #stump
else:
self.engine.world.sceneName = "GameResultsScene"
self.engine.world.sceneName = "GameResultsScene"

self.logClassInits = self.engine.config.get("game", "log_class_inits")
if self.logClassInits == 1:
Expand Down
10 changes: 2 additions & 8 deletions src/GuitarScene.py
Expand Up @@ -32,7 +32,7 @@

from __future__ import with_statement

from Scene import Scene, SuppressScene
from Scene import Scene
from Song import Note, TextEvent, PictureEvent, loadSong, Bars, VocalPhrase
from Menu import Menu

Expand Down Expand Up @@ -60,12 +60,7 @@ class GuitarScene(Scene):
def __init__(self, engine, libraryName, songName):
Scene.__init__(self, engine)

if self.engine.world.sceneName == "GuitarScene": #MFH - dual / triple loading cycle fix
Log.warn("Extra GuitarScene was instantiated, but detected and shut down. Cause unknown.")
raise SuppressScene #stump
else:
self.engine.createdGuitarScene = True
self.engine.world.sceneName = "GuitarScene"
self.engine.world.sceneName = "GuitarScene"

self.playerList = self.players

Expand Down Expand Up @@ -1588,7 +1583,6 @@ def __init__(self, engine, libraryName, songName):
Dialogs.hideLoadingSplashScreen(self.engine, splash)
splash = None

self.engine.createdGuitarScene = False
#MFH - end of GuitarScene client initialization routine


Expand Down
4 changes: 0 additions & 4 deletions src/Scene.py
Expand Up @@ -29,10 +29,6 @@
from OpenGL.GL import *
from OpenGL.GLU import *

#stump: raised by a scene constructor to abort scene processing
class SuppressScene(Exception):
pass

class Scene(BackgroundLayer, KeyListener):
def __init__(self, engine):
self.engine = engine
Expand Down
8 changes: 2 additions & 6 deletions src/SongChoosingScene.py
Expand Up @@ -24,7 +24,7 @@

from __future__ import with_statement

from Scene import Scene, SuppressScene
from Scene import Scene
import os
import time
import Player
Expand Down Expand Up @@ -58,11 +58,7 @@ class SongChoosingScene(Scene):
def __init__(self, engine, libraryName = None, songName = None):
Scene.__init__(self, engine)

if self.engine.world.sceneName == "SongChoosingScene": #MFH - dual / triple loading cycle fix
Log.warn("Extra SongChoosingScene was instantiated, but detected and shut down. Cause unknown.")
raise SuppressScene #stump
else:
self.engine.world.sceneName = "SongChoosingScene"
self.engine.world.sceneName = "SongChoosingScene"

Song.updateSongDatabase(self.engine)

Expand Down

0 comments on commit 4c87b0d

Please sign in to comment.