diff options
author | Fabio Battaglia | 2009-03-17 07:46:04 +0000 |
---|---|---|
committer | Fabio Battaglia | 2009-03-17 07:46:04 +0000 |
commit | 3c9b4e0f073ad5c2c583123fad158cf244ab4286 (patch) | |
tree | b937fe373f6a25db3c6e8bb70e35e0dc6d6f75a9 /engines | |
parent | 92c93656503615ea8d659c094675952744c445fb (diff) | |
download | scummvm-rg350-3c9b4e0f073ad5c2c583123fad158cf244ab4286.tar.gz scummvm-rg350-3c9b4e0f073ad5c2c583123fad158cf244ab4286.tar.bz2 scummvm-rg350-3c9b4e0f073ad5c2c583123fad158cf244ab4286.zip |
sword1: enable psx background caching for screen 54 (bull's head) too
svn-id: r39475
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword1/screen.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp index 985c62b52d..15df92b021 100644 --- a/engines/sword1/screen.cpp +++ b/engines/sword1/screen.cpp @@ -372,11 +372,11 @@ void Screen::draw(void) { renderParallax(_parallax[0]); uint8 *src = _layerBlocks[0]; uint8 *dest = _screenBuf; - uint8 *indxScreen = NULL; if(SwordEngine::isPsx()) { - indxScreen = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY); - src = indxScreen; + if (!_psxCache.decodedBackground) + _psxCache.decodedBackground = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY); + src = _psxCache.decodedBackground; } for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++) @@ -388,8 +388,6 @@ void Screen::draw(void) { src++; } - free(indxScreen); - } else if (!(SwordEngine::isPsx())) { memcpy(_screenBuf, _layerBlocks[0], _scrnSizeX * _scrnSizeY); } else { //We are using PSX version |