aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource_v3.cpp
diff options
context:
space:
mode:
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()");