From 29c664a6966cd333862f2d1d3cd09a182be7f985 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 22 Feb 2013 17:18:44 +0100 Subject: HOPKINS: Implement a more proper function to clear the palette. --- engines/hopkins/graphics.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/hopkins/graphics.cpp') 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) { -- cgit v1.2.3