diff options
author | Travis Howell | 2011-08-28 10:40:23 +1000 |
---|---|---|
committer | Travis Howell | 2011-08-28 10:40:23 +1000 |
commit | b3457144ed6a4002ea8b51ac93ba14047950c262 (patch) | |
tree | 377c407a860c73cf578ac705c37ef741980e0be0 /engines/scumm/he/resource_he.cpp | |
parent | 4e83a49b0fe42de37827ecffe5a65e492e76ea06 (diff) | |
download | scummvm-rg350-b3457144ed6a4002ea8b51ac93ba14047950c262.tar.gz scummvm-rg350-b3457144ed6a4002ea8b51ac93ba14047950c262.tar.bz2 scummvm-rg350-b3457144ed6a4002ea8b51ac93ba14047950c262.zip |
SCUMM: Add basic support for setOffHeap resource flag in HE90+ games.
Diffstat (limited to 'engines/scumm/he/resource_he.cpp')
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 39240e347f..42748d08ed 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -386,6 +386,40 @@ int ScummEngine_v72he::getSoundResourceSize(ResId id) { return size; } +void ScummEngine_v90he::setResourceOffHeap(int typeId, int resId, int val) { + debug(0, "setResourceOffHeap: type %d resId %d toggle %d", typeId, resId, val); + ResType type; + + switch (typeId) { + case 1: + type = rtRoom; + break; + case 2: + type = rtScript; + break; + case 3: + type = rtCostume; + break; + case 4: + type = rtSound; + break; + case 6: + type = rtCharset; + break; + case 19: + type = rtImage; + break; + default: + error("setResourceOffHeap: default case %d", typeId); + } + + if (val == 1) { + _res->setOffHeap(type, resId); + } else { + _res->setOnHeap(type, resId); + } +} + #endif } // End of namespace Scumm |