From 40269800de5cb74134d2001f98b7fb204ef296c1 Mon Sep 17 00:00:00 2001 From: uruk Date: Sat, 12 Apr 2014 19:27:56 +0200 Subject: AVALANCHE: Unify kProcGeida and kProcSpludwick under kProcFollowAvvy. Also rename connected function geidaProcs() to follow() and update it's comments. --- engines/avalanche/animation.cpp | 12 ++++++------ engines/avalanche/animation.h | 5 ++--- engines/avalanche/avalot.cpp | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'engines/avalanche') 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; -- cgit v1.2.3