diff options
-rw-r--r-- | common/util.cpp | 1 | ||||
-rw-r--r-- | common/util.h | 3 | ||||
-rw-r--r-- | scumm/resource_v2.cpp | 48 |
3 files changed, 37 insertions, 15 deletions
diff --git a/common/util.cpp b/common/util.cpp index 0d68a5a2cc..0baf6c734e 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -161,6 +161,7 @@ const char *getLanguageDescription(Language id) { const PlatformDescription g_platforms[] = { {"amiga", "ami", "Amiga", kPlatformAmiga}, {"atari", "atari-st", "Atari ST", kPlatformAtariST}, + {"c64", "c64", "Commodore 64", kPlatformC64}, // The 'official' spelling seems to be "FM-TOWNS" (e.g. in the Indy4 demo). // However, on the net many variations can be seen, like "FMTOWNS", diff --git a/common/util.h b/common/util.h index 3f10d5434c..db30fc20d9 100644 --- a/common/util.h +++ b/common/util.h @@ -131,7 +131,8 @@ enum Platform { kPlatformMacintosh = 3, kPlatformFMTowns = 4, kPlatformWindows = 5, - kPlatformNES = 6 + kPlatformNES = 6, + kPlatformC64 = 7 /* kPlatformSEGA, kPlatformPCEngine diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp index 00f2628023..7f6088a003 100644 --- a/scumm/resource_v2.cpp +++ b/scumm/resource_v2.cpp @@ -35,30 +35,45 @@ void ScummEngine_v2::readClassicIndexFile() { int i; if (_gameId == GID_MANIAC) { - if (_platform == Common::kPlatformNES) + if (_platform == Common::kPlatformC64) { + _numGlobalObjects = 256; + _numRooms = 55; + _numCostumes = 25; + _numScripts = 160; + _numSounds = 70; + } if (_platform == Common::kPlatformNES) { _numGlobalObjects = 775; - else - _numGlobalObjects = 800; - _numRooms = 55; + _numRooms = 55; - if (_platform == Common::kPlatformNES) // costumes 25-36 are special. see v1MMNEScostTables[] in costume.cpp // costumes 37-76 are room graphics resources // costume 77 is a character set translation table // costume 78 is a preposition list // costume 79 is unused but allocated, so the total is a nice even number :) _numCostumes = 80; - else + _numScripts = 200; + _numSounds = 100; + } else { + _numGlobalObjects = 800; + _numRooms = 55; _numCostumes = 35; - - _numScripts = 200; - _numSounds = 100; + _numScripts = 200; + _numSounds = 100; + } } else if (_gameId == GID_ZAK) { - _numGlobalObjects = 775; - _numRooms = 61; - _numCostumes = 37; - _numScripts = 155; - _numSounds = 120; + if (_platform == Common::kPlatformC64) { + _numGlobalObjects = 775; + _numRooms = 59; + _numCostumes = 38; + _numScripts = 155; + _numSounds = 127; + } else { + _numGlobalObjects = 775; + _numRooms = 61; + _numCostumes = 37; + _numScripts = 155; + _numSounds = 120; + } } _fileHandle->seek(0, SEEK_SET); @@ -175,6 +190,11 @@ void ScummEngine_v2::readIndexFile() { _version = 1; readClassicIndexFile(); break; + case 0x132: + printf("C64 V1 game detected\n"); + _version = 1; + readClassicIndexFile(); + break; default: error("Unknown magic id (0x%X) - this version is unsupported", magic); break; |