From 786024ebb649f68013bfed123c20d29e5e4c4e21 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 11 Aug 2009 16:18:43 +0000 Subject: Fix thumbnails for savegames made via the in-game GUI of Kyrandia 1 Amiga. svn-id: r43278 --- engines/kyra/gui_lok.cpp | 24 ++++++++++++++++++++++-- engines/kyra/screen.h | 1 + 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index e60592fcd2..e9c71f511d 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -208,9 +208,29 @@ void GUI_LoK::createScreenThumbnail(Graphics::Surface &dst) { uint8 *screen = new uint8[Screen::SCREEN_W*Screen::SCREEN_H]; if (screen) { _screen->queryPageFromDisk("SEENPAGE.TMP", 0, screen); - uint8 screenPal[768]; - _screen->getRealPalette(2, screenPal); + + if (_vm->gameFlags().platform == Common::kPlatformAmiga) { + _screen->getRealPalette(0, &screenPal[ 0]); + _screen->getRealPalette(1, &screenPal[96]); + + // Set the interface palette text color to white + screenPal[96 + 16 * 3 + 0] = 0xFF; + screenPal[96 + 16 * 3 + 1] = 0xFF; + screenPal[96 + 16 * 3 + 2] = 0xFF; + + if (_screen->isInterfacePaletteEnabled()) { + for (int y = 0; y < 64; ++y) { + for (int x = 0; x < 320; ++x) { + screen[(y + 136) * Screen::SCREEN_W + x] += 32; + } + } + } + + } else { + _screen->getRealPalette(2, screenPal); + } + ::createThumbnail(&dst, screen, Screen::SCREEN_W, Screen::SCREEN_H, screenPal); } delete[] screen; diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 41837c90e3..25ed935b9e 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -356,6 +356,7 @@ public: virtual void setScreenPalette(const Palette &pal); // AMIGA version only + bool isInterfacePaletteEnabled() const { return _interfacePaletteEnabled; } void enableInterfacePalette(bool e); void setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b); -- cgit v1.2.3