aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-09-27 00:21:59 +0200
committerStrangerke2013-09-27 00:21:59 +0200
commit75cbbda822714fdc07906adcdb123a2eab217089 (patch)
tree958087e2ac738a3d39fa465b7c3af9181ea6305a /engines
parentdc3471bc099b15fe79f5d5d54b6daa1dac1c4240 (diff)
downloadscummvm-rg350-75cbbda822714fdc07906adcdb123a2eab217089.tar.gz
scummvm-rg350-75cbbda822714fdc07906adcdb123a2eab217089.tar.bz2
scummvm-rg350-75cbbda822714fdc07906adcdb123a2eab217089.zip
AVALANCHE: More function deduplication, remove a magic value
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalot.cpp4
-rw-r--r--engines/avalanche/sequence.cpp19
-rw-r--r--engines/avalanche/sequence.h2
3 files changed, 5 insertions, 20 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index a290c7323d..397d1b7a3c 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -1025,7 +1025,7 @@ void Avalot::enterRoom(Room roomId, byte ped) {
if (ped == 2) {
_vm->_background->draw(-1, -1, 2);
_vm->_graphics->refreshBackground();
- _vm->_sequence->startNottsSeq();
+ _vm->_sequence->startDuckSeq();
}
break;
@@ -1984,7 +1984,7 @@ void Avalot::openDoor(Room whither, byte ped, byte magicnum) {
case 14:
if (_avvysInTheCupboard) {
_vm->_animation->hideInCupboard();
- _vm->_sequence->startLustiesSeq1();
+ _vm->_sequence->startCupboardSeq();
return;
} else {
_vm->_animation->appearPed(0, 5);
diff --git a/engines/avalanche/sequence.cpp b/engines/avalanche/sequence.cpp
index 54c7dccc61..707cd9f300 100644
--- a/engines/avalanche/sequence.cpp
+++ b/engines/avalanche/sequence.cpp
@@ -88,10 +88,11 @@ void Sequence::callSequencer() {
case 0:
return; // No more routines.
break;
- case 177: // Flip room.
+ case kNowFlip: // Flip room.
_vm->_avalot->_userMovesAvvy = true;
_vm->_avalot->flipRoom(_vm->_avalot->_flipToWhere, _vm->_avalot->_flipToPed);
- if (curSeq == 177)
+ // CHECKME: Always true?
+ if (curSeq == kNowFlip)
shoveLeft();
break;
}
@@ -146,14 +147,6 @@ void Sequence::startDuckSeq() {
startTimer();
}
-void Sequence::startNottsSeq() {
- init(3);
- add(2);
- add(1);
- add(4);
- startTimer();
-}
-
void Sequence::startLustiesSeq3(Room whither, byte ped) {
init(4);
add(5);
@@ -195,12 +188,6 @@ void Sequence::startCupboardSeq() {
startTimer();
}
-void Sequence::startLustiesSeq1() {
- init(8);
- add(7);
- startTimer();
-}
-
void Sequence::startLustiesSeq2(Room whither, byte ped) {
init(8);
add(9);
diff --git a/engines/avalanche/sequence.h b/engines/avalanche/sequence.h
index b026ef3609..7f164853e1 100644
--- a/engines/avalanche/sequence.h
+++ b/engines/avalanche/sequence.h
@@ -55,7 +55,6 @@ public:
void startGeidaLuteSeq();
void startWinSeq();
void startNaughtyDukeSeq();
- void startLustiesSeq1();
void startLustiesSeq2(Room whither, byte ped);
void startLustiesSeq3(Room whither, byte ped);
void startHallSeq(Room whither, byte ped);
@@ -63,7 +62,6 @@ public:
void startOutsideSeq(Room whither, byte ped);
void startDuckSeq();
void startCardiffSeq2();
- void startNottsSeq();
void startDummySeq(Room whither, byte ped);
private: