aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorEugene Sandulenko2015-12-08 22:00:19 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:58 +0100
commit23bbd70aac37e36f6863da3326704e10fdcfb1a9 (patch)
tree3bea08da2d0aacb985019eb52e3b6bef98b41fa1 /engines/lab
parentc1fc1687fc4fb271871a9c02c4cb3ffe2c00d158 (diff)
downloadscummvm-rg350-23bbd70aac37e36f6863da3326704e10fdcfb1a9.tar.gz
scummvm-rg350-23bbd70aac37e36f6863da3326704e10fdcfb1a9.tar.bz2
scummvm-rg350-23bbd70aac37e36f6863da3326704e10fdcfb1a9.zip
LAB: Reduced variables scope
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/engine.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 57383ec6dd..0b353b521e 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -44,9 +44,6 @@
namespace Lab {
-// Global parser data
-bool ispal = false;
-
// LAB: Labyrinth specific code for the special puzzles
#define SPECIALLOCK 100
#define SPECIALBRICK 101
@@ -89,7 +86,7 @@ static char initcolors[] = { '\x00', '\x00', '\x00', '\x30',
'\x10', '\x14', '\x14', '\x14',
'\x20', '\x20', '\x20', '\x24',
'\x24', '\x24', '\x2c', '\x2c',
- '\x2c', '\x08', '\x08', '\x08'};
+ '\x2c', '\x08', '\x08', '\x08' };
/**
* Draws the message for the room.
@@ -567,10 +564,8 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Comm
uint16 oldDirection = 0;
uint16 lastInv = MAPNUM;
- CloseDataPtr oldcptr, tempcptr, hcptr = nullptr;
- ViewData *vptr;
+ CloseDataPtr hcptr = nullptr;
bool doit;
- uint16 newDir;
_anim->_doBlack = false;
@@ -742,7 +737,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Comm
oldDirection = _direction;
- newDir = processArrow(_direction, gadgetId - 6);
+ uint16 newDir = processArrow(_direction, gadgetId - 6);
doTurn(_direction, newDir, &_cptr);
_anim->_doBlack = true;
_direction = newDir;
@@ -986,7 +981,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Comm
}
} else if (actionMode == 4) {
// Look at closeups
- tempcptr = _cptr;
+ CloseDataPtr tempcptr = _cptr;
setCurClose(curPos, &tempcptr);
if (_cptr == tempcptr) {
@@ -1015,11 +1010,11 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Comm
mayShowCrumbIndicator();
_graphics->screenUpdate();
} else if (msgClass == DELTAMOVE) {
- vptr = getViewData(_roomNum, _direction);
- oldcptr = vptr->_closeUps;
+ ViewData *vptr = getViewData(_roomNum, _direction);
+ CloseDataPtr oldcptr = vptr->_closeUps;
if (hcptr == NULL) {
- tempcptr = _cptr;
+ CloseDataPtr tempcptr = _cptr;
setCurClose(curPos, &tempcptr);
if ((tempcptr == NULL) || (tempcptr == _cptr)) {