Isle
Loading...
Searching...
No Matches
bumpbouy.cpp
Go to the documentation of this file.
1#include "bumpbouy.h"
2
3#include "isle.h"
4#include "isle_actions.h"
5#include "islepathactor.h"
6#include "legogamestate.h"
7#include "legovideomanager.h"
8#include "misc.h"
9#include "mxmisc.h"
11#include "mxnotificationparam.h"
12#include "mxtransitionmanager.h"
13#include "scripts.h"
14
15#include <assert.h>
16
18
19// FUNCTION: LEGO1 0x10027220
21{
23}
24
25// FUNCTION: LEGO1 0x10027360
27{
29}
30
31// FUNCTION: LEGO1 0x10027400
32// FUNCTION: BETA10 0x100262d9
34{
35 MxLong result = 0;
36 MxNotificationParam& param = (MxNotificationParam&) p_param;
37
39 assert(user);
40
41 if (user->IsA("Jetski") && param.GetNotification() == c_notificationClick) {
43 user->SetWorldSpeed(0);
44 user->Exit();
45
46 Act1State* isleState = (Act1State*) GameState()->GetState("Act1State");
47 assert(isleState);
48 isleState->m_unk0x018 = 5;
49
51 assert(isle);
53
55 result = 1;
56 }
57
58 return result;
59}
[AI] Holds state and transient gameplay data for the first act on Lego Island.
Definition: isle.h:29
MxU32 m_unk0x018
[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]
Definition: isle.h:92
[AI] Represents a bumpable buoy in the world that handles user interactions, specifically the Jetski ...
Definition: bumpbouy.h:17
MxLong Notify(MxParam &p_param) override
[AI] Handles notifications sent to this BumpBouy instance.
Definition: bumpbouy.cpp:33
~BumpBouy() override
[AI] Destructor unregisters the BumpBouy from the notification manager.
Definition: bumpbouy.cpp:26
Derived path actor type for handling player transitions and activities on LEGO Island.
Definition: islepathactor.h:23
MxBool IsA(const char *p_name) const override
[AI] Checks if class or any superclass matches the given type string.
virtual void Exit()
[AI] Called when the actor is deactivated or moved out of player control, restoring previous actor if...
[AI] Represents the main overworld (LEGO Island) in the game, acting as the central hub and state mac...
Definition: isle.h:179
void SetDestLocation(LegoGameState::Area p_destLocation)
[AI] Sets destination location for world transitions (are used after certain cutscenes/buttons).
Definition: isle.h:234
virtual void SetWorldSpeed(MxFloat p_worldSpeed)
[AI] Sets the current world speed value for this entity (used to control motion/animation rate).
Definition: legoentity.h:98
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
@ e_jetrace
Jetski race area, "interior"/main. [AI].
void SetRender3D(MxBool p_render3d)
[AI] Enables or disables main 3D rendering (e.g., used internally on video transitions).
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
NotificationId GetNotification() const
[AI] Retrieves the current notification type of this parameter.
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
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,...
@ e_mosaic
[AI] Complex mosaic block-out effect.
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
Definition: scripts.cpp:32
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
Definition: misc.cpp:61
LegoVideoManager * VideoManager()
[AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware....
Definition: misc.cpp:29
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
Definition: misc.cpp:208
LegoWorld * FindWorld(const MxAtomId &p_atom, MxS32 p_entityid)
[AI] Searches for or retrieves a LegoWorld instance based on an atom id and entity id.
Definition: misc.cpp:188
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
Definition: misc.cpp:85
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
Definition: mxmisc.cpp:17
@ c_notificationClick
[AI] Mouse click event [AI]
int MxLong
[AI]
Definition: mxtypes.h:83
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...