aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-13 10:41:14 +0200
committerEugene Sandulenko2016-05-13 12:26:31 +0200
commite1c13af2f8ca42fca65d19b028f93af6b0aa3ba2 (patch)
tree1cafaf2f60806f2ad0c8cc2574ebe2ecaf7c07c2 /engines
parent005030ee231ca4b39144bbf823a1bb08cf64bb53 (diff)
downloadscummvm-rg350-e1c13af2f8ca42fca65d19b028f93af6b0aa3ba2.tar.gz
scummvm-rg350-e1c13af2f8ca42fca65d19b028f93af6b0aa3ba2.tar.bz2
scummvm-rg350-e1c13af2f8ca42fca65d19b028f93af6b0aa3ba2.zip
SCUMM HE: Implemented black mode for FOW rendering
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/moonbase/moonbase_fow.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp
index 8be83a57f0..3f3730b6f1 100644
--- a/engines/scumm/he/moonbase/moonbase_fow.cpp
+++ b/engines/scumm/he/moonbase/moonbase_fow.cpp
@@ -330,8 +330,15 @@ void Moonbase::renderFOWState(uint8 *destSurface, int dstPitch, int dstType, int
_vm->_wiz->drawWizImageEx(destSurface, _fowImage, 0, dstPitch, dstType, dstw, dsth, x - spotx, y - spoty, srcw, srch, state, &r, flags, 0, 0, 16, 0, 0);
}
-static void blackRect_16bpp(uint8 *destSurface, int x1, int y1, int x2, int y2) {
- // TODO
+static void blackRect_16bpp(uint8 *destSurface, int dstPitch, int dstw, int dsth, int x1, int y1, int x2, int y2) {
+ byte *dst = destSurface + dstPitch * y1 + x1 * 2;
+ int h = y2 - y1;
+ int w = ((x2 - x1) + 1) * 2;
+
+ while ( --h >= 0 ) {
+ memset(dst, 0, w);
+ dst += dstPitch;
+ }
}
void Moonbase::renderFOW(uint8 *destSurface, int dstPitch, int dstType, int dstw, int dsth, int flags) {
@@ -385,7 +392,7 @@ void Moonbase::renderFOW(uint8 *destSurface, int dstPitch, int dstType, int dstw
y2 = MIN(y2, cy2);
if ((x2 >= x1) && (y2 >= y1) && (x1 <= _fowClipX2) && (y1 <= _fowClipY2))
- blackRect_16bpp(destSurface, x1, y1, x2, y2);
+ blackRect_16bpp(destSurface, dstPitch, dstw, dsth, x1, y1, x2, y2);
} else {
int subState;