diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 16 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 44 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 68 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes4.cpp | 46 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes5.cpp | 54 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes6.cpp | 78 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes7.cpp | 30 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 32 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 6 | ||||
-rw-r--r-- | engines/mads/sequence.h | 4 |
11 files changed, 190 insertions, 190 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 0019118593..72073b1c7b 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -432,7 +432,7 @@ void SceneTeleporter::teleporterHandleKey() { case 0: { _game._player._stepEnabled = false; Common::Point msgPos = teleporterComputeLocation(); - _handSequenceId = _scene->_sequences.startReverseCycle(_handSpriteId, false, 4, 2, 0, 0); + _handSequenceId = _scene->_sequences.startPingPongCycle(_handSpriteId, false, 4, 2, 0, 0); _scene->_sequences.setPosition(_handSequenceId, msgPos); _scene->_sequences.setDepth(_handSequenceId, 2); _scene->_sequences.addSubEntry(_handSequenceId, SEQUENCE_TRIGGER_LOOP, 0, 1); diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index 3149343aee..f21ab94bcb 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -134,7 +134,7 @@ void Scene101::sayDang() { switch (_game._trigger) { case 0: _scene->_sequences.remove(_globals._sequenceIndexes[11]); - _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 6, 0, 0); + _globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 3, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], 17, 21); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 72); _vm->_sound->command(17); @@ -696,7 +696,7 @@ void Scene102::enter() { _globals._spriteIndexes[11] = _scene->_sprites.addSprites("*RXMRC_8"); _globals._spriteIndexes[13] = _scene->_sprites.addSprites(formAnimName('x', 0)); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 0); _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 170, 0, 1, 6); _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 11, 0, 2, 3); _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 4, 0, 1, 0); @@ -1201,7 +1201,7 @@ void Scene102::actions() { if (_action.isAction(VERB_TAKE, NOUN_BINOCULARS) && _game._objects.isInRoom(OBJ_BINOCULARS)) { switch (_game._trigger) { case 0: - _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); + _globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 3, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[11]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 1); _game._player._visible = false; @@ -1433,7 +1433,7 @@ void Scene103::actions() { switch (_vm->_game->_trigger) { case 0: _scene->changeVariant(1); - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 3, 2); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 3, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[13]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_SPRITE, 7, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -1463,7 +1463,7 @@ void Scene103::actions() { switch (_vm->_game->_trigger) { case 0: _scene->changeVariant(1); - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 3, 2); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 3, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[12]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2010,7 +2010,7 @@ void Scene106::enter() { } _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('G', -1)); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 21, 0, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 21, 0, 0, 0); _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('I', -1)); _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 6, 0, 32, 47); @@ -2503,7 +2503,7 @@ void Scene109::enter() { _globals._spriteIndexes[10] = _scene->_sprites.addSprites(Resources::formatName(105, 'F', 1, EXT_SS, "")); _globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('H', 1)); - _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], true, 4, 0, 0, 0); + _globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], true, 4, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 5); _scene->_sequences.setPosition(_globals._sequenceIndexes[10], Common::Point(126, 39)); _scene->_sequences.setMotion(_globals._sequenceIndexes[10], 0, 200, 0); @@ -2676,7 +2676,7 @@ void Scene109::actions() { case 2: if (_hoovicDifficultFl) - _globals._sequenceIndexes[8] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[8], false, 4, 2, 0, 0); + _globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 4, 2, 0, 0); else _globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 4, 1, 0, 0); diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 3eef545b09..b8629a3915 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -556,7 +556,7 @@ void Scene202::step() { case 90: _vm->_sound->command(41); _scene->_sequences.remove(_globals._sequenceIndexes[10]); - _globals._sequenceIndexes[9] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); + _globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[9], Common::Point(247, 82)); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 91); @@ -811,7 +811,7 @@ void Scene202::actions() { } else { _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[7] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[7], false, 3, 2, 0, 0); + _globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[7]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -1502,7 +1502,7 @@ void Scene207::enter() { _spiderFl = (var2 & 1); if (_vultureFl) { - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 30, 0, 0, 400); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 30, 0, 0, 400); _vultureHotspotId = _scene->_dynamicHotspots.add(389, 13, _globals._sequenceIndexes[1], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(_vultureHotspotId, Common::Point(254, 94), FACING_WEST); } @@ -2164,7 +2164,7 @@ void Scene209::handleLookRight() { switch (_game._trigger) { case 151: _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 8, 14); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 152); break; @@ -2231,7 +2231,7 @@ void Scene209::handleGetBinoculars() { case 162: { int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 6, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 8, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 163); @@ -2240,7 +2240,7 @@ void Scene209::handleGetBinoculars() { case 163: { int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 8, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 24); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addTimer(8, 164); @@ -2264,7 +2264,7 @@ void Scene209::handleBinocularBlink() { case 167: { int oldIdx = _globals._sequenceIndexes[3]; _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 8, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 168); @@ -2273,7 +2273,7 @@ void Scene209::handleBinocularBlink() { case 168: { int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 8, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 8, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 24); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addTimer(30, 169); @@ -2293,7 +2293,7 @@ void Scene209::handleBinocularScan() { case 171: { int oldIdx = _globals._sequenceIndexes[3]; _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 43, 45); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 172); @@ -2305,10 +2305,10 @@ void Scene209::handleBinocularScan() { int randAction = _vm->getRandomNumber(1,2); switch (randAction) { case 1: - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); break; case 2: - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 4, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 4, 0, 0); break; } _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 25); @@ -2319,7 +2319,7 @@ void Scene209::handleBinocularScan() { case 173: { int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 26, 30); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 174); @@ -2328,7 +2328,7 @@ void Scene209::handleBinocularScan() { case 174: { int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 23, 24); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addTimer(60, 175); @@ -2414,7 +2414,7 @@ void Scene209::handleTongue() { case 185: { _vm->_sound->command(18); int oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 6, 20, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 6, 20, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 38, 39); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 186); @@ -2534,7 +2534,7 @@ void Scene209::handleMonkeyEating() { case 200: { int oldIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 10, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 10, 10, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 15, 16); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 201); @@ -2563,14 +2563,14 @@ void Scene209::handleMonkeyEating() { case 204: _scene->_sequences.remove(_globals._sequenceIndexes[4]); - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 18, 19); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 205); break; case 205: { int oldIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 10, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 20, 21); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 206); @@ -2595,7 +2595,7 @@ void Scene209::handleMonkeyEating() { _scene->_kernelMessages.setQuoted(msgIndex, 4, true); int oldIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 15, 4, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 15, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 26, 27); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 208); @@ -2605,7 +2605,7 @@ void Scene209::handleMonkeyEating() { case 208: { _scene->_kernelMessages.add(Common::Point(180, 39), 0xFDFC, 0, 0, 90, _game.getQuote(131)); int oldIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 4, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 10, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 28, 29); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 209); @@ -3448,7 +3448,7 @@ void Scene209::actions() { _globals._spriteIndexes[11] = _scene->_sprites.addSprites("*RXMBD_2"); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[11] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[11], false, 3, 2, 0, 0); + _globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[11]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -3480,7 +3480,7 @@ void Scene209::actions() { _globals._spriteIndexes[10] = _scene->_sprites.addSprites("*RXMBD_8"); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], false, 3, 2, 0, 0); + _globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 3, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[10]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -5297,7 +5297,7 @@ void Scene215::actions() { if (_globals[kSexOfRex] == REX_MALE) { _game._player._visible = false; _game._player._stepEnabled = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_LOOP, 0, 1); diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index bcedf95a27..478a733485 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -370,7 +370,7 @@ void Scene304::enter() { _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('a', 1)); _globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('b', 0)); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 150, 0, 3, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 150, 0, 3, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 2); _vm->_palette->setEntry(252, 45, 63, 45); _vm->_palette->setEntry(253, 20, 45, 20); @@ -953,7 +953,7 @@ void Scene307::actions() { case 2: { int oldIdx = _globals._sequenceIndexes[5]; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 12, 6, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 12, 6, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 2, 3); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], oldIdx); @@ -1245,7 +1245,7 @@ void Scene308::step() { switch (_game._trigger) { case 70: { _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 18, 9, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 18, 9, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 3); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 9); _scene->_kernelMessages.reset(); @@ -1266,7 +1266,7 @@ void Scene308::step() { case 72: _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 20, 5, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 20, 5, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 3, 4); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 9); _scene->_kernelMessages.reset(); @@ -1284,7 +1284,7 @@ void Scene308::step() { case 74: { _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 20, 8, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 20, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 6, 7); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 9); _scene->_kernelMessages.reset(); @@ -1306,7 +1306,7 @@ void Scene308::step() { case 76: { int seqIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 26, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 26, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 3); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 9); _scene->_kernelMessages.reset(); @@ -1441,7 +1441,7 @@ void Scene309::step() { case 70: { int idx = _scene->_dynamicHotspots.add(689, 690, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, Common::Point(142, 146), FACING_NORTHEAST); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 4, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 3); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 11); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71); @@ -1462,7 +1462,7 @@ void Scene309::step() { case 72: { int _oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 8, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 8, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 8, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 11); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], _oldIdx); @@ -1484,7 +1484,7 @@ void Scene309::step() { case 74: { int _oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 6, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 21, 23); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 11); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], _oldIdx); @@ -1494,7 +1494,7 @@ void Scene309::step() { case 75: { int _oldIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 6, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 6, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 24, 25); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], _oldIdx); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 11); @@ -1513,7 +1513,7 @@ void Scene309::step() { break; case 77: { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 90, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 90, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 29, 30); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 11); int idx = _scene->_kernelMessages.add(Common::Point(15, 46), 0xFDFC, 0, 0, 120, _game.getQuote(247)); @@ -1965,7 +1965,7 @@ void Scene316::handleRexInGrate() { case 1: _scene->_sequences.setDone(_globals._sequenceIndexes[4]); - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 12, 3, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 12, 3, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 2, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2085,7 +2085,7 @@ void Scene316::handleRoxInGrate() { case 1: _scene->_sequences.setDone(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 17, 3, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 17, 3, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 2, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2523,7 +2523,7 @@ void Scene318::handleDialog() { case 0x19C: case 0x19D: _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1); _scene->_sequences.setPosition(_globals._sequenceIndexes[2], Common::Point(142, 121)); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 6, 8); @@ -2883,7 +2883,7 @@ void Scene318::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 8, 2, 0, 80); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 8, 2, 0, 80); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1); _scene->_sequences.setPosition(_globals._sequenceIndexes[2], Common::Point(142, 121)); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 2, 5); @@ -3588,7 +3588,7 @@ void Scene320::setLeftView(int view) { _scene->_sequences.remove(_globals._sequenceIndexes[0]); if (view != 10) { - _globals._sequenceIndexes[0] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[view], false, 6, 0, 0, 18); + _globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[view], false, 6, 0, 0, 18); _scene->_sequences.setDepth(_globals._sequenceIndexes[0], 0); if (!_blinkFl) _scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 2, 2); @@ -3752,7 +3752,7 @@ void Scene320::actions() { case 0: _game._player._stepEnabled = false; handleButtons(); - _globals._sequenceIndexes[18] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[18], _flippedFl, 4, 2, 0, 0); + _globals._sequenceIndexes[18] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[18], _flippedFl, 4, 2, 0, 0); _scene->_sequences.setScale(_globals._sequenceIndexes[18], 60); _scene->_sequences.setPosition(_globals._sequenceIndexes[18], Common::Point(_posX, 170)); _scene->_sequences.setDepth(_globals._sequenceIndexes[18], 0); @@ -4053,12 +4053,12 @@ void Scene351::actions() { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_FEMALE) { - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 5, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 5, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -4160,12 +4160,12 @@ void Scene352::putArmDown(bool corridorExit, bool doorwayExit) { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_FEMALE) { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 5, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3); } else { - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 5, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 6, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 3); @@ -4305,7 +4305,7 @@ void Scene352::preActions() { _game._player._stepEnabled = false; _scene->_sequences.remove(_commonSequenceIdx); _vm->_sound->command(20); - _commonSequenceIdx = _scene->_sequences.startReverseCycle(_commonSpriteIndex, false, 6, 1, 0, 0); + _commonSequenceIdx = _scene->_sequences.startPingPongCycle(_commonSpriteIndex, false, 6, 1, 0, 0); _scene->_sequences.addSubEntry(_commonSequenceIdx, SEQUENCE_TRIGGER_EXPIRE, 0, 1); _scene->_sequences.setDepth(_commonSequenceIdx, 15); } @@ -4364,7 +4364,7 @@ void Scene352::actions() { case 1: { _vm->_sound->command(21); - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 7, 2, 20, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 7, 2, 20, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[12], FACING_NORTH); int oldIdx = _commonSequenceIdx; _commonSequenceIdx = _scene->_sequences.startCycle(_commonSpriteIndex, false, -2); @@ -4376,7 +4376,7 @@ void Scene352::actions() { case 2: _vm->_sound->command(22); _scene->_sequences.remove(_commonSequenceIdx); - _commonSequenceIdx = _scene->_sequences.startReverseCycle(_commonSpriteIndex, false, 8, 1, 0, 0); + _commonSequenceIdx = _scene->_sequences.startPingPongCycle(_commonSpriteIndex, false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_commonSequenceIdx, 1, 3); _scene->_sequences.addSubEntry(_commonSequenceIdx, SEQUENCE_TRIGGER_EXPIRE, 0, 3); break; @@ -4431,12 +4431,12 @@ void Scene352::actions() { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_FEMALE) { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 5, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 5, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -4478,7 +4478,7 @@ void Scene352::actions() { case 1: { _vm->_sound->command(21); - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 7, 2, 20, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 7, 2, 20, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8); int oldIdx = _commonSequenceIdx; _commonSequenceIdx = _scene->_sequences.startCycle(_commonSpriteIndex, false, -2); @@ -4490,7 +4490,7 @@ void Scene352::actions() { case 2: _vm->_sound->command(23); _scene->_sequences.remove(_commonSequenceIdx); - _commonSequenceIdx = _scene->_sequences.startReverseCycle(_commonSpriteIndex, false, 8, 1, 0, 0); + _commonSequenceIdx = _scene->_sequences.startPingPongCycle(_commonSpriteIndex, false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_commonSequenceIdx, 1, 4); _scene->_sequences.addSubEntry(_commonSequenceIdx, SEQUENCE_TRIGGER_EXPIRE, 0, 3); break; @@ -4545,13 +4545,13 @@ void Scene352::actions() { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_MALE) { - _globals._sequenceIndexes[14] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[14], false, 8, 1, 0, 0); + _globals._sequenceIndexes[14] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[14], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[14], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[14]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[14], SEQUENCE_TRIGGER_SPRITE, 2, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[14], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[15] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[15], false, 8, 1, 0, 0); + _globals._sequenceIndexes[15] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[15], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[15], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[15]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[15], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -4592,12 +4592,12 @@ void Scene352::actions() { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_MALE) { - _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], true, 6, 2, 0, 0); + _globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 6, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[7] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[7], true, 6, 2, 0, 0); + _globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], true, 6, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[7]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -4980,12 +4980,12 @@ void Scene359::actions() { _game._player._visible = false; _vm->_dialogs->show(35920); if (_globals[kSexOfRex] == REX_MALE) { - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 4, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 4, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 6, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], true, 7, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], true, 7, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(106, 110)); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 6, 1); diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp index 56f6fb4466..8a9e510591 100644 --- a/engines/mads/nebular/nebular_scenes4.cpp +++ b/engines/mads/nebular/nebular_scenes4.cpp @@ -962,7 +962,7 @@ void Scene402::step() { } if (!_bartenderTalking) { - _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], false, 7, 0, 0, 0); + _globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 7, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 3, 4); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 8); int idx = _scene->_dynamicHotspots.add(NOUN_BARTENDER, VERB_WALKTO, _globals._sequenceIndexes[10], Common::Rect(0, 0, 0, 0)); @@ -1514,7 +1514,7 @@ void Scene402::step() { break; case 3: - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 4, 5); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 32); _rightWomanMoving = true; @@ -1697,7 +1697,7 @@ void Scene402::step() { _scene->_kernelMessages.add(Common::Point(171, 47), 0xFBFA, 0, 0, 130, _game.getQuote(0x200)); _scene->_sequences.addTimer(150, 63); _scene->_sequences.remove(_globals._sequenceIndexes[13]); - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 30, 4, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 30, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[13], 10, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 8); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 62); @@ -1769,7 +1769,7 @@ void Scene402::step() { case 69: { int seqIdx = _globals._sequenceIndexes[13]; - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 25, 4, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 25, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[13], 10, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 8); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[13], seqIdx); @@ -1783,7 +1783,7 @@ void Scene402::step() { break; case 70: - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 25, 4, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 25, 4, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[13], 10, 12); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 8); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 72); @@ -1840,7 +1840,7 @@ void Scene402::step() { _cutSceneReady = false; _helgaReady = false; _scene->_sequences.remove(_globals._sequenceIndexes[13]); - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 15, 2, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 15, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[13], 11, 13); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 8); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 26); @@ -1860,7 +1860,7 @@ void Scene402::step() { _cutSceneReady = false; _helgaReady = false; _scene->_sequences.remove(_globals._sequenceIndexes[13]); - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 15, 2, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 15, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[13], 14, 15); _scene->_sequences.setDepth(_globals._sequenceIndexes[13], 8); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 26); @@ -2069,7 +2069,7 @@ void Scene402::actions() { if (_game._trigger == 0) { _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[21] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[21], false, 7, 2, 0, 0); + _globals._sequenceIndexes[21] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[21], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[21], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[21]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[21], SEQUENCE_TRIGGER_SPRITE, 2, 165); @@ -2202,7 +2202,7 @@ void Scene402::actions() { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[22] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[22], false, 7, 2, 0, 0); + _globals._sequenceIndexes[22] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[22], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[22], 1, 2); _scene->_sequences.setPosition(_globals._sequenceIndexes[22], Common::Point(_game._player._playerPos.x, _game._player._playerPos.y + 1)); _scene->_sequences.setDepth(_globals._sequenceIndexes[22], 5); @@ -2445,7 +2445,7 @@ void Scene405::step() { if (_game._trigger == 70) { _game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount ; _game._player._visible = true; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _vm->_sound->command(19); } @@ -2495,7 +2495,7 @@ void Scene405::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 75); Common::Point msgPos = Common::Point(_game._player._playerPos.x, _game._player._playerPos.y + 1); @@ -2505,7 +2505,7 @@ void Scene405::actions() { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 70); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos); @@ -2514,7 +2514,7 @@ void Scene405::actions() { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 80); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos); @@ -2609,7 +2609,7 @@ void Scene406::enter() { else { _game._player._stepEnabled = false; _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 3, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 3, 1, 0, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 90); _vm->_sound->command(19); } @@ -2647,7 +2647,7 @@ void Scene406::step() { if (_game._trigger == 70) { _game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount; _game._player._visible = true; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 4, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 4, 1, 0, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _vm->_sound->command(19); } @@ -2703,7 +2703,7 @@ void Scene406::actions() { _game._player._stepEnabled = false; _game._player._visible = false; _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 75); Common::Point msgPos = Common::Point(_game._player._playerPos.x, _game._player._playerPos.y + 1); @@ -2713,7 +2713,7 @@ void Scene406::actions() { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 70); Common::Point msgPos = Common::Point(_game._player._playerPos.x, _game._player._playerPos.y + 1); @@ -2723,7 +2723,7 @@ void Scene406::actions() { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 110); _scene->_sequences.setPosition(_globals._sequenceIndexes[2], _game._player._playerPos); @@ -2934,7 +2934,7 @@ void Scene408::actions() { _vm->_sound->command(57); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], true, 7, 2, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], true, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[1]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -3182,7 +3182,7 @@ void Scene410::actions() { _vm->_sound->command(57); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 3, 1); @@ -3842,7 +3842,7 @@ void Scene411::actions() { _vm->_sound->command(57); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[8] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[8], false, 7, 2, 0, 0); + _globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[8]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -3879,7 +3879,7 @@ void Scene411::actions() { _vm->_sound->command(57); _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[8] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[8], false, 7, 2, 0, 0); + _globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[8]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -4078,7 +4078,7 @@ void Scene413::enter() { case 1: _vm->_sound->command(30); _game._player._visible = false; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 19); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 8); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 76); diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp index 66d8294fc6..fe15fe0636 100644 --- a/engines/mads/nebular/nebular_scenes5.cpp +++ b/engines/mads/nebular/nebular_scenes5.cpp @@ -132,7 +132,7 @@ void Scene501::handleSlotActions() { frameIndex = 2; } - _mainSequenceId = _scene->_sequences.startReverseCycle(_mainSpriteId, false, numTicks, 1, 0, 0); + _mainSequenceId = _scene->_sequences.startPingPongCycle(_mainSpriteId, false, numTicks, 1, 0, 0); _scene->_sequences.setAnimRange(_mainSequenceId, 1, frameIndex); _scene->_sequences.setMsgLayout(_mainSequenceId); _vm->_sound->command(10); @@ -238,7 +238,7 @@ void Scene501::step() { break; case 82: - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 7); _vm->_sound->command(12); _doorHotspotid = _scene->_dynamicHotspots.add(NOUN_DOOR, VERB_WALK_THROUGH, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0)); @@ -273,7 +273,7 @@ void Scene501::step() { case 72: _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 73); break; @@ -415,7 +415,7 @@ void Scene501::actions() { case 7: { _vm->_sound->command(12); int syncIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 7); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], syncIdx); _vm->_sound->command(12); @@ -581,13 +581,13 @@ void Scene503::actions() { _game._player._stepEnabled = false; _game._player._visible = false; if (_globals[kSexOfRex] == REX_MALE) { - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 3, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], true, 8, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], true, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 4, 1); @@ -800,7 +800,7 @@ void Scene504::actions() { case 1: { int syncIdx = _globals._sequenceIndexes[3]; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 6, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 6); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -913,7 +913,7 @@ void Scene505::enter() { _globals._spriteIndexes[12] = _scene->_sprites.addSprites(formAnimName('e', -1)); if (_scene->_priorSceneId != -2) - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 6, 1, 0, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 6, 1, 0, 0); _globals._sequenceIndexes[13] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[13], false, 6, 1, 120, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 60); @@ -996,7 +996,7 @@ void Scene505::step() { _scene->_sequences.remove(_globals._sequenceIndexes[1]); _scene->_sequences.remove(_globals._sequenceIndexes[0]); _scene->_sequences.remove(_globals._sequenceIndexes[13]); - _globals._sequenceIndexes[13] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[13], false, 6, 1, 0, 0); + _globals._sequenceIndexes[13] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[13], false, 6, 1, 0, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[13], SEQUENCE_TRIGGER_EXPIRE, 0, 63); _vm->_sound->command(18); } @@ -1260,7 +1260,7 @@ void Scene506::step() { case 71: _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 6, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 5); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 72); break; @@ -1317,7 +1317,7 @@ void Scene506::handleDoorSequences() { case 82: _scene->_sequences.remove(_doorSequenceIdx); - _doorSequenceIdx = _scene->_sequences.startReverseCycle(_doorSpriteIdx, false, 7, 1, 0, 0); + _doorSequenceIdx = _scene->_sequences.startPingPongCycle(_doorSpriteIdx, false, 7, 1, 0, 0); _scene->_sequences.setDepth(_doorSequenceIdx, _doorDepth); if (_actionFl) _scene->_sequences.addSubEntry(_doorSequenceIdx, SEQUENCE_TRIGGER_EXPIRE, 0, 84); @@ -1487,7 +1487,7 @@ void Scene507::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 5, 1); @@ -1613,7 +1613,7 @@ void Scene508::enter() { _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 11); int idx = _scene->_dynamicHotspots.add(NOUN_LASER_BEAM, VERB_WALKTO, _globals._sequenceIndexes[4], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, Common::Point(57, 116), FACING_NORTHEAST); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 15, 0, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 15, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 6, 8); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 6); if (_globals[kLaserHoleIsThere]) { @@ -1659,7 +1659,7 @@ void Scene508::handlePedestral() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 9, 1, 0, 0); + _globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_SPRITE, 4, 1); @@ -1732,7 +1732,7 @@ void Scene508::actions() { break; case 4: - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 15, 0, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 15, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 6, 8); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 6); break; @@ -2024,7 +2024,7 @@ void Scene511::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[1]); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -2257,7 +2257,7 @@ void Scene512::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 5, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2293,7 +2293,7 @@ void Scene512::actions() { case 1: _game._player._visible = false; - _globals._sequenceIndexes[8] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[8], false, 9, 1, 0, 0); + _globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[8]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2326,7 +2326,7 @@ void Scene512::actions() { break; case 5: - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 14, 0, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 14, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[5], 3); _scene->_hotspots.activate(NOUN_PADLOCK_KEY, true); _scene->_sequences.addTimer(60, 6); @@ -2347,7 +2347,7 @@ void Scene512::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 10, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 10, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); @@ -2358,12 +2358,12 @@ void Scene512::actions() { _game._player._visible = true; if (!_game._objects.isInRoom(OBJ_PADLOCK_KEY) || _game._difficulty == DIFFICULTY_EASY) { _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } else { _scene->_sequences.remove(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 12, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 12, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 3); _scene->_hotspots.activate(NOUN_PADLOCK_KEY, false); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2391,7 +2391,7 @@ void Scene512::actions() { else endVal = 2; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 10, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 10, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, endVal); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, endVal, 1); @@ -2529,7 +2529,7 @@ void Scene513::step() { case 80: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _vm->_sound->command(24); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 81); @@ -2588,7 +2588,7 @@ void Scene513::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[1]); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -2626,7 +2626,7 @@ void Scene513::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 7, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 1); @@ -2636,7 +2636,7 @@ void Scene513::actions() { _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[4]); _game._player._visible = true; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _vm->_sound->command(24); _scene->_kernelMessages.reset(); diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp index 679039535f..b0777c13c3 100644 --- a/engines/mads/nebular/nebular_scenes6.cpp +++ b/engines/mads/nebular/nebular_scenes6.cpp @@ -130,7 +130,7 @@ void Scene601::step() { case 71: _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 3); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 72); break; @@ -313,7 +313,7 @@ void Scene602::handleSafeActions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], true, 12, 1, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 12, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 3, 1); @@ -348,7 +348,7 @@ void Scene602::handleSafeActions() { else _lastSpriteIdx = _globals._spriteIndexes[3]; - _lastSequenceIdx = _scene->_sequences.startReverseCycle(_lastSpriteIdx, false, 12, 1, 0, 0); + _lastSequenceIdx = _scene->_sequences.startPingPongCycle(_lastSpriteIdx, false, 12, 1, 0, 0); _scene->_sequences.setDepth(_lastSequenceIdx, 14); if (_game._objects[OBJ_DOOR_KEY]._roomNumber == _scene->_currentSceneId) _scene->_hotspots.activate(NOUN_DOOR_KEY, false); @@ -460,7 +460,7 @@ void Scene602::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], true, 8, 1, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 3, 1); @@ -600,7 +600,7 @@ void Scene603::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 8, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 5); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 5, 1); @@ -858,7 +858,7 @@ void Scene604::handleBombActions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 9, 1, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); if (_bombMode == 1) @@ -908,7 +908,7 @@ void Scene604::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -1003,12 +1003,12 @@ void Scene605::enter() { _globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('n', -1)); _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('f', -1)); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 15, 0, 0, 0); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 17, 0, 0, 0); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 14, 0, 0, 0); - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 13, 0, 0, 0); - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 17, 0, 0, 0); - _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 18, 0, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 15, 0, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 17, 0, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 14, 0, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 13, 0, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 17, 0, 0, 0); + _globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], false, 18, 0, 0, 0); _game._player._visible = false; _game._player._stepEnabled = false; @@ -1164,7 +1164,7 @@ void Scene607::step() { && !_dogBarking && (_vm->getRandomNumber(1, 50) == 10)) { _dogBarking = true; _scene->_sequences.remove(_globals._sequenceIndexes[1]); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 8, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 8, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 6); _scene->_kernelMessages.reset(); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_SPRITE, 2, 100); @@ -1250,7 +1250,7 @@ void Scene607::step() { case 61: { int syncIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 15, 3, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 15, 3, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 46, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 1); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], syncIdx); @@ -1397,7 +1397,7 @@ void Scene607::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -1791,7 +1791,7 @@ void Scene608::enter() { if (!_dogUnderCar) resetDogVariables(); else { - _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0); + _globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 10, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6); } @@ -1833,7 +1833,7 @@ void Scene608::step() { if (_vm->getRandomNumber(1, 50) == 10) { _dogBarkingFl = true; _scene->_sequences.remove(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 5, 8, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 5, 8, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[5], 4); int idx = _scene->_dynamicHotspots.add(NOUN_OBNOXIOUS_DOG, VERB_WALKTO, _globals._sequenceIndexes[5], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, Common::Point(194, 142), FACING_EAST); @@ -1958,7 +1958,7 @@ void Scene608::step() { _game._player._visible = true; _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount; } else if (_carFrame == 41) { - _globals._sequenceIndexes[10] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0); + _globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 10, 11); _scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6); _dogUnderCar = true; @@ -2148,7 +2148,7 @@ void Scene608::step() { case 82: { int syncIdx = _globals._sequenceIndexes[9]; - _globals._sequenceIndexes[9] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[9], false, 15, 5, 0, 0); + _globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], false, 15, 5, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 39, 40); _scene->_sequences.setDepth(_globals._sequenceIndexes[9], 5); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[9], syncIdx); @@ -2219,7 +2219,7 @@ void Scene608::actions() { if ((_globals[kCarStatus] == CAR_UP) || (_globals[kCarStatus] == CAR_SQUASHES_DOG) || (_globals[kCarStatus] == CAR_SQUASHES_DOG_AGAIN)) { _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], true, 6, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], true, 6, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1); @@ -2293,7 +2293,7 @@ void Scene608::actions() { if ((_globals[kCarStatus] == CAR_DOWN) || (_globals[kCarStatus] == CAR_DOWN_ON_SQUASHED_DOG)) { _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], true, 6, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], true, 6, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 3); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1); @@ -2379,7 +2379,7 @@ void Scene608::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], true, 6, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 6, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2407,7 +2407,7 @@ void Scene608::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], true, 6, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 6, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -2574,7 +2574,7 @@ void Scene609::step() { case 62: _scene->_sequences.remove( _globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); _scene->_hotspots.activate(NOUN_VIDEO_STORE_DOOR, true); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 9); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 63); @@ -2582,7 +2582,7 @@ void Scene609::step() { case 63: if (!_globals[kHasTalkedToHermit] && (_game._difficulty != DIFFICULTY_HARD)) { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 26, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 26, 2, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 7); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(287, 73)); _scene->_sequences.setScale(_globals._sequenceIndexes[3], 47); @@ -2605,7 +2605,7 @@ void Scene609::step() { case 71: if (!_globals[kHasTalkedToHermit]) { - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 26, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 26, 2, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 7); _scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(287, 73)); _scene->_sequences.setScale(_globals._sequenceIndexes[3], 47); @@ -2648,7 +2648,7 @@ void Scene609::enterStore() { case 2: _game._player._visible = false; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], true, 11, 2, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 11, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 3); @@ -2690,7 +2690,7 @@ void Scene609::enterStore() { case 7: _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 9); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 8); break; @@ -2766,7 +2766,7 @@ void Scene609::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[1]); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 5); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -2922,7 +2922,7 @@ void Scene610::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], true, 8, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -2952,7 +2952,7 @@ void Scene610::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], true, 8, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -4012,7 +4012,7 @@ void Scene611::step() { _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 81); } else if (_game._trigger == 81) { int syncId = _globals._sequenceIndexes[1]; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 20, 0, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 20, 0, 0, 0); int idx = _scene->_dynamicHotspots.add(NOUN_RAT, VERB_WALKTO, _globals._sequenceIndexes[1], Common::Rect(0, 0, 0, 0)); _ratHotspotId = _scene->_dynamicHotspots.setPosition(idx, Common::Point(272, 154), FACING_SOUTHEAST); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 9, 10); @@ -4040,7 +4040,7 @@ void Scene611::step() { break; case 6: - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 12, 3, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 12, 3, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 2, 4); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 71); @@ -4260,7 +4260,7 @@ void Scene611::step() { if (_hermitMode == 6) { if ((_scene->_activeAnimation->getCurrentFrame() == 9) && _check1Fl) { _scene->_sequences.remove(_globals._sequenceIndexes[3]); - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 112); @@ -4300,7 +4300,7 @@ void Scene611::step() { _resetBatterieText = true; int syncIdx = _globals._sequenceIndexes[3]; _nextFrame = 10; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], syncIdx); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); @@ -4488,7 +4488,7 @@ void Scene612::handleWinchMovement() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 10, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 10, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 5); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 5, 1); @@ -4506,7 +4506,7 @@ void Scene612::handleWinchMovement() { _globals[kBoatRaised] = false; } else { _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 17, 9, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 17, 9, 0, 0); _vm->_sound->command(18); } _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1); @@ -4608,7 +4608,7 @@ void Scene612::actions() { case 0: _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[1]); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp index 0f019c4b19..4838ee27d9 100644 --- a/engines/mads/nebular/nebular_scenes7.cpp +++ b/engines/mads/nebular/nebular_scenes7.cpp @@ -148,11 +148,11 @@ void Scene701::enter() { switch (boatStatus) { case BOAT_TIED_FLOATING: - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 20, 0, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 20, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 10); break; case BOAT_ADRIFT: - _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 20, 0, 0, 0); + _globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], false, 20, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 10); break; case BOAT_TIED: @@ -206,7 +206,7 @@ void Scene701::step() { switch(_game._trigger) { case 60: _scene->_sequences.remove(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 6, 1, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 6, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[5], Common::Point(155, 129)); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 61); break; @@ -326,7 +326,7 @@ void Scene701::actions() { case 3: _vm->_sound->command(17); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(48, 136)); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 4); @@ -502,7 +502,7 @@ void Scene702::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[12]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -1218,7 +1218,7 @@ void Scene704::handleFillBottle(int quote) { void Scene704::enter() { if (_game._objects[OBJ_BOTTLE]._roomNumber == _scene->_currentSceneId) { _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('b', 0)); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); if (_scene->_priorSceneId == 705) { _scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(123, 125)); @@ -1585,7 +1585,7 @@ void Scene705::enter() { void Scene705::step() { switch (_game._trigger) { case 70: - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71); break; @@ -1798,7 +1798,7 @@ void Scene706::handleTakeVase() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[3] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[3], false, 4, 2, 0, 0); + _globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 4, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_SPRITE, 7, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2087,7 +2087,7 @@ void Scene710::enter() { if (_game._objects[OBJ_VASE]._roomNumber == 706) { _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('g', -1)); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); } _game._player._visible = false; @@ -2248,7 +2248,7 @@ void Scene751::step() { switch (_game._trigger) { case 70: _scene->_sequences.remove(_globals._sequenceIndexes[4]); - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(155, 129)); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 71); break; @@ -2287,7 +2287,7 @@ void Scene751::step() { case 62: _vm->_sound->command(17); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(48, 136)); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 63); @@ -2329,7 +2329,7 @@ void Scene751::preActions() { _game._player._readyToWalk = false; _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 11, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 11, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, 7); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; @@ -2398,7 +2398,7 @@ void Scene751::actions() { case 3: _vm->_sound->command(17); - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(48, 136)); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 4); @@ -2597,7 +2597,7 @@ void Scene752::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[12]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2); @@ -2622,7 +2622,7 @@ void Scene752::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[12] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); + _globals._sequenceIndexes[12] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[12], false, 5, 2, 0, 0); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[12]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_SPRITE, 4, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2); diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 7e8366c179..95b3c24938 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -145,7 +145,7 @@ void Scene801::enter() { case 2: _game._player._playerPos = Common::Point(8, 117); _globals[kTeleporterUnderstood] = true; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 8, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 13); _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 8090); @@ -283,7 +283,7 @@ void Scene801::actions() { _globals[kBetweenRooms] = true; _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _scene->_sequences.remove(_globals._sequenceIndexes[2]); - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 4, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 4, 1, 0, 0); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 90); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 13); @@ -419,7 +419,7 @@ void Scene802::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], true, 7, 2, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], true, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 2, 1); @@ -451,7 +451,7 @@ void Scene802::actions() { case 0: _game._player._stepEnabled = false; _game._player._visible = false; - _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], true, 7, 2, 0, 0); + _globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 7, 2, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_SPRITE, 4, 1); @@ -692,7 +692,7 @@ void Scene803::step() { if (_game._trigger == 90) { int syncIdx = _globals._sequenceIndexes[4]; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 15, 0, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 15, 0, 0, 0); _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], syncIdx); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 4, 9); if (_globals[kHoppyDead]) @@ -726,7 +726,7 @@ void Scene803::step() { if (_game._trigger == 150) { _scene->_sequences.remove(_globals._sequenceIndexes[6]); _vm->_sound->command(18); - _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 8, 1, 0, 0); + _globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 19); _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 4); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 151); @@ -778,7 +778,7 @@ void Scene803::actions() { case 162: _scene->_sequences.remove(_globals._sequenceIndexes[9]); - _globals._sequenceIndexes[9] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); + _globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 1, 4); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[9]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 0, 163); @@ -899,7 +899,7 @@ void Scene804::enter() { _scene->_sequences.addTimer(60, 100); } else { _globals._sequenceIndexes[6] = _scene->_sequences.startCycle(_globals._spriteIndexes[6], false, 1); - _globals._sequenceIndexes[7] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[7], false, 4, 0, 0, 0); + _globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], false, 4, 0, 0, 0); _scene->_sequences.addTimer(160, 70); _game._player._stepEnabled = false; } @@ -1277,14 +1277,14 @@ void Scene805::actions() { } else if (_action.isAction(VERB_REMOVE, NOUN_SHIELD_MODULATOR) && _globals[kShieldModInstalled]) { _scene->_sequences.remove(_globals._sequenceIndexes[1]); _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; - _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0); + _globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _game._player._stepEnabled = false; } else if (_action.isAction(VERB_REMOVE, NOUN_TARGET_MODULE) && _globals[kTargetModInstalled]) { _scene->_sequences.remove(_globals._sequenceIndexes[2]); _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; - _globals._sequenceIndexes[2] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); + _globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 81); _game._player._stepEnabled = false; @@ -1433,7 +1433,7 @@ void Scene808::actions() { _vm->_sound->command(20); _vm->_sound->command(25); } - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(248, 211)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 71); @@ -1468,7 +1468,7 @@ void Scene808::actions() { _vm->_sound->command(20); } _globals[kTopButtonPushed] = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(248, 186)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 91); @@ -1499,7 +1499,7 @@ void Scene808::actions() { _vm->_sound->command(20); } _globals[kTopButtonPushed] = true; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 1, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(248, 163)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 81); @@ -1516,7 +1516,7 @@ void Scene808::actions() { switch (_game._trigger) { case 0: _game._player._stepEnabled = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(168, 211)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 70); @@ -1533,7 +1533,7 @@ void Scene808::actions() { switch (_game._trigger) { case 0: _game._player._stepEnabled = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(172, 163)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 80); @@ -1550,7 +1550,7 @@ void Scene808::actions() { switch (_game._trigger) { case 0: _game._player._stepEnabled = false; - _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); + _globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 4, 2, 0, 0); _scene->_sequences.setPosition(_globals._sequenceIndexes[4], Common::Point(172, 186)); _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 2); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 90); diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index c94f3e3ad4..ab73d70b10 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -466,15 +466,15 @@ int SequenceList::startCycle(int srcSpriteIndex, bool flipped, int cycleIndex) { return result; } -int SequenceList::startReverseCycle(int srcSpriteIndex, bool flipped, int numTicks, +int SequenceList::startPingPongCycle(int srcSpriteIndex, bool flipped, int numTicks, int triggerCountdown, int timeoutTicks, int extraTicks) { SpriteAsset *sprites = _vm->_game->_scene._sprites[srcSpriteIndex]; MSprite *frame = sprites->getFrame(0); int depth = _vm->_game->_scene._depthSurface.getDepth(Common::Point( frame->_offset.x + frame->w / 2, frame->_offset.y + frame->h / 2)); - return add(srcSpriteIndex, flipped, sprites->getCount(), triggerCountdown, timeoutTicks, - extraTicks, numTicks, 0, 0, true, 100, depth - 1, -1, ANIMTYPE_REVERSIBLE, 0, 0); + return add(srcSpriteIndex, flipped, 1, triggerCountdown, timeoutTicks, + extraTicks, numTicks, 0, 0, true, 100, depth - 1, 1, ANIMTYPE_PING_PONG, 0, 0); } void SequenceList::updateTimeout(int spriteIdx, int seqIndex) { diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h index ee587ff02d..9603296717 100644 --- a/engines/mads/sequence.h +++ b/engines/mads/sequence.h @@ -38,7 +38,7 @@ enum SequenceTrigger { SEQUENCE_TRIGGER_SPRITE = 2 // Trigger when sequence reaches specific sprite }; -enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_REVERSIBLE = 2 }; +enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_PING_PONG = 2 }; #define SEQUENCE_ENTRY_SUBSET_MAX 5 @@ -117,7 +117,7 @@ public: int triggerCountdown = 0, int timeoutTicks = 0, int extraTicks = 0); int startCycle(int srcSpriteIdx, bool flipped, int cycleIndex); - int startReverseCycle(int srcSpriteIndex, bool flipped, int numTicks, + int startPingPongCycle(int srcSpriteIndex, bool flipped, int numTicks, int triggerCountdown = 0, int timeoutTicks = 0, int extraTicks = 0); void updateTimeout(int spriteIdx, int seqIndex); void setScale(int spriteIdx, int scale); |