diff options
author | Paul Gilbert | 2014-12-03 23:13:15 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 23:00:16 -0500 |
commit | f2cd2ee5b3b9cef53441375cb35bd2fd67a80f48 (patch) | |
tree | e1b6d199efec8f0b443680754ae82a240099b681 /engines | |
parent | 93b1516f9f7398de188808884f2696751056237a (diff) | |
download | scummvm-rg350-f2cd2ee5b3b9cef53441375cb35bd2fd67a80f48.tar.gz scummvm-rg350-f2cd2ee5b3b9cef53441375cb35bd2fd67a80f48.tar.bz2 scummvm-rg350-f2cd2ee5b3b9cef53441375cb35bd2fd67a80f48.zip |
ACCESS: Move river death flags from engine to River class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_game.h | 3 | ||||
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 25 | ||||
-rw-r--r-- | engines/access/amazon/amazon_logic.h | 3 |
3 files changed, 16 insertions, 15 deletions
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h index ca8287b87e..43fce80191 100644 --- a/engines/access/amazon/amazon_game.h +++ b/engines/access/amazon/amazon_game.h @@ -108,9 +108,6 @@ public: int _oldTitleChapter; int _maxHits; int _oldScrollCol; - bool _deathFlag; - int _deathCount; - int _deathType; int _iqValue; public: AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc); diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 7029a7c917..9ccf5eb62c 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -1360,6 +1360,8 @@ River::River(AmazonEngine *vm): PannedScene(vm) { _mapOffset = 0; _screenVertX = 0; _saveRiver = false; + _deathFlag = false; + _deathCount = 0; } void River::setRiverPan() { @@ -1460,8 +1462,8 @@ void River::initRiver() { updateObstacles(); riverSetPhysX(); _canoeDir = 0; - _vm->_deathFlag = 0; - _vm->_deathCount = 0; + _deathFlag = false; + _deathCount = 0; _vm->_timers[11]._timer = 1200; _vm->_timers[11]._initTm = 1200; @@ -1518,15 +1520,15 @@ bool River::riverJumpTest() { _mapPtr += 3; if (_canoeLane < 3) { if (val1 != 0) { - _vm->_deathFlag = true; - _vm->_deathCount = 300; - _vm->_deathType = val2; + _deathFlag = true; + _deathCount = 300; + _deathType = val2; } } else { if (val1 != 1) { - _vm->_deathFlag = true; - _vm->_deathCount = 300; - _vm->_deathType = val2; + _deathFlag = true; + _deathCount = 300; + _deathType = val2; } _vm->_oldScrollCol = _vm->_screen->_scrollCol; _vm->_screen->_scrollCol = 44; @@ -1866,10 +1868,9 @@ void River::river() { return; } - if (_vm->_deathFlag) { - _vm->_deathCount--; - if (_vm->_deathCount == 0) { - _vm->dead(RIVERDEATH[_vm->_deathType]); + if (_deathFlag) { + if (--_deathCount == 0) { + _vm->dead(RIVERDEATH[_deathType]); return; } } diff --git a/engines/access/amazon/amazon_logic.h b/engines/access/amazon/amazon_logic.h index f6f07b46e2..14f51990cc 100644 --- a/engines/access/amazon/amazon_logic.h +++ b/engines/access/amazon/amazon_logic.h @@ -167,6 +167,9 @@ private: RiverStruct *_botList; int _canoeDir; bool _saveRiver; + bool _deathFlag; + int _deathCount; + int _deathType; // Saved fields int _canoeLane; |