diff options
author | Max Horn | 2011-05-13 11:45:42 +0200 |
---|---|---|
committer | Max Horn | 2011-05-13 11:47:13 +0200 |
commit | c02420df43bec4ec523c18d8e6fdb381af29c1b5 (patch) | |
tree | f595cd9d72f0b5ba5b98e80caf3544a0f0401830 /engines/scumm/he | |
parent | abaaf0cad9a63c1a6f1946a8a90facd1535e762d (diff) | |
download | scummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.tar.gz scummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.tar.bz2 scummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.zip |
SCUMM: Add a Resource class, refactor res code around it
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 435e0e547b..70b5543add 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -226,7 +226,7 @@ void ScummEngine_v70he::readRoomsOffsets() { num = READ_LE_UINT16(_heV7RoomOffsets); ptr = _heV7RoomOffsets + 2; for (i = 0; i < num; i++) { - _res->_types[rtRoom].roomoffs[i] = READ_LE_UINT32(ptr); + _res->_types[rtRoom]._resources[i]._roomoffs = READ_LE_UINT32(ptr); ptr += 4; } } diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 96ffa2af3b..dfcfa32df4 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -621,11 +621,11 @@ void ScummEngine_v72he::o72_getArrayDimSize() { } void ScummEngine_v72he::o72_getNumFreeArrays() { - byte **addr = _res->_types[rtString]._address; + const ResourceManager::ResTypeData &rtd = _res->_types[rtString]; int i, num = 0; for (i = 1; i < _numArray; i++) { - if (!addr[i]) + if (!rtd._resources[i]._address) num++; } |