3#include <actor/ActorCreateParameter.h>
5#include <container/seadOffsetList.h>
6#include <heap/seadHeap.h>
7#include <prim/seadBitFlag.h>
8#include <prim/seadRuntimeTypeInfo.h>
9#include <audio/GameAudio.h>
14
15
16
17
26
27
28
38
39
48
49
61
62
69
70
77
78
85
86
93
94
95
99
100
103 return mActorProfile;
107
108
115
116
123
124
131
132
139
140
147
148
155
156
163
164
171
172
173
174 template <
typename T>
177 return sead::DynamicCast<T>(mParent);
181
182
183
184
188
189
190
191
192 void getCoinSE(s32 player_no,
const sead::Vector3f& position)
194 GameAudio::getAudioObjMap()->startSound(
197 GameAudio::getRemotePlayer(player_no)
203
204
205
206
209
210
211
215
216
217
218
219
222
223
224
225
226
229
230
231
232
236
237
238
239
240
243
244
245
246
247
250
251
252
253
256
257
258
259
263
264
265
266
267
270
271
272
273
274
275
278
279
280
281
285
286
287
288
289
292
293
294
295
296
299
300
301
302
303
332static_assert(
sizeof(
ActorBase) == 0x50,
"ActorBase size mismatch");
ActorBase * TActorFactory(const ActorCreateParameter ¶m)
Definition ActorBase.h:335
Base interface class for all actors in the game. Lifecycle is handled by ActorMgr.
Definition ActorBase.h:19
u32 getParam1() const
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:133
virtual void lastExecute()
Callback which is called after all other actors have finished executing for this frame.
bool mIsMapActor
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:317
bool isCreatedImmediately() const
Whether the actor was created with ActorMgr::createImmediately(), rather than deferred with ActorMgr:...
Definition ActorBase.h:109
virtual void postExecute(MainState state)
Callback invoked unconditionally after the execute phase completes. It executes even if preExecute() ...
Flag
Properties which control execution policy during events.
Definition ActorBase.h:51
@ cFlag_NoNormalEventFreeze
Always execute during "normal" event freezes. See EventMgr::isNormal()
Definition ActorBase.h:53
@ cFlag_NoEventFreeze
Always execute during event freezes. See EventMgr::isJoin()
Definition ActorBase.h:52
u32 mParam0
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:320
virtual bool preCreate()
Callback invoked before the create operation.
virtual bool draw()
Main rendering callback for the actor. Called every frame (the game runs at exactly 60 FPS).
bool mCreatedImmediately
Whether the actor was created with ActorMgr::createImmediately(), rather than deferred with ActorMgr:...
Definition ActorBase.h:316
s32 getProfileID() const
The specific profile ID which this actor was instantiated from.
virtual void postCreate(MainState state)
Callback invoked unconditionally after the create phase completes. It executes even if preCreate() by...
ActorBase * getParent() const
Definition ActorBase.h:165
UniqueID getUniqueID() const
The unique identifier handle for this actor.
Definition ActorBase.h:87
bool mDeleteRequestFlag
Whether to delete this actor on the next frame.
Definition ActorBase.h:319
virtual bool execute()
Main execution/logic callback for the actor. Called every frame (the game runs at exactly 60 FPS).
const List & getChildList() const
sead::OffsetList used for holding child actors spawned by this actor. Managed automatically if param....
Definition ActorBase.h:149
bool isMapActor() const
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:117
virtual bool preExecute()
Callback invoked before the execute operation.
virtual bool preDestroy()
Callback invoked before the delete operation.
u32 getParam0() const
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:125
UniqueID mUniqueID
The unique identifier handle for this actor.
Definition ActorBase.h:314
void getCoinSE(s32 player_no, const sead::Vector3f &position)
Plays the coin-get sound.
Definition ActorBase.h:192
bool isActive() const
Whether this actor has been successfully created and is now active.
Definition ActorBase.h:63
sead::ListNode mChildNode
Implementation detail. Used to track our position in the parent's mChildList.
Definition ActorBase.h:324
bool isRequestedDelete() const
Whether this actor has been scheduled for deletion on the next frame.
Definition ActorBase.h:79
sead::ListNode mExecuteNode
Implementation detail. Used to track our position in ActorMgr lists.
Definition ActorBase.h:326
virtual Result destroy()
Main deletion callback for the actor.
ActorBase * mParent
The parent actor if this actor is a child. Automatically set to nullptr if orphaned.
Definition ActorBase.h:325
List mChildList
sead::OffsetList used for holding child actors spawned by this actor. Managed automatically if param....
Definition ActorBase.h:323
virtual ~ActorBase()
Destroys the actor and orphans all of its children.
void removeChild(ActorBase *child)
Disconnects a child from this actor's family tree.
sead::Heap * mActorHeap
Personal heap for this actor of type sead::FrameHeap. Capacity of 0x20200, but profiles in the player...
Definition ActorBase.h:313
sead::Heap * getActorHeap() const
The personal heap for this actor.
Definition ActorBase.h:157
sead::OffsetList< ActorBase > List
Definition ActorBase.h:57
ActorBase(const ActorCreateParameter ¶m)
Constructs an actor from configuration data.
sead::ListNode mDrawNode
Implementation detail. Used to track our position in ActorMgr mDrawManage list.
Definition ActorBase.h:327
void setActive_(bool active)
Definition ActorBase.h:307
virtual void postDestroy(MainState state)
Unconditionally called callback for after the delete operation.
Profile * getProfile() const
The specific profile which this actor was instantiated from.
Definition ActorBase.h:101
T * getParent() const
The parent actor pointer if this actor is a child, nullptr otherwise.
Definition ActorBase.h:175
ActorParameterEx1 mParamEx
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:322
ActorParameterEx1 getParamEx() const
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:141
sead::BitFlag32 mFlag
Properties which control execution policy during events. See ActorBase::Flag enum.
Definition ActorBase.h:328
Profile * mActorProfile
The specific profile which this actor was instantiated from.
Definition ActorBase.h:315
bool mIsActive
Whether the create operation has completed and the actor is executing.
Definition ActorBase.h:318
virtual Result create()
Main initialization/setup callback for the actor.
u32 mParam1
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:321
void deleteRequest()
Schedule this actor for deletion on the next frame.
Definition ActorBase.h:71
virtual void postDraw(MainState state)
Callback invoked unconditionally after the draw phase completes. It executes even if preDraw() bypass...
Result
Defines signals to pass to ActorMgr when performing create and delete operations on the actor.
Definition ActorBase.h:41
@ cResult_Success
The operation was successful, continue execution.
Definition ActorBase.h:43
@ cResult_Wait
Stall the operation, tries to call again the next frame.
Definition ActorBase.h:42
@ cResult_Failed
Cancel the operation. This deletes the actor.
Definition ActorBase.h:44
virtual bool preDraw()
Callback invoked before the draw operation.