22 #if !defined(SCUMM_HE_WIZ_HE_H) && defined(ENABLE_HE) 23 #define SCUMM_HE_WIZ_HE_H 27 #include "common/rect.h" 31 #define WIZBLOCK_WIZH_DATA_SIZE (4 * 3) 32 #define WIZBLOCK_RGBS_DATA_SIZE (768) 33 #define WIZBLOCK_SPOT_DATA_SIZE (4 * 2) 34 #define WIZBLOCK_RMAP_DATA_SIZE (256 + 4) 36 #define WIZBLOCK_WIZH_SIZE (8 + (WIZBLOCK_WIZH_DATA_SIZE)) 37 #define WIZBLOCK_RGBS_SIZE (8 + (WIZBLOCK_RGBS_DATA_SIZE)) 38 #define WIZBLOCK_SPOT_SIZE (8 + (WIZBLOCK_SPOT_DATA_SIZE)) 39 #define WIZBLOCK_RMAP_SIZE (8 + (WIZBLOCK_RMAP_DATA_SIZE)) 41 #define DW_LOAD_SUCCESS 0 42 #define DW_LOAD_NOT_TYPE -1 43 #define DW_LOAD_READ_FAILURE -2 44 #define DW_LOAD_OPEN_FAILURE -3 46 #define DW_SAVE_SUCCESS 0 47 #define DW_SAVE_NOT_TYPE -1 48 #define DW_SAVE_WRITE_FAILURE -2 49 #define DW_SAVE_CREATE_FAILURE -3 51 #define DW_SAVE_WIZ_FORMAT 0 52 #define DW_SAVE_PCX_FORMAT 1 53 #define DW_SAVE_RAW_FORMAT 2 55 #if defined SCUMM_LITTLE_ENDIAN 56 #define NATIVE_WIZ_COMP_NONE_16BPP kWCTNone16Bpp 57 #define NATIVE_WIZ_COMP_TRLE_16BPP kWCTTRLE16Bpp 59 #elif defined SCUMM_BIG_ENDIAN 60 #define NATIVE_WIZ_COMP_NONE_16BPP kWCTNone16BppBigEndian 61 #define NATIVE_WIZ_COMP_TRLE_16BPP kWCTTRLE16BppBigEndian 64 #define LITTLE_ENDIAN_WIZ(wizComp) \ 65 (wizComp) == kWCTNone16Bpp || \ 66 (wizComp) == kWCTTRLE16Bpp 68 #define NATIVE_WIZ_TYPE(wizComp) \ 69 (wizComp) == NATIVE_WIZ_COMP_NONE_16BPP || \ 70 (wizComp) == NATIVE_WIZ_COMP_TRLE_16BPP \ 72 #define WIZ_16BPP(wizComp) \ 73 (wizComp) == kWCTNone16Bpp || \ 74 (wizComp) == kWCTTRLE16Bpp || \ 75 (wizComp) == kWCTNone16BppBigEndian || \ 76 (wizComp) == kWCTTRLE16BppBigEndian 78 #define WIZ_MAGIC_REMAP_NUMBER 0x76543210 80 #define WIZRAWPIXEL_R_MASK (_uses16BitColor ? 0x7C00 : 0xFF) 81 #define WIZRAWPIXEL_G_MASK (_uses16BitColor ? 0x03E0 : 0xFF) 82 #define WIZRAWPIXEL_B_MASK (_uses16BitColor ? 0x001F : 0xFF) 84 #define WIZRAWPIXEL_R_SHIFT (_uses16BitColor ? 10 : 0) 85 #define WIZRAWPIXEL_G_SHIFT (_uses16BitColor ? 5 : 0) 86 #define WIZRAWPIXEL_B_SHIFT (0) 88 #define WIZRAWPIXEL_MASK (_uses16BitColor ? 0xFFFF : 0xFF) 90 #define WIZRAWPIXEL_LO_R_BIT (1 << WIZRAWPIXEL_R_SHIFT) 91 #define WIZRAWPIXEL_LO_G_BIT (1 << WIZRAWPIXEL_G_SHIFT) 92 #define WIZRAWPIXEL_LO_B_BIT (1 << WIZRAWPIXEL_B_SHIFT) 93 #define WIZRAWPIXEL_LO_BITS ((WIZRAWPIXEL_LO_R_BIT) | (WIZRAWPIXEL_LO_G_BIT) | (WIZRAWPIXEL_LO_B_BIT)) 94 #define WIZRAWPIXEL_HI_BITS ~WIZRAWPIXEL_LO_BITS 96 #define WIZ_COLOR16_COMPONENT_COUNT (1 << 5) 97 #define WIZ_QUANTIZED_ALPHA_COUNT 16 98 #define WIZ_QUANTIZED_ALPHA_DIV ((256) / (WIZ_QUANTIZED_ALPHA_COUNT)) 100 #define WIZRAWPIXEL_50_50_PREMIX_COLOR(__rawColor__) (((__rawColor__) & WIZRAWPIXEL_HI_BITS) >> 1) 101 #define WIZRAWPIXEL_50_50_MIX(__colorA__, __colorB__) ((__colorA__) + (__colorB__)) 103 #define WIZRAWPIXEL_ADDITIVE_MIX(__colorA__, __colorB__) \ 104 (MIN<int>(WIZRAWPIXEL_R_MASK, (((__colorA__) & WIZRAWPIXEL_R_MASK) + ((__colorB__) & WIZRAWPIXEL_R_MASK))) | \ 105 MIN<int>(WIZRAWPIXEL_G_MASK, (((__colorA__) & WIZRAWPIXEL_G_MASK) + ((__colorB__) & WIZRAWPIXEL_G_MASK))) | \ 106 MIN<int>(WIZRAWPIXEL_B_MASK, (((__colorA__) & WIZRAWPIXEL_B_MASK) + ((__colorB__) & WIZRAWPIXEL_B_MASK)))) 108 #define WIZRAWPIXEL_SUBTRACTIVE_MIX(__colorA__, __colorB__) \ 109 (MAX<int>(WIZRAWPIXEL_LO_R_BIT, (((__colorA__) & WIZRAWPIXEL_R_MASK) - ((__colorB__) & WIZRAWPIXEL_R_MASK))) | \ 110 MAX<int>(WIZRAWPIXEL_LO_G_BIT, (((__colorA__) & WIZRAWPIXEL_G_MASK) - ((__colorB__) & WIZRAWPIXEL_G_MASK))) | \ 111 MAX<int>(WIZRAWPIXEL_LO_B_BIT, (((__colorA__) & WIZRAWPIXEL_B_MASK) - ((__colorB__) & WIZRAWPIXEL_B_MASK)))) 114 typedef uint16 WizRawPixel;
115 typedef uint8 WizRawPixel8;
116 typedef uint16 WizRawPixel16;
126 for (
int i = 0; i <
ARRAYSIZE(points); i++) {
127 points[i].
x = points[i].
y = 0;
129 boundingRect.top = boundingRect.
left = boundingRect.bottom = boundingRect.
right = 0;
136 struct WizBufferElement {
148 struct WizFontProperties {
159 struct WizEllipseProperties {
170 struct WizExtendedRenderInfo {
177 struct WizImageCommand {
203 uint8 remapTable[256];
204 uint8 remapList[256];
208 WizRawPixel colorValue;
209 WizFontProperties fontProperties;
210 WizEllipseProperties ellipseProperties;
212 WizExtendedRenderInfo extendedRenderInfo;
216 memset(filename, 0,
sizeof(filename));
217 box.top = box.
left = box.bottom = box.
right = 0;
220 memset(params, 0,
sizeof(params));
241 memset(remapTable, 0,
sizeof(remapTable));
242 memset(remapList, 0,
sizeof(remapList));
246 memset(&fontProperties, 0,
sizeof(WizFontProperties));
247 memset(&ellipseProperties, 0,
sizeof(WizEllipseProperties));
248 renderCoords.
left = renderCoords.top = renderCoords.bottom = renderCoords.
right = 0;
249 memset(&extendedRenderInfo, 0,
sizeof(WizExtendedRenderInfo));
253 struct FloodFillCommand {
261 box.top = box.
left = box.bottom = box.
right = 0;
269 #ifdef WIZ_DEBUG_BUFFERS 270 #define WizPxShrdBufferD(a, b) WizPxShrdBuffer(a, b, __FUNCTION__, __LINE__) 272 DbgEntry(
const void *a,
const char *lpr,
int ln) : addr(a), msg(
Common::String::format(
"buffer allocated in: %s(), line %d", lpr, ln)) {}
273 bool operator==(
const void *ptr)
const {
return addr == ptr; }
278 #define WizPxShrdBufferD(a, b) WizPxShrdBuffer(a, b) 281 class WizPxShrdBuffer {
283 #ifdef WIZ_DEBUG_BUFFERS 284 static void dbgLeakRpt() {
288 debug(
"Leaked: %s", i->msg.c_str());
291 _allocLocs =
nullptr;
295 WizPxShrdBuffer() : _buff(nullptr), _lifes(nullptr), _xstart(0) {}
296 #ifdef WIZ_DEBUG_BUFFERS 297 WizPxShrdBuffer(
void *buff,
bool hasOwnerShip) : WizPxShrdBuffer(buff, hasOwnerShip, 0, 0) {}
298 WizPxShrdBuffer(
void *buff,
bool hasOwnerShip,
const char *func,
int line)
300 WizPxShrdBuffer(
void *buff,
bool hasOwnerShip)
302 : _buff(reinterpret_cast<WizRawPixel *>(buff)), _lifes(
nullptr), _xstart(0) {
304 #ifdef WIZ_DEBUG_BUFFERS 307 _allocLocs->
push_back(DbgEntry(buff, func, line));
309 *(_lifes =
new int) = 1;
312 WizPxShrdBuffer(
const WizPxShrdBuffer &other) : _buff(other._buff), _lifes(other._lifes), _xstart(other._xstart) {
316 WizPxShrdBuffer(WizPxShrdBuffer &&other) noexcept : _buff(other._buff), _lifes(other._lifes), _xstart(other._xstart) {
317 other._lifes =
nullptr;
322 WizRawPixel *operator()()
const {
return (WizRawPixel*)((byte*)_buff + _xstart); }
323 WizPxShrdBuffer &operator=(
const WizPxShrdBuffer &other) {
324 if (
this != &other) {
326 if ((_lifes = other._lifes) !=
nullptr) ++*_lifes;
328 _xstart = other._xstart;
332 WizPxShrdBuffer &&operator=(WizPxShrdBuffer &&other) {
334 _lifes = other._lifes;
336 _xstart = other._xstart;
337 other._lifes =
nullptr;
345 bool operator==(WizRawPixel *ptr)
const {
return _buff == ptr; }
348 if (_lifes && !--*_lifes) {
350 #ifdef WIZ_DEBUG_BUFFERS 352 if (i != _allocLocs->
end())
353 _allocLocs->
erase(i);
356 if (_lifes && !*_lifes)
364 struct WizSimpleBitmap {
365 WizPxShrdBuffer bufferPtr;
369 WizSimpleBitmap() : bufferPtr(), bitmapWidth(0), bitmapHeight(0) {
374 struct WizMultiTypeBitmap {
383 struct WizRawBitmap {
395 struct WizFloodSegment {
399 struct WizFloodState {
400 WizFloodSegment *stack;
401 WizFloodSegment *top;
405 WizSimpleBitmap *bitmapPtr;
409 int numStackElements;
412 struct WizCompressedImage {
418 struct WizMoonbaseCompressedImage {
419 int type, size, width, height;
420 WizRawPixel16 transparentColor;
424 struct MoonbaseDistortionInfo {
434 struct WarpWizPoint {
448 struct WarpWizOneSpan {
451 WarpWizPoint srcLeft;
452 WarpWizPoint srcRight;
455 struct WarpWizOneDrawSpan {
464 struct WarpWizOneSpanTable {
465 WarpWizPoint dstMinPt, dstMaxPt;
466 WarpWizPoint srcMinPt, srcMaxPt;
467 WarpWizOneDrawSpan *drawSpans;
468 WarpWizOneSpan *spans;
473 enum WizRenderingFlags : uint {
475 kWRFUsePalette = 0x00000001,
476 kWRFRemap = 0x00000002,
477 kWRFPrint = 0x00000004,
478 kWRFBackground = 0x00000008,
479 kWRFForeground = 0x00000010,
480 kWRFAlloc = 0x00000020,
481 kWRFPolygon = 0x00000040,
482 kWRFZPlaneOn = 0x00000080,
483 kWRFZPlaneOff = 0x00000100,
484 kWRFUseShadow = 0x00000200,
485 kWRFHFlip = 0x00000400,
486 kWRFVFlip = 0x00000800,
487 kWRFRotate90 = 0x00001000,
490 kWRFSpecialRenderBitMask = 0xFFF00000,
491 kWRFAdditiveBlend = 0x00100000,
492 kWRFSubtractiveBlend = 0x00200000,
493 kWRF5050Blend = 0x00400000,
494 kWRFAreaSampleDuringWarp = 0x00800000,
495 kWRFUseSourceImageAsAlphaChannel = 0x01000000,
496 kWRFBooleanAlpha = 0x02000000,
497 kWRFInverseAlpha = 0x04000000,
498 kWRFUseImageAsAlphaChannel = 0x08000000,
499 kWRFUseBlendPrimitives = 0x10000000,
500 kWRFFutureExpansionBit1 = 0x20000000,
501 kWRFFutureExpansionBit2 = 0x40000000,
502 kWRFFutureExpansionBit3 = 0x80000000,
515 kWARenderRectangle = 9,
518 kWARenderFloodFill = 12,
523 kWARenderEllipse = 17,
526 enum WizActionFlags {
527 kWAFSpot = 0x00000001,
528 kWAFPolygon = 0x00000002,
529 kWAFShadow = 0x00000004,
530 kWAFScale = 0x00000008,
531 kWAFAngle = 0x00000010,
532 kWAFFlags = 0x00000020,
533 kWAFRemapList = 0x00000040,
534 kWAFFileType = 0x00000080,
535 kWAFCompressionType = 0x00000100,
536 kWAFRect = 0x00000200,
537 kWAFState = 0x00000400,
538 kWAFFilename = 0x00000800,
539 kWAFPolygon2 = 0x00001000,
540 kWAFWidth = 0x00002000,
541 kWAFHeight = 0x00004000,
542 kWAFPalette = 0x00008000,
543 kWAFDestImage = 0x00010000,
544 kWAFColor = 0x00020000,
545 kWAFRenderCoords = 0x00040000,
546 kWAFSourceImage = 0x00080000,
547 kWAFProperty = 0x00100000,
548 kWAFZBufferImage = 0x00200000
551 enum WizCompositeFlags {
552 kWCFConditionBits = 0x00000001,
553 kWCFSubState = 0x00000002,
554 kWCFXDelta = 0x00000004,
555 kWCFYDelta = 0x00000008,
556 kWCFDrawFlags = 0x00000010,
557 kWCFSubConditionBits = 0x00000020
560 enum WizCompressionTypes {
561 kWCTNone = 0x00000000,
562 kWCTTRLE = 0x00000001,
563 kWCTNone16Bpp = 0x00000002,
565 kWCTComposite = 0x00000004,
566 kWCTTRLE16Bpp = 0x00000005,
568 kWCTMRLEWithLineSizePrefix = 0x00000007,
569 kWCTMRLEWithoutLineSizePrefix = 0x00000008,
570 kWCTDataBlockDependent = 0x00000009,
571 kWCTNone16BppBigEndian = 0x0000000A,
573 kWCTTRLE16BppBigEndian = 0x0000000C,
577 enum CreateWizFlags {
578 kCWFPalette = 0x00000001,
579 kCWFSpot = 0x00000002,
580 kCWFRemapTable = 0x00000008,
581 kCWFDefault = ((kCWFPalette) | (kCWFSpot) | (kCWFRemapTable))
585 kWIPCompressionType = 0x10000000,
586 kWIPPaletteBlockPresent = 0x10000001,
587 kWIPRemapBlockPresent = 0x10000002,
588 kWIPOpaqueBlockPresent = 0x10000003,
589 kWIPXMAPBlockPresent = 0x10000004
592 enum WizSpcConditionTypes : uint {
593 kWSPCCTBits = 0xC0000000,
594 kWSPCCTOr = 0x00000000,
595 kWSPCCTAnd = 0x40000000,
596 kWSPCCTNot = 0x80000000
599 enum WizMoonSystemBits {
600 kWMSBRopMask = 0x000000FF,
601 kWMSBRopParamMask = 0x0000FF00,
602 kWMSBReservedBits = (kWMSBRopMask | kWMSBRopParamMask),
603 kWMSBRopParamRShift = 8
606 enum WizEllipseConstants {
608 kWECPiOver2 = 102944,
625 class ScummEngine_v71he;
634 WizBufferElement _wizBuffer[NUM_IMAGES] = {};
635 uint16 _wizBufferIndex = 0;
636 WizPolygon _polygons[NUM_POLYGONS] = {};
639 WizRawPixel _compareBufferA[640] = {};
640 WizRawPixel _compareBufferB[640] = {};
642 Wiz(ScummEngine_v71he *vm);
644 #ifdef WIZ_DEBUG_BUFFERS 645 WizPxShrdBuffer::dbgLeakRpt();
649 void clearWizBuffer();
651 bool _useWizClipRect =
false;
652 bool _uses16BitColor =
false;
653 int _wizActiveShadow = 0;
655 void deleteLocalPolygons();
656 void polygonLoad(
const uint8 *polData);
657 void set4Polygon(
int id,
bool flag,
int vert1x,
int vert1y,
int vert2x,
int vert2y,
int vert3x,
int vert3y,
int vert4x,
int vert4y);
659 void deletePolygon(
int fromId,
int toId);
660 int testForObjectPolygon(
int id,
int x,
int y);
661 int findPolygon(
int x,
int y);
662 bool doesObjectHavePolygon(
int id);
664 void polyRotatePoints(
Common::Point *pts,
int num,
int alpha);
665 void polyMovePolygonPoints(
Common::Point *listOfPoints,
int numverts,
int deltaX,
int deltaY);
666 bool polyIsRectangle(
const Common::Point *points,
int numverts);
668 void dwCreateRawWiz(
int imageNum,
int w,
int h,
int flags,
int bitsPerPixel,
int optionalSpotX,
int optionalSpotY);
669 bool dwGetMultiTypeBitmapFromImageState(
int imageNum,
int imageState, WizMultiTypeBitmap *multiBM);
670 bool dwSetSimpleBitmapStructFromImage(
int imageNum,
int imageState, WizSimpleBitmap *destBM);
672 void dwAltSourceDrawWiz(
int maskImage,
int maskState,
int x,
int y,
int sourceImage,
int sourceState, int32 flags,
int paletteNumber,
const Common::Rect *optionalClipRect,
const WizSimpleBitmap *destBitmapPtr);
673 void dwHandleComplexImageDraw(
int image,
int state,
int x,
int y,
int shadow,
int angle,
int scale,
const Common::Rect *clipRect, int32 flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
674 bool dwIsMaskCompatibleCompressionType(
int compressionType);
675 bool dwIsUncompressedFormatTypeID(
int id);
676 int dwGetImageGeneralProperty(
int image,
int state,
int property);
678 void processWizImageCmd(
const WizImageCommand *params);
679 void processWizImageCaptureCmd(
const WizImageCommand *params);
680 void processWizImagePolyCaptureCmd(
const WizImageCommand *params);
681 void processWizImageDrawCmd(
const WizImageCommand *params);
682 void processWizImageRenderRectCmd(
const WizImageCommand *params);
683 void processWizImageRenderLineCmd(
const WizImageCommand *params);
684 void processWizImageRenderPixelCmd(
const WizImageCommand *params);
685 void processWizImageRenderFloodFillCmd(
const WizImageCommand *params);
686 void processWizImageModifyCmd(
const WizImageCommand *params);
687 void processWizImageRenderEllipseCmd(
const WizImageCommand *params);
688 void processWizImageFontStartCmd(
const WizImageCommand *params);
689 void processWizImageFontEndCmd(
const WizImageCommand *params);
690 void processWizImageFontCreateCmd(
const WizImageCommand *params);
691 void processWizImageFontRenderCmd(
const WizImageCommand *params);
692 void processNewWizImageCmd(
const WizImageCommand *params);
693 void processWizImageLoadCmd(
const WizImageCommand *params);
694 void processWizImageSaveCmd(
const WizImageCommand *params);
696 void getWizImageDim(
int resNum,
int state, int32 &w, int32 &h);
697 void getWizImageDim(uint8 *dataPtr,
int state, int32 &w, int32 &h);
698 int getWizStateCount(
int resnum);
699 int getWizImageStates(
const uint8 *ptr);
700 byte *getWizStateHeaderPrim(
int resNum,
int state);
701 byte *getWizStateDataPrim(
int resNum,
int state);
702 byte *getWizStatePaletteDataPrim(
int resNum,
int state);
703 byte *getWizStateRemapDataPrim(
int resNum,
int state);
704 int getWizCompressionType(
int resNum,
int state);
705 bool doesRawWizStateHaveTransparency(
int globNum,
int state);
706 bool doesStateContainBlock(
int globNum,
int state, uint32 blockID);
707 const byte *getColorMixBlockPtrForWiz(
int image);
708 void setWizCompressionType(
int image,
int state,
int newType);
710 bool isUncompressedFormatTypeID(
int id);
712 void handleRotate0SpecialCase(
int image,
int state,
int x,
int y,
int shadow,
int angle,
int scale,
const Common::Rect *clipRect, int32 flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
713 void handleRotate90SpecialCase(
int image,
int state,
int x,
int y,
int shadow,
int angle,
int scale,
const Common::Rect *clipRect, int32 flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
714 void handleRotate180SpecialCase(
int image,
int state,
int x,
int y,
int shadow,
int angle,
int scale,
const Common::Rect *clipRect, int32 flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
715 void handleRotate270SpecialCase(
int image,
int state,
int x,
int y,
int shadow,
int angle,
int scale,
const Common::Rect *clipRect, int32 flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
717 void flushAWizBuffer();
719 void getWizSpot(
int resId,
int state, int32 &x, int32 &y);
720 void getWizSpot(
int resId, int32 &x, int32 &y);
721 void getWizImageSpot(uint8 *data,
int state, int32 &x, int32 &y);
722 void loadWizCursor(
int resId,
int palette,
bool useColor);
724 void takeAWiz(
int globnum,
int x1,
int y1,
int x2,
int y2,
bool back,
bool compress);
725 void simpleDrawAWiz(
int image,
int state,
int x,
int y,
int flags);
726 void bufferAWiz(
int image,
int state,
int x,
int y,
int z,
int flags,
int optionalShadowImage,
int optionalZBufferImage,
int whichPalette);
727 WizPxShrdBuffer drawAWiz(
int image,
int state,
int x,
int y,
int z,
int flags,
int optionalShadowImage,
int optionalZBufferImage,
728 Common::Rect *optionalClipRect,
int whichPalette, WizSimpleBitmap *optionalBitmapOverride);
729 WizPxShrdBuffer drawAWizEx(
int image,
int state,
int x,
int y,
int z,
int flags,
int optionalShadowImage,
int optionalZBufferImage,
Common::Rect *optionalClipRect,
730 int whichPalette, WizSimpleBitmap *optionalBitmapOverride,
const WizImageCommand *optionalICmdPtr);
731 WizPxShrdBuffer drawAWizPrim(
int globNum,
int state,
int x,
int y,
int z,
int shadowImage,
int zbufferImage,
const Common::Rect *optionalClipRect,
int flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable);
732 WizPxShrdBuffer drawAWizPrimEx(
int globNum,
int state,
int x,
int y,
int z,
int shadowImage,
int zbufferImage,
const Common::Rect *optionalClipRect,
int flags, WizSimpleBitmap *optionalBitmapOverride,
const WizRawPixel *optionalColorConversionTable,
const WizImageCommand *optionalICmdPtr);
733 void buildAWiz(
const WizPxShrdBuffer &bufPtr,
int bufWidth,
int bufHeight,
const byte *palettePtr,
const Common::Rect *rectPtr,
int compressionType,
int globNum,
int transparentColor);
735 int pixelHitTestWiz(
int image,
int state,
int x,
int y, int32 flags);
736 int pixelHitTestWizPrim(
int image,
int state,
int x,
int y, int32 flags);
737 int hitTestWiz(
int image,
int state,
int x,
int y, int32 flags);
738 int hitTestWizPrim(
int globNum,
int state,
int x,
int y, int32 flags);
739 void remapImagePrim(
int image,
int state,
int tableCount,
const uint8 *remapList,
const uint8 *remapTable);
740 int createHistogramArrayForImage(
int image,
int state,
const Common::Rect *optionalClipRect);
741 void ensureNativeFormatImageForState(
int image,
int state);
743 bool compareDoPixelStreamsOverlap(
const WizRawPixel *a,
const WizRawPixel *b,
int width, WizRawPixel transparentColor);
744 bool collisionCompareImageLines(
745 const byte *imageAData,
int aType,
int aw,
int ah, int32 wizAFlags,
int ax,
int ay,
746 const byte *imageBData,
int bType,
int bw,
int bh, int32 wizBFlags,
int bx,
int by,
747 int compareWidth, WizRawPixel transparentColor);
760 bool drawMoonbaseLayeredWiz(
761 byte *dstBitmapData,
int dstWidth,
int dstHeight,
int dstPitch,
762 int dstFormat,
int dstBpp, byte *wizImageData,
763 int x,
const int y,
int state,
int clipX1,
int clipY1,
int clipX2,
int clipY2,
764 uint32 flags, uint32 conditionBits, byte *ptr8BppToXBppClut, byte *altSourceBuffer);
766 void handleCompositeDrawMoonbaseImage(
767 WizRawBitmap *bitmapPtr, WizImage *wizPtr, byte *compositeInfoBlockPtr,
769 int32 flags, uint32 conditionBits, int32 outerSizeX, int32 outerSizeY,
770 WizRawPixel16 *ptr8BppToXBppClut, byte *altSourceBuffer);
772 void drawMoonbaseImageEx(
773 WizRawBitmap *bitmapPtr, WizImage *wizPtr,
int x,
int y,
int state,
775 uint32 conditionBits, WizRawPixel16 *ptr8BppToXBppClut, byte *altSourceBuffer);
777 bool getRawMoonbaseBitmapInfoForState(WizRawBitmap *bitmapPtr, WizImage *wizPtr,
int state);
778 void rawMoonbaseBitmapBlit(WizRawBitmap *dstBitmap,
Common::Rect *dstRectPtr, WizRawBitmap *srcBitmap,
Common::Rect *srcRectPtr);
780 void trleFLIPDecompressMoonbaseImage(
781 WizRawBitmap *bitmapPtr, WizMoonbaseCompressedImage *imagePtr,
int destX,
int destY,
783 void trleFLIPDecompMoonbaseImageHull(
784 WizRawPixel16 *bufferPtr,
int bufferWidth,
Common::Rect *destRect, byte *compData,
Common::Rect *sourceRect, byte *extraPtr,
785 void (*functionPtr)(Wiz *wiz, WizRawPixel *destPtr, byte *dataStream,
int skipAmount,
int decompAmount, byte *extraPtr));
787 bool moonbaseLayeredWizHitTest(int32 *outValue, int32 *optionalOutActualValue, byte *globPtr,
int state,
int x,
int y, int32 flags, uint32 conditionBits);
789 void dispatchBlitRGB555(
790 byte *bufferData,
int bufferWidth,
int bufferHeight,
int bufferPitch,
791 Common::Rect *optionalClippingRect, byte *compressedDataStream,
792 int x,
int y,
int nROP,
int nROPParam, byte *altSourceBuffer);
794 void blitT14CodecImage(
795 byte *dst,
int dstw,
int dsth,
int dstPitch,
const Common::Rect *clipBox,
796 byte *wizd,
int srcx,
int srcy,
int rawROP,
int paramROP);
799 byte *bufferData,
int bufferWidth,
int bufferHeight,
int bufferPitch,
800 Common::Rect *optionalClippingRect, byte *compressedDataStream,
801 int x,
int y, byte *altSourceBuffer);
803 void blitUncompressedDistortionBitmap(
804 byte *dstBitmapData,
int dstWidth,
int dstHeight,
int dstPitch,
int dstFormat,
int dstBpp,
805 byte *srcBitmapData,
int srcWidth,
int srcHeight,
int srcPitch,
int srcFormat,
int srcBpp,
806 byte *distortionBitmapData,
int distortionWidth,
int distortionHeight,
int distortionPitch,
int distortionFormat,
int distortionBpp,
807 int dstX,
int dstY,
int srcX,
int srcY,
int lReach,
int rReach,
int tReach,
int bReach,
808 int srcClipX1,
int srcClipY1,
int srcClipX2,
int srcClipY2,
809 int dstClipX1,
int dstClipY1,
int dstClipX2,
int dstClipY2);
811 void distortionBlitCore(
817 ScummEngine_v71he *_vm;
831 int pgReadPixel(
const WizSimpleBitmap *srcBM,
int x,
int y,
int defaultValue);
832 void pgWritePixel(WizSimpleBitmap *srcBM,
int x,
int y, WizRawPixel value);
833 void pgClippedWritePixel(WizSimpleBitmap *srcBM,
int x,
int y,
const Common::Rect *clipRectPtr, WizRawPixel value);
834 void pgClippedLineDraw(WizSimpleBitmap *destBM,
int asx,
int asy,
int aex,
int aey,
const Common::Rect *clipRectPtr, WizRawPixel value);
835 void pgClippedThickLineDraw(WizSimpleBitmap *destBM,
int asx,
int asy,
int aex,
int aey,
const Common::Rect *clipRectPtr,
int iLineThickness, WizRawPixel value);
836 void pgDrawClippedEllipse(WizSimpleBitmap *pDestBitmap,
int iPX,
int iPY,
int iQX,
int iQY,
int iKX,
int iKY,
int iLOD,
const Common::Rect *pClipRectPtr,
int iThickness, WizRawPixel aColor);
837 void pgDrawSolidRect(WizSimpleBitmap *destBM,
const Common::Rect *rectPtr, WizRawPixel color);
838 void pgFloodFillCmd(
int x,
int y,
int color,
const Common::Rect *optionalClipRect);
840 void pgHistogramBitmapSubRect(
int *tablePtr,
const WizSimpleBitmap *bitmapPtr,
const Common::Rect *sourceRect);
841 void pgSimpleBitmapFromDrawBuffer(WizSimpleBitmap *bitmapPtr,
bool background);
842 bool pgGetMultiTypeBitmapFromDrawBuffer(WizMultiTypeBitmap *multiBM,
bool background);
843 void pgDrawRawDataFormatImage(WizRawPixel *bufferPtr,
const WizRawPixel *rawData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr, int32 wizFlags,
const byte *extraTable,
int transparentColor);
844 void pgSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect);
845 void pgSimpleBlitRemapColors(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
const byte *remapColorTable);
846 void pgSimpleBlitTransparentRemapColors(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect, WizRawPixel transparentColor,
const byte *remapColorTable);
847 void pgSimpleBlitMixColors(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
const byte *mixColorTable);
848 void pgSimpleBlitTransparentMixColors(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect, WizRawPixel transparentColor,
const byte *mixColorTable);
849 void pgTransparentSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect, WizRawPixel transparentColor);
851 void pgDrawWarpDrawLetter(WizRawPixel *bitmapBuffer,
int bitmapWidth,
int bitmapHeight,
const byte *charData,
int x1,
int y1,
int width,
int height, byte *colorLookupTable);
852 void pgDraw8BppFormatImage(WizRawPixel *bufferPtr,
const byte *rawData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr, int32 wizFlags,
const byte *extraTable,
int transparentColor,
const WizRawPixel *conversionTable);
853 void pgDraw8BppSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
854 void pgDraw8BppTransparentSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
int transparentColor,
const WizRawPixel *conversionTable);
855 void pgDrawImageWith16BitZBuffer(WizSimpleBitmap *psbDst,
const WizSimpleBitmap *psbZBuffer,
const byte *imgData,
int x,
int y,
int z,
int width,
int height,
Common::Rect *prcClip);
856 void pgForwardRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
857 void pgBackwardsRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
858 void pgTransparentForwardRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
859 void pgTransparentBackwardsRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
860 void pgForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
861 void pgBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
862 void pgTransparentForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
863 void pgTransparentBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
864 void pgBlit90DegreeRotate(WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizSimpleBitmap *srcBitmap,
const Common::Rect *optionalSrcRect,
const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip);
865 void pgBlit90DegreeRotateTransparent(WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizSimpleBitmap *srcBitmap,
const Common::Rect *optionalSrcRect,
const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip, WizRawPixel transparentColor);
866 void pgBlit90DegreeRotateCore(WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizSimpleBitmap *srcBitmap,
const Common::Rect *optionalSrcRect,
const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip,
const void *userParam,
const void *userParam2,
867 void (*srcTransferFP)(Wiz *wiz, WizRawPixel *dstPtr,
int dstStep,
const WizRawPixel *srcPtr,
int count,
const void *userParam,
const void *userParam2));
873 void makeSizedRectAt(
Common::Rect *rectPtr,
int x,
int y,
int width,
int height);
874 void makeSizedRect(
Common::Rect *rectPtr,
int width,
int height);
886 void floodInitFloodState(WizFloodState *statePtr, WizSimpleBitmap *bitmapPtr,
int colorToWrite,
const Common::Rect *optionalClippingRect);
887 WizFloodState *floodCreateFloodState(
int numStackElements);
888 void floodDestroyFloodState(WizFloodState *state);
889 bool floodBoundryColorFloodCheckPixel(
int x,
int y, WizFloodState *state);
890 void floodFloodFillPrim(
int x,
int y, WizFloodState *statePtr,
bool (*checkPixelFnPtr)(Wiz *w,
int x,
int y, WizFloodState *state));
891 void floodPerformOpOnRect(WizFloodState *statePtr,
Common::Rect *rectPtr);
892 bool floodSimpleFill(WizSimpleBitmap *bitmapPtr,
int x,
int y,
int colorToWrite,
const Common::Rect *optionalClipRect,
Common::Rect *updateRectPtr);
895 int getRawPixel(
int color);
896 void memset8BppConversion(
void *dstPtr,
int value,
size_t count,
const WizRawPixel *conversionTable);
897 void memcpy8BppConversion(
void *dstPtr,
const void *srcPtr,
size_t count,
const WizRawPixel *conversionTable);
898 void rawPixelMemset(
void *dstPtr,
int value,
size_t count);
899 WizRawPixel convert8BppToRawPixel(WizRawPixel value,
const WizRawPixel *conversionTable);
900 void rawPixelExtractComponents(WizRawPixel aPixel,
int &r,
int &g,
int &b);
901 void rawPixelPackComponents(WizRawPixel &aPixel,
int r,
int g,
int b);
908 void mrleFLIPAltSourceDecompressImage(
909 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
910 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
911 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
912 int32 wizFlags,
const WizRawPixel *conversionTable);
913 void mrleFLIPAltSourceDecompressPrim(
914 WizRawPixel *destBufferPtr,
int destBufferWidth,
int destBufferHeight,
915 const void *altBufferPtr,
int altBitsPerPixel,
916 const WizCompressedImage *imagePtr,
int destX,
int destY,
918 int32 flags,
const WizRawPixel *conversionTable,
919 void (*forewordFunctionPtr)(Wiz *wiz,
920 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
921 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable),
922 void (*backwardFunctionPtr)(Wiz *wiz,
923 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
924 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
927 void auxWRLEUncompressPixelStream(WizRawPixel *destStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize,
const WizRawPixel *conversionTable);
928 void auxWRLEUncompressAndCopyFromStreamOffset(WizRawPixel *destStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize, byte copyFromColor,
int streamOffset,
const WizRawPixel *conversionTable);
930 void auxDecompSRLEStream(WizRawPixel *destStream,
const WizRawPixel *backgroundStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize,
const WizRawPixel *conversionTable);
932 void auxDecompDRLEStream(WizRawPixel *destPtr,
const byte *dataStream, WizRawPixel *backgroundPtr,
int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable);
933 void auxDecompDRLEImage(WizRawPixel *foregroundBufferPtr, WizRawPixel *backgroundBufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
const WizRawPixel *conversionTable);
934 void auxDecompDRLEPrim(WizRawPixel *foregroundBufferPtr, WizRawPixel *backgroundBufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
936 void auxDecompTRLEStream(WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable);
937 void auxDecompTRLEImage(WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
const WizRawPixel *conversionTable);
938 void auxDecompTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
939 void auxDrawZplaneFromTRLEImage(byte *zplanePtr,
const byte *compData,
int zplanePixelWidth,
int zplanePixelHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
int transOp,
int solidOp);
940 void auxDrawZplaneFromTRLEPrim(byte *zplanePtr,
int zplanePixelWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
int transOp,
int solidOp);
942 void auxDecompRemappedTRLEStream(WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount, byte *remapTable,
const WizRawPixel *conversionTable);
943 void auxDecompRemappedTRLEImage(WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr, byte *remapTable,
const WizRawPixel *conversionTable);
944 void auxDecompRemappedTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect, byte *remapTable,
const WizRawPixel *conversionTable);
946 int auxHitTestTRLEXPos(
const byte *dataStream,
int skipAmount);
947 int auxHitTestTRLEImageRelPos(
const byte *compData,
int x,
int y,
int width,
int height);
948 int auxPixelHitTestTRLEXPos(byte *dataStream,
int skipAmount,
int transparentValue);
949 int auxPixelHitTestTRLEImageRelPos(byte *compData,
int x,
int y,
int width,
int height,
int transparentValue);
951 void auxDecompMixColorsTRLEImage(WizRawPixel *bufferPtr, byte *compData,
int bufferWidth,
int bufferHeight,
int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
const byte *colorMixTable,
const WizRawPixel *conversionTable);
952 void auxDecompMixColorsTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const byte *coloMixTable,
const WizRawPixel *conversionTable);
953 void auxColorMixDecompressLine(
954 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
955 int decompAmount,
const byte *colorMixTable,
956 const WizRawPixel *conversionTable);
958 void auxRemappedMemcpy(
959 WizRawPixel *dstPtr,
const byte *srcPtr,
int count, byte *remapTable,
960 const WizRawPixel *conversionTable);
962 void auxZplaneFromTRLEStream(
963 byte *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount,
964 int mask,
int transOp,
int solidOp);
966 void auxHistogramTRLELine(
int *tablePtr,
const byte *dataStream,
int skipAmount,
int decompAmount);
967 void auxHistogramTRLEPrim(
int *histogramTablePtr, byte *compData,
Common::Rect *sourceRect);
970 int _trlePutSize = 0;
971 byte _trleBuf[(128 * 2) *
sizeof(WizRawPixel)] = {};
973 byte *trlePutDump(byte *dest,
int nn);
974 byte *trlePutRun(byte *dest,
int nn,
int cc,
int tcolor);
975 int trleRLECompression(byte *pdest,
const WizRawPixel *psource,
int rowsize, WizRawPixel tcolor);
976 int trleCompressImageArea(byte *destBuffer,
const WizRawPixel *sourceBuffer,
int sourceBufferWidth,
int x1,
int y1,
int x2,
int y2, WizRawPixel transparentColor);
979 bool _initializeAlphaTable =
true;
980 float _alphaTable[256] = {};
981 int _precomputed16bppTable[WIZ_QUANTIZED_ALPHA_COUNT][WIZ_COLOR16_COMPONENT_COUNT][WIZ_COLOR16_COMPONENT_COUNT] = { {}, {}, {} };
983 void trleFLIPDecompressImage(
984 WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
985 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
986 int32 wizFlags,
const byte *extraTable,
const WizRawPixel *conversionTable,
987 const WizImageCommand *optionalICmdPtr);
989 void trleFLIPDecompressPrim(
990 WizSimpleBitmap *bitmapPtr,
const WizCompressedImage *imagePtr,
int destX,
int destY,
992 int32 flags,
const WizRawPixel *conversionTable,
993 void (*forewordFunctionPtr)(Wiz *wiz,
994 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
995 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable),
996 void (*backwardFunctionPtr)(Wiz *wiz,
997 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
998 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable));
1000 void trleFLIPDecompImageHull(
1001 WizRawPixel *bufferPtr,
int bufferWidth,
const Common::Rect *destRect,
1002 const byte *compData,
const Common::Rect *sourceRect,
const byte *extraPtr,
1003 const WizRawPixel *conversionTable,
1004 void (*functionPtr)(Wiz *wiz,
1005 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
1006 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable));
1008 void trleFLIPAltSourceDecompressImage(
1009 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
1010 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
1011 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
1012 int32 wizFlags,
const WizRawPixel *conversionTable,
1013 WizImageCommand *optionalICmdPtr);
1015 void trleFLIPAltSourceDecompressPrim(
1016 WizRawPixel *destBufferPtr,
int destBufferWidth,
int destBufferHeight,
1017 const void *altBufferPtr,
int altBitsPerPixel,
1018 const WizCompressedImage *imagePtr,
int destX,
int destY,
1020 int32 flags,
const WizRawPixel *conversionTable,
1021 void (*forewordFunctionPtr)(Wiz *wiz,
1022 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1023 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable),
1024 void (*backwardFunctionPtr)(Wiz *wiz,
1025 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1026 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
1028 void trleFLIPAltSourceDecompImageHull(
1029 WizRawPixel *bufferPtr,
int bufferWidth,
const Common::Rect *destRect,
1030 const byte *altSourceBuffer,
int altBytesPerLine,
1033 const WizRawPixel *conversionTable,
1034 void (*functionPtr)(Wiz *wiz,
1035 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1036 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
1038 bool trleFLIPAltSourceSpecialCaseDispatch(
1039 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
1040 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
1041 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
1042 int32 wizFlags,
const WizRawPixel *conversionTable,
1043 WizImageCommand *optionalICmdPtr);
1045 void trleFLIPRotate90DecompressImage(
1046 WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
1047 int x,
int y,
int width,
int height,
const Common::Rect *clipRectPtr,
1048 int32 wizFlags,
const void *extraTable,
const WizRawPixel *conversionTable,
1049 WizImageCommand *optionalICmdPtr);
1051 void trleFLIP90DegreeRotateCore(
1052 WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizCompressedImage *imagePtr,
const Common::Rect *optionalSrcRect,
1053 const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip,
const void *userParam,
const WizRawPixel *conversionTable,
1054 void (*functionPtr)(Wiz *wiz,
1055 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
1056 int decompAmount,
const void *userParam,
int destStepValue,
1057 const WizRawPixel *conversionTable));
1059 void trleFLIPCheckAlphaSetup();
1060 WizRawPixel trleFLIPAlphaMixPrim(WizRawPixel b, WizRawPixel a,
int alpha);
1061 void trleFLIPFiftyFiftyMixPixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1062 void trleFLIPFiftyFiftyMixForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1063 void trleFLIPFiftyFiftyMixBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1064 void trleFLIPAdditivePixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1065 void trleFLIPAdditiveForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1066 void trleFLIPAdditiveBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1067 void trleFLIPSubtractivePixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1068 void trleFLIPSubtractiveForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1069 void trleFLIPSubtractiveBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1070 void trleFLIPRemapDestPixels(WizRawPixel *dstPtr,
int size,
const byte *lookupTable);
1071 void trleFLIPForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1072 void trleFLIPBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1073 void trleFLIPForwardLookupPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable,
const WizRawPixel *conversionTable);
1074 void trleFLIPBackwardsLookupPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable,
const WizRawPixel *conversionTable);
1075 void trleFLIPForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable);
1076 void trleFLIPBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable);
1083 bool warpDrawWiz(
int image,
int state,
int polygon, int32 flags,
int transparentColor, WizSimpleBitmap *optionalDestBitmap,
const WizRawPixel *optionalColorConversionTable,
int shadowImage);
1084 bool warpDrawWizTo4Points(
int image,
int state,
const WarpWizPoint *dstPoints, int32 flags,
int transparentColor,
const Common::Rect *optionalClipRect, WizSimpleBitmap *optionalDestBitmap,
const WizRawPixel *optionalColorConversionTable,
const byte *colorMixTable);
1085 WarpWizOneSpanTable *warpCreateSpanTable(
int spanCount);
1086 void warpDestroySpanTable(WarpWizOneSpanTable *spanTable);
1087 WarpWizOneSpanTable *warpBuildSpanTable(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *dstPts,
const WarpWizPoint *srcPts,
int npoints,
const Common::Rect *clipRectPtr);
1088 void warpProcessDrawSpansA(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count);
1089 void warpProcessDrawSpansTransparent(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor);
1090 void warpProcessDrawSpansTransparentFiltered(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor,
const byte *pXmapColorTable,
bool bIsHintColor, WizRawPixel hintColor);
1091 void warpProcessDrawSpansMixColors(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor,
const byte *tablePtr);
1092 void warpFillSpanWithLine(WarpWizOneSpanTable *st,
const WarpWizPoint *dstA,
const WarpWizPoint *dstB,
const WarpWizPoint *srcA,
const WarpWizPoint *srcB);
1093 void warpProcessDrawSpansSampled(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count);
1094 void warpProcessDrawSpansTransparentSampled(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor);
1095 bool warpNPt2NPtWarpCORE(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect, int32 wizFlags);
1096 bool warpNPt2NPtNonClippedWarp(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor);
1097 bool warpNPt2NPtClippedWarp(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect);
1098 bool warpNPt2NPtClippedWarpMixColors(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect,
const byte *colorMixTable);
1099 bool warpNPt2NPtNonClippedWarpFiltered(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const byte *pXmapColorTable,
bool bIsHintColor, WizRawPixel hintColor);
1100 void warpFindMinMaxpoints(WarpWizPoint *minPtr, WarpWizPoint *maxPtr,
const WarpWizPoint *points,
int npoints);
#define ARRAYSIZE(x)
Definition: util.h:93
int16 right
Definition: rect.h:146
iterator end()
Definition: array.h:379
iterator begin()
Definition: array.h:374
In find(In first, In last, const T &v)
Definition: algorithm.h:225
T * iterator
Definition: array.h:54
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
void push_back(const T &element)
Definition: array.h:180
void debug(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: algorithm.h:29
DBCSString operator+(const DBCSString &x, const DBCSString &y)
int16 left
Definition: rect.h:145
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
RivenScriptPtr & operator+=(RivenScriptPtr &lhs, const RivenScriptPtr &rhs)
iterator erase(iterator pos)
Definition: array.h:328