[Scummvm-cvs-logs] scummvm master -> 6aec69231f86f5dbc1f3dfe3abcdbcc1a8c30a18
sev-
sev at scummvm.org
Fri May 13 12:26:52 CEST 2016
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e1c13af2f8 SCUMM HE: Implemented black mode for FOW rendering
6aec69231f JANITORIAL: Indentation fixes
Commit: e1c13af2f8ca42fca65d19b028f93af6b0aa3ba2
https://github.com/scummvm/scummvm/commit/e1c13af2f8ca42fca65d19b028f93af6b0aa3ba2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-13T12:26:31+02:00
Commit Message:
SCUMM HE: Implemented black mode for FOW rendering
Changed paths:
engines/scumm/he/moonbase/moonbase_fow.cpp
diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp
index 8be83a5..3f3730b 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;
Commit: 6aec69231f86f5dbc1f3dfe3abcdbcc1a8c30a18
https://github.com/scummvm/scummvm/commit/6aec69231f86f5dbc1f3dfe3abcdbcc1a8c30a18
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-13T12:27:11+02:00
Commit Message:
JANITORIAL: Indentation fixes
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
engines/scumm/he/wiz_he.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 291c4c7..7bbf8d1 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -49,15 +49,15 @@ int main(int argc, char *argv[]) {
sizeof(progpath),
DN_FULLPATH)) {
- // Stop any "Insert volume..." type requesters
- oldwin = IDOS->SetProcWindow((APTR)-1);
+ // Stop any "Insert volume..." type requesters
+ oldwin = IDOS->SetProcWindow((APTR)-1);
- // Finally, set the variable to the path the executable was run from
- IDOS->AddPart( apppath, appname, 1024);
- IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
+ // Finally, set the variable to the path the executable was run from
+ IDOS->AddPart( apppath, appname, 1024);
+ IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
- // Turn system requesters back on
- IDOS->SetProcWindow( oldwin );
+ // Turn system requesters back on
+ IDOS->SetProcWindow( oldwin );
}
}
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 43994c3..c123240 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1615,6 +1615,10 @@ void Wiz::drawWizImageEx(uint8 *dst, uint8 *dataPtr, uint8 *maskPtr, int dstPitc
uint8 *wizd = _vm->findWrappedBlock(MKTAG('W','I','Z','D'), dataPtr, state, 0);
assert(wizd);
+ if (srcw == srch && srcw == 30) {
+ warning("FOG: comp %d bits: %x", comp, conditionBits);
+ }
+
switch (comp) {
case 0:
copyRawWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, palPtr, transColor, bitDepth);
@@ -1682,12 +1686,20 @@ void Wiz::copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *compositeInfoB
uint32 layerCmdDataBits = READ_LE_UINT32(cmdPtr);
cmdPtr += 4;
+ if (srcw == srch && srcw == 30) {
+ warning("layerbits: %x", layerCmdDataBits);
+ }
+
uint32 subConditionBits;
if (layerCmdDataBits & kWCFConditionBits) {
uint32 layerConditionBits = READ_LE_UINT32(cmdPtr);
cmdPtr += 4;
+ if (srcw == srch && srcw == 30) {
+ warning("layercondbits: %x", layerConditionBits);
+ }
+
subConditionBits = (layerConditionBits & kWMSBReservedBits);
layerConditionBits &= ~kWMSBReservedBits;
@@ -1721,6 +1733,9 @@ void Wiz::copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *compositeInfoB
uint16 subState;
if (layerCmdDataBits & kWCFSubState) {
subState = READ_LE_UINT16(cmdPtr);
+ if (srcw == srch && srcw == 30) {
+ warning("state: %x substate: %x", state, subState);
+ }
cmdPtr += 2;
} else {
subState = 0;
@@ -1769,6 +1784,10 @@ void Wiz::copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *compositeInfoB
cmdPtr += 4;
}
+ if (srcw == srch && srcw == 30) {
+ warning("subBits: %x", subConditionBits);
+ }
+
drawWizImageEx(dst, nestedWizHeader, maskPtr, dstPitch, dstType, dstw, dsth, srcx + xPos, srcy + yPos, srcw, srch,
subState, clipBox, drawFlags, palPtr, transColor, bitDepth, xmapPtr, subConditionBits);
}
More information about the Scummvm-git-logs
mailing list