diff options
author | Filippos Karapetis | 2013-01-08 13:39:14 +0200 |
---|---|---|
committer | Filippos Karapetis | 2013-01-08 13:39:14 +0200 |
commit | 2b1b6689086e73b77041ec36a8337f044486ad73 (patch) | |
tree | dd3fbcbb9625a4e7da3a400a8b6289ccfe7a5e9c | |
parent | 7462978be5d01dce90b046cb633db46b135fb19d (diff) | |
download | scummvm-rg350-2b1b6689086e73b77041ec36a8337f044486ad73.tar.gz scummvm-rg350-2b1b6689086e73b77041ec36a8337f044486ad73.tar.bz2 scummvm-rg350-2b1b6689086e73b77041ec36a8337f044486ad73.zip |
HOPKINS: Get rid of the NO_VISU global variable
-rw-r--r-- | engines/hopkins/globals.cpp | 1 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 1 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 4 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 30 |
5 files changed, 13 insertions, 31 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index a4d03f5794..7d93e31af7 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -203,7 +203,6 @@ Globals::Globals() { GESTE_FLAG = 0; _disableInventFl = false; NOMARCHE = false; - NO_VISU = false; _optionDialogFl = false; _cacheFl = false; NOPARLE = false; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 4f3e9598bb..700670563d 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -381,7 +381,6 @@ public: bool _disableInventFl; bool NOMARCHE; int NBBLOC; - bool NO_VISU; byte *OPTION_SPR; bool _optionDialogFl; int _menuDisplayType; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index aaf5962cac..93c96ab1d9 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1177,7 +1177,7 @@ void GraphicsManager::displayVesaSegment() { unlockScreen(); } -void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx) { +void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment) { int height, width; width = _vm->_objectsManager.getWidth(objectData, idx); @@ -1189,7 +1189,7 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i Sprite_Vesa(_vesaBuffer, objectData, xp + 300, yp + 300, idx); Sprite_Vesa(_vesaScreen, objectData, xp + 300, yp + 300, idx); } - if (!_vm->_globals.NO_VISU) + if (addSegment) addVesaSegment(xp, yp, xp + width, yp + height); } @@ -1625,7 +1625,7 @@ Aff_Zoom_Larg_Cont1: /** * Fast Display */ -void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex) { +void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) { int width = _vm->_objectsManager.getWidth(spriteData, spriteIndex); int height = _vm->_objectsManager.getHeight(spriteData, spriteIndex); @@ -1636,7 +1636,7 @@ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int sp Sprite_Vesa(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex); Sprite_Vesa(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex); } - if (!_vm->_globals.NO_VISU) + if (addSegment) addVesaSegment(xp, yp, xp + width, yp + height); } diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 57405773ca..2796deb685 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -152,14 +152,14 @@ public: void RESET_SEGMENT_VESA(); void addVesaSegment(int x1, int y1, int x2, int y2); void displayVesaSegment(); - void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx); + void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment = true); void CopyAsm(const byte *surface); void copy16bFromSurfaceScaleX2(const byte *surface); void Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height); int zoomIn(int v, int percentage); int zoomOut(int v, int percentage); void Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, int modeFlag); - void fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex); + void fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment = true); void SCOPY(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY); void Copy_Mem(const byte *srcSurface, int x1, int y1, unsigned int width, int height, byte *destSurface, int destX, int destY); void displayFont(byte *surface, const byte *spriteData, int xp, int yp, int characterIndex, int colour); diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 4bd280a355..1f94d4b997 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -1759,7 +1759,6 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 203: - _vm->_globals.NO_VISU = true; _vm->_objectsManager.removeSprite(0); _vm->_objectsManager.setBobAnimation(4); do { @@ -1768,10 +1767,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager.VBL(); if (_vm->_objectsManager.BOBPOSI(4) == 18) - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 18, 334, 0); + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 18, 334, 0, false); } while (_vm->_objectsManager.BOBPOSI(4) != 26); _vm->_objectsManager.stopBobAnimation(4); - _vm->_globals.NO_VISU = false; _vm->_objectsManager.SPRITE_ON(0); break; @@ -1865,7 +1863,6 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(1) != 9); _vm->_objectsManager.stopBobAnimation(1); - _vm->_globals.NO_VISU = true; _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = true; int v39 = _vm->_objectsManager.getSpriteY(0); @@ -1918,7 +1915,6 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.removeSprite(0); _vm->_globals.CACHE_OFF(); _vm->_animationManager.NO_SEQ = true; - _vm->_globals.NO_VISU = false; _vm->_soundManager.SPECIAL_SOUND = 211; _vm->_animationManager.playSequence("SECRET2.SEQ", 1, 12, 100); _vm->_soundManager.SPECIAL_SOUND = 0; @@ -2285,23 +2281,17 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 601: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(2, 0, 16, 4); break; case 602: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(4, 0, 16, 4); break; case 603: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(3, 0, 16, 4); _vm->_soundManager.SPECIAL_SOUND = 199; _vm->_graphicsManager.FADE_LINUX = 2; @@ -2313,9 +2303,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 604: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(1, 0, 16, 4); _vm->_soundManager.SPECIAL_SOUND = 199; _vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500); @@ -2326,9 +2314,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 605: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(5, 0, 16, 4); _vm->_graphicsManager.fadeOutShort(); _vm->_soundManager.SPECIAL_SOUND = 199; @@ -2341,9 +2327,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 606: - _vm->_globals.NO_VISU = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7); - _vm->_globals.NO_VISU = false; + _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(6, 0, 16, 4); if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) { _vm->_animationManager.playAnim("BOMBE3A.ANM", 50, 14, 500); |