aboutsummaryrefslogtreecommitdiff
path: root/engines/griffon/griffon.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-08 17:16:57 +0100
committerEugene Sandulenko2019-11-13 22:07:08 +0100
commita28bf11ca62e1b2171f5c4898be7c8598c84dbde (patch)
treecad7980932fcb2b07a51b0b4b07ab09e2e658a65 /engines/griffon/griffon.cpp
parent87d46434e3c95f5d82a5d3d81e2eaaeefa55709c (diff)
downloadscummvm-rg350-a28bf11ca62e1b2171f5c4898be7c8598c84dbde.tar.gz
scummvm-rg350-a28bf11ca62e1b2171f5c4898be7c8598c84dbde.tar.bz2
scummvm-rg350-a28bf11ca62e1b2171f5c4898be7c8598c84dbde.zip
GRIFFON: Initial code for game modes
Diffstat (limited to 'engines/griffon/griffon.cpp')
-rw-r--r--engines/griffon/griffon.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/engines/griffon/griffon.cpp b/engines/griffon/griffon.cpp
index 118ff0e846..264d0f0c6e 100644
--- a/engines/griffon/griffon.cpp
+++ b/engines/griffon/griffon.cpp
@@ -59,7 +59,7 @@ GriffonEngine::GriffonEngine(OSystem *syst) : Engine(syst) {
_mixer = nullptr;
_shouldQuit = false;
- _gameEnd = false;
+ _gameMode = kGameModeIntro;
_musicChannel = -1;
_menuChannel = -1;
@@ -138,11 +138,27 @@ Common::Error GriffonEngine::run() {
return Common::kNoError;
while (!_shouldQuit) {
- _gameEnd = false;
-
title(0);
- if (!_shouldQuit && !_gameEnd)
+ if (_gameMode == kGameModeNewGame) {
+ newGame();
+ } else if (_gameMode == kGameModeLoadGame) {
+ _player.walkSpeed = 1.1f;
+ _animSpeed = 0.5f;
+ _attacking = false;
+ _player.attackSpeed = 1.5f;
+
+ _playingGardens = false;
+ _playingBoss = false;
+
+ haltSoundChannel(-1);
+
+ _secsInGame = 0;
+ loadMap(_curMap);
+ mainLoop();
+ }
+
+ if (!_shouldQuit && _gameMode != kGameModeEnd)
saveLoadNew();
}