Isle
|
[AI] Presenter for single still image/bitmap media sources in the game. More...
#include <mxstillpresenter.h>
Public Member Functions | |
MxStillPresenter () | |
[AI] Constructs an MxStillPresenter. More... | |
~MxStillPresenter () override | |
[AI] Destructor—ensures resource cleanup of bitmap information and other associated memory. More... | |
void | Destroy () override |
[AI] Destroys the presenter's resources, optionally called by the destructor for complete cleanup. More... | |
const char * | ClassName () const override |
[AI] Returns the class name of this presenter type. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Run-time type check against the provided type name. More... | |
void | StartingTickle () override |
[AI] Handles transition to the starting state of the presenter, processing palette realization if needed. More... | |
void | StreamingTickle () override |
[AI] Main frame advancing logic, loads the next frame if the elapsed time is appropriate. More... | |
void | RepeatingTickle () override |
[AI] Repetition tickle logic—handles repeated action/time-based state changes. More... | |
void | ParseExtra () override |
[AI] Parses extra action data for bitmap configuration, such as visibility or image mapping, from the associated DSAction. More... | |
void | Enable (MxBool p_enable) override |
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as needed. More... | |
void | LoadHeader (MxStreamChunk *p_chunk) override |
[AI] Loads header chunk data into the presenter's bitmap info buffer (BITMAPINFO structure). More... | |
void | CreateBitmap () override |
[AI] Allocates and constructs the bitmap from internal bitmap info, importing palette and image layout information. More... | |
void | NextFrame () override |
[AI] Loads the next single image frame from the stream and updates the presenter's display state. More... | |
void | LoadFrame (MxStreamChunk *p_chunk) override |
[AI] Copies frame image data from chunk to presenter's bitmap and prepares for rendering, including palette and alpha mask if necessary. More... | |
void | RealizePalette () override |
[AI] Realizes/updates the palette in the current video environment using the frame bitmap and notifies the video manager. More... | |
virtual void | SetPosition (MxS32 p_x, MxS32 p_y) |
[AI] Sets the pixel-based position of the presented image. More... | |
virtual MxStillPresenter * | Clone () |
[AI] Clones the presenter, attempting to fully duplicate internal state and associated memory resources. More... | |
![]() | |
MxVideoPresenter () | |
Constructs a new MxVideoPresenter and initializes internal state. More... | |
virtual void | LoadHeader (MxStreamChunk *p_chunk) |
Loads and processes header information from a video stream chunk. More... | |
virtual void | CreateBitmap () |
Allocates and sets up the display bitmap for video frame data. More... | |
virtual void | NextFrame () |
Advances video playback to the next frame, handling decoding and playback progression. More... | |
virtual void | LoadFrame (MxStreamChunk *p_chunk) |
Loads and processes frame data from a video stream chunk. More... | |
virtual void | PutFrame () |
Presents the current frame using the chosen output mechanism (e.g., blitting to screen). More... | |
virtual void | RealizePalette () |
Loads or establishes the palette for display from the current video format or media. More... | |
virtual undefined | VTable0x74 () |
Unknown/potentially format-specific method (VTable0x74). More... | |
~MxVideoPresenter () override | |
Destroys the MxVideoPresenter, releasing owned resources and unregistering from the manager. More... | |
void | Destroy () override |
Destroys internal resources for the presenter. More... | |
virtual LPDIRECTDRAWSURFACE | VTable0x78 () |
Retrieves the DirectDraw surface used for hardware-accelerated rendering. More... | |
virtual MxBool | VTable0x7c () |
Checks if this presenter has either a video frame bitmap or alpha mask available. More... | |
virtual MxS32 | GetWidth () |
Returns the width of the current bitmap or alpha mask in pixels. More... | |
virtual MxS32 | GetHeight () |
Returns the height of the current bitmap or alpha mask in pixels. More... | |
const char * | ClassName () const override |
Returns the run-time class name of this presenter instance. More... | |
MxBool | IsA (const char *p_name) const override |
Determines if this object is or derives from a class with the given name. More... | |
void | ReadyTickle () override |
Advance logic for the "ready" tickle state. More... | |
void | StartingTickle () override |
Advance logic for the "starting" tickle state (frame setup). More... | |
void | StreamingTickle () override |
Advance logic for the "streaming" tickle state (typical video playback). More... | |
void | RepeatingTickle () override |
Advance logic for the "repeating" tickle state (media looping). More... | |
void | FreezingTickle () override |
Advance logic for the "freezing" tickle state (sustain after playback). More... | |
MxResult | AddToManager () override |
Adds this presenter to the global video manager. More... | |
void | EndAction () override |
Signals the end of the current playback action. More... | |
MxResult | PutData () override |
Writes the frame to the display device if appropriate. More... | |
MxBool | IsHit (MxS32 p_x, MxS32 p_y) override |
Determines if a point is inside the non-transparent region of frame/alpha. More... | |
MxS32 | PrepareRects (RECT &p_rectDest, RECT &p_rectSrc) |
Utility function to adjust source/dest rectangles to stay within allowed bounds. More... | |
MxBitmap * | GetBitmap () |
Returns the frame bitmap currently used for this presenter. More... | |
AlphaMask * | GetAlphaMask () |
Returns this presenter's alpha mask for hit testing. More... | |
MxU8 * | GetBitmapStart (MxS32 p_left, MxS32 p_top) |
Provides a pointer to the start of frame bitmap data at a given coordinate. More... | |
void | SetBit0 (BOOL p_e) |
Sets internal miscellaneous state flags. More... | |
void | SetBit1 (BOOL p_e) |
void | SetBit2 (BOOL p_e) |
void | SetBit3 (BOOL p_e) |
void | SetBit4 (BOOL p_e) |
BYTE | GetBit0 () |
Gets internal miscellaneous state flags (bits 0-4). More... | |
BYTE | GetBit1 () |
BYTE | GetBit2 () |
BYTE | GetBit3 () |
BYTE | GetBit4 () |
![]() | |
MxMediaPresenter () | |
[AI] Constructs the presenter, initializing all member variables. More... | |
~MxMediaPresenter () override | |
[AI] Destructor; cleans up and optionally destroys all internal resources as well as the MxDSSubscriber and chunk list/cursor. More... | |
void | Destroy () override |
[AI] Cleans up internal resources and resets the presenter to an uninitialized state. More... | |
MxResult | Tickle () override |
[AI] Advances the presenter's state and media stream, if any, by tickling (i.e., updating) components. More... | |
const char * | ClassName () const override |
[AI] Returns the class name for this presenter (see HandlerClassName()). More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Returns TRUE if the provided class name matches this class or any of its parents. More... | |
void | StreamingTickle () override |
[AI] Per-frame update when streaming the media stream. More... | |
void | RepeatingTickle () override |
[AI] Per-frame update while looping/repeating over known chunks. More... | |
void | DoneTickle () override |
[AI] Per-frame update for the "done" state; transitions this presenter to idle and ends the action. More... | |
MxResult | StartAction (MxStreamController *, MxDSAction *) override |
[AI] Begins a new media playback action, wiring up the stream and chunk lists as needed. More... | |
void | EndAction () override |
[AI] Ends the media playback action, releasing all resources, notifying listeners if necessary. More... | |
void | Enable (MxBool p_enable) override |
[AI] Enables or disables media stream playback and transitions state as needed. More... | |
virtual void | LoopChunk (MxStreamChunk *p_chunk) |
[AI] Adds a chunk to the looping chunk list, making it available for repeated playback. More... | |
MxStreamChunk * | CurrentChunk () |
[AI] Returns a pointer to the current data chunk at the head of the stream, without consuming it. More... | |
MxStreamChunk * | NextChunk () |
[AI] Returns the next data chunk in the stream, removing it from the stream queue. More... | |
![]() | |
MxPresenter () | |
[AI] Constructor. Initializes internal tickle state and other members. More... | |
MxResult | Tickle () override |
[AI] Main tickle handler, called periodically to progress presenter's internal state. More... | |
virtual void | VTable0x14 () |
[AI] Reserved for future or specialized use in derived classes. More... | |
virtual void | ReadyTickle () |
[AI] Handles the transition and setup for the Ready state. Parses extra action data and advances state. More... | |
virtual void | StartingTickle () |
[AI] Handles actions required when first starting presentation. Advances to streaming state. More... | |
virtual void | StreamingTickle () |
[AI] Handles periodic updates during the streaming/presentation stage. Advances to repeating state. More... | |
virtual void | RepeatingTickle () |
[AI] Handles updates when in a repeating (looping) stage. Advances to freezing state. More... | |
virtual void | FreezingTickle () |
[AI] Handles updates during the freezing/suspended state. Advances to done state. More... | |
~MxPresenter () override | |
[AI] Destructor, cleans up resources (base class: does nothing beyond Init). More... | |
virtual MxResult | AddToManager () |
[AI] Optional registration with a manager (such as TickleManager); by default does nothing. More... | |
virtual void | Destroy () |
[AI] Resets presenter state or cleans up resources after completion/removal. More... | |
virtual MxResult | StartAction (MxStreamController *, MxDSAction *) |
[AI] Initiates presenter for a new action, setting up context and state. More... | |
virtual void | EndAction () |
[AI] Terminates the current action, notifies listeners and resets state. More... | |
virtual void | SetTickleState (TickleState p_tickleState) |
[AI] Forces the tickle state, advancing to the requested lifecycle stage. More... | |
virtual MxBool | HasTickleStatePassed (TickleState p_tickleState) |
[AI] Checks if the specified tickle state has ever been passed since last reset. More... | |
virtual MxResult | PutData () |
[AI] Allows the presenter to submit pending results or output to the engine. More... | |
virtual MxBool | IsHit (MxS32 p_x, MxS32 p_y) |
[AI] Returns TRUE if the given (x, y) falls within hit-test bounds for the presenter (e.g. More... | |
virtual void | Enable (MxBool p_enable) |
[AI] Enables or disables this presenter (controls action flags accordingly). More... | |
const char * | ClassName () const override |
[AI] Returns the run-time class name for this presenter. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Determines if this object is of (or inherits) the specified named class. More... | |
MxEntity * | CreateEntity (const char *p_defaultName) |
[AI] Creates an entity based on action 'extra' data, or uses the provided default name. More... | |
void | SendToCompositePresenter (MxOmni *p_omni) |
[AI] Notifies a composite presenter (if one exists) that this presenter wishes to join a group. More... | |
MxBool | IsEnabled () |
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags). More... | |
MxS32 | GetCurrentTickleState () const |
[AI] Returns the current tickle state. More... | |
MxPoint32 | GetLocation () const |
[AI] Returns the presenter's screen location (in pixels). More... | |
MxS32 | GetX () const |
[AI] Returns the X coordinate of screen location. More... | |
MxS32 | GetY () const |
[AI] Returns the Y coordinate of screen location. More... | |
MxS32 | GetDisplayZ () const |
[AI] Returns the display Z (depth) order. More... | |
MxDSAction * | GetAction () const |
[AI] Returns the current action being presented. More... | |
void | SetAction (MxDSAction *p_action) |
[AI] Sets the action associated with this presenter. More... | |
void | SetCompositePresenter (MxCompositePresenter *p_compositePresenter) |
[AI] Sets the composite presenter to notify/join on completion. More... | |
void | SetDisplayZ (MxS32 p_displayZ) |
[AI] Sets the display Z (depth) order for the presenter. 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 const char * | HandlerClassName () |
[AI] Returns the handler class name string for this Presenter type ("MxStillPresenter"). More... | |
![]() | |
static const char * | HandlerClassName () |
Returns the class name string for this presenter type. More... | |
![]() | |
static const char * | HandlerClassName () |
[AI] Gets the class name string for handler dispatch and RTTI emulation. More... | |
![]() | |
static const char * | HandlerClassName () |
[AI] Returns the handler class name for identification and reflection purposes. More... | |
Additional Inherited Members | |
![]() | |
enum | TickleState { e_idle = 0 , e_ready , e_starting , e_streaming , e_repeating , e_freezing , e_done } |
[AI] Represents the state of the presenter's tickle (update) lifecycle. More... | |
![]() | |
void | Destroy (MxBool p_fromDestructor) |
Releases resources and unregisters presenter from the video manager. More... | |
![]() | |
void | Init () |
[AI] Initializes all member variables to a known default state (NULL pointers, etc). More... | |
void | Destroy (MxBool p_fromDestructor) |
[AI] Frees all managed resources, owned memory and pointers, optionally preventing destruction of the base class. More... | |
![]() | |
virtual void | DoneTickle () |
[AI] Handles any post-completion logic, resetting to idle state. More... | |
virtual void | ParseExtra () |
[AI] Parses additional data from the associated action for configuration or world interaction. More... | |
void | ProgressTickleState (TickleState p_tickleState) |
[AI] Helper for advancing the presenter's tickle state and updating transition history. More... | |
void | Init () |
[AI] Initializes object state to post-construction defaults. More... | |
![]() | |
MxBitmap * | m_frameBitmap |
Bitmap for current video frame. [AI]. More... | |
AlphaMask * | m_alpha |
Alpha mask for hit testing. May be null. [AI]. More... | |
LPDIRECTDRAWSURFACE | m_unk0x58 |
DirectDraw surface for hardware video rendering. [AI]. More... | |
MxS16 | m_unk0x5c |
Loop/advance/frame decode counter. [AI]. More... | |
FlagBitfield | m_flags |
Miscellaneous flags for object and UI state. [AI]. More... | |
MxLong | m_unk0x60 |
Last freeze time/start of sustain interval. [AI]. More... | |
![]() | |
MxDSSubscriber * | m_subscriber |
[AI] Subscriber that provides the stream data (e.g., audio/video chunks) for this presenter. More... | |
MxStreamChunkList * | m_loopingChunks |
[AI] Linked list of all chunks available for looping/repeating playback. More... | |
MxStreamChunkListCursor * | m_loopingChunkCursor |
[AI] Cursor used to iterate through the loopingChunk list during repeat mode. More... | |
MxStreamChunk * | m_currentChunk |
[AI] Currently active data chunk for playback or processing. More... | |
![]() | |
TickleState | m_currentTickleState |
[AI] Current state in the tickle lifecycle. More... | |
MxU32 | m_previousTickleStates |
[AI] Bitfield representing all tickle states that have already occurred during this lifetime. More... | |
MxPoint32 | m_location |
[AI] 2D display location for the presenter. More... | |
MxS32 | m_displayZ |
[AI] Z-order value for display stacking. More... | |
MxDSAction * | m_action |
[AI] The associated action currently being presented by this presenter. More... | |
MxCriticalSection | m_criticalSection |
[AI] Thread synchronization for presenter state and data. More... | |
MxCompositePresenter * | m_compositePresenter |
[AI] Owner composite presenter, if any. More... | |
[AI] Presenter for single still image/bitmap media sources in the game.
Handles loading, creating, and rendering bitmap images and their palettes, supporting positioning and visibility.
[AI] MxStillPresenter is responsible for displaying and managing still images within the Lego Island engine. It manages the memory and presentation pipeline for single frame image data, providing bitmap and palette management, rendering area invalidation, and configuration through action extra data.
Definition at line 14 of file mxstillpresenter.h.
|
inline |
[AI] Constructs an MxStillPresenter.
Initializes m_bitmapInfo pointer to NULL.
Definition at line 19 of file mxstillpresenter.h.
|
inlineoverride |
[AI] Destructor—ensures resource cleanup of bitmap information and other associated memory.
Definition at line 24 of file mxstillpresenter.h.
|
inlineoverridevirtual |
[AI] Returns the class name of this presenter type.
Used for run-time type identification.
Reimplemented from MxMediaPresenter.
Definition at line 45 of file mxstillpresenter.h.
|
virtual |
[AI] Clones the presenter, attempting to fully duplicate internal state and associated memory resources.
Definition at line 227 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Allocates and constructs the bitmap from internal bitmap info, importing palette and image layout information.
Reimplemented from MxVideoPresenter.
Definition at line 47 of file mxstillpresenter.cpp.
|
inlineoverridevirtual |
[AI] Destroys the presenter's resources, optionally called by the destructor for complete cleanup.
Reimplemented from MxMediaPresenter.
Definition at line 29 of file mxstillpresenter.h.
|
overridevirtual |
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as needed.
p_enable | [AI] TRUE to enable, FALSE to disable the presenter (visibility). |
Reimplemented from MxMediaPresenter.
Definition at line 176 of file mxstillpresenter.cpp.
|
inlinestatic |
[AI] Returns the handler class name string for this Presenter type ("MxStillPresenter").
Definition at line 35 of file mxstillpresenter.h.
|
inlineoverridevirtual |
[AI] Run-time type check against the provided type name.
Compares to MxStillPresenter, and if not matching, delegates to MxVideoPresenter.
p_name | [AI] Class name to check identity against. |
Reimplemented from MxMediaPresenter.
Definition at line 55 of file mxstillpresenter.h.
|
overridevirtual |
[AI] Copies frame image data from chunk to presenter's bitmap and prepares for rendering, including palette and alpha mask if necessary.
p_chunk | [AI] Stream chunk containing the image/frame pixel data. |
Reimplemented from MxVideoPresenter.
Definition at line 69 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Loads header chunk data into the presenter's bitmap info buffer (BITMAPINFO structure).
p_chunk | [AI] Stream chunk containing header/bitmap metadata. |
Reimplemented from MxVideoPresenter.
Definition at line 35 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Loads the next single image frame from the stream and updates the presenter's display state.
Reimplemented from MxVideoPresenter.
Definition at line 61 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Parses extra action data for bitmap configuration, such as visibility or image mapping, from the associated DSAction.
Reimplemented from MxPresenter.
Definition at line 194 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Realizes/updates the palette in the current video environment using the frame bitmap and notifies the video manager.
Reimplemented from MxVideoPresenter.
Definition at line 107 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Repetition tickle logic—handles repeated action/time-based state changes.
Reimplemented from MxMediaPresenter.
Definition at line 141 of file mxstillpresenter.cpp.
[AI] Sets the pixel-based position of the presented image.
Invalidate and update the required screen regions in the video manager when enabled.
p_x | [AI] The new X coordinate for the image region's top-left corner. |
p_y | [AI] The new Y coordinate for the image region's top-left corner. |
Definition at line 152 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Handles transition to the starting state of the presenter, processing palette realization if needed.
Reimplemented from MxPresenter.
Definition at line 115 of file mxstillpresenter.cpp.
|
overridevirtual |
[AI] Main frame advancing logic, loads the next frame if the elapsed time is appropriate.
Reimplemented from MxMediaPresenter.
Definition at line 125 of file mxstillpresenter.cpp.