[Scummvm-cvs-logs] CVS: scummvm/scumm logic_he.cpp,2.4,2.5 logic_he.h,2.2,2.3 resource_v7he.cpp,1.39,1.40 script_v90he.cpp,2.253,2.254 scumm.cpp,1.499,1.500 scumm.h,1.621,1.622

Eugene Sandulenko sev at users.sourceforge.net
Tue May 10 15:33:43 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11594

Modified Files:
	logic_he.cpp logic_he.h resource_v7he.cpp script_v90he.cpp 
	scumm.cpp scumm.h 
Log Message:
Preparations to let LogicHE hold game-specific code. Introduced 
GF_HE_985. Feel free to give it more proper name.


Index: logic_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/logic_he.cpp,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -d -r2.4 -r2.5
--- logic_he.cpp	10 May 2005 01:01:38 -0000	2.4
+++ logic_he.cpp	10 May 2005 22:31:46 -0000	2.5
@@ -26,11 +26,6 @@
 
 namespace Scumm {
 
-/***********************
- * Putt-Putt Joins the Race
- *
- */
-
 LogicHE::LogicHE(ScummEngine *vm) : _vm(vm) {
 	// Originally it used 0x930 and stored both floats and doubles inside
 	_userData = (float *)calloc(550, sizeof(float));
@@ -42,27 +37,41 @@
 	free(_userDataD);
 }
 
-void LogicHE::beforeBootScript() {
-	// void implementation
+int LogicHE::versionID() {
+	return 1;
 }
 
-void LogicHE::initOnce() {
-	// void implementation
-}
+int32 LogicHE::dispatch(int op, int numArgs, int32 *args) {
+	char tmp[32], str[256];
 
-void LogicHE::startOfFrame() {
-	// void implementation
-}
+	if (numArgs > 0)
+		snprintf(tmp, 32, "%d", args[0]);
+	else
+		*tmp = 0;
 
-void LogicHE::endOfFrame() {
-	// void implementation
+	snprintf(str, 256, "LogicHE::dispatch(%d, %d, [%s", op, numArgs, tmp);
+
+	for (int i = 1; i < numArgs; i++) {
+		snprintf(tmp, 32, ", %d", args[i]);
+		strncat(str, tmp, 256);
+	}
+	strncat(str, "])", 256);
+
+	debug(0, str);
+
+	return 1;
 }
 
-int LogicHE::versionID() {
+/***********************
+ * Putt-Putt Joins the Race
+ *
+ */
+
+int LogicHErace::versionID() {
 	return 1;
 }
 
-int32 LogicHE::dispatch(int op, int numArgs, int32 *args) {
+int32 LogicHErace::dispatch(int op, int numArgs, int32 *args) {
 	int32 res;
 
 	switch (op) {
@@ -118,23 +127,23 @@
 #define RAD2DEG 5.729577951308239e1
 #define DEG2RAD 1.745329251994328e-2
 
-int32 LogicHE::op_1003(int32 *args) {
+int32 LogicHErace::op_1003(int32 *args) {
 	int value = args[2] ? args[2] : 1;
 
-	_vm->writeVar(108, (int32)(atan((float)(args[0] / args[1])) * RAD2DEG * value));
+	writeScummVar(108, (int32)(atan((float)(args[0] / args[1])) * RAD2DEG * value));
 
 	return 1;
 }
 
-int32 LogicHE::op_1004(int32 *args) {
+int32 LogicHErace::op_1004(int32 *args) {
 	int value = args[1] ? args[1] : 1;
 
-	_vm->writeVar(108, (int32)(sqrt((float)args[0]) * value));
+	writeScummVar(108, (int32)(sqrt((float)args[0]) * value));
 
 	return 1;
 }
 
-int32 LogicHE::op_1100(int32 *args) {
+int32 LogicHErace::op_1100(int32 *args) {
 	_userData[516] = (float)args[0] / args[10];
 	_userData[517] = (float)args[1] / args[10];
 	_userData[518] = (float)args[2] / args[10];
@@ -156,26 +165,26 @@
 	_userData[526] = (float)args[6] / args[8] / args[10];
 	_userData[527] = (float)args[7] / args[9] / args[10];
 
-	_vm->writeVar(108, (int32)((float)args[6] / args[8] * args[10]));
+	writeScummVar(108, (int32)((float)args[6] / args[8] * args[10]));
 
-	_vm->writeVar(109, (int32)((float)args[7] / args[9] * args[10]));
+	writeScummVar(109, (int32)((float)args[7] / args[9] * args[10]));
 
 	_userData[528] = (float)(_userData[519] - _userData[523] * 0.5);
 	_userData[529] = (float)(_userData[519] + _userData[523] * 0.5);
 
-	_vm->writeVar(110, (int32)(_userData[528] * args[10]));
-	_vm->writeVar(111, (int32)(_userData[529] * args[10]));
+	writeScummVar(110, (int32)(_userData[528] * args[10]));
+	writeScummVar(111, (int32)(_userData[529] * args[10]));
 
 	_userData[530] = (float)(_userData[517] / tan(_userData[529] * DEG2RAD));
 	_userData[531] = (float)(_userData[517] / tan(_userData[528] * DEG2RAD));
 
-	_vm->writeVar(112, (int32)(_userData[530] * args[10]));
-	_vm->writeVar(113, (int32)(_userData[531] * args[10]));
+	writeScummVar(112, (int32)(_userData[530] * args[10]));
+	writeScummVar(113, (int32)(_userData[531] * args[10]));
 
 	return 1;
 }
 
-int32 LogicHE::op_1101(int32 *args) {
+int32 LogicHErace::op_1101(int32 *args) {
 	int32 retval;
 	float temp;
 
@@ -208,7 +217,7 @@
 	return retval;
 }
 
-int32 LogicHE::op_1102(int32 *args) {
+int32 LogicHErace::op_1102(int32 *args) {
 	int32 retval;
 	float temp;
 
@@ -235,24 +244,24 @@
 	return retval;
 }
 
-int32 LogicHE::op_1103(int32 *args) {
+int32 LogicHErace::op_1103(int32 *args) {
 	double angle = args[0] / args[1] * DEG2RAD;
 	
-	_vm->writeVar(108, (int32)(sin(angle) * args[2]));
-	_vm->writeVar(109, (int32)(cos(angle) * args[2]));
+	writeScummVar(108, (int32)(sin(angle) * args[2]));
+	writeScummVar(109, (int32)(cos(angle) * args[2]));
 
 	return 1;
 }
 
-int32 LogicHE::op_1110() {
-	_vm->writeVar(108, (int32)(_userData[526] * _userData[532] * _userData[532]));
-	_vm->writeVar(109, (int32)(_userData[527] * _userData[532] * _userData[532]));
-	_vm->writeVar(110, (int32)(_userData[532]));
+int32 LogicHErace::op_1110() {
+	writeScummVar(108, (int32)(_userData[526] * _userData[532] * _userData[532]));
+	writeScummVar(109, (int32)(_userData[527] * _userData[532] * _userData[532]));
+	writeScummVar(110, (int32)(_userData[532]));
 
 	return 1;
 }
 
-int32 LogicHE::op_1120(int32 *args) {
+int32 LogicHErace::op_1120(int32 *args) {
 	double a0, a1, a2, expr;
 	double res1, res2;
 
@@ -267,24 +276,24 @@
 	res2 = (atan((a2 * _userDataD[16] + a1 * _userDataD[13] + a0 * _userDataD[10]) / expr) * RAD2DEG
 			- _userData[528]) / _userData[527];
 	
-	_vm->writeVar(108, (int32)res1);
-	_vm->writeVar(109, (int32)res2);
+	writeScummVar(108, (int32)res1);
+	writeScummVar(109, (int32)res2);
 
 	return 1;
 }
 
-int32 LogicHE::op_1130(int32 *args) {
+int32 LogicHErace::op_1130(int32 *args) {
 	double cs = cos(args[0] / _userData[532] * DEG2RAD);
 	double sn = sin(args[0] / _userData[532] * DEG2RAD);
 
-	_vm->writeVar(108, (int32)(cs * args[1] + sn * args[2]));
+	writeScummVar(108, (int32)(cs * args[1] + sn * args[2]));
 
-	_vm->writeVar(109, (int32)(cs * args[2] - sn * args[1]));
+	writeScummVar(109, (int32)(cs * args[2] - sn * args[1]));
 
 	return 1;
 }
 
-int32 LogicHE::op_1140(int32 *args) {
+int32 LogicHErace::op_1140(int32 *args) {
 	double arg2 = -args[2] * args[2];
 	double arg3 = -args[3] * args[3];
 	double sq = sqrt(arg2 + arg3);
@@ -295,19 +304,19 @@
 
 	res = (args[0] - 2 * (arg2 * args[0] + arg3 * args[1]) * arg2) * 0.86956525;
 
-	_vm->writeVar(108, (int32)res);
+	writeScummVar(108, (int32)res);
 	
 	res = args[1] - 2 * (arg2 * args[0] + arg3 * args[1]) * arg3;
 	
 	if (-args[3] * args[3] >= 0)
 		res *= 0.83333331f;
 
-	_vm->writeVar(109, (int32)res);
+	writeScummVar(109, (int32)res);
 
 	return 1;
 }
 
-void LogicHE::op_sub1(float arg) {
+void LogicHErace::op_sub1(float arg) {
 	_userDataD[10] = _userDataD[12] = _userDataD[14] = _userDataD[16] = 0;
 	_userDataD[13] = 1;
 
@@ -317,7 +326,7 @@
 	_userDataD[17] = _userDataD[9];
 }
 
-void LogicHE::op_sub2(float arg) {
+void LogicHErace::op_sub2(float arg) {
 	_userDataD[20] = _userDataD[21] = _userDataD[24] = _userDataD[25] = 0;
 	_userDataD[26] = 1;
 
@@ -327,7 +336,7 @@
 	_userDataD[22] = _userDataD[18];
 }
 
-void LogicHE::op_sub3(float arg) {
+void LogicHErace::op_sub3(float arg) {
 	_userDataD[1] = _userDataD[2] = _userDataD[3] = _userDataD[6] = 0;
 	_userDataD[0] = 1;
 
@@ -337,4 +346,43 @@
 	_userDataD[8] = _userDataD[4];
 }
 
+/***********************
+ * Freddi Fish's One-Stop Fun Shop
+ * Pajama Sam's One-Stop Fun Shop
+ * Putt-Putt's One-Stop Fun Shop
+ *
+ */
+
+int LogicHEfunshop::versionID() {
+	return 1;
+}
+
+int32 LogicHEfunshop::dispatch(int op, int numArgs, int32 *args) {
+	switch (op) {
+	case 1004:
+		op_1004(args);
+		break;
+
+	case 1005:
+		op_1005(args);
+		break;
+
+	default:
+		break;
+
+	}
+
+	return 0;
+}
+
+void LogicHEfunshop::op_1004(int32 *args) {
+}
+
+void LogicHEfunshop::op_1005(int32 *args) {
+}
+
+int LogicHEfunshop::checkShape(int arg_0, int arg_4, int arg_8, int arg_C, int arg_10, int arg_14, int arg_18, int arg_1C, int arg_20, int arg_24) {
+	return 1;
+}
+
 } // End of namespace Scumm

Index: logic_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/logic_he.h,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -d -r2.2 -r2.3
--- logic_he.h	9 May 2005 02:30:31 -0000	2.2
+++ logic_he.h	10 May 2005 22:31:47 -0000	2.3
@@ -26,23 +26,34 @@
 namespace Scumm {
 
 class LogicHE {
-private:
+public:
 	float *_userData;
 	double *_userDataD;
 	ScummEngine *_vm;
 
-public:
 	LogicHE(ScummEngine *vm);
-	~LogicHE();
+	virtual ~LogicHE();
+
+	void writeScummVar(int var, int32 value) { _vm->writeVar(var, value); }
+
+	void beforeBootScript(void) {};
+	void initOnce() {};
+	void startOfFrame() {};
+	void endOfFrame() {};
+	virtual int versionID();
+	virtual int32 dispatch(int op, int numArgs, int32 *args);
+};
+
+class LogicHErace : public LogicHE {
+public:
+	LogicHErace(ScummEngine *vm) : LogicHE(vm) {}
 
-	void beforeBootScript(void);
-	void initOnce();
-	void startOfFrame();
-	void endOfFrame();
 	int versionID();
 	int32 dispatch(int op, int numArgs, int32 *args);
 
 private:
+	int checkShape(int arg_0, int arg_4, int arg_8, int arg_C, int arg_10, int arg_14, int arg_18, int arg_1C, int arg_20, int arg_24);
+
 	int32 op_1003(int32 *args);
 	int32 op_1004(int32 *args);
 	int32 op_1100(int32 *args);
@@ -59,4 +70,17 @@
 	void op_sub3(float arg);
 };
 
+class LogicHEfunshop : public LogicHE {
+public:
+	LogicHEfunshop(ScummEngine *vm) : LogicHE(vm) {}
+
+	int versionID();
+	int32 dispatch(int op, int numArgs, int32 *args);
+
+private:
+	void op_1004(int32 *args);
+	void op_1005(int32 *args);
+	int checkShape(int arg_0, int arg_4, int arg_8, int arg_C, int arg_10, int arg_14, int arg_18, int arg_1C, int arg_20, int arg_24);
+};
+
 } // End of namespace Scumm

Index: resource_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v7he.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- resource_v7he.cpp	10 May 2005 03:03:27 -0000	1.39
+++ resource_v7he.cpp	10 May 2005 22:31:47 -0000	1.40
@@ -1717,7 +1717,7 @@
 	_numNewNames = 10;
 
 	_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
-	if (_gameId == GID_FREDDI4)
+	if (_features & GF_HE_985)
 		_numGlobalScripts = 2048;
 	else
 		_numGlobalScripts = 200;

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.253
retrieving revision 2.254
diff -u -d -r2.253 -r2.254
--- script_v90he.cpp	10 May 2005 05:42:48 -0000	2.253
+++ script_v90he.cpp	10 May 2005 22:31:47 -0000	2.254
@@ -1211,7 +1211,7 @@
 			spriteInfoSet_angle(spriteId, args[0]);
 		break;
 	case 23:
-		if (_gameId == GID_FREDDI4 || _heversion >= 99) {
+		if (_features & GF_HE_985 || _heversion >= 99) {
 			_curMaxSpriteId = pop();
 			_curSpriteId = pop();
 			

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.499
retrieving revision 1.500
diff -u -d -r1.499 -r1.500
--- scumm.cpp	10 May 2005 03:03:27 -0000	1.499
+++ scumm.cpp	10 May 2005 22:31:47 -0000	1.500
@@ -320,9 +320,9 @@
 	// and INIB chunk in the .he0
 	{"lost", "Pajama Sam's Lost & Found", GID_HEGAME, 6, 98, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
-	{"racedemo", "Putt-Putt Enters the Race (Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE,
+	{"racedemo", "Putt-Putt Enters the Race (Demo)", GID_PUTTRACE, 6, 98, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
-	{"puttrace", "Putt-Putt Enters the Race", GID_HEGAME, 6, 98, 61, MDT_NONE,
+	{"puttrace", "Putt-Putt Enters the Race", GID_PUTTRACE, 6, 98, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
 	{"BluesABCTimeDemo", "Blue's ABC Time (Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
@@ -330,10 +330,10 @@
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
 
 	// Global scripts increased to 2048
-	{"freddi4", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch", GID_FREDDI4, 6, 98, 57, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
-	{"f4-demo", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Demo)", GID_FREDDI4, 6, 98, 57, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
+	{"freddi4", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch", GID_HEGAME, 6, 98, 57, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
+	{"f4-demo", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Demo)", GID_HEGAME, 6, 98, 57, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985 | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
 
 	// Engine moved to c++ 
 	// Humongous Entertainment Scumm Version 9.9 ?  Scummsys.99
@@ -359,11 +359,11 @@
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
 	{"pajama3", "Pajama Sam 3: You Are What You Eat From Your Head to Your Feet", GID_HEGAME, 6, 99, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformWindows, 0, 0},
-	{"FreddisFunShop", "Freddi Fish's One-Stop Fun Shop", GID_HEGAME, 6, 99, 61, MDT_NONE,
+	{"FreddisFunShop", "Freddi Fish's One-Stop Fun Shop", GID_FUNSHOP, 6, 99, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformWindows, 0, 0},
-	{"SamsFunShop", "Pajama Sam's One-Stop Fun Shop", GID_HEGAME, 6, 99, 61, MDT_NONE,
+	{"SamsFunShop", "Pajama Sam's One-Stop Fun Shop", GID_FUNSHOP, 6, 99, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformWindows, 0, 0},
-	{"PuttsFunShop", "Putt-Putt's One-Stop Fun Shop", GID_HEGAME, 6, 99, 61, MDT_NONE,
+	{"PuttsFunShop", "Putt-Putt's One-Stop Fun Shop", GID_FUNSHOP, 6, 99, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED, Common::kPlatformWindows, 0, 0},
 	{"putttime", "Putt-Putt Travels Through Time", GID_HEGAME, 6, 99, 31, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
@@ -439,9 +439,9 @@
 	{"75bff95816b84672b877d22a911ab811", "Freddi Fish 3: The Case of the Stolen Conch Shell (Updated Ru)", GID_HEGAME, 6, 98, 30, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // FIXME: number of actors
 
-	{"07b810e37be7489263f7bc7627d4765d", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Unencrypted Ru)", GID_FREDDI4, 6, 98, 57, MDT_NONE,
-	 GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformUnknown, 0, 0},
-	{"78bd5f036ea35a878b74e4f47941f784", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Updated Ru)", GID_FREDDI4, 6, 99, 57, MDT_NONE,
+	{"07b810e37be7489263f7bc7627d4765d", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Unencrypted Ru)", GID_HEGAME, 6, 98, 57, MDT_NONE,
+	 GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0},
+	{"78bd5f036ea35a878b74e4f47941f784", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Updated Ru)", GID_HEGAME, 6, 99, 57, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // FIXME: number of actors
 	{"499c958affc394f2a3868f1eb568c3ee", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Updated Demo)", GID_HEGAME, 6, 99, 57, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
@@ -482,18 +482,18 @@
 	{"d7ab7cd6105546016e6a0d46fb36b964", "Pajama Sam: No Need To Hide When It's Dark Outside (Demo Updated)", GID_HEGAME, 6, 100, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // PJSamDemo
 
-	{"30ba1e825d4ad2b448143ae8df18482a", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening (Updated Demo)", GID_FREDDI4, 6, 98, 61, MDT_NONE, // FIXME: number of actors
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // Pjs2demo
+	{"30ba1e825d4ad2b448143ae8df18482a", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening (Updated Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE, // FIXME: number of actors
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0}, // Pjs2demo
 	{"32709cbeeb3044b34129950860a83f14", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening (Updated)", GID_HEGAME, 6, 99, 61, MDT_NONE, // FIXME: number of actors
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // PajamaTAL
 
 	{"a561d2e2413cc1c71d5a1bf87bf493ea", "Pajama Sam's Lost & Found (Updated)", GID_HEGAME, 6, 100, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS, Common::kPlatformUnknown, 0, 0},
 
-	{"6af2419fe3db5c2fdb091ae4e5833770", "Putt-Putt Enters the Race (Updated Demo)", GID_FREDDI4, 6, 98, 61, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // 500demo
-	{"aaa587701cde7e74692c68c1024b85eb", "Putt-Putt Enters the Race (Updated Demo)", GID_FREDDI4, 6, 98, 61, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
+	{"6af2419fe3db5c2fdb091ae4e5833770", "Putt-Putt Enters the Race (Updated Demo)", GID_PUTTRACE, 6, 98, 61, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0}, // 500demo
+	{"aaa587701cde7e74692c68c1024b85eb", "Putt-Putt Enters the Race (Updated Demo)", GID_PUTTRACE, 6, 98, 61, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0},
 
 	{"9c92eeaf517a31b7221ec2546ab669fd", "Putt-Putt Goes To The Moon (Windows)", GID_HEGAME, 6, 70, 13, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
@@ -507,8 +507,8 @@
 	{"37ff1b308999c4cca7319edfcc1280a0", "Putt-Putt Joins The Parade (Windows Demo)", GID_HEGAME, 6, 70, 13, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
 
-	{"92e7727e67f5cd979d8a1070e4eb8cb3", "Putt-Putt Saves the Zoo (Updated)", GID_FREDDI4, 6, 98, 30, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
+	{"92e7727e67f5cd979d8a1070e4eb8cb3", "Putt-Putt Saves the Zoo (Updated)", GID_HEGAME, 6, 98, 30, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0},
 
 	{"a525c1753c1db5011c00417da37887ef", "Putt-Putt Travels Through Time (Updated)", GID_HEGAME, 6, 100, 31, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
@@ -525,14 +525,14 @@
 
 	{"3de99ef0523f8ca7958faa3afccd035a", "Spyfox 1: Dry Cereal (Updated)", GID_HEGAME, 6, 100, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
-	{"9bda5fee51d2fda5253d02c642016bf4", "Spyfox 1: Dry Cereal (Updated)", GID_FREDDI4, 6, 98, 61, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
+	{"9bda5fee51d2fda5253d02c642016bf4", "Spyfox 1: Dry Cereal (Updated)", GID_HEGAME, 6, 98, 61, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0},
 	{"72ac6bc980d5101c2142189d746bd62f", "Spyfox 1: Dry Cereal (Updated Ru)", GID_HEGAME, 6, 99, 61, MDT_NONE, // FIXME: number of actors
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // SPYFoxDC
 	{"9d4ab3e0e1d1ebc6ba8a6a4c470ed184", "Spyfox 1: Dry Cereal (Updated Demo)", GID_HEGAME, 6, 100, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
-	{"4edbf9d03550f7ba01e7f34d69b678dd", "Spyfox 1: Dry Cereal (Updated Demo)", GID_FREDDI4, 6, 98, 61, MDT_NONE,
-	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
+	{"4edbf9d03550f7ba01e7f34d69b678dd", "Spyfox 1: Dry Cereal (Updated Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE,
+	 GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_985, Common::kPlatformUnknown, 0, 0},
 
 	{"90c755e1c9b9b8a4129d37b2259d0655", "Spy Fox in Cheese Chase Game (Updated)", GID_HEGAME, 6, 100, 61, MDT_NONE,
 	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
@@ -1767,7 +1767,19 @@
 		setDefaultCursor();
 
 	if (_heversion >= 98) {
-		_logicHE = new LogicHE(this);
+		switch (_gameId) {
+		case GID_PUTTRACE:
+			_logicHE = new LogicHErace(this);
+			break;
+
+		case GID_FUNSHOP:
+			_logicHE = new LogicHEfunshop(this);
+			break;
+
+		default:
+			_logicHE = new LogicHE(this);
+			break;
+		}
 	}
 }
 

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.621
retrieving revision 1.622
diff -u -d -r1.621 -r1.622
--- scumm.h	9 May 2005 02:38:58 -0000	1.621
+++ scumm.h	10 May 2005 22:31:48 -0000	1.622
@@ -118,14 +118,20 @@
 	/** HE games for which localized versions exist */
 	GF_HE_LOCALIZED        = 1 << 13,
 
+	/** 
+	 *  HE Games with more global scripts and different sprite handling
+	 *  i.e. read it as HE version 9.85. Used for HE98 only.
+	 */
+	GF_HE_985			   = 1 << 14,
+
 	/** HE games with 16 bit color */
-	GF_16BIT_COLOR         = 1 << 14,
+	GF_16BIT_COLOR         = 1 << 15,
 
 	/** Games with multiple versions */
-	GF_MULTIPLE_VERSIONS   = 1 << 15,
+	GF_MULTIPLE_VERSIONS   = 1 << 16,
 	
 	/** A demo, not a full blown game. */
-	GF_DEMO                = 1 << 16
+	GF_DEMO                = 1 << 17
 };
 
 /* SCUMM Debug Channels */
@@ -240,8 +246,9 @@
 	GID_FBEAR,
 	GID_FUNPACK,
 	GID_FREDDI2,
-	GID_FREDDI4,
-	GID_FREDDICOVE
+	GID_FREDDICOVE,
+	GID_PUTTRACE,
+	GID_FUNSHOP		// Used for all three funshops
 };
 
 struct SentenceTab {





More information about the Scummvm-git-logs mailing list