diff options
author | uruk | 2013-09-15 12:44:49 +0200 |
---|---|---|
committer | uruk | 2013-09-15 12:44:49 +0200 |
commit | 4979cc5f69739f7d493076ebbedcc7a0eb77ef35 (patch) | |
tree | 620cdf6811ec63cc7ea0002fbaad612bb46a8cb8 /engines | |
parent | ba05f95bb472af8530f70e62afd07a84ee273140 (diff) | |
download | scummvm-rg350-4979cc5f69739f7d493076ebbedcc7a0eb77ef35.tar.gz scummvm-rg350-4979cc5f69739f7d493076ebbedcc7a0eb77ef35.tar.bz2 scummvm-rg350-4979cc5f69739f7d493076ebbedcc7a0eb77ef35.zip |
AVALANCHE: Rename Gyro::_dogFoodPos. Add comments to clarify it's function.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/avalanche.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/celer2.cpp | 18 | ||||
-rw-r--r-- | engines/avalanche/gyro2.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/gyro2.h | 2 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 10 |
5 files changed, 16 insertions, 18 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index c768fc1346..9f2f46e8ce 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -151,7 +151,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) { sz.syncAsByte(_gyro->_avvyIsAwake); sz.syncAsByte(_gyro->_avvyInBed); sz.syncAsByte(_gyro->_userMovesAvvy); - sz.syncAsByte(_gyro->_dogFoodPos); + sz.syncAsByte(_gyro->_npcFacing); sz.syncAsByte(_gyro->_givenBadgeToIby); sz.syncAsByte(_gyro->_friarWillTieYouUp); sz.syncAsByte(_gyro->_tiedUp); diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp index 143725a92c..7e2891e691 100644 --- a/engines/avalanche/celer2.cpp +++ b/engines/avalanche/celer2.cpp @@ -112,7 +112,7 @@ void Celer::updateBackgroundSprites() { drawBackgroundSprite(-1, -1, 7); break; case 199: - _vm->_gyro->_dogFoodPos = 177; // Impossible value for this. + _vm->_gyro->_npcFacing = 177; // Impossible value for this. break; } @@ -125,9 +125,9 @@ void Celer::updateBackgroundSprites() { else if ((_vm->_lucerna->bearing(2) >= 271) && (_vm->_lucerna->bearing(2) <= 292)) direction = 4; - if (direction != _vm->_gyro->_dogFoodPos) { // Only if it's changed. + if (direction != _vm->_gyro->_npcFacing) { // Dogfood. drawBackgroundSprite(-1, -1, direction); - _vm->_gyro->_dogFoodPos = direction; + _vm->_gyro->_npcFacing = direction; } } break; @@ -163,9 +163,9 @@ void Celer::updateBackgroundSprites() { else if ((angle >= 181) && (angle <= 314)) direction = 3; // Right. - if (direction != _vm->_gyro->_dogFoodPos) { // Only if it's changed. + if (direction != _vm->_gyro->_npcFacing) { // du Lustie. drawBackgroundSprite(-1, -1, direction); - _vm->_gyro->_dogFoodPos = direction; // We use DogfoodPos here too - why not? + _vm->_gyro->_npcFacing = direction; } } break; @@ -207,9 +207,9 @@ void Celer::updateBackgroundSprites() { if ((_vm->_gyro->_roomTime % 60) > 57) direction--; // Blinks. - if (direction != _vm->_gyro->_dogFoodPos) { // Only if it's changed. + if (direction != _vm->_gyro->_npcFacing) { // Port. drawBackgroundSprite(-1, -1, direction); - _vm->_gyro->_dogFoodPos = direction; // We use DogfoodPos here too - why not? + _vm->_gyro->_npcFacing = direction; } switch (_vm->_gyro->_roomTime % 50) { @@ -239,9 +239,9 @@ void Celer::updateBackgroundSprites() { if ((_vm->_gyro->_roomTime % 45) > 42) direction++; // Duck blinks. - if (direction != _vm->_gyro->_dogFoodPos) { // Only if it's changed. + if (direction != _vm->_gyro->_npcFacing) { // Duck. drawBackgroundSprite(-1, -1, direction); - _vm->_gyro->_dogFoodPos = direction; // We use DogfoodPos here too - why not? + _vm->_gyro->_npcFacing = direction; } break; } diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp index 8bfa53f616..7598d6c331 100644 --- a/engines/avalanche/gyro2.cpp +++ b/engines/avalanche/gyro2.cpp @@ -259,7 +259,7 @@ void Gyro::resetVariables() { _avvyIsAwake = false; _avvyInBed = false; _userMovesAvvy = false; - _dogFoodPos = 0; + _npcFacing = 0; _givenBadgeToIby = false; _friarWillTieYouUp = false; _tiedUp = false; diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h index 20e240af0b..0f8b9aea5d 100644 --- a/engines/avalanche/gyro2.h +++ b/engines/avalanche/gyro2.h @@ -270,7 +270,7 @@ public: bool _avvyIsAwake; // Well? Is Avvy awake? (Screen 1 only.) bool _avvyInBed; // True if Avvy's in bed, but awake. bool _userMovesAvvy; // If this is false, the user has no control over Avvy's movements. - byte _dogFoodPos; // Which way Dogfood's looking in the pub. + byte _npcFacing; // If there's an NPC in the current room which turns it's head according to Avvy's movement (keep looking at him), this variable tells which way it's facing at the moment. bool _givenBadgeToIby; // Have you given the badge to Iby yet? bool _friarWillTieYouUp; // If you're going to get tied up. bool _tiedUp; // You ARE tied up! diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index 961202b7ad..c45c85c61b 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -502,8 +502,6 @@ void Lucerna::enterRoom(byte room, byte ped) { _vm->_gyro->_whereIs[1] = r__spludwicks; } - _vm->_gyro->_dogFoodPos = 0; // _vm->_gyro->also Spludwick pos. - spr1->_callEachStepFl = true; spr1->_eachStepProc = Animation::kProcGeida; } else @@ -667,7 +665,7 @@ void Lucerna::enterRoom(byte room, byte ped) { break; case r__lustiesroom: - _vm->_gyro->_dogFoodPos = 1; // Actually, du Lustie pos. + _vm->_gyro->_npcFacing = 1; // du Lustie. if (_vm->_animation->_sprites[0]._id == 0) // Avvy in his normal clothes _vm->_timer->addTimer(3, Timer::kProcCallsGuards, Timer::kReasonDuLustieTalks); else if (!_vm->_gyro->_enteredLustiesRoomAsMonk) // already @@ -822,7 +820,7 @@ void Lucerna::enterRoom(byte room, byte ped) { case r__nottspub: if (_vm->_gyro->_sittingInPub) _vm->_celer->drawBackgroundSprite(-1, -1, 3); - _vm->_gyro->_dogFoodPos = 1; // Actually, du Lustie pos. + _vm->_gyro->_npcFacing = 1; // Port. break; case r__outsideducks: @@ -839,8 +837,8 @@ void Lucerna::enterRoom(byte room, byte ped) { break; case r__ducks: - _vm->_gyro->_dogFoodPos = 1; - break; // Actually, Duck pos. + _vm->_gyro->_npcFacing = 1; // Duck. + break; } _vm->_gyro->_seeScroll = false; // Now it can work again! |