aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource_v3.cpp
diff options
context:
space:
mode:
authorMax Horn2005-04-03 22:10:10 +0000
committerMax Horn2005-04-03 22:10:10 +0000
commit1419f0d5ef32d8ae811b567616070cf916792320 (patch)
tree31e668a14cdf23dfb026e49003a67327ef9d6fec /scumm/resource_v3.cpp
parenteda317924ec0573d5c2a8407feaa8dafb6d4a9bc (diff)
downloadscummvm-rg350-1419f0d5ef32d8ae811b567616070cf916792320.tar.gz
scummvm-rg350-1419f0d5ef32d8ae811b567616070cf916792320.tar.bz2
scummvm-rg350-1419f0d5ef32d8ae811b567616070cf916792320.zip
Split readResTypeList into a normal and a GF_OLD_BUNDLE version; added comments to many of the GF_ feature flags; removed GF_DRAWOBJ_OTHER_ORDER (it was only use by Sam&Max, I switched that to a direct check for Sam&Max)
svn-id: r17362
Diffstat (limited to 'scumm/resource_v3.cpp')
-rw-r--r--scumm/resource_v3.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/scumm/resource_v3.cpp b/scumm/resource_v3.cpp
index 31a1f7a4e7..7f19ac0352 100644
--- a/scumm/resource_v3.cpp
+++ b/scumm/resource_v3.cpp
@@ -26,6 +26,36 @@
namespace Scumm {
+extern const char *resTypeFromId(int id);
+
+
+void ScummEngine_v3old::readResTypeList(int id, uint32 tag, const char *name) {
+ int num;
+ int i;
+
+ debug(9, "readResTypeList(%s,%s,%s)", resTypeFromId(id), tag2str(TO_BE_32(tag)), name);
+
+ num = _fileHandle->readByte();
+
+ if (num >= 0xFF) {
+ error("Too many %ss (%d) in directory", name, num);
+ }
+
+ if (id == rtRoom) {
+ for (i = 0; i < num; i++)
+ res.roomno[id][i] = i;
+ _fileHandle->seek(num, SEEK_CUR);
+ } else {
+ for (i = 0; i < num; i++)
+ res.roomno[id][i] = _fileHandle->readByte();
+ }
+ for (i = 0; i < num; i++) {
+ res.roomoffs[id][i] = _fileHandle->readUint16LE();
+ if (res.roomoffs[id][i] == 0xFFFF)
+ res.roomoffs[id][i] = 0xFFFFFFFF;
+ }
+}
+
void ScummEngine_v3old::readIndexFile() {
int magic = 0;
debug(9, "readIndexFile()");