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/access/amazon/amazon_logic.cpp | |
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/access/amazon/amazon_logic.cpp')
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
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; } } |