diff options
author | Strangerke | 2013-09-21 18:06:37 +0200 |
---|---|---|
committer | Strangerke | 2013-09-21 18:06:37 +0200 |
commit | 350d622324581fe0ceb2eee38d4a7750690a0cf0 (patch) | |
tree | f8632ed52ce1cdcd74390081b721699af152677c /engines/avalanche | |
parent | 628c5bb5155e8f1de23763c1e300aaa351aca871 (diff) | |
download | scummvm-rg350-350d622324581fe0ceb2eee38d4a7750690a0cf0.tar.gz scummvm-rg350-350d622324581fe0ceb2eee38d4a7750690a0cf0.tar.bz2 scummvm-rg350-350d622324581fe0ceb2eee38d4a7750690a0cf0.zip |
AVALANCHE: rename scrolls to dialogs
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/acci.cpp | 472 | ||||
-rw-r--r-- | engines/avalanche/animation.cpp | 44 | ||||
-rw-r--r-- | engines/avalanche/avalanche.cpp | 14 | ||||
-rw-r--r-- | engines/avalanche/avalanche.h | 4 | ||||
-rw-r--r-- | engines/avalanche/avalot.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/dialogs.cpp (renamed from engines/avalanche/scrolls.cpp) | 114 | ||||
-rw-r--r-- | engines/avalanche/dialogs.h (renamed from engines/avalanche/scrolls.h) | 28 | ||||
-rw-r--r-- | engines/avalanche/gyro.cpp | 6 | ||||
-rw-r--r-- | engines/avalanche/lucerna.cpp | 16 | ||||
-rw-r--r-- | engines/avalanche/module.mk | 2 | ||||
-rw-r--r-- | engines/avalanche/pingo.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/timer.cpp | 94 |
12 files changed, 402 insertions, 402 deletions
diff --git a/engines/avalanche/acci.cpp b/engines/avalanche/acci.cpp index 28f05a9ca8..f98eb916b6 100644 --- a/engines/avalanche/acci.cpp +++ b/engines/avalanche/acci.cpp @@ -31,7 +31,7 @@ #include "avalanche/acci.h" #include "avalanche/gyro.h" #include "avalanche/lucerna.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/timer.h" #include "avalanche/animation.h" #include "avalanche/background.h" @@ -466,18 +466,18 @@ void Acci::displayWhat(byte target, bool animate, bool &ambiguous) { if (target == kPardon) { ambiguous = true; if (animate) - _vm->_scrolls->displayText("Whom?"); + _vm->_dialogs->displayText("Whom?"); else - _vm->_scrolls->displayText("What?"); + _vm->_dialogs->displayText("What?"); } else { if (animate) { Common::String tmpStr = Common::String::format("{ %s }", _vm->_gyro->getName(target).c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } else { Common::String z = _vm->_gyro->getItem(target); if (z != "") { Common::String tmpStr = Common::String::format("{ %s }", z.c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } } } @@ -523,9 +523,9 @@ void Acci::properNouns() { void Acci::sayIt() { Common::String x = _vm->_parser->_inputText; x.setChar(toupper(x[0]), 0); - Common::String tmpStr = Common::String::format("%c1%s.%c%c2", Scrolls::kControlRegister, x.c_str(), - Scrolls::kControlSpeechBubble, Scrolls::kControlRegister); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%c1%s.%c%c2", Dialogs::kControlRegister, x.c_str(), + Dialogs::kControlSpeechBubble, Dialogs::kControlRegister); + _vm->_dialogs->displayText(tmpStr); } void Acci::storeInterrogation(byte interrogation) { @@ -565,7 +565,7 @@ void Acci::storeInterrogation(byte interrogation) { if (!_vm->_gyro->_spareEvening.empty()) _vm->_gyro->_spareEvening.clear(); _vm->_gyro->_spareEvening = _vm->_parser->_inputText; - _vm->_scrolls->displayScrollChain('z', 5); // His closing statement... + _vm->_dialogs->displayScrollChain('z', 5); // His closing statement... _vm->_animation->_sprites[1].walkTo(3); // The end of the drawbridge _vm->_animation->_sprites[1]._vanishIfStill = true; // Then go away! _vm->_gyro->_magics[1]._operation = Gyro::kMagicNothing; @@ -761,7 +761,7 @@ void Acci::parse() { if ((!unkString.empty()) && (_verb != kVerbCodeExam) && (_verb != kVerbCodeTalk) && (_verb != kVerbCodeSave) && (_verb != kVerbCodeLoad) && (_verb != kVerbCodeDir)) { Common::String tmpStr = Common::String::format("Sorry, but I have no idea what \"%s\" means. Can you rephrase it?", unkString.c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); _vm->_gyro->_weirdWord = true; } else _vm->_gyro->_weirdWord = false; @@ -787,24 +787,24 @@ void Acci::examineObject() { case Gyro::kObjectWine : switch (_vm->_gyro->_wineState) {// 4 is perfect wine. 0 is not holding the wine. case 1: - _vm->_scrolls->displayScrollChain('t', 1); // Normal examine wine scroll + _vm->_dialogs->displayScrollChain('t', 1); // Normal examine wine scroll break; case 2: - _vm->_scrolls->displayScrollChain('d', 6); // Bad wine + _vm->_dialogs->displayScrollChain('d', 6); // Bad wine break; case 3: - _vm->_scrolls->displayScrollChain('d', 7); // Vinegar + _vm->_dialogs->displayScrollChain('d', 7); // Vinegar break; } break; case Gyro::kObjectOnion: if (_vm->_gyro->_rottenOnion) - _vm->_scrolls->displayScrollChain('q', 21); // Yucky onion + _vm->_dialogs->displayScrollChain('q', 21); // Yucky onion else - _vm->_scrolls->displayScrollChain('t', 18); // Normal onion + _vm->_dialogs->displayScrollChain('t', 18); // Normal onion break; default: - _vm->_scrolls->displayScrollChain('t', _thing); // Ordinarily + _vm->_dialogs->displayScrollChain('t', _thing); // Ordinarily } } @@ -817,7 +817,7 @@ bool Acci::isPersonHere() { // Person equivalent of "holding". tmpStr = "He isn't around at the moment."; else tmpStr = "She isn't around at the moment."; - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); return false; } } @@ -830,14 +830,14 @@ void Acci::exampers() { byte newPerson = _person - 149; if ((_person == Gyro::kPeopleDogfood) && _vm->_gyro->_wonNim) - _vm->_scrolls->displayScrollChain('Q', 8); // "I'm Not Playing!" + _vm->_dialogs->displayScrollChain('Q', 8); // "I'm Not Playing!" else if ((_person == Gyro::kPeopleDuLustie) && _vm->_gyro->_lustieIsAsleep) - _vm->_scrolls->displayScrollChain('Q', 65); // He's asleep. + _vm->_dialogs->displayScrollChain('Q', 65); // He's asleep. else - _vm->_scrolls->displayScrollChain('p', newPerson); + _vm->_dialogs->displayScrollChain('p', newPerson); if ((_person == Gyro::kPeopleAyles) && !_vm->_gyro->_aylesIsAwake) - _vm->_scrolls->displayScrollChain('Q', 13); + _vm->_dialogs->displayScrollChain('Q', 13); _person = newPerson; } @@ -854,9 +854,9 @@ bool Acci::isHolding() { bool holdingResult = false; if (_thing > 100) - _vm->_scrolls->displayText("Be reasonable!"); + _vm->_dialogs->displayText("Be reasonable!"); else if (!_vm->_gyro->_objects[_thing - 1]) // Verbs that need "_thing" to be in the inventory. - _vm->_scrolls->displayText("You're not holding it, Avvy."); + _vm->_dialogs->displayText("You're not holding it, Avvy."); else holdingResult = true; @@ -891,14 +891,14 @@ void Acci::examine() { examineObject(); else if ((50 <= _thing) && (_thing <= 100)) { // Also _thing openBox(true); - _vm->_scrolls->displayText(*_vm->_gyro->_also[_thing - 50][1]); + _vm->_dialogs->displayText(*_vm->_gyro->_also[_thing - 50][1]); openBox(false); } } } else if (_person != kPardon) exampers(); else - _vm->_scrolls->displayText("It's just as it looks on the picture."); // Don't know: guess. + _vm->_dialogs->displayText("It's just as it looks on the picture."); // Don't know: guess. } void Acci::inventory() { @@ -922,11 +922,11 @@ void Acci::inventory() { } if (_vm->_gyro->_wearing == kNothing) - tmpStr += Common::String::format("...%c%c...and you're stark naked!", Scrolls::kControlNewLine, Scrolls::kControlNewLine); + tmpStr += Common::String::format("...%c%c...and you're stark naked!", Dialogs::kControlNewLine, Dialogs::kControlNewLine); else tmpStr += '.'; - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } void Acci::swallow() { // Eat something. @@ -935,52 +935,52 @@ void Acci::swallow() { // Eat something. switch (_vm->_gyro->_wineState) { // 4 is perfect case 1: if (_vm->_gyro->_teetotal) { - _vm->_scrolls->displayScrollChain('D', 6); + _vm->_dialogs->displayScrollChain('D', 6); return; } - _vm->_scrolls->displayScrollChain('U', 1); + _vm->_dialogs->displayScrollChain('U', 1); _vm->_pingo->wobble(); - _vm->_scrolls->displayScrollChain('U', 2); + _vm->_dialogs->displayScrollChain('U', 2); _vm->_gyro->_objects[Gyro::kObjectWine - 1] = false; _vm->_lucerna->refreshObjectList(); drink(); break; case 2: case 3: - _vm->_scrolls->displayScrollChain('d', 8); + _vm->_dialogs->displayScrollChain('d', 8); break; // You can't drink it! } break; case Gyro::kObjectPotion: _vm->_gyro->setBackgroundColor(4); - _vm->_scrolls->displayScrollChain('U', 3); + _vm->_dialogs->displayScrollChain('U', 3); _vm->_lucerna->gameOver(); _vm->_gyro->setBackgroundColor(0); break; case Gyro::kObjectInk: - _vm->_scrolls->displayScrollChain('U', 4); + _vm->_dialogs->displayScrollChain('U', 4); break; case Gyro::kObjectChastity: - _vm->_scrolls->displayScrollChain('U', 5); + _vm->_dialogs->displayScrollChain('U', 5); break; case Gyro::kObjectMushroom: - _vm->_scrolls->displayScrollChain('U', 6); + _vm->_dialogs->displayScrollChain('U', 6); _vm->_lucerna->gameOver(); break; case Gyro::kObjectOnion: if (_vm->_gyro->_rottenOnion) - _vm->_scrolls->displayScrollChain('U', 11); + _vm->_dialogs->displayScrollChain('U', 11); else { - _vm->_scrolls->displayScrollChain('U', 8); + _vm->_dialogs->displayScrollChain('U', 8); _vm->_gyro->_objects[Gyro::kObjectOnion - 1] = false; _vm->_lucerna->refreshObjectList(); } break; default: if ((_vm->_gyro->_room == kRoomArgentPub) || (_vm->_gyro->_room == kRoomNottsPub)) - _vm->_scrolls->displayText("Try BUYing things before you drink them!"); + _vm->_dialogs->displayText("Try BUYing things before you drink them!"); else - _vm->_scrolls->displayText("The taste of it makes you retch!"); + _vm->_dialogs->displayText("The taste of it makes you retch!"); } } @@ -1014,42 +1014,42 @@ void Acci::peopleInRoom() { else tmpStr += " are"; - _vm->_scrolls->displayText(tmpStr + " here."); // End and display it. + _vm->_dialogs->displayText(tmpStr + " here."); // End and display it. } void Acci::lookAround() { - _vm->_scrolls->displayText(*_vm->_gyro->_also[0][1]); + _vm->_dialogs->displayText(*_vm->_gyro->_also[0][1]); switch (_vm->_gyro->_room) { case kRoomSpludwicks: if (_vm->_gyro->_avariciusTalk > 0) - _vm->_scrolls->displayScrollChain('q', 23); + _vm->_dialogs->displayScrollChain('q', 23); else peopleInRoom(); break; case kRoomRobins: if (_vm->_gyro->_tiedUp) - _vm->_scrolls->displayScrollChain('q', 38); + _vm->_dialogs->displayScrollChain('q', 38); if (_vm->_gyro->_mushroomGrowing) - _vm->_scrolls->displayScrollChain('q', 55); + _vm->_dialogs->displayScrollChain('q', 55); break; case kRoomInsideCardiffCastle: if (!_vm->_gyro->_takenPen) - _vm->_scrolls->displayScrollChain('q', 49); + _vm->_dialogs->displayScrollChain('q', 49); break; case kRoomLustiesRoom: if (_vm->_gyro->_lustieIsAsleep) - _vm->_scrolls->displayScrollChain('q', 65); + _vm->_dialogs->displayScrollChain('q', 65); break; case kRoomCatacombs: switch (_vm->_gyro->_catacombY * 256 + _vm->_gyro->_catacombX) { case 258 : - _vm->_scrolls->displayScrollChain('q', 80); // Inside art gallery. + _vm->_dialogs->displayScrollChain('q', 80); // Inside art gallery. break; case 514 : - _vm->_scrolls->displayScrollChain('q', 81); // Outside ditto. + _vm->_dialogs->displayScrollChain('q', 81); // Outside ditto. break; case 260 : - _vm->_scrolls->displayScrollChain('q', 82); // Outside Geida's room. + _vm->_dialogs->displayScrollChain('q', 82); // Outside Geida's room. break; } break; @@ -1072,7 +1072,7 @@ void Acci::openDoor() { break; case kRoomSpludwicks: if (_thing == 61) { - _vm->_scrolls->displayScrollChain('q', 85); + _vm->_dialogs->displayScrollChain('q', 85); return; } break; @@ -1087,14 +1087,14 @@ void Acci::openDoor() { switch (portal->_operation) { case Gyro::kMagicExclaim: _vm->_animation->_sprites[0].bounce(); - _vm->_scrolls->displayScrollChain('x', portal->_data); + _vm->_dialogs->displayScrollChain('x', portal->_data); break; case Gyro::kMagicTransport: _vm->_animation->flipRoom((portal->_data) >> 8, portal->_data & 0x0F); break; case Gyro::kMagicUnfinished: _vm->_animation->_sprites[0].bounce(); - _vm->_scrolls->displayText("Sorry. This place is not available yet!"); + _vm->_dialogs->displayText("Sorry. This place is not available yet!"); break; case Gyro::kMagicSpecial: _vm->_animation->callSpecial(portal->_data); @@ -1109,14 +1109,14 @@ void Acci::openDoor() { } if (_vm->_gyro->_room == kRoomMap) - _vm->_scrolls->displayText("Avvy, you can complete the whole game without ever going " \ + _vm->_dialogs->displayText("Avvy, you can complete the whole game without ever going " \ "to anywhere other than Argent, Birmingham, Cardiff, Nottingham and Norwich."); else - _vm->_scrolls->displayText("Door? What door?"); + _vm->_dialogs->displayText("Door? What door?"); } void Acci::silly() { - _vm->_scrolls->displayText("Don't be silly!"); + _vm->_dialogs->displayText("Don't be silly!"); } void Acci::putProc() { @@ -1135,15 +1135,15 @@ void Acci::putProc() { case Gyro::kObjectWine: if (_thing == Gyro::kObjectOnion) { if (_vm->_gyro->_rottenOnion) - _vm->_scrolls->displayText("That's a bit like shutting the stable door after the horse has bolted!"); + _vm->_dialogs->displayText("That's a bit like shutting the stable door after the horse has bolted!"); else { // Put onion into wine? if (_vm->_gyro->_wineState != 3) { - Common::String tmpStr = Common::String::format("%cOignon au vin%c is a bit too strong for your tastes!", Scrolls::kControlItalic, Scrolls::kControlRoman); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%cOignon au vin%c is a bit too strong for your tastes!", Dialogs::kControlItalic, Dialogs::kControlRoman); + _vm->_dialogs->displayText(tmpStr); } else { // Put onion into vinegar! Yes! _vm->_gyro->_onionInVinegar = true; _vm->_lucerna->incScore(7); - _vm->_scrolls->displayScrollChain('u', 9); + _vm->_dialogs->displayScrollChain('u', 9); } } } else @@ -1153,32 +1153,32 @@ void Acci::putProc() { case 54: if (_vm->_gyro->_room == kRoomYours) { // Put something into the box. if (_vm->_gyro->_boxContent != kNothing) - _vm->_scrolls->displayText("There's something in the box already, Avvy. Try taking that out first."); + _vm->_dialogs->displayText("There's something in the box already, Avvy. Try taking that out first."); else { switch (_thing) { case Gyro::kObjectMoney: - _vm->_scrolls->displayText("You'd better keep some ready cash on you!"); + _vm->_dialogs->displayText("You'd better keep some ready cash on you!"); break; case Gyro::kObjectBell: - _vm->_scrolls->displayText("That's a silly place to keep a bell."); + _vm->_dialogs->displayText("That's a silly place to keep a bell."); break; case Gyro::kObjectBodkin: - _vm->_scrolls->displayText("But you might need it!"); + _vm->_dialogs->displayText("But you might need it!"); break; case Gyro::kObjectOnion: - _vm->_scrolls->displayText("Just give it to Spludwick, Avvy!"); + _vm->_dialogs->displayText("Just give it to Spludwick, Avvy!"); break; default: // Put the object into the box... if (_vm->_gyro->_wearing == _thing) { Common::String tmpStr = Common::String::format("You'd better take %s off first!", _vm->_gyro->getItem(_thing).c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } else { openBox(true); // Open box. _vm->_gyro->_boxContent = _thing; _vm->_gyro->_objects[_thing - 1] = false; _vm->_lucerna->refreshObjectList(); - _vm->_scrolls->displayText("OK, it's in the box."); + _vm->_dialogs->displayText("OK, it's in the box."); openBox(false); // Shut box. } @@ -1200,8 +1200,8 @@ void Acci::putProc() { void Acci::notInOrder() { Common::String itemStr = _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_givenToSpludwick]); Common::String tmpStr = Common::String::format("Sorry, I need the ingredients in the right order for this potion. " \ - "What I need next is %s%c2%c", itemStr.c_str(), Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + "What I need next is %s%c2%c", itemStr.c_str(), Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } /** @@ -1228,10 +1228,10 @@ bool Acci::giveToSpludwick() { case Gyro::kObjectOnion: _vm->_gyro->_objects[Gyro::kObjectOnion - 1] = false; if (_vm->_gyro->_rottenOnion) - _vm->_scrolls->displayScrollChain('q', 22); + _vm->_dialogs->displayScrollChain('q', 22); else { _vm->_gyro->_givenToSpludwick++; - _vm->_scrolls->displayScrollChain('q', 20); + _vm->_dialogs->displayScrollChain('q', 20); goToCauldron(); _vm->_lucerna->incScore(3); } @@ -1241,13 +1241,13 @@ bool Acci::giveToSpludwick() { _vm->_gyro->_objects[Gyro::kObjectInk - 1] = false; _vm->_lucerna->refreshObjectList(); _vm->_gyro->_givenToSpludwick++; - _vm->_scrolls->displayScrollChain('q', 24); + _vm->_dialogs->displayScrollChain('q', 24); goToCauldron(); _vm->_lucerna->incScore(3); break; case Gyro::kObjectMushroom: _vm->_gyro->_objects[Gyro::kObjectMushroom - 1] = false; - _vm->_scrolls->displayScrollChain('q', 25); + _vm->_dialogs->displayScrollChain('q', 25); _vm->_lucerna->incScore(5); _vm->_gyro->_givenToSpludwick++; goToCauldron(); @@ -1279,19 +1279,19 @@ void Acci::drink() { void Acci::cardiffClimbing() { if (_vm->_gyro->_standingOnDais) { // Clamber up. - _vm->_scrolls->displayText("You climb down, back onto the floor."); + _vm->_dialogs->displayText("You climb down, back onto the floor."); _vm->_gyro->_standingOnDais = false; _vm->_animation->appearPed(0, 2); } else if (_vm->_animation->inField(0)) { // Clamber down - _vm->_scrolls->displayText("You clamber up onto the dais."); + _vm->_dialogs->displayText("You clamber up onto the dais."); _vm->_gyro->_standingOnDais = true; _vm->_animation->appearPed(0, 1); } else - _vm->_scrolls->displayText("Get a bit closer, Avvy."); + _vm->_dialogs->displayText("Get a bit closer, Avvy."); } void Acci::already() { - _vm->_scrolls->displayText("You're already standing!"); + _vm->_dialogs->displayText("You're already standing!"); } void Acci::standUp() { @@ -1299,9 +1299,9 @@ void Acci::standUp() { case kRoomYours: // Avvy isn't asleep. if (_vm->_gyro->_avvyIsAwake && _vm->_gyro->_avvyInBed) { // But he's in bed. if (_vm->_gyro->_teetotal) { - _vm->_scrolls->displayScrollChain('d', 12); + _vm->_dialogs->displayScrollChain('d', 12); _vm->_gyro->setBackgroundColor(0); - _vm->_scrolls->displayScrollChain('d', 14); + _vm->_dialogs->displayScrollChain('d', 14); } _vm->_animation->_sprites[0]._visible = true; _vm->_gyro->_userMovesAvvy = true; @@ -1340,24 +1340,24 @@ void Acci::getProc(char thing) { if (_vm->_animation->inField(1)) { if (_vm->_gyro->_boxContent == thing) { _vm->_background->drawBackgroundSprite(-1, -1, 4); - _vm->_scrolls->displayText("OK, I've got it."); + _vm->_dialogs->displayText("OK, I've got it."); _vm->_gyro->_objects[thing - 1] = true; _vm->_lucerna->refreshObjectList(); _vm->_gyro->_boxContent = kNothing; _vm->_background->drawBackgroundSprite(-1, -1, 5); } else { Common::String tmpStr = Common::String::format("I can't see %s in the box.", _vm->_gyro->getItem(thing).c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } } else - _vm->_scrolls->displayScrollChain('q', 57); + _vm->_dialogs->displayScrollChain('q', 57); break; case kRoomInsideCardiffCastle: switch (thing) { case Gyro::kObjectPen: if (_vm->_animation->inField(1)) { // Standing on the dais. if (_vm->_gyro->_takenPen) - _vm->_scrolls->displayText("It's not there, Avvy."); + _vm->_dialogs->displayText("It's not there, Avvy."); else { // OK: we're taking the pen, and it's there. _vm->_background->drawBackgroundSprite(-1, -1, 3); // No pen there now. @@ -1365,34 +1365,34 @@ void Acci::getProc(char thing) { _vm->_gyro->_takenPen = true; _vm->_gyro->_objects[Gyro::kObjectPen - 1] = true; _vm->_lucerna->refreshObjectList(); - _vm->_scrolls->displayText("Taken."); + _vm->_dialogs->displayText("Taken."); } } else if (_vm->_gyro->_standingOnDais) - _vm->_scrolls->displayScrollChain('q', 53); + _vm->_dialogs->displayScrollChain('q', 53); else - _vm->_scrolls->displayScrollChain('q', 51); + _vm->_dialogs->displayScrollChain('q', 51); break; case Gyro::kObjectBolt: - _vm->_scrolls->displayScrollChain('q', 52); + _vm->_dialogs->displayScrollChain('q', 52); break; default: - _vm->_scrolls->displayScrollChain('q', 57); + _vm->_dialogs->displayScrollChain('q', 57); } break; case kRoomRobins: if ((thing == Gyro::kObjectMushroom) & (_vm->_animation->inField(0)) & (_vm->_gyro->_mushroomGrowing)) { _vm->_background->drawBackgroundSprite(-1, -1, 2); - _vm->_scrolls->displayText("Got it!"); + _vm->_dialogs->displayText("Got it!"); _vm->_gyro->_mushroomGrowing = false; _vm->_gyro->_takenMushroom = true; _vm->_gyro->_objects[Gyro::kObjectMushroom - 1] = true; _vm->_lucerna->refreshObjectList(); _vm->_lucerna->incScore(3); } else - _vm->_scrolls->displayScrollChain('q', 57); + _vm->_dialogs->displayScrollChain('q', 57); break; default: - _vm->_scrolls->displayScrollChain('q', 57); + _vm->_dialogs->displayScrollChain('q', 57); } } @@ -1402,13 +1402,13 @@ void Acci::getProc(char thing) { */ void Acci::giveGeidaTheLute() { if (_vm->_gyro->_room != kRoomLustiesRoom) { - Common::String tmpStr = Common::String::format("Not yet. Try later!%c2%c", Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Not yet. Try later!%c2%c", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); return; } _vm->_gyro->_objects[Gyro::kObjectLute - 1] = false; _vm->_lucerna->refreshObjectList(); - _vm->_scrolls->displayScrollChain('q', 64); // She plays it. + _vm->_dialogs->displayScrollChain('q', 64); // She plays it. _vm->_timer->addTimer(1, Timer::kProcGiveLuteToGeida, Timer::kReasonGeidaSings); //_vm->_enid->backToBootstrap(4); TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then! @@ -1416,13 +1416,13 @@ void Acci::giveGeidaTheLute() { void Acci::playHarp() { if (_vm->_animation->inField(6)) - _vm->_scrolls->musicalScroll(); + _vm->_dialogs->displayMusicalScroll(); else - _vm->_scrolls->displayText("Get a bit closer to it, Avvy!"); + _vm->_dialogs->displayText("Get a bit closer to it, Avvy!"); } void Acci::winSequence() { - _vm->_scrolls->displayScrollChain('q', 78); + _vm->_dialogs->displayScrollChain('q', 78); _vm->_sequence->firstShow(7); _vm->_sequence->thenShow(8); _vm->_sequence->thenShow(9); @@ -1439,7 +1439,7 @@ Common::String Acci::personSpeaks() { } if (_vm->_gyro->_whereIs[_person - 150] != _vm->_gyro->_room) { - return Common::String::format("%c1", Scrolls::kControlRegister); // Avvy himself! + return Common::String::format("%c1", Dialogs::kControlRegister); // Avvy himself! } bool found = false; // The _person we're looking for's code is in _person. @@ -1447,7 +1447,7 @@ Common::String Acci::personSpeaks() { for (int i = 0; i < _vm->_animation->kSpriteNumbMax; i++) { if (_vm->_animation->_sprites[i]._quick && ((_vm->_animation->_sprites[i]._stat._acciNum + 149) == _person)) { - tmpStr += Common::String::format("%c%c", Scrolls::kControlRegister, '1' + i); + tmpStr += Common::String::format("%c%c", Dialogs::kControlRegister, '1' + i); found = true; } } @@ -1457,7 +1457,7 @@ Common::String Acci::personSpeaks() { for (int i = 0; i < 16; i++) { if ((_vm->_gyro->kQuasipeds[i]._who == _person) && (_vm->_gyro->kQuasipeds[i]._room == _vm->_gyro->_room)) - tmpStr += Common::String::format("%c%c", Scrolls::kControlRegister, 'A' + i); + tmpStr += Common::String::format("%c%c", Dialogs::kControlRegister, 'A' + i); } return tmpStr; @@ -1465,8 +1465,8 @@ Common::String Acci::personSpeaks() { void Acci::heyThanks() { Common::String tmpStr = personSpeaks(); - tmpStr += Common::String::format("Hey, thanks!%c(But now, you've lost it!)", Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + tmpStr += Common::String::format("Hey, thanks!%c(But now, you've lost it!)", Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); _vm->_gyro->_objects[_thing - 1] = false; } @@ -1494,11 +1494,11 @@ void Acci::doThat() { && (_verb != kVerbCodeLarrypass) && (_verb != kVerbCodePhaon) && (_verb != kVerbCodeBoss) && (_verb != kVerbCodeCheat) && (_verb != kVerbCodeRestart) && (_verb != kVerbCodeDir) && (_verb != kVerbCodeScore) && (_verb != kVerbCodeHiscores) && (_verb != kVerbCodeSmartAlec)) { if (!_vm->_gyro->_alive) { - _vm->_scrolls->displayText("You're dead, so don't talk. What are you, a ghost or something? Try restarting, or restoring a saved game!"); + _vm->_dialogs->displayText("You're dead, so don't talk. What are you, a ghost or something? Try restarting, or restoring a saved game!"); return; } if (!_vm->_gyro->_avvyIsAwake && (_verb != kVerbCodeDie) && (_verb != kVerbCodeExpletive) && (_verb != kVerbCodeWake)) { - _vm->_scrolls->displayText("Talking in your sleep? Try waking up!"); + _vm->_dialogs->displayText("Talking in your sleep? Try waking up!"); return; } } @@ -1511,25 +1511,25 @@ void Acci::doThat() { openDoor(); break; case kVerbCodePause: { // Note that the original game doesn't care about the "O.K." box neither, it accepts clicks from everywhere on the screen to continue. Just like my code. - Common::String tmpStr = Common::String::format("Game paused.%c%c%cPress Enter, Esc, or click the mouse on the \"O.K.\" box to continue.", Scrolls::kControlCenter, Scrolls::kControlNewLine, Scrolls::kControlNewLine); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Game paused.%c%c%cPress Enter, Esc, or click the mouse on the \"O.K.\" box to continue.", Dialogs::kControlCenter, Dialogs::kControlNewLine, Dialogs::kControlNewLine); + _vm->_dialogs->displayText(tmpStr); } break; case kVerbCodeGet: if (_thing != kPardon) { // Legitimate try to pick something up. if (_vm->_gyro->_carryNum >= kCarryLimit) - _vm->_scrolls->displayText("You can't carry any more!"); + _vm->_dialogs->displayText("You can't carry any more!"); else getProc(_thing); } else { // Not... ditto. if (_person != kPardon) - _vm->_scrolls->displayText("You can't sweep folk off their feet!"); + _vm->_dialogs->displayText("You can't sweep folk off their feet!"); else - _vm->_scrolls->displayText("I assure you, you don't need it."); + _vm->_dialogs->displayText("I assure you, you don't need it."); } break; case kVerbCodeDrop: - _vm->_scrolls->displayText("Two years ago you dropped a florin in the street. Three days " \ + _vm->_dialogs->displayText("Two years ago you dropped a florin in the street. Three days " \ "later it was gone! So now you never leave ANYTHING lying around. OK?"); break; case kVerbCodeInv: @@ -1538,8 +1538,8 @@ void Acci::doThat() { case kVerbCodeTalk: if (_person == kPardon) { if (_vm->_gyro->_subjectNum == 99) { // They typed "say password". - Common::String tmpStr = Common::String::format("Yes, but what %cis%c the password?", Scrolls::kControlItalic, Scrolls::kControlRoman); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Yes, but what %cis%c the password?", Dialogs::kControlItalic, Dialogs::kControlRoman); + _vm->_dialogs->displayText(tmpStr); } else if (((1 <= _vm->_gyro->_subjectNum) && (_vm->_gyro->_subjectNum <= 49)) || (_vm->_gyro->_subjectNum == 253) || (_vm->_gyro->_subjectNum == 249)) { _thats.deleteChar(0); @@ -1553,40 +1553,40 @@ void Acci::doThat() { _person = _vm->_gyro->_subjectNum; _vm->_gyro->_subjectNum = 0; if ((_person == 0) || (_person == kPardon)) - _vm->_scrolls->displayText("Talk to whom?"); + _vm->_dialogs->displayText("Talk to whom?"); else if (isPersonHere()) - _vm->_scrolls->talkTo(_person); + _vm->_dialogs->talkTo(_person); } } else if (isPersonHere()) - _vm->_scrolls->talkTo(_person); + _vm->_dialogs->talkTo(_person); break; case kVerbCodeGive: if (isHolding()) { if (_person == kPardon) - _vm->_scrolls->displayText("Give to whom?"); + _vm->_dialogs->displayText("Give to whom?"); else if (isPersonHere()) { switch (_thing) { case Gyro::kObjectMoney : - _vm->_scrolls->displayText("You can't bring yourself to give away your moneybag."); + _vm->_dialogs->displayText("You can't bring yourself to give away your moneybag."); break; case Gyro::kObjectBodkin: case Gyro::kObjectBell: case Gyro::kObjectClothes: case Gyro::kObjectHabit : - _vm->_scrolls->displayText("Don't give it away, it might be useful!"); + _vm->_dialogs->displayText("Don't give it away, it might be useful!"); break; default: switch (_person) { case Gyro::kPeopleCrapulus: if (_thing == Gyro::kObjectWine) { - _vm->_scrolls->displayText("Crapulus grabs the wine and gulps it down."); + _vm->_dialogs->displayText("Crapulus grabs the wine and gulps it down."); _vm->_gyro->_objects[Gyro::kObjectWine - 1] = false; } else heyThanks(); break; case Gyro::kPeopleCwytalot: if ((_thing == Gyro::kObjectCrossbow) || (_thing == Gyro::kObjectBolt)) - _vm->_scrolls->displayText("You might be able to influence Cwytalot more if you used it!"); + _vm->_dialogs->displayText("You might be able to influence Cwytalot more if you used it!"); else heyThanks(); break; @@ -1596,7 +1596,7 @@ void Acci::doThat() { break; case Gyro::kPeopleIbythneth: if (_thing == Gyro::kObjectBadge) { - _vm->_scrolls->displayScrollChain('q', 32); // Thanks! Wow! + _vm->_dialogs->displayScrollChain('q', 32); // Thanks! Wow! _vm->_lucerna->incScore(3); _vm->_gyro->_objects[Gyro::kObjectBadge - 1] = false; _vm->_gyro->_objects[Gyro::kObjectHabit - 1] = true; @@ -1610,7 +1610,7 @@ void Acci::doThat() { if (_vm->_gyro->_aylesIsAwake) { if (_thing == Gyro::kObjectPen) { _vm->_gyro->_objects[Gyro::kObjectPen - 1] = false; - _vm->_scrolls->displayScrollChain('q', 54); + _vm->_dialogs->displayScrollChain('q', 54); _vm->_gyro->_objects[Gyro::kObjectInk - 1] = true; _vm->_gyro->_givenPenToAyles = true; _vm->_lucerna->refreshObjectList(); @@ -1618,13 +1618,13 @@ void Acci::doThat() { } else heyThanks(); } else - _vm->_scrolls->displayText("But he's asleep!"); + _vm->_dialogs->displayText("But he's asleep!"); break; case Gyro::kPeopleGeida: switch (_thing) { case Gyro::kObjectPotion: _vm->_gyro->_objects[Gyro::kObjectPotion - 1] = false; - _vm->_scrolls->displayScrollChain('u', 16); // She drinks it. + _vm->_dialogs->displayScrollChain('u', 16); // She drinks it. _vm->_lucerna->incScore(2); _vm->_gyro->_givenPotionToGeida = true; _vm->_lucerna->refreshObjectList(); @@ -1642,7 +1642,7 @@ void Acci::doThat() { if (_vm->_gyro->_givenPotionToGeida) winSequence(); else - _vm->_scrolls->displayScrollChain('q', 77); // That Geida woman! + _vm->_dialogs->displayScrollChain('q', 77); // That Geida woman! break; default: heyThanks(); @@ -1670,66 +1670,66 @@ void Acci::doThat() { // We don't handle these two because we use ScummVM's save/load system. case kVerbCodePay: - _vm->_scrolls->displayText("No money need change hands."); + _vm->_dialogs->displayText("No money need change hands."); break; case kVerbCodeLook: lookAround(); break; case kVerbCodeBreak: - _vm->_scrolls->displayText("Vandalism is prohibited within this game!"); + _vm->_dialogs->displayText("Vandalism is prohibited within this game!"); break; case kVerbCodeQuit: // quit if (!_polite) - _vm->_scrolls->displayText("How about a `please\", Avvy?"); + _vm->_dialogs->displayText("How about a `please\", Avvy?"); else { - Common::String tmpStr = Common::String::format("%cC%cDo you really want to quit?", Scrolls::kControlRegister, Scrolls::kControlIcon); - if (_vm->_scrolls->displayQuestion(tmpStr)) + Common::String tmpStr = Common::String::format("%cC%cDo you really want to quit?", Dialogs::kControlRegister, Dialogs::kControlIcon); + if (_vm->_dialogs->displayQuestion(tmpStr)) _vm->_gyro->_letMeOut = true; } break; case kVerbCodeGo: - _vm->_scrolls->displayText("Just use the arrow keys to walk there."); + _vm->_dialogs->displayText("Just use the arrow keys to walk there."); break; case kVerbCodeInfo: { - _vm->_scrolls->_aboutScroll = true; + _vm->_dialogs->_aboutBox = true; Common::String toDisplay; for (int i = 0; i < 7; i++) - toDisplay += Scrolls::kControlNewLine; - toDisplay = toDisplay + "LORD AVALOT D'ARGENT" + Scrolls::kControlCenter + Scrolls::kControlNewLine - + "The medi\x91val descendant of" + Scrolls::kControlNewLine - + "Denarius Avaricius Sextus" + Scrolls::kControlNewLine + Scrolls::kControlNewLine - + "version " + _vm->_gyro->kVersionNum + Scrolls::kControlNewLine + Scrolls::kControlNewLine + "Copyright \xEF " - + _vm->_gyro->kCopyright + ", Mark, Mike and Thomas Thurman." + Scrolls::kControlRegister + 'Y' + Scrolls::kControlIcon; - _vm->_scrolls->displayText(toDisplay); - _vm->_scrolls->_aboutScroll = false; + toDisplay += Dialogs::kControlNewLine; + toDisplay = toDisplay + "LORD AVALOT D'ARGENT" + Dialogs::kControlCenter + Dialogs::kControlNewLine + + "The medi\x91val descendant of" + Dialogs::kControlNewLine + + "Denarius Avaricius Sextus" + Dialogs::kControlNewLine + Dialogs::kControlNewLine + + "version " + _vm->_gyro->kVersionNum + Dialogs::kControlNewLine + Dialogs::kControlNewLine + "Copyright \xEF " + + _vm->_gyro->kCopyright + ", Mark, Mike and Thomas Thurman." + Dialogs::kControlRegister + 'Y' + Dialogs::kControlIcon; + _vm->_dialogs->displayText(toDisplay); + _vm->_dialogs->_aboutBox = false; } break; case kVerbCodeUndress: if (_vm->_gyro->_wearing == kNothing) - _vm->_scrolls->displayText("You're already stark naked!"); + _vm->_dialogs->displayText("You're already stark naked!"); else if (_vm->_gyro->_avvysInTheCupboard) { Common::String tmpStr = Common::String::format("You take off %s.", _vm->_gyro->getItem(_vm->_gyro->_wearing).c_str()); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); _vm->_gyro->_wearing = kNothing; _vm->_lucerna->refreshObjectList(); } else - _vm->_scrolls->displayText("Hadn't you better find somewhere more private, Avvy?"); + _vm->_dialogs->displayText("Hadn't you better find somewhere more private, Avvy?"); break; case kVerbCodeWear: if (isHolding()) { // Wear something. switch (_thing) { case Gyro::kObjectChastity: // \? are used to avoid that ??! is parsed as a trigraph - _vm->_scrolls->displayText("Hey, what kind of a weirdo are you\?\?!"); + _vm->_dialogs->displayText("Hey, what kind of a weirdo are you\?\?!"); break; case Gyro::kObjectClothes: case Gyro::kObjectHabit: { // Change this! if (_vm->_gyro->_wearing != kNothing) { if (_vm->_gyro->_wearing == _thing) - _vm->_scrolls->displayText("You're already wearing that."); + _vm->_dialogs->displayText("You're already wearing that."); else - _vm->_scrolls->displayText("You'll be rather warm wearing two sets of clothes!"); + _vm->_dialogs->displayText("You'll be rather warm wearing two sets of clothes!"); return; } else _vm->_gyro->_wearing = _thing; @@ -1753,7 +1753,7 @@ void Acci::doThat() { } break; default: - _vm->_scrolls->displayText(kWhat); + _vm->_dialogs->displayText(kWhat); } } break; @@ -1767,20 +1767,20 @@ void Acci::doThat() { // The player automatically wins the game everytime he wins, until I implement the mini-game. if (_vm->_gyro->_wonNim) { // Already won the game. - _vm->_scrolls->displayScrollChain('Q', 6); + _vm->_dialogs->displayScrollChain('Q', 6); return; } if (!_vm->_gyro->_askedDogfoodAboutNim) { - _vm->_scrolls->displayScrollChain('q', 84); + _vm->_dialogs->displayScrollChain('q', 84); return; } - _vm->_scrolls->displayScrollChain('Q', 3); + _vm->_dialogs->displayScrollChain('Q', 3); _vm->_gyro->_playedNim++; // You won - strange! - _vm->_scrolls->displayScrollChain('Q', 7); // You won! Give us a lute! + _vm->_dialogs->displayScrollChain('Q', 7); // You won! Give us a lute! _vm->_gyro->_objects[Gyro::kObjectLute - 1] = true; _vm->_lucerna->refreshObjectList(); _vm->_gyro->_wonNim = true; @@ -1791,8 +1791,8 @@ void Acci::doThat() { _vm->_lucerna->incScore(3); // 3 points for playing your 1st game. // A warning to the player that there should have been a mini-game. TODO: Remove it later!!! - _vm->_scrolls->displayText(Common::String("P.S.: There should have been the mini-game called \"Nim\", but I haven't implemented it yet: you win and get the lute automatically.") - + Scrolls::kControlNewLine + Scrolls::kControlNewLine + "Peter (uruk)"); + _vm->_dialogs->displayText(Common::String("P.S.: There should have been the mini-game called \"Nim\", but I haven't implemented it yet: you win and get the lute automatically.") + + Dialogs::kControlNewLine + Dialogs::kControlNewLine + "Peter (uruk)"); break; case kRoomMusicRoom: playHarp(); @@ -1801,41 +1801,41 @@ void Acci::doThat() { } else if (isHolding()) { switch (_thing) { case Gyro::kObjectLute : - _vm->_scrolls->displayScrollChain('U', 7); + _vm->_dialogs->displayScrollChain('U', 7); if (_vm->_gyro->_whereIs[Gyro::kPeopleCwytalot - 150] == _vm->_gyro->_room) - _vm->_scrolls->displayScrollChain('U', 10); + _vm->_dialogs->displayScrollChain('U', 10); if (_vm->_gyro->_whereIs[Gyro::kPeopleDuLustie - 150] == _vm->_gyro->_room) - _vm->_scrolls->displayScrollChain('U', 15); + _vm->_dialogs->displayScrollChain('U', 15); break; case 52: if (_vm->_gyro->_room == kRoomMusicRoom) playHarp(); else - _vm->_scrolls->displayText(kWhat); + _vm->_dialogs->displayText(kWhat); break; case 55: if (_vm->_gyro->_room == kRoomArgentPub) // play_nim(); warning("STUB: Acci::doThat() - case kVerbCodeplay - play_nim()"); else - _vm->_scrolls->displayText(kWhat); + _vm->_dialogs->displayText(kWhat); break; default: - _vm->_scrolls->displayText(kWhat); + _vm->_dialogs->displayText(kWhat); } } break; case kVerbCodeRing: if (isHolding()) { if (_thing == Gyro::kObjectBell) { - _vm->_scrolls->displayText("Ding, dong, ding, dong, ding, dong, ding, dong..."); + _vm->_dialogs->displayText("Ding, dong, ding, dong, ding, dong, ding, dong..."); if ((_vm->_gyro->_bellsAreRinging) & (_vm->_gyro->setFlag('B'))) // \? are used to avoid that ??! is parsed as a trigraph - _vm->_scrolls->displayText("(Are you trying to join in, Avvy\?\?!)"); + _vm->_dialogs->displayText("(Are you trying to join in, Avvy\?\?!)"); } else - _vm->_scrolls->displayText(kWhat); + _vm->_dialogs->displayText(kWhat); } break; case kVerbCodeHelp: @@ -1843,10 +1843,10 @@ void Acci::doThat() { warning("STUB: Acci::doThat() - case kVerbCodehelp"); break; case kVerbCodeLarrypass: - _vm->_scrolls->displayText("Wrong game!"); + _vm->_dialogs->displayText("Wrong game!"); break; case kVerbCodePhaon: - _vm->_scrolls->displayText("Hello, Phaon!"); + _vm->_dialogs->displayText("Hello, Phaon!"); break; case kVerbCodeBoss: // bosskey(); @@ -1854,27 +1854,27 @@ void Acci::doThat() { break; case kVerbCodePee: if (_vm->_gyro->setFlag('P')) { - _vm->_scrolls->displayText("Hmm, I don't think anyone will notice..."); + _vm->_dialogs->displayText("Hmm, I don't think anyone will notice..."); _vm->_timer->addTimer(4, Timer::kProcUrinate, Timer::kReasonGoToToilet); } else { - Common::String tmpStr = Common::String::format("It would be %cVERY%c unwise to do that here, Avvy!", Scrolls::kControlItalic, Scrolls::kControlRoman); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("It would be %cVERY%c unwise to do that here, Avvy!", Dialogs::kControlItalic, Dialogs::kControlRoman); + _vm->_dialogs->displayText(tmpStr); } break; case kVerbCodeCheat: { - Common::String tmpStr = Common::String::format("%cCheat mode now enabled.", Scrolls::kControlItalic); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%cCheat mode now enabled.", Dialogs::kControlItalic); + _vm->_dialogs->displayText(tmpStr); _vm->_gyro->_cheat = true; } break; case kVerbCodeMagic: if (_vm->_gyro->_avariciusTalk > 0) - _vm->_scrolls->displayScrollChain('q', 19); + _vm->_dialogs->displayScrollChain('q', 19); else { if ((_vm->_gyro->_room == kRoomSpludwicks) & (_vm->_animation->inField(1))) { // Avaricius appears! - _vm->_scrolls->displayScrollChain('q', 17); + _vm->_dialogs->displayScrollChain('q', 17); if (_vm->_gyro->_whereIs[1] == kRoomSpludwicks) - _vm->_scrolls->displayScrollChain('q', 18); + _vm->_dialogs->displayScrollChain('q', 18); else { Avalanche::AnimationType *spr = &_vm->_animation->_sprites[1]; spr->init(1, false, _vm->_animation); // Avaricius @@ -1886,31 +1886,31 @@ void Acci::doThat() { _vm->_timer->addTimer(177, Timer::kProcAvariciusTalks, Timer::kReasonAvariciusTalks); } } else - _vm->_scrolls->displayText("Nothing appears to happen..."); + _vm->_dialogs->displayText("Nothing appears to happen..."); } break; case kVerbCodeSmartAlec: - _vm->_scrolls->displayText("Listen, smart alec, that was just rhetoric."); + _vm->_dialogs->displayText("Listen, smart alec, that was just rhetoric."); break; case kVerbCodeExpletive: switch (_vm->_gyro->_sworeNum) { case 0: { Common::String tmpStr = Common::String::format("Avvy! Do you mind? There might be kids playing!%c%c" \ - "(I shouldn't say it again, if I were you!)", Scrolls::kControlNewLine, Scrolls::kControlNewLine); - _vm->_scrolls->displayText(tmpStr); + "(I shouldn't say it again, if I were you!)", Dialogs::kControlNewLine, Dialogs::kControlNewLine); + _vm->_dialogs->displayText(tmpStr); } break; case 1: { Common::String tmpStr = Common::String::format("You hear a distant rumble of thunder. Must you always" \ - "do things I tell you not to?%c%cDon't do it again!", Scrolls::kControlNewLine, Scrolls::kControlNewLine); - _vm->_scrolls->displayText(tmpStr); + "do things I tell you not to?%c%cDon't do it again!", Dialogs::kControlNewLine, Dialogs::kControlNewLine); + _vm->_dialogs->displayText(tmpStr); } break; default: { _vm->_pingo->zonk(); // CHECKME: Weird character in string - Common::String tmpStr = Common::String::format("A crack of lightning shoots from the sky, and fries you.%c%c(`Such is the anger of the gods, Avvy!\")", Scrolls::kControlNewLine, Scrolls::kControlNewLine); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("A crack of lightning shoots from the sky, and fries you.%c%c(`Such is the anger of the gods, Avvy!\")", Dialogs::kControlNewLine, Dialogs::kControlNewLine); + _vm->_dialogs->displayText(tmpStr); _vm->_lucerna->gameOver(); } } @@ -1918,11 +1918,11 @@ void Acci::doThat() { break; case kVerbCodeListen: if ((_vm->_gyro->_bellsAreRinging) & (_vm->_gyro->setFlag('B'))) - _vm->_scrolls->displayText("All other noise is drowned out by the ringing of the bells."); + _vm->_dialogs->displayText("All other noise is drowned out by the ringing of the bells."); else if (_vm->_gyro->_listen.empty()) - _vm->_scrolls->displayText("You can't hear anything much at the moment, Avvy."); + _vm->_dialogs->displayText("You can't hear anything much at the moment, Avvy."); else - _vm->_scrolls->displayText(_vm->_gyro->_listen); + _vm->_dialogs->displayText(_vm->_gyro->_listen); break; case kVerbCodeBuy: // What are they trying to buy? switch (_vm->_gyro->_room) { @@ -1934,12 +1934,12 @@ void Acci::doThat() { case 54: case 58: // Beer, whisky, cider or mead. if (_vm->_gyro->_malagauche == 177) { // Already getting us one. - _vm->_scrolls->displayScrollChain('D', 15); + _vm->_dialogs->displayScrollChain('D', 15); return; } if (_vm->_gyro->_teetotal) { - _vm->_scrolls->displayScrollChain('D', 6); + _vm->_dialogs->displayScrollChain('D', 6); return; } @@ -1947,7 +1947,7 @@ void Acci::doThat() { _vm->_lucerna->incScore(3); _vm->_background->drawBackgroundSprite(-1, -1, 11); - _vm->_scrolls->displayText(booze[_thing - 51] + ", please." + Scrolls::kControlRegister + '1' + Scrolls::kControlSpeechBubble); + _vm->_dialogs->displayText(booze[_thing - 51] + ", please." + Dialogs::kControlRegister + '1' + Dialogs::kControlSpeechBubble); _vm->_gyro->_drinking = _thing; _vm->_background->drawBackgroundSprite(-1, -1, 9); @@ -1959,21 +1959,21 @@ void Acci::doThat() { break; // We have a right one here - buy Pepsi??! case Gyro::kObjectWine: if (_vm->_gyro->_objects[Gyro::kObjectWine - 1]) // We've already got the wine! - _vm->_scrolls->displayScrollChain('D', 2); // 1 bottle's shufishent! + _vm->_dialogs->displayScrollChain('D', 2); // 1 bottle's shufishent! else { if (_vm->_gyro->_malagauche == 177) { // Already getting us one. - _vm->_scrolls->displayScrollChain('D', 15); + _vm->_dialogs->displayScrollChain('D', 15); return; } if (_vm->_gyro->_carryNum >= kCarryLimit) { - _vm->_scrolls->displayText("Your hands are full."); + _vm->_dialogs->displayText("Your hands are full."); return; } _vm->_background->drawBackgroundSprite(-1, -1, 11); - Common::String tmpStr = Common::String::format("Wine, please.%c1%c", Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Wine, please.%c1%c", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); if (_vm->_gyro->_alcoholLevel == 0) _vm->_lucerna->incScore(3); _vm->_background->drawBackgroundSprite(-1, -1, 9); @@ -1984,21 +1984,21 @@ void Acci::doThat() { break; } } else - _vm->_scrolls->displayScrollChain('D', 5); // Go to the bar! + _vm->_dialogs->displayScrollChain('D', 5); // Go to the bar! break; case kRoomOutsideDucks: if (_vm->_animation->inField(5)) { if (_thing == Gyro::kObjectOnion) { if (_vm->_gyro->_objects[Gyro::kObjectOnion - 1]) - _vm->_scrolls->displayScrollChain('D', 10); // Not planning to juggle with the things! + _vm->_dialogs->displayScrollChain('D', 10); // Not planning to juggle with the things! else if (_vm->_gyro->_carryNum >= kCarryLimit) - _vm->_scrolls->displayText("Before you ask, you remember that your hands are full."); + _vm->_dialogs->displayText("Before you ask, you remember that your hands are full."); else { if (_vm->_gyro->_boughtOnion) - _vm->_scrolls->displayScrollChain('D', 11); + _vm->_dialogs->displayScrollChain('D', 11); else { - _vm->_scrolls->displayScrollChain('D', 9); + _vm->_dialogs->displayScrollChain('D', 9); _vm->_lucerna->incScore(3); } _vm->_gyro->decreaseMoney(3); // It costs thruppence. @@ -2009,16 +2009,16 @@ void Acci::doThat() { _vm->_gyro->_onionInVinegar = false; } } else - _vm->_scrolls->displayScrollChain('D', 0); + _vm->_dialogs->displayScrollChain('D', 0); } else - _vm->_scrolls->displayScrollChain('D', 0); + _vm->_dialogs->displayScrollChain('D', 0); break; case kRoomNottsPub: - _vm->_scrolls->displayScrollChain('n', 15); // Can't sell to southerners. + _vm->_dialogs->displayScrollChain('n', 15); // Can't sell to southerners. break; default: - _vm->_scrolls->displayScrollChain('D', 0); // Can't buy that. + _vm->_dialogs->displayScrollChain('D', 0); // Can't buy that. } break; case kVerbCodeAttack: @@ -2028,17 +2028,17 @@ void Acci::doThat() { switch (_vm->_gyro->_objects[Gyro::kObjectBolt - 1] + _vm->_gyro->_objects[Gyro::kObjectCrossbow - 1] * 2) { // 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both. case 0: - _vm->_scrolls->displayScrollChain('Q', 10); - _vm->_scrolls->displayText("(At the very least, don't use your bare hands!)"); + _vm->_dialogs->displayScrollChain('Q', 10); + _vm->_dialogs->displayText("(At the very least, don't use your bare hands!)"); break; case 1: - _vm->_scrolls->displayText("Attack _vm->_gyro->him with only a crossbow bolt? Are you planning on playing darts?!"); + _vm->_dialogs->displayText("Attack _vm->_gyro->him with only a crossbow bolt? Are you planning on playing darts?!"); break; case 2: - _vm->_scrolls->displayText("Come on, Avvy! You're not going to get very far with only a crossbow!"); + _vm->_dialogs->displayText("Come on, Avvy! You're not going to get very far with only a crossbow!"); break; case 3: - _vm->_scrolls->displayScrollChain('Q', 11); + _vm->_dialogs->displayScrollChain('Q', 11); _vm->_gyro->_cwytalotGone = true; _vm->_gyro->_objects[Gyro::kObjectBolt - 1] = false; _vm->_gyro->_objects[Gyro::kObjectCrossbow - 1] = false; @@ -2051,14 +2051,14 @@ void Acci::doThat() { _vm->_gyro->_whereIs[Gyro::kPeopleCwytalot - 150] = kRoomDummy; break; default: - _vm->_scrolls->displayScrollChain('Q', 10); // Please try not to be so violent! + _vm->_dialogs->displayScrollChain('Q', 10); // Please try not to be so violent! } } else - _vm->_scrolls->displayScrollChain('Q', 10); + _vm->_dialogs->displayScrollChain('Q', 10); break; case kVerbCodePasswd: if (_vm->_gyro->_room != kRoomBridge) - _vm->_scrolls->displayScrollChain('Q', 12); + _vm->_dialogs->displayScrollChain('Q', 12); else { bool ok = true; for (uint i = 0; i < _thats.size(); i++) { @@ -2073,15 +2073,15 @@ void Acci::doThat() { if (ok) { if (_vm->_gyro->_drawbridgeOpen != 0) - _vm->_scrolls->displayText("Contrary to your expectations, the drawbridge fails to close again."); + _vm->_dialogs->displayText("Contrary to your expectations, the drawbridge fails to close again."); else { _vm->_lucerna->incScore(4); - _vm->_scrolls->displayText("The drawbridge opens!"); + _vm->_dialogs->displayText("The drawbridge opens!"); _vm->_timer->addTimer(7, Timer::kProcOpenDrawbridge, Timer::kReasonDrawbridgeFalls); _vm->_gyro->_drawbridgeOpen = 1; } } else - _vm->_scrolls->displayScrollChain('Q', 12); + _vm->_dialogs->displayScrollChain('Q', 12); } break; case kVerbCodeDir: @@ -2091,8 +2091,8 @@ void Acci::doThat() { _vm->_lucerna->gameOver(); break; case kVerbCodeScore: { - Common::String tmpStr = Common::String::format("Your score is %d,%c%cout of a possible 128.%c%cThis gives you a rank of %s.%c%c%s", _vm->_gyro->_dnascore, Scrolls::kControlCenter, Scrolls::kControlNewLine, Scrolls::kControlNewLine, Scrolls::kControlNewLine, rank().c_str(), Scrolls::kControlNewLine, Scrolls::kControlNewLine, totalTime().c_str()); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Your score is %d,%c%cout of a possible 128.%c%cThis gives you a rank of %s.%c%c%s", _vm->_gyro->_dnascore, Dialogs::kControlCenter, Dialogs::kControlNewLine, Dialogs::kControlNewLine, Dialogs::kControlNewLine, rank().c_str(), Dialogs::kControlNewLine, Dialogs::kControlNewLine, totalTime().c_str()); + _vm->_dialogs->displayText(tmpStr); } break; case kVerbCodePut: @@ -2103,30 +2103,30 @@ void Acci::doThat() { break; case kVerbCodeKiss: if (_person == kPardon) - _vm->_scrolls->displayText("Kiss whom?"); + _vm->_dialogs->displayText("Kiss whom?"); else if (isPersonHere()) { switch (_person) { case Gyro::kPeopleArkata: - _vm->_scrolls->displayScrollChain('U', 12); + _vm->_dialogs->displayScrollChain('U', 12); break; case Gyro::kPeopleGeida: - _vm->_scrolls->displayScrollChain('U', 13); + _vm->_dialogs->displayScrollChain('U', 13); break; case Gyro::kPeopleWisewoman: - _vm->_scrolls->displayScrollChain('U', 14); + _vm->_dialogs->displayScrollChain('U', 14); break; default: - _vm->_scrolls->displayScrollChain('U', 5); // You WHAT? + _vm->_dialogs->displayScrollChain('U', 5); // You WHAT? } } else if ((Gyro::kPeopleAvalot <= _person) && (_person < Gyro::kPeopleArkata)) - _vm->_scrolls->displayText("Hey, what kind of a weirdo are you??"); + _vm->_dialogs->displayText("Hey, what kind of a weirdo are you??"); break; case kVerbCodeClimb: if (_vm->_gyro->_room == kRoomInsideCardiffCastle) cardiffClimbing(); else // In the wrong room! - _vm->_scrolls->displayText("Not with your head for heights, Avvy!"); + _vm->_dialogs->displayText("Not with your head for heights, Avvy!"); break; case kVerbCodeJump: _vm->_timer->addTimer(1, Timer::kProcJump, Timer::kReasonJumping); @@ -2148,28 +2148,28 @@ void Acci::doThat() { _vm->_gyro->_avvyInBed = true; _vm->_background->drawBackgroundSprite(-1, -1, 2); // Picture of Avvy, awake in bed. if (_vm->_gyro->_teetotal) - _vm->_scrolls->displayScrollChain('d', 13); + _vm->_dialogs->displayScrollChain('d', 13); } else - _vm->_scrolls->displayText("You're already awake, Avvy!"); + _vm->_dialogs->displayText("You're already awake, Avvy!"); break; case Gyro::kPeopleAyles: if (!_vm->_gyro->_aylesIsAwake) - _vm->_scrolls->displayText("You can't seem to wake him by yourself."); + _vm->_dialogs->displayText("You can't seem to wake him by yourself."); break; case Gyro::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...", Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + "Hmmm... that doesn't seem to do any good...", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } break; default: - _vm->_scrolls->displayText("It's difficult to awaken people who aren't asleep...!"); + _vm->_dialogs->displayText("It's difficult to awaken people who aren't asleep...!"); } break; case kVerbCodeSit: if (_vm->_gyro->_room == kRoomNottsPub) { if (_vm->_gyro->_sittingInPub) - _vm->_scrolls->displayText("You're already sitting!"); + _vm->_dialogs->displayText("You're already sitting!"); else { _vm->_animation->_sprites[0].walkTo(3); // Move Avvy to the place, and sit him down. _vm->_timer->addTimer(1, Timer::kProcAvvySitDown, Timer::kReasonSittingDown); @@ -2178,35 +2178,35 @@ void Acci::doThat() { _vm->_lucerna->dusk(); _vm->_gyro->hangAroundForAWhile(); _vm->_lucerna->dawn(); - Common::String tmpStr = Common::String::format("A few hours later...%cnothing much has happened...", Scrolls::kControlParagraph); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("A few hours later...%cnothing much has happened...", Dialogs::kControlParagraph); + _vm->_dialogs->displayText(tmpStr); } break; case kVerbCodeRestart: - if (_vm->_scrolls->displayQuestion("Restart game and lose changes?")) { + if (_vm->_dialogs->displayQuestion("Restart game and lose changes?")) { _vm->_lucerna->dusk(); _vm->_gyro->newGame(); _vm->_lucerna->dawn(); } break; case kPardon: - _vm->_scrolls->displayText("Hey, a verb would be helpful!"); + _vm->_dialogs->displayText("Hey, a verb would be helpful!"); break; case kVerbCodeHello: { Common::String tmpStr = personSpeaks(); - tmpStr += Common::String::format("Hello.%c", Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + tmpStr += Common::String::format("Hello.%c", Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } break; case kVerbCodeThanks: { Common::String tmpStr = personSpeaks(); - tmpStr += Common::String::format("That's OK.%c", Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + tmpStr += Common::String::format("That's OK.%c", Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } break; default: - Common::String tmpStr = Common::String::format("%cParser bug!", Scrolls::kControlBell); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%cParser bug!", Dialogs::kControlBell); + _vm->_dialogs->displayText(tmpStr); } } diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index fafd088b58..8fb28eda15 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -29,7 +29,7 @@ #include "avalanche/avalanche.h" #include "avalanche/animation.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/lucerna.h" #include "avalanche/gyro.h" #include "avalanche/background.h" @@ -216,8 +216,8 @@ void AnimationType::walk() { break; case Gyro::kMagicUnfinished: { bounce(); - Common::String tmpStr = Common::String::format("%c%cSorry.%cThis place is not available yet!", Scrolls::kControlBell, Scrolls::kControlCenter, Scrolls::kControlRoman); - _anim->_vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%c%cSorry.%cThis place is not available yet!", Dialogs::kControlBell, Dialogs::kControlCenter, Dialogs::kControlRoman); + _anim->_vm->_dialogs->displayText(tmpStr); } break; case Gyro::kMagicSpecial: @@ -421,12 +421,12 @@ void Animation::catacombMove(byte ped) { switch (xy_uint16) { case 1801: // Exit catacombs flipRoom(kRoomLustiesRoom, 4); - _vm->_scrolls->displayText("Phew! Nice to be out of there!"); + _vm->_dialogs->displayText("Phew! Nice to be out of there!"); return; case 1033:{ // Oubliette flipRoom(kRoomOubliette, 1); - Common::String tmpStr = Common::String::format("Oh, NO!%c1%c", Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Oh, NO!%c1%c", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } return; case 4: @@ -434,7 +434,7 @@ void Animation::catacombMove(byte ped) { return; case 2307: flipRoom(kRoomLusties, 5); - _vm->_scrolls->displayText("Oh no... here we go again..."); + _vm->_dialogs->displayText("Oh no... here we go again..."); _vm->_gyro->_userMovesAvvy = false; _sprites[0]._moveY = 1; _sprites[0]._moveX = 0; @@ -733,7 +733,7 @@ void Animation::callSpecial(uint16 which) { _vm->_gyro->_magics[11]._data = 5; _vm->_gyro->_magics[3]._operation = Gyro::kMagicBounce; // Now works as planned! stopWalking(); - _vm->_scrolls->displayScrollChain('q', 26); + _vm->_dialogs->displayScrollChain('q', 26); _vm->_gyro->_userMovesAvvy = true; break; case 3: // _vm->_gyro->special 3: Room 71: triggers dart. @@ -763,11 +763,11 @@ void Animation::callSpecial(uint16 which) { if (_vm->_gyro->_friarWillTieYouUp) { // _vm->_gyro->special 5: Room 42: touched tree, and get tied up. _vm->_gyro->_magics[4]._operation = Gyro::kMagicBounce; // Boundary effect is now working again. - _vm->_scrolls->displayScrollChain('q', 35); + _vm->_dialogs->displayScrollChain('q', 35); _sprites[0].remove(); //tr[1].vanishifstill:=true; _vm->_background->drawBackgroundSprite(-1, -1, 1); - _vm->_scrolls->displayScrollChain('q', 36); + _vm->_dialogs->displayScrollChain('q', 36); _vm->_gyro->_tiedUp = true; _vm->_gyro->_friarWillTieYouUp = false; _sprites[1].walkTo(2); @@ -791,12 +791,12 @@ void Animation::callSpecial(uint16 which) { _vm->_timer->loseTimer(Timer::kReasonFallingDownOubliette); //_vm->_lucerna->mblit(12, 80, 38, 160, 3, 0); //_vm->_lucerna->mblit(12, 80, 38, 160, 3, 1); - _vm->_scrolls->displayText("Oh dear, you seem to be down the bottom of an oubliette."); + _vm->_dialogs->displayText("Oh dear, you seem to be down the bottom of an oubliette."); _vm->_timer->addTimer(200, Timer::kProcMeetAvaroid, Timer::kReasonMeetingAvaroid); break; case 8: // _vm->_gyro->special 8: leave du Lustie's room. if ((_vm->_gyro->_geidaFollows) && (!_vm->_gyro->_lustieIsAsleep)) { - _vm->_scrolls->displayScrollChain('q', 63); + _vm->_dialogs->displayScrollChain('q', 63); _sprites[1].turn(kDirDown); _sprites[1].stopWalk(); _sprites[1]._callEachStepFl = false; // Geida @@ -816,9 +816,9 @@ void Animation::callSpecial(uint16 which) { if ((_vm->_gyro->_catacombX == 4) && (_vm->_gyro->_catacombY == 1)) { // Into Geida's room. if (_vm->_gyro->_objects[Gyro::kObjectKey - 1]) - _vm->_scrolls->displayScrollChain('q', 62); + _vm->_dialogs->displayScrollChain('q', 62); else { - _vm->_scrolls->displayScrollChain('q', 61); + _vm->_dialogs->displayScrollChain('q', 61); return; } } @@ -1034,7 +1034,7 @@ void Animation::arrowProcs(byte tripnum) { // OK, it's hit him... what now? _sprites[1]._callEachStepFl = false; // prevent recursion. - _vm->_scrolls->displayScrollChain('Q', 47); // Complaint! + _vm->_dialogs->displayScrollChain('Q', 47); // Complaint! _sprites[tripnum].remove(); // Deallocate the arrow. _vm->_lucerna->gameOver(); @@ -1091,7 +1091,7 @@ void Animation::spin(byte whichway, byte &tripnum) { _vm->_gyro->_geidaSpin += 1; _vm->_gyro->_geidaTime = 20; if (_vm->_gyro->_geidaSpin == 5) { - _vm->_scrolls->displayText("Steady on, Avvy, you'll make the poor girl dizzy!"); + _vm->_dialogs->displayText("Steady on, Avvy, you'll make the poor girl dizzy!"); _vm->_gyro->_geidaSpin = 0; _vm->_gyro->_geidaTime = 0; // knock out records } @@ -1215,7 +1215,7 @@ void Animation::animLink() { if (_mustExclaim) { _mustExclaim = false; - _vm->_scrolls->displayScrollChain('x', _sayWhat); + _vm->_dialogs->displayScrollChain('x', _sayWhat); } } @@ -1233,13 +1233,13 @@ void Animation::stopWalking() { void Animation::hideInCupboard() { if (_vm->_gyro->_avvysInTheCupboard) { if (_vm->_gyro->_wearing == Acci::kNothing) { - Common::String tmpStr = Common::String::format("%cAVVY!%cGet dressed first!", Scrolls::kControlItalic, Scrolls::kControlRoman); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%cAVVY!%cGet dressed first!", Dialogs::kControlItalic, Dialogs::kControlRoman); + _vm->_dialogs->displayText(tmpStr); } else { _sprites[0]._visible = true; _vm->_gyro->_userMovesAvvy = true; appearPed(0, 2); // Walk out of the cupboard. - _vm->_scrolls->displayText("You leave the cupboard. Nice to be out of there!"); + _vm->_dialogs->displayText("You leave the cupboard. Nice to be out of there!"); _vm->_gyro->_avvysInTheCupboard = false; _vm->_sequence->firstShow(8); _vm->_sequence->thenShow(7); @@ -1250,8 +1250,8 @@ void Animation::hideInCupboard() { _sprites[0]._visible = false; _vm->_gyro->_userMovesAvvy = false; Common::String tmpStr = Common::String::format("You walk into the room...%cIt seems to be an empty, " \ - "but dusty, cupboard. Hmmmm... you leave the door slightly open to avoid suffocation.", Scrolls::kControlParagraph); - _vm->_scrolls->displayText(tmpStr); + "but dusty, cupboard. Hmmmm... you leave the door slightly open to avoid suffocation.", Dialogs::kControlParagraph); + _vm->_dialogs->displayText(tmpStr); _vm->_gyro->_avvysInTheCupboard = true; _vm->_background->drawBackgroundSprite(-1, -1, 7); } diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index f140ae90b6..d7a07fe41d 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -63,7 +63,7 @@ AvalancheEngine::~AvalancheEngine() { delete _avalot; delete _pingo; - delete _scrolls; + delete _dialogs; delete _lucerna; delete _background; delete _sequence; @@ -83,7 +83,7 @@ Common::ErrorCode AvalancheEngine::initialize() { _avalot = new Avalot(this); _gyro = new Gyro(this); _pingo = new Pingo(this); - _scrolls = new Scrolls(this); + _dialogs = new Dialogs(this); _lucerna = new Lucerna(this); _background = new Background(this); _sequence = new Sequence(this); @@ -95,7 +95,7 @@ Common::ErrorCode AvalancheEngine::initialize() { _sound = new SoundHandler(this); _graphics->init(); - _scrolls->init(); + _dialogs->init(); _lucerna->init(); _acci->init(); _parser->init(); @@ -453,10 +453,10 @@ bool AvalancheEngine::loadGame(const int16 slot) { _background->updateBackgroundSprites(); Common::String tmpStr = Common::String::format("%cLoaded: %c%s.ASG%c%c%c%s%c%csaved on %s.", - Scrolls::kControlItalic, Scrolls::kControlRoman, description.c_str(), Scrolls::kControlCenter, - Scrolls::kControlNewLine, Scrolls::kControlNewLine, _gyro->_roomnName.c_str(), Scrolls::kControlNewLine, - Scrolls::kControlNewLine, expandDate(t.tm_mday, t.tm_mon, t.tm_year).c_str()); - _scrolls->displayText(tmpStr); + Dialogs::kControlItalic, Dialogs::kControlRoman, description.c_str(), Dialogs::kControlCenter, + Dialogs::kControlNewLine, Dialogs::kControlNewLine, _gyro->_roomnName.c_str(), Dialogs::kControlNewLine, + Dialogs::kControlNewLine, expandDate(t.tm_mday, t.tm_mon, t.tm_year).c_str()); + _dialogs->displayText(tmpStr); AnimationType *avvy = &_animation->_sprites[0]; if (avvy->_quick && avvy->_visible) diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 16482c8c92..2a7df29a32 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -34,7 +34,7 @@ #include "avalanche/avalot.h" #include "avalanche/gyro.h" #include "avalanche/pingo.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/lucerna.h" #include "avalanche/background.h" #include "avalanche/sequence.h" @@ -70,7 +70,7 @@ public: Avalot *_avalot; Gyro *_gyro; Pingo *_pingo; - Scrolls *_scrolls; + Dialogs *_dialogs; Lucerna *_lucerna; Background *_background; Sequence *_sequence; diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 7126f332e7..5dc7fcfcba 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -34,7 +34,7 @@ #include "avalanche/animation.h" #include "avalanche/gyro.h" #include "avalanche/lucerna.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/menu.h" #include "avalanche/pingo.h" #include "avalanche/timer.h" @@ -120,7 +120,7 @@ void Avalot::handleKeyDown(Common::Event &event) { void Avalot::setup() { _vm->_gyro->init(); - _vm->_scrolls->resetScroll(); + _vm->_dialogs->reset(); _vm->_lucerna->dusk(); _vm->_lucerna->loadDigits(); @@ -128,7 +128,7 @@ void Avalot::setup() { _vm->_parser->_quote = true; _vm->_lucerna->drawToolbar(); - _vm->_scrolls->setReadyLight(2); + _vm->_dialogs->setReadyLight(2); _vm->_animation->_direction = Animation::kDirStopped; _vm->_animation->loadAnims(); @@ -155,7 +155,7 @@ void Avalot::setup() { _vm->_lucerna->fxToggle(); _vm->_lucerna->thinkAbout(Gyro::kObjectMoney, Gyro::kThing); - _vm->_scrolls->displayScrollChain('q', 83); // Info on the game, etc. + _vm->_dialogs->displayScrollChain('q', 83); // Info on the game, etc. } } diff --git a/engines/avalanche/scrolls.cpp b/engines/avalanche/dialogs.cpp index e5d08ecfc6..a496fcd177 100644 --- a/engines/avalanche/scrolls.cpp +++ b/engines/avalanche/dialogs.cpp @@ -28,7 +28,7 @@ /* SCROLLS The scroll driver. */ #include "avalanche/avalanche.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/gyro.h" #include "avalanche/lucerna.h" #include "avalanche/animation.h" @@ -40,17 +40,17 @@ namespace Avalanche { -Scrolls::Scrolls(AvalancheEngine *vm) { +Dialogs::Dialogs(AvalancheEngine *vm) { _vm = vm; _noError = true; } -void Scrolls::init() { +void Dialogs::init() { loadFont(); resetScrollDriver(); } -void Scrolls::setReadyLight(byte state) { // Sets "Ready" light to whatever +void Dialogs::setReadyLight(byte state) { // Sets "Ready" light to whatever if (_vm->_gyro->_ledStatus == state) return; // Already like that! @@ -75,11 +75,11 @@ void Scrolls::setReadyLight(byte state) { // Sets "Ready" light to whatever _vm->_gyro->_ledStatus = state; } -void Scrolls::easterEgg() { +void Dialogs::easterEgg() { warning("STUB: Scrolls::easterEgg()"); } -void Scrolls::say(int16 x, int16 y, Common::String z) { +void Dialogs::say(int16 x, int16 y, Common::String z) { FontType itw; byte lz = z.size(); @@ -97,7 +97,7 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { break; default: { for (int yy = 0; yy < 12; yy++) - itw[(byte)z[xx]][yy] = _scrollFonts[_currentFont][(byte)z[xx]][yy + 2]; + itw[(byte)z[xx]][yy] = _fonts[_currentFont][(byte)z[xx]][yy + 2]; // We have to draw the characters one-by-one because of the accidental font changes. i++; @@ -108,7 +108,7 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { } } -void Scrolls::scrollModeNormal() { +void Dialogs::scrollModeNormal() { // Original code is: // egg : array[1..8] of char = ^P^L^U^G^H+'***'; // this is not using kControl characters: it's the secret code to be entered to trigger the easter egg @@ -181,16 +181,16 @@ void Scrolls::scrollModeNormal() { warning("STUB: Scrolls::scrollModeNormal()"); } -void Scrolls::scrollModeDialogue() { +void Dialogs::scrollModeDialogue() { warning("STUB: Scrolls::scrollModeDialogue()"); } -void Scrolls::store(byte what, TuneType &played) { +void Dialogs::store(byte what, TuneType &played) { memcpy(played, played + 1, sizeof(played) - 1); played[30] = what; } -bool Scrolls::theyMatch(TuneType &played) { +bool Dialogs::theyMatch(TuneType &played) { byte mistakes = 0; for (unsigned int i = 0; i < sizeof(played); i++) { @@ -201,7 +201,7 @@ bool Scrolls::theyMatch(TuneType &played) { return mistakes < 5; } -void Scrolls::scrollModeMusic() { +void Dialogs::scrollModeMusic() { setReadyLight(3); _vm->_gyro->_seeScroll = true; CursorMan.showMouse(false); @@ -309,30 +309,30 @@ void Scrolls::scrollModeMusic() { CursorMan.showMouse(true); } -void Scrolls::resetScrollDriver() { +void Dialogs::resetScrollDriver() { _vm->_gyro->_scrollBells = 0; _currentFont = kFontStyleRoman; _useIcon = 0; _vm->_gyro->_interrogation = 0; // Always reset after a scroll comes up. } -void Scrolls::ringBell() { // Pussy's in the well. Who put her in? Little... +void Dialogs::ringBell() { // Pussy's in the well. Who put her in? Little... for (int i = 0; i < _vm->_gyro->_scrollBells; i++) _vm->_lucerna->errorLed(); // Ring the bell "x" times. } -void Scrolls::dodgem() { +void Dialogs::dodgem() { _dodgeCoord = _vm->getMousePos(); g_system->warpMouse(_dodgeCoord.x, _vm->_gyro->_underScroll); // Move the pointer off the scroll. } -void Scrolls::unDodgem() { +void Dialogs::unDodgem() { Common::Point actCoord = _vm->getMousePos(); if ((actCoord.x == _dodgeCoord.x) && (actCoord.y == _vm->_gyro->_underScroll)) g_system->warpMouse(_dodgeCoord.x, _dodgeCoord.y); // No change, so restore the pointer's original position. } -void Scrolls::getIcon(int16 x, int16 y, byte which) { +void Dialogs::getIcon(int16 x, int16 y, byte which) { Common::File file; if (!file.open("icons.avd")) @@ -351,7 +351,7 @@ void Scrolls::getIcon(int16 x, int16 y, byte which) { file.close(); } -void Scrolls::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) { +void Dialogs::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) { Common::File file; Common::String filename = Common::String::format("%s.avd", fn.c_str()); @@ -377,7 +377,7 @@ void Scrolls::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) { file.close(); } -void Scrolls::drawScroll(ScrollsFunctionType modeFunc) { +void Dialogs::drawScroll(DialogFunctionType modeFunc) { int16 lx = 0; int16 ly = (_vm->_gyro->_scrollNum) * 6; int16 ex; @@ -493,7 +493,7 @@ void Scrolls::drawScroll(ScrollsFunctionType modeFunc) { resetScrollDriver(); } -void Scrolls::drawBubble(ScrollsFunctionType modeFunc) { +void Dialogs::drawBubble(DialogFunctionType modeFunc) { Common::Point points[3]; CursorMan.showMouse(false); @@ -564,12 +564,12 @@ void Scrolls::drawBubble(ScrollsFunctionType modeFunc) { resetScrollDriver(); } -bool Scrolls::displayQuestion(Common::String question) { +bool Dialogs::displayQuestion(Common::String question) { warning("STUB: Scrolls::displayQuestion()"); return true; } -void Scrolls::resetScroll() { +void Dialogs::reset() { _vm->_gyro->_scrollNum = 1; for (int i = 0; i < 15; i++) { if (!_vm->_gyro->_scroll[i].empty()) @@ -577,14 +577,14 @@ void Scrolls::resetScroll() { } } -void Scrolls::setBubbleStateNatural() { +void Dialogs::setBubbleStateNatural() { _vm->_gyro->_talkX = 320; _vm->_gyro->_talkY = 200; _vm->_gyro->_talkBackgroundColor = 8; _vm->_gyro->_talkFontColor = 15; } -Common::String Scrolls::displayMoney() { +Common::String Dialogs::displayMoney() { Common::String result; if (_vm->_gyro->_money < 12) { // just pence @@ -606,12 +606,12 @@ Common::String Scrolls::displayMoney() { return result; } -void Scrolls::stripTrailingSpaces(Common::String &str) { +void Dialogs::stripTrailingSpaces(Common::String &str) { while (str[str.size() - 1] == ' ') str.deleteLastChar(); } -void Scrolls::solidify(byte n) { +void Dialogs::solidify(byte n) { if (!_vm->_gyro->_scroll[n].contains(' ')) return; // No spaces. @@ -624,7 +624,7 @@ void Scrolls::solidify(byte n) { stripTrailingSpaces(_vm->_gyro->_scroll[n]); } -void Scrolls::callScrollDriver() { +void Dialogs::callDialogDriver() { // bool was_virtual; // Was the mouse cursor virtual on entry to this proc? warning("STUB: Scrolls::calldrivers()"); @@ -669,9 +669,9 @@ void Scrolls::callScrollDriver() { _vm->_lucerna->spriteRun(); call_spriterun = false; - drawScroll(&Avalanche::Scrolls::scrollModeNormal); + drawScroll(&Avalanche::Dialogs::scrollModeNormal); - resetScroll(); + reset(); if (_vm->_gyro->_scReturn) return; @@ -711,9 +711,9 @@ void Scrolls::callScrollDriver() { setBubbleStateNatural(); } - drawBubble(&Avalanche::Scrolls::scrollModeNormal); + drawBubble(&Avalanche::Dialogs::scrollModeNormal); - resetScroll(); + reset(); if (_vm->_gyro->_scReturn) return; @@ -750,7 +750,7 @@ void Scrolls::callScrollDriver() { case 10: switch (_vm->_gyro->_boxContent) { case 0: // Sixpence. - _vm->_scrolls->displayScrollChain('q', 37); // You find the sixpence. + _vm->_dialogs->displayScrollChain('q', 37); // You find the sixpence. _vm->_gyro->_money += 6; _vm->_gyro->_boxContent = _vm->_acci->kNothing; _vm->_lucerna->incScore(2); @@ -784,8 +784,8 @@ void Scrolls::callScrollDriver() { _vm->_gyro->_scroll[_vm->_gyro->_scrollNum] = kControlQuestion; _vm->_gyro->_scrollNum++; - drawScroll(&Avalanche::Scrolls::scrollModeDialogue); - resetScroll(); + drawScroll(&Avalanche::Dialogs::scrollModeDialogue); + reset(); break; case kControlRegister: mouthnext = true; @@ -806,27 +806,27 @@ void Scrolls::callScrollDriver() { } } -void Scrolls::displayText(Common::String text) { // TODO: REPLACE BUFFER WITH A STRING!!!!!!!!!! +void Dialogs::displayText(Common::String text) { // TODO: REPLACE BUFFER WITH A STRING!!!!!!!!!! _vm->_gyro->_bufSize = text.size(); memcpy(_vm->_gyro->_buffer, text.c_str(), _vm->_gyro->_bufSize); - callScrollDriver(); + callDialogDriver(); } -void Scrolls::loadFont() { +void Dialogs::loadFont() { Common::File file; if (!file.open("avalot.fnt")) error("AVALANCHE: Scrolls: File not found: avalot.fnt"); for (int16 i = 0; i < 256; i++) - file.read(_scrollFonts[0][i], 16); + file.read(_fonts[0][i], 16); file.close(); if (!file.open("avitalic.fnt")) error("AVALANCHE: Scrolls: File not found: avitalic.fnt"); for (int16 i = 0; i < 256; i++) - file.read(_scrollFonts[1][i], 16); + file.read(_fonts[1][i], 16); file.close(); if (!file.open("ttsmall.fnt")) @@ -837,26 +837,26 @@ void Scrolls::loadFont() { file.close(); } -void Scrolls::musicalScroll() { +void Dialogs::displayMusicalScroll() { Common::String tmpStr = Common::String::format("To play the harp...%c%cUse these keys:%c%cQ W E R T Y U I O P [ ]%c%cOr press Enter to stop playing.%c", kControlNewLine, kControlNewLine, kControlNewLine, kControlInsertSpaces, kControlNewLine, kControlNewLine, kControlToBuffer); displayText(tmpStr); _vm->_lucerna->spriteRun(); CursorMan.showMouse(false); - drawScroll(&Avalanche::Scrolls::scrollModeMusic); + drawScroll(&Avalanche::Dialogs::scrollModeMusic); CursorMan.showMouse(true); - resetScroll(); + reset(); } // From Visa: -void Scrolls::unSkrimble() { +void Dialogs::unSkrimble() { for (uint16 i = 0; i < _vm->_gyro->_bufSize; i++) _vm->_gyro->_buffer[i] = (~(_vm->_gyro->_buffer[i] - (i + 1))) % 256; } -void Scrolls::doTheBubble() { +void Dialogs::doTheBubble() { _vm->_gyro->_buffer[_vm->_gyro->_bufSize] = 2; _vm->_gyro->_bufSize++; } @@ -865,7 +865,7 @@ void Scrolls::doTheBubble() { * Display a string in a scroll * @remarks Originally called 'dixi' */ -void Scrolls::displayScrollChain(char block, byte point, bool report, bool bubbling) { +void Dialogs::displayScrollChain(char block, byte point, bool report, bool bubbling) { Common::File indexfile; if (!indexfile.open("avalot.idx")) error("AVALANCHE: Visa: File not found: avalot.idx"); @@ -888,8 +888,8 @@ void Scrolls::displayScrollChain(char block, byte point, bool report, bool bubbl if (error) { if (report) { - Common::String todisplay = Common::String::format("%cError accessing scroll %c%d", Scrolls::kControlBell, block, point); - _vm->_scrolls->displayText(todisplay); + Common::String todisplay = Common::String::format("%cError accessing scroll %c%d", Dialogs::kControlBell, block, point); + _vm->_dialogs->displayText(todisplay); } return; } @@ -907,14 +907,14 @@ void Scrolls::displayScrollChain(char block, byte point, bool report, bool bubbl if (bubbling) doTheBubble(); - _vm->_scrolls->callScrollDriver(); + _vm->_dialogs->callDialogDriver(); } /** * Start speech * @remarks Originally called 'speech' */ -void Scrolls::speak(byte who, byte subject) { +void Dialogs::speak(byte who, byte subject) { if (subject == 0) { // No subject. displayScrollChain('s', who, false, true); return; @@ -952,11 +952,11 @@ void Scrolls::speak(byte who, byte subject) { unSkrimble(); doTheBubble(); - _vm->_scrolls->callScrollDriver(); + _vm->_dialogs->callDialogDriver(); _noError = true; } -void Scrolls::talkTo(byte whom) { +void Dialogs::talkTo(byte whom) { if (_vm->_acci->_person == _vm->_acci->kPardon) { _vm->_acci->_person = _vm->_gyro->_subjectNum; _vm->_gyro->_subjectNum = 0; @@ -978,8 +978,8 @@ void Scrolls::talkTo(byte whom) { case 1: // Fallthrough is intended. case 2: { Common::String objStr = _vm->_gyro->getItem(Gyro::kSpludwicksOrder[_vm->_gyro->_givenToSpludwick]); - Common::String tmpStr = Common::String::format("Can you get me %s, please?%c2%c", objStr.c_str(), Scrolls::kControlRegister, Scrolls::kControlSpeechBubble); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("Can you get me %s, please?%c2%c", objStr.c_str(), Dialogs::kControlRegister, Dialogs::kControlSpeechBubble); + _vm->_dialogs->displayText(tmpStr); } return; case 3: @@ -1052,16 +1052,16 @@ void Scrolls::talkTo(byte whom) { bool noMatches = true; for (int i = 0; i <= _vm->_animation->kSpriteNumbMax; i++) { if (_vm->_animation->_sprites[i]._stat._acciNum == whom) { - Common::String tmpStr = Common::String::format("%c%c%c", Scrolls::kControlRegister, i + 49, Scrolls::kControlToBuffer); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%c%c%c", Dialogs::kControlRegister, i + 49, Dialogs::kControlToBuffer); + _vm->_dialogs->displayText(tmpStr); noMatches = false; break; } } if (noMatches) { - Common::String tmpStr = Common::String::format("%c%c%c", Scrolls::kControlRegister, Scrolls::kControlRegister, Scrolls::kControlToBuffer); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%c%c%c", Dialogs::kControlRegister, Dialogs::kControlRegister, Dialogs::kControlToBuffer); + _vm->_dialogs->displayText(tmpStr); } speak(whom, _vm->_gyro->_subjectNum); diff --git a/engines/avalanche/scrolls.h b/engines/avalanche/dialogs.h index a8938a5d34..9cb4470959 100644 --- a/engines/avalanche/scrolls.h +++ b/engines/avalanche/dialogs.h @@ -27,19 +27,19 @@ /* SCROLLS The scroll driver. */ -#ifndef AVALANCHE_SCROLLS2_H -#define AVALANCHE_SCROLLS2_H +#ifndef AVALANCHE_DIALOGS_H +#define AVALANCHE_DIALOGS_H #include "common/system.h" namespace Avalanche { class AvalancheEngine; -class Scrolls; +class Dialogs; -typedef void (Scrolls::*ScrollsFunctionType)(); +typedef void (Dialogs::*DialogFunctionType)(); -class Scrolls { +class Dialogs { public: // Constants to replace the command characters from Pascal. // For more information, see: https://github.com/urukgit/avalot/wiki/Scrolldrivers @@ -61,22 +61,22 @@ public: kControlIcon = 22 // ^V }; - bool _aboutScroll; // Is this the about box? - FontType _scrollFonts[2]; + bool _aboutBox; // Is this the about box? + FontType _fonts[2]; - Scrolls(AvalancheEngine *vm); + Dialogs(AvalancheEngine *vm); void init(); void setReadyLight(byte state); // Sets "Ready" light to whatever. - void drawScroll(ScrollsFunctionType modeFunc); - void drawBubble(ScrollsFunctionType modeFunc); - void resetScroll(); - void callScrollDriver(); + void drawScroll(DialogFunctionType modeFunc); + void drawBubble(DialogFunctionType modeFunc); + void reset(); + void callDialogDriver(); void displayText(Common::String text); bool displayQuestion(Common::String question); void setBubbleStateNatural(); // Natural state of bubbles Common::String displayMoney(); - void musicalScroll(); // Practically this one is a mini-game which called when you play the harp in the monastery. + void displayMusicalScroll(); // Practically this one is a mini-game which called when you play the harp in the monastery. // From Visa: void displayScrollChain(char block, byte point, bool report = true, bool bubbling = false); @@ -130,4 +130,4 @@ private: } // End of namespace Avalanche -#endif // AVALANCHE_SCROLLS2_H +#endif // AVALANCHE_DIALOGS_H diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp index e338ecddbc..3d86d34b38 100644 --- a/engines/avalanche/gyro.cpp +++ b/engines/avalanche/gyro.cpp @@ -30,7 +30,7 @@ #include "avalanche/avalanche.h" #include "avalanche/gyro.h" #include "avalanche/pingo.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/lucerna.h" #include "avalanche/acci.h" #include "avalanche/animation.h" @@ -311,7 +311,7 @@ void Gyro::newGame() { _alive = true; resetVariables(); - _vm->_scrolls->setBubbleStateNatural(); + _vm->_dialogs->setBubbleStateNatural(); _spareEvening = "answer a questionnaire"; _favouriteDrink = "beer"; @@ -366,7 +366,7 @@ bool Gyro::setFlag(char x) { bool Gyro::decreaseMoney(uint16 howmuchby) { _money -= howmuchby; if (_money < 0) { - _vm->_scrolls->displayScrollChain('Q', 2); // "You are now denariusless!" + _vm->_dialogs->displayScrollChain('Q', 2); // "You are now denariusless!" _vm->_lucerna->gameOver(); return false; } else diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp index 539bb40ed8..34ba7c11c1 100644 --- a/engines/avalanche/lucerna.cpp +++ b/engines/avalanche/lucerna.cpp @@ -30,7 +30,7 @@ #include "avalanche/avalanche.h" #include "avalanche/lucerna.h" #include "avalanche/gyro.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/timer.h" #include "avalanche/animation.h" #include "avalanche/background.h" @@ -70,8 +70,8 @@ void Clock::update() { // TODO: Move variables from Gyro to here (or at least so if ((_hour == 0) && (_oldHour != 0) && (_oldHour != 17717)) { Common::String tmpStr = Common::String::format("Good morning!%c%cYes, it's just past " \ "midnight. Are you having an all-night Avvy session? Glad you like the game that much!", - Scrolls::kControlNewLine, Scrolls::kControlNewLine); - _vm->_scrolls->displayText(tmpStr); + Dialogs::kControlNewLine, Dialogs::kControlNewLine); + _vm->_dialogs->displayText(tmpStr); } _oldHour = _hour; _oldHourAngle = _hourAngle; @@ -148,7 +148,7 @@ void Lucerna::callVerb(byte id) { Common::String tmpStr = Common::String::format("The f5 key lets you do a particular action in certain " \ "situations. However, at the moment there is nothing assigned to it. You may press alt-A to see " \ "what the current setting of this key is."); - _vm->_scrolls->displayText(tmpStr); + _vm->_dialogs->displayText(tmpStr); } else { _vm->_gyro->_weirdWord = false; _vm->_acci->_polite = true; @@ -606,12 +606,12 @@ void Lucerna::enterRoom(byte room, byte ped) { zoomOut(_vm->_gyro->_peds[ped]._x, _vm->_gyro->_peds[ped]._y); if ((_vm->_gyro->_objects[Gyro::kObjectWine - 1]) && (_vm->_gyro->_wineState != 3)) { - _vm->_scrolls->displayScrollChain('q', 9); // Don't want to waste the wine! + _vm->_dialogs->displayScrollChain('q', 9); // Don't want to waste the wine! _vm->_gyro->_objects[Gyro::kObjectWine - 1] = false; refreshObjectList(); } - _vm->_scrolls->displayScrollChain('q', 69); + _vm->_dialogs->displayScrollChain('q', 69); break; case kRoomCatacombs: @@ -1117,7 +1117,7 @@ void Lucerna::checkClick() { } else if ((396 <= cursorPos.x) && (cursorPos.x <= 483)) fxToggle(); else if ((535 <= cursorPos.x) && (cursorPos.x <= 640)) - _vm->_gyro->_mouseText.insertChar(Scrolls::kControlNewLine, 0); + _vm->_gyro->_mouseText.insertChar(Dialogs::kControlNewLine, 0); } else if (!_vm->_gyro->_dropsOk) _vm->_gyro->_mouseText = Common::String(13) + _vm->_gyro->_mouseText; } @@ -1218,7 +1218,7 @@ void Lucerna::spriteRun() { void Lucerna::fixFlashers() { _vm->_gyro->_ledStatus = 177; _vm->_animation->_oldDirection = 177; - _vm->_scrolls->setReadyLight(2); + _vm->_dialogs->setReadyLight(2); drawDirection(); } diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk index be8a103f66..f044a41071 100644 --- a/engines/avalanche/module.mk +++ b/engines/avalanche/module.mk @@ -15,7 +15,7 @@ MODULE_OBJS = \ menu.o \ parser.o \ pingo.o \ - scrolls.o \ + dialogs.o \ sequence.o \ sound.o \ timer.o diff --git a/engines/avalanche/pingo.cpp b/engines/avalanche/pingo.cpp index 7196f46687..95e15e599f 100644 --- a/engines/avalanche/pingo.cpp +++ b/engines/avalanche/pingo.cpp @@ -33,7 +33,7 @@ #include "avalanche/gyro.h" #include "avalanche/lucerna.h" #include "avalanche/animation.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "common/textconsole.h" #include "common/file.h" diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 9f51e2a734..c76c9892df 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -31,7 +31,7 @@ #include "avalanche/timer.h" #include "avalanche/lucerna.h" #include "avalanche/animation.h" -#include "avalanche/scrolls.h" +#include "avalanche/dialogs.h" #include "avalanche/acci.h" #include "avalanche/sequence.h" #include "avalanche/pingo.h" @@ -240,7 +240,7 @@ void Timer::openDrawbridge() { } void Timer::avariciusTalks() { - _vm->_scrolls->displayScrollChain('q', _vm->_gyro->_avariciusTalk); + _vm->_dialogs->displayScrollChain('q', _vm->_gyro->_avariciusTalk); _vm->_gyro->_avariciusTalk++; if (_vm->_gyro->_avariciusTalk < 17) @@ -257,17 +257,17 @@ void Timer::urinate() { } void Timer::toilet() { - _vm->_scrolls->displayText("That's better!"); + _vm->_dialogs->displayText("That's better!"); } void Timer::bang() { - Common::String tmpStr = Common::String::format("%c< BANG! >", Scrolls::kControlItalic); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("%c< BANG! >", Dialogs::kControlItalic); + _vm->_dialogs->displayText(tmpStr); addTimer(30, kProcBang2, kReasonExplosion); } void Timer::bang2() { - _vm->_scrolls->displayText("Hmm... sounds like Spludwick's up to something..."); + _vm->_dialogs->displayText("Hmm... sounds like Spludwick's up to something..."); } void Timer::stairs() { @@ -283,25 +283,25 @@ void Timer::stairs() { void Timer::cardiffSurvey() { if (_vm->_gyro->_cardiffQuestionNum == 0) { _vm->_gyro->_cardiffQuestionNum++; - _vm->_scrolls->displayScrollChain('q', 27); + _vm->_dialogs->displayScrollChain('q', 27); } - _vm->_scrolls->displayScrollChain('z', _vm->_gyro->_cardiffQuestionNum); + _vm->_dialogs->displayScrollChain('z', _vm->_gyro->_cardiffQuestionNum); _vm->_gyro->_interrogation = _vm->_gyro->_cardiffQuestionNum; addTimer(182, kProcCardiffSurvey, kReasonCardiffsurvey); } void Timer::cardiffReturn() { - _vm->_scrolls->displayScrollChain('q', 28); + _vm->_dialogs->displayScrollChain('q', 28); cardiffSurvey(); // Add end of question. } void Timer::cwytalotInHerts() { - _vm->_scrolls->displayScrollChain('q', 29); + _vm->_dialogs->displayScrollChain('q', 29); } void Timer::getTiedUp() { - _vm->_scrolls->displayScrollChain('q', 34); // ...Trouble! + _vm->_dialogs->displayScrollChain('q', 34); // ...Trouble! _vm->_gyro->_userMovesAvvy = false; _vm->_gyro->_beenTiedUp = true; _vm->_animation->stopWalking(); @@ -328,18 +328,18 @@ void Timer::hangAround() { avvy->init(7, true, _vm->_animation); // Robin Hood _vm->_gyro->_whereIs[Gyro::kPeopleRobinHood - 150] = kRoomRobins; _vm->_animation->appearPed(0, 1); - _vm->_scrolls->displayScrollChain('q', 39); + _vm->_dialogs->displayScrollChain('q', 39); avvy->walkTo(6); addTimer(55, kProcHangAround2, kReasonHangingAround); } void Timer::hangAround2() { - _vm->_scrolls->displayScrollChain('q', 40); + _vm->_dialogs->displayScrollChain('q', 40); AnimationType *spr = &_vm->_animation->_sprites[1]; spr->_vanishIfStill = false; spr->walkTo(3); _vm->_gyro->_whereIs[Gyro::kPeopleFriarTuck - 150] = kRoomRobins; - _vm->_scrolls->displayScrollChain('q', 41); + _vm->_dialogs->displayScrollChain('q', 41); _vm->_animation->_sprites[0].remove(); spr->remove(); // Get rid of Robin Hood and Friar Tuck. @@ -362,8 +362,8 @@ void Timer::afterTheShootemup() { _vm->_lucerna->refreshObjectList(); // Same as the added line above: TODO: Remove it later!!! - _vm->_scrolls->displayText(Common::String("P.S.: There should have been the mini-game called \"shoot em' up\", but I haven't implemented it yet: you get the crossbow automatically.") - + Scrolls::kControlNewLine + Scrolls::kControlNewLine + "Peter (uruk)"); + _vm->_dialogs->displayText(Common::String("P.S.: There should have been the mini-game called \"shoot em' up\", but I haven't implemented it yet: you get the crossbow automatically.") + + Dialogs::kControlNewLine + Dialogs::kControlNewLine + "Peter (uruk)"); #if 0 byte shootscore, gain; @@ -383,7 +383,7 @@ void Timer::afterTheShootemup() { warning("STUB: Timer::after_the_shootemup()"); - _vm->_scrolls->displayScrollChain('q', 70); + _vm->_dialogs->displayScrollChain('q', 70); } void Timer::jacquesWakesUp() { @@ -392,7 +392,7 @@ void Timer::jacquesWakesUp() { switch (_vm->_gyro->_jacquesState) { // Additional pictures. case 1 : _vm->_background->drawBackgroundSprite(-1, -1, 0); // Eyes open. - _vm->_scrolls->displayScrollChain('Q', 45); + _vm->_dialogs->displayScrollChain('Q', 45); break; case 2 : // Going through the door. _vm->_background->drawBackgroundSprite(-1, -1, 1); // Not on the floor. @@ -440,7 +440,7 @@ void Timer::naughtyDuke() { // This is when the Duke comes in and takes your mon void Timer::naughtyDuke2() { AnimationType *spr = &_vm->_animation->_sprites[1]; - _vm->_scrolls->displayScrollChain('q', 48); // "Ha ha, it worked again!" + _vm->_dialogs->displayScrollChain('q', 48); // "Ha ha, it worked again!" spr->walkTo(0); // Walk to the door. spr->_vanishIfStill = true; // Then go away! addTimer(32, kProcNaughtyDuke3, kReasonNaughtyDuke); @@ -487,20 +487,20 @@ void Timer::jump() { && (_vm->_animation->inField(2))) { // Beside the wall // Grab the arrow! if (_vm->_gyro->_carryNum >= kCarryLimit) - _vm->_scrolls->displayText("You fail to grab it, because your hands are full."); + _vm->_dialogs->displayText("You fail to grab it, because your hands are full."); else { _vm->_background->drawBackgroundSprite(-1, -1, 1); _vm->_gyro->_arrowInTheDoor = false; // You've got it. _vm->_gyro->_objects[Gyro::kObjectBolt - 1] = true; _vm->_lucerna->refreshObjectList(); - _vm->_scrolls->displayScrollChain('q', 50); + _vm->_dialogs->displayScrollChain('q', 50); _vm->_lucerna->incScore(3); } } } void Timer::crapulusSaysSpludOut() { - _vm->_scrolls->displayScrollChain('q', 56); + _vm->_dialogs->displayScrollChain('q', 56); _vm->_gyro->_crapulusWillTell = false; } @@ -508,11 +508,11 @@ void Timer::buyDrinks() { _vm->_background->drawBackgroundSprite(-1, -1, 10); // Malagauche gets up again. _vm->_gyro->_malagauche = 0; - _vm->_scrolls->displayScrollChain('D', _vm->_gyro->_drinking); // Display message about it. + _vm->_dialogs->displayScrollChain('D', _vm->_gyro->_drinking); // Display message about it. _vm->_pingo->wobble(); // Do the special effects. - _vm->_scrolls->displayScrollChain('D', 1); // That'll be thruppence. + _vm->_dialogs->displayScrollChain('D', 1); // That'll be thruppence. if (_vm->_gyro->decreaseMoney(3)) // Pay 3d. - _vm->_scrolls->displayScrollChain('D', 3); // Tell 'em you paid up. + _vm->_dialogs->displayScrollChain('D', 3); // Tell 'em you paid up. _vm->_acci->drink(); } @@ -520,10 +520,10 @@ void Timer::buyWine() { _vm->_background->drawBackgroundSprite(-1, -1, 10); // Malagauche gets up again. _vm->_gyro->_malagauche = 0; - _vm->_scrolls->displayScrollChain('D', 50); // You buy the wine. - _vm->_scrolls->displayScrollChain('D', 1); // It'll be thruppence. + _vm->_dialogs->displayScrollChain('D', 50); // You buy the wine. + _vm->_dialogs->displayScrollChain('D', 1); // It'll be thruppence. if (_vm->_gyro->decreaseMoney(3)) { - _vm->_scrolls->displayScrollChain('D', 4); // You paid up. + _vm->_dialogs->displayScrollChain('D', 4); // You paid up. _vm->_gyro->_objects[Gyro::kObjectWine - 1] = true; _vm->_lucerna->refreshObjectList(); _vm->_gyro->_wineState = 1; // OK Wine. @@ -531,12 +531,12 @@ void Timer::buyWine() { } void Timer::callsGuards() { - _vm->_scrolls->displayScrollChain('Q', 58); // "GUARDS!!!" + _vm->_dialogs->displayScrollChain('Q', 58); // "GUARDS!!!" _vm->_lucerna->gameOver(); } void Timer::greetsMonk() { - _vm->_scrolls->displayScrollChain('Q', 59); + _vm->_dialogs->displayScrollChain('Q', 59); _vm->_gyro->_enteredLustiesRoomAsMonk = true; } @@ -551,11 +551,11 @@ void Timer::fallDownOubliette() { void Timer::meetAvaroid() { if (_vm->_gyro->_metAvaroid) { - Common::String tmpStr = Common::String::format("You can't expect to be %cthat%c lucky twice in a row!", Scrolls::kControlItalic, Scrolls::kControlRoman); - _vm->_scrolls->displayText(tmpStr); + Common::String tmpStr = Common::String::format("You can't expect to be %cthat%c lucky twice in a row!", Dialogs::kControlItalic, Dialogs::kControlRoman); + _vm->_dialogs->displayText(tmpStr); _vm->_lucerna->gameOver(); } else { - _vm->_scrolls->displayScrollChain('Q', 60); + _vm->_dialogs->displayScrollChain('Q', 60); _vm->_gyro->_metAvaroid = true; addTimer(1, kProcRiseUpOubliette, kReasonRisingUpOubliette); @@ -594,7 +594,7 @@ void Timer::robinHoodAndGeida() { } void Timer::robinHoodAndGeidaTalk() { - _vm->_scrolls->displayScrollChain('q', 66); + _vm->_dialogs->displayScrollChain('q', 66); AnimationType *avvy = &_vm->_animation->_sprites[0]; AnimationType *spr = &_vm->_animation->_sprites[1]; @@ -613,7 +613,7 @@ void Timer::avalotReturns() { spr->remove(); avvy->init(0, true, _vm->_animation); _vm->_animation->appearPed(0, 0); - _vm->_scrolls->displayScrollChain('q', 67); + _vm->_dialogs->displayScrollChain('q', 67); _vm->_gyro->_userMovesAvvy = true; } @@ -636,20 +636,20 @@ void Timer::avvySitDown() { void Timer::ghostRoomPhew() { Common::String tmpStr = Common::String::format("%cPHEW!%c You're glad to get out of %cthere!", - Scrolls::kControlItalic, Scrolls::kControlRoman, Scrolls::kControlItalic); - _vm->_scrolls->displayText(tmpStr); + Dialogs::kControlItalic, Dialogs::kControlRoman, Dialogs::kControlItalic); + _vm->_dialogs->displayText(tmpStr); } void Timer::arkataShouts() { if (_vm->_gyro->_teetotal) return; - _vm->_scrolls->displayScrollChain('q', 76); + _vm->_dialogs->displayScrollChain('q', 76); addTimer(160, kProcArkataShouts, kReasonArkataShouts); } void Timer::winning() { - _vm->_scrolls->displayScrollChain('q', 79); + _vm->_dialogs->displayScrollChain('q', 79); _vm->_pingo->winningPic(); warning("STUB: Timer::winning()"); @@ -661,7 +661,7 @@ void Timer::winning() { // TODO: To be implemented with Pingo::winningPic(). _vm->_lucerna->callVerb(Acci::kVerbCodeScore); - _vm->_scrolls->displayText(" T H E E N D "); + _vm->_dialogs->displayText(" T H E E N D "); _vm->_gyro->_letMeOut = true; } @@ -672,12 +672,12 @@ void Timer::avalotFalls() { addTimer(3, kProcAvalotFalls, kReasonFallingOver); } else { Common::String toDisplay = Common::String::format("%c%c%c%c%c%c%c%c%c%c%c%c%cZ%c", - Scrolls::kControlNewLine, Scrolls::kControlNewLine, Scrolls::kControlNewLine, - Scrolls::kControlNewLine, Scrolls::kControlNewLine, Scrolls::kControlNewLine, - Scrolls::kControlInsertSpaces, Scrolls::kControlInsertSpaces, Scrolls::kControlInsertSpaces, - Scrolls::kControlInsertSpaces, Scrolls::kControlInsertSpaces, Scrolls::kControlInsertSpaces, - Scrolls::kControlRegister, Scrolls::kControlIcon); - _vm->_scrolls->displayText(toDisplay); + Dialogs::kControlNewLine, Dialogs::kControlNewLine, Dialogs::kControlNewLine, + Dialogs::kControlNewLine, Dialogs::kControlNewLine, Dialogs::kControlNewLine, + Dialogs::kControlInsertSpaces, Dialogs::kControlInsertSpaces, Dialogs::kControlInsertSpaces, + Dialogs::kControlInsertSpaces, Dialogs::kControlInsertSpaces, Dialogs::kControlInsertSpaces, + Dialogs::kControlRegister, Dialogs::kControlIcon); + _vm->_dialogs->displayText(toDisplay); } } @@ -693,7 +693,7 @@ void Timer::spludwickLeavesCauldron() { } void Timer::giveLuteToGeida() { // Moved here from Acci. - _vm->_scrolls->displayScrollChain('Q', 86); + _vm->_dialogs->displayScrollChain('Q', 86); _vm->_lucerna->incScore(4); _vm->_gyro->_lustieIsAsleep = true; _vm->_sequence->firstShow(5); |