diff options
author | Strangerke | 2013-09-24 07:31:43 +0200 |
---|---|---|
committer | Strangerke | 2013-09-24 07:31:43 +0200 |
commit | f4e37939c7cb36041b610d8a8d42576959b94ed9 (patch) | |
tree | c4a03defd9e34dfa97b0f9948b78fc2416a9c743 /engines/avalanche | |
parent | cbe9c151aa305e929527a1dd81d34e7c818ae128 (diff) | |
download | scummvm-rg350-f4e37939c7cb36041b610d8a8d42576959b94ed9.tar.gz scummvm-rg350-f4e37939c7cb36041b610d8a8d42576959b94ed9.tar.bz2 scummvm-rg350-f4e37939c7cb36041b610d8a8d42576959b94ed9.zip |
AVALANCHE: Move 2 enums out of Avalot classes, set private some parser variables
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/animation.cpp | 6 | ||||
-rw-r--r-- | engines/avalanche/avalanche.cpp | 5 | ||||
-rw-r--r-- | engines/avalanche/avalot.cpp | 43 | ||||
-rw-r--r-- | engines/avalanche/avalot.h | 99 | ||||
-rw-r--r-- | engines/avalanche/dialogs.cpp | 26 | ||||
-rw-r--r-- | engines/avalanche/menu.cpp | 34 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 185 | ||||
-rw-r--r-- | engines/avalanche/parser.h | 9 | ||||
-rw-r--r-- | engines/avalanche/timer.cpp | 12 |
9 files changed, 213 insertions, 206 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 7ddc58945f..1172b1cc64 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -771,7 +771,7 @@ void Animation::callSpecial(uint16 which) { _sprites[1].walkTo(2); _sprites[1]._vanishIfStill = true; _sprites[1]._doCheck = true; // One of them must have Check_Me switched on. - _vm->_avalot->_whereIs[Avalot::kPeopleFriarTuck - 150] = kRoomDummy; // Not here, then. + _vm->_avalot->_whereIs[kPeopleFriarTuck - 150] = kRoomDummy; // Not here, then. _vm->_timer->addTimer(364, Timer::kProcHangAround, Timer::kReasonHangingAround); } break; @@ -813,7 +813,7 @@ void Animation::callSpecial(uint16 which) { case 10: // _vm->_avalot->special 10: transfer north in catacombs. if ((_vm->_avalot->_catacombX == 4) && (_vm->_avalot->_catacombY == 1)) { // Into Geida's room. - if (_vm->_avalot->_objects[Avalot::kObjectKey - 1]) + if (_vm->_avalot->_objects[kObjectKey - 1]) _vm->_dialogs->displayScrollChain('q', 62); else { _vm->_dialogs->displayScrollChain('q', 61); @@ -1229,7 +1229,7 @@ void Animation::stopWalking() { */ void Animation::hideInCupboard() { if (_vm->_avalot->_avvysInTheCupboard) { - if (_vm->_parser->_wearing == Parser::kNothing) { + if (_vm->_parser->_wearing == kObjectDummy) { Common::String tmpStr = Common::String::format("%cAVVY!%cGet dressed first!", Dialogs::kControlItalic, Dialogs::kControlRoman); _vm->_dialogs->displayText(tmpStr); } else { diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index b8f06bf134..b0db9648a8 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -126,8 +126,6 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) { _saveNum++; sz.syncAsByte(_saveNum); sz.syncBytes(_avalot->_roomCount, 100); - sz.syncAsByte(_parser->_alcoholLevel); - sz.syncAsByte(_parser->_playedNim); sz.syncAsByte(_avalot->_wonNim); sz.syncAsByte(_avalot->_wineState); sz.syncAsByte(_avalot->_cwytalotGone); @@ -135,7 +133,6 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) { sz.syncAsByte(_avalot->_aylesIsAwake); sz.syncAsByte(_avalot->_drawbridgeOpen); sz.syncAsByte(_avalot->_avariciusTalk); - sz.syncAsByte(_parser->_boughtOnion); sz.syncAsByte(_avalot->_rottenOnion); sz.syncAsByte(_avalot->_onionInVinegar); sz.syncAsByte(_avalot->_givenToSpludwick); @@ -422,7 +419,7 @@ bool AvalancheEngine::loadGame(const int16 slot) { _background->forgetBackgroundSprites(); _avalot->minorRedraw(); _menu->setup(); - _avalot->_whereIs[Avalot::kPeopleAvalot - 150] = _avalot->_room; + _avalot->_whereIs[kPeopleAvalot - 150] = _avalot->_room; _avalot->_alive = true; _avalot->refreshObjectList(); _animation->updateSpeed(); diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index b1c2edd10b..afee7228d6 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -371,7 +371,7 @@ void Avalot::setup() { int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot"); if (loadSlot >= 0) { _thinks = 2; // You always have money. - thinkAbout(Avalot::kObjectMoney, Avalot::kThing); + thinkAbout(kObjectMoney, Avalot::kThing); _vm->loadGame(loadSlot); } else { @@ -380,7 +380,7 @@ void Avalot::setup() { _soundFx = !_soundFx; fxToggle(); - thinkAbout(Avalot::kObjectMoney, Avalot::kThing); + thinkAbout(kObjectMoney, Avalot::kThing); _vm->_dialogs->displayScrollChain('q', 83); // Info on the game, etc. } @@ -727,12 +727,12 @@ void Avalot::enterNewTown() { _spludwickAtHome = true; _crapulusWillTell = false; } - if (_boxContent == Avalot::kObjectWine) + if (_boxContent == kObjectWine) _wineState = 3; // Vinegar break; } - if ((_room != kRoomOutsideDucks) && (_objects[Avalot::kObjectOnion - 1]) && !(_onionInVinegar)) + if ((_room != kRoomOutsideDucks) && (_objects[kObjectOnion - 1]) && !(_onionInVinegar)) _rottenOnion = true; // You're holding the onion } @@ -760,10 +760,10 @@ void Avalot::enterRoom(byte room, byte ped) { if ((_roomCount[room] == 0) && (!setFlag('S'))) incScore(1); - _whereIs[Avalot::kPeopleAvalot - 150] = _room; + _whereIs[kPeopleAvalot - 150] = _room; if (_geidaFollows) - _whereIs[Avalot::kPeopleGeida - 150] = room; + _whereIs[kPeopleGeida - 150] = room; _roomTime = 0; @@ -784,7 +784,7 @@ void Avalot::enterRoom(byte room, byte ped) { if (ped > 0) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; if (!_talkedToCrapulus) { - _whereIs[Avalot::kPeopleCrapulus - 150] = kRoomOutsideYours; + _whereIs[kPeopleCrapulus - 150] = kRoomOutsideYours; spr1->init(8, false, _vm->_animation); // load Crapulus if (_roomCount[kRoomOutsideYours] == 1) { @@ -799,7 +799,7 @@ void Avalot::enterRoom(byte room, byte ped) { spr1->_eachStepProc = Animation::kProcFaceAvvy; // He always faces Avvy. } else - _whereIs[Avalot::kPeopleCrapulus - 150] = kRoomNowhere; + _whereIs[kPeopleCrapulus - 150] = kRoomNowhere; if (_crapulusWillTell) { spr1->init(8, false, _vm->_animation); @@ -824,13 +824,13 @@ void Avalot::enterRoom(byte room, byte ped) { if (ped > 0) { spr1->init(2, false, _vm->_animation); // load Spludwick _vm->_animation->appearPed(1, 1); - _whereIs[Avalot::kPeopleSpludwick - 150] = kRoomSpludwicks; + _whereIs[kPeopleSpludwick - 150] = kRoomSpludwicks; } spr1->_callEachStepFl = true; spr1->_eachStepProc = Animation::kProcGeida; } else - _whereIs[Avalot::kPeopleSpludwick - 150] = kRoomNowhere; + _whereIs[kPeopleSpludwick - 150] = kRoomNowhere; break; case kRoomBrummieRoad: @@ -838,13 +838,13 @@ void Avalot::enterRoom(byte room, byte ped) { putGeidaAt(4, ped); if (_cwytalotGone) { _magics[kColorLightred - 1]._operation = Avalot::kMagicNothing; - _whereIs[Avalot::kPeopleCwytalot - 150] = kRoomNowhere; + _whereIs[kPeopleCwytalot - 150] = kRoomNowhere; } else if (ped > 0) { AnimationType *spr1 = &_vm->_animation->_sprites[1]; spr1->init(4, false, _vm->_animation); // 4 = Cwytalot spr1->_callEachStepFl = true; spr1->_eachStepProc = Animation::kProcFollowAvvyY; - _whereIs[Avalot::kPeopleCwytalot - 150] = kRoomBrummieRoad; + _whereIs[kPeopleCwytalot - 150] = kRoomBrummieRoad; if (_roomCount[kRoomBrummieRoad] == 1) { // First time here... _vm->_animation->appearPed(1, 1); // He appears on the right of the screen... @@ -891,8 +891,8 @@ void Avalot::enterRoom(byte room, byte ped) { } if (_beenTiedUp) { - _whereIs[Avalot::kPeopleRobinHood - 150] = 0; - _whereIs[Avalot::kPeopleFriarTuck - 150] = 0; + _whereIs[kPeopleRobinHood - 150] = 0; + _whereIs[kPeopleFriarTuck - 150] = 0; } if (_tiedUp) @@ -936,9 +936,9 @@ void Avalot::enterRoom(byte room, byte ped) { if (ped > 0) zoomOut(_peds[ped]._x, _peds[ped]._y); - if ((_objects[Avalot::kObjectWine - 1]) && (_wineState != 3)) { + if ((_objects[kObjectWine - 1]) && (_wineState != 3)) { _vm->_dialogs->displayScrollChain('q', 9); // Don't want to waste the wine! - _objects[Avalot::kObjectWine - 1] = false; + _objects[kObjectWine - 1] = false; refreshObjectList(); } @@ -1004,7 +1004,7 @@ void Avalot::enterRoom(byte room, byte ped) { _vm->_graphics->refreshBackground(); _vm->_background->drawBackgroundSprite(-1, -1, 3); _magics[kColorBrown - 1]._operation = Avalot::kMagicNothing; - _whereIs[Avalot::kPeopleJacques - 150] = 0; + _whereIs[kPeopleJacques - 150] = 0; } if (ped != 0) { _vm->_background->drawBackgroundSprite(-1, -1, 5); @@ -1315,7 +1315,7 @@ void Avalot::fxToggle() { void Avalot::refreshObjectList() { _carryNum = 0; if (_thinkThing && !_objects[_thinks - 1]) - thinkAbout(Avalot::kObjectMoney, Avalot::kThing); // you always have money + thinkAbout(kObjectMoney, Avalot::kThing); // you always have money for (int i = 0; i < kObjectNum; i++) { if (_objects[i]) { @@ -1590,14 +1590,10 @@ void Avalot::resetVariables() { _dnascore = 0; _money = 0; _room = kRoomNowhere; - _vm->_parser->_wearing = 0; - _vm->_parser->_sworeNum = 0; _vm->_saveNum = 0; for (int i = 0; i < 100; i++) _roomCount[i] = 0; - _vm->_parser->_alcoholLevel = 0; - _vm->_parser->_playedNim = 0; _wonNim = false; _wineState = 0; _cwytalotGone = false; @@ -1605,7 +1601,6 @@ void Avalot::resetVariables() { _aylesIsAwake = false; _drawbridgeOpen = 0; _avariciusTalk = 0; - _vm->_parser->_boughtOnion = false; _rottenOnion = false; _onionInVinegar = false; _givenToSpludwick = 0; @@ -1661,6 +1656,8 @@ void Avalot::resetVariables() { _takenMushroom = false; _givenPenToAyles = false; _askedDogfoodAboutNim = false; + + _vm->_parser->resetVariables(); } void Avalot::newGame() { diff --git a/engines/avalanche/avalot.h b/engines/avalanche/avalot.h index 0179d898bb..89f67b82fb 100644 --- a/engines/avalanche/avalot.h +++ b/engines/avalanche/avalot.h @@ -83,6 +83,56 @@ enum Room { kRoomBossKey = 98, kRoomMap = 99, kRoomDummy = 177 // Dummy room }; +// Objects you can hold: +enum Object { + kObjectWine = 1, + kObjectMoney, + kObjectBodkin, + kObjectPotion, + kObjectChastity, + kObjectBolt, + kObjectCrossbow, + kObjectLute, + kObjectBadge, + kObjectMushroom, + kObjectKey, + kObjectBell, + kObjectPrescription, + kObjectPen, + kObjectInk, + kObjectClothes, + kObjectHabit, + kObjectOnion, + kObjectDummy = 177 +}; + +// People who hang around this game. +enum People { + // Boys: + kPeopleAvalot = 150, + kPeopleSpludwick = 151, + kPeopleCrapulus = 152, + kPeopleDrDuck = 153, + kPeopleMalagauche = 154, + kPeopleFriarTuck = 155, + kPeopleRobinHood = 156, + kPeopleCwytalot = 157, + kPeopleDuLustie = 158, + kPeopleDuke = 159, + kPeopleDogfood = 160, + kPeopleTrader = 161, + kPeopleIbythneth = 162, + kPeopleAyles = 163, + kPeoplePort = 164, + kPeopleSpurge = 165, + kPeopleJacques = 166, + // Girls: + kPeopleArkata = 175, + kPeopleGeida = 176, + kPeopleInvisible = 177, + kPeopleWisewoman = 178 +}; + static const byte kObjectNum = 18; // always preface with a # static const int16 kCarryLimit = 12; // carry limit @@ -133,55 +183,6 @@ struct Sundry { // Things which must be saved over a backtobootstrap, outside DN class Avalot { public: - // Objects you can hold: - enum Object { - kObjectWine = 1, - kObjectMoney, - kObjectBodkin, - kObjectPotion, - kObjectChastity, - kObjectBolt, - kObjectCrossbow, - kObjectLute, - kObjectBadge, - kObjectMushroom, - kObjectKey, - kObjectBell, - kObjectPrescription, - kObjectPen, - kObjectInk, - kObjectClothes, - kObjectHabit, - kObjectOnion - }; - - // People who hang around this game. - enum People { - // Boys: - kPeopleAvalot = 150, - kPeopleSpludwick = 151, - kPeopleCrapulus = 152, - kPeopleDrDuck = 153, - kPeopleMalagauche = 154, - kPeopleFriarTuck = 155, - kPeopleRobinHood = 156, - kPeopleCwytalot = 157, - kPeopleDuLustie = 158, - kPeopleDuke = 159, - kPeopleDogfood = 160, - kPeopleTrader = 161, - kPeopleIbythneth = 162, - kPeopleAyles = 163, - kPeoplePort = 164, - kPeopleSpurge = 165, - kPeopleJacques = 166, - // Girls: - kPeopleArkata = 175, - kPeopleGeida = 176, - kPeopleInvisible = 177, - kPeopleWisewoman = 178 - }; - static const int16 kXW = 30; static const int16 kYW = 36; // x width & y whatsit static const int16 kMargin = 5; diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index 3004f621a4..37f8fc14ed 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -961,10 +961,10 @@ void Dialogs::talkTo(byte whom) { if (_vm->_avalot->_subjectNum == 0) { switch (whom) { - case Avalot::kPeopleSpludwick: - if ((_vm->_avalot->_lustieIsAsleep) & (!_vm->_avalot->_objects[Avalot::kObjectPotion - 1])) { + case kPeopleSpludwick: + if ((_vm->_avalot->_lustieIsAsleep) & (!_vm->_avalot->_objects[kObjectPotion - 1])) { displayScrollChain('q', 68); - _vm->_avalot->_objects[Avalot::kObjectPotion - 1] = true; + _vm->_avalot->_objects[kObjectPotion - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_avalot->incScore(3); return; @@ -988,20 +988,20 @@ void Dialogs::talkTo(byte whom) { return; } break; - case Avalot::kPeopleIbythneth: + case kPeopleIbythneth: if (_vm->_avalot->_givenBadgeToIby) { displayScrollChain('q', 33); // Thanks a lot! return; // And leave the proc. } break; // Or... just continue, 'cos he hasn't got it. - case Avalot::kPeopleDogfood: + case kPeopleDogfood: if (_vm->_avalot->_wonNim) { // We've won the game. displayScrollChain('q', 6); // "I'm Not Playing!" return; // Zap back. } else _vm->_avalot->_askedDogfoodAboutNim = true; break; - case Avalot::kPeopleAyles: + case kPeopleAyles: if (!_vm->_avalot->_aylesIsAwake) { displayScrollChain('q', 43); // He's fast asleep! return; @@ -1011,11 +1011,11 @@ void Dialogs::talkTo(byte whom) { } break; - case Avalot::kPeopleJacques: + case kPeopleJacques: displayScrollChain('q', 43); return; - case Avalot::kPeopleGeida: + case kPeopleGeida: if (_vm->_avalot->_givenPotionToGeida) _vm->_avalot->_geidaFollows = true; else { @@ -1023,7 +1023,7 @@ void Dialogs::talkTo(byte whom) { return; } break; - case Avalot::kPeopleSpurge: + case kPeopleSpurge: if (!_vm->_avalot->_sittingInPub) { displayScrollChain('q', 71); // Try going over and sitting down. return; @@ -1038,7 +1038,7 @@ void Dialogs::talkTo(byte whom) { break; } // On a subject. Is there any reason to block it? - } else if ((whom == Avalot::kPeopleAyles) && (!_vm->_avalot->_aylesIsAwake)) { + } else if ((whom == kPeopleAyles) && (!_vm->_avalot->_aylesIsAwake)) { displayScrollChain('q', 43); // He's fast asleep! return; } @@ -1066,12 +1066,12 @@ void Dialogs::talkTo(byte whom) { if (!_noError) displayScrollChain('n', whom); // File not found! - if ((_vm->_avalot->_subjectNum == 0) && ((whom + 149) == Avalot::kPeopleCrapulus)) { // Crapulus: get the badge - first time only - _vm->_avalot->_objects[Avalot::kObjectBadge - 1] = true; + if ((_vm->_avalot->_subjectNum == 0) && ((whom + 149) == kPeopleCrapulus)) { // Crapulus: get the badge - first time only + _vm->_avalot->_objects[kObjectBadge - 1] = true; _vm->_avalot->refreshObjectList(); displayScrollChain('q', 1); // Circular from Cardiff. _vm->_avalot->_talkedToCrapulus = true; - _vm->_avalot->_whereIs[Avalot::kPeopleCrapulus - 150] = kRoomDummy; // Crapulus walks off. + _vm->_avalot->_whereIs[kPeopleCrapulus - 150] = kRoomDummy; // Crapulus walks off. AnimationType *spr = &_vm->_animation->_sprites[1]; spr->_vanishIfStill = true; diff --git a/engines/avalanche/menu.cpp b/engines/avalanche/menu.cpp index 0fb1f62ca5..fab349ebc4 100644 --- a/engines/avalanche/menu.cpp +++ b/engines/avalanche/menu.cpp @@ -263,25 +263,25 @@ Menu::Menu(AvalancheEngine *vm) { void Menu::findWhatYouCanDoWithIt() { switch (_vm->_avalot->_thinks) { - case Avalot::kObjectWine: - case Avalot::kObjectPotion: - case Avalot::kObjectInk: + case kObjectWine: + case kObjectPotion: + case kObjectInk: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeDrink; break; - case Avalot::kObjectBell: + case kObjectBell: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeRing; break; - case Avalot::kObjectChastity: + case kObjectChastity: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeWear; break; - case Avalot::kObjectLute: + case kObjectLute: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodePlay; break; - case Avalot::kObjectMushroom: - case Avalot::kObjectOnion: + case kObjectMushroom: + case kObjectOnion: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeEat; break; - case Avalot::kObjectClothes: + case kObjectClothes: _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeWear; break; default: @@ -487,7 +487,7 @@ void Menu::setupMenuWith() { // We disable the "give" option if: (a), you haven't selected anybody, (b), the _person you've selected isn't in the room, // or (c), the _person you've selected is YOU! - if ((_vm->_avalot->_lastPerson == Avalot::kPeopleAvalot) || (_vm->_avalot->_lastPerson == _vm->_parser->kNothing) + if ((_vm->_avalot->_lastPerson == kPeopleAvalot) || (_vm->_avalot->_lastPerson == _vm->_parser->kNothing) || (_vm->_avalot->_whereIs[_vm->_avalot->_lastPerson - 150] != _vm->_avalot->_room)) _activeMenuItem.setupOption("Give to...", 'G', "", false); // Not here. else { @@ -499,18 +499,18 @@ void Menu::setupMenuWith() { _activeMenuItem.setupOption(Common::String("Talk to h") + selectGender(_vm->_avalot->_thinks), 'T', "", true); _vm->_avalot->_verbStr = Common::String(Parser::kVerbCodeExam) + Parser::kVerbCodeTalk; switch (_vm->_avalot->_thinks) { - case Avalot::kPeopleGeida: - case Avalot::kPeopleArkata: + case kPeopleGeida: + case kPeopleArkata: _activeMenuItem.setupOption("Kiss her", 'K', "", true); _vm->_avalot->_verbStr = _vm->_avalot->_verbStr + Parser::kVerbCodeKiss; break; - case Avalot::kPeopleDogfood: + case kPeopleDogfood: _activeMenuItem.setupOption("Play his game", 'P', "", !_vm->_avalot->_wonNim); // True if you HAVEN'T won. _vm->_avalot->_verbStr = _vm->_avalot->_verbStr + Parser::kVerbCodePlay; break; - case Avalot::kPeopleMalagauche: { + case kPeopleMalagauche: { bool isSober = !_vm->_avalot->_teetotal; - _activeMenuItem.setupOption("Buy some wine", 'w', "", !_vm->_avalot->_objects[Avalot::kObjectWine - 1]); + _activeMenuItem.setupOption("Buy some wine", 'w', "", !_vm->_avalot->_objects[kObjectWine - 1]); _activeMenuItem.setupOption("Buy some beer", 'b', "", isSober); _activeMenuItem.setupOption("Buy some whisky", 'h', "", isSober); _activeMenuItem.setupOption("Buy some cider", 'c', "", isSober); @@ -518,8 +518,8 @@ void Menu::setupMenuWith() { _vm->_avalot->_verbStr = _vm->_avalot->_verbStr + 101 + 100 + 102 + 103 + 104; } break; - case Avalot::kPeopleTrader: - _activeMenuItem.setupOption("Buy an onion", 'o', "", !_vm->_avalot->_objects[Avalot::kObjectOnion - 1]); + case kPeopleTrader: + _activeMenuItem.setupOption("Buy an onion", 'o', "", !_vm->_avalot->_objects[kObjectOnion - 1]); _vm->_avalot->_verbStr = _vm->_avalot->_verbStr + 105; break; } diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index c54b482052..94d3d2477d 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -893,7 +893,7 @@ void Parser::parse() { _vm->_avalot->_it = _thing; if (_person != kPardon) { - if (_person < Avalot::kPeopleArkata) + if (_person < kPeopleArkata) _vm->_avalot->_him = _person; else _vm->_avalot->_her = _person; @@ -904,7 +904,7 @@ void Parser::examineObject() { if (_thing != _vm->_avalot->_thinks) _vm->_avalot->thinkAbout(_thing, Avalot::kThing); switch (_thing) { - case Avalot::kObjectWine : + case kObjectWine : switch (_vm->_avalot->_wineState) {// 4 is perfect wine. 0 is not holding the wine. case 1: _vm->_dialogs->displayScrollChain('t', 1); // Normal examine wine scroll @@ -917,7 +917,7 @@ void Parser::examineObject() { break; } break; - case Avalot::kObjectOnion: + case kObjectOnion: if (_vm->_avalot->_rottenOnion) _vm->_dialogs->displayScrollChain('q', 21); // Yucky onion else @@ -933,7 +933,7 @@ bool Parser::isPersonHere() { // Person equivalent of "holding". return true; else { Common::String tmpStr; - if (_person < Avalot::kPeopleArkata) + if (_person < kPeopleArkata) tmpStr = "He isn't around at the moment."; else tmpStr = "She isn't around at the moment."; @@ -949,14 +949,14 @@ void Parser::exampers() { byte newPerson = _person - 149; - if ((_person == Avalot::kPeopleDogfood) && _vm->_avalot->_wonNim) + if ((_person == kPeopleDogfood) && _vm->_avalot->_wonNim) _vm->_dialogs->displayScrollChain('Q', 8); // "I'm Not Playing!" - else if ((_person == Avalot::kPeopleDuLustie) && _vm->_avalot->_lustieIsAsleep) + else if ((_person == kPeopleDuLustie) && _vm->_avalot->_lustieIsAsleep) _vm->_dialogs->displayScrollChain('Q', 65); // He's asleep. else _vm->_dialogs->displayScrollChain('p', newPerson); - if ((_person == Avalot::kPeopleAyles) && !_vm->_avalot->_aylesIsAwake) + if ((_person == kPeopleAyles) && !_vm->_avalot->_aylesIsAwake) _vm->_dialogs->displayScrollChain('Q', 13); _person = newPerson; @@ -1051,7 +1051,7 @@ void Parser::inventory() { void Parser::swallow() { // Eat something. switch (_thing) { - case Avalot::kObjectWine: + case kObjectWine: switch (_vm->_avalot->_wineState) { // 4 is perfect case 1: if (_vm->_avalot->_teetotal) { @@ -1061,7 +1061,7 @@ void Parser::swallow() { // Eat something. _vm->_dialogs->displayScrollChain('U', 1); _vm->_pingo->wobble(); _vm->_dialogs->displayScrollChain('U', 2); - _vm->_avalot->_objects[Avalot::kObjectWine - 1] = false; + _vm->_avalot->_objects[kObjectWine - 1] = false; _vm->_avalot->refreshObjectList(); drink(); break; @@ -1071,28 +1071,28 @@ void Parser::swallow() { // Eat something. break; // You can't drink it! } break; - case Avalot::kObjectPotion: + case kObjectPotion: _vm->_avalot->setBackgroundColor(4); _vm->_dialogs->displayScrollChain('U', 3); _vm->_avalot->gameOver(); _vm->_avalot->setBackgroundColor(0); break; - case Avalot::kObjectInk: + case kObjectInk: _vm->_dialogs->displayScrollChain('U', 4); break; - case Avalot::kObjectChastity: + case kObjectChastity: _vm->_dialogs->displayScrollChain('U', 5); break; - case Avalot::kObjectMushroom: + case kObjectMushroom: _vm->_dialogs->displayScrollChain('U', 6); _vm->_avalot->gameOver(); break; - case Avalot::kObjectOnion: + case kObjectOnion: if (_vm->_avalot->_rottenOnion) _vm->_dialogs->displayScrollChain('U', 11); else { _vm->_dialogs->displayScrollChain('U', 8); - _vm->_avalot->_objects[Avalot::kObjectOnion - 1] = false; + _vm->_avalot->_objects[kObjectOnion - 1] = false; _vm->_avalot->refreshObjectList(); } break; @@ -1252,8 +1252,8 @@ void Parser::putProc() { // Thing is the _thing which you're putting in. _thing2 is where you're putting it. switch (_thing2) { - case Avalot::kObjectWine: - if (_thing == Avalot::kObjectOnion) { + case kObjectWine: + if (_thing == kObjectOnion) { if (_vm->_avalot->_rottenOnion) _vm->_dialogs->displayText("That's a bit like shutting the stable door after the horse has bolted!"); else { // Put onion into wine? @@ -1276,16 +1276,16 @@ void Parser::putProc() { _vm->_dialogs->displayText("There's something in the box already, Avvy. Try taking that out first."); else { switch (_thing) { - case Avalot::kObjectMoney: + case kObjectMoney: _vm->_dialogs->displayText("You'd better keep some ready cash on you!"); break; - case Avalot::kObjectBell: + case kObjectBell: _vm->_dialogs->displayText("That's a silly place to keep a bell."); break; - case Avalot::kObjectBodkin: + case kObjectBodkin: _vm->_dialogs->displayText("But you might need it!"); break; - case Avalot::kObjectOnion: + case kObjectOnion: _vm->_dialogs->displayText("Just give it to Spludwick, Avvy!"); break; default: // Put the object into the box... @@ -1345,8 +1345,8 @@ bool Parser::giveToSpludwick() { } switch (_thing) { - case Avalot::kObjectOnion: - _vm->_avalot->_objects[Avalot::kObjectOnion - 1] = false; + case kObjectOnion: + _vm->_avalot->_objects[kObjectOnion - 1] = false; if (_vm->_avalot->_rottenOnion) _vm->_dialogs->displayScrollChain('q', 22); else { @@ -1357,21 +1357,21 @@ bool Parser::giveToSpludwick() { } _vm->_avalot->refreshObjectList(); break; - case Avalot::kObjectInk: - _vm->_avalot->_objects[Avalot::kObjectInk - 1] = false; + case kObjectInk: + _vm->_avalot->_objects[kObjectInk - 1] = false; _vm->_avalot->refreshObjectList(); _vm->_avalot->_givenToSpludwick++; _vm->_dialogs->displayScrollChain('q', 24); goToCauldron(); _vm->_avalot->incScore(3); break; - case Avalot::kObjectMushroom: - _vm->_avalot->_objects[Avalot::kObjectMushroom - 1] = false; + case kObjectMushroom: + _vm->_avalot->_objects[kObjectMushroom - 1] = false; _vm->_dialogs->displayScrollChain('q', 25); _vm->_avalot->incScore(5); _vm->_avalot->_givenToSpludwick++; goToCauldron(); - _vm->_avalot->_objects[Avalot::kObjectPotion - 1] = true; + _vm->_avalot->_objects[kObjectPotion - 1] = true; _vm->_avalot->refreshObjectList(); break; default: @@ -1384,7 +1384,7 @@ bool Parser::giveToSpludwick() { void Parser::drink() { _alcoholLevel += 1; if (_alcoholLevel == 5) { - _vm->_avalot->_objects[Avalot::kObjectKey - 1] = true; // Get the key. + _vm->_avalot->_objects[kObjectKey - 1] = true; // Get the key. _vm->_avalot->_teetotal = true; _vm->_avalot->_avvyIsAwake = false; _vm->_avalot->_avvyInBed = true; @@ -1474,7 +1474,7 @@ void Parser::getProc(char thing) { break; case kRoomInsideCardiffCastle: switch (thing) { - case Avalot::kObjectPen: + case kObjectPen: if (_vm->_animation->inField(1)) { // Standing on the dais. if (_vm->_avalot->_takenPen) _vm->_dialogs->displayText("It's not there, Avvy."); @@ -1483,7 +1483,7 @@ void Parser::getProc(char thing) { _vm->_background->drawBackgroundSprite(-1, -1, 3); // No pen there now. _vm->_animation->callSpecial(3); // Zap! _vm->_avalot->_takenPen = true; - _vm->_avalot->_objects[Avalot::kObjectPen - 1] = true; + _vm->_avalot->_objects[kObjectPen - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_dialogs->displayText("Taken."); } @@ -1492,7 +1492,7 @@ void Parser::getProc(char thing) { else _vm->_dialogs->displayScrollChain('q', 51); break; - case Avalot::kObjectBolt: + case kObjectBolt: _vm->_dialogs->displayScrollChain('q', 52); break; default: @@ -1500,12 +1500,12 @@ void Parser::getProc(char thing) { } break; case kRoomRobins: - if ((thing == Avalot::kObjectMushroom) & (_vm->_animation->inField(0)) & (_vm->_avalot->_mushroomGrowing)) { + if ((thing == kObjectMushroom) & (_vm->_animation->inField(0)) & (_vm->_avalot->_mushroomGrowing)) { _vm->_background->drawBackgroundSprite(-1, -1, 2); _vm->_dialogs->displayText("Got it!"); _vm->_avalot->_mushroomGrowing = false; _vm->_avalot->_takenMushroom = true; - _vm->_avalot->_objects[Avalot::kObjectMushroom - 1] = true; + _vm->_avalot->_objects[kObjectMushroom - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_avalot->incScore(3); } else @@ -1526,7 +1526,7 @@ void Parser::giveGeidaTheLute() { _vm->_dialogs->displayText(tmpStr); return; } - _vm->_avalot->_objects[Avalot::kObjectLute - 1] = false; + _vm->_avalot->_objects[kObjectLute - 1] = false; _vm->_avalot->refreshObjectList(); _vm->_dialogs->displayScrollChain('q', 64); // She plays it. @@ -1686,52 +1686,52 @@ void Parser::doThat() { _vm->_dialogs->displayText("Give to whom?"); else if (isPersonHere()) { switch (_thing) { - case Avalot::kObjectMoney : + case kObjectMoney : _vm->_dialogs->displayText("You can't bring yourself to give away your moneybag."); break; - case Avalot::kObjectBodkin: - case Avalot::kObjectBell: - case Avalot::kObjectClothes: - case Avalot::kObjectHabit : + case kObjectBodkin: + case kObjectBell: + case kObjectClothes: + case kObjectHabit : _vm->_dialogs->displayText("Don't give it away, it might be useful!"); break; default: switch (_person) { - case Avalot::kPeopleCrapulus: - if (_thing == Avalot::kObjectWine) { + case kPeopleCrapulus: + if (_thing == kObjectWine) { _vm->_dialogs->displayText("Crapulus grabs the wine and gulps it down."); - _vm->_avalot->_objects[Avalot::kObjectWine - 1] = false; + _vm->_avalot->_objects[kObjectWine - 1] = false; } else heyThanks(); break; - case Avalot::kPeopleCwytalot: - if ((_thing == Avalot::kObjectCrossbow) || (_thing == Avalot::kObjectBolt)) + case kPeopleCwytalot: + if ((_thing == kObjectCrossbow) || (_thing == kObjectBolt)) _vm->_dialogs->displayText("You might be able to influence Cwytalot more if you used it!"); else heyThanks(); break; - case Avalot::kPeopleSpludwick: + case kPeopleSpludwick: if (giveToSpludwick()) heyThanks(); break; - case Avalot::kPeopleIbythneth: - if (_thing == Avalot::kObjectBadge) { + case kPeopleIbythneth: + if (_thing == kObjectBadge) { _vm->_dialogs->displayScrollChain('q', 32); // Thanks! Wow! _vm->_avalot->incScore(3); - _vm->_avalot->_objects[Avalot::kObjectBadge - 1] = false; - _vm->_avalot->_objects[Avalot::kObjectHabit - 1] = true; + _vm->_avalot->_objects[kObjectBadge - 1] = false; + _vm->_avalot->_objects[kObjectHabit - 1] = true; _vm->_avalot->_givenBadgeToIby = true; _vm->_background->drawBackgroundSprite(-1, -1, 7); _vm->_background->drawBackgroundSprite(-1, -1, 8); } else heyThanks(); break; - case Avalot::kPeopleAyles: + case kPeopleAyles: if (_vm->_avalot->_aylesIsAwake) { - if (_thing == Avalot::kObjectPen) { - _vm->_avalot->_objects[Avalot::kObjectPen - 1] = false; + if (_thing == kObjectPen) { + _vm->_avalot->_objects[kObjectPen - 1] = false; _vm->_dialogs->displayScrollChain('q', 54); - _vm->_avalot->_objects[Avalot::kObjectInk - 1] = true; + _vm->_avalot->_objects[kObjectInk - 1] = true; _vm->_avalot->_givenPenToAyles = true; _vm->_avalot->refreshObjectList(); _vm->_avalot->incScore(2); @@ -1740,25 +1740,25 @@ void Parser::doThat() { } else _vm->_dialogs->displayText("But he's asleep!"); break; - case Avalot::kPeopleGeida: + case kPeopleGeida: switch (_thing) { - case Avalot::kObjectPotion: - _vm->_avalot->_objects[Avalot::kObjectPotion - 1] = false; + case kObjectPotion: + _vm->_avalot->_objects[kObjectPotion - 1] = false; _vm->_dialogs->displayScrollChain('u', 16); // She drinks it. _vm->_avalot->incScore(2); _vm->_avalot->_givenPotionToGeida = true; _vm->_avalot->refreshObjectList(); break; - case Avalot::kObjectLute: + case kObjectLute: giveGeidaTheLute(); break; default: heyThanks(); } break; - case Avalot::kPeopleArkata: + case kPeopleArkata: switch (_thing) { - case Avalot::kObjectPotion: + case kObjectPotion: if (_vm->_avalot->_givenPotionToGeida) winSequence(); else @@ -1839,12 +1839,12 @@ void Parser::doThat() { case kVerbCodeWear: if (isHolding()) { // Wear something. switch (_thing) { - case Avalot::kObjectChastity: + case kObjectChastity: // \? are used to avoid that ??! is parsed as a trigraph _vm->_dialogs->displayText("Hey, what kind of a weirdo are you\?\?!"); break; - case Avalot::kObjectClothes: - case Avalot::kObjectHabit: { // Change this! + case kObjectClothes: + case kObjectHabit: { // Change this! if (_wearing != kNothing) { if (_wearing == _thing) _vm->_dialogs->displayText("You're already wearing that."); @@ -1857,7 +1857,7 @@ void Parser::doThat() { _vm->_avalot->refreshObjectList(); byte i; - if (_thing == Avalot::kObjectHabit) + if (_thing == kObjectHabit) i = 3; else i = 0; @@ -1901,7 +1901,7 @@ void Parser::doThat() { // You won - strange! _vm->_dialogs->displayScrollChain('Q', 7); // You won! Give us a lute! - _vm->_avalot->_objects[Avalot::kObjectLute - 1] = true; + _vm->_avalot->_objects[kObjectLute - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_avalot->_wonNim = true; _vm->_background->drawBackgroundSprite(-1, -1, 0); // Show the settle with no lute on it. @@ -1920,13 +1920,13 @@ void Parser::doThat() { } } else if (isHolding()) { switch (_thing) { - case Avalot::kObjectLute : + case kObjectLute : _vm->_dialogs->displayScrollChain('U', 7); - if (_vm->_avalot->_whereIs[Avalot::kPeopleCwytalot - 150] == _vm->_avalot->_room) + if (_vm->_avalot->_whereIs[kPeopleCwytalot - 150] == _vm->_avalot->_room) _vm->_dialogs->displayScrollChain('U', 10); - if (_vm->_avalot->_whereIs[Avalot::kPeopleDuLustie - 150] == _vm->_avalot->_room) + if (_vm->_avalot->_whereIs[kPeopleDuLustie - 150] == _vm->_avalot->_room) _vm->_dialogs->displayScrollChain('U', 15); break; case 52: @@ -1949,7 +1949,7 @@ void Parser::doThat() { break; case kVerbCodeRing: if (isHolding()) { - if (_thing == Avalot::kObjectBell) { + if (_thing == kObjectBell) { _vm->_dialogs->displayText("Ding, dong, ding, dong, ding, dong, ding, dong..."); if ((_vm->_avalot->_bellsAreRinging) & (_vm->_avalot->setFlag('B'))) // \? are used to avoid that ??! is parsed as a trigraph @@ -2076,8 +2076,8 @@ void Parser::doThat() { case 52: examine(); break; // We have a right one here - buy Pepsi??! - case Avalot::kObjectWine: - if (_vm->_avalot->_objects[Avalot::kObjectWine - 1]) // We've already got the wine! + case kObjectWine: + if (_vm->_avalot->_objects[kObjectWine - 1]) // We've already got the wine! _vm->_dialogs->displayScrollChain('D', 2); // 1 bottle's shufishent! else { if (_vm->_avalot->_malagauche == 177) { // Already getting us one. @@ -2108,8 +2108,8 @@ void Parser::doThat() { case kRoomOutsideDucks: if (_vm->_animation->inField(5)) { - if (_thing == Avalot::kObjectOnion) { - if (_vm->_avalot->_objects[Avalot::kObjectOnion - 1]) + if (_thing == kObjectOnion) { + if (_vm->_avalot->_objects[kObjectOnion - 1]) _vm->_dialogs->displayScrollChain('D', 10); // Not planning to juggle with the things! else if (_vm->_avalot->_carryNum >= kCarryLimit) _vm->_dialogs->displayText("Before you ask, you remember that your hands are full."); @@ -2121,7 +2121,7 @@ void Parser::doThat() { _vm->_avalot->incScore(3); } _vm->_avalot->decreaseMoney(3); // It costs thruppence. - _vm->_avalot->_objects[Avalot::kObjectOnion - 1] = true; + _vm->_avalot->_objects[kObjectOnion - 1] = true; _vm->_avalot->refreshObjectList(); _boughtOnion = true; _vm->_avalot->_rottenOnion = false; // It's OK when it leaves the stall! @@ -2142,9 +2142,9 @@ void Parser::doThat() { break; case kVerbCodeAttack: if ((_vm->_avalot->_room == kRoomBrummieRoad) && - ((_person == Avalot::kPeopleCwytalot) || (_thing == Avalot::kObjectCrossbow) || (_thing == Avalot::kObjectBolt)) && - (_vm->_avalot->_whereIs[Avalot::kPeopleCwytalot - 150] == _vm->_avalot->_room)) { - switch (_vm->_avalot->_objects[Avalot::kObjectBolt - 1] + _vm->_avalot->_objects[Avalot::kObjectCrossbow - 1] * 2) { + ((_person == kPeopleCwytalot) || (_thing == kObjectCrossbow) || (_thing == kObjectBolt)) && + (_vm->_avalot->_whereIs[kPeopleCwytalot - 150] == _vm->_avalot->_room)) { + switch (_vm->_avalot->_objects[kObjectBolt - 1] + _vm->_avalot->_objects[kObjectCrossbow - 1] * 2) { // 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both. case 0: _vm->_dialogs->displayScrollChain('Q', 10); @@ -2159,15 +2159,15 @@ void Parser::doThat() { case 3: _vm->_dialogs->displayScrollChain('Q', 11); _vm->_avalot->_cwytalotGone = true; - _vm->_avalot->_objects[Avalot::kObjectBolt - 1] = false; - _vm->_avalot->_objects[Avalot::kObjectCrossbow - 1] = false; + _vm->_avalot->_objects[kObjectBolt - 1] = false; + _vm->_avalot->_objects[kObjectCrossbow - 1] = false; _vm->_avalot->refreshObjectList(); _vm->_avalot->_magics[11]._operation = Avalot::kMagicNothing; _vm->_avalot->incScore(7); _vm->_animation->_sprites[1].walkTo(1); _vm->_animation->_sprites[1]._vanishIfStill = true; _vm->_animation->_sprites[1]._callEachStepFl = false; - _vm->_avalot->_whereIs[Avalot::kPeopleCwytalot - 150] = kRoomDummy; + _vm->_avalot->_whereIs[kPeopleCwytalot - 150] = kRoomDummy; break; default: _vm->_dialogs->displayScrollChain('Q', 10); // Please try not to be so violent! @@ -2225,19 +2225,19 @@ void Parser::doThat() { _vm->_dialogs->displayText("Kiss whom?"); else if (isPersonHere()) { switch (_person) { - case Avalot::kPeopleArkata: + case kPeopleArkata: _vm->_dialogs->displayScrollChain('U', 12); break; - case Avalot::kPeopleGeida: + case kPeopleGeida: _vm->_dialogs->displayScrollChain('U', 13); break; - case Avalot::kPeopleWisewoman: + case kPeopleWisewoman: _vm->_dialogs->displayScrollChain('U', 14); break; default: _vm->_dialogs->displayScrollChain('U', 5); // You WHAT? } - } else if ((Avalot::kPeopleAvalot <= _person) && (_person < Avalot::kPeopleArkata)) + } else if ((kPeopleAvalot <= _person) && (_person < kPeopleArkata)) _vm->_dialogs->displayText("Hey, what kind of a weirdo are you??"); break; @@ -2259,7 +2259,7 @@ void Parser::doThat() { if (isPersonHere()) switch (_person) { case kPardon: - case Avalot::kPeopleAvalot: + case kPeopleAvalot: case 0: if (!_vm->_avalot->_avvyIsAwake) { _vm->_avalot->_avvyIsAwake = true; @@ -2271,11 +2271,11 @@ void Parser::doThat() { } else _vm->_dialogs->displayText("You're already awake, Avvy!"); break; - case Avalot::kPeopleAyles: + case kPeopleAyles: if (!_vm->_avalot->_aylesIsAwake) _vm->_dialogs->displayText("You can't seem to wake him by yourself."); break; - case Avalot::kPeopleJacques: { + case kPeopleJacques: { Common::String tmpStr = Common::String::format("Brother Jacques, Brother Jacques, are you asleep?%c1%c" \ "Hmmm... that doesn't seem to do any good...", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); _vm->_dialogs->displayText(tmpStr); @@ -2362,9 +2362,20 @@ void Parser::verbOpt(byte verb, Common::String &answer, char &ansKey) { } } +void Parser::resetVariables() { + _wearing = 0; + _sworeNum = 0; + _alcoholLevel = 0; + _playedNim = 0; + _boughtOnion = false; +} + void Parser::synchronize(Common::Serializer &sz) { sz.syncAsByte(_wearing); sz.syncAsByte(_sworeNum); + sz.syncAsByte(_alcoholLevel); + sz.syncAsByte(_playedNim); + sz.syncAsByte(_boughtOnion); } } // End of namespace Avalanche diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h index 8f49a48e74..30b5929fb5 100644 --- a/engines/avalanche/parser.h +++ b/engines/avalanche/parser.h @@ -81,10 +81,6 @@ public: bool _cursorState; byte _wearing; // what you're wearing - byte _sworeNum; // number of times you've sworn - byte _alcoholLevel; // Your blood alcohol level. - byte _playedNim; // How many times you've played Nim. - bool _boughtOnion; // Have you bought an onion yet? Parser(AvalancheEngine *vm); @@ -104,6 +100,7 @@ public: void tryDropdown(); // This asks the parsekey proc in Dropdown if it knows it. int16 getPos(const Common::String &crit, const Common::String &src); // Returns the index of the first appearance of crit in src. + void resetVariables(); void synchronize(Common::Serializer &sz); private: @@ -116,6 +113,10 @@ private: Common::String _thats; byte _thing2; + byte _sworeNum; // number of times you've sworn + byte _alcoholLevel; // Your blood alcohol level. + byte _playedNim; // How many times you've played Nim. + bool _boughtOnion; // Have you bought an onion yet? byte wordNum(Common::String word); void replace(Common::String oldChars, byte newChar); diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 1fc69a278b..ae9481c9c1 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -324,7 +324,7 @@ void Timer::hangAround() { AnimationType *avvy = &_vm->_animation->_sprites[0]; avvy->init(7, true, _vm->_animation); // Robin Hood - _vm->_avalot->_whereIs[Avalot::kPeopleRobinHood - 150] = kRoomRobins; + _vm->_avalot->_whereIs[kPeopleRobinHood - 150] = kRoomRobins; _vm->_animation->appearPed(0, 1); _vm->_dialogs->displayScrollChain('q', 39); avvy->walkTo(6); @@ -336,7 +336,7 @@ void Timer::hangAround2() { AnimationType *spr = &_vm->_animation->_sprites[1]; spr->_vanishIfStill = false; spr->walkTo(3); - _vm->_avalot->_whereIs[Avalot::kPeopleFriarTuck - 150] = kRoomRobins; + _vm->_avalot->_whereIs[kPeopleFriarTuck - 150] = kRoomRobins; _vm->_dialogs->displayScrollChain('q', 41); _vm->_animation->_sprites[0].remove(); spr->remove(); // Get rid of Robin Hood and Friar Tuck. @@ -356,7 +356,7 @@ void Timer::afterTheShootemup() { _vm->_animation->_sprites[0].init(0, true, _vm->_animation); // Avalot. _vm->_animation->appearPed(0, 1); _vm->_avalot->_userMovesAvvy = true; - _vm->_avalot->_objects[Avalot::kObjectCrossbow - 1] = true; + _vm->_avalot->_objects[kObjectCrossbow - 1] = true; _vm->_avalot->refreshObjectList(); // Same as the added line above: TODO: Remove it later!!! @@ -400,7 +400,7 @@ void Timer::jacquesWakesUp() { case 3 : // Gone through the door. _vm->_background->drawBackgroundSprite(-1, -1, 1); // Not on the floor, either. _vm->_background->drawBackgroundSprite(-1, -1, 3); // He's gone... so the door's open. - _vm->_avalot->_whereIs[Avalot::kPeopleJacques - 150] = 0; // Gone! + _vm->_avalot->_whereIs[kPeopleJacques - 150] = 0; // Gone! break; } @@ -489,7 +489,7 @@ void Timer::jump() { else { _vm->_background->drawBackgroundSprite(-1, -1, 1); _vm->_avalot->_arrowInTheDoor = false; // You've got it. - _vm->_avalot->_objects[Avalot::kObjectBolt - 1] = true; + _vm->_avalot->_objects[kObjectBolt - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_dialogs->displayScrollChain('q', 50); _vm->_avalot->incScore(3); @@ -522,7 +522,7 @@ void Timer::buyWine() { _vm->_dialogs->displayScrollChain('D', 1); // It'll be thruppence. if (_vm->_avalot->decreaseMoney(3)) { _vm->_dialogs->displayScrollChain('D', 4); // You paid up. - _vm->_avalot->_objects[Avalot::kObjectWine - 1] = true; + _vm->_avalot->_objects[kObjectWine - 1] = true; _vm->_avalot->refreshObjectList(); _vm->_avalot->_wineState = 1; // OK Wine. } |