Isle
|
Provides a DirectDraw-based drawing surface for blitting bitmaps, managing palette, and screen updates. More...
#include <mxdisplaysurface.h>
Public Member Functions | |
MxDisplaySurface () | |
[AI] Constructs the display surface and initializes all members. More... | |
~MxDisplaySurface () override | |
[AI] Destroys the display surface and releases DirectDraw objects and resources. More... | |
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, and a clipper. More... | |
virtual MxResult | Create (MxVideoParam &p_videoParam) |
[AI] Creates DirectDraw surfaces and initializes based on the desired video mode. More... | |
virtual void | Destroy () |
[AI] Releases all DirectDraw surfaces and resources held by this object. More... | |
virtual void | SetPalette (MxPalette *p_palette) |
[AI] Sets the palette used for the primary and secondary DirectDraw surfaces. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | GetDC (HDC *p_hdc) |
[AI] Acquires a Win32 device context (DC) for the back buffer surface, for GDI drawing. More... | |
virtual void | ReleaseDC (HDC p_hdc) |
[AI] Releases a device context (DC) previously acquired for the back surface. More... | |
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. More... | |
void | ClearScreen () |
[AI] Fills the current back buffer with black (clears the display area). [AI] More... | |
LPDIRECTDRAWSURFACE | GetDirectDrawSurface1 () |
[AI] Returns the primary DirectDraw surface (front buffer). More... | |
LPDIRECTDRAWSURFACE | GetDirectDrawSurface2 () |
[AI] Returns the secondary DirectDraw surface (back buffer). More... | |
MxVideoParam & | GetVideoParam () |
[AI] Gets the video parameter configuration (mode/resolution/etc) in use by this surface. More... | |
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. More... | |
LPDIRECTDRAWSURFACE | FUN_100bc8b0 (MxS32 width, MxS32 height) |
[AI] Creates a 16-bit DirectDraw surface of specified size, either in video or system memory. More... | |
![]() | |
MxCore () | |
[AI] Constructs a new MxCore object and assigns it a unique id. More... | |
virtual | ~MxCore () |
[AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
virtual MxLong | Notify (MxParam &p_param) |
[AI] Virtual callback notification mechanism. More... | |
virtual MxResult | Tickle () |
[AI] Called by tickle managers to allow the object to update itself. More... | |
virtual const char * | ClassName () const |
[AI] Returns the runtime class name of this object. More... | |
virtual MxBool | IsA (const char *p_name) const |
[AI] Checks whether this object's class type or parents match the given name. More... | |
MxU32 | GetId () |
[AI] Gets the unique (per-process) id assigned to this object instance. More... | |
Static Public Member Functions | |
static LPDIRECTDRAWSURFACE | CreateCursorSurface () |
[AI] Creates and draws a 16x16 cursor DirectDraw surface. More... | |
static LPDIRECTDRAWSURFACE | CopySurface (LPDIRECTDRAWSURFACE p_src) |
[AI] Creates a deep copy of the provided surface (new DirectDraw surface with same content). More... | |
Provides a DirectDraw-based drawing surface for blitting bitmaps, managing palette, and screen updates.
[AI]
[AI] This class manages the primary and secondary DirectDraw surfaces for the purpose of rendering game frames, copying bitmaps, handling palette changes, managing double buffering, and supporting transparent RLE bitmap blits. It works alongside MxVideoParam for resolution, flipping, palette, and fullscreen/window handling. [AI] []
Definition at line 19 of file mxdisplaysurface.h.
MxDisplaySurface::MxDisplaySurface | ( | ) |
[AI] Constructs the display surface and initializes all members.
Definition at line 22 of file mxdisplaysurface.cpp.
|
override |
[AI] Destroys the display surface and releases DirectDraw objects and resources.
Definition at line 28 of file mxdisplaysurface.cpp.
void MxDisplaySurface::ClearScreen | ( | ) |
[AI] Fills the current back buffer with black (clears the display area). [AI]
Definition at line 45 of file mxdisplaysurface.cpp.
|
static |
[AI] Creates a deep copy of the provided surface (new DirectDraw surface with same content).
[AI]
p_src | Source DirectDraw surface to copy. [AI] |
Definition at line 1036 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Creates DirectDraw surfaces and initializes based on the desired video mode.
[AI]
p_videoParam | Video parameters describing target video mode and properties. [AI] |
Definition at line 140 of file mxdisplaysurface.cpp.
|
static |
[AI] Creates and draws a 16x16 cursor DirectDraw surface.
[AI]
Definition at line 1062 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Releases all DirectDraw surfaces and resources held by this object.
Definition at line 252 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Presents the back buffer contents to the front buffer or window.
[AI]
p_left/p_top | Source rectangle. [AI] |
p_left2/p_top2 | Destination rectangle (windowed mode). [AI] |
p_width/p_height | Size of area to copy or flip. [AI] |
Definition at line 824 of file mxdisplaysurface.cpp.
void MxDisplaySurface::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.
[AI]
p_bitmapData | Current position in the RLE-compressed bitmap data. [AI] |
p_surfaceData | Target point in destination surface memory. [AI] |
p_bitmapSize | Total size in bytes of the bitmap data. [AI] |
p_width/p_height | Size of area to draw. [AI] |
p_pitch | Surface pitch (bytes per row). [AI] |
p_bpp | Bits per pixel for output surface. [AI] |
Definition at line 599 of file mxdisplaysurface.cpp.
LPDIRECTDRAWSURFACE MxDisplaySurface::FUN_100bc8b0 | ( | MxS32 | width, |
MxS32 | height | ||
) |
[AI] Creates a 16-bit DirectDraw surface of specified size, either in video or system memory.
width | Surface width. [AI] |
height | Surface height. [AI] |
Definition at line 1372 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Acquires a Win32 device context (DC) for the back buffer surface, for GDI drawing.
[AI]
p_hdc | Output pointer for the device context handle. [AI] |
Definition at line 875 of file mxdisplaysurface.cpp.
|
inline |
[AI] Returns the primary DirectDraw surface (front buffer).
Definition at line 178 of file mxdisplaysurface.h.
|
inline |
[AI] Returns the secondary DirectDraw surface (back buffer).
Definition at line 181 of file mxdisplaysurface.h.
|
inline |
[AI] Gets the video parameter configuration (mode/resolution/etc) in use by this surface.
Definition at line 184 of file mxdisplaysurface.h.
|
virtual |
[AI] Initializes the surface object with given video parameters, DirectDraw surfaces, and a clipper.
p_videoParam | Video parameters describing resolution, bitdepth, and flags. [AI] |
p_ddSurface1 | Primary DirectDraw surface, typically the front buffer. [AI] |
p_ddSurface2 | Secondary DirectDraw surface, typically the back buffer. [AI] |
p_ddClipper | Window clipper for drawing in windowed mode. [AI] |
Definition at line 114 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Releases a device context (DC) previously acquired for the back surface.
[AI]
p_hdc | The device context handle to release. [AI] |
Definition at line 885 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Sets the palette used for the primary and secondary DirectDraw surfaces.
p_palette | Palette object containing hardware palette entries. [AI] |
[AI] This also handles internally converting the palette for 16-bit display modes. [AI]
Definition at line 277 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Draws a bitmap onto a surface described by p_desc, scaling to the specified rectangle.
[AI]
p_desc | Surface description (mostly used for fast access to the raw buffer). [AI] |
p_bitmap | The bitmap to draw. [AI] |
p_left/p_top/p_right/p_bottom | Rectangle in surface coordinates to draw into. [AI] |
p_width/p_height | The area width/height to draw. [AI] |
Definition at line 1142 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Draws a bitmap onto the back surface, specified by coordinates and output size.
[AI]
p_bitmap | The bitmap to be drawn. [AI] |
p_left/p_top/p_right/p_bottom | Surface destination rectangle. [AI] |
p_width/p_height | The width and height to draw. [AI] |
Definition at line 334 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Draws a bitmap with optional transparency (RLE) onto the output surface.
[AI]
p_desc | Surface description for output. [AI] |
p_bitmap | Bitmap source. [AI] |
p_left/p_top/p_right/p_bottom | Output rectangle in surface coordinates. [AI] |
p_width/p_height | Area width/height to draw. [AI] |
p_RLE | If TRUE, treat as RLE-style transparency. [AI] |
Definition at line 1291 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Draws a bitmap with optional transparency (RLE), outputting to active back surface.
[AI]
p_bitmap | Bitmap to be drawn. [AI] |
p_left/p_top/p_right/p_bottom | Output rectangle coordinates. [AI] |
p_width/p_height | Drawing size. [AI] |
p_RLE | If TRUE, apply RLE-based transparency algorithm. [AI] |
Definition at line 496 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Directly writes an array of pixel data into the back surface at the given rectangle.
[AI]
p_pixels | Source pixel data. [AI] |
p_bpp | Bits per pixel of source. [AI] |
p_width/p_height | Output rectangle in pixels. [AI] |
p_x/p_y | Destination position (top-left). [AI] |
Definition at line 754 of file mxdisplaysurface.cpp.
|
virtual |
[AI] Allocates a DirectDraw surface for a bitmap to allow hardware blitting/transparency.
[AI_SUGGESTED_NAME: AllocateBitmapSurface]
p_bitmap | Bitmap source. [AI] |
p_ret | Used as allocation flag; returned as a pointer to updated allocation status. [AI] |
p_doNotWriteToSurface | If set, surface is not filled (unsupported). [AI] |
p_transparent | Whether to use transparency/color key. [AI] |
Definition at line 894 of file mxdisplaysurface.cpp.