Isle
Loading...
Searching...
No Matches
MxTransitionManager Class Reference

[AI] Handles screen transitions and animations (such as dissolve, mosaic, wipe, etc.) between scenes or active states. More...

#include <mxtransitionmanager.h>

Inheritance diagram for MxTransitionManager:
Collaboration diagram for MxTransitionManager:

Public Types

enum  TransitionType {
  e_idle = 0 , e_noAnimation , e_dissolve , e_mosaic ,
  e_wipeDown , e_windows , e_broken
}
 [AI] Enumerates all supported transition effect types. More...
 

Public Member Functions

 MxTransitionManager ()
 [AI] Initializes MxTransitionManager and resets all transition states and working buffers. More...
 
 ~MxTransitionManager () override
 [AI] Cleans up resources for the transition manager, deletes animation memory, notifies tickle manager, and removes wait indicator if present. More...
 
void SetWaitIndicator (MxVideoPresenter *p_waitIndicator)
 [AI] Sets or resets the visual wait indicator presented during blocking transitions. More...
 
MxResult Tickle () override
 [AI] Performs per-frame advancement of the current transition animation, advancing its state if necessary and drawing frames. More...
 
const char * ClassName () const override
 [AI] Returns the class name of this object. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Determines if the class name matches with this type or its parents. More...
 
virtual MxResult GetDDrawSurfaceFromVideoManager ()
 [AI] Retrieves the primary DirectDraw surface to render transitions onto, querying via the video manager. More...
 
MxResult StartTransition (TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim)
 [AI] Begins a new transition animation of type p_animationType at the specified speed, optionally copying the wait indicator, and managing audio appropriately. More...
 
TransitionType GetTransitionType ()
 [AI] Returns the currently active transition type. More...
 
- Public Member Functions inherited from MxCore
 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...
 

Detailed Description

[AI] Handles screen transitions and animations (such as dissolve, mosaic, wipe, etc.) between scenes or active states.

[AI] MxTransitionManager manages visual transition effects in LEGO Island, coordinating animation speed, screen buffer management, integration with DirectDraw surfaces, and handling notification to relevant world objects when transitions complete. It also manages wait indicators and controls interplay between game logic, audio, and rendering during complex state changes. Handles session-level singleton transition animations while maintaining the effect's operational state and the associated temporary resources.

Definition at line 13 of file mxtransitionmanager.h.

Member Enumeration Documentation

◆ TransitionType

[AI] Enumerates all supported transition effect types.

Enumerator
e_idle 

[AI] No transition is active.

e_noAnimation 

[AI] Instant clear/fill screen, no animated effect.

e_dissolve 

[AI] Black "pixels" dissolve across the screen in random order.

e_mosaic 

[AI] Complex mosaic block-out effect.

e_wipeDown 

[AI] Vertical wipe (top-down) fill.

e_windows 

[AI] Animated shrinking "window" effect from full screen edges inward.

e_broken 

[AI] Invalid/buggy mode, causes hang, used for diagnostics or internal testing.

Definition at line 49 of file mxtransitionmanager.h.

Constructor & Destructor Documentation

◆ MxTransitionManager()

MxTransitionManager::MxTransitionManager ( )

[AI] Initializes MxTransitionManager and resets all transition states and working buffers.

Definition at line 21 of file mxtransitionmanager.cpp.

◆ ~MxTransitionManager()

MxTransitionManager::~MxTransitionManager ( )
override

[AI] Cleans up resources for the transition manager, deletes animation memory, notifies tickle manager, and removes wait indicator if present.

Definition at line 34 of file mxtransitionmanager.cpp.

Member Function Documentation

◆ ClassName()

const char * MxTransitionManager::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the class name of this object.

Returns
The class name string "MxTransitionManager". [AI]

Reimplemented from MxCore.

Definition at line 31 of file mxtransitionmanager.h.

◆ GetDDrawSurfaceFromVideoManager()

MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager ( )
virtual

[AI] Retrieves the primary DirectDraw surface to render transitions onto, querying via the video manager.

[AI] Called at the start of transitions to ensure the correct DirectDraw surface-vram pointer is acquired/locked. [AI]

Definition at line 47 of file mxtransitionmanager.cpp.

◆ GetTransitionType()

TransitionType MxTransitionManager::GetTransitionType ( )
inline

[AI] Returns the currently active transition type.

Definition at line 68 of file mxtransitionmanager.h.

◆ IsA()

MxBool MxTransitionManager::IsA ( const char *  p_name) const
inlineoverridevirtual

[AI] Determines if the class name matches with this type or its parents.

Parameters
p_nameThe class name to check [AI]
Returns
TRUE if the class name matches (directly or by inheritance) [AI]

Reimplemented from MxCore.

Definition at line 39 of file mxtransitionmanager.h.

◆ SetWaitIndicator()

void MxTransitionManager::SetWaitIndicator ( MxVideoPresenter p_waitIndicator)

[AI] Sets or resets the visual wait indicator presented during blocking transitions.

Parameters
p_waitIndicatorThe new wait indicator (usually a movie clip such as a spinning brick) [AI]

Definition at line 473 of file mxtransitionmanager.cpp.

◆ StartTransition()

MxResult MxTransitionManager::StartTransition ( TransitionType  p_animationType,
MxS32  p_speed,
MxBool  p_doCopy,
MxBool  p_playMusicInAnim 
)

[AI] Begins a new transition animation of type p_animationType at the specified speed, optionally copying the wait indicator, and managing audio appropriately.

Parameters
p_animationTypeWhich transition style/animation to use [AI]
p_speedDelay between animation frames, in ms (lower=faster) [AI]
p_doCopyIf TRUE, the wait indicator is visually presented/copied-on [AI]
p_playMusicInAnimIf TRUE, music continues, otherwise is stopped during animation [AI]
Returns
SUCCESS if started, FAILURE if already busy [AI]

Definition at line 89 of file mxtransitionmanager.cpp.

◆ Tickle()

MxResult MxTransitionManager::Tickle ( )
overridevirtual

[AI] Performs per-frame advancement of the current transition animation, advancing its state if necessary and drawing frames.

[AI] Called by the tickle system; executes one increment of the active transition effect and manages notification, redraw and resource. If animation is complete, cleans up. [AI]

Reimplemented from MxCore.

Definition at line 55 of file mxtransitionmanager.cpp.


The documentation for this class was generated from the following files: