aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/resource_v4.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-31 14:16:29 -0400
committerMatthew Hoops2011-05-31 14:16:29 -0400
commitaa49b38c5a8032586cb94fc4ca07149eecabe64a (patch)
treeea5c7617f8c482c8cf4141b728b3ccff5a7f84c7 /engines/scumm/resource_v4.cpp
parentd3ea9ab2a9334747eb445c1b45aa30cb17ffdf1b (diff)
parentc86a6c466fabe31fbf36363aa8d0ac8ea6001b9f (diff)
downloadscummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.gz
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.bz2
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: engines/groovie/script.cpp
Diffstat (limited to 'engines/scumm/resource_v4.cpp')
-rw-r--r--engines/scumm/resource_v4.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index b1d98494d4..6215e86b89 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -31,23 +28,22 @@
namespace Scumm {
-extern const char *resTypeFromId(int id);
+extern const char *nameOfResType(ResType type);
-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)", nameOfResType(type));
num = _fileHandle->readUint16LE();
- if (num != _res->num[id]) {
- error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
+ if (num != _res->_types[type].size()) {
+ error("Invalid number of %ss (%d) in directory", nameOfResType(type), num);
}
- for (i = 0; i < num; i++) {
- _res->roomno[id][i] = _fileHandle->readByte();
- _res->roomoffs[id][i] = _fileHandle->readUint32LE();
+ for (ResId idx = 0; idx < num; idx++) {
+ _res->_types[type][idx]._roomno = _fileHandle->readByte();
+ _res->_types[type][idx]._roomoffs = _fileHandle->readUint32LE();
}
return num;