[Scummvm-cvs-logs] SF.net SVN: scummvm:[35379] scummvm/trunk

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Dec 15 10:54:22 CET 2008


Revision: 35379
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35379&view=rev
Author:   Kirben
Date:     2008-12-15 09:54:21 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
Add Moonbase Commander target again, for testing only.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/detection_tables.h
    scummvm/trunk/engines/scumm/he/logic_he.cpp
    scummvm/trunk/engines/scumm/he/logic_he.h
    scummvm/trunk/engines/scumm/he/script_v60he.cpp
    scummvm/trunk/engines/scumm/he/script_v72he.cpp
    scummvm/trunk/engines/scumm/he/wiz_he.cpp
    scummvm/trunk/engines/scumm/scumm-md5.h
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/scumm.h
    scummvm/trunk/tools/scumm-md5.txt

Modified: scummvm/trunk/engines/scumm/detection_tables.h
===================================================================
--- scummvm/trunk/engines/scumm/detection_tables.h	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/detection_tables.h	2008-12-15 09:54:21 UTC (rev 35379)
@@ -107,6 +107,7 @@
 	{ "jungle", "Let's Explore the Jungle with Buzzy" },
 	{ "lost", "Pajama Sam's Lost & Found" },
 	{ "maze", "Freddi Fish and Luther's Maze Madness" },
