diff options
author | Strangerke | 2012-12-15 23:28:58 +0100 |
---|---|---|
committer | Strangerke | 2012-12-15 23:28:58 +0100 |
commit | 2d172ab46e76f416b307ae11471a09c979855702 (patch) | |
tree | bbfaf1b717e6b9fa1fe0e3b0e146aaf381510d53 /engines/hopkins | |
parent | d7d8c19dae1a8ca586851892da406a3b4025f4c8 (diff) | |
download | scummvm-rg350-2d172ab46e76f416b307ae11471a09c979855702.tar.gz scummvm-rg350-2d172ab46e76f416b307ae11471a09c979855702.tar.bz2 scummvm-rg350-2d172ab46e76f416b307ae11471a09c979855702.zip |
HOPKINS: Remove all code related to 8b display
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/anim.cpp | 239 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 14 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 2 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 294 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 3 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 3 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 32 |
9 files changed, 138 insertions, 467 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 601ff00e9e..3f3040fa45 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -79,7 +79,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_graphicsManager.Cls_Video(); _vm->_graphicsManager.DD_Unlock(); } - if (_vm->_graphicsManager.WinScan / _vm->_graphicsManager.Winbpp > SCREEN_WIDTH) { + if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { hasScreenCopy = true; screenCopy = _vm->_globals.allocMemory(0x4B000u); memcpy(screenCopy, screenP, 0x4B000u); @@ -91,18 +91,10 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui } else { _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - if (hasScreenCopy) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (hasScreenCopy) - _vm->_graphicsManager.m_scroll2A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + if (hasScreenCopy) + _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + else + _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); } @@ -153,16 +145,10 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (hasScreenCopy) { if (*screenP != kByteStop) { _vm->_graphicsManager.Copy_WinScan_Vbe3(screenP, screenCopy); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*screenP != kByteStop) { - if (_vm->_graphicsManager.Winbpp == 1) - _vm->_graphicsManager.Copy_Video_Vbe3(screenP); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.Copy_Video_Vbe16(screenP); + _vm->_graphicsManager.Copy_Video_Vbe16(screenP); } _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); @@ -285,7 +271,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint _vm->_graphicsManager.Cls_Video(); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.max_x = SCREEN_WIDTH; - if (_vm->_graphicsManager.WinScan / _vm->_graphicsManager.Winbpp > SCREEN_WIDTH) { + if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { v8 = 1; ptr = _vm->_globals.allocMemory(0x4B000u); memcpy(ptr, v12, 0x4B000u); @@ -297,18 +283,10 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint } else { _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - if (v8) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(v12, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (v8) - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(v12, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + if (v8) + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + else + _vm->_graphicsManager.m_scroll16(v12, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); } @@ -347,36 +325,19 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) -LABEL_111: - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } LABEL_112: _vm->_graphicsManager.DD_Unlock(); @@ -410,16 +371,10 @@ LABEL_77: if (v8) { if (*v12 != kByteStop) { _vm->_graphicsManager.Copy_WinScan_Vbe3(v12, ptr); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*v12 != kByteStop) { - if (_vm->_graphicsManager.Winbpp == 1) - _vm->_graphicsManager.Copy_Video_Vbe3(v12); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.Copy_Video_Vbe16(v12); + _vm->_graphicsManager.Copy_Video_Vbe16(v12); } _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); @@ -450,34 +405,19 @@ LABEL_88: _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - goto LABEL_111; - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } goto LABEL_112; } @@ -513,34 +453,19 @@ LABEL_88: _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - goto LABEL_111; - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } goto LABEL_112; } @@ -613,35 +538,19 @@ LABEL_114: _vm->_graphicsManager.SCANLINE(0x500u); _vm->_graphicsManager.max_x = 1280; _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); } else { _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH); _vm->_graphicsManager.max_x = SCREEN_WIDTH; _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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.DD_Unlock(); _vm->_graphicsManager.FADE_INS(); @@ -963,7 +872,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui f.skip(14); f.read(v9, nbytes); - if (_vm->_graphicsManager.WinScan / _vm->_graphicsManager.Winbpp > SCREEN_WIDTH) { + if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { v7 = 1; ptr = _vm->_globals.allocMemory(0x4B000u); memcpy(ptr, v9, 0x4B000u); @@ -980,18 +889,10 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); } else { _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - if (v7) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(v9, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (v7) - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(v9, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + if (v7) + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + else + _vm->_graphicsManager.m_scroll16(v9, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); } @@ -1058,16 +959,10 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui if (v7) { if (*v9 != kByteStop) { _vm->_graphicsManager.Copy_WinScan_Vbe(v9, ptr); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*v9 != kByteStop) { - if (_vm->_graphicsManager.Winbpp == 1) - _vm->_graphicsManager.Copy_Video_Vbe(v9); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.Copy_Video_Vbe16a(v9); + _vm->_graphicsManager.Copy_Video_Vbe16a(v9); } _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); @@ -1140,7 +1035,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u f.readUint16LE(); f.read(v10, nbytes); - if (_vm->_graphicsManager.WinScan / _vm->_graphicsManager.Winbpp > SCREEN_WIDTH) { + if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { v7 = 1; ptr = _vm->_globals.allocMemory(0x4B000u); memcpy((void *)ptr, v10, 0x4B000u); @@ -1154,18 +1049,10 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u } else { _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); - if (_vm->_graphicsManager.Winbpp == 2) { - if (v7) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll16(v10, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (v7) - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(v10, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + if (v7) + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + else + _vm->_graphicsManager.m_scroll16(v10, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); } @@ -1216,16 +1103,10 @@ LABEL_33: if (v7) { if (*v10 != kByteStop) { _vm->_graphicsManager.Copy_WinScan_Vbe(v10, ptr); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*v10 != kByteStop) { - if (_vm->_graphicsManager.Winbpp == 1) - _vm->_graphicsManager.Copy_Video_Vbe(v10); - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.Copy_Video_Vbe16a(v10); + _vm->_graphicsManager.Copy_Video_Vbe16a(v10); } _vm->_graphicsManager.DD_Unlock(); _vm->_graphicsManager.DD_VBL(); diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 090135d075..e610137981 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -459,23 +459,15 @@ LABEL_65: _vm->_fontManager.hideText(9); _vm->_graphicsManager.DD_Lock(); if (_vm->_graphicsManager.SDL_ECHELLE) { - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } else { - int v6 = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE); - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, v6); - } + 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 { - if (_vm->_graphicsManager.Winbpp == 2) - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, 20); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, 20); + _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); } diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index e13a184d5e..83ef82dd31 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -225,8 +225,6 @@ Globals::Globals() { SOUNDOFF = false; VOICEOFF = false; XFULLSCREEN = false; - XFORCE16 = false; - XFORCE8 = false; SOUNDOFF = false; MUSICOFF = false; VOICEOFF = false; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 803a63384a..f9b855a805 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -343,8 +343,6 @@ public: bool XFULLSCREEN; int XSETMODE; int XZOOM; - bool XFORCE16; - bool XFORCE8; int PERSO_TYPE; uint vitesse; int INSTALL_TYPE; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index b28c33450f..e4e1936b21 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -39,7 +39,6 @@ GraphicsManager::GraphicsManager() { SDL_ECHELLE = 0; XSCREEN = YSCREEN = 0; WinScan = 0; - Winbpp = 0; PAL_PIXELS = NULL; nbrligne = 0; Linear = false; @@ -115,24 +114,13 @@ void GraphicsManager::SET_MODE(int width, int height) { if (_vm->_globals.XSETMODE == 5) SDL_ECHELLE = _vm->_globals.XZOOM; - int bpp = 8; - if (_vm->_globals.XFORCE8 == true) - bpp = 8; - if (_vm->_globals.XFORCE16 == true) - bpp = 16; - 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); - - if (bpp == 8) { - initGraphics(width, height, true); - } else { - initGraphics(width, height, true, &pixelFormat16); - } + initGraphics(width, height, true, &pixelFormat16); // Init surfaces VESA_SCREEN = _vm->_globals.allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); @@ -143,8 +131,7 @@ void GraphicsManager::SET_MODE(int width, int height) { YSCREEN = height; Linear = true; - Winbpp = bpp / 8; - WinScan = width * Winbpp; + WinScan = width * 2; // Refactor me PAL_PIXELS = SD_PIXELS; nbrligne = width; @@ -197,10 +184,7 @@ void GraphicsManager::LOAD_IMAGEVGA(const Common::String &file) { max_x = 320; DD_Lock(); - if (Winbpp == 1) - CopyAsm(VESA_BUFFER); - if (Winbpp == 2) - CopyAsm16(VESA_BUFFER); + CopyAsm16(VESA_BUFFER); DD_Unlock(); FADE_IN_CASSE(); @@ -233,17 +217,10 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) { max_x = SCREEN_WIDTH; DD_Lock(); Cls_Video(); - if (Winbpp == 2) { - 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); - } else if (Winbpp == 1) { - if (!SDL_ECHELLE) - m_scroll2(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll2A(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); DD_Unlock(); } else { @@ -255,19 +232,10 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) { if (MANU_SCROLL == 1) { DD_Lock(); - if (Winbpp == 2) { - 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); - } - if (Winbpp == 1) { - if (!SDL_ECHELLE) - m_scroll2(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll2A(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } - + 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); DD_Unlock(); } } @@ -472,10 +440,6 @@ void GraphicsManager::A_PCX320(byte *surface, const Common::String &file, byte * void GraphicsManager::Cls_Pal() { Common::fill(&cmap[0], &cmap[PALETTE_BLOCK_SIZE], 0); SD_PIXELS[0] = 0; - - if (Winbpp == 1) { - g_system->getPaletteManager()->setPalette(cmap, 0, 256); - } } void GraphicsManager::SCANLINE(int pitch) { @@ -508,80 +472,6 @@ void GraphicsManager::m_scroll(const byte *surface, int xs, int ys, int width, i } while (yCtr != 1); } -void GraphicsManager::m_scroll2(const byte *surface, int xs, int ys, int width, int height, int destX, int destY) { - const byte *srcP; - byte *destP; - int destPitch; - int srcPitch; - int yCtr; - - assert(VideoPtr); - srcP = xs + nbrligne2 * ys + surface; - destP = destX + WinScan * destY + (byte *)VideoPtr->pixels; - destPitch = WinScan - SCREEN_WIDTH; - srcPitch = nbrligne2 - SCREEN_WIDTH; - yCtr = height; - - do { - memcpy(destP, srcP, SCREEN_WIDTH); - destP = destP + destPitch + SCREEN_WIDTH; - srcP = srcP + srcPitch + SCREEN_WIDTH; - --yCtr; - } while (yCtr); -} - -void GraphicsManager::m_scroll2A(const byte *surface, int xs, int ys, int width, int height, int destX, int destY) { - const byte *srcP; - byte *destP; - int yCtr; - int xCtr; - byte srcByte; - const byte *srcCopyP; - byte *destCopyP; - - assert(VideoPtr); - srcP = xs + nbrligne2 * ys + surface; - destP = destX + WinScan * destY + (byte *)VideoPtr->pixels; - yCtr = height; - Agr_x = 0; - Agr_y = 0; - Agr_Flag_y = 0; - do { - for (;;) { - destCopyP = destP; - srcCopyP = srcP; - xCtr = width; - Agr_x = 0; - do { - srcByte = *srcP; - *destP++ = *srcP++; - Agr_x += SDL_ECHELLE; - if ((unsigned int)Agr_x >= 100) { - Agr_x -= 100; - *destP++ = srcByte; - } - --xCtr; - } while ( xCtr ); - - srcP = srcCopyP; - destP = WinScan + destCopyP; - if (Agr_Flag_y) - break; - - Agr_y += SDL_ECHELLE; - if ((unsigned int)Agr_y < 100) - break; - - Agr_y -= 100; - Agr_Flag_y = 1; - } - - Agr_Flag_y = 0; - srcP = nbrligne2 + srcCopyP; - --yCtr; - } while (yCtr); -} - /** * Copies data from a 8-bit palette surface into the 16-bit screen */ @@ -805,26 +695,22 @@ void GraphicsManager::fade_in(const byte *palette, int step, const byte *surface } setpal_vga256(palData2); - if (Winbpp == 2) { - 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); - DD_VBL(); - } - } - - // Set the final palette - setpal_vga256(palette); - - // Refresh the screen - if (Winbpp == 2) { 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); DD_VBL(); } + + // Set the final palette + 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); + DD_VBL(); } void GraphicsManager::fade_out(const byte *palette, int step, const byte *surface) { @@ -845,13 +731,11 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac } while (palIndex < PALETTE_BLOCK_SIZE); setpal_vga256(palData); - if (Winbpp == 2) { - 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); - DD_VBL(); - } + 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); + DD_VBL(); int palCtr3 = 0; if (palMax > 0) { @@ -866,14 +750,12 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac } while (palCtr4 < (PALETTE_BLOCK_SIZE)); setpal_vga256(palData); - if (Winbpp == 2) { - 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); + 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); - DD_VBL(); - } + DD_VBL(); ++palCtr3; } while (palMax > palCtr3); } @@ -883,28 +765,24 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac setpal_vga256(palData); - if (Winbpp == 2) { - if (!SDL_ECHELLE) { - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - return DD_VBL(); - } - goto LABEL_28; + if (!SDL_ECHELLE) { + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + return DD_VBL(); } + goto LABEL_28; } else { for (int i = 0; i < PALETTE_BLOCK_SIZE; i++) palData[i] = 0; setpal_vga256(palData); - if (Winbpp == 2) { - 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); + 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); + return DD_VBL(); } } @@ -934,15 +812,11 @@ void GraphicsManager::setpal_vga256(const byte *palette) { void GraphicsManager::setpal_vga256_linux(const byte *palette, const byte *surface) { CHANGE_PALETTE(palette); - - if (Winbpp == 2) { - 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); - - DD_VBL(); - } + 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); + DD_VBL(); } void GraphicsManager::SETCOLOR(int palIndex, int r, int g, int b) { @@ -982,9 +856,6 @@ void GraphicsManager::SETCOLOR4(int palIndex, int r, int g, int b) { cmap[v8 + 2] = bv; WRITE_LE_UINT16(&SD_PIXELS[2 * palIndex], MapRGB(rv, gv, bv)); - - if (Winbpp == 1) - g_system->getPaletteManager()->setPalette(cmap, palIndex, 1); } void GraphicsManager::CHANGE_PALETTE(const byte *palette) { @@ -999,21 +870,14 @@ void GraphicsManager::CHANGE_PALETTE(const byte *palette) { for (int idx = 0; idx < PALETTE_SIZE; ++idx, srcP += 3) { *(uint16 *)&SD_PIXELS[2 * idx] = MapRGB(*srcP, *(srcP + 1), *(srcP + 2)); } - - if (Winbpp == 1) - g_system->getPaletteManager()->setPalette(cmap, 0, PALETTE_SIZE); } uint16 GraphicsManager::MapRGB(byte r, byte g, byte b) { - if (Winbpp == 1) { - error("TODO: Support in 8-bit graphics mode"); - } else { - Graphics::PixelFormat format = g_system->getScreenFormat(); + Graphics::PixelFormat format = g_system->getScreenFormat(); - return (r >> format.rLoss) << format.rShift - | (g >> format.gLoss) << format.gShift - | (b >> format.bLoss) << format.bShift; - } + return (r >> format.rLoss) << format.rShift + | (g >> format.gLoss) << format.gShift + | (b >> format.bLoss) << format.bShift; } void GraphicsManager::DD_VBL() { @@ -1033,11 +897,9 @@ void GraphicsManager::FADE_INW_LINUX(const byte *surface) { void GraphicsManager::FADE_IN_CASSE() { setpal_vga256(Palette); - if (Winbpp == 2) { - DD_Lock(); - CopyAsm16(VESA_BUFFER); - DD_Unlock(); - } + DD_Lock(); + CopyAsm16(VESA_BUFFER); + DD_Unlock(); DD_VBL(); } @@ -1047,11 +909,9 @@ void GraphicsManager::FADE_OUT_CASSE() { memset(palette, 0, PALETTE_EXT_BLOCK_SIZE); setpal_vga256(palette); - if (Winbpp == 2) { - DD_Lock(); - CopyAsm16(VESA_BUFFER); - DD_Unlock(); - } + DD_Lock(); + CopyAsm16(VESA_BUFFER); + DD_Unlock(); DD_VBL(); } @@ -1546,12 +1406,7 @@ void GraphicsManager::Affiche_Segment_Vesa() { continue; if (_vm->_eventsManager._breakoutFl) { - if (Winbpp == 1) { - Copy_Vga(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1, bloc.y1); - } else if (Winbpp == 2) { - Copy_Vga16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1, bloc.y1); - } - + Copy_Vga16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1, bloc.y1); dstRect.left = bloc.x1 * 2; dstRect.top = bloc.y1 * 2 + 30; dstRect.setWidth((bloc.x2 - bloc.x1) * 2); @@ -1584,15 +1439,7 @@ void GraphicsManager::Affiche_Segment_Vesa() { // WORKAROUND: Original didn't lock the screen for access DD_Lock(); - - if (Winbpp == 2) { - m_scroll16A(VESA_BUFFER, xp, yp, width, height, - zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), zoomIn(yp, SDL_ECHELLE)); - } else { - m_scroll2A(VESA_BUFFER, xp, yp, width, height, - zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), zoomIn(yp, SDL_ECHELLE)); - } - + 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); @@ -1602,14 +1449,7 @@ void GraphicsManager::Affiche_Segment_Vesa() { } else { // WORKAROUND: Original didn't lock the screen for access DD_Lock(); - - if (Winbpp == 2) { - m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, - bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1); - } else { - m_scroll(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, - bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1); - } + 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; @@ -2365,18 +2205,10 @@ void GraphicsManager::NB_SCREEN() { if (nbrligne == 1280) Trans_bloc2(VESA_BUFFER, TABLE_COUL, 614400); DD_Lock(); - if (Winbpp == 2) { - 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); - } - if (Winbpp == 1) { - if (SDL_ECHELLE) - m_scroll2A(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - m_scroll2(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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); DD_Unlock(); destP = VESA_SCREEN; diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 4d4777a115..df71dea2f4 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -59,7 +59,6 @@ public: int XSCREEN; int YSCREEN; int WinScan; - int Winbpp; byte SD_PIXELS[PALETTE_SIZE * 2]; byte *PAL_PIXELS; int nbrligne; @@ -124,8 +123,6 @@ public: void Cls_Pal(); void SCANLINE(int pitch); void m_scroll(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); - void m_scroll2(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); - void m_scroll2A(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); void m_scroll16(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); void m_scroll16A(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); void Copy_Vga(const byte *surface, int xp, int yp, int width, int height, int destX, int destY); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 62974d0f4a..047b26ad32 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -3457,9 +3457,6 @@ void HopkinsEngine::processIniParams(Common::StringMap &iniParams) { int zoom = atoi(iniParams["ZOOM"].c_str()); _globals.XZOOM = CLIP(zoom, 25, 100); } - - _globals.XFORCE16 = iniParams["FORCE16BITS"] == "YES"; - _globals.XFORCE8 = iniParams["FORCE8BITS"] == "YES"; } void HopkinsEngine::INIT_SYSTEM() { diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index c000aa912d..739a060aec 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -4204,18 +4204,10 @@ void ObjectsManager::SPECIAL_JEU() { _vm->_graphicsManager.SHOW_PALETTE(); _vm->_globals.freeMemory(v1); _vm->_graphicsManager.DD_Lock(); - if (_vm->_graphicsManager.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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.DD_Unlock(); v2 = _vm->_graphicsManager.VESA_BUFFER; v3 = _vm->_graphicsManager.VESA_SCREEN; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index dbb621c0dd..94241711af 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -163,18 +163,10 @@ 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.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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.DD_UNLOCK(); v8 = _vm->_graphicsManager.VESA_BUFFER; v9 = _vm->_graphicsManager.VESA_SCREEN; @@ -1327,18 +1319,10 @@ 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.Winbpp == 2) { - 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); - } - if (_vm->_graphicsManager.Winbpp == 1) { - if (_vm->_graphicsManager.SDL_ECHELLE) - _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - else - _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - } + 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.DD_Unlock(); _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); v14 = _vm->_graphicsManager.VESA_BUFFER; |