diff options
author | Paul Gilbert | 2014-04-15 22:56:52 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-15 22:56:52 -0400 |
commit | dea63c9fe8b64c30464119ffbfbc3491e6f158cc (patch) | |
tree | 7c5f6b4fb0c5b5ab40b000629bbdff9337c5243d /engines | |
parent | 7b907be93775167eab8efab45bea3b9a2776e288 (diff) | |
download | scummvm-rg350-dea63c9fe8b64c30464119ffbfbc3491e6f158cc.tar.gz scummvm-rg350-dea63c9fe8b64c30464119ffbfbc3491e6f158cc.tar.bz2 scummvm-rg350-dea63c9fe8b64c30464119ffbfbc3491e6f158cc.zip |
MADS: Renaming for sprite cycle triggers
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 114 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 166 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 16 | ||||
-rw-r--r-- | engines/mads/sequence.h | 10 |
4 files changed, 155 insertions, 151 deletions
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index 1de0dcd787..ec81b5f356 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -114,7 +114,7 @@ void Scene101::sayDang() { _scene->_sequences.remove(_globals._sequenceIndexes[11]); _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 17, 21); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 72); _vm->_sound->command(17); _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 3, 2, 0, 0); break; @@ -152,7 +152,7 @@ void Scene101::enter() { _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 0, 0, 25); _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 4, 0, 1, 0); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 6, 0, 2, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_FRAME_INDEX, 7, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 7, 70); _globals._sequenceIndexes[4] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[4], false, 10, 0, 0, 60); _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 5, 0, 1, 0); _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 10, 0, 2, 0); @@ -278,7 +278,7 @@ void Scene101::preActions() { _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[11]); _globals._sequenceIndexes[11] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 1, 17); _vm->_sound->command(16); break; @@ -304,7 +304,7 @@ void Scene101::preActions() { _scene->_sequences.remove(_globals._sequenceIndexes[13]); _shieldSpriteIdx = _game._objects.isInRoom(0x18) ? 13 : 14; _globals._sequenceIndexes[13] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[_shieldSpriteIdx], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(20); } @@ -339,8 +339,8 @@ void Scene101::actions() { _scene->_sequences.remove(_globals._sequenceIndexes[12]); _globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 3, 1); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 1, 17); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_FRAME_INDEX, 10, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 10, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _game._player._stepEnabled = false; _game._player._visible = false; _action._inProgress = false; @@ -376,7 +376,7 @@ void Scene101::actions() { case 0: _shieldSpriteIdx = _game._objects.isInRoom(0x18) ? 13 : 14; _globals._sequenceIndexes[13] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[_shieldSpriteIdx], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(20); break; @@ -436,13 +436,13 @@ void Scene101::actions() { _scene->_sequences.remove(_globals._sequenceIndexes[11]); _globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 17, 21); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _vm->_sound->command(17); break; case 1: _globals._sequenceIndexes[11] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 17, 21); break; @@ -450,7 +450,7 @@ void Scene101::actions() { _globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 3, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 17, 17); _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 3, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 3); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 3); break; case 3: @@ -653,7 +653,7 @@ void Scene102::enter() { _game._player._playerPos = Common::Point(229, 109); _game._player._stepEnabled = false; _globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 6, 1, 2, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 70); } else if (_scene->_priorSceneId == 103) { _game._player._playerPos = Common::Point(47, 152); } else if (_scene->_priorSceneId != -2) { @@ -671,7 +671,7 @@ void Scene102::enter() { _game._player._stepEnabled = false; _game._player._visible = false; _globals._sequenceIndexes[13] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[13], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SM_0, 0, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 72); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 5); _vm->_sound->command(24); _vm->_sound->command(28); @@ -750,7 +750,7 @@ void Scene102::preActions() { if (_game._player._needToWalk) { _scene->_sequences.remove(_globals._sequenceIndexes[7]); _globals._sequenceIndexes[7] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[7], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[7], 15); _game._player._stepEnabled = false; _vm->_sound->command(20); @@ -786,7 +786,7 @@ void Scene102::actions() { case 0: _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[7], 15); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 1); if (_game._objects.isInRoom(OBJ_BURGER)) { _globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 7, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14); @@ -862,7 +862,7 @@ void Scene102::actions() { switch (_game._trigger) { case 0: _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(20); break; @@ -1067,7 +1067,7 @@ void Scene102::actions() { case 0: _scene->_sequences.remove(_globals._sequenceIndexes[8]); _globals._sequenceIndexes[8] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[8], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(21); break; @@ -1090,7 +1090,7 @@ void Scene102::actions() { switch (_game._trigger) { case 0: _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(21); break; @@ -1121,7 +1121,7 @@ void Scene102::actions() { case 0: _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[11]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._visible = false; _game._player._stepEnabled = false; break; @@ -1219,9 +1219,9 @@ void Scene103::enter() { _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 0); _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 6, 0, 0, 25); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_FRAME_INDEX, 2, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 72); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 6, 0, 1, 37); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_FRAME_INDEX, 2, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 2, 73); _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8); _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 6); @@ -1251,7 +1251,7 @@ void Scene103::enter() { _game._player._stepEnabled = false; _globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 6, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 70); } sceneEntrySound(); @@ -1320,7 +1320,7 @@ void Scene103::actions() { switch (_vm->_game->_trigger) { case 0: _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; _vm->_sound->command(20); break; @@ -1340,8 +1340,8 @@ void Scene103::actions() { _scene->changeVariant(1); _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 3, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[13]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SM_FRAME_INDEX, 7, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_SPRITE, 7, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _vm->_game->_player._visible = false; _vm->_game->_player._stepEnabled = false; break; @@ -1370,8 +1370,8 @@ void Scene103::actions() { _scene->changeVariant(1); _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 3, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[12]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SM_FRAME_INDEX, 6, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_SPRITE, 6, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _vm->_game->_player._visible = false; _vm->_game->_player._stepEnabled = false; break; @@ -1411,7 +1411,7 @@ void Scene103::actions() { _scene->_sequences.addTimer(120, _vm->_game->_trigger + 1); } else { // Initial turky explosion - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 1); } } @@ -1569,7 +1569,7 @@ void Scene104::step() { _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], mirrorFl, 7, 1, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(198, 143)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: @@ -1600,7 +1600,7 @@ void Scene104::step() { _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[3], Common::Point(198, 143)); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 14); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: @@ -1608,7 +1608,7 @@ void Scene104::step() { _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[3], Common::Point(198, 143)); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 15, 32); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); break; case 2: @@ -1638,9 +1638,9 @@ void Scene104::step() { _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 8, 1, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[4], Common::Point(198, 143)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 1); if (_game._storyMode >= STORYMODE_NICE) - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_FRAME_INDEX, 15, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 15, 2); break; case 1: @@ -1755,10 +1755,10 @@ void Scene105::step() { _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 8); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1); if (_game._storyMode >= STORYMODE_NICE) - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_FRAME_INDEX, 8, 3); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 8, 3); break; case 1: @@ -1769,7 +1769,7 @@ void Scene105::step() { _scene->_sequences.updateTimeout(_globals._sequenceIndexes[2], _globals._sequenceIndexes[0]); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 8); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 5, 7); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); break; case 2: { @@ -1877,7 +1877,7 @@ void Scene106::enter() { if (_scene->_priorSceneId == 102) { _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 1, 4, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_0, 0, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 70); _game._player._visible = false; _game._player._stepEnabled = false; _game._player._facing = FACING_EAST; @@ -1921,7 +1921,7 @@ void Scene106::step() { _scene->loadAnimation(Resources::formatName(106, 'A', -1, EXT_AA, ""), 75); } else { _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 4, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SM_FRAME_INDEX, 28, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 28, 71); } } @@ -1986,8 +1986,8 @@ void Scene106::step() { if (_game._player._playerPos.x < 204) { _shadowFl = true; _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 4, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 72); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_FRAME_INDEX, 44, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 44, 73); } } else if (_game._trigger == 73) _game._player._visible = false; @@ -2098,7 +2098,7 @@ void Scene107::enter() { _globals._spriteIndexes[0] = _scene->_sprites.addSprites(Resources::formatName(105, 'R', 1, EXT_SS, "")); _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], true, 4, 0, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[0], Common::Point(270, 150)); - _scene->_sequences.sub70C52(_globals._sequenceIndexes[0], SM_FRAME_INDEX, -200, 0); + _scene->_sequences.sub70C52(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, -200, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2); _scene->_dynamicHotspots.add(218, 348, _globals._sequenceIndexes[0], Common::Rect(0, 0, 0, 0)); } @@ -2357,8 +2357,8 @@ void Scene109::step() { if (_game._player._playerPos.x > 205) { _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_FRAME_INDEX, 6, 70); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 6, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _eatingRex = true; _vm->_sound->command(34); @@ -2396,8 +2396,8 @@ void Scene109::step() { if (_eatingFirstFish && (_scene->_sequences[_globals._sequenceIndexes[10]]._msgPos.x >= 178)) { _globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], false, 4, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_FRAME_INDEX, 29, 72); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_0, 29, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_SPRITE, 29, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 29, 73); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[10], _globals._sequenceIndexes[9]); _eatingFirstFish = false; _game._player._stepEnabled = true; @@ -2464,7 +2464,7 @@ void Scene109::actions() { _game._objects.setRoom(_throwingObjectId, NOWHERE); _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 4, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[0]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._visible = false; _game._player._stepEnabled = false; @@ -2489,23 +2489,23 @@ void Scene109::actions() { switch (_throwingObjectId) { case OBJ_BURGER: _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, (_hoovicDifficultFl ? 4 : 6), 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_FRAME_INDEX, 2, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 2, 2); if (_hoovicDifficultFl) { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 30); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 5); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 5); } else { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 8); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 8); _hoovicTrigger = 3; } break; case OBJ_DEAD_FISH: _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 4, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SM_FRAME_INDEX, 2, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 2, 2); break; case OBJ_STUFFED_FISH: _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 4, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_FRAME_INDEX, 2, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 2); _hoovicTrigger = 3; break; } @@ -2518,7 +2518,7 @@ void Scene109::actions() { _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 4, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, _hoovicTrigger); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, _hoovicTrigger); _vm->_sound->command(34); break; @@ -2596,7 +2596,7 @@ void Scene109::actions() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 31, 46); int idx = _scene->_dynamicHotspots.add(53, 348, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, Common::Point(-3, 0), FACING_NORTHEAST); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 7); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 7); } break; @@ -2799,11 +2799,11 @@ void Scene111::enter() { _globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('B', 2)); _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 0, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_FRAME_INDEX, 9, 73); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SM_FRAME_INDEX, 13, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 9, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 13, 73); _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 0, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SM_FRAME_INDEX, 71, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 71, 71); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 0, 0, 0); _globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 1); @@ -2852,7 +2852,7 @@ void Scene111::step() { if ((_game._trigger == 71) && !_stampedFl) { _stampedFl = true; _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 18, 1, 0, 0); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 72); } if (_game._trigger == 72) { @@ -2961,7 +2961,7 @@ void Scene112::step() { if (_game._trigger == 70) { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 3, 0, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71); } if (_game._trigger == 71) { diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 2e5ef35cd3..36f291973b 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -188,7 +188,7 @@ void Scene201::enter() { _game._player._stepEnabled = false; _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], -1, 12); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_FRAME_INDEX, 12, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_SPRITE, 12, 70); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1); _pterodactylFlag = false; _game._player.walk(Common::Point(157, 143), FACING_NORTH); @@ -222,9 +222,9 @@ void Scene201::step() { _vm->_sound->command(42); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[7], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_FRAME_INDEX, 3, 81); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 71); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 3, 81); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 73); } if (_game._trigger == 81) { @@ -240,7 +240,7 @@ void Scene201::step() { if (_game._trigger == 73) { _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 17, -2); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 74); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 74); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1); } @@ -507,7 +507,7 @@ void Scene202::step() { _globals._sequenceIndexes[9] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[9], Common::Point(247, 82)); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_0, 0, 91); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 91); break; case 91: _globals._sequenceIndexes[9] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, 1); @@ -519,7 +519,7 @@ void Scene202::step() { _scene->_sequences.remove(_globals._sequenceIndexes[9]); _globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[11], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 93); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 93); _scene->_kernelMessages.reset(); int msgIndex = _scene->_kernelMessages.add(Common::Point(0, -65), 0x1110, 32, 0, 60, _game.getQuote(98)); _scene->_kernelMessages.setSeqIndex(msgIndex, _globals._sequenceIndexes[11]); @@ -716,7 +716,7 @@ void Scene202::preActions() { _scene->_sequences.remove(_globals._sequenceIndexes[9]); _globals._sequenceIndexes[8] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[8], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 1); } else if (_game._trigger == 1) { _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[8]); _scene->_dynamicHotspots.remove(_ladderHotspotId); @@ -764,8 +764,8 @@ void Scene202::actions() { _game._player._visible = false; _globals._sequenceIndexes[7] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[7]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_FRAME_INDEX, 6, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 6, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } break; case 1: @@ -807,7 +807,7 @@ void Scene202::actions() { _scene->_dynamicHotspots.setPosition(_ladderHotspotId, Common::Point(246, 124), FACING_NORTH); _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: { _globals._sequenceIndexes[9] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, 1); @@ -835,7 +835,7 @@ void Scene202::actions() { _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[10], Common::Point(172, 123)); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1); _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[10]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: _globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], false, 6); @@ -857,7 +857,7 @@ void Scene202::actions() { _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 1, 6); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[10], Common::Point(172, 123)); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SM_0, 0, 3); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 3); break; case 3: _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[10]); @@ -877,7 +877,7 @@ void Scene202::actions() { _globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[9], Common::Point(247, 82)); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: _globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, -2); @@ -910,7 +910,7 @@ void Scene202::actions() { _globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[9], false, 6, 1, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[9], Common::Point(247, 82)); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SM_0, 0, 3); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 3); break; case 3: _globals._sequenceIndexes[9] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, 1); @@ -1167,9 +1167,9 @@ void Scene205::enter() { _game._player._visible = false; _game._player._stepEnabled = false; _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 2); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_FRAME_INDEX, 6, 73); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_FRAME_INDEX, 11, 74); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 0); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 6, 73); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 11, 74); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 0); } sceneEntrySound(); } @@ -1284,7 +1284,7 @@ void Scene207::enter() { _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 10, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 22); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 6); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 70); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 70); } void Scene207::moveVulture() { @@ -1328,7 +1328,7 @@ void Scene207::step() { _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[7], 6); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 6); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _eyeFl = true; } } @@ -1550,7 +1550,7 @@ void Scene208::subAction(int mode) { else abortVal = 2; - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SM_0, 0, abortVal); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, abortVal); } break; case 1: { @@ -1559,7 +1559,7 @@ void Scene208::subAction(int mode) { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 3, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], oldVal); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _vm->_sound->command(20); } break; @@ -1596,7 +1596,7 @@ void Scene208::subAction(int mode) { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], oldVal); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SM_0, 0, 3); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 3); } break; case 3: @@ -1722,7 +1722,7 @@ void Scene209::handlePeek() { _vm->_sound->command(18); _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 51, 52); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 134); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 134); break; case 134: { @@ -1749,7 +1749,7 @@ void Scene209::handlePeek() { _scene->_sequences.remove(_globals._sequenceIndexes[3]); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 51, 52); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 138); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 138); break; case 138: @@ -1765,7 +1765,7 @@ void Scene209::handleVerticalMove() { case 140: _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 8, 0, 1); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 5); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 141); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 141); break; case 141: { @@ -1781,7 +1781,7 @@ void Scene209::handleVerticalMove() { _scene->_sequences.remove(_globals._sequenceIndexes[3]); _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 5); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 143); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 143); break; case 143: @@ -1799,7 +1799,7 @@ void Scene209::handleLookStay() { _monkeyPosition = 2; _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 51, 52); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 146); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 146); break; case 146: { @@ -1840,7 +1840,7 @@ void Scene209::handleLookRight() { _scene->_sequences.remove(_globals._sequenceIndexes[3]); _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 8, 14); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 152); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 152); break; case 152: { @@ -1895,11 +1895,11 @@ void Scene209::handleGetBinoculars() { _scene->_sequences.remove(_globals._sequenceIndexes[3]); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 8, 24); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_FRAME_INDEX, 20, 165); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 20, 165); if (!_fallFl && !_dodgeFl) { - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 162); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 162); } else { - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 163); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 163); } break; @@ -1908,7 +1908,7 @@ void Scene209::handleGetBinoculars() { _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 163); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 163); } break; @@ -1941,7 +1941,7 @@ void Scene209::handleBinocularBlink() { _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 168); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 168); } break; @@ -1970,7 +1970,7 @@ void Scene209::handleBinocularScan() { _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 43, 45); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 172); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 172); } break; @@ -1987,7 +1987,7 @@ void Scene209::handleBinocularScan() { } _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 173); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 173); } break; @@ -1996,7 +1996,7 @@ void Scene209::handleBinocularScan() { _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 26, 30); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 174); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 174); } break; @@ -2032,7 +2032,7 @@ void Scene209::handleJumpInTree() { if (!_removeMonkeyFl) _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 179); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 179); } break; @@ -2042,7 +2042,7 @@ void Scene209::handleJumpInTree() { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 53, 61); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 180); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 180); } break; @@ -2063,7 +2063,7 @@ void Scene209::handleTongue() { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 26, 30); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 183); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 183); } break; @@ -2072,7 +2072,7 @@ void Scene209::handleTongue() { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 31, 33); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 184); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 184); } break; @@ -2081,7 +2081,7 @@ void Scene209::handleTongue() { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 36, 37); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 185); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 185); } break; @@ -2091,7 +2091,7 @@ void Scene209::handleTongue() { _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 6, 20, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 38, 39); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 186); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 186); } break; @@ -2100,7 +2100,7 @@ void Scene209::handleTongue() { _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 40, 41); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 178); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 178); _removeMonkeyFl = false; } break; @@ -2126,7 +2126,7 @@ void Scene209::handleStandFromPeek() { _scene->_sequences.remove(_globals._sequenceIndexes[3]); _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 5); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SM_0, 0, 192); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 192); break; case 192: { @@ -2185,7 +2185,7 @@ void Scene209::handleJumpAndHide() { _scene->_sequences.remove(_globals._sequenceIndexes[4]); _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 16); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SM_0, 0, 197); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 197); break; case 197: @@ -2203,7 +2203,7 @@ void Scene209::handleMonkeyEating() { _scene->_sequences.remove(_globals._sequenceIndexes[4]); _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 10, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 14); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 200); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 200); break; case 200: { @@ -2211,7 +2211,7 @@ void Scene209::handleMonkeyEating() { _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 10, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 15, 16); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 201); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 201); } break; @@ -2239,7 +2239,7 @@ void Scene209::handleMonkeyEating() { _scene->_sequences.remove(_globals._sequenceIndexes[4]); _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 18, 19); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 205); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 205); break; case 205: { @@ -2247,7 +2247,7 @@ void Scene209::handleMonkeyEating() { _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 20, 21); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 206); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 206); } break; @@ -2257,9 +2257,9 @@ void Scene209::handleMonkeyEating() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 22, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); if (!_dodgeFl && !_fallFl) - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 207); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 207); else - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 209); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 209); } break; @@ -2272,7 +2272,7 @@ void Scene209::handleMonkeyEating() { _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 15, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 26, 27); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 208); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 208); } break; @@ -2282,7 +2282,7 @@ void Scene209::handleMonkeyEating() { _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 28, 29); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 209); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 209); } break; @@ -2320,7 +2320,7 @@ void Scene209::handleMonkeyFall() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 35); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 6); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 220); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 220); } break; @@ -2335,7 +2335,7 @@ void Scene209::handleMonkeyFall() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 36, 42); _scene->_sequences.setDepth(_globals._sequenceIndexes[8], 6); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 221); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 221); } break; @@ -2350,7 +2350,7 @@ void Scene209::handleMonkeyFall() { _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 8); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[8], oldIdx); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 43, 72); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 222); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 222); int idx = _scene->_dynamicHotspots.add(39, 13, _globals._sequenceIndexes[9], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, Common::Point(200, 133), FACING_NORTH); } @@ -2362,7 +2362,7 @@ void Scene209::handleMonkeyFall() { _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 73, 78); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[8], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SM_0, 0, 223); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 223); } break; @@ -2388,7 +2388,7 @@ void Scene209::handleMonkey1() { _scene->_sequences.remove(_globals._sequenceIndexes[4]); _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 13); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 213); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 213); break; case 213: { @@ -2396,7 +2396,7 @@ void Scene209::handleMonkey1() { _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], 1, 22); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[7], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 214); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 214); } break; @@ -2405,7 +2405,7 @@ void Scene209::handleMonkey1() { _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], 23, 26); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[7], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 215); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 215); int msgIndex = _scene->_kernelMessages.add(Common::Point(170, 21), 0xFDFC, 0, 0, 90, _game.getQuote(156)); _scene->_kernelMessages.setQuoted(msgIndex, 3, true); } @@ -2418,7 +2418,7 @@ void Scene209::handleMonkey1() { _globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], 27, 35); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[7], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SM_0, 0, 216); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 216); } break; @@ -2448,7 +2448,7 @@ void Scene209::handleMonkey2() { _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[12], Common::Point(111, 133)); _scene->_sequences.setScale(_globals._sequenceIndexes[12], 79); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[12], 1, 6); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SM_0, 0, 252); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 252); _game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount; _game._player._visible = false; break; @@ -2806,7 +2806,7 @@ void Scene209::step() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 7); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 228); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 228); break; case 229: { @@ -2825,7 +2825,7 @@ void Scene209::step() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 7); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 231); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 231); break; case 231: { @@ -2835,7 +2835,7 @@ void Scene209::step() { _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[2], oldIdx); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 232); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 232); _game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount; _scene->_sequences.updateTimeout(_globals._sequenceIndexes[2], -1); _game._player._visible = false; @@ -2869,14 +2869,14 @@ void Scene209::step() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 11, 12); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_FRAME_INDEX, 12, 239); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 235); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 12, 239); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 235); } else if (_action.isAction(NOUN_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY)) { _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 11, 12); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 235); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 235); _vm->_sound->command(23); } break; @@ -2899,7 +2899,7 @@ void Scene209::step() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 14, 16); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SM_0, 0, 237); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 237); break; case 237: @@ -3124,8 +3124,8 @@ void Scene209::actions() { _game._player._visible = false; _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[11]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_FRAME_INDEX, 4, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 4, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 2); break; case 1: @@ -3156,8 +3156,8 @@ void Scene209::actions() { _game._player._visible = false; _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[10]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SM_FRAME_INDEX, 4, 1); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 4, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 2); break; case 1: @@ -4193,7 +4193,7 @@ void Scene210::actions() { _scene->_sequences.remove(_globals._sequenceIndexes[1]); _globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 12, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 5); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: @@ -4216,7 +4216,7 @@ void Scene210::actions() { _game._player._facing = FACING_NORTH; _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 12, 0, 0, 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 5); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._stepEnabled = false; break; case 1: @@ -4358,7 +4358,7 @@ void Scene211::enter() { _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(202, 126)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 8); - _scene->_sequences.sub70C52(_globals._sequenceIndexes[2], SM_FRAME_INDEX, -200, 0); + _scene->_sequences.sub70C52(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, -200, 0); _scene->_dynamicHotspots.add(324, 13, _globals._sequenceIndexes[2], Common::Rect(1, 1, 41, 10)); } @@ -4701,7 +4701,7 @@ void Scene214::step() { _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 2); _scene->_dynamicHotspots.add(451, 13, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0)); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 71); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71); } if (_devilRunningFl) { @@ -4713,7 +4713,7 @@ void Scene214::step() { _scene->_dynamicHotspots.add(451, VERB_WALKTO, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0)); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 5, 8); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 2); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 72); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 72); } break; @@ -4744,13 +4744,13 @@ void Scene214::actions() { _game._player._visible = false; _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], true, 6, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: _globals._sequenceIndexes[4] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[4], true, 6, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _scene->_sequences.remove(_globals._sequenceIndexes[1]); _game._objects.addToInventory(OBJ_POISON_DARTS); _scene->_hotspots.activate(0x114, false); @@ -4773,13 +4773,13 @@ void Scene214::actions() { _game._player._visible = false; _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 1); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; case 1: _globals._sequenceIndexes[4] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SM_0, 0, 2); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); _scene->_sequences.remove(_globals._sequenceIndexes[2]); _game._objects.addToInventory(OBJ_BLOWGUN); _scene->_hotspots.activate(0x29, false); diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index c74fe44305..601d07d478 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -53,7 +53,7 @@ SequenceEntry::SequenceEntry() { _timeout = 0; _entries._count = 0; - Common::fill(&_entries._mode[0], &_entries._mode[SEQUENCE_ENTRY_SUBSET_MAX], SM_0); + Common::fill(&_entries._mode[0], &_entries._mode[SEQUENCE_ENTRY_SUBSET_MAX], KERNEL_TRIGGER_EXPIRE); Common::fill(&_entries._frameIndex[0], &_entries._frameIndex[SEQUENCE_ENTRY_SUBSET_MAX], 0); Common::fill(&_entries._trigger[0], &_entries._trigger[SEQUENCE_ENTRY_SUBSET_MAX], 0); } @@ -80,7 +80,7 @@ void SequenceList::clear() { } } -bool SequenceList::addSubEntry(int index, SequenceSubEntryMode mode, int frameIndex, int trigger) { +bool SequenceList::addSubEntry(int index, SequenceTrigger mode, int frameIndex, int trigger) { if (_entries[index]._entries._count >= SEQUENCE_ENTRY_SUBSET_MAX) return true; @@ -162,7 +162,7 @@ int SequenceList::addTimer(int time, int abortVal) { se._entries._count = 0; se._triggerMode = _vm->_game->_triggerSetupMode; se._actionNouns = _vm->_game->_scene._action._activeAction; - addSubEntry(seqIndex, SM_0, 0, abortVal); + addSubEntry(seqIndex, KERNEL_TRIGGER_EXPIRE, 0, abortVal); return seqIndex; } @@ -305,14 +305,14 @@ bool SequenceList::loadSprites(int seqIndex) { for (int i = 0; i < seqEntry._entries._count; ++i) { switch (seqEntry._entries._mode[i]) { - case SM_0: - case SM_1: - if (((seqEntry._entries._mode[i] == SM_0) && seqEntry._doneFlag) || - ((seqEntry._entries._mode[i] == SM_1) && result)) + case KERNEL_TRIGGER_EXPIRE: + case KERNEL_TRIGGER_LOOP: + if (((seqEntry._entries._mode[i] == KERNEL_TRIGGER_EXPIRE) && seqEntry._doneFlag) || + ((seqEntry._entries._mode[i] == KERNEL_TRIGGER_LOOP) && result)) idx = i; break; - case SM_FRAME_INDEX: { + case KERNEL_TRIGGER_SPRITE: { int v = seqEntry._entries._frameIndex[i]; if ((v == seqEntry._frameIndex) || (v == 0)) idx = i; diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h index 99e8951688..53a8afe071 100644 --- a/engines/mads/sequence.h +++ b/engines/mads/sequence.h @@ -32,7 +32,11 @@ namespace MADS { class SpriteSlot; -enum SequenceSubEntryMode { SM_0 = 0, SM_1 = 1, SM_FRAME_INDEX = 2 }; +enum SequenceTrigger { + SEQUENCE_TRIGGER_EXPIRE = 0, // Trigger when the sequence finishes + SEQUENCE_TRIGGER_LOOP = 1, // Trigger when the sequence loops + SEQUENCE_TRIGGER_SPRITE = 2 // Trigger when sequence reaches specific sprite +}; enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_REVERSIBLE = 2 }; @@ -40,7 +44,7 @@ enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_REVERSIBL struct SequenceSubEntries { int _count; - SequenceSubEntryMode _mode[SEQUENCE_ENTRY_SUBSET_MAX]; + SequenceTrigger _mode[SEQUENCE_ENTRY_SUBSET_MAX]; int _frameIndex[SEQUENCE_ENTRY_SUBSET_MAX]; int8 _trigger[SEQUENCE_ENTRY_SUBSET_MAX]; }; @@ -95,7 +99,7 @@ public: SequenceEntry &operator[](int index) { return _entries[index]; } void clear(); - bool addSubEntry(int index, SequenceSubEntryMode mode, int frameIndex, int trigger); + bool addSubEntry(int index, SequenceTrigger mode, int frameIndex, int trigger); int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks, int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites, int frameStart); |