Isle
Loading...
Searching...
No Matches
jukebox.h
Go to the documentation of this file.
1#ifndef JUKEBOX_H
2#define JUKEBOX_H
3
4#include "decomp.h"
5#include "legogamestate.h"
6#include "legostate.h"
7#include "legoworld.h"
8
10
14class JukeBoxState : public LegoState {
15public:
17 enum Music {
24 };
25
28
30 MxBool IsSerializable() override { return FALSE; } // vtable+0x14
31
33 const char* ClassName() const override // vtable+0x0c
34 {
35 // STRING: LEGO1 0x100f02bc
36 return "JukeBoxState";
37 }
38
41 MxBool IsA(const char* p_name) const override // vtable+0x10
42 {
43 return !strcmp(p_name, JukeBoxState::ClassName()) || LegoState::IsA(p_name);
44 }
45
48};
49
53class JukeBox : public LegoWorld {
54public:
56 JukeBox();
57
59 ~JukeBox() override;
60
63 MxLong Notify(MxParam& p_param) override;
64
66 MxResult Tickle() override;
67
69 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
70
72 const char* ClassName() const override // vtable+0x0c
73 {
74 // STRING: LEGO1 0x100f02cc
75 return "JukeBox";
76 }
77
80 MxBool IsA(const char* p_name) const override // vtable+0x10
81 {
82 return !strcmp(p_name, JukeBox::ClassName()) || LegoWorld::IsA(p_name);
83 }
84
88 MxResult Create(MxDSAction& p_dsAction) override;
89
91 void ReadyWorld() override;
92
95 MxBool Escape() override;
96
99 void Enable(MxBool p_enable) override;
100
101private:
105 MxBool HandleControl(LegoControlManagerNotificationParam& p_param);
106
107 LegoGameState::Area m_destLocation;
108 JukeBoxState* m_state;
109 undefined2 m_unk0x100;
110};
111
112#endif // JUKEBOX_H
[AI] Represents the music selection state for the Jukebox in the game.
Definition: jukebox.h:14
JukeBoxState()
[AI] Creates a new JukeBoxState with default music e_pasquell and inactive. [AI]
Definition: jukebox.h:27
MxBool IsA(const char *p_name) const override
[AI] Checks if the object is or derives from the class specified by p_name.
Definition: jukebox.h:41
Music m_music
[AI] Currently selected music track in the Jukebox. [AI]
Definition: jukebox.h:46
const char * ClassName() const override
[AI] Returns the class name "JukeBoxState" for run-time type identification. [AI]
Definition: jukebox.h:33
Music
[AI] Enumeration for Jukebox music tracks. Used to identify the currently selected music piece....
Definition: jukebox.h:17
@ e_torpedos
[AI] "Torpedos" music track. [AI]
Definition: jukebox.h:23
@ e_nelson
[AI] "Nelson" music track. [AI]
Definition: jukebox.h:22
@ e_decal
[AI] "Decal" music track. [AI]
Definition: jukebox.h:20
@ e_right
[AI] "Right" music track. [AI]
Definition: jukebox.h:19
@ e_pasquell
[AI] "Pasquell" music track (default selection). [AI]
Definition: jukebox.h:18
@ e_wallis
[AI] "Wallis" music track. [AI]
Definition: jukebox.h:21
MxBool IsSerializable() override
[AI] JukeBoxState is never serialized—used only during gameplay session. [AI]
Definition: jukebox.h:30
MxU32 m_active
[AI] Flag indicating whether the Jukebox is currently active (1=active, 0=inactive)....
Definition: jukebox.h:47
[AI] Represents the Jukebox world environment in the game—handles display, state, notifications,...
Definition: jukebox.h:53
MxResult Tickle() override
[AI] Called by the tickle manager on update/tick events; manages per-frame logic such as input disabl...
Definition: jukebox.cpp:241
JukeBox()
[AI] Constructs the JukeBox world instance and registers it with the notification manager for event h...
Definition: jukebox.cpp:22
~JukeBox() override
[AI] Destructor. Unregisters world from all managers and releases input/camera focus if currently set...
Definition: jukebox.cpp:30
MxBool VTable0x5c() override
[AI] Returns TRUE indicating some special behavior (used by core engine input handling logic)....
Definition: jukebox.h:69
void ReadyWorld() override
[AI] Finalizes world setup, including enabling presenters for the currently selected music bitmap and...
Definition: jukebox.cpp:89
MxBool IsA(const char *p_name) const override
[AI] Returns true if this object is, or derives from, the class specified by p_name.
Definition: jukebox.h:80
void Enable(MxBool p_enable) override
[AI] Enables or disables input/control focus for the world (and sets input manager state accordingly)...
Definition: jukebox.cpp:225
MxBool Escape() override
[AI] Handles request to exit the Jukebox world—sets destination for transition (will switch area on n...
Definition: jukebox.cpp:257
const char * ClassName() const override
[AI] Class identification string, used for run-time type checks. Returns "JukeBox"....
Definition: jukebox.h:72
MxResult Create(MxDSAction &p_dsAction) override
[AI] Sets up world state, registers input and control handlers, and initializes camera upon entry.
Definition: jukebox.cpp:42
MxLong Notify(MxParam &p_param) override
[AI] Handles incoming notifications (such as control input and transition events) for the Jukebox wor...
Definition: jukebox.cpp:66
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
Definition: legogamestate.h:92
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Definition: legostate.h:17
MxBool IsA(const char *p_name) const override
[AI] Tests if this object is of a given class name, directly or through inheritance.
Definition: legostate.h:169
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
Definition: legoworld.h:49
MxBool IsA(const char *p_name) const override
Runtime type checking; checks class hierarchy.
Definition: legoworld.h:153
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
#define override
Definition: compat.h:21
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
unsigned short undefined2
Definition: decomp.h:27
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
unsigned int MxU32
[AI]
Definition: mxtypes.h:32