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))))
114typedef uint16 WizRawPixel;
115typedef uint8 WizRawPixel8;
116typedef 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;
136struct WizBufferElement {
148struct WizFontProperties {
159struct WizEllipseProperties {
170struct WizExtendedRenderInfo {
177struct 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));
253struct 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)
281class 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)
364struct WizSimpleBitmap {
365 WizPxShrdBuffer bufferPtr;
369 WizSimpleBitmap() : bufferPtr(), bitmapWidth(0), bitmapHeight(0) {
374struct WizMultiTypeBitmap {
395struct WizFloodSegment {
399struct WizFloodState {
400 WizFloodSegment *stack;
401 WizFloodSegment *top;
405 WizSimpleBitmap *bitmapPtr;
409 int numStackElements;
412struct WizCompressedImage {
418struct WizMoonbaseCompressedImage {
419 int type, size, width, height;
420 WizRawPixel16 transparentColor;
424struct MoonbaseDistortionInfo {
448struct WarpWizOneSpan {
451 WarpWizPoint srcLeft;
452 WarpWizPoint srcRight;
455struct WarpWizOneDrawSpan {
464struct WarpWizOneSpanTable {
465 WarpWizPoint dstMinPt, dstMaxPt;
466 WarpWizPoint srcMinPt, srcMaxPt;
467 WarpWizOneDrawSpan *drawSpans;
468 WarpWizOneSpan *spans;
473enum 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,
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
551enum WizCompositeFlags {
552 kWCFConditionBits = 0x00000001,
553 kWCFSubState = 0x00000002,
554 kWCFXDelta = 0x00000004,
555 kWCFYDelta = 0x00000008,
556 kWCFDrawFlags = 0x00000010,
557 kWCFSubConditionBits = 0x00000020
560enum 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,
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
592enum WizSpcConditionTypes : uint {
593 kWSPCCTBits = 0xC0000000,
594 kWSPCCTOr = 0x00000000,
595 kWSPCCTAnd = 0x40000000,
596 kWSPCCTNot = 0x80000000
599enum WizMoonSystemBits {
600 kWMSBRopMask = 0x000000FF,
601 kWMSBRopParamMask = 0x0000FF00,
602 kWMSBReservedBits = (kWMSBRopMask | kWMSBRopParamMask),
603 kWMSBRopParamRShift = 8
606enum WizEllipseConstants {
608 kWECPiOver2 = 102944,
625class 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);
850 void pgArbitraryTransparentBlitPrim(WizRawPixel8 *dstPtr,
int dstStride, WizRawPixel8 *srcPtr,
int srcStride,
int copyWidth,
int copyHeight,
int transparentColor);
852 void pgDrawWarpDrawLetter(WizRawPixel *bitmapBuffer,
int bitmapWidth,
int bitmapHeight,
const byte *charData,
int x1,
int y1,
int width,
int height,
byte *colorLookupTable);
853 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);
854 void pgDraw8BppSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
855 void pgDraw8BppTransparentSimpleBlit(WizSimpleBitmap *destBM,
Common::Rect *destRect, WizSimpleBitmap *sourceBM,
Common::Rect *sourceRect,
int transparentColor,
const WizRawPixel *conversionTable);
856 void pgDrawImageWith16BitZBuffer(WizSimpleBitmap *psbDst,
const WizSimpleBitmap *psbZBuffer,
const byte *imgData,
int x,
int y,
int z,
int width,
int height,
Common::Rect *prcClip);
857 void pgForwardRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
858 void pgBackwardsRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
859 void pgTransparentForwardRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
860 void pgTransparentBackwardsRemapPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
861 void pgForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
862 void pgBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size,
const byte *lookupTable);
863 void pgTransparentForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
864 void pgTransparentBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const WizRawPixel *srcPtr,
int size, WizRawPixel transparentColor,
const byte *lookupTable);
865 void pgBlit90DegreeRotate(WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizSimpleBitmap *srcBitmap,
const Common::Rect *optionalSrcRect,
const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip);
866 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);
867 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,
868 void (*srcTransferFP)(Wiz *wiz, WizRawPixel *dstPtr,
int dstStep,
const WizRawPixel *srcPtr,
int count,
const void *userParam,
const void *userParam2));
874 void makeSizedRectAt(
Common::Rect *rectPtr,
int x,
int y,
int width,
int height);
875 void makeSizedRect(
Common::Rect *rectPtr,
int width,
int height);
887 void floodInitFloodState(WizFloodState *statePtr, WizSimpleBitmap *bitmapPtr,
int colorToWrite,
const Common::Rect *optionalClippingRect);
888 WizFloodState *floodCreateFloodState(
int numStackElements);
889 void floodDestroyFloodState(WizFloodState *state);
890 bool floodBoundryColorFloodCheckPixel(
int x,
int y, WizFloodState *state);
891 void floodFloodFillPrim(
int x,
int y, WizFloodState *statePtr,
bool (*checkPixelFnPtr)(Wiz *w,
int x,
int y, WizFloodState *state));
892 void floodPerformOpOnRect(WizFloodState *statePtr,
Common::Rect *rectPtr);
893 bool floodSimpleFill(WizSimpleBitmap *bitmapPtr,
int x,
int y,
int colorToWrite,
const Common::Rect *optionalClipRect,
Common::Rect *updateRectPtr);
896 int getRawPixel(
int color);
897 void memset8BppConversion(
void *dstPtr,
int value,
size_t count,
const WizRawPixel *conversionTable);
898 void memcpy8BppConversion(
void *dstPtr,
const void *srcPtr,
size_t count,
const WizRawPixel *conversionTable);
899 void rawPixelMemset(
void *dstPtr,
int value,
size_t count);
900 WizRawPixel convert8BppToRawPixel(WizRawPixel value,
const WizRawPixel *conversionTable);
901 void rawPixelExtractComponents(WizRawPixel aPixel,
int &r,
int &g,
int &b);
902 void rawPixelPackComponents(WizRawPixel &aPixel,
int r,
int g,
int b);
909 void mrleFLIPAltSourceDecompressImage(
910 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
911 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
912 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
913 int32 wizFlags,
const WizRawPixel *conversionTable);
914 void mrleFLIPAltSourceDecompressPrim(
915 WizRawPixel *destBufferPtr,
int destBufferWidth,
int destBufferHeight,
916 const void *altBufferPtr,
int altBitsPerPixel,
917 const WizCompressedImage *imagePtr,
int destX,
int destY,
919 int32 flags,
const WizRawPixel *conversionTable,
920 void (*forewordFunctionPtr)(Wiz *wiz,
921 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
922 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable),
923 void (*backwardFunctionPtr)(Wiz *wiz,
924 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
925 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
928 void auxWRLEUncompressPixelStream(WizRawPixel *destStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize,
const WizRawPixel *conversionTable);
929 void auxWRLEUncompressAndCopyFromStreamOffset(WizRawPixel *destStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize,
byte copyFromColor,
int streamOffset,
const WizRawPixel *conversionTable);
931 void auxDecompSRLEStream(WizRawPixel *destStream,
const WizRawPixel *backgroundStream,
const byte *singleColorTable,
const byte *streamData,
int streamSize,
const WizRawPixel *conversionTable);
933 void auxDecompDRLEStream(WizRawPixel *destPtr,
const byte *dataStream, WizRawPixel *backgroundPtr,
int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable);
934 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);
935 void auxDecompDRLEPrim(WizRawPixel *foregroundBufferPtr, WizRawPixel *backgroundBufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
937 void auxDecompTRLEStream(WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable);
938 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);
939 void auxDecompTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const WizRawPixel *conversionTable);
940 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);
941 void auxDrawZplaneFromTRLEPrim(
byte *zplanePtr,
int zplanePixelWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
int transOp,
int solidOp);
943 void auxDecompRemappedTRLEStream(WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount,
byte *remapTable,
const WizRawPixel *conversionTable);
944 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);
945 void auxDecompRemappedTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
byte *remapTable,
const WizRawPixel *conversionTable);
947 int auxHitTestTRLEXPos(
const byte *dataStream,
int skipAmount);
948 int auxHitTestTRLEImageRelPos(
const byte *compData,
int x,
int y,
int width,
int height);
949 int auxPixelHitTestTRLEXPos(
byte *dataStream,
int skipAmount,
int transparentValue);
950 int auxPixelHitTestTRLEImageRelPos(
byte *compData,
int x,
int y,
int width,
int height,
int transparentValue);
952 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);
953 void auxDecompMixColorsTRLEPrim(WizRawPixel *bufferPtr,
int bufferWidth,
Common::Rect *destRect,
const byte *compData,
Common::Rect *sourceRect,
const byte *coloMixTable,
const WizRawPixel *conversionTable);
954 void auxColorMixDecompressLine(
955 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
956 int decompAmount,
const byte *colorMixTable,
957 const WizRawPixel *conversionTable);
959 void auxRemappedMemcpy(
960 WizRawPixel *dstPtr,
const byte *srcPtr,
int count,
byte *remapTable,
961 const WizRawPixel *conversionTable);
963 void auxZplaneFromTRLEStream(
964 byte *destPtr,
const byte *dataStream,
int skipAmount,
int decompAmount,
965 int mask,
int transOp,
int solidOp);
967 void auxHistogramTRLELine(
int *tablePtr,
const byte *dataStream,
int skipAmount,
int decompAmount);
968 void auxHistogramTRLEPrim(
int *histogramTablePtr,
byte *compData,
Common::Rect *sourceRect);
971 int _trlePutSize = 0;
972 byte _trleBuf[(128 * 2) *
sizeof(WizRawPixel)] = {};
974 byte *trlePutDump(
byte *dest,
int nn);
975 byte *trlePutRun(
byte *dest,
int nn,
int cc,
int tcolor);
976 int trleRLECompression(
byte *pdest,
const WizRawPixel *psource,
int rowsize, WizRawPixel tcolor);
977 int trleCompressImageArea(
byte *destBuffer,
const WizRawPixel *sourceBuffer,
int sourceBufferWidth,
int x1,
int y1,
int x2,
int y2, WizRawPixel transparentColor);
980 bool _initializeAlphaTable =
true;
981 float _alphaTable[256] = {};
982 int _precomputed16bppTable[WIZ_QUANTIZED_ALPHA_COUNT][WIZ_COLOR16_COMPONENT_COUNT][WIZ_COLOR16_COMPONENT_COUNT] = { {}, {}, {} };
984 void trleFLIPDecompressImage(
985 WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
986 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
987 int32 wizFlags,
const byte *extraTable,
const WizRawPixel *conversionTable,
988 const WizImageCommand *optionalICmdPtr);
990 void trleFLIPDecompressPrim(
991 WizSimpleBitmap *bitmapPtr,
const WizCompressedImage *imagePtr,
int destX,
int destY,
993 int32 flags,
const WizRawPixel *conversionTable,
994 void (*forewordFunctionPtr)(Wiz *wiz,
995 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
996 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable),
997 void (*backwardFunctionPtr)(Wiz *wiz,
998 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
999 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable));
1001 void trleFLIPDecompImageHull(
1002 WizRawPixel *bufferPtr,
int bufferWidth,
const Common::Rect *destRect,
1003 const byte *compData,
const Common::Rect *sourceRect,
const byte *extraPtr,
1004 const WizRawPixel *conversionTable,
1005 void (*functionPtr)(Wiz *wiz,
1006 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
1007 int decompAmount,
const byte *extraPtr,
const WizRawPixel *conversionTable));
1009 void trleFLIPAltSourceDecompressImage(
1010 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
1011 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
1012 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
1013 int32 wizFlags,
const WizRawPixel *conversionTable,
1014 WizImageCommand *optionalICmdPtr);
1016 void trleFLIPAltSourceDecompressPrim(
1017 WizRawPixel *destBufferPtr,
int destBufferWidth,
int destBufferHeight,
1018 const void *altBufferPtr,
int altBitsPerPixel,
1019 const WizCompressedImage *imagePtr,
int destX,
int destY,
1021 int32 flags,
const WizRawPixel *conversionTable,
1022 void (*forewordFunctionPtr)(Wiz *wiz,
1023 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1024 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable),
1025 void (*backwardFunctionPtr)(Wiz *wiz,
1026 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1027 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
1029 void trleFLIPAltSourceDecompImageHull(
1030 WizRawPixel *bufferPtr,
int bufferWidth,
const Common::Rect *destRect,
1031 const byte *altSourceBuffer,
int altBytesPerLine,
1034 const WizRawPixel *conversionTable,
1035 void (*functionPtr)(Wiz *wiz,
1036 WizRawPixel *destPtr,
const void *altSourcePtr,
const byte *dataStream,
1037 int skipAmount,
int decompAmount,
const WizRawPixel *conversionTable));
1039 bool trleFLIPAltSourceSpecialCaseDispatch(
1040 WizRawPixel *destBufferPtr,
const byte *compData,
int destBufferWidth,
int destBufferHeight,
1041 const void *altBufferPtr,
int altWidth,
int altHeight,
int altBitsPerPixel,
1042 int x,
int y,
int width,
int height,
Common::Rect *clipRectPtr,
1043 int32 wizFlags,
const WizRawPixel *conversionTable,
1044 WizImageCommand *optionalICmdPtr);
1046 void trleFLIPRotate90DecompressImage(
1047 WizRawPixel *bufferPtr,
const byte *compData,
int bufferWidth,
int bufferHeight,
1048 int x,
int y,
int width,
int height,
const Common::Rect *clipRectPtr,
1049 int32 wizFlags,
const void *extraTable,
const WizRawPixel *conversionTable,
1050 WizImageCommand *optionalICmdPtr);
1052 void trleFLIP90DegreeRotateCore(
1053 WizSimpleBitmap *dstBitmap,
int x,
int y,
const WizCompressedImage *imagePtr,
const Common::Rect *optionalSrcRect,
1054 const Common::Rect *optionalClipRect,
bool hFlip,
bool vFlip,
const void *userParam,
const WizRawPixel *conversionTable,
1055 void (*functionPtr)(Wiz *wiz,
1056 WizRawPixel *destPtr,
const byte *dataStream,
int skipAmount,
1057 int decompAmount,
const void *userParam,
int destStepValue,
1058 const WizRawPixel *conversionTable));
1060 void trleFLIPCheckAlphaSetup();
1061 WizRawPixel trleFLIPAlphaMixPrim(WizRawPixel b, WizRawPixel a,
int alpha);
1062 void trleFLIPFiftyFiftyMixPixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1063 void trleFLIPFiftyFiftyMixForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1064 void trleFLIPFiftyFiftyMixBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1065 void trleFLIPAdditivePixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1066 void trleFLIPAdditiveForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1067 void trleFLIPAdditiveBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1068 void trleFLIPSubtractivePixelMemset(WizRawPixel *dstPtr, WizRawPixel mixColor,
int size);
1069 void trleFLIPSubtractiveForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1070 void trleFLIPSubtractiveBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1071 void trleFLIPRemapDestPixels(WizRawPixel *dstPtr,
int size,
const byte *lookupTable);
1072 void trleFLIPForwardPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1073 void trleFLIPBackwardsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const WizRawPixel *conversionTable);
1074 void trleFLIPForwardLookupPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable,
const WizRawPixel *conversionTable);
1075 void trleFLIPBackwardsLookupPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable,
const WizRawPixel *conversionTable);
1076 void trleFLIPForwardMixColorsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable);
1077 void trleFLIPBackwardsMixColorsPixelCopy(WizRawPixel *dstPtr,
const byte *srcPtr,
int size,
const byte *lookupTable);
1084 bool warpDrawWiz(
int image,
int state,
int polygon, int32 flags,
int transparentColor, WizSimpleBitmap *optionalDestBitmap,
const WizRawPixel *optionalColorConversionTable,
int shadowImage);
1085 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);
1086 WarpWizOneSpanTable *warpCreateSpanTable(
int spanCount);
1087 void warpDestroySpanTable(WarpWizOneSpanTable *spanTable);
1088 WarpWizOneSpanTable *warpBuildSpanTable(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *dstPts,
const WarpWizPoint *srcPts,
int npoints,
const Common::Rect *clipRectPtr);
1089 void warpProcessDrawSpansA(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count);
1090 void warpProcessDrawSpansTransparent(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor);
1091 void warpProcessDrawSpansTransparentFiltered(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor,
const byte *pXmapColorTable,
bool bIsHintColor, WizRawPixel hintColor);
1092 void warpProcessDrawSpansMixColors(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor,
const byte *tablePtr);
1093 void warpFillSpanWithLine(WarpWizOneSpanTable *st,
const WarpWizPoint *dstA,
const WarpWizPoint *dstB,
const WarpWizPoint *srcA,
const WarpWizPoint *srcB);
1094 void warpProcessDrawSpansSampled(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count);
1095 void warpProcessDrawSpansTransparentSampled(WizSimpleBitmap *dstBitmap,
const WizSimpleBitmap *srcBitmap,
const WarpWizOneDrawSpan *drawSpans,
int count, WizRawPixel transparentColor);
1096 bool warpNPt2NPtWarpCORE(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect, int32 wizFlags);
1097 bool warpNPt2NPtNonClippedWarp(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor);
1098 bool warpNPt2NPtClippedWarp(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect);
1099 bool warpNPt2NPtClippedWarpMixColors(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const Common::Rect *optionalClipRect,
const byte *colorMixTable);
1100 bool warpNPt2NPtNonClippedWarpFiltered(WizSimpleBitmap *dstBitmap,
const WarpWizPoint *dstpoints,
const WizSimpleBitmap *srcBitmap,
const WarpWizPoint *srcpoints,
int npoints,
int transparentColor,
const byte *pXmapColorTable,
bool bIsHintColor, WizRawPixel hintColor);
1101 void warpFindMinMaxpoints(WarpWizPoint *minPtr, WarpWizPoint *maxPtr,
const WarpWizPoint *points,
int npoints);
iterator end()
Definition: array.h:380
iterator erase(iterator pos)
Definition: array.h:329
T * iterator
Definition: array.h:54
void push_back(const T &element)
Definition: array.h:181
iterator begin()
Definition: array.h:375
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
In find(In first, In last, const T &v)
Definition: algorithm.h:225
void debug(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
#define ARRAYSIZE(x)
Definition: util.h:114
Definition: algorithm.h:29
DBCSString operator+(const DBCSString &x, const DBCSString &y)
RivenScriptPtr & operator+=(RivenScriptPtr &lhs, const RivenScriptPtr &rhs)
T right
Definition: rect.h:171
T left
Definition: rect.h:170