aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-01 22:19:10 +0000
committerMax Horn2003-05-01 22:19:10 +0000
commit0b265f8608ba203c002280d3c85dbc1c51237f6b (patch)
treef187b0de5e5a8b5e0867fd429f56318682bd57d4
parentd7185269b5dcdef3aca0da5dcf24f467a744fbcd (diff)
downloadscummvm-rg350-0b265f8608ba203c002280d3c85dbc1c51237f6b.tar.gz
scummvm-rg350-0b265f8608ba203c002280d3c85dbc1c51237f6b.tar.bz2
scummvm-rg350-0b265f8608ba203c002280d3c85dbc1c51237f6b.zip
cleanup
svn-id: r7255
-rw-r--r--scumm/resource.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 689984ff1a..be9dc63f10 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -483,20 +483,24 @@ void Scumm::readResTypeList(int id, uint32 tag, const char *name) {
for (i = 0; i < num; i++)
res.roomno[id][i] = _fileHandle.readByte();
}
- for (i = 0; i < num; i++)
+ for (i = 0; i < num; i++) {
res.roomoffs[id][i] = _fileHandle.readUint16LE();
+ if (roomoffs[id][i] == 0xFFFF)
+ roomoffs[id][i] = 0xFFFFFFFF;
+ }
+
} else if (_features & GF_SMALL_HEADER) {
for (i = 0; i < num; i++) {
res.roomno[id][i] = _fileHandle.readByte();
res.roomoffs[id][i] = _fileHandle.readUint32LE();
}
} else {
- _fileHandle.read(res.roomno[id], num * sizeof(uint8));
- _fileHandle.read(res.roomoffs[id], num * sizeof(uint32));
-#if defined(SCUMM_BIG_ENDIAN)
- for (i = 0; i < num; i++)
- res.roomoffs[id][i] = FROM_LE_32(res.roomoffs[id][i]);
-#endif
+ for (i = 0; i < num; i++) {
+ res.roomno[id][i] = _fileHandle.readByte();
+ }
+ for (i = 0; i < num; i++) {
+ res.roomoffs[id][i] = _fileHandle.readUint32LE();
+ }
}
}