Skip to content

Commit

Permalink
MADS: Fix a large number of incorrect animations
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Mar 7, 2015
1 parent a35aa07 commit 14a8bb5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion engines/mads/nebular/nebular_scenes1.cpp
Expand Up @@ -1459,7 +1459,7 @@ void Scene103::actions() {
default:
break;
}
} else if (_action.isAction(VERB_TAKE, 289, 0) && _game._objects.isInRoom(OBJ_REBREATHER)) {
} else if (_action.isAction(VERB_TAKE, NOUN_REBREATHER, 0) && _game._objects.isInRoom(OBJ_REBREATHER)) {
switch (_vm->_game->_trigger) {
case 0:
_scene->changeVariant(1);
Expand Down
2 changes: 1 addition & 1 deletion engines/mads/nebular/nebular_scenes2.cpp
Expand Up @@ -556,7 +556,7 @@ void Scene202::step() {
case 90:
_vm->_sound->command(41);
_scene->_sequences.remove(_globals._sequenceIndexes[10]);
_globals._sequenceIndexes[9] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0);
_globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down
6 changes: 3 additions & 3 deletions engines/mads/nebular/nebular_scenes3.cpp
Expand Up @@ -2523,7 +2523,7 @@ void Scene318::handleDialog() {
case 0x19C:
case 0x19D:
_scene->_sequences.remove(_globals._sequenceIndexes[2]);
_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0);
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down Expand Up @@ -3588,7 +3588,7 @@ void Scene320::setLeftView(int view) {
_scene->_sequences.remove(_globals._sequenceIndexes[0]);

if (view != 10) {
_globals._sequenceIndexes[0] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[view], false, 6, 0, 0, 18);
_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down Expand Up @@ -4305,7 +4305,7 @@ void Scene352::preActions() {
_game._player._stepEnabled = false;
_scene->_sequences.remove(_commonSequenceIdx);
_vm->_sound->command(20);
_commonSequenceIdx = _scene->_sequences.startPingPongCycle(_commonSpriteIndex, false, 6, 1, 0, 0);
_commonSequenceIdx = _scene->_sequences.addReverseSpriteCycle(_commonSpriteIndex, false, 6, 1, 0, 0);
_scene->_sequences.addSubEntry(_commonSequenceIdx, SEQUENCE_TRIGGER_EXPIRE, 0, 1);
_scene->_sequences.setDepth(_commonSequenceIdx, 15);
}
Expand Down
4 changes: 2 additions & 2 deletions engines/mads/nebular/nebular_scenes4.cpp
Expand Up @@ -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.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0);
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0);
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
_vm->_sound->command(19);
}
Expand Down Expand Up @@ -2609,7 +2609,7 @@ void Scene406::enter() {
else {
_game._player._stepEnabled = false;
_game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 3, 1, 0, 0);
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 3, 1, 0, 0);
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 90);
_vm->_sound->command(19);
}
Expand Down
8 changes: 4 additions & 4 deletions engines/mads/nebular/nebular_scenes5.cpp
Expand Up @@ -238,7 +238,7 @@ void Scene501::step() {
break;

case 82:
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0);
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_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));
Expand Down Expand Up @@ -415,7 +415,7 @@ void Scene501::actions() {
case 7: {
_vm->_sound->command(12);
int syncIdx = _globals._sequenceIndexes[3];
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0);
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down Expand Up @@ -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.startPingPongCycle(_globals._spriteIndexes[12], false, 6, 1, 0, 0);
_globals._sequenceIndexes[12] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down Expand Up @@ -2530,7 +2530,7 @@ void Scene513::step() {
case 80:
_game._player._stepEnabled = false;
_scene->_sequences.remove(_globals._sequenceIndexes[2]);
_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0);
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down
12 changes: 6 additions & 6 deletions engines/mads/nebular/nebular_scenes7.cpp
Expand Up @@ -206,7 +206,7 @@ void Scene701::step() {
switch(_game._trigger) {
case 60:
_scene->_sequences.remove(_globals._sequenceIndexes[5]);
_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 6, 1, 0, 0);
_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_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;
Expand Down Expand Up @@ -326,7 +326,7 @@ void Scene701::actions() {

case 3:
_vm->_sound->command(17);
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down Expand Up @@ -1585,7 +1585,7 @@ void Scene705::enter() {
void Scene705::step() {
switch (_game._trigger) {
case 70:
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 9, 1, 0, 0);
_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_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;
Expand Down Expand Up @@ -2248,7 +2248,7 @@ void Scene751::step() {
switch (_game._trigger) {
case 70:
_scene->_sequences.remove(_globals._sequenceIndexes[4]);
_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 6, 1, 0, 0);
_globals._sequenceIndexes[4] = _scene->_sequences.addReverseSpriteCycle(_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;
Expand Down Expand Up @@ -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.startPingPongCycle(_globals._spriteIndexes[2], false, 11, 1, 0, 0);
_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_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;
Expand Down Expand Up @@ -2398,7 +2398,7 @@ void Scene751::actions() {

case 3:
_vm->_sound->command(17);
_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_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);
Expand Down

0 comments on commit 14a8bb5

Please sign in to comment.