+	{ "moonbase", "Moonbase Commander" },
 	{ "mustard", "SPY Fox in Hold the Mustard" },
 	{ "pajama", "Pajama Sam 1: No Need to Hide When It's Dark Outside" },
 	{ "pajama2", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening" },
@@ -347,17 +348,20 @@
 	// Restructured the Scumm engine
 	{"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK},
 
+	// Uses smacker in external files, for testing only
+	{"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
+	{"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
+
 	// Uses bink in external files for logos
 	{"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
 	{"basketball", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK},
+	{"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
 	{"Soccer2004", 0, 0, GID_SOCCER, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
 
-	// Uses smacker in external files, for testing only
-	{"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
-	{"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
-	{"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
+	// U32 code required, for testing only
+	{"moonbase", 0, 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
+	{"moonbase", "Demo", 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR | GF_DEMO, UNK},
 
-
 	// The following are meant to be generic HE game variants and as such do
 	// not specify a game ID. Make sure that these are last in the table, else
 	// they'll override more specific entries that follow later on.
@@ -640,6 +644,9 @@
 	{ "maze", "Doolhof", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 },
 	{ "maze", "Maze Madness", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
 
+	{ "moonbase", "moonbase", kGenHEPC, UNK_LANG, UNK, 0 },
+	{ "moonbase", "moondemo", kGenHEPC, UNK_LANG, UNK, 0 },
+
 	{ "mustard", "mustard", kGenHEPC, UNK_LANG, UNK, 0 },
 	{ "mustard", "Mustard", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
 

Modified: scummvm/trunk/engines/scumm/he/logic_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/logic_he.cpp	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/he/logic_he.cpp	2008-12-15 09:54:21 UTC (rev 35379)
@@ -959,4 +959,16 @@
 	return 1;
 }
 
+/***********************
+ * Moonbase Commander
+ *
+ */
+
+int LogicHEmoonbase::versionID() {
+	if (_vm->_game.features & GF_DEMO)
+		return -100;
+	else
+		return 100;
+}
+
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/he/logic_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/logic_he.h	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/he/logic_he.h	2008-12-15 09:54:21 UTC (rev 35379)
@@ -135,6 +135,13 @@
 	int op_1021(int32 *args);
 };
 
+class LogicHEmoonbase : public LogicHE {
+public:
+	LogicHEmoonbase(ScummEngine_v90he *vm) : LogicHE(vm) {}
+
+	int versionID();
+};
+
 } // End of namespace Scumm
 
 #endif

Modified: scummvm/trunk/engines/scumm/he/script_v60he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v60he.cpp	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/he/script_v60he.cpp	2008-12-15 09:54:21 UTC (rev 35379)
@@ -430,6 +430,8 @@
 			if (dst[r - 1] == '/')
 				break;
 		}
+	} else if (dst[0] == 'u' && dst[1] == 's') { // Save Game Path (Moonbase Commander)
+		r = 5;
 	}
 
 	debug(1, "convertFilePath: converted filePath is %s", dst + r);

Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp	2008-12-15 09:54:21 UTC (rev 35379)
@@ -1676,6 +1676,11 @@
 	copyScriptString(buffer, sizeof(buffer));
 	debug(1, "Original filename %s", buffer);
 
+	// HACK: INI filename seems to get reset, corruption elsewhere?
+	if (_game.id == GID_MOONBASE && buffer[0] == 0) {
+		strcpy((char *)buffer, "moonbase.ini");
+	}
+
 	const char *filename = (char *)buffer + convertFilePath(buffer);
 	debug(1, "Final filename to %s", filename);
 

Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp	2008-12-15 09:54:21 UTC (rev 35379)
@@ -526,7 +526,7 @@
 }
 
 void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) {
-	// RAW 16 bits in 555 format
+	// TODO: RAW 16 bits in 555 format
 
 	// HACK: Skip every second bit for now
 	Common::Rect r1, r2;
@@ -1238,6 +1238,12 @@
 	case 2:
 		copyRaw16BitWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor);
 		break;
+	case 4:
+		// TODO: Unknown image type
+		break;
+	case 5:
+		// TODO: 16bit color compressed image
+		break;
 	default:
 		error("drawWizImage: Unhandled wiz compression type %d", comp);
 	}
@@ -2105,9 +2111,17 @@
 			ret = isWizPixelNonTransparent(wizd, x, y, w, h);
 			break;
 		case 2:
-			// Used baseball2003
+			// TODO: 16bit color uncompressed image type
 			debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
 			break;
+		case 4:
+			// TODO: Unknown image type
+			debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
+			break;
+		case 5:
+			// TODO: 16bit color compressed image type
+			debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
+			break;
 		default:
 			error("isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
 			break;
@@ -2117,7 +2131,7 @@
 }
 
 uint8 Wiz::getWizPixelColor(int resNum, int state, int x, int y, int flags) {
-	uint8 color;
+	uint8 color = 0;
 	uint8 *data = _vm->getResourceAddress(rtImage, resNum);
 	assert(data);
 	uint8 *wizh = _vm->findWrappedBlock(MKID_BE('WIZH'), data, state, 0);
@@ -2138,6 +2152,18 @@
 	case 1:
 		color = getWizPixelColor(wizd, x, y, w, h, _vm->VAR(_vm->VAR_WIZ_TCOLOR));
 		break;
+	case 2:
+		// TODO: 16bit color uncompressed image type
+		debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
+		break;
+	case 4:
+		// TODO: Unknown image type
+		debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
+		break;
+	case 5:
+		// TODO: 16bit color compressed image type
+		debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
+		break;
 	default:
 		error("getWizPixelColor: Unhandled wiz compression type %d", c);
 		break;

Modified: scummvm/trunk/engines/scumm/scumm-md5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm-md5.h	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/scumm-md5.h	2008-12-15 09:54:21 UTC (rev 35379)
@@ -1,5 +1,5 @@
 /*
-  This file was generated by the md5table tool on Fri Oct  3 16:12:45 2008
+  This file was generated by the md5table tool on Mon Dec 15 08:27:46 2008
   DO NOT EDIT MANUALLY!
  */
 
@@ -498,6 +498,7 @@
 	{ "ce7733f185b838e248927c7ba1a04204", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAmiga },
 	{ "ce7fd0c382389a6791fc3e199c117ef4", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
 	{ "cea91e3dd47f2518ea418e41611aa77f", "spyfox2", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
+	{ "cf400d20769fb70eb21766582f4924f7", "moonbase", "", "", -1, Common::EN_ANY, Common::kPlatformWindows },
 	{ "cf4ef315214c7d8cdab6302cdb7e50db", "freddi", "HE 73", "Demo", -1, Common::DE_DEU, Common::kPlatformWindows },
 	{ "cf8d13446ec6cb6222287a925fd47c1d", "baseball", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
 	{ "cf8ef3a1fb483c5c4b1c584d1167b2c4", "freddi", "HE 73", "", -1, Common::DE_DEU, Common::kPlatformWindows },
@@ -573,6 +574,7 @@
 	{ "ee41f6afbc5b26fa475754b56fe92048", "puttputt", "HE 61", "", 8032, Common::JA_JPN, Common::kPlatform3DO },
 	{ "ee785fe2569bc9965526e774f7ab86f1", "spyfox", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
 	{ "ef347474f3c7be3b29584eaa133cca05", "samnmax", "", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
+	{ "ef71a322b6530ac45b1a070f7c0795f7", "moonbase", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
 	{ "ef74d9071d4e564b037cb44bd6774de7", "fbear", "HE 61", "", -1, Common::HB_ISR, Common::kPlatformPC },
 	{ "efe0a04a703e765ebebe92b6c8aa6b86", "baseball2003", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
 	{ "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformPC },

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2008-12-15 09:54:21 UTC (rev 35379)
@@ -1503,6 +1503,10 @@
 			_logicHE = new LogicHEsoccer(this);
 			break;
 
+		case GID_MOONBASE:
+			_logicHE = new LogicHEmoonbase(this);
+			break;
+
 		default:
 			_logicHE = new LogicHE(this);
 			break;

Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/engines/scumm/scumm.h	2008-12-15 09:54:21 UTC (rev 35379)
@@ -225,6 +225,7 @@
 	GID_FUNSHOP,	// Used for all three funshops
 	GID_FOOTBALL,
 	GID_SOCCER,
+	GID_MOONBASE,
 	GID_HECUP		// CUP demos
 };
 

Modified: scummvm/trunk/tools/scumm-md5.txt
===================================================================
--- scummvm/trunk/tools/scumm-md5.txt	2008-12-15 09:01:43 UTC (rev 35378)
+++ scummvm/trunk/tools/scumm-md5.txt	2008-12-15 09:54:21 UTC (rev 35379)
@@ -591,6 +591,10 @@
 	659942b9a6b519f123a13cca3c333a13	-1	en	Mac	-	-	-	Joachim Eberhard
 	8801fb4a1200b347f7a38523339526dd	-1	en	Windows	-	-	-	Kirben
 
+moonbase	Moonbase Commander
+	cf400d20769fb70eb21766582f4924f7	-1	en	Windows	-	-	-	Kirben
+	ef71a322b6530ac45b1a070f7c0795f7	-1	en	Windows	Demo	Demo	-	Kirben
+
 pajama	Pajama Sam 1: No Need to Hide When It's Dark Outside
 	672dec94b82f7f0877ebb5b5cf7f4bc1	-1	us	All	-	-	-	khalek
 	1d7a2e1ddcade791e2de0cfceac86725	-1	fr	All	-	-	-	gist974, ThierryFR


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