aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/engine.cpp32
-rw-r--r--engines/lab/lab.cpp4
-rw-r--r--engines/lab/lab.h4
-rw-r--r--engines/lab/savegame.cpp12
4 files changed, 26 insertions, 26 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 91b02af647..8f71dd1296 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -603,7 +603,7 @@ bool LabEngine::processEvent(MessageClass tmpClass, uint16 code, uint16 qualifie
bool LabEngine::processKey(IntuiMessage *curMsg, uint32 msgClass, uint16 &qualifier, Common::Point &curPos, uint16 &curInv, bool &forceDraw, uint16 code) {
if ((getPlatform() == Common::kPlatformWindows) && (code == Common::KEYCODE_b)) {
// Start bread crumbs
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_numCrumbs = 0;
_droppingCrumbs = true;
mayShowCrumbIndicator();
@@ -631,7 +631,7 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 msgClass, uint16 &qualif
_graphics->screenUpdate();
}
} else {
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_droppingCrumbs = false;
// Need to hide indicator!!!!
@@ -788,13 +788,13 @@ void LabEngine::processMainButton(uint16 &curInv, uint16 &lastInv, uint16 &oldDi
_followingCrumbs = false;
_droppingCrumbs = false;
_numCrumbs = 0;
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
} else {
bool intersect = false;
for (int idx = 0; idx < _numCrumbs; idx++) {
- if (_breadCrumbs[idx]._roomNum == _roomNum) {
+ if (_breadCrumbs[idx]._crumbRoomNum == _roomNum) {
_numCrumbs = idx + 1;
- _breadCrumbs[_numCrumbs]._roomNum = 0;
+ _breadCrumbs[_numCrumbs]._crumbRoomNum = 0;
intersect = true;
}
}
@@ -805,8 +805,8 @@ void LabEngine::processMainButton(uint16 &curInv, uint16 &lastInv, uint16 &oldDi
memcpy(&_breadCrumbs[0], &_breadCrumbs[1], _numCrumbs * sizeof _breadCrumbs[0]);
}
- _breadCrumbs[_numCrumbs]._roomNum = _roomNum;
- _breadCrumbs[_numCrumbs++]._direction = _direction;
+ _breadCrumbs[_numCrumbs]._crumbRoomNum = _roomNum;
+ _breadCrumbs[_numCrumbs++]._crumbDirection = _direction;
}
}
}
@@ -905,7 +905,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI
break;
case kButtonBreadCrumbs:
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_numCrumbs = 0;
_droppingCrumbs = true;
mayShowCrumbIndicator();
@@ -930,7 +930,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI
_graphics->drawPanel();
drawRoomMessage(curInv, _closeDataPtr);
} else {
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_droppingCrumbs = false;
// Need to hide indicator!!!!
@@ -1056,12 +1056,12 @@ MainButton LabEngine::followCrumbs() {
}
if (!_isCrumbTurning)
- _breadCrumbs[_numCrumbs--]._roomNum = 0;
+ _breadCrumbs[_numCrumbs--]._crumbRoomNum = 0;
// Is the current crumb this room? If not, logic error.
- if (_roomNum != _breadCrumbs[_numCrumbs]._roomNum) {
+ if (_roomNum != _breadCrumbs[_numCrumbs]._crumbRoomNum) {
_numCrumbs = 0;
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_droppingCrumbs = false;
_followingCrumbs = false;
return kButtonNone;
@@ -1069,11 +1069,11 @@ MainButton LabEngine::followCrumbs() {
Direction exitDir;
// which direction is last crumb
- if (_breadCrumbs[_numCrumbs]._direction == kDirectionEast)
+ if (_breadCrumbs[_numCrumbs]._crumbDirection == kDirectionEast)
exitDir = kDirectionWest;
- else if (_breadCrumbs[_numCrumbs]._direction == kDirectionWest)
+ else if (_breadCrumbs[_numCrumbs]._crumbDirection == kDirectionWest)
exitDir = kDirectionEast;
- else if (_breadCrumbs[_numCrumbs]._direction == kDirectionNorth)
+ else if (_breadCrumbs[_numCrumbs]._crumbDirection == kDirectionNorth)
exitDir = kDirectionSouth;
else
exitDir = kDirectionNorth;
@@ -1082,7 +1082,7 @@ MainButton LabEngine::followCrumbs() {
if (_numCrumbs == 0) {
_isCrumbTurning = false;
- _breadCrumbs[0]._roomNum = 0;
+ _breadCrumbs[0]._crumbRoomNum = 0;
_droppingCrumbs = false;
_followingCrumbs = false;
} else {
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 03ef06e614..0ecfc99d29 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -55,8 +55,8 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc)
_isHiRes = false;
_roomNum = -1;
for (int i = 0; i < MAX_CRUMBS; i++) {
- _breadCrumbs[i]._roomNum = 0;
- _breadCrumbs[i]._direction = kDirectionNorth;
+ _breadCrumbs[i]._crumbRoomNum = 0;
+ _breadCrumbs[i]._crumbDirection = kDirectionNorth;
}
_numCrumbs = 0;
diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index 4aa4e66135..f171e3301f 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -81,8 +81,8 @@ enum GameFeatures {
typedef Common::List<Button *> ButtonList;
struct CrumbData {
- uint16 _roomNum;
- uint16 _direction;
+ uint16 _crumbRoomNum;
+ uint16 _crumbDirection;
};
#define MAX_CRUMBS 128
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index d815929c39..c259740e1b 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -149,8 +149,8 @@ bool LabEngine::saveGame(int slot, const Common::String desc) {
// Breadcrumbs
for (uint i = 0; i < MAX_CRUMBS; i++) {
- file->writeUint16LE(_breadCrumbs[i]._roomNum);
- file->writeUint16LE(_breadCrumbs[i]._direction);
+ file->writeUint16LE(_breadCrumbs[i]._crumbRoomNum);
+ file->writeUint16LE(_breadCrumbs[i]._crumbDirection);
}
file->flush();
@@ -186,15 +186,15 @@ bool LabEngine::loadGame(int slot) {
// Breadcrumbs
for (int i = 0; i < MAX_CRUMBS; i++) {
- _breadCrumbs[i]._roomNum = file->readUint16LE();
- _breadCrumbs[i]._direction = file->readUint16LE();
+ _breadCrumbs[i]._crumbRoomNum = file->readUint16LE();
+ _breadCrumbs[i]._crumbDirection = file->readUint16LE();
}
- _droppingCrumbs = (_breadCrumbs[0]._roomNum != 0);
+ _droppingCrumbs = (_breadCrumbs[0]._crumbRoomNum != 0);
_followingCrumbs = false;
for (int i = 0; i < MAX_CRUMBS; i++) {
- if (_breadCrumbs[i]._roomNum == 0)
+ if (_breadCrumbs[i]._crumbRoomNum == 0)
break;
_numCrumbs = i;
}