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
51
52
59
60
67
68
75
76
79 return mActorUniqueID;
83
84
85
89
90
97
98
105
106
113
114
121
122
129
130
137
138
145
146
153
154
161
162
163
164 template <
typename T>
167 return sead::DynamicCast<T>(mParent);
171
172
173
174
179
180
181
182
185
186
187
192
193
194
195
196
199
200
201
202
203
206
207
208
209
213
214
215
216
217
220
221
222
223
224
227
228
229
230
233
234
235
236
240
241
242
243
246
247
248
249
250
251
254
255
256
257
261
262
263
264
265
268
269
270
271
272
275
276
277
278
279
ActorBase * TActorFactory(const ActorCreateParam ¶m)
Definition ActorBase.h:311
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:123
ActorUniqueID getActorUniqueID() const
The unique identifier handle for this actor.
Definition ActorBase.h:77
bool mIsMapActor
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:293
ActorParamEx1 mParamEx
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:298
bool isCreatedImmediately() const
Whether the actor was created with ActorMgr::createImmediately(), rather than deferred with ActorMgr:...
Definition ActorBase.h:99
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.
u32 mParam0
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:296
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:292
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:155
ActorParamEx1 getParamEx() const
Extra level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:131
bool mDeleteRequestFlag
Whether to delete this actor on the next frame.
Definition ActorBase.h:295
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:139
ActorUniqueID mActorUniqueID
The unique identifier handle for this actor.
Definition ActorBase.h:290
bool isMapActor() const
Whether the actor was spawned from the level with ActorCreateMgr, rather than dynamically spawned by ...
Definition ActorBase.h:107
virtual bool preExecute()
Callback invoked before the execute operation.
u32 getParam0() const
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:115
bool isActive() const
Whether this actor has been successfully created and is now active.
Definition ActorBase.h:53
sead::ListNode mChildNode
Implementation detail. Used to track our position in the parent's mChildList.
Definition ActorBase.h:300
bool isRequestedDelete() const
Whether this actor has been scheduled for deletion on the next frame.
Definition ActorBase.h:69
sead::ListNode mExecuteNode
Implementation detail. Used to track our position in ActorMgr lists.
Definition ActorBase.h:302
ActorBase * mParent
The parent actor if this actor is a child. Automatically set to nullptr if orphaned.
Definition ActorBase.h:301
List mChildList
sead::OffsetList used for holding child actors spawned by this actor. Managed automatically if param....
Definition ActorBase.h:299
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:289
sead::Heap * getActorHeap() const
The personal heap for this actor.
Definition ActorBase.h:147
sead::OffsetList< ActorBase > List
Definition ActorBase.h:47
sead::ListNode mDrawNode
Implementation detail. Used to track our position in ActorMgr mDrawManage list.
Definition ActorBase.h:303
void setActive_(bool active)
Definition ActorBase.h:283
Profile * getProfile() const
The specific profile which this actor was instantiated from.
Definition ActorBase.h:91
T * getParent() const
The parent actor pointer if this actor is a child, nullptr otherwise.
Definition ActorBase.h:165
virtual bool preDelete()
Callback invoked before the delete operation.
sead::BitFlag32 mFlag
Definition ActorBase.h:304
ActorBase(const ActorCreateParam ¶m)
Constructs an actor from configuration data.
Profile * mActorProfile
The specific profile which this actor was instantiated from.
Definition ActorBase.h:291
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:294
virtual Result create()
Main initialization/setup callback for the actor.
u32 mParam1
Level designer configuration. Also known as "nybbles" or "spritedata".
Definition ActorBase.h:297
void deleteRequest()
Schedule this actor for deletion on the next frame.
Definition ActorBase.h:61
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.