[Scummvm-cvs-logs] SF.net SVN: scummvm:[43278] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Aug 11 18:18:44 CEST 2009


Revision: 43278
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43278&view=rev
Author:   lordhoto
Date:     2009-08-11 16:18:43 +0000 (Tue, 11 Aug 2009)

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

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lok.cpp
    scummvm/trunk/engines/kyra/screen.h

Modified: scummvm/trunk/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lok.cpp	2009-08-11 16:18:01 UTC (rev 43277)
+++ scummvm/trunk/engines/kyra/gui_lok.cpp	2009-08-11 16:18:43 UTC (rev 43278)
@@ -208,9 +208,29 @@
 	uint8 *screen = new uint8[Screen::SCREEN_W*Screen::SCREEN_H];
 	if (screen) {
 		_screen->queryPageFromDisk("SEENPAGE.TMP", 0, screen);
+		uint8 screenPal[768];
 
-		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;

Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h	2009-08-11 16:18:01 UTC (rev 43277)
+++ scummvm/trunk/engines/kyra/screen.h	2009-08-11 16:18:43 UTC (rev 43278)
@@ -356,6 +356,7 @@
 	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);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list