diff options
author | Filippos Karapetis | 2013-01-08 13:30:33 +0200 |
---|---|---|
committer | Filippos Karapetis | 2013-01-08 13:30:33 +0200 |
commit | 7462978be5d01dce90b046cb633db46b135fb19d (patch) | |
tree | 35f932d62424944bf8d10d9cb1207027a0af1863 | |
parent | fddc6497bf316e6e44b258b1c7fd9adc0749bd72 (diff) | |
download | scummvm-rg350-7462978be5d01dce90b046cb633db46b135fb19d.tar.gz scummvm-rg350-7462978be5d01dce90b046cb633db46b135fb19d.tar.bz2 scummvm-rg350-7462978be5d01dce90b046cb633db46b135fb19d.zip |
HOPKINS: Get rid of more useless global variables
-rw-r--r-- | engines/hopkins/globals.cpp | 13 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 13 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 1 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 4 |
5 files changed, 2 insertions, 33 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index baafaeb975..a4d03f5794 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -115,7 +115,6 @@ Globals::Globals() { // Initialise fields _language = LANG_EN; - _internetFl = true; PUBEXIT = false; _speed = 1; @@ -162,7 +161,6 @@ Globals::Globals() { _actionDirection = 0; SegmentEnCours = 0; STOP_BUG = 0; - MAX_COMPTE = 0; Credit_bx = -1; Credit_bx1 = -1; @@ -194,9 +192,7 @@ Globals::Globals() { _forestSprite = NULL; COUCOU = NULL; chemin = NULL; - cache_souris = NULL; BufLig = NULL; - Bufferdecor = NULL; ADR_FICHIER_OBJ = NULL; police = NULL; PERSO = NULL; @@ -244,8 +240,6 @@ Globals::~Globals() { freeMemory(_inventoryObject); freeMemory(_forestSprite); freeMemory(COUCOU); - freeMemory(cache_souris); - freeMemory(Bufferdecor); freeMemory(ADR_FICHIER_OBJ); freeMemory(PERSO); @@ -276,11 +270,6 @@ void Globals::setConfig() { warning("Unknown language in internal language mapping"); break; } - - if (_vm->getIsDemo()) - _internetFl = true; - else - _internetFl = false; // End of CHECKME switch (_language) { @@ -316,7 +305,6 @@ void Globals::clearAll() { INIT_VBOB(); ADR_FICHIER_OBJ = g_PTRNUL; NUM_FICHIER_OBJ = 0; - Bufferdecor = g_PTRNUL; _vm->_eventsManager._objectBuf = g_PTRNUL; _vm->_dialogsManager._inventWin1 = g_PTRNUL; _vm->_dialogsManager._inventBuf2 = g_PTRNUL; @@ -372,7 +360,6 @@ void Globals::clearAll() { _forestSprite = g_PTRNUL; _forestFl = false; - cache_souris = allocMemory(2500); GESTE = g_PTRNUL; GESTE_FLAG = 0; } diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 877683d850..4f3e9598bb 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -329,7 +329,6 @@ public: int _inventory[36]; SortItem _sortedDisplay[51]; Language _language; - bool _internetFl; bool PUBEXIT; int PERSO_TYPE; uint _speed; @@ -363,9 +362,7 @@ public: bool _forestFl; byte *COUCOU; int16 *chemin; - byte *cache_souris; int16 *BufLig; - byte *Bufferdecor; byte *ADR_FICHIER_OBJ; byte *PERSO; int _objectWidth, _objectHeight; @@ -407,7 +404,6 @@ public: int couleur_40; int STOP_BUG; - int MAX_COMPTE; int force_to_data_0; int oldzone_46; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 94bfa239db..8c8b53a5a5 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -462,11 +462,6 @@ bool HopkinsEngine::runLinuxDemo() { _eventsManager.delay(1500); _graphicsManager.fadeOutLong(); - if (!_globals._internetFl) { - _graphicsManager.FADE_LINUX = 2; - _animationManager.playAnim("MP.ANM", 10, 16, 200); - } - _graphicsManager.loadImage("H2"); _graphicsManager.fadeInLong(); _eventsManager.delay(500); @@ -2505,14 +2500,6 @@ void HopkinsEngine::loadCredits() { _globals.Credit_lignes = idxLines; } while (!loopCond); -/* Useless - v5 = 0; - if (_globals.Credit_lignes > 0) { - do - ++v5; - while (v5 < _globals.Credit_lignes); - } -*/ _globals.freeMemory(bufPtr); } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index a5659bca6f..99b992bb23 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -5010,7 +5010,6 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm _vm->_dialogsManager._inventFl = false; _vm->_eventsManager._gameKey = KEY_NONE; _verb = 4; - _vm->_globals.MAX_COMPTE = 6; _vm->_graphicsManager._scrollOffset = 0; _vm->_dialogsManager._removeInventFl = false; _vm->_globals.PLAN_FLAG = false; diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index f98ce3a5c0..4bd280a355 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -2270,7 +2270,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 600: - if (!_vm->_globals._internetFl) { + if (!_vm->getIsDemo()) { _vm->_graphicsManager.FADE_LINUX = 2; _vm->_graphicsManager._fadeDefaultSpeed = 1; _vm->_animationManager.playAnim("BOMBE1A.ANM", 100, 18, 100); @@ -2353,7 +2353,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 607: - if (!_vm->_globals._internetFl) { + if (!_vm->getIsDemo()) { memcpy(_vm->_graphicsManager._oldPalette, _vm->_graphicsManager._palette, 769); _vm->_animationManager.playAnim2("PLAN.ANM", 50, 10, 800); } |