16#define RGB555_CREATE(R, G, B) (((R) << 10) | (G) << 5 | (B) << 0)
34void MxDisplaySurface::Init()
40 m_initialized =
FALSE;
41 memset(&m_surfaceDesc, 0,
sizeof(m_surfaceDesc));
58 for (
MxS32 i = 0; i < backBuffers; i++) {
64 m_ddSurface2->Restore();
89MxU8 MxDisplaySurface::CountTotalBitsSetTo1(
MxU32 p_param)
93 for (; p_param; p_param >>= 1) {
94 count += ((
MxU8) p_param & 1);
102MxU8 MxDisplaySurface::CountContiguousBitsSetTo1(
MxU32 p_param)
106 for (; (p_param & 1) == 0; p_param >>= 1) {
123 m_videoParam = p_videoParam;
124 m_ddSurface1 = p_ddSurface1;
125 m_ddSurface2 = p_ddSurface2;
126 m_ddClipper = p_ddClipper;
127 m_initialized =
FALSE;
129 memset(&m_surfaceDesc, 0,
sizeof(m_surfaceDesc));
130 m_surfaceDesc.
dwSize =
sizeof(m_surfaceDesc);
132 if (m_ddSurface2->GetSurfaceDesc(&m_surfaceDesc)) {
147 m_initialized =
TRUE;
148 m_videoParam = p_videoParam;
160 if (backBuffers < 1) {
163 else if (backBuffers > 2) {
178 memset(&ddsd, 0,
sizeof(ddsd));
179 ddsd.
dwSize =
sizeof(ddsd);
181 if (lpDirectDraw->GetDisplayMode(&ddsd)) {
188 if (lpDirectDraw->SetDisplayMode(width, height, bitdepth)) {
195 memset(&ddsd, 0,
sizeof(ddsd));
196 ddsd.
dwSize =
sizeof(ddsd);
201 if (lpDirectDraw->CreateSurface(&ddsd, &m_ddSurface1,
NULL)) {
207 if (m_ddSurface1->GetAttachedSurface(&ddsd.
ddsCaps, &m_ddSurface2)) {
212 memset(&ddsd, 0,
sizeof(ddsd));
213 ddsd.
dwSize =
sizeof(ddsd);
217 if (lpDirectDraw->CreateSurface(&ddsd, &m_ddSurface1,
NULL)) {
221 memset(&ddsd, 0,
sizeof(ddsd));
222 ddsd.
dwSize =
sizeof(ddsd);
232 if (lpDirectDraw->CreateSurface(&ddsd, &m_ddSurface2,
NULL)) {
237 memset(&m_surfaceDesc, 0,
sizeof(m_surfaceDesc));
238 m_surfaceDesc.
dwSize =
sizeof(m_surfaceDesc);
240 if (!m_ddSurface2->GetSurfaceDesc(&m_surfaceDesc)) {
241 if (!lpDirectDraw->CreateClipper(0, &m_ddClipper,
NULL) && !m_ddClipper->SetHWnd(0,
hWnd) &&
242 !m_ddSurface1->SetClipper(m_ddClipper)) {
256 m_ddSurface2->Release();
260 m_ddSurface1->Release();
264 m_ddClipper->Release();
286 WORD m_palNumEntries;
287 PALETTEENTRY m_palPalEntry[256];
288 } lpal = {0x300, 256};
290 p_palette->
GetEntries((LPPALETTEENTRY) lpal.m_palPalEntry);
292 HPALETTE hpal = CreatePalette((LPLOGPALETTE) &lpal);
294 SelectPalette(hdc, hpal,
FALSE);
306 m_16bitPal =
new MxU16[256];
309 PALETTEENTRY palette[256];
319 for (
MxS32 i = 0; i < 256; i++) {
320 m_16bitPal[i] = ((palette[i].peRed >> (8 - totalBitsRed)) << contiguousBitsRed) |
321 ((palette[i].peGreen >> (8 - totalBitsGreen)) << contiguousBitsGreen) |
322 ((palette[i].peBlue >> (8 - totalBitsBlue)) << contiguousBitsBlue);
359 memset(&ddsd, 0,
sizeof(ddsd));
360 ddsd.
dwSize =
sizeof(ddsd);
364 m_ddSurface2->Restore();
385 MxU8* surfaceBefore = surface;
387 for (
MxS32 i = 0; p_width > i; i++) {
389 *surface++ = *data++;
395 memcpy(surface, surfaceBefore, 2 * p_width);
405 MxS32 height = p_height;
406 MxS32 width = p_width;
407 MxS32 copyWidth = width * 4;
408 MxU16* p16bitPal = m_16bitPal;
411 if (!stride && !length) {
413 MxU8* surfaceBefore = surface;
415 for (i = 0; i < width; i++) {
416 MxU16 element = p16bitPal[*data];
417 *(
MxU16*) surface = element;
419 *(
MxU16*) surface = element;
425 memcpy(surface, surfaceBefore, copyWidth);
431 MxU8* surfaceBefore = surface;
433 for (i = 0; i < width; i++) {
434 MxU16 element = p16bitPal[*data];
435 *(
MxU16*) surface = element;
437 *(
MxU16*) surface = element;
446 memcpy(surface, surfaceBefore, p_width * 4);
464 memcpy(surface, data, p_width);
475 for (
MxS32 i = 0; i < p_height; i++) {
476 for (
MxS32 j = 0; j < p_width; j++) {
477 *(
MxU16*) surface = m_16bitPal[*data++];
522 memset(&ddsd, 0,
sizeof(ddsd));
523 ddsd.
dwSize =
sizeof(ddsd);
527 m_ddSurface2->Restore();
548 for (
MxS32 i = 0; i < p_height; i++) {
549 for (
MxS32 j = 0; j < p_width; j++) {
574 for (
MxS32 i = 0; i < p_height; i++) {
575 for (
MxS32 j = 0; j < p_width; j++) {
577 *(
MxU16*) surface = m_16bitPal[*data];
601 MxU8*& p_surfaceData,
615 MxU8* end = p_bitmapData + p_bitmapSize;
616 MxU8* surfCopy = p_surfaceData;
631 while (p_bitmapData < end) {
632 skipCount = *p_bitmapData++;
636 skipCount += t << 16;
638 MxS32 rowRemainder = p_width - count % p_width;
641 if (skipCount >= rowRemainder) {
642 p_surfaceData += rowRemainder;
643 skipCount -= rowRemainder;
644 p_surfaceData += p_pitch - p_width;
645 p_surfaceData += p_pitch * (skipCount / p_width);
649 p_surfaceData += skipCount % p_width;
650 if (p_bitmapData >= end) {
654 drawCount = *p_bitmapData++;
658 drawCount += t << 16;
660 rowRemainder = p_width - count % p_width;
663 if (drawCount >= rowRemainder) {
664 memcpy(p_surfaceData, p_bitmapData, rowRemainder);
665 p_surfaceData += rowRemainder;
666 p_bitmapData += rowRemainder;
668 drawCount -= rowRemainder;
671 p_surfaceData += p_pitch - p_width;
672 MxS32 rows = drawCount / p_width;
674 for (
MxU32 i = 0; i < rows; i++) {
675 memcpy(p_surfaceData, p_bitmapData, p_width);
676 p_bitmapData += p_width;
677 p_surfaceData += p_pitch;
681 MxS32 tail = drawCount % p_width;
682 memcpy(p_surfaceData, p_bitmapData, tail);
683 p_surfaceData += tail;
684 p_bitmapData += tail;
689 while (p_bitmapData < end) {
690 skipCount = *p_bitmapData++;
694 skipCount += t << 16;
696 MxS32 rowRemainder = p_width - count % p_width;
699 if (skipCount >= rowRemainder) {
700 p_surfaceData += 2 * rowRemainder;
701 skipCount -= rowRemainder;
702 p_surfaceData += p_pitch - 2 * p_width;
703 p_surfaceData += p_pitch * (skipCount / p_width);
706 p_surfaceData += 2 * (skipCount % p_width);
707 if (p_bitmapData >= end) {
711 drawCount = *p_bitmapData++;
715 drawCount += t << 16;
717 rowRemainder = p_width - count % p_width;
720 if (drawCount >= rowRemainder) {
722 for (
MxU32 j = 0; j < rowRemainder; j++) {
723 *((
MxU16*) p_surfaceData) = m_16bitPal[*p_bitmapData++];
727 drawCount -= rowRemainder;
729 p_surfaceData += p_pitch - 2 * p_width;
730 MxS32 rows = drawCount / p_width;
732 for (
MxU32 i = 0; i < rows; i++) {
734 for (
MxS32 j = 0; j < p_width; j++) {
735 *((
MxU16*) p_surfaceData) = m_16bitPal[*p_bitmapData++];
739 p_surfaceData += p_pitch - 2 * p_width;
743 MxS32 tail = drawCount % p_width;
745 for (
MxS32 j = 0; j < tail; j++) {
746 *((
MxU16*) p_surfaceData) = m_16bitPal[*p_bitmapData++];
757 memset(&surfaceDesc, 0,
sizeof(surfaceDesc));
758 surfaceDesc.
dwSize =
sizeof(surfaceDesc);
763 m_ddSurface2->Restore();
767 if (result ==
DD_OK) {
768 MxU8* pixels = p_pixels;
773 MxTrace(
"16 bit source to 8 bit display NOT_IMPLEMENTED");
783 memcpy(dst, pixels, p_width);
792 MxLong stride = p_width * 2;
796 memcpy(dst, pixels, 2 * p_width);
801 else if (p_bpp == 8) {
803 MxLong stride = p_width * 2;
806 for (
MxS32 i = 0; i < p_height; i++) {
807 for (
MxS32 j = 0; j < p_width; j++) {
808 *(
MxU16*) dst = m_16bitPal[*pixels++];
819 m_ddSurface2->Unlock(surfaceDesc.
lpSurface);
832 memset(&ddsd, 0,
sizeof(ddsd));
833 ddsd.
dwSize =
sizeof(ddsd);
846 OutputDebugString(
"MxDisplaySurface::Display error\n");
862 memset(&data, 0,
sizeof(data));
863 data.
dwSize =
sizeof(data);
866 if (m_ddSurface1->Blt((LPRECT) &b, m_ddSurface2, (LPRECT) &a, 0, &data) ==
DDERR_SURFACELOST) {
867 m_ddSurface1->Restore();
868 m_ddSurface1->Blt((LPRECT) &b, m_ddSurface2, (LPRECT) &a, 0, &data);
877 if (m_ddSurface2 && !m_ddSurface2->GetDC(p_hdc)) {
887 if (m_ddSurface2 && p_hdc) {
888 m_ddSurface2->ReleaseDC(p_hdc);
906 memset(&ddsd, 0,
sizeof(ddsd));
907 ddsd.
dwSize =
sizeof(ddsd);
909 if (draw->GetDisplayMode(&ddsd)) {
920 if (draw->CreateSurface(&ddsd, &surface,
NULL) !=
DD_OK) {
928 if (draw->CreateSurface(&ddsd, &surface,
NULL) !=
DD_OK) {
938 memset(&ddsd, 0,
sizeof(ddsd));
939 ddsd.
dwSize =
sizeof(ddsd);
945 else if (p_doNotWriteToSurface) {
962 for (
MxS32 y = 0; y < heightAbs; y++) {
963 memcpy(surfaceData, bitmapSrcPtr, widthNormal);
964 bitmapSrcPtr += rowSeek;
965 surfaceData = (
MxU16*) ((
MxU8*) surfaceData + newPitch);
970 if (p_transparent && surface) {
978 if (m_16bitPal ==
NULL) {
982 rowSeek -= widthNormal;
983 newPitch -= 2 * widthNormal;
986 for (
MxS32 y = 0; y < heightAbs; y++) {
987 for (
MxS32 x = 0; x < widthNormal; x++) {
988 if (*bitmapSrcPtr == 0) {
992 *surfaceData = m_16bitPal[*bitmapSrcPtr];
999 bitmapSrcPtr += rowSeek;
1000 surfaceData = (
MxU16*) ((
MxU8*) surfaceData + newPitch);
1008 for (
MxS32 y = 0; y < heightAbs; y++) {
1009 for (
MxS32 x = 0; x < widthNormal; x++) {
1010 *surfaceData++ = m_16bitPal[*bitmapSrcPtr++];
1013 bitmapSrcPtr += rowSeek;
1014 surfaceData = (
MxU16*) ((
MxU8*) surfaceData + newPitch);
1042 memset(&ddsd, 0,
sizeof(ddsd));
1043 ddsd.
dwSize =
sizeof(ddsd);
1045 p_src->GetSurfaceDesc(&ddsd);
1047 if (draw->CreateSurface(&ddsd, &newSurface,
NULL) !=
DD_OK) {
1053 if (newSurface->BltFast(0, 0, p_src, &rect, 16) !=
DD_OK) {
1054 newSurface->Release();
1069 memset(&ddsd, 0,
sizeof(ddsd));
1070 ddsd.
dwSize =
sizeof(ddsd);
1072 if (draw->GetDisplayMode(&ddsd) !=
DD_OK) {
1085 if (draw->CreateSurface(&ddsd, &newSurface,
NULL) !=
DD_OK) {
1089 if (draw->CreateSurface(&ddsd, &newSurface,
NULL) !=
DD_OK) {
1094 memset(&ddsd, 0,
sizeof(ddsd));
1095 ddsd.
dwSize =
sizeof(ddsd);
1105 for (
MxS32 x = 0; x < 16; x++) {
1106 MxU16* surface2 = surface;
1107 for (
MxS32 y = 0; y < 16; y++) {
1108 if ((y > 10 || x) && (x > 10 || y) && x + y != 10) {
1121 surface = (
MxU16*) ((
MxU8*) surface + pitch);
1135 newSurface->Release();
1178 MxU8* surface = (
MxU8*) p_desc->lpSurface + p_right + (p_bottom * p_desc->lPitch);
1181 MxLong length = -2 * p_width + p_desc->lPitch;
1182 while (p_height--) {
1183 MxU8* surfaceBefore = surface;
1185 for (
MxS32 i = 0; p_width > i; i++) {
1187 *surface++ = *data++;
1193 memcpy(surface, surfaceBefore, 2 * p_width);
1194 surface += p_desc->lPitch;
1199 MxU8* surface = (
MxU8*) p_desc->lpSurface + (2 * p_right) + (p_bottom * p_desc->lPitch);
1202 MxS32 length = -4 * p_width + p_desc->lPitch;
1203 MxS32 height = p_height;
1204 MxS32 width = p_width;
1205 MxS32 copyWidth = width * 4;
1206 MxU16* p16bitPal = m_16bitPal;
1209 if (!stride && !length) {
1211 MxU8* surfaceBefore = surface;
1213 for (i = 0; i < width; i++) {
1214 MxU16 element = p16bitPal[*data];
1215 *(
MxU16*) surface = element;
1217 *(
MxU16*) surface = element;
1223 memcpy(surface, surfaceBefore, copyWidth);
1224 surface += p_desc->lPitch;
1229 MxU8* surfaceBefore = surface;
1231 for (i = 0; i < width; i++) {
1232 MxU16 element = p16bitPal[*data];
1233 *(
MxU16*) surface = element;
1235 *(
MxU16*) surface = element;
1244 memcpy(surface, surfaceBefore, p_width * 4);
1245 surface += p_desc->lPitch;
1257 MxU8* surface = (
MxU8*) p_desc->lpSurface + p_right + (p_bottom * p_desc->lPitch);
1260 MxLong length = p_desc->lPitch;
1261 while (p_height--) {
1262 memcpy(surface, data, p_width);
1269 MxU8* surface = (
MxU8*) p_desc->lpSurface + (2 * p_right) + (p_bottom * p_desc->lPitch);
1272 MxLong length = -2 * p_width + p_desc->lPitch;
1273 for (
MxS32 i = 0; i < p_height; i++) {
1274 for (
MxS32 j = 0; j < p_width; j++) {
1275 *(
MxU16*) surface = m_16bitPal[*data++];
1324 MxLong destStride = p_desc->lPitch;
1325 MxU8* dest = (
MxU8*) p_desc->lpSurface + p_right + (p_bottom * p_desc->lPitch);
1332 MxLong destSkip = destStride - p_width;
1334 for (
MxS32 i = 0; i < p_height; i++, src += srcSkip, dest += destSkip) {
1335 for (
MxS32 j = 0; j < p_width; j++, src++, dest++) {
1345 MxLong destStride = p_desc->lPitch;
1346 MxU8* dest = (
MxU8*) p_desc->lpSurface + (2 * p_right) + (p_bottom * p_desc->lPitch);
1353 MxLong srcSkip = srcStride - p_width;
1354 MxLong destSkip = destStride - 2 * p_width;
1356 for (
MxS32 i = 0; i < p_height; i++, src += srcSkip, dest += destSkip) {
1357 for (
MxS32 j = 0; j < p_width; j++, src++, dest += 2) {
1359 *(
MxU16*) dest = m_16bitPal[*src];
1380 memset(&surfaceDesc, 0,
sizeof(surfaceDesc));
1381 surfaceDesc.
dwSize =
sizeof(surfaceDesc);
1383 if (ddraw->GetDisplayMode(&surfaceDesc) !=
DD_OK) {
1396 if (ddraw->CreateSurface(&surfaceDesc, &surface,
NULL) !=
DD_OK) {
1399 if (ddraw->CreateSurface(&surfaceDesc, &surface,
NULL) !=
DD_OK) {
[AI] Represents an 8bpp or high color device-independent bitmap (DIB) and provides operations for bit...
MxBool IsTopDown() const
[AI] Checks if the bitmap is stored in top-down scanline order.
MxLong AlignToFourByte(MxLong p_value) const
[AI] Aligns a value up to the nearest multiple of four (stride alignment for DIBs).
MxLong GetBmiHeightAbs() const
[AI] Returns the absolute value of the bitmap's height.
MxU8 * GetStart(MxS32 p_left, MxS32 p_top) const
[AI] Returns a pointer to the starting address of the pixel data at the specified coordinates.
BITMAPINFOHEADER * GetBmiHeader() const
[AI] Returns a pointer to the underlying BITMAPINFOHEADER.
MxLong GetBmiWidth() const
[AI] Fetches the width (in pixels) encoded in this bitmap's header.
Provides a DirectDraw-based drawing surface for blitting bitmaps, managing palette,...
LPDIRECTDRAWSURFACE FUN_100bc8b0(MxS32 width, MxS32 height)
[AI] Creates a 16-bit DirectDraw surface of specified size, either in video or system memory.
static LPDIRECTDRAWSURFACE CopySurface(LPDIRECTDRAWSURFACE p_src)
[AI] Creates a deep copy of the provided surface (new DirectDraw surface with same content).
~MxDisplaySurface() override
[AI] Destroys the display surface and releases DirectDraw objects and resources.
virtual MxResult Create(MxVideoParam &p_videoParam)
[AI] Creates DirectDraw surfaces and initializes based on the desired video mode.
virtual void SetPalette(MxPalette *p_palette)
[AI] Sets the palette used for the primary and secondary DirectDraw surfaces.
void ClearScreen()
[AI] Fills the current back buffer with black (clears the display area). [AI]
virtual void GetDC(HDC *p_hdc)
[AI] Acquires a Win32 device context (DC) for the back buffer surface, for GDI drawing.
virtual void VTable0x34(MxU8 *p_pixels, MxS32 p_bpp, MxS32 p_width, MxS32 p_height, MxS32 p_x, MxS32 p_y)
[AI] Directly writes an array of pixel data into the back surface at the given rectangle.
MxDisplaySurface()
[AI] Constructs the display surface and initializes all members.
virtual void Destroy()
[AI] Releases all DirectDraw surfaces and resources held by this object.
virtual void VTable0x24(LPDDSURFACEDESC p_desc, MxBitmap *p_bitmap, MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom, MxS32 p_width, MxS32 p_height)
[AI] Draws a bitmap onto a surface described by p_desc, scaling to the specified rectangle.
virtual MxResult Init(MxVideoParam &p_videoParam, LPDIRECTDRAWSURFACE p_ddSurface1, LPDIRECTDRAWSURFACE p_ddSurface2, LPDIRECTDRAWCLIPPER p_ddClipper)
[AI] Initializes the surface object with given video parameters, DirectDraw surfaces,...
static LPDIRECTDRAWSURFACE CreateCursorSurface()
[AI] Creates and draws a 16x16 cursor DirectDraw surface.
virtual void VTable0x30(MxBitmap *p_bitmap, MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom, MxS32 p_width, MxS32 p_height, MxBool p_RLE)
[AI] Draws a bitmap with optional transparency (RLE), outputting to active back surface.
virtual void VTable0x28(MxBitmap *p_bitmap, MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom, MxS32 p_width, MxS32 p_height)
[AI] Draws a bitmap onto the back surface, specified by coordinates and output size.
virtual void VTable0x2c(LPDDSURFACEDESC p_desc, MxBitmap *p_bitmap, MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom, MxS32 p_width, MxS32 p_height, MxBool p_RLE)
[AI] Draws a bitmap with optional transparency (RLE) onto the output surface.
virtual void ReleaseDC(HDC p_hdc)
[AI] Releases a device context (DC) previously acquired for the back surface.
virtual void Display(MxS32 p_left, MxS32 p_top, MxS32 p_left2, MxS32 p_top2, MxS32 p_width, MxS32 p_height)
[AI] Presents the back buffer contents to the front buffer or window.
void DrawTransparentRLE(MxU8 *&p_bitmapData, MxU8 *&p_surfaceData, MxU32 p_bitmapSize, MxS32 p_width, MxS32 p_height, MxLong p_pitch, MxU8 p_bpp)
[AI] Performs RLE-based transparent drawing from an RLE-compressed bitmap into the given surface.
virtual LPDIRECTDRAWSURFACE VTable0x44(MxBitmap *p_bitmap, undefined4 *p_ret, undefined4 p_doNotWriteToSurface, undefined4 p_transparent)
[AI] Allocates a DirectDraw surface for a bitmap to allow hardware blitting/transparency.
static MxOmni * GetInstance()
[AI] Returns the singleton instance of the MxOmni subsystem coordinator.
HWND GetWindowHandle() const
[AI] Gets the window handle (HWND) associated with the engine (ownership not transferred).
[AI] Encapsulates a DirectDraw 8-bit (256 color) palette for use with DirectX rendering.
LPDIRECTDRAWPALETTE CreateNativePalette()
[AI] Creates the internal DirectDraw palette object and populates it with the current palette entries...
MxResult GetEntries(LPPALETTEENTRY p_entries)
[AI] Copies all palette entries to external buffer.
[AI] 2D point with 32-bit signed integer coordinates.
T GetY() const
[AI] Get Y coordinate.
T GetX() const
[AI] Get X coordinate.
[AI] Rectangle using 32-bit signed integer coordinates.
T GetTop() const
[AI] Get the top edge.
T GetWidth() const
[AI] Get the rectangle's width.
T GetHeight() const
[AI] Get the rectangle's height.
T GetLeft() const
[AI] Get the left edge.
[AI] Size with 32-bit signed integer width and height.
LPDIRECTDRAW GetDirectDraw()
[AI] Returns the current DirectDraw COM interface managed by this class (may be owned or external).
MxVideoParam & GetVideoParam()
[AI] Retrieves the current video parameter configuration used by this manager.
[AI] Manages video parameter flags, providing an abstraction for various video settings such as fulls...
MxBool GetFullScreen()
[AI] Get whether fullscreen mode is enabled.
MxBool Get16Bit()
[AI] Get whether 16-bit rendering mode is selected.
void SetBackBuffers(MxBool p_e)
[AI] Toggle the use of a back buffer (double-buffered rendering).
MxBool GetF2bit1()
[AI] Get the value of secondary flag 1.
MxBool GetFlipSurfaces()
[AI] Get whether page flipping of surfaces is enabled.
MxBool GetF1bit3()
[AI] Get the value of primary flag 3.
void SetFlipSurfaces(MxBool p_e)
[AI] Toggle the use of flip (page flipping) for surfaces.
MxBool GetBackBuffers()
[AI] Get whether back buffering (double buffering) is enabled.
[AI] Video parameter configuration for display and rendering, encapsulates resolution,...
void SetBackBuffers(MxU32 p_backBuffers)
[AI] Set the desired number of backbuffers (triple/double buffering).
MxU32 GetBackBuffers()
[AI] Get the number of backbuffers requested for this display mode.
MxVideoParamFlags & Flags()
[AI] Access the video parameter flags (windowed/fullscreen, rendering mode, etc).
MxRect32 & GetRect()
[AI] Get the rectangle specifying the display dimensions and screen area.
struct _DDSURFACEDESC FAR * LPDDSURFACEDESC
struct IDirectDrawClipper FAR * LPDIRECTDRAWCLIPPER
struct IDirectDrawSurface FAR * LPDIRECTDRAWSURFACE
#define DDSCAPS_PRIMARYSURFACE
#define DDERR_SURFACELOST
struct _DDSURFACEDESC DDSURFACEDESC
#define DDSCAPS_OFFSCREENPLAIN
#define DDPF_PALETTEINDEXED8
#define DDSCAPS_BACKBUFFER
struct IDirectDraw FAR * LPDIRECTDRAW
#define DDSCAPS_VIDEOMEMORY
#define DDSCAPS_SYSTEMMEMORY
#define DDSD_BACKBUFFERCOUNT
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
#define GetAdjustedStride(p_bitmap)
#define MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
#define RGB555_CREATE(R, G, B)
void DeleteObject(MxDSAction &p_dsAction)
[AI] Deletes the specified action object, removing it from the global action list.
MxVideoManager * MVideoManager()
[AI] Returns the video manager used for video/cutscene presenter management.
MxBool GetRectIntersection(MxS32 p_rect1Width, MxS32 p_rect1Height, MxS32 p_rect2Width, MxS32 p_rect2Height, MxS32 *p_rect1Left, MxS32 *p_rect1Top, MxS32 *p_rect2Left, MxS32 *p_rect2Top, MxS32 *p_width, MxS32 *p_height)
Computes intersection of two rectangles and modifies their positions and dimensions to the intersecti...
DWORD dwColorSpaceHighValue
DWORD dwColorSpaceLowValue
DDPIXELFORMAT ddpfPixelFormat