diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/dragonsphere/dragonsphere_scenes1.cpp | 70 | ||||
-rw-r--r-- | engines/mads/game.cpp | 40 | ||||
-rw-r--r-- | engines/mads/game.h | 7 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes1.cpp | 156 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes2.cpp | 36 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes3.cpp | 22 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes4.cpp | 48 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes5.cpp | 66 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 2 |
9 files changed, 244 insertions, 203 deletions
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp index ed446c4e04..0788fe6641 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp +++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp @@ -315,7 +315,7 @@ void Scene102::step() { switch (_diaryFrame) { case 6: _scene->deleteSequence(_globals._sequenceIndexes[1]); - _game.syncTimers(1, _globals._sequenceIndexes[1], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_ANIM, _globals._animationIndexes[0]); break; case 10: @@ -349,7 +349,7 @@ void Scene102::step() { switch (_diaryFrame) { case 6: _scene->deleteSequence(_globals._sequenceIndexes[2]); - _game.syncTimers(1, _globals._sequenceIndexes[2], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_ANIM, _globals._animationIndexes[0]); break; case 26: @@ -385,7 +385,7 @@ void Scene102::step() { int idx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], -2); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, idx); _game._player._stepEnabled = true; } break; @@ -426,13 +426,13 @@ void Scene102::actions() { int idx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, 5); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, idx); } break; case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]); _game._player.walk(Common::Point(0, 130), FACING_WEST); _game._player._walkOffScreenSceneId = 101; break; @@ -457,7 +457,7 @@ void Scene102::actions() { _game._player._visible = false; _animRunning = 1; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('B',-1), 1); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 1: @@ -466,7 +466,7 @@ void Scene102::actions() { _diaryHotspotIdx1 = _scene->_dynamicHotspots.add(NOUN_DIARIES, VERB_WALK_TO, SYNTAX_PLURAL, _globals._sequenceIndexes[1], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(_diaryHotspotIdx1, Common::Point(47, 123), FACING_NORTHWEST); _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_sequences.addTimer(6, 2); break; @@ -479,7 +479,7 @@ void Scene102::actions() { _game._player._visible = false; _animRunning = 2; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('A',-1), 4); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 4: @@ -489,7 +489,7 @@ void Scene102::actions() { _scene->_dynamicHotspots.setPosition(_diaryHotspotIdx2, Common::Point(47, 123), FACING_NORTHWEST); _game._player._visible = true; _game._player._stepEnabled = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); break; default: @@ -754,7 +754,7 @@ void Scene103::step() { int tmpIdx = _globals._sequenceIndexes[9]; _globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6); - _game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, tmpIdx); _game._player._stepEnabled = true; } break; @@ -772,7 +772,7 @@ void Scene103::step() { int tmpIdx = _globals._sequenceIndexes[10]; _globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6); - _game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, tmpIdx); _game._player._stepEnabled = true; } break; @@ -812,13 +812,13 @@ void Scene103::actions() { int tmpIdx = _globals._sequenceIndexes[9]; _globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 14); - _game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, tmpIdx); } break; case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[11]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[11]); _scene->_sequences.addTimer(1, 4); break; @@ -839,7 +839,7 @@ void Scene103::actions() { int tmpIdx = _globals._sequenceIndexes[9]; _globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1); - _game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, tmpIdx); _scene->_sequences.addTimer(6, 7); } break; @@ -878,13 +878,13 @@ void Scene103::actions() { int tmpIdx = _globals._sequenceIndexes[10]; _globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14); - _game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, tmpIdx); } break; case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[11]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[11]); _scene->_sequences.addTimer(1, 4); break; @@ -905,7 +905,7 @@ void Scene103::actions() { int tmpIdx = _globals._sequenceIndexes[10]; _globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1); - _game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, tmpIdx); _scene->_sequences.addTimer(6, 7); } break; @@ -1393,7 +1393,7 @@ void Scene104::step() { if (_tapestryFrame == 13) { _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); } if ((resetFrame >= 0) && (resetFrame != _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame())) { @@ -1417,7 +1417,7 @@ void Scene104::step() { int idx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, idx); _game._player._stepEnabled = true; } break; @@ -1432,7 +1432,7 @@ void Scene104::step() { _globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('p', 2), 0); _anim4ActvFl = true; _pidStatus = 0; - _game.syncTimers(3, _globals._animationIndexes[4], 4, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[4], SYNC_CLOCK, 0); _scene->deleteSequence(_globals._sequenceIndexes[14]); _globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 1), 0); @@ -1550,13 +1550,13 @@ void Scene104::actions() { int tmpIdx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, tmpIdx); } break; case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]); _scene->_sequences.addTimer(1, 4); break; @@ -1577,7 +1577,7 @@ void Scene104::actions() { int tmpIdx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, tmpIdx); _scene->_sequences.addTimer(6, 7); } break; @@ -1618,7 +1618,7 @@ void Scene104::actions() { case 2: { int tmpIdx = _globals._sequenceIndexes[12]; _globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, -2); - _game.syncTimers(1, _globals._sequenceIndexes[12], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[12], SYNC_SEQ, tmpIdx); _scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8); if ((_globals[kTapestryStatus] == 1) || (_globals[kTapestryStatus] == 3)) { _scene->_hotspots.activate(NOUN_WALL_PANEL, false); @@ -1629,7 +1629,7 @@ void Scene104::actions() { case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _scene->_sequences.addTimer(5, 4); break; @@ -1691,7 +1691,7 @@ void Scene104::actions() { case 3: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _scene->_sequences.addTimer(5, 4); break; @@ -1720,12 +1720,12 @@ void Scene104::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _animationRunning = 1; - _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('a',-1), 1); + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('a', -1), 1); break; case 1: _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6); _scene->_hotspots.activateAtPos(NOUN_TAPESTRY, true, Common::Point(290, 20)); @@ -1777,12 +1777,12 @@ void Scene104::actions() { _game._player._visible = false; _scene->deleteSequence(_globals._sequenceIndexes[10]); _animationRunning = 2; - _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d',-1), 1); + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', -1), 1); break; case 1: _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[11], 6); _scene->_hotspots.activateAtPos(NOUN_TAPESTRY, false, Common::Point(290, 20)); @@ -2198,7 +2198,7 @@ void Scene104::actions() { _globals._sequenceIndexes[14] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[14], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[14], 6); - _game.syncTimers(1, _globals._sequenceIndexes[14], 4, 0); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[14], SYNC_CLOCK, 0); _globals._spriteIndexes[15] = _scene->_sprites.addSprites(formAnimName('e', 3), PALFLAG_ALL_TO_CLOSEST | PALFLAG_ANY_TO_CLOSEST); _globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 2), 0); @@ -2639,7 +2639,7 @@ void Scene104::handleMacAnimation1() { _pidFrame = 105; resetFrame = 26; _scene->setAnimFrame(_globals._animationIndexes[4], 105); - _game.syncTimers(3, _globals._animationIndexes[4], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[4], SYNC_ANIM, _globals._animationIndexes[1]); break; default: @@ -2657,7 +2657,7 @@ void Scene104::handleMacAnimation1() { _scene->setAnimFrame(_globals._animationIndexes[4], 89); _pidFrame = 89; _pidStatus = 7; - _game.syncTimers(3, _globals._animationIndexes[4], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[4], SYNC_ANIM, _globals._animationIndexes[1]); break; case 76: @@ -2716,7 +2716,7 @@ void Scene104::handleMacAnimation2() { case 2: _scene->deleteSequence(_globals._sequenceIndexes[14]); - _game.syncTimers(1, _globals._sequenceIndexes[14], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[14], SYNC_ANIM, _globals._animationIndexes[1]); break; case 37: @@ -2994,7 +2994,7 @@ void Scene104::handlePidAnimation() { _anim4ActvFl = false; _globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('d', 2), 95); _anim6ActvFl = true; - _game.syncTimers(3, _globals._animationIndexes[4], 4, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[4], SYNC_CLOCK, 0); break; default: diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index f5a5f3be59..71750075a9 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -599,8 +599,44 @@ void Game::createThumbnail() { ::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette); } -void Game::syncTimers(int slave_type, int slave_id, int master_type, int master_id) { - warning("TODO: Game_syncTimers"); +void Game::syncTimers(SyncType slaveType, int slaveId, SyncType masterType, int masterId) { + uint32 syncTime = 0; + + switch (masterType) { + case SYNC_SEQ: + syncTime = _scene._sequences[masterId]._timeout; + break; + + case SYNC_ANIM: + syncTime = _scene._animation[masterId]->getNextFrameTimer(); + break; + + case SYNC_CLOCK: + syncTime = _scene._frameStartTime + masterId; + break; + + case SYNC_PLAYER: + syncTime = _player._priorTimer; + break; + } + + + switch (slaveType) { + case SYNC_SEQ: + _scene._sequences[slaveId]._timeout = syncTime; + break; + + case SYNC_PLAYER: + _player._priorTimer = syncTime; + break; + + case SYNC_ANIM: + _scene._animation[slaveId]->setNextFrameTimer(syncTime); + break; + + case SYNC_CLOCK: + error("syncTimer is trying to force _frameStartTime"); + } } void Game::camPanTo(Camera *camera, int target) { diff --git a/engines/mads/game.h b/engines/mads/game.h index 30fcf99907..c1cd4fd4c0 100644 --- a/engines/mads/game.h +++ b/engines/mads/game.h @@ -44,6 +44,11 @@ enum KernelMode { KERNEL_ROOM_PRELOAD = 3, KERNEL_ROOM_INIT = 4, KERNEL_ACTIVE_CODE = 5 }; +enum SyncType { + SYNC_SEQ = 1, SYNC_PLAYER = 2, SYNC_ANIM = 3, SYNC_CLOCK = 4 +}; + + #define MADS_SAVEGAME_VERSION 1 struct MADSSavegameHeader { @@ -236,7 +241,7 @@ public: */ void createThumbnail(); - void syncTimers(int slave_type, int slave_id, int master_type, int master_id); + void syncTimers(SyncType slaveType, int slaveId, SyncType masterType, int masterId); typedef struct { //TODO diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp index 11cf1c7189..614217524b 100644 --- a/engines/mads/phantom/phantom_scenes1.cpp +++ b/engines/mads/phantom/phantom_scenes1.cpp @@ -1168,7 +1168,7 @@ void Scene103::step() { int syncIdx = _globals._sequenceIndexes[1]; _vm->_sound->command(25); _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, syncIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, syncIdx); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); _game._player._stepEnabled = true; } @@ -1197,7 +1197,7 @@ void Scene103::step() { _anim5ActvFl = true; _scene->setAnimFrame(_globals._animationIndexes[5], 33); _game._player._stepEnabled = true; - _game.syncTimers(3, _globals._animationIndexes[5], 1, _globals._sequenceIndexes[10]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[5], SYNC_SEQ, _globals._sequenceIndexes[10]); break; default: @@ -1306,7 +1306,7 @@ void Scene103::preActions() { _game._player._needToWalk = false; _anim6ActvFl = false; _game._player.resetFacing(FACING_NORTHEAST); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[6]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[6]); break; default: @@ -1336,7 +1336,7 @@ void Scene103::preActions() { _standPosition = 0; _anim4ActvFl = false; _game._player.resetFacing(FACING_NORTHEAST); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[4]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[4]); break; default: @@ -1415,7 +1415,7 @@ void Scene103::actions() { _game._player._visible = false; _game._player._stepEnabled = false; _anim5ActvFl = true; - _game.syncTimers(3, _globals._animationIndexes[5], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[5], SYNC_PLAYER, 0); _action._inProgress = false; return; } @@ -1429,7 +1429,7 @@ void Scene103::actions() { _game._player._visible = false; _game._player._stepEnabled = false; _anim3ActvFl = true; - _game.syncTimers(3, _globals._animationIndexes[3], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[3], SYNC_PLAYER, 0); _action._inProgress = false; return; } @@ -1450,7 +1450,7 @@ void Scene103::actions() { _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 1), 75); _game._player._priorTimer = _scene->_frameStartTime; - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _scene->deleteSequence(_globals._sequenceIndexes[3]); } break; @@ -1462,13 +1462,13 @@ void Scene103::actions() { _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); - _game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_ANIM, _globals._animationIndexes[0]); _globals[kPrompterStandStatus] = 1; _game._player._stepEnabled = true; _game._player._visible = true; _game._player._playerPos = Common::Point(117, 139); _game._player.resetFacing(FACING_EAST); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_dynamicHotspots.remove(_hotspotPrompt1); _scene->_dynamicHotspots.remove(_hotspotPrompt2); @@ -1522,7 +1522,7 @@ void Scene103::actions() { _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 2), 75); _game._player._priorTimer = _scene->_frameStartTime; - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _scene->deleteSequence(_globals._sequenceIndexes[12]); _scene->deleteSequence(_globals._sequenceIndexes[3]); } @@ -1533,13 +1533,13 @@ void Scene103::actions() { _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); - _game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_ANIM, _globals._animationIndexes[0]); _globals[kPrompterStandStatus] = 0; _game._player._stepEnabled = true; _game._player._visible = true; _game._player._playerPos = Common::Point(62, 142); _game._player.resetFacing(FACING_WEST); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_dynamicHotspots.remove(_hotspotPrompt1); _scene->_dynamicHotspots.remove(_hotspotPrompt2); _scene->_dynamicHotspots.remove(_hotspotPrompt3); @@ -1606,7 +1606,7 @@ void Scene103::actions() { case 2: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[2]); _game._player.walk(Common::Point(295, 132), FACING_WEST); _scene->_sequences.addTimer(180, 3); break; @@ -1628,7 +1628,7 @@ void Scene103::actions() { case 71: { int oldIdx = _globals._sequenceIndexes[1]; _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -2); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, oldIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, oldIdx); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); } break; @@ -1650,7 +1650,7 @@ void Scene103::actions() { case 1: { int oldIdx = _globals._sequenceIndexes[2]; _globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[2], 1, oldIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_SEQ, oldIdx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false); _scene->_sequences.addTimer(15, 2); _vm->_sound->command(73); @@ -1666,7 +1666,7 @@ void Scene103::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[2]); _game._player._visible = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) _vm->_dialogs->show(00032); @@ -1706,7 +1706,7 @@ void Scene103::actions() { return; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); _action._inProgress = false; @@ -1782,7 +1782,7 @@ void Scene103::actions() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], -1, -2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 1); if (!_sitFl) - _game.syncTimers(1, _globals._sequenceIndexes[10], 3, _globals._animationIndexes[5]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_ANIM, _globals._animationIndexes[5]); _sitFl = false; break; @@ -1807,7 +1807,7 @@ void Scene103::actions() { _anim1ActvFl = true; _game._player._visible = false; _game._player._stepEnabled = false; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); break; case 1: @@ -1815,7 +1815,7 @@ void Scene103::actions() { _game._player._visible = true; _globals[kTrapDoorStatus] = 0; _game._player._stepEnabled = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); break; default: @@ -1828,7 +1828,7 @@ void Scene103::actions() { _anim2ActvFl = true; _game._player._visible = false; _game._player._stepEnabled = false; - _game.syncTimers(3, _globals._animationIndexes[2], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[2], SYNC_PLAYER, 0); break; case 1: @@ -1836,7 +1836,7 @@ void Scene103::actions() { _game._player._visible = true; _globals[kTrapDoorStatus] = 1; _game._player._stepEnabled = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[2]); break; default: @@ -3110,7 +3110,7 @@ void Scene104::handleWalkAnimation() { if (_walkStatus == 0) { daaeResetFrame = 0; } else { - _game.syncTimers(3, _globals._animationIndexes[2], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[2], SYNC_ANIM, _globals._animationIndexes[1]); daaeResetFrame = 1; } break; @@ -3552,7 +3552,7 @@ void Scene104::handleCoupleAnimations() { _game._player.resetFacing(FACING_SOUTH); resetFrame = 105; _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); break; case 106: @@ -3748,17 +3748,17 @@ void Scene105::actions() { _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('t', 1), 70); _scene->deleteSequence(_globals._sequenceIndexes[4]); - _game.syncTimers(1, _globals._sequenceIndexes[4], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[4], SYNC_ANIM, _globals._animationIndexes[0]); _scene->_sequences.setSeqPlayer(_globals._animationIndexes[0], false); break; case 70: _globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, 2); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 14); - _game.syncTimers(1, _globals._sequenceIndexes[4], 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[4], SYNC_ANIM, _globals._animationIndexes[0]); _game._player._stepEnabled = true; _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); break; default: @@ -3774,7 +3774,7 @@ void Scene105::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 1); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 1: @@ -3794,7 +3794,7 @@ void Scene105::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 1); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 1: @@ -3844,7 +3844,7 @@ void Scene105::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -3883,7 +3883,7 @@ void Scene105::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[6]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -3936,7 +3936,7 @@ void Scene105::actions() { case 66: { int tmpIdx = _globals._sequenceIndexes[2]; _globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 8); - _game.syncTimers(1, _globals._sequenceIndexes[2], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_SEQ, tmpIdx); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14); _game._player.walk(Common::Point(0, 111), FACING_NORTHWEST); } @@ -3959,7 +3959,7 @@ void Scene105::actions() { case 1: { int tmpIdx = _globals._sequenceIndexes[6]; _globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], true, 4); - _game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, tmpIdx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false); _vm->_sound->command(73); _scene->_sequences.addTimer(15, 2); @@ -3975,7 +3975,7 @@ void Scene105::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[6]); _game._player._visible = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) _vm->_dialogs->show(32); @@ -4346,7 +4346,7 @@ void Scene106::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -4386,7 +4386,7 @@ void Scene106::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -4410,7 +4410,7 @@ void Scene106::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 76); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _action._inProgress = false; return; @@ -4423,7 +4423,7 @@ void Scene106::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 81); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _action._inProgress = false; return; @@ -4457,7 +4457,7 @@ void Scene106::actions() { break; case 1: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _game._player._visible = true; _game._player._playerPos = Common::Point(225, 143); _game._player.resetFacing(FACING_EAST); @@ -4494,11 +4494,11 @@ void Scene106::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 1), 3); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 3: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; _game._player._playerPos = Common::Point(228, 140); @@ -4539,7 +4539,7 @@ void Scene106::actions() { case 66: { int idx = _globals._sequenceIndexes[2]; _globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 5); - _game.syncTimers(1, _globals._sequenceIndexes[2], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14); } break; @@ -4844,7 +4844,7 @@ void Scene107::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -5799,11 +5799,11 @@ void Scene109::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('w', 2), 2); - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); break; case 2: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); _scene->sceneScale(155, 95, 130, 78); _anim1ActvFl = false; _game._player._visible = true; @@ -5832,11 +5832,11 @@ void Scene109::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('w', 1), 2); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 2: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->sceneScale(311, 95, 286, 78); _anim0ActvFl = false; _game._player._visible = true; @@ -5876,11 +5876,11 @@ void Scene109::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('w', 3), 3); - _game.syncTimers(3, _globals._animationIndexes[2], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[2], SYNC_PLAYER, 0); break; case 3: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[2]); _scene->sceneScale(467, 95, 442, 78); _anim2ActvFl = false; _game._player._visible = true; @@ -5914,11 +5914,11 @@ void Scene109::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 4), 3); - _game.syncTimers(3, _globals._animationIndexes[3], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[3], SYNC_PLAYER, 0); break; case 3: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[3]); _scene->sceneScale(311, 95, 286, 78); _anim3ActvFl = false; _game._player._visible = true; @@ -5954,7 +5954,7 @@ void Scene109::actions() { case 2: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); if (_currentFloor == 3) _game._player.walk(Common::Point(2, 131), FACING_WEST); else if (_currentFloor == 2) @@ -5989,12 +5989,12 @@ void Scene109::actions() { if (_currentFloor == 3) { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 3); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14); } else if (_currentFloor == 2) { int idx = _globals._sequenceIndexes[1]; _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 3); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); } break; @@ -6182,7 +6182,7 @@ void Scene110::actions() { case 1: { int idx = _globals._sequenceIndexes[1]; _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false); _scene->_sequences.addTimer(30, 2); _vm->_sound->command(73); @@ -6198,7 +6198,7 @@ void Scene110::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) @@ -6232,7 +6232,7 @@ void Scene110::actions() { case 1: { int idx = _globals._sequenceIndexes[1]; _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false); _scene->_sequences.addTimer(30, 2); _vm->_sound->command(73); @@ -6248,7 +6248,7 @@ void Scene110::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) @@ -6288,7 +6288,7 @@ void Scene110::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player.walk(Common::Point(261, 121), FACING_NORTHEAST); _game._player.setWalkTrigger(4); @@ -6615,7 +6615,7 @@ void Scene111::step() { case 64: _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('l', 1), 70); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _anim0ActvFl = true; _listenStatus = 0; _game._player._visible = false; @@ -6624,7 +6624,7 @@ void Scene111::step() { case 70: _game._player._visible = true; _anim0ActvFl = false; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_sequences.addTimer(30, 71); break; @@ -6659,7 +6659,7 @@ void Scene111::actions() { case 1: { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false); _scene->_sequences.addTimer(30, 2); _vm->_sound->command(73); @@ -6677,7 +6677,7 @@ void Scene111::actions() { return; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) _vm->_dialogs->show(32); @@ -6709,7 +6709,7 @@ void Scene111::actions() { case 1: { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false); _scene->_sequences.addTimer(30, 2); _vm->_sound->command(73); @@ -6727,7 +6727,7 @@ void Scene111::actions() { return; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK)) @@ -6772,10 +6772,10 @@ void Scene111::actions() { case 1: _globals[kChristineDoorStatus] = 2; _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1); - _game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_ANIM, _globals._animationIndexes[1]); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10); _scene->drawToBackground(_globals._spriteIndexes[4], 1, Common::Point(-32000, -32000), 0, 100); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); _game._player._visible = true; _game._player._playerPos = Common::Point(126, 126); _anim1ActvFl = false; @@ -7087,7 +7087,7 @@ void Scene112::actions() { if ((_action.isAction(VERB_TALK_TO, NOUN_JULIE)) || (_action.isAction(VERB_TALK_TO, NOUN_WOMAN))) { if (_globals[kJulieNameIsKnown] > 0) { _game._player._visible = false; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); _scene->setAnimFrame(_globals._animationIndexes[1], 1); _raoulAction = 1; } @@ -7354,7 +7354,7 @@ void Scene112::handleConversation() { case 72: _vm->_gameConv->release(); _game._player._visible = false; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); _scene->setAnimFrame(_globals._animationIndexes[1], 1); _raoulAction = 1; break; @@ -7613,7 +7613,7 @@ void Scene112::handleRaoulChair() { _raoulAction = 2; _game._player._visible = true; _vm->_gameConv->release(); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); break; case 83: @@ -8027,7 +8027,7 @@ void Scene113::step() { _prevent2 = true; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0); _scene->setAnimFrame (_globals._animationIndexes[0], 86); - _game.syncTimers(3, _globals._animationIndexes[0], 4, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_CLOCK, 0); _scene->animations_tick(); } @@ -8039,7 +8039,7 @@ void Scene113::step() { _dayStatus = 7; _raoulAction = 3; _armsOutFl = true; - _game.syncTimers(3, _globals._animationIndexes[0], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_ANIM, _globals._animationIndexes[1]); } if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 165) && !_afterKissFl) @@ -8602,7 +8602,7 @@ void Scene113::handleDayAnimation() { case 182: _game._player._visible = true; _vm->_gameConv->release(); - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); _game._player._playerPos = Common::Point(175, 148); _game._player._turnToFacing = FACING_NORTHEAST; _game._player.resetFacing(FACING_SOUTHEAST); @@ -8705,7 +8705,7 @@ void Scene113::handleRaoulAnimation() { resetFrame = 33; _raoulAction = 3; _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[3]); } break; @@ -8947,7 +8947,7 @@ void Scene113::handleFlorentConversation() { _vm->_gameConv->release(); _game._player._visible = false; _raoulAction = 1; - _game.syncTimers(3, _globals._animationIndexes[3], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[3], SYNC_PLAYER, 0); _scene->setAnimFrame(_globals._animationIndexes[3], 1); break; @@ -9111,7 +9111,7 @@ void Scene113::handleLoveConversation() { _vm->_gameConv->release(); _game._player._visible = false; _raoulAction = 1; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); _scene->setAnimFrame(_globals._animationIndexes[1], 1); break; @@ -9206,7 +9206,7 @@ void Scene114::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 1); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 1: @@ -9247,7 +9247,7 @@ void Scene114::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp index b00b0a2eb6..84cb4fa4e7 100644 --- a/engines/mads/phantom/phantom_scenes2.cpp +++ b/engines/mads/phantom/phantom_scenes2.cpp @@ -853,7 +853,7 @@ void Scene202::actions() { case 81: { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 5); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14); _game._player.walk(Common::Point(134, 112), FACING_NORTH); _game._player.setWalkTrigger(83); @@ -1781,7 +1781,7 @@ void Scene203::actions() { case 92: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[4]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[4]); _game._player.walk(Common::Point(319, 123), FACING_WEST); _game._player.setWalkTrigger(93); break; @@ -1802,7 +1802,7 @@ void Scene203::actions() { _anim1ActvFl = true; _game._player._visible = false; _raoulStatus = 0; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); _vm->_gameConv->run(5); _vm->_gameConv->hold(); @@ -1835,7 +1835,7 @@ void Scene203::actions() { _game._player._visible = false; _game._player._stepEnabled = false; _raoulStatus = 0; - _game.syncTimers(3, _globals._animationIndexes[1], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[1], SYNC_PLAYER, 0); _vm->_gameConv->run(8); _vm->_gameConv->exportPointer(&_globals[kPlayerScore]); @@ -3134,7 +3134,7 @@ void Scene203::handleRaoulAnimation() { _anim1ActvFl = false; _game._player._visible = true; _game._player._stepEnabled = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); resetFrame = 58; if (_globals[kDoneBrieConv203] && (_globals[kCurrentYear] == 1993)) { _globals[kPrompterStandStatus] = 1; @@ -3529,7 +3529,7 @@ void Scene204::actions() { case 61: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player.walk(Common::Point(0, 136), FACING_WEST); _game._player.setWalkTrigger(62); break; @@ -3565,7 +3565,7 @@ void Scene204::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[4]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[4]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -3948,7 +3948,7 @@ void Scene204::handleFlorAnimation() { switch (_florFrame) { case 80: _scene->setAnimFrame(_globals._animationIndexes[2], 1); - _game.syncTimers(3, _globals._animationIndexes[2], 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[2], SYNC_ANIM, _globals._animationIndexes[1]); _raoulStatus = 1; break; @@ -4478,7 +4478,7 @@ void Scene205::step() { break; case 102: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[2]); _game._player._visible = true; _game._player._stepEnabled = true; _vm->_gameConv->release(); @@ -4598,7 +4598,7 @@ void Scene205::actions() { case 1: { int idx = _globals._sequenceIndexes[2]; _globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[2], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false); _vm->_sound->command(72); _scene->_sequences.addTimer(15, 2); @@ -4616,7 +4616,7 @@ void Scene205::actions() { return; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[2]); _game._player._visible = true; _game._player._stepEnabled = true; if (_action.isAction(VERB_UNLOCK) || _action.isAction(VERB_LOCK)) @@ -4666,12 +4666,12 @@ void Scene205::actions() { if (_action.isObject(NOUN_BOX_FIVE)) { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, -2); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14); } else if (_action.isObject(NOUN_BOX_NINE)) { int idx = _globals._sequenceIndexes[1]; _globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -2); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); } _action._inProgress = false; @@ -4679,7 +4679,7 @@ void Scene205::actions() { case 2: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[2]); if (_action.isObject(NOUN_BOX_FIVE)) { _game._player.walk(Common::Point(37, 64), FACING_NORTH); _game._player.setWalkTrigger(3); @@ -6029,7 +6029,7 @@ void Scene206::actions() { return; case 78: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player._visible = true; _scene->_sequences.addTimer(20, 79); _action._inProgress = false; @@ -6142,7 +6142,7 @@ void Scene206::actions() { _vm->_sound->command(71); int idx = _globals._sequenceIndexes[5]; _globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], true, -2); - _game.syncTimers(1, _globals._sequenceIndexes[5], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[5], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], false); _scene->_sequences.addTimer(30, 65); } @@ -6175,7 +6175,7 @@ void Scene206::actions() { } } - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[5]); _game._player._stepEnabled = true; _game._player._visible = true; break; @@ -6298,7 +6298,7 @@ void Scene206::actions() { switch (_game._trigger) { case 95: _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_hotspots.activate(NOUN_PANEL, true); _scene->_hotspots.activate(NOUN_KEYHOLE, true); _globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 3); diff --git a/engines/mads/phantom/phantom_scenes3.cpp b/engines/mads/phantom/phantom_scenes3.cpp index 516376f8ae..3c7bae58aa 100644 --- a/engines/mads/phantom/phantom_scenes3.cpp +++ b/engines/mads/phantom/phantom_scenes3.cpp @@ -202,7 +202,7 @@ void Scene301::step() { _anim0ActvFl = true; _game._player._visible = false; _globals[kPlayerScore] += 10; - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); } if (_anim0ActvFl && !_skip1Fl) { @@ -244,7 +244,7 @@ void Scene301::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 1); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 1: @@ -527,7 +527,7 @@ void Scene302::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -735,7 +735,7 @@ void Scene303::step() { _game._player._playerPos = Common::Point(110, 95); _game._player._stepEnabled = true; _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _game._player.resetFacing(FACING_SOUTHWEST); } @@ -758,14 +758,14 @@ void Scene303::actions() { _game._player._visible = false; _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('n', 1), 1); _anim0ActvFl = true; - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); _globals[kPlayerScore] += 5; break; case 1: _anim0ActvFl = false; _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_sequences.addTimer(20, 2); break; @@ -788,7 +788,7 @@ void Scene303::actions() { _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 3); _game._player._stepEnabled = false; _game._player._visible = false; - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); break; case 3: @@ -1687,7 +1687,7 @@ void Scene307::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -1731,7 +1731,7 @@ void Scene307::actions() { case 71: { int idx = _globals._sequenceIndexes[3]; _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -2); - _game.syncTimers(1, _globals._sequenceIndexes[3], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14); _scene->_sequences.addTimer(10, 73); } @@ -2390,7 +2390,7 @@ void Scene309::actions() { case 61: { int idx = _globals._sequenceIndexes[0]; _globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 5); - _game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[0], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14); _game._player.walk(Common::Point(0, 121), FACING_NORTHWEST); _game._player.setWalkTrigger(63); @@ -2517,7 +2517,7 @@ void Scene309::handleBoatAnimation() { switch (_boatFrame) { case 72: - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _game._player._visible = true; break; diff --git a/engines/mads/phantom/phantom_scenes4.cpp b/engines/mads/phantom/phantom_scenes4.cpp index f82b5993f8..c9472ea538 100644 --- a/engines/mads/phantom/phantom_scenes4.cpp +++ b/engines/mads/phantom/phantom_scenes4.cpp @@ -299,7 +299,7 @@ void Scene401::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -356,7 +356,7 @@ void Scene401::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -796,7 +796,7 @@ void Scene403::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -852,7 +852,7 @@ void Scene403::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -1308,7 +1308,7 @@ void Scene404::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[9]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[9]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -1363,7 +1363,7 @@ void Scene404::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[9]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[9]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -1718,7 +1718,7 @@ void Scene406::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -1774,7 +1774,7 @@ void Scene406::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -1900,7 +1900,7 @@ void Scene406::actions() { case 4: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _scene->_sequences.addTimer(6, 5); break; @@ -2180,7 +2180,7 @@ void Scene407::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -2240,7 +2240,7 @@ void Scene407::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -2649,7 +2649,7 @@ void Scene408::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -2706,7 +2706,7 @@ void Scene408::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -3050,7 +3050,7 @@ void Scene409::enter() { void Scene409::step() { if (_game._trigger == 60) { _game._player._visible = false; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]); _scene->playSpeech(3); } @@ -3089,7 +3089,7 @@ void Scene409::actions() { case 1: { int syncIdx = _globals._sequenceIndexes[8]; _globals._sequenceIndexes[8] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[8], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[8], 1, syncIdx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[8], SYNC_SEQ, syncIdx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], false); _scene->_sequences.addTimer(30, 2); _action._inProgress = false; @@ -3106,7 +3106,7 @@ void Scene409::actions() { return; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _vm->_dialogs->show(40923); _game._player._stepEnabled = true; @@ -3186,7 +3186,7 @@ void Scene409::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -3243,7 +3243,7 @@ void Scene409::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -3295,7 +3295,7 @@ void Scene409::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -3432,7 +3432,7 @@ void Scene409::actions() { case 4: _game._player._visible = true; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _scene->_sequences.addTimer(6, 5); break; @@ -4359,7 +4359,7 @@ void Scene453::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -4416,7 +4416,7 @@ void Scene453::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -4785,7 +4785,7 @@ void Scene456::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; break; @@ -4843,7 +4843,7 @@ void Scene456::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[1]); _game._player._visible = true; _game._player._stepEnabled = true; break; diff --git a/engines/mads/phantom/phantom_scenes5.cpp b/engines/mads/phantom/phantom_scenes5.cpp index 84f5962bcd..dcc0a2eb0c 100644 --- a/engines/mads/phantom/phantom_scenes5.cpp +++ b/engines/mads/phantom/phantom_scenes5.cpp @@ -300,7 +300,7 @@ void Scene501::actions() { case 1: { int idx = _globals._sequenceIndexes[3]; _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[3], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false); _scene->_sequences.addTimer(15, 2); _vm->_sound->command(74); @@ -316,7 +316,7 @@ void Scene501::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[3]); _game._player._visible = true; _vm->_dialogs->show(50122); _game._player._stepEnabled = true; @@ -345,7 +345,7 @@ void Scene501::actions() { case 1: { int idx = _globals._sequenceIndexes[3]; _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[3], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false); _scene->_sequences.addTimer(15, 2); _vm->_sound->command(74); @@ -361,7 +361,7 @@ void Scene501::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[3]); _game._player._visible = true; _vm->_dialogs->show(50120); _game._player._stepEnabled = true; @@ -425,7 +425,7 @@ void Scene501::actions() { int idx = _globals._sequenceIndexes[1]; _scene->deleteSequence(_globals._sequenceIndexes[1]); _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1); - _game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_SEQ, idx); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 4); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 66); @@ -470,7 +470,7 @@ void Scene501::actions() { case 1: { int idx = _globals._sequenceIndexes[3]; _globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 4); - _game.syncTimers(1, _globals._sequenceIndexes[3], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, idx); _scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false); _scene->_sequences.addTimer(15, 2); _vm->_sound->command(73); @@ -486,7 +486,7 @@ void Scene501::actions() { break; case 3: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[3]); _game._player._visible = true; _vm->_dialogs->show(50120); _game._player._stepEnabled = true; @@ -939,7 +939,7 @@ void Scene502::actions() { return; case 91: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[10]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[10]); _game._player._visible = true; _game._player._stepEnabled = true; _scene->_sequences.addTimer(5, 102); @@ -959,7 +959,7 @@ void Scene502::actions() { return; case 96: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[10]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[10]); _game._player._visible = true; _game._player._stepEnabled = true; _scene->_sequences.addTimer(5, 102); @@ -979,7 +979,7 @@ void Scene502::actions() { return; case 101: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[10]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[10]); _game._player._visible = true; _scene->_sequences.addTimer(5, 102); _action._inProgress = false; @@ -1004,7 +1004,7 @@ void Scene502::actions() { return; case 106: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[10]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[10]); _game._player._visible = true; _scene->_sequences.addTimer(5, 102); _action._inProgress = false; @@ -1073,7 +1073,7 @@ void Scene502::actions() { _game._player._stepEnabled = true; _game._player._visible = true; _panelTurningFl = false; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]); _globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 13); _scene->_hotspots.activate(NOUN_ROPE, true); @@ -1614,7 +1614,7 @@ void Scene502::handlePanelAnimation() { case 3: _globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, newSprId); _scene->_sequences.setDepth(_globals._sequenceIndexes[11], 14); - _game.syncTimers(1, _globals._sequenceIndexes[11], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[11], SYNC_SEQ, idx); _scene->_sequences.addTimer(5, 113); break; @@ -1624,7 +1624,7 @@ void Scene502::handlePanelAnimation() { case 7: _globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, newSprId); _scene->_sequences.setDepth(_globals._sequenceIndexes[12], 14); - _game.syncTimers(1, _globals._sequenceIndexes[12], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[12], SYNC_SEQ, idx); _scene->_sequences.addTimer(5, 113); break; @@ -1634,14 +1634,14 @@ void Scene502::handlePanelAnimation() { case 11: _globals._sequenceIndexes[13] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[13], false, newSprId); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 14); - _game.syncTimers(1, _globals._sequenceIndexes[13], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[13], SYNC_SEQ, idx); _scene->_sequences.addTimer(5, 113); break; default: _globals._sequenceIndexes[14] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[14], false, newSprId); _scene->_sequences.setDepth(_globals._sequenceIndexes[14], 14); - _game.syncTimers(1, _globals._sequenceIndexes[14], 1, idx); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[14], SYNC_SEQ, idx); _scene->_sequences.addTimer(5, 113); break; } @@ -2153,7 +2153,7 @@ void Scene504::step() { if (_game._trigger == 60) { _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100); _scene->_sequences.addTimer(30, 61); } @@ -2241,14 +2241,14 @@ void Scene504::step() { _game._player._stepEnabled = true; _game._player._visible = true; _anim0ActvFl = false; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); } if (_game._trigger == 136) _scene->_nextSceneId = 506; if (_game._trigger == 100) { - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); _game._player._playerPos = Common::Point(156, 114); _game._player._visible = true; _anim1ActvFl = false; @@ -2276,7 +2276,7 @@ void Scene504::actions() { _game._player._visible = false; _anim2ActvFl = true; _globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('c', 1), 0); - _game.syncTimers(3, _globals._animationIndexes[0], 2, 0); + _game.syncTimers(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 0); } else _vm->_dialogs->show(50436); _action._inProgress = false; @@ -2300,7 +2300,7 @@ void Scene504::actions() { _game._player._stepEnabled = true; _game._player._visible = true; _anim0ActvFl = false; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _action._inProgress = false; return; } @@ -2324,7 +2324,7 @@ void Scene504::actions() { } if (_game._trigger == 100) { - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); _game._player._playerPos = Common::Point(156, 114); _game._player._visible = true; _anim1ActvFl = false; @@ -2417,7 +2417,7 @@ void Scene504::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[14]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[14]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); _action._inProgress = false; @@ -2878,7 +2878,7 @@ void Scene504::handlePhantomAnimation2() { _game._player._facing = FACING_WEST; _game._player._visible = true; _globals[kPlayerScore] += 5; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[3]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[3]); _game._player.walk(Common::Point(130, 135), FACING_NORTHEAST); _scene->_hotspots.activate(NOUN_CHRISTINE, false); _game._player.setWalkTrigger(120); @@ -3364,7 +3364,7 @@ void Scene505::actions() { _game._player._visible = true; _game._player._stepEnabled = true; _globals[kCoffinStatus] = 1; - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]); _action._inProgress = false; return; @@ -3420,7 +3420,7 @@ void Scene505::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[0]); _game._player._visible = true; _game._player._stepEnabled = true; if (_bothStatus == 1) { @@ -3647,7 +3647,7 @@ void Scene505::handleCoffinDialog() { case 75: _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); _scene->_sequences.addTimer(10, 76); break; @@ -3776,7 +3776,7 @@ void Scene505::handleBothanimation() { case 68: _game._player._visible = false; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); break; case 106: @@ -3865,7 +3865,7 @@ void Scene505::handlePartedAnimation() { _game._player._playerPos = Common::Point(93, 133); _game._player.resetFacing(FACING_WEST); _game._player._visible = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[2]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[2]); break; case 70: @@ -4050,7 +4050,7 @@ void Scene506::step() { case 95: _game._player._visible = true; _game._player._stepEnabled = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[1]); break; default: @@ -4062,7 +4062,7 @@ void Scene506::step() { if ((curFrame == 141) && !_skipFl) { _game._player._visible = true; _skipFl = true; - _game.syncTimers(2, 0, 3, _globals._animationIndexes[0]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]); } if (curFrame == 240) @@ -4115,7 +4115,7 @@ void Scene506::actions() { break; case 2: - _game.syncTimers(2, 0, 1, _globals._sequenceIndexes[4]); + _game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[4]); _game._player._visible = true; _scene->_sequences.addTimer(20, 3); break; @@ -4189,7 +4189,7 @@ void Scene506::actions() { _game._player._visible = false; _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 5, 1); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], -1, -2); - _game.syncTimers(1, _globals._sequenceIndexes[7], 2, 0); + _game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[7], SYNC_PLAYER, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 90); break; diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index 479a042a4e..50b37de7ea 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -569,7 +569,7 @@ void SequenceList::setSeqPlayer(int idx, bool flag) { setScale(idx, player._currentScale); if (flag) - _vm->_game->syncTimers(1, idx, 2, 0); + _vm->_game->syncTimers(SYNC_SEQ, idx, SYNC_PLAYER, 0); } } // End of namespace |