diff options
author | Max Horn | 2002-11-23 13:53:46 +0000 |
---|---|---|
committer | Max Horn | 2002-11-23 13:53:46 +0000 |
commit | d574313f3285e43eff0c9e4ec0c879428fca8fd6 (patch) | |
tree | 4402b5d81c05eaaabf9d7755b0a85c696773881c /scumm/resource.cpp | |
parent | f2eeb91ca8c860b96d79078c71475fc9c04069e8 (diff) | |
download | scummvm-rg350-d574313f3285e43eff0c9e4ec0c879428fca8fd6.tar.gz scummvm-rg350-d574313f3285e43eff0c9e4ec0c879428fca8fd6.tar.bz2 scummvm-rg350-d574313f3285e43eff0c9e4ec0c879428fca8fd6.zip |
fixed o5_resourceRoutines for OLD256 games (various subopcodes are still not implemented, though); some cleanup
svn-id: r5699
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r-- | scumm/resource.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 0caadf6bf0..a9cf54c9a4 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -473,8 +473,8 @@ void Scumm::ensureResourceLoaded(int type, int i) debug(9, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i); - if (type == rtRoom && i > 127 && !(_features & GF_AFTER_V7)) { - i = _resourceMapper[i & 127]; + if (type == rtRoom && i > 0x7F && !(_features & GF_AFTER_V7)) { + i = _resourceMapper[i & 0x7F]; } if (i == 0) @@ -1405,7 +1405,7 @@ void Scumm::expireResources(uint32 size) if (res.mode[i]) { for (j = res.num[i]; --j >= 0;) { flag = res.flags[i][j]; - if (!(flag & 0x80) && flag >= best_counter && res.address[i][j] && !isResourceInUse(i, j)) { + if (!(flag & RF_LOCK) && flag >= best_counter && res.address[i][j] && !isResourceInUse(i, j)) { best_counter = flag; best_type = i; best_res = j; @@ -1478,7 +1478,7 @@ void Scumm::resourceStats() for (i = rtFirst; i <= rtLast; i++) for (j = res.num[i]; --j >= 0;) { flag = res.flags[i][j]; - if (flag & 0x80 && res.address[i][j]) { + if (flag & RF_LOCK && res.address[i][j]) { lockedSize += ((MemBlkHeader *)res.address[i][j])->size; lockedNum++; } |