diff options
author | Strangerke | 2016-04-01 22:17:41 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | cd29ffb1c6540cbe6db15337c635928bf3a09c34 (patch) | |
tree | 0e41cf43b06f098cb98a463d93242ab29badfe32 /engines | |
parent | 16051780e01f584b1e5f06c541586dba9a3665fd (diff) | |
download | scummvm-rg350-cd29ffb1c6540cbe6db15337c635928bf3a09c34.tar.gz scummvm-rg350-cd29ffb1c6540cbe6db15337c635928bf3a09c34.tar.bz2 scummvm-rg350-cd29ffb1c6540cbe6db15337c635928bf3a09c34.zip |
GNAP: Use constants for some more flag values
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gnap/gnap.cpp | 6 | ||||
-rw-r--r-- | engines/gnap/grid.cpp | 37 | ||||
-rw-r--r-- | engines/gnap/scenes/scene13.cpp | 3 | ||||
-rw-r--r-- | engines/gnap/scenes/scene17.cpp | 3 | ||||
-rw-r--r-- | engines/gnap/scenes/scene18.cpp | 12 |
5 files changed, 20 insertions, 41 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index 2717a7b7fc..95376fdf2b 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -1569,10 +1569,9 @@ void GnapEngine::playGnapSequence(int sequenceId) { _timers[2] = getRandom(30) + 20; _timers[3] = 300; gnapIdle(); - // CHECKME: Check the value of the flag _gameSys->insertSequence(sequenceId, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, - 9, 0, 75 * _gnapX - _gnapGridX, 48 * _gnapY - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapX - _gnapGridX, 48 * _gnapY - _gnapGridY); _gnapSequenceId = ridToEntryIndex(sequenceId); _gnapSequenceDatNum = ridToDatIndex(sequenceId); } @@ -1916,10 +1915,9 @@ int GnapEngine::getBeaverSequenceId(int kind, int gridX, int gridY) { } void GnapEngine::playBeaverSequence(int sequenceId) { - // CHECKME: Check the value of the flag _gameSys->insertSequence(sequenceId, _beaverId, makeRid(_beaverSequenceDatNum, _beaverSequenceId), _beaverId, - 9, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); _beaverSequenceId = ridToEntryIndex(sequenceId); _beaverSequenceDatNum = ridToDatIndex(sequenceId); } diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp index 3fce6eec99..20f33563dd 100644 --- a/engines/gnap/grid.cpp +++ b/engines/gnap/grid.cpp @@ -581,33 +581,29 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen _gnapWalkNodes[index].id = index + 20 * _gnapWalkNodes[index].gridY1; if (_gnapWalkNodes[index].deltaX == 1 && _gnapWalkNodes[index].deltaY == 0) { if (index % 2) { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7AB), _gnapWalkNodes[index].id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); _gnapWalkNodes[index].sequenceId = 0x7AB; gnapSequenceId = 0x7AB; } else { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7AC), _gnapWalkNodes[index].id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); _gnapWalkNodes[index].sequenceId = 0x7AC; gnapSequenceId = 0x7AC; } } else if (_gnapWalkNodes[index].deltaX == -1 && _gnapWalkNodes[index].deltaY == 0) { if (index % 2) { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7AF), _gnapWalkNodes[index].id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); _gnapWalkNodes[index].sequenceId = 0x7AF; gnapSequenceId = 0x7AF; } else { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7B0), _gnapWalkNodes[index].id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); _gnapWalkNodes[index].sequenceId = 0x7B0; gnapSequenceId = 0x7B0; } @@ -617,10 +613,9 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen else _gnapWalkNodes[index].id += 10; int newSequenceId = getGnapWalkSequenceId(_gnapWalkNodes[index].deltaX, _gnapWalkNodes[index].deltaY); - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, newSequenceId), _gnapWalkNodes[index].id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index].gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index].gridY1 - _gnapGridY); _gnapWalkNodes[index].sequenceId = newSequenceId; gnapSequenceId = newSequenceId; } @@ -699,17 +694,14 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen } if (flags & 4) { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 0, 0); + kSeqScale | kSeqSyncWait, 0, 0, 0); } else { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, - 9, 0, 75 * _gnapWalkDestX - _gnapGridX, 48 * _gnapWalkDestY - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkDestX - _gnapGridX, 48 * _gnapWalkDestY - _gnapGridY); } - } _gnapX = _gnapWalkDestX; @@ -1241,33 +1233,29 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se _platWalkNodes[index].id = index + 20 * _platWalkNodes[index].gridY1; if (_platWalkNodes[index].deltaX == 1 && _platWalkNodes[index].deltaY == 0) { if (index % 2) { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7CD), _platWalkNodes[index].id, makeRid(platSequenceDatNum, platSequenceId), platId, - 9, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); _platWalkNodes[index].sequenceId = 0x7CD; platSequenceId = 0x7CD; } else { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7CE), _platWalkNodes[index].id, makeRid(platSequenceDatNum, platSequenceId), platId, - 9, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); _platWalkNodes[index].sequenceId = 0x7CE; platSequenceId = 0x7CE; } } else if (_platWalkNodes[index].deltaX == -1 && _platWalkNodes[index].deltaY == 0) { if (index % 2) { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7CF), _platWalkNodes[index].id, makeRid(platSequenceDatNum, platSequenceId), platId, - 9, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); _platWalkNodes[index].sequenceId = 0x7CF; platSequenceId = 0x7CF; } else { - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, 0x7D0), _platWalkNodes[index].id, makeRid(platSequenceDatNum, platSequenceId), platId, - 9, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); _platWalkNodes[index].sequenceId = 0x7D0; platSequenceId = 0x7D0; } @@ -1277,10 +1265,9 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se else _platWalkNodes[index].id += 10; int newSequenceId = getBeaverWalkSequenceId(_platWalkNodes[index].deltaX, _platWalkNodes[index].deltaY); - // CHECKME: check the value of the flag _gameSys->insertSequence(makeRid(datNum, newSequenceId), _platWalkNodes[index].id, makeRid(platSequenceDatNum, platSequenceId), platId, - 9, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index].gridX1 - _platGridX, 48 * _platWalkNodes[index].gridY1 - _platGridY); _platWalkNodes[index].sequenceId = newSequenceId; platSequenceId = newSequenceId; } diff --git a/engines/gnap/scenes/scene13.cpp b/engines/gnap/scenes/scene13.cpp index 66e78e8f5b..a892b84a6d 100644 --- a/engines/gnap/scenes/scene13.cpp +++ b/engines/gnap/scenes/scene13.cpp @@ -184,10 +184,9 @@ void GnapEngine::scene13_run() { if (_gnapX == 5 && _gnapY == 5) { _s13_backToiletCtr = MIN(5, _s13_backToiletCtr + 1); _gameSys->setAnimation(_s13_backToiletCtr + 0xA3, _gnapId, 0); - // CHECKME: Check the value of the flag _gameSys->insertSequence(_s13_backToiletCtr + 0xA3, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, - 9, 0, 0, 0); + kSeqScale | kSeqSyncWait, 0, 0, 0); _gnapActionStatus = kASWait; _gnapSequenceId = _s13_backToiletCtr + 0xA3; _gnapIdleFacing = kDirUpRight; diff --git a/engines/gnap/scenes/scene17.cpp b/engines/gnap/scenes/scene17.cpp index fdfd1fba0f..ec580b971f 100644 --- a/engines/gnap/scenes/scene17.cpp +++ b/engines/gnap/scenes/scene17.cpp @@ -265,9 +265,8 @@ void GnapEngine::scene17_run() { _platY = 8; _beaverId = 160; _gameSys->insertSequence(0x241, 160, 0, 0, kSeqNone, 0, 0, 0); - // CHECKME: Check the value of the flag _gameSys->insertSequence(0x107C1, _beaverId, 0x241, _beaverId, - 9, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); _gameSys->insertSequence(0x22C, 2, 0, 0, kSeqNone, 0, 0, 0); // TODO delayTicksA(2, 9); endSceneInit(); diff --git a/engines/gnap/scenes/scene18.cpp b/engines/gnap/scenes/scene18.cpp index a7883263a5..b76e43072d 100644 --- a/engines/gnap/scenes/scene18.cpp +++ b/engines/gnap/scenes/scene18.cpp @@ -219,10 +219,9 @@ void GnapEngine::scene18_gnapCarryGarbageCanTo(int x, int y, int animationIndex, if (animationIndex >= 0) _gameSys->setAnimation(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, animationIndex); - // CHECKME: Check the value of the flag _gameSys->insertSequence(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, gnapSeqId | (gnapDatNum << 16), gnapId, - 9, 0, 75 * gnapGridX - _gnapGridX, 48 * _gnapY - _gnapGridY); + kSeqScale | kSeqSyncWait, 0, 75 * gnapGridX - _gnapGridX, 48 * _gnapY - _gnapGridY); _gnapX = gnapGridX; @@ -844,8 +843,7 @@ void GnapEngine::scene18_updateAnimations() { _gameSys->insertSequence(0x216, 39, 0, 0, kSeqNone, 21, 0, 0); _gameSys->removeSequence(0x20C, 19, true); _gameSys->setAnimation(0x217, 39, 5); - // CHECKME: check the value of the flag - _gameSys->insertSequence(0x217, 39, 0x216, 39, 10, 0, 0, 0); + _gameSys->insertSequence(0x217, 39, 0x216, 39, kSeqLoop | kSeqSyncWait, 0, 0, 0); while (_gameSys->getAnimationStatus(5) != 2) gameUpdateTick(); playSound(0x22B, true); @@ -947,8 +945,7 @@ void GnapEngine::scene18_updateAnimations() { _gameSys->requestRemoveSequence(0x1F9, 19); _gameSys->removeSequence(0x20B, 19, true); _gameSys->setAnimation(0x213, 39, 5); - // CHECKME: check the value of the flag - _gameSys->insertSequence(0x214, 39, 0x213, 39, 10, 0, 0, 0); + _gameSys->insertSequence(0x214, 39, 0x213, 39, kSeqLoop | kSeqSyncWait, 0, 0, 0); while (_gameSys->getAnimationStatus(5) != 2) gameUpdateTick(); playSound(555, true); @@ -964,8 +961,7 @@ void GnapEngine::scene18_updateAnimations() { _gameSys->insertSequence(0x211, 39, 0, 0, kSeqNone, 21, 0, 0); _gameSys->removeSequence(0x20B, 19, true); _gameSys->setAnimation(0x211, 39, 5); - // CHECKME: check the value of the flag - _gameSys->insertSequence(0x212, 39, 0x211, 39, 10, 0, 0, 0); + _gameSys->insertSequence(0x212, 39, 0x211, 39, kSeqLoop | kSeqSyncWait, 0, 0, 0); while (_gameSys->getAnimationStatus(5) != 2) gameUpdateTick(); playSound(0x22B, true); |