aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-03-08 11:44:06 -0400
committerPaul Gilbert2015-03-08 11:44:06 -0400
commit2b1155711fe09bb71cc3678a70eca3aab7766885 (patch)
tree449cfa9d9df80e143b661be71c65043f9e203670 /engines
parent10361d077a5637f4e64620011b67190bfdeaaf9b (diff)
downloadscummvm-rg350-2b1155711fe09bb71cc3678a70eca3aab7766885.tar.gz
scummvm-rg350-2b1155711fe09bb71cc3678a70eca3aab7766885.tar.bz2
scummvm-rg350-2b1155711fe09bb71cc3678a70eca3aab7766885.zip
MADS: Fix showing covered pit by default in Easy mode
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp17
-rw-r--r--engines/mads/sequence.cpp14
-rw-r--r--engines/mads/sequence.h2
3 files changed, 16 insertions, 17 deletions
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 499073e28a..cb22a2312d 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -1697,7 +1697,7 @@ void Scene208::updateTrap() {
_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
_globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1);
_scene->_hotspots.activate(NOUN_DEEP_PIT, false);
- int idx = _scene->_dynamicHotspots.add(NOUN_LEAF_COVERED_PIT, VERB_WALKTO, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
+ int idx = _scene->_dynamicHotspots.add(NOUN_LEAF_COVERED_PIT, VERB_WALKTO, _globals._sequenceIndexes[3], Common::Rect(0, 0, 0, 0));
_scene->_dynamicHotspots.setPosition(idx, Common::Point(100, 146), FACING_NORTH);
_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
}
@@ -1796,7 +1796,6 @@ void Scene208::preActions() {
}
void Scene208::subAction(int mode) {
-
switch (_game._trigger) {
case 0: {
_game._player._stepEnabled = false;
@@ -1804,21 +1803,21 @@ void Scene208::subAction(int mode) {
_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 6, 1, 0, 0);
_scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
- int abortVal;
+ int endTrigger;
if ((mode == 1) || (mode == 2))
- abortVal = 1;
+ endTrigger = 1;
else
- abortVal = 2;
+ endTrigger = 2;
- _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, abortVal);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, endTrigger);
}
break;
case 1: {
- int oldVal = _globals._sequenceIndexes[5];
- _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 12, 3, 0, 0);
+ int oldSeq = _globals._sequenceIndexes[5];
+ _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 12, 3, 0, 0);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 3, 4);
_scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
- _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], oldVal);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], oldSeq);
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
_vm->_sound->command(20);
}
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index ab73d70b10..7dbf4cf3be 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -95,8 +95,8 @@ bool SequenceList::addSubEntry(int index, SequenceTrigger mode, int frameIndex,
}
int SequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
- int msgX, int msgY, bool nonFixed, int scale, int depth, int frameInc, SpriteAnimType animType, int numSprites,
- int frameStart) {
+ int msgX, int msgY, bool nonFixed, int scale, int depth, int frameInc, SpriteAnimType animType, int numSprites,
+ int frameStart) {
Scene &scene = _vm->_game->_scene;
// Find a free slot
@@ -477,17 +477,17 @@ int SequenceList::startPingPongCycle(int srcSpriteIndex, bool flipped, int numTi
extraTicks, numTicks, 0, 0, true, 100, depth - 1, 1, ANIMTYPE_PING_PONG, 0, 0);
}
-void SequenceList::updateTimeout(int spriteIdx, int seqIndex) {
+void SequenceList::updateTimeout(int srcSeqIndex, int destSeqIndex) {
Player &player = _vm->_game->_player;
int timeout;
- if (spriteIdx >= 0)
- timeout = _entries[spriteIdx]._timeout;
+ if (srcSeqIndex >= 0)
+ timeout = _entries[srcSeqIndex]._timeout;
else
timeout = player._priorTimer + player._ticksAmount;
- if (seqIndex >= 0)
- _entries[seqIndex]._timeout = timeout;
+ if (destSeqIndex >= 0)
+ _entries[destSeqIndex]._timeout = timeout;
else
player._priorTimer = timeout - player._ticksAmount;
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index 9603296717..1555232780 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -119,7 +119,7 @@ public:
int startCycle(int srcSpriteIdx, bool flipped, int cycleIndex);
int startPingPongCycle(int srcSpriteIndex, bool flipped, int numTicks,
int triggerCountdown = 0, int timeoutTicks = 0, int extraTicks = 0);
- void updateTimeout(int spriteIdx, int seqIndex);
+ void updateTimeout(int destSeqIndex, int srcSeqIndex);
void setScale(int spriteIdx, int scale);
void setMsgLayout(int seqIndex);
void setDone(int seqIndex);