mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 09:49:11 +00:00
HOPKINS: More renaming in ObjectsManager
This commit is contained in:
parent
de2fa9a81f
commit
33636f0d63
@ -248,7 +248,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
||||
break;
|
||||
case '6':
|
||||
readText(10);
|
||||
_vm->_globals._saveData->data[svField270] = 4;
|
||||
_vm->_globals._saveData->_data[svField270] = 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -399,9 +399,9 @@ LABEL_7:
|
||||
break;
|
||||
|
||||
_vm->_scriptManager.TRAVAILOBJET = true;
|
||||
_vm->_globals._saveData->data[svField3] = _vm->_globals._curObjectIndex;
|
||||
_vm->_globals._saveData->data[svField8] = _vm->_globals._inventory[newInventoryItem];
|
||||
_vm->_globals._saveData->data[svField9] = _vm->_eventsManager._mouseCursorId;
|
||||
_vm->_globals._saveData->_data[svField3] = _vm->_globals._curObjectIndex;
|
||||
_vm->_globals._saveData->_data[svField8] = _vm->_globals._inventory[newInventoryItem];
|
||||
_vm->_globals._saveData->_data[svField9] = _vm->_eventsManager._mouseCursorId;
|
||||
_vm->_objectsManager.OPTI_OBJET();
|
||||
_vm->_scriptManager.TRAVAILOBJET = false;
|
||||
|
||||
@ -483,20 +483,20 @@ void DialogsManager::inventAnim() {
|
||||
_vm->_objectsManager.I_old_x = newOffset;
|
||||
}
|
||||
|
||||
if (_vm->_globals._saveData->data[svField357] == 1) {
|
||||
if (_vm->_globals._saveData->data[svField353] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField357] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField353] == 1)
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
if (_vm->_globals._saveData->data[svField355] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField355] == 1)
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 866, 325, 1, 0, 0, 0);
|
||||
_vm->_graphicsManager.addVesaSegment(532, 25, 560, 60);
|
||||
_vm->_graphicsManager.addVesaSegment(566, 25, 594, 60);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField356] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.addVesaSegment(532, 25, 560, 60);
|
||||
}
|
||||
|
||||
if (_vm->_globals._saveData->data[svField354] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField354] == 1) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.addVesaSegment(532, 25, 560, 60);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ enum PlayerCharacter { CHARACTER_HOPKINS = 0, CHARACTER_HOPKINS_CLONE = 1, CHARA
|
||||
|
||||
// TODO: Sauvegrade1 fields should really be mapped into data array
|
||||
struct Sauvegarde {
|
||||
byte data[2050];
|
||||
byte _data[2050];
|
||||
CharacterLocation _cloneHopkins;
|
||||
CharacterLocation _realHopkins;
|
||||
CharacterLocation _samantha;
|
||||
|
@ -210,7 +210,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!_globals._saveData->data[svField170]) {
|
||||
if (!_globals._saveData->_data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
|
||||
_graphicsManager.loadImage("fond");
|
||||
@ -241,7 +241,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_soundManager.DEL_SAMPLE(3);
|
||||
_soundManager.DEL_SAMPLE(4);
|
||||
_graphicsManager.fadeOutLong();
|
||||
_globals._saveData->data[svField170] = 1;
|
||||
_globals._saveData->_data[svField170] = 1;
|
||||
}
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
@ -260,8 +260,8 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 455;
|
||||
|
||||
if (_globals._saveData->data[svField80]) {
|
||||
if (_globals._saveData->data[svField80] == 1)
|
||||
if (_globals._saveData->_data[svField80]) {
|
||||
if (_globals._saveData->_data[svField80] == 1)
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
|
||||
} else {
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
|
||||
@ -276,7 +276,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (_globals._saveData->data[svField220])
|
||||
if (_globals._saveData->_data[svField220])
|
||||
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
@ -293,7 +293,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
_globals._maxLineLength = 20;
|
||||
if (_globals._saveData->data[svField225])
|
||||
if (_globals._saveData->_data[svField225])
|
||||
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
|
||||
else
|
||||
bombExplosion();
|
||||
@ -314,7 +314,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
_globals._maxLineLength = 20;
|
||||
if (_globals._saveData->data[svField225]) {
|
||||
if (_globals._saveData->_data[svField225]) {
|
||||
if (_globals._language == LANG_FR)
|
||||
_graphicsManager.loadImage("ENDFR");
|
||||
else
|
||||
@ -366,9 +366,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
case 113:
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 113;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_computerManager.showComputer(COMPUTER_HOPKINS);
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
@ -382,9 +382,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
|
||||
case 114:
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 114;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_globals._exitId = 0;
|
||||
_computerManager.showComputer(COMPUTER_SAMANTHA);
|
||||
_graphicsManager.lockScreen();
|
||||
@ -395,9 +395,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
case 115:
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 115;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_computerManager.showComputer(COMPUTER_PUBLIC);
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
@ -523,7 +523,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!_globals._saveData->data[svField170]) {
|
||||
if (!_globals._saveData->_data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
|
||||
_graphicsManager.loadImage("fond");
|
||||
@ -556,7 +556,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_soundManager.DEL_SAMPLE(2);
|
||||
_soundManager.DEL_SAMPLE(3);
|
||||
_soundManager.DEL_SAMPLE(4);
|
||||
_globals._saveData->data[svField170] = 1;
|
||||
_globals._saveData->_data[svField170] = 1;
|
||||
}
|
||||
|
||||
_globals.Max_Propre = 5;
|
||||
@ -575,7 +575,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 455;
|
||||
if (_globals._saveData->data[svField80] == 1)
|
||||
if (_globals._saveData->_data[svField80] == 1)
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
|
||||
@ -589,7 +589,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (_globals._saveData->data[svField220])
|
||||
if (_globals._saveData->_data[svField220])
|
||||
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
@ -607,7 +607,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals._maxLineLength = 20;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
|
||||
if (!_globals._saveData->data[svField225])
|
||||
if (!_globals._saveData->_data[svField225])
|
||||
bombExplosion();
|
||||
|
||||
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
|
||||
@ -628,7 +628,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals._maxLineLength = 20;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
if (_globals._saveData->data[svField225])
|
||||
if (_globals._saveData->_data[svField225])
|
||||
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
|
||||
else
|
||||
bombExplosion();
|
||||
@ -657,9 +657,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
|
||||
if (_globals._saveData->data[svField113] == 1) {
|
||||
if (_globals._saveData->_data[svField113] == 1) {
|
||||
_objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
|
||||
} else if (!_globals._saveData->data[svField113]) {
|
||||
} else if (!_globals._saveData->_data[svField113]) {
|
||||
_objectsManager.PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true);
|
||||
}
|
||||
break;
|
||||
@ -696,9 +696,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
case 113:
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 113;
|
||||
_globals._saveData->data[svField5] = 113;
|
||||
_globals._saveData->_data[svField5] = 113;
|
||||
_computerManager.showComputer(COMPUTER_HOPKINS);
|
||||
|
||||
_graphicsManager.lockScreen();
|
||||
@ -714,9 +714,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
case 114:
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 114;
|
||||
_globals._saveData->data[svField5] = 114;
|
||||
_globals._saveData->_data[svField5] = 114;
|
||||
_computerManager.showComputer(COMPUTER_SAMANTHA);
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
@ -726,9 +726,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
case 115:
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._saveData->data[svField6] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._screenId;
|
||||
_globals._screenId = 115;
|
||||
_globals._saveData->data[svField5] = 115;
|
||||
_globals._saveData->_data[svField5] = 115;
|
||||
_computerManager.showComputer(COMPUTER_PUBLIC);
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
@ -864,7 +864,7 @@ bool HopkinsEngine::runFull() {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!_globals._saveData->data[svField170]) {
|
||||
if (!_globals._saveData->_data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
|
||||
_graphicsManager.loadImage("fond");
|
||||
@ -902,7 +902,7 @@ bool HopkinsEngine::runFull() {
|
||||
_soundManager.DEL_SAMPLE(4);
|
||||
if (getPlatform() != Common::kPlatformLinux)
|
||||
_graphicsManager.fadeOutLong();
|
||||
_globals._saveData->data[svField170] = 1;
|
||||
_globals._saveData->_data[svField170] = 1;
|
||||
}
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
@ -920,7 +920,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 455;
|
||||
if (_globals._saveData->data[svField80] == 1)
|
||||
if (_globals._saveData->_data[svField80] == 1)
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
|
||||
@ -934,7 +934,7 @@ bool HopkinsEngine::runFull() {
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (_globals._saveData->data[svField220])
|
||||
if (_globals._saveData->_data[svField220])
|
||||
_objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
|
||||
@ -951,7 +951,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals._maxLineLength = 20;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
if (_globals._saveData->data[svField225])
|
||||
if (_globals._saveData->_data[svField225])
|
||||
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
|
||||
else
|
||||
bombExplosion();
|
||||
@ -972,7 +972,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals._maxLineLength = 20;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
if (_globals._saveData->data[svField225])
|
||||
if (_globals._saveData->_data[svField225])
|
||||
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
|
||||
else
|
||||
bombExplosion();
|
||||
@ -1003,7 +1003,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
if (_globals._saveData->data[svField113] == 1)
|
||||
if (_globals._saveData->_data[svField113] == 1)
|
||||
_objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true);
|
||||
@ -1013,9 +1013,9 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 50;
|
||||
_globals._maxLineLength = 40;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
if (_globals._saveData->data[svField117] == 1)
|
||||
if (_globals._saveData->_data[svField117] == 1)
|
||||
_objectsManager.PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true);
|
||||
else if (!_globals._saveData->data[svField117])
|
||||
else if (!_globals._saveData->_data[svField117])
|
||||
_objectsManager.PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true);
|
||||
if (_globals._exitId == 18) {
|
||||
_globals.iRegul = 1;
|
||||
@ -1055,7 +1055,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 50;
|
||||
_globals._maxLineLength = 40;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
if (_globals._saveData->data[svField123])
|
||||
if (_globals._saveData->_data[svField123])
|
||||
_objectsManager.PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true);
|
||||
@ -1101,7 +1101,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
if (_globals._saveData->data[svField181] == 1)
|
||||
if (_globals._saveData->_data[svField181] == 1)
|
||||
_objectsManager.PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true);
|
||||
@ -1131,7 +1131,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 10;
|
||||
_globals._maxLineLength = 15;
|
||||
_globals.Max_Perso_Y = 440;
|
||||
if (_globals._saveData->data[svField177] == 1)
|
||||
if (_globals._saveData->_data[svField177] == 1)
|
||||
_objectsManager.PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true);
|
||||
@ -1141,7 +1141,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 450;
|
||||
if (_globals._saveData->data[svField166] != 1 || _globals._saveData->data[svField167] != 1)
|
||||
if (_globals._saveData->_data[svField166] != 1 || _globals._saveData->_data[svField167] != 1)
|
||||
_objectsManager.PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false);
|
||||
@ -1276,7 +1276,7 @@ bool HopkinsEngine::runFull() {
|
||||
break;
|
||||
|
||||
case 61:
|
||||
if (_globals._saveData->data[svField311] == 1 && !_globals._saveData->data[svField312])
|
||||
if (_globals._saveData->_data[svField311] == 1 && !_globals._saveData->_data[svField312])
|
||||
handleConflagration();
|
||||
_objectsManager.PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false);
|
||||
break;
|
||||
@ -1355,7 +1355,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 15;
|
||||
_globals._maxLineLength = 15;
|
||||
_globals.Max_Perso_Y = 445;
|
||||
if (_globals._saveData->data[svField318] == 1)
|
||||
if (_globals._saveData->_data[svField318] == 1)
|
||||
_objectsManager.PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true);
|
||||
else
|
||||
_objectsManager.PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true);
|
||||
@ -1429,7 +1429,7 @@ bool HopkinsEngine::runFull() {
|
||||
_globals.Max_Propre = 5;
|
||||
_globals._maxLineLength = 5;
|
||||
_globals.Max_Perso_Y = 445;
|
||||
if (_globals._saveData->data[svField330]) {
|
||||
if (_globals._saveData->_data[svField330]) {
|
||||
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
|
||||
_objectsManager.PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true);
|
||||
else
|
||||
@ -1511,8 +1511,8 @@ bool HopkinsEngine::runFull() {
|
||||
case 113:
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._screenId = 113;
|
||||
_globals._saveData->data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_globals._exitId = 0;
|
||||
_computerManager.showComputer(COMPUTER_HOPKINS);
|
||||
_graphicsManager.lockScreen();
|
||||
@ -1529,8 +1529,8 @@ bool HopkinsEngine::runFull() {
|
||||
_globals._exitId = 0;
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._screenId = 114;
|
||||
_globals._saveData->data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_computerManager.showComputer(COMPUTER_SAMANTHA);
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
@ -1540,8 +1540,8 @@ bool HopkinsEngine::runFull() {
|
||||
case 115:
|
||||
_globals._prevScreenId = _globals._screenId;
|
||||
_globals._screenId = 115;
|
||||
_globals._saveData->data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->data[svField5] = _globals._screenId;
|
||||
_globals._saveData->_data[svField6] = _globals._prevScreenId;
|
||||
_globals._saveData->_data[svField5] = _globals._screenId;
|
||||
_globals._exitId = 0;
|
||||
_computerManager.showComputer(COMPUTER_PUBLIC);
|
||||
_graphicsManager.lockScreen();
|
||||
@ -2087,7 +2087,7 @@ void HopkinsEngine::handleConflagration() {
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_globals._saveData->data[svField312] = 1;
|
||||
_globals._saveData->_data[svField312] = 1;
|
||||
_globals._disableInventFl = false;
|
||||
}
|
||||
|
||||
@ -2245,7 +2245,7 @@ void HopkinsEngine::playEnding() {
|
||||
while (_objectsManager.BOBPOSI(7) != 120);
|
||||
|
||||
_objectsManager.stopBobAnimation(7);
|
||||
if (_globals._saveData->data[svField135] == 1) {
|
||||
if (_globals._saveData->_data[svField135] == 1) {
|
||||
_soundManager._specialSoundNum = 200;
|
||||
_soundManager.skipRefreshFl = true;
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
|
@ -830,12 +830,12 @@ void ObjectsManager::computeSprite(int idx) {
|
||||
int zoomPercent = 0;
|
||||
int reducePercent = 0;
|
||||
|
||||
if (_sprite[idx].fieldC < 0) {
|
||||
reducePercent = -_sprite[idx].fieldC;
|
||||
if (_sprite[idx]._zoomfactor < 0) {
|
||||
reducePercent = -_sprite[idx]._zoomfactor;
|
||||
if (reducePercent > 95)
|
||||
reducePercent = 95;
|
||||
} else
|
||||
zoomPercent = _sprite[idx].fieldC;
|
||||
zoomPercent = _sprite[idx]._zoomfactor;
|
||||
|
||||
if (zoomPercent) {
|
||||
if (tmpX >= 0)
|
||||
@ -1213,12 +1213,12 @@ void ObjectsManager::animateSprite(int idx) {
|
||||
_sprite[idx]._animationType = 1;
|
||||
}
|
||||
|
||||
void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int a6, int a7, int a8, int a9) {
|
||||
void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, int a7, int a8, int a9) {
|
||||
assert (idx <= MAX_SPRITE);
|
||||
_sprite[idx]._spriteData = spriteData;
|
||||
_sprite[idx]._spritePos = pos;
|
||||
_sprite[idx]._spriteIndex = spriteIndex;
|
||||
_sprite[idx].fieldC = a6;
|
||||
_sprite[idx]._zoomfactor = zoomFactor;
|
||||
_sprite[idx].fieldE = a7;
|
||||
_sprite[idx].field12 = a8;
|
||||
_sprite[idx].field14 = a9;
|
||||
@ -1226,7 +1226,7 @@ void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos,
|
||||
|
||||
if (spriteData[0] == 'R' && spriteData[1] == 'L' && spriteData[2] == 'E') {
|
||||
_sprite[idx]._rleFl = true;
|
||||
_sprite[idx].fieldC = 0;
|
||||
_sprite[idx]._zoomfactor = 0;
|
||||
_sprite[idx].fieldE = 0;
|
||||
} else
|
||||
_sprite[idx]._rleFl = false;
|
||||
@ -1266,10 +1266,10 @@ void ObjectsManager::setSpriteIndex(int idx, int spriteIndex) {
|
||||
}
|
||||
|
||||
// Set Sprite Size
|
||||
void ObjectsManager::setSpriteSize(int idx, int size) {
|
||||
void ObjectsManager::setSpriteZoom(int idx, int zoomFactor) {
|
||||
assert (idx <= MAX_SPRITE);
|
||||
if (!_sprite[idx]._rleFl)
|
||||
_sprite[idx].fieldC = size;
|
||||
_sprite[idx]._zoomfactor = zoomFactor;
|
||||
}
|
||||
|
||||
void ObjectsManager::setFlipSprite(int idx, bool flip) {
|
||||
@ -1450,7 +1450,7 @@ void ObjectsManager::GOHOME() {
|
||||
setSpriteIndex(0, _vm->_globals._oldDirection + 59);
|
||||
_vm->_globals._actionDirection = 0;
|
||||
if (_vm->_globals.GOACTION)
|
||||
v54 = _vm->_globals._saveData->data[svField2];
|
||||
v54 = _vm->_globals._saveData->_data[svField2];
|
||||
else
|
||||
v54 = _zoneNum;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
@ -1484,12 +1484,12 @@ void ObjectsManager::GOHOME() {
|
||||
v3 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v4 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v3 = _vm->_graphicsManager.zoomOut(v3, -_sprite[0].fieldC);
|
||||
v4 = _vm->_graphicsManager.zoomOut(v4, -_sprite[0].fieldC);
|
||||
} else if (_sprite[0].fieldC > 0) {
|
||||
v3 = _vm->_graphicsManager.zoomIn(v3, _sprite[0].fieldC);
|
||||
v4 = _vm->_graphicsManager.zoomIn(v4, _sprite[0].fieldC);
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v3 = _vm->_graphicsManager.zoomOut(v3, -_sprite[0]._zoomfactor);
|
||||
v4 = _vm->_graphicsManager.zoomOut(v4, -_sprite[0]._zoomfactor);
|
||||
} else if (_sprite[0]._zoomfactor > 0) {
|
||||
v3 = _vm->_graphicsManager.zoomIn(v3, _sprite[0]._zoomfactor);
|
||||
v4 = _vm->_graphicsManager.zoomIn(v4, _sprite[0]._zoomfactor);
|
||||
}
|
||||
v0 = v3 + g_old_x;
|
||||
v58 = g_old_y + v4;
|
||||
@ -1507,13 +1507,13 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v9 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v10 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v9 = _vm->_graphicsManager.zoomOut(v9, -_sprite[0].fieldC);
|
||||
v10 = _vm->_graphicsManager.zoomOut(v10, -_sprite[0].fieldC);
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v9 = _vm->_graphicsManager.zoomOut(v9, -_sprite[0]._zoomfactor);
|
||||
v10 = _vm->_graphicsManager.zoomOut(v10, -_sprite[0]._zoomfactor);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v9 = _vm->_graphicsManager.zoomIn(v9, _sprite[0].fieldC);
|
||||
v10 = _vm->_graphicsManager.zoomIn(v10, _sprite[0].fieldC);
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v9 = _vm->_graphicsManager.zoomIn(v9, _sprite[0]._zoomfactor);
|
||||
v10 = _vm->_graphicsManager.zoomIn(v10, _sprite[0]._zoomfactor);
|
||||
}
|
||||
v0 = g_old_x - v9;
|
||||
v58 = g_old_y - v10;
|
||||
@ -1531,11 +1531,11 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v15 = abs(_vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2);
|
||||
v16 = v15;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v16 = _vm->_graphicsManager.zoomOut(v16, -_sprite[0].fieldC);
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v16 = _vm->_graphicsManager.zoomOut(v16, -_sprite[0]._zoomfactor);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v16 = _vm->_graphicsManager.zoomIn(v16, _sprite[0].fieldC);
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v16 = _vm->_graphicsManager.zoomIn(v16, _sprite[0]._zoomfactor);
|
||||
}
|
||||
v0 = g_old_x;
|
||||
v58 = g_old_y - v16;
|
||||
@ -1554,16 +1554,16 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v19 = abs(_vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2);
|
||||
v20 = v19;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v21 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v21 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v21 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v21 = -_sprite[0]._zoomfactor;
|
||||
v20 = _vm->_graphicsManager.zoomOut(v20, v21);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v22 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v22 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v22 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v22 = -_sprite[0]._zoomfactor;
|
||||
v20 = _vm->_graphicsManager.zoomIn(v20, v22);
|
||||
}
|
||||
v0 = g_old_x;
|
||||
@ -1582,24 +1582,24 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v23 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v24 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v25 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v25 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v25 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v25 = -_sprite[0]._zoomfactor;
|
||||
v23 = _vm->_graphicsManager.zoomOut(v23, v25);
|
||||
v26 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v26 = -_sprite[0].fieldC;
|
||||
v26 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v26 = -_sprite[0]._zoomfactor;
|
||||
v24 = _vm->_graphicsManager.zoomOut(v24, v26);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v27 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v27 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v27 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v27 = -_sprite[0]._zoomfactor;
|
||||
v23 = _vm->_graphicsManager.zoomIn(v23, v27);
|
||||
v28 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v28 = -_sprite[0].fieldC;
|
||||
v28 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v28 = -_sprite[0]._zoomfactor;
|
||||
v24 = _vm->_graphicsManager.zoomIn(v24, v28);
|
||||
}
|
||||
v0 = v23 + g_old_x;
|
||||
@ -1618,23 +1618,23 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v29 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v30 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v31 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v31 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v31 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v31 = -_sprite[0]._zoomfactor;
|
||||
v29 = _vm->_graphicsManager.zoomOut(v29, v31);
|
||||
v32 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v32 = -_sprite[0].fieldC;
|
||||
v32 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v32 = -_sprite[0]._zoomfactor;
|
||||
v30 = _vm->_graphicsManager.zoomOut(v30, v32);
|
||||
} else if (_sprite[0].fieldC > 0) {
|
||||
v33 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v33 = -_sprite[0].fieldC;
|
||||
} else if (_sprite[0]._zoomfactor > 0) {
|
||||
v33 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v33 = -_sprite[0]._zoomfactor;
|
||||
v29 = _vm->_graphicsManager.zoomIn(v29, v33);
|
||||
v34 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v34 = -_sprite[0].fieldC;
|
||||
v34 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v34 = -_sprite[0]._zoomfactor;
|
||||
v30 = _vm->_graphicsManager.zoomIn(v30, v34);
|
||||
}
|
||||
v0 = g_old_x - v29;
|
||||
@ -1653,24 +1653,24 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v35 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v36 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v37 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v37 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v37 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v37 = -_sprite[0]._zoomfactor;
|
||||
v35 = _vm->_graphicsManager.zoomOut(v35, v37);
|
||||
v38 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v38 = -_sprite[0].fieldC;
|
||||
v38 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v38 = -_sprite[0]._zoomfactor;
|
||||
v36 = _vm->_graphicsManager.zoomOut(v36, v38);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v39 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v39 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v39 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v39 = -_sprite[0]._zoomfactor;
|
||||
v35 = _vm->_graphicsManager.zoomIn(v35, v39);
|
||||
v40 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v40 = -_sprite[0].fieldC;
|
||||
v40 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v40 = -_sprite[0]._zoomfactor;
|
||||
v36 = _vm->_graphicsManager.zoomIn(v36, v40);
|
||||
}
|
||||
v0 = v35 + g_old_x;
|
||||
@ -1689,24 +1689,24 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
v41 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field0;
|
||||
v42 = _vm->_globals.Hopkins[_vm->_globals.g_old_anim].field2;
|
||||
if (_sprite[0].fieldC < 0) {
|
||||
v43 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v43 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor < 0) {
|
||||
v43 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v43 = -_sprite[0]._zoomfactor;
|
||||
v41 = _vm->_graphicsManager.zoomOut(v41, v43);
|
||||
v44 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v44 = -_sprite[0].fieldC;
|
||||
v44 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v44 = -_sprite[0]._zoomfactor;
|
||||
v42 = _vm->_graphicsManager.zoomOut(v42, v44);
|
||||
}
|
||||
if (_sprite[0].fieldC > 0) {
|
||||
v45 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v45 = -_sprite[0].fieldC;
|
||||
if (_sprite[0]._zoomfactor > 0) {
|
||||
v45 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v45 = -_sprite[0]._zoomfactor;
|
||||
v41 = _vm->_graphicsManager.zoomIn(v41, v45);
|
||||
v46 = _sprite[0].fieldC;
|
||||
if (_sprite[0].fieldC < 0)
|
||||
v46 = -_sprite[0].fieldC;
|
||||
v46 = _sprite[0]._zoomfactor;
|
||||
if (_sprite[0]._zoomfactor < 0)
|
||||
v46 = -_sprite[0]._zoomfactor;
|
||||
v42 = _vm->_graphicsManager.zoomIn(v42, v46);
|
||||
}
|
||||
v0 = g_old_x - v41;
|
||||
@ -1726,7 +1726,7 @@ void ObjectsManager::GOHOME() {
|
||||
|
||||
if (newPosX == -1 && newPosY == -1) {
|
||||
if (_vm->_globals.GOACTION)
|
||||
v49 = _vm->_globals._saveData->data[svField2];
|
||||
v49 = _vm->_globals._saveData->_data[svField2];
|
||||
else
|
||||
v49 = _zoneNum;
|
||||
setSpriteIndex(0, _vm->_globals._oldDirection + 59);
|
||||
@ -2060,15 +2060,15 @@ void ObjectsManager::PLAN_BETA() {
|
||||
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;
|
||||
if (_vm->_globals._saveData->_data[svField170] == 1 && !_vm->_globals._saveData->_data[svField171]) {
|
||||
_vm->_globals._saveData->_data[svField171] = 1;
|
||||
_vm->_globals.NOPARLE = true;
|
||||
_vm->_talkManager.PARLER_PERSO("APPEL1.pe2");
|
||||
_vm->_globals.NOPARLE = false;
|
||||
mouseButton = 0;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField80] == 1 && !_vm->_globals._saveData->data[svField172]) {
|
||||
_vm->_globals._saveData->data[svField172] = 1;
|
||||
if (_vm->_globals._saveData->_data[svField80] == 1 && !_vm->_globals._saveData->_data[svField172]) {
|
||||
_vm->_globals._saveData->_data[svField172] = 1;
|
||||
_vm->_globals.NOPARLE = true;
|
||||
_vm->_talkManager.PARLER_PERSO("APPEL2.pe2");
|
||||
_vm->_globals.NOPARLE = false;
|
||||
@ -2124,23 +2124,23 @@ void ObjectsManager::handleLeftButton() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField354] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
if (_vm->_globals._saveData->_data[svField354] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
&& destX >= 533 && destX <= 559 && destY >= 26 && destY <= 59) {
|
||||
changeCharacterHead(CHARACTER_HOPKINS_CLONE, CHARACTER_HOPKINS);
|
||||
return;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField356] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
&& destX >= 533 && destX <= 559 && destY >= 26 && destY <= 48) {
|
||||
changeCharacterHead(CHARACTER_SAMANTHA, CHARACTER_HOPKINS);
|
||||
return;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField357] == 1) {
|
||||
if (_vm->_globals._saveData->data[svField353] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
if (_vm->_globals._saveData->_data[svField357] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField353] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
&& destX >= 533 && destX <= 559 && destY >= 26 && destY <= 59) {
|
||||
changeCharacterHead(CHARACTER_HOPKINS, CHARACTER_HOPKINS_CLONE);
|
||||
return;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField355] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
if (_vm->_globals._saveData->_data[svField355] == 1 && !_vm->_globals.PLAN_FLAG
|
||||
&& destX >= 567 && destX <= 593 && destY >= 26 && destY <= 59) {
|
||||
changeCharacterHead(CHARACTER_HOPKINS, CHARACTER_SAMANTHA);
|
||||
return;
|
||||
@ -2165,8 +2165,8 @@ void ObjectsManager::handleLeftButton() {
|
||||
if (_vm->_globals.GOACTION) {
|
||||
checkZone();
|
||||
_vm->_globals.GOACTION = false;
|
||||
_vm->_globals._saveData->data[svField1] = 0;
|
||||
_vm->_globals._saveData->data[svField2] = 0;
|
||||
_vm->_globals._saveData->_data[svField1] = 0;
|
||||
_vm->_globals._saveData->_data[svField2] = 0;
|
||||
}
|
||||
|
||||
if (_vm->_globals.PLAN_FLAG && (_vm->_eventsManager._mouseCursorId != 4 || _zoneNum <= 0))
|
||||
@ -2224,19 +2224,19 @@ LABEL_65:
|
||||
}
|
||||
if (_zoneNum != -1 && _zoneNum != 0) {
|
||||
if (_vm->_eventsManager._mouseCursorId == 23)
|
||||
_vm->_globals._saveData->data[svField1] = 5;
|
||||
_vm->_globals._saveData->_data[svField1] = 5;
|
||||
else
|
||||
_vm->_globals._saveData->data[svField1] = _vm->_eventsManager._mouseCursorId;
|
||||
_vm->_globals._saveData->_data[svField1] = _vm->_eventsManager._mouseCursorId;
|
||||
|
||||
if (_vm->_globals.PLAN_FLAG)
|
||||
_vm->_globals._saveData->data[svField1] = 6;
|
||||
_vm->_globals._saveData->data[svField2] = _zoneNum;
|
||||
_vm->_globals._saveData->data[svField3] = _vm->_globals._curObjectIndex;
|
||||
_vm->_globals._saveData->_data[svField1] = 6;
|
||||
_vm->_globals._saveData->_data[svField2] = _zoneNum;
|
||||
_vm->_globals._saveData->_data[svField3] = _vm->_globals._curObjectIndex;
|
||||
_vm->_globals.GOACTION = true;
|
||||
}
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
|
||||
if (_vm->_globals._screenId == 20 && _vm->_globals._saveData->data[svField132] == 1
|
||||
if (_vm->_globals._screenId == 20 && _vm->_globals._saveData->_data[svField132] == 1
|
||||
&& _vm->_globals._curObjectIndex == 20 && _zoneNum == 12
|
||||
&& _vm->_eventsManager._mouseCursorId == 23) {
|
||||
// Special case for throwing darts at the switch in Purgatory - the player shouldn't move
|
||||
@ -2247,8 +2247,8 @@ LABEL_65:
|
||||
}
|
||||
|
||||
void ObjectsManager::PARADISE() {
|
||||
char result = _vm->_globals._saveData->data[svField1];
|
||||
if (result && _vm->_globals._saveData->data[svField2] && result != 4 && result > 3) {
|
||||
char result = _vm->_globals._saveData->_data[svField1];
|
||||
if (result && _vm->_globals._saveData->_data[svField2] && result != 4 && result > 3) {
|
||||
_vm->_fontManager.hideText(5);
|
||||
if (!_vm->_globals._forestFl || _zoneNum < 20 || _zoneNum > 23) {
|
||||
if (_vm->_graphicsManager._largeScreenFl) {
|
||||
@ -2295,20 +2295,20 @@ void ObjectsManager::PARADISE() {
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_graphicsManager._scrollStatus = 0;
|
||||
}
|
||||
_vm->_talkManager.REPONSE(_vm->_globals._saveData->data[svField2], _vm->_globals._saveData->data[svField1]);
|
||||
_vm->_talkManager.REPONSE(_vm->_globals._saveData->_data[svField2], _vm->_globals._saveData->_data[svField1]);
|
||||
} else {
|
||||
_vm->_talkManager.REPONSE2(_vm->_globals._saveData->data[svField2], _vm->_globals._saveData->data[svField1]);
|
||||
_vm->_talkManager.REPONSE2(_vm->_globals._saveData->_data[svField2], _vm->_globals._saveData->_data[svField1]);
|
||||
}
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_globals.ZONEP[_zoneNum]._enabledFl) {
|
||||
_zoneNum = -1;
|
||||
_forceZoneFl = true;
|
||||
}
|
||||
if (_zoneNum != _vm->_globals._saveData->data[svField2] || _zoneNum == -1 || _zoneNum == 0) {
|
||||
if (_zoneNum != _vm->_globals._saveData->_data[svField2] || _zoneNum == -1 || _zoneNum == 0) {
|
||||
_vm->_eventsManager._mouseCursorId = 4;
|
||||
_changeVerbFl = false;
|
||||
} else {
|
||||
_vm->_eventsManager._mouseCursorId = _vm->_globals._saveData->data[svField1];
|
||||
_vm->_eventsManager._mouseCursorId = _vm->_globals._saveData->_data[svField1];
|
||||
if (_changeVerbFl) {
|
||||
nextVerbIcon();
|
||||
_changeVerbFl = false;
|
||||
@ -2319,8 +2319,8 @@ void ObjectsManager::PARADISE() {
|
||||
if (_vm->_eventsManager._mouseCursorId != 23)
|
||||
_vm->_eventsManager.changeMouseCursor(_vm->_eventsManager._mouseCursorId);
|
||||
_zoneNum = 0;
|
||||
_vm->_globals._saveData->data[svField1] = 0;
|
||||
_vm->_globals._saveData->data[svField2] = 0;
|
||||
_vm->_globals._saveData->_data[svField1] = 0;
|
||||
_vm->_globals._saveData->_data[svField2] = 0;
|
||||
}
|
||||
if (_vm->_globals.PLAN_FLAG) {
|
||||
_vm->_eventsManager._mouseCursorId = 0;
|
||||
@ -2362,8 +2362,8 @@ void ObjectsManager::clearScreen() {
|
||||
_vm->_globals.SPRITE_ECRAN = _vm->_globals.freeMemory(_vm->_globals.SPRITE_ECRAN);
|
||||
_vm->_eventsManager._startPos.x = 0;
|
||||
_vm->_eventsManager._mouseSpriteId = 0;
|
||||
_vm->_globals._saveData->data[svField1] = 0;
|
||||
_vm->_globals._saveData->data[svField2] = 0;
|
||||
_vm->_globals._saveData->_data[svField1] = 0;
|
||||
_vm->_globals._saveData->_data[svField2] = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
_forceZoneFl = true;
|
||||
_changeVerbFl = false;
|
||||
@ -2400,9 +2400,9 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
animateSprite(1);
|
||||
removeSprite(0);
|
||||
|
||||
_vm->_globals._saveData->data[svField354] = 0;
|
||||
_vm->_globals._saveData->data[svField356] = 0;
|
||||
_vm->_globals._saveData->data[svField357] = 1;
|
||||
_vm->_globals._saveData->_data[svField354] = 0;
|
||||
_vm->_globals._saveData->_data[svField356] = 0;
|
||||
_vm->_globals._saveData->_data[svField357] = 1;
|
||||
|
||||
loc = &_vm->_globals._saveData->_realHopkins;
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("PERSO.SPR");
|
||||
@ -2418,16 +2418,16 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
loc->_pos.y = getSpriteY(0);
|
||||
loc->field2 = 64;
|
||||
loc->_location = _vm->_globals._screenId;
|
||||
loc->field4 = _sprite[0].fieldC;
|
||||
loc->field4 = _sprite[0]._zoomfactor;
|
||||
|
||||
removeSprite(1);
|
||||
addStaticSprite(_vm->_globals.TETE, loc->_pos, 1, 2, loc->field4, 0, 34, 190);
|
||||
animateSprite(1);
|
||||
removeSprite(0);
|
||||
|
||||
_vm->_globals._saveData->data[svField354] = 0;
|
||||
_vm->_globals._saveData->data[svField356] = 1;
|
||||
_vm->_globals._saveData->data[svField357] = 0;
|
||||
_vm->_globals._saveData->_data[svField354] = 0;
|
||||
_vm->_globals._saveData->_data[svField356] = 1;
|
||||
_vm->_globals._saveData->_data[svField357] = 0;
|
||||
|
||||
loc = &_vm->_globals._saveData->_samantha;
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("PSAMAN.SPR");
|
||||
@ -2443,7 +2443,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
loc->_pos.y = getSpriteY(0);
|
||||
loc->field2 = 64;
|
||||
loc->_location = _vm->_globals._screenId;
|
||||
loc->field4 = _sprite[0].fieldC;
|
||||
loc->field4 = _sprite[0]._zoomfactor;
|
||||
break;
|
||||
case CHARACTER_HOPKINS_CLONE:
|
||||
loc = &_vm->_globals._saveData->_cloneHopkins;
|
||||
@ -2451,7 +2451,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
loc->_pos.y = getSpriteY(0);
|
||||
loc->field2 = 64;
|
||||
loc->_location = _vm->_globals._screenId;
|
||||
loc->field4 = _sprite[0].fieldC;
|
||||
loc->field4 = _sprite[0]._zoomfactor;
|
||||
break;
|
||||
case CHARACTER_SAMANTHA:
|
||||
loc = &_vm->_globals._saveData->_samantha;
|
||||
@ -2459,7 +2459,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
loc->_pos.y = getSpriteY(0);
|
||||
loc->field2 = 64;
|
||||
loc->_location = _vm->_globals._screenId;
|
||||
loc->field4 = _sprite[0].fieldC;
|
||||
loc->field4 = _sprite[0]._zoomfactor;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -2467,24 +2467,24 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
|
||||
switch (newCharacter) {
|
||||
case CHARACTER_HOPKINS:
|
||||
_vm->_globals._saveData->data[svField121] = 0;
|
||||
_vm->_globals._saveData->data[svField354] = 0;
|
||||
_vm->_globals._saveData->data[svField356] = 0;
|
||||
_vm->_globals._saveData->data[svField357] = 1;
|
||||
_vm->_globals._saveData->_data[svField121] = 0;
|
||||
_vm->_globals._saveData->_data[svField354] = 0;
|
||||
_vm->_globals._saveData->_data[svField356] = 0;
|
||||
_vm->_globals._saveData->_data[svField357] = 1;
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->_realHopkins._location;
|
||||
break;
|
||||
case CHARACTER_HOPKINS_CLONE:
|
||||
_vm->_globals._saveData->data[svField121] = 1;
|
||||
_vm->_globals._saveData->data[svField354] = 1;
|
||||
_vm->_globals._saveData->data[svField356] = 0;
|
||||
_vm->_globals._saveData->data[svField357] = 0;
|
||||
_vm->_globals._saveData->_data[svField121] = 1;
|
||||
_vm->_globals._saveData->_data[svField354] = 1;
|
||||
_vm->_globals._saveData->_data[svField356] = 0;
|
||||
_vm->_globals._saveData->_data[svField357] = 0;
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->_cloneHopkins._location;
|
||||
break;
|
||||
case CHARACTER_SAMANTHA:
|
||||
_vm->_globals._saveData->data[svField121] = 0;
|
||||
_vm->_globals._saveData->data[svField354] = 0;
|
||||
_vm->_globals._saveData->data[svField356] = 1;
|
||||
_vm->_globals._saveData->data[svField357] = 0;
|
||||
_vm->_globals._saveData->_data[svField121] = 0;
|
||||
_vm->_globals._saveData->_data[svField354] = 0;
|
||||
_vm->_globals._saveData->_data[svField356] = 1;
|
||||
_vm->_globals._saveData->_data[svField357] = 0;
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->_samantha._location;
|
||||
break;
|
||||
}
|
||||
@ -2499,7 +2499,7 @@ void ObjectsManager::computeAndSetSpriteSize() {
|
||||
} else if (_vm->_globals.PERSO_TYPE == 2) {
|
||||
size = 20 * (5 * abs(size) - 165) / -67;
|
||||
}
|
||||
setSpriteSize(0, size);
|
||||
setSpriteZoom(0, size);
|
||||
}
|
||||
|
||||
void ObjectsManager::PACOURS_PROPRE(int16 *a1) {
|
||||
@ -3256,10 +3256,10 @@ void ObjectsManager::handleSpecialGames() {
|
||||
|
||||
switch (_vm->_globals._screenId) {
|
||||
case 5:
|
||||
if ((getSpriteY(0) > 399) || _vm->_globals._saveData->data[svField173])
|
||||
if ((getSpriteY(0) > 399) || _vm->_globals._saveData->_data[svField173])
|
||||
break;
|
||||
|
||||
_vm->_globals._saveData->data[svField173] = 1;
|
||||
_vm->_globals._saveData->_data[svField173] = 1;
|
||||
_vm->_globals.NOPARLE = true;
|
||||
_vm->_talkManager.PARLER_PERSO("flicspe1.pe2");
|
||||
_vm->_globals.NOPARLE = false;
|
||||
@ -3300,7 +3300,7 @@ void ObjectsManager::handleSpecialGames() {
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
break;
|
||||
case 20:
|
||||
_vm->_globals._saveData->data[svField132] = (getSpriteX(0) > 65 && getSpriteX(0) <= 124 && getSpriteY(0) > 372 && getSpriteY(0) <= 398) ? 1 : 0;
|
||||
_vm->_globals._saveData->_data[svField132] = (getSpriteX(0) > 65 && getSpriteX(0) <= 124 && getSpriteY(0) > 372 && getSpriteY(0) <= 398) ? 1 : 0;
|
||||
break;
|
||||
case 35:
|
||||
if (_vm->_globals._prevScreenId == 16)
|
||||
@ -3346,25 +3346,25 @@ void ObjectsManager::handleSpecialGames() {
|
||||
break;
|
||||
case 57:
|
||||
_vm->_globals._disableInventFl = true;
|
||||
if (_vm->_globals._saveData->data[svField261] == 1 && BOBPOSI(5) == 37) {
|
||||
if (_vm->_globals._saveData->_data[svField261] == 1 && BOBPOSI(5) == 37) {
|
||||
stopBobAnimation(5);
|
||||
SET_BOBPOSI(5, 0);
|
||||
setBobAnimation(6);
|
||||
_vm->_globals._saveData->data[svField261] = 2;
|
||||
_vm->_globals._saveData->_data[svField261] = 2;
|
||||
disableZone(15);
|
||||
_vm->_soundManager.playSound("SOUND75.WAV");
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField261] == 2 && BOBPOSI(6) == 6) {
|
||||
if (_vm->_globals._saveData->_data[svField261] == 2 && BOBPOSI(6) == 6) {
|
||||
stopBobAnimation(6);
|
||||
SET_BOBPOSI(6, 0);
|
||||
setBobAnimation(7);
|
||||
enableZone(14);
|
||||
_vm->_globals._saveData->data[svField261] = 3;
|
||||
_vm->_globals._saveData->_data[svField261] = 3;
|
||||
}
|
||||
_vm->_globals._disableInventFl = false;
|
||||
break;
|
||||
case 93:
|
||||
if (_vm->_globals._saveData->data[svField333])
|
||||
if (_vm->_globals._saveData->_data[svField333])
|
||||
break;
|
||||
|
||||
_vm->_globals._disableInventFl = true;
|
||||
@ -3374,7 +3374,7 @@ void ObjectsManager::handleSpecialGames() {
|
||||
_vm->_globals.NOPARLE = true;
|
||||
_vm->_talkManager.PARLER_PERSO("GM3.PE2");
|
||||
stopBobAnimation(8);
|
||||
_vm->_globals._saveData->data[svField333] = 1;
|
||||
_vm->_globals._saveData->_data[svField333] = 1;
|
||||
_vm->_globals._disableInventFl = false;
|
||||
break;
|
||||
}
|
||||
@ -3876,9 +3876,9 @@ void ObjectsManager::SPECIAL_INI() {
|
||||
}
|
||||
if (!_vm->_soundManager._voiceOffFl)
|
||||
_vm->_soundManager.mixVoice(383, 4);
|
||||
_vm->_globals._saveData->data[svField270] = 1;
|
||||
_vm->_globals._saveData->data[svField300] = 1;
|
||||
_vm->_globals._saveData->data[svField320] = 1;
|
||||
_vm->_globals._saveData->_data[svField270] = 1;
|
||||
_vm->_globals._saveData->_data[svField300] = 1;
|
||||
_vm->_globals._saveData->_data[svField320] = 1;
|
||||
if (_vm->_soundManager._voiceOffFl) {
|
||||
for (int i = 0; i <= 199; i++)
|
||||
_vm->_eventsManager.VBL();
|
||||
@ -3932,20 +3932,20 @@ void ObjectsManager::SPECIAL_INI() {
|
||||
_vm->_globals.ZONEP[22].field12 = 30;
|
||||
_vm->_globals.ZONEP[23].field12 = 30;
|
||||
for (int i = 200; i <= 214; i++) {
|
||||
if (_vm->_globals._saveData->data[i] != 2)
|
||||
_vm->_globals._saveData->data[i] = 0;
|
||||
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[svField318]) {
|
||||
_vm->_globals.CACHE_SUB(0);
|
||||
_vm->_globals.CACHE_SUB(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 93:
|
||||
if (!_vm->_globals._saveData->data[svField333])
|
||||
if (!_vm->_globals._saveData->_data[svField333])
|
||||
setBobAnimation(8);
|
||||
break;
|
||||
}
|
||||
@ -4361,22 +4361,22 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in
|
||||
break;
|
||||
}
|
||||
|
||||
if (_vm->_globals._saveData->data[savegameIdx] == 2)
|
||||
if (_vm->_globals._saveData->_data[savegameIdx] == 2)
|
||||
return;
|
||||
|
||||
if (_vm->_globals._saveData->data[savegameIdx]) {
|
||||
if (_vm->_globals._saveData->data[savegameIdx] == 1) {
|
||||
if (_vm->_globals._saveData->_data[savegameIdx]) {
|
||||
if (_vm->_globals._saveData->_data[savegameIdx] == 1) {
|
||||
if (((idx == 1 || idx == 2) && BOBPOSI(idx) == 26) || ((idx == 3 || idx == 4) && BOBPOSI(idx) == 27)) {
|
||||
_vm->_dialogsManager._removeInventFl = true;
|
||||
_vm->_soundManager.PLAY_SAMPLE2(1);
|
||||
_vm->_globals._saveData->data[savegameIdx] = 4;
|
||||
_vm->_globals._saveData->_data[savegameIdx] = 4;
|
||||
}
|
||||
}
|
||||
if (_vm->_globals._saveData->data[savegameIdx] == 4) {
|
||||
if (_vm->_globals._saveData->_data[savegameIdx] == 4) {
|
||||
if (idx >= 1 && idx <= 4 && BOBPOSI(idx) > 30)
|
||||
_vm->_globals._saveData->data[savegameIdx] = 3;
|
||||
_vm->_globals._saveData->_data[savegameIdx] = 3;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[savegameIdx] == 3) {
|
||||
if (_vm->_globals._saveData->_data[savegameIdx] == 3) {
|
||||
_vm->_graphicsManager.FADE_LINUX = 2;
|
||||
_vm->_animationManager.playAnim("CREVE2.ANM", 100, 24, 500);
|
||||
_vm->_globals._exitId = 150;
|
||||
@ -4392,7 +4392,7 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in
|
||||
&& maxY > getSpriteY(0)) {
|
||||
if (idx >= 1 && idx <= 4)
|
||||
setBobAnimation(idx);
|
||||
_vm->_globals._saveData->data[savegameIdx] = 1;
|
||||
_vm->_globals._saveData->_data[savegameIdx] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4525,18 +4525,18 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
||||
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0);
|
||||
if (_vm->_globals.PERSO_TYPE) {
|
||||
if (!_vm->_globals._saveData->data[svField122] && !_vm->_globals._saveData->data[svField356]) {
|
||||
if (!_vm->_globals._saveData->_data[svField122] && !_vm->_globals._saveData->_data[svField356]) {
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("PERSO.SPR");
|
||||
_vm->_globals.PERSO_TYPE = 0;
|
||||
}
|
||||
}
|
||||
if (!_vm->_globals.PERSO_TYPE) {
|
||||
if (_vm->_globals._saveData->data[svField122] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField122] == 1) {
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("HOPFEM.SPR");
|
||||
_vm->_globals.PERSO_TYPE = 1;
|
||||
}
|
||||
}
|
||||
if (_vm->_globals.PERSO_TYPE != 2 && _vm->_globals._saveData->data[svField356] == 1) {
|
||||
if (_vm->_globals.PERSO_TYPE != 2 && _vm->_globals._saveData->_data[svField356] == 1) {
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("PSAMAN.SPR");
|
||||
_vm->_globals.PERSO_TYPE = 2;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ struct SpriteItem {
|
||||
int _animationType;
|
||||
const byte *_spriteData;
|
||||
Common::Point _spritePos;
|
||||
int fieldC;
|
||||
int _zoomfactor;
|
||||
int fieldE;
|
||||
int _spriteIndex;
|
||||
int field12;
|
||||
@ -136,12 +136,12 @@ public:
|
||||
int getSpriteY(int idx);
|
||||
void clearSprite();
|
||||
void animateSprite(int idx);
|
||||
void addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int a6, int a7, int a8, int a9);
|
||||
void addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, int a7, int a8, int a9);
|
||||
void removeSprite(int idx);
|
||||
void setSpriteX(int idx, int xp);
|
||||
void setSpriteIndex(int idx, int spriteIndex);
|
||||
void setSpriteY(int idx, int yp);
|
||||
void setSpriteSize(int idx, int size);
|
||||
void setSpriteZoom(int idx, int zoomFactor);
|
||||
void setFlipSprite(int idx, bool flip);
|
||||
|
||||
void checkZone();
|
||||
|
@ -140,7 +140,7 @@ void SaveLoadManager::writeSavegameHeader(Common::OutSaveFile *out, hopkinsSaveg
|
||||
Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName) {
|
||||
/* Pack any necessary data into the savegame data structure */
|
||||
// Set the selected slot number
|
||||
_vm->_globals._saveData->data[svField10] = slot;
|
||||
_vm->_globals._saveData->_data[svField10] = slot;
|
||||
|
||||
// Set up the inventory
|
||||
for (int i = 0; i < 35; ++i)
|
||||
@ -201,9 +201,9 @@ Common::Error SaveLoadManager::loadGame(int slot) {
|
||||
_vm->_globals._inventory[i] = _vm->_globals._saveData->_inventory[i];
|
||||
|
||||
// Set variables from loaded data as necessary
|
||||
_vm->_globals._saveData->data[svField10] = slot;
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->data[svField5];
|
||||
_vm->_globals._saveData->data[svField6] = 0;
|
||||
_vm->_globals._saveData->_data[svField10] = slot;
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->_data[svField5];
|
||||
_vm->_globals._saveData->_data[svField6] = 0;
|
||||
_vm->_globals._screenId = 0;
|
||||
_vm->_globals._mapCarPosX = _vm->_globals._saveData->_mapCarPosX;
|
||||
_vm->_globals._mapCarPosY = _vm->_globals._saveData->_mapCarPosY;
|
||||
@ -257,7 +257,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
|
||||
}
|
||||
|
||||
void SaveLoadManager::syncSavegameData(Common::Serializer &s, int version) {
|
||||
s.syncBytes(&_vm->_globals._saveData->data[0], 2050);
|
||||
s.syncBytes(&_vm->_globals._saveData->_data[0], 2050);
|
||||
syncCharacterLocation(s, _vm->_globals._saveData->_cloneHopkins);
|
||||
syncCharacterLocation(s, _vm->_globals._saveData->_realHopkins);
|
||||
syncCharacterLocation(s, _vm->_globals._saveData->_samantha);
|
||||
|
@ -53,7 +53,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
int mesgId = (int16)READ_LE_UINT16(dataP + 13);
|
||||
opcodeType = 1;
|
||||
if (!TRAVAILOBJET) {
|
||||
if (_vm->_globals._saveData->data[svField356] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1) {
|
||||
if (mesgId == 53)
|
||||
mesgId = 644;
|
||||
if (mesgId == 624)
|
||||
@ -139,7 +139,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_soundManager.mixVoice(mesgId, 4);
|
||||
}
|
||||
if (TRAVAILOBJET) {
|
||||
if (_vm->_globals._saveData->data[svField356]) {
|
||||
if (_vm->_globals._saveData->_data[svField356]) {
|
||||
_vm->_fontManager.initTextBuffers(9, 635, _vm->_globals.FICH_TEXTE, 55, 20, dataP[8], 35, 253);
|
||||
if (!_vm->_soundManager._textOffFl)
|
||||
_vm->_fontManager.showText(9);
|
||||
@ -198,27 +198,27 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager._characterPos.y = (int16)READ_LE_UINT16(dataP + 8);
|
||||
_vm->_objectsManager.PERI = dataP[5];
|
||||
if (_vm->_objectsManager._changeHeadFl) {
|
||||
if (_vm->_globals._saveData->data[svField354] == 1
|
||||
if (_vm->_globals._saveData->_data[svField354] == 1
|
||||
&& _vm->_globals._saveData->_cloneHopkins._pos.x && _vm->_globals._saveData->_cloneHopkins._pos.y
|
||||
&& _vm->_globals._saveData->_cloneHopkins.field2 && _vm->_globals._saveData->_cloneHopkins._location) {
|
||||
|
||||
_vm->_objectsManager._characterPos = _vm->_globals._saveData->_cloneHopkins._pos;
|
||||
_vm->_objectsManager.PERI = _vm->_globals._saveData->_cloneHopkins.field2;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField356] == 1
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1
|
||||
&& _vm->_globals._saveData->_samantha._pos.x && _vm->_globals._saveData->_samantha._pos.y
|
||||
&& _vm->_globals._saveData->_samantha.field2 && _vm->_globals._saveData->_samantha._location) {
|
||||
_vm->_objectsManager._characterPos = _vm->_globals._saveData->_samantha._pos;
|
||||
_vm->_objectsManager.PERI = _vm->_globals._saveData->_samantha.field2;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField357] == 1
|
||||
if (_vm->_globals._saveData->_data[svField357] == 1
|
||||
&& _vm->_globals._saveData->_realHopkins._pos.x && _vm->_globals._saveData->_realHopkins._pos.y
|
||||
&& _vm->_globals._saveData->_realHopkins.field2 && _vm->_globals._saveData->_realHopkins._location) {
|
||||
_vm->_objectsManager._characterPos = _vm->_globals._saveData->_realHopkins._pos;
|
||||
_vm->_objectsManager.PERI = _vm->_globals._saveData->_realHopkins.field2;
|
||||
}
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField356] == 1
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1
|
||||
&& _vm->_globals._saveData->_realHopkins._location == _vm->_globals._screenId) {
|
||||
_vm->_objectsManager.addStaticSprite(
|
||||
_vm->_globals.TETE,
|
||||
@ -232,8 +232,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager.animateSprite(1);
|
||||
_vm->_objectsManager._twoCharactersFl = true;
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField357] == 1
|
||||
&& _vm->_globals._saveData->data[svField355] == 1
|
||||
if (_vm->_globals._saveData->_data[svField357] == 1
|
||||
&& _vm->_globals._saveData->_data[svField355] == 1
|
||||
&& _vm->_globals._saveData->_samantha._location == _vm->_globals._screenId) {
|
||||
_vm->_objectsManager.addStaticSprite(
|
||||
_vm->_globals.TETE,
|
||||
@ -253,8 +253,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
} else if (dataP[2] == 'S' && dataP[3] == 'T' && dataP[4] == 'E') {
|
||||
if (!_vm->_objectsManager._disableFl) {
|
||||
_vm->_globals._prevScreenId = _vm->_globals._screenId;
|
||||
_vm->_globals._saveData->data[svField6] = _vm->_globals._screenId;
|
||||
_vm->_globals._screenId = _vm->_globals._saveData->data[svField5] = dataP[5];
|
||||
_vm->_globals._saveData->_data[svField6] = _vm->_globals._screenId;
|
||||
_vm->_globals._screenId = _vm->_globals._saveData->_data[svField5] = dataP[5];
|
||||
v70 = dataP[6];
|
||||
}
|
||||
opcodeType = 1;
|
||||
@ -264,7 +264,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
opcodeType = 1;
|
||||
} else if (dataP[2] == 'P' && dataP[3] == 'E' && dataP[4] == 'R') {
|
||||
int specialOpcode = (int16)READ_LE_UINT16(dataP + 5);
|
||||
if (!_vm->_globals._saveData->data[svField122] && !_vm->_globals._saveData->data[svField356]) {
|
||||
if (!_vm->_globals._saveData->_data[svField122] && !_vm->_globals._saveData->_data[svField356]) {
|
||||
v70 = 0;
|
||||
|
||||
switch (specialOpcode) {
|
||||
@ -631,7 +631,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
break;
|
||||
|
||||
case 27:
|
||||
if (_vm->_globals._saveData->data[svField94] != 1 || _vm->_globals._saveData->data[svField95] != 1)
|
||||
if (_vm->_globals._saveData->_data[svField94] != 1 || _vm->_globals._saveData->_data[svField95] != 1)
|
||||
_vm->_talkManager.PARLER_PERSO("STANDAR.pe2");
|
||||
else
|
||||
_vm->_talkManager.PARLER_PERSO("STANDAR1.pe2");
|
||||
@ -660,19 +660,19 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
break;
|
||||
|
||||
case 36:
|
||||
if (_vm->_globals._saveData->data[svField270] == 2 && _vm->_globals._saveData->data[svField94] == 1 && _vm->_globals._saveData->data[svField95] == 1)
|
||||
_vm->_globals._saveData->data[svField270] = 3;
|
||||
if (!_vm->_globals._saveData->data[svField270])
|
||||
if (_vm->_globals._saveData->_data[svField270] == 2 && _vm->_globals._saveData->_data[svField94] == 1 && _vm->_globals._saveData->_data[svField95] == 1)
|
||||
_vm->_globals._saveData->_data[svField270] = 3;
|
||||
if (!_vm->_globals._saveData->_data[svField270])
|
||||
_vm->_talkManager.PARLER_PERSO2("PATRON0.pe2");
|
||||
if (_vm->_globals._saveData->data[svField270] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField270] == 1)
|
||||
_vm->_talkManager.PARLER_PERSO2("PATRON1.pe2");
|
||||
if (_vm->_globals._saveData->data[svField270] == 2)
|
||||
if (_vm->_globals._saveData->_data[svField270] == 2)
|
||||
_vm->_talkManager.PARLER_PERSO2("PATRON2.pe2");
|
||||
if (_vm->_globals._saveData->data[svField270] == 3)
|
||||
if (_vm->_globals._saveData->_data[svField270] == 3)
|
||||
_vm->_talkManager.PARLER_PERSO2("PATRON3.pe2");
|
||||
if (_vm->_globals._saveData->data[svField270] > 3) {
|
||||
if (_vm->_globals._saveData->_data[svField270] > 3) {
|
||||
_vm->_talkManager.PARLER_PERSO2("PATRON4.pe2");
|
||||
_vm->_globals._saveData->data[svField270] = 5;
|
||||
_vm->_globals._saveData->_data[svField270] = 5;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -810,7 +810,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager.removeSprite(0);
|
||||
_vm->_objectsManager.OPTI_BOBON(9, 10, -1, 0, 0, 0, 0);
|
||||
int v19 = 12;
|
||||
if (_vm->_globals._saveData->data[svField133] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField133] == 1)
|
||||
v19 = 41;
|
||||
int v20 = 0;
|
||||
do {
|
||||
@ -907,7 +907,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
case 56:
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("HOPFEM.SPR");
|
||||
_vm->_globals.PERSO_TYPE = 1;
|
||||
_vm->_globals._saveData->data[svField122] = 1;
|
||||
_vm->_globals._saveData->_data[svField122] = 1;
|
||||
_vm->_globals.loadCharacterData();
|
||||
_vm->_objectsManager._sprite[0].field12 = 28;
|
||||
_vm->_objectsManager._sprite[0].field14 = 155;
|
||||
@ -917,7 +917,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
case 57:
|
||||
_vm->_globals.PERSO = _vm->_fileManager.loadFile("PERSO.SPR");
|
||||
_vm->_globals.PERSO_TYPE = 0;
|
||||
_vm->_globals._saveData->data[svField122] = 0;
|
||||
_vm->_globals._saveData->_data[svField122] = 0;
|
||||
_vm->_globals.loadCharacterData();
|
||||
_vm->_objectsManager._sprite[0].field12 = 34;
|
||||
_vm->_objectsManager._sprite[0].field14 = 190;
|
||||
@ -927,8 +927,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
case 58:
|
||||
_vm->_globals.NOPARLE = true;
|
||||
_vm->_talkManager.PARLER_PERSO("Gm1.PE2");
|
||||
_vm->_globals._saveData->data[svField176] = 1;
|
||||
_vm->_globals._saveData->data[svField270] = 2;
|
||||
_vm->_globals._saveData->_data[svField176] = 1;
|
||||
_vm->_globals._saveData->_data[svField270] = 2;
|
||||
_vm->_globals.NOPARLE = false;
|
||||
break;
|
||||
|
||||
@ -1128,7 +1128,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
break;
|
||||
|
||||
case 86:
|
||||
if (_vm->_globals._saveData->data[svField231] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField231] == 1) {
|
||||
_vm->_talkManager.PARLER_PERSO("chotess1.pe2");
|
||||
} else {
|
||||
_vm->_globals.NOPARLE = true;
|
||||
@ -1138,14 +1138,14 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
break;
|
||||
|
||||
case 87:
|
||||
if (_vm->_globals._saveData->data[svField188])
|
||||
if (_vm->_globals._saveData->_data[svField188])
|
||||
_vm->_talkManager.PARLER_PERSO("stand2.pe2");
|
||||
else
|
||||
_vm->_talkManager.PARLER_PERSO("stand1.pe2");
|
||||
break;
|
||||
|
||||
case 88:
|
||||
if (_vm->_globals._saveData->data[svField183] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField183] == 1) {
|
||||
_vm->_objectsManager.SET_BOBPOSI(1, 0);
|
||||
_vm->_objectsManager.SET_BOBPOSI(2, 0);
|
||||
_vm->_objectsManager.setBobAnimation(1);
|
||||
@ -1187,7 +1187,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 283, 160, 6);
|
||||
_vm->_soundManager.DEL_SAMPLE(1);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField183] == 2) {
|
||||
if (_vm->_globals._saveData->_data[svField183] == 2) {
|
||||
_vm->_objectsManager.SET_BOBPOSI(1, 0);
|
||||
_vm->_objectsManager.SET_BOBPOSI(3, 0);
|
||||
_vm->_objectsManager.setBobAnimation(1);
|
||||
@ -1233,11 +1233,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 90:
|
||||
_vm->_soundManager.playSound("SOUND52.WAV");
|
||||
if (!_vm->_globals._saveData->data[svField186]) {
|
||||
if (!_vm->_globals._saveData->_data[svField186]) {
|
||||
_vm->_animationManager.playSequence("CIB5A.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 0);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField186] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField186] == 1) {
|
||||
_vm->_animationManager.playSequence("CIB5C.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 0);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 329, 87, 2);
|
||||
@ -1246,11 +1246,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 91:
|
||||
_vm->_soundManager.playSound("SOUND52.WAV");
|
||||
if (!_vm->_globals._saveData->data[svField186]) {
|
||||
if (!_vm->_globals._saveData->_data[svField186]) {
|
||||
_vm->_animationManager.playSequence("CIB5B.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 5);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField186] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField186] == 1) {
|
||||
_vm->_animationManager.playSequence("CIB5D.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 5);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 283, 160, 6);
|
||||
@ -1259,11 +1259,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 92:
|
||||
_vm->_soundManager.playSound("SOUND52.WAV");
|
||||
if (!_vm->_globals._saveData->data[svField184]) {
|
||||
if (!_vm->_globals._saveData->_data[svField184]) {
|
||||
_vm->_animationManager.playSequence("CIB6A.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 0);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField184] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField184] == 1) {
|
||||
_vm->_animationManager.playSequence("CIB6C.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 0);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 293, 139, 3);
|
||||
@ -1272,11 +1272,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 93:
|
||||
_vm->_soundManager.playSound("SOUND52.WAV");
|
||||
if (!_vm->_globals._saveData->data[svField184]) {
|
||||
if (!_vm->_globals._saveData->_data[svField184]) {
|
||||
_vm->_animationManager.playSequence("CIB6B.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 5);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField184] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField184] == 1) {
|
||||
_vm->_animationManager.playSequence("CIB6D.SEQ", 1, 12, 1);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 155, 29, 5);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 283, 161, 8);
|
||||
@ -1284,9 +1284,9 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
break;
|
||||
|
||||
case 94:
|
||||
if (!_vm->_globals._saveData->data[svField228])
|
||||
if (!_vm->_globals._saveData->_data[svField228])
|
||||
_vm->_talkManager.PARLER_PERSO("flicn.pe2");
|
||||
if (_vm->_globals._saveData->data[svField228] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField228] == 1)
|
||||
_vm->_talkManager.PARLER_PERSO("flicn1.pe2");
|
||||
break;
|
||||
|
||||
@ -1358,17 +1358,17 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_globals._oldDirection = -1;
|
||||
_vm->_globals.Compteur = 0;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
if (_vm->_globals._saveData->data[svField253] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField253] == 1) {
|
||||
int v27 = _vm->_objectsManager.getSpriteY(0);
|
||||
int v28 = _vm->_objectsManager.getSpriteX(0);
|
||||
_vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v28, v27, 201, 294);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField253] == 2) {
|
||||
if (_vm->_globals._saveData->_data[svField253] == 2) {
|
||||
int v29 = _vm->_objectsManager.getSpriteY(0);
|
||||
int v30 = _vm->_objectsManager.getSpriteX(0);
|
||||
_vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v30, v29, 158, 338);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField253] > 2) {
|
||||
if (_vm->_globals._saveData->_data[svField253] > 2) {
|
||||
int v31 = _vm->_objectsManager.getSpriteY(0);
|
||||
int v32 = _vm->_objectsManager.getSpriteX(0);
|
||||
_vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v32, v31, 211, 393);
|
||||
@ -1384,7 +1384,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager.removeSprite(0);
|
||||
_vm->_objectsManager.setSpriteIndex(0, 60);
|
||||
_vm->_soundManager.loadSample(1, "SOUND63.WAV");
|
||||
if (_vm->_globals._saveData->data[svField253] > 2) {
|
||||
if (_vm->_globals._saveData->_data[svField253] > 2) {
|
||||
_vm->_objectsManager.setBobAnimation(4);
|
||||
int v33 = 0;
|
||||
do {
|
||||
@ -1413,7 +1413,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
} while (_vm->_objectsManager.BOBPOSI(4) != 72);
|
||||
_vm->_objectsManager.stopBobAnimation(4);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField253] == 1) {
|
||||
if (_vm->_globals._saveData->_data[svField253] == 1) {
|
||||
_vm->_objectsManager.setBobAnimation(6);
|
||||
int v34 = 0;
|
||||
do {
|
||||
@ -1442,7 +1442,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
} while (_vm->_objectsManager.BOBPOSI(6) != 72);
|
||||
_vm->_objectsManager.stopBobAnimation(6);
|
||||
}
|
||||
if (_vm->_globals._saveData->data[svField253] == 2) {
|
||||
if (_vm->_globals._saveData->_data[svField253] == 2) {
|
||||
_vm->_objectsManager.setBobAnimation(5);
|
||||
int v35 = 0;
|
||||
do {
|
||||
@ -1810,7 +1810,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 208: {
|
||||
_vm->_globals._disableInventFl = true;
|
||||
if (_vm->_globals._saveData->data[svField6] != _vm->_globals._saveData->data[svField401]) {
|
||||
if (_vm->_globals._saveData->_data[svField6] != _vm->_globals._saveData->_data[svField401]) {
|
||||
_vm->_soundManager._specialSoundNum = 208;
|
||||
_vm->_eventsManager._disableEscKeyFl = true;
|
||||
_vm->_animationManager.playSequence("SORT.SEQ", 10, 4, 10);
|
||||
@ -1832,7 +1832,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (_vm->_globals.chemin != (int16 *)g_PTRNUL);
|
||||
_vm->_objectsManager.setSpriteIndex(0, 64);
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->data[svField401];
|
||||
_vm->_globals._exitId = _vm->_globals._saveData->_data[svField401];
|
||||
_vm->_globals._disableInventFl = false;
|
||||
break;
|
||||
}
|
||||
@ -2045,7 +2045,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
}
|
||||
|
||||
case 236: {
|
||||
char v47 = _vm->_globals._saveData->data[svField341];
|
||||
char v47 = _vm->_globals._saveData->_data[svField341];
|
||||
if (v47) {
|
||||
if (v47 == 2)
|
||||
v70 = 5;
|
||||
@ -2055,18 +2055,18 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
v70 = 6;
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(v70, 26, 50, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 27, 117, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 145, 166, 2);
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
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[svField338] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
_vm->_globals._saveData->data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
_vm->_globals._saveData->data[svField340] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_globals._saveData->_data[svField338] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_globals._saveData->_data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 3)
|
||||
_vm->_globals._saveData->_data[svField340] = 0;
|
||||
}
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(6, 0, 23, 0);
|
||||
@ -2075,7 +2075,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
}
|
||||
|
||||
case 237: {
|
||||
char v48 = _vm->_globals._saveData->data[svField341];
|
||||
char v48 = _vm->_globals._saveData->_data[svField341];
|
||||
if (v48) {
|
||||
if (v48 == 2)
|
||||
v70 = 5;
|
||||
@ -2085,18 +2085,18 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
v70 = 6;
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(v70, 26, 50, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 27, 117, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 145, 166, 2);
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
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[svField338] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
_vm->_globals._saveData->data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
_vm->_globals._saveData->data[svField340] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_globals._saveData->_data[svField338] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_globals._saveData->_data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 3)
|
||||
_vm->_globals._saveData->_data[svField340] = 0;
|
||||
}
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(5, 0, 23, 0);
|
||||
@ -2105,7 +2105,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
}
|
||||
|
||||
case 238: {
|
||||
char v49 = _vm->_globals._saveData->data[svField341];
|
||||
char v49 = _vm->_globals._saveData->_data[svField341];
|
||||
if (v49) {
|
||||
if (v49 == 2)
|
||||
v70 = 5;
|
||||
@ -2115,18 +2115,18 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
v70 = 6;
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(v70, 26, 50, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 1)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 27, 117, 0);
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 145, 166, 2);
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
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[svField338] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 2)
|
||||
_vm->_globals._saveData->data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->data[svField341] == 3)
|
||||
_vm->_globals._saveData->data[svField340] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 1)
|
||||
_vm->_globals._saveData->_data[svField338] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2)
|
||||
_vm->_globals._saveData->_data[svField339] = 0;
|
||||
if (_vm->_globals._saveData->_data[svField341] == 3)
|
||||
_vm->_globals._saveData->_data[svField340] = 0;
|
||||
}
|
||||
_vm->_soundManager.playSound("SOUND83.WAV");
|
||||
_vm->_objectsManager.OPTI_ONE(4, 0, 23, 0);
|
||||
@ -2181,10 +2181,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
v51->_pos.y = _vm->_objectsManager.getSpriteY(0);
|
||||
v51->field2 = 57;
|
||||
v51->_location = 97;
|
||||
_vm->_globals._saveData->data[svField121] = 1;
|
||||
_vm->_globals._saveData->data[svField352] = 1;
|
||||
_vm->_globals._saveData->data[svField353] = 1;
|
||||
_vm->_globals._saveData->data[svField354] = 1;
|
||||
_vm->_globals._saveData->_data[svField121] = 1;
|
||||
_vm->_globals._saveData->_data[svField352] = 1;
|
||||
_vm->_globals._saveData->_data[svField353] = 1;
|
||||
_vm->_globals._saveData->_data[svField354] = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2208,10 +2208,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
if (_vm->_globals.STAILLE[790 / 2] < 0)
|
||||
v54 = -_vm->_globals.STAILLE[790 / 2];
|
||||
v53->field4 = -(100 * (67 - (100 - v54)) / 67);
|
||||
_vm->_globals._saveData->data[svField357] = 1;
|
||||
_vm->_globals._saveData->data[svField354] = 0;
|
||||
_vm->_globals._saveData->data[svField356] = 0;
|
||||
_vm->_globals._saveData->data[svField355] = 1;
|
||||
_vm->_globals._saveData->_data[svField357] = 1;
|
||||
_vm->_globals._saveData->_data[svField354] = 0;
|
||||
_vm->_globals._saveData->_data[svField356] = 0;
|
||||
_vm->_globals._saveData->_data[svField355] = 1;
|
||||
_vm->_objectsManager._twoCharactersFl = true;
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 373, 191, 3);
|
||||
_vm->_objectsManager.addStaticSprite(_vm->_globals.TETE, v53->_pos, 1, 3, v53->field4, 0, 20, 127);
|
||||
@ -2221,7 +2221,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
case 243:
|
||||
_vm->_soundManager.playSound("SOUND88.WAV");
|
||||
if (_vm->_globals._saveData->data[svField341] == 2) {
|
||||
if (_vm->_globals._saveData->_data[svField341] == 2) {
|
||||
_vm->_animationManager.NO_SEQ = true;
|
||||
_vm->_animationManager.playSequence("RESU.SEQ", 2, 24, 2);
|
||||
_vm->_animationManager.NO_SEQ = false;
|
||||
@ -2236,7 +2236,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_globals.ZONEP[4]._destX = 276;
|
||||
_vm->_objectsManager.enableVerb(4, 19);
|
||||
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 285, 379, 0);
|
||||
_vm->_globals._saveData->data[svField399] = 1;
|
||||
_vm->_globals._saveData->_data[svField399] = 1;
|
||||
break;
|
||||
|
||||
case 246:
|
||||
@ -2375,11 +2375,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
opcodeType = 1;
|
||||
int idx = (int16)READ_LE_UINT16(dataP + 5);
|
||||
assert(idx >= 0 && idx < 2050);
|
||||
_vm->_globals._saveData->data[idx] = dataP[7];
|
||||
_vm->_globals._saveData->data[idx + 1] = dataP[8];
|
||||
_vm->_globals._saveData->_data[idx] = dataP[7];
|
||||
_vm->_globals._saveData->_data[idx + 1] = dataP[8];
|
||||
} else if (dataP[2] == 'A' && dataP[3] == 'D' && dataP[4] == 'D') {
|
||||
opcodeType = 1;
|
||||
_vm->_globals._saveData->data[(int16)READ_LE_UINT16(dataP + 5)] += dataP[7];
|
||||
_vm->_globals._saveData->_data[(int16)READ_LE_UINT16(dataP + 5)] += dataP[7];
|
||||
} else if (dataP[2] == 'B' && dataP[3] == 'O' && dataP[4] == 'S') {
|
||||
opcodeType = 1;
|
||||
_vm->_objectsManager.BOB_OFFSET((int16)READ_LE_UINT16(dataP + 5), (int16)READ_LE_UINT16(dataP + 7));
|
||||
@ -2459,24 +2459,24 @@ LABEL_2:
|
||||
int saveDataIdx1 = (int16)READ_LE_UINT16(buf + 5);
|
||||
int compVal1 = (int16)READ_LE_UINT16(buf + 7);
|
||||
bool check1Fl = false;
|
||||
if ((oper == 1 && _vm->_globals._saveData->data[saveDataIdx1] == compVal1) ||
|
||||
(oper == 2 && _vm->_globals._saveData->data[saveDataIdx1] != compVal1) ||
|
||||
(oper == 3 && _vm->_globals._saveData->data[saveDataIdx1] <= compVal1) ||
|
||||
(oper == 4 && _vm->_globals._saveData->data[saveDataIdx1] >= compVal1) ||
|
||||
(oper == 5 && _vm->_globals._saveData->data[saveDataIdx1] > compVal1) ||
|
||||
(oper == 6 && _vm->_globals._saveData->data[saveDataIdx1] < compVal1))
|
||||
if ((oper == 1 && _vm->_globals._saveData->_data[saveDataIdx1] == compVal1) ||
|
||||
(oper == 2 && _vm->_globals._saveData->_data[saveDataIdx1] != compVal1) ||
|
||||
(oper == 3 && _vm->_globals._saveData->_data[saveDataIdx1] <= compVal1) ||
|
||||
(oper == 4 && _vm->_globals._saveData->_data[saveDataIdx1] >= compVal1) ||
|
||||
(oper == 5 && _vm->_globals._saveData->_data[saveDataIdx1] > compVal1) ||
|
||||
(oper == 6 && _vm->_globals._saveData->_data[saveDataIdx1] < compVal1))
|
||||
check1Fl = true;
|
||||
|
||||
bool check2Fl = false;
|
||||
if (operType != 3) {
|
||||
int saveDataIdx2 = (int16)READ_LE_UINT16(buf + 9);
|
||||
int compVal2 = (int16)READ_LE_UINT16(buf + 11);
|
||||
if ((oper2 == 1 && compVal2 == _vm->_globals._saveData->data[saveDataIdx2]) ||
|
||||
(oper2 == 2 && compVal2 != _vm->_globals._saveData->data[saveDataIdx2]) ||
|
||||
(oper2 == 3 && compVal2 >= _vm->_globals._saveData->data[saveDataIdx2]) ||
|
||||
(oper2 == 4 && compVal2 <= _vm->_globals._saveData->data[saveDataIdx2]) ||
|
||||
(oper2 == 5 && compVal2 < _vm->_globals._saveData->data[saveDataIdx2]) ||
|
||||
(oper2 == 6 && compVal2 > _vm->_globals._saveData->data[saveDataIdx2]))
|
||||
if ((oper2 == 1 && compVal2 == _vm->_globals._saveData->_data[saveDataIdx2]) ||
|
||||
(oper2 == 2 && compVal2 != _vm->_globals._saveData->_data[saveDataIdx2]) ||
|
||||
(oper2 == 3 && compVal2 >= _vm->_globals._saveData->_data[saveDataIdx2]) ||
|
||||
(oper2 == 4 && compVal2 <= _vm->_globals._saveData->_data[saveDataIdx2]) ||
|
||||
(oper2 == 5 && compVal2 < _vm->_globals._saveData->_data[saveDataIdx2]) ||
|
||||
(oper2 == 6 && compVal2 > _vm->_globals._saveData->_data[saveDataIdx2]))
|
||||
check2Fl = true;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
||||
_characterBuffer = _vm->_fileManager.loadFile(filename);
|
||||
_characterSize = _vm->_fileManager.fileSize(filename);
|
||||
}
|
||||
_vm->_globals._saveData->data[svField4] = 0;
|
||||
_vm->_globals._saveData->_data[svField4] = 0;
|
||||
getStringFromBuffer(40, spriteFilename, (const char *)_characterBuffer);
|
||||
getStringFromBuffer(0, _questionsFilename, (const char *)_characterBuffer);
|
||||
getStringFromBuffer(20, _answersFilename, (const char *)_characterBuffer);
|
||||
@ -163,7 +163,7 @@ void TalkManager::PARLER_PERSO2(const Common::String &filename) {
|
||||
_characterSize = _vm->_fileManager.fileSize(filename);
|
||||
}
|
||||
|
||||
_vm->_globals._saveData->data[svField4] = 0;
|
||||
_vm->_globals._saveData->_data[svField4] = 0;
|
||||
getStringFromBuffer(0, _questionsFilename, (const char *)_characterBuffer);
|
||||
getStringFromBuffer(20, _answersFilename, (const char *)_characterBuffer);
|
||||
|
||||
@ -357,7 +357,7 @@ int TalkManager::DIALOGUE_REP(int idx) {
|
||||
v7 = (int16)READ_LE_UINT16((uint16 *)v3 + 9);
|
||||
|
||||
if (v7)
|
||||
_vm->_globals._saveData->data[svField4] = v7;
|
||||
_vm->_globals._saveData->_data[svField4] = v7;
|
||||
|
||||
if (!v6)
|
||||
v6 = 10;
|
||||
@ -897,7 +897,7 @@ LABEL_2:
|
||||
}
|
||||
} while (!loopCond);
|
||||
_vm->_globals.freeMemory(ptr);
|
||||
_vm->_globals._saveData->data[svField2] = 0;
|
||||
_vm->_globals._saveData->_data[svField2] = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -906,7 +906,7 @@ LABEL_2:
|
||||
|
||||
void TalkManager::REPONSE2(int a1, int a2) {
|
||||
int indx = 0;
|
||||
if (a2 != 5 || _vm->_globals._saveData->data[svField3] != 4)
|
||||
if (a2 != 5 || _vm->_globals._saveData->_data[svField3] != 4)
|
||||
return;
|
||||
|
||||
if (a1 == 22 || a1 == 23) {
|
||||
@ -954,7 +954,7 @@ void TalkManager::REPONSE2(int a1, int a2) {
|
||||
indx = 213;
|
||||
break;
|
||||
}
|
||||
_vm->_globals._saveData->data[indx] = 2;
|
||||
_vm->_globals._saveData->_data[indx] = 2;
|
||||
_vm->_objectsManager.disableZone(22);
|
||||
_vm->_objectsManager.disableZone(23);
|
||||
} else if (a1 == 20 || a1 == 21) {
|
||||
@ -1001,7 +1001,7 @@ void TalkManager::REPONSE2(int a1, int a2) {
|
||||
indx = 212;
|
||||
break;
|
||||
}
|
||||
_vm->_globals._saveData->data[indx] = 2;
|
||||
_vm->_globals._saveData->_data[indx] = 2;
|
||||
_vm->_objectsManager.disableZone(21);
|
||||
_vm->_objectsManager.disableZone(20);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user