diff options
author | Strangerke | 2012-12-16 00:26:54 +0100 |
---|---|---|
committer | Strangerke | 2012-12-16 00:26:54 +0100 |
commit | 3c31d91d97c6f621e7f9bc22e3efe3b8ca38a079 (patch) | |
tree | e564a75f7dd5dc1d2d9dbaa11f8f408ccb0d37ff | |
parent | 2d172ab46e76f416b307ae11471a09c979855702 (diff) | |
download | scummvm-rg350-3c31d91d97c6f621e7f9bc22e3efe3b8ca38a079.tar.gz scummvm-rg350-3c31d91d97c6f621e7f9bc22e3efe3b8ca38a079.tar.bz2 scummvm-rg350-3c31d91d97c6f621e7f9bc22e3efe3b8ca38a079.zip |
HOPKINS: Remove zoom, mode, SDL Zoom and fullscreen variables
Also remove functions related to the loading of INI files
-rw-r--r-- | engines/hopkins/anim.cpp | 48 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 66 | ||||
-rw-r--r-- | engines/hopkins/files.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/files.h | 1 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 3 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 3 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 139 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 2 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 22 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 5 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 9 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 10 |
12 files changed, 48 insertions, 276 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 3f3040fa45..d1c6f18425 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -321,23 +321,17 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.SCROLL = v11; _vm->_graphicsManager.SCROLL_ECRAN(v11); - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) { + if (_vm->_graphicsManager.DOUBLE_ECRAN) { _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } LABEL_112: _vm->_graphicsManager.DD_Unlock(); @@ -401,23 +395,17 @@ LABEL_88: _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.SCROLL = v11; _vm->_graphicsManager.SCROLL_ECRAN(v11); - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) { + if (_vm->_graphicsManager.DOUBLE_ECRAN) { _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } goto LABEL_112; } @@ -449,23 +437,17 @@ LABEL_88: _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.SCROLL = v11; _vm->_graphicsManager.SCROLL_ECRAN(v11); - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) { + if (_vm->_graphicsManager.DOUBLE_ECRAN) { _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } goto LABEL_112; } @@ -534,23 +516,17 @@ LABEL_114: _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.SCROLL = v11; _vm->_graphicsManager.SCROLL_ECRAN(v11); - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) { + if (_vm->_graphicsManager.DOUBLE_ECRAN) { _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.FADE_INS(); diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index e610137981..7756b2b2b1 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -435,10 +435,9 @@ LABEL_63: LABEL_65: _vm->_globals.vitesse = 2; _rateCounter = 0; - if (_vm->_graphicsManager.DOUBLE_ECRAN != true || _vm->_graphicsManager.no_scroll == 1) { + if (!_vm->_graphicsManager.DOUBLE_ECRAN || _vm->_graphicsManager.no_scroll == 1) { _vm->_graphicsManager.Affiche_Segment_Vesa(); } else { - int v4; if (_vm->_graphicsManager.no_scroll != 2) { if (getMouseX() > _vm->_graphicsManager.SCROLL + 620) _vm->_graphicsManager.SCROLL += _vm->_graphicsManager.SPEED_SCROLL; @@ -449,33 +448,14 @@ LABEL_65: _vm->_graphicsManager.SCROLL = 0; if (_vm->_graphicsManager.SCROLL > SCREEN_WIDTH) _vm->_graphicsManager.SCROLL = SCREEN_WIDTH; - if (_vm->_graphicsManager.SDL_ECHELLE) - v4 = _vm->_graphicsManager.Magic_Number(_vm->_graphicsManager.SCROLL); - else - v4 = _vm->_graphicsManager.SCROLL; - if (_vm->_graphicsManager.OLD_SCROLL == v4) { + if (_vm->_graphicsManager.OLD_SCROLL == _vm->_graphicsManager.SCROLL) { _vm->_graphicsManager.Affiche_Segment_Vesa(); } else { _vm->_fontManager.hideText(9); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) { - int v5 = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE); - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, v5); - _vm->_graphicsManager.DD_Unlock(); - _vm->_graphicsManager.dstrect[0].left = _vm->_graphicsManager.zoomIn(0, _vm->_graphicsManager.SDL_ECHELLE); - _vm->_graphicsManager.dstrect[0].top = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE); - _vm->_graphicsManager.dstrect[0].setWidth(_vm->_graphicsManager.zoomIn(0x280u, _vm->_graphicsManager.SDL_ECHELLE)); - _vm->_graphicsManager.dstrect[0].setHeight(_vm->_graphicsManager.zoomIn(0x1B8u, _vm->_graphicsManager.SDL_ECHELLE)); - } else { - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, 20); - _vm->_graphicsManager.DD_Unlock(); - _vm->_graphicsManager.dstrect[0] = Common::Rect(0, 20, SCREEN_WIDTH, 460); - } - - // CHECKME: Useless? - // if (!_vm->_globals.BPP_NOAFF) { - // // SDL_UpdateRects(LinuxScr, 1, dstrect); - // } + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.SCROLL, 20, SCREEN_WIDTH, 440, 0, 20); + _vm->_graphicsManager.DD_Unlock(); + _vm->_graphicsManager.dstrect[0] = Common::Rect(0, 20, SCREEN_WIDTH, 460); if (_vm->_globals.NBBLOC) { int v10 = _vm->_globals.NBBLOC + 1; @@ -485,40 +465,16 @@ LABEL_65: } } _vm->_globals.NBBLOC = 0; - _startPos.x = v4; - _vm->_graphicsManager.ofscroll = v4; - _vm->_graphicsManager.SCROLL = v4; + _startPos.x = _vm->_graphicsManager.SCROLL; + _vm->_graphicsManager.ofscroll = _vm->_graphicsManager.SCROLL; + _vm->_graphicsManager.SCROLL = _vm->_graphicsManager.SCROLL; } - _vm->_graphicsManager.OLD_SCROLL = v4; - _startPos.x = v4; - _vm->_graphicsManager.ofscroll = v4; + _vm->_graphicsManager.OLD_SCROLL = _vm->_graphicsManager.SCROLL; + _startPos.x = _vm->_graphicsManager.SCROLL; + _vm->_graphicsManager.ofscroll = _vm->_graphicsManager.SCROLL; } _curMouseButton = _mouseButton; _mouseButton = 0; -#if 0 - // Commented by Strangerke. Looks completely useless. - - if (souris_flag == true) { - if (btsouris != 23) { - if (yp < _vm->_graphicsManager.max_y && v15 < _vm->_graphicsManager.max_x && v14 > 1 && v13 > 1) { -/* Commented out in favour of using ScummVM cursor display - _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); - _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v12, v11); -*/ - goto LABEL_113; - } - if (btsouris != 23) - goto LABEL_113; - } - if (yp < _vm->_graphicsManager.max_y && v15 < _vm->_graphicsManager.max_x && v14 > 1 && v13 > 1) { -/* Commented out in favour of using ScummVM cursor display - _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); - _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v14 + v15, yp + v13); -*/ - } - } -LABEL_113: -#endif _vm->_soundManager.VERIF_SOUND(); refreshEvents(); } diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp index 04d4dab3cd..3e840ed60e 100644 --- a/engines/hopkins/files.cpp +++ b/engines/hopkins/files.cpp @@ -39,22 +39,6 @@ void FileManager::setParent(HopkinsEngine *vm) { } /** - * Load INI File - */ -void FileManager::loadIniFile(Common::StringMap &iniParams) { - // TODO: Review whether we can do something cleaner with ScummVM initialisation than - // just initialising the INI array as if it had read in the INI file - - iniParams["FULLSCREEN"] = "NO"; - iniParams["SETMODE"] = "1"; // 640x480 - iniParams["ZOOM"] = "100"; // No zooming - iniParams["VIDEOMEM"] = "YES"; - iniParams["FORCE8BITS"] = "NO"; - iniParams["FORCE16BITS"] = "YES"; - iniParams["SOUND"] = "YES"; -} - -/** * Load a file */ byte *FileManager::loadFile(const Common::String &file) { diff --git a/engines/hopkins/files.h b/engines/hopkins/files.h index fe63fd0848..3328a66ace 100644 --- a/engines/hopkins/files.h +++ b/engines/hopkins/files.h @@ -41,7 +41,6 @@ public: FileManager(); void setParent(HopkinsEngine *vm); - void loadIniFile(Common::StringMap &iniParams); byte *loadFile(const Common::String &file); int readStream(Common::ReadStream &stream, void *buf, size_t nbytes); void initCensorship(); diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 83ef82dd31..0d6a77e496 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -124,8 +124,6 @@ Globals::Globals() { MUSICVOL = 6; SOUNDVOL = 6; VOICEVOL = 6; - XSETMODE = 0; - XZOOM = 0; g_old_anim = 0; g_old_sens = 0; g_old_sens2 = 0; @@ -224,7 +222,6 @@ Globals::Globals() { MUSICOFF = false; SOUNDOFF = false; VOICEOFF = false; - XFULLSCREEN = false; SOUNDOFF = false; MUSICOFF = false; VOICEOFF = false; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index f9b855a805..d99808be63 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -340,9 +340,6 @@ public: int SVGA; bool internet; bool PUBEXIT; - bool XFULLSCREEN; - int XSETMODE; - int XZOOM; int PERSO_TYPE; uint vitesse; int INSTALL_TYPE; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index e4e1936b21..ddd05a8fd8 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -36,7 +36,6 @@ namespace Hopkins { GraphicsManager::GraphicsManager() { _lockCtr = 0; SDL_MODEYES = false; - SDL_ECHELLE = 0; XSCREEN = YSCREEN = 0; WinScan = 0; PAL_PIXELS = NULL; @@ -101,24 +100,6 @@ void GraphicsManager::setParent(HopkinsEngine *vm) { void GraphicsManager::SET_MODE(int width, int height) { if (!SDL_MODEYES) { - SDL_ECHELLE = 0; - - if (_vm->_globals.XSETMODE == 1) - SDL_ECHELLE = 0; - if (_vm->_globals.XSETMODE == 2) - SDL_ECHELLE = 25; - if (_vm->_globals.XSETMODE == 3) - SDL_ECHELLE = 50; - if (_vm->_globals.XSETMODE == 4) - SDL_ECHELLE = 75; - if (_vm->_globals.XSETMODE == 5) - SDL_ECHELLE = _vm->_globals.XZOOM; - - if (SDL_ECHELLE) { - width = zoomIn(width, SDL_ECHELLE); - height = zoomIn(height, SDL_ECHELLE); - } - Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0); initGraphics(width, height, true, &pixelFormat16); @@ -217,11 +198,7 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) { max_x = SCREEN_WIDTH; DD_Lock(); Cls_Video(); - if (SDL_ECHELLE) - m_scroll16A(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - + m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_Unlock(); } else { SCANLINE(SCREEN_WIDTH * 2); @@ -232,10 +209,7 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) { if (MANU_SCROLL == 1) { DD_Lock(); - if (SDL_ECHELLE) - m_scroll16A(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_Unlock(); } } @@ -532,7 +506,6 @@ void GraphicsManager::m_scroll16A(const byte *surface, int xs, int ys, int width *(uint16 *)destP = pixelWord; ++srcP; destP += 2; - Agr_x += SDL_ECHELLE; if ((unsigned int)Agr_x >= 100) { Agr_x -= 100; *(uint16 *)destP = pixelWord; @@ -548,8 +521,6 @@ void GraphicsManager::m_scroll16A(const byte *surface, int xs, int ys, int width if (Agr_Flag_y == 1) break; - Agr_y += SDL_ECHELLE; - if ((unsigned int)Agr_y < 100) break; @@ -695,10 +666,7 @@ void GraphicsManager::fade_in(const byte *palette, int step, const byte *surface } setpal_vga256(palData2); - if (SDL_ECHELLE) - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); } @@ -706,10 +674,7 @@ void GraphicsManager::fade_in(const byte *palette, int step, const byte *surface setpal_vga256(palette); // Refresh the screen - if (SDL_ECHELLE) - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); } @@ -731,10 +696,7 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac } while (palIndex < PALETTE_BLOCK_SIZE); setpal_vga256(palData); - if (SDL_ECHELLE) - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); int palCtr3 = 0; @@ -750,11 +712,7 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac } while (palCtr4 < (PALETTE_BLOCK_SIZE)); setpal_vga256(palData); - if (SDL_ECHELLE) - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); ++palCtr3; } while (palMax > palCtr3); @@ -765,23 +723,14 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac setpal_vga256(palData); - if (!SDL_ECHELLE) { - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - return DD_VBL(); - } - goto LABEL_28; + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + return DD_VBL(); } else { for (int i = 0; i < PALETTE_BLOCK_SIZE; i++) palData[i] = 0; setpal_vga256(palData); - if (!SDL_ECHELLE) { - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - return DD_VBL(); - } - -LABEL_28: - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); return DD_VBL(); } } @@ -812,10 +761,7 @@ void GraphicsManager::setpal_vga256(const byte *palette) { void GraphicsManager::setpal_vga256_linux(const byte *palette, const byte *surface) { CHANGE_PALETTE(palette); - if (SDL_ECHELLE) - m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); } @@ -1378,19 +1324,6 @@ void GraphicsManager::Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2) { } } -int GraphicsManager::Magic_Number(signed int v) { - int result = v; - - if (!v) - result = 4; - if (result & 1) - ++result; - if (result & 2) - result += 2; - - return result; -} - // Display VESA Segment void GraphicsManager::Affiche_Segment_Vesa() { if (_vm->_globals.NBBLOC == 0) @@ -1417,47 +1350,16 @@ void GraphicsManager::Affiche_Segment_Vesa() { if (bloc.x2 > (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) bloc.x2 = _vm->_eventsManager._startPos.x + SCREEN_WIDTH; - if (SDL_ECHELLE) { - // Calculate the bounds - int xp = Magic_Number(bloc.x1) - 4; - if (xp < _vm->_eventsManager._startPos.x) - xp = _vm->_eventsManager._startPos.x; - int yp = Magic_Number(bloc.y1) - 4; - if (yp < 0) - yp = 0; - int width = Magic_Number(bloc.x2) + 4 - xp; - if (width < 4) - width = 4; - int height = Magic_Number(bloc.y2) + 4 - yp; - if (height < 4) - height = 4; - - if ((xp - _vm->_eventsManager._startPos.x + width) > SCREEN_WIDTH) - xp -= 4; - if ((height - yp) > (SCREEN_HEIGHT - 40)) - yp -= 4; - - // WORKAROUND: Original didn't lock the screen for access - DD_Lock(); - m_scroll16A(VESA_BUFFER, xp, yp, width, height, zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), zoomIn(yp, SDL_ECHELLE)); - DD_Unlock(); - - dstRect.left = zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE); - dstRect.top = zoomIn(yp, SDL_ECHELLE); - dstRect.setWidth(zoomIn(width, SDL_ECHELLE)); - dstRect.setHeight(zoomIn(height, SDL_ECHELLE)); - } else { - // WORKAROUND: Original didn't lock the screen for access - DD_Lock(); - m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1); + // WORKAROUND: Original didn't lock the screen for access + DD_Lock(); + m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1); - dstRect.left = bloc.x1 - _vm->_eventsManager._startPos.x; - dstRect.top = bloc.y1; - dstRect.setWidth(bloc.x2 - bloc.x1); - dstRect.setHeight(bloc.y2 - bloc.y1); + dstRect.left = bloc.x1 - _vm->_eventsManager._startPos.x; + dstRect.top = bloc.y1; + dstRect.setWidth(bloc.x2 - bloc.x1); + dstRect.setHeight(bloc.y2 - bloc.y1); - DD_Unlock(); - } + DD_Unlock(); } _vm->_globals.BLOC[idx].field0 = 0; @@ -2205,10 +2107,7 @@ void GraphicsManager::NB_SCREEN() { if (nbrligne == 1280) Trans_bloc2(VESA_BUFFER, TABLE_COUL, 614400); DD_Lock(); - if (SDL_ECHELLE) - m_scroll16A(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll16(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_Unlock(); destP = VESA_SCREEN; diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index df71dea2f4..f88fee9fbc 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -55,7 +55,6 @@ private: public: int _lockCtr; bool SDL_MODEYES; - int SDL_ECHELLE; int XSCREEN; int YSCREEN; int WinScan; @@ -166,7 +165,6 @@ public: void VISU_ALL(); void RESET_SEGMENT_VESA(); void Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2); - int Magic_Number(int v); void Affiche_Segment_Vesa(); void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx); void CopyAsm(const byte *surface); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 047b26ad32..c744d25fe1 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -95,10 +95,6 @@ Common::Error HopkinsEngine::saveGameState(int slot, const Common::String &desc) Common::Error HopkinsEngine::run() { _saveLoadManager.initSaves(); - Common::StringMap iniParams; - _fileManager.loadIniFile(iniParams); - processIniParams(iniParams); - _globals.setConfig(); _fileManager.initCensorship(); INIT_SYSTEM(); @@ -3443,22 +3439,6 @@ int HopkinsEngine::getRandomNumber(int maxNumber) { return _randomSource.getRandomNumber(maxNumber); } -void HopkinsEngine::processIniParams(Common::StringMap &iniParams) { - _globals.XFULLSCREEN = iniParams["FULLSCREEN"] == "YES"; - - _globals.XSETMODE = 1; - if (iniParams.contains("SETMODE")) { - int setMode = atoi(iniParams["SETMODE"].c_str()); - _globals.XSETMODE = CLIP(setMode, 1, 5); - } - - _globals.XZOOM = 0; - if (_globals.XSETMODE == 5 && iniParams.contains("ZOOM")) { - int zoom = atoi(iniParams["ZOOM"].c_str()); - _globals.XZOOM = CLIP(zoom, 25, 100); - } -} - void HopkinsEngine::INIT_SYSTEM() { // Set graphics mode _graphicsManager.SET_MODE(SCREEN_WIDTH, SCREEN_HEIGHT); @@ -3579,7 +3559,7 @@ void HopkinsEngine::INTRORUN() { _globals.BPP_NOAFF = false; _globals.iRegul = 1; _graphicsManager.FADE_INW(); - if (_graphicsManager.DOUBLE_ECRAN == true) { + if (_graphicsManager.DOUBLE_ECRAN) { _graphicsManager.no_scroll = 2; bool v3 = false; _graphicsManager.SCROLL = 0; diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 34b65dcaea..62f49d33e6 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -80,11 +80,6 @@ private: const HopkinsGameDescription *_gameDescription; Common::RandomSource _randomSource; - /** - * Processes the loaded list of ini file parameters - */ - void processIniParams(Common::StringMap &iniParams); - void INIT_SYSTEM(); void PASS(); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 739a060aec..6e552e138f 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -2856,7 +2856,7 @@ void ObjectsManager::PARADISE() { if (result && _vm->_globals.SAUVEGARDE->data[svField2] && result != 4 && result > 3) { _vm->_fontManager.hideText(5); if (!_vm->_globals.FORET || ((uint16)(NUMZONE - 20) > 1u && (uint16)(NUMZONE - 22) > 1u)) { - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) { + if (_vm->_graphicsManager.DOUBLE_ECRAN) { _vm->_graphicsManager.no_scroll = 2; if (_vm->_eventsManager._startPos.x >= XSPR(0) - 320) goto LABEL_64; @@ -4204,10 +4204,7 @@ void ObjectsManager::SPECIAL_JEU() { _vm->_graphicsManager.SHOW_PALETTE(); _vm->_globals.freeMemory(v1); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); v2 = _vm->_graphicsManager.VESA_BUFFER; v3 = _vm->_graphicsManager.VESA_SCREEN; @@ -5631,7 +5628,7 @@ LABEL_70: if (_vm->_globals.PERSO_TYPE == 2) SPRITE(_vm->_globals.PERSO, PERX, PERY, 0, PERI, 0, 0, 20, 127); _vm->_eventsManager.setMouseXY(PERX, PERY); - if (_vm->_graphicsManager.DOUBLE_ECRAN == true) + if (_vm->_graphicsManager.DOUBLE_ECRAN) _vm->_graphicsManager.SCROLL = (int16)XSPR(0) - 320; VERIFTAILLE(); SPRITE_ON(0); diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 94241711af..eaf1199c13 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -163,10 +163,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette); _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); _vm->_graphicsManager.DD_LOCK(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_UNLOCK(); v8 = _vm->_graphicsManager.VESA_BUFFER; v9 = _vm->_graphicsManager.VESA_SCREEN; @@ -1319,10 +1316,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette); _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); v14 = _vm->_graphicsManager.VESA_BUFFER; |