diff options
author | Torbjörn Andersson | 2018-06-29 11:55:18 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-07-03 10:13:34 +0000 |
commit | 0ffb057b66db7cb8319bec1c5e54067e6865c9d6 (patch) | |
tree | 6622b79391444bb747eca2f7e53d054ffba850b9 /engines/sky/screen.cpp | |
parent | 68e020ee92f24e49f541c1e3fb0cb68b2b9a8def (diff) | |
download | scummvm-rg350-0ffb057b66db7cb8319bec1c5e54067e6865c9d6.tar.gz scummvm-rg350-0ffb057b66db7cb8319bec1c5e54067e6865c9d6.tar.bz2 scummvm-rg350-0ffb057b66db7cb8319bec1c5e54067e6865c9d6.zip |
SKY: Show full 320x200px in intro where possible
This commit adds a workaround to unlock existing fullscreen images in
the intro of Beneath a Steel Sky.
The original engine clips the whole intro to 320x192 (the common game
format) even though some images exist as 320x200 in the game data files.
This workaround whitelists all images which actually are 320x200px and
displays them as must have originally been intended.
Fixes Trac#7559.
Diffstat (limited to 'engines/sky/screen.cpp')
-rw-r--r-- | engines/sky/screen.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp index c96b449162..b91403c6bf 100644 --- a/engines/sky/screen.cpp +++ b/engines/sky/screen.cpp @@ -96,9 +96,9 @@ Screen::~Screen() { free(_scrollScreen); } -void Screen::clearScreen() { +void Screen::clearScreen(bool fullscreen) { memset(_currentScreen, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); + _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, fullscreen ? FULL_SCREEN_HEIGHT : GAME_SCREEN_HEIGHT); _system->updateScreen(); } @@ -146,21 +146,23 @@ void Screen::setPalette(uint16 fileNum) { warning("Screen::setPalette: can't load file nr. %d",fileNum); } -void Screen::showScreen(uint16 fileNum) { + void Screen::showScreen(uint16 fileNum, bool fullscreen) { // This is only used for static images in the floppy and cd intro free(_currentScreen); _currentScreen = _skyDisk->loadFile(fileNum); - // make sure the last 8 lines are forced to black. - memset(_currentScreen + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH, 0, (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT) * GAME_SCREEN_WIDTH); + if (!fullscreen) { + // make sure the last 8 lines are forced to black. + memset(_currentScreen + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH, 0, (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT) * GAME_SCREEN_WIDTH); + } if (_currentScreen) - showScreen(_currentScreen); + showScreen(_currentScreen, fullscreen); else warning("Screen::showScreen: can't load file nr. %d",fileNum); } -void Screen::showScreen(uint8 *pScreen) { - _system->copyRectToScreen(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); +void Screen::showScreen(uint8 *pScreen, bool fullscreen) { + _system->copyRectToScreen(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, fullscreen ? FULL_SCREEN_HEIGHT : GAME_SCREEN_HEIGHT); _system->updateScreen(); } |