diff options
author | Strangerke | 2013-09-16 00:05:35 +0200 |
---|---|---|
committer | Strangerke | 2013-09-16 00:05:35 +0200 |
commit | d6be9ed7db8db20aee90bd1c275d5b9d8bb7b9b3 (patch) | |
tree | 0bcc631040ce3477178f6e7db925f6b0caabf1d3 | |
parent | c877ddf4113cbfb4304ba53685713ad207b80069 (diff) | |
download | scummvm-rg350-d6be9ed7db8db20aee90bd1c275d5b9d8bb7b9b3.tar.gz scummvm-rg350-d6be9ed7db8db20aee90bd1c275d5b9d8bb7b9b3.tar.bz2 scummvm-rg350-d6be9ed7db8db20aee90bd1c275d5b9d8bb7b9b3.zip |
AVALANCHE: More index conversion in appearPed
-rw-r--r-- | engines/avalanche/acci.cpp | 10 | ||||
-rw-r--r-- | engines/avalanche/animation.cpp | 26 | ||||
-rw-r--r-- | engines/avalanche/lucerna.cpp | 26 | ||||
-rw-r--r-- | engines/avalanche/timer.cpp | 10 |
4 files changed, 36 insertions, 36 deletions
diff --git a/engines/avalanche/acci.cpp b/engines/avalanche/acci.cpp index dc794359b3..f4620f4511 100644 --- a/engines/avalanche/acci.cpp +++ b/engines/avalanche/acci.cpp @@ -1292,12 +1292,12 @@ void Acci::cardiffClimbing() { if (_vm->_gyro->_standingOnDais) { // Clamber up. _vm->_scrolls->displayText("You climb down, back onto the floor."); _vm->_gyro->_standingOnDais = false; - _vm->_animation->appearPed(1, 2); + _vm->_animation->appearPed(0, 2); } else { // Clamber down. if (_vm->_animation->inField(1)) { _vm->_scrolls->displayText("You clamber up onto the dais."); _vm->_gyro->_standingOnDais = true; - _vm->_animation->appearPed(1, 1); + _vm->_animation->appearPed(0, 1); } else _vm->_scrolls->displayText("Get a bit closer, Avvy."); } @@ -1318,7 +1318,7 @@ void Acci::standUp() { } _vm->_animation->_sprites[0]._visible = true; _vm->_gyro->_userMovesAvvy = true; - _vm->_animation->appearPed(1, 1); + _vm->_animation->appearPed(0, 1); _vm->_animation->_direction = Animation::kDirLeft; _vm->_celer->drawBackgroundSprite(-1, -1, 4); // Picture of empty pillow. _vm->_lucerna->incScore(1); @@ -1336,7 +1336,7 @@ void Acci::standUp() { if (_vm->_gyro->_sittingInPub) { _vm->_celer->drawBackgroundSprite(-1, -1, 4); // Not sitting down. _vm->_animation->_sprites[0]._visible = true; // But standing up. - _vm->_animation->appearPed(1, 3); // And walking away. + _vm->_animation->appearPed(0, 3); // And walking away. _vm->_gyro->_sittingInPub = false; // Really not sitting down. _vm->_gyro->_userMovesAvvy = true; // And ambulant. } else @@ -1891,7 +1891,7 @@ void Acci::doThat() { else { Avalanche::AnimationType *spr = &_vm->_animation->_sprites[1]; spr->init(1, false, _vm->_animation); // Avaricius - _vm->_animation->appearPed(2, 3); + _vm->_animation->appearPed(1, 3); spr->walkTo(4); spr->_callEachStepFl = true; spr->_eachStepProc = Animation::kProcBackAndForth; diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index e15ecfaab7..2327e5129d 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -722,7 +722,7 @@ void Animation::catacombMove(byte ped) { if ((_vm->_gyro->_geidaFollows) && (ped > 0)) { if (!_sprites[1]._quick) // If we don't already have her... _sprites[1].init(5, true, this); // ...Load Geida. - appearPed(2, geidaPed(ped) - 1); + appearPed(1, geidaPed(ped) - 1); _sprites[1]._callEachStepFl = true; _sprites[1]._eachStepProc = kProcGeida; } @@ -758,7 +758,7 @@ void Animation::callSpecial(uint16 which) { if (!_vm->_gyro->_arrowTriggered) { _vm->_gyro->_arrowTriggered = true; - appearPed(2, 3); // The dart starts at ped 4, and... + appearPed(1, 3); // The dart starts at ped 4, and... _sprites[1].walkTo(4); // flies to ped 5 (- 1 for pascal to C conversion). _sprites[1]._facingDir = kDirUp; // Only face. // Should call some kind of Eachstep procedure which will deallocate @@ -846,13 +846,13 @@ void Animation::callSpecial(uint16 which) { return; switch ((_vm->_gyro->kCatacombMap[_vm->_gyro->_catacombY - 1][_vm->_gyro->_catacombX - 1] & 0xf00) >> 8) { case 0x1: - appearPed(1, 11); + appearPed(0, 11); break; case 0x3: - appearPed(1, 10); + appearPed(0, 10); break; default: - appearPed(1, 3); + appearPed(0, 3); } dawnDelay(); break; @@ -862,7 +862,7 @@ void Animation::callSpecial(uint16 which) { catacombMove(1); if (_vm->_gyro->_room != kRoomCatacombs) return; - appearPed(1, 0); + appearPed(0, 0); dawnDelay(); break; case 12: // _vm->_gyro->special 12: transfer south in catacombs. @@ -871,7 +871,7 @@ void Animation::callSpecial(uint16 which) { catacombMove(2); if (_vm->_gyro->_room != kRoomCatacombs) return; - appearPed(1, 1); + appearPed(0, 1); dawnDelay(); break; case 13: // _vm->_gyro->special 13: transfer west in catacombs. @@ -880,7 +880,7 @@ void Animation::callSpecial(uint16 which) { catacombMove(3); if (_vm->_gyro->_room != kRoomCatacombs) return; - appearPed(1, 2); + appearPed(0, 2); dawnDelay(); break; } @@ -928,7 +928,7 @@ void Animation::openDoor(byte whither, byte ped, byte magicnum) { _vm->_sequence->startToClose(); return; } else { - appearPed(1, 5); + appearPed(0, 5); _sprites[0]._facingDir = kDirRight; // added by TT 12/3/1995 _vm->_sequence->firstShow(8); _vm->_sequence->thenShow(9); @@ -997,10 +997,10 @@ void Animation::changeDirection(byte t, byte dir) { } void Animation::appearPed(byte sprNum, byte pedNum) { - AnimationType *curSpr = &_sprites[sprNum - 1]; + AnimationType *curSpr = &_sprites[sprNum]; PedType *curPed = &_vm->_gyro->_peds[pedNum]; curSpr->appear(curPed->_x - curSpr->_info._xLength / 2, curPed->_y - curSpr->_info._yLength, curPed->_direction); - changeDirection(sprNum - 1, curPed->_direction); + changeDirection(sprNum, curPed->_direction); } // Eachstep procedures: @@ -1287,7 +1287,7 @@ void Animation::hideInCupboard() { } else { _sprites[0]._visible = true; _vm->_gyro->_userMovesAvvy = true; - appearPed(1, 2); // Walk out of the cupboard. + appearPed(0, 2); // Walk out of the cupboard. _vm->_scrolls->displayText("You leave the cupboard. Nice to be out of there!"); _vm->_gyro->_avvysInTheCupboard = false; _vm->_sequence->firstShow(8); @@ -1337,7 +1337,7 @@ void Animation::flipRoom(byte room, byte ped) { _vm->_gyro->_enterCatacombsFromLustiesRoom = true; _vm->_lucerna->enterRoom(room, ped); - appearPed(1, ped - 1); + appearPed(0, ped - 1); _vm->_gyro->_enterCatacombsFromLustiesRoom = false; _oldDirection = _direction; _direction = _sprites[0]._facingDir; diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp index c8c76d4553..5ba0e70bc9 100644 --- a/engines/avalanche/lucerna.cpp +++ b/engines/avalanche/lucerna.cpp @@ -413,7 +413,7 @@ void Lucerna::putGeidaAt(byte whichPed, byte ped) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; spr1->init(5, false, _vm->_animation); // load Geida - _vm->_animation->appearPed(2, whichPed); + _vm->_animation->appearPed(1, whichPed); spr1->_callEachStepFl = true; spr1->_eachStepProc = Animation::kProcGeida; } @@ -460,10 +460,10 @@ void Lucerna::enterRoom(byte room, byte ped) { spr1->init(8, false, _vm->_animation); // load Crapulus if (_vm->_gyro->_roomCount[kRoomOutsideYours] == 1) { - _vm->_animation->appearPed(2, 3); // Start on the right-hand side of the screen. + _vm->_animation->appearPed(1, 3); // Start on the right-hand side of the screen. spr1->walkTo(4); // Walks up to greet you. } else { - _vm->_animation->appearPed(2, 4); // Starts where he was before. + _vm->_animation->appearPed(1, 4); // Starts where he was before. spr1->_facingDir = Animation::kDirLeft; } @@ -475,7 +475,7 @@ void Lucerna::enterRoom(byte room, byte ped) { if (_vm->_gyro->_crapulusWillTell) { spr1->init(8, false, _vm->_animation); - _vm->_animation->appearPed(2, 1); + _vm->_animation->appearPed(1, 1); spr1->walkTo(3); _vm->_timer->addTimer(20, Timer::kProcCrapulusSpludOut, Timer::kReasonCrapulusSaysSpludwickOut); _vm->_gyro->_crapulusWillTell = false; @@ -495,7 +495,7 @@ void Lucerna::enterRoom(byte room, byte ped) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; if (ped > 0) { spr1->init(2, false, _vm->_animation); // load Spludwick - _vm->_animation->appearPed(2, 1); + _vm->_animation->appearPed(1, 1); _vm->_gyro->_whereIs[Gyro::kPeopleSpludwick - 150] = kRoomSpludwicks; } @@ -520,11 +520,11 @@ void Lucerna::enterRoom(byte room, byte ped) { _vm->_gyro->_whereIs[Gyro::kPeopleCwytalot - 150] = kRoomBrummieRoad; if (_vm->_gyro->_roomCount[kRoomBrummieRoad] == 1) { // First time here... - _vm->_animation->appearPed(2, 1); // He appears on the right of the screen... + _vm->_animation->appearPed(1, 1); // He appears on the right of the screen... spr1->walkTo(3); // ...and he walks up... } else { // You've been here before. - _vm->_animation->appearPed(2, 3); // He's standing in your way straight away... + _vm->_animation->appearPed(1, 3); // He's standing in your way straight away... spr1->_facingDir = Animation::kDirLeft; } } @@ -535,7 +535,7 @@ void Lucerna::enterRoom(byte room, byte ped) { if ((_vm->_gyro->_cwytalotGone) && (!_vm->_gyro->_passedCwytalotInHerts) && (ped == 2) && (_vm->_gyro->_roomCount[kRoomArgentRoad] > 3)) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; spr1->init(4, false, _vm->_animation); // 4 = Cwytalot again - _vm->_animation->appearPed(2, 0); + _vm->_animation->appearPed(1, 0); spr1->walkTo(1); spr1->_vanishIfStill = true; _vm->_gyro->_passedCwytalotInHerts = true; @@ -560,7 +560,7 @@ void Lucerna::enterRoom(byte room, byte ped) { // A welcome party... or maybe not... AnimationType *spr1 = &_vm->_animation->_sprites[1]; spr1->init(6, false, _vm->_animation); - _vm->_animation->appearPed(2, 1); + _vm->_animation->appearPed(1, 1); spr1->walkTo(2); _vm->_timer->addTimer(36, Timer::kProcGetTiedUp, Timer::kReasonGettingTiedUp); } @@ -585,7 +585,7 @@ void Lucerna::enterRoom(byte room, byte ped) { switch (_vm->_gyro->_cardiffQuestionNum) { case 0 : // You've answered NONE of his questions. spr1->init(9, false, _vm->_animation); - _vm->_animation->appearPed(2, 1); + _vm->_animation->appearPed(1, 1); spr1->walkTo(2); _vm->_timer->addTimer(47, Timer::kProcCardiffSurvey, Timer::kReasonCardiffsurvey); break; @@ -594,7 +594,7 @@ void Lucerna::enterRoom(byte room, byte ped) { break; // You've answered ALL his questions. => nothing happens. default: // You've answered SOME of his questions. spr1->init(9, false, _vm->_animation); - _vm->_animation->appearPed(2, 2); + _vm->_animation->appearPed(1, 2); spr1->_facingDir = Animation::kDirRight; _vm->_timer->addTimer(3, Timer::kProcCardiffReturn, Timer::kReasonCardiffsurvey); } @@ -724,10 +724,10 @@ void Lucerna::enterRoom(byte room, byte ped) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; spr1->init(11, false, _vm->_animation); if ((_vm->_gyro->_roomCount[kRoomWiseWomans] == 1) && (ped > 0)) { - _vm->_animation->appearPed(2, 1); // Start on the right-hand side of the screen. + _vm->_animation->appearPed(1, 1); // Start on the right-hand side of the screen. spr1->walkTo(3); // Walks up to greet you. } else { - _vm->_animation->appearPed(2, 3); // Starts where she was before. + _vm->_animation->appearPed(1, 3); // Starts where she was before. spr1->_facingDir = Animation::kDirLeft; } diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 161944050e..0f5eb12296 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -328,7 +328,7 @@ void Timer::hangAround() { AnimationType *avvy = &_vm->_animation->_sprites[0]; avvy->init(7, true, _vm->_animation); // Robin Hood _vm->_gyro->_whereIs[Gyro::kPeopleRobinHood - 150] = kRoomRobins; - _vm->_animation->appearPed(1, 1); + _vm->_animation->appearPed(0, 1); _vm->_scrolls->displayScrollChain('q', 39); avvy->walkTo(6); addTimer(55, kProcHangAround2, kReasonHangingAround); @@ -358,7 +358,7 @@ void Timer::afterTheShootemup() { // Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented! _vm->_animation->_sprites[0].init(0, true, _vm->_animation); // Avalot. - _vm->_animation->appearPed(1, 1); + _vm->_animation->appearPed(0, 1); _vm->_gyro->_userMovesAvvy = true; _vm->_gyro->_objects[Gyro::kObjectCrossbow - 1] = true; _vm->_lucerna->refreshObjectList(); @@ -429,7 +429,7 @@ void Timer::jacquesWakesUp() { void Timer::naughtyDuke() { // This is when the Duke comes in and takes your money. AnimationType *spr = &_vm->_animation->_sprites[1]; spr->init(9, false, _vm->_animation); // Here comes the Duke. - _vm->_animation->appearPed(2, 0); // He starts at the door... + _vm->_animation->appearPed(1, 0); // He starts at the door... spr->walkTo(2); // He walks over to you. // Let's get the door opening. @@ -586,7 +586,7 @@ void Timer::riseUpOubliette() { void Timer::robinHoodAndGeida() { AnimationType *avvy = &_vm->_animation->_sprites[0]; avvy->init(7, true, _vm->_animation); - _vm->_animation->appearPed(1, 6); + _vm->_animation->appearPed(0, 6); avvy->walkTo(5); AnimationType *spr = &_vm->_animation->_sprites[1]; @@ -615,7 +615,7 @@ void Timer::avalotReturns() { avvy->remove(); spr->remove(); avvy->init(0, true, _vm->_animation); - _vm->_animation->appearPed(1, 0); + _vm->_animation->appearPed(0, 0); _vm->_scrolls->displayScrollChain('q', 67); _vm->_gyro->_userMovesAvvy = true; } |