From 0b265f8608ba203c002280d3c85dbc1c51237f6b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 1 May 2003 22:19:10 +0000 Subject: cleanup svn-id: r7255 --- scumm/resource.cpp | 18 +++++++++++------- 1 file 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(); + } } } -- cgit v1.2.3