Isle
Loading...
Searching...
No Matches
mxmusicpresenter.cpp
Go to the documentation of this file.
1#include "mxmusicpresenter.h"
2
3#include "decomp.h"
4#include "mxmisc.h"
5#include "mxmusicmanager.h"
6
8
9// FUNCTION: LEGO1 0x100c22c0
11{
12 Init();
13}
14
15// FUNCTION: LEGO1 0x100c24e0
17{
19}
20
21// FUNCTION: LEGO1 0x100c2540
22void MxMusicPresenter::Init()
23{
24}
25
26// FUNCTION: LEGO1 0x100c2550
27void MxMusicPresenter::Destroy(MxBool p_fromDestructor)
28{
29 if (MusicManager()) {
31 }
32
34 Init();
36
37 if (!p_fromDestructor) {
39 }
40}
41
42// FUNCTION: LEGO1 0x100c25a0
44{
45 MxResult result = FAILURE;
46
47 if (MusicManager()) {
48 result = SUCCESS;
50 }
51
52 return result;
53}
54
55// FUNCTION: LEGO1 0x100c25d0
57{
59}
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.
virtual void RegisterPresenter(MxPresenter &p_presenter)
[AI] Register a new presenter for tickle management and playback coordination.
virtual void UnregisterPresenter(MxPresenter &p_presenter)
[AI] Remove a presenter from tickle and managed output lists.
void Destroy() override
[AI] Cleans up internal resources and resets the presenter to an uninitialized state.
[AI] Presenter class that handles playback and management of music (streamed or MIDI) in LEGO Island.
MxResult AddToManager() override
[AI] Registers this music presenter with the MxMusicManager.
MxMusicPresenter()
[AI] Constructs and initializes the music presenter object.
~MxMusicPresenter() override
[AI] Destroys the music presenter instance and unregisters from the music manager.
void Destroy() override
[AI] Destroys this presenter, safely unregisters from music manager.
MxCriticalSection m_criticalSection
[AI] Thread synchronization for presenter state and data.
Definition: mxpresenter.h:214
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
Definition: legotypes.h:34
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30
MxMusicManager * MusicManager()
[AI] Returns the music manager, controlling playback of background music tracks.
Definition: mxmisc.cpp:81
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106