diff options
author | Travis Howell | 2005-05-23 03:41:27 +0000 |
---|---|---|
committer | Travis Howell | 2005-05-23 03:41:27 +0000 |
commit | 0951b90f7bc11e6039525091e5fd6a385283ffb3 (patch) | |
tree | 69a68b0ec6345eeddc698b0f18ac9f74dac45724 | |
parent | a103d1f2ec9ce471928eabccebdaf90d8e740589 (diff) | |
download | scummvm-rg350-0951b90f7bc11e6039525091e5fd6a385283ffb3.tar.gz scummvm-rg350-0951b90f7bc11e6039525091e5fd6a385283ffb3.tar.bz2 scummvm-rg350-0951b90f7bc11e6039525091e5fd6a385283ffb3.zip |
Lock altered or file loaded wizImages, to make sure they aren't expired while in use.
Fixes glitches in mustard.
svn-id: r18227
-rw-r--r-- | scumm/wiz_he.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index 0659fcd1a8..0556d54adb 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -1029,6 +1029,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int if (dstResNum) { uint8 *dstPtr = _vm->getResourceAddress(rtImage, dstResNum); assert(dstPtr); + _vm->res.lock(rtImage, dstResNum); dst = _vm->findWrappedBlock(MKID('WIZD'), dstPtr, 0, 0); assert(dst); @@ -1270,6 +1271,7 @@ void Wiz::drawWizPolygon(int resNum, int state, int id, int flags, int xmapNum, if (dstResNum) { uint8 *dstPtr = _vm->getResourceAddress(rtImage, dstResNum); assert(dstPtr); + _vm->res.lock(rtImage, dstResNum); dst = _vm->findWrappedBlock(MKID('WIZD'), dstPtr, 0, 0); assert(dst); @@ -1732,6 +1734,7 @@ void Wiz::processWizImage(const WizParameters *params) { _vm->VAR(_vm->VAR_GAME_LOADED) = -2; _vm->VAR(119) = -2; } else { + _vm->res.lock(rtImage, params->img.resNum); _vm->VAR(_vm->VAR_GAME_LOADED) = 0; _vm->VAR(119) = 0; } |