aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2014-04-12 19:27:56 +0200
committeruruk2014-04-12 19:27:56 +0200
commit40269800de5cb74134d2001f98b7fb204ef296c1 (patch)
tree59795b7031a881afa969c352856153e29102e739 /engines/avalanche
parentc04c59a03d462d96571b9a5ce6c38d709145fee1 (diff)
downloadscummvm-rg350-40269800de5cb74134d2001f98b7fb204ef296c1.tar.gz
scummvm-rg350-40269800de5cb74134d2001f98b7fb204ef296c1.tar.bz2
scummvm-rg350-40269800de5cb74134d2001f98b7fb204ef296c1.zip
AVALANCHE: Unify kProcGeida and kProcSpludwick under kProcFollowAvvy.
Also rename connected function geidaProcs() to follow() and update it's comments.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/animation.cpp12
-rw-r--r--engines/avalanche/animation.h5
-rw-r--r--engines/avalanche/avalot.cpp4
3 files changed, 10 insertions, 11 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 992af95cac..451b4a1c68 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -764,7 +764,7 @@ void Animation::catacombMove(byte ped) {
spr1->init(5, true); // ...Load Geida.
appearPed(1, geidaPed(ped));
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = kProcGeida;
+ spr1->_eachStepProc = kProcFollowAvvy;
}
}
@@ -1121,7 +1121,7 @@ void Animation::spin(Direction dir, byte &tripnum) {
}
}
-void Animation::geidaProcs(byte tripnum) {
+void Animation::follow(byte tripnum) {
AnimationType *tripSpr = _sprites[tripnum];
AnimationType *avvy = _sprites[0];
@@ -1132,14 +1132,14 @@ void Animation::geidaProcs(byte tripnum) {
}
if (tripSpr->_y < (avvy->_y - 2)) {
- // Geida is further from the screen than Avvy.
+ // The following NPC is further from the screen than Avvy.
spin(kDirDown, tripnum);
tripSpr->_moveY = 1;
tripSpr->_moveX = 0;
takeAStep(tripnum);
return;
} else if (tripSpr->_y > (avvy->_y + 2)) {
- // Avvy is further from the screen than Geida.
+ // Avvy is further from the screen than the following NPC.
spin(kDirUp, tripnum);
tripSpr->_moveY = -1;
tripSpr->_moveX = 0;
@@ -1236,8 +1236,8 @@ void Animation::animLink() {
case kProcGrabAvvy :
grabAvvy(i);
break;
- case kProcGeida :
- geidaProcs(i);
+ case kProcFollowAvvy :
+ follow(i);
break;
default:
break;
diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h
index 375d117893..d1ee4a3ebd 100644
--- a/engines/avalanche/animation.h
+++ b/engines/avalanche/animation.h
@@ -102,9 +102,8 @@ public:
kProcBackAndForth,
kProcFaceAvvy,
kProcArrow,
- kProcSpludwick, // Unused
kProcGrabAvvy,
- kProcGeida // Spludwick uses it as well for homing! TODO: Unify it with kProcSpludwick.
+ kProcFollowAvvy
};
AnimationType *_sprites[kSpriteNumbMax];
@@ -167,7 +166,7 @@ private:
// Movements for Homing NPCs: Spludwick and Geida.
void spin(Direction dir, byte &tripnum);
void takeAStep(byte &tripnum);
- void geidaProcs(byte tripnum);
+ void follow(byte tripnum);
void drawSprites();
};
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 4e7579dc3b..4f29da78d9 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -534,7 +534,7 @@ void AvalancheEngine::putGeidaAt(byte whichPed, byte ped) {
spr1->init(5, false); // load Geida
_animation->appearPed(1, whichPed);
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = Animation::kProcGeida;
+ spr1->_eachStepProc = Animation::kProcFollowAvvy;
}
void AvalancheEngine::enterRoom(Room roomId, byte ped) {
@@ -619,7 +619,7 @@ void AvalancheEngine::enterRoom(Room roomId, byte ped) {
}
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = Animation::kProcGeida;
+ spr1->_eachStepProc = Animation::kProcFollowAvvy;
} else
_whereIs[kPeopleSpludwick - 150] = kRoomNowhere;
break;