aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-03-01 23:46:24 +0100
committerStrangerke2013-03-01 23:46:24 +0100
commit167aa598d86b5fa6990b92175c43f68ed95e6385 (patch)
treeb289f892099c931d358970f4d340df5148fffa3f
parentd7ea7ca378b62d2809ae5f56c031c8ea7f31de96 (diff)
downloadscummvm-rg350-167aa598d86b5fa6990b92175c43f68ed95e6385.tar.gz
scummvm-rg350-167aa598d86b5fa6990b92175c43f68ed95e6385.tar.bz2
scummvm-rg350-167aa598d86b5fa6990b92175c43f68ed95e6385.zip
HOPKINS: More renaming in savegame structure
-rw-r--r--engines/hopkins/globals.h36
-rw-r--r--engines/hopkins/hopkins.cpp53
-rw-r--r--engines/hopkins/objects.cpp16
-rw-r--r--engines/hopkins/script.cpp24
4 files changed, 67 insertions, 62 deletions
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 8c9662cdff..8004ad0498 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -140,44 +140,44 @@ enum SauvegardeOffset {
, svGameWonFl = 135
, svCinemaCurtainCond1 = 166
, svCinemaCurtainCond2 = 167
- , svField170 = 170
- , svField171 = 171
- , svField172 = 172
+ , svBankAttackAnimPlayedFl = 170
+ , svCopCall1PlayedFl = 171
+ , svCopCall2PlayedFl = 172
, svField173 = 173
- , svUseless176 = 176
- , svField177 = 177
- , svField181 = 181
+ , svField176 = 176
+ , svPoolDogGoneFl = 177
+ , svCinemaDogGoneFl = 181
, svField183 = 183
, svField184 = 184
, svField186 = 186
, svField188 = 188
, svField200 = 200
, svField214 = 214
- , svField220 = 220
- , svField225 = 225
+ , svBombBoxOpenedFl = 220
+ , svBombDisarmedFl = 225
, svField228 = 228
, svField231 = 231
, svField253 = 253
, svField261 = 261
, svField270 = 270
, svField300 = 300
- , svField311 = 311
- , svField312 = 312
- , svField318 = 318
- , svUseless320 = 320
- , svField330 = 330
+ , svBaseElevatorCond1 = 311
+ , svBaseFireFl = 312
+ , svSecondElevatorAvailableFl = 318
+ , svField320 = 320
+ , svEscapeLeftJailFl = 330
, svField333 = 333
- , svUseless338 = 338
- , svUseless339 = 339
- , svUseless340 = 340
+ , svField338 = 338
+ , svField339 = 339
+ , svField340 = 340
, svField341 = 341
- , svUseless352 = 352
+ , svField352 = 352
, svField353 = 353
, svField354 = 354
, svField355 = 355
, svField356 = 356
, svField357 = 357
- , svUseless399 = 399
+ , svField399 = 399
, svField401 = 401
};
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 7fd9936111..dab9738742 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -183,7 +183,7 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 3:
- if (!_globals._saveData->_data[svField170]) {
+ if (!_globals._saveData->_data[svBankAttackAnimPlayedFl]) {
_soundManager.playSound(3);
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
_graphicsManager.loadImage("fond");
@@ -214,7 +214,7 @@ bool HopkinsEngine::runWin95Demo() {
_soundManager.removeSample(3);
_soundManager.removeSample(4);
_graphicsManager.fadeOutLong();
- _globals._saveData->_data[svField170] = 1;
+ _globals._saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
_linesManager.setMaxLineIdx(5);
_globals._characterMaxPosY = 450;
@@ -246,7 +246,7 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 7:
- if (_globals._saveData->_data[svField220])
+ if (_globals._saveData->_data[svBombBoxOpenedFl])
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
else
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
@@ -261,7 +261,7 @@ bool HopkinsEngine::runWin95Demo() {
case 9:
_globals._characterMaxPosY = 440;
_linesManager.setMaxLineIdx(20);
- if (_globals._saveData->_data[svField225])
+ if (_globals._saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
else
bombExplosion();
@@ -280,7 +280,7 @@ bool HopkinsEngine::runWin95Demo() {
case 12:
_globals._characterMaxPosY = 450;
_linesManager.setMaxLineIdx(20);
- if (_globals._saveData->_data[svField225]) {
+ if (_globals._saveData->_data[svBombDisarmedFl]) {
if (_globals._language == LANG_FR)
_graphicsManager.loadImage("ENDFR");
else
@@ -292,8 +292,8 @@ bool HopkinsEngine::runWin95Demo() {
while (_eventsManager.getMouseButton() != 1);
_graphicsManager.fadeOutLong();
restoreSystem();
- }
- bombExplosion();
+ } else
+ bombExplosion();
break;
case 13:
@@ -488,7 +488,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 3:
- if (!_globals._saveData->_data[svField170]) {
+ if (!_globals._saveData->_data[svBankAttackAnimPlayedFl]) {
_soundManager.playSound(3);
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
_graphicsManager.loadImage("fond");
@@ -521,7 +521,7 @@ bool HopkinsEngine::runLinuxDemo() {
_soundManager.removeSample(2);
_soundManager.removeSample(3);
_soundManager.removeSample(4);
- _globals._saveData->_data[svField170] = 1;
+ _globals._saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
_linesManager.setMaxLineIdx(5);
@@ -551,7 +551,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 7:
- if (_globals._saveData->_data[svField220])
+ if (_globals._saveData->_data[svBombBoxOpenedFl])
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
else
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
@@ -567,10 +567,10 @@ bool HopkinsEngine::runLinuxDemo() {
_linesManager.setMaxLineIdx(20);
_globals._characterMaxPosY = 440;
- if (!_globals._saveData->_data[svField225])
+ if (!_globals._saveData->_data[svBombDisarmedFl])
bombExplosion();
-
- _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ else
+ _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
break;
case 10:
@@ -586,7 +586,7 @@ bool HopkinsEngine::runLinuxDemo() {
case 12:
_linesManager.setMaxLineIdx(20);
_globals._characterMaxPosY = 450;
- if (_globals._saveData->_data[svField225])
+ if (_globals._saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
else
bombExplosion();
@@ -819,6 +819,9 @@ bool HopkinsEngine::runFull() {
if (g_system->getEventManager()->shouldQuit())
return false;
+ _globals._exitId = 93;
+ _globals._saveData->_data[svEscapeLeftJailFl] = 0;
+
switch (_globals._exitId) {
case 1:
_linesManager.setMaxLineIdx(40);
@@ -827,7 +830,7 @@ bool HopkinsEngine::runFull() {
break;
case 3:
- if (!_globals._saveData->_data[svField170]) {
+ if (!_globals._saveData->_data[svBankAttackAnimPlayedFl]) {
_soundManager.playSound(3);
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
_graphicsManager.loadImage("fond");
@@ -866,7 +869,7 @@ bool HopkinsEngine::runFull() {
_soundManager.removeSample(4);
if (getPlatform() != Common::kPlatformLinux)
_graphicsManager.fadeOutLong();
- _globals._saveData->_data[svField170] = 1;
+ _globals._saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
_linesManager.setMaxLineIdx(5);
_globals._characterMaxPosY = 450;
@@ -895,7 +898,7 @@ bool HopkinsEngine::runFull() {
break;
case 7:
- if (_globals._saveData->_data[svField220])
+ if (_globals._saveData->_data[svBombBoxOpenedFl])
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
else
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
@@ -910,7 +913,7 @@ bool HopkinsEngine::runFull() {
case 9:
_linesManager.setMaxLineIdx(20);
_globals._characterMaxPosY = 440;
- if (_globals._saveData->_data[svField225])
+ if (_globals._saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
else
bombExplosion();
@@ -929,7 +932,7 @@ bool HopkinsEngine::runFull() {
case 12:
_linesManager.setMaxLineIdx(20);
_globals._characterMaxPosY = 450;
- if (_globals._saveData->_data[svField225])
+ if (_globals._saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
else
bombExplosion();
@@ -1048,7 +1051,7 @@ bool HopkinsEngine::runFull() {
case 24:
_linesManager.setMaxLineIdx(5);
_globals._characterMaxPosY = 450;
- if (_globals._saveData->_data[svField181] == 1)
+ if (_globals._saveData->_data[svCinemaDogGoneFl] == 1)
_objectsManager.PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true);
else
_objectsManager.PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true);
@@ -1075,7 +1078,7 @@ bool HopkinsEngine::runFull() {
case 27:
_linesManager.setMaxLineIdx(15);
_globals._characterMaxPosY = 440;
- if (_globals._saveData->_data[svField177] == 1)
+ if (_globals._saveData->_data[svPoolDogGoneFl] == 1)
_objectsManager.PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true);
else
_objectsManager.PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true);
@@ -1206,7 +1209,7 @@ bool HopkinsEngine::runFull() {
break;
case 61:
- if (_globals._saveData->_data[svField311] == 1 && !_globals._saveData->_data[svField312])
+ if (_globals._saveData->_data[svBaseElevatorCond1] == 1 && !_globals._saveData->_data[svBaseFireFl])
handleConflagration();
_objectsManager.PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false);
break;
@@ -1274,7 +1277,7 @@ bool HopkinsEngine::runFull() {
case 73:
_linesManager.setMaxLineIdx(15);
_globals._characterMaxPosY = 445;
- if (_globals._saveData->_data[svField318] == 1)
+ if (_globals._saveData->_data[svSecondElevatorAvailableFl] == 1)
_objectsManager.PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true);
else
_objectsManager.PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true);
@@ -1347,7 +1350,7 @@ bool HopkinsEngine::runFull() {
case 93:
_linesManager.setMaxLineIdx(5);
_globals._characterMaxPosY = 445;
- if (_globals._saveData->_data[svField330]) {
+ if (_globals._saveData->_data[svEscapeLeftJailFl]) {
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
_objectsManager.PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true);
else
@@ -1961,7 +1964,7 @@ void HopkinsEngine::handleConflagration() {
_graphicsManager.fadeOutLong();
_graphicsManager.endDisplayBob();
- _globals._saveData->_data[svField312] = 1;
+ _globals._saveData->_data[svBaseFireFl] = 1;
_globals._disableInventFl = false;
}
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index e168568974..a0d8810642 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -1777,15 +1777,17 @@ void ObjectsManager::handleCityMap() {
do {
int mouseButton = _vm->_eventsManager.getMouseButton();
if (mouseButton) {
- if (_vm->_globals._saveData->_data[svField170] == 1 && !_vm->_globals._saveData->_data[svField171]) {
- _vm->_globals._saveData->_data[svField171] = 1;
+ // First cop call : Go to the bank and free the hostages
+ if (_vm->_globals._saveData->_data[svBankAttackAnimPlayedFl] == 1 && !_vm->_globals._saveData->_data[svCopCall1PlayedFl]) {
+ _vm->_globals._saveData->_data[svCopCall1PlayedFl] = 1;
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("APPEL1.pe2");
_vm->_globals._introSpeechOffFl = false;
mouseButton = 0;
}
- if (_vm->_globals._saveData->_data[svFreedHostageFl] == 1 && !_vm->_globals._saveData->_data[svField172]) {
- _vm->_globals._saveData->_data[svField172] = 1;
+ // Second cop call: Helico has been found in the empty lot
+ if (_vm->_globals._saveData->_data[svFreedHostageFl] == 1 && !_vm->_globals._saveData->_data[svCopCall2PlayedFl]) {
+ _vm->_globals._saveData->_data[svCopCall2PlayedFl] = 1;
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("APPEL2.pe2");
_vm->_globals._introSpeechOffFl = false;
@@ -3228,7 +3230,7 @@ void ObjectsManager::SPECIAL_INI() {
_vm->_soundManager.mixVoice(383, 4, displayedTxtFl);
_vm->_globals._saveData->_data[svField270] = 1;
_vm->_globals._saveData->_data[svField300] = 1;
- _vm->_globals._saveData->_data[svUseless320] = 1;
+ _vm->_globals._saveData->_data[svField320] = 1;
if (_vm->_soundManager._voiceOffFl) {
for (int i = 0; i <= 199; i++)
_vm->_eventsManager.VBL();
@@ -3281,14 +3283,14 @@ void ObjectsManager::SPECIAL_INI() {
_vm->_linesManager.ZONEP[21]._messageId = 30;
_vm->_linesManager.ZONEP[22]._messageId = 30;
_vm->_linesManager.ZONEP[23]._messageId = 30;
- for (int i = 200; i <= 214; i++) {
+ for (int i = svField200; i <= svField214; i++) {
if (_vm->_globals._saveData->_data[i] != 2)
_vm->_globals._saveData->_data[i] = 0;
}
break;
case 73:
- if (!_vm->_globals._saveData->_data[svField318]) {
+ if (!_vm->_globals._saveData->_data[svSecondElevatorAvailableFl]) {
_vm->_globals.resetHidingUseCount(0);
_vm->_globals.resetHidingUseCount(1);
}
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index cb3067bcb1..563ce94c2d 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -955,7 +955,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 58:
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("Gm1.PE2");
- _vm->_globals._saveData->_data[svUseless176] = 1;
+ _vm->_globals._saveData->_data[svField176] = 1;
_vm->_globals._saveData->_data[svField270] = 2;
_vm->_globals._introSpeechOffFl = false;
break;
@@ -2069,11 +2069,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->_globals._saveData->_data[svField341] == 3)
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 296, 212, 4);
if (_vm->_globals._saveData->_data[svField341] == 1)
- _vm->_globals._saveData->_data[svUseless338] = 0;
+ _vm->_globals._saveData->_data[svField338] = 0;
if (_vm->_globals._saveData->_data[svField341] == 2)
- _vm->_globals._saveData->_data[svUseless339] = 0;
+ _vm->_globals._saveData->_data[svField339] = 0;
if (_vm->_globals._saveData->_data[svField341] == 3)
- _vm->_globals._saveData->_data[svUseless340] = 0;
+ _vm->_globals._saveData->_data[svField340] = 0;
}
_vm->_soundManager.playSoundFile("SOUND83.WAV");
_vm->_objectsManager.OPTI_ONE(6, 0, 23, 0);
@@ -2099,11 +2099,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->_globals._saveData->_data[svField341] == 3)
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 296, 212, 4);
if (_vm->_globals._saveData->_data[svField341] == 1)
- _vm->_globals._saveData->_data[svUseless338] = 0;
+ _vm->_globals._saveData->_data[svField338] = 0;
if (_vm->_globals._saveData->_data[svField341] == 2)
- _vm->_globals._saveData->_data[svUseless339] = 0;
+ _vm->_globals._saveData->_data[svField339] = 0;
if (_vm->_globals._saveData->_data[svField341] == 3)
- _vm->_globals._saveData->_data[svUseless340] = 0;
+ _vm->_globals._saveData->_data[svField340] = 0;
}
_vm->_soundManager.playSoundFile("SOUND83.WAV");
_vm->_objectsManager.OPTI_ONE(5, 0, 23, 0);
@@ -2129,11 +2129,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->_globals._saveData->_data[svField341] == 3)
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 296, 212, 4);
if (_vm->_globals._saveData->_data[svField341] == 1)
- _vm->_globals._saveData->_data[svUseless338] = 0;
+ _vm->_globals._saveData->_data[svField338] = 0;
if (_vm->_globals._saveData->_data[svField341] == 2)
- _vm->_globals._saveData->_data[svUseless339] = 0;
+ _vm->_globals._saveData->_data[svField339] = 0;
if (_vm->_globals._saveData->_data[svField341] == 3)
- _vm->_globals._saveData->_data[svUseless340] = 0;
+ _vm->_globals._saveData->_data[svField340] = 0;
}
_vm->_soundManager.playSoundFile("SOUND83.WAV");
_vm->_objectsManager.OPTI_ONE(4, 0, 23, 0);
@@ -2191,7 +2191,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
v51->_startSpriteIndex = 57;
v51->_location = 97;
_vm->_globals._saveData->_data[svHopkinsCloneFl] = 1;
- _vm->_globals._saveData->_data[svUseless352] = 1;
+ _vm->_globals._saveData->_data[svField352] = 1;
_vm->_globals._saveData->_data[svField353] = 1;
_vm->_globals._saveData->_data[svField354] = 1;
break;
@@ -2243,7 +2243,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_linesManager.ZONEP[4]._destX = 276;
_vm->_objectsManager.enableVerb(4, 19);
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 285, 379, 0);
- _vm->_globals._saveData->_data[svUseless399] = 1;
+ _vm->_globals._saveData->_data[svField399] = 1;
break;
case 246: