diff options
Diffstat (limited to 'engines/griffon/griffon.cpp')
-rw-r--r-- | engines/griffon/griffon.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/griffon/griffon.cpp b/engines/griffon/griffon.cpp index 85e1e367ae..7632623e49 100644 --- a/engines/griffon/griffon.cpp +++ b/engines/griffon/griffon.cpp @@ -137,13 +137,20 @@ Common::Error GriffonEngine::run() { if (_shouldQuit) return Common::kNoError; + _gameMode = kGameModeIntro; + while (!_shouldQuit) { - if (_gameMode != kGameModeNewGame) + switch (_gameMode) { + case kGameModeIntro: + case kGameModePlay: title(0); + break; - if (_gameMode == kGameModeNewGame) { + case kGameModeNewGame: newGame(); - } else if (_gameMode == kGameModeLoadGame) { + break; + + case kGameModeLoadGame: _player.walkSpeed = 1.1f; _animSpeed = 0.5f; _attacking = false; @@ -157,6 +164,10 @@ Common::Error GriffonEngine::run() { _secsInGame = 0; loadMap(_curMap); mainLoop(); + break; + + default: + error("Bad game mode: %d", _gameMode); } } |