diff options
author | Paweł Kołodziejski | 2003-06-02 18:15:09 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-06-02 18:15:09 +0000 |
commit | 6dbd36d668f9e8fb08d3c9bc4da0ecfbad372a0e (patch) | |
tree | 0b71e55a27f488732776c82ebfcabdd04aa8fb90 | |
parent | 0bf6779189b0fd66b5ec1d12cd6446a4a2c52ecd (diff) | |
download | scummvm-rg350-6dbd36d668f9e8fb08d3c9bc4da0ecfbad372a0e.tar.gz scummvm-rg350-6dbd36d668f9e8fb08d3c9bc4da0ecfbad372a0e.tar.bz2 scummvm-rg350-6dbd36d668f9e8fb08d3c9bc4da0ecfbad372a0e.zip |
more v1 load directory ...
svn-id: r8274
-rw-r--r-- | scumm/resource_v2.cpp | 44 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 6 |
3 files changed, 43 insertions, 11 deletions
diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp index 07722a3297..08d12ee70c 100644 --- a/scumm/resource_v2.cpp +++ b/scumm/resource_v2.cpp @@ -25,13 +25,15 @@ #include "resource.h" void Scumm_v2::readClassicIndexFile() { - if (_gameId == GID_MANIAC) { + int i; + + if (_gameId == GID_MANIAC64) { _numGlobalObjects = 800; _numRooms = 55; _numCostumes = 35; _numScripts = 200; _numSounds = 100; - } else if (_gameId == GID_ZAK) { + } else if (_gameId == GID_ZAK64) { _numGlobalObjects = 775; _numRooms = 61; _numCostumes = 37; @@ -51,15 +53,43 @@ void Scumm_v2::readClassicIndexFile() { _palManipIntermediatePal = 0; // Will allocate when needed _fileHandle.readUint16LE(); /* version magic number */ - for (int i = 0; i != _numGlobalObjects; i++) { + for (i = 0; i != _numGlobalObjects; i++) { byte tmp = _fileHandle.readByte(); _objectOwnerTable[i] = tmp & OF_OWNER_MASK; _objectStateTable[i] = tmp >> OF_STATE_SHL; } - readResTypeList(rtRoom, MKID('ROOM'), "room"); - readResTypeList(rtCostume, MKID('COST'), "costume"); - readResTypeList(rtScript, MKID('SCRP'), "script"); - readResTypeList(rtSound, MKID('SOUN'), "sound"); + + for (i = 0; i < _numRooms; i++) { + res.roomno[rtRoom][i] = i; + _fileHandle.seek(_numRooms, SEEK_CUR); + } + + for (i = 0; i < _numCostumes; i++) { + res.roomno[rtCostume][i] = _fileHandle.readByte(); + } + for (i = 0; i < _numCostumes; i++) { + res.roomoffs[rtCostume][i] = _fileHandle.readUint16LE(); + if (res.roomoffs[rtCostume][i] == 0xFFFF) + res.roomoffs[rtCostume][i] = 0xFFFFFFFF; + } + + for (i = 0; i < _numScripts; i++) { + res.roomno[rtScript][i] = _fileHandle.readByte(); + } + for (i = 0; i < _numScripts; i++) { + res.roomoffs[rtScript][i] = _fileHandle.readUint16LE(); + if (res.roomoffs[rtScript][i] == 0xFFFF) + res.roomoffs[rtScript][i] = 0xFFFFFFFF; + } + + for (i = 0; i < _numSounds; i++) { + res.roomno[rtSound][i] = _fileHandle.readByte(); + } + for (i = 0; i < _numSounds; i++) { + res.roomoffs[rtSound][i] = _fileHandle.readUint16LE(); + if (res.roomoffs[rtSound][i] == 0xFFFF) + res.roomoffs[rtSound][i] = 0xFFFFFFFF; + } } void Scumm_v2::readEnhancedIndexFile() { diff --git a/scumm/scumm.h b/scumm/scumm.h index cec7b30acd..a0912a5d7b 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -181,8 +181,8 @@ enum ScummGameId { GID_CMI, GID_MANIAC, GID_ZAK, - //GID_MANIAC64, - //GID_ZAK64, + GID_MANIAC64, + GID_ZAK64, GID_PUTTDEMO }; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 5444b7a2cb..335500e235 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -61,8 +61,10 @@ extern uint16 _debugLevel; static const VersionSettings scumm_settings[] = { /* Scumm Version 1 */ -// {"maniac64", "Maniac Mansion (C64)", GID_MANIAC64, 1, 0, 0,}, -// {"zak64", "Zak McKracken and the Alien Mindbenders (C64)", GID_ZAK64, 1, 0, 0,}, + {"maniac64", "Maniac Mansion (C64)", GID_MANIAC64, 1, 0, 0, + GF_AFTER_V1 | GF_AFTER_V2 | GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, + {"zak64", "Zak McKracken and the Alien Mindbenders (C64)", GID_ZAK64, 1, 0, 0, + GF_AFTER_V1 | GF_AFTER_V2 | GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, /* Scumm Version 2 */ {"maniac", "Maniac Mansion", GID_MANIAC, 2, 0, 0, |