aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-09-06 16:23:57 +0200
committeruruk2013-09-06 16:23:57 +0200
commit200670d32703179a0cd2746981bdc1992a86d17b (patch)
treeb1cfca5a32d1c9044fa6eb3d90cb1492aa516d32 /engines
parent95a4ccac510747409a42420992bd90884984f798 (diff)
downloadscummvm-rg350-200670d32703179a0cd2746981bdc1992a86d17b.tar.gz
scummvm-rg350-200670d32703179a0cd2746981bdc1992a86d17b.tar.bz2
scummvm-rg350-200670d32703179a0cd2746981bdc1992a86d17b.zip
AVALANCHE: More renaming in gyro2.h.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/acci2.cpp600
-rw-r--r--engines/avalanche/avalanche.cpp208
-rw-r--r--engines/avalanche/avalot.cpp60
-rw-r--r--engines/avalanche/celer2.cpp98
-rw-r--r--engines/avalanche/celer2.h2
-rw-r--r--engines/avalanche/dropdown2.cpp154
-rw-r--r--engines/avalanche/enid2.cpp30
-rw-r--r--engines/avalanche/gyro2.cpp238
-rw-r--r--engines/avalanche/gyro2.h552
-rw-r--r--engines/avalanche/lucerna2.cpp440
-rw-r--r--engines/avalanche/parser.cpp22
-rw-r--r--engines/avalanche/scrolls2.cpp254
-rw-r--r--engines/avalanche/sequence2.cpp10
-rw-r--r--engines/avalanche/timeout2.cpp136
-rw-r--r--engines/avalanche/trip6.cpp448
-rw-r--r--engines/avalanche/trip6.h14
-rw-r--r--engines/avalanche/visa2.cpp84
17 files changed, 1600 insertions, 1750 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 05d4166407..7b3e84fd60 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -208,7 +208,7 @@ Acci::Acci(AvalancheEngine *vm) {
}
void Acci::init() {
- _vm->_gyro->weirdword = false;
+ _vm->_gyro->_weirdWord = false;
}
void Acci::clearWords() {
@@ -252,7 +252,7 @@ void Acci::replace(Common::String oldChars, byte newChar) {
Common::String Acci::rank() {
for (byte i = 0; i < 8; i++) {
- if ((_vm->_gyro->dna.score >= kRanks[i]._score) && (_vm->_gyro->dna.score < kRanks[i + 1]._score)) {
+ if ((_vm->_gyro->_dna._score >= kRanks[i]._score) && (_vm->_gyro->_dna._score < kRanks[i + 1]._score)) {
return kRanks[i]._title;
}
}
@@ -264,7 +264,7 @@ Common::String Acci::totalTime() {
const double ticksInOneSec = (double)(65535) / 3600;
uint16 h, m, s;
- h = _vm->_gyro->dna.total_time / ticksInOneSec; // No. of seconds.
+ h = _vm->_gyro->_dna._totalTime / ticksInOneSec; // No. of seconds.
h = floor((float)h);
m = h % 3600;
h = h / 3600;
@@ -273,10 +273,10 @@ Common::String Acci::totalTime() {
Common::String result = "You've been playing for ";
if (h > 0)
- result = result + _vm->_gyro->strf(h) + " hours, ";
+ result = result + _vm->_gyro->intToStr(h) + " hours, ";
if ((m > 0) || (h != 0))
- result = result + _vm->_gyro->strf(m) + " minutes and ";
- return result + _vm->_gyro->strf(s) + " seconds.";
+ result = result + _vm->_gyro->intToStr(m) + " minutes and ";
+ return result + _vm->_gyro->intToStr(s) + " seconds.";
}
void Acci::cheatParse(Common::String codes) {
@@ -314,9 +314,9 @@ void Acci::displayWhat(byte target, bool animate, bool &ambiguous) {
_vm->_scrolls->display("What?");
} else {
if (animate)
- _vm->_scrolls->display(Common::String("{ ") + _vm->_gyro->getname(target) + " }");
+ _vm->_scrolls->display(Common::String("{ ") + _vm->_gyro->getName(target) + " }");
else {
- Common::String z = _vm->_gyro->get_better(target);
+ Common::String z = _vm->_gyro->getItem(target);
if (z != "")
_vm->_scrolls->display(Common::String("{ ") + z + " }");
}
@@ -330,18 +330,18 @@ bool Acci::doPronouns() {
byte wordCode = _thats[i];
switch (wordCode) {
case 200: {
- displayWhat(_vm->_gyro->him, true, ambiguous);
- _thats.setChar(_vm->_gyro->him, i);
+ displayWhat(_vm->_gyro->_him, true, ambiguous);
+ _thats.setChar(_vm->_gyro->_him, i);
}
break;
case 201: {
- displayWhat(_vm->_gyro->her, true, ambiguous);
- _thats.setChar(_vm->_gyro->her, i);
+ displayWhat(_vm->_gyro->_her, true, ambiguous);
+ _thats.setChar(_vm->_gyro->_her, i);
}
break;
case 202: {
- displayWhat(_vm->_gyro->it, false, ambiguous);
- _thats.setChar(_vm->_gyro->it, i);
+ displayWhat(_vm->_gyro->_it, false, ambiguous);
+ _thats.setChar(_vm->_gyro->_it, i);
}
break;
}
@@ -388,32 +388,32 @@ void Acci::storeInterrogation(byte interrogation) {
case 1:
_vm->_parser->_inputText.toLowercase();
sayIt();
- _vm->_gyro->dna.like2drink = _vm->_parser->_inputText;
- _vm->_gyro->dna.cardiff_things = 2;
+ _vm->_gyro->_dna._favouriteDrink = _vm->_parser->_inputText;
+ _vm->_gyro->_dna._cardiffQuestionNum = 2;
break;
case 2:
properNouns();
sayIt();
- _vm->_gyro->dna.favourite_song = _vm->_parser->_inputText;
- _vm->_gyro->dna.cardiff_things = 3;
+ _vm->_gyro->_dna._favouriteSong = _vm->_parser->_inputText;
+ _vm->_gyro->_dna._cardiffQuestionNum = 3;
break;
case 3:
properNouns();
sayIt();
- _vm->_gyro->dna.worst_place_on_earth = _vm->_parser->_inputText;
- _vm->_gyro->dna.cardiff_things = 4;
+ _vm->_gyro->_dna._worstPlaceOnEarth = _vm->_parser->_inputText;
+ _vm->_gyro->_dna._cardiffQuestionNum = 4;
break;
case 4:
_vm->_parser->_inputText.toLowercase();
sayIt();
- if (!_vm->_gyro->dna.spare_evening.empty())
- _vm->_gyro->dna.spare_evening.clear();
- _vm->_gyro->dna.spare_evening = _vm->_parser->_inputText;
+ if (!_vm->_gyro->_dna._spareEvening.empty())
+ _vm->_gyro->_dna._spareEvening.clear();
+ _vm->_gyro->_dna._spareEvening = _vm->_parser->_inputText;
_vm->_visa->dixi('z', 5); // His closing statement...
_vm->_trip->tr[1].walkto(4); // The end of the drawbridge
_vm->_trip->tr[1].vanishifstill = true; // Then go away!
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicNothing;
- _vm->_gyro->dna.cardiff_things = 5;
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_dna._cardiffQuestionNum = 5;
break;
case 99:
//store_high(_vm->_parser->_inputText);
@@ -451,7 +451,7 @@ void Acci::parse() {
// Are we being interrogated right now?
if (_vm->_gyro->_interrogation > 0) {
storeInterrogation(_vm->_gyro->_interrogation);
- _vm->_gyro->weirdword = true;
+ _vm->_gyro->_weirdWord = true;
return;
}
@@ -483,7 +483,7 @@ void Acci::parse() {
// Check also[] first, which conatins words about the actual room.
if (!thisword.empty()) {
for (byte i = 0; i < 31; i++) {
- if ((_vm->_gyro->also[i][0] != 0) && (_vm->_parser->pos(',' + thisword, *_vm->_gyro->also[i][0]) > -1)) {
+ if ((_vm->_gyro->_also[i][0] != 0) && (_vm->_parser->pos(',' + thisword, *_vm->_gyro->_also[i][0]) > -1)) {
_thats = _thats + Common::String(99 + i);
notfound = false;
}
@@ -533,12 +533,12 @@ void Acci::parse() {
replace(Common::String('\x4') + '\xE5', 20); // "take off" = "doff"
// Words that could mean more than one _person
- if (_vm->_gyro->dna.room == r__nottspub)
+ if (_vm->_gyro->_dna._room == r__nottspub)
replace(Common::String('\xCC'), 164); // Barman = Port
else
replace(Common::String('\xCC'), 154); // Barman = Malagauche
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__aylesoffice:
replace(Common::String('\xCB'), 163); // Monk = Ayles
break;
@@ -550,39 +550,39 @@ void Acci::parse() {
}
if (doPronouns()) {
- _vm->_gyro->weirdword = true;
+ _vm->_gyro->_weirdWord = true;
_thats = kNothing;
return;
}
// Second parsing.
- if (!_vm->_gyro->subject.empty())
- _vm->_gyro->subject.clear();
- _vm->_gyro->subjnumber = 0; // Find subject of conversation.
+ if (!_vm->_gyro->_subject.empty())
+ _vm->_gyro->_subject.clear();
+ _vm->_gyro->_subjectNum = 0; // Find subject of conversation.
for (int i = 0; (i < 11) && !_realWords[i].empty(); i++) {
if ((_realWords[i][0] == '\'') || (_realWords[i][0] == '\"')) {
- _vm->_gyro->subjnumber = (byte)_thats[i];
+ _vm->_gyro->_subjectNum = (byte)_thats[i];
_thats.setChar(kMoved, i);
break;
}
}
- if ((_vm->_gyro->subjnumber == 0) && !_thats.empty()) { // Still not found.
+ if ((_vm->_gyro->_subjectNum == 0) && !_thats.empty()) { // Still not found.
for (uint16 i = 0; i < _thats.size() - 1; i++) {
if ((byte)_thats[i] == 252) { // The word is "about", or something similar.
- _vm->_gyro->subjnumber = (byte)_thats[i + 1];
+ _vm->_gyro->_subjectNum = (byte)_thats[i + 1];
_thats.setChar(0, i + 1);
break;
}
}
}
- if ((_vm->_gyro->subjnumber == 0) && !_thats.empty()) { // STILL not found! Must be the word after "say".
+ if ((_vm->_gyro->_subjectNum == 0) && !_thats.empty()) { // STILL not found! Must be the word after "say".
for (uint16 i = 0; i < _thats.size() - 1; i++) {
if (((byte)_thats[i] == 7) && ((byte)_thats[i + 1] != 0) && !((225 <= (byte)_thats[i + 1]) && ((byte)_thats[i + 1] <= 229))) {
// SAY not followed by a preposition
- _vm->_gyro->subjnumber = (byte)_thats[i + 1];
+ _vm->_gyro->_subjectNum = (byte)_thats[i + 1];
_thats.setChar(0, i + 1);
break;
}
@@ -603,30 +603,30 @@ 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->_gyro->weirdword = true;
+ _vm->_gyro->_weirdWord = true;
} else
- _vm->_gyro->weirdword = false;
+ _vm->_gyro->_weirdWord = false;
if (_thats.empty())
_thats = kNothing;
if (_thing != kPardon)
- _vm->_gyro->it = _thing;
+ _vm->_gyro->_it = _thing;
if (_person != kPardon) {
if (_person < 175)
- _vm->_gyro->him = _person;
+ _vm->_gyro->_him = _person;
else
- _vm->_gyro->her = _person;
+ _vm->_gyro->_her = _person;
}
}
void Acci::examineObject() {
- if (_thing != _vm->_gyro->thinks)
+ if (_thing != _vm->_gyro->_thinks)
_vm->_lucerna->thinkabout(_thing, _vm->_gyro->kThing);
switch (_thing) {
- case Gyro::wine :
- switch (_vm->_gyro->dna.winestate) {// 4 is perfect wine. 0 is not holding the wine.
+ case Gyro::kObjectWine :
+ switch (_vm->_gyro->_dna._wineState) {// 4 is perfect wine. 0 is not holding the wine.
case 1:
_vm->_visa->dixi('t', 1); // Normal examine wine scroll
break;
@@ -638,8 +638,8 @@ void Acci::examineObject() {
break;
}
break;
- case Gyro::onion:
- if (_vm->_gyro->dna.rotten_onion)
+ case Gyro::kObjectOnion:
+ if (_vm->_gyro->_dna._rottenOnion)
_vm->_visa->dixi('q', 21); // Yucky onion.
else
_vm->_visa->dixi('t', 18); // Normal onion scroll
@@ -650,7 +650,7 @@ void Acci::examineObject() {
}
bool Acci::isPersonHere() { // Person equivalent of "holding".
- if ((_person == kPardon) || (_person == 0) || (_vm->_gyro->_whereIs[_person - 150] == _vm->_gyro->dna.room))
+ if ((_person == kPardon) || (_person == 0) || (_vm->_gyro->_whereIs[_person - 150] == _vm->_gyro->_dna._room))
return true;
else {
if (_person < 175)
@@ -664,18 +664,18 @@ bool Acci::isPersonHere() { // Person equivalent of "holding".
void Acci::exampers() {
if (isPersonHere()) {
- if (_thing != _vm->_gyro->thinks)
+ if (_thing != _vm->_gyro->_thinks)
_vm->_lucerna->thinkabout(_person, _vm->_gyro->kPerson);
_person -= 149;
switch (_person) { // Special cases
case 11:
- if (_vm->_gyro->dna.wonnim) {
+ if (_vm->_gyro->_dna._wonNim) {
_vm->_visa->dixi('Q', 8); // "I'm Not Playing!"
return;
}
break;
case 99:
- if (_vm->_gyro->dna.lustie_is_asleep) {
+ if (_vm->_gyro->_dna._lustieIsAsleep) {
_vm->_visa->dixi('Q', 65); // He's asleep. (65! Wow!)
return;
}
@@ -686,7 +686,7 @@ void Acci::exampers() {
}
// And afterwards...
- if ((_person == 14) && (!_vm->_gyro->dna.ayles_is_awake))
+ if ((_person == 14) && (!_vm->_gyro->_dna._aylesIsAwake))
_vm->_visa->dixi('Q', 13);
}
@@ -698,7 +698,7 @@ bool Acci::holding() {
if (_thing > 100)
_vm->_scrolls->display("Be reasonable!");
- else if (!_vm->_gyro->dna.obj[_thing - 1]) // Verbs that need "_thing" to be in the inventory.
+ 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.");
else
holdingResult = true;
@@ -707,7 +707,7 @@ bool Acci::holding() {
}
void Acci::openBox(bool isOpening) {
- if ((_vm->_gyro->dna.room == r__yours) && (_thing == 54)) {
+ if ((_vm->_gyro->_dna._room == r__yours) && (_thing == 54)) {
_vm->_celer->drawBackgroundSprite(-1, -1, 5);
_vm->_celer->updateBackgroundSprites();
@@ -734,7 +734,7 @@ 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->display(*_vm->_gyro->_also[_thing - 50][1]);
openBox(false);
}
}
@@ -748,20 +748,20 @@ void Acci::inventory() {
byte itemNum = 0;
_vm->_scrolls->display(Common::String("You're carrying ") + _vm->_scrolls->kControlToBuffer);
- for (byte i = 0; i < numobjs; i++) {
- if (_vm->_gyro->dna.obj[i]) {
+ for (byte i = 0; i < kObjectNum; i++) {
+ if (_vm->_gyro->_dna._objects[i]) {
itemNum++;
- if (itemNum == _vm->_gyro->dna.carrying)
+ if (itemNum == _vm->_gyro->_dna._carryNum)
_vm->_scrolls->display(Common::String("and ") + _vm->_scrolls->kControlToBuffer);
- _vm->_scrolls->display(_vm->_gyro->get_better(i + 1) + _vm->_scrolls->kControlToBuffer);
- if ((i + 1) == _vm->_gyro->dna.wearing)
+ _vm->_scrolls->display(_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);
- if (itemNum < _vm->_gyro->dna.carrying)
+ if (itemNum < _vm->_gyro->_dna._carryNum)
_vm->_scrolls->display(Common::String(", ") + _vm->_scrolls->kControlToBuffer);
}
}
- if (_vm->_gyro->dna.wearing == kNothing)
+ if (_vm->_gyro->_dna._wearing == kNothing)
_vm->_scrolls->display(Common::String("...") + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "...and you're stark naked!");
else
_vm->_scrolls->display(".");
@@ -769,17 +769,17 @@ void Acci::inventory() {
void Acci::swallow() { // Eat something.
switch (_thing) {
- case Gyro::wine:
- switch (_vm->_gyro->dna.winestate) { // 4 is perfect
+ case Gyro::kObjectWine:
+ switch (_vm->_gyro->_dna._wineState) { // 4 is perfect
case 1:
- if (_vm->_gyro->dna.teetotal) {
+ if (_vm->_gyro->_dna._teetotal) {
_vm->_visa->dixi('D', 6);
return;
}
_vm->_visa->dixi('U', 1);
_vm->_pingo->wobble();
_vm->_visa->dixi('U', 2);
- _vm->_gyro->dna.obj[_vm->_gyro->wine - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1] = false;
_vm->_lucerna->objectlist();
drink();
break;
@@ -789,33 +789,33 @@ void Acci::swallow() { // Eat something.
break; // You can't drink it!
}
break;
- case Gyro::potion:
- _vm->_gyro->background(4);
+ case Gyro::kObjectPotion:
+ _vm->_gyro->setBackgroundColor(4);
_vm->_visa->dixi('U', 3);
_vm->_lucerna->gameover();
- _vm->_gyro->background(0);
+ _vm->_gyro->setBackgroundColor(0);
break;
- case Gyro::ink:
+ case Gyro::kObjectInk:
_vm->_visa->dixi('U', 4);
break;
- case Gyro::chastity:
+ case Gyro::kObjectChastity:
_vm->_visa->dixi('U', 5);
break;
- case Gyro::mushroom:
+ case Gyro::kObjectMushroom:
_vm->_visa->dixi('U', 6);
_vm->_lucerna->gameover();
break;
- case Gyro::onion:
- if (_vm->_gyro->dna.rotten_onion)
+ case Gyro::kObjectOnion:
+ if (_vm->_gyro->_dna._rottenOnion)
_vm->_visa->dixi('U', 11);
else {
_vm->_visa->dixi('U', 8);
- _vm->_gyro->dna.obj[_vm->_gyro->onion - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1] = false;
_vm->_lucerna->objectlist();
}
break;
default:
- if ((_vm->_gyro->dna.room == r__argentpub) || (_vm->_gyro->dna.room == r__nottspub))
+ if ((_vm->_gyro->_dna._room == r__argentpub) || (_vm->_gyro->_dna._room == r__nottspub))
_vm->_scrolls->display("Try BUYing things before you drink them!");
else
_vm->_scrolls->display("The taste of it makes you retch!");
@@ -826,7 +826,7 @@ void Acci::peopleInRoom() {
byte numPeople = 0; // Number of people in the room.
for (byte i = 1; i < 29; i++) { // Start at 1 so we don't list Avvy himself!
- if (_vm->_gyro->_whereIs[i] == _vm->_gyro->dna.room)
+ if (_vm->_gyro->_whereIs[i] == _vm->_gyro->_dna._room)
numPeople++;
}
@@ -835,14 +835,14 @@ void Acci::peopleInRoom() {
byte actPerson = 0; // Actually listed people.
for (byte i = 1; i < 29; i++) {
- if (_vm->_gyro->_whereIs[i] == _vm->_gyro->dna.room) {
+ 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->display(_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->display(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->display(Common::String(" and ") + _vm->_gyro->getName(i + 150) + _vm->_scrolls->kControlToBuffer);
}
}
@@ -855,30 +855,30 @@ void Acci::peopleInRoom() {
}
void Acci::lookAround() {
- _vm->_scrolls->display(*_vm->_gyro->also[0][1]);
- switch (_vm->_gyro->dna.room) {
+ _vm->_scrolls->display(*_vm->_gyro->_also[0][1]);
+ switch (_vm->_gyro->_dna._room) {
case r__spludwicks:
- if (_vm->_gyro->dna.avaricius_talk > 0)
+ if (_vm->_gyro->_dna._avariciusTalk > 0)
_vm->_visa->dixi('q', 23);
else
peopleInRoom();
break;
case r__robins:
- if (_vm->_gyro->dna.tied_up)
+ if (_vm->_gyro->_dna._tiedUp)
_vm->_visa->dixi('q', 38);
- if (_vm->_gyro->dna.mushroom_growing)
+ if (_vm->_gyro->_dna._mushroomGrowing)
_vm->_visa->dixi('q', 55);
break;
case r__insidecardiffcastle:
- if (!_vm->_gyro->dna.taken_pen)
+ if (!_vm->_gyro->_dna._takenPen)
_vm->_visa->dixi('q', 49);
break;
case r__lustiesroom:
- if (_vm->_gyro->dna.lustie_is_asleep)
+ if (_vm->_gyro->_dna._lustieIsAsleep)
_vm->_visa->dixi('q', 65);
break;
case r__catacombs:
- switch (_vm->_gyro->dna.cat_y * 256 + _vm->_gyro->dna.cat_x) {
+ switch (_vm->_gyro->_dna._catacombY * 256 + _vm->_gyro->_dna._catacombX) {
case 258 :
_vm->_visa->dixi('q', 80); // Inside art gallery.
break;
@@ -897,7 +897,7 @@ void Acci::lookAround() {
void Acci::openDoor() {
// Special cases.
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__yours:
if (_vm->_trip->infield(2)) {
// Opening the box.
@@ -915,21 +915,21 @@ void Acci::openDoor() {
break;
}
- if ((!_vm->_gyro->dna.user_moves_avvy) && (_vm->_gyro->dna.room != r__lusties))
+ if ((!_vm->_gyro->_dna._userMovesAvvy) && (_vm->_gyro->_dna._room != r__lusties))
return; // No doors can open if you can't move Avvy.
for (byte fv = 8; fv < 15; fv++) {
if (_vm->_trip->infield(fv + 1)) {
fv -= 8;
- switch (_vm->_gyro->portals[fv].op) {
+ switch (_vm->_gyro->_portals[fv]._operation) {
case Gyro::kMagicExclaim:
_vm->_trip->tr[0].bounce();
- _vm->_visa->dixi('x', _vm->_gyro->portals[fv].data);
+ _vm->_visa->dixi('x', _vm->_gyro->_portals[fv]._data);
break;
case Gyro::kMagicTransport:
- _vm->_trip->fliproom((_vm->_gyro->portals[fv].data) >> 8, // High byte
- (_vm->_gyro->portals[fv].data) & 0x0F // Low byte
+ _vm->_trip->fliproom((_vm->_gyro->_portals[fv]._data) >> 8, // High byte
+ (_vm->_gyro->_portals[fv]._data) & 0x0F // Low byte
);
break;
case Gyro::kMagicUnfinished:
@@ -937,10 +937,10 @@ void Acci::openDoor() {
_vm->_scrolls->display("Sorry. This place is not available yet!");
break;
case Gyro::kMagicSpecial:
- _vm->_trip->call_special(_vm->_gyro->portals[fv].data);
+ _vm->_trip->call_special(_vm->_gyro->_portals[fv]._data);
break;
case Gyro::kMagicOpenDoor:
- _vm->_trip->open_the_door((_vm->_gyro->portals[fv].data) >> 8, (_vm->_gyro->portals[fv].data) & 0x0F, fv + 9);
+ _vm->_trip->open_the_door((_vm->_gyro->_portals[fv]._data) >> 8, (_vm->_gyro->_portals[fv]._data) & 0x0F, fv + 9);
break;
}
@@ -948,7 +948,7 @@ void Acci::openDoor() {
}
}
- if (_vm->_gyro->dna.room == r__map)
+ if (_vm->_gyro->_dna._room == r__map)
_vm->_scrolls->display(Common::String("Avvy, you can complete the whole game without ever going "
"to anywhere other than Argent, Birmingham, Cardiff, Nottingham and Norwich."));
else
@@ -974,16 +974,16 @@ void Acci::putProc() {
// Thing is the _thing which you're putting in. _thing2 is where you're putting it.
switch (_thing2) {
- case Gyro::wine:
- if (_thing == _vm->_gyro->onion) {
- if (_vm->_gyro->dna.rotten_onion)
+ 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!");
else { // Put onion into wine?
- if (_vm->_gyro->dna.winestate != 3)
+ if (_vm->_gyro->_dna._wineState != 3)
_vm->_scrolls->display(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.onion_in_vinegar = true;
+ _vm->_gyro->_dna._onionInVinegar = true;
_vm->_lucerna->points(7);
_vm->_visa->dixi('u', 9);
}
@@ -993,31 +993,31 @@ void Acci::putProc() {
break;
case 54:
- if (_vm->_gyro->dna.room == r__yours) { // Put something into the box.
- if (_vm->_gyro->dna.box_contents != kNothing)
+ 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.");
else {
switch (_thing) {
- case Gyro::money:
+ case Gyro::kObjectMoney:
_vm->_scrolls->display("You'd better keep some ready cash on you!");
break;
- case Gyro::bell:
+ case Gyro::kObjectBell:
_vm->_scrolls->display("That's a silly place to keep a bell.");
break;
- case Gyro::bodkin:
+ case Gyro::kObjectBodkin:
_vm->_scrolls->display("But you might need it!");
break;
- case Gyro::onion:
+ case Gyro::kObjectOnion:
_vm->_scrolls->display("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->get_better(_thing) + " off first!");
+ if (_vm->_gyro->_dna._wearing == _thing)
+ _vm->_scrolls->display(Common::String("You'd better take ") + _vm->_gyro->getItem(_thing) + " off first!");
else {
openBox(true); // Open box.
- _vm->_gyro->dna.box_contents = _thing;
- _vm->_gyro->dna.obj[_thing - 1] = false;
+ _vm->_gyro->_dna._boxContent = _thing;
+ _vm->_gyro->_dna._objects[_thing - 1] = false;
_vm->_lucerna->objectlist();
_vm->_scrolls->display("OK, it's in the box.");
@@ -1038,7 +1038,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->_gyro->get_better(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->dna.given2spludwick])
+ + _vm->_gyro->getItem(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick])
+ _vm->_scrolls->kControlRegister + 2 + _vm->_scrolls->kControlSpeechBubble);
}
@@ -1053,39 +1053,39 @@ void Acci::goToCauldron() {
* @remarks Originally called 'give2spludwick'
*/
bool Acci::giveToSpludwick() {
- if (_vm->_gyro->kSpludwicksOrder[_vm->_gyro->dna.given2spludwick] != _thing) {
+ if (_vm->_gyro->kSpludwicksOrder[_vm->_gyro->_dna._givenToSpludwick] != _thing) {
notInOrder();
return false;
}
switch (_thing) {
- case Gyro::onion:
- _vm->_gyro->dna.obj[_vm->_gyro->onion - 1] = false;
- if (_vm->_gyro->dna.rotten_onion)
+ case Gyro::kObjectOnion:
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1] = false;
+ if (_vm->_gyro->_dna._rottenOnion)
_vm->_visa->dixi('q', 22);
else {
- _vm->_gyro->dna.given2spludwick++;
+ _vm->_gyro->_dna._givenToSpludwick++;
_vm->_visa->dixi('q', 20);
goToCauldron();
_vm->_lucerna->points(3);
}
_vm->_lucerna->objectlist();
break;
- case Gyro::ink:
- _vm->_gyro->dna.obj[_vm->_gyro->ink - 1] = false;
+ case Gyro::kObjectInk:
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectInk - 1] = false;
_vm->_lucerna->objectlist();
- _vm->_gyro->dna.given2spludwick++;
+ _vm->_gyro->_dna._givenToSpludwick++;
_vm->_visa->dixi('q', 24);
goToCauldron();
_vm->_lucerna->points(3);
break;
- case Gyro::mushroom:
- _vm->_gyro->dna.obj[_vm->_gyro->mushroom - 1] = false;
+ case Gyro::kObjectMushroom:
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectMushroom - 1] = false;
_vm->_visa->dixi('q', 25);
_vm->_lucerna->points(5);
- _vm->_gyro->dna.given2spludwick++;
+ _vm->_gyro->_dna._givenToSpludwick++;
goToCauldron();
- _vm->_gyro->dna.obj[_vm->_gyro->potion - 1] = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectPotion - 1] = true;
_vm->_lucerna->objectlist();
break;
default:
@@ -1096,30 +1096,30 @@ bool Acci::giveToSpludwick() {
}
void Acci::drink() {
- _vm->_gyro->dna.alcohol += 1;
- if (_vm->_gyro->dna.alcohol == 5) {
- _vm->_gyro->dna.obj[_vm->_gyro->key - 1] = true; // Get the key.
- _vm->_gyro->dna.teetotal = true;
- _vm->_gyro->dna.avvy_is_awake = false;
- _vm->_gyro->dna.avvy_in_bed = true;
+ _vm->_gyro->_dna._alcoholLevel += 1;
+ if (_vm->_gyro->_dna._alcoholLevel == 5) {
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectKey - 1] = true; // Get the key.
+ _vm->_gyro->_dna._teetotal = true;
+ _vm->_gyro->_dna._avvyIsAwake = false;
+ _vm->_gyro->_dna._avvyInBed = true;
_vm->_lucerna->objectlist();
_vm->_lucerna->dusk();
- _vm->_gyro->hang_around_for_a_while();
+ _vm->_gyro->hangAroundForAWhile();
_vm->_trip->fliproom(1, 1);
- _vm->_gyro->background(14);
+ _vm->_gyro->setBackgroundColor(14);
_vm->_trip->new_game_for_trippancy(); // Not really.
}
}
void Acci::cardiffClimbing() {
- if (_vm->_gyro->dna.standing_on_dais) { // Clamber up.
+ if (_vm->_gyro->_dna._standingOnDais) { // Clamber up.
_vm->_scrolls->display("You climb down, back onto the floor.");
- _vm->_gyro->dna.standing_on_dais = false;
+ _vm->_gyro->_dna._standingOnDais = false;
_vm->_trip->apped(1, 3);
} else { // Clamber down.
if (_vm->_trip->infield(1)) {
_vm->_scrolls->display("You clamber up onto the dais.");
- _vm->_gyro->dna.standing_on_dais = true;
+ _vm->_gyro->_dna._standingOnDais = true;
_vm->_trip->apped(1, 2);
} else
_vm->_scrolls->display("Get a bit closer, Avvy.");
@@ -1131,21 +1131,21 @@ void Acci::already() {
}
void Acci::standUp() {
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__yours: // Avvy isn't asleep.
- if (_vm->_gyro->dna.avvy_is_awake && _vm->_gyro->dna.avvy_in_bed) { // But he's in bed.
- if (_vm->_gyro->dna.teetotal) {
+ if (_vm->_gyro->_dna._avvyIsAwake && _vm->_gyro->_dna._avvyInBed) { // But he's in bed.
+ if (_vm->_gyro->_dna._teetotal) {
_vm->_visa->dixi('d', 12);
- _vm->_gyro->background(0);
+ _vm->_gyro->setBackgroundColor(0);
_vm->_visa->dixi('d', 14);
}
_vm->_trip->tr[0].visible = true;
- _vm->_gyro->dna.user_moves_avvy = true;
+ _vm->_gyro->_dna._userMovesAvvy = true;
_vm->_trip->apped(1, 2);
- _vm->_gyro->dna.rw = _vm->_gyro->kDirectionLeft;
+ _vm->_gyro->_dna._direction = _vm->_gyro->kDirectionLeft;
_vm->_celer->drawBackgroundSprite(-1, -1, 4); // Picture of empty pillow.
_vm->_lucerna->points(1);
- _vm->_gyro->dna.avvy_in_bed = false;
+ _vm->_gyro->_dna._avvyInBed = false;
_vm->_timeout->lose_timer(_vm->_timeout->reason_arkata_shouts);
} else
already();
@@ -1156,12 +1156,12 @@ void Acci::standUp() {
break;
case r__nottspub:
- if (_vm->_gyro->dna.sitting_in_pub) {
+ if (_vm->_gyro->_dna._sittingInPub) {
_vm->_celer->drawBackgroundSprite(-1, -1, 4); // Not sitting down.
_vm->_trip->tr[0].visible = true; // But standing up.
_vm->_trip->apped(1, 4); // And walking away.
- _vm->_gyro->dna.sitting_in_pub = false; // Really not sitting down.
- _vm->_gyro->dna.user_moves_avvy = true; // And ambulant.
+ _vm->_gyro->_dna._sittingInPub = false; // Really not sitting down.
+ _vm->_gyro->_dna._userMovesAvvy = true; // And ambulant.
} else
already();
break;
@@ -1173,42 +1173,42 @@ void Acci::standUp() {
void Acci::getProc(char thing) {
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__yours:
if (_vm->_trip->infield(2)) {
- if (_vm->_gyro->dna.box_contents == thing) {
+ if (_vm->_gyro->_dna._boxContent == thing) {
_vm->_celer->drawBackgroundSprite(-1, -1, 5);
_vm->_scrolls->display("OK, I've got it.");
- _vm->_gyro->dna.obj[thing - 1] = true;
+ _vm->_gyro->_dna._objects[thing - 1] = true;
_vm->_lucerna->objectlist();
- _vm->_gyro->dna.box_contents = kNothing;
+ _vm->_gyro->_dna._boxContent = kNothing;
_vm->_celer->drawBackgroundSprite(-1, -1, 6);
} else
- _vm->_scrolls->display(Common::String("I can't see ") + _vm->_gyro->get_better(thing) + " in the box.");
+ _vm->_scrolls->display(Common::String("I can't see ") + _vm->_gyro->getItem(thing) + " in the box.");
} else
_vm->_visa->dixi('q', 57);
break;
case r__insidecardiffcastle:
switch (thing) {
- case Gyro::pen:
+ case Gyro::kObjectPen:
if (_vm->_trip->infield(2)) { // Standing on the dais.
- if (_vm->_gyro->dna.taken_pen)
+ if (_vm->_gyro->_dna._takenPen)
_vm->_scrolls->display("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.
_vm->_trip->call_special(3); // Zap!
- _vm->_gyro->dna.taken_pen = true;
- _vm->_gyro->dna.obj[_vm->_gyro->pen - 1] = true;
+ _vm->_gyro->_dna._takenPen = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectPen - 1] = true;
_vm->_lucerna->objectlist();
_vm->_scrolls->display("Taken.");
}
- } else if (_vm->_gyro->dna.standing_on_dais)
+ } else if (_vm->_gyro->_dna._standingOnDais)
_vm->_visa->dixi('q', 53);
else
_vm->_visa->dixi('q', 51);
break;
- case Gyro::bolt:
+ case Gyro::kObjectBolt:
_vm->_visa->dixi('q', 52);
break;
default:
@@ -1216,12 +1216,12 @@ void Acci::getProc(char thing) {
}
break;
case r__robins:
- if ((thing == _vm->_gyro->mushroom) & (_vm->_trip->infield(1)) & (_vm->_gyro->dna.mushroom_growing)) {
+ if ((thing == _vm->_gyro->kObjectMushroom) & (_vm->_trip->infield(1)) & (_vm->_gyro->_dna._mushroomGrowing)) {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
_vm->_scrolls->display("Got it!");
- _vm->_gyro->dna.mushroom_growing = false;
- _vm->_gyro->dna.taken_mushroom = true;
- _vm->_gyro->dna.obj[_vm->_gyro->mushroom - 1] = true;
+ _vm->_gyro->_dna._mushroomGrowing = false;
+ _vm->_gyro->_dna._takenMushroom = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectMushroom - 1] = true;
_vm->_lucerna->objectlist();
_vm->_lucerna->points(3);
} else
@@ -1237,11 +1237,11 @@ void Acci::getProc(char thing) {
* @remarks Originally called 'give_Geida_the_lute'
*/
void Acci::giveGeidaTheLute() {
- if (_vm->_gyro->dna.room != r__lustiesroom) {
+ if (_vm->_gyro->_dna._room != r__lustiesroom) {
_vm->_scrolls->display(Common::String("Not yet. Try later!") + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
return;
}
- _vm->_gyro->dna.obj[_vm->_gyro->lute - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectLute - 1] = false;
_vm->_lucerna->objectlist();
_vm->_visa->dixi('q', 64); // She plays it.
@@ -1267,13 +1267,13 @@ void Acci::winSequence() {
void Acci::personSpeaks() {
if ((_person == kPardon) || (_person == 0)) {
- if ((_vm->_gyro->him == kPardon) || (_vm->_gyro->_whereIs[_vm->_gyro->him - 150] != _vm->_gyro->dna.room))
- _person = _vm->_gyro->her;
+ if ((_vm->_gyro->_him == kPardon) || (_vm->_gyro->_whereIs[_vm->_gyro->_him - 150] != _vm->_gyro->_dna._room))
+ _person = _vm->_gyro->_her;
else
- _person = _vm->_gyro->him;
+ _person = _vm->_gyro->_him;
}
- if (_vm->_gyro->_whereIs[_person - 150] != _vm->_gyro->dna.room) {
+ if (_vm->_gyro->_whereIs[_person - 150] != _vm->_gyro->_dna._room) {
_vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + '1' + _vm->_scrolls->kControlToBuffer); // Avvy himself!
return;
}
@@ -1289,7 +1289,7 @@ 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))
+ 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);
}
}
@@ -1297,7 +1297,7 @@ void Acci::personSpeaks() {
void Acci::heyThanks() {
personSpeaks();
_vm->_scrolls->display(Common::String("Hey, thanks!") + _vm->_scrolls->kControlSpeechBubble + "(But now, you've lost it!)");
- _vm->_gyro->dna.obj[_thing - 1] = false;
+ _vm->_gyro->_dna._objects[_thing - 1] = false;
}
/**
@@ -1312,7 +1312,7 @@ void Acci::doThat() {
return;
}
- if (_vm->_gyro->weirdword)
+ if (_vm->_gyro->_weirdWord)
return;
if (_thing < 200)
@@ -1322,11 +1322,11 @@ void Acci::doThat() {
if ((_verb != kVerbCodeLoad) && (_verb != kVerbCodeSave) && (_verb != kVerbCodeQuit) && (_verb != kVerbCodeInfo) && (_verb != kVerbCodeHelp)
&& (_verb != kVerbCodeLarrypass) && (_verb != kVerbCodePhaon) && (_verb != kVerbCodeBoss) && (_verb != kVerbCodeCheat) && (_verb != kVerbCodeRestart)
&& (_verb != kVerbCodeDir) && (_verb != kVerbCodeScore) && (_verb != kVerbCodeHiscores) && (_verb != kVerbCodeSmartAlec)) {
- if (!_vm->_gyro->alive) {
+ 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!"));
return;
}
- if (!_vm->_gyro->dna.avvy_is_awake && (_verb != kVerbCodeDie) && (_verb != kVerbCodeExpletive) && (_verb != kVerbCodeWake)) {
+ if (!_vm->_gyro->_dna._avvyIsAwake && (_verb != kVerbCodeDie) && (_verb != kVerbCodeExpletive) && (_verb != kVerbCodeWake)) {
_vm->_scrolls->display("Talking in your sleep? Try waking up!");
return;
}
@@ -1345,7 +1345,7 @@ void Acci::doThat() {
break;
case kVerbCodeGet:
if (_thing != kPardon) { // Legitimate try to pick something up.
- if (_vm->_gyro->dna.carrying >= maxobjs)
+ if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
_vm->_scrolls->display("You can't carry any more!");
else
getProc(_thing);
@@ -1365,20 +1365,20 @@ void Acci::doThat() {
break;
case kVerbCodeTalk:
if (_person == kPardon) {
- if (_vm->_gyro->subjnumber == 99) // They typed "say password".
+ 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?");
- else if (((1 <= _vm->_gyro->subjnumber) && (_vm->_gyro->subjnumber <= 49)) || (_vm->_gyro->subjnumber == 253) || (_vm->_gyro->subjnumber == 249)) {
+ else if (((1 <= _vm->_gyro->_subjectNum) && (_vm->_gyro->_subjectNum <= 49)) || (_vm->_gyro->_subjectNum == 253) || (_vm->_gyro->_subjectNum == 249)) {
_thats.deleteChar(0);
for (byte i = 0; i < 10; i++)
_realWords[i] = _realWords[i + 1];
- _verb = _vm->_gyro->subjnumber;
+ _verb = _vm->_gyro->_subjectNum;
doThat();
return;
} else {
- _person = _vm->_gyro->subjnumber;
- _vm->_gyro->subjnumber = 0;
+ _person = _vm->_gyro->_subjectNum;
+ _vm->_gyro->_subjectNum = 0;
if ((_person == 0) || (_person == kPardon))
_vm->_scrolls->display("Talk to whom?");
else if (isPersonHere())
@@ -1393,53 +1393,53 @@ void Acci::doThat() {
_vm->_scrolls->display("Give to whom?");
else if (isPersonHere()) {
switch (_thing) {
- case Gyro::money :
+ case Gyro::kObjectMoney :
_vm->_scrolls->display("You can't bring yourself to give away your moneybag.");
break;
- case Gyro::bodkin:
- case Gyro::bell:
- case Gyro::clothes:
- case Gyro::habit :
+ case Gyro::kObjectBodkin:
+ case Gyro::kObjectBell:
+ case Gyro::kObjectClothes:
+ case Gyro::kObjectHabit :
_vm->_scrolls->display("Don't give it away, it might be useful!");
break;
default:
switch (_person) {
- case Gyro::pcrapulus:
- if (_thing == _vm->_gyro->wine) {
+ case Gyro::kPeopleCrapulus:
+ if (_thing == _vm->_gyro->kObjectWine) {
_vm->_scrolls->display("Crapulus grabs the wine and gulps it down.");
- _vm->_gyro->dna.obj[_vm->_gyro->wine - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1] = false;
} else
heyThanks();
break;
- case Gyro::pcwytalot:
- if ((_thing == _vm->_gyro->crossbow) || (_thing == _vm->_gyro->bolt))
+ 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!"));
else
heyThanks();
break;
- case Gyro::pspludwick:
+ case Gyro::kPeopleSpludwick:
if (giveToSpludwick())
heyThanks();
break;
- case Gyro::pibythneth:
- if (_thing == _vm->_gyro->badge) {
+ case Gyro::kPeopleIbythneth:
+ if (_thing == _vm->_gyro->kObjectBadge) {
_vm->_visa->dixi('q', 32); // Thanks! Wow!
_vm->_lucerna->points(3);
- _vm->_gyro->dna.obj[_vm->_gyro->badge - 1] = false;
- _vm->_gyro->dna.obj[_vm->_gyro->habit - 1] = true;
- _vm->_gyro->dna.givenbadgetoiby = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectBadge - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectHabit - 1] = true;
+ _vm->_gyro->_dna._givenBadgeToIby = true;
_vm->_celer->drawBackgroundSprite(-1, -1, 8);
_vm->_celer->drawBackgroundSprite(-1, -1, 9);
} else
heyThanks();
break;
- case Gyro::payles:
- if (_vm->_gyro->dna.ayles_is_awake) {
- if (_thing == _vm->_gyro->pen) {
- _vm->_gyro->dna.obj[_vm->_gyro->pen - 1] = false;
+ case Gyro::kPeopleAyles:
+ if (_vm->_gyro->_dna._aylesIsAwake) {
+ if (_thing == _vm->_gyro->kObjectPen) {
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectPen - 1] = false;
_vm->_visa->dixi('q', 54);
- _vm->_gyro->dna.obj[_vm->_gyro->ink - 1] = true;
- _vm->_gyro->dna.given_pen_to_ayles = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectInk - 1] = true;
+ _vm->_gyro->_dna._givenPenToAyles = true;
_vm->_lucerna->objectlist();
_vm->_lucerna->points(2);
} else
@@ -1447,26 +1447,26 @@ void Acci::doThat() {
} else
_vm->_scrolls->display("But he's asleep!");
break;
- case Gyro::pgeida:
+ case Gyro::kPeopleGeida:
switch (_thing) {
- case Gyro::potion:
- _vm->_gyro->dna.obj[_vm->_gyro->potion - 1] = false;
+ case Gyro::kObjectPotion:
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectPotion - 1] = false;
_vm->_visa->dixi('u', 16); // She drinks it.
_vm->_lucerna->points(2);
- _vm->_gyro->dna.geida_given_potion = true;
+ _vm->_gyro->_dna._givenPotionToGeida = true;
_vm->_lucerna->objectlist();
break;
- case Gyro::lute:
+ case Gyro::kObjectLute:
giveGeidaTheLute();
break;
default:
heyThanks();
}
break;
- case Gyro::parkata:
+ case Gyro::kPeopleArkata:
switch (_thing) {
- case Gyro::potion:
- if (_vm->_gyro->dna.geida_given_potion)
+ case Gyro::kObjectPotion:
+ if (_vm->_gyro->_dna._givenPotionToGeida)
winSequence();
else
_vm->_visa->dixi('q', 77); // That Geida woman!
@@ -1515,7 +1515,7 @@ void Acci::doThat() {
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->_gyro->lmo = true;
+ _vm->_gyro->_letMeOut = true;
break;
case kVerbCodeGo:
_vm->_scrolls->display("Just use the arrow keys to walk there.");
@@ -1529,18 +1529,18 @@ void Acci::doThat() {
toDisplay = toDisplay + "LORD AVALOT D'ARGENT" + _vm->_scrolls->kControlCenter + _vm->_scrolls->kControlNewLine
+ "The medi‘val descendant of" + _vm->_scrolls->kControlNewLine
+ "Denarius Avaricius Sextus" + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine
- + "version " + _vm->_gyro->vernum + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Copyright ï "
- + _vm->_gyro->copyright + ", Mark, Mike and Thomas Thurman." + _vm->_scrolls->kControlRegister + 'Y' + _vm->_scrolls->kControlIcon;
+ + "version " + _vm->_gyro->kVersionNum + _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "Copyright ï "
+ + _vm->_gyro->kCopyright + ", Mark, Mike and Thomas Thurman." + _vm->_scrolls->kControlRegister + 'Y' + _vm->_scrolls->kControlIcon;
_vm->_scrolls->display(toDisplay);
_vm->_scrolls->aboutscroll = false;
}
break;
case kVerbCodeUndress:
- if (_vm->_gyro->dna.wearing == kNothing)
+ if (_vm->_gyro->_dna._wearing == kNothing)
_vm->_scrolls->display("You're already stark naked!");
- else if (_vm->_gyro->dna.avvys_in_the_cupboard) {
- _vm->_scrolls->display(Common::String("You take off ") + _vm->_gyro->get_better(_vm->_gyro->dna.wearing) + '.');
- _vm->_gyro->dna.wearing = kNothing;
+ else if (_vm->_gyro->_dna._avvysInTheCupboard) {
+ _vm->_scrolls->display(Common::String("You take off ") + _vm->_gyro->getItem(_vm->_gyro->_dna._wearing) + '.');
+ _vm->_gyro->_dna._wearing = kNothing;
_vm->_lucerna->objectlist();
} else
_vm->_scrolls->display("Hadn't you better find somewhere more private, Avvy?");
@@ -1548,25 +1548,25 @@ void Acci::doThat() {
case kVerbCodeWear:
if (holding()) { // Wear something.
switch (_thing) {
- case Gyro::chastity:
+ case Gyro::kObjectChastity:
// \? are used to avoid that ??! is parsed as a trigraph
_vm->_scrolls->display("Hey, kWhat kind of a weirdo are you\?\?!");
break;
- case Gyro::clothes:
- case Gyro::habit: { // Change this!
- if (_vm->_gyro->dna.wearing != kNothing) {
- if (_vm->_gyro->dna.wearing == _thing)
+ 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.");
else
_vm->_scrolls->display("You'll be rather warm wearing two sets of clothes!");
return;
} else
- _vm->_gyro->dna.wearing = _thing;
+ _vm->_gyro->_dna._wearing = _thing;
_vm->_lucerna->objectlist();
byte i;
- if (_thing == _vm->_gyro->habit)
+ if (_thing == _vm->_gyro->kObjectHabit)
i = 3;
else
i = 0;
@@ -1587,35 +1587,35 @@ void Acci::doThat() {
break;
case kVerbCodePlay:
if (_thing == kPardon) {
- switch (_vm->_gyro->dna.room) { // They just typed "play"...
+ switch (_vm->_gyro->_dna._room) { // They just typed "play"...
case r__argentpub: { // ...in the pub, => play Nim.
warning("STUB: Acci::doThat() - case kVerbCodeplay");
// play_nim();
// The following parts are copied from play_nim().
// The player automatically wins the game everytime he wins, until I implement the mini-game.
- if (_vm->_gyro->dna.wonnim) { // Already won the game.
+ if (_vm->_gyro->_dna._wonNim) { // Already won the game.
_vm->_visa->dixi('Q', 6);
return;
}
- if (!_vm->_gyro->dna.asked_dogfood_about_nim) {
+ if (!_vm->_gyro->_dna._askedDogfoodAboutNim) {
_vm->_visa->dixi('q', 84);
return;
}
_vm->_visa->dixi('Q', 3);
- _vm->_gyro->dna.playednim++;
+ _vm->_gyro->_dna._playedNim++;
// You won - strange!
_vm->_visa->dixi('Q', 7); // You won! Give us a lute!
- _vm->_gyro->dna.obj[_vm->_gyro->lute - 1] = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectLute - 1] = true;
_vm->_lucerna->objectlist();
- _vm->_gyro->dna.wonnim = true;
+ _vm->_gyro->_dna._wonNim = true;
_vm->_celer->drawBackgroundSprite(-1, -1, 1); // Show the settle with no lute on it.
_vm->_lucerna->points(7); // 7 points for winning!
- if (_vm->_gyro->dna.playednim == 1)
+ if (_vm->_gyro->_dna._playedNim == 1)
_vm->_lucerna->points(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!!!
@@ -1629,23 +1629,23 @@ void Acci::doThat() {
}
} else if (holding()) {
switch (_thing) {
- case Gyro::lute :
+ case Gyro::kObjectLute :
_vm->_visa->dixi('U', 7);
- if (_vm->_gyro->_whereIs[_vm->_gyro->pcwytalot - 150] == _vm->_gyro->dna.room)
+ if (_vm->_gyro->_whereIs[_vm->_gyro->kPeopleCwytalot - 150] == _vm->_gyro->_dna._room)
_vm->_visa->dixi('U', 10);
- if (_vm->_gyro->_whereIs[_vm->_gyro->pdulustie - 150] == _vm->_gyro->dna.room)
+ if (_vm->_gyro->_whereIs[_vm->_gyro->kPeopleDuLustie - 150] == _vm->_gyro->_dna._room)
_vm->_visa->dixi('U', 15);
break;
case 52:
- if (_vm->_gyro->dna.room == r__musicroom)
+ if (_vm->_gyro->_dna._room == r__musicroom)
playHarp();
else
_vm->_scrolls->display(kWhat);
break;
case 55:
- if (_vm->_gyro->dna.room == r__argentpub)
+ if (_vm->_gyro->_dna._room == r__argentpub)
// play_nim();
warning("STUB: Acci::doThat() - case kVerbCodeplay");
else
@@ -1658,9 +1658,9 @@ void Acci::doThat() {
break;
case kVerbCodeRing:
if (holding()) {
- if (_thing == _vm->_gyro->bell) {
+ if (_thing == _vm->_gyro->kObjectBell) {
_vm->_scrolls->display("Ding, dong, ding, dong, ding, dong, ding, dong...");
- if ((_vm->_gyro->dna.ringing_bells) & (_vm->_gyro->flagset('B')))
+ 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\?\?!)");
} else
@@ -1682,7 +1682,7 @@ void Acci::doThat() {
warning("STUB: Acci::doThat() - case kVerbCodeboss");
break;
case kVerbCodePee:
- if (_vm->_gyro->flagset('P')) {
+ if (_vm->_gyro->setFlag('P')) {
_vm->_scrolls->display("Hmm, I don't think anyone will notice...");
_vm->_timeout->set_up_timer(4, _vm->_timeout->procurinate, _vm->_timeout->reason_gototoilet);
} else
@@ -1691,13 +1691,13 @@ void Acci::doThat() {
break;
case kVerbCodeCheat:
_vm->_scrolls->display(Common::String(_vm->_scrolls->kControlItalic) + "Cheat mode now enabled.");
- _vm->_gyro->cheat = true;
+ _vm->_gyro->_cheat = true;
break;
case kVerbCodeMagic:
- if (_vm->_gyro->dna.avaricius_talk > 0)
+ if (_vm->_gyro->_dna._avariciusTalk > 0)
_vm->_visa->dixi('q', 19);
else {
- if ((_vm->_gyro->dna.room == 12) & (_vm->_trip->infield(2))) { // Avaricius appears!
+ if ((_vm->_gyro->_dna._room == 12) & (_vm->_trip->infield(2))) { // Avaricius appears!
_vm->_visa->dixi('q', 17);
if (_vm->_gyro->_whereIs[1] == 12)
_vm->_visa->dixi('q', 18);
@@ -1707,7 +1707,7 @@ void Acci::doThat() {
_vm->_trip->tr[1].walkto(5);
_vm->_trip->tr[1].call_eachstep = true;
_vm->_trip->tr[1].eachstep = _vm->_trip->procback_and_forth;
- _vm->_gyro->dna.avaricius_talk = 14;
+ _vm->_gyro->_dna._avariciusTalk = 14;
_vm->_timeout->set_up_timer(177, _vm->_timeout->procavaricius_talks, _vm->_timeout->reason_avariciustalks);
}
} else
@@ -1718,7 +1718,7 @@ void Acci::doThat() {
_vm->_scrolls->display("Listen, smart alec, that was just rhetoric.");
break;
case kVerbCodeExpletive:
- switch (_vm->_gyro->dna.swore) {
+ switch (_vm->_gyro->_dna._sworeNum) {
case 0:
_vm->_scrolls->display(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!)");
@@ -1733,18 +1733,18 @@ void Acci::doThat() {
+ _vm->_scrolls->kControlNewLine + _vm->_scrolls->kControlNewLine + "(`Such is the anger of the gods, Avvy!\")");
_vm->_lucerna->gameover();
}
- _vm->_gyro->dna.swore++;
+ _vm->_gyro->_dna._sworeNum++;
break;
case kVerbCodeListen:
- if ((_vm->_gyro->dna.ringing_bells) & (_vm->_gyro->flagset('B')))
+ if ((_vm->_gyro->_dna._bellsAreRinging) & (_vm->_gyro->setFlag('B')))
_vm->_scrolls->display("All other noise is drowned out by the ringing of the bells.");
- else if (_vm->_gyro->listen.empty())
+ else if (_vm->_gyro->_listen.empty())
_vm->_scrolls->display("You can't hear anything much at the moment, Avvy.");
else
- _vm->_scrolls->display(_vm->_gyro->listen);
+ _vm->_scrolls->display(_vm->_gyro->_listen);
break;
case kVerbCodeBuy: // What are they trying to buy?
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__argentpub:
if (_vm->_trip->infield(6)) { // We're in a pub, and near the bar.
switch (_thing) {
@@ -1752,50 +1752,50 @@ void Acci::doThat() {
case 53:
case 54:
case 58: // Beer, whisky, cider or mead.
- if (_vm->_gyro->dna.malagauche == 177) { // Already getting us one.
+ if (_vm->_gyro->_dna._malagauche == 177) { // Already getting us one.
_vm->_visa->dixi('D', 15);
return;
}
- if (_vm->_gyro->dna.teetotal) {
+ if (_vm->_gyro->_dna._teetotal) {
_vm->_visa->dixi('D', 6);
return;
}
- if (_vm->_gyro->dna.alcohol == 0)
+ if (_vm->_gyro->_dna._alcoholLevel == 0)
_vm->_lucerna->points(3);
_vm->_celer->drawBackgroundSprite(-1, -1, 12);
_vm->_scrolls->display(booze[_thing - 51] + ", please." + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble);
- _vm->_gyro->dna.drinking = _thing;
+ _vm->_gyro->_dna._drinking = _thing;
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
- _vm->_gyro->dna.malagauche = 177;
+ _vm->_gyro->_dna._malagauche = 177;
_vm->_timeout->set_up_timer(27, _vm->_timeout->procbuydrinks, _vm->_timeout->reason_drinks);
break;
case 52:
examine();
break; // We have a right one here - buy Pepsi??!
- case Gyro::wine:
- if (_vm->_gyro->dna.obj[_vm->_gyro->wine - 1]) // We've already got the wine!
+ case Gyro::kObjectWine:
+ if (_vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1]) // We've already got the wine!
_vm->_visa->dixi('D', 2); // 1 bottle's shufishent!
else {
- if (_vm->_gyro->dna.malagauche == 177) { // Already getting us one.
+ if (_vm->_gyro->_dna._malagauche == 177) { // Already getting us one.
_vm->_visa->dixi('D', 15);
return;
}
- if (_vm->_gyro->dna.carrying >= maxobjs) {
+ if (_vm->_gyro->_dna._carryNum >= kCarryLimit) {
_vm->_scrolls->display("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);
- if (_vm->_gyro->dna.alcohol == 0)
+ if (_vm->_gyro->_dna._alcoholLevel == 0)
_vm->_lucerna->points(3);
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
- _vm->_gyro->dna.malagauche = 177;
+ _vm->_gyro->_dna._malagauche = 177;
_vm->_timeout->set_up_timer(27, _vm->_timeout->procbuywine, _vm->_timeout->reason_drinks);
}
@@ -1807,24 +1807,24 @@ void Acci::doThat() {
case r__outsideducks:
if (_vm->_trip->infield(6)) {
- if (_thing == _vm->_gyro->onion) {
- if (_vm->_gyro->dna.obj[_vm->_gyro->onion - 1])
+ if (_thing == _vm->_gyro->kObjectOnion) {
+ 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.carrying >= maxobjs)
+ else if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
_vm->_scrolls->display("Before you ask, you remember that your hands are full.");
else {
- if (_vm->_gyro->dna.bought_onion)
+ if (_vm->_gyro->_dna._boughtOnion)
_vm->_visa->dixi('D', 11);
else {
_vm->_visa->dixi('D', 9);
_vm->_lucerna->points(3);
}
- _vm->_gyro->pennycheck(3); // It costs thruppence.
- _vm->_gyro->dna.obj[_vm->_gyro->onion - 1] = true;
+ _vm->_gyro->updateMoney(3); // It costs thruppence.
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1] = true;
_vm->_lucerna->objectlist();
- _vm->_gyro->dna.bought_onion = true;
- _vm->_gyro->dna.rotten_onion = false; // It's OK when it leaves the stall!
- _vm->_gyro->dna.onion_in_vinegar = false;
+ _vm->_gyro->_dna._boughtOnion = true;
+ _vm->_gyro->_dna._rottenOnion = false; // It's OK when it leaves the stall!
+ _vm->_gyro->_dna._onionInVinegar = false;
}
} else
_vm->_visa->dixi('D', 0);
@@ -1840,10 +1840,10 @@ void Acci::doThat() {
}
break;
case kVerbCodeAttack:
- if ((_vm->_gyro->dna.room == r__brummieroad) &&
- ((_person == 157) || (_thing == _vm->_gyro->crossbow) || (_thing == _vm->_gyro->bolt))
- && (_vm->_gyro->_whereIs[7] == _vm->_gyro->dna.room)) {
- switch (_vm->_gyro->dna.obj[_vm->_gyro->bolt - 1] + _vm->_gyro->dna.obj[_vm->_gyro->crossbow - 1] * 2) {
+ if ((_vm->_gyro->_dna._room == r__brummieroad) &&
+ ((_person == 157) || (_thing == _vm->_gyro->kObjectCrossbow) || (_thing == _vm->_gyro->kObjectBolt))
+ && (_vm->_gyro->_whereIs[7] == _vm->_gyro->_dna._room)) {
+ switch (_vm->_gyro->_dna._objects[_vm->_gyro->kObjectBolt - 1] + _vm->_gyro->_dna._objects[_vm->_gyro->kObjectCrossbow - 1] * 2) {
// 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both.
case 0:
_vm->_visa->dixi('Q', 10);
@@ -1857,11 +1857,11 @@ void Acci::doThat() {
break;
case 3:
_vm->_visa->dixi('Q', 11);
- _vm->_gyro->dna.cwytalot_gone = true;
- _vm->_gyro->dna.obj[_vm->_gyro->bolt - 1] = false;
- _vm->_gyro->dna.obj[_vm->_gyro->crossbow - 1] = false;
+ _vm->_gyro->_dna._cwytalotGone = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectBolt - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectCrossbow - 1] = false;
_vm->_lucerna->objectlist();
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicNothing;
_vm->_lucerna->points(7);
_vm->_trip->tr[1].walkto(2);
_vm->_trip->tr[1].vanishifstill = true;
@@ -1875,27 +1875,27 @@ void Acci::doThat() {
_vm->_visa->dixi('Q', 10);
break;
case kVerbCodePasswd:
- if (_vm->_gyro->dna.room != r__bridge)
+ if (_vm->_gyro->_dna._room != r__bridge)
_vm->_visa->dixi('Q', 12);
else {
bool ok = true;
for (byte i = 0; i < _thats.size(); i++) {
Common::String temp = _realWords[i];
temp.toUppercase();
- for (byte j = 0; j < kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word.size(); j++) {
- if (kVocabulary[_vm->_gyro->dna.pass_num + kFirstPassword]._word[j] != temp[j])
+ for (byte j = 0; j < kVocabulary[_vm->_gyro->_dna._passwordNum + kFirstPassword]._word.size(); j++) {
+ if (kVocabulary[_vm->_gyro->_dna._passwordNum + kFirstPassword]._word[j] != temp[j])
ok = false;
}
}
if (ok) {
- if (_vm->_gyro->dna.drawbridge_open != 0)
+ if (_vm->_gyro->_dna._drawbridgeOpen != 0)
_vm->_scrolls->display("Contrary to your expectations, the drawbridge fails to close again.");
else {
_vm->_lucerna->points(4);
_vm->_scrolls->display("The drawbridge opens!");
_vm->_timeout->set_up_timer(7, _vm->_timeout->procopen_drawbridge, _vm->_timeout->reason_drawbridgefalls);
- _vm->_gyro->dna.drawbridge_open = 1;
+ _vm->_gyro->_dna._drawbridgeOpen = 1;
}
} else
_vm->_visa->dixi('Q', 12);
@@ -1908,7 +1908,7 @@ void Acci::doThat() {
_vm->_lucerna->gameover();
break;
case kVerbCodeScore:
- _vm->_scrolls->display(Common::String("Your score is ") + _vm->_gyro->strf(_vm->_gyro->dna.score) + ',' + _vm->_scrolls->kControlCenter
+ _vm->_scrolls->display(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;
@@ -1923,13 +1923,13 @@ void Acci::doThat() {
_vm->_scrolls->display("Kiss whom?");
else if (isPersonHere()) {
switch (_person) {
- case Gyro::parkata:
+ case Gyro::kPeopleArkata:
_vm->_visa->dixi('U', 12);
break;
- case Gyro::pgeida:
+ case Gyro::kPeopleGeida:
_vm->_visa->dixi('U', 13);
break;
- case Gyro::pwisewoman:
+ case Gyro::kPeopleWisewoman:
_vm->_visa->dixi('U', 14);
break;
default:
@@ -1940,14 +1940,14 @@ void Acci::doThat() {
break;
case kVerbCodeClimb:
- if (_vm->_gyro->dna.room == r__insidecardiffcastle)
+ if (_vm->_gyro->_dna._room == r__insidecardiffcastle)
cardiffClimbing();
else // In the wrong room!
_vm->_scrolls->display("Not with your head for heights, Avvy!");
break;
case kVerbCodeJump:
_vm->_timeout->set_up_timer(1, _vm->_timeout->procjump, _vm->_timeout->reason_jumping);
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
break;
case kVerbCodeHiscores:
// show_highs();
@@ -1957,23 +1957,23 @@ void Acci::doThat() {
if (isPersonHere())
switch (_person) {
case kPardon:
- case Gyro::pavalot:
+ case Gyro::kPeopleAvalot:
case 0:
- if (!_vm->_gyro->dna.avvy_is_awake) {
- _vm->_gyro->dna.avvy_is_awake = true;
+ if (!_vm->_gyro->_dna._avvyIsAwake) {
+ _vm->_gyro->_dna._avvyIsAwake = true;
_vm->_lucerna->points(1);
- _vm->_gyro->dna.avvy_in_bed = true;
+ _vm->_gyro->_dna._avvyInBed = true;
_vm->_celer->drawBackgroundSprite(-1, -1, 3); // Picture of Avvy, awake in bed.
- if (_vm->_gyro->dna.teetotal)
+ if (_vm->_gyro->_dna._teetotal)
_vm->_visa->dixi('d', 13);
} else
_vm->_scrolls->display("You're already awake, Avvy!");
break;
- case Gyro::payles:
- if (!_vm->_gyro->dna.ayles_is_awake)
+ case Gyro::kPeopleAyles:
+ if (!_vm->_gyro->_dna._aylesIsAwake)
_vm->_scrolls->display("You can't seem to wake him by yourself.");
break;
- case Gyro::pjacques:
+ case Gyro::kPeopleJacques:
_vm->_scrolls->display(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;
@@ -1982,8 +1982,8 @@ void Acci::doThat() {
}
break;
case kVerbCodeSit:
- if (_vm->_gyro->dna.room == r__nottspub) {
- if (_vm->_gyro->dna.sitting_in_pub)
+ if (_vm->_gyro->_dna._room == r__nottspub) {
+ if (_vm->_gyro->_dna._sittingInPub)
_vm->_scrolls->display("You're already sitting!");
else {
_vm->_trip->tr[0].walkto(4); // Move Avvy to the place, and sit him down.
@@ -1991,7 +1991,7 @@ void Acci::doThat() {
}
} else { // Default doodah.
_vm->_lucerna->dusk();
- _vm->_gyro->hang_around_for_a_while();
+ _vm->_gyro->hangAroundForAWhile();
_vm->_lucerna->dawn();
_vm->_scrolls->display(Common::String("A few hours later...") + _vm->_scrolls->kControlParagraph + "nothing much has happened...");
}
@@ -1999,7 +1999,7 @@ void Acci::doThat() {
case kVerbCodeRestart:
if (_vm->_scrolls->ask("Restart game and lose changes?")) {
_vm->_lucerna->dusk();
- _vm->_gyro->newgame();
+ _vm->_gyro->newGame();
_vm->_lucerna->dawn();
}
break;
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 100f468de9..9347b7762b 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -129,146 +129,146 @@ const char *AvalancheEngine::getCopyrightString() const {
void AvalancheEngine::synchronize(Common::Serializer &sz) {
//blockwrite(f, dna, sizeof(dna));
- sz.syncAsByte(_gyro->dna.rw);
- sz.syncAsByte(_gyro->dna.carrying);
- for (byte i = 0; i < numobjs; i++)
- sz.syncAsByte(_gyro->dna.obj[i]);
- sz.syncAsSint16LE(_gyro->dna.score);
- sz.syncAsSint32LE(_gyro->dna.pence);
- sz.syncAsByte(_gyro->dna.room);
- sz.syncAsByte(_gyro->dna.wearing);
- sz.syncAsByte(_gyro->dna.swore);
- sz.syncAsByte(_gyro->dna.saves);
- sz.syncBytes(_gyro->dna.rooms, 100);
- sz.syncAsByte(_gyro->dna.alcohol);
- sz.syncAsByte(_gyro->dna.playednim);
- sz.syncAsByte(_gyro->dna.wonnim);
- sz.syncAsByte(_gyro->dna.winestate);
- sz.syncAsByte(_gyro->dna.cwytalot_gone);
- sz.syncAsByte(_gyro->dna.pass_num);
- sz.syncAsByte(_gyro->dna.ayles_is_awake);
- sz.syncAsByte(_gyro->dna.drawbridge_open);
- sz.syncAsByte(_gyro->dna.avaricius_talk);
- sz.syncAsByte(_gyro->dna.bought_onion);
- sz.syncAsByte(_gyro->dna.rotten_onion);
- sz.syncAsByte(_gyro->dna.onion_in_vinegar);
- sz.syncAsByte(_gyro->dna.given2spludwick);
- sz.syncAsByte(_gyro->dna.brummie_stairs);
- sz.syncAsByte(_gyro->dna.cardiff_things);
- sz.syncAsByte(_gyro->dna.cwytalot_in_herts);
- sz.syncAsByte(_gyro->dna.avvy_is_awake);
- sz.syncAsByte(_gyro->dna.avvy_in_bed);
- sz.syncAsByte(_gyro->dna.user_moves_avvy);
- sz.syncAsByte(_gyro->dna.dogfoodpos);
- sz.syncAsByte(_gyro->dna.givenbadgetoiby);
- sz.syncAsByte(_gyro->dna.friar_will_tie_you_up);
- sz.syncAsByte(_gyro->dna.tied_up);
- sz.syncAsByte(_gyro->dna.box_contents);
- sz.syncAsByte(_gyro->dna.talked_to_crapulus);
- sz.syncAsByte(_gyro->dna.jacques_awake);
- sz.syncAsByte(_gyro->dna.ringing_bells);
- sz.syncAsByte(_gyro->dna.standing_on_dais);
- sz.syncAsByte(_gyro->dna.taken_pen);
- sz.syncAsByte(_gyro->dna.arrow_triggered);
- sz.syncAsByte(_gyro->dna.arrow_in_the_door);
+ sz.syncAsByte(_gyro->_dna._direction);
+ sz.syncAsByte(_gyro->_dna._carryNum);
+ for (byte i = 0; i < kObjectNum; i++)
+ sz.syncAsByte(_gyro->_dna._objects[i]);
+ sz.syncAsSint16LE(_gyro->_dna._score);
+ sz.syncAsSint32LE(_gyro->_dna._money);
+ sz.syncAsByte(_gyro->_dna._room);
+ sz.syncAsByte(_gyro->_dna._wearing);
+ sz.syncAsByte(_gyro->_dna._sworeNum);
+ sz.syncAsByte(_gyro->_dna._saveNum);
+ sz.syncBytes(_gyro->_dna._roomCount, 100);
+ sz.syncAsByte(_gyro->_dna._alcoholLevel);
+ sz.syncAsByte(_gyro->_dna._playedNim);
+ sz.syncAsByte(_gyro->_dna._wonNim);
+ sz.syncAsByte(_gyro->_dna._wineState);
+ sz.syncAsByte(_gyro->_dna._cwytalotGone);
+ sz.syncAsByte(_gyro->_dna._passwordNum);
+ sz.syncAsByte(_gyro->_dna._aylesIsAwake);
+ sz.syncAsByte(_gyro->_dna._drawbridgeOpen);
+ sz.syncAsByte(_gyro->_dna._avariciusTalk);
+ sz.syncAsByte(_gyro->_dna._boughtOnion);
+ sz.syncAsByte(_gyro->_dna._rottenOnion);
+ sz.syncAsByte(_gyro->_dna._onionInVinegar);
+ sz.syncAsByte(_gyro->_dna._givenToSpludwick);
+ sz.syncAsByte(_gyro->_dna._brummieStairs);
+ sz.syncAsByte(_gyro->_dna._cardiffQuestionNum);
+ sz.syncAsByte(_gyro->_dna._passedCwytalotInHerts);
+ sz.syncAsByte(_gyro->_dna._avvyIsAwake);
+ sz.syncAsByte(_gyro->_dna._avvyInBed);
+ sz.syncAsByte(_gyro->_dna._userMovesAvvy);
+ sz.syncAsByte(_gyro->_dna._dogFoodPos);
+ sz.syncAsByte(_gyro->_dna._givenBadgeToIby);
+ sz.syncAsByte(_gyro->_dna._friarWillTieYouUp);
+ sz.syncAsByte(_gyro->_dna._tiedUp);
+ sz.syncAsByte(_gyro->_dna._boxContent);
+ sz.syncAsByte(_gyro->_dna._talkedToCrapulus);
+ sz.syncAsByte(_gyro->_dna._jacquesState);
+ sz.syncAsByte(_gyro->_dna._bellsAreRinging);
+ sz.syncAsByte(_gyro->_dna._standingOnDais);
+ sz.syncAsByte(_gyro->_dna._takenPen);
+ sz.syncAsByte(_gyro->_dna._arrowTriggered);
+ sz.syncAsByte(_gyro->_dna._arrowInTheDoor);
if (sz.isSaving()) {
- uint16 like2drinkSize = _gyro->dna.like2drink.size();
+ uint16 like2drinkSize = _gyro->_dna._favouriteDrink.size();
sz.syncAsUint16LE(like2drinkSize);
for (uint16 i = 0; i < like2drinkSize; i++) {
- char actChr = _gyro->dna.like2drink[i];
+ char actChr = _gyro->_dna._favouriteDrink[i];
sz.syncAsByte(actChr);
}
- uint16 favourite_songSize = _gyro->dna.favourite_song.size();
+ uint16 favourite_songSize = _gyro->_dna._favouriteSong.size();
sz.syncAsUint16LE(favourite_songSize);
for (uint16 i = 0; i < favourite_songSize; i++) {
- char actChr = _gyro->dna.favourite_song[i];
+ char actChr = _gyro->_dna._favouriteSong[i];
sz.syncAsByte(actChr);
}
- uint16 worst_place_on_earthSize = _gyro->dna.worst_place_on_earth.size();
+ uint16 worst_place_on_earthSize = _gyro->_dna._worstPlaceOnEarth.size();
sz.syncAsUint16LE(worst_place_on_earthSize);
for (uint16 i = 0; i < worst_place_on_earthSize; i++) {
- char actChr = _gyro->dna.worst_place_on_earth[i];
+ char actChr = _gyro->_dna._worstPlaceOnEarth[i];
sz.syncAsByte(actChr);
}
- uint16 spare_eveningSize = _gyro->dna.spare_evening.size();
+ uint16 spare_eveningSize = _gyro->_dna._spareEvening.size();
sz.syncAsUint16LE(spare_eveningSize);
for (uint16 i = 0; i < spare_eveningSize; i++) {
- char actChr = _gyro->dna.spare_evening[i];
+ char actChr = _gyro->_dna._spareEvening[i];
sz.syncAsByte(actChr);
}
} else {
- if (!_gyro->dna.like2drink.empty())
- _gyro->dna.like2drink.clear();
+ if (!_gyro->_dna._favouriteDrink.empty())
+ _gyro->_dna._favouriteDrink.clear();
uint16 like2drinkSize = 0;
char actChr = ' ';
sz.syncAsUint16LE(like2drinkSize);
for (uint16 i = 0; i < like2drinkSize; i++) {
sz.syncAsByte(actChr);
- _gyro->dna.like2drink += actChr;
+ _gyro->_dna._favouriteDrink += actChr;
}
- if (!_gyro->dna.favourite_song.empty())
- _gyro->dna.favourite_song.clear();
+ if (!_gyro->_dna._favouriteSong.empty())
+ _gyro->_dna._favouriteSong.clear();
uint16 favourite_songSize = 0;
sz.syncAsUint16LE(favourite_songSize);
for (uint16 i = 0; i < favourite_songSize; i++) {
sz.syncAsByte(actChr);
- _gyro->dna.favourite_song += actChr;
+ _gyro->_dna._favouriteSong += actChr;
}
- if (!_gyro->dna.worst_place_on_earth.empty())
- _gyro->dna.worst_place_on_earth.clear();
+ if (!_gyro->_dna._worstPlaceOnEarth.empty())
+ _gyro->_dna._worstPlaceOnEarth.clear();
uint16 worst_place_on_earthSize = 0;
sz.syncAsUint16LE(worst_place_on_earthSize);
for (uint16 i = 0; i < worst_place_on_earthSize; i++) {
sz.syncAsByte(actChr);
- _gyro->dna.worst_place_on_earth += actChr;
+ _gyro->_dna._worstPlaceOnEarth += actChr;
}
- if (!_gyro->dna.spare_evening.empty())
- _gyro->dna.spare_evening.clear();
+ if (!_gyro->_dna._spareEvening.empty())
+ _gyro->_dna._spareEvening.clear();
uint16 spare_eveningSize = 0;
sz.syncAsUint16LE(spare_eveningSize);
for (uint16 i = 0; i < spare_eveningSize; i++) {
sz.syncAsByte(actChr);
- _gyro->dna.spare_evening += actChr;
+ _gyro->_dna._spareEvening += actChr;
}
}
- sz.syncAsSint32LE(_gyro->dna.total_time);
- sz.syncAsByte(_gyro->dna.jumpstatus);
- sz.syncAsByte(_gyro->dna.mushroom_growing);
- sz.syncAsByte(_gyro->dna.spludwicks_here);
- sz.syncAsByte(_gyro->dna.last_room);
- sz.syncAsByte(_gyro->dna.last_room_not_map);
- sz.syncAsByte(_gyro->dna.crapulus_will_tell);
- sz.syncAsByte(_gyro->dna.enter_catacombs_from_lusties_room);
- sz.syncAsByte(_gyro->dna.teetotal);
- sz.syncAsByte(_gyro->dna.malagauche);
- sz.syncAsByte(_gyro->dna.drinking);
- sz.syncAsByte(_gyro->dna.entered_lusties_room_as_monk);
- sz.syncAsByte(_gyro->dna.cat_x);
- sz.syncAsByte(_gyro->dna.cat_y);
- sz.syncAsByte(_gyro->dna.avvys_in_the_cupboard);
- sz.syncAsByte(_gyro->dna.geida_follows);
- sz.syncAsByte(_gyro->dna.geida_spin);
- sz.syncAsByte(_gyro->dna.geida_time);
- sz.syncAsByte(_gyro->dna.nextbell);
- sz.syncAsByte(_gyro->dna.geida_given_potion);
- sz.syncAsByte(_gyro->dna.lustie_is_asleep);
- sz.syncAsByte(_gyro->dna.flip_to_where);
- sz.syncAsByte(_gyro->dna.flip_to_ped);
- sz.syncAsByte(_gyro->dna.been_tied_up);
- sz.syncAsByte(_gyro->dna.sitting_in_pub);
- sz.syncAsByte(_gyro->dna.spurge_talk);
- sz.syncAsByte(_gyro->dna.met_avaroid);
- sz.syncAsByte(_gyro->dna.taken_mushroom);
- sz.syncAsByte(_gyro->dna.given_pen_to_ayles);
- sz.syncAsByte(_gyro->dna.asked_dogfood_about_nim);
+ sz.syncAsSint32LE(_gyro->_dna._totalTime);
+ sz.syncAsByte(_gyro->_dna._jumpStatus);
+ sz.syncAsByte(_gyro->_dna._mushroomGrowing);
+ sz.syncAsByte(_gyro->_dna._spludwickAtHome);
+ sz.syncAsByte(_gyro->_dna._lastRoom);
+ sz.syncAsByte(_gyro->_dna._lastRoomNotMap);
+ sz.syncAsByte(_gyro->_dna._crapulusWillTell);
+ sz.syncAsByte(_gyro->_dna._enterCatacombsFromLustiesRoom);
+ sz.syncAsByte(_gyro->_dna._teetotal);
+ sz.syncAsByte(_gyro->_dna._malagauche);
+ sz.syncAsByte(_gyro->_dna._drinking);
+ sz.syncAsByte(_gyro->_dna._enteredLustiesRoomAsMonk);
+ sz.syncAsByte(_gyro->_dna._catacombX);
+ sz.syncAsByte(_gyro->_dna._catacombY);
+ sz.syncAsByte(_gyro->_dna._avvysInTheCupboard);
+ sz.syncAsByte(_gyro->_dna._geidaFollows);
+ sz.syncAsByte(_gyro->_dna._geidaSpin);
+ sz.syncAsByte(_gyro->_dna._geidaTime);
+ sz.syncAsByte(_gyro->_dna._nextBell);
+ sz.syncAsByte(_gyro->_dna._givenPotionToGeida);
+ sz.syncAsByte(_gyro->_dna._lustieIsAsleep);
+ sz.syncAsByte(_gyro->_dna._flipToWhere);
+ sz.syncAsByte(_gyro->_dna._flipToPed);
+ sz.syncAsByte(_gyro->_dna._beenTiedUp);
+ sz.syncAsByte(_gyro->_dna._sittingInPub);
+ sz.syncAsByte(_gyro->_dna._spurgeTalkCount);
+ sz.syncAsByte(_gyro->_dna._metAvaroid);
+ sz.syncAsByte(_gyro->_dna._takenMushroom);
+ sz.syncAsByte(_gyro->_dna._givenPenToAyles);
+ sz.syncAsByte(_gyro->_dna._askedDogfoodAboutNim);
#if 0
@@ -345,7 +345,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
}
bool AvalancheEngine::canSaveGameStateCurrently() { // TODO: Refine these!!!
- return (!_gyro->seescroll && _gyro->alive);
+ return (!_gyro->_seeScroll && _gyro->_alive);
}
Common::Error AvalancheEngine::saveGameState(int slot, const Common::String &desc) {
@@ -398,7 +398,7 @@ Common::String AvalancheEngine::getSaveFileName(const int slot) {
bool AvalancheEngine::canLoadGameStateCurrently() { // TODO: Refine these!!!
- return (!_gyro->seescroll);
+ return (!_gyro->_seeScroll);
}
Common::Error AvalancheEngine::loadGameState(int slot) {
@@ -451,10 +451,10 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_gyro->isLoaded = true;
- _gyro->seescroll = true; // This prevents display of the new sprites before the new picture is loaded.
+ _gyro->_seeScroll = true; // This prevents display of the new sprites before the new picture is loaded.
- if (_gyro->holdthedawn) {
- _gyro->holdthedawn = false;
+ if (_gyro->_holdTheDawn) {
+ _gyro->_holdTheDawn = false;
_lucerna->dawn();
}
@@ -464,9 +464,9 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_dropdown->setupMenu();
- _gyro->_whereIs[0] = _gyro->dna.room;
+ _gyro->_whereIs[0] = _gyro->_dna._room;
- _gyro->alive = true;
+ _gyro->_alive = true;
_lucerna->objectlist();
@@ -474,18 +474,18 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_lucerna->showrw();
- _gyro->ontoolbar = false;
+ _gyro->_onToolbar = false;
_trip->trippancy_link();
_celer->updateBackgroundSprites();
_scrolls->display(Common::String(_scrolls->kControlItalic) + "Loaded: " + _scrolls->kControlRoman + description + ".ASG"
+ _scrolls->kControlCenter + _scrolls->kControlNewLine + _scrolls->kControlNewLine
- + _gyro->roomname + _scrolls->kControlNewLine + _scrolls->kControlNewLine
+ + _gyro->_roomnName + _scrolls->kControlNewLine + _scrolls->kControlNewLine
+ "saved on " + expandDate(t.tm_mday, t.tm_mon, t.tm_year) + '.');
if (_trip->tr[0].quick && _trip->tr[0].visible)
- _trip->rwsp(0, _gyro->dna.rw); // We push Avvy in the right direction is he was moving.
+ _trip->rwsp(0, _gyro->_dna._direction); // We push Avvy in the right direction is he was moving.
return true;
}
@@ -497,7 +497,7 @@ Common::String AvalancheEngine::expandDate(int d, int m, int y) {
Common::String month = months[m];
- Common::String day = _gyro->strf(d);
+ Common::String day = _gyro->intToStr(d);
if (((1 <= d) && (d <= 9)) || ((21 <= d) && (d <= 31)))
switch (d % 10) {
@@ -514,7 +514,7 @@ Common::String AvalancheEngine::expandDate(int d, int m, int y) {
day = day + "th";
}
- return day + ' ' + month + ' ' + _gyro->strf(y + 1900);
+ return day + ' ' + month + ' ' + _gyro->intToStr(y + 1900);
}
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 3f948c3224..3d3a7a01fe 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -109,7 +109,7 @@ void Avalot::handleKeyDown(Common::Event &event) {
case Common::KEYCODE_HOME:
case Common::KEYCODE_END:
case Common::KEYCODE_KP5:
- if (_vm->_gyro->alive && _vm->_gyro->dna.avvy_is_awake) {
+ if (_vm->_gyro->_alive && _vm->_gyro->_dna._avvyIsAwake) {
_vm->_trip->handleMoveKey(event); // Fallthroughs are intended.
_vm->_lucerna->showrw();
return;
@@ -130,40 +130,36 @@ void Avalot::handleKeyDown(Common::Event &event) {
void Avalot::setup() {
- _vm->_gyro->visible = _vm->_gyro->m_no;
- _vm->_gyro->to_do = 0;
- _vm->_gyro->lmo = false;
+ _vm->_gyro->_mouse = _vm->_gyro->kMouseStateNo;
+ _vm->_gyro->_letMeOut = false;
_vm->_scrolls->resetscroll();
CursorMan.showMouse(true);
- _vm->_gyro->holdthedawn = true;
+ _vm->_gyro->_holdTheDawn = true;
_vm->_lucerna->dusk();
- _vm->_gyro->cmp = 177;
+ _vm->_gyro->_currentMouse = 177;
_vm->_lucerna->mouse_init(); // on;
- _vm->_gyro->dropsok = true;
- _vm->_gyro->ctrl = ckey;
- _vm->_gyro->oldjw = 177;
- _vm->_gyro->mousetext = "";
- _vm->_gyro->c = 999;
- _vm->_gyro->ddmnow = false;
+ _vm->_gyro->_dropsOk = true;
+ _vm->_gyro->_mouseText = "";
+ _vm->_gyro->_dropdownActive = false;
_vm->_lucerna->load_digits();
- _vm->_gyro->cheat = false;
- _vm->_gyro->cp = 0;
+ _vm->_gyro->_cheat = false;
+ _vm->_gyro->_cp = 0;
_vm->_parser->_inputTextPos = 0;
_vm->_parser->_quote = true;
- _vm->_gyro->ledstatus = 177;
- _vm->_gyro->defaultled = 2;
+ _vm->_gyro->_ledStatus = 177;
+ _vm->_gyro->_defaultLed = 2;
// TSkellern = 0; Replace with a more local variable sometime
- _vm->_gyro->dna.rw = _vm->_gyro->kDirectionStopped;
- _vm->_gyro->enid_filename = ""; // Undefined.
+ _vm->_gyro->_dna._direction = _vm->_gyro->kDirectionStopped;
+ _vm->_gyro->_enidFilename = ""; // Undefined.
_vm->_lucerna->toolbar();
_vm->_scrolls->state(2);
for (byte i = 0; i < 3; i++)
- _vm->_gyro->lastscore[i] = -1; // Impossible digits.
+ _vm->_gyro->_scoreToDisplay[i] = -1; // Impossible digits.
_vm->_trip->loadtrip();
_vm->_trip->get_back_loretta();
- _vm->_gyro->holdthedawn = false;
+ _vm->_gyro->_holdTheDawn = false;
_vm->_lucerna->dawn();
_vm->_parser->_cursorState = false;
_vm->_parser->cursorOn();
@@ -174,17 +170,17 @@ void Avalot::setup() {
int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot");
if (loadSlot >= 0) {
- _vm->_gyro->thinks = 2; // You always have money.
- _vm->_lucerna->thinkabout(_vm->_gyro->money, _vm->_gyro->kThing);
+ _vm->_gyro->_thinks = 2; // You always have money.
+ _vm->_lucerna->thinkabout(_vm->_gyro->kObjectMoney, _vm->_gyro->kThing);
_vm->loadGame(loadSlot);
} else {
_vm->_gyro->isLoaded = false; // Set to true in _vm->loadGame().
- _vm->_gyro->newgame(); // No game was requested- load the default.
+ _vm->_gyro->newGame(); // No game was requested- load the default.
- _vm->_gyro->soundfx = ! _vm->_gyro->soundfx;
+ _vm->_gyro->_soundFx = ! _vm->_gyro->_soundFx;
_vm->_lucerna->fxtoggle();
- _vm->_lucerna->thinkabout(_vm->_gyro->money, _vm->_gyro->kThing);
+ _vm->_lucerna->thinkabout(_vm->_gyro->kObjectMoney, _vm->_gyro->kThing);
_vm->_visa->dixi('q', 83); // Info on the game, etc.
}
@@ -204,7 +200,7 @@ void Avalot::run(Common::String arg) {
_vm->_lucerna->clock_lucerna();
_vm->_dropdown->updateMenu();
- _vm->_gyro->force_numlock();
+ _vm->_gyro->forceNumlock();
_vm->_trip->get_back_loretta();
_vm->_celer->updateBackgroundSprites();
_vm->_trip->trippancy_link();
@@ -215,12 +211,12 @@ void Avalot::run(Common::String arg) {
#ifdef DEBUG
// ONLY FOR TESTING!!!
- for (byte i = 0; i < _vm->_gyro->lineNum; i++)
- _vm->_graphics->_surface.drawLine(_vm->_gyro->lines[i].x1, _vm->_gyro->lines[i].y1, _vm->_gyro->lines[i].x2, _vm->_gyro->lines[i].y2, _vm->_gyro->lines[i].col);
+ for (byte i = 0; i < _vm->_gyro->_lineNum; i++)
+ _vm->_graphics->_surface.drawLine(_vm->_gyro->_lines[i]._x1, _vm->_gyro->_lines[i]._y1, _vm->_gyro->_lines[i]._x2, _vm->_gyro->_lines[i]._y2, _vm->_gyro->_lines[i].col);
- for (byte i = 0; i < _vm->_gyro->numfields; i++) {
- if (_vm->_gyro->fields[i].x1 < 640)
- _vm->_graphics->_surface.frameRect(Common::Rect(_vm->_gyro->fields[i].x1, _vm->_gyro->fields[i].y1, _vm->_gyro->fields[i].x2, _vm->_gyro->fields[i].y2), kColorLightmagenta);
+ for (byte i = 0; i < _vm->_gyro->_fieldNum; i++) {
+ if (_vm->_gyro->_fields[i]._x1 < 640)
+ _vm->_graphics->_surface.frameRect(Common::Rect(_vm->_gyro->_fields[i]._x1, _vm->_gyro->_fields[i]._y1, _vm->_gyro->_fields[i]._x2, _vm->_gyro->_fields[i]._y2), kColorLightmagenta);
}
// ONLY FOR TESTING!!!
#endif
@@ -231,7 +227,7 @@ void Avalot::run(Common::String arg) {
uint32 delay = _vm->_system->getMillis() - beginLoop;
if (delay <= 55)
_vm->_system->delayMillis(55 - delay); // Replaces _vm->_gyro->slowdown(); 55 comes from 18.2 Hz (B Flight).
- } while (! _vm->_gyro->lmo);
+ } while (! _vm->_gyro->_letMeOut);
//if (logging)
// close(logfile);
diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp
index c9ad3cf809..cd56ead287 100644
--- a/engines/avalanche/celer2.cpp
+++ b/engines/avalanche/celer2.cpp
@@ -54,31 +54,31 @@ Celer::~Celer() {
* @remarks Originally called 'pics_link'
*/
void Celer::updateBackgroundSprites() {
- if (_vm->_gyro->ddmnow)
+ if (_vm->_gyro->_dropdownActive)
return; // No animation when the menus are up.
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__outsideargentpub:
- if ((_vm->_gyro->roomtime % 12) == 0)
- drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->roomtime / 12) % 4);
+ if ((_vm->_gyro->_roomTime % 12) == 0)
+ drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->_roomTime / 12) % 4);
break;
case r__brummieroad:
- if ((_vm->_gyro->roomtime % 2) == 0)
- drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->roomtime / 2) % 4);
+ if ((_vm->_gyro->_roomTime % 2) == 0)
+ drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->_roomTime / 2) % 4);
break;
case r__bridge:
- if ((_vm->_gyro->roomtime % 2) == 0)
- drawBackgroundSprite(-1, -1, 4 + (_vm->_gyro->roomtime / 2) % 4);
+ if ((_vm->_gyro->_roomTime % 2) == 0)
+ drawBackgroundSprite(-1, -1, 4 + (_vm->_gyro->_roomTime / 2) % 4);
break;
case r__yours:
- if ((!_vm->_gyro->dna.avvy_is_awake) && ((_vm->_gyro->roomtime % 4) == 0))
- drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->roomtime / 12) % 2);
+ if ((!_vm->_gyro->_dna._avvyIsAwake) && ((_vm->_gyro->_roomTime % 4) == 0))
+ drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->_roomTime / 12) % 2);
break;
case r__argentpub:
- if (((_vm->_gyro->roomtime % 7) == 1) && (_vm->_gyro->dna.malagauche != 177)) {
+ if (((_vm->_gyro->_roomTime % 7) == 1) && (_vm->_gyro->_dna._malagauche != 177)) {
// Malagauche cycle.
- _vm->_gyro->dna.malagauche += 1;
- switch (_vm->_gyro->dna.malagauche) {
+ _vm->_gyro->_dna._malagauche += 1;
+ switch (_vm->_gyro->_dna._malagauche) {
case 1:
case 11:
case 21:
@@ -94,12 +94,12 @@ void Celer::updateBackgroundSprites() {
drawBackgroundSprite(-1, -1, 13); // Winks.
break;
case 33:
- _vm->_gyro->dna.malagauche = 0;
+ _vm->_gyro->_dna._malagauche = 0;
break;
}
}
- switch (_vm->_gyro->roomtime % 200) {
+ switch (_vm->_gyro->_roomTime % 200) {
case 179:
case 197:
drawBackgroundSprite(-1, -1, 5); // Dogfood's drinking cycle.
@@ -112,11 +112,11 @@ void Celer::updateBackgroundSprites() {
drawBackgroundSprite(-1, -1, 7);
break;
case 199:
- _vm->_gyro->dna.dogfoodpos = 177; // Impossible value for this.
+ _vm->_gyro->_dna._dogFoodPos = 177; // Impossible value for this.
break;
}
- if ((_vm->_gyro->roomtime % 200 >= 0) && (_vm->_gyro->roomtime % 200 <= 178)) { // Normally.
+ if ((_vm->_gyro->_roomTime % 200 >= 0) && (_vm->_gyro->_roomTime % 200 <= 178)) { // Normally.
byte direction = 0;
if (((_vm->_lucerna->bearing(2) >= 1) && (_vm->_lucerna->bearing(2) <= 90)) || ((_vm->_lucerna->bearing(2) >= 358) && (_vm->_lucerna->bearing(2) <= 360)))
direction = 3;
@@ -125,15 +125,15 @@ void Celer::updateBackgroundSprites() {
else if ((_vm->_lucerna->bearing(2) >= 271) && (_vm->_lucerna->bearing(2) <= 292))
direction = 4;
- if (direction != _vm->_gyro->dna.dogfoodpos) { // Only if it's changed.
+ if (direction != _vm->_gyro->_dna._dogFoodPos) { // Only if it's changed.
drawBackgroundSprite(-1, -1, direction);
- _vm->_gyro->dna.dogfoodpos = direction;
+ _vm->_gyro->_dna._dogFoodPos = direction;
}
}
break;
case r__westhall:
- if ((_vm->_gyro->roomtime % 3) == 0) {
- switch ((_vm->_gyro->roomtime / int32(3)) % int32(6)) {
+ if ((_vm->_gyro->_roomTime % 3) == 0) {
+ switch ((_vm->_gyro->_roomTime / int32(3)) % int32(6)) {
case 4:
drawBackgroundSprite(-1, -1, 1);
break;
@@ -150,10 +150,10 @@ void Celer::updateBackgroundSprites() {
}
break;
case r__lustiesroom:
- if (!(_vm->_gyro->dna.lustie_is_asleep)) {
+ if (!(_vm->_gyro->_dna._lustieIsAsleep)) {
byte direction = 0;
uint16 angle = _vm->_lucerna->bearing(2);
- if ((_vm->_gyro->roomtime % 45) > 42)
+ if ((_vm->_gyro->_roomTime % 45) > 42)
direction = 4; // du Lustie blinks.
// Bearing of Avvy from du Lustie.
else if ((angle <= 45) || ((angle >= 315) && (angle <= 360)))
@@ -163,15 +163,15 @@ void Celer::updateBackgroundSprites() {
else if ((angle >= 181) && (angle <= 314))
direction = 3; // Right.
- if (direction != _vm->_gyro->dna.dogfoodpos) { // Only if it's changed.
+ if (direction != _vm->_gyro->_dna._dogFoodPos) { // Only if it's changed.
drawBackgroundSprite(-1, -1, direction);
- _vm->_gyro->dna.dogfoodpos = direction; // We use DogfoodPos here too - why not?
+ _vm->_gyro->_dna._dogFoodPos = direction; // We use DogfoodPos here too - why not?
}
}
break;
case r__aylesoffice:
- if ((!_vm->_gyro->dna.ayles_is_awake) && (_vm->_gyro->roomtime % 14 == 0)) {
- switch ((_vm->_gyro->roomtime / 14) % 2) {
+ if ((!_vm->_gyro->_dna._aylesIsAwake) && (_vm->_gyro->_roomTime % 14 == 0)) {
+ switch ((_vm->_gyro->_roomTime / 14) % 2) {
case 0:
drawBackgroundSprite(-1, -1, 1); // Frame 2: EGA.
break;
@@ -182,8 +182,8 @@ void Celer::updateBackgroundSprites() {
}
break;
case r__robins:
- if (_vm->_gyro->dna.tied_up) {
- switch (_vm->_gyro->roomtime % 54) {
+ if (_vm->_gyro->_dna._tiedUp) {
+ switch (_vm->_gyro->_roomTime % 54) {
case 20:
drawBackgroundSprite(-1, -1, 4); // Frame 4: Avalot blinks.
break;
@@ -204,15 +204,15 @@ void Celer::updateBackgroundSprites() {
else if ((angle >= 181) && (angle <= 314))
direction = 8; // Right.
- if ((_vm->_gyro->roomtime % 60) > 57)
+ if ((_vm->_gyro->_roomTime % 60) > 57)
direction--; // Blinks.
- if (direction != _vm->_gyro->dna.dogfoodpos) { // Only if it's changed.
+ if (direction != _vm->_gyro->_dna._dogFoodPos) { // Only if it's changed.
drawBackgroundSprite(-1, -1, direction);
- _vm->_gyro->dna.dogfoodpos = direction; // We use DogfoodPos here too - why not?
+ _vm->_gyro->_dna._dogFoodPos = direction; // We use DogfoodPos here too - why not?
}
- switch (_vm->_gyro->roomtime % 50) {
+ switch (_vm->_gyro->_roomTime % 50) {
case 45 :
drawBackgroundSprite(-1, -1, 9); // Spurge blinks.
break;
@@ -223,8 +223,8 @@ void Celer::updateBackgroundSprites() {
break;
}
case r__ducks: {
- if ((_vm->_gyro->roomtime % 3) == 0) // The fire flickers.
- drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->roomtime / 3) % 3);
+ if ((_vm->_gyro->_roomTime % 3) == 0) // The fire flickers.
+ drawBackgroundSprite(-1, -1, 1 + (_vm->_gyro->_roomTime / 3) % 3);
// Bearing of Avvy from Duck.
byte direction = 0;
@@ -236,25 +236,25 @@ void Celer::updateBackgroundSprites() {
else if ((angle >= 181) && (angle <= 314))
direction = 8; // Right.
- if ((_vm->_gyro->roomtime % 45) > 42)
+ if ((_vm->_gyro->_roomTime % 45) > 42)
direction++; // Duck blinks.
- if (direction != _vm->_gyro->dna.dogfoodpos) { // Only if it's changed.
+ if (direction != _vm->_gyro->_dna._dogFoodPos) { // Only if it's changed.
drawBackgroundSprite(-1, -1, direction);
- _vm->_gyro->dna.dogfoodpos = direction; // We use DogfoodPos here too - why not?
+ _vm->_gyro->_dna._dogFoodPos = direction; // We use DogfoodPos here too - why not?
}
break;
}
}
- if ((_vm->_gyro->dna.ringing_bells) && (_vm->_gyro->flagset('B'))) {
+ if ((_vm->_gyro->_dna._bellsAreRinging) && (_vm->_gyro->setFlag('B'))) {
// They're ringing the bells.
- switch (_vm->_gyro->roomtime % 4) {
+ switch (_vm->_gyro->_roomTime % 4) {
case 1:
- if (_vm->_gyro->dna.nextbell < 5)
- _vm->_gyro->dna.nextbell = 12;
- _vm->_gyro->dna.nextbell--;
- _vm->_gyro->note(_vm->_gyro->kNotes[_vm->_gyro->dna.nextbell]);
+ if (_vm->_gyro->_dna._nextBell < 5)
+ _vm->_gyro->_dna._nextBell = 12;
+ _vm->_gyro->_dna._nextBell--;
+ _vm->_gyro->note(_vm->_gyro->kNotes[_vm->_gyro->_dna._nextBell]);
break;
case 2:
//nosound();
@@ -373,17 +373,17 @@ void Celer::drawBackgroundSprite(int16 destX, int16 destY, byte which) {
void Celer::drawSprite(int16 x, int16 y, SpriteType &sprite) {
- _r.x1 = x;
- _r.y1 = y;
- _r.y2 = y + sprite._yl;
+ _r._x1 = x;
+ _r._y1 = y;
+ _r._y2 = y + sprite._yl;
switch (sprite._type) {
case kNaturalImage: // Allow fallthrough on purpose.
case kBgi:
- _r.x2 = x + sprite._xl + 1;
+ _r._x2 = x + sprite._xl + 1;
break;
case kEga:
- _r.x2 = x + sprite._xl;
+ _r._x2 = x + sprite._xl;
break;
}
diff --git a/engines/avalanche/celer2.h b/engines/avalanche/celer2.h
index 090eda2d90..674f6e1621 100644
--- a/engines/avalanche/celer2.h
+++ b/engines/avalanche/celer2.h
@@ -69,7 +69,7 @@ private:
int32 _offsets[40];
byte _spriteNum;
SpriteType _sprites[40];
- bytefield _r;
+ ByteField _r;
Common::String _filename;
static const int16 kOnDisk; // Value of memos[fv].x when it's not in memory.
diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp
index c207fdaf00..7424d82974 100644
--- a/engines/avalanche/dropdown2.cpp
+++ b/engines/avalanche/dropdown2.cpp
@@ -70,10 +70,10 @@ void HeadType::highlight() {
_dr->_activeMenuItem._left = _xpos;
_dr->_activeMenuItem._activeNow = true;
- _dr->_vm->_gyro->ddmnow = true;
+ _dr->_vm->_gyro->_dropdownActive = true;
_dr->_activeMenuItem._activeNum = _position;
- _dr->_vm->_gyro->cmp = 177; // Force redraw of cursor.
+ _dr->_vm->_gyro->_currentMouse = 177; // Force redraw of cursor.
}
bool HeadType::parseAltTrigger(char key) {
@@ -87,7 +87,7 @@ bool HeadType::parseAltTrigger(char key) {
void MenuItem::init(Dropdown *dr) {
_dr = dr;
_activeNow = false;
- _dr->_vm->_gyro->ddmnow = false;
+ _dr->_vm->_gyro->_dropdownActive = false;
_activeNum = 1;
}
@@ -138,7 +138,7 @@ void MenuItem::display() {
_flx2 = _left + _width;
fly = 15 + _optionNum * 10;
_activeNow = true;
- _dr->_vm->_gyro->ddmnow = true;
+ _dr->_vm->_gyro->_dropdownActive = true;
_dr->_vm->_graphics->_surface.fillRect(Common::Rect((_flx1 + 1) * 8, 12, (_flx2 + 1) * 8, fly), _dr->kMenuBackgroundColor);
_dr->_vm->_graphics->_surface.frameRect(Common::Rect((_flx1 + 1) * 8 - 1, 11, (_flx2 + 1) * 8 + 1, fly + 1), _dr->kMenuBorderColor);
@@ -147,8 +147,8 @@ void MenuItem::display() {
for (byte y = 1; y < _optionNum; y++)
displayOption(y, false);
- _dr->_vm->_gyro->defaultled = 1;
- _dr->_vm->_gyro->cmp = 177;
+ _dr->_vm->_gyro->_defaultLed = 1;
+ _dr->_vm->_gyro->_currentMouse = 177;
//mousepage(cp);
CursorMan.showMouse(true); // 4 = fletch
}
@@ -160,9 +160,9 @@ void MenuItem::wipe() {
_dr->drawMenuText(_dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._xpos, 1, _dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._trigger, _dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._title, true, false);
_activeNow = false;
- _dr->_vm->_gyro->ddmnow = false;
+ _dr->_vm->_gyro->_dropdownActive = false;
_firstlix = false;
- _dr->_vm->_gyro->defaultled = 2;
+ _dr->_vm->_gyro->_defaultLed = 2;
CursorMan.showMouse(true);
}
@@ -232,14 +232,14 @@ void MenuBar::createMenuItem(char trig, Common::String title, char altTrig, Drop
}
void MenuBar::draw() {
- const bytefield menuspace = {0, 0, 80, 9};
+ const ByteField menuspace = {0, 0, 80, 9};
//setactivepage(3);
_dr->_vm->_graphics->_surface.fillRect(Common::Rect(0, 0, 640, 10), _dr->kMenuBackgroundColor);
- byte savecp = _dr->_vm->_gyro->cp;
- _dr->_vm->_gyro->cp = 3;
+ byte savecp = _dr->_vm->_gyro->_cp;
+ _dr->_vm->_gyro->_cp = 3;
for (byte i = 0; i < _menuNum; i++)
_menuItems[i].draw();
@@ -247,7 +247,7 @@ void MenuBar::draw() {
for (byte page = 0; page <= 1; page++)
_dr->_vm->_trip->getset[page].remember(menuspace);
- _dr->_vm->_gyro->cp = savecp;
+ _dr->_vm->_gyro->_cp = savecp;
}
void MenuBar::parseAltTrigger(char c) {
@@ -287,30 +287,30 @@ Dropdown::Dropdown(AvalancheEngine *vm) {
}
void Dropdown::findWhatYouCanDoWithIt() {
- switch (_vm->_gyro->thinks) {
- case Gyro::wine:
- case Gyro::potion:
- case Gyro::ink:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeDrink;
+ switch (_vm->_gyro->_thinks) {
+ case Gyro::kObjectWine:
+ case Gyro::kObjectPotion:
+ case Gyro::kObjectInk:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeDrink;
break;
- case Gyro::bell:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeRing;
+ case Gyro::kObjectBell:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeRing;
break;
- case Gyro::chastity:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeWear;
+ case Gyro::kObjectChastity:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeWear;
break;
- case Gyro::lute:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodePlay;
+ case Gyro::kObjectLute:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodePlay;
break;
- case Gyro::mushroom:
- case Gyro::onion:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeEat;
+ case Gyro::kObjectMushroom:
+ case Gyro::kObjectOnion:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeEat;
break;
- case Gyro::clothes:
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeWear;
+ case Gyro::kObjectClothes:
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeWear;
break;
default:
- _vm->_gyro->verbstr = _vm->_acci->kVerbCodeExam; // Anything else.
+ _vm->_gyro->_verbStr = _vm->_acci->kVerbCodeExam; // Anything else.
}
}
@@ -335,7 +335,7 @@ void Dropdown::drawMenuText(int16 x, int16 y, char trigger, Common::String text,
for (byte i = 0; i < text.size(); i++) {
for (byte j = 0; j < 8; j++) {
byte idx = text[i];
- font[idx][j] = _vm->_gyro->characters[idx][j] & ander; // Set the font.
+ font[idx][j] = _vm->_gyro->_font[idx][j] & ander; // Set the font.
// And set the background of the text to the desired color.
for (byte k = 0; k < 8; k++)
*(byte *)_vm->_graphics->_surface.getBasePtr(x * 8 + i * 8 + k, y + j) = backgroundColor;
@@ -434,9 +434,9 @@ void Dropdown::setupMenuFile() {
_activeMenuItem.reset();
_activeMenuItem.setupOption("New game", 'N', "f4", true);
_activeMenuItem.setupOption("Load...", 'L', "^f3", true);
- _activeMenuItem.setupOption("Save", 'S', "^f2", _vm->_gyro->alive);
- _activeMenuItem.setupOption("Save As...", 'v', "", _vm->_gyro->alive);
- _activeMenuItem.setupOption("DOS Shell", 'D', _vm->_gyro->atkey + '1', true);
+ _activeMenuItem.setupOption("Save", 'S', "^f2", _vm->_gyro->_alive);
+ _activeMenuItem.setupOption("Save As...", 'v', "", _vm->_gyro->_alive);
+ _activeMenuItem.setupOption("DOS Shell", 'D', _vm->_gyro->_atKey + '1', true);
_activeMenuItem.setupOption("Quit", 'Q', "alt-X", true);
_activeMenuItem.display();
}
@@ -444,7 +444,7 @@ void Dropdown::setupMenuFile() {
void Dropdown::setupMenuAction() {
_activeMenuItem.reset();
- Common::String f5Does = _vm->_gyro->f5_does();
+ Common::String f5Does = _vm->_gyro->f5Does();
for (byte i = 0; i < 2; i++)
if (!f5Does.empty())
f5Does.deleteChar(0);
@@ -453,7 +453,7 @@ void Dropdown::setupMenuAction() {
else
_activeMenuItem.setupOption(f5Does, f5Does[0], "f5", true);
_activeMenuItem.setupOption("Pause game", 'P', "f6", true);
- if (_vm->_gyro->dna.room == 99)
+ if (_vm->_gyro->_dna._room == 99)
_activeMenuItem.setupOption("Journey thither", 'J', "f7", _vm->_trip->neardoor());
else
_activeMenuItem.setupOption("Open the door", 'O', "f7", _vm->_trip->neardoor());
@@ -474,8 +474,8 @@ void Dropdown::setupMenuPeople() {
_activeMenuItem.reset();
for (byte i = 150; i <= 178; i++)
- if (_vm->_gyro->_whereIs[i - 150] == _vm->_gyro->dna.room) {
- _activeMenuItem.setupOption(_vm->_gyro->getname(i), _vm->_gyro->getnamechar(i), "", true);
+ if (_vm->_gyro->_whereIs[i - 150] == _vm->_gyro->_dna._room) {
+ _activeMenuItem.setupOption(_vm->_gyro->getName(i), _vm->_gyro->getNameChar(i), "", true);
people = people + i;
}
@@ -484,9 +484,9 @@ void Dropdown::setupMenuPeople() {
void Dropdown::setupMenuObjects() {
_activeMenuItem.reset();
- for (byte i = 0; i < numobjs; i++) {
- if (_vm->_gyro->dna.obj[i])
- _activeMenuItem.setupOption(_vm->_gyro->get_thing(i + 1), _vm->_gyro->get_thingchar(i + 1), "", true);
+ for (byte i = 0; i < kObjectNum; i++) {
+ if (_vm->_gyro->_dna._objects[i])
+ _activeMenuItem.setupOption(_vm->_gyro->getThing(i + 1), _vm->_gyro->getThingChar(i + 1), "", true);
}
_activeMenuItem.display();
}
@@ -494,56 +494,56 @@ void Dropdown::setupMenuObjects() {
void Dropdown::setupMenuWith() {
_activeMenuItem.reset();
- if (_vm->_gyro->thinkthing) {
+ if (_vm->_gyro->_thinkThing) {
findWhatYouCanDoWithIt();
- for (byte i = 0; i < _vm->_gyro->verbstr.size(); i++) {
+ for (byte i = 0; i < _vm->_gyro->_verbStr.size(); i++) {
char vbchar;
Common::String verb;
- _vm->_acci->verbOpt(_vm->_gyro->verbstr[i], verb, vbchar);
+ _vm->_acci->verbOpt(_vm->_gyro->_verbStr[i], verb, vbchar);
_activeMenuItem.setupOption(verb, vbchar, "", true);
}
// We disable the "give" option if: (a), you haven't selected anybody, (b), the _person you've selected isn't in the room,
// or (c), the _person you've selected is YOU!
- if ((_vm->_gyro->last_person == _vm->_gyro->pavalot) || (_vm->_gyro->last_person == _vm->_acci->kNothing)
- || (_vm->_gyro->_whereIs[_vm->_gyro->last_person - 150] != _vm->_gyro->dna.room))
+ if ((_vm->_gyro->_lastPerson == _vm->_gyro->kPeopleAvalot) || (_vm->_gyro->_lastPerson == _vm->_acci->kNothing)
+ || (_vm->_gyro->_whereIs[_vm->_gyro->_lastPerson - 150] != _vm->_gyro->_dna._room))
_activeMenuItem.setupOption("Give to...", 'G', "", false); // Not here.
else {
- _activeMenuItem.setupOption(Common::String("Give to ") + _vm->_gyro->getname(_vm->_gyro->last_person), 'G', "", true);
- _vm->_gyro->verbstr = _vm->_gyro->verbstr + _vm->_acci->kVerbCodeGive;
+ _activeMenuItem.setupOption(Common::String("Give to ") + _vm->_gyro->getName(_vm->_gyro->_lastPerson), 'G', "", true);
+ _vm->_gyro->_verbStr = _vm->_gyro->_verbStr + _vm->_acci->kVerbCodeGive;
}
} else {
_activeMenuItem.setupOption("Examine", 'x', "", true);
- _activeMenuItem.setupOption(Common::String("Talk to h") + selectGender(_vm->_gyro->thinks), 'T', "", true);
- _vm->_gyro->verbstr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeTalk;
- switch (_vm->_gyro->thinks) {
- case Gyro::pgeida:
- case Gyro::parkata: {
+ _activeMenuItem.setupOption(Common::String("Talk to h") + selectGender(_vm->_gyro->_thinks), 'T', "", true);
+ _vm->_gyro->_verbStr = Common::String(_vm->_acci->kVerbCodeExam) + _vm->_acci->kVerbCodeTalk;
+ switch (_vm->_gyro->_thinks) {
+ case Gyro::kPeopleGeida:
+ case Gyro::kPeopleArkata: {
_activeMenuItem.setupOption("Kiss her", 'K', "", true);
- _vm->_gyro->verbstr = _vm->_gyro->verbstr + _vm->_acci->kVerbCodeKiss;
+ _vm->_gyro->_verbStr = _vm->_gyro->_verbStr + _vm->_acci->kVerbCodeKiss;
}
break;
- case Gyro::pdogfood: {
- _activeMenuItem.setupOption("Play his game", 'P', "", !_vm->_gyro->dna.wonnim); // True if you HAVEN'T won.
- _vm->_gyro->verbstr = _vm->_gyro->verbstr + _vm->_acci->kVerbCodePlay;
+ case Gyro::kPeopleDogfood: {
+ _activeMenuItem.setupOption("Play his game", 'P', "", !_vm->_gyro->_dna._wonNim); // True if you HAVEN'T won.
+ _vm->_gyro->_verbStr = _vm->_gyro->_verbStr + _vm->_acci->kVerbCodePlay;
}
break;
- case Gyro::pmalagauche: {
- bool isSober = !_vm->_gyro->dna.teetotal;
- _activeMenuItem.setupOption("Buy some wine", 'w', "", !_vm->_gyro->dna.obj[_vm->_gyro->wine - 1]);
+ case Gyro::kPeopleMalagauche: {
+ bool isSober = !_vm->_gyro->_dna._teetotal;
+ _activeMenuItem.setupOption("Buy some wine", 'w', "", !_vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1]);
_activeMenuItem.setupOption("Buy some beer", 'b', "", isSober);
_activeMenuItem.setupOption("Buy some whisky", 'h', "", isSober);
_activeMenuItem.setupOption("Buy some cider", 'c', "", isSober);
_activeMenuItem.setupOption("Buy some mead", 'm', "", isSober);
- _vm->_gyro->verbstr = _vm->_gyro->verbstr + 101 + 100 + 102 + 103 + 104;
+ _vm->_gyro->_verbStr = _vm->_gyro->_verbStr + 101 + 100 + 102 + 103 + 104;
}
break;
- case Gyro::ptrader: {
- _activeMenuItem.setupOption("Buy an onion", 'o', "", !_vm->_gyro->dna.obj[_vm->_gyro->onion - 1]);
- _vm->_gyro->verbstr = _vm->_gyro->verbstr + 105;
+ case Gyro::kPeopleTrader: {
+ _activeMenuItem.setupOption("Buy an onion", 'o', "", !_vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1]);
+ _vm->_gyro->_verbStr = _vm->_gyro->_verbStr + 105;
}
break;
}
@@ -610,7 +610,7 @@ void Dropdown::runMenuAction() {
case 0: {
_vm->_acci->_person = _vm->_acci->kPardon;
_vm->_acci->_thing = _vm->_acci->kPardon;
- f5Does = _vm->_gyro->f5_does();
+ f5Does = _vm->_gyro->f5Does();
_vm->_lucerna->callVerb(f5Does[0]);
}
break;
@@ -640,28 +640,28 @@ void Dropdown::runMenuAction() {
}
void Dropdown::runMenuObjects() {
- _vm->_lucerna->thinkabout(_vm->_gyro->objlist[_activeMenuItem._choiceNum + 1], _vm->_gyro->kThing);
+ _vm->_lucerna->thinkabout(_vm->_gyro->_objectList[_activeMenuItem._choiceNum + 1], _vm->_gyro->kThing);
}
void Dropdown::runMenuPeople() {
_vm->_lucerna->thinkabout(people[_activeMenuItem._choiceNum], _vm->_gyro->kPerson);
- _vm->_gyro->last_person = people[_activeMenuItem._choiceNum];
+ _vm->_gyro->_lastPerson = people[_activeMenuItem._choiceNum];
}
void Dropdown::runMenuWith() {
- _vm->_acci->_thing = _vm->_gyro->thinks;
+ _vm->_acci->_thing = _vm->_gyro->_thinks;
- if (_vm->_gyro->thinkthing) {
+ if (_vm->_gyro->_thinkThing) {
_vm->_acci->_thing += 49;
- if (_vm->_gyro->verbstr[_activeMenuItem._choiceNum] == _vm->_acci->kVerbCodeGive)
- _vm->_acci->_person = _vm->_gyro->last_person;
+ if (_vm->_gyro->_verbStr[_activeMenuItem._choiceNum] == _vm->_acci->kVerbCodeGive)
+ _vm->_acci->_person = _vm->_gyro->_lastPerson;
else
_vm->_acci->_person = 254;
} else {
- switch (_vm->_gyro->verbstr[_activeMenuItem._choiceNum]) {
+ switch (_vm->_gyro->_verbStr[_activeMenuItem._choiceNum]) {
case 100: { // Beer
_vm->_acci->_thing = 100;
_vm->_lucerna->callVerb(_vm->_acci->kVerbCodeBuy);
@@ -701,11 +701,11 @@ void Dropdown::runMenuWith() {
default: {
_vm->_acci->_person = _vm->_acci->_thing;
_vm->_acci->_thing = 254;
- _vm->_gyro->subjnumber = 0;
+ _vm->_gyro->_subjectNum = 0;
}
}
}
- _vm->_lucerna->callVerb(_vm->_gyro->verbstr[_activeMenuItem._choiceNum]);
+ _vm->_lucerna->callVerb(_vm->_gyro->_verbStr[_activeMenuItem._choiceNum]);
}
void Dropdown::setupMenu() {
@@ -742,14 +742,14 @@ void Dropdown::updateMenu() { // TODO: Optimize it ASAP!!! It really needs it...
cursorPos = _vm->getMousePos();
// Change arrow...
if ((0 <= cursorPos.y) && (cursorPos.y <= 21))
- _vm->_gyro->newpointer(1); // Up arrow
+ _vm->_gyro->newMouse(1); // Up arrow
else if ((22 <= cursorPos.y) && (cursorPos.y <= 339)) {
if ((cursorPos.x >= _activeMenuItem._flx1 * 8) && (cursorPos.x <= _activeMenuItem._flx2 * 8) && (cursorPos.y > 21) && (cursorPos.y <= _activeMenuItem.fly * 2 + 1))
- _vm->_gyro->newpointer(3); // Right-arrow
+ _vm->_gyro->newMouse(3); // Right-arrow
else
- _vm->_gyro->newpointer(4); // Fletch
+ _vm->_gyro->newMouse(4); // Fletch
} else if ((340 <= cursorPos.y) && (cursorPos.y <= 399))
- _vm->_gyro->newpointer(2); // Screwdriver
+ _vm->_gyro->newMouse(2); // Screwdriver
_activeMenuItem.lightUp(cursorPos);
diff --git a/engines/avalanche/enid2.cpp b/engines/avalanche/enid2.cpp
index be98b4e579..a22a205aaa 100644
--- a/engines/avalanche/enid2.cpp
+++ b/engines/avalanche/enid2.cpp
@@ -244,18 +244,18 @@ void Enid::avvyBackground() {
#endif
}
-void Enid::toSundry(sundry &sund) {
- sund.qenid_filename = _vm->_gyro->enid_filename;
- sund.qsoundfx = _vm->_gyro->soundfx;
- sund.qthinks = _vm->_gyro->thinks;
- sund.qthinkthing = _vm->_gyro->thinkthing;
+void Enid::toSundry(Sundry &sund) {
+ sund._qEnidFilename = _vm->_gyro->_enidFilename;
+ sund._qSoundFx = _vm->_gyro->_soundFx;
+ sund._qThinks = _vm->_gyro->_thinks;
+ sund._qThinkThing = _vm->_gyro->_thinkThing;
}
-void Enid::fromSundry(sundry sund) {
- _vm->_gyro->enid_filename = sund.qenid_filename;
- _vm->_gyro->soundfx = sund.qsoundfx;
- _vm->_gyro->thinks = sund.qthinks;
- _vm->_gyro->thinkthing = sund.qthinkthing;
+void Enid::fromSundry(Sundry sund) {
+ _vm->_gyro->_enidFilename = sund._qEnidFilename;
+ _vm->_gyro->_soundFx = sund._qSoundFx;
+ _vm->_gyro->_thinks = sund._qThinks;
+ _vm->_gyro->_thinkThing = sund._qThinkThing;
}
void Enid::restoreDna() {
@@ -269,19 +269,19 @@ void Enid::ednaReload() {
restoreDna();
- _vm->_gyro->seescroll = true; // This prevents display of the new sprites before the
+ _vm->_gyro->_seeScroll = true; // This prevents display of the new sprites before the
// new picture is loaded.
_vm->_lucerna->major_redraw();
- _vm->_gyro->_whereIs[_vm->_gyro->pavalot - 150] = _vm->_gyro->dna.room;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleAvalot - 150] = _vm->_gyro->_dna._room;
- _vm->_gyro->alive = true;
+ _vm->_gyro->_alive = true;
_vm->_lucerna->objectlist();
- if (_vm->_gyro->holdthedawn) {
- _vm->_gyro->holdthedawn = false;
+ if (_vm->_gyro->_holdTheDawn) {
+ _vm->_gyro->_holdTheDawn = false;
_vm->_lucerna->dawn();
}
}
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 3badc239de..c0876f3dad 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -47,8 +47,8 @@
namespace Avalanche {
-const char *Gyro::vernum = "1.30";
-const char *Gyro::copyright = "1995";
+const char *Gyro::kVersionNum = "1.30";
+const char *Gyro::kCopyright = "1995";
const MouseHotspotType Gyro::kMouseHotSpots[9] = {
@@ -127,25 +127,27 @@ const int32 Gyro::kCatacombMap[8][8] = {
7 = wall with door and candles,
F = straight-through corridor. */
-const char Gyro::kSpludwicksOrder[3] = {onion, ink, mushroom};
+const char Gyro::kSpludwicksOrder[3] = {kObjectOnion, kObjectInk, kObjectMushroom};
+// A quasiped defines how people who aren't sprites talk. For example, quasiped
+// "A" is Dogfood. The rooms aren't stored because I'm leaving that to context.
const QuasipedType Gyro::kQuasipeds[16] = {
- {2, kColorLightgray, 19, kColorBrown, pdogfood}, // A: Dogfood (screen 19).
- {3, kColorGreen, 19, kColorWhite, pibythneth}, // B: Ibythneth (screen 19).
- {3, kColorWhite, 1, kColorMagenta, parkata}, // C: Arkata (screen 1).
+ {2, kColorLightgray, 19, kColorBrown, kPeopleDogfood}, // A: Dogfood (screen 19).
+ {3, kColorGreen, 19, kColorWhite, kPeopleIbythneth}, // B: Ibythneth (screen 19).
+ {3, kColorWhite, 1, kColorMagenta, kPeopleArkata}, // C: Arkata (screen 1).
{3, kColorBlack, 23, kColorRed, 177}, // D: Hawk (screen 23).
- {3, kColorLightgreen, 50, kColorBrown, ptrader}, // E: Trader (screen 50).
- {6, kColorYellow, 42, kColorRed, pavalot}, // F: Avvy, tied up (scr.42)
- {2, kColorBlue, 16, kColorWhite, payles}, // G: Ayles (screen 16).
- {2, kColorBrown, 7, kColorWhite, pjacques}, // H: Jacques (screen 7).
- {2, kColorLightgreen, 47, kColorGreen, pspurge}, // I: Spurge (screen 47).
- {3, kColorYellow, 47, kColorRed, pavalot}, // J: Avalot (screen 47).
- {2, kColorLightgray, 23, kColorBlack, pdulustie}, // K: du Lustie (screen 23).
- {2, kColorYellow, 27, kColorRed, pavalot}, // L: Avalot (screen 27).
+ {3, kColorLightgreen, 50, kColorBrown, kPeopleTrader}, // E: Trader (screen 50).
+ {6, kColorYellow, 42, kColorRed, kPeopleAvalot}, // F: Avvy, tied up (scr.42)
+ {2, kColorBlue, 16, kColorWhite, kPeopleAyles}, // G: Ayles (screen 16).
+ {2, kColorBrown, 7, kColorWhite, kPeopleJacques}, // H: Jacques (screen 7).
+ {2, kColorLightgreen, 47, kColorGreen, kPeopleSpurge}, // I: Spurge (screen 47).
+ {3, kColorYellow, 47, kColorRed, kPeopleAvalot}, // J: Avalot (screen 47).
+ {2, kColorLightgray, 23, kColorBlack, kPeopleDuLustie}, // K: du Lustie (screen 23).
+ {2, kColorYellow, 27, kColorRed, kPeopleAvalot}, // L: Avalot (screen 27).
{3, kColorWhite, 27, kColorRed, 177}, // M: Avaroid (screen 27).
- {4, kColorLightgray, 19, kColorDarkgray, pmalagauche}, // N: Malagauche (screen 19).
- {5, kColorLightmagenta, 47, kColorRed, pport}, // O: Port (screen 47).
- {2, kColorLightgreen, 51, kColorDarkgray, pdrduck} // P: Duck (screen 51).
+ {4, kColorLightgray, 19, kColorDarkgray, kPeopleMalagauche}, // N: Malagauche (screen 19).
+ {5, kColorLightmagenta, 47, kColorRed, kPeoplePort}, // O: Port (screen 47).
+ {2, kColorLightgreen, 51, kColorDarkgray, kPeopleDrDuck} // P: Duck (screen 51).
};
const char Gyro::kMusicKeys[] = "QWERTYUIOP[]";
@@ -186,22 +188,22 @@ byte Gyro::_whereIs[29] = {
r__wisewomans // The Wise Woman.
};
-const Common::String Gyro::things[numobjs] = {
+const Common::String Gyro::kThings[kObjectNum] = {
"Wine", "Money-bag", "Bodkin", "Potion", "Chastity belt",
"Crossbow bolt", "Crossbow", "Lute", "Pilgrim's badge", "Mushroom", "Key",
"Bell", "Scroll", "Pen", "Ink", "Clothes", "Habit", "Onion"
};
-const char Gyro::thingchar[] = "WMBParCLguKeSnIohn"; // V=Vinegar
+const char Gyro::kThingsChar[] = "WMBParCLguKeSnIohn"; // V=Vinegar
-const Common::String Gyro::better[numobjs] = {
+const Common::String Gyro::kItems[kObjectNum] = {
"some wine", "your money-bag", "your bodkin", "a potion", "a chastity belt",
"a crossbow bolt", "a crossbow", "a lute", "a pilgrim's badge", "a mushroom",
"a key", "a bell", "a scroll", "a pen", "some ink", "your clothes", "a habit",
"an onion"
};
-const char Gyro::betterchar[] = "WMBParCLguKeSnIohn";
+const char Gyro::kItemsChar[] = "WMBParCLguKeSnIohn";
Gyro::Gyro(AvalancheEngine *vm) : _interrogation(0), _onCanDoPageSwap(true) {
_vm = vm;
@@ -209,30 +211,30 @@ Gyro::Gyro(AvalancheEngine *vm) : _interrogation(0), _onCanDoPageSwap(true) {
// Needed because of Lucerna::load_also()
for (int fv = 0; fv < 31; fv++) {
for (int ff = 0; ff < 2; ff++)
- also[fv][ff] = 0;
+ _also[fv][ff] = 0;
}
- dna.total_time = 0;
+ _dna._totalTime = 0;
}
Gyro::~Gyro() {
for (byte i = 0; i < 9; i++) {
- digit[i].free();
- rwlite[i].free();
+ _digits[i].free();
+ _directions[i].free();
}
- digit[9].free();
+ _digits[9].free();
}
-Common::String Gyro::strf(int32 x) {
+Common::String Gyro::intToStr(int32 x) {
Common::String q = Common::String::format("%d", x);
return q;
}
-void Gyro::newpointer(byte id) {
- if (id == cmp)
+void Gyro::newMouse(byte id) {
+ if (id == _currentMouse)
return;
- cmp = id;
+ _currentMouse = id;
- load_a_mouse(id);
+ loadMouse(id);
}
/**
@@ -240,23 +242,7 @@ void Gyro::newpointer(byte id) {
* @remarks Originally called 'wait'
*/
void Gyro::setMousePointerWait() {
- newpointer(5);
-}
-
-void Gyro::on() {
- warning("STUB: Gyro::on()");
-}
-
-void Gyro::off() {
- warning("STUB: Gyro::off()");
-}
-
-void Gyro::xycheck() {
- warning("STUB: Gyro::xycheck()");
-}
-
-void Gyro::check() {
- warning("STUB: Gyro::check()");
+ newMouse(5);
}
void Gyro::note(uint16 hertz) {
@@ -267,15 +253,15 @@ void Gyro::blip() {
warning("STUB: Gyro::blip()");
}
-void Gyro::shadow(int16 x1, int16 y1, int16 x2, int16 y2, byte hc, byte sc) {
+void Gyro::drawShadow(int16 x1, int16 y1, int16 x2, int16 y2, byte hc, byte sc) {
warning("STUB: Gyro::shadow()");
}
-void Gyro::shbox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t) {
+void Gyro::shadowBox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t) {
warning("STUB: Gyro::shbox()");
}
-void Gyro::newgame() {
+void Gyro::newGame() {
for (byte gm = 0; gm < kMaxSprites; gm++) {
if (_vm->_trip->tr[gm].quick)
_vm->_trip->tr[gm].done();
@@ -283,47 +269,45 @@ void Gyro::newgame() {
// Deallocate sprite. Sorry, beta testers!
_vm->_trip->tr[0].init(0, true, _vm->_trip);
- alive = true;
+ _alive = true;
- score = 0;
+ _score = 0;
//for gd:=0 to 5 do which[gd]:=1;
- memset(&_vm->_gyro->dna, 0, sizeof(dnatype));
+ memset(&_vm->_gyro->_dna, 0, sizeof(DnaType));
_vm->_scrolls->natural();
_vm->_lucerna->mousepage(0);
- dna.spare_evening = "answer a questionnaire";
- dna.like2drink = "beer";
-
- dna.pence = 30; // 2/6
- dna.rw = kDirectionStopped;
- dna.wearing = clothes;
- dna.obj[money - 1] = true;
- dna.obj[bodkin - 1] = true;
- dna.obj[bell - 1] = true;
- dna.obj[clothes - 1] = true;
+ _dna._spareEvening = "answer a questionnaire";
+ _dna._favouriteDrink = "beer";
+
+ _dna._money = 30; // 2/6
+ _dna._direction = kDirectionStopped;
+ _dna._wearing = kObjectClothes;
+ _dna._objects[kObjectMoney - 1] = true;
+ _dna._objects[kObjectBodkin - 1] = true;
+ _dna._objects[kObjectBell - 1] = true;
+ _dna._objects[kObjectClothes - 1] = true;
- thinkthing = true;
- thinks = 2;
+ _thinkThing = true;
+ _thinks = 2;
_vm->_lucerna->objectlist();
- ontoolbar = false;
- seescroll = false;
+ _onToolbar = false;
+ _seeScroll = false;
- ppos[0][1] = -177;
_vm->_trip->tr[0].appear(300,117,kDirectionRight); // Needed to initialize Avalot.
//for (gd = 0; gd <= 30; gd++) for (gm = 0; gm <= 1; gm++) also[gd][gm] = nil;
// fillchar(previous^,sizeof(previous^),#0); { blank out array }
- him = 254;
- her = 254;
- it = 254;
- last_person = 254; // = Pardon?
- dna.pass_num = _vm->_rnd->getRandomNumber(30) + 1; //Random(30) + 1;
- after_the_scroll = false;
- dna.user_moves_avvy = false;
- doing_sprite_run = false;
- dna.avvy_in_bed = true;
- enid_filename = "";
+ _him = 254;
+ _her = 254;
+ _it = 254;
+ _lastPerson = 254; // = Pardon?
+ _dna._passwordNum = _vm->_rnd->getRandomNumber(30) + 1; //Random(30) + 1;
+ _dna._userMovesAvvy = false;
+ _doingSpriteRun = false;
+ _dna._avvyInBed = true;
+ _enidFilename = "";
for (byte gd = 0; gd <= 1; gd++) {
- cp = 1 - cp;
+ _cp = 1 - _cp;
_vm->_trip->getback();
}
@@ -340,26 +324,26 @@ void Gyro::click() {
warning("STUB: Gyro::click()");
}
-void Gyro::slowdown() {
+void Gyro::slowDown() {
warning("STUB: Gyro::slowdown()");
}
-bool Gyro::flagset(char x) {
- for (uint16 i = 0; i < flags.size(); i++) {
- if (flags[i] == x)
+bool Gyro::setFlag(char x) {
+ for (uint16 i = 0; i < _flags.size(); i++) {
+ if (_flags[i] == x)
return true;
}
return false;
}
-void Gyro::force_numlock() {
+void Gyro::forceNumlock() {
warning("STUB: Gyro::force_numlock()");
}
-bool Gyro::pennycheck(uint16 howmuchby) {
- dna.pence -= howmuchby;
- if (dna.pence < 0) {
+bool Gyro::updateMoney(uint16 howmuchby) {
+ _dna._money -= howmuchby;
+ if (_dna._money < 0) {
_vm->_visa->dixi('Q', 2); // "You are now denariusless!"
_vm->_lucerna->gameover();
return false;
@@ -369,7 +353,7 @@ bool Gyro::pennycheck(uint16 howmuchby) {
// There'll may be problems with calling these functions because of the conversion of the arrays!!!
// Keep an eye open!
-Common::String Gyro::getname(byte whose) {
+Common::String Gyro::getName(byte whose) {
if (whose < 175)
return kLads[whose - 150];
else
@@ -377,7 +361,7 @@ Common::String Gyro::getname(byte whose) {
}
// Keep an eye open! ^
-byte Gyro::getnamechar(byte whose) {
+byte Gyro::getNameChar(byte whose) {
if (whose < 175)
return kLadChar[whose - 150];
else
@@ -385,78 +369,78 @@ byte Gyro::getnamechar(byte whose) {
}
// Keep an eye open! ^^
-Common::String Gyro::get_thing(byte which) {
+Common::String Gyro::getThing(byte which) {
Common::String get_thing_result;
switch (which) {
- case wine:
- switch (dna.winestate) {
+ case kObjectWine:
+ switch (_dna._wineState) {
case 1:
case 4:
- get_thing_result = things[which - 1];
+ get_thing_result = kThings[which - 1];
break;
case 3:
get_thing_result = "Vinegar";
break;
}
break;
- case onion:
- if (dna.rotten_onion)
+ case kObjectOnion:
+ if (_dna._rottenOnion)
get_thing_result = "rotten onion";
else
- get_thing_result = things[which - 1];
+ get_thing_result = kThings[which - 1];
break;
default:
- get_thing_result = things[which - 1];
+ get_thing_result = kThings[which - 1];
}
return get_thing_result;
}
// Keep an eye open! ^^^
-char Gyro::get_thingchar(byte which) {
+char Gyro::getThingChar(byte which) {
char get_thingchar_result;
switch (which) {
- case wine:
- if (dna.winestate == 3)
+ case kObjectWine:
+ if (_dna._wineState == 3)
get_thingchar_result = 'V'; // Vinegar
else
- get_thingchar_result = thingchar[which - 1];
+ get_thingchar_result = kThingsChar[which - 1];
break;
default:
- get_thingchar_result = thingchar[which - 1];
+ get_thingchar_result = kThingsChar[which - 1];
}
return get_thingchar_result;
}
// Keep an eye open! ^^^^
-Common::String Gyro::get_better(byte which) {
+Common::String Gyro::getItem(byte which) {
Common::String get_better_result;
if (which > 150)
which -= 149;
switch (which) {
- case wine:
- switch (dna.winestate) {
+ case kObjectWine:
+ switch (_dna._wineState) {
case 0:
case 1:
case 4:
- get_better_result = better[which - 1];
+ get_better_result = kItems[which - 1];
break;
case 3:
get_better_result = "some vinegar";
break;
}
break;
- case onion:
- if (dna.rotten_onion)
+ case kObjectOnion:
+ if (_dna._rottenOnion)
get_better_result = "a rotten onion";
- else if (dna.onion_in_vinegar)
+ else if (_dna._onionInVinegar)
get_better_result = "a pickled onion (in the vinegar)";
else
- get_better_result = better[which - 1];
+ get_better_result = kItems[which - 1];
break;
default:
- if ((which < numobjs) && (which > 0))
- get_better_result = better[which - 1];
+ if ((which < kObjectNum) && (which > 0))
+ get_better_result = kItems[which - 1];
else
get_better_result = "";
}
@@ -464,24 +448,24 @@ Common::String Gyro::get_better(byte which) {
}
-Common::String Gyro::f5_does() {
+Common::String Gyro::f5Does() {
Common::String f5_does_result;
- switch (dna.room) {
+ switch (_dna._room) {
case r__yours: {
- if (!dna.avvy_is_awake)
+ if (!_dna._avvyIsAwake)
return Common::String(_vm->_acci->kVerbCodeWake) + "WWake up";
- else if (dna.avvy_in_bed)
+ else if (_dna._avvyInBed)
return Common::String(_vm->_acci->kVerbCodeStand) + "GGet up";
}
break;
case r__insidecardiffcastle:
- if (dna.standing_on_dais)
+ if (_dna._standingOnDais)
return Common::String(_vm->_acci->kVerbCodeClimb) + "CClimb down";
else
return Common::String(_vm->_acci->kVerbCodeClimb) + "CClimb up";
break;
case r__nottspub:
- if (dna.sitting_in_pub)
+ if (_dna._sittingInPub)
return Common::String(_vm->_acci->kVerbCodeStand) + "SStand up";
else
return Common::String(_vm->_acci->kVerbCodeSit) + "SSit down";
@@ -495,7 +479,7 @@ Common::String Gyro::f5_does() {
return Common::String(_vm->_acci->kPardon); // If all else fails...
}
-void Gyro::load_a_mouse(byte which) {
+void Gyro::loadMouse(byte which) {
Common::File f;
if (!f.open("mice.avd")) {
@@ -509,7 +493,7 @@ void Gyro::load_a_mouse(byte which) {
// The AND mask.
- f.seek(mouse_size * 2 * (which - 1) + 134);
+ f.seek(kMouseSize * 2 * (which - 1) + 134);
::Graphics::Surface mask = _vm->_graphics->loadPictureGraphic(f);
@@ -522,7 +506,7 @@ void Gyro::load_a_mouse(byte which) {
mask.free();
// The OR mask.
- f.seek(mouse_size * 2 * (which - 1) + 134 * 2);
+ f.seek(kMouseSize * 2 * (which - 1) + 134 * 2);
mask = _vm->_graphics->loadPictureGraphic(f);
@@ -545,17 +529,13 @@ void Gyro::load_a_mouse(byte which) {
cursor.free();
}
-void Gyro::background(byte x) {
+void Gyro::setBackgroundColor(byte x) {
warning("STUB: Gyro::background()");
}
-void Gyro::hang_around_for_a_while() {
+void Gyro::hangAroundForAWhile() {
for (byte i = 0; i < 28; i++)
- slowdown();
-}
-
-bool Gyro::mouse_near_text() {
- return (my > 144) && (my < 188);
+ slowDown();
}
} // End of namespace Avalanche
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index bd2e9b15e4..89346d7498 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -43,201 +43,163 @@ namespace Avalanche {
class AvalancheEngine;
-static const byte numobjs = 18; // always preface with a #
-static const int16 maxobjs = 12; // carry limit
+static const byte kObjectNum = 18; // always preface with a #
+static const int16 kCarryLimit = 12; // carry limit
-static const int16 numlockCode = 32; // Code for Num Lock
-static const int16 mouse_size = 134;
+static const int16 kNumlockCode = 32; // Code for Num Lock
+static const int16 kMouseSize = 134;
struct MouseHotspotType { // mouse-void
int16 _horizontal, _vertical;
};
-struct dnatype { // here goes... Ux, uy, & ww now all belong to Trip5
- byte rw; // Realway- just for convenience!
- byte carrying; // how many objects you're carrying...
- bool obj[numobjs]; // ...and which ones they are.
- int16 score; // your score, of course
- int32 pence; // your current amount of dosh
- byte room; // your current room
- byte wearing; // what you're wearing
- byte swore; // number of times you've sworn
- byte saves; // number of times this game has been saved
- byte rooms[100]; // Add one to each every time you enter a room
- byte alcohol; // Your blood alcohol level.
- byte playednim; // How many times you've played Nim.
- bool wonnim; // Have you *won* Nim? (That's harder.)
- byte winestate; // 0=good (Notts), 1=passable(Argent) ... 3=vinegar.
- bool cwytalot_gone; // Has Cwytalot rushed off to Jerusalem yet?
+struct DnaType { // Ux, uy, & ww now all belong to Trip5
+ byte _direction; // The direction Avvy is currently facing.
+ byte _carryNum; // How many objects you're carrying...
+ bool _objects[kObjectNum]; // ...and which ones they are.
+ int16 _score; // your score, of course
+ int32 _money; // your current amount of dosh
+ byte _room; // your current room
+ byte _wearing; // what you're wearing
+ byte _sworeNum; // number of times you've sworn
+ byte _saveNum; // number of times this game has been saved
+ byte _roomCount[100]; // Add one to each every time you enter a room
+ byte _alcoholLevel; // Your blood alcohol level.
+ byte _playedNim; // How many times you've played Nim.
+ bool _wonNim; // Have you *won* Nim? (That's harder.)
+ byte _wineState; // 0=good (Notts), 1=passable(Argent) ... 3=vinegar.
+ bool _cwytalotGone; // Has Cwytalot rushed off to Jerusalem yet?
- byte pass_num; // Number of the passw for this game.
- bool ayles_is_awake; // pretty obvious!
- byte drawbridge_open; // Between 0 (shut) and 4 (open).
- byte avaricius_talk; // How much Avaricius has said to you.
- bool bought_onion; // Have you bought an onion yet?
- bool rotten_onion; // And has it rotted?
- bool onion_in_vinegar; // Is the onion in the vinegar?
+ byte _passwordNum; // Number of the passw for this game.
+ bool _aylesIsAwake; // pretty obvious!
+ byte _drawbridgeOpen; // Between 0 (shut) and 4 (open).
+ byte _avariciusTalk; // How much Avaricius has said to you.
+ bool _boughtOnion; // Have you bought an onion yet?
+ bool _rottenOnion; // And has it rotted?
+ bool _onionInVinegar; // Is the onion in the vinegar?
- byte given2spludwick; // 0 = nothing given, 1 = onion...
- byte brummie_stairs; // Progression through the stairs trick.
- byte cardiff_things; // Things you get asked in Cardiff.
+ byte _givenToSpludwick; // 0 = nothing given, 1 = onion...
+ byte _brummieStairs; // Progression through the stairs trick.
+ byte _cardiffQuestionNum; // Things you get asked in Cardiff.
- bool cwytalot_in_herts; // Have you passed Cwytalot in Herts?
+ bool _passedCwytalotInHerts; // Have you passed Cwytalot in Herts?
- bool avvy_is_awake; // Well? Is Avvy awake? (Screen 1 only.)
- bool avvy_in_bed; // True if Avvy's in bed, but awake.
+ bool _avvyIsAwake; // Well? Is Avvy awake? (Screen 1 only.)
+ bool _avvyInBed; // True if Avvy's in bed, but awake.
- bool user_moves_avvy; // If this is false, the user has no
- // control over Avvy's movements.
+ bool _userMovesAvvy; // If this is false, the user has no control over Avvy's movements.
- byte dogfoodpos; // Which way Dogfood's looking in the pub.
+ byte _dogFoodPos; // Which way Dogfood's looking in the pub.
- bool givenbadgetoiby; // Have you given the badge to Iby yet?
+ bool _givenBadgeToIby; // Have you given the badge to Iby yet?
- bool friar_will_tie_you_up; // If you're going to get tied up.
- bool tied_up; // You ARE tied up!
+ bool _friarWillTieYouUp; // If you're going to get tied up.
+ bool _tiedUp; // You ARE tied up!
- byte box_contents; // 0 = money (sixpence), 254 = empty, any
- // other number implies the contents of the box.
+ byte _boxContent; // 0 = money (sixpence), 254 = empty, any other number implies the contents of the box.
- bool talked_to_crapulus; // Pretty self-explanatory.
+ bool _talkedToCrapulus; // Pretty self-explanatory.
- byte jacques_awake; // 0=asleep, 1=awake, 2=gets up, 3=gone.
+ byte _jacquesState; // 0=asleep, 1=awake, 2=gets up, 3=gone.
- bool ringing_bells; // Is Jacques ringing the bells?
+ bool _bellsAreRinging; // Is Jacques ringing the bells?
- bool standing_on_dais; // In room 71, inside Cardiff Castle.
- bool taken_pen; // Have you taken the pen (in Cardiff?)
- bool arrow_triggered; // And has the arrow been triggered?
- bool arrow_in_the_door; // Did the arrow hit the wall?
+ bool _standingOnDais; // In room 71, inside Cardiff Castle.
+ bool _takenPen; // Have you taken the pen (in Cardiff?)
+ bool _arrowTriggered; // And has the arrow been triggered?
+ bool _arrowInTheDoor; // Did the arrow hit the wall?
- Common::String like2drink,
- favourite_song,
- worst_place_on_earth,
- spare_evening; // Personalisation str's
+ Common::String _favouriteDrink, _favouriteSong, _worstPlaceOnEarth, _spareEvening; // Personalisation str's
- uint32 total_time; // Your total time playing this game, in ticks.
+ uint32 _totalTime; // Your total time playing this game, in ticks.
- byte jumpstatus; // Fixes how high you're jumping.
+ byte _jumpStatus; // Fixes how high you're jumping.
- bool mushroom_growing; // Is the mushroom growing in 42?
+ bool _mushroomGrowing; // Is the mushroom growing in 42?
- bool spludwicks_here; // Is Spludwick at home?
+ bool _spludwickAtHome; // Is Spludwick at home?
- byte last_room;
- byte last_room_not_map;
+ byte _lastRoom;
+ byte _lastRoomNotMap;
- bool crapulus_will_tell; // Will Crapulus tell you about
- // Spludwick being away?
+ bool _crapulusWillTell; // Will Crapulus tell you about Spludwick being away?
- bool enter_catacombs_from_lusties_room;
- bool teetotal; // Are we touching any more drinks?
- byte malagauche; // Position of Malagauche. See Celer for more info.
- char drinking; // What's he getting you?
+ bool _enterCatacombsFromLustiesRoom;
+ bool _teetotal; // Are we touching any more drinks?
+ byte _malagauche; // Position of Malagauche. See Celer for more info.
+ char _drinking; // What's he getting you?
- bool entered_lusties_room_as_monk;
+ bool _enteredLustiesRoomAsMonk;
- byte cat_x, cat_y; // XY coords in the catacombs.
+ byte _catacombX, _catacombY; // XY coords in the catacombs.
- bool avvys_in_the_cupboard; // On screen 22.
+ bool _avvysInTheCupboard; // On screen 22.
- bool geida_follows; // Is Geida following you?
+ bool _geidaFollows; // Is Geida following you?
- byte geida_spin, geida_time; // For the making "Geida dizzy" joke.
+ byte _geidaSpin, _geidaTime; // For the making "Geida dizzy" joke.
- byte nextbell; // For the ringing.
+ byte _nextBell; // For the ringing.
- bool geida_given_potion; // Does Geida have the potion?
- bool lustie_is_asleep; // Is BDL asleep?
+ bool _givenPotionToGeida; // Does Geida have the potion?
+ bool _lustieIsAsleep; // Is BDL asleep?
- byte flip_to_where, flip_to_ped; // For the sequencer.
+ byte _flipToWhere, _flipToPed; // For the sequencer.
- bool been_tied_up; // In r__Robins.
+ bool _beenTiedUp; // In r__Robins.
- bool sitting_in_pub; // Are you sitting down in the pub?
- byte spurge_talk; // Count for talking to Spurge.
+ bool _sittingInPub; // Are you sitting down in the pub?
+ byte _spurgeTalkCount; // Count for talking to Spurge.
- bool met_avaroid;
+ bool _metAvaroid;
- bool taken_mushroom,
- given_pen_to_ayles,
- asked_dogfood_about_nim;
+ bool _takenMushroom, _givenPenToAyles, _askedDogfoodAboutNim;
};
-struct pedtype {
- int16 x, y;
- byte dir;
+struct PedType {
+ int16 _x, _y;
+ byte _direction;
};
-struct magictype {
- byte op; // one of the operations
- uint16 data; // data for them
+struct MagicType {
+ byte _operation; // one of the operations
+ uint16 _data; // data for them
};
-class fieldtype {
+class FieldType {
public:
- int16 x1, y1, x2, y2;
+ int16 _x1, _y1, _x2, _y2;
};
-struct bytefield {
- byte x1, y1, x2, y2;
+struct ByteField {
+ byte _x1, _y1, _x2, _y2;
};
-class linetype : public fieldtype {
+class LineType : public FieldType {
public:
- byte col;
+ byte _color;
};
-enum controllers {cjoy, ckey};
-
-typedef Common::String previoustype[20];
-
-struct corridor_type { // Decarations for the corridors.
- uint16 doors; // Door styles are calc'ed from this uint16.
- // Assign a different number to each one!
-};
-
-struct demo_type {
- uint16 delay;
- char key, extd;
+struct DemoType {
+ uint16 _delay;
+ char _key, _extd;
};
struct QuasipedType {
- byte whichped, fgc, room, bgc;
- uint16 who;
+ byte _whichPed, _foregroundColor, _room, _backgroundColor;
+ uint16 _who;
};
-/* A quasiped defines how people who aren't sprites talk. For example,
- quasiped "A" is Dogfood. The rooms aren't stored because I'm leaving
- that to context. */
typedef byte TuneType[31];
-
-struct PointType {
- int16 x, y;
-};
-
-struct vmctype { // Virtual Mouse Cursor
- byte *andpic, *xorpic;
- byte *backpic[2];
- PointType wherewas[2];
- byte picnumber;
- int8 ofsx, ofsy;
-};
-
-struct sundry {
- // Things which must be saved over a backtobootstrap, outside DNA.
- Common::String qenid_filename;
- bool qsoundfx;
- char qthinks;
- bool qthinkthing;
-};
-
-struct joysetup {
- uint16 xmid, ymid, xmin, ymin, xmax, ymax;
- byte centre; // Size of centre in tenths
+struct Sundry { // Things which must be saved over a backtobootstrap, outside DNA.
+ Common::String _qEnidFilename;
+ bool _qSoundFx;
+ byte _qThinks;
+ bool _qThinkThing;
};
+#if 0
struct ednahead { // Edna header
// This header starts at byte offset 177 in the .ASG file.
char id[9]; // signature
@@ -268,65 +230,67 @@ struct ednahead { // Edna header
// DNA values follow, then footer (which is ignored)
};
+#endif
class Gyro {
public:
- static const char *vernum;
- static const char *copyright;
- static const int16 thisvercode = 130;
- // as "vernum", but numerically & without the ".".
- static const int16 thisgamecode = 2; // Avalot's code number
+ static const char *kVersionNum;
+ static const char *kCopyright;
+ static const int16 kVersionCode = 130; // Same as kVersionCode, but numerically & without the ".".
+ static const int16 kGameCode = 2; // Avalot's code number
// Objects you can hold:
- static const char wine = 1;
- static const char money = 2;
- static const char bodkin = 3;
- static const char potion = 4;
- static const char chastity = 5;
- static const char bolt = 6;
- static const char crossbow = 7;
- static const char lute = 8;
- static const char badge = 9;
- static const char mushroom = 10;
- static const char key = 11;
- static const char bell = 12;
- static const char prescription = 13;
- static const char pen = 14;
- static const char ink = 15;
- static const char clothes = 16;
- static const char habit = 17;
- static const char onion = 18;
+ enum Object {
+ kObjectWine = 1,
+ kObjectMoney,
+ kObjectBodkin,
+ kObjectPotion,
+ kObjectChastity,
+ kObjectBolt,
+ kObjectCrossbow,
+ kObjectLute,
+ kObjectBadge,
+ kObjectMushroom,
+ kObjectKey,
+ kObjectBell,
+ kObjectPrescription,
+ kObjectPen,
+ kObjectInk,
+ kObjectClothes,
+ kObjectHabit,
+ kObjectOnion
+ };
// People who hang around this game.
+ enum People {
+ // Boys:
+ kPeopleAvalot = 150,
+ kPeopleSpludwick = 151,
+ kPeopleCrapulus = 152,
+ kPeopleDrDuck = 153,
+ kPeopleMalagauche = 154,
+ kPeopleFriarTuck = 155,
+ kPeopleRobinHood = 156,
+ kPeopleCwytalot = 157,
+ kPeopleDuLustie = 158,
+ kPeopleDuke = 159,
+ kPeopleDogfood = 160,
+ kPeopleTrader = 161,
+ kPeopleIbythneth = 162,
+ kPeopleAyles = 163,
+ kPeoplePort = 164,
+ kPeopleSpurge = 165,
+ kPeopleJacques = 166,
+ // Girls:
+ kPeopleArkata = 175,
+ kPeopleGeida = 176,
+ kPeopleWisewoman = 178
+ };
+
+ static const int16 kXW = 30;
+ static const int16 kYW = 36; // x width & y whatsit
- // Boys:
- static const uint16 pavalot = 150;
- static const uint16 pspludwick = 151;
- static const uint16 pcrapulus = 152;
- static const uint16 pdrduck = 153;
- static const uint16 pmalagauche = 154;
- static const uint16 pfriartuck = 155;
- static const uint16 probinhood = 156;
- static const uint16 pcwytalot = 157;
- static const uint16 pdulustie = 158;
- static const uint16 pduke = 159;
- static const uint16 pdogfood = 160;
- static const uint16 ptrader = 161;
- static const uint16 pibythneth = 162;
- static const uint16 payles = 163;
- static const uint16 pport = 164;
- static const uint16 pspurge = 165;
- static const uint16 pjacques = 166;
-
- // Girls:
- static const uint16 parkata = 175;
- static const uint16 pgeida = 176;
- static const uint16 pwisewoman = 178;
-
- static const int16 xw = 30;
- static const int16 yw = 36; // x width & y whatsit
-
- static const int16 margin = 5;
+ static const int16 kMargin = 5;
static const MouseHotspotType kMouseHotSpots[9];
@@ -394,215 +358,155 @@ public:
-
- byte _interrogation;
// If this is greater than zero, the next line you type is stored in the DNA in a position dictated by the value.
// If a scroll comes up, or you leave the room, it's automatically set to zero.
-
+ byte _interrogation;
+
static byte _whereIs[29];
- bool _onCanDoPageSwap;
// Variable static constant for overriding the ability of On to switch pages.
// You may know better than On which page to switch to.
+ bool _onCanDoPageSwap;
+
- // previous:^previoustype;
- dnatype dna;
- byte lineNum; // Number of lines.
- linetype lines[50]; // For Also.
- int16 c;
- //registers r; // http://www.freepascal.org/docs-html/rtl/dos/registers.html
- enum { m_no , m_yes , m_virtual } visible;
- bool dropsok, screturn, soundfx, cheat;
- uint16 mx, my; // mouse x & y now
- uint16 mpx, mpy; // mouse x & y when pressed
- uint16 mrx, mry; // mouse x & y when released
- byte mpress, mrelease; // times left mouse button has been pressed/released
- byte keystatus; // Mouse key status
- Common::String un[10];
- byte unn;
- Common::String mousetext;
- // which:array[0..5] of byte;
- void *p;
- bool weirdword;
- byte to_do;
- bool lmo, mousemade;
- Common::String scroll[15];
- byte scrolln, score, whichwas;
- byte thinks;
- bool thinkthing;
-
- // pp:array[1..1000] of postype;
- // bb:array[1..9000] of byte;
- uint16 pptr, bptr;
- int16 ppos[1][2];
- uint16 pozzes[24];
- byte anim;
- void *copier;
- int16 talkx, talky;
- byte talkb, talkf;
- byte scrollbells; // no. of times to ring the bell
- bool ontoolbar, seescroll; // TODO: maybe this means we're interacting with the toolbar / a scroll?
-
- char objlist[10];
-
- ::Graphics::Surface digit[10]; // digitsize and rwlitesize are defined in Lucerna::load_digits() !!!
- ::Graphics::Surface rwlite[9]; // Maybe it will be needed to move them to the class itself instead.
- // Called .free() for them in ~Gyro().
-
- byte oldrw;
- int8 lastscore[3];
- byte cmp; // current mouse-void
- Common::String verbstr; // what you can do with your object. :-)
-
- Common::String *also[31][2];
- pedtype peds[15];
- magictype magics[15];
- magictype portals[7];
- fieldtype fields[30];
- byte numfields;
- Common::String flags;
- Common::String listen;
-
- uint16 oh, onh, om, hour, minutes, seconds;
-
- Common::String atkey; // For XTs, set to "alt-". For ATs, set to "f1".
+ DnaType _dna;
+ byte _lineNum; // Number of lines.
+ LineType _lines[50]; // For Also.
+ enum MouseState { kMouseStateNo, kMouseStateYes, kMouseStateVirtual } _mouse;
+ bool _dropsOk, _scReturn, _soundFx, _cheat;
+ Common::String _mouseText;
+ bool _weirdWord;
+ bool _letMeOut;
+ Common::String _scroll[15];
+ byte _scrollNum, _score, _whichwas;
+ byte _thinks;
+ bool _thinkThing;
- byte cp, ledstatus, defaultled;
- FontType characters;
- bool alive;
- byte buffer[2000];
- uint16 bufsize;
+ int16 _talkX, _talkY;
+ byte _talkBackgroundColor, _talkFontColor;
+ byte _scrollBells; // no. of times to ring the bell
+ bool _onToolbar, _seeScroll; // TODO: maybe this means we're interacting with the toolbar / a scroll?
- byte oldjw; // Old joystick-way
- controllers ctrl;
+ char _objectList[10];
- int16 underscroll; // Y-coord of just under the scroll text.
+ ::Graphics::Surface _digits[10]; // digitsize and rwlitesize are defined in Lucerna::load_digits() !!!
+ ::Graphics::Surface _directions[9]; // Maybe it will be needed to move them to the class itself instead.
+ // Called .free() for them in ~Gyro().
- // TSkellern is only temporary, and I'll replace it
- // with a local version when it's all fixed up.
+ byte _oldDirection;
+ int8 _scoreToDisplay[3];
+ byte _currentMouse; // current mouse-void
+ Common::String _verbStr; // what you can do with your object. :-)
- // tskellern:int32 absolute $0:244; { Over int $61 }
+ Common::String *_also[31][2];
+ PedType _peds[15];
+ MagicType _magics[15];
+ MagicType _portals[7];
+ FieldType _fields[30];
+ byte _fieldNum;
+ Common::String _flags;
+ Common::String _listen;
- bool ddmnow; // Kludge so we don't have to keep referring to Dropdown
- Common::String roomname; // Name of this room
+ uint16 _oh, _onh, _om, _hours, _minutes, _seconds;
- //text logfile; // http://wiki.freepascal.org/Text
- bool log_epson;
+ Common::String _atKey; // For XTs, set to "alt-". For ATs, set to "f1".
- bool cl_override;
+ byte _cp, _ledStatus, _defaultLed;
+ FontType _font;
+ bool _alive;
+ byte _buffer[2000];
+ uint16 _bufSize;
- byte locks; // ABSOLUTE $40:$17;
+ int16 _underScroll; // Y-coord of just under the scroll text.
- Common::String subject; // What you're talking to them about.
- byte subjnumber; // The same thing.
+ bool _dropdownActive; // Kludge so we don't have to keep referring to Dropdown
+ Common::String _roomnName; // Name of actual room
- bool keyboardclick; // Is a keyboard click noise wanted?
+ Common::String _subject; // What you're talking to them about.
+ byte _subjectNum; // The same thing.
- byte him, her, it;
- int32 roomtime; // Set to 0 when you enter a room, added to in every loop.
+ bool _keyboardClick; // Is a keyboard click noise wanted?
- bool after_the_scroll;
+ byte _him, _her, _it;
+ int32 _roomTime; // Set to 0 when you enter a room, added to in every loop.
// For the demo:
- demo_type demo_rec;
- Common::File demofile; // of demo_type
- Common::DumpFile demofile_save; // uruk added it - first use located in constructor of Basher
-
- byte last_person; // Last person to have been selected using the People menu.
+ DemoType _demoRec;
+ Common::File _demoFile; // of demo_type
+ Common::DumpFile _demoFileSave; // uruk added it - first use located in constructor of Basher
- bool doing_sprite_run; // Only set to True if we're doing a sprite_run
- // at this moment. This stops the trippancy system
- // from moving any of the sprites.
+ byte _lastPerson; // Last person to have been selected using the People menu.
- vmctype vmc;
- Common::String filetoload;
+ bool _doingSpriteRun; // Only set to True if we're doing a sprite_run at this moment. This stops the trippancy system from moving any of the sprites.
- bool holdthedawn; // If this is true, calling Dawn will do nothing.
- // It's used, for example, at the start, to stop Load from dawning.
+ bool _holdTheDawn; // If this is true, calling Dawn will do nothing. It's used, for example, at the start, to stop Load from dawning.
- uint16 storage_seg, storage_ofs; // Seg and ofs of the Storage area.
- uint16 skellern; // Offset of the timer variable - 1 more than storage_OFS
bool isLoaded; // Is it a loaded gamestate?
- bool super_was_virtual, super_was_off; // Used by Super_Off and Super_On
+ Common::String _enidFilename;
- Common::String enid_filename;
-
- joysetup js;
- uint16 cxmin, cxmax, cymin, cymax;
- bool use_joy_a;
Gyro(AvalancheEngine *vm);
~Gyro();
- Common::String strf(int32 x);
+ Common::String intToStr(int32 x);
- void newpointer(byte id);
+ void newMouse(byte id);
void setMousePointerWait(); // Makes hourglass.
- void on();
-
- void off();
-
- void xycheck(); // Only updates mx & my, not all other mouse vars.
-
- void check();
-
void note(uint16 hertz);
void blip();
- void shbox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t);
+ void shadowBox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t);
- void newgame(); // This sets up the DNA for a completely new game.
+ void newGame(); // This sets up the DNA for a completely new game.
void click(); // "Audio keyboard feedback"
- void slowdown();
-
- bool flagset(char x);
+ void slowDown();
- void force_numlock();
+ bool setFlag(char x);
- bool pennycheck(uint16 howmuchby);
+ void forceNumlock();
- Common::String getname(byte whose);
+ bool updateMoney(uint16 howmuchby); // Called pennycheck in the original.
- byte getnamechar(byte whose);
+ Common::String getName(byte whose);
- Common::String get_thing(byte which);
+ byte getNameChar(byte whose);
- char get_thingchar(byte which);
+ Common::String getThing(byte which);
- Common::String get_better(byte which);
+ char getThingChar(byte which);
- Common::String f5_does(); // This procedure determines what f5 does.
+ Common::String getItem(byte which); // Called get_better in the original.
- void load_a_mouse(byte which);
+ Common::String f5Does(); // This procedure determines what f5 does.
- void background(byte x);
+ void loadMouse(byte which);
- void hang_around_for_a_while();
+ void setBackgroundColor(byte x);
- bool mouse_near_text();
+ void hangAroundForAWhile();
private:
AvalancheEngine *_vm;
- static const Common::String things[numobjs];
+ static const Common::String kThings[kObjectNum];
- static const char thingchar[];
+ static const char kThingsChar[];
- static const Common::String better[numobjs];
+ static const Common::String kItems[kObjectNum]; // 'better' in the original.
- static const char betterchar[];
+ static const char kItemsChar[]; // Similar as above.
- void shadow(int16 x1, int16 y1, int16 x2, int16 y2, byte hc, byte sc);
+ void drawShadow(int16 x1, int16 y1, int16 x2, int16 y2, byte hc, byte sc);
};
} // End of namespace Avalanche
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index c4dc6fc97f..425cab0858 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -60,18 +60,18 @@ Lucerna::Lucerna(AvalancheEngine *vm) : fxhidden(false) {
Lucerna::~Lucerna() {
for (byte i = 0; i < 31; i++)
for (byte j = 0; j < 2; j++)
- if (_vm->_gyro->also[i][j] != 0) {
- delete _vm->_gyro->also[i][j];
- _vm->_gyro->also[i][j] = 0;
+ if (_vm->_gyro->_also[i][j] != 0) {
+ delete _vm->_gyro->_also[i][j];
+ _vm->_gyro->_also[i][j] = 0;
}
}
void Lucerna::init() {
- _vm->_gyro->oh = _vm->_gyro->onh = _vm->_gyro->om = 17717;
+ _vm->_gyro->_oh = _vm->_gyro->_onh = _vm->_gyro->_om = 17717;
for (byte i = 0; i < 31; i++)
for (byte j = 0; j < 2; j++)
- _vm->_gyro->also[i][j] = 0;
+ _vm->_gyro->_also[i][j] = 0;
#if 0
if (_vm->_enhanced->atbios)
@@ -92,7 +92,7 @@ void Lucerna::callVerb(byte id) {
"assigned to it. You may press alt-A to see what the " +
"current setting of this key is.");
} else {
- _vm->_gyro->weirdword = false;
+ _vm->_gyro->_weirdWord = false;
_vm->_acci->_polite = true;
_vm->_acci->_verb = id;
_vm->_acci->doThat();
@@ -107,11 +107,11 @@ void Lucerna::draw_also_lines() {
_vm->_graphics->_magics.fillRect(Common::Rect(0, 0, 640, 200), 0);
_vm->_graphics->_magics.frameRect(Common::Rect(0, 45, 640, 161), 15);
- for (ff = 0; ff < _vm->_gyro->lineNum; ff++) {
+ for (ff = 0; ff < _vm->_gyro->_lineNum; ff++) {
// We had to check if the lines are within the borders of the screen.
- if ((_vm->_gyro->lines[ff].x1 >= 0) && (_vm->_gyro->lines[ff].x1 < _vm->_graphics->kScreenWidth) && (_vm->_gyro->lines[ff].y1 >= 0) && (_vm->_gyro->lines[ff].y1 < _vm->_graphics->kScreenHeight)
- && (_vm->_gyro->lines[ff].x2 >= 0) && (_vm->_gyro->lines[ff].x2 < _vm->_graphics->kScreenWidth) && (_vm->_gyro->lines[ff].y2 >= 0) && (_vm->_gyro->lines[ff].y2 < _vm->_graphics->kScreenHeight))
- _vm->_graphics->_magics.drawLine(_vm->_gyro->lines[ff].x1, _vm->_gyro->lines[ff].y1, _vm->_gyro->lines[ff].x2, _vm->_gyro->lines[ff].y2, _vm->_gyro->lines[ff].col);
+ if ((_vm->_gyro->_lines[ff]._x1 >= 0) && (_vm->_gyro->_lines[ff]._x1 < _vm->_graphics->kScreenWidth) && (_vm->_gyro->_lines[ff]._y1 >= 0) && (_vm->_gyro->_lines[ff]._y1 < _vm->_graphics->kScreenHeight)
+ && (_vm->_gyro->_lines[ff]._x2 >= 0) && (_vm->_gyro->_lines[ff]._x2 < _vm->_graphics->kScreenWidth) && (_vm->_gyro->_lines[ff]._y2 >= 0) && (_vm->_gyro->_lines[ff]._y2 < _vm->_graphics->kScreenHeight))
+ _vm->_graphics->_magics.drawLine(_vm->_gyro->_lines[ff]._x1, _vm->_gyro->_lines[ff]._y1, _vm->_gyro->_lines[ff]._x2, _vm->_gyro->_lines[ff]._y2, _vm->_gyro->_lines[ff]._color);
}
CursorMan.showMouse(true);
@@ -137,10 +137,10 @@ void Lucerna::scram1(Common::String &x) {
void Lucerna::unscramble() {
for (byte fv = 0; fv < 31; fv++)
for (byte ff = 0; ff < 2; ff++)
- if (_vm->_gyro->also[fv][ff] != 0)
- scram1(*_vm->_gyro->also[fv][ff]);
- scram1(_vm->_gyro->listen);
- scram1(_vm->_gyro->flags);
+ if (_vm->_gyro->_also[fv][ff] != 0)
+ scram1(*_vm->_gyro->_also[fv][ff]);
+ scram1(_vm->_gyro->_listen);
+ scram1(_vm->_gyro->_flags);
}
void Lucerna::load_also(Common::String n) {
@@ -148,9 +148,9 @@ void Lucerna::load_also(Common::String n) {
for (fv = 0; fv < 31; fv++)
for (ff = 0; ff < 2; ff++)
- if (_vm->_gyro->also[fv][ff] != 0) {
- delete _vm->_gyro->also[fv][ff];
- _vm->_gyro->also[fv][ff] = 0;
+ if (_vm->_gyro->_also[fv][ff] != 0) {
+ delete _vm->_gyro->_also[fv][ff];
+ _vm->_gyro->_also[fv][ff] = 0;
}
Common::String filename;
@@ -165,58 +165,58 @@ void Lucerna::load_also(Common::String n) {
byte minnames = f.readByte();
for (fv = 0; fv <= minnames; fv++) {
for (ff = 0; ff < 2; ff++) {
- _vm->_gyro->also[fv][ff] = new Common::String;
- *_vm->_gyro->also[fv][ff] = nextstring();
+ _vm->_gyro->_also[fv][ff] = new Common::String;
+ *_vm->_gyro->_also[fv][ff] = nextstring();
}
- *_vm->_gyro->also[fv][0] = Common::String('\x9D') + *_vm->_gyro->also[fv][0] + Common::String('\x9D');
+ *_vm->_gyro->_also[fv][0] = Common::String('\x9D') + *_vm->_gyro->_also[fv][0] + Common::String('\x9D');
}
- memset(_vm->_gyro->lines, 0xFF, sizeof(_vm->_gyro->lines));
+ memset(_vm->_gyro->_lines, 0xFF, sizeof(_vm->_gyro->_lines));
//fv = getpixel(0, 0);
- _vm->_gyro->lineNum = f.readByte();
- for (byte i = 0; i < _vm->_gyro->lineNum; i++) {
- _vm->_gyro->lines[i].x1 = f.readSint16LE();
- _vm->_gyro->lines[i].y1 = f.readSint16LE();
- _vm->_gyro->lines[i].x2 = f.readSint16LE();
- _vm->_gyro->lines[i].y2 = f.readSint16LE();
- _vm->_gyro->lines[i].col = f.readByte();
+ _vm->_gyro->_lineNum = f.readByte();
+ for (byte i = 0; i < _vm->_gyro->_lineNum; i++) {
+ _vm->_gyro->_lines[i]._x1 = f.readSint16LE();
+ _vm->_gyro->_lines[i]._y1 = f.readSint16LE();
+ _vm->_gyro->_lines[i]._x2 = f.readSint16LE();
+ _vm->_gyro->_lines[i]._y2 = f.readSint16LE();
+ _vm->_gyro->_lines[i]._color = f.readByte();
}
- memset(_vm->_gyro->peds, 177, sizeof(_vm->_gyro->peds));
+ memset(_vm->_gyro->_peds, 177, sizeof(_vm->_gyro->_peds));
fv = f.readByte();
for (byte i = 0; i < fv; i++) {
- _vm->_gyro->peds[i].x = f.readSint16LE();
- _vm->_gyro->peds[i].y = f.readSint16LE();
- _vm->_gyro->peds[i].dir = f.readByte();
+ _vm->_gyro->_peds[i]._x = f.readSint16LE();
+ _vm->_gyro->_peds[i]._y = f.readSint16LE();
+ _vm->_gyro->_peds[i]._direction = f.readByte();
}
- _vm->_gyro->numfields = f.readByte();
- for (byte i = 0; i < _vm->_gyro->numfields; i++) {
- _vm->_gyro->fields[i].x1 = f.readSint16LE();
- _vm->_gyro->fields[i].y1 = f.readSint16LE();
- _vm->_gyro->fields[i].x2 = f.readSint16LE();
- _vm->_gyro->fields[i].y2 = f.readSint16LE();
+ _vm->_gyro->_fieldNum = f.readByte();
+ for (byte i = 0; i < _vm->_gyro->_fieldNum; i++) {
+ _vm->_gyro->_fields[i]._x1 = f.readSint16LE();
+ _vm->_gyro->_fields[i]._y1 = f.readSint16LE();
+ _vm->_gyro->_fields[i]._x2 = f.readSint16LE();
+ _vm->_gyro->_fields[i]._y2 = f.readSint16LE();
}
for (byte i = 0; i < 15; i++) {
- _vm->_gyro->magics[i].op = f.readByte();
- _vm->_gyro->magics[i].data = f.readUint16LE();
+ _vm->_gyro->_magics[i]._operation = f.readByte();
+ _vm->_gyro->_magics[i]._data = f.readUint16LE();
}
for (byte i = 0; i < 7; i++) {
- _vm->_gyro->portals[i].op = f.readByte();
- _vm->_gyro->portals[i].data = f.readUint16LE();
+ _vm->_gyro->_portals[i]._operation = f.readByte();
+ _vm->_gyro->_portals[i]._data = f.readUint16LE();
}
- _vm->_gyro->flags.clear();
+ _vm->_gyro->_flags.clear();
for (byte i = 0; i < 26; i++)
- _vm->_gyro->flags += f.readByte();
+ _vm->_gyro->_flags += f.readByte();
int16 listen_length = f.readByte();
- _vm->_gyro->listen.clear();
+ _vm->_gyro->_listen.clear();
for (byte i = 0; i < listen_length; i++)
- _vm->_gyro->listen += f.readByte();
+ _vm->_gyro->_listen += f.readByte();
draw_also_lines();
@@ -226,7 +226,7 @@ void Lucerna::load_also(Common::String n) {
f.close();
unscramble();
for (fv = 0; fv <= minnames; fv++)
- *_vm->_gyro->also[fv][0] = Common::String(',') + *_vm->_gyro->also[fv][0] + ',';
+ *_vm->_gyro->_also[fv][0] = Common::String(',') + *_vm->_gyro->_also[fv][0] + ',';
}
void Lucerna::load(byte n) { // Load2, actually
@@ -236,7 +236,7 @@ void Lucerna::load(byte n) { // Load2, actually
_vm->_graphics->fleshColors();
- xx = _vm->_gyro->strf(n);
+ xx = _vm->_gyro->intToStr(n);
Common::String filename;
filename = filename.format("place%s.avd", xx.c_str());
if (!f.open(filename)) {
@@ -245,12 +245,12 @@ void Lucerna::load(byte n) { // Load2, actually
}
f.seek(146);
- if (!_vm->_gyro->roomname.empty())
- _vm->_gyro->roomname.clear();
+ if (!_vm->_gyro->_roomnName.empty())
+ _vm->_gyro->_roomnName.clear();
for (byte i = 0; i < 30; i++) {
char actChar = f.readByte();
if ((32 <= actChar) && (actChar <= 126))
- _vm->_gyro->roomname += actChar;
+ _vm->_gyro->_roomnName += actChar;
}
// Compression method byte follows this...
@@ -280,9 +280,9 @@ void Lucerna::find_people(byte room) {
for (byte fv = 1; fv < 29; fv++) {
if (_vm->_gyro->_whereIs[fv] == room) {
if (fv < 25)
- _vm->_gyro->him = fv + 150;
+ _vm->_gyro->_him = fv + 150;
else
- _vm->_gyro->her = fv + 150;
+ _vm->_gyro->_her = fv + 150;
}
}
}
@@ -290,17 +290,17 @@ void Lucerna::find_people(byte room) {
void Lucerna::exitroom(byte x) {
//nosound();
_vm->_celer->forgetBackgroundSprites();
- _vm->_gyro->seescroll = true; // This stops the trippancy system working over the length of this procedure.
+ _vm->_gyro->_seeScroll = true; // This stops the trippancy system working over the length of this procedure.
switch (x) {
case r__spludwicks:
_vm->_timeout->lose_timer(_vm->_timeout->reason_avariciustalks);
- _vm->_gyro->dna.avaricius_talk = 0;
+ _vm->_gyro->_dna._avariciusTalk = 0;
// He doesn't HAVE to be talking for this to work. It just deletes it IF it exists.
break;
case r__bridge:
- if (_vm->_gyro->dna.drawbridge_open > 0) {
- _vm->_gyro->dna.drawbridge_open = 4; // Fully open.
+ if (_vm->_gyro->_dna._drawbridgeOpen > 0) {
+ _vm->_gyro->_dna._drawbridgeOpen = 4; // Fully open.
_vm->_timeout->lose_timer(_vm->_timeout->reason_drawbridgefalls);
}
break;
@@ -314,38 +314,38 @@ void Lucerna::exitroom(byte x) {
_vm->_gyro->_interrogation = 0; // Leaving the room cancels all the questions automatically.
- _vm->_gyro->seescroll = false; // Now it can work again!
+ _vm->_gyro->_seeScroll = false; // Now it can work again!
- _vm->_gyro->dna.last_room = _vm->_gyro->dna.room;
- if (_vm->_gyro->dna.room != r__map)
- _vm->_gyro->dna.last_room_not_map = _vm->_gyro->dna.room;
+ _vm->_gyro->_dna._lastRoom = _vm->_gyro->_dna._room;
+ if (_vm->_gyro->_dna._room != r__map)
+ _vm->_gyro->_dna._lastRoomNotMap = _vm->_gyro->_dna._room;
}
void Lucerna::new_town() { // You've just entered a town from the map.
_vm->_dropdown->setupMenu();
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__outsidenottspub: // Entry into Nottingham.
- if ((_vm->_gyro->dna.rooms[r__robins] > 0) && (_vm->_gyro->dna.been_tied_up) && (!_vm->_gyro->dna.taken_mushroom))
- _vm->_gyro->dna.mushroom_growing = true;
+ if ((_vm->_gyro->_dna._roomCount[r__robins] > 0) && (_vm->_gyro->_dna._beenTiedUp) && (!_vm->_gyro->_dna._takenMushroom))
+ _vm->_gyro->_dna._mushroomGrowing = true;
break;
case r__wisewomans: { // Entry into Argent.
- if (_vm->_gyro->dna.talked_to_crapulus && (! _vm->_gyro->dna.lustie_is_asleep)) {
- _vm->_gyro->dna.spludwicks_here = !((_vm->_gyro->dna.rooms[r__wisewomans] % 3) == 1);
- _vm->_gyro->dna.crapulus_will_tell = ! _vm->_gyro->dna.spludwicks_here;
+ if (_vm->_gyro->_dna._talkedToCrapulus && (! _vm->_gyro->_dna._lustieIsAsleep)) {
+ _vm->_gyro->_dna._spludwickAtHome = !((_vm->_gyro->_dna._roomCount[r__wisewomans] % 3) == 1);
+ _vm->_gyro->_dna._crapulusWillTell = ! _vm->_gyro->_dna._spludwickAtHome;
} else {
- _vm->_gyro->dna.spludwicks_here = true;
- _vm->_gyro->dna.crapulus_will_tell = false;
+ _vm->_gyro->_dna._spludwickAtHome = true;
+ _vm->_gyro->_dna._crapulusWillTell = false;
}
- if (_vm->_gyro->dna.box_contents == _vm->_gyro->wine)
- _vm->_gyro->dna.winestate = 3; // Vinegar
+ if (_vm->_gyro->_dna._boxContent == _vm->_gyro->kObjectWine)
+ _vm->_gyro->_dna._wineState = 3; // Vinegar
}
break;
}
- if (_vm->_gyro->dna.room != r__outsideducks) {
- if ((_vm->_gyro->dna.obj[_vm->_gyro->onion - 1]) && !(_vm->_gyro->dna.onion_in_vinegar))
- _vm->_gyro->dna.rotten_onion = true; // You're holding the onion
+ if (_vm->_gyro->_dna._room != r__outsideducks) {
+ if ((_vm->_gyro->_dna._objects[_vm->_gyro->kObjectOnion - 1]) && !(_vm->_gyro->_dna._onionInVinegar))
+ _vm->_gyro->_dna._rottenOnion = true; // You're holding the onion
}
}
@@ -361,33 +361,33 @@ void Lucerna::put_geida_at(byte whichped, byte &ped) {
}
void Lucerna::enterroom(byte x, byte ped) {
- _vm->_gyro->seescroll = true; // This stops the trippancy system working over the length of this procedure.
+ _vm->_gyro->_seeScroll = true; // This stops the trippancy system working over the length of this procedure.
find_people(x);
- _vm->_gyro->dna.room = x;
+ _vm->_gyro->_dna._room = x;
if (ped != 0)
- _vm->_gyro->dna.rooms[x]++;
+ _vm->_gyro->_dna._roomCount[x]++;
load(x);
- if ((_vm->_gyro->dna.rooms[x] == 0) && (! _vm->_gyro->flagset('S')))
+ if ((_vm->_gyro->_dna._roomCount[x] == 0) && (! _vm->_gyro->setFlag('S')))
points(1);
- _vm->_gyro->_whereIs[_vm->_gyro->pavalot - 150] = _vm->_gyro->dna.room;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleAvalot - 150] = _vm->_gyro->_dna._room;
- if (_vm->_gyro->dna.geida_follows)
- _vm->_gyro->_whereIs[_vm->_gyro->pgeida - 150] = x;
+ if (_vm->_gyro->_dna._geidaFollows)
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleGeida - 150] = x;
- _vm->_gyro->roomtime = 0;
+ _vm->_gyro->_roomTime = 0;
- if ((_vm->_gyro->dna.last_room == r__map) && (_vm->_gyro->dna.last_room_not_map != _vm->_gyro->dna.room))
+ if ((_vm->_gyro->_dna._lastRoom == r__map) && (_vm->_gyro->_dna._lastRoomNotMap != _vm->_gyro->_dna._room))
new_town();
switch (x) {
case r__yours:
- if (_vm->_gyro->dna.avvy_in_bed) {
+ if (_vm->_gyro->_dna._avvyInBed) {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
_vm->_graphics->refreshBackground();
_vm->_timeout->set_up_timer(100, _vm->_timeout->procarkata_shouts, _vm->_timeout->reason_arkata_shouts);
@@ -396,12 +396,12 @@ void Lucerna::enterroom(byte x, byte ped) {
case r__outsideyours:
if (ped > 0) {
- if (! _vm->_gyro->dna.talked_to_crapulus) {
+ if (! _vm->_gyro->_dna._talkedToCrapulus) {
- _vm->_gyro->_whereIs[_vm->_gyro->pcrapulus - 150] = r__outsideyours;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCrapulus - 150] = r__outsideyours;
_vm->_trip->tr[1].init(8, false, _vm->_trip); // load Crapulus
- if (_vm->_gyro->dna.rooms[r__outsideyours] == 1) {
+ if (_vm->_gyro->_dna._roomCount[r__outsideyours] == 1) {
_vm->_trip->apped(2, 4); // Start on the right-hand side of the screen.
_vm->_trip->tr[1].walkto(5); // Walks up to greet you.
} else {
@@ -412,34 +412,34 @@ void Lucerna::enterroom(byte x, byte ped) {
_vm->_trip->tr[1].call_eachstep = true;
_vm->_trip->tr[1].eachstep = _vm->_trip->procface_avvy; // He always faces Avvy.
- } else _vm->_gyro->_whereIs[_vm->_gyro->pcrapulus - 150] = r__nowhere;
+ } else _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCrapulus - 150] = r__nowhere;
- if (_vm->_gyro->dna.crapulus_will_tell) {
+ if (_vm->_gyro->_dna._crapulusWillTell) {
_vm->_trip->tr[1].init(8, false, _vm->_trip);
_vm->_trip->apped(2, 2);
_vm->_trip->tr[1].walkto(4);
_vm->_timeout->set_up_timer(20, _vm->_timeout->proccrapulus_splud_out, _vm->_timeout->reason_crapulus_says_spludwick_out);
- _vm->_gyro->dna.crapulus_will_tell = false;
+ _vm->_gyro->_dna._crapulusWillTell = false;
}
}
break;
case r__outsidespludwicks:
- if ((_vm->_gyro->dna.rooms[r__outsidespludwicks] == 1) && (ped == 1)) {
+ if ((_vm->_gyro->_dna._roomCount[r__outsidespludwicks] == 1) && (ped == 1)) {
_vm->_timeout->set_up_timer(20, _vm->_timeout->procbang, _vm->_timeout->reason_explosion);
- _vm->_gyro->dna.spludwicks_here = true;
+ _vm->_gyro->_dna._spludwickAtHome = true;
}
break;
case r__spludwicks:
- if (_vm->_gyro->dna.spludwicks_here) {
+ if (_vm->_gyro->_dna._spludwickAtHome) {
if (ped > 0) {
_vm->_trip->tr[1].init(2, false, _vm->_trip); // load Spludwick
_vm->_trip->apped(2, 2);
_vm->_gyro->_whereIs[1] = r__spludwicks;
}
- _vm->_gyro->dna.dogfoodpos = 0; // _vm->_gyro->also Spludwick pos.
+ _vm->_gyro->_dna._dogFoodPos = 0; // _vm->_gyro->also Spludwick pos.
_vm->_trip->tr[1].call_eachstep = true;
_vm->_trip->tr[1].eachstep = _vm->_trip->procgeida_procs;
@@ -448,19 +448,19 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__brummieroad:
- if (_vm->_gyro->dna.geida_follows)
+ if (_vm->_gyro->_dna._geidaFollows)
put_geida_at(5, ped);
- if (_vm->_gyro->dna.cwytalot_gone) {
- _vm->_gyro->magics[kColorLightred - 1].op = _vm->_gyro->kMagicNothing;
- _vm->_gyro->_whereIs[_vm->_gyro->pcwytalot - 150] = r__nowhere;
+ if (_vm->_gyro->_dna._cwytalotGone) {
+ _vm->_gyro->_magics[kColorLightred - 1]._operation = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCwytalot - 150] = r__nowhere;
} else {
if (ped > 0) {
_vm->_trip->tr[1].init(4, false, _vm->_trip); // 4 = Cwytalot
_vm->_trip->tr[1].call_eachstep = true;
_vm->_trip->tr[1].eachstep = _vm->_trip->procfollow_avvy_y;
- _vm->_gyro->_whereIs[_vm->_gyro->pcwytalot - 150] = r__brummieroad;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCwytalot - 150] = r__brummieroad;
- if (_vm->_gyro->dna.rooms[r__brummieroad] == 1) { // First time here...
+ if (_vm->_gyro->_dna._roomCount[r__brummieroad] == 1) { // First time here...
_vm->_trip->apped(2, 2); // He appears on the right of the screen...
_vm->_trip->tr[1].walkto(4); // ...and he walks up...
} else {
@@ -473,31 +473,31 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__argentroad:
- if ((_vm->_gyro->dna.cwytalot_gone) && (! _vm->_gyro->dna.cwytalot_in_herts) && (ped == 2) &&
- (_vm->_gyro->dna.rooms[r__argentroad] > 3)) {
+ if ((_vm->_gyro->_dna._cwytalotGone) && (! _vm->_gyro->_dna._passedCwytalotInHerts) && (ped == 2) &&
+ (_vm->_gyro->_dna._roomCount[r__argentroad] > 3)) {
_vm->_trip->tr[1].init(4, false, _vm->_trip); // 4 = Cwytalot again
_vm->_trip->apped(2, 1);
_vm->_trip->tr[1].walkto(2);
_vm->_trip->tr[1].vanishifstill = true;
- _vm->_gyro->dna.cwytalot_in_herts = true;
+ _vm->_gyro->_dna._passedCwytalotInHerts = true;
// _vm->_gyro->whereis[#157] = r__Nowhere; // can we fit this in?
_vm->_timeout->set_up_timer(20, _vm->_timeout->proc_cwytalot_in_herts, _vm->_timeout->reason_cwytalot_in_herts);
}
break;
case r__bridge:
- if (_vm->_gyro->dna.drawbridge_open == 4) { // open
+ if (_vm->_gyro->_dna._drawbridgeOpen == 4) { // open
_vm->_celer->drawBackgroundSprite(-1, -1, 3); // Position of drawbridge
_vm->_graphics->refreshBackground();
- _vm->_gyro->magics[kColorGreen - 1].op = _vm->_gyro->kMagicNothing; // You may enter the drawbridge.
+ _vm->_gyro->_magics[kColorGreen - 1]._operation = _vm->_gyro->kMagicNothing; // You may enter the drawbridge.
}
- if (_vm->_gyro->dna.geida_follows)
+ if (_vm->_gyro->_dna._geidaFollows)
put_geida_at(ped + 3, ped); // load Geida
break;
case r__robins:
if (ped > 0) {
- if (! _vm->_gyro->dna.been_tied_up) {
+ if (! _vm->_gyro->_dna._beenTiedUp) {
// A welcome party... or maybe not...
_vm->_trip->tr[1].init(6, false, _vm->_trip);
_vm->_trip->apped(2, 2);
@@ -506,22 +506,22 @@ void Lucerna::enterroom(byte x, byte ped) {
}
}
- if (_vm->_gyro->dna.been_tied_up) {
- _vm->_gyro->_whereIs[_vm->_gyro->probinhood - 150] = 0;
- _vm->_gyro->_whereIs[_vm->_gyro->pfriartuck - 150] = 0;
+ if (_vm->_gyro->_dna._beenTiedUp) {
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleRobinHood - 150] = 0;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleFriarTuck - 150] = 0;
}
- if (_vm->_gyro->dna.tied_up)
+ if (_vm->_gyro->_dna._tiedUp)
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
- if (!_vm->_gyro->dna.mushroom_growing)
+ if (!_vm->_gyro->_dna._mushroomGrowing)
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
_vm->_graphics->refreshBackground();
break;
case r__outsidecardiffcastle:
if (ped > 0)
- switch (_vm->_gyro->dna.cardiff_things) {
+ switch (_vm->_gyro->_dna._cardiffQuestionNum) {
case 0 : { // You've answered NONE of his questions.
_vm->_trip->tr[1].init(9, false, _vm->_trip);
_vm->_trip->apped(2, 2);
@@ -530,7 +530,7 @@ void Lucerna::enterroom(byte x, byte ped) {
}
break;
case 5 :
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicNothing;
break; // You've answered ALL his questions. => nothing happens.
default: { // You've answered SOME of his questions.
_vm->_trip->tr[1].init(9, false, _vm->_trip);
@@ -539,8 +539,8 @@ void Lucerna::enterroom(byte x, byte ped) {
_vm->_timeout->set_up_timer(3, _vm->_timeout->proccardiff_return, _vm->_timeout->reason_cardiffsurvey);
}
}
- if (_vm->_gyro->dna.cardiff_things < 5)
- _vm->_gyro->_interrogation = _vm->_gyro->dna.cardiff_things;
+ if (_vm->_gyro->_dna._cardiffQuestionNum < 5)
+ _vm->_gyro->_interrogation = _vm->_gyro->_dna._cardiffQuestionNum;
else _vm->_gyro->_interrogation = 0;
break;
@@ -549,13 +549,13 @@ void Lucerna::enterroom(byte x, byte ped) {
dawn();
//setactivepage(cp);
if (ped > 0)
- zoomout(_vm->_gyro->peds[ped - 1].x, _vm->_gyro->peds[ped - 1].y);
+ zoomout(_vm->_gyro->_peds[ped - 1]._x, _vm->_gyro->_peds[ped - 1]._y);
//setactivepage(1 - cp);
{
- if ((_vm->_gyro->dna.obj[_vm->_gyro->wine - 1]) && (_vm->_gyro->dna.winestate != 3)) {
+ if ((_vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1]) && (_vm->_gyro->_dna._wineState != 3)) {
_vm->_visa->dixi('q', 9); // Don't want to waste the wine!
- _vm->_gyro->dna.obj[_vm->_gyro->wine - 1] = false;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1] = false;
objectlist();
}
}
@@ -568,33 +568,33 @@ void Lucerna::enterroom(byte x, byte ped) {
switch (ped) {
case 3: { // Enter from oubliette
- _vm->_gyro->dna.cat_x = 8;
- _vm->_gyro->dna.cat_y = 4;
+ _vm->_gyro->_dna._catacombX = 8;
+ _vm->_gyro->_dna._catacombY = 4;
}
break;
case 5: { // Enter from du Lustie's
- _vm->_gyro->dna.cat_x = 8;
- _vm->_gyro->dna.cat_y = 7;
+ _vm->_gyro->_dna._catacombX = 8;
+ _vm->_gyro->_dna._catacombY = 7;
}
break;
case 6: { // Enter from Geida's
- _vm->_gyro->dna.cat_x = 4;
- _vm->_gyro->dna.cat_y = 1;
+ _vm->_gyro->_dna._catacombX = 4;
+ _vm->_gyro->_dna._catacombY = 1;
}
break;
}
- _vm->_gyro->dna.enter_catacombs_from_lusties_room = true;
+ _vm->_gyro->_dna._enterCatacombsFromLustiesRoom = true;
_vm->_trip->catamove(ped);
- _vm->_gyro->dna.enter_catacombs_from_lusties_room = false;
+ _vm->_gyro->_dna._enterCatacombsFromLustiesRoom = false;
}
break;
case r__argentpub:
- if (_vm->_gyro->dna.wonnim)
+ if (_vm->_gyro->_dna._wonNim)
_vm->_celer->drawBackgroundSprite(-1, -1, 1); // No lute by the settle.
- _vm->_gyro->dna.malagauche = 0; // Ready to boot Malagauche
- if (_vm->_gyro->dna.givenbadgetoiby) {
+ _vm->_gyro->_dna._malagauche = 0; // Ready to boot Malagauche
+ if (_vm->_gyro->_dna._givenBadgeToIby) {
_vm->_celer->drawBackgroundSprite(-1, -1, 8);
_vm->_celer->drawBackgroundSprite(-1, -1, 9);
}
@@ -602,16 +602,16 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__lustiesroom:
- _vm->_gyro->dna.dogfoodpos = 1; // Actually, du Lustie pos.
+ _vm->_gyro->_dna._dogFoodPos = 1; // Actually, du Lustie pos.
if (_vm->_trip->tr[0].whichsprite == 0) // Avvy in his normal clothes
_vm->_timeout->set_up_timer(3, _vm->_timeout->proccallsguards, _vm->_timeout->reason_du_lustie_talks);
- else if (! _vm->_gyro->dna.entered_lusties_room_as_monk) // already
+ else if (! _vm->_gyro->_dna._enteredLustiesRoomAsMonk) // already
// Presumably, Avvy dressed as a monk.
_vm->_timeout->set_up_timer(3, _vm->_timeout->procgreetsmonk, _vm->_timeout->reason_du_lustie_talks);
- if (_vm->_gyro->dna.geida_follows) {
+ if (_vm->_gyro->_dna._geidaFollows) {
put_geida_at(5, ped);
- if (_vm->_gyro->dna.lustie_is_asleep) {
+ if (_vm->_gyro->_dna._lustieIsAsleep) {
_vm->_celer->drawBackgroundSprite(-1, -1, 5);
_vm->_graphics->refreshBackground();
}
@@ -619,13 +619,13 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__musicroom:
- if (_vm->_gyro->dna.jacques_awake > 0) {
- _vm->_gyro->dna.jacques_awake = 5;
+ if (_vm->_gyro->_dna._jacquesState > 0) {
+ _vm->_gyro->_dna._jacquesState = 5;
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
_vm->_graphics->refreshBackground();
_vm->_celer->drawBackgroundSprite(-1, -1, 4);
- _vm->_gyro->magics[kColorBrown - 1].op = _vm->_gyro->kMagicNothing;
- _vm->_gyro->_whereIs[_vm->_gyro->pjacques - 150] = 0;
+ _vm->_gyro->_magics[kColorBrown - 1]._operation = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleJacques - 150] = 0;
}
if (ped != 0) {
_vm->_celer->drawBackgroundSprite(-1, -1, 6);
@@ -662,7 +662,7 @@ void Lucerna::enterroom(byte x, byte ped) {
case r__wisewomans:
_vm->_trip->tr[1].init(11, false, _vm->_trip);
- if ((_vm->_gyro->dna.rooms[r__wisewomans] == 1) && (ped > 0)) {
+ if ((_vm->_gyro->_dna._roomCount[r__wisewomans] == 1) && (ped > 0)) {
_vm->_trip->apped(2, 2); // Start on the right-hand side of the screen.
_vm->_trip->tr[1].walkto(4); // Walks up to greet you.
} else {
@@ -680,18 +680,18 @@ void Lucerna::enterroom(byte x, byte ped) {
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
_vm->_graphics->refreshBackground();
_vm->_sequence->first_show(1);
- if (_vm->_gyro->dna.arrow_in_the_door)
+ if (_vm->_gyro->_dna._arrowInTheDoor)
_vm->_sequence->then_show(3);
else
_vm->_sequence->then_show(2);
- if (_vm->_gyro->dna.taken_pen)
+ if (_vm->_gyro->_dna._takenPen)
_vm->_celer->drawBackgroundSprite(-1, -1, 4);
_vm->_sequence->start_to_close();
} else {
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
- if (_vm->_gyro->dna.arrow_in_the_door)
+ if (_vm->_gyro->_dna._arrowInTheDoor)
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
else
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
@@ -732,7 +732,7 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__aylesoffice:
- if (_vm->_gyro->dna.ayles_is_awake)
+ if (_vm->_gyro->_dna._aylesIsAwake)
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
_vm->_graphics->refreshBackground();
break; // Ayles awake.
@@ -743,18 +743,18 @@ void Lucerna::enterroom(byte x, byte ped) {
case r__easthall:
case r__westhall:
- if (_vm->_gyro->dna.geida_follows)
+ if (_vm->_gyro->_dna._geidaFollows)
put_geida_at(ped + 2, ped);
break;
case r__lusties:
- if (_vm->_gyro->dna.geida_follows)
+ if (_vm->_gyro->_dna._geidaFollows)
put_geida_at(ped + 6, ped);
break;
case r__nottspub:
- if (_vm->_gyro->dna.sitting_in_pub) _vm->_celer->drawBackgroundSprite(-1, -1, 3);
- _vm->_gyro->dna.dogfoodpos = 1; // Actually, du Lustie pos.
+ if (_vm->_gyro->_dna._sittingInPub) _vm->_celer->drawBackgroundSprite(-1, -1, 3);
+ _vm->_gyro->_dna._dogFoodPos = 1; // Actually, du Lustie pos.
break;
case r__outsideducks:
@@ -771,11 +771,11 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__ducks:
- _vm->_gyro->dna.dogfoodpos = 1;
+ _vm->_gyro->_dna._dogFoodPos = 1;
break; // Actually, Duck pos.
}
- _vm->_gyro->seescroll = false; // Now it can work again!
+ _vm->_gyro->_seeScroll = false; // Now it can work again!
if (_vm->_gyro->isLoaded)
_vm->_gyro->isLoaded = false;
@@ -783,9 +783,9 @@ void Lucerna::enterroom(byte x, byte ped) {
void Lucerna::thinkabout(byte z, bool th) { // Hey!!! Get it and put it!!!
const int16 picsize = 966;
- const bytefield thinkspace = {25, 170, 32, 200};
+ const ByteField thinkspace = {25, 170, 32, 200};
- _vm->_gyro->thinks = z;
+ _vm->_gyro->_thinks = z;
z--;
_vm->_gyro->setMousePointerWait();
@@ -831,7 +831,7 @@ void Lucerna::thinkabout(byte z, bool th) { // Hey!!! Get it and put it!!!
_vm->_trip->getset[fv].remember(thinkspace);
CursorMan.showMouse(true);
- _vm->_gyro->thinkthing = th;
+ _vm->_gyro->_thinkThing = th;
}
void Lucerna::load_digits() { // Load the scoring digits & rwlites
@@ -851,7 +851,7 @@ void Lucerna::load_digits() { // Load the scoring digits & rwlites
f.read(_vm->_gyro->digit[fv], digitsize);
#endif
- _vm->_gyro->digit[fv] = _vm->_graphics->loadPictureGraphic(f);
+ _vm->_gyro->_digits[fv] = _vm->_graphics->loadPictureGraphic(f);
}
for (byte ff = 0; ff < 9; ff++) {
@@ -862,7 +862,7 @@ void Lucerna::load_digits() { // Load the scoring digits & rwlites
f.read(_vm->_gyro->rwlite[ff], rwlitesize);
#endif
- _vm->_gyro->rwlite[ff] = _vm->_graphics->loadPictureGraphic(f);
+ _vm->_gyro->_directions[ff] = _vm->_graphics->loadPictureGraphic(f);
}
f.close();
@@ -888,18 +888,18 @@ void Lucerna::toolbar() {
// on;
- _vm->_gyro->oldrw = 177;
+ _vm->_gyro->_oldDirection = 177;
showrw();
}
void Lucerna::showscore() {
- const bytefield scorespace = {33, 177, 39, 200};
+ const ByteField scorespace = {33, 177, 39, 200};
if (_vm->_gyro->kDemo)
return;
- uint16 score = _vm->_gyro->dna.score;
+ uint16 score = _vm->_gyro->_dna._score;
int8 numbers[3] = {0, 0, 0};
for (byte i = 0; i < 2; i++) {
byte divisor = 1;
@@ -915,8 +915,8 @@ void Lucerna::showscore() {
//setactivepage(3);
for (byte fv = 0; fv < 3; fv++)
- if (_vm->_gyro->lastscore[fv] != numbers[fv])
- _vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->digit[numbers[fv]], 250 + (fv + 1) * 15, 177);
+ if (_vm->_gyro->_scoreToDisplay[fv] != numbers[fv])
+ _vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->_digits[numbers[fv]], 250 + (fv + 1) * 15, 177);
for (byte fv = 0; fv < 2; fv++)
_vm->_trip->getset[fv].remember(scorespace);
@@ -925,12 +925,12 @@ void Lucerna::showscore() {
CursorMan.showMouse(true);
for (byte i = 0; i < 3; i++)
- _vm->_gyro->lastscore[i] = numbers[i];
+ _vm->_gyro->_scoreToDisplay[i] = numbers[i];
}
void Lucerna::points(byte num) { // Add on no. of points
for (byte q = 1; q <= num; q++) {
- _vm->_gyro->dna.score++;
+ _vm->_gyro->_dna._score++;
#if 0
if (soundfx) {
@@ -954,25 +954,25 @@ void Lucerna::mouseway(const Common::Point &cursorPos) {
switch (col) {
case kColorGreen: {
- _vm->_gyro->dna.rw = _vm->_trip->up;
+ _vm->_gyro->_dna._direction = _vm->_trip->up;
_vm->_trip->rwsp(0, _vm->_trip->up);
showrw();
}
break;
case kColorBrown: {
- _vm->_gyro->dna.rw = _vm->_trip->down;
+ _vm->_gyro->_dna._direction = _vm->_trip->down;
_vm->_trip->rwsp(0, _vm->_trip->down);
showrw();
}
break;
case kColorCyan: {
- _vm->_gyro->dna.rw = _vm->_trip->left;
+ _vm->_gyro->_dna._direction = _vm->_trip->left;
_vm->_trip->rwsp(0, _vm->_trip->left);
showrw();
}
break;
case kColorLightmagenta: {
- _vm->_gyro->dna.rw = _vm->_trip->right;
+ _vm->_gyro->_dna._direction = _vm->_trip->right;
_vm->_trip->rwsp(0, _vm->_trip->right);
showrw();
}
@@ -997,18 +997,18 @@ void Lucerna::fxtoggle() {
}
void Lucerna::objectlist() {
- _vm->_gyro->dna.carrying = 0;
- if (_vm->_gyro->thinkthing && !_vm->_gyro->dna.obj[_vm->_gyro->thinks - 1])
- thinkabout(_vm->_gyro->money, _vm->_gyro->kThing); // you always have money
- for (byte fv = 0; fv < numobjs; fv++)
- if (_vm->_gyro->dna.obj[fv]) {
- _vm->_gyro->dna.carrying++;
- _vm->_gyro->objlist[_vm->_gyro->dna.carrying] = fv + 1;
+ _vm->_gyro->_dna._carryNum = 0;
+ if (_vm->_gyro->_thinkThing && !_vm->_gyro->_dna._objects[_vm->_gyro->_thinks - 1])
+ thinkabout(_vm->_gyro->kObjectMoney, _vm->_gyro->kThing); // you always have money
+ for (byte fv = 0; fv < kObjectNum; fv++)
+ if (_vm->_gyro->_dna._objects[fv]) {
+ _vm->_gyro->_dna._carryNum++;
+ _vm->_gyro->_objectList[_vm->_gyro->_dna._carryNum] = fv + 1;
}
}
void Lucerna::verte(Common::Point cursorPos) {
- if (! _vm->_gyro->dna.user_moves_avvy)
+ if (! _vm->_gyro->_dna._userMovesAvvy)
return;
cursorPos.y /= 2;
@@ -1062,28 +1062,28 @@ void Lucerna::verte(Common::Point cursorPos) {
void Lucerna::checkclick() {
Common::Point cursorPos = _vm->getMousePos();
- _vm->_gyro->ontoolbar = _vm->_gyro->kSlowComputer && ((cursorPos.y >= 169) || (cursorPos.y <= 10));
+ _vm->_gyro->_onToolbar = _vm->_gyro->kSlowComputer && ((cursorPos.y >= 169) || (cursorPos.y <= 10));
/*if (_vm->_gyro->mrelease > 0)
_vm->_gyro->after_the_scroll = false;*/
if ((0 <= cursorPos.y) && (cursorPos.y <= 21))
- _vm->_gyro->newpointer(1); // up arrow
+ _vm->_gyro->newMouse(1); // up arrow
else if ((317 <= cursorPos.y) && (cursorPos.y <= 339))
- _vm->_gyro->newpointer(8); //I-beam
+ _vm->_gyro->newMouse(8); //I-beam
else if ((340 <= cursorPos.y) && (cursorPos.y <= 399))
- _vm->_gyro->newpointer(2); // screwdriver
- else if (!_vm->_gyro->ddmnow) { // Dropdown can handle its own pointers.
+ _vm->_gyro->newMouse(2); // screwdriver
+ else if (!_vm->_gyro->_dropdownActive) { // Dropdown can handle its own pointers.
if (holdLeftMouse) {
- _vm->_gyro->newpointer(7); // Mark's crosshairs
+ _vm->_gyro->newMouse(7); // Mark's crosshairs
verte(cursorPos); // Normally, if you click on the picture, you're guiding Avvy around.
} else
- _vm->_gyro->newpointer(4); // fletch
+ _vm->_gyro->newMouse(4); // fletch
}
if (holdLeftMouse) {
if ((0 <= cursorPos.y) && (cursorPos.y <= 21)) { // Click on the dropdown menu.
- if (_vm->_gyro->dropsok)
+ if (_vm->_gyro->_dropsOk)
_vm->_dropdown->updateMenu();
} else if ((317 <= cursorPos.y) && (cursorPos.y <= 339)) { // Click on the command line.
_vm->_parser->_inputTextPos = (cursorPos.x - 23) / 8;
@@ -1095,19 +1095,19 @@ void Lucerna::checkclick() {
_vm->_parser->plotText();
} else if ((340 <= cursorPos.y) && (cursorPos.y <= 399)) { // Check the toolbar.
if ((137 <= cursorPos.x) && (cursorPos.x <= 207)) { // Control Avvy with the compass.
- if (_vm->_gyro->alive && _vm->_gyro->dna.avvy_is_awake)
+ if (_vm->_gyro->_alive && _vm->_gyro->_dna._avvyIsAwake)
mouseway(cursorPos);
} else if ((208 <= cursorPos.x) && (cursorPos.x <= 260)) { // Examine the _thing.
do {
_vm->updateEvents();
} while (holdLeftMouse);
- if (_vm->_gyro->thinkthing) {
- _vm->_acci->_thing = _vm->_gyro->thinks;
+ if (_vm->_gyro->_thinkThing) {
+ _vm->_acci->_thing = _vm->_gyro->_thinks;
_vm->_acci->_thing += 49;
_vm->_acci->_person = _vm->_acci->kPardon;
} else {
- _vm->_acci->_person = _vm->_gyro->thinks;
+ _vm->_acci->_person = _vm->_gyro->_thinks;
_vm->_acci->_thing = _vm->_acci->kPardon;
}
callVerb(_vm->_acci->kVerbCodeExam);
@@ -1126,9 +1126,9 @@ void Lucerna::checkclick() {
} else if ((396 <= cursorPos.x) && (cursorPos.x <= 483))
fxtoggle();
else if ((535 <= cursorPos.x) && (cursorPos.x <= 640))
- _vm->_gyro->mousetext = Common::String(13) + _vm->_gyro->mousetext;
- } else if (!_vm->_gyro->dropsok)
- _vm->_gyro->mousetext = Common::String(13) + _vm->_gyro->mousetext;
+ _vm->_gyro->_mouseText = Common::String(13) + _vm->_gyro->_mouseText;
+ } else if (!_vm->_gyro->_dropsOk)
+ _vm->_gyro->_mouseText = Common::String(13) + _vm->_gyro->_mouseText;
}
}
@@ -1185,9 +1185,9 @@ void Lucerna::dawn() {
void Lucerna::showrw() { // It's data is loaded in load_digits().
- if (_vm->_gyro->oldrw == _vm->_gyro->dna.rw)
+ if (_vm->_gyro->_oldDirection == _vm->_gyro->_dna._direction)
return;
- _vm->_gyro->oldrw = _vm->_gyro->dna.rw;
+ _vm->_gyro->_oldDirection = _vm->_gyro->_dna._direction;
CursorMan.showMouse(false);
#if 0
@@ -1197,7 +1197,7 @@ void Lucerna::showrw() { // It's data is loaded in load_digits().
}
#endif
- _vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->rwlite[_vm->_gyro->dna.rw], 0, 161);
+ _vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->_directions[_vm->_gyro->_dna._direction], 0, 161);
CursorMan.showMouse(true);
//setactivepage(1 - cp);
@@ -1227,7 +1227,7 @@ void Lucerna::hand(const Common::Point &a, byte c) {
}
void Lucerna::refresh_hands() {
- const bytefield clockspace = {61, 166, 66, 200};
+ const ByteField clockspace = {61, 166, 66, 200};
for (byte page_ = 0; page_ < 2; page_++)
_vm->_trip->getset[page_].remember(clockspace);
@@ -1236,13 +1236,13 @@ void Lucerna::refresh_hands() {
void Lucerna::plothands() {
// off;
//setactivepage(3);
- calchand(_vm->_gyro->onh, 14, ah, kColorYellow);
- calchand(_vm->_gyro->om * 6, 17, am, kColorYellow);
+ calchand(_vm->_gyro->_onh, 14, ah, kColorYellow);
+ calchand(_vm->_gyro->_om * 6, 17, am, kColorYellow);
hand(ah, kColorBrown);
hand(am, kColorBrown);
calchand(nh, 14, ah, kColorBrown);
- calchand(_vm->_gyro->minutes * 6, 17, am, kColorBrown);
+ calchand(_vm->_gyro->_minutes * 6, 17, am, kColorBrown);
hand(ah, kColorYellow);
hand(am, kColorYellow);
@@ -1261,26 +1261,26 @@ void Lucerna::clock_lucerna() {
// ...Clock.
TimeDate t;
_vm->_system->getTimeAndDate(t);
- _vm->_gyro->hour = t.tm_hour;
- _vm->_gyro->minutes = t.tm_min;
- _vm->_gyro->seconds = t.tm_sec;
+ _vm->_gyro->_hours = t.tm_hour;
+ _vm->_gyro->_minutes = t.tm_min;
+ _vm->_gyro->_seconds = t.tm_sec;
- nh = (_vm->_gyro->hour % 12) * 30 + _vm->_gyro->minutes / 2;
+ nh = (_vm->_gyro->_hours % 12) * 30 + _vm->_gyro->_minutes / 2;
- if (_vm->_gyro->oh != _vm->_gyro->hour) {
+ if (_vm->_gyro->_oh != _vm->_gyro->_hours) {
plothands();
chime();
}
- if (_vm->_gyro->om != _vm->_gyro->minutes)
+ if (_vm->_gyro->_om != _vm->_gyro->_minutes)
plothands();
- if ((_vm->_gyro->hour == 0) && (_vm->_gyro->oh != 0) && (_vm->_gyro->oh != 17717))
+ if ((_vm->_gyro->_hours == 0) && (_vm->_gyro->_oh != 0) && (_vm->_gyro->_oh != 17717))
_vm->_scrolls->display(Common::String("Good morning!\n\nYes, it's just past midnight. Are you having an all-night Avvy session? Glad you like the game that much!"));
- _vm->_gyro->oh = _vm->_gyro->hour;
- _vm->_gyro->onh = nh;
- _vm->_gyro->om = _vm->_gyro->minutes;
+ _vm->_gyro->_oh = _vm->_gyro->_hours;
+ _vm->_gyro->_onh = nh;
+ _vm->_gyro->_om = _vm->_gyro->_minutes;
}
@@ -1296,7 +1296,7 @@ void Lucerna::delavvy() {
}
void Lucerna::gameover() {
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
int16 sx = _vm->_trip->tr[0].x;
int16 sy = _vm->_trip->tr[0].y;
@@ -1308,7 +1308,7 @@ void Lucerna::gameover() {
_vm->_timeout->set_up_timer(3, _vm->_timeout->procavalot_falls, _vm->_timeout->reason_falling_over);
- _vm->_gyro->alive = false;
+ _vm->_gyro->_alive = false;
}
/* OK. There are two kinds of redraw: Major and Minor. Minor is what happens
@@ -1317,15 +1317,15 @@ void Lucerna::gameover() {
void Lucerna::minor_redraw() {
dusk();
- enterroom(_vm->_gyro->dna.room, 0); // Ped unknown or non-existant.
+ enterroom(_vm->_gyro->_dna._room, 0); // Ped unknown or non-existant.
for (byte fv = 0; fv <= 1; fv++) {
- _vm->_gyro->cp = 1 - _vm->_gyro->cp;
+ _vm->_gyro->_cp = 1 - _vm->_gyro->_cp;
_vm->_trip->getback();
}
for (byte i = 0; i < 3; i++)
- _vm->_gyro->lastscore[i] = -1; // impossible digits
+ _vm->_gyro->_scoreToDisplay[i] = -1; // impossible digits
showscore();
dawn();
@@ -1340,15 +1340,15 @@ uint16 Lucerna::bearing(byte whichped) {
const double rad2deg = 180 / 3.14; // Pi
- if (_vm->_trip->tr[0].x == _vm->_gyro->peds[whichped].x)
+ if (_vm->_trip->tr[0].x == _vm->_gyro->_peds[whichped]._x)
return 0;
else {
- if (_vm->_trip->tr[0].x < _vm->_gyro->peds[whichped].x) {
- return (atan(double((_vm->_trip->tr[0].y - _vm->_gyro->peds[whichped].y))
- / (_vm->_trip->tr[0].x - _vm->_gyro->peds[whichped].x)) * rad2deg) + 90;
+ if (_vm->_trip->tr[0].x < _vm->_gyro->_peds[whichped]._x) {
+ return (atan(double((_vm->_trip->tr[0].y - _vm->_gyro->_peds[whichped]._y))
+ / (_vm->_trip->tr[0].x - _vm->_gyro->_peds[whichped]._x)) * rad2deg) + 90;
} else {
- return (atan(double((_vm->_trip->tr[0].y - _vm->_gyro->peds[whichped].y))
- / (_vm->_trip->tr[0].x - _vm->_gyro->peds[whichped].x)) * rad2deg) + 270;
+ return (atan(double((_vm->_trip->tr[0].y - _vm->_gyro->_peds[whichped]._y))
+ / (_vm->_trip->tr[0].x - _vm->_gyro->_peds[whichped]._x)) * rad2deg) + 270;
}
}
}
@@ -1358,18 +1358,18 @@ void Lucerna::sprite_run() {
sprites are still. It performs two fast cycles, only using a few of
the links usually used, and without any extra animation. This should
make the sprites the same on both pages. */
- _vm->_gyro->doing_sprite_run = true;
+ _vm->_gyro->_doingSpriteRun = true;
_vm->_trip->get_back_loretta();
_vm->_trip->trippancy_link();
- _vm->_gyro->doing_sprite_run = false;
+ _vm->_gyro->_doingSpriteRun = false;
}
void Lucerna::fix_flashers() {
- _vm->_gyro->ledstatus = 177;
- _vm->_gyro->oldrw = 177;
+ _vm->_gyro->_ledStatus = 177;
+ _vm->_gyro->_oldDirection = 177;
_vm->_scrolls->state(2);
showrw();
}
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index cecafcfb4e..5b72ee1289 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -96,7 +96,7 @@ void Parser::handleFunctionKey(const Common::Event &event) {
case Common::KEYCODE_F5: {
_vm->_acci->_person = _vm->_acci->kPardon;
_vm->_acci->_thing = _vm->_acci->kPardon;
- _vm->_lucerna->callVerb(_vm->_gyro->f5_does()[0]);
+ _vm->_lucerna->callVerb(_vm->_gyro->f5Does()[0]);
}
break;
case Common::KEYCODE_F7:
@@ -108,14 +108,13 @@ void Parser::handleFunctionKey(const Common::Event &event) {
}
void Parser::plotText() {
- if (_vm->_gyro->mouse_near_text())
- CursorMan.showMouse(false);
+ CursorMan.showMouse(false);
cursorOff();
_vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), kColorBlack); // Black out the line of the text.
- _vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->characters, 8, 24, 161, kColorWhite);
+ _vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->_font, 8, 24, 161, kColorWhite);
cursorOn();
CursorMan.showMouse(true);
@@ -151,25 +150,24 @@ void Parser::drawCursor() {
for (byte bit = 0; bit < 8; bit++)
*(byte *)_vm->_graphics->_surface.getBasePtr(24 + _inputTextPos * 8 + 7 - bit, 168) = kColorWhite;
- bytefield bf;
- bf.x1 = _inputTextPos + 1;
- bf.x2 = _inputTextPos + 2;
- bf.y1 = 168;
- bf.y2 = 168;
+ ByteField bf;
+ bf._x1 = _inputTextPos + 1;
+ bf._x2 = _inputTextPos + 2;
+ bf._y1 = 168;
+ bf._y2 = 168;
for (byte fv = 0; fv <= 1; fv++)
_vm->_trip->getset[fv].remember(bf);
}
void Parser::wipeText() {
- if (_vm->_gyro->mouse_near_text())
- CursorMan.showMouse(false);
-
+ CursorMan.showMouse(false);
cursorOff();
_vm->_graphics->_surface.fillRect(Common::Rect(24, 161, 640, 169), kColorBlack); // Black out the line of the text.
_quote = true;
_inputTextPos = 0;
+
cursorOn();
CursorMan.showMouse(true);
}
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 350e9f7bfe..1392454663 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -54,7 +54,7 @@ void Scrolls::init() {
}
void Scrolls::state(byte x) { // Sets "Ready" light to whatever
- if (_vm->_gyro->ledstatus == x)
+ if (_vm->_gyro->_ledStatus == x)
return; // Already like that!
byte color = kColorBlack;
@@ -75,7 +75,7 @@ void Scrolls::state(byte x) { // Sets "Ready" light to whatever
_vm->_graphics->_surface.fillRect(Common::Rect(419, 195, 438, 197), color);
CursorMan.showMouse(true);
- _vm->_gyro->ledstatus = x;
+ _vm->_gyro->_ledStatus = x;
}
void Scrolls::easteregg() {
@@ -120,10 +120,10 @@ void Scrolls::normscroll() {
Common::String e = "(c) 1994";
state(3);
- _vm->_gyro->seescroll = true;
+ _vm->_gyro->_seeScroll = true;
CursorMan.showMouse(true);
- _vm->_gyro->newpointer(4);
- _vm->_lucerna->mousepage(1 - _vm->_gyro->cp);
+ _vm->_gyro->newMouse(4);
+ _vm->_lucerna->mousepage(1 - _vm->_gyro->_cp);
@@ -184,8 +184,8 @@ void Scrolls::normscroll() {
#endif
state(0);
- _vm->_gyro->seescroll = false;
- _vm->_lucerna->mousepage(_vm->_gyro->cp);
+ _vm->_gyro->_seeScroll = false;
+ _vm->_lucerna->mousepage(_vm->_gyro->_cp);
CursorMan.showMouse(false);
_vm->_lucerna->holdLeftMouse = false; // Used in Lucerna::checkclick().
@@ -220,19 +220,19 @@ bool Scrolls::they_match(TuneType &played) {
void Scrolls::music_scroll() {
state(3);
- _vm->_gyro->seescroll = true;
- _vm->_gyro->on();
- _vm->_gyro->newpointer(4);
+ _vm->_gyro->_seeScroll = true;
+ CursorMan.showMouse(true);
+ _vm->_gyro->newMouse(4);
// Since there are no sounds in the game yet, it's pretty pointless to implement this function further.
// For now we act like the player just played the right tone.
#if 0
if (they_match(played)) {
#endif
- _vm->_gyro->screturn = true;
- _vm->_gyro->off();
+ _vm->_gyro->_scReturn = true;
+ CursorMan.showMouse(false);
state(0);
- _vm->_gyro->seescroll = false;
+ _vm->_gyro->_seeScroll = false;
_vm->_timeout->set_up_timer(8, _vm->_timeout->procjacques_wakes_up, _vm->_timeout->reason_jacques_waking_up);
warning("STUB: Scrolls::music_scroll()");
@@ -241,7 +241,7 @@ void Scrolls::music_scroll() {
}
_vm->_gyro->screturn = false;
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
state(0);
_vm->_gyro->seescroll = false;
#endif
@@ -250,25 +250,25 @@ void Scrolls::music_scroll() {
// ThatsAll, so put us back to $F-
void Scrolls::resetscrolldriver() { // phew
- _vm->_gyro->scrollbells = 0;
+ _vm->_gyro->_scrollBells = 0;
cfont = roman;
use_icon = 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...
- for (byte fv = 0; fv < _vm->_gyro->scrollbells; fv++)
+ 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.
+ g_system->warpMouse(dodgeCoord.x, _vm->_gyro->_underScroll); // Move the pointer off the scroll.
}
void Scrolls::undodgem() {
Common::Point actCoord = _vm->getMousePos();
- if ((actCoord.x == dodgeCoord.x) && (actCoord.y == _vm->_gyro->underscroll))
+ 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.
}
@@ -334,9 +334,9 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_gyro->_onCanDoPageSwap = false; // On can now no longer swap pages. So we can do what we want without its interference!
lx = 0;
- ly = (_vm->_gyro->scrolln) * 6;
- for (b = 0; b < _vm->_gyro->scrolln; b++) {
- ex = _vm->_gyro->scroll[b].size() * 8;
+ ly = (_vm->_gyro->_scrollNum) * 6;
+ for (b = 0; b < _vm->_gyro->_scrollNum; b++) {
+ ex = _vm->_gyro->_scroll[b].size() * 8;
if (lx < ex)
lx = ex;
}
@@ -406,51 +406,51 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
}
- for (b = 0; b < _vm->_gyro->scrolln; b++) {
- if (!_vm->_gyro->scroll[b].empty())
- switch (_vm->_gyro->scroll[b][_vm->_gyro->scroll[b].size() - 1]) {
+ for (b = 0; b < _vm->_gyro->_scrollNum; b++) {
+ if (!_vm->_gyro->_scroll[b].empty())
+ switch (_vm->_gyro->_scroll[b][_vm->_gyro->_scroll[b].size() - 1]) {
case kControlCenter: {
centre = true;
- _vm->_gyro->scroll[b].deleteLastChar();
+ _vm->_gyro->_scroll[b].deleteLastChar();
}
break;
case kControlLeftJustified: {
centre = false;
- _vm->_gyro->scroll[b].deleteLastChar();
+ _vm->_gyro->_scroll[b].deleteLastChar();
}
break;
case kControlQuestion: {
//settextjustify(1, 1);
dix = mx + lx;
diy = my + ly;
- _vm->_gyro->scroll[b].setChar(' ', 0);
+ _vm->_gyro->_scroll[b].setChar(' ', 0);
// byte groi = *_vm->_graphics->getPixel(0, 0);
// inc(diy,14);
- _vm->_gyro->shbox(dix - 65, diy - 24, dix - 5, diy - 10, "Yes.");
- _vm->_gyro->shbox(dix + 5, diy - 24, dix + 65, diy - 10, "No.");
+ _vm->_gyro->shadowBox(dix - 65, diy - 24, dix - 5, diy - 10, "Yes.");
+ _vm->_gyro->shadowBox(dix + 5, diy - 24, dix + 65, diy - 10, "No.");
}
break;
}
if (centre)
- say(320 - _vm->_gyro->scroll[b].size() * 4 + icon_indent, my, _vm->_gyro->scroll[b]);
+ say(320 - _vm->_gyro->_scroll[b].size() * 4 + icon_indent, my, _vm->_gyro->_scroll[b]);
else
- say(mx + icon_indent, my, _vm->_gyro->scroll[b]);
+ say(mx + icon_indent, my, _vm->_gyro->_scroll[b]);
my += 12;
}
- _vm->_gyro->underscroll = my * 2 + 6; // Multiplying because of the doubled screen height.
+ _vm->_gyro->_underScroll = my * 2 + 6; // Multiplying because of the doubled screen height.
//setvisualpage(1 - cp);
dingdongbell();
//my = getpixel(0, 0);
- _vm->_gyro->dropsok = false;
+ _vm->_gyro->_dropsOk = false;
dodgem();
(this->*gotoit)();
undodgem();
- _vm->_gyro->dropsok = true;
+ _vm->_gyro->_dropsOk = true;
//setvisualpage(cp);
//mousepage(cp);
CursorMan.showMouse(false);
@@ -481,9 +481,9 @@ void Scrolls::bubble(func2 gotoit) {
CursorMan.showMouse(false);
xl = 0;
- yl = _vm->_gyro->scrolln * 5;
- for (byte fv = 0; fv < _vm->_gyro->scrolln; fv++) {
- uint16 textWidth = _vm->_gyro->scroll[fv].size() * 8;
+ yl = _vm->_gyro->_scrollNum * 5;
+ for (byte fv = 0; fv < _vm->_gyro->_scrollNum; fv++) {
+ uint16 textWidth = _vm->_gyro->_scroll[fv].size() * 8;
if (textWidth > xl)
xl = textWidth;
}
@@ -494,36 +494,36 @@ void Scrolls::bubble(func2 gotoit) {
my = yw * 2 - 2;
xc = 0;
- if ((_vm->_gyro->talkx - xw) < 0)
- xc = -(_vm->_gyro->talkx - xw);
- if ((_vm->_gyro->talkx + xw) > 639)
- xc = 639 - (_vm->_gyro->talkx + xw);
+ if ((_vm->_gyro->_talkX - xw) < 0)
+ xc = -(_vm->_gyro->_talkX - xw);
+ if ((_vm->_gyro->_talkX + xw) > 639)
+ xc = 639 - (_vm->_gyro->_talkX + xw);
- p[0].x = _vm->_gyro->talkx - 10;
+ p[0].x = _vm->_gyro->_talkX - 10;
p[0].y = yw;
- p[1].x = _vm->_gyro->talkx + 10;
+ p[1].x = _vm->_gyro->_talkX + 10;
p[1].y = yw;
- p[2].x = _vm->_gyro->talkx;
- p[2].y = _vm->_gyro->talky;
+ p[2].x = _vm->_gyro->_talkX;
+ p[2].y = _vm->_gyro->_talkY;
// Backup the screen before drawing the bubble.
_vm->_graphics->_scrolls.copyFrom(_vm->_graphics->_surface);
// The body of the bubble.
- _vm->_graphics->_scrolls.fillRect(Common::Rect(xc + _vm->_gyro->talkx - xw + 9, 7, _vm->_gyro->talkx + xw - 8 + xc, my + 1), _vm->_gyro->talkb);
- _vm->_graphics->_scrolls.fillRect(Common::Rect(xc + _vm->_gyro->talkx - xw - 1, 12, _vm->_gyro->talkx + xw + xc + 2, my - 4), _vm->_gyro->talkb);
+ _vm->_graphics->_scrolls.fillRect(Common::Rect(xc + _vm->_gyro->_talkX - xw + 9, 7, _vm->_gyro->_talkX + xw - 8 + xc, my + 1), _vm->_gyro->_talkBackgroundColor);
+ _vm->_graphics->_scrolls.fillRect(Common::Rect(xc + _vm->_gyro->_talkX - xw - 1, 12, _vm->_gyro->_talkX + xw + xc + 2, my - 4), _vm->_gyro->_talkBackgroundColor);
// Top right corner of the bubble.
- _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->talkx + xw - 10, 11, 0, 90, 9, _vm->_gyro->talkb);
+ _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->_talkX + xw - 10, 11, 0, 90, 9, _vm->_gyro->_talkBackgroundColor);
// Bottom right corner of the bubble.
- _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->talkx + xw - 10, my - 4, 270, 360, 9, _vm->_gyro->talkb);
+ _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->_talkX + xw - 10, my - 4, 270, 360, 9, _vm->_gyro->_talkBackgroundColor);
// Top left corner of the bubble.
- _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->talkx - xw + 10, 11, 90, 180, 9, _vm->_gyro->talkb);
+ _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->_talkX - xw + 10, 11, 90, 180, 9, _vm->_gyro->_talkBackgroundColor);
// Bottom left corner of the bubble.
- _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->talkx - xw + 10, my - 4, 180, 270, 9, _vm->_gyro->talkb);
+ _vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, xc + _vm->_gyro->_talkX - xw + 10, my - 4, 180, 270, 9, _vm->_gyro->_talkBackgroundColor);
// "Tail" of the speech bubble.
- _vm->_graphics->drawTriangle(_vm->_graphics->_scrolls, p, _vm->_gyro->talkb);
+ _vm->_graphics->drawTriangle(_vm->_graphics->_scrolls, p, _vm->_gyro->_talkBackgroundColor);
yl -= 3;
@@ -531,30 +531,30 @@ void Scrolls::bubble(func2 gotoit) {
// Draw the text of the bubble. The centering of the text was improved here compared to Pascal's settextjustify().
// The font is not the same that outtextxy() uses in Pascal. I don't have that, so I used Gyro::characters instead.
// It's almost the same, only notable differences are '?', '!', etc.
- for (byte fv = 0; fv < _vm->_gyro->scrolln; fv++) {
- int16 x = xc + _vm->_gyro->talkx - _vm->_gyro->scroll[fv].size() / 2 * 8;
- bool offset = _vm->_gyro->scroll[fv].size() % 2;
- _vm->_graphics->drawText(_vm->_graphics->_scrolls, _vm->_gyro->scroll[fv], _vm->_gyro->characters, 8, x - offset * 4, (fv * 10) + 12, _vm->_gyro->talkf);
+ for (byte fv = 0; fv < _vm->_gyro->_scrollNum; fv++) {
+ int16 x = xc + _vm->_gyro->_talkX - _vm->_gyro->_scroll[fv].size() / 2 * 8;
+ bool offset = _vm->_gyro->_scroll[fv].size() % 2;
+ _vm->_graphics->drawText(_vm->_graphics->_scrolls, _vm->_gyro->_scroll[fv], _vm->_gyro->_font, 8, x - offset * 4, (fv * 10) + 12, _vm->_gyro->_talkFontColor);
}
//setvisualpage(1 - cp);
dingdongbell();
_vm->_gyro->_onCanDoPageSwap = false;
CursorMan.showMouse(true);
- _vm->_gyro->dropsok = false;
+ _vm->_gyro->_dropsOk = false;
// This does the actual drawing to the screen.
(this->*gotoit)();
CursorMan.showMouse(false);
- _vm->_gyro->dropsok = true;
+ _vm->_gyro->_dropsOk = true;
//setvisualpage(cp);
CursorMan.showMouse(true); // sink;
_vm->_gyro->_onCanDoPageSwap = true;
resetscrolldriver();
- if (_vm->_gyro->mpress > 0)
- _vm->_gyro->after_the_scroll = true;
+ /*if (_vm->_gyro->mpress > 0)
+ _vm->_gyro->after_the_scroll = true;*/
}
bool Scrolls::ask(Common::String question) {
@@ -563,35 +563,35 @@ bool Scrolls::ask(Common::String question) {
}
void Scrolls::resetscroll() {
- _vm->_gyro->scrolln = 1;
+ _vm->_gyro->_scrollNum = 1;
for (int j = 0; j < 15; j++)
- if (!_vm->_gyro->scroll[j].empty())
- _vm->_gyro->scroll[j].clear();
+ if (!_vm->_gyro->_scroll[j].empty())
+ _vm->_gyro->_scroll[j].clear();
}
void Scrolls::natural() { // Natural state of bubbles
- _vm->_gyro->talkx = 320;
- _vm->_gyro->talky = 200;
- _vm->_gyro->talkb = 8;
- _vm->_gyro->talkf = 15;
+ _vm->_gyro->_talkX = 320;
+ _vm->_gyro->_talkY = 200;
+ _vm->_gyro->_talkBackgroundColor = 8;
+ _vm->_gyro->_talkFontColor = 15;
}
Common::String Scrolls::lsd() {
Common::String x;
- if (_vm->_gyro->dna.pence < 12) { // just pence
- x = _vm->_gyro->strf(_vm->_gyro->dna.pence) + 'd';
- } else if (_vm->_gyro->dna.pence < 240) { // shillings & pence
- x = _vm->_gyro->strf(_vm->_gyro->dna.pence / 12) + '/';
- if ((_vm->_gyro->dna.pence % 12) == 0)
+ if (_vm->_gyro->_dna._money < 12) { // just pence
+ x = _vm->_gyro->intToStr(_vm->_gyro->_dna._money) + 'd';
+ } else if (_vm->_gyro->_dna._money < 240) { // shillings & pence
+ x = _vm->_gyro->intToStr(_vm->_gyro->_dna._money / 12) + '/';
+ if ((_vm->_gyro->_dna._money % 12) == 0)
x = x + '-';
else
- x = x + _vm->_gyro->strf(_vm->_gyro->dna.pence % 12);
+ x = x + _vm->_gyro->intToStr(_vm->_gyro->_dna._money % 12);
} else // L, s & d
- x = Common::String('œ') + _vm->_gyro->strf(_vm->_gyro->dna.pence / 240) + '.' + _vm->_gyro->strf((_vm->_gyro->dna.pence / 12) % 20)
- + '.' + _vm->_gyro->strf(_vm->_gyro->dna.pence % 12);
- if (_vm->_gyro->dna.pence > 12)
- x = x + " (that's " + _vm->_gyro->strf(_vm->_gyro->dna.pence) + "d)";
+ x = Common::String('œ') + _vm->_gyro->intToStr(_vm->_gyro->_dna._money / 240) + '.' + _vm->_gyro->intToStr((_vm->_gyro->_dna._money / 12) % 20)
+ + '.' + _vm->_gyro->intToStr(_vm->_gyro->_dna._money % 12);
+ if (_vm->_gyro->_dna._money > 12)
+ x = x + " (that's " + _vm->_gyro->intToStr(_vm->_gyro->_dna._money) + "d)";
return x;
}
@@ -606,16 +606,16 @@ void Scrolls::strip(Common::String &q) {
}
void Scrolls::solidify(byte n) {
- if (!_vm->_gyro->scroll[n].contains(' '))
+ if (!_vm->_gyro->_scroll[n].contains(' '))
return; // No spaces.
// So there MUST be a space there, somewhere...
do {
- _vm->_gyro->scroll[n + 1] = _vm->_gyro->scroll[n][_vm->_gyro->scroll[n].size() - 1] + _vm->_gyro->scroll[n + 1];
- _vm->_gyro->scroll[n].deleteLastChar();
- } while (_vm->_gyro->scroll[n][_vm->_gyro->scroll[n].size() - 1] != ' ');
+ _vm->_gyro->_scroll[n + 1] = _vm->_gyro->_scroll[n][_vm->_gyro->_scroll[n].size() - 1] + _vm->_gyro->_scroll[n + 1];
+ _vm->_gyro->_scroll[n].deleteLastChar();
+ } while (_vm->_gyro->_scroll[n][_vm->_gyro->_scroll[n].size() - 1] != ' ');
- strip(_vm->_gyro->scroll[n]);
+ strip(_vm->_gyro->_scroll[n]);
}
void Scrolls::calldrivers() {
@@ -630,39 +630,39 @@ void Scrolls::calldrivers() {
warning("STUB: Scrolls::calldrivers()");
state(0);
- _vm->_gyro->screturn = false;
+ _vm->_gyro->_scReturn = false;
mouthnext = false;
call_spriterun = true;
- switch (_vm->_gyro->buffer[_vm->_gyro->bufsize - 1]) {
+ switch (_vm->_gyro->_buffer[_vm->_gyro->_bufSize - 1]) {
case kControlToBuffer:
- _vm->_gyro->bufsize--;
+ _vm->_gyro->_bufSize--;
break; // ^D = (D)on't include pagebreak
case kControlSpeechBubble:
case kControlQuestion:
break; // ^B = speech (B)ubble, ^Q = (Q)uestion in dialogue box
default: {
- _vm->_gyro->bufsize++;
- _vm->_gyro->buffer[_vm->_gyro->bufsize - 1] = kControlParagraph;
+ _vm->_gyro->_bufSize++;
+ _vm->_gyro->_buffer[_vm->_gyro->_bufSize - 1] = kControlParagraph;
}
}
- uint16 size = _vm->_gyro->bufsize;
+ uint16 size = _vm->_gyro->_bufSize;
for (fv = 0; fv < size; fv++) {
if (mouthnext) {
- if (_vm->_gyro->buffer[fv] == kControlRegister)
+ if (_vm->_gyro->_buffer[fv] == kControlRegister)
param = 0;
- else if (('0' <= _vm->_gyro->buffer[fv]) && (_vm->_gyro->buffer[fv] <= '9'))
- param = _vm->_gyro->buffer[fv] - 48;
- else if (('A' <= _vm->_gyro->buffer[fv]) && (_vm->_gyro->buffer[fv] <= 'Z'))
- param = _vm->_gyro->buffer[fv] - 55;
+ else if (('0' <= _vm->_gyro->_buffer[fv]) && (_vm->_gyro->_buffer[fv] <= '9'))
+ param = _vm->_gyro->_buffer[fv] - 48;
+ else if (('A' <= _vm->_gyro->_buffer[fv]) && (_vm->_gyro->_buffer[fv] <= 'Z'))
+ param = _vm->_gyro->_buffer[fv] - 55;
mouthnext = false;
} else {
- switch (_vm->_gyro->buffer[fv]) {
+ switch (_vm->_gyro->_buffer[fv]) {
case kControlParagraph: {
- if ((_vm->_gyro->scrolln == 1) && (_vm->_gyro->scroll[0].empty()))
+ if ((_vm->_gyro->_scrollNum == 1) && (_vm->_gyro->_scroll[0].empty()))
break;
if (call_spriterun)
@@ -673,15 +673,15 @@ void Scrolls::calldrivers() {
resetscroll();
- if (_vm->_gyro->screturn)
+ if (_vm->_gyro->_scReturn)
return;
}
break;
case kControlBell:
- _vm->_gyro->scrollbells++;
+ _vm->_gyro->_scrollBells++;
break; // #7 = "Bel"
case kControlSpeechBubble: {
- if ((_vm->_gyro->scrolln == 1) && (_vm->_gyro->scroll[0].empty()))
+ if ((_vm->_gyro->_scrollNum == 1) && (_vm->_gyro->_scroll[0].empty()))
break;
if (call_spriterun)
@@ -700,11 +700,11 @@ void Scrolls::calldrivers() {
// 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->talkf = _vm->_gyro->kQuasipeds[param - 10].fgc;
- _vm->_gyro->talkb = _vm->_gyro->kQuasipeds[param - 10].bgc; // 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();
@@ -714,7 +714,7 @@ void Scrolls::calldrivers() {
resetscroll();
- if (_vm->_gyro->screturn)
+ if (_vm->_gyro->_scReturn)
return;
}
break;
@@ -724,29 +724,29 @@ void Scrolls::calldrivers() {
display(lsd() + kControlToBuffer); // Insert cash balance. (Recursion)
break;
case 2:
- display(_vm->_acci->kVocabulary[_vm->_acci->kFirstPassword + _vm->_gyro->dna.pass_num]._word + kControlToBuffer);
+ display(_vm->_acci->kVocabulary[_vm->_acci->kFirstPassword + _vm->_gyro->_dna._passwordNum]._word + kControlToBuffer);
break;
case 3:
- display(_vm->_gyro->dna.like2drink + kControlToBuffer);
+ display(_vm->_gyro->_dna._favouriteDrink + kControlToBuffer);
break;
case 4:
- display(_vm->_gyro->dna.favourite_song + kControlToBuffer);
+ display(_vm->_gyro->_dna._favouriteSong + kControlToBuffer);
break;
case 5:
- display(_vm->_gyro->dna.worst_place_on_earth + kControlToBuffer);
+ display(_vm->_gyro->_dna._worstPlaceOnEarth + kControlToBuffer);
break;
case 6:
- display(_vm->_gyro->dna.spare_evening + kControlToBuffer);
+ display(_vm->_gyro->_dna._spareEvening + kControlToBuffer);
break;
case 9:
- display(_vm->_gyro->strf(_vm->_gyro->dna.cat_x) + ',' + _vm->_gyro->strf(_vm->_gyro->dna.cat_y) + kControlToBuffer);
+ display(_vm->_gyro->intToStr(_vm->_gyro->_dna._catacombX) + ',' + _vm->_gyro->intToStr(_vm->_gyro->_dna._catacombY) + kControlToBuffer);
break;
case 10:
- switch (_vm->_gyro->dna.box_contents) {
+ switch (_vm->_gyro->_dna._boxContent) {
case 0: { // Sixpence.
_vm->_visa->dixi('q', 37); // You find the sixpence.
- _vm->_gyro->dna.pence += 6;
- _vm->_gyro->dna.box_contents = _vm->_acci->kNothing;
+ _vm->_gyro->_dna._money += 6;
+ _vm->_gyro->_dna._boxContent = _vm->_acci->kNothing;
_vm->_lucerna->points(2);
return;
}
@@ -755,15 +755,15 @@ void Scrolls::calldrivers() {
display("nothing at all. It's completely empty.");
break;
default:
- display(_vm->_gyro->get_better(_vm->_gyro->dna.box_contents) + '.');
+ display(_vm->_gyro->getItem(_vm->_gyro->_dna._boxContent) + '.');
}
break;
case 11:
nn = 1;
- for (byte nnn = 0; nnn < numobjs; nnn++) {
- if (_vm->_gyro->dna.obj[nnn]) {
+ for (byte nnn = 0; nnn < kObjectNum; nnn++) {
+ if (_vm->_gyro->_dna._objects[nnn]) {
nn++;
- display(_vm->_gyro->get_better(nnn) + ", " + kControlToBuffer);
+ display(_vm->_gyro->getItem(nnn) + ", " + kControlToBuffer);
}
}
break;
@@ -773,15 +773,15 @@ void Scrolls::calldrivers() {
use_icon = param;
break;
case kControlNewLine:
- _vm->_gyro->scrolln++;
+ _vm->_gyro->_scrollNum++;
break;
case kControlQuestion: {
if (call_spriterun)
_vm->_lucerna->sprite_run();
call_spriterun = false;
- _vm->_gyro->scrolln++;
- _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] = kControlQuestion;
+ _vm->_gyro->_scrollNum++;
+ _vm->_gyro->_scroll[_vm->_gyro->_scrollNum - 1] = kControlQuestion;
drawscroll(&Avalanche::Scrolls::dialogue);
@@ -793,14 +793,14 @@ void Scrolls::calldrivers() {
break;
case kControlInsertSpaces:
for (nn = 0; nn < 9; nn++)
- _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] += ' ';
+ _vm->_gyro->_scroll[_vm->_gyro->_scrollNum - 1] += ' ';
break;
default: { // Add new char.
- if (_vm->_gyro->scroll[_vm->_gyro->scrolln - 1].size() == 50) {
- solidify(_vm->_gyro->scrolln - 1);
- _vm->_gyro->scrolln++;
+ if (_vm->_gyro->_scroll[_vm->_gyro->_scrollNum - 1].size() == 50) {
+ solidify(_vm->_gyro->_scrollNum - 1);
+ _vm->_gyro->_scrollNum++;
}
- _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] += _vm->_gyro->buffer[fv];
+ _vm->_gyro->_scroll[_vm->_gyro->_scrollNum - 1] += _vm->_gyro->_buffer[fv];
}
}
}
@@ -808,8 +808,8 @@ void Scrolls::calldrivers() {
}
void Scrolls::display(Common::String z) { // TODO: REPLACE BUFFER WITH A STRING!!!!!!!!!!
- _vm->_gyro->bufsize = z.size();
- memcpy(_vm->_gyro->buffer, z.c_str(), _vm->_gyro->bufsize);
+ _vm->_gyro->_bufSize = z.size();
+ memcpy(_vm->_gyro->_buffer, z.c_str(), _vm->_gyro->_bufSize);
calldrivers();
}
@@ -837,7 +837,7 @@ void Scrolls::loadfont() {
return;
}
for (int16 i = 0; i < 256; i++)
- f.read(_vm->_gyro->characters[i],16);
+ f.read(_vm->_gyro->_font[i],16);
f.close();
}
diff --git a/engines/avalanche/sequence2.cpp b/engines/avalanche/sequence2.cpp
index 315646685a..15759bd1c0 100644
--- a/engines/avalanche/sequence2.cpp
+++ b/engines/avalanche/sequence2.cpp
@@ -65,8 +65,8 @@ void Sequence::then_show(byte what) {
void Sequence::then_flip(byte where, byte ped) {
then_show(now_flip);
- _vm->_gyro->dna.flip_to_where = where;
- _vm->_gyro->dna.flip_to_ped = ped;
+ _vm->_gyro->_dna._flipToWhere = where;
+ _vm->_gyro->_dna._flipToPed = ped;
}
void Sequence::start_to_close() {
@@ -75,7 +75,7 @@ void Sequence::start_to_close() {
}
void Sequence::start_to_open() {
- _vm->_gyro->dna.user_moves_avvy = false; // They can't move.
+ _vm->_gyro->_dna._userMovesAvvy = false; // They can't move.
_vm->_trip->stopwalking(); // And they're not moving now.
start_to_close(); // Apart from that, it's the same thing.
}
@@ -93,8 +93,8 @@ void Sequence::call_sequencer() {
return; // No more routines.
break;
case 177: // Flip room.
- _vm->_gyro->dna.user_moves_avvy = true;
- _vm->_trip->fliproom(_vm->_gyro->dna.flip_to_where, _vm->_gyro->dna.flip_to_ped);
+ _vm->_gyro->_dna._userMovesAvvy = true;
+ _vm->_trip->fliproom(_vm->_gyro->_dna._flipToWhere, _vm->_gyro->_dna._flipToPed);
if (seq[0] == 177)
shove_left();
break;
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 5c4b60b701..dbb4f80acd 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -73,7 +73,7 @@ void Timeout::set_up_timer(int32 howlong, byte whither, byte why) {
}
void Timeout::one_tick() {
- if (_vm->_gyro->ddmnow)
+ if (_vm->_gyro->_dropdownActive)
return;
for (byte fv = 0; fv < 7; fv++) {
@@ -209,8 +209,8 @@ void Timeout::one_tick() {
}
}
}
- _vm->_gyro->roomtime++; // Cycles since you've been in this room.
- _vm->_gyro->dna.total_time++; // Total amount of time for this game.
+ _vm->_gyro->_roomTime++; // Cycles since you've been in this room.
+ _vm->_gyro->_dna._totalTime++; // Total amount of time for this game.
}
void Timeout::lose_timer(byte which) {
@@ -223,20 +223,20 @@ void Timeout::lose_timer(byte which) {
}
void Timeout::open_drawbridge() {
- _vm->_gyro->dna.drawbridge_open++;
- _vm->_celer->drawBackgroundSprite(-1, -1, _vm->_gyro->dna.drawbridge_open - 1);
+ _vm->_gyro->_dna._drawbridgeOpen++;
+ _vm->_celer->drawBackgroundSprite(-1, -1, _vm->_gyro->_dna._drawbridgeOpen - 1);
- if (_vm->_gyro->dna.drawbridge_open == 4)
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicNothing; // You may enter the drawbridge.
+ if (_vm->_gyro->_dna._drawbridgeOpen == 4)
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicNothing; // You may enter the drawbridge.
else
set_up_timer(7, procopen_drawbridge, reason_drawbridgefalls);
}
void Timeout::avaricius_talks() {
- _vm->_visa->dixi('q', _vm->_gyro->dna.avaricius_talk);
- _vm->_gyro->dna.avaricius_talk++;
+ _vm->_visa->dixi('q', _vm->_gyro->_dna._avariciusTalk);
+ _vm->_gyro->_dna._avariciusTalk++;
- if (_vm->_gyro->dna.avaricius_talk < 17)
+ if (_vm->_gyro->_dna._avariciusTalk < 17)
set_up_timer(177, procavaricius_talks, reason_avariciustalks);
else
_vm->_lucerna->points(3);
@@ -266,21 +266,21 @@ void Timeout::stairs() {
_vm->_gyro->blip();
_vm->_trip->tr[0].walkto(4);
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
- _vm->_gyro->dna.brummie_stairs = 2;
- _vm->_gyro->magics[10].op = _vm->_gyro->kMagicSpecial;
- _vm->_gyro->magics[10].data = 2; // Reached the bottom of the stairs.
- _vm->_gyro->magics[3].op = _vm->_gyro->kMagicNothing; // Stop them hitting the sides (or the game will hang.)
+ _vm->_gyro->_dna._brummieStairs = 2;
+ _vm->_gyro->_magics[10]._operation = _vm->_gyro->kMagicSpecial;
+ _vm->_gyro->_magics[10]._data = 2; // Reached the bottom of the stairs.
+ _vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicNothing; // Stop them hitting the sides (or the game will hang.)
}
void Timeout::cardiff_survey() {
- if (_vm->_gyro->dna.cardiff_things == 0) {
- _vm->_gyro->dna.cardiff_things++;
+ if (_vm->_gyro->_dna._cardiffQuestionNum == 0) {
+ _vm->_gyro->_dna._cardiffQuestionNum++;
_vm->_visa->dixi('q', 27);
}
- _vm->_visa->dixi('z', _vm->_gyro->dna.cardiff_things);
+ _vm->_visa->dixi('z', _vm->_gyro->_dna._cardiffQuestionNum);
- _vm->_gyro->_interrogation = _vm->_gyro->dna.cardiff_things;
+ _vm->_gyro->_interrogation = _vm->_gyro->_dna._cardiffQuestionNum;
set_up_timer(182, proccardiffsurvey, reason_cardiffsurvey);
}
@@ -296,8 +296,8 @@ void Timeout::cwytalot_in_herts() {
void Timeout::get_tied_up() {
_vm->_visa->dixi('q', 34); // ...Trouble!
- _vm->_gyro->dna.user_moves_avvy = false;
- _vm->_gyro->dna.been_tied_up = true;
+ _vm->_gyro->_dna._userMovesAvvy = false;
+ _vm->_gyro->_dna._beenTiedUp = true;
_vm->_trip->stopwalking();
_vm->_trip->tr[1].stopwalk();
_vm->_trip->tr[1].stophoming();
@@ -309,14 +309,14 @@ void Timeout::get_tied_up() {
void Timeout::get_tied_up2() {
_vm->_trip->tr[0].walkto(4);
_vm->_trip->tr[1].walkto(5);
- _vm->_gyro->magics[3].op = _vm->_gyro->kMagicNothing; // No effect when you touch the boundaries.
- _vm->_gyro->dna.friar_will_tie_you_up = true;
+ _vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicNothing; // No effect when you touch the boundaries.
+ _vm->_gyro->_dna._friarWillTieYouUp = true;
}
void Timeout::hang_around() {
_vm->_trip->tr[1].check_me = false;
_vm->_trip->tr[0].init(7, true, _vm->_trip); // Robin Hood
- _vm->_gyro->_whereIs[_vm->_gyro->probinhood - 150] = r__robins;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleRobinHood - 150] = r__robins;
_vm->_trip->apped(1, 2);
_vm->_visa->dixi('q', 39);
_vm->_trip->tr[0].walkto(7);
@@ -327,7 +327,7 @@ void Timeout::hang_around2() {
_vm->_visa->dixi('q', 40);
_vm->_trip->tr[1].vanishifstill = false;
_vm->_trip->tr[1].walkto(4);
- _vm->_gyro->_whereIs[_vm->_gyro->pfriartuck - 150] = r__robins;
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleFriarTuck - 150] = r__robins;
_vm->_visa->dixi('q', 41);
_vm->_trip->tr[0].done();
_vm->_trip->tr[1].done(); // Get rid of Robin Hood and Friar Tuck.
@@ -335,20 +335,20 @@ void Timeout::hang_around2() {
set_up_timer(1, procafter_the_shootemup, reason_hanging_around);
// Immediately call the following proc (when you have a chance).
- _vm->_gyro->dna.tied_up = false;
+ _vm->_gyro->_dna._tiedUp = false;
_vm->_enid->backToBootstrap(1); // Call the shoot-'em-up.
}
void Timeout::after_the_shootemup() {
- _vm->_trip->fliproom(_vm->_gyro->dna.room, 0);
+ _vm->_trip->fliproom(_vm->_gyro->_dna._room, 0);
// Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented!
_vm->_trip->tr[0].init(0, true, _vm->_trip); // Avalot.
_vm->_trip->apped(1, 2);
- _vm->_gyro->dna.user_moves_avvy = true;
- _vm->_gyro->dna.obj[_vm->_gyro->crossbow - 1] = true;
+ _vm->_gyro->_dna._userMovesAvvy = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectCrossbow - 1] = true;
_vm->_lucerna->objectlist();
// Same as the added line above: TODO: Remove it later!!!
@@ -377,9 +377,9 @@ void Timeout::after_the_shootemup() {
}
void Timeout::jacques_wakes_up() {
- _vm->_gyro->dna.jacques_awake++;
+ _vm->_gyro->_dna._jacquesState++;
- switch (_vm->_gyro->dna.jacques_awake) { // Additional pictures.
+ switch (_vm->_gyro->_dna._jacquesState) { // Additional pictures.
case 1 :
_vm->_celer->drawBackgroundSprite(-1, -1, 1); // Eyes open.
_vm->_visa->dixi('Q', 45);
@@ -387,22 +387,22 @@ void Timeout::jacques_wakes_up() {
case 2 : // Going through the door.
_vm->_celer->drawBackgroundSprite(-1, -1, 2); // Not on the floor.
_vm->_celer->drawBackgroundSprite(-1, -1, 3); // But going through the door.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // You can't wake him up now.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // You can't wake him up now.
break;
case 3 : // Gone through the door.
_vm->_celer->drawBackgroundSprite(-1, -1, 2); // Not on the floor, either.
_vm->_celer->drawBackgroundSprite(-1, -1, 4); // He's gone... so the door's open.
- _vm->_gyro->_whereIs[_vm->_gyro->pjacques - 150] = 0; // Gone!
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleJacques - 150] = 0; // Gone!
break;
}
- if (_vm->_gyro->dna.jacques_awake == 5) {
- _vm->_gyro->dna.ringing_bells = true;
- _vm->_gyro->dna.ayles_is_awake = true;
+ if (_vm->_gyro->_dna._jacquesState == 5) {
+ _vm->_gyro->_dna._bellsAreRinging = true;
+ _vm->_gyro->_dna._aylesIsAwake = true;
_vm->_lucerna->points(2);
}
- switch (_vm->_gyro->dna.jacques_awake) {
+ switch (_vm->_gyro->_dna._jacquesState) {
case 1:
case 2:
case 3:
@@ -441,9 +441,9 @@ void Timeout::naughty_duke3() {
}
void Timeout::jump() {
- _vm->_gyro->dna.jumpstatus++;
+ _vm->_gyro->_dna._jumpStatus++;
- switch (_vm->_gyro->dna.jumpstatus) {
+ switch (_vm->_gyro->_dna._jumpStatus) {
case 1:
case 2:
case 3:
@@ -462,24 +462,24 @@ void Timeout::jump() {
break;
}
- if (_vm->_gyro->dna.jumpstatus == 20) { // End of jump.
- _vm->_gyro->dna.user_moves_avvy = true;
- _vm->_gyro->dna.jumpstatus = 0;
+ if (_vm->_gyro->_dna._jumpStatus == 20) { // End of jump.
+ _vm->_gyro->_dna._userMovesAvvy = true;
+ _vm->_gyro->_dna._jumpStatus = 0;
} else { // Still jumping.
set_up_timer(1, procjump, reason_jumping);
}
- if ((_vm->_gyro->dna.jumpstatus == 10) // You're at the highest point of your jump.
- && (_vm->_gyro->dna.room == r__insidecardiffcastle)
- && (_vm->_gyro->dna.arrow_in_the_door == true)
+ if ((_vm->_gyro->_dna._jumpStatus == 10) // You're at the highest point of your jump.
+ && (_vm->_gyro->_dna._room == r__insidecardiffcastle)
+ && (_vm->_gyro->_dna._arrowInTheDoor == true)
&& (_vm->_trip->infield(3))) { // Beside the wall
// Grab the arrow!
- if (_vm->_gyro->dna.carrying >= maxobjs)
+ if (_vm->_gyro->_dna._carryNum >= kCarryLimit)
_vm->_scrolls->display("You fail to grab it, because your hands are full.");
else {
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
- _vm->_gyro->dna.arrow_in_the_door = false; // You've got it.
- _vm->_gyro->dna.obj[_vm->_gyro->bolt - 1] = true;
+ _vm->_gyro->_dna._arrowInTheDoor = false; // You've got it.
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectBolt - 1] = true;
_vm->_lucerna->objectlist();
_vm->_visa->dixi('q', 50);
_vm->_lucerna->points(3);
@@ -489,32 +489,32 @@ void Timeout::jump() {
void Timeout::crapulus_says_splud_out() {
_vm->_visa->dixi('q', 56);
- _vm->_gyro->dna.crapulus_will_tell = false;
+ _vm->_gyro->_dna._crapulusWillTell = false;
}
void Timeout::buydrinks() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
- _vm->_gyro->dna.malagauche = 0;
+ _vm->_gyro->_dna._malagauche = 0;
- _vm->_visa->dixi('D', _vm->_gyro->dna.drinking); // Display message about it.
+ _vm->_visa->dixi('D', _vm->_gyro->_dna._drinking); // Display message about it.
_vm->_pingo->wobble(); // Do the special effects.
_vm->_visa->dixi('D', 1); // That'll be thruppence.
- if (_vm->_gyro->pennycheck(3)) // Pay 3d.
+ if (_vm->_gyro->updateMoney(3)) // Pay 3d.
_vm->_visa->dixi('D', 3); // Tell 'em you paid up.
_vm->_acci->drink();
}
void Timeout::buywine() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
- _vm->_gyro->dna.malagauche = 0;
+ _vm->_gyro->_dna._malagauche = 0;
_vm->_visa->dixi('D', 50); // You buy the wine.
_vm->_visa->dixi('D', 1); // It'll be thruppence.
- if (_vm->_gyro->pennycheck(3)) {
+ if (_vm->_gyro->updateMoney(3)) {
_vm->_visa->dixi('D', 4); // You paid up.
- _vm->_gyro->dna.obj[_vm->_gyro->wine - 1] = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectWine - 1] = true;
_vm->_lucerna->objectlist();
- _vm->_gyro->dna.winestate = 1; // OK Wine.
+ _vm->_gyro->_dna._wineState = 1; // OK Wine.
}
}
@@ -525,24 +525,24 @@ void Timeout::callsguards() {
void Timeout::greetsmonk() {
_vm->_visa->dixi('Q', 59);
- _vm->_gyro->dna.entered_lusties_room_as_monk = true;
+ _vm->_gyro->_dna._enteredLustiesRoomAsMonk = true;
}
void Timeout::fall_down_oubliette() {
- _vm->_gyro->magics[8].op = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_magics[8]._operation = _vm->_gyro->kMagicNothing;
_vm->_trip->tr[0].iy++; // Increments dx/dy!
_vm->_trip->tr[0].y += _vm->_trip->tr[0].iy; // Dowwwn we go...
set_up_timer(3, procfall_down_oubliette, reason_falling_down_oubliette);
}
void Timeout::meet_avaroid() {
- if (_vm->_gyro->dna.met_avaroid) {
+ if (_vm->_gyro->_dna._metAvaroid) {
_vm->_scrolls->display(Common::String("You can't expect to be ") + _vm->_scrolls->kControlItalic + "that"
+ _vm->_scrolls->kControlRoman + " lucky twice in a row!");
_vm->_lucerna->gameover();
} else {
_vm->_visa->dixi('Q', 60);
- _vm->_gyro->dna.met_avaroid = true;
+ _vm->_gyro->_dna._metAvaroid = true;
set_up_timer(1, procrise_up_oubliette, reason_rising_up_oubliette);
_vm->_trip->tr[0].face = _vm->_trip->left;
@@ -550,7 +550,7 @@ void Timeout::meet_avaroid() {
_vm->_trip->tr[0].ix = -3;
_vm->_trip->tr[0].iy = -5;
- _vm->_gyro->background(2);
+ _vm->_gyro->setBackgroundColor(2);
}
}
@@ -561,7 +561,7 @@ void Timeout::rise_up_oubliette() {
if (_vm->_trip->tr[0].iy > 0)
set_up_timer(3, procrise_up_oubliette, reason_rising_up_oubliette);
else
- _vm->_gyro->dna.user_moves_avvy = true;
+ _vm->_gyro->_dna._userMovesAvvy = true;
}
void Timeout::robin_hood_and_geida() {
@@ -571,7 +571,7 @@ void Timeout::robin_hood_and_geida() {
_vm->_trip->tr[1].stopwalk();
_vm->_trip->tr[1].face = _vm->_trip->left;
set_up_timer(20, procrobin_hood_and_geida_talk, reason_robin_hood_and_geida);
- _vm->_gyro->dna.geida_follows = false;
+ _vm->_gyro->_dna._geidaFollows = false;
}
void Timeout::robin_hood_and_geida_talk() {
@@ -589,7 +589,7 @@ void Timeout::avalot_returns() {
_vm->_trip->tr[0].init(0, true, _vm->_trip);
_vm->_trip->apped(1, 1);
_vm->_visa->dixi('q', 67);
- _vm->_gyro->dna.user_moves_avvy = true;
+ _vm->_gyro->_dna._userMovesAvvy = true;
}
void Timeout::avvy_sit_down() {
@@ -598,8 +598,8 @@ void Timeout::avvy_sit_down() {
set_up_timer(1, procavvy_sit_down, reason_sitting_down);
else {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
- _vm->_gyro->dna.sitting_in_pub = true;
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._sittingInPub = true;
+ _vm->_gyro->_dna._userMovesAvvy = false;
_vm->_trip->tr[0].visible = false;
}
}
@@ -610,7 +610,7 @@ void Timeout::ghost_room_phew() {
}
void Timeout::arkata_shouts() {
- if (_vm->_gyro->dna.teetotal)
+ if (_vm->_gyro->_dna._teetotal)
return;
_vm->_visa->dixi('q', 76);
@@ -632,7 +632,7 @@ void Timeout::winning() {
_vm->_lucerna->callVerb(_vm->_acci->kVerbCodeScore);
_vm->_scrolls->display(" T H E E N D ");
- _vm->_gyro->lmo = true;
+ _vm->_gyro->_letMeOut = true;
}
void Timeout::avalot_falls() {
@@ -664,7 +664,7 @@ void Timeout::spludwick_leaves_cauldron() {
void Timeout::give_lute_to_geida() { // Moved here from Acci.
_vm->_visa->dixi('Q', 86);
_vm->_lucerna->points(4);
- _vm->_gyro->dna.lustie_is_asleep = true;
+ _vm->_gyro->_dna._lustieIsAsleep = true;
_vm->_sequence->first_show(5);
_vm->_sequence->then_show(6); // He falls asleep...
_vm->_sequence->start_to_close(); // Not really closing, but we're using the same procedure.
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index 0e16c776ce..c514734fcb 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -162,8 +162,8 @@ void triptype::turn(byte whichway) {
void triptype::appear(int16 wx, int16 wy, byte wf) {
x = (wx / 8) * 8;
y = wy;
- ox[_tr->_vm->_gyro->cp] = wx;
- oy[_tr->_vm->_gyro->cp] = wy;
+ ox[_tr->_vm->_gyro->_cp] = wx;
+ oy[_tr->_vm->_gyro->_cp] = wy;
turn(wf);
visible = true;
ix = 0;
@@ -183,23 +183,23 @@ bool triptype::collision_check() {
void triptype::walk() {
byte tc;
- bytefield r;
+ ByteField r;
if (visible) {
- r.x1 = (x / 8) - 1;
- if (r.x1 == 255)
- r.x1 = 0;
- r.y1 = y - 2;
- r.x2 = ((x + _info._xLength) / 8) + 1;
- r.y2 = y + _info._yLength + 2;
+ r._x1 = (x / 8) - 1;
+ if (r._x1 == 255)
+ r._x1 = 0;
+ r._y1 = y - 2;
+ r._x2 = ((x + _info._xLength) / 8) + 1;
+ r._y2 = y + _info._yLength + 2;
- _tr->getset[1 - _tr->_vm->_gyro->cp].remember(r);
+ _tr->getset[1 - _tr->_vm->_gyro->_cp].remember(r);
}
- if (!_tr->_vm->_gyro->doing_sprite_run) {
- ox[_tr->_vm->_gyro->cp] = x;
- oy[_tr->_vm->_gyro->cp] = y;
+ if (!_tr->_vm->_gyro->_doingSpriteRun) {
+ ox[_tr->_vm->_gyro->_cp] = x;
+ oy[_tr->_vm->_gyro->_cp] = y;
if (homing)
homestep();
x = x + ix;
@@ -212,22 +212,22 @@ void triptype::walk() {
return;
}
- tc = _tr->checkfeet(x, x + _info._xLength, oy[_tr->_vm->_gyro->cp], y, _info._yLength) - 1;
+ tc = _tr->checkfeet(x, x + _info._xLength, oy[_tr->_vm->_gyro->_cp], y, _info._yLength) - 1;
// -1 is because the modified array indexes of magics[] compared to Pascal .
- if ((tc != 255) & (!_tr->_vm->_gyro->doing_sprite_run)) {
- switch (_tr->_vm->_gyro->magics[tc].op) {
+ if ((tc != 255) & (!_tr->_vm->_gyro->_doingSpriteRun)) {
+ switch (_tr->_vm->_gyro->_magics[tc]._operation) {
case Gyro::kMagicExclaim: {
bounce();
_tr->mustexclaim = true;
- _tr->saywhat = _tr->_vm->_gyro->magics[tc].data;
+ _tr->saywhat = _tr->_vm->_gyro->_magics[tc]._data;
}
break;
case Gyro::kMagicBounce:
bounce();
break;
case Gyro::kMagicTransport:
- _tr->fliproom(_tr->_vm->_gyro->magics[tc].data >> 8, _tr->_vm->_gyro->magics[tc].data & 0xff);
+ _tr->fliproom(_tr->_vm->_gyro->_magics[tc]._data >> 8, _tr->_vm->_gyro->_magics[tc]._data & 0xff);
break;
case Gyro::kMagicUnfinished: {
bounce();
@@ -235,16 +235,16 @@ void triptype::walk() {
}
break;
case Gyro::kMagicSpecial:
- _tr->call_special(_tr->_vm->_gyro->magics[tc].data);
+ _tr->call_special(_tr->_vm->_gyro->_magics[tc]._data);
break;
case Gyro::kMagicOpenDoor:
- _tr->open_the_door(_tr->_vm->_gyro->magics[tc].data >> 8, _tr->_vm->_gyro->magics[tc].data & 0xff, tc);
+ _tr->open_the_door(_tr->_vm->_gyro->_magics[tc]._data >> 8, _tr->_vm->_gyro->_magics[tc]._data & 0xff, tc);
break;
}
}
}
- if (!_tr->_vm->_gyro->doing_sprite_run) {
+ if (!_tr->_vm->_gyro->_doingSpriteRun) {
count++;
if (((ix != 0) || (iy != 0)) && (count > 1)) {
step++;
@@ -256,8 +256,8 @@ void triptype::walk() {
}
void triptype::bounce() {
- x = ox[_tr->_vm->_gyro->cp];
- y = oy[_tr->_vm->_gyro->cp];
+ x = ox[_tr->_vm->_gyro->_cp];
+ y = oy[_tr->_vm->_gyro->_cp];
if (check_me)
_tr->stopwalking();
else
@@ -278,9 +278,9 @@ int8 triptype::sgn(int16 val) {
void triptype::walkto(byte pednum) {
pednum--; // Pascal -> C conversion: different array indexes.
- speed(sgn(_tr->_vm->_gyro->peds[pednum].x - x) * 4, sgn(_tr->_vm->_gyro->peds[pednum].y - y));
- hx = _tr->_vm->_gyro->peds[pednum].x - _info._xLength / 2;
- hy = _tr->_vm->_gyro->peds[pednum].y - _info._yLength;
+ speed(sgn(_tr->_vm->_gyro->_peds[pednum]._x - x) * 4, sgn(_tr->_vm->_gyro->_peds[pednum]._y - y));
+ hx = _tr->_vm->_gyro->_peds[pednum]._x - _info._xLength / 2;
+ hy = _tr->_vm->_gyro->_peds[pednum]._y - _info._yLength;
homing = true;
}
@@ -344,10 +344,10 @@ void triptype::stopwalk() {
}
void triptype::chatter() {
- _tr->_vm->_gyro->talkx = x + _info._xLength / 2;
- _tr->_vm->_gyro->talky = y;
- _tr->_vm->_gyro->talkf = a.fgc;
- _tr->_vm->_gyro->talkb = a.bgc;
+ _tr->_vm->_gyro->_talkX = x + _info._xLength / 2;
+ _tr->_vm->_gyro->_talkY = y;
+ _tr->_vm->_gyro->_talkFontColor = a.fgc;
+ _tr->_vm->_gyro->_talkBackgroundColor = a.bgc;
}
void triptype::set_up_saver(trip_saver_type &v) {
@@ -436,14 +436,14 @@ getsettype *getsettype::init() {
return this;
}
-void getsettype::remember(bytefield r) {
+void getsettype::remember(ByteField r) {
numleft++;
//if (numleft > maxgetset)
// error("Trip::remember() : runerr_Getset_Overflow");
gs[numleft] = r;
}
-void getsettype::recall(bytefield &r) {
+void getsettype::recall(ByteField &r) {
r = gs[numleft];
numleft--;
}
@@ -540,8 +540,8 @@ void Trip::catamove(byte ped) {
- xy_uint16 = _vm->_gyro->dna.cat_x + _vm->_gyro->dna.cat_y * 256;
- _vm->_gyro->dna.geida_spin = 0;
+ xy_uint16 = _vm->_gyro->_dna._catacombX + _vm->_gyro->_dna._catacombY * 256;
+ _vm->_gyro->_dna._geidaSpin = 0;
switch (xy_uint16) {
case 1801: // Exit catacombs
@@ -558,78 +558,78 @@ void Trip::catamove(byte ped) {
case 2307:
fliproom(r__lusties, 5);
_vm->_scrolls->display("Oh no... here we go again...");
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
tr[0].iy = 1;
tr[0].ix = 0;
return;
}
- if (!_vm->_gyro->dna.enter_catacombs_from_lusties_room)
+ if (!_vm->_gyro->_dna._enterCatacombsFromLustiesRoom)
_vm->_lucerna->load(29);
- here = _vm->_gyro->kCatacombMap[_vm->_gyro->dna.cat_y - 1][_vm->_gyro->dna.cat_x - 1];
+ here = _vm->_gyro->kCatacombMap[_vm->_gyro->_dna._catacombY - 1][_vm->_gyro->_dna._catacombX - 1];
switch (here & 0xf) { // West.
case 0: // no connection (wall)
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28);
break;
case 0x1: // no connection (wall + shield),
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 29); // ...shield.
break;
case 0x2: // wall with door
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 30); // ...door.
break;
case 0x3: // wall with door and shield
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 30); // ...door, and...
_vm->_celer->drawBackgroundSprite(-1, -1, 29); // ...shield.
break;
case 0x4: // no connection (wall + window),
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 5); // ...window.
break;
case 0x5: // wall with door and window
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 30); // ...door, and...
_vm->_celer->drawBackgroundSprite(-1, -1, 5); // ...window.
break;
case 0x6: // no connection (wall + torches),
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicNothing; // No door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicNothing; // No door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 7); // ...torches.
break;
case 0x7: // wall with door and torches
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[4].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[4]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 28); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 30); // ...door, and...
_vm->_celer->drawBackgroundSprite(-1, -1, 7); // ...torches.
break;
case 0xf: // straight-through corridor.
- _vm->_gyro->magics[1].op = _vm->_gyro->kMagicNothing; // Sloping wall.
- _vm->_gyro->magics[2].op = _vm->_gyro->kMagicSpecial; // Straight wall.
+ _vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicNothing; // Sloping wall.
+ _vm->_gyro->_magics[2]._operation = _vm->_gyro->kMagicSpecial; // Straight wall.
break;
}
@@ -637,52 +637,52 @@ void Trip::catamove(byte ped) {
switch ((here & 0xf0) >> 4) { // East
case 0: // no connection (wall)
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19);
break;
case 0x1: // no connection (wall + window),
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 20); // ...window.
break;
case 0x2: // wall with door
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 21); // ...door.
break;
case 0x3: // wall with door and window
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 20); // ...door, and...
_vm->_celer->drawBackgroundSprite(-1, -1, 21); // ...window.
break;
case 0x6: // no connection (wall + torches),
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicNothing; // No door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicNothing; // No door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 18); // ...torches.
break;
case 0x7: // wall with door and torches
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicNothing; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicNothing; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicSpecial; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 19); // Wall, plus...
_vm->_celer->drawBackgroundSprite(-1, -1, 21); // ...door, and...
_vm->_celer->drawBackgroundSprite(-1, -1, 18); // ...torches.
break;
case 0xf: // straight-through corridor.
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicNothing; // Sloping wall.
- _vm->_gyro->magics[5].op = _vm->_gyro->kMagicSpecial; // Straight wall.
- _vm->_gyro->portals[6].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicNothing; // Sloping wall.
+ _vm->_gyro->_magics[5]._operation = _vm->_gyro->kMagicSpecial; // Straight wall.
+ _vm->_gyro->_portals[6]._operation = _vm->_gyro->kMagicNothing; // Door.
break;
}
@@ -690,39 +690,39 @@ void Trip::catamove(byte ped) {
switch ((here & 0xf00) >> 8) { // South
case 0: // No connection.
- _vm->_gyro->magics[6].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->magics[12].op = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[6]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[12]._operation = _vm->_gyro->kMagicBounce;
break;
case 0x1:
_vm->_celer->drawBackgroundSprite(-1, -1, 22);
- if ((xy_uint16 == 2051) && (_vm->_gyro->dna.geida_follows))
- _vm->_gyro->magics[12].op = _vm->_gyro->kMagicExclaim;
+ if ((xy_uint16 == 2051) && (_vm->_gyro->_dna._geidaFollows))
+ _vm->_gyro->_magics[12]._operation = _vm->_gyro->kMagicExclaim;
else
- _vm->_gyro->magics[12].op = _vm->_gyro->kMagicSpecial; // Right exit south.
+ _vm->_gyro->_magics[12]._operation = _vm->_gyro->kMagicSpecial; // Right exit south.
- _vm->_gyro->magics[6].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[6]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicBounce;
break;
case 0x2:
_vm->_celer->drawBackgroundSprite(-1, -1, 23);
- _vm->_gyro->magics[6].op = _vm->_gyro->kMagicSpecial; // Middle exit south.
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->magics[12].op = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[6]._operation = _vm->_gyro->kMagicSpecial; // Middle exit south.
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[12]._operation = _vm->_gyro->kMagicBounce;
break;
case 0x3:
_vm->_celer->drawBackgroundSprite(-1, -1, 24);
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicSpecial; // Left exit south.
- _vm->_gyro->magics[6].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->magics[12].op = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicSpecial; // Left exit south.
+ _vm->_gyro->_magics[6]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_magics[12]._operation = _vm->_gyro->kMagicBounce;
break;
}
switch ((here & 0xf000) >> 12) { // North
case 0: // No connection
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicNothing; // Door.
break;
// LEFT handles:
#if 0
@@ -734,8 +734,8 @@ void Trip::catamove(byte ped) {
#endif
case 0x2:
_vm->_celer->drawBackgroundSprite(-1, -1, 4);
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicBounce; // Middle exit north.
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicBounce; // Middle exit north.
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicSpecial; // Door.
break;
#if 0
case 0x3:
@@ -752,8 +752,8 @@ void Trip::catamove(byte ped) {
#endif
case 0x5:
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicBounce; // Middle exit north.
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicBounce; // Middle exit north.
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicSpecial; // Door.
break;
#if 0
case 0x6:
@@ -773,26 +773,26 @@ void Trip::catamove(byte ped) {
if (((here & 0xf000) >> 12) == 0x9)
_vm->_celer->drawBackgroundSprite(-1, -1, 32);
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicSpecial; // Middle arch north.
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicSpecial; // Middle arch north.
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicNothing; // Door.
}
break;
// DECORATIONS:
case 0xd: // No connection + WINDOW
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 14);
break;
case 0xe: // No connection + TORCH
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicBounce;
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicNothing; // Door.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicBounce;
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicNothing; // Door.
_vm->_celer->drawBackgroundSprite(-1, -1, 8);
break;
// Recessed door:
case 0xf:
- _vm->_gyro->magics[0].op = _vm->_gyro->kMagicNothing; // Door to Geida's room.
+ _vm->_gyro->_magics[0]._operation = _vm->_gyro->kMagicNothing; // Door to Geida's room.
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
- _vm->_gyro->portals[3].op = _vm->_gyro->kMagicSpecial; // Door.
+ _vm->_gyro->_portals[3]._operation = _vm->_gyro->kMagicSpecial; // Door.
break;
}
@@ -828,7 +828,7 @@ void Trip::catamove(byte ped) {
break; // [1,1] : the other two.
}
- if ((_vm->_gyro->dna.geida_follows) && (ped > 0)) {
+ if ((_vm->_gyro->_dna._geidaFollows) && (ped > 0)) {
if (!tr[1].quick) // If we don't already have her...
tr[1].init(5, true, this); // ...Load Geida.
apped(2, geida_ped(ped));
@@ -848,27 +848,27 @@ void Trip::call_special(uint16 which) {
switch (which) {
case 1: // _vm->_gyro->special 1: Room 22: top of stairs.
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
- _vm->_gyro->dna.brummie_stairs = 1;
- _vm->_gyro->magics[9].op = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_dna._brummieStairs = 1;
+ _vm->_gyro->_magics[9]._operation = _vm->_gyro->kMagicNothing;
_vm->_timeout->set_up_timer(10, _vm->_timeout->procstairs, _vm->_timeout->reason_brummiestairs);
stopwalking();
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
break;
case 2: // _vm->_gyro->special 2: Room 22: bottom of stairs.
- _vm->_gyro->dna.brummie_stairs = 3;
- _vm->_gyro->magics[10].op = _vm->_gyro->kMagicNothing;
- _vm->_gyro->magics[11].op = _vm->_gyro->kMagicExclaim;
- _vm->_gyro->magics[11].data = 5;
- _vm->_gyro->magics[3].op = _vm->_gyro->kMagicBounce; // Now works as planned!
+ _vm->_gyro->_dna._brummieStairs = 3;
+ _vm->_gyro->_magics[10]._operation = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_magics[11]._operation = _vm->_gyro->kMagicExclaim;
+ _vm->_gyro->_magics[11]._data = 5;
+ _vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicBounce; // Now works as planned!
stopwalking();
_vm->_visa->dixi('q', 26);
- _vm->_gyro->dna.user_moves_avvy = true;
+ _vm->_gyro->_dna._userMovesAvvy = true;
break;
case 3: // _vm->_gyro->special 3: Room 71: triggers dart.
tr[0].bounce(); // Must include that.
- if (!_vm->_gyro->dna.arrow_triggered) {
- _vm->_gyro->dna.arrow_triggered = true;
+ if (!_vm->_gyro->_dna._arrowTriggered) {
+ _vm->_gyro->_dna._arrowTriggered = true;
apped(2, 4); // The dart starts at ped 4, and...
tr[1].walkto(5); // flies to ped 5.
tr[1].face = 0; // Only face.
@@ -888,25 +888,25 @@ void Trip::call_special(uint16 which) {
_vm->_enid->backToBootstrap(3);
break;
case 5:
- if (_vm->_gyro->dna.friar_will_tie_you_up) {
+ if (_vm->_gyro->_dna._friarWillTieYouUp) {
// _vm->_gyro->special 5: Room 42: touched tree, and get tied up.
- _vm->_gyro->magics[4].op = _vm->_gyro->kMagicBounce; // Boundary effect is now working again.
+ _vm->_gyro->_magics[4]._operation = _vm->_gyro->kMagicBounce; // Boundary effect is now working again.
_vm->_visa->dixi('q', 35);
tr[0].done();
//tr[1].vanishifstill:=true;
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
_vm->_visa->dixi('q', 36);
- _vm->_gyro->dna.tied_up = true;
- _vm->_gyro->dna.friar_will_tie_you_up = false;
+ _vm->_gyro->_dna._tiedUp = true;
+ _vm->_gyro->_dna._friarWillTieYouUp = false;
tr[1].walkto(3);
tr[1].vanishifstill = true;
tr[1].check_me = true; // One of them must have Check_Me switched on.
- _vm->_gyro->_whereIs[_vm->_gyro->pfriartuck - 150] = 177; // Not here, then.
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleFriarTuck - 150] = 177; // Not here, then.
_vm->_timeout->set_up_timer(364, _vm->_timeout->prochang_around, _vm->_timeout->reason_hanging_around);
}
break;
case 6: // _vm->_gyro->special 6: fall down oubliette.
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
tr[0].ix = 3;
tr[0].iy = 0;
tr[0].face = right;
@@ -914,7 +914,7 @@ void Trip::call_special(uint16 which) {
break;
case 7: // _vm->_gyro->special 7: stop falling down oubliette.
tr[0].visible = false;
- _vm->_gyro->magics[9].op = _vm->_gyro->kMagicNothing;
+ _vm->_gyro->_magics[9]._operation = _vm->_gyro->kMagicNothing;
stopwalking();
_vm->_timeout->lose_timer(_vm->_timeout->reason_falling_down_oubliette);
//_vm->_lucerna->mblit(12, 80, 38, 160, 3, 0);
@@ -923,7 +923,7 @@ void Trip::call_special(uint16 which) {
_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.
- if ((_vm->_gyro->dna.geida_follows) && (!_vm->_gyro->dna.lustie_is_asleep)) {
+ if ((_vm->_gyro->_dna._geidaFollows) && (!_vm->_gyro->_dna._lustieIsAsleep)) {
_vm->_visa->dixi('q', 63);
tr[1].turn(down);
tr[1].stopwalk();
@@ -932,18 +932,18 @@ void Trip::call_special(uint16 which) {
}
break;
case 9: // _vm->_gyro->special 9: lose Geida to Robin Hood...
- if (!_vm->_gyro->dna.geida_follows)
+ if (!_vm->_gyro->_dna._geidaFollows)
return; // DOESN'T COUNT: no Geida.
tr[1].call_eachstep = false; // She no longer follows Avvy around.
tr[1].walkto(4); // She walks to somewhere...
tr[0].done(); // Lose Avvy.
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
_vm->_timeout->set_up_timer(40, _vm->_timeout->procrobin_hood_and_geida, _vm->_timeout->reason_robin_hood_and_geida);
break;
case 10: // _vm->_gyro->special 10: transfer north in catacombs.
- if ((_vm->_gyro->dna.cat_x == 4) && (_vm->_gyro->dna.cat_y == 1)) {
+ if ((_vm->_gyro->_dna._catacombX == 4) && (_vm->_gyro->_dna._catacombY == 1)) {
// Into Geida's room.
- if (_vm->_gyro->dna.obj[_vm->_gyro->key - 1])
+ if (_vm->_gyro->_dna._objects[_vm->_gyro->kObjectKey - 1])
_vm->_visa->dixi('q', 62);
else {
_vm->_visa->dixi('q', 61);
@@ -951,12 +951,12 @@ void Trip::call_special(uint16 which) {
}
}
_vm->_lucerna->dusk();
- _vm->_gyro->dna.cat_y--;
+ _vm->_gyro->_dna._catacombY--;
catamove(4);
- if (_vm->_gyro->dna.room != r__catacombs)
+ if (_vm->_gyro->_dna._room != r__catacombs)
return;
_vm->_lucerna->delavvy();
- switch ((_vm->_gyro->kCatacombMap[_vm->_gyro->dna.cat_y - 1][_vm->_gyro->dna.cat_x - 1] & 0xf00) >> 8) {
+ switch ((_vm->_gyro->kCatacombMap[_vm->_gyro->_dna._catacombY - 1][_vm->_gyro->_dna._catacombX - 1] & 0xf00) >> 8) {
case 0x1:
apped(1, 12);
break;
@@ -971,9 +971,9 @@ void Trip::call_special(uint16 which) {
break;
case 11: // _vm->_gyro->special 11: transfer east in catacombs.
_vm->_lucerna->dusk();
- _vm->_gyro->dna.cat_x++;
+ _vm->_gyro->_dna._catacombX++;
catamove(1);
- if (_vm->_gyro->dna.room != r__catacombs)
+ if (_vm->_gyro->_dna._room != r__catacombs)
return;
_vm->_lucerna->delavvy();
apped(1, 1);
@@ -982,9 +982,9 @@ void Trip::call_special(uint16 which) {
break;
case 12: // _vm->_gyro->special 12: transfer south in catacombs.
_vm->_lucerna->dusk();
- _vm->_gyro->dna.cat_y += 1;
+ _vm->_gyro->_dna._catacombY += 1;
catamove(2);
- if (_vm->_gyro->dna.room != r__catacombs)
+ if (_vm->_gyro->_dna._room != r__catacombs)
return;
_vm->_lucerna->delavvy();
apped(1, 2);
@@ -993,9 +993,9 @@ void Trip::call_special(uint16 which) {
break;
case 13: // _vm->_gyro->special 13: transfer west in catacombs.
_vm->_lucerna->dusk();
- _vm->_gyro->dna.cat_x--;
+ _vm->_gyro->_dna._catacombX--;
catamove(3);
- if (_vm->_gyro->dna.room != r__catacombs)
+ if (_vm->_gyro->_dna._room != r__catacombs)
return;
_vm->_lucerna->delavvy();
apped(1, 3);
@@ -1011,7 +1011,7 @@ void Trip::open_the_door(byte whither, byte ped, byte magicnum) {
// This slides the door open. (The data really ought to be saved in
// the Also file, and will be next time. However, for now, they're
// here.)
- switch (_vm->_gyro->dna.room) {
+ switch (_vm->_gyro->_dna._room) {
case r__outsideyours:
case r__outsidenottspub:
case r__outsideducks:
@@ -1038,7 +1038,7 @@ void Trip::open_the_door(byte whither, byte ped, byte magicnum) {
case r__lusties:
switch (magicnum) {
case 14:
- if (_vm->_gyro->dna.avvys_in_the_cupboard) {
+ if (_vm->_gyro->_dna._avvysInTheCupboard) {
hide_in_the_cupboard();
_vm->_sequence->first_show(8);
_vm->_sequence->then_show(7);
@@ -1066,7 +1066,7 @@ void Trip::open_the_door(byte whither, byte ped, byte magicnum) {
void Trip::newspeed() {
// Given that you've just changed the speed in triptype.xs, this adjusts ix.
- const bytefield lightspace = {40, 199, 47, 199};
+ const ByteField lightspace = {40, 199, 47, 199};
byte page_;
tr[0].ix = (tr[0].ix / 3) * tr[0].xs;
@@ -1122,8 +1122,8 @@ void Trip::rwsp(byte t, byte dir) {
void Trip::apped(byte trn, byte np) {
trn--;
np--;
- tr[trn].appear(_vm->_gyro->peds[np].x - tr[trn]._info._xLength / 2, _vm->_gyro->peds[np].y - tr[trn]._info._yLength, _vm->_gyro->peds[np].dir);
- rwsp(trn, _vm->_gyro->peds[np].dir);
+ tr[trn].appear(_vm->_gyro->_peds[np]._x - tr[trn]._info._xLength / 2, _vm->_gyro->_peds[np]._y - tr[trn]._info._yLength, _vm->_gyro->_peds[np]._direction);
+ rwsp(trn, _vm->_gyro->_peds[np]._direction);
}
#if 0
@@ -1134,20 +1134,14 @@ void Trip::apped(byte trn, byte np) {
#endif
//x1,x2 - as _vm->_gyro->bytefield, but *8. y1,y2 - as _vm->_gyro->bytefield.
//x3,y3 = mx,my. x4,y4 = mx+16,my+16.
-bool Trip::overlaps_with_mouse() {
- bool overlaps_with_mouse_result;
- overlaps_with_mouse_result =
- (r.x2 * 8 >= _vm->_gyro->mx) && (_vm->_gyro->mx + 16 >= r.x1 * 8) && (r.y2 >= _vm->_gyro->my) && (_vm->_gyro->my + 16 >= r.y1);
- return overlaps_with_mouse_result;
-}
void Trip::getback() {
// Super_Off;
-
+#if 0
while (getset[1 - _vm->_gyro->cp].numleft > 0) {
getset[1 - _vm->_gyro->cp].recall(r);
-#if 0
+
bool endangered = false;
if overlaps_with_mouse and not endangered then
begin
@@ -1155,12 +1149,10 @@ void Trip::getback() {
blitfix;
Super_Off;
end;
-#endif
//_vm->_lucerna->mblit(r.x1, r.y1, r.x2, r.y2, 3, 1 - _vm->_gyro->cp);
}
-#if 0
if endangered then
Super_On;
#endif
@@ -1234,13 +1226,13 @@ void Trip::arrow_procs(byte tripnum) {
#endif
_vm->_lucerna->gameover();
- _vm->_gyro->dna.user_moves_avvy = false; // Stop the user from moving him.
+ _vm->_gyro->_dna._userMovesAvvy = false; // Stop the user from moving him.
_vm->_timeout->set_up_timer(55, _vm->_timeout->procnaughty_duke, _vm->_timeout->reason_naughty_duke);
}
} else { // Arrow has hit the wall!
tr[tripnum].done(); // Deallocate the arrow.
_vm->_celer->drawBackgroundSprite(-1, -1, 3); // Show pic of arrow stuck into the door.
- _vm->_gyro->dna.arrow_in_the_door = true; // So that we can pick it up.
+ _vm->_gyro->_dna._arrowInTheDoor = true; // So that we can pick it up.
}
}
@@ -1299,21 +1291,21 @@ void Trip::spin(byte whichway, byte &tripnum) {
if (tr[tripnum].whichsprite == 2)
return; // Not for Spludwick
- _vm->_gyro->dna.geida_spin += 1;
- _vm->_gyro->dna.geida_time = 20;
- if (_vm->_gyro->dna.geida_spin == 5) {
+ _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->_gyro->dna.geida_spin = 0;
- _vm->_gyro->dna.geida_time = 0; // knock out records
+ _vm->_gyro->_dna._geidaSpin = 0;
+ _vm->_gyro->_dna._geidaTime = 0; // knock out records
}
}
}
void Trip::geida_procs(byte tripnum) {
- if (_vm->_gyro->dna.geida_time > 0) {
- _vm->_gyro->dna.geida_time--;
- if (_vm->_gyro->dna.geida_time == 0)
- _vm->_gyro->dna.geida_spin = 0;
+ if (_vm->_gyro->_dna._geidaTime > 0) {
+ _vm->_gyro->_dna._geidaTime--;
+ if (_vm->_gyro->_dna._geidaTime == 0)
+ _vm->_gyro->_dna._geidaSpin = 0;
}
if (tr[tripnum].y < (tr[0].y - 2)) {
@@ -1388,7 +1380,7 @@ void Trip::call_andexors() {
void Trip::trippancy_link() {
byte fv;
- if (_vm->_gyro->ddmnow | _vm->_gyro->ontoolbar | _vm->_gyro->seescroll)
+ if (_vm->_gyro->_dropdownActive | _vm->_gyro->_onToolbar | _vm->_gyro->_seeScroll)
return;
for (fv = 0; fv < numtr; fv++) {
if (tr[fv].quick && tr[fv].visible)
@@ -1443,8 +1435,8 @@ void Trip::get_back_loretta() {
void Trip::stopwalking() {
tr[0].stopwalk();
- _vm->_gyro->dna.rw = stopped;
- if (_vm->_gyro->alive)
+ _vm->_gyro->_dna._direction = stopped;
+ if (_vm->_gyro->_alive)
tr[0].step = 1;
}
@@ -1462,15 +1454,15 @@ void Trip::getsetclear() {
}
void Trip::hide_in_the_cupboard() {
- if (_vm->_gyro->dna.avvys_in_the_cupboard) {
- if (_vm->_gyro->dna.wearing == Acci::kNothing)
+ 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!");
else {
tr[0].visible = true;
- _vm->_gyro->dna.user_moves_avvy = 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->_gyro->dna.avvys_in_the_cupboard = false;
+ _vm->_gyro->_dna._avvysInTheCupboard = false;
_vm->_sequence->first_show(8);
_vm->_sequence->then_show(7);
_vm->_sequence->start_to_close();
@@ -1478,50 +1470,36 @@ void Trip::hide_in_the_cupboard() {
} else {
// Not hiding in the cupboard
tr[0].visible = false;
- _vm->_gyro->dna.user_moves_avvy = false;
+ _vm->_gyro->_dna._userMovesAvvy = false;
_vm->_scrolls->display(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.avvys_in_the_cupboard = true;
+ _vm->_gyro->_dna._avvysInTheCupboard = true;
_vm->_celer->drawBackgroundSprite(-1, -1, 8);
}
}
-void Trip::tidy_up(int16 a, int16 b, int16 c, int16 d) {
- warning("STUB: Trip::tidy_up()");
-}
-
-void Trip::tidy_after_mouse() {
- tidy_up(beforex, beforey, beforex + 15, beforey + 15);
- _vm->_gyro->xycheck();
- tidy_up(_vm->_gyro->mx, _vm->_gyro->my, _vm->_gyro->mx + 15, _vm->_gyro->my + 15);
-}
-
void Trip::fliproom(byte room, byte ped) {
byte fv;
- if (!_vm->_gyro->alive) {
+ if (!_vm->_gyro->_alive) {
// You can't leave the room if you're dead.
tr[0].ix = 0;
tr[0].iy = 0; // Stop him from moving.
return;
}
- if ((room == 177) && (_vm->_gyro->dna.room == r__lusties)) {
+ if ((room == 177) && (_vm->_gyro->_dna._room == r__lusties)) {
hide_in_the_cupboard();
return;
}
- if ((_vm->_gyro->dna.jumpstatus > 0) && (_vm->_gyro->dna.room == r__insidecardiffcastle)) {
+ if ((_vm->_gyro->_dna._jumpStatus > 0) && (_vm->_gyro->_dna._room == r__insidecardiffcastle)) {
// You can't *jump* out of Cardiff Castle!
tr[0].ix = 0;
return;
}
- _vm->_gyro->xycheck();
- beforex = _vm->_gyro->mx;
- beforey = _vm->_gyro->my;
-
- _vm->_lucerna->exitroom(_vm->_gyro->dna.room);
+ _vm->_lucerna->exitroom(_vm->_gyro->_dna._room);
_vm->_lucerna->dusk();
getsetclear();
@@ -1531,18 +1509,18 @@ void Trip::fliproom(byte room, byte ped) {
tr[fv].done();
} // Deallocate sprite
- if (_vm->_gyro->dna.room == r__lustiesroom)
- _vm->_gyro->dna.enter_catacombs_from_lusties_room = true;
+ if (_vm->_gyro->_dna._room == r__lustiesroom)
+ _vm->_gyro->_dna._enterCatacombsFromLustiesRoom = true;
_vm->_lucerna->enterroom(room, ped);
apped(1, ped);
- _vm->_gyro->dna.enter_catacombs_from_lusties_room = false;
- _vm->_gyro->oldrw = _vm->_gyro->dna.rw;
- _vm->_gyro->dna.rw = tr[0].face;
+ _vm->_gyro->_dna._enterCatacombsFromLustiesRoom = false;
+ _vm->_gyro->_oldDirection = _vm->_gyro->_dna._direction;
+ _vm->_gyro->_dna._direction = tr[0].face;
_vm->_lucerna->showrw();
for (fv = 0; fv <= 1; fv++) {
- _vm->_gyro->cp = 1 - _vm->_gyro->cp;
+ _vm->_gyro->_cp = 1 - _vm->_gyro->_cp;
getback();
}
_vm->_lucerna->dawn();
@@ -1556,13 +1534,13 @@ bool Trip::infield(byte which) {
int16 yy = tr[0].y + tr[0]._info._yLength;
- return (tr[0].x >= _vm->_gyro->fields[which].x1) && (tr[0].x <= _vm->_gyro->fields[which].x2)
- && (yy >= _vm->_gyro->fields[which].y1) && (yy <= _vm->_gyro->fields[which].y2);
+ return (tr[0].x >= _vm->_gyro->_fields[which]._x1) && (tr[0].x <= _vm->_gyro->_fields[which]._x2)
+ && (yy >= _vm->_gyro->_fields[which]._y1) && (yy <= _vm->_gyro->_fields[which]._y2);
}
bool Trip::neardoor() {
- if (_vm->_gyro->numfields < 8) {
+ if (_vm->_gyro->_fieldNum < 8) {
// there ARE no doors here!
return false;
}
@@ -1570,9 +1548,9 @@ bool Trip::neardoor() {
int16 ux = tr[0].x;
int16 uy = tr[0].y + tr[0]._info._yLength;
bool nd = false;
- for (byte fv = 8; fv < _vm->_gyro->numfields; fv++)
- if ((ux >= _vm->_gyro->fields[fv].x1) && (ux <= _vm->_gyro->fields[fv].x2)
- && (uy >= _vm->_gyro->fields[fv].y1) && (uy <= _vm->_gyro->fields[fv].y2))
+ for (byte fv = 8; fv < _vm->_gyro->_fieldNum; fv++)
+ if ((ux >= _vm->_gyro->_fields[fv]._x1) && (ux <= _vm->_gyro->_fields[fv]._x2)
+ && (uy >= _vm->_gyro->_fields[fv]._y1) && (uy <= _vm->_gyro->_fields[fv]._y2))
nd = true;
return nd;
}
@@ -1584,7 +1562,7 @@ void Trip::new_game_for_trippancy() { // Called by gyro.newgame
void Trip::handleMoveKey(const Common::Event &event) {
- if (!_vm->_gyro->dna.user_moves_avvy)
+ if (!_vm->_gyro->_dna._userMovesAvvy)
return;
if (_vm->_dropdown->_activeMenuItem._activeNow)
@@ -1592,58 +1570,58 @@ void Trip::handleMoveKey(const Common::Event &event) {
else {
switch (event.kbd.keycode) {
case Common::KEYCODE_UP:
- if (_vm->_gyro->dna.rw != up) {
- _vm->_gyro->dna.rw = up;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != up) {
+ _vm->_gyro->_dna._direction = up;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_DOWN:
- if (_vm->_gyro->dna.rw != down) {
- _vm->_gyro->dna.rw = down;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != down) {
+ _vm->_gyro->_dna._direction = down;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_LEFT:
- if (_vm->_gyro->dna.rw != left) {
- _vm->_gyro->dna.rw = left;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != left) {
+ _vm->_gyro->_dna._direction = left;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_RIGHT:
- if (_vm->_gyro->dna.rw != right) {
- _vm->_gyro->dna.rw = right;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != right) {
+ _vm->_gyro->_dna._direction = right;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_PAGEUP:
- if (_vm->_gyro->dna.rw != ur) {
- _vm->_gyro->dna.rw = ur;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != ur) {
+ _vm->_gyro->_dna._direction = ur;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_PAGEDOWN:
- if (_vm->_gyro->dna.rw != dr) {
- _vm->_gyro->dna.rw = dr;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != dr) {
+ _vm->_gyro->_dna._direction = dr;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_END:
- if (_vm->_gyro->dna.rw != dl) {
- _vm->_gyro->dna.rw = dl;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != dl) {
+ _vm->_gyro->_dna._direction = dl;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
case Common::KEYCODE_HOME:
- if (_vm->_gyro->dna.rw != ul) {
- _vm->_gyro->dna.rw = ul;
- rwsp(0, _vm->_gyro->dna.rw);
+ if (_vm->_gyro->_dna._direction != ul) {
+ _vm->_gyro->_dna._direction = ul;
+ rwsp(0, _vm->_gyro->_dna._direction);
} else
stopwalking();
break;
diff --git a/engines/avalanche/trip6.h b/engines/avalanche/trip6.h
index e3ed44fe43..4deebbc104 100644
--- a/engines/avalanche/trip6.h
+++ b/engines/avalanche/trip6.h
@@ -130,12 +130,12 @@ const int16 maxgetset = 35;
class getsettype {
public:
- bytefield gs[maxgetset];
+ ByteField gs[maxgetset];
byte numleft;
getsettype *init();
- void remember(bytefield r);
- void recall(bytefield &r);
+ void remember(ByteField r);
+ void recall(ByteField &r);
};
@@ -235,7 +235,7 @@ public:
private:
AvalancheEngine *_vm;
- bytefield r;
+ ByteField r;
int16 beforex, beforey;
@@ -247,8 +247,6 @@ private:
void hide_in_the_cupboard();
- bool overlaps_with_mouse();
-
void follow_avvy_y(byte tripnum);
void back_and_forth(byte tripnum);
@@ -266,10 +264,6 @@ private:
void call_andexors();
void getsetclear();
-
- void tidy_up(int16 a, int16 b, int16 c, int16 d);
-
- void tidy_after_mouse();
};
} // End of namespace Avalanche.
diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp
index fe31cc28da..4cdbe5a8de 100644
--- a/engines/avalanche/visa2.cpp
+++ b/engines/avalanche/visa2.cpp
@@ -49,13 +49,13 @@ bool Visa::bubbling = false;
bool Visa::report_dixi_errors = true;
void Visa::unskrimble() {
- for (uint16 fv = 0; fv < _vm->_gyro->bufsize; fv++)
- _vm->_gyro->buffer[fv] = (~(_vm->_gyro->buffer[fv] - (fv + 1))) % 256;
+ for (uint16 fv = 0; fv < _vm->_gyro->_bufSize; fv++)
+ _vm->_gyro->_buffer[fv] = (~(_vm->_gyro->_buffer[fv] - (fv + 1))) % 256;
}
void Visa::do_the_bubble() {
- _vm->_gyro->bufsize++;
- _vm->_gyro->buffer[_vm->_gyro->bufsize - 1] = 2;
+ _vm->_gyro->_bufSize++;
+ _vm->_gyro->_buffer[_vm->_gyro->_bufSize - 1] = 2;
}
void Visa::dixi(char block, byte point) {
@@ -85,7 +85,7 @@ void Visa::dixi(char block, byte point) {
if (error) {
if (report_dixi_errors) {
Common::String todisplay;
- todisplay.format("%cError accessing scroll %c%s", 7, block, _vm->_gyro->strf(point).c_str());
+ todisplay.format("%cError accessing scroll %c%s", 7, block, _vm->_gyro->intToStr(point).c_str());
_vm->_scrolls->display(todisplay);
}
return;
@@ -96,8 +96,8 @@ void Visa::dixi(char block, byte point) {
return;
}
sezfile.seek(sez_offset);
- _vm->_gyro->bufsize = sezfile.readUint16LE();
- sezfile.read(_vm->_gyro->buffer, _vm->_gyro->bufsize);
+ _vm->_gyro->_bufSize = sezfile.readUint16LE();
+ sezfile.read(_vm->_gyro->_buffer, _vm->_gyro->_bufSize);
sezfile.close();
unskrimble();
@@ -146,8 +146,8 @@ void Visa::speech(byte who, byte subject) {
return;
}
sezfile.seek(sez_offset);
- _vm->_gyro->bufsize = sezfile.readUint16LE();
- sezfile.read(_vm->_gyro->buffer, _vm->_gyro->bufsize);
+ _vm->_gyro->_bufSize = sezfile.readUint16LE();
+ sezfile.read(_vm->_gyro->_buffer, _vm->_gyro->_bufSize);
sezfile.close();
unskrimble();
@@ -165,27 +165,27 @@ void Visa::talkto(byte whom) {
bool no_matches;
if (_vm->_acci->_person == _vm->_acci->kPardon) {
- _vm->_acci->_person = _vm->_gyro->subjnumber;
- _vm->_gyro->subjnumber = 0;
+ _vm->_acci->_person = _vm->_gyro->_subjectNum;
+ _vm->_gyro->_subjectNum = 0;
}
- if (_vm->_gyro->subjnumber == 0)
+ if (_vm->_gyro->_subjectNum == 0)
switch (whom) {
- case Gyro::pspludwick:
- if ((_vm->_gyro->dna.lustie_is_asleep) & (!_vm->_gyro->dna.obj[_vm->_gyro->potion - 1])) {
+ case Gyro::kPeopleSpludwick:
+ if ((_vm->_gyro->_dna._lustieIsAsleep) & (!_vm->_gyro->_dna._objects[_vm->_gyro->kObjectPotion - 1])) {
dixi('q', 68);
- _vm->_gyro->dna.obj[_vm->_gyro->potion - 1] = true;
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectPotion - 1] = true;
_vm->_lucerna->objectlist();
_vm->_lucerna->points(3);
return;
} else {
- if (_vm->_gyro->dna.talked_to_crapulus)
+ if (_vm->_gyro->_dna._talkedToCrapulus)
// Spludwick - what does he need?
// 0 - let it through to use normal routine.
- switch (_vm->_gyro->dna.given2spludwick) {
+ switch (_vm->_gyro->_dna._givenToSpludwick) {
case 1: // Falltrough is intended.
case 2:{
- _vm->_scrolls->display(Common::String("Can you get me ") + _vm->_gyro->get_better(_vm->_gyro->kSpludwicksOrder[_vm->_gyro->dna.given2spludwick]) + ", please?" + _vm->_scrolls->kControlRegister + '2' + _vm->_scrolls->kControlSpeechBubble);
+ _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);
return;
}
break;
@@ -201,57 +201,57 @@ void Visa::talkto(byte whom) {
}
}
break;
- case Gyro::pibythneth:
- if (_vm->_gyro->dna.givenbadgetoiby) {
+ case Gyro::kPeopleIbythneth:
+ if (_vm->_gyro->_dna._givenBadgeToIby) {
dixi('q', 33); // Thanks a lot!
return; // And leave the proc.
}
break; // Or... just continue, 'cos he hasn't got it.
- case Gyro::pdogfood:
- if (_vm->_gyro->dna.wonnim) { // We've won the game.
+ case Gyro::kPeopleDogfood:
+ if (_vm->_gyro->_dna._wonNim) { // We've won the game.
dixi('q', 6); // "I'm Not Playing!"
return; // Zap back.
} else
- _vm->_gyro->dna.asked_dogfood_about_nim = true;
+ _vm->_gyro->_dna._askedDogfoodAboutNim = true;
break;
- case Gyro::payles:
- if (!_vm->_gyro->dna.ayles_is_awake) {
+ case Gyro::kPeopleAyles:
+ if (!_vm->_gyro->_dna._aylesIsAwake) {
dixi('q', 43); // He's fast asleep!
return;
- } else if (!_vm->_gyro->dna.given_pen_to_ayles) {
+ } else if (!_vm->_gyro->_dna._givenPenToAyles) {
dixi('q', 44); // Can you get me a pen, Avvy?
return;
}
break;
- case Gyro::pjacques: {
+ case Gyro::kPeopleJacques: {
dixi('q', 43);
return;
}
- case Gyro::pgeida:
- if (_vm->_gyro->dna.geida_given_potion)
- _vm->_gyro->dna.geida_follows = true;
+ case Gyro::kPeopleGeida:
+ if (_vm->_gyro->_dna._givenPotionToGeida)
+ _vm->_gyro->_dna._geidaFollows = true;
else {
dixi('u', 17);
return;
}
break;
- case Gyro::pspurge:
- if (!_vm->_gyro->dna.sitting_in_pub) {
+ case Gyro::kPeopleSpurge:
+ if (!_vm->_gyro->_dna._sittingInPub) {
dixi('q', 71); // Try going over and sitting down.
return;
} else {
- if (_vm->_gyro->dna.spurge_talk < 5)
- _vm->_gyro->dna.spurge_talk++;
- if (_vm->_gyro->dna.spurge_talk > 1) { // no. 1 falls through
- dixi('q', 70 + _vm->_gyro->dna.spurge_talk);
+ if (_vm->_gyro->_dna._spurgeTalkCount < 5)
+ _vm->_gyro->_dna._spurgeTalkCount++;
+ if (_vm->_gyro->_dna._spurgeTalkCount > 1) { // no. 1 falls through
+ dixi('q', 70 + _vm->_gyro->_dna._spurgeTalkCount);
return;
}
}
break;
}
// On a subject. Is there any reason to block it?
- else if ((whom == _vm->_gyro->payles) && (!_vm->_gyro->dna.ayles_is_awake)) {
+ else if ((whom == _vm->_gyro->kPeopleAyles) && (!_vm->_gyro->_dna._aylesIsAwake)) {
dixi('q', 43); // He's fast asleep!
return;
}
@@ -270,18 +270,18 @@ void Visa::talkto(byte whom) {
if (no_matches)
_vm->_scrolls->display(Common::String(_vm->_scrolls->kControlRegister) + _vm->_scrolls->kControlRegister + _vm->_scrolls->kControlToBuffer);
- speech(whom, _vm->_gyro->subjnumber);
+ speech(whom, _vm->_gyro->_subjectNum);
if (!went_ok)
dixi('n', whom); // File not found!
- if ((_vm->_gyro->subjnumber == 0) && ((whom + 149) == _vm->_gyro->pcrapulus)) { // Crapulus: get the badge - first time only
- _vm->_gyro->dna.obj[_vm->_gyro->badge - 1] = true;
+ if ((_vm->_gyro->_subjectNum == 0) && ((whom + 149) == _vm->_gyro->kPeopleCrapulus)) { // Crapulus: get the badge - first time only
+ _vm->_gyro->_dna._objects[_vm->_gyro->kObjectBadge - 1] = true;
_vm->_lucerna->objectlist();
dixi('q', 1); // Circular from Cardiff.
- _vm->_gyro->dna.talked_to_crapulus = true;
+ _vm->_gyro->_dna._talkedToCrapulus = true;
- _vm->_gyro->_whereIs[_vm->_gyro->pcrapulus - 150] = 177; // Crapulus walks off.
+ _vm->_gyro->_whereIs[_vm->_gyro->kPeopleCrapulus - 150] = 177; // Crapulus walks off.
_vm->_trip->tr[1].vanishifstill = true;
_vm->_trip->tr[1].walkto(3); // Walks away.