aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-09-07 20:37:42 +0200
committeruruk2013-09-07 20:37:42 +0200
commitc087998a8a65717f0353e8b8a708b4c4229e8f0b (patch)
tree99ca7d3958e70355b3bd65e5b993e1b948b07bee /engines/avalanche
parent9198b166f7b99b9beedf833e0f2e573420db73fc (diff)
downloadscummvm-rg350-c087998a8a65717f0353e8b8a708b4c4229e8f0b.tar.gz
scummvm-rg350-c087998a8a65717f0353e8b8a708b4c4229e8f0b.tar.bz2
scummvm-rg350-c087998a8a65717f0353e8b8a708b4c4229e8f0b.zip
AVALANCHE: Do renaming in scrolls2.h.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/acci2.cpp266
-rw-r--r--engines/avalanche/animation.cpp18
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/avalot.cpp4
-rw-r--r--engines/avalanche/gyro2.cpp2
-rw-r--r--engines/avalanche/lucerna2.cpp6
-rw-r--r--engines/avalanche/scrolls2.cpp194
-rw-r--r--engines/avalanche/scrolls2.h148
-rw-r--r--engines/avalanche/timeout2.cpp18
-rw-r--r--engines/avalanche/visa2.cpp12
10 files changed, 318 insertions, 352 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 5d09d05529..55f1e13fcd 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -306,16 +306,16 @@ void Acci::displayWhat(byte target, bool animate, bool &ambiguous) {
if (target == kPardon) {
ambiguous = true;
if (animate)
- _vm->_scrolls->display("Whom?");
+ _vm->_scrolls->displayText("Whom?");
else
- _vm->_scrolls->display("What?");
+ _vm->_scrolls->displayText("What?");
} else {
if (animate)
- _vm->_scrolls->display(Common::String("{ ") + _vm->_gyro->getName(target) + " }");
+ _vm->_scrolls->displayText(Common::String("{ ") + _vm->_gyro->getName(target) + " }");
else {
Common::String z = _vm->_gyro->getItem(target);
if (z != "")
- _vm->_scrolls->display(Common::String("{ ") + z + " }");
+ _vm->_scrolls->displayText(Common::String("{ ") + z + " }");
}
}
}
@@ -365,7 +365,7 @@ void Acci::properNouns() {
void Acci::sayIt() {
Common::String x = _vm->_parser->_inputText;
x.setChar(toupper(x[0]), 0);
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + '1' + x
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + '1' + x
+ '.' + _vm->_scrolls->kControlSpeechBubble + _vm->_scrolls->kControlRegister + '2');
}
@@ -599,7 +599,7 @@ void Acci::parse() {
}
if ((!_unknown.empty()) && (_verb != kVerbCodeExam) && (_verb != kVerbCodeTalk) && (_verb != kVerbCodeSave) && (_verb != kVerbCodeLoad) && (_verb != kVerbCodeDir)) {
- _vm->_scrolls->display(Common::String("Sorry, but I have no idea kWhat \"") + _unknown + "\" means. Can you rephrase it?");
+ _vm->_scrolls->displayText(Common::String("Sorry, but I have no idea kWhat \"") + _unknown + "\" means. Can you rephrase it?");
_vm->_gyro->_weirdWord = true;
} else
_vm->_gyro->_weirdWord = false;
@@ -651,10 +651,10 @@ bool Acci::isPersonHere() { // Person equivalent of "holding".
return true;
else {
if (_person < 175)
- _vm->_scrolls->display(Common::String('H') + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String('H') + _vm->_scrolls->kControlToBuffer);
else
- _vm->_scrolls->display(Common::String("Sh") + _vm->_scrolls->kControlToBuffer);
- _vm->_scrolls->display("e isn't around at the moment.");
+ _vm->_scrolls->displayText(Common::String("Sh") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText("e isn't around at the moment.");
return false;
}
}
@@ -694,9 +694,9 @@ bool Acci::holding() {
bool holdingResult = false;
if (_thing > 100)
- _vm->_scrolls->display("Be reasonable!");
+ _vm->_scrolls->displayText("Be reasonable!");
else if (!_vm->_gyro->_dna._objects[_thing - 1]) // Verbs that need "_thing" to be in the inventory.
- _vm->_scrolls->display("You're not holding it, Avvy.");
+ _vm->_scrolls->displayText("You're not holding it, Avvy.");
else
holdingResult = true;
@@ -731,37 +731,37 @@ void Acci::examine() {
examineObject();
else if ((50 <= _thing) && (_thing <= 100)) { // Also _thing
openBox(true);
- _vm->_scrolls->display(*_vm->_gyro->_also[_thing - 50][1]);
+ _vm->_scrolls->displayText(*_vm->_gyro->_also[_thing - 50][1]);
openBox(false);
}
}
} else if (_person != kPardon)
exampers();
else
- _vm->_scrolls->display("It's just as it looks on the picture."); // Don't know: guess.
+ _vm->_scrolls->displayText("It's just as it looks on the picture."); // Don't know: guess.
}
void Acci::inventory() {
byte itemNum = 0;
- _vm->_scrolls->display(Common::String("You're carrying ") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String("You're carrying ") + _vm->_scrolls->kControlToBuffer);
for (byte i = 0; i < kObjectNum; i++) {
if (_vm->_gyro->_dna._objects[i]) {
itemNum++;
if (itemNum == _vm->_gyro->_dna._carryNum)
- _vm->_scrolls->display(Common::String("and ") + _vm->_scrolls->kControlToBuffer);
- _vm->_scrolls->display(_vm->_gyro->getItem(i + 1) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String("and ") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(_vm->_gyro->getItem(i + 1) + _vm->_scrolls->kControlToBuffer);
if ((i + 1) == _vm->_gyro->_dna._wearing)
- _vm->_scrolls->display(Common::String(", which you're wearing") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(", which you're wearing") + _vm->_scrolls->kControlToBuffer);
if (itemNum < _vm->_gyro->_dna._carryNum)
- _vm->_scrolls->display(Common::String(", ") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(", ") + _vm->_scrolls->kControlToBuffer);
}
}
if (_vm->_gyro->_dna._wearing == kNothing)
- _vm->_scrolls->display(Common::String("...") + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "...and you're stark naked!");
+ _vm->_scrolls->displayText(Common::String("...") + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "...and you're stark naked!");
else
- _vm->_scrolls->display(".");
+ _vm->_scrolls->displayText(".");
}
void Acci::swallow() { // Eat something.
@@ -813,9 +813,9 @@ void Acci::swallow() { // Eat something.
break;
default:
if ((_vm->_gyro->_dna._room == r__argentpub) || (_vm->_gyro->_dna._room == r__nottspub))
- _vm->_scrolls->display("Try BUYing things before you drink them!");
+ _vm->_scrolls->displayText("Try BUYing things before you drink them!");
else
- _vm->_scrolls->display("The taste of it makes you retch!");
+ _vm->_scrolls->displayText("The taste of it makes you retch!");
}
}
@@ -835,24 +835,24 @@ void Acci::peopleInRoom() {
if (_vm->_gyro->_whereIs[i] == _vm->_gyro->_dna._room) {
actPerson++;
if (actPerson == 1) // First on the list.
- _vm->_scrolls->display(_vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(_vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
else if (actPerson < numPeople) // The middle...
- _vm->_scrolls->display(Common::String(", ") + _vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(", ") + _vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
else // The end.
- _vm->_scrolls->display(Common::String(" and ") + _vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(" and ") + _vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
}
}
if (numPeople == 1)
- _vm->_scrolls->display(Common::String(" is") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(" is") + _vm->_scrolls->kControlToBuffer);
else
- _vm->_scrolls->display(Common::String(" are") + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(" are") + _vm->_scrolls->kControlToBuffer);
- _vm->_scrolls->display(" here."); // End and display it.
+ _vm->_scrolls->displayText(" here."); // End and display it.
}
void Acci::lookAround() {
- _vm->_scrolls->display(*_vm->_gyro->_also[0][1]);
+ _vm->_scrolls->displayText(*_vm->_gyro->_also[0][1]);
switch (_vm->_gyro->_dna._room) {
case r__spludwicks:
if (_vm->_gyro->_dna._avariciusTalk > 0)
@@ -931,7 +931,7 @@ void Acci::openDoor() {
break;
case Gyro::kMagicUnfinished:
_vm->_animation->tr[0].bounce();
- _vm->_scrolls->display("Sorry. This place is not available yet!");
+ _vm->_scrolls->displayText("Sorry. This place is not available yet!");
break;
case Gyro::kMagicSpecial:
_vm->_animation->call_special(_vm->_gyro->_portals[fv]._data);
@@ -946,16 +946,16 @@ void Acci::openDoor() {
}
if (_vm->_gyro->_dna._room == r__map)
- _vm->_scrolls->display(Common::String("Avvy, you can complete the whole game without ever going "
+ _vm->_scrolls->displayText(Common::String("Avvy, you can complete the whole game without ever going "
"to anywhere other than Argent, Birmingham, Cardiff, Nottingham and Norwich."));
else
- _vm->_scrolls->display("Door? What door?");
+ _vm->_scrolls->displayText("Door? What door?");
}
void Acci::silly() {
- _vm->_scrolls->display("Don't be silly!");
+ _vm->_scrolls->displayText("Don't be silly!");
}
void Acci::putProc() {
@@ -974,10 +974,10 @@ void Acci::putProc() {
case Gyro::kObjectWine:
if (_thing == _vm->_gyro->kObjectOnion) {
if (_vm->_gyro->_dna._rottenOnion)
- _vm->_scrolls->display("That's a bit like shutting the stable door after the horse has bolted!");
+ _vm->_scrolls->displayText("That's a bit like shutting the stable door after the horse has bolted!");
else { // Put onion into wine?
if (_vm->_gyro->_dna._wineState != 3)
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "Oignon au vin"
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "Oignon au vin"
+ _vm->_scrolls->kControlRoman + " is a bit too strong for your tastes!");
else { // Put onion into vinegar! Yes!
_vm->_gyro->_dna._onionInVinegar = true;
@@ -992,31 +992,31 @@ void Acci::putProc() {
case 54:
if (_vm->_gyro->_dna._room == r__yours) { // Put something into the box.
if (_vm->_gyro->_dna._boxContent != kNothing)
- _vm->_scrolls->display("There's something in the box already, Avvy. Try taking that out first.");
+ _vm->_scrolls->displayText("There's something in the box already, Avvy. Try taking that out first.");
else {
switch (_thing) {
case Gyro::kObjectMoney:
- _vm->_scrolls->display("You'd better keep some ready cash on you!");
+ _vm->_scrolls->displayText("You'd better keep some ready cash on you!");
break;
case Gyro::kObjectBell:
- _vm->_scrolls->display("That's a silly place to keep a bell.");
+ _vm->_scrolls->displayText("That's a silly place to keep a bell.");
break;
case Gyro::kObjectBodkin:
- _vm->_scrolls->display("But you might need it!");
+ _vm->_scrolls->displayText("But you might need it!");
break;
case Gyro::kObjectOnion:
- _vm->_scrolls->display("Just give it to Spludwick, Avvy!");
+ _vm->_scrolls->displayText("Just give it to Spludwick, Avvy!");
break;
default: // Put the object into the box...
if (_vm->_gyro->_dna._wearing == _thing)
- _vm->_scrolls->display(Common::String("You'd better take ") + _vm->_gyro->getItem(_thing) + " off first!");
+ _vm->_scrolls->displayText(Common::String("You'd better take ") + _vm->_gyro->getItem(_thing) + " off first!");
else {
openBox(true); // Open box.
_vm->_gyro->_dna._boxContent = _thing;
_vm->_gyro->_dna._objects[_thing - 1] = false;
_vm->_lucerna->refreshObjectList();
- _vm->_scrolls->display("OK, it's in the box.");
+ _vm->_scrolls->displayText("OK, it's in the box.");
openBox(false); // Shut box.
}
@@ -1034,7 +1034,7 @@ void Acci::putProc() {
void Acci::notInOrder() {
- _vm->_scrolls->display(Common::String("Sorry, I need the ingredients in the right order for this potion. What I need next is ")
+ _vm->_scrolls->displayText(Common::String("Sorry, I need the ingredients in the right order for this potion. What I need next is ")
+ _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick])
+ _vm->_scrolls->kControlRegister + 2 + _vm->_scrolls->kControlSpeechBubble);
}
@@ -1110,21 +1110,21 @@ void Acci::drink() {
void Acci::cardiffClimbing() {
if (_vm->_gyro->_dna._standingOnDais) { // Clamber up.
- _vm->_scrolls->display("You climb down, back onto the floor.");
+ _vm->_scrolls->displayText("You climb down, back onto the floor.");
_vm->_gyro->_dna._standingOnDais = false;
_vm->_animation->apped(1, 3);
} else { // Clamber down.
if (_vm->_animation->infield(1)) {
- _vm->_scrolls->display("You clamber up onto the dais.");
+ _vm->_scrolls->displayText("You clamber up onto the dais.");
_vm->_gyro->_dna._standingOnDais = true;
_vm->_animation->apped(1, 2);
} else
- _vm->_scrolls->display("Get a bit closer, Avvy.");
+ _vm->_scrolls->displayText("Get a bit closer, Avvy.");
}
}
void Acci::already() {
- _vm->_scrolls->display("You're already standing!");
+ _vm->_scrolls->displayText("You're already standing!");
}
void Acci::standUp() {
@@ -1175,13 +1175,13 @@ void Acci::getProc(char thing) {
if (_vm->_animation->infield(2)) {
if (_vm->_gyro->_dna._boxContent == thing) {
_vm->_celer->drawBackgroundSprite(-1, -1, 5);
- _vm->_scrolls->display("OK, I've got it.");
+ _vm->_scrolls->displayText("OK, I've got it.");
_vm->_gyro->_dna._objects[thing - 1] = true;
_vm->_lucerna->refreshObjectList();
_vm->_gyro->_dna._boxContent = kNothing;
_vm->_celer->drawBackgroundSprite(-1, -1, 6);
} else
- _vm->_scrolls->display(Common::String("I can't see ") + _vm->_gyro->getItem(thing) + " in the box.");
+ _vm->_scrolls->displayText(Common::String("I can't see ") + _vm->_gyro->getItem(thing) + " in the box.");
} else
_vm->_visa->dixi('q', 57);
break;
@@ -1190,7 +1190,7 @@ void Acci::getProc(char thing) {
case Gyro::kObjectPen:
if (_vm->_animation->infield(2)) { // Standing on the dais.
if (_vm->_gyro->_dna._takenPen)
- _vm->_scrolls->display("It's not there, Avvy.");
+ _vm->_scrolls->displayText("It's not there, Avvy.");
else {
// OK: we're taking the pen, and it's there.
_vm->_celer->drawBackgroundSprite(-1, -1, 4); // No pen there now.
@@ -1198,7 +1198,7 @@ void Acci::getProc(char thing) {
_vm->_gyro->_dna._takenPen = true;
_vm->_gyro->_dna._objects[_vm->_gyro->kObjectPen - 1] = true;
_vm->_lucerna->refreshObjectList();
- _vm->_scrolls->display("Taken.");
+ _vm->_scrolls->displayText("Taken.");
}
} else if (_vm->_gyro->_dna._standingOnDais)
_vm->_visa->dixi('q', 53);
@@ -1215,7 +1215,7 @@ void Acci::getProc(char thing) {
case r__robins:
if ((thing == _vm->_gyro->kObjectMushroom) & (_vm->_animation->infield(1)) & (_vm->_gyro->_dna._mushroomGrowing)) {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
- _vm->_scrolls->display("Got it!");
+ _vm->_scrolls->displayText("Got it!");
_vm->_gyro->_dna._mushroomGrowing = false;
_vm->_gyro->_dna._takenMushroom = true;
_vm->_gyro->_dna._objects[_vm->_gyro->kObjectMushroom - 1] = true;
@@ -1235,7 +1235,7 @@ void Acci::getProc(char thing) {
*/
void Acci::giveGeidaTheLute() {
if (_vm->_gyro->_dna._room != r__lustiesroom) {
- _vm->_scrolls->display(Common::String("Not yet. Try later!") + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("Not yet. Try later!") + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
return;
}
_vm->_gyro->_dna._objects[_vm->_gyro->kObjectLute - 1] = false;
@@ -1248,9 +1248,9 @@ void Acci::giveGeidaTheLute() {
void Acci::playHarp() {
if (_vm->_animation->infield(7))
- _vm->_scrolls->musical_scroll();
+ _vm->_scrolls->musicalScroll();
else
- _vm->_scrolls->display("Get a bit closer to it, Avvy!");
+ _vm->_scrolls->displayText("Get a bit closer to it, Avvy!");
}
void Acci::winSequence() {
@@ -1271,7 +1271,7 @@ void Acci::personSpeaks() {
}
if (_vm->_gyro->_whereIs[_person - 150] != _vm->_gyro->_dna._room) {
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + '1' + _vm->_scrolls->kControlToBuffer); // Avvy himself!
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + '1' + _vm->_scrolls->kControlToBuffer); // Avvy himself!
return;
}
@@ -1279,7 +1279,7 @@ void Acci::personSpeaks() {
for (byte i = 0; i < _vm->_animation->kSpriteNumbMax; i++) {
if (_vm->_animation->tr[i].quick && ((_vm->_animation->tr[i]._stat.accinum + 149) == _person)) {
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + byte(i + 49) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + byte(i + 49) + _vm->_scrolls->kControlToBuffer);
found = true;
}
}
@@ -1287,13 +1287,13 @@ void Acci::personSpeaks() {
if (!found) {
for (byte i = 0; i < 16; i++) {
if ((_vm->_gyro->kQuasipeds[i]._who == _person) && (_vm->_gyro->kQuasipeds[i]._room == _vm->_gyro->_dna._room))
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + byte(i + 65) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + byte(i + 65) + _vm->_scrolls->kControlToBuffer);
}
}
}
void Acci::heyThanks() {
personSpeaks();
- _vm->_scrolls->display(Common::String("Hey, thanks!") + _vm->_scrolls->kControlSpeechBubble + "(But now, you've lost it!)");
+ _vm->_scrolls->displayText(Common::String("Hey, thanks!") + _vm->_scrolls->kControlSpeechBubble + "(But now, you've lost it!)");
_vm->_gyro->_dna._objects[_thing - 1] = false;
}
@@ -1321,11 +1321,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->display(Common::String("You're dead, so don't talk. What are you, a ghost or something? Try restarting, or restoring a saved game!"));
+ _vm->_scrolls->displayText(Common::String("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->_dna._avvyIsAwake && (_verb != kVerbCodeDie) && (_verb != kVerbCodeExpletive) && (_verb != kVerbCodeWake)) {
- _vm->_scrolls->display("Talking in your sleep? Try waking up!");
+ _vm->_scrolls->displayText("Talking in your sleep? Try waking up!");
return;
}
}
@@ -1338,24 +1338,24 @@ 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.
- _vm->_scrolls->display(Common::String("Game paused.") + _vm->_scrolls->kControlCenter + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ _vm->_scrolls->displayText(Common::String("Game paused.") + _vm->_scrolls->kControlCenter + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ "Press Enter, Esc, or click the mouse on the \"O.K.\" box to continue.");
break;
case kVerbCodeGet:
if (_thing != kPardon) { // Legitimate try to pick something up.
if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
- _vm->_scrolls->display("You can't carry any more!");
+ _vm->_scrolls->displayText("You can't carry any more!");
else
getProc(_thing);
} else { // Not... ditto.
if (_person != kPardon)
- _vm->_scrolls->display("You can't sweep folk off their feet!");
+ _vm->_scrolls->displayText("You can't sweep folk off their feet!");
else
- _vm->_scrolls->display("I assure you, you don't need it.");
+ _vm->_scrolls->displayText("I assure you, you don't need it.");
}
break;
case kVerbCodeDrop:
- _vm->_scrolls->display(Common::String("Two years ago you dropped a florin in the street. Three days ") +
+ _vm->_scrolls->displayText(Common::String("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:
@@ -1364,7 +1364,7 @@ void Acci::doThat() {
case kVerbCodeTalk:
if (_person == kPardon) {
if (_vm->_gyro->_subjectNum == 99) // They typed "say password".
- _vm->_scrolls->display(Common::String("Yes, but what ") + _vm->_scrolls->kControlItalic + "is" + _vm->_scrolls->kControlRoman + " the password?");
+ _vm->_scrolls->displayText(Common::String("Yes, but what ") + _vm->_scrolls->kControlItalic + "is" + _vm->_scrolls->kControlRoman + " the password?");
else if (((1 <= _vm->_gyro->_subjectNum) && (_vm->_gyro->_subjectNum <= 49)) || (_vm->_gyro->_subjectNum == 253) || (_vm->_gyro->_subjectNum == 249)) {
_thats.deleteChar(0);
@@ -1378,7 +1378,7 @@ void Acci::doThat() {
_person = _vm->_gyro->_subjectNum;
_vm->_gyro->_subjectNum = 0;
if ((_person == 0) || (_person == kPardon))
- _vm->_scrolls->display("Talk to whom?");
+ _vm->_scrolls->displayText("Talk to whom?");
else if (isPersonHere())
_vm->_visa->talkto(_person);
}
@@ -1388,30 +1388,30 @@ void Acci::doThat() {
case kVerbCodeGive:
if (holding()) {
if (_person == kPardon)
- _vm->_scrolls->display("Give to whom?");
+ _vm->_scrolls->displayText("Give to whom?");
else if (isPersonHere()) {
switch (_thing) {
case Gyro::kObjectMoney :
- _vm->_scrolls->display("You can't bring yourself to give away your moneybag.");
+ _vm->_scrolls->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->display("Don't give it away, it might be useful!");
+ _vm->_scrolls->displayText("Don't give it away, it might be useful!");
break;
default:
switch (_person) {
case Gyro::kPeopleCrapulus:
if (_thing == _vm->_gyro->kObjectWine) {
- _vm->_scrolls->display("Crapulus grabs the wine and gulps it down.");
+ _vm->_scrolls->displayText("Crapulus grabs the wine and gulps it down.");
_vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1] = false;
} else
heyThanks();
break;
case Gyro::kPeopleCwytalot:
if ((_thing == _vm->_gyro->kObjectCrossbow) || (_thing == _vm->_gyro->kObjectBolt))
- _vm->_scrolls->display(Common::String("You might be able to influence Cwytalot more if you used it!"));
+ _vm->_scrolls->displayText(Common::String("You might be able to influence Cwytalot more if you used it!"));
else
heyThanks();
break;
@@ -1443,7 +1443,7 @@ void Acci::doThat() {
} else
heyThanks();
} else
- _vm->_scrolls->display("But he's asleep!");
+ _vm->_scrolls->displayText("But he's asleep!");
break;
case Gyro::kPeopleGeida:
switch (_thing) {
@@ -1495,13 +1495,13 @@ void Acci::doThat() {
// We don't handle these two because we use ScummVM's save/load system.
case kVerbCodePay:
- _vm->_scrolls->display("No money need change hands.");
+ _vm->_scrolls->displayText("No money need change hands.");
break;
case kVerbCodeLook:
lookAround();
break;
case kVerbCodeBreak:
- _vm->_scrolls->display("Vandalism is prohibited within this game!");
+ _vm->_scrolls->displayText("Vandalism is prohibited within this game!");
break;
case kVerbCodeQuit: // quit
if (_vm->_gyro->kDemo) {
@@ -1511,15 +1511,15 @@ void Acci::doThat() {
// exit(0); // Change this later!!!
}
if (!_polite)
- _vm->_scrolls->display("How about a `please\", Avvy?");
- else if (_vm->_scrolls->ask(Common::String(_vm->_scrolls->kControlRegister) + 'C' + _vm->_scrolls->kControlIcon + "Do you really want to quit?"))
+ _vm->_scrolls->displayText("How about a `please\", Avvy?");
+ else if (_vm->_scrolls->displayQuestion(Common::String(_vm->_scrolls->kControlRegister) + 'C' + _vm->_scrolls->kControlIcon + "Do you really want to quit?"))
_vm->_gyro->_letMeOut = true;
break;
case kVerbCodeGo:
- _vm->_scrolls->display("Just use the arrow keys to walk there.");
+ _vm->_scrolls->displayText("Just use the arrow keys to walk there.");
break;
case kVerbCodeInfo: {
- _vm->_scrolls->aboutscroll = true;
+ _vm->_scrolls->_aboutScroll = true;
Common::String toDisplay;
for (byte i = 0; i < 7; i++)
@@ -1529,34 +1529,34 @@ void Acci::doThat() {
+ "Denarius Avaricius Sextus" + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ "version " + _vm->_gyro->kVersionNum + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Copyright \xEF "
+ _vm->_gyro->kCopyright + ", Mark, Mike and Thomas Thurman." + _vm->_scrolls->kControlRegister + 'Y' + _vm->_scrolls->kControlIcon;
- _vm->_scrolls->display(toDisplay);
- _vm->_scrolls->aboutscroll = false;
+ _vm->_scrolls->displayText(toDisplay);
+ _vm->_scrolls->_aboutScroll = false;
}
break;
case kVerbCodeUndress:
if (_vm->_gyro->_dna._wearing == kNothing)
- _vm->_scrolls->display("You're already stark naked!");
+ _vm->_scrolls->displayText("You're already stark naked!");
else if (_vm->_gyro->_dna._avvysInTheCupboard) {
- _vm->_scrolls->display(Common::String("You take off ") + _vm->_gyro->getItem(_vm->_gyro->_dna._wearing) + '.');
+ _vm->_scrolls->displayText(Common::String("You take off ") + _vm->_gyro->getItem(_vm->_gyro->_dna._wearing) + '.');
_vm->_gyro->_dna._wearing = kNothing;
_vm->_lucerna->refreshObjectList();
} else
- _vm->_scrolls->display("Hadn't you better find somewhere more private, Avvy?");
+ _vm->_scrolls->displayText("Hadn't you better find somewhere more private, Avvy?");
break;
case kVerbCodeWear:
if (holding()) { // Wear something.
switch (_thing) {
case Gyro::kObjectChastity:
// \? are used to avoid that ??! is parsed as a trigraph
- _vm->_scrolls->display("Hey, kWhat kind of a weirdo are you\?\?!");
+ _vm->_scrolls->displayText("Hey, kWhat kind of a weirdo are you\?\?!");
break;
case Gyro::kObjectClothes:
case Gyro::kObjectHabit: { // Change this!
if (_vm->_gyro->_dna._wearing != kNothing) {
if (_vm->_gyro->_dna._wearing == _thing)
- _vm->_scrolls->display("You're already wearing that.");
+ _vm->_scrolls->displayText("You're already wearing that.");
else
- _vm->_scrolls->display("You'll be rather warm wearing two sets of clothes!");
+ _vm->_scrolls->displayText("You'll be rather warm wearing two sets of clothes!");
return;
} else
_vm->_gyro->_dna._wearing = _thing;
@@ -1579,7 +1579,7 @@ void Acci::doThat() {
}
break;
default:
- _vm->_scrolls->display(kWhat);
+ _vm->_scrolls->displayText(kWhat);
}
}
break;
@@ -1617,7 +1617,7 @@ 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->display(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.")
+ _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.")
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Peter (uruk)");
}
break;
@@ -1640,29 +1640,29 @@ void Acci::doThat() {
if (_vm->_gyro->_dna._room == r__musicroom)
playHarp();
else
- _vm->_scrolls->display(kWhat);
+ _vm->_scrolls->displayText(kWhat);
break;
case 55:
if (_vm->_gyro->_dna._room == r__argentpub)
// play_nim();
warning("STUB: Acci::doThat() - case kVerbCodeplay");
else
- _vm->_scrolls->display(kWhat);
+ _vm->_scrolls->displayText(kWhat);
break;
default:
- _vm->_scrolls->display(kWhat);
+ _vm->_scrolls->displayText(kWhat);
}
}
break;
case kVerbCodeRing:
if (holding()) {
if (_thing == _vm->_gyro->kObjectBell) {
- _vm->_scrolls->display("Ding, dong, ding, dong, ding, dong, ding, dong...");
+ _vm->_scrolls->displayText("Ding, dong, ding, dong, ding, dong, ding, dong...");
if ((_vm->_gyro->_dna._bellsAreRinging) & (_vm->_gyro->setFlag('B')))
// \? are used to avoid that ??! is parsed as a trigraph
- _vm->_scrolls->display("(Are you trying to join in, Avvy\?\?!)");
+ _vm->_scrolls->displayText("(Are you trying to join in, Avvy\?\?!)");
} else
- _vm->_scrolls->display(kWhat);
+ _vm->_scrolls->displayText(kWhat);
}
break;
case kVerbCodeHelp:
@@ -1670,10 +1670,10 @@ void Acci::doThat() {
warning("STUB: Acci::doThat() - case kVerbCodehelp");
break;
case kVerbCodeLarrypass:
- _vm->_scrolls->display("Wrong game!");
+ _vm->_scrolls->displayText("Wrong game!");
break;
case kVerbCodePhaon:
- _vm->_scrolls->display("Hello, Phaon!");
+ _vm->_scrolls->displayText("Hello, Phaon!");
break;
case kVerbCodeBoss:
// bosskey();
@@ -1681,14 +1681,14 @@ void Acci::doThat() {
break;
case kVerbCodePee:
if (_vm->_gyro->setFlag('P')) {
- _vm->_scrolls->display("Hmm, I don't think anyone will notice...");
+ _vm->_scrolls->displayText("Hmm, I don't think anyone will notice...");
_vm->_timeout->set_up_timer(4, _vm->_timeout->procurinate, _vm->_timeout->reason_gototoilet);
} else
- _vm->_scrolls->display(Common::String("It would be ") + _vm->_scrolls->kControlItalic + "VERY"
+ _vm->_scrolls->displayText(Common::String("It would be ") + _vm->_scrolls->kControlItalic + "VERY"
+ _vm->_scrolls->kControlRoman + " unwise to do that here, Avvy!");
break;
case kVerbCodeCheat:
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "Cheat mode now enabled.");
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "Cheat mode now enabled.");
_vm->_gyro->_cheat = true;
break;
case kVerbCodeMagic:
@@ -1709,25 +1709,25 @@ void Acci::doThat() {
_vm->_timeout->set_up_timer(177, _vm->_timeout->procavaricius_talks, _vm->_timeout->reason_avariciustalks);
}
} else
- _vm->_scrolls->display("Nothing appears to happen...");
+ _vm->_scrolls->displayText("Nothing appears to happen...");
}
break;
case kVerbCodeSmartAlec:
- _vm->_scrolls->display("Listen, smart alec, that was just rhetoric.");
+ _vm->_scrolls->displayText("Listen, smart alec, that was just rhetoric.");
break;
case kVerbCodeExpletive:
switch (_vm->_gyro->_dna._sworeNum) {
case 0:
- _vm->_scrolls->display(Common::String("Avvy! Do you mind? There might be kids playing!")
+ _vm->_scrolls->displayText(Common::String("Avvy! Do you mind? There might be kids playing!")
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "(I shouldn't say it again, if I were you!)");
break;
case 1:
- _vm->_scrolls->display(Common::String("You hear a distant rumble of thunder. Must you always do things I tell you not to?")
+ _vm->_scrolls->displayText(Common::String("You hear a distant rumble of thunder. Must you always do things I tell you not to?")
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Don't do it again!");
break;
default:
_vm->_pingo->zonk();
- _vm->_scrolls->display(Common::String("A crack of lightning shoots from the sky, and fries you.")
+ _vm->_scrolls->displayText(Common::String("A crack of lightning shoots from the sky, and fries you.")
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "(`Such is the anger of the gods, Avvy!\")");
_vm->_lucerna->gameOver();
}
@@ -1735,11 +1735,11 @@ void Acci::doThat() {
break;
case kVerbCodeListen:
if ((_vm->_gyro->_dna._bellsAreRinging) & (_vm->_gyro->setFlag('B')))
- _vm->_scrolls->display("All other noise is drowned out by the ringing of the bells.");
+ _vm->_scrolls->displayText("All other noise is drowned out by the ringing of the bells.");
else if (_vm->_gyro->_listen.empty())
- _vm->_scrolls->display("You can't hear anything much at the moment, Avvy.");
+ _vm->_scrolls->displayText("You can't hear anything much at the moment, Avvy.");
else
- _vm->_scrolls->display(_vm->_gyro->_listen);
+ _vm->_scrolls->displayText(_vm->_gyro->_listen);
break;
case kVerbCodeBuy: // What are they trying to buy?
switch (_vm->_gyro->_dna._room) {
@@ -1764,7 +1764,7 @@ void Acci::doThat() {
_vm->_lucerna->incScore(3);
_vm->_celer->drawBackgroundSprite(-1, -1, 12);
- _vm->_scrolls->display(booze[_thing - 51] + ", please." + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(booze[_thing - 51] + ", please." + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
_vm->_gyro->_dna._drinking = _thing;
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
@@ -1784,12 +1784,12 @@ void Acci::doThat() {
}
if (_vm->_gyro->_dna._carryNum >= kCarryLimit) {
- _vm->_scrolls->display("Your hands are full.");
+ _vm->_scrolls->displayText("Your hands are full.");
return;
}
_vm->_celer->drawBackgroundSprite(-1, -1, 12);
- _vm->_scrolls->display(Common::String("Wine, please.") + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("Wine, please.") + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
if (_vm->_gyro->_dna._alcoholLevel == 0)
_vm->_lucerna->incScore(3);
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
@@ -1809,7 +1809,7 @@ void Acci::doThat() {
if (_vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1])
_vm->_visa->dixi('D', 10); // Not planning to juggle with the things!
else if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
- _vm->_scrolls->display("Before you ask, you remember that your hands are full.");
+ _vm->_scrolls->displayText("Before you ask, you remember that your hands are full.");
else {
if (_vm->_gyro->_dna._boughtOnion)
_vm->_visa->dixi('D', 11);
@@ -1845,13 +1845,13 @@ void Acci::doThat() {
// 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both.
case 0:
_vm->_visa->dixi('Q', 10);
- _vm->_scrolls->display("(At the very least, don't use your bare hands!)");
+ _vm->_scrolls->displayText("(At the very least, don't use your bare hands!)");
break;
case 1:
- _vm->_scrolls->display("Attack _vm->_gyro->him with only a crossbow bolt? Are you planning on playing darts?!");
+ _vm->_scrolls->displayText("Attack _vm->_gyro->him with only a crossbow bolt? Are you planning on playing darts?!");
break;
case 2:
- _vm->_scrolls->display("Come on, Avvy! You're not going to get very far with only a crossbow!");
+ _vm->_scrolls->displayText("Come on, Avvy! You're not going to get very far with only a crossbow!");
break;
case 3:
_vm->_visa->dixi('Q', 11);
@@ -1888,10 +1888,10 @@ void Acci::doThat() {
if (ok) {
if (_vm->_gyro->_dna._drawbridgeOpen != 0)
- _vm->_scrolls->display("Contrary to your expectations, the drawbridge fails to close again.");
+ _vm->_scrolls->displayText("Contrary to your expectations, the drawbridge fails to close again.");
else {
_vm->_lucerna->incScore(4);
- _vm->_scrolls->display("The drawbridge opens!");
+ _vm->_scrolls->displayText("The drawbridge opens!");
_vm->_timeout->set_up_timer(7, _vm->_timeout->procopen_drawbridge, _vm->_timeout->reason_drawbridgefalls);
_vm->_gyro->_dna._drawbridgeOpen = 1;
}
@@ -1906,7 +1906,7 @@ void Acci::doThat() {
_vm->_lucerna->gameOver();
break;
case kVerbCodeScore:
- _vm->_scrolls->display(Common::String("Your score is ") + _vm->_gyro->intToStr(_vm->_gyro->_dna._score) + ',' + _vm->_scrolls->kControlCenter
+ _vm->_scrolls->displayText(Common::String("Your score is ") + _vm->_gyro->intToStr(_vm->_gyro->_dna._score) + ',' + _vm->_scrolls->kControlCenter
+ _vm->_scrolls->kControlNewLine + "out of a possible 128." + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ "This gives you a rank of " + rank() + '.' + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + totalTime());
break;
@@ -1918,7 +1918,7 @@ void Acci::doThat() {
break;
case kVerbCodeKiss:
if (_person == kPardon)
- _vm->_scrolls->display("Kiss whom?");
+ _vm->_scrolls->displayText("Kiss whom?");
else if (isPersonHere()) {
switch (_person) {
case Gyro::kPeopleArkata:
@@ -1934,14 +1934,14 @@ void Acci::doThat() {
_vm->_visa->dixi('U', 5); // You WHAT?
}
} else if ((150 <= _person) && (_person <= 174))
- _vm->_scrolls->display("Hey, kWhat kind of a weirdo are you??");
+ _vm->_scrolls->displayText("Hey, kWhat kind of a weirdo are you??");
break;
case kVerbCodeClimb:
if (_vm->_gyro->_dna._room == r__insidecardiffcastle)
cardiffClimbing();
else // In the wrong room!
- _vm->_scrolls->display("Not with your head for heights, Avvy!");
+ _vm->_scrolls->displayText("Not with your head for heights, Avvy!");
break;
case kVerbCodeJump:
_vm->_timeout->set_up_timer(1, _vm->_timeout->procjump, _vm->_timeout->reason_jumping);
@@ -1965,24 +1965,24 @@ void Acci::doThat() {
if (_vm->_gyro->_dna._teetotal)
_vm->_visa->dixi('d', 13);
} else
- _vm->_scrolls->display("You're already awake, Avvy!");
+ _vm->_scrolls->displayText("You're already awake, Avvy!");
break;
case Gyro::kPeopleAyles:
if (!_vm->_gyro->_dna._aylesIsAwake)
- _vm->_scrolls->display("You can't seem to wake him by yourself.");
+ _vm->_scrolls->displayText("You can't seem to wake him by yourself.");
break;
case Gyro::kPeopleJacques:
- _vm->_scrolls->display(Common::String("Brother Jacques, Brother Jacques, are you asleep?") + _vm->_scrolls->kControlRegister + '1' +
+ _vm->_scrolls->displayText(Common::String("Brother Jacques, Brother Jacques, are you asleep?") + _vm->_scrolls->kControlRegister + '1' +
_vm->_scrolls->kControlSpeechBubble + "Hmmm... that doesn't seem to do any good...");
break;
default:
- _vm->_scrolls->display("It's difficult to awaken people who aren't asleep...!");
+ _vm->_scrolls->displayText("It's difficult to awaken people who aren't asleep...!");
}
break;
case kVerbCodeSit:
if (_vm->_gyro->_dna._room == r__nottspub) {
if (_vm->_gyro->_dna._sittingInPub)
- _vm->_scrolls->display("You're already sitting!");
+ _vm->_scrolls->displayText("You're already sitting!");
else {
_vm->_animation->tr[0].walkto(4); // Move Avvy to the place, and sit him down.
_vm->_timeout->set_up_timer(1, _vm->_timeout->procavvy_sit_down, _vm->_timeout->reason_sitting_down);
@@ -1991,29 +1991,29 @@ void Acci::doThat() {
_vm->_lucerna->dusk();
_vm->_gyro->hangAroundForAWhile();
_vm->_lucerna->dawn();
- _vm->_scrolls->display(Common::String("A few hours later...") + _vm->_scrolls->kControlParagraph + "nothing much has happened...");
+ _vm->_scrolls->displayText(Common::String("A few hours later...") + _vm->_scrolls->kControlParagraph + "nothing much has happened...");
}
break;
case kVerbCodeRestart:
- if (_vm->_scrolls->ask("Restart game and lose changes?")) {
+ if (_vm->_scrolls->displayQuestion("Restart game and lose changes?")) {
_vm->_lucerna->dusk();
_vm->_gyro->newGame();
_vm->_lucerna->dawn();
}
break;
case kPardon:
- _vm->_scrolls->display("Hey, a _verb would be helpful!");
+ _vm->_scrolls->displayText("Hey, a _verb would be helpful!");
break;
case kVerbCodeHello:
personSpeaks();
- _vm->_scrolls->display(Common::String("Hello.") + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("Hello.") + _vm->_scrolls->kControlSpeechBubble);
break;
case kVerbCodeThanks:
personSpeaks();
- _vm->_scrolls->display(Common::String("That's OK.") + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("That's OK.") + _vm->_scrolls->kControlSpeechBubble);
break;
default:
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlBell) + "Parser bug!");
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlBell) + "Parser bug!");
}
}
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 7b34c39be7..598ae7dfbe 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -236,7 +236,7 @@ void AnimationType::walk() {
break;
case Gyro::kMagicUnfinished: {
bounce();
- _tr->_vm->_scrolls->display("\7Sorry.\3\rThis place is not available yet!");
+ _tr->_vm->_scrolls->displayText("\7Sorry.\3\rThis place is not available yet!");
}
break;
case Gyro::kMagicSpecial:
@@ -551,18 +551,18 @@ void Animation::catamove(byte ped) {
switch (xy_uint16) {
case 1801: // Exit catacombs
fliproom(r__lustiesroom, 4);
- _vm->_scrolls->display("Phew! Nice to be out of there!");
+ _vm->_scrolls->displayText("Phew! Nice to be out of there!");
return;
case 1033: // Oubliette
fliproom(r__oubliette, 1);
- _vm->_scrolls->display(Common::String("Oh, NO!") + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("Oh, NO!") + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
return;
case 4:
fliproom(r__geidas, 1);
return;
case 2307:
fliproom(r__lusties, 5);
- _vm->_scrolls->display("Oh no... here we go again...");
+ _vm->_scrolls->displayText("Oh no... here we go again...");
_vm->_gyro->_dna._userMovesAvvy = false;
tr[0].iy = 1;
tr[0].ix = 0;
@@ -924,7 +924,7 @@ void Animation::call_special(uint16 which) {
_vm->_timeout->lose_timer(_vm->_timeout->reason_falling_down_oubliette);
//_vm->_lucerna->mblit(12, 80, 38, 160, 3, 0);
//_vm->_lucerna->mblit(12, 80, 38, 160, 3, 1);
- _vm->_scrolls->display("Oh dear, you seem to be down the bottom of an oubliette.");
+ _vm->_scrolls->displayText("Oh dear, you seem to be down the bottom of an oubliette.");
_vm->_timeout->set_up_timer(200, _vm->_timeout->procmeet_avaroid, _vm->_timeout->reason_meeting_avaroid);
break;
case 8: // _vm->_gyro->special 8: leave du Lustie's room.
@@ -1295,7 +1295,7 @@ void Animation::spin(byte whichway, byte &tripnum) {
_vm->_gyro->_dna._geidaSpin += 1;
_vm->_gyro->_dna._geidaTime = 20;
if (_vm->_gyro->_dna._geidaSpin == 5) {
- _vm->_scrolls->display("Steady on, Avvy, you'll make the poor girl dizzy!");
+ _vm->_scrolls->displayText("Steady on, Avvy, you'll make the poor girl dizzy!");
_vm->_gyro->_dna._geidaSpin = 0;
_vm->_gyro->_dna._geidaTime = 0; // knock out records
}
@@ -1461,12 +1461,12 @@ void Animation::getsetclear() {
void Animation::hide_in_the_cupboard() {
if (_vm->_gyro->_dna._avvysInTheCupboard) {
if (_vm->_gyro->_dna._wearing == Acci::kNothing)
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "AVVY!" + _vm->_scrolls->kControlRoman + "Get dressed first!");
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "AVVY!" + _vm->_scrolls->kControlRoman + "Get dressed first!");
else {
tr[0]._visible = true;
_vm->_gyro->_dna._userMovesAvvy = true;
apped(1, 3); // Walk out of the cupboard.
- _vm->_scrolls->display("You leave the cupboard. Nice to be out of there!");
+ _vm->_scrolls->displayText("You leave the cupboard. Nice to be out of there!");
_vm->_gyro->_dna._avvysInTheCupboard = false;
_vm->_sequence->first_show(8);
_vm->_sequence->then_show(7);
@@ -1476,7 +1476,7 @@ void Animation::hide_in_the_cupboard() {
// Not hiding in the cupboard
tr[0]._visible = false;
_vm->_gyro->_dna._userMovesAvvy = false;
- _vm->_scrolls->display(Common::String("You walk into the room...") + _vm->_scrolls->kControlParagraph
+ _vm->_scrolls->displayText(Common::String("You walk into the room...") + _vm->_scrolls->kControlParagraph
+ "It seems to be an empty, but dusty, cupboard. Hmmmm... you leave the door slightly open to avoid suffocation.");
_vm->_gyro->_dna._avvysInTheCupboard = true;
_vm->_celer->drawBackgroundSprite(-1, -1, 8);
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 0c9fdd2acd..9b04f640a3 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -479,7 +479,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_celer->updateBackgroundSprites();
- _scrolls->display(Common::String(_scrolls->kControlItalic) + "Loaded: " + _scrolls->kControlRoman + description + ".ASG"
+ _scrolls->displayText(Common::String(_scrolls->kControlItalic) + "Loaded: " + _scrolls->kControlRoman + description + ".ASG"
+ _scrolls->kControlCenter + _scrolls->kControlNewLine + _scrolls->kControlNewLine
+ _gyro->_roomnName + _scrolls->kControlNewLine + _scrolls->kControlNewLine
+ "saved on " + expandDate(t.tm_mday, t.tm_mon, t.tm_year) + '.');
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 54a1c2244d..72cb1d6192 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -132,7 +132,7 @@ void Avalot::handleKeyDown(Common::Event &event) {
void Avalot::setup() {
_vm->_gyro->_mouse = _vm->_gyro->kMouseStateNo;
_vm->_gyro->_letMeOut = false;
- _vm->_scrolls->resetscroll();
+ _vm->_scrolls->resetScroll();
CursorMan.showMouse(true);
_vm->_gyro->_holdTheDawn = true;
_vm->_lucerna->dusk();
@@ -152,7 +152,7 @@ void Avalot::setup() {
_vm->_gyro->_dna._direction = _vm->_gyro->kDirectionStopped;
_vm->_gyro->_enidFilename = ""; // Undefined.
_vm->_lucerna->drawToolbar();
- _vm->_scrolls->state(2);
+ _vm->_scrolls->setReadyLight(2);
for (byte i = 0; i < 3; i++)
_vm->_gyro->_scoreToDisplay[i] = -1; // Impossible digits.
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 4ea4de776f..6fa91cf87f 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -239,7 +239,7 @@ void Gyro::newGame() {
_score = 0;
memset(&_vm->_gyro->_dna, 0, sizeof(DnaType));
- _vm->_scrolls->natural();
+ _vm->_scrolls->setBubbleStateNatural();
_dna._spareEvening = "answer a questionnaire";
_dna._favouriteDrink = "beer";
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 1c191cb538..e56250f15c 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -74,7 +74,7 @@ void Clock::update() { // TODO: Move variables from Gyro to here (or at least so
plotHands();
if ((_hour == 0) && (_oldHour != 0) && (_oldHour != 17717))
- _vm->_scrolls->display(Common::String("Good morning!") + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ _vm->_scrolls->displayText(Common::String("Good morning!") + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
+ "Yes, it's just past midnight. Are you having an all-night Avvy session? Glad you like the game that much!");
_oldHour = _hour;
@@ -146,7 +146,7 @@ void Lucerna::init() {
*/
void Lucerna::callVerb(byte id) {
if (id == _vm->_acci->kPardon) {
- _vm->_scrolls->display(Common::String("The f5 key lets you do a particular action in certain ") +
+ _vm->_scrolls->displayText(Common::String("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.");
@@ -1242,7 +1242,7 @@ void Lucerna::spriteRun() {
void Lucerna::fixFlashers() {
_vm->_gyro->_ledStatus = 177;
_vm->_gyro->_oldDirection = 177;
- _vm->_scrolls->state(2);
+ _vm->_scrolls->setReadyLight(2);
drawDirection();
}
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index c445a7e164..444762b275 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -49,11 +49,11 @@ Scrolls::Scrolls(AvalancheEngine *vm) {
}
void Scrolls::init() {
- loadfont();
- resetscrolldriver();
+ loadFont();
+ resetScrollDriver();
}
-void Scrolls::state(byte x) { // Sets "Ready" light to whatever
+void Scrolls::setReadyLight(byte x) { // Sets "Ready" light to whatever
if (_vm->_gyro->_ledStatus == x)
return; // Already like that!
@@ -78,7 +78,7 @@ void Scrolls::state(byte x) { // Sets "Ready" light to whatever
_vm->_gyro->_ledStatus = x;
}
-void Scrolls::easteregg() {
+void Scrolls::easterEgg() {
warning("STUB: Scrolls::easteregg()");
}
@@ -93,16 +93,16 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { // Fancy FAST screenwrit
for (byte xx = 0; xx < lz; xx++) {
switch (z[xx]) {
case kControlRoman: {
- cfont = roman;
+ _currentFont = kFontStyleRoman;
}
break;
case kControlItalic: {
- cfont = italic;
+ _currentFont = kFontStyleItalic;
}
break;
default: {
for (byte yy = 0; yy < 12; yy++)
- itw[(byte)z[xx]][yy] = ch[cfont][(byte)z[xx]][yy + 2];
+ itw[(byte)z[xx]][yy] = _scrollFonts[_currentFont][(byte)z[xx]][yy + 2];
// We have to draw the characters one-by-one because of the accidental font changes.
i++;
@@ -115,11 +115,11 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { // Fancy FAST screenwrit
// Here are the procedures that Scroll calls. So they must be... $F+*/
-void Scrolls::normscroll() {
+void Scrolls::scrollModeNormal() {
Common::String egg = Common::String(kControlParagraph) + kControlLeftJustified + kControlNegative + kControlBell + kControlBackspace + "***";
Common::String e = "(c) 1994";
- state(3);
+ setReadyLight(3);
_vm->_gyro->_seeScroll = true;
CursorMan.showMouse(true);
_vm->_gyro->newMouse(4);
@@ -182,7 +182,7 @@ void Scrolls::normscroll() {
_vm->_gyro->screturn = r == '#'; // "back door"
#endif
- state(0);
+ setReadyLight(0);
_vm->_gyro->_seeScroll = false;
CursorMan.showMouse(false);
_vm->_lucerna->_holdLeftMouse = false; // Used in Lucerna::checkclick().
@@ -190,19 +190,19 @@ void Scrolls::normscroll() {
warning("STUB: Scrolls::normscroll()");
}
-void Scrolls::dialogue() {
+void Scrolls::scrollModeDialogue() {
warning("STUB: Scrolls::dialogue()");
}
-void Scrolls::store_(byte what, TuneType &played) {
+void Scrolls::store(byte what, TuneType &played) {
memcpy(played + 1, played + 2, sizeof(played) - 1);
played[30] = what;
}
-bool Scrolls::they_match(TuneType &played) {
+bool Scrolls::theyMatch(TuneType &played) {
byte fv, mistakes;
mistakes = 0;
@@ -216,8 +216,8 @@ bool Scrolls::they_match(TuneType &played) {
return mistakes < 5;
}
-void Scrolls::music_scroll() {
- state(3);
+void Scrolls::scrollModeMusic() {
+ setReadyLight(3);
_vm->_gyro->_seeScroll = true;
CursorMan.showMouse(true);
_vm->_gyro->newMouse(4);
@@ -229,7 +229,7 @@ void Scrolls::music_scroll() {
#endif
_vm->_gyro->_scReturn = true;
CursorMan.showMouse(false);
- state(0);
+ setReadyLight(0);
_vm->_gyro->_seeScroll = false;
_vm->_timeout->set_up_timer(8, _vm->_timeout->procjacques_wakes_up, _vm->_timeout->reason_jacques_waking_up);
@@ -247,30 +247,30 @@ void Scrolls::music_scroll() {
// ThatsAll, so put us back to $F-
-void Scrolls::resetscrolldriver() { // phew
+void Scrolls::resetScrollDriver() { // phew
_vm->_gyro->_scrollBells = 0;
- cfont = roman;
- use_icon = 0;
+ _currentFont = kFontStyleRoman;
+ _useIcon = 0;
_vm->_gyro->_interrogation = 0; // always reset after a scroll comes up.
}
-void Scrolls::dingdongbell() { // Pussy's in the well. Who put her in? Little...
+void Scrolls::ringBell() { // Pussy's in the well. Who put her in? Little...
for (byte fv = 0; fv < _vm->_gyro->_scrollBells; fv++)
_vm->_lucerna->errorLed(); // ring the bell "x" times
}
void Scrolls::dodgem() {
- dodgeCoord = _vm->getMousePos();
- g_system->warpMouse(dodgeCoord.x, _vm->_gyro->_underScroll); // Move the pointer off the scroll.
+ _dodgeCoord = _vm->getMousePos();
+ g_system->warpMouse(_dodgeCoord.x, _vm->_gyro->_underScroll); // Move the pointer off the scroll.
}
-void Scrolls::undodgem() {
+void Scrolls::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.
+ 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 Scrolls::getIcon(int16 x, int16 y, byte which) {
Common::File f;
byte *p;
@@ -292,7 +292,7 @@ void Scrolls::geticon(int16 x, int16 y, byte which) {
f.close();
}
-void Scrolls::block_drop(Common::String fn, int16 xl, int16 yl, int16 y) {
+void Scrolls::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) {
Common::File f;
Common::String filename;
@@ -321,7 +321,7 @@ void Scrolls::block_drop(Common::String fn, int16 xl, int16 yl, int16 y) {
f.close();
}
-void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in the game.
+void Scrolls::drawScroll(ScrollsFunctionType gotoit) { // This is one of the oldest procs in the game.
byte b;
int16 lx, ly, mx, my, ex;
bool centre;
@@ -343,8 +343,8 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
lx = lx / 2;
ly -= 2;
- if ((1 <= use_icon) && (use_icon <= 34))
- lx += halficonwidth;
+ if ((1 <= _useIcon) && (_useIcon <= 34))
+ lx += kHalfIconWidth;
_vm->_graphics->_scrolls.copyFrom(_vm->_graphics->_surface);
@@ -382,24 +382,24 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
centre = false;
- switch (use_icon) {
+ switch (_useIcon) {
case 0:
icon_indent = 0;
break; // No icon.
case 34: {
- block_drop("about", 28, 76, 15);
+ drawSign("about", 28, 76, 15);
icon_indent = 0;
}
break;
case 35: {
- block_drop("gameover", 52, 59, 71);
+ drawSign("gameover", 52, 59, 71);
icon_indent = 0;
}
break;
}
- if ((1 <= use_icon) && (use_icon <= 33)) { // Standard icon.
- geticon(mx, my + ly / 2, use_icon);
+ if ((1 <= _useIcon) && (_useIcon <= 33)) { // Standard icon.
+ getIcon(mx, my + ly / 2, _useIcon);
icon_indent = 53;
}
@@ -419,13 +419,13 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
break;
case kControlQuestion: {
//settextjustify(1, 1);
- dix = mx + lx;
- diy = my + ly;
+ _shadowBoxX = mx + lx;
+ _shadowBoxY = my + ly;
_vm->_gyro->_scroll[b].setChar(' ', 0);
// byte groi = *_vm->_graphics->getPixel(0, 0);
// inc(diy,14);
- _vm->_gyro->drawShadowBox(dix - 65, diy - 24, dix - 5, diy - 10, "Yes.");
- _vm->_gyro->drawShadowBox(dix + 5, diy - 24, dix + 65, diy - 10, "No.");
+ _vm->_gyro->drawShadowBox(_shadowBoxX - 65, _shadowBoxY - 24, _shadowBoxX - 5, _shadowBoxY - 10, "Yes.");
+ _vm->_gyro->drawShadowBox(_shadowBoxX + 5, _shadowBoxY - 24, _shadowBoxX + 65, _shadowBoxY - 10, "No.");
}
break;
}
@@ -440,14 +440,14 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_gyro->_underScroll = my * 2 + 6; // Multiplying because of the doubled screen height.
//setvisualpage(1 - cp);
- dingdongbell();
+ ringBell();
//my = getpixel(0, 0);
_vm->_gyro->_dropsOk = false;
dodgem();
(this->*gotoit)();
- undodgem();
+ unDodgem();
_vm->_gyro->_dropsOk = true;
//setvisualpage(cp);
//mousepage(cp);
@@ -458,14 +458,14 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_gyro->_onCanDoPageSwap = true; // Normality again.
CursorMan.showMouse(true);
//settextjustify(0, 0); // sink
- resetscrolldriver();
+ resetScrollDriver();
/*if (_vm->_gyro->mpress > 0)
_vm->_gyro->after_the_scroll = true;*/
warning("STUB: Scrolls::drawscroll()");
}
-void Scrolls::bubble(func2 gotoit) {
+void Scrolls::drawBubble(ScrollsFunctionType gotoit) {
int16 xl, yl, my, xw, yw;
Common::Point p[3];
// byte *rp1, *rp2; // replace: 1=bubble, 2=pointer
@@ -536,7 +536,7 @@ void Scrolls::bubble(func2 gotoit) {
}
//setvisualpage(1 - cp);
- dingdongbell();
+ ringBell();
_vm->_gyro->_onCanDoPageSwap = false;
CursorMan.showMouse(true);
_vm->_gyro->_dropsOk = false;
@@ -550,31 +550,31 @@ void Scrolls::bubble(func2 gotoit) {
//setvisualpage(cp);
CursorMan.showMouse(true); // sink;
_vm->_gyro->_onCanDoPageSwap = true;
- resetscrolldriver();
+ resetScrollDriver();
/*if (_vm->_gyro->mpress > 0)
_vm->_gyro->after_the_scroll = true;*/
}
-bool Scrolls::ask(Common::String question) {
+bool Scrolls::displayQuestion(Common::String question) {
warning("STUB: Scrolls::ask()");
return true;
}
-void Scrolls::resetscroll() {
+void Scrolls::resetScroll() {
_vm->_gyro->_scrollNum = 1;
for (int j = 0; j < 15; j++)
if (!_vm->_gyro->_scroll[j].empty())
_vm->_gyro->_scroll[j].clear();
}
-void Scrolls::natural() { // Natural state of bubbles
+void Scrolls::setBubbleStateNatural() {
_vm->_gyro->_talkX = 320;
_vm->_gyro->_talkY = 200;
_vm->_gyro->_talkBackgroundColor = 8;
_vm->_gyro->_talkFontColor = 15;
}
-Common::String Scrolls::lsd() {
+Common::String Scrolls::displayMoney() {
Common::String x;
if (_vm->_gyro->_dna._money < 12) { // just pence
@@ -597,7 +597,7 @@ Common::String Scrolls::lsd() {
-void Scrolls::strip(Common::String &q) {
+void Scrolls::stripTrailingSpaces(Common::String &q) {
while (q[q.size() - 1] == ' ') {
q.deleteLastChar();
}
@@ -613,10 +613,10 @@ void Scrolls::solidify(byte n) {
_vm->_gyro->_scroll[n].deleteLastChar();
} while (_vm->_gyro->_scroll[n][_vm->_gyro->_scroll[n].size() - 1] != ' ');
- strip(_vm->_gyro->_scroll[n]);
+ stripTrailingSpaces(_vm->_gyro->_scroll[n]);
}
-void Scrolls::calldrivers() {
+void Scrolls::callScrollDriver() {
uint16 fv;
byte nn;
bool mouthnext;
@@ -627,7 +627,7 @@ void Scrolls::calldrivers() {
//nosound();
warning("STUB: Scrolls::calldrivers()");
- state(0);
+ setReadyLight(0);
_vm->_gyro->_scReturn = false;
mouthnext = false;
call_spriterun = true;
@@ -650,11 +650,11 @@ void Scrolls::calldrivers() {
for (fv = 0; fv < size; fv++) {
if (mouthnext) {
if (_vm->_gyro->_buffer[fv] == kControlRegister)
- param = 0;
+ _param = 0;
else if (('0' <= _vm->_gyro->_buffer[fv]) && (_vm->_gyro->_buffer[fv] <= '9'))
- param = _vm->_gyro->_buffer[fv] - 48;
+ _param = _vm->_gyro->_buffer[fv] - 48;
else if (('A' <= _vm->_gyro->_buffer[fv]) && (_vm->_gyro->_buffer[fv] <= 'Z'))
- param = _vm->_gyro->_buffer[fv] - 55;
+ _param = _vm->_gyro->_buffer[fv] - 55;
mouthnext = false;
} else {
@@ -667,9 +667,9 @@ void Scrolls::calldrivers() {
_vm->_lucerna->spriteRun();
call_spriterun = false;
- drawscroll(&Avalanche::Scrolls::normscroll);
+ drawScroll(&Avalanche::Scrolls::scrollModeNormal);
- resetscroll();
+ resetScroll();
if (_vm->_gyro->_scReturn)
return;
@@ -686,58 +686,58 @@ void Scrolls::calldrivers() {
_vm->_lucerna->spriteRun();
call_spriterun = false;
- if (param == 0)
- natural();
- else if ((1 <= param) && (param <= 9)) {
- if ((param > _vm->_animation->kSpriteNumbMax) || (!_vm->_animation->tr[param - 1].quick)) { // Not valid.
+ if (_param == 0)
+ setBubbleStateNatural();
+ else if ((1 <= _param) && (_param <= 9)) {
+ if ((_param > _vm->_animation->kSpriteNumbMax) || (!_vm->_animation->tr[_param - 1].quick)) { // Not valid.
_vm->_lucerna->errorLed();
- natural();
+ setBubbleStateNatural();
} else
- _vm->_animation->tr[param - 1].chatter(); // Normal sprite talking routine.
- } else if ((10 <= param) && (param <= 36)) {
+ _vm->_animation->tr[_param - 1].chatter(); // Normal sprite talking routine.
+ } else if ((10 <= _param) && (_param <= 36)) {
// Quasi-peds. (This routine performs the same
// thing with QPs as triptype.chatter does with the
// sprites.)
- _vm->_gyro->_talkX = _vm->_gyro->_peds[_vm->_gyro->kQuasipeds[param - 10]._whichPed - 1]._x;
- _vm->_gyro->_talkY = _vm->_gyro->_peds[_vm->_gyro->kQuasipeds[param - 10]._whichPed - 1]._y; // Position.
+ _vm->_gyro->_talkX = _vm->_gyro->_peds[_vm->_gyro->kQuasipeds[_param - 10]._whichPed - 1]._x;
+ _vm->_gyro->_talkY = _vm->_gyro->_peds[_vm->_gyro->kQuasipeds[_param - 10]._whichPed - 1]._y; // Position.
- _vm->_gyro->_talkFontColor = _vm->_gyro->kQuasipeds[param - 10]._foregroundColor;
- _vm->_gyro->_talkBackgroundColor = _vm->_gyro->kQuasipeds[param - 10]._backgroundColor; // Colors.
+ _vm->_gyro->_talkFontColor = _vm->_gyro->kQuasipeds[_param - 10]._foregroundColor;
+ _vm->_gyro->_talkBackgroundColor = _vm->_gyro->kQuasipeds[_param - 10]._backgroundColor; // Colors.
} else {
_vm->_lucerna->errorLed(); // Not valid.
- natural();
+ setBubbleStateNatural();
}
- bubble(&Avalanche::Scrolls::normscroll);
+ drawBubble(&Avalanche::Scrolls::scrollModeNormal);
- resetscroll();
+ resetScroll();
if (_vm->_gyro->_scReturn)
return;
}
break;
case kControlNegative:
- switch (param) {
+ switch (_param) {
case 1:
- display(lsd() + kControlToBuffer); // Insert cash balance. (Recursion)
+ displayText(displayMoney() + kControlToBuffer); // Insert cash balance. (Recursion)
break;
case 2:
- display(_vm->_acci->kVocabulary[_vm->_acci->kFirstPassword + _vm->_gyro->_dna._passwordNum]._word + kControlToBuffer);
+ displayText(_vm->_acci->kVocabulary[_vm->_acci->kFirstPassword + _vm->_gyro->_dna._passwordNum]._word + kControlToBuffer);
break;
case 3:
- display(_vm->_gyro->_dna._favouriteDrink + kControlToBuffer);
+ displayText(_vm->_gyro->_dna._favouriteDrink + kControlToBuffer);
break;
case 4:
- display(_vm->_gyro->_dna._favouriteSong + kControlToBuffer);
+ displayText(_vm->_gyro->_dna._favouriteSong + kControlToBuffer);
break;
case 5:
- display(_vm->_gyro->_dna._worstPlaceOnEarth + kControlToBuffer);
+ displayText(_vm->_gyro->_dna._worstPlaceOnEarth + kControlToBuffer);
break;
case 6:
- display(_vm->_gyro->_dna._spareEvening + kControlToBuffer);
+ displayText(_vm->_gyro->_dna._spareEvening + kControlToBuffer);
break;
case 9:
- display(_vm->_gyro->intToStr(_vm->_gyro->_dna._catacombX) + ',' + _vm->_gyro->intToStr(_vm->_gyro->_dna._catacombY) + kControlToBuffer);
+ displayText(_vm->_gyro->intToStr(_vm->_gyro->_dna._catacombX) + ',' + _vm->_gyro->intToStr(_vm->_gyro->_dna._catacombY) + kControlToBuffer);
break;
case 10:
switch (_vm->_gyro->_dna._boxContent) {
@@ -750,10 +750,10 @@ void Scrolls::calldrivers() {
}
break;
case Acci::kNothing:
- display("nothing at all. It's completely empty.");
+ displayText("nothing at all. It's completely empty.");
break;
default:
- display(_vm->_gyro->getItem(_vm->_gyro->_dna._boxContent) + '.');
+ displayText(_vm->_gyro->getItem(_vm->_gyro->_dna._boxContent) + '.');
}
break;
case 11:
@@ -761,14 +761,14 @@ void Scrolls::calldrivers() {
for (byte nnn = 0; nnn < kObjectNum; nnn++) {
if (_vm->_gyro->_dna._objects[nnn]) {
nn++;
- display(_vm->_gyro->getItem(nnn) + ", " + kControlToBuffer);
+ displayText(_vm->_gyro->getItem(nnn) + ", " + kControlToBuffer);
}
}
break;
}
break;
case kControlIcon:
- use_icon = param;
+ _useIcon = _param;
break;
case kControlNewLine:
_vm->_gyro->_scrollNum++;
@@ -781,9 +781,9 @@ void Scrolls::calldrivers() {
_vm->_gyro->_scrollNum++;
_vm->_gyro->_scroll[_vm->_gyro->_scrollNum - 1] = kControlQuestion;
- drawscroll(&Avalanche::Scrolls::dialogue);
+ drawScroll(&Avalanche::Scrolls::scrollModeDialogue);
- resetscroll();
+ resetScroll();
}
break;
case kControlRegister:
@@ -805,13 +805,13 @@ void Scrolls::calldrivers() {
}
}
-void Scrolls::display(Common::String z) { // TODO: REPLACE BUFFER WITH A STRING!!!!!!!!!!
+void Scrolls::displayText(Common::String z) { // TODO: REPLACE BUFFER WITH A STRING!!!!!!!!!!
_vm->_gyro->_bufSize = z.size();
memcpy(_vm->_gyro->_buffer, z.c_str(), _vm->_gyro->_bufSize);
- calldrivers();
+ callScrollDriver();
}
-void Scrolls::loadfont() {
+void Scrolls::loadFont() {
Common::File f;
if (!f.open("avalot.fnt")) {
@@ -819,7 +819,7 @@ void Scrolls::loadfont() {
return;
}
for (int16 i = 0; i < 256; i++)
- f.read(ch[0][i], 16);
+ f.read(_scrollFonts[0][i], 16);
f.close();
if (!f.open("avitalic.fnt")) {
@@ -827,7 +827,7 @@ void Scrolls::loadfont() {
return;
}
for (int16 i = 0; i < 256; i++)
- f.read(ch[1][i], 16);
+ f.read(_scrollFonts[1][i], 16);
f.close();
if (!f.open("ttsmall.fnt")) {
@@ -839,20 +839,16 @@ void Scrolls::loadfont() {
f.close();
}
-void Scrolls::okay() {
- display("Okay!");
-}
-
-void Scrolls::musical_scroll() {
- display(Common::String("To play the harp...") + kControlNewLine + kControlNewLine + "Use these keys:" + + kControlNewLine
+void Scrolls::musicalScroll() {
+ displayText(Common::String("To play the harp...") + kControlNewLine + kControlNewLine + "Use these keys:" + + kControlNewLine
+ kControlInsertSpaces + "Q W E R T Y U I O P [ ]" + kControlNewLine + kControlNewLine + "Or press Enter to stop playing."
+ kControlToBuffer);
_vm->_lucerna->spriteRun();
- drawscroll(&Avalanche::Scrolls::music_scroll);
+ drawScroll(&Avalanche::Scrolls::scrollModeMusic);
- resetscroll();
+ resetScroll();
}
} // End of namespace Avalanche
diff --git a/engines/avalanche/scrolls2.h b/engines/avalanche/scrolls2.h
index 3c1efc92ac..c043e4a30d 100644
--- a/engines/avalanche/scrolls2.h
+++ b/engines/avalanche/scrolls2.h
@@ -37,115 +37,85 @@ class AvalancheEngine;
class Scrolls;
-typedef void (Scrolls::*func2)();
+typedef void (Scrolls::*ScrollsFunctionType)();
class Scrolls {
public:
// Constants to replace the command characters from Pascal.
// For more information, see: https://github.com/urukgit/avalot/wiki/Scrolldrivers
-
- static const char kControlSpeechBubble = 2; // ^B
- static const char kControlCenter = 3; // ^C
- static const char kControlToBuffer = 4; // ^D
- static const char kControlItalic = 6; // ^F
- static const char kControlBell = 7; // ^G
- static const char kControlBackspace = 8; // ^H
- static const char kControlInsertSpaces = 9; // ^I
- static const char kControlLeftJustified = 12; // ^L
- static const char kControlNewLine = 13; // ^M
- static const char kControlParagraph = 16; // ^P
- static const char kControlQuestion = 17; // ^Q
- static const char kControlRoman = 18; // ^R
- static const char kControlRegister = 19; // ^S
- static const char kControlNegative = 21; // ^U
- static const char kControlIcon = 22; // ^V
-
-
-
- bool aboutscroll; // Is this the about box?
-
-
+ enum ControlCharacter {
+ kControlSpeechBubble = 2, // ^B
+ kControlCenter = 3, // ^C
+ kControlToBuffer = 4, // ^D
+ kControlItalic = 6, // ^F
+ kControlBell = 7, // ^G
+ kControlBackspace = 8, // ^H
+ kControlInsertSpaces = 9, // ^I
+ kControlLeftJustified = 12, // ^L
+ kControlNewLine = 13, // ^M
+ kControlParagraph = 16, // ^P
+ kControlQuestion = 17, // ^Q
+ kControlRoman = 18, // ^R
+ kControlRegister = 19, // ^S
+ kControlNegative = 21, // ^U
+ kControlIcon = 22 // ^V
+ };
+
+ bool _aboutScroll; // Is this the about box?
+ FontType _scrollFonts[2];
Scrolls(AvalancheEngine *vm);
void init();
-
- void state(byte x); // Sets "Ready" light to whatever
-
- void drawscroll(func2 gotoit); // This is one of the oldest funcs in the game.
-
- void bubble(func2 gotoit);
-
- void resetscroll();
-
- void calldrivers();
-
- void display(Common::String z);
-
- bool ask(Common::String question);
-
- void natural();
-
- Common::String lsd();
-
- void okay(); // Says "Okay!"
-
- void musical_scroll();
-
- FontType ch[2];
+ void setReadyLight(byte x); // Sets "Ready" light to whatever.
+ void drawScroll(ScrollsFunctionType modeFunc);
+ void drawBubble(ScrollsFunctionType modeFunc);
+ void resetScroll();
+ void callScrollDriver();
+ 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.
private:
AvalancheEngine *_vm;
- static const int16 roman = 0;
- static const int16 italic = 1;
-
- static const int16 halficonwidth = 19; // Half the width of an icon.
-
+ enum FontStyle {
+ kFontStyleRoman,
+ kFontStyleItalic
+ };
+ static const int16 kHalfIconWidth = 19; // Half the width of an icon.
- int16 dix, diy;
+ int16 _shadowBoxX, _shadowBoxY;
+ byte _currentFont; // Current font
+ Common::Point _dodgeCoord;
+ byte _param; // For using arguments code
+ byte _useIcon;
- byte cfont; // Current font
+ // These 3 functions are always passed as ScrollsFunctionType parameters.
+ void scrollModeNormal();
+ void scrollModeDialogue();
+ void scrollModeMusic();
- Common::Point dodgeCoord;
- byte param; // For using arguments code
-
- byte use_icon;
-
-
-
- void easteregg();
-
- void say(int16 x, int16 y, Common::String z);
-
- void normscroll();
-
- void dialogue();
-
- void store_(byte what, TuneType &played);
-
- bool they_match(TuneType &played);
-
- void music_scroll();
-
- void resetscrolldriver();
-
- void dingdongbell();
-
- void dodgem(); // This moves the mouse pointer off the scroll so that you can read it.
-
- void undodgem(); // This is the opposite of Dodgem. It moves the mouse pointer back, IF you haven't moved it in the meantime.
-
- void geticon(int16 x, int16 y, byte which);
-
- void block_drop(Common::String fn, int16 xl, int16 yl, int16 y);
-
- void strip(Common::String &q); // Strip trailing spaces.
+ // These 2 are used only in musicalScroll().
+ void store(byte what, TuneType &played);
+ bool theyMatch(TuneType &played);
+ void stripTrailingSpaces(Common::String &str); // Original: strip.
void solidify(byte n); // Does the word wrapping.
- void loadfont();
+ void dodgem(); // This moves the mouse pointer off the scroll so that you can read it.
+ void unDodgem(); // This is the opposite of Dodgem. It moves the mouse pointer back, IF you haven't moved it in the meantime.
+
+ void easterEgg();
+ void say(int16 x, int16 y, Common::String text);
+ void resetScrollDriver();
+ void ringBell(); // Original: dingdongbell
+ void getIcon(int16 x, int16 y, byte which);
+ void drawSign(Common::String name, int16 xl, int16 yl, int16 y); // This is for drawing a big "about" or "gameover" picture loaded from a file into an empty scroll.
+ void loadFont();
};
} // End of namespace Avalanche
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 7ba2136868..69f6cce2ac 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -250,16 +250,16 @@ void Timeout::urinate() {
}
void Timeout::toilet2() {
- _vm->_scrolls->display("That's better!");
+ _vm->_scrolls->displayText("That's better!");
}
void Timeout::bang() {
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "< BANG! >");
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "< BANG! >");
set_up_timer(30, procbang2, reason_explosion);
}
void Timeout::bang2() {
- _vm->_scrolls->display("Hmm... sounds like Spludwick's up to something...");
+ _vm->_scrolls->displayText("Hmm... sounds like Spludwick's up to something...");
}
void Timeout::stairs() {
@@ -352,7 +352,7 @@ void Timeout::after_the_shootemup() {
_vm->_lucerna->refreshObjectList();
// Same as the added line above: TODO: Remove it later!!!
- _vm->_scrolls->display(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.")
+ _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.")
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Peter (uruk)");
#if 0
@@ -475,7 +475,7 @@ void Timeout::jump() {
&& (_vm->_animation->infield(3))) { // Beside the wall
// Grab the arrow!
if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
- _vm->_scrolls->display("You fail to grab it, because your hands are full.");
+ _vm->_scrolls->displayText("You fail to grab it, because your hands are full.");
else {
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
_vm->_gyro->_dna._arrowInTheDoor = false; // You've got it.
@@ -537,7 +537,7 @@ void Timeout::fall_down_oubliette() {
void Timeout::meet_avaroid() {
if (_vm->_gyro->_dna._metAvaroid) {
- _vm->_scrolls->display(Common::String("You can't expect to be ") + _vm->_scrolls->kControlItalic + "that"
+ _vm->_scrolls->displayText(Common::String("You can't expect to be ") + _vm->_scrolls->kControlItalic + "that"
+ _vm->_scrolls->kControlRoman + " lucky twice in a row!");
_vm->_lucerna->gameOver();
} else {
@@ -605,7 +605,7 @@ void Timeout::avvy_sit_down() {
}
void Timeout::ghost_room_phew() {
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "PHEW!" + _vm->_scrolls->kControlRoman
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "PHEW!" + _vm->_scrolls->kControlRoman
+ " You're glad to get out of " + _vm->_scrolls->kControlItalic + "there!");
}
@@ -631,7 +631,7 @@ void Timeout::winning() {
// TODO: To be implemented with Pingo::winningPic().
_vm->_lucerna->callVerb(_vm->_acci->kVerbCodeScore);
- _vm->_scrolls->display(" T H E E N D ");
+ _vm->_scrolls->displayText(" T H E E N D ");
_vm->_gyro->_letMeOut = true;
}
@@ -646,7 +646,7 @@ void Timeout::avalot_falls() {
for (byte i = 0; i < 6; i++)
toDisplay += _vm->_scrolls->kControlInsertSpaces;
toDisplay = toDisplay + _vm->_scrolls->kControlRegister + 'Z' + _vm->_scrolls->kControlIcon;
- _vm->_scrolls->display(toDisplay);
+ _vm->_scrolls->displayText(toDisplay);
}
}
diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp
index f3288ddd76..c657a4a87a 100644
--- a/engines/avalanche/visa2.cpp
+++ b/engines/avalanche/visa2.cpp
@@ -83,7 +83,7 @@ void Visa::dixi(char block, byte point, bool report, bool bubbling) {
if (report) {
Common::String todisplay;
todisplay.format("%cError accessing scroll %c%s", 7, block, _vm->_gyro->intToStr(point).c_str());
- _vm->_scrolls->display(todisplay);
+ _vm->_scrolls->displayText(todisplay);
}
return;
}
@@ -101,7 +101,7 @@ void Visa::dixi(char block, byte point, bool report, bool bubbling) {
if (bubbling)
do_the_bubble();
- _vm->_scrolls->calldrivers();
+ _vm->_scrolls->callScrollDriver();
}
void Visa::speech(byte who, byte subject) {
@@ -145,7 +145,7 @@ void Visa::speech(byte who, byte subject) {
unskrimble();
do_the_bubble();
- _vm->_scrolls->calldrivers();
+ _vm->_scrolls->callScrollDriver();
went_ok = true;
}
@@ -177,7 +177,7 @@ void Visa::talkto(byte whom) {
switch (_vm->_gyro->_dna._givenToSpludwick) {
case 1: // Falltrough is intended.
case 2:{
- _vm->_scrolls->display(Common::String("Can you get me ") + _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick]) + ", please?" + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
+ _vm->_scrolls->displayText(Common::String("Can you get me ") + _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick]) + ", please?" + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
return;
}
break;
@@ -254,13 +254,13 @@ void Visa::talkto(byte whom) {
no_matches = true;
for (fv = 0; fv <= _vm->_animation->kSpriteNumbMax; fv++)
if (_vm->_animation->tr[fv]._stat.accinum == whom) {
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + (fv + 49) + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + (fv + 49) + _vm->_scrolls->kControlToBuffer);
no_matches = false;
break;
}
if (no_matches)
- _vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + _vm->_scrolls->kControlRegister + _vm->_scrolls->kControlToBuffer);
+ _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + _vm->_scrolls->kControlRegister + _vm->_scrolls->kControlToBuffer);
speech(whom, _vm->_gyro->_subjectNum);