Fix thumbnails for savegames made via the in-game GUI of Kyrandia 1 Amiga.

svn-id: r43278
This commit is contained in:
Johannes Schickel 2009-08-11 16:18:43 +00:00
parent 57576e14cd
commit 786024ebb6
2 changed files with 23 additions and 2 deletions

View File

@ -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;

View File

@ -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);