aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-07-24 23:03:22 +0300
committerFilippos Karapetis2015-07-24 23:03:22 +0300
commit8be83948b1485bb143dd05f7373ffeeb08a8638d (patch)
tree7082d1b73e52c97ea4b6bf1955171e00b72cf57e
parent8ccc6331adadee6cb5c4d6582ce3af614be0850d (diff)
downloadscummvm-rg350-8be83948b1485bb143dd05f7373ffeeb08a8638d.tar.gz
scummvm-rg350-8be83948b1485bb143dd05f7373ffeeb08a8638d.tar.bz2
scummvm-rg350-8be83948b1485bb143dd05f7373ffeeb08a8638d.zip
ACCESS: Use our formatting conventions for variable and function names
-rw-r--r--engines/access/access.cpp20
-rw-r--r--engines/access/access.h22
-rw-r--r--engines/access/amazon/amazon_game.cpp4
-rw-r--r--engines/access/amazon/amazon_resources.cpp2
-rw-r--r--engines/access/amazon/amazon_resources.h2
-rw-r--r--engines/access/bubble_box.cpp166
-rw-r--r--engines/access/bubble_box.h12
-rw-r--r--engines/access/inventory.cpp4
-rw-r--r--engines/access/martian/martian_game.cpp20
-rw-r--r--engines/access/martian/martian_resources.cpp4
-rw-r--r--engines/access/martian/martian_resources.h4
-rw-r--r--engines/access/scripts.cpp36
12 files changed, 148 insertions, 148 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 3fd5c0698c..43083ddd59 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -98,19 +98,19 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_clearSummaryFlag = false;
for (int i = 0; i < 60; i++)
- TRAVEL[i] = 0;
- STARTTRAVELITEM = STARTTRAVELBOX = 0;
+ _travel[i] = 0;
+ _startTravelItem = _startTravelBox = 0;
for (int i = 0; i < 33; i++)
- ASK[i];
+ _ask[i];
_startAboutItem = _startAboutBox = 0;
_byte26CB5 = 0;
- BCNT = 0;
- BOXDATASTART = 0;
- BOXDATAEND = false;
- BOXSELECTY = 0;
- BOXSELECTYOLD = -1;
- NUMBLINES = 0;
- TEMPLIST = nullptr;
+ _bcnt = 0;
+ _boxDataStart = 0;
+ _boxDataEnd = false;
+ _boxSelectY = 0;
+ _boxSelectYOld = -1;
+ _numLines = 0;
+ _tempList = nullptr;
_pictureTaken = 0;
_vidEnd = false;
diff --git a/engines/access/access.h b/engines/access/access.h
index a53a659403..37b9fec5a5 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -209,20 +209,20 @@ public:
// Fields used by MM
// TODO: Refactor
- int TRAVEL[60];
- int ASK[40];
- int STARTTRAVELITEM;
- int STARTTRAVELBOX;
+ int _travel[60];
+ int _ask[40];
+ int _startTravelItem;
+ int _startTravelBox;
int _startAboutItem;
int _startAboutBox;
- int BOXDATASTART;
- bool BOXDATAEND;
- int BOXSELECTY;
- int BOXSELECTYOLD;
- int NUMBLINES;
+ int _boxDataStart;
+ bool _boxDataEnd;
+ int _boxSelectY;
+ int _boxSelectYOld;
+ int _numLines;
byte _byte26CB5;
- int BCNT;
- byte *TEMPLIST;
+ int _bcnt;
+ byte *_tempList;
int _pictureTaken;
//
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 9c39a9bd49..7a55873d97 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -195,8 +195,8 @@ void AmazonEngine::initVariables() {
_timers.push_back(te);
}
- _player->_playerX = _player->_rawPlayer.x = TRAVEL_POS[_player->_roomNumber][0];
- _player->_playerY = _player->_rawPlayer.y = TRAVEL_POS[_player->_roomNumber][1];
+ _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
+ _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
_room->_selectCommand = -1;
_events->setNormalCursor(CURSOR_CROSSHAIRS);
_mouseMode = 0;
diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp
index 5ffb91d9fd..430aa64f30 100644
--- a/engines/access/amazon/amazon_resources.cpp
+++ b/engines/access/amazon/amazon_resources.cpp
@@ -326,7 +326,7 @@ const byte *const CURSORS[10] = {
MOUSE0, MOUSE1, MOUSE2, MOUSE3, CURSEYE, CURSHAND, CURSGET, CURSCLIMB, CURSTALK, CURSHELP
};
-const int TRAVEL_POS[][2] = {
+const int _travelPos[][2] = {
{ -1, 0 },
{ 228, 117 },
{ 28, 98 },
diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h
index 9801fd9dee..10dea02abc 100644
--- a/engines/access/amazon/amazon_resources.h
+++ b/engines/access/amazon/amazon_resources.h
@@ -60,7 +60,7 @@ extern const int DIAGOFFDLY[];
extern const byte *const CURSORS[10];
-extern const int TRAVEL_POS[][2];
+extern const int _travelPos[][2];
extern const int OVEROFFR[];
extern const int OVEROFFL[];
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index c9097bb33c..8227780c98 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -35,10 +35,10 @@ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w
_btnId2 = val3;
_btnX2 = val4;
_btnId3 = _btnX3 = 0; // Unused in MM and Amazon?
- BOXSTARTX = BOXSTARTY = 0;
- BICONSTARTX = BICONSTARTY = 0;
- BOXENDX = BOXENDY = 0;
- BOXPSTARTX = BOXPSTARTY = 0;
+ boxStartX = boxStartY = 0;
+ _bIconStartX = _bIconStartY = 0;
+ _boxEndX = _boxEndY = 0;
+ _boxPStartX = _boxPStartY = 0;
// Unused in AGoE
for (int i = 0; i < 60; i++) {
_tempList[i] = "";
@@ -169,7 +169,7 @@ void BubbleBox::printBubble_v1(const Common::String &msg) {
Font &font2 = _vm->_fonts._font2;
lastLine = font2.getLine(s, _vm->_screen->_maxChars * 6, line, width);
// Draw the text
- PRINTSTR(line);
+ printString(line);
// Move print position
_vm->_screen->_printOrg.y += 6;
@@ -324,18 +324,18 @@ void BubbleBox::doBox(int item, int box) {
delete icons;
}
-void BubbleBox::SETCURSORPOS(int posX, int posY) {
+void BubbleBox::setCursorPos(int posX, int posY) {
_vm->_screen->_printStart = _vm->_screen->_printOrg = Common::Point((posX << 3) + _rowOff, posY << 3);
- warning("Missing call to SETCURSOR");
+ warning("Missing call to setCursorPos");
}
-void BubbleBox::PRINTSTR(Common::String msg) {
- warning("TODO: Proper implementation of PRINTSTR");
+void BubbleBox::printString(Common::String msg) {
+ warning("TODO: Proper implementation of printString");
_vm->_fonts._font1.drawString(_vm->_screen, msg, _vm->_screen->_printOrg);
}
void BubbleBox::displayBoxData() {
- _vm->BOXDATAEND = false;
+ _vm->_boxDataEnd = false;
_rowOff = 2;
_vm->_fonts._charFor._lo = 0xF7;
_vm->_fonts._charFor._hi = 0xFF;
@@ -345,46 +345,46 @@ void BubbleBox::displayBoxData() {
int idx = 0;
if ((_type == TYPE_1) || (_type == TYPE_3)) {
- _vm->BCNT = 0;
+ _vm->_bcnt = 0;
if (_tempList[idx].size() == 0) {
- _vm->BOXDATAEND = true;
+ _vm->_boxDataEnd = true;
return;
}
_vm->_events->hideCursor();
- _vm->_screen->_orgX1 = BOXSTARTX;
- _vm->_screen->_orgX2 = BOXENDX;
- _vm->_screen->_orgY1 = BOXSTARTY;
- _vm->_screen->_orgY2 = BOXENDY;
+ _vm->_screen->_orgX1 = boxStartX;
+ _vm->_screen->_orgX2 = _boxEndX;
+ _vm->_screen->_orgY1 = boxStartY;
+ _vm->_screen->_orgY2 = _boxEndY;
_vm->_screen->_lColor = 0xFA;
_vm->_screen->drawRect();
_vm->_events->showCursor();
}
_vm->_events->hideCursor();
- int oldPStartY = BOXPSTARTY;
- ++BOXPSTARTY;
+ int oldPStartY = _boxPStartY;
+ ++_boxPStartY;
- idx += _vm->BOXDATASTART;
+ idx += _vm->_boxDataStart;
while (true) {
- SETCURSORPOS(BOXPSTARTX, BOXPSTARTY);
- PRINTSTR(_tempList[idx]);
+ setCursorPos(_boxPStartX, _boxPStartY);
+ printString(_tempList[idx]);
++idx;
- ++BOXPSTARTY;
- ++_vm->BCNT;
+ ++_boxPStartY;
+ ++_vm->_bcnt;
if (_tempList[idx].size() == 0) {
- BOXPSTARTY = oldPStartY;
+ _boxPStartY = oldPStartY;
_vm->_events->showCursor();
- _vm->BOXDATAEND = true;
+ _vm->_boxDataEnd = true;
return;
}
- if (_vm->BCNT == _vm->NUMBLINES) {
- BOXPSTARTY = oldPStartY;
+ if (_vm->_bcnt == _vm->_numLines) {
+ _boxPStartY = oldPStartY;
_vm->_events->showCursor();
return;
}
@@ -395,29 +395,29 @@ void BubbleBox::drawSelectBox() {
if (_tempList[0].size() == 0)
return;
- if (((_type != TYPE_1) && (_type != TYPE_3)) || !_vm->BCNT)
+ if (((_type != TYPE_1) && (_type != TYPE_3)) || !_vm->_bcnt)
return;
- if (_vm->BOXSELECTYOLD != -1) {
+ if (_vm->_boxSelectYOld != -1) {
_vm->_events->hideCursor();
_vm->_screen->_lColor = 0xFA;
- int val = _vm->BOXSELECTYOLD + BOXPSTARTY + 1;
+ int val = _vm->_boxSelectYOld + _boxPStartY + 1;
_vm->_screen->_orgY1 = (val << 3) + 2;
_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7;
- _vm->_screen->_orgX1 = BOXSTARTX;
- _vm->_screen->_orgX2 = BOXENDX;
+ _vm->_screen->_orgX1 = boxStartX;
+ _vm->_screen->_orgX2 = _boxEndX;
_vm->_screen->drawBox();
_vm->_events->showCursor();
}
_vm->_events->hideCursor();
- _vm->BOXSELECTYOLD = _vm->BOXSELECTY;
- int val = BOXPSTARTY + _vm->BOXSELECTY + 1;
+ _vm->_boxSelectYOld = _vm->_boxSelectY;
+ int val = _boxPStartY + _vm->_boxSelectY + 1;
_vm->_screen->_orgY1 = (val << 3) + 2;
_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7;
- _vm->_screen->_orgX1 = BOXSTARTX;
- _vm->_screen->_orgX2 = BOXENDX;
+ _vm->_screen->_orgX1 = boxStartX;
+ _vm->_screen->_orgX2 = _boxEndX;
_vm->_screen->_lColor = 0xFE;
_vm->_screen->drawBox();
_vm->_events->showCursor();
@@ -477,9 +477,9 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
delete iconData;
// Draw upper border
- _vm->BCNT = (_vm->_screen->_orgX2 - _vm->_screen->_orgX1) >> 4;
+ _vm->_bcnt = (_vm->_screen->_orgX2 - _vm->_screen->_orgX1) >> 4;
int oldX = _vm->_screen->_orgX1;
- for ( ;_vm->BCNT > 0; --_vm->BCNT) {
+ for ( ;_vm->_bcnt > 0; --_vm->_bcnt) {
_vm->_screen->plotImage(icons, 16, Common::Point(_vm->_screen->_orgX1, _vm->_screen->_orgY1));
_vm->_screen->_orgX1 += 16;
}
@@ -489,7 +489,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 8;
_vm->_screen->_lColor = 0xF9;
- BOXSTARTY = _vm->_screen->_orgY2 + 1;
+ boxStartY = _vm->_screen->_orgY2 + 1;
_vm->_screen->_orgY2 = oldY;
int tmpX = 0;
@@ -501,15 +501,15 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
if (_type == TYPE_3)
_vm->_screen->_orgY1 -= 8;
_vm->_screen->drawRect();
- tmpX = BICONSTARTX = _vm->_screen->_orgX1;
+ tmpX = _bIconStartX = _vm->_screen->_orgX1;
- BOXSTARTX = tmpX + 1;
- tmpY = BOXENDY = _vm->_screen->_orgY1;
+ boxStartX = tmpX + 1;
+ tmpY = _boxEndY = _vm->_screen->_orgY1;
if (_type == TYPE_3)
- BICONSTARTY = tmpY + 9;
+ _bIconStartY = tmpY + 9;
else
- BICONSTARTY = tmpY + 1;
+ _bIconStartY = tmpY + 1;
if (_type == TYPE_3) {
_fileStart = Common::Point((tmpX + 2) >> 3, (tmpY + 2) >> 3);
@@ -519,10 +519,10 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
++_fileStart.y;
}
_fileOff.y = _rowOff = rowOff;
- SETCURSORPOS(_fileStart.x, _fileStart.y);
+ setCursorPos(_fileStart.x, _fileStart.y);
_vm->_fonts._charFor._lo = 0xF7;
_vm->_fonts._charFor._hi = 0;
- PRINTSTR("FILE: ");
+ printString("FILE: ");
_vm->_fonts._charFor._hi = 0xFF;
}
_vm->_screen->_orgY1 = oldY;
@@ -536,7 +536,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
_vm->_screen->_orgY2 -= 8;
_btnUpPos.right = _btnDownPos.right = _vm->_screen->_orgX2;
_btnUpPos.left = _btnDownPos.left = _vm->_screen->_orgX1 = _vm->_screen->_orgX2 - 8;
- BOXENDX = _vm->_screen->_orgX1 - 1;
+ _boxEndX = _vm->_screen->_orgX1 - 1;
_vm->_screen->drawBox();
_vm->_screen->_orgY1 += 6;
@@ -582,8 +582,8 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
int newX = _bounds.top >> 3;
newX = (len - newX) / 2;
- BOXPSTARTX = _bounds.left >> 3;
- newX += BOXPSTARTX;
+ _boxPStartX = _bounds.left >> 3;
+ newX += _boxPStartX;
int newY = _bounds.top >> 3;
int bp = _bounds.top - (newY << 3) + 1;
@@ -593,9 +593,9 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
}
_rowOff = bp;
- retval_ = BOXPSTARTY = newY;
+ retval_ = _boxPStartY = newY;
- SETCURSORPOS(newX, newY);
+ setCursorPos(newX, newY);
_vm->_fonts._charFor._lo = 0xFF;
_vm->_fonts._font1.drawString(_vm->_screen, _bubbleDisplStr, _vm->_screen->_printOrg);
@@ -619,31 +619,31 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
int ICON3X = 0;
if (_btnId1) {
ICON1T = _btnId1;
- ICON1X = BICONSTARTX + _btnX1;
- ICON1Y = BICONSTARTY;
+ ICON1X = _bIconStartX + _btnX1;
+ ICON1Y = _bIconStartY;
_vm->_screen->plotImage(icons, ICON1T + 10, Common::Point(ICON1X, ICON1Y));
if (_btnId2) {
ICON2T = _btnId2;
- ICON2X = BICONSTARTX + _btnX2;
- _vm->_screen->plotImage(icons, ICON2T + 10, Common::Point(ICON2X, BICONSTARTY));
+ ICON2X = _bIconStartX + _btnX2;
+ _vm->_screen->plotImage(icons, ICON2T + 10, Common::Point(ICON2X, _bIconStartY));
if (_btnId3) {
ICON3T = _btnId3;
- ICON3X = BICONSTARTX + _btnX3;
- _vm->_screen->plotImage(icons, ICON3T + 10, Common::Point(ICON3X, BICONSTARTY));
+ ICON3X = _bIconStartX + _btnX3;
+ _vm->_screen->plotImage(icons, ICON3T + 10, Common::Point(ICON3X, _bIconStartY));
}
}
}
_vm->_screen->restoreScreen();
- _vm->BOXDATASTART = _startItem;
- _vm->BOXSELECTYOLD = -1;
- _vm->BOXSELECTY = _startBox;
+ _vm->_boxDataStart = _startItem;
+ _vm->_boxSelectYOld = -1;
+ _vm->_boxSelectY = _startBox;
- _vm->NUMBLINES = (_bounds.bottom >> 3) - 2;
+ _vm->_numLines = (_bounds.bottom >> 3) - 2;
if (_type == TYPE_3)
- --_vm->NUMBLINES;
+ --_vm->_numLines;
_vm->_events->showCursor();
displayBoxData();
@@ -657,30 +657,30 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
if (((_type == TYPE_1) || (_type != TYPE_3)) && (_vm->_timers[2]._flag == 0)) {
++_vm->_timers[2]._flag;
if (_btnUpPos.contains(_vm->_events->_mousePos)) {
- if (_vm->BCNT) {
- if (_vm->BOXSELECTY != 0) {
- --_vm->BOXSELECTY;
+ if (_vm->_bcnt) {
+ if (_vm->_boxSelectY != 0) {
+ --_vm->_boxSelectY;
drawSelectBox();
- } else if (_vm->BOXDATASTART != 0) {
- --_vm->BOXDATASTART;
+ } else if (_vm->_boxDataStart != 0) {
+ --_vm->_boxDataStart;
displayBoxData();
drawSelectBox();
}
}
continue;
} else if (_btnDownPos.contains(_vm->_events->_mousePos)) {
- if (_vm->BCNT) {
- if (_vm->BCNT == _vm->NUMBLINES) {
- if (_vm->BCNT != _vm->BOXSELECTY + 1) {
- ++_vm->BOXSELECTY;
+ if (_vm->_bcnt) {
+ if (_vm->_bcnt == _vm->_numLines) {
+ if (_vm->_bcnt != _vm->_boxSelectY + 1) {
+ ++_vm->_boxSelectY;
drawSelectBox();
- } else if (!_vm->BOXDATAEND) {
- ++_vm->BOXDATASTART;
+ } else if (!_vm->_boxDataEnd) {
+ ++_vm->_boxDataStart;
displayBoxData();
drawSelectBox();
}
- } else if (_vm->BCNT != _vm->BOXSELECTY + 1) {
- ++_vm->BOXSELECTY;
+ } else if (_vm->_bcnt != _vm->_boxSelectY + 1) {
+ ++_vm->_boxSelectY;
drawSelectBox();
}
}
@@ -688,19 +688,19 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
}
}
- if ((_vm->_events->_mousePos.x >= BOXSTARTX) && (_vm->_events->_mousePos.x <= BOXENDX)
- && (_vm->_events->_mousePos.y >= BOXSTARTY) && (_vm->_events->_mousePos.y <= BOXENDY)) {
- int val = (_vm->_events->_mousePos.x >> 3) - BOXPSTARTY;
- if (val > _vm->BCNT)
+ if ((_vm->_events->_mousePos.x >= boxStartX) && (_vm->_events->_mousePos.x <= _boxEndX)
+ && (_vm->_events->_mousePos.y >= boxStartY) && (_vm->_events->_mousePos.y <= _boxEndY)) {
+ int val = (_vm->_events->_mousePos.x >> 3) - _boxPStartY;
+ if (val > _vm->_bcnt)
continue;
--val;
if (_type == TYPE_3)
_vm->_boxSelect = val;
else {
btnSelected = 1;
- if (_vm->BOXSELECTY == val)
+ if (_vm->_boxSelectY == val)
break;
- _vm->BOXSELECTY = val;
+ _vm->_boxSelectY = val;
_vm->_events->debounceLeft();
drawSelectBox();
continue;
@@ -740,10 +740,10 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
_vm->_screen->restoreBlock();
_vm->_events->showCursor();
_vm->_events->debounceLeft();
- if (_vm->BCNT == 0)
+ if (_vm->_bcnt == 0)
retval_ = -1;
else
- retval_ = _vm->BOXDATASTART + _vm->BOXSELECTY;
+ retval_ = _vm->_boxDataStart + _vm->_boxSelectY;
return retval_;
}
diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h
index 6bf752d1a3..6d7f3f679e 100644
--- a/engines/access/bubble_box.h
+++ b/engines/access/bubble_box.h
@@ -44,10 +44,10 @@ private:
int _charCol, _rowOff;
Common::Point _fileStart;
Common::Point _fileOff;
- int BOXSTARTX, BOXSTARTY;
- int BOXENDX, BOXENDY;
- int BICONSTARTX, BICONSTARTY;
- int BOXPSTARTX, BOXPSTARTY;
+ int boxStartX, boxStartY;
+ int _boxEndX, _boxEndY;
+ int _bIconStartX, _bIconStartY;
+ int _boxPStartX, _boxPStartY;
void displayBoxData();
void drawSelectBox();
@@ -104,8 +104,8 @@ public:
int doBox_v1(int item, int box, int &btnSelected);
void getList(const char *const data[], int *flags);
- void SETCURSORPOS(int posX, int posY);
- void PRINTSTR(Common::String msg);
+ void setCursorPos(int posX, int posY);
+ void printString(Common::String msg);
};
} // End of namespace Access
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp
index d14f116376..3823b17283 100644
--- a/engines/access/inventory.cpp
+++ b/engines/access/inventory.cpp
@@ -226,8 +226,8 @@ int InventoryManager::displayInv() {
int btnSelected = 0;
int boxX = _vm->_invBox->doBox_v1(_startInvItem, _startInvBox, btnSelected);
- _startInvItem = _vm->BOXDATASTART;
- _startInvBox= _vm->BOXSELECTY;
+ _startInvItem = _vm->_boxDataStart;
+ _startInvBox = _vm->_boxSelectY;
if (boxX == -1)
btnSelected = 2;
diff --git a/engines/access/martian/martian_game.cpp b/engines/access/martian/martian_game.cpp
index 09bb06be5c..3fdba8d260 100644
--- a/engines/access/martian/martian_game.cpp
+++ b/engines/access/martian/martian_game.cpp
@@ -68,20 +68,20 @@ void MartianEngine::initVariables() {
_timers.push_back(te);
}
- _player->_playerX = _player->_rawPlayer.x = TRAVEL_POS[_player->_roomNumber][0];
- _player->_playerY = _player->_rawPlayer.y = TRAVEL_POS[_player->_roomNumber][1];
+ _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
+ _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
_room->_selectCommand = -1;
_events->setNormalCursor(CURSOR_CROSSHAIRS);
_mouseMode = 0;
_numAnimTimers = 0;
for (int i = 0; i < 60; i++)
- TRAVEL[i] = 0;
- TRAVEL[7] = 1;
+ _travel[i] = 0;
+ _travel[7] = 1;
for (int i = 0; i < 40; i++)
- ASK[i] = 0;
- ASK[33] = 1;
+ _ask[i] = 0;
+ _ask[33] = 1;
}
void MartianEngine::setNoteParams() {
@@ -114,7 +114,7 @@ void MartianEngine::displayNote(const Common::String &msg) {
bool lastLine = false;
do {
lastLine = _fonts._font1.getLine(lines, _screen->_maxChars * 6, line, width);
- _bubbleBox->PRINTSTR(line);
+ _bubbleBox->printString(line);
_screen->_printOrg = Common::Point(_screen->_printStart.x, _screen->_printOrg.y + 6);
if (_screen->_printOrg.y == 196) {
@@ -303,8 +303,8 @@ void MartianEngine::setupGame() {
// Set player room and position
_player->_roomNumber = 7;
- _player->_playerX = _player->_rawPlayer.x = TRAVEL_POS[_player->_roomNumber][0];
- _player->_playerY = _player->_rawPlayer.y = TRAVEL_POS[_player->_roomNumber][1];
+ _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0];
+ _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1];
}
void MartianEngine::showDeathText(Common::String msg) {
@@ -314,7 +314,7 @@ void MartianEngine::showDeathText(Common::String msg) {
do {
lastLine = _fonts._font2.getLine(msg, _screen->_maxChars * 6, line, width);
// Draw the text
- _bubbleBox->PRINTSTR(line);
+ _bubbleBox->printString(line);
_screen->_printOrg.y += 6;
_screen->_printOrg.x = _screen->_printStart.x;
diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index 2ae61141e7..c7f905413a 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -134,7 +134,7 @@ const byte MOUSE3[] = {
};
const byte *const CURSORS[4] = { MOUSE0, MOUSE1, MOUSE2, MOUSE3 };
-const int TRAVEL_POS[][2] = {
+const int _travelPos[][2] = {
{ -1, 0 },
{ 228, 117 },
{ 28, 98 },
@@ -765,7 +765,7 @@ const char *const TRAVDATA[] = {
"COOPER BRADBURY", nullptr
};
-const char *const ASKTBL[] = {
+const char *const _askTBL[] = {
"NONE", "MARSHALL ALEXANDER", "TERRAFORM CORP.", "COLLIER STANTON", "ROCKWELL BACHE",
"JOCQUES SPARROW", "NORA DESMOND ALEXANDER", "GALACTIC PICTURES", "LAWRENCE BARKLEY", "TMS",
"MAC MALDEN", "STANTON EXPEDITION", "LOWELL PERCIVAL", "CHANTAL VARGAS", "RICK LOGAN",
diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h
index 4ffc4de9ab..de195c466e 100644
--- a/engines/access/martian/martian_resources.h
+++ b/engines/access/martian/martian_resources.h
@@ -38,7 +38,7 @@ extern const int SIDEOFFD[];
extern const byte *const CURSORS[4];
-extern const int TRAVEL_POS[][2];
+extern const int _travelPos[][2];
extern const int INVENTORY_SIZE;
extern const char *const INVENTORY_NAMES[];
@@ -60,7 +60,7 @@ extern const byte ICON_DATA[];
extern const int RMOUSE[10][2];
extern byte HELP[];
-extern const char *const ASKTBL[];
+extern const char *const _askTBL[];
extern const char *const TRAVDATA[];
extern const byte DEATH_SCREENS[];
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index 207f48db8b..41dd5cc0d0 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -205,7 +205,7 @@ void Scripts::printWatch() {
do {
lastLine = _vm->_fonts._font2.getLine(msg, _vm->_screen->_maxChars * 6, line, width);
// Draw the text
- _vm->_bubbleBox->PRINTSTR(line);
+ _vm->_bubbleBox->printString(line);
_vm->_screen->_printOrg.y += 6;
_vm->_screen->_printOrg.x = _vm->_screen->_printStart.x;
@@ -541,7 +541,7 @@ void Scripts::cmdDispInv_v2() {
void Scripts::cmdSetAbout() {
int idx = _data->readByte();
int val = _data->readByte();
- _vm->ASK[idx] = val;
+ _vm->_ask[idx] = val;
_vm->_startAboutBox = _vm->_startAboutItem = 0;
}
@@ -586,8 +586,8 @@ void Scripts::cmdCheckTimer() {
void Scripts::cmdSetTravel() {
int idx = _data->readByte();
int dest = _data->readByte();
- _vm->TRAVEL[idx] = dest;
- _vm->STARTTRAVELITEM = _vm->STARTTRAVELBOX = 0;
+ _vm->_travel[idx] = dest;
+ _vm->_startTravelItem = _vm->_startTravelBox = 0;
}
void Scripts::cmdJumpGoto() {
@@ -676,11 +676,11 @@ void Scripts::cmdRemoveLast() {
void Scripts::cmdDoTravel() {
while (true) {
- _vm->_travelBox->getList(Martian::TRAVDATA, _vm->TRAVEL);
+ _vm->_travelBox->getList(Martian::TRAVDATA, _vm->_travel);
int btnSelected = 0;
- int boxX = _vm->_travelBox->doBox_v1(_vm->STARTTRAVELITEM, _vm->STARTTRAVELBOX, btnSelected);
- _vm->STARTTRAVELITEM = _vm->BOXDATASTART;
- _vm->STARTTRAVELBOX = _vm->BOXSELECTY;
+ int boxX = _vm->_travelBox->doBox_v1(_vm->_startTravelItem, _vm->_startTravelBox, btnSelected);
+ _vm->_startTravelItem = _vm->_boxDataStart;
+ _vm->_startTravelBox = _vm->_boxSelectY;
if (boxX == -1)
btnSelected = 2;
@@ -688,20 +688,20 @@ void Scripts::cmdDoTravel() {
if (btnSelected != 2) {
int idx = _vm->_travelBox->_tempListIdx[boxX];
if (Martian::_byte1EEB5[idx] != _vm->_byte26CB5) {
- _vm->_bubbleBox->_bubbleTitle = "TRAVEL";
- _vm->_bubbleBox->PRINTSTR("YOU CAN'T GET THERE FROM HERE.");
+ _vm->_bubbleBox->_bubbleTitle = "_travel";
+ _vm->_bubbleBox->printString("YOU CAN'T GET THERE FROM HERE.");
continue;
}
if (_vm->_player->_roomNumber != idx) {
_vm->_player->_roomNumber = idx;
_vm->_room->_function = FN_CLEAR1;
- if (Martian::TRAVEL_POS[idx][0] == -1) {
+ if (Martian::_travelPos[idx][0] == -1) {
_vm->_player->_roomNumber = idx;
_vm->_room->_conFlag = true;
- _vm->_scripts->converse1(Martian::TRAVEL_POS[idx][1]);
+ _vm->_scripts->converse1(Martian::_travelPos[idx][1]);
return;
}
- _vm->_player->_rawPlayer = Common::Point(Martian::TRAVEL_POS[idx][0], Martian::TRAVEL_POS[idx][1]);
+ _vm->_player->_rawPlayer = Common::Point(Martian::_travelPos[idx][0], Martian::_travelPos[idx][1]);
cmdRetPos();
return;
}
@@ -746,7 +746,7 @@ void Scripts::cmdCheckAbout() {
int idx = _data->readSint16LE();
int val = _data->readSint16LE();
- if (_vm->ASK[idx] == val)
+ if (_vm->_ask[idx] == val)
cmdGoto();
else
_data->skip(2);
@@ -1033,11 +1033,11 @@ void Scripts::cmdPrintWatch() {
}
void Scripts::cmdDispAbout() {
- _vm->_travelBox->getList(Martian::ASKTBL, _vm->ASK);
+ _vm->_travelBox->getList(Martian::_askTBL, _vm->_ask);
int btnSelected = 0;
int boxX = _vm->_aboutBox->doBox_v1(_vm->_startAboutItem, _vm->_startAboutBox, btnSelected);
- _vm->_startAboutItem = _vm->BOXDATASTART;
- _vm->_startAboutBox = _vm->BOXSELECTY;
+ _vm->_startAboutItem = _vm->_boxDataStart;
+ _vm->_startAboutBox = _vm->_boxSelectY;
if (boxX == -1)
btnSelected = 2;
@@ -1056,7 +1056,7 @@ void Scripts::cmdCheckTravel() {
int idx = _data->readSint16LE();
int val = _data->readUint16LE();
- if (_vm->TRAVEL[idx] == val)
+ if (_vm->_travel[idx] == val)
cmdGoto();
else
_data->skip(2);