diff options
author | Eugene Sandulenko | 2005-05-10 22:31:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-05-10 22:31:48 +0000 |
commit | 55c37c18ceed916eb3744666d3d10783b0cf8783 (patch) | |
tree | cce27da5d88ae39c810bc49b8ee31b8d05663fe5 /scumm | |
parent | 39852157fee003a66d16dfa3168e6a9bf60d29ef (diff) | |
download | scummvm-rg350-55c37c18ceed916eb3744666d3d10783b0cf8783.tar.gz scummvm-rg350-55c37c18ceed916eb3744666d3d10783b0cf8783.tar.bz2 scummvm-rg350-55c37c18ceed916eb3744666d3d10783b0cf8783.zip |
Preparations to let LogicHE hold game-specific code. Introduced
GF_HE_985. Feel free to give it more proper name.
svn-id: r18036
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/logic_he.cpp | 146 | ||||
-rw-r--r-- | scumm/logic_he.h | 38 | ||||
-rw-r--r-- | scumm/resource_v7he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 62 | ||||
-rw-r--r-- | scumm/scumm.h | 17 |
6 files changed, 179 insertions, 88 deletions
diff --git a/scumm/logic_he.cpp b/scumm/logic_he.cpp index aadedefdef..47381aa246 100644 --- a/scumm/logic_he.cpp +++ b/scumm/logic_he.cpp @@ -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 @@ LogicHE::~LogicHE() { 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; + + 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); -void LogicHE::endOfFrame() { - // void implementation + 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 @@ int32 LogicHE::dispatch(int op, int numArgs, int32 *args) { #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 @@ int32 LogicHE::op_1100(int32 *args) { _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 @@ int32 LogicHE::op_1101(int32 *args) { return retval; } -int32 LogicHE::op_1102(int32 *args) { +int32 LogicHErace::op_1102(int32 *args) { int32 retval; float temp; @@ -235,24 +244,24 @@ int32 LogicHE::op_1102(int32 *args) { 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 @@ int32 LogicHE::op_1120(int32 *args) { 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 @@ int32 LogicHE::op_1140(int32 *args) { 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 @@ void LogicHE::op_sub1(float arg) { _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 @@ void LogicHE::op_sub2(float arg) { _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 @@ void LogicHE::op_sub3(float arg) { _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 diff --git a/scumm/logic_he.h b/scumm/logic_he.h index 12c3362f3c..7eb76571ac 100644 --- a/scumm/logic_he.h +++ b/scumm/logic_he.h @@ -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 @@ private: 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 diff --git a/scumm/resource_v7he.cpp b/scumm/resource_v7he.cpp index 22e628c396..4e56d3669b 100644 --- a/scumm/resource_v7he.cpp +++ b/scumm/resource_v7he.cpp @@ -1717,7 +1717,7 @@ void ScummEngine_v90he::readMAXS(int blockSize) { _numNewNames = 10; _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); - if (_gameId == GID_FREDDI4) + if (_features & GF_HE_985) _numGlobalScripts = 2048; else _numGlobalScripts = 200; diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 5e2090e4ab..181b3fd394 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -1211,7 +1211,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() { 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(); diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 78a9e188a6..361d16167b 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -320,9 +320,9 @@ static const ScummGameSettings scumm_settings[] = { // 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 @@ static const ScummGameSettings scumm_settings[] = { 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 @@ static const ScummGameSettings scumm_settings[] = { 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 @@ static const ScummGameSettings multiple_versions_md5_settings[] = { {"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 @@ static const ScummGameSettings multiple_versions_md5_settings[] = { {"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 @@ static const ScummGameSettings multiple_versions_md5_settings[] = { {"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 @@ static const ScummGameSettings multiple_versions_md5_settings[] = { {"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 @@ void ScummEngine_v90he::scummInit() { 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; + } } } diff --git a/scumm/scumm.h b/scumm/scumm.h index eecec914b8..53ae24ab94 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -118,14 +118,20 @@ enum GameFeatures { /** 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 @@ enum ScummGameId { GID_FBEAR, GID_FUNPACK, GID_FREDDI2, - GID_FREDDI4, - GID_FREDDICOVE + GID_FREDDICOVE, + GID_PUTTRACE, + GID_FUNSHOP // Used for all three funshops }; struct SentenceTab { |