aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-03-24 17:42:18 +0100
committerStrangerke2013-03-24 17:43:16 +0100
commit149bb0ca008fb0d53546ca254cf2071e59a380ae (patch)
treed4598abf81e12597eeccd16d7d07c736e068f4fc /engines/hopkins
parent7d0d498a5661c063f4984fe13fc6dea779b3e156 (diff)
downloadscummvm-rg350-149bb0ca008fb0d53546ca254cf2071e59a380ae.tar.gz
scummvm-rg350-149bb0ca008fb0d53546ca254cf2071e59a380ae.tar.bz2
scummvm-rg350-149bb0ca008fb0d53546ca254cf2071e59a380ae.zip
HOPKINS: Move counter to LinesManager, rename it to follow coding conventions
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/globals.cpp1
-rw-r--r--engines/hopkins/globals.h1
-rw-r--r--engines/hopkins/lines.cpp11
-rw-r--r--engines/hopkins/lines.h1
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index db7dca7c7f..79edddc40d 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -170,7 +170,6 @@ Globals::Globals(HopkinsEngine *vm) {
_oldZoneNum = 0;
_oldMouseX = 0;
_oldMouseY = 0;
- compteur_71 = 0;
_forceHideText = false;
}
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index e74324978e..84549fa4ff 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -311,7 +311,6 @@ public:
ListeItem Liste2[35];
BankItem Bank[8];
VBobItem VBob[30];
- int compteur_71;
Globals(HopkinsEngine *vm);
~Globals();
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 8763fd1696..f47a444427 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -74,6 +74,7 @@ LinesManager::LinesManager(HopkinsEngine *vm) {
_route = (RouteItem *)g_PTRNUL;
_currentSegmentId = 0;
_largeBuf = g_PTRNUL;
+ _zoneSkipCount = 0;
}
LinesManager::~LinesManager() {
@@ -2822,19 +2823,19 @@ void LinesManager::checkZone() {
_vm->_objectsManager->_visibleFl = true;
}
if (_vm->_objectsManager->_forceZoneFl) {
- _vm->_globals->compteur_71 = 100;
+ _zoneSkipCount = 100;
_vm->_globals->_oldMouseZoneId = -1;
_vm->_globals->_oldMouseX = -200;
_vm->_globals->_oldMouseY = -220;
_vm->_objectsManager->_forceZoneFl = false;
}
- _vm->_globals->compteur_71++;
- if (_vm->_globals->compteur_71 <= 1)
+ _zoneSkipCount++;
+ if (_zoneSkipCount <= 1)
return;
- if (_vm->_globals->_freezeCharacterFl || (_route == (RouteItem *)g_PTRNUL) || _vm->_globals->compteur_71 > 4) {
- _vm->_globals->compteur_71 = 0;
+ if (_vm->_globals->_freezeCharacterFl || (_route == (RouteItem *)g_PTRNUL) || _zoneSkipCount > 4) {
+ _zoneSkipCount = 0;
int zoneId;
if (_vm->_globals->_oldMouseX != mouseX || _vm->_globals->_oldMouseY != oldMouseY) {
zoneId = getMouseZone();
diff --git a/engines/hopkins/lines.h b/engines/hopkins/lines.h
index 79dde89f6a..2d0b3b0fad 100644
--- a/engines/hopkins/lines.h
+++ b/engines/hopkins/lines.h
@@ -128,6 +128,7 @@ private:
int16 *_lineBuf;
LigneItem _lineItem[400];
RouteItem _bestRoute[8001];
+ int _zoneSkipCount;
int checkInventoryHotspotsRow(int posX, int minZoneNum, bool lastRow);
void removeZoneLine(int idx);