diff options
author | Eugene Sandulenko | 2016-05-30 10:51:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-30 19:32:49 +0200 |
commit | 1fc54e0086f6d5de6b85f5be46de8a8068f4046c (patch) | |
tree | 2e5fc49c940464a48d70c8e91b6fd1328040a719 | |
parent | 2674bfad198c1233445db41acb29bd57b58f3641 (diff) | |
download | scummvm-rg350-1fc54e0086f6d5de6b85f5be46de8a8068f4046c.tar.gz scummvm-rg350-1fc54e0086f6d5de6b85f5be46de8a8068f4046c.tar.bz2 scummvm-rg350-1fc54e0086f6d5de6b85f5be46de8a8068f4046c.zip |
SCUMM HE: Moonbase FOW rendering fixes
-rw-r--r-- | engines/scumm/he/moonbase/moonbase.h | 2 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/moonbase_fow.cpp | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/engines/scumm/he/moonbase/moonbase.h b/engines/scumm/he/moonbase/moonbase.h index 243d53a11d..1d87eed7d9 100644 --- a/engines/scumm/he/moonbase/moonbase.h +++ b/engines/scumm/he/moonbase/moonbase.h @@ -98,7 +98,7 @@ private: bool _fowBlackMode; - int _fowRenderTable[32768]; + int32 _fowRenderTable[32768]; Common::PEResources _exe; Common::String _fileName; diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp index 48c2219926..0c29d5709e 100644 --- a/engines/scumm/he/moonbase/moonbase_fow.cpp +++ b/engines/scumm/he/moonbase/moonbase_fow.cpp @@ -169,6 +169,21 @@ void Moonbase::setFOWInfo(int fowInfoArray, int downDim, int acrossDim, int view if (!_fowImage) return; + for (int y = 0; y < downDim; y++) { + Common::String s; + + for (int x = 0; x < acrossDim; x++) + if (readFOWVisibilityArray(fowInfoArray, x, y)) + s += "@"; + else + s+= " "; + + debug(0, "%s", s.c_str()); + } + debug(0, ""); + + memset(_fowRenderTable, 0, sizeof(_fowRenderTable)); + _fowDrawX = clipX1; _fowDrawY = clipY1; @@ -228,7 +243,7 @@ void Moonbase::setFOWInfo(int fowInfoArray, int downDim, int acrossDim, int view int visibility = readFOWVisibilityArray(fowInfoArray, m, c); if (visibility == FOW_EMPTY) { - int bits = 0; + uint32 bits = 0; if (readFOWVisibilityArray(fowInfoArray, t, l) != 0) bits |= FF_T_L; if (readFOWVisibilityArray(fowInfoArray, t, c) != 0) bits |= FF_T; @@ -333,7 +348,7 @@ static void blackRect_16bpp(uint8 *destSurface, int dstPitch, int dstw, int dsth int h = y2 - y1; int w = ((x2 - x1) + 1) * 2; - while ( --h >= 0 ) { + while (--h >= 0) { memset(dst, 0, w); dst += dstPitch; } |