aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2015-11-10 09:04:25 +0100
committerStrangerke2015-11-10 09:04:25 +0100
commita71fd5760861a11eb74495b967d697ec32ec88f6 (patch)
treee769a0f16f7dbe9afed5fc37a4903cbd3025facd /engines
parentcbb26351f1824c5a72f798dfeca3b6ee7683ae18 (diff)
downloadscummvm-rg350-a71fd5760861a11eb74495b967d697ec32ec88f6.tar.gz
scummvm-rg350-a71fd5760861a11eb74495b967d697ec32ec88f6.tar.bz2
scummvm-rg350-a71fd5760861a11eb74495b967d697ec32ec88f6.zip
MADS: Implement SetSeqPlayer for V2+ games, replace setTrigger by addSubEntry
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/dragonsphere/dragonsphere_scenes1.cpp50
-rw-r--r--engines/mads/phantom/phantom_scenes.h1
-rw-r--r--engines/mads/phantom/phantom_scenes1.cpp117
-rw-r--r--engines/mads/phantom/phantom_scenes2.cpp76
-rw-r--r--engines/mads/phantom/phantom_scenes3.cpp28
-rw-r--r--engines/mads/phantom/phantom_scenes4.cpp106
-rw-r--r--engines/mads/phantom/phantom_scenes5.cpp106
-rw-r--r--engines/mads/scene.h1
-rw-r--r--engines/mads/sequence.cpp14
-rw-r--r--engines/mads/sequence.h1
10 files changed, 249 insertions, 251 deletions
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 9ef876847f..36840df55b 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -378,7 +378,7 @@ void Scene102::step() {
_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 9, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 71: {
@@ -410,8 +410,8 @@ void Scene102::actions() {
_game._player._visible = false;
_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], true, 8, 2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 2, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 2, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -419,7 +419,7 @@ void Scene102::actions() {
_vm->_sound->command(24);
_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 9, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2: {
@@ -747,7 +747,7 @@ void Scene103::step() {
_globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[9], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 71: {
@@ -765,7 +765,7 @@ void Scene103::step() {
_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 73);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 73);
break;
case 73: {
@@ -796,8 +796,8 @@ void Scene103::actions() {
_game._player._visible = false;
_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 7, 2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 2, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -805,7 +805,7 @@ void Scene103::actions() {
_vm->_sound->command(24);
_globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 8);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2: {
@@ -832,7 +832,7 @@ void Scene103::actions() {
_vm->_sound->command(25);
_globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[9], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 6);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 6);
break;
case 6: {
@@ -862,8 +862,8 @@ void Scene103::actions() {
_game._player._visible = false;
_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], true, 7, 2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 2, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -871,7 +871,7 @@ void Scene103::actions() {
_vm->_sound->command(24);
_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 8);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2: {
@@ -898,7 +898,7 @@ void Scene103::actions() {
_vm->_sound->command(25);
_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 6);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 6);
break;
case 6: {
@@ -1410,7 +1410,7 @@ void Scene104::step() {
_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 71: {
@@ -1534,8 +1534,8 @@ void Scene104::actions() {
_game._player._visible = false;
_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], false, 8, 2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 2, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 2, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -1543,7 +1543,7 @@ void Scene104::actions() {
_vm->_sound->command(24);
_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2: {
@@ -1570,7 +1570,7 @@ void Scene104::actions() {
_vm->_sound->command(25);
_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 6);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 6);
break;
case 6: {
@@ -1605,14 +1605,14 @@ void Scene104::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 8, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 3, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 3, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
_globals._sequenceIndexes[12] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[12], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[12], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2: {
@@ -1669,8 +1669,8 @@ void Scene104::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 8, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 3, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 3, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -2677,7 +2677,7 @@ void Scene104::handleMacAnimation1() {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 10, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 85);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 85);
break;
case 112:
diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index ca61ed72dd..a6a8395a2c 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -485,7 +485,6 @@ protected:
};
} // End of namespace Phantom
-
} // End of namespace MADS
#endif /* MADS_PHANTOM_SCENES_H */
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index a1b3fbd251..3bfb82172d 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1160,7 +1160,7 @@ void Scene103::step() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 6);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
_vm->_sound->command(66);
break;
@@ -1187,7 +1187,7 @@ void Scene103::step() {
case 100:
_scene->deleteSequence(_globals._sequenceIndexes[10]);
_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 101);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], -1, -2);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
break;
@@ -1215,7 +1215,7 @@ void Scene103::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 105);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 105);
}
} else if (_anim2ActvFl) {
if ((_scene->getAnimFrame(_globals._animationIndexes[2]) == 7) && !_guardFrameFl) {
@@ -1226,7 +1226,7 @@ void Scene103::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 110);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 110);
}
}
break;
@@ -1600,8 +1600,8 @@ void Scene103::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 2, 3, 70);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 3, 70);
break;
case 2:
@@ -1621,7 +1621,7 @@ void Scene103::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
_vm->_sound->command(66);
break;
@@ -1644,7 +1644,7 @@ void Scene103::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -1662,7 +1662,7 @@ void Scene103::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -1692,8 +1692,8 @@ void Scene103::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
_action._inProgress = false;
return;
@@ -1753,7 +1753,7 @@ void Scene103::actions() {
_globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 5);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1:
@@ -1780,7 +1780,7 @@ void Scene103::actions() {
_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
if (!_sitFl)
_game.syncTimers(1, _globals._sequenceIndexes[10], 3, _globals._animationIndexes[5]);
_sitFl = false;
@@ -2693,7 +2693,7 @@ void Scene104::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 16);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
break;
case 60:
@@ -2737,7 +2737,7 @@ void Scene104::actions() {
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, 4);
_scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1:
@@ -3715,7 +3715,7 @@ void Scene105::step() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 8);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
_vm->_sound->command(66);
break;
@@ -3832,8 +3832,8 @@ void Scene105::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3871,8 +3871,8 @@ void Scene105::actions() {
_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_SPRITE, 4, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3910,8 +3910,8 @@ void Scene105::actions() {
_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 65);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_SPRITE, 4, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2:
@@ -3929,7 +3929,7 @@ void Scene105::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 8);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
_vm->_sound->command(66);
break;
@@ -3953,7 +3953,7 @@ void Scene105::actions() {
_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -3971,7 +3971,7 @@ void Scene105::actions() {
_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -4306,7 +4306,7 @@ void Scene106::step() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -4335,8 +4335,8 @@ void Scene106::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -4374,9 +4374,8 @@ void Scene106::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5],
- 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
_globals[kPlayerScore] += 5;
break;
@@ -4480,7 +4479,7 @@ void Scene106::actions() {
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 9);
_scene->_sequences.setTimingTrigger(6, 2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1:
@@ -4524,8 +4523,8 @@ void Scene106::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 4, 65);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 67);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 4, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 67);
break;
case 65:
@@ -4534,7 +4533,7 @@ void Scene106::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
break;
case 66: {
@@ -4556,7 +4555,7 @@ void Scene106::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 69);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 69);
break;
case 69:
@@ -4833,8 +4832,8 @@ void Scene107::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -5730,7 +5729,7 @@ void Scene109::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -5748,7 +5747,7 @@ void Scene109::step() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
break;
case 66:
@@ -5949,8 +5948,8 @@ void Scene109::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 4, 75);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 4, 75);
break;
case 2:
@@ -5977,14 +5976,12 @@ void Scene109::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0],
- 0, 0, 76);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 76);
} else if (_currentFloor == 2) {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1],
- 0, 0, 76);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 76);
}
break;
@@ -6179,7 +6176,7 @@ void Scene110::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -6197,7 +6194,7 @@ void Scene110::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -6229,7 +6226,7 @@ void Scene110::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -6247,7 +6244,7 @@ void Scene110::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -6273,8 +6270,8 @@ void Scene110::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 4, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 4, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 1:
@@ -6282,7 +6279,7 @@ void Scene110::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 10, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2:
@@ -6598,7 +6595,7 @@ void Scene111::step() {
case 60:
_scene->deleteSequence(_globals._sequenceIndexes[5]);
_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[5], false, 7, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 62);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 62);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
break;
@@ -6655,7 +6652,7 @@ void Scene111::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
_action._inProgress = false;
return;
@@ -6675,7 +6672,7 @@ void Scene111::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
_action._inProgress = false;
return;
@@ -6705,7 +6702,7 @@ void Scene111::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
_action._inProgress = false;
return;
@@ -6725,7 +6722,7 @@ void Scene111::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
_action._inProgress = false;
return;
@@ -9238,8 +9235,8 @@ void Scene114::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 3, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 3, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp
index 1d967a4950..0ae990a48c 100644
--- a/engines/mads/phantom/phantom_scenes2.cpp
+++ b/engines/mads/phantom/phantom_scenes2.cpp
@@ -764,7 +764,7 @@ void Scene202::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -837,8 +837,8 @@ void Scene202::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 4, 80);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 82);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 4, 80);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 82);
break;
case 80:
@@ -846,7 +846,7 @@ void Scene202::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 81);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 81);
_vm->_sound->command(24);
break;
@@ -869,7 +869,7 @@ void Scene202::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 84);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 84);
_vm->_sound->command(25);
break;
@@ -1718,7 +1718,7 @@ void Scene203::step() {
_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[5], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 96);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 96);
break;
case 96:
@@ -1761,8 +1761,8 @@ void Scene203::actions() {
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 4, 90);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 92);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 4, 90);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 92);
break;
case 90:
@@ -1771,7 +1771,7 @@ void Scene203::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 91);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 91);
break;
case 91:
@@ -2269,7 +2269,7 @@ void Scene203::handleRichardAndDaaeConversation() {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 90);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 90);
interlocutorFl = true;
heroFl = true;
}
@@ -3490,7 +3490,7 @@ void Scene204::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
} else if (_game._trigger == 71) {
_vm->_sound->command(25);
_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
@@ -3515,8 +3515,8 @@ void Scene204::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 4, 60);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 4, 60);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 60:
@@ -3553,8 +3553,8 @@ void Scene204::actions() {
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 8, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 8, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -4468,8 +4468,8 @@ void Scene205::step() {
_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 102);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 2, 4, 101);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 102);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 4, 101);
break;
case 101:
@@ -4494,7 +4494,7 @@ void Scene205::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 91);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 91);
break;
case 91:
@@ -4509,7 +4509,7 @@ void Scene205::step() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 96);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 96);
break;
case 96:
@@ -4591,7 +4591,7 @@ void Scene205::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
_action._inProgress = false;
return;
@@ -4611,7 +4611,7 @@ void Scene205::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
_action._inProgress = false;
return;
@@ -4639,8 +4639,8 @@ void Scene205::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 2, 4, 80);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 4, 80);
_action._inProgress = false;
return;
@@ -4651,13 +4651,13 @@ void Scene205::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 81);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 81);
} else if (_action.isObject(NOUN_BOX_NINE)) {
_scene->deleteSequence(_globals._sequenceIndexes[1]);
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 81);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 81);
}
_action._inProgress = false;
return;
@@ -5928,7 +5928,7 @@ void Scene206::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 83);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 83);
break;
case 83:
@@ -5976,7 +5976,7 @@ void Scene206::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 85);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 85);
break;
case 85:
@@ -6015,8 +6015,8 @@ void Scene206::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 4, 77);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 78);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 4, 77);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 78);
_action._inProgress = false;
return;
@@ -6056,8 +6056,8 @@ void Scene206::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 7, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 3, 70);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 3, 70);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 70:
@@ -6083,7 +6083,7 @@ void Scene206::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 73);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 73);
break;
case 73:
@@ -6103,8 +6103,8 @@ void Scene206::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 7, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 74);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 3, 75);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 74);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 3, 75);
break;
case 74:
@@ -6135,7 +6135,7 @@ void Scene206::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], true, 7, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 64);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 64);
break;
case 64: {
@@ -6153,7 +6153,7 @@ void Scene206::actions() {
_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[5], true, 7, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
break;
case 66:
@@ -6399,7 +6399,7 @@ void Scene207::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1:
@@ -6413,7 +6413,7 @@ void Scene207::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
break;
case 3:
diff --git a/engines/mads/phantom/phantom_scenes3.cpp b/engines/mads/phantom/phantom_scenes3.cpp
index f2b709c4f0..4ce543f071 100644
--- a/engines/mads/phantom/phantom_scenes3.cpp
+++ b/engines/mads/phantom/phantom_scenes3.cpp
@@ -182,7 +182,7 @@ void Scene301::enter() {
_globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 5);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 64);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 64);
}
sceneEntrySound();
@@ -515,8 +515,8 @@ void Scene302::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1640,7 +1640,7 @@ void Scene307::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -1675,8 +1675,8 @@ void Scene307::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1716,8 +1716,8 @@ void Scene307::actions() {
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 4, 70);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 72);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 4, 70);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 72);
break;
case 70:
@@ -1725,7 +1725,7 @@ void Scene307::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 71: {
@@ -2328,7 +2328,7 @@ void Scene309::step() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
break;
case 66:
@@ -2374,8 +2374,8 @@ void Scene309::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 4, 60);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 62);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 4, 60);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 62);
break;
case 60:
@@ -2383,7 +2383,7 @@ void Scene309::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
_vm->_sound->command(24);
break;
@@ -2407,7 +2407,7 @@ void Scene309::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 64);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 64);
_vm->_sound->command(25);
} else
_scene->setAnimFrame(_globals._animationIndexes[0], 186);
diff --git a/engines/mads/phantom/phantom_scenes4.cpp b/engines/mads/phantom/phantom_scenes4.cpp
index cdecc118b3..997eae37b6 100644
--- a/engines/mads/phantom/phantom_scenes4.cpp
+++ b/engines/mads/phantom/phantom_scenes4.cpp
@@ -248,8 +248,8 @@ void Scene401::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -323,8 +323,8 @@ void Scene401::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -745,8 +745,8 @@ void Scene403::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -819,8 +819,8 @@ void Scene403::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1257,8 +1257,8 @@ void Scene404::actions() {
_globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[9], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1330,8 +1330,8 @@ void Scene404::actions() {
_globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[9], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1667,8 +1667,8 @@ void Scene406::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1741,8 +1741,8 @@ void Scene406::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -1881,7 +1881,7 @@ void Scene406::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], true, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2:
@@ -1895,7 +1895,7 @@ void Scene406::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], true, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
break;
case 4:
@@ -2129,8 +2129,8 @@ void Scene407::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -2207,8 +2207,8 @@ void Scene407::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -2598,8 +2598,8 @@ void Scene408::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -2673,8 +2673,8 @@ void Scene408::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -2969,7 +2969,7 @@ void Scene409::enter() {
_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 65);
}
} else {
_globals[kFlickedLever1] = 0;
@@ -2980,8 +2980,8 @@ void Scene409::enter() {
_globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 9, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[7], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 15, 60);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 15, 60);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
_vm->_sound->command(68);
}
} else {
@@ -3081,8 +3081,8 @@ void Scene409::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 4, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 4, 4);
_action._inProgress = false;
return;
@@ -3101,7 +3101,7 @@ void Scene409::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[8], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
_action._inProgress = false;
return;
@@ -3135,8 +3135,8 @@ void Scene409::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3210,8 +3210,8 @@ void Scene409::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3283,8 +3283,8 @@ void Scene409::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3413,7 +3413,7 @@ void Scene409::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 2:
@@ -3427,7 +3427,7 @@ void Scene409::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
break;
case 4:
@@ -3705,8 +3705,8 @@ void Scene410::actions() {
_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(pos.x + 4, pos.y + 107));
if (!_globals[kDoorIn409IsOpen])
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 16, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 16, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -3742,7 +3742,7 @@ void Scene410::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 4, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
_scene->_sequences.setPosition(_globals._sequenceIndexes[0], pos);
break;
@@ -3751,7 +3751,7 @@ void Scene410::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 4, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
_scene->_sequences.setPosition(_globals._sequenceIndexes[1], pos);
break;
@@ -3760,7 +3760,7 @@ void Scene410::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 4, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 4);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
_scene->_sequences.setPosition(_globals._sequenceIndexes[2], pos);
break;
@@ -4308,8 +4308,8 @@ void Scene453::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -4383,8 +4383,8 @@ void Scene453::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -4734,8 +4734,8 @@ void Scene456::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
@@ -4810,8 +4810,8 @@ void Scene456::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 5, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1:
diff --git a/engines/mads/phantom/phantom_scenes5.cpp b/engines/mads/phantom/phantom_scenes5.cpp
index 6a3644f159..2468de0526 100644
--- a/engines/mads/phantom/phantom_scenes5.cpp
+++ b/engines/mads/phantom/phantom_scenes5.cpp
@@ -170,7 +170,7 @@ void Scene501::step() {
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 56);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 56);
break;
case 56:
@@ -193,7 +193,7 @@ void Scene501::step() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 4);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -224,7 +224,7 @@ void Scene501::step() {
_game._player._visible = false;
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 9, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 90);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 90);
break;
default:
@@ -294,7 +294,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -312,7 +312,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -339,7 +339,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -357,7 +357,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -378,8 +378,8 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 4, 65);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 67);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 4, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 67);
break;
case 65:
@@ -387,7 +387,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
_vm->_sound->command(24);
break;
@@ -417,8 +417,8 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 4, 65);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 67);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 4, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 67);
break;
case 65: {
@@ -428,7 +428,7 @@ void Scene501::actions() {
_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 4);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
_vm->_sound->command(24);
}
break;
@@ -446,7 +446,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 69);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 69);
_vm->_sound->command(25);
break;
@@ -464,7 +464,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1: {
@@ -482,7 +482,7 @@ void Scene501::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], false);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
break;
case 3:
@@ -850,10 +850,10 @@ void Scene502::step() {
_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 72);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 44, 73);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 51, 74);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 32, 75);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 72);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 44, 73);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 51, 74);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 32, 75);
break;
case 72:
@@ -887,7 +887,7 @@ void Scene502::step() {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 7, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 78);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 78);
break;
case 78:
@@ -933,8 +933,8 @@ void Scene502::actions() {
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[10], true);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 14, 18);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 91);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 2, 18, 110);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 91);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 18, 110);
_action._inProgress = false;
return;
@@ -953,8 +953,8 @@ void Scene502::actions() {
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[10], true);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 8, 13);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 96);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 2, 13, 110);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 96);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 13, 110);
_action._inProgress = false;
return;
@@ -973,8 +973,8 @@ void Scene502::actions() {
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[10], true);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 5, 7);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 2, 7, 110);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 101);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 7, 110);
_action._inProgress = false;
return;
@@ -998,8 +998,8 @@ void Scene502::actions() {
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[10], true);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 1, 4);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 106);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 2, 4, 110);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 106);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 4, 110);
_action._inProgress = false;
return;
@@ -1064,8 +1064,8 @@ void Scene502::actions() {
_globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[7], 13);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[7], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 82);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 10, 83);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 82);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 10, 83);
_game._objects.setRoom(OBJ_ROPE_WITH_HOOK, NOWHERE);
break;
@@ -1122,7 +1122,7 @@ void Scene502::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[8], 10);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 82);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 82);
break;
case 82:
@@ -1353,7 +1353,7 @@ void Scene502::animateFireBursts() {
_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 10);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
}
break;
@@ -1366,7 +1366,7 @@ void Scene502::animateFireBursts() {
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 10);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 64);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 64);
}
break;
@@ -1379,7 +1379,7 @@ void Scene502::animateFireBursts() {
_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 10);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 67);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 67);
}
break;
@@ -1392,7 +1392,7 @@ void Scene502::animateFireBursts() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 5, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 10);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 70);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 70);
}
break;
@@ -1569,7 +1569,7 @@ void Scene502::handlePanelAnimation() {
_scene->_sequences.setDepth(_globals._sequenceIndexes[16], 14);
_scene->_sequences.setPosition(_globals._sequenceIndexes[16], _nextPos);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[16], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[16], 0, 0, 112);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[16], SEQUENCE_TRIGGER_EXPIRE, 0, 112);
break;
case 112: {
@@ -2181,21 +2181,21 @@ void Scene504::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 90);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 90);
}
if (_game._trigger == 90) {
_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 91);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 91);
}
if (_game._trigger == 91) {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 92);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 92);
}
if (_game._trigger == 92)
@@ -2399,8 +2399,8 @@ void Scene504::actions() {
_globals._sequenceIndexes[14] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[14], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[14], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[14], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[14], 2, 4, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[14], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[14], SEQUENCE_TRIGGER_SPRITE, 4, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[14], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
_action._inProgress = false;
return;
}
@@ -3349,8 +3349,8 @@ void Scene505::actions() {
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 9, 95);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 96);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 9, 95);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 96);
_action._inProgress = false;
return;
@@ -3386,8 +3386,8 @@ void Scene505::actions() {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[0], false, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 2, 6, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_SPRITE, 6, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[0], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
break;
case 1: {
@@ -4038,7 +4038,7 @@ void Scene506::step() {
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 6, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 61);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
@@ -4102,8 +4102,8 @@ void Scene506::actions() {
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 4, 1);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 4, 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
}
break;
@@ -4142,8 +4142,8 @@ void Scene506::actions() {
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 4);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4], true);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 2, 4, 65);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[4], 0, 0, 67);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 4, 65);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 67);
break;
case 65:
@@ -4151,7 +4151,7 @@ void Scene506::actions() {
_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 8, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, -2);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 66);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 66);
_vm->_sound->command(24);
break;
@@ -4190,7 +4190,7 @@ void Scene506::actions() {
_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);
- _scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 90);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 90);
break;
case 90:
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 147dff86e1..9a9ebf71de 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -265,6 +265,7 @@ public:
void playSpeech(int idx);
void sceneScale(int front_y, int front_scale, int back_y, int back_scale);
void animations_tick();
+
int _speechReady;
};
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 52d5d121d7..acfb6fae91 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -566,13 +566,15 @@ int SequenceList::setTimingTrigger(int delay, int code) {
return -1;
}
-int SequenceList::setTrigger(int idx, int trigger_type, int trigger_sprite, int trigger_code) {
- warning("TODO: SequenceList::setTrigger");
- return -1;
-}
-
void SequenceList::setSeqPlayer(int idx, bool flag) {
- warning("TODO: SequenceList::setSeqPlayer");
+ Player &player = _vm->_game->_player;
+ int yp = player._playerPos.y + (player._centerOfGravity * player._currentScale) / 100;
+ setPosition(idx, Common::Point(player._playerPos.x, yp));
+ setDepth(idx, player._currentDepth);
+ setScale(idx, player._currentScale);
+
+ if (flag)
+ _vm->_game->syncTimers(1, idx, 2, 0);
}
} // End of namespace
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index b207cc1113..67b9ba7923 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -128,7 +128,6 @@ public:
int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
int setTimingTrigger(int delay, int code);
- int setTrigger(int sequence_id, int trigger_type, int trigger_sprite, int trigger_code);
void setSeqPlayer(int idx, bool flag);
};