diff options
author | Strangerke | 2013-02-22 17:18:44 +0100 |
---|---|---|
committer | Strangerke | 2013-02-22 17:18:44 +0100 |
commit | 29c664a6966cd333862f2d1d3cd09a182be7f985 (patch) | |
tree | d076a8510fcfaa9206f6ca23f06c4c58583c20a2 /engines/hopkins/graphics.cpp | |
parent | 3625aed6f61ac70d5f72708be6059779afd569d2 (diff) | |
download | scummvm-rg350-29c664a6966cd333862f2d1d3cd09a182be7f985.tar.gz scummvm-rg350-29c664a6966cd333862f2d1d3cd09a182be7f985.tar.bz2 scummvm-rg350-29c664a6966cd333862f2d1d3cd09a182be7f985.zip |
HOPKINS: Implement a more proper function to clear the palette.
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 9429939720..b299082394 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -395,8 +395,14 @@ void GraphicsManager::loadPCX320(byte *surface, const Common::String &file, byte } // Clear Palette +// CHECKME: Some versions of the game don't include it, some contains nothing more than +// than a loop doing nothing, some others just map the last value. While debugging, it +// seems that this function is called once the palette is already cleared, so it would be useless +// This code could most likely be removed. void GraphicsManager::clearPalette() { - SD_PIXELS[0] = 0; + uint16 col0 = mapRGB(0, 0, 0); + for (int i = 0; i < 512; i += 2) + WRITE_LE_UINT16(&SD_PIXELS[i], col0); } void GraphicsManager::SCANLINE(int pitch) { |