aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorGregory Montoir2003-10-28 15:05:35 +0000
committerGregory Montoir2003-10-28 15:05:35 +0000
commitcb2306373d9b1be5d61e25999af249fb6632865d (patch)
treeefc2427d06c0dd9d3f184ccfab80283f10e89e9b /queen
parent1ab811c4ec3bdbc97d56fa648ea66954bff3f467 (diff)
downloadscummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.tar.gz
scummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.tar.bz2
scummvm-rg350-cb2306373d9b1be5d61e25999af249fb6632865d.zip
safer dynalum tweak
svn-id: r10992
Diffstat (limited to 'queen')
-rw-r--r--queen/display.cpp11
-rw-r--r--queen/display.h3
2 files changed, 7 insertions, 7 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) {
diff --git a/queen/display.h b/queen/display.h
index 24608b3345..da012fa9a5 100644
--- a/queen/display.h
+++ b/queen/display.h
@@ -43,8 +43,7 @@ enum JoePalette {
struct Dynalum {
- bool haveMsk;
- bool haveLum;
+ bool valid;
uint8 msk[50 * 160];
int8 lum[8 * 3];
uint8 prevColMask;