1#ifndef MXVIDEOMANAGER_H
2#define MXVIDEOMANAGER_H
Provides a DirectDraw-based drawing surface for blitting bitmaps, managing palette,...
[AI] Encapsulates a DirectDraw 8-bit (256 color) palette for use with DirectX rendering.
[AI] Rectangle using 32-bit signed integer coordinates.
[AI] Represents a 2D region as a set of vertical spans each containing one or more horizontal segment...
[AI] Video subsystem manager for DirectDraw/Direct3D video rendering and presenter control.
MxRegion * GetRegion()
[AI] Gets region-tracking structure managing currently invalidated rectangles.
MxResult Tickle() override
[AI] Runs the per-frame tick/update including presenter tickle, surface update, and region display.
virtual MxResult VTable0x28(MxVideoParam &p_videoParam, LPDIRECTDRAW p_pDirectDraw, LPDIRECT3D2 p_pDirect3D, LPDIRECTDRAWSURFACE p_ddSurface1, LPDIRECTDRAWSURFACE p_ddSurface2, LPDIRECTDRAWCLIPPER p_ddClipper, MxU32 p_frequencyMS, MxBool p_createThread)
[AI] Main DirectDraw/Direct3D allocator and presenter chain creation.
LPDIRECT3D2 m_pDirect3D
[AI] Direct3D2 interface pointer, for 3D presentation and device context. [0x54]
MxResult Init()
[AI] Initializes video resources and zeros pointers for this manager.
virtual MxResult RealizePalette(MxPalette *p_palette)
[AI] Applies (realizes) the palette to both MxVideoParam and hardware palette, and updates the displa...
virtual void UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
[AI] Updates the visible video sub-rectangle inside the overall frame; typically for sub-region blits...
void UpdateRegion()
[AI] Updates the portion of the display surface that is marked dirty based on m_region,...
MxBool m_unk0x60
[AI] TRUE if manager owns the DirectDraw/Direct3D objects and should release them; FALSE if external....
LPDIRECTDRAW GetDirectDraw()
[AI] Returns the current DirectDraw COM interface managed by this class (may be owned or external).
void InvalidateRect(MxRect32 &p_rect)
[AI] Invalidates a rectangular region in the display; marks it for redraw on next tick.
void Destroy() override
[AI] Releases all display/video resources, any DirectDraw/Direct3D handles, and associated objects.
~MxVideoManager() override
[AI] Destructor; cleans up all allocated resources (DirectDraw, display surface, etc....
MxVideoParam m_videoParam
[AI] Video configuration, containing palette, source/dest rectangles, and other state....
MxVideoParam & GetVideoParam()
[AI] Retrieves the current video parameter configuration used by this manager.
MxRegion * m_region
[AI] Tracks regions that have been invalidated and need to be updated/redrawn. [0x5c]
MxDisplaySurface * m_displaySurface
[AI] Concrete blitting/output surface where final image is copied each frame. [0x58]
LPDIRECTDRAW m_pDirectDraw
[AI] DirectDraw interface pointer. May be allocated here, or passed in/injected. [0x50]
MxVideoManager()
[AI] Constructs a new MxVideoManager and initializes resources.
void SortPresenterList()
[AI] Sorts presenters in descending Z order for proper overdraw order during tickle (bubble-sort).
MxDisplaySurface * GetDisplaySurface()
[AI] Returns the display surface used for video output; for direct drawing and palette operations.
[AI] Video parameter configuration for display and rendering, encapsulates resolution,...
struct IDirect3D2 * LPDIRECT3D2
struct IDirectDrawClipper FAR * LPDIRECTDRAWCLIPPER
struct IDirectDrawSurface FAR * LPDIRECTDRAWSURFACE
struct IDirectDraw FAR * LPDIRECTDRAW