diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/font.cpp | 1 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 3 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 2 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 2 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 14 |
8 files changed, 11 insertions, 23 deletions
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 4e2fda8d63..7d98742be3 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -353,7 +353,6 @@ LABEL_57: _text[idx]._pos.x = v73; } } - _vm->_globals.hauteur_boite = (_vm->_globals.police_h + 1) * lineCount + 2; int posX = v73; int posY = yp; int saveWidth = _vm->_globals._boxWidth + 10; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 10414beb9e..1e46ef34f2 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -132,7 +132,6 @@ Globals::Globals() { NUM_FICHIER_OBJ = 0; nbrligne = 0; _boxWidth = 0; - hauteur_boite = 0; _forestFl = false; _objectWidth = _objectHeight = 0; _helicopterFl = false; @@ -165,7 +164,6 @@ Globals::Globals() { NOT_VERIF = false; PERSO_TYPE = 0; GOACTION = false; - NECESSAIRE = false; Compteur = 0; _actionDirection = 0; _actionDirection = 0; @@ -336,7 +334,6 @@ void Globals::clearAll() { police = g_PTRNUL; police_h = 0; police_l = 0; - hauteur_boite = 0; _boxWidth = 0; _vm->_fontManager.clearAll(); diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index e4a407f755..6c79091537 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -376,7 +376,6 @@ public: int nbrligne; // Useless variable? int _boxWidth; byte *_inventoryObject; - int hauteur_boite; int GESTE_FLAG; byte *_forestSprite; bool _forestFl; @@ -423,7 +422,6 @@ public: bool _cacheFl; bool NOPARLE; bool PLAN_FLAG; - bool NECESSAIRE; bool GOACTION; int Compteur; int _actionDirection; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index d8d44a4641..828fc2d3ad 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1823,8 +1823,8 @@ void GraphicsManager::OPTI_INI(const Common::String &file, int mode) { _vm->_objectsManager._changeVerbFl = false; } -void GraphicsManager::NB_SCREEN() { - if (!_vm->_globals.NECESSAIRE) +void GraphicsManager::NB_SCREEN(bool initPalette) { + if (initPalette) initColorTable(50, 65, _palette); if (_lineNbr == SCREEN_WIDTH) diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index e77c105a12..dd1df3c6e1 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -166,7 +166,7 @@ public: void INI_ECRAN(const Common::String &file); void INI_ECRAN2(const Common::String &file); void OPTI_INI(const Common::String &file, int mode); - void NB_SCREEN(); + void NB_SCREEN(bool initPalette); void SHOW_PALETTE(); void Copy_WinScan_Vbe(const byte *srcP, byte *destP); void Copy_Video_Vbe(const byte *src); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index ec2dd6a546..8918924c23 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -3803,7 +3803,7 @@ void ObjectsManager::handleSpecialGames() { if (!_vm->_graphicsManager._lineNbr) _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(); + _vm->_graphicsManager.NB_SCREEN(true); _vm->_soundManager.SPECIAL_SOUND = 198; PERSO_ON = true; _vm->_animationManager.NO_SEQ = true; @@ -3811,9 +3811,7 @@ void ObjectsManager::handleSpecialGames() { _vm->_animationManager.playAnim("otage.ANM", 1, 24, 500); _vm->_animationManager.NO_SEQ = false; _vm->_soundManager.SPECIAL_SOUND = 0; - _vm->_globals.NECESSAIRE = true; - _vm->_graphicsManager.NB_SCREEN(); - _vm->_globals.NECESSAIRE = false; + _vm->_graphicsManager.NB_SCREEN(false); _vm->_saveLoadManager.load("TEMP1.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP1.SCR"); diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 2ab68d844d..941abebe22 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -2264,7 +2264,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.removeSprite(0); _vm->_objectsManager.OPTI_ONE(6, 0, 15, 0); _vm->_objectsManager.PERSO_ON = true; - _vm->_graphicsManager.NB_SCREEN(); + _vm->_graphicsManager.NB_SCREEN(true); _vm->_animationManager.NO_SEQ = true; _vm->_animationManager.playSequence2("TUNNEL.SEQ", 1, 18, 20); _vm->_animationManager.NO_SEQ = false; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index c87fcd7601..930e87df6c 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -95,7 +95,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { if (!_vm->_graphicsManager._lineNbr) _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(); + _vm->_graphicsManager.NB_SCREEN(true); _vm->_objectsManager.PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, false); startCharacterAnim0(_paletteBufferIdx, false); @@ -126,11 +126,9 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { } clearCharacterAnim(); _vm->_globals.NOPARLE = false; - _vm->_globals.NECESSAIRE = true; _characterBuffer = _vm->_globals.freeMemory(_characterBuffer); _characterSprite = _vm->_globals.freeMemory(_characterSprite); - _vm->_graphicsManager.NB_SCREEN(); - _vm->_globals.NECESSAIRE = false; + _vm->_graphicsManager.NB_SCREEN(false); _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); @@ -1116,9 +1114,9 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { if (!_vm->_graphicsManager._lineNbr) _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(); + _vm->_graphicsManager.NB_SCREEN(true); _paletteBufferIdx = 20 * (int16)READ_LE_UINT16((uint16 *)_characterBuffer + 42) + 110; - _vm->_graphicsManager.NB_SCREEN(); + _vm->_graphicsManager.NB_SCREEN(true); _vm->_objectsManager.PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, true); startCharacterAnim0(_paletteBufferIdx, false); @@ -1153,11 +1151,9 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { clearCharacterAnim(); clearCharacterAnim(); _vm->_globals.NOPARLE = false; - _vm->_globals.NECESSAIRE = true; _characterBuffer = _vm->_globals.freeMemory(_characterBuffer); _characterSprite = _vm->_globals.freeMemory(_characterSprite); - _vm->_graphicsManager.NB_SCREEN(); - _vm->_globals.NECESSAIRE = false; + _vm->_graphicsManager.NB_SCREEN(false); _vm->_linesManager.CLEAR_ZONE(); _vm->_linesManager.RESET_OBSTACLE(); _vm->_globals.resetCache(); |