81 if (!p_fromDestructor) {
118 for (
MxU32 i = count; i != 0; i--) {
130 }
while (!finished && --count != 0);
190 if (p_createThread) {
268 if (p_createThread) {
322 while (cursor.
Next(presenter)) {
328 while (cursor.
Next(presenter)) {
341 PALETTEENTRY paletteEntries[256];
void Enter()
[AI] Acquires/gains entry to the critical section or mutex, blocking if not available.
void Leave()
[AI] Releases/leaves the critical section or mutex.
Provides a DirectDraw-based drawing surface for blitting bitmaps, managing palette,...
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.
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,...
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 SetValue(T p_obj)
[AI]
MxU32 GetNumElements()
[AI]
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.
MxResult SetEntries(LPPALETTEENTRY p_palette)
[AI] Sets the palette's RGB entries from an external array and updates the DirectDraw palette if atta...
MxPalette * Clone()
[AI] Creates a duplicate of this palette object with the same palette data and override flag.
MxResult GetEntries(LPPALETTEENTRY p_entries)
[AI] Copies all palette entries to external buffer.
[AI] Cursor/iterator for traversing an MxPresenterList.
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
virtual MxResult PutData()
[AI] Allows the presenter to submit pending results or output to the engine.
MxResult Tickle() override
[AI] Main tickle handler, called periodically to progress presenter's internal state.
MxS32 GetDisplayZ() const
[AI] Returns the display Z (depth) order.
[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] Represents a 2D region as a set of vertical spans each containing one or more horizontal segment...
virtual void Reset()
[AI] Removes all spans and resets the bounding rectangle to an empty state.
MxRect32 & GetBoundingRect()
[AI] Returns a reference to the current bounding rectangle for the region.
virtual void AddRect(MxRect32 &p_rect)
[AI] Adds a rectangle to this region, merging or splitting spans and segments as necessary.
virtual MxBool IsEmpty()
[AI] Returns TRUE if the region contains zero spans (i.e., is empty).
void Terminate()
[AI] Signals the thread to terminate.
MxResult Start(MxS32 p_stackSize, MxS32 p_flag)
[AI] Starts the thread with a given stack size and creation flags.
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
virtual void RegisterClient(MxCore *p_client, MxTime p_interval)
[AI] Registers an MxCore object to receive periodic tickles.
MxTickleThread periodically calls Tickle() on a target MxCore object in a separate thread.
[AI] Video subsystem manager for DirectDraw/Direct3D video rendering and presenter control.
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....
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....
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]
void SortPresenterList()
[AI] Sorts presenters in descending Z order for proper overdraw order during tickle (bubble-sort).
[AI] Video parameter configuration for display and rendering, encapsulates resolution,...
void SetPalette(MxPalette *p_palette)
[AI] Assign the palette pointer (color indexing) for the video mode.
MxPalette * GetPalette()
[AI] Get the palette used for rendering (may be NULL if not set).
MxRect32 & GetRect()
[AI] Get the rectangle specifying the display dimensions and screen area.
struct IDirect3D2 * LPDIRECT3D2
struct IDirectDrawClipper FAR * LPDIRECTDRAWCLIPPER
struct IDirectDrawSurface FAR * LPDIRECTDRAWSURFACE
struct IDirectDraw FAR * LPDIRECTDRAW
#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 AUTOLOCK(CS)
[AI] Macro for automatic locking using the MxAutoLock class. This macro instantiates an MxAutoLock ob...
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.