diff options
author | Gregory Montoir | 2003-10-28 15:05:35 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-10-28 15:05:35 +0000 |
commit | cb2306373d9b1be5d61e25999af249fb6632865d (patch) | |
tree | efc2427d06c0dd9d3f184ccfab80283f10e89e9b /queen/display.cpp | |
parent | 1ab811c4ec3bdbc97d56fa648ea66954bff3f467 (diff) | |
download | scummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.tar.gz scummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.tar.bz2 scummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.zip |
safer dynalum tweak
svn-id: r10992
Diffstat (limited to 'queen/display.cpp')
-rw-r--r-- | queen/display.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/queen/display.cpp b/queen/display.cpp index 29730132fd..29654a7f11 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -143,18 +143,19 @@ void Display::dynalumInit(Resource *resource, const char *roomName, uint16 roomN debug(9, "Display::dynalumInit(%s, %d)", roomName, roomNum); memset(_dynalum.msk, 0, sizeof(_dynalum.msk)); memset(_dynalum.lum, 0, sizeof(_dynalum.lum)); + _dynalum.valid = false; // FIXME: are these tests really needed ? if (roomNum < 90 || ((roomNum > 94) && (roomNum < 114))) { char filename[20]; sprintf(filename, "%s.msk", roomName); - _dynalum.haveMsk = resource->exists(filename); - if (_dynalum.haveMsk) + _dynalum.valid = resource->exists(filename); + if (_dynalum.valid) resource->loadFile(filename, 0, (uint8*)_dynalum.msk); sprintf(filename, "%s.lum", roomName); - _dynalum.haveLum = resource->exists(filename); - if (_dynalum.haveLum) + _dynalum.valid = resource->exists(filename); + if (_dynalum.valid) resource->loadFile(filename, 0, (uint8*)_dynalum.lum); } } @@ -162,7 +163,7 @@ void Display::dynalumInit(Resource *resource, const char *roomName, uint16 roomN void Display::dynalumUpdate(int x, int y) { - if (!_dynalum.haveMsk) + if (!_dynalum.valid) return; if (x >= _bdWidth) { |