diff options
author | Strangerke | 2012-12-16 14:22:24 +0100 |
---|---|---|
committer | Strangerke | 2012-12-16 14:22:24 +0100 |
commit | 385d097167a6aaa0a2c1edc0e23c4b55cbd41230 (patch) | |
tree | f05f354f3ce26577b17c702f7cfeb58052f9e3b4 /engines/hopkins | |
parent | 0aab5168ce61d51fe0034db3c30247dd23b22813 (diff) | |
download | scummvm-rg350-385d097167a6aaa0a2c1edc0e23c4b55cbd41230.tar.gz scummvm-rg350-385d097167a6aaa0a2c1edc0e23c4b55cbd41230.tar.bz2 scummvm-rg350-385d097167a6aaa0a2c1edc0e23c4b55cbd41230.zip |
HOPKINS: Some more renaming
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/dialogs.cpp | 14 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 6 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 26 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 102 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 10 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 4 |
11 files changed, 94 insertions, 92 deletions
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index 627a3c8fe0..2c17d24e2e 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -357,7 +357,7 @@ LABEL_7: int v16 = 0; for (int v5 = 1; v5 <= 6; v5++) { ++v4; - int v6 = _vm->_globals.INVENTAIRE[v4]; + int v6 = _vm->_globals._inventory[v4]; if (v6 && v4 <= 29) { byte *v7 = _vm->_objectsManager.CAPTURE_OBJET(v6, 0); _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, v7, v19 + v16 + 6, @@ -401,13 +401,13 @@ LABEL_7: if (_vm->_eventsManager._mouseCursorId == 1 || _vm->_eventsManager._mouseCursorId == 16 || !_vm->_eventsManager._mouseCursorId || (uint16)(_vm->_eventsManager._mouseCursorId - 2) <= 1u) break; v9 = v13; - _vm->_objectsManager.VALID_OBJET(_vm->_globals.INVENTAIRE[v13]); + _vm->_objectsManager.VALID_OBJET(_vm->_globals._inventory[v13]); if (_vm->_eventsManager._mouseCursorId == 8) v20 = true; if (!v20) { _vm->_scriptManager.TRAVAILOBJET = 1; - _vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals.OBJET_EN_COURS; - _vm->_globals.SAUVEGARDE->data[svField8] = _vm->_globals.INVENTAIRE[v13]; + _vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals._curObjectIndex; + _vm->_globals.SAUVEGARDE->data[svField8] = _vm->_globals._inventory[v13]; _vm->_globals.SAUVEGARDE->data[svField9] = _vm->_eventsManager._mouseCursorId; _vm->_objectsManager.OPTI_OBJET(); _vm->_scriptManager.TRAVAILOBJET = 0; @@ -583,7 +583,7 @@ void DialogsManager::showLoadGame() { _vm->_saveLoadManager.restore(slotNumber); } - _vm->_objectsManager.CHANGE_OBJET(14); + _vm->_objectsManager.changeObject(14); } /** @@ -641,9 +641,9 @@ void DialogsManager::showSaveLoad(int a1) { break; } - _vm->_objectsManager.SL_SPR = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + _vm->_objectsManager.SL_SPR = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER); _vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "SAVE2.SPR"); - _vm->_objectsManager.SL_SPR2 = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + _vm->_objectsManager.SL_SPR2 = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER); _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 483, 360, 0); if (_vm->_globals.FR) { diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 17909b16a1..4667219af6 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -374,7 +374,7 @@ LABEL_34: } LABEL_35: if (!_vm->_globals.PUBEXIT) - _vm->_objectsManager.AFF_SPRITES(); + _vm->_objectsManager.displaySprite(); if (_mouseFl != true) { updateCursor(); goto LABEL_54; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 0d6a77e496..56e09260f2 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -109,7 +109,7 @@ Globals::Globals() { Common::fill((byte *)&Hopkins[i], (byte *)&Hopkins[i] + sizeof(HopkinsItem), 0); for (int i = 0; i < 36; ++i) - INVENTAIRE[i] = 0; + _inventory[i] = 0; for (int i = 0; i < 51; ++i) Common::fill((byte *)&Tri[i], (byte *)&Tri[i] + sizeof(TriItem), 0); @@ -132,7 +132,7 @@ Globals::Globals() { TETE = NULL; texte_long = 0; TEXTE_FORMATE = 0; - OBJET_EN_COURS = 0; + _curObjectIndex = 0; NUM_FICHIER_OBJ = 0; nbrligne = 0; largeur_boite = 0; @@ -142,7 +142,7 @@ Globals::Globals() { HELICO = 0; CAT_POSI = 0; CAT_TAILLE = 0; - Nouv_objet = 0; + _newObjectFl = false; iRegul = 0; SORTIE = 0; PLANX = PLANY = 0; @@ -368,7 +368,7 @@ void Globals::clearAll() { COUCOU = g_PTRNUL; SPRITE_ECRAN = g_PTRNUL; SAUVEGARDE = (Sauvegarde *)g_PTRNUL; - OBJET_EN_COURS = 0; + _curObjectIndex = 0; for (int idx = 0; idx < 105; ++idx) { ZONEP[idx].destX = 0; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 2019e7d098..4dc0034fc3 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -333,7 +333,7 @@ public: int16 super_parcours[32002]; int Param[2100]; HopkinsItem Hopkins[70]; - int INVENTAIRE[36]; + int _inventory[36]; TriItem Tri[51]; int FR; int SVGA; @@ -386,7 +386,7 @@ public: int16 *essai2; byte *inventaire2; byte *GESTE; - int OBJET_EN_COURS; + int _curObjectIndex; int NUM_FICHIER_OBJ; int nbrligne; int largeur_boite; @@ -403,7 +403,7 @@ public: byte *ADR_FICHIER_OBJ; byte *PERSO; int OBJL, OBJH; - int Nouv_objet; + bool _newObjectFl; int HELICO; uint32 CAT_POSI; uint32 CAT_TAILLE; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index c156e37d3a..9e70258a09 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -129,8 +129,8 @@ bool HopkinsEngine::runWin95Demo() { _globals.SVGA = 1; _globals.CHARGE_OBJET(); - _objectsManager.CHANGE_OBJET(14); - _objectsManager.AJOUTE_OBJET(14); + _objectsManager.changeObject(14); + _objectsManager.addObject(14); _globals.HELICO = 0; _globals.iRegul = 1; @@ -455,8 +455,8 @@ bool HopkinsEngine::runWin95Demo() { bool HopkinsEngine::runLinuxDemo() { _globals.CHARGE_OBJET(); - _objectsManager.CHANGE_OBJET(14); - _objectsManager.AJOUTE_OBJET(14); + _objectsManager.changeObject(14); + _objectsManager.addObject(14); _globals.HELICO = 0; _eventsManager.mouseOff(); @@ -828,8 +828,8 @@ bool HopkinsEngine::runBeOSFull() { warning("TODO: Init_Interrupt()"); _globals.CHARGE_OBJET(); - _objectsManager.CHANGE_OBJET(14); - _objectsManager.AJOUTE_OBJET(14); + _objectsManager.changeObject(14); + _objectsManager.addObject(14); _eventsManager.delay(500); _graphicsManager.FADE_OUTW(); _globals.iRegul = 1; @@ -1216,7 +1216,7 @@ bool HopkinsEngine::runBeOSFull() { _soundManager.WSOUND(13); if (_globals.FORETSPR == g_PTRNUL) { _fileManager.constructFilename(_globals.HOPSYSTEM, "HOPDEG.SPR"); - _globals.FORETSPR = _objectsManager.CHARGE_SPRITE(_globals.NFICHIER); + _globals.FORETSPR = _objectsManager.loadSprite(_globals.NFICHIER); _soundManager.CHARGE_SAMPLE(1, "SOUND41.WAV"); } @@ -1673,8 +1673,8 @@ bool HopkinsEngine::runWin95full() { warning("TODO: Init_Interrupt_()"); _globals.CHARGE_OBJET(); - _objectsManager.CHANGE_OBJET(14); - _objectsManager.AJOUTE_OBJET(14); + _objectsManager.changeObject(14); + _objectsManager.addObject(14); _globals.HELICO = 0; _globals.iRegul = 1; @@ -2082,7 +2082,7 @@ bool HopkinsEngine::runWin95full() { _soundManager.WSOUND(13); if (_globals.FORETSPR == g_PTRNUL) { _fileManager.constructFilename(_globals.HOPSYSTEM, "HOPDEG.SPR"); - _globals.FORETSPR = _objectsManager.CHARGE_SPRITE(_globals.NFICHIER); + _globals.FORETSPR = _objectsManager.loadSprite(_globals.NFICHIER); _soundManager.CHARGE_SAMPLE(1, "SOUND41.WAV"); } _objectsManager.PERSONAGE2(im, im, "BANDIT", im, 13); @@ -2548,8 +2548,8 @@ bool HopkinsEngine::runLinuxFull() { _soundManager.WSOUND(16); _globals.CHARGE_OBJET(); - _objectsManager.CHANGE_OBJET(14); - _objectsManager.AJOUTE_OBJET(14); + _objectsManager.changeObject(14); + _objectsManager.addObject(14); _globals.HELICO = 0; _eventsManager.mouseOff(); @@ -2960,7 +2960,7 @@ bool HopkinsEngine::runLinuxFull() { _soundManager.WSOUND(13); if (_globals.FORETSPR == g_PTRNUL) { _fileManager.constructFilename(_globals.HOPSYSTEM, "HOPDEG.SPR"); - _globals.FORETSPR = _objectsManager.CHARGE_SPRITE(_globals.NFICHIER); + _globals.FORETSPR = _objectsManager.loadSprite(_globals.NFICHIER); _soundManager.CHARGE_SAMPLE(1, "SOUND41.WAV"); } _objectsManager.PERSONAGE2(im, im, "BANDIT", im, 13); diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index e63cde6b34..6f17879cba 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -64,10 +64,10 @@ int MenuManager::MENU() { _vm->_globals.SORTIE = 0; for (int idx = 0; idx < 31; ++idx) - _vm->_globals.INVENTAIRE[idx] = 0; + _vm->_globals._inventory[idx] = 0; memset(_vm->_globals.SAUVEGARDE, 0, 2000); - _vm->_objectsManager.AJOUTE_OBJET(14); + _vm->_objectsManager.addObject(14); frame5Index = 0; frame4Index = 0; frame3Index = 0; @@ -90,7 +90,7 @@ int MenuManager::MENU() { else if (_vm->_globals.FR == 2) _vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "MENUES.SPR"); - spriteData = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + spriteData = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER); _vm->_eventsManager.mouseOn(); _vm->_eventsManager.changeMouseCursor(0); _vm->_eventsManager._mouseCursorId = 0; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 36c5395ab8..2750b97489 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -99,13 +99,13 @@ void ObjectsManager::setParent(HopkinsEngine *vm) { _vm = vm; } -// Change Object -byte *ObjectsManager::CHANGE_OBJET(int objIndex) { - byte *result = CAPTURE_OBJET(objIndex, 1); - _vm->_eventsManager._objectBuf = result; - _vm->_globals.Nouv_objet = 1; - _vm->_globals.OBJET_EN_COURS = objIndex; - return result; +/** + * Change Object + */ +void ObjectsManager::changeObject(int objIndex) { + _vm->_eventsManager._objectBuf = CAPTURE_OBJET(objIndex, 1); + _vm->_globals._newObjectFl = true; + _vm->_globals._curObjectIndex = objIndex; } byte *ObjectsManager::CAPTURE_OBJET(int objIndex, int mode) { @@ -122,7 +122,7 @@ byte *ObjectsManager::CAPTURE_OBJET(int objIndex, int mode) { ObjectsManager::DEL_FICHIER_OBJ(); if (val1 == 1) { _vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "OBJET1.SPR"); - _vm->_globals.ADR_FICHIER_OBJ = ObjectsManager::CHARGE_SPRITE(_vm->_globals.NFICHIER); + _vm->_globals.ADR_FICHIER_OBJ = ObjectsManager::loadSprite(_vm->_globals.NFICHIER); } _vm->_globals.NUM_FICHIER_OBJ = val1; } @@ -158,26 +158,25 @@ byte *ObjectsManager::CAPTURE_OBJET(int objIndex, int mode) { return dataP; } -// Delete Object -void ObjectsManager::DELETE_OBJET(int objIndex) { - byte lookCond = false; - int v2 = 0; - do { - ++v2; - if (_vm->_globals.INVENTAIRE[v2] == objIndex) - lookCond = true; - if (v2 > 32) - lookCond = true; - } while (!lookCond); - if (v2 <= 32) { - if (v2 == 32) { - _vm->_globals.INVENTAIRE[32] = 0; +/** + * Remove an Object from the inventory + */ +void ObjectsManager::removeObject(int objIndex) { + int idx; + for (idx = 1; idx <= 32; ++idx) { + if (_vm->_globals._inventory[idx] == objIndex) + break; + } + + if (idx <= 32) { + if (idx == 32) { + _vm->_globals._inventory[32] = 0; } else { - for (int i = v2; i < 32; ++i) - _vm->_globals.INVENTAIRE[i] = _vm->_globals.INVENTAIRE[i + 1]; + for (int i = idx; i < 32; ++i) + _vm->_globals._inventory[i] = _vm->_globals._inventory[i + 1]; } } - CHANGE_OBJET(14); + changeObject(14); } @@ -267,8 +266,10 @@ byte *ObjectsManager::DEL_FICHIER_OBJ() { return g_PTRNUL; } -// Load Sprite -byte *ObjectsManager::CHARGE_SPRITE(const Common::String &file) { +/** + * Load Sprite from file + */ +byte *ObjectsManager::loadSprite(const Common::String &file) { return _vm->_fileManager.loadFile(file); } @@ -285,24 +286,28 @@ int ObjectsManager::capture_mem_sprite(const byte *objectData, byte *sprite, int return result; } -// Add Object -int ObjectsManager::AJOUTE_OBJET(int objIndex) { +/** + * Add Object + */ +int ObjectsManager::addObject(int objIndex) { bool flag = false; int arrIndex = 0; do { ++arrIndex; - if (!_vm->_globals.INVENTAIRE[arrIndex]) + if (!_vm->_globals._inventory[arrIndex]) flag = true; if (arrIndex == 32) flag = true; } while (!flag); - _vm->_globals.INVENTAIRE[arrIndex] = objIndex; + _vm->_globals._inventory[arrIndex] = objIndex; return arrIndex; } -// Display Sprite -void ObjectsManager::AFF_SPRITES() { +/** + * Display Sprite + */ +void ObjectsManager::displaySprite() { int v1; int v2; int destX; @@ -865,13 +870,11 @@ void ObjectsManager::VERIFCACHE() { int v5; int v6; int v7; - int v8; int v9; int v10; int v11; - v8 = 0; - do { + for (int v8 = 0; v8 <= 19; v8++) { if (_vm->_globals.Cache[v8].fieldA > 0) { v7 = _vm->_globals.Cache[v8].fieldA; v10 = 0; @@ -937,8 +940,7 @@ void ObjectsManager::VERIFCACHE() { _vm->_globals.Cache[v8].field10 = 1; } } - ++v8; - } while (v8 <= 19); + } } void ObjectsManager::DEF_SPRITE(int idx) { @@ -2823,7 +2825,7 @@ LABEL_65: if (_vm->_globals.PLAN_FLAG == true) _vm->_globals.SAUVEGARDE->data[svField1] = 6; _vm->_globals.SAUVEGARDE->data[svField2] = NUMZONE; - _vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals.OBJET_EN_COURS; + _vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals._curObjectIndex; _vm->_globals.GOACTION = 1; } _vm->_fontManager.hideText(5); @@ -2834,7 +2836,7 @@ LABEL_65: ARRET_PERSO_NUM = _vm->_globals.BOBZONE[NUMZONE]; } if (_vm->_globals.ECRAN == 20 && _vm->_globals.SAUVEGARDE->data[svField132] == 1 - && _vm->_globals.OBJET_EN_COURS == 20 && NUMZONE == 12 + && _vm->_globals._curObjectIndex == 20 && NUMZONE == 12 && _vm->_eventsManager._mouseCursorId == 23) { // Special case for throwing darts at the switch in Purgatory - the player shouldn't move _vm->_globals.chemin = (int16 *)g_PTRNUL; @@ -3994,7 +3996,7 @@ void ObjectsManager::initBorder(int a1) { _vm->_eventsManager._mouseCursorId = 8; if (a1 == 29) _vm->_eventsManager._mouseCursorId = 1; - if ((uint16)(a1 - 1) <= 0x1Bu && !_vm->_globals.INVENTAIRE[a1]) { + if ((uint16)(a1 - 1) <= 0x1Bu && !_vm->_globals._inventory[a1]) { _vm->_eventsManager._mouseCursorId = 0; _borderPos = Common::Point(0, 0); _borderSpriteIndex = 0; @@ -4043,12 +4045,12 @@ void ObjectsManager::OBJETPLUS(int idx) { do { _vm->_eventsManager._mouseCursorId = 6; LABEL_24: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field2 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field2 == 1) break; ++_vm->_eventsManager._mouseCursorId; if (_vm->_eventsManager._mouseCursorId == 7) { LABEL_26: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field3 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field3 == 1) return; } v3 = _vm->_eventsManager._mouseCursorId++; @@ -4057,42 +4059,42 @@ LABEL_26: _vm->_eventsManager._mouseCursorId = v3 + 3; if (v3 == 7) { LABEL_29: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field7 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field7 == 1) return; } ++_vm->_eventsManager._mouseCursorId; if (_vm->_eventsManager._mouseCursorId == 11) { LABEL_31: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field4 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field4 == 1) return; } _vm->_eventsManager._mouseCursorId += 2; if (_vm->_eventsManager._mouseCursorId == 13) { LABEL_33: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field5 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field5 == 1) return; } _vm->_eventsManager._mouseCursorId += 2; if (_vm->_eventsManager._mouseCursorId == 15) { LABEL_35: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field6 == 1) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field6 == 1) return; } _vm->_eventsManager._mouseCursorId = 23; LABEL_37: - if (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field6 == 2) + if (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field6 == 2) break; _vm->_eventsManager._mouseCursorId = 25; LABEL_39: ; - } while (_vm->_globals.ObjetW[_vm->_globals.INVENTAIRE[idx]].field7 != 2); + } while (_vm->_globals.ObjetW[_vm->_globals._inventory[idx]].field7 != 2); } } } void ObjectsManager::VALID_OBJET(int a1) { if (_vm->_eventsManager._mouseCursorId == 8) - CHANGE_OBJET(a1); + changeObject(a1); } void ObjectsManager::OPTI_OBJET() { diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 0faf0f3a32..db2fd9e912 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -121,23 +121,23 @@ public: ObjectsManager(); void setParent(HopkinsEngine *vm); - byte *CHANGE_OBJET(int objIndex); + void changeObject(int objIndex); byte *CAPTURE_OBJET(int objIndex, int mode); - void DELETE_OBJET(int objIndex); + void removeObject(int objIndex); int getWidth(const byte *objectData, int idx); int getHeight(const byte *objectData, int idx); int sprite_alone(const byte *objectData, byte *sprite, int objIndex); byte *DEL_FICHIER_OBJ(); - byte *CHARGE_SPRITE(const Common::String &file); + byte *loadSprite(const Common::String &file); void set_offsetxy(byte *data, int idx, int xp, int yp, bool isSize); int get_offsetx(const byte *spriteData, int spriteIndex, bool isSize); int get_offsety(const byte *spriteData, int spriteIndex, bool isSize); - void AFF_SPRITES(); + void displaySprite(); int capture_mem_sprite(const byte *objectData, byte *sprite, int objIndex); - int AJOUTE_OBJET(int objIndex); + int addObject(int objIndex); void INIT_BOB(); void BOB_ZERO(int idx); diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index f56706a44e..18cb26e002 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -144,7 +144,7 @@ Common::Error SaveLoadManager::save(int slot, const Common::String &saveName) { // Set up the inventory for (int i = 0; i < 35; ++i) - _vm->_globals.SAUVEGARDE->inventory[i] = _vm->_globals.INVENTAIRE[i]; + _vm->_globals.SAUVEGARDE->inventory[i] = _vm->_globals._inventory[i]; /* Create the savegame */ Common::OutSaveFile *saveFile = g_system->getSavefileManager()->openForSaving( @@ -196,7 +196,7 @@ Common::Error SaveLoadManager::restore(int slot) { // Unpack the inventory for (int i = 0; i < 35; ++i) - _vm->_globals.INVENTAIRE[i] = _vm->_globals.SAUVEGARDE->inventory[i]; + _vm->_globals._inventory[i] = _vm->_globals.SAUVEGARDE->inventory[i]; // Set variables from loaded data as necessary _vm->_globals.SAUVEGARDE->data[svField10] = slot; diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index b4d72f1494..072a63cf28 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -493,11 +493,11 @@ LABEL_1141: if (*(a1 + 2) == 'O') { if (*(a1 + 3) == 'B' && *(a1 + 4) == 'P') { v1 = 1; - _vm->_objectsManager.AJOUTE_OBJET((int16)READ_LE_UINT16(a1 + 5)); + _vm->_objectsManager.addObject((int16)READ_LE_UINT16(a1 + 5)); } if (*(a1 + 2) == 'O' && *(a1 + 3) == 'B' && *(a1 + 4) == 'M') { v1 = 1; - _vm->_objectsManager.DELETE_OBJET((int16)READ_LE_UINT16(a1 + 5)); + _vm->_objectsManager.removeObject((int16)READ_LE_UINT16(a1 + 5)); } } if (*(a1 + 2) == 'G' && *(a1 + 3) == 'O' && *(a1 + 4) == 'T') diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 77b8fdc6a5..292afafc98 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -100,7 +100,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { _vm->_globals.CAT_FLAG = true; _vm->_fileManager.constructFilename(_vm->_globals.HOPANIM, "RES_SAN.RES"); } - PERSOSPR = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + PERSOSPR = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER); _vm->_globals.CAT_FLAG = false; _vm->_fileManager.constructLinuxFilename("TEMP.SCR"); @@ -1230,7 +1230,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { _vm->_globals.CAT_FLAG = true; _vm->_fileManager.constructFilename(_vm->_globals.HOPANIM, "RES_SAN.RES"); } - PERSOSPR = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + PERSOSPR = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER); _vm->_globals.CAT_FLAG = false; _vm->_fileManager.constructLinuxFilename("TEMP.SCR"); |