[Scummvm-cvs-logs] scummvm master -> b3e45ccc6854c93e73fcda0f9daa67ffad76a3a1

bluegr bluegr at gmail.com
Sun Dec 7 14:34:44 CET 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6ec077e1b9 AGI: Set the correct palette to use for each Amiga game
b3e45ccc68 AGI: Disable/remove unused code


Commit: 6ec077e1b9f766da0a74bfb85b4ee2cc891cb348
    https://github.com/scummvm/scummvm/commit/6ec077e1b9f766da0a74bfb85b4ee2cc891cb348
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-07T14:40:53+02:00

Commit Message:
AGI: Set the correct palette to use for each Amiga game

The Amiga palettes were added in 16529e58e6, but were never used.
A new game-specific option has been added for the old Amiga palette

Changed paths:
    engines/agi/agi.cpp
    engines/agi/detection.cpp
    engines/agi/graphics.cpp



diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 6bdbabd..73233d4 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -500,6 +500,7 @@ static const GameSettings agiSettings[] = {
 AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
 	// Assign default values to the config manager, in case settings are missing
 	ConfMan.registerDefault("originalsaveload", "false");
+	ConfMan.registerDefault("altamigapalette", "false");
 
 	_noSaveLoadAllowed = false;
 
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 1d58900..e7285d8 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -145,6 +145,13 @@ static const ExtraGuiOption agiExtraGuiOption = {
 	false
 };
 
+static const ExtraGuiOption agiExtraGuiOptionAmiga = {
+	_s("Use an alternative palette"),
+	_s("Use an alternative palette, common for all Amiga games. This was the old behavior"),
+	"altamigapalette",
+	false
+};
+
 #include "agi/detection_tables.h"
 
 using namespace Agi;
@@ -230,6 +237,8 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
 const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &target) const {
 	ExtraGuiOptions options;
 	options.push_back(agiExtraGuiOption);
+	if (target.contains("-amiga"))
+		options.push_back(agiExtraGuiOptionAmiga);
 	return options;
 }
 
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 34651c7..317e747 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "common/file.h"
 #include "common/textconsole.h"
 
@@ -220,7 +221,7 @@ static const uint8 amigaAgiPaletteV3[16 * 3] = {
 /**
  * 16 color amiga-ish palette.
  */
-static const uint8 newPalette[16 * 3] = {
+static const uint8 altAmigaPalette[16 * 3] = {
 	0x00, 0x00, 0x00,
 	0x00, 0x00, 0x3f,
 	0x00, 0x2A, 0x00,
@@ -1030,8 +1031,22 @@ int GfxMgr::initVideo() {
 		initPalette(vgaPalette, 256, 8);
 	else if (_vm->_renderMode == Common::kRenderEGA)
 		initPalette(egaPalette);
-	else
-		initPalette(newPalette);
+	else if (_vm->_renderMode == Common::kRenderAmiga) {
+		if (!ConfMan.getBool("altamigapalette")) {
+			// Set the correct Amiga palette
+			if (_vm->getVersion() < 0x2936)
+				// TODO: This palette isn't used for Apple IIGS games yet, as
+				// we don't set a separate render mode for them yet
+				initPalette(amigaAgiPaletteV1, 16, 4);
+			else if (_vm->getVersion() == 0x2936)
+				initPalette(amigaAgiPaletteV2, 16, 4);
+			else if (_vm->getVersion() > 0x2936)
+				initPalette(amigaAgiPaletteV3, 16, 4);
+		} else
+			// Set the old common alternative Amiga palette
+			initPalette(altAmigaPalette);
+	} else
+		error("initVideo: Unhandled render mode");
 
 	if ((_agiScreen = (uint8 *)calloc(GFX_WIDTH, GFX_HEIGHT)) == NULL)
 		return errNotEnoughMemory;


Commit: b3e45ccc6854c93e73fcda0f9daa67ffad76a3a1
    https://github.com/scummvm/scummvm/commit/b3e45ccc6854c93e73fcda0f9daa67ffad76a3a1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-07T15:33:11+02:00

Commit Message:
AGI: Disable/remove unused code

This is code that isn't used currently. Thanks to fingolfin for
pointing out these parts of the code

Changed paths:
    engines/agi/agi.cpp
    engines/agi/graphics.cpp
    engines/agi/preagi_mickey.cpp



diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 73233d4..1e663ec 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -492,11 +492,6 @@ struct GameSettings {
 	const char *detectname;
 };
 
-static const GameSettings agiSettings[] = {
-	{"agi", "AGI game", GID_AGI, MDT_ADLIB, "OBJECT"},
-	{NULL, NULL, 0, 0, NULL}
-};
-
 AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
 	// Assign default values to the config manager, in case settings are missing
 	ConfMan.registerDefault("originalsaveload", "false");
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 317e747..2b1bd8c 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -905,6 +905,7 @@ static const byte sciMouseCursor[] = {
 	0,0,0,0,0,0,1,2,2,1,0
 };
 
+#if 0
 /**
  * A black and white Apple IIGS style arrow cursor (9x11).
  * 0 = Transparent.
@@ -924,6 +925,7 @@ static const byte appleIIgsMouseCursor[] = {
 	2,2,2,0,2,1,1,2,0,
 	0,0,0,0,0,2,2,2,0
 };
+#endif
 
 /**
  * RGB-palette for the black and white SCI and Apple IIGS arrow cursors.
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index 4ca8d00..a1572d7 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -892,6 +892,7 @@ void MickeyEngine::drawRoom() {
 	drawRoomAnimation();
 }
 
+#if 0
 const uint8 colorBCG[16][2] = {
 	{ 0x00,	0x00 },	// 0 (black, black)
 	{ 0, 0 },
@@ -910,6 +911,7 @@ const uint8 colorBCG[16][2] = {
 	{ 0, 0 },
 	{ 0xFF,	0xFF }	// F (white, white)
 };
+#endif
 
 void MickeyEngine::drawLogo() {
 	// TODO: clean this up and make it work properly, the logo is drawn way off to the right






More information about the Scummvm-git-logs mailing list