Isle
Loading...
Searching...
No Matches
isleactor.cpp
Go to the documentation of this file.
1#include "isleactor.h"
2
3#include "legoentity.h"
4#include "legoworld.h"
5#include "misc.h"
7#include "scripts.h"
8
10
11// FUNCTION: LEGO1 0x1002c780
12MxResult IsleActor::Create(MxDSAction& p_dsAction)
13{
14 MxResult result = LegoEntity::Create(p_dsAction);
15
16 if (result == SUCCESS) {
17 m_world = CurrentWorld();
18
19 if (!m_world) {
20 result = FAILURE;
21 }
22 }
23
24 return result;
25}
26
27// FUNCTION: LEGO1 0x1002c7b0
28// FUNCTION: BETA10 0x1003622e
30{
31 MxLong result = 0;
32 MxNotificationParam& param = (MxNotificationParam&) p_param;
33
34 switch (param.GetNotification()) {
36 result = VTable0x6c();
37 break;
40 break;
43 break;
46 break;
48 result = HandleClick();
49 break;
51 result = HandleEndAnim();
52 break;
55 break;
56 }
57
58 return result;
59}
[AI] Represents an actor instance specifically used within LEGO Island, extending LegoActor with noti...
Definition: isleactor.h:15
virtual MxLong HandleEndAction(MxEndActionNotificationParam &)
[AI] Handles the notification that a media or scripted action has ended.
Definition: isleactor.h:42
virtual MxLong VTable0x6c()
[AI] Handles a custom notification type mapped to vtable slot 0x6c.
Definition: isleactor.h:33
virtual MxLong HandlePathStruct(LegoPathStructNotificationParam &)
[AI] Handles notifications relating to actor path or path structure changes (for movement,...
Definition: isleactor.h:57
MxLong Notify(MxParam &p_param) override
[AI] Handles notification messages sent to this actor and dispatches to the appropriate handler based...
Definition: isleactor.cpp:29
virtual MxLong HandleButtonUp(LegoControlManagerNotificationParam &)
[AI] Handles a button release (up) event routed via the control manager.
Definition: isleactor.h:52
virtual MxLong HandleClick()
[AI] Handles a click event on this actor.
Definition: isleactor.h:29
virtual MxLong HandleButtonDown(LegoControlManagerNotificationParam &)
[AI] Handles a button press (down) event, typically from user input, routed via the control manager.
Definition: isleactor.h:47
virtual MxLong HandleEndAnim()
[AI] Handles the notification that an animation on this actor has finished.
Definition: isleactor.h:37
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
virtual MxResult Create(MxDSAction &p_dsAction)
[AI] Initializes the entity from a DSAction object, typically from a script or file load.
Definition: legoentity.cpp:84
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
[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
#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
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
Definition: misc.cpp:93
@ c_notificationButtonUp
[AI] Mouse/gamepad button release [AI]
@ c_notificationButtonDown
[AI] Mouse/gamepad button press [AI]
@ c_notificationEndAnim
[AI] End of an animation [AI]
@ c_notificationType0
[AI] Undefined/Generic notification type [AI]
@ c_notificationEndAction
[AI] Indicates the end of an action [AI]
@ c_notificationClick
[AI] Mouse click event [AI]
@ c_notificationPathStruct
[AI] Data related to a path structure [AI]
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...