From 0951b90f7bc11e6039525091e5fd6a385283ffb3 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 23 May 2005 03:41:27 +0000 Subject: Lock altered or file loaded wizImages, to make sure they aren't expired while in use. Fixes glitches in mustard. svn-id: r18227 --- scumm/wiz_he.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.3