diff options
author | Jonathan Gray | 2003-08-29 02:39:05 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-08-29 02:39:05 +0000 |
commit | 176803cb90b495457d51dd4dea6ed7004462ad22 (patch) | |
tree | 9aac624b8ca8de8899a42515a337db574b53523b /scumm | |
parent | 2a89cd9c9dda8693b34fa0391e8ec20cc2e14108 (diff) | |
download | scummvm-rg350-176803cb90b495457d51dd4dea6ed7004462ad22.tar.gz scummvm-rg350-176803cb90b495457d51dd4dea6ed7004462ad22.tar.bz2 scummvm-rg350-176803cb90b495457d51dd4dea6ed7004462ad22.zip |
make the 2nd gen windows based humongous games that have things like a different layout in the MAXS block at least start the bootscript, added pjs-demo target to test with
svn-id: r9897
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/resource.cpp | 37 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 4 |
3 files changed, 36 insertions, 6 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index f49f321666..4c8a8c4f1c 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -79,13 +79,13 @@ void Scumm::openRoom(int room) { } if (!(_features & GF_SMALL_HEADER)) { - if (_version >= 7) { + if (_features & GF_AFTER_HEV7) { + sprintf(buf, "%s.he%.1d", _exe_name, room == 0 ? 0 : 1); + } else if (_version >= 7) { if (room > 0 && (_version == 8)) VAR(VAR_CURRENTDISK) = res.roomno[rtRoom][room]; sprintf(buf, "%s.la%d", _exe_name, room == 0 ? 0 : res.roomno[rtRoom][room]); sprintf(buf2, "%s.%.3d", _exe_name, room == 0 ? 0 : res.roomno[rtRoom][room]); - } else if (_features & GF_AFTER_HEV7) { - sprintf(buf, "%s.he%.1d", _exe_name, room == 0 ? 0 : 1); } else if (_features & GF_HUMONGOUS) sprintf(buf, "%s.he%.1d", _exe_name, room == 0 ? 0 : res.roomno[rtRoom][room]); else { @@ -341,7 +341,8 @@ void Scumm::readIndexFile() { } if (_features & GF_AFTER_HEV7) { // _objectRoomTable - _fileHandle.seek(num * 4, SEEK_CUR); + //_fileHandle.seek(num * 4, SEEK_CUR); + _fileHandle.read(_objectRoomTable, num * 4); } } @@ -367,6 +368,10 @@ void Scumm::readIndexFile() { _fileHandle.read(_HEV7RoomOffsets, (2 + (i * 4)) ); break; + case MKID('DIRM'): + _fileHandle.seek(itemsize - 8, SEEK_CUR); + break; + case MKID('DIRI'): num = _fileHandle.readUint16LE(); _fileHandle.seek(num + (8 * num), SEEK_CUR); @@ -1928,7 +1933,29 @@ void Scumm::readMAXS() { _numGlobalScripts = 2000; _shadowPaletteSize = NUM_SHADOW_PALETTE * 256; - } else if (_version == 6) { + // FIXME better check for the more recent windows based humongous games... + } else if (_gameId == GID_PJSDEMO) { + _fileHandle.readUint16LE(); + _numVariables = _fileHandle.readUint16LE(); + _numBitVariables = _fileHandle.readUint16LE(); + _numLocalObjects = _fileHandle.readUint16LE(); + _numArray = _fileHandle.readUint16LE(); + _fileHandle.readUint16LE(); + _fileHandle.readUint16LE(); + _numFlObject = _fileHandle.readUint16LE(); + _numInventory = _fileHandle.readUint16LE(); + _numRooms = _fileHandle.readUint16LE(); + _numScripts = _fileHandle.readUint16LE(); + _numSounds = _fileHandle.readUint16LE(); + _numCharsets = _fileHandle.readUint16LE(); + _numCostumes = _fileHandle.readUint16LE(); + _numGlobalObjects = _fileHandle.readUint16LE(); + _fileHandle.readUint16LE(); + + _objectRoomTable = (byte *)calloc(_numGlobalObjects * 4, 1); + _numGlobalScripts = 200; + _shadowPaletteSize = 256; + } else if (_version == 6 && _gameId != GID_PJSDEMO) { _numVariables = _fileHandle.readUint16LE(); _fileHandle.readUint16LE(); // 16 in Sam/DOTT _numBitVariables = _fileHandle.readUint16LE(); diff --git a/scumm/scumm.h b/scumm/scumm.h index e61a3ba92e..b82d967102 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -214,6 +214,7 @@ enum ScummGameId { GID_ZAK, GID_PUTTDEMO, GID_PUTTPUTT, + GID_PJSDEMO, GID_MONKEY_SEGA }; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 3aee60b760..65d8f491ca 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -155,9 +155,11 @@ static const VersionSettings scumm_settings[] = { {"test", "Test demo game", GID_SAMNMAX, 6, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE, GF_NEW_OPCODES, 0}, /* Humongous Entertainment Scumm Version 7 */ - {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_SAMNMAX, 6, MDT_NONE, + {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_PUTTPUTT, 6, MDT_NONE, GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, + {"pjs-demo", "Pajama Sam (Demo)", GID_PJSDEMO, 6, MDT_NONE, + GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, /* Scumm Version 7 */ {"ft", "Full Throttle", GID_FT, 7, MDT_NONE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, 0}, |