aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-01 16:51:08 +0200
committerEugene Sandulenko2016-05-01 16:51:08 +0200
commitfcdbd2c066bbcabe787a2ab8cd05fc49dfcaca3a (patch)
treeffe2fa1076037d6c78f1c051a570d7aa20aa82c9
parentb5cf66eb865d579560370c705911994109b5e5a5 (diff)
downloadscummvm-rg350-fcdbd2c066bbcabe787a2ab8cd05fc49dfcaca3a.tar.gz
scummvm-rg350-fcdbd2c066bbcabe787a2ab8cd05fc49dfcaca3a.tar.bz2
scummvm-rg350-fcdbd2c066bbcabe787a2ab8cd05fc49dfcaca3a.zip
SCUMM HE: Further work on T14 codec
-rw-r--r--engines/scumm/he/moonbase/moonbase.cpp4
-rw-r--r--engines/scumm/he/moonbase/moonbase.h3
-rw-r--r--engines/scumm/he/wiz_he.cpp18
-rw-r--r--engines/scumm/he/wiz_he.h2
4 files changed, 22 insertions, 5 deletions
diff --git a/engines/scumm/he/moonbase/moonbase.cpp b/engines/scumm/he/moonbase/moonbase.cpp
index 1319f5670f..9acc7a1694 100644
--- a/engines/scumm/he/moonbase/moonbase.cpp
+++ b/engines/scumm/he/moonbase/moonbase.cpp
@@ -37,4 +37,8 @@ void Moonbase::renderFOW() {
warning("STUB: renderFOW()");
}
+void Moonbase::blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, const Common::Rect *clipBox,
+ uint8 *wizd, int srcx, int srcy, int rawROP, int paramROP) {
+}
+
} // End of namespace Scumm
diff --git a/engines/scumm/he/moonbase/moonbase.h b/engines/scumm/he/moonbase/moonbase.h
index 0fa6b4298d..7ff2f17070 100644
--- a/engines/scumm/he/moonbase/moonbase.h
+++ b/engines/scumm/he/moonbase/moonbase.h
@@ -34,6 +34,9 @@ public:
void renderFOW();
+ void blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, const Common::Rect *clipBox,
+ uint8 *wizd, int srcx, int srcy, int rawROP, int paramROP);
+
public:
int _fowSentinelImage;
int _fowSentinelState;
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 60eb859303..a8baae866c 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1635,7 +1635,7 @@ void Wiz::drawWizImageEx(uint8 *dst, uint8 *dataPtr, uint8 *maskPtr, int dstPitc
copy16BitWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, xmapPtr);
break;
case 9:
- copyT14WizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, rect, conditionBits);
+ copy555WizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, rect, conditionBits);
break;
#endif
default:
@@ -1764,11 +1764,11 @@ void Wiz::copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *compositeInfoB
}
}
-void Wiz::copyT14WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType,
+void Wiz::copy555WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType,
int dstw, int dsth, int srcx, int srcy, const Common::Rect *clipBox, uint16 conditionBits) {
int rawROP = conditionBits & kWMSBRopMask;
- int nROPParam = (conditionBits & kWMSBReservedBits) >> kWMSBRopParamRShift;
+ int paramROP = (conditionBits & kWMSBReservedBits) >> kWMSBRopParamRShift;
switch (rawROP) {
default:
@@ -1801,7 +1801,17 @@ void Wiz::copyT14WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType,
break;
}
- warning("T14: params %d", nROPParam);
+
+ uint32 compID = READ_LE_UINT32(wizd);
+
+ if (compID == 0x12340102) {
+ _vm->_moonbase->blitT14WizImage(dst, dstw, dsth, dstPitch, clipBox, wizd, srcx, srcy, rawROP, paramROP);
+ } else if (compID == 0x12340802) {
+ warning("Distorion codec");
+ } else if (compID == 0x12340902) {
+ error("Unsupported Distortion");
+ }
+
}
#endif
diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h
index fee67a76d8..fb83884110 100644
--- a/engines/scumm/he/wiz_he.h
+++ b/engines/scumm/he/wiz_he.h
@@ -250,7 +250,7 @@ public:
void copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *wizd, uint8 *maskPtr, int dstPitch, int dstType,
int dstw, int dsth, int srcx, int srcy, int srcw, int srch, int state, const Common::Rect *clipBox,
int flags, const uint8 *palPtr, int transColor, uint8 bitDepth, const uint8 *xmapPtr, uint16 conditionBits);
- void copyT14WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType,
+ void copy555WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType,
int dstw, int dsth, int srcx, int srcy, const Common::Rect *clipBox, uint16 conditionBits);
#endif