aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/resource_v4.cpp
diff options
context:
space:
mode:
authorMax Horn2011-05-13 14:02:53 +0200
committerMax Horn2011-05-13 14:02:53 +0200
commit649f8e0a84804a9d1272ba16b146ea2b9da501fe (patch)
tree4e257a06140c69abb043d5c9a2eb3d23e5ff9e1b /engines/scumm/resource_v4.cpp
parentaaf2c0e6ebe373afd06cbf8ebca334710a4ed15d (diff)
downloadscummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.tar.gz
scummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.tar.bz2
scummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.zip
SCUMM: Rename ResTypes->ResType, introduce ResId typedef, change code to use both
Diffstat (limited to 'engines/scumm/resource_v4.cpp')
-rw-r--r--engines/scumm/resource_v4.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index e7e6d30352..d062fe108e 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -30,21 +30,20 @@ namespace Scumm {
extern const char *resTypeFromId(int id);
-int ScummEngine_v4::readResTypeList(int id) {
- int num;
- int i;
+int ScummEngine_v4::readResTypeList(ResType type) {
+ uint num;
- debug(9, "readResTypeList(%s)", resTypeFromId(id));
+ debug(9, "readResTypeList(%s)", resTypeFromId(type));
num = _fileHandle->readUint16LE();
- if (num != _res->_types[id]._num) {
- error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
+ if (num != _res->_types[type]._num) {
+ error("Invalid number of %ss (%d) in directory", resTypeFromId(type), num);
}
- for (i = 0; i < num; i++) {
- _res->_types[id]._resources[i]._roomno = _fileHandle->readByte();
- _res->_types[id]._resources[i]._roomoffs = _fileHandle->readUint32LE();
+ for (ResId idx = 0; idx < num; idx++) {
+ _res->_types[type]._resources[idx]._roomno = _fileHandle->readByte();
+ _res->_types[type]._resources[idx]._roomoffs = _fileHandle->readUint32LE();
}
return num;