3#include <actor/ActorCreateParam.h>
5#include <container/seadOffsetList.h>
6#include <heap/seadHeap.h>
7#include <prim/seadBitFlag.h>
8#include <prim/seadRuntimeTypeInfo.h>
13
14
15
16
25
26
27
37
38
47
48
60
61
68
69
76
77
84
85
88 return mActorUniqueID;
92
93
94
98
99
102 return mActorProfile;
106
107
114
115
122
123
130
131
138
139
146
147
154
155
162
163
170
171
172
173 template <
typename T>
176 return sead::DynamicCast<T>(mParent);
180
181
182
183
188
189
190
191
194
195
196
201
202
203
204
205
208
209
210
211
212
215
216
217
218
222
223
224
225
226
229
230
231
232
233
236
237
238
239
242
243
244
245
249
250
251
252
255
256
257
258
259
260
263
264
265
266
270
271
272
273
274
277
278
279
280
281
284
285
286
287
288
ActorBase * TActorFactory(const ActorCreateParam ¶m)
Definition ActorBase.h:320
Base interface class for all actors in the game. Lifecycle is handled by ActorMgr.
Definition ActorBase.h:18
u32 getParam1() const
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:132
ActorUniqueID getActorUniqueID() const
The unique identifier handle for this actor.
Definition ActorBase.h:86
bool mIsMapActor
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:302
ActorParamEx1 mParamEx
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:307
bool isCreatedImmediately() const
Whether the actor was created with ActorMgr::createImmediately(), rather than deferred with ActorMgr:...
Definition ActorBase.h:108
virtual void postExecute(MainState state)
Callback invoked unconditionally after the execute phase completes. It executes even if preExecute() ...
virtual Result doDelete()
Main deletion callback for the actor.
Flag
Properties which control execution policy during events.
Definition ActorBase.h:50
@ cFlag_NoNormalEventFreeze
Always execute during "normal" event freezes. See EventMgr::isNormal()
Definition ActorBase.h:52
@ cFlag_NoEventFreeze
Always execute during event freezes. See EventMgr::isJoin()
Definition ActorBase.h:51
u32 mParam0
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:305
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:301
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:164
ActorParamEx1 getParamEx() const
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:140
bool mDeleteRequestFlag
Whether to delete this actor on the next frame.
Definition ActorBase.h:304
virtual void postDelete(MainState state)
Unconditionally called callback for after the delete operation.
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:148
ActorUniqueID mActorUniqueID
The unique identifier handle for this actor.
Definition ActorBase.h:299
bool isMapActor() const
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:116
virtual bool preExecute()
Callback invoked before the execute operation.
u32 getParam0() const
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:124
bool isActive() const
Whether this actor has been successfully created and is now active.
Definition ActorBase.h:62
sead::ListNode mChildNode
Implementation detail. Used to track our position in the parent's mChildList.
Definition ActorBase.h:309
bool isRequestedDelete() const
Whether this actor has been scheduled for deletion on the next frame.
Definition ActorBase.h:78
sead::ListNode mExecuteNode
Implementation detail. Used to track our position in ActorMgr lists.
Definition ActorBase.h:311
ActorBase * mParent
The parent actor if this actor is a child. Automatically set to nullptr if orphaned.
Definition ActorBase.h:310
List mChildList
sead::OffsetList used for holding child actors spawned by this actor. Managed automatically if param....
Definition ActorBase.h:308
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:298
sead::Heap * getActorHeap() const
The personal heap for this actor.
Definition ActorBase.h:156
sead::OffsetList< ActorBase > List
Definition ActorBase.h:56
sead::ListNode mDrawNode
Implementation detail. Used to track our position in ActorMgr mDrawManage list.
Definition ActorBase.h:312
void setActive_(bool active)
Definition ActorBase.h:292
Profile * getProfile() const
The specific profile which this actor was instantiated from.
Definition ActorBase.h:100
T * getParent() const
The parent actor pointer if this actor is a child, nullptr otherwise.
Definition ActorBase.h:174
virtual bool preDelete()
Callback invoked before the delete operation.
sead::BitFlag32 mFlag
Properties which control execution policy during events. See ActorBase::Flag enum.
Definition ActorBase.h:313
ActorBase(const ActorCreateParam ¶m)
Constructs an actor from configuration data.
Profile * mActorProfile
The specific profile which this actor was instantiated from.
Definition ActorBase.h:300
virtual void finalUpdate()
Callback which is called after all other actors have finished executing for this frame.
bool mIsActive
Whether the create operation has completed and the actor is executing.
Definition ActorBase.h:303
virtual Result create()
Main initialization/setup callback for the actor.
u32 mParam1
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:306
void deleteRequest()
Schedule this actor for deletion on the next frame.
Definition ActorBase.h:70
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:40
@ cResult_Success
The operation was successful, continue execution.
Definition ActorBase.h:42
@ cResult_Wait
Stall the operation, tries to call again the next frame.
Definition ActorBase.h:41
@ cResult_Failed
Cancel the operation. This deletes the actor.
Definition ActorBase.h:43
virtual bool preDraw()
Callback invoked before the draw operation.