diff options
author | Max Horn | 2002-12-24 02:18:02 +0000 |
---|---|---|
committer | Max Horn | 2002-12-24 02:18:02 +0000 |
commit | 456877e6f0912df5acea181589110489bda84c78 (patch) | |
tree | bcacb9dda3fe5930e608e588fb61e38cd98fbea2 /scumm/resource.cpp | |
parent | 5135a409d019fddf4aa68e694bfb1012c0f1a7c2 (diff) | |
download | scummvm-rg350-456877e6f0912df5acea181589110489bda84c78.tar.gz scummvm-rg350-456877e6f0912df5acea181589110489bda84c78.tar.bz2 scummvm-rg350-456877e6f0912df5acea181589110489bda84c78.zip |
fixed room resource loading in V8 - now need to fix initRoomSubBlocks
svn-id: r6091
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r-- | scumm/resource.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index c904bb0ab9..475e80bbc0 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -104,6 +104,7 @@ void Scumm::openRoom(int room) return; if (_features & GF_EXTERNAL_CHARSET && room >= roomlimit) return; + printf("Reading room offsets from '%s'\n", buf); readRoomsOffsets(); _fileOffset = _roomFileOffsets[room]; @@ -171,9 +172,7 @@ void Scumm::readRoomsOffsets() } num = _fileHandle.readByte(); - while (num) { - num--; - + while (num--) { room = _fileHandle.readByte(); if (_roomFileOffsets[room] != 0xFFFFFFFF) { _roomFileOffsets[room] = _fileHandle.readUint32LE(); @@ -535,7 +534,10 @@ int Scumm::loadResource(int type, int idx) roomNr = _roomResource; if (type == rtRoom) { - fileOffs = 0; + if (_features & GF_AFTER_V8) + fileOffs = 8; + else + fileOffs = 0; } else { fileOffs = res.roomoffs[type][idx]; if (fileOffs == 0xFFFFFFFF) @@ -1633,10 +1635,8 @@ void Scumm::allocateArrays() _vars = (int16 *)calloc(_numVariables, sizeof(int16)); _bitVars = (byte *)calloc(_numBitVariables >> 3, 1); - allocResTypeData(rtCostume, - (_features & GF_NEW_COSTUMES) ? MKID('AKOS') : - MKID('COST'), _numCostumes, "costume", 1); - + allocResTypeData(rtCostume, (_features & GF_NEW_COSTUMES) ? MKID('AKOS') : MKID('COST'), + _numCostumes, "costume", 1); allocResTypeData(rtRoom, MKID('ROOM'), _numRooms, "room", 1); allocResTypeData(rtRoomScripts, MKID('RMSC'), _numRooms, "room script", 1); allocResTypeData(rtSound, MKID('SOUN'), _numSounds, "sound", 1); |