aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-06-04 12:20:41 +0200
committerEugene Sandulenko2016-06-04 12:21:30 +0200
commit4f35d8324878e18a7e8062c09af87d931ac07ca4 (patch)
tree750bd788389274c9d004427ec4d6333b2d777e6c
parent693ee5ea2b27ac7066e444970cd90faf0b5b231e (diff)
downloadscummvm-rg350-4f35d8324878e18a7e8062c09af87d931ac07ca4.tar.gz
scummvm-rg350-4f35d8324878e18a7e8062c09af87d931ac07ca4.tar.bz2
scummvm-rg350-4f35d8324878e18a7e8062c09af87d931ac07ca4.zip
SCUMM HE: Fix Wiz images color checks as used by Moonbase
-rw-r--r--engines/scumm/he/moonbase/moonbase_fow.cpp4
-rw-r--r--engines/scumm/he/wiz_he.cpp15
2 files changed, 17 insertions, 2 deletions
diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp
index 2cd17a86fa..3f7356f604 100644
--- a/engines/scumm/he/moonbase/moonbase_fow.cpp
+++ b/engines/scumm/he/moonbase/moonbase_fow.cpp
@@ -178,9 +178,9 @@ void Moonbase::setFOWInfo(int fowInfoArray, int downDim, int acrossDim, int view
else
s+= " ";
- debug(0, "%s", s.c_str());
+ debug(5, "%s", s.c_str());
}
- debug(0, "");
+ debug(5, "");
memset(_fowRenderTable, 0, sizeof(_fowRenderTable));
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index d730cb2894..68a983d591 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -2790,6 +2790,14 @@ int Wiz::isWizPixelNonTransparent(uint8 *data, int state, int x, int y, int flag
int c = READ_LE_UINT32(wizh + 0x0);
int w = READ_LE_UINT32(wizh + 0x4);
int h = READ_LE_UINT32(wizh + 0x8);
+
+ if (_vm->_game.id == GID_MOONBASE) {
+ uint16 color = 0xffff;
+ drawWizImageEx((byte *)&color, data, 0, 2, kDstMemory, 1, 1, -x, -y, w, h, state, 0, 0, 0, 0, 2, 0, 0);
+
+ return color != 0xffff;
+ }
+
uint8 *wizd = _vm->findWrappedBlock(MKTAG('W','I','Z','D'), data, state, 0);
assert(wizd);
if (x >= 0 && x < w && y >= 0 && y < h) {
@@ -2841,6 +2849,13 @@ uint16 Wiz::getWizPixelColor(int resNum, int state, int x, int y) {
int c = READ_LE_UINT32(wizh + 0x0);
int w = READ_LE_UINT32(wizh + 0x4);
int h = READ_LE_UINT32(wizh + 0x8);
+
+ if (_vm->_game.id == GID_MOONBASE) {
+ drawWizImageEx((byte *)&color, data, 0, 2, kDstMemory, 1, 1, -x, -y, w, h, state, 0, 0, 0, 0, 2, 0, 0);
+
+ return color;
+ }
+
uint8 *wizd = _vm->findWrappedBlock(MKTAG('W','I','Z','D'), data, state, 0);
assert(wizd);
switch (c) {