diff options
author | Travis Howell | 2005-04-11 05:54:39 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-11 05:54:39 +0000 |
commit | e2d24f8ce204a0bb4c5be749eb6d5c23bdd6a8f0 (patch) | |
tree | 615b734edcd7a3f109c14cf0727c7b62220b60e7 | |
parent | d67cfd4be9f4d8191dca3fe5e5f69a4f46acdc27 (diff) | |
download | scummvm-rg350-e2d24f8ce204a0bb4c5be749eb6d5c23bdd6a8f0.tar.gz scummvm-rg350-e2d24f8ce204a0bb4c5be749eb6d5c23bdd6a8f0.tar.bz2 scummvm-rg350-e2d24f8ce204a0bb4c5be749eb6d5c23bdd6a8f0.zip |
RNAM block is different in HE games.
svn-id: r17534
-rw-r--r-- | scumm/resource.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index e032af215d..95b39b27b0 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -348,13 +348,25 @@ void ScummEngine::readIndexFile() { case MKID('RNAM'): // Names of rooms. Maybe we should put them into a table, for use by the debugger? - for (int room; (room = _fileHandle->readByte()); ) { - char buf[10]; - _fileHandle->read(buf, 9); - buf[9] = 0; - for (i = 0; i < 9; i++) - buf[i] ^= 0xFF; - debug(5, "Room %d: '%s'\n", room, buf); + if (_heversion >= 80) { + for (int room; (room = _fileHandle->readUint16LE()); ) { + char buf[20]; + i = 0; + for (byte s; (s = _fileHandle->readByte()); ) { + buf[i++] = s; + } + buf[i] = 0; + debug(5, "Room %d: '%s'", room, buf); + } + } else { + for (int room; (room = _fileHandle->readByte()); ) { + char buf[10]; + _fileHandle->read(buf, 9); + buf[9] = 0; + for (i = 0; i < 9; i++) + buf[i] ^= 0xFF; + debug(5, "Room %d: '%s'", room, buf); + } } break; |