diff options
author | Max Horn | 2002-08-29 16:57:43 +0000 |
---|---|---|
committer | Max Horn | 2002-08-29 16:57:43 +0000 |
commit | bbcae3efbec9d22266a80b8cd3403d477caa7f21 (patch) | |
tree | 5edb69fa78078091ca32c0acdbce5ce07aed4c57 /scumm/resource.cpp | |
parent | 0cf920e0403408b3e01787ed8d3ac9a6dd7a5a9c (diff) | |
download | scummvm-rg350-bbcae3efbec9d22266a80b8cd3403d477caa7f21.tar.gz scummvm-rg350-bbcae3efbec9d22266a80b8cd3403d477caa7f21.tar.bz2 scummvm-rg350-bbcae3efbec9d22266a80b8cd3403d477caa7f21.zip |
experimental support for the V2 resource format (patch #601560)
svn-id: r4864
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r-- | scumm/resource.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 89e825481f..318bcce181 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -388,8 +388,10 @@ void Scumm::readResTypeList(int id, uint32 tag, const char *name) if (_features & GF_AFTER_V8) num = fileReadDwordLE(); - else + else if (!(_features & GF_OLD_BUNDLE)) num = fileReadWordLE(); + else + num = fileReadByte(); if (1 || _features & GF_AFTER_V6) { if (num != res.num[id]) { @@ -402,7 +404,18 @@ void Scumm::readResTypeList(int id, uint32 tag, const char *name) allocResTypeData(id, tag, num, name, 1); } - if (_features & GF_SMALL_HEADER) { + if (_features & GF_OLD_BUNDLE) { + if (id == rtRoom){ + for (i = 0; i < num; i++) + res.roomno[id][i] = i; + fileSeek(_fileHandle, num, SEEK_CUR); + } else { + for (i = 0; i < num; i++) + res.roomno[id][i] = fileReadByte(); + } + for (i = 0; i < num; i++) + res.roomoffs[id][i] = fileReadWordLE(); + } else if (_features & GF_SMALL_HEADER) { for (i = 0; i < num; i++) { res.roomno[id][i] = fileReadByte(); res.roomoffs[id][i] = fileReadDword(); @@ -530,7 +543,9 @@ int Scumm::loadResource(int type, int idx) fileSeek(_fileHandle, fileOffs + _fileOffset, SEEK_SET); - if (_features & GF_SMALL_HEADER) { + if (_features & GF_OLD_BUNDLE) { + size = fileReadWordLE(); + } else if (_features & GF_SMALL_HEADER) { if (!(_features & GF_SMALL_NAMES)) fileSeek(_fileHandle, 8, SEEK_CUR); size = fileReadDwordLE(); |