aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-03-17 17:41:10 -0400
committerPaul Gilbert2013-03-17 17:41:10 -0400
commitdf8be4ef0ab9a811a5663caed3a9810e135022a9 (patch)
tree7bfa39db911946ad6f1d27e17b49bc4a979a839e
parentb984629d8a9149b2839bcfdb21ebebf9e09c4622 (diff)
downloadscummvm-rg350-df8be4ef0ab9a811a5663caed3a9810e135022a9.tar.gz
scummvm-rg350-df8be4ef0ab9a811a5663caed3a9810e135022a9.tar.bz2
scummvm-rg350-df8be4ef0ab9a811a5663caed3a9810e135022a9.zip
HOPKINS: More field renamings
-rw-r--r--engines/hopkins/globals.cpp4
-rw-r--r--engines/hopkins/globals.h2
-rw-r--r--engines/hopkins/lines.cpp2
-rw-r--r--engines/hopkins/objects.cpp88
-rw-r--r--engines/hopkins/objects.h6
-rw-r--r--engines/hopkins/talk.cpp12
6 files changed, 57 insertions, 57 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index a05d580257..acb1c31b1e 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -292,7 +292,7 @@ void Globals::initAnimBqe() {
void Globals::initVBob() {
for (int idx = 0; idx < 30; ++idx) {
- VBob[idx].field4 = 0;
+ VBob[idx]._displayMode = 0;
VBob[idx]._xp = 0;
VBob[idx]._yp = 0;
VBob[idx]._frameIndex = 0;
@@ -304,7 +304,7 @@ void Globals::initVBob() {
void Globals::clearVBob() {
for (int idx = 0; idx < 30; ++idx) {
- VBob[idx].field4 = 0;
+ VBob[idx]._displayMode = 0;
VBob[idx]._xp = 0;
VBob[idx]._yp = 0;
VBob[idx]._frameIndex = 0;
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 608680e9ea..55341e261f 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -57,7 +57,7 @@ struct LockAnimItem {
struct VBobItem {
byte *_spriteData;
- int field4;
+ int _displayMode;
int _xp;
int _yp;
int _frameIndex;
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index e23c53ff18..050fddc422 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -2532,7 +2532,7 @@ int LinesManager::getMouseZone() {
if ((_vm->_eventsManager._mousePos.y + _vm->_eventsManager._mouseOffset.y) > 19) {
for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) {
int bobId = BOBZONE[bobZoneId];
- if (bobId && BOBZONE_FLAG[bobZoneId] && _vm->_objectsManager._bob[bobId].field0 && _vm->_objectsManager._bob[bobId]._frameIndex != 250 &&
+ if (bobId && BOBZONE_FLAG[bobZoneId] && _vm->_objectsManager._bob[bobId]._bobMode && _vm->_objectsManager._bob[bobId]._frameIndex != 250 &&
!_vm->_objectsManager._bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager._bob[bobId]._oldX &&
xp < _vm->_objectsManager._bob[bobId]._oldWidth + _vm->_objectsManager._bob[bobId]._oldX && yp > _vm->_objectsManager._bob[bobId]._oldY) {
if (yp < _vm->_objectsManager._bob[bobId]._oldHeight + _vm->_objectsManager._bob[bobId]._oldY) {
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 6c87812411..d9dac0af3c 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -498,7 +498,7 @@ void ObjectsManager::resetBob(int idx) {
BobItem &bob = _bob[idx];
ListeItem &item = _vm->_globals.Liste2[idx];
- bob.field0 = 0;
+ bob._bobMode = 0;
bob._spriteData = g_PTRNUL;
bob._xp = 0;
bob._yp = 0;
@@ -508,8 +508,8 @@ void ObjectsManager::resetBob(int idx) {
bob._moveChange2 = 0;
bob._disabledAnimationFl = false;
bob._animData = g_PTRNUL;
- bob.field1C = false;
- bob.field1E = 0;
+ bob._bobMode10 = false;
+ bob._bobModeChange = 0;
bob.field20 = 0;
bob.field22 = 0;
bob.field34 = false;
@@ -577,7 +577,7 @@ void ObjectsManager::setBobInfo(int idx) {
void ObjectsManager::displayBob(int idx) {
_priorityFl = true;
- if (_bob[idx].field0)
+ if (_bob[idx]._bobMode)
return;
resetBob(idx);
@@ -609,17 +609,17 @@ void ObjectsManager::displayBob(int idx) {
}
_bob[idx]._animData = _vm->_globals._animBqe[idx]._data;
- _bob[idx].field0 = 10;
+ _bob[idx]._bobMode = 10;
_bob[idx]._spriteData = _vm->_globals.Bank[bankIdx]._data;
- _bob[idx].field1E = v9;
+ _bob[idx]._bobModeChange = v9;
_bob[idx].field20 = v6;
_bob[idx].field22 = v8;
}
void ObjectsManager::hideBob(int idx) {
- if ((_bob[idx].field0 == 3) || (_bob[idx].field0 == 10))
- _bob[idx].field0++;
+ if ((_bob[idx]._bobMode == 3) || (_bob[idx]._bobMode == 10))
+ _bob[idx]._bobMode++;
}
void ObjectsManager::setBobOffset(int idx, int offset) {
@@ -632,7 +632,7 @@ void ObjectsManager::SCBOB(int idx) {
return;
for (int i = 0; i <= 20; i++) {
- if ((_bob[i].field0) && (!_bob[i]._disabledAnimationFl) && (!_bob[i].field34) && (_bob[i]._frameIndex != 250)) {
+ if ((_bob[i]._bobMode) && (!_bob[i]._disabledAnimationFl) && (!_bob[i].field34) && (_bob[i]._frameIndex != 250)) {
int oldRight = _bob[i]._oldX + _bob[i]._oldWidth;
int oldBottom = _bob[i]._oldY + _bob[i]._oldHeight;
int cachedRight = hid->_width + hid->_x;
@@ -921,30 +921,30 @@ void ObjectsManager::beforeSort(SortMode sortMode, int index, int priority) {
void ObjectsManager::displayBobAnim() {
for (int idx = 1; idx <= 35; idx++) {
if (idx <= 20 && PERSO_ON) {
- _bob[idx].field1C = false;
+ _bob[idx]._bobMode10 = false;
continue;
}
- if (_bob[idx].field0 != 10)
+ if (_bob[idx]._bobMode != 10)
continue;
- _bob[idx].field1C = false;
+ _bob[idx]._bobMode10 = false;
if (_bob[idx]._animData == g_PTRNUL || _bob[idx]._disabledAnimationFl || _bob[idx].field20 == 0 || _bob[idx].field20 < -1) {
- if (_bob[idx].field1E == 1 || _bob[idx].field1E == 2)
- _bob[idx].field1C = true;
+ if (_bob[idx]._bobModeChange == 1 || _bob[idx]._bobModeChange == 2)
+ _bob[idx]._bobMode10 = true;
continue;
}
if (_bob[idx]._moveChange1 == _bob[idx]._moveChange2) {
- _bob[idx].field1C = true;
+ _bob[idx]._bobMode10 = true;
} else {
_bob[idx]._moveChange2++;
- _bob[idx].field1C = false;
+ _bob[idx]._bobMode10 = false;
}
- if (!_bob[idx].field1C) {
- if (_bob[idx].field1E == 1 || _bob[idx].field1E == 2)
- _bob[idx].field1C = true;
+ if (!_bob[idx]._bobMode10) {
+ if (_bob[idx]._bobModeChange == 1 || _bob[idx]._bobModeChange == 2)
+ _bob[idx]._bobMode10 = true;
continue;
}
@@ -967,8 +967,8 @@ void ObjectsManager::displayBobAnim() {
_bob[idx]._moveChange1 /= _vm->_globals._speed;
if (_bob[idx]._moveChange1 > 0) {
_bob[idx]._moveChange2 = 1;
- if (_bob[idx].field1E == 1 || _bob[idx].field1E == 2)
- _bob[idx].field1C = true;
+ if (_bob[idx]._bobModeChange == 1 || _bob[idx]._bobModeChange == 2)
+ _bob[idx]._bobMode10 = true;
continue;
}
@@ -978,7 +978,7 @@ void ObjectsManager::displayBobAnim() {
if (_bob[idx].field20 > 0)
_bob[idx].field20--;
if (_bob[idx].field20 != -1 && _bob[idx].field20 <= 0) {
- _bob[idx].field0 = 11;
+ _bob[idx]._bobMode = 11;
} else {
_bob[idx]._animDataIdx = 0;
byte *bobData = _bob[idx]._animData + 20;
@@ -1006,14 +1006,14 @@ void ObjectsManager::displayBobAnim() {
}
_bob[idx]._moveChange2 = 1;
- if (_bob[idx].field1E == 1 || _bob[idx].field1E == 2)
- _bob[idx].field1C = true;
+ if (_bob[idx]._bobModeChange == 1 || _bob[idx]._bobModeChange == 2)
+ _bob[idx]._bobMode10 = true;
}
if (!PERSO_ON && BOBTOUS) {
for (int i = 0; i < 35; i++) {
- if (_bob[i].field0 == 10 && !_bob[i]._disabledAnimationFl)
- _bob[i].field1C = true;
+ if (_bob[i]._bobMode == 10 && !_bob[i]._disabledAnimationFl)
+ _bob[i]._bobMode10 = true;
}
}
@@ -1021,8 +1021,8 @@ void ObjectsManager::displayBobAnim() {
for (int i = 1; i <= 35; i++) {
if (i > 20 || !PERSO_ON) {
- if ((_bob[i].field0 == 10) && (_bob[i].field1C)) {
- if ((_bob[i].field1E != 2) && (_bob[i].field1E != 4)) {
+ if ((_bob[i]._bobMode == 10) && (_bob[i]._bobMode10)) {
+ if ((_bob[i]._bobModeChange != 2) && (_bob[i]._bobModeChange != 4)) {
if (_vm->_globals.Liste2[i]._visibleFl) {
_vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen,
_vm->_globals.Liste2[i]._posX, _vm->_globals.Liste2[i]._posY,
@@ -1034,7 +1034,7 @@ void ObjectsManager::displayBobAnim() {
}
}
- if (_bob[i].field0 == 11) {
+ if (_bob[i]._bobMode == 11) {
if (_vm->_globals.Liste2[i]._visibleFl) {
_vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen,
_vm->_globals.Liste2[i]._posX, _vm->_globals.Liste2[i]._posY,
@@ -1044,14 +1044,14 @@ void ObjectsManager::displayBobAnim() {
_vm->_globals.Liste2[i]._visibleFl = false;
}
- _bob[i].field0 = 0;
+ _bob[i]._bobMode = 0;
}
}
}
for (int i = 1; i <= 35; i++) {
_bob[i]._oldY = 0;
- if (_bob[i].field0 == 10 && !_bob[i]._disabledAnimationFl && _bob[i].field1C) {
+ if (_bob[i]._bobMode == 10 && !_bob[i]._disabledAnimationFl && _bob[i]._bobMode10) {
CALCUL_BOB(i);
int priority = _bob[i]._oldX2 + _bob[i]._oldHeight + _bob[i]._oldY;
@@ -1070,7 +1070,7 @@ void ObjectsManager::displayVBob() {
for (int idx = 0; idx <= 29; idx++) {
VBobItem *vbob = &_vm->_globals.VBob[idx];
- if (vbob->field4 == 4) {
+ if (vbob->_displayMode == 4) {
width = getWidth(vbob->_spriteData, vbob->_frameIndex);
height = getHeight(vbob->_spriteData, vbob->_frameIndex);
@@ -1083,7 +1083,7 @@ void ObjectsManager::displayVBob() {
_vm->_graphicsManager.addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp);
vbob->_surface = _vm->_globals.freeMemory(vbob->_surface);
- vbob->field4 = 0;
+ vbob->_displayMode = 0;
vbob->_spriteData = g_PTRNUL;
vbob->_xp = 0;
vbob->_yp = 0;
@@ -1094,7 +1094,7 @@ void ObjectsManager::displayVBob() {
vbob->_oldSpriteData = g_PTRNUL;
}
- if (vbob->field4 == 3) {
+ if (vbob->_displayMode == 3) {
width = getWidth(vbob->_oldSpriteData, vbob->_oldFrameIndex);
height = getHeight(vbob->_oldSpriteData, vbob->_oldFrameIndex);
@@ -1106,7 +1106,7 @@ void ObjectsManager::displayVBob() {
_vm->_graphicsManager.addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height);
- vbob->field4 = 1;
+ vbob->_displayMode = 1;
vbob->_oldSpriteData = vbob->_spriteData;
vbob->_surface = _vm->_globals.freeMemory(vbob->_surface);
@@ -1116,7 +1116,7 @@ void ObjectsManager::displayVBob() {
vbob->_oldFrameIndex = vbob->_frameIndex;
}
- if (vbob->field4 == 1) {
+ if (vbob->_displayMode == 1) {
width = getWidth(vbob->_spriteData, vbob->_frameIndex);
height = getHeight(vbob->_spriteData, vbob->_frameIndex);
@@ -1143,7 +1143,7 @@ void ObjectsManager::displayVBob() {
}
_vm->_graphicsManager.addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height);
- vbob->field4 = 2;
+ vbob->_displayMode = 2;
}
}
}
@@ -2709,8 +2709,8 @@ void ObjectsManager::VBOB(byte *src, int idx, int xp, int yp, int frameIndex) {
error("MAX_VBOB exceeded");
VBobItem *vbob = &_vm->_globals.VBob[idx];
- if (vbob->field4 <= 1) {
- vbob->field4 = 1;
+ if (vbob->_displayMode <= 1) {
+ vbob->_displayMode = 1;
vbob->_xp = xp;
vbob->_yp = yp;
vbob->_frameIndex = frameIndex;
@@ -2720,8 +2720,8 @@ void ObjectsManager::VBOB(byte *src, int idx, int xp, int yp, int frameIndex) {
vbob->_spriteData = src;
vbob->_oldSpriteData = src;
vbob->_surface = _vm->_globals.freeMemory(vbob->_surface);
- } else if (vbob->field4 == 2 || vbob->field4 == 4) {
- vbob->field4 = 3;
+ } else if (vbob->_displayMode == 2 || vbob->_displayMode == 4) {
+ vbob->_displayMode = 3;
vbob->_oldX = vbob->_xp;
vbob->_oldY = vbob->_yp;
vbob->_oldSpriteData = vbob->_spriteData;
@@ -2738,10 +2738,10 @@ void ObjectsManager::VBOB_OFF(int idx) {
error("MAX_VBOB exceeded");
VBobItem *vbob = &_vm->_globals.VBob[idx];
- if (vbob->field4 <= 1)
- vbob->field4 = 0;
+ if (vbob->_displayMode <= 1)
+ vbob->_displayMode = 0;
else
- vbob->field4 = 4;
+ vbob->_displayMode = 4;
}
void ObjectsManager::doActionBack(int idx) {
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index 6510f98d60..3967b50847 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -52,7 +52,7 @@ struct SpriteItem {
};
struct BobItem {
- int field0;
+ int _bobMode;
byte *_spriteData;
int _xp;
int _yp;
@@ -62,8 +62,8 @@ struct BobItem {
int _moveChange2;
bool _disabledAnimationFl;
byte *_animData;
- bool field1C;
- int field1E;
+ bool _bobMode10;
+ int _bobModeChange;
int field20;
int field22;
bool field34; // Set to true in B_CACHE_OFF()
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index e90f0f84aa..2f3174f1f2 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -602,21 +602,21 @@ void TalkManager::VISU_PARLE() {
void TalkManager::BOB_VISU_PARLE(int idx) {
_vm->_objectsManager._priorityFl = true;
- if (!_vm->_objectsManager._bob[idx].field0) {
+ if (!_vm->_objectsManager._bob[idx]._bobMode) {
_vm->_objectsManager.resetBob(idx);
byte *bqeData = _vm->_globals._animBqe[idx]._data;
- int newField1E = READ_LE_INT16(bqeData + 2);
- if (!newField1E)
- newField1E = 1;
+ int newMode = READ_LE_INT16(bqeData + 2);
+ if (!newMode)
+ newMode = 1;
if (READ_LE_INT16(bqeData + 24)) {
_vm->_objectsManager._bob[idx]._isSpriteFl = true;
_vm->_objectsManager._bob[idx]._zoomFactor = 0;
_vm->_objectsManager._bob[idx]._flipFl = false;
_vm->_objectsManager._bob[idx]._animData = _vm->_globals._animBqe[idx]._data;
- _vm->_objectsManager._bob[idx].field0 = 10;
+ _vm->_objectsManager._bob[idx]._bobMode = 10;
bqeData = _characterSprite;
_vm->_objectsManager._bob[idx]._spriteData = _characterSprite;
- _vm->_objectsManager._bob[idx].field1E = newField1E;
+ _vm->_objectsManager._bob[idx]._bobModeChange = newMode;
_vm->_objectsManager._bob[idx].field20 = -1;
_vm->_objectsManager._bob[idx].field22 = 0;
}