NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_actor.hpp
1#pragma once
2
3#include <game/bases/d_base_actor.hpp>
4#include <game/mLib/m_3d.hpp>
5#include <game/bases/d_cc.hpp>
6#include <game/bases/d_bc.hpp>
7#include <game/bases/d_rc.hpp>
8
9class dBg_ctr_c;
10
11class dAcPy_c;
12class dPropelParts_c;
13
14/// @brief The minimum required implementation for a stage actor.
15/// @ingroup bases
16class dActor_c : public dBaseActor_c {
17public:
18
19 /// @brief The score awarded when the actor is eaten by Yoshi.
21 EAT_POINTS_200, ///< Awards 200 points (default).
22 EAT_POINTS_1000, ///< Awards 1000 points. @unused
23 EAT_POINTS_NONE ///< No points are awarded. @unused
24 };
25
26 /// @brief The possible actor eat states.
28 EAT_STATE_NONE, ///< The actor is not being eaten.
29 EAT_STATE_EATING, ///< The actor is in the process of being eaten.
30 EAT_STATE_EATEN, ///< The actor has been successfully eaten.
31 EAT_STATE_SPIT, ///< The actor is about to be spat out. Used for spitting out players when Yoshi is dismounted.
32 EAT_STATE_SPAT ///< The actor has been spat out.
33 };
34
35 /// @brief The possible actor behaviors when eaten by Yoshi.
37 EAT_TYPE_NONE, ///< The actor cannot be eaten.
38 EAT_TYPE_EAT, ///< The actor can be eaten and then spat out.
39 EAT_TYPE_EAT_PERMANENT, ///< The actor is consumed permanently after being eaten (default).
40 EAT_TYPE_UNK3, ///< Unknown behaviour. Used on Fruits, Pokeys and Giant Fuzzies.
41 EAT_TYPE_FIREBALL, ///< Yoshi can spit a fireball after eating the actor.
42 EAT_TYPE_ICEBALL, ///< Yoshi can spit an iceball after eating the actor.
43 };
44
45 /// @brief The possible stage actor kinds.
47 STAGE_ACTOR_GENERIC, ///< A generic stage actor (default).
48 STAGE_ACTOR_PLAYER, ///< The @ref dAcPy_c "player actor".
49 STAGE_ACTOR_YOSHI, ///< The @ref daYoshi_c "Yoshi actor".
50 STAGE_ACTOR_ENTITY, ///< An interactable entity actor.
51 };
52
53 /// @brief The possible carry actions.
55 CARRY_RELEASE = BIT_FLAG(0), ///< The actor is being released from carry.
56 CARRY_THROW = BIT_FLAG(1), ///< The actor is being actively thrown by the player.
57 };
58
59 /// @brief The collision directions that an actor can respond to.
61 COLL_NONE = BIT_FLAG(-1), ///< The actor does not collide with any surface.
62 COLL_HEAD = BIT_FLAG(0), ///< The actor can collide with ceilings.
63 COLL_WALL_L = BIT_FLAG(1), ///< The actor can collide with walls on its left.
64 COLL_WALL_R = BIT_FLAG(2), ///< The actor can collide with walls on its right.
65 COLL_FOOT = BIT_FLAG(3), ///< The actor can collide with the ground.
66 };
67
68 /// @brief Information related to actor spawning.
70 ACTOR_SPAWNED = BIT_FLAG(0), ///< The actor is spawned.
71 ACTOR_NO_RESPAWN = BIT_FLAG(3), ///< The actor must not respawn after deletion.
72 };
73
74 /// @brief Flags used to control out of screen checks.
76 SKIP_NONE = BIT_FLAG(-1), ///< No checks are skipped.
77 SKIP_ACTOR_DELETE = BIT_FLAG(1), ///< The actor is not deleted if out of screen.
78 SKIP_SCREEN_CHECK = BIT_FLAG(2), ///< The actor position is not checked against the screen boundaries.
79 SKIP_RIDE_CHECK = BIT_FLAG(3), ///< The actor's ride status is not checked.
80 };
81
82 dActor_c(); ///< @copydoc dBaseActor_c::dBaseActor_c
83 ~dActor_c(); ///< @copydoc dBaseActor_c::~dBaseActor_c
84
85 virtual int preCreate();
86 virtual void postCreate(fBase_c::MAIN_STATE_e status);
87
88 virtual int preDelete();
89 virtual void postDelete(fBase_c::MAIN_STATE_e status);
90
91 virtual int preExecute();
92 virtual void postExecute(fBase_c::MAIN_STATE_e status);
93
94 virtual int preDraw();
95 virtual void postDraw(fBase_c::MAIN_STATE_e status);
96
97 virtual const char *getKindString() const;
98
99 /// @brief Checks if the actor is out of view.
100 /// @return @p true if the actor is out of view, else @p false.
101 virtual bool ActorDrawCullCheck();
102
103 virtual void block_hit_init(); ///< Callback for when a block directly beneath the actor is hit.
104
105 virtual bool vf68(dBg_ctr_c *collider) { return true; } ///< Unknown, related to collision. @unofficial
106 virtual s8 *getPlrNo() { return &mPlayerNo; } ///< Gets the player number associated with the actor. See ::mPlayerNo.
107 virtual mVec2_c getLookatPos() const; ///< Gets the position players look to when focused on the actor.
108
109 /// @brief Returns whether the actor can be carried.
110 virtual bool isSpinLiftUpEnable() { return true; }
111
112 /// @brief Callback for when the actor is picked up by another actor.
113 /// @param carryingActor The actor performing the carrying action.
114 virtual void setSpinLiftUpActor(dActor_c *carryingActor);
115
116 /// @brief Callback for when the actor is dropped by the carrying actor.
117 /// @param carryingActor The carrying actor.
118 /// @param collisionDelay The amount of frames during which collisions with the former carrier are ignored.
119 virtual void setCarryFall(dActor_c *carryingActor, int collisionDelay) {}
120
121 /// @brief Callback for when the actor is targeted by Yoshi's tongue.
122 /// @param eatingActor The actor performing the eating action.
123 virtual void setEatTongue(dActor_c *eatingActor);
124
125 /// @brief Callback for when the eating action is canceled.
126 /// @details This only seems to occur when two actors try to eat the same actor at the same time.
127 /// @param eatingActor The actor performing the eating action.
128 virtual void setEatTongueOff(dActor_c *eatingActor);
129
130 /// @brief Callback for when the actor is being eaten.
131 /// @param eatingActor The actor performing the eating action.
132 virtual void setEatMouth(dActor_c *eatingActor);
133
134 /// @brief Callback for when the actor is about to be spat out.
135 /// @param eatingActor The actor performing the eating action.
136 /// @return Whether the actor should be spat out.
137 virtual bool setEatSpitOut(dActor_c *eatingActor);
138
139 /// @brief Callback for when the actor is about to be fully swallowed.
140 /// @param eatingActor The eating actor.
141 /// @return Always returns @p true .
142 virtual bool setEatGlupDown(dActor_c *eatingActor);
143
144 /// @brief Updates the actor's position during eating actions.
145 /// @param eatingActor The eating actor.
146 virtual void eatMove(dActor_c *eatingActor);
147
148 virtual void removeCc(); ///< Disables the actor's collision.
149 virtual void reviveCc(); ///< Enables the actor's collision.
150 virtual void setAfterEatScale(); ///< Restores the actor's scale once spat out.
151 virtual void calcSpitOutPos(dActor_c *eatingActor); ///< Calculates the position where the actor will be spat out.
152 virtual float calcEatScaleRate(dActor_c *eatingActor); ///< Computes the scaling rate during eating.
153 virtual void calcEatInScale(dActor_c *eatingActor); ///< Adjusts the actor's scale while being eaten.
154
155 /// @brief Spawns the visual effects for when all players reach the flagpole and all enemies are cleared.
156 virtual void allEnemyDeathEffSet();
157
158 virtual void vfb4(); ///< @unofficial
159 virtual void funsuiMoveX() {} ///< @unused
160 virtual void cancelFunsuiActUpper(); ///< @unused
161 virtual void cancelFunsuiActSide(int); ///< @unused
162 virtual void cancelFunsuiActVanish(); ///< @unused
163
164 /// @brief Generates a water splash effect.
165 /// @param pos The effect position.
166 /// @param size The effect scale.
167 virtual void waterSplashEffect(const mVec3_c &pos, float size);
168
169 /// @brief Generates a lava splash effect.
170 /// @param pos The effect position.
171 /// @param size The effect scale.
172 virtual void yoganSplashEffect(const mVec3_c &pos, float size);
173
174 /// @brief Generates a poison water splash effect.
175 /// @param pos The effect position.
176 /// @param size The effect scale.
177 virtual void poisonSplashEffect(const mVec3_c &pos, float size);
178
179 bool checkAreaNo(); ///< Checks if at least one player is in the same zone as the actor.
180
181 static void setSoftLight_Player(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_Player
182 static void setSoftLight_Enemy(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_Enemy
183 static void setSoftLight_Map(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_Map
184 static void setSoftLight_MapObj(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_MapObj
185 static void setSoftLight_Boss(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_Boss
186 static void setSoftLight_Item(m3d::bmdl_c &mdl); ///< @copydoc dGameCom::SetSoftLight_Item
187
188 /// @brief Deletes the actor and optionally disables respawn.
189 /// @param deleteForever Whether the actor must not respawn after being deleted. Only applies to actors created by sprites.
190 void deleteActor(u8 deleteForever);
191
192 /// @brief Checks if the actor should be culled due to zone limits.
193 /// @unofficial
194 /// @param pos The actor position.
195 /// @param bound The actor's bounding box.
196 /// @param areaID The actor's zone ID.
197 /// @return Whether the actor should be culled.
198 bool areaCullCheck(const mVec3_c &pos, const mBoundBox &bound, u8 areaID) const;
199
200 /// @brief Checks if the actor is out of gameplay and optionally deletes it.
201 /// @param flags The flags to control which actions to perform. Value is a ::SCREEN_OUT_e.
202 /// @return Whether the actor is out of gameplay.
203 bool ActorScrOutCheck(u16 flags);
204
205 /// @brief Checks if the actor should be culled due to being outside the screen.
206 /// @decompnote{Likely belongs to the dGameCom namespace.}
207 /// @unofficial
208 /// @param pos The actor position.
209 /// @param visibleBound The actor's visible bounding box.
210 /// @param destroyBound The actor's deletion bounding box.
211 /// @param areaID The actor's zone ID (unused).
212 /// @return Whether the actor should be culled.
213 static bool screenCullCheck(const mVec3_c &pos, const mBoundBox &visibleBound, mBoundBox destroyBound, u8 areaID);
214
215 /// @brief Returns whether the actor is colliding with any enabled collision sides.
216 /// @unofficial
217 bool checkBgColl();
218
219 /// @brief Checks if the prompt for the given action should be displayed for each player.
220 /// @param fukidashiAction The action to be checked.
221 /// @param fukidashiTriggerSize The size of the area around the actor where the prompt is displayed.
222 /// @return Always returns @p false .
223 bool carryFukidashiCheck(int fukidashiAction, mVec2_c fukidashiTriggerSize);
224
225 /// @brief Searches the closest player who has not yet performed the given action.
226 /// @param fukidashiAction The action to be checked.
227 /// @return The closest player meeting the criteria, or @p nullptr if not found.
228 dAcPy_c *searchCarryFukidashiPlayer(int fukidashiAction);
229
230 /// @brief Hides the given action prompt for all players.
231 /// @param fukidashiAction The action to be hidden.
232 /// @param playerId The player for whom the action prompt should never be shown again, or @p -1 if none.
233 void carryFukidashiCancel(int fukidashiAction, int playerId);
234
235 /// @brief Kills the actor and optionally awards points to one or all players.
236 /// @unofficial
237 /// @param playerId The player to assign the score resulting from the kill, or @p -1 to award it to all players.
238 /// @param noScore Whether points should not be awarded from the kill.
239 void killActor(s8 playerId, int noScore);
240
241 /// @brief Plays the combo kill sound effect.
242 /// @param multiplier The combo multiplier.
243 /// @param shortCombo Whether the combo starts at 1000 points instead of 200 points.
244 void slideComboSE(int multiplier, bool shortCombo);
245
246 void clrComboCnt(); ///< Clears the actor's combo counter.
247
248 /// @brief Returns whether the actor is being carried by a player.
249 /// @param playerNum A pointer where the carrying player's number will be written to, or @p nullptr .
250 /// @return Whether the actor is being carried by a player.
251 bool checkCarried(int *playerNum);
252
253 /// @brief Gets the closest @ref dAcPy_c "player" to the actor and its distance.
254 /// @details Centered positions are used to calculate the distance.
255 /// @param delta The vector where the distance between the actor and the player will be written to.
256 /// @return The closest player, or @p nullptr .
258
259 /// @brief Gets the closest @ref dAcPy_c "player" to the given position and its distance.
260 /// @details Centered positions are used to calculate the distance.
261 /// @param delta The vector where the distance to the player will be written to.
262 /// @param pos The position to use for the search.
263 /// @return The closest player, or @p nullptr .
264 typedef dAcPy_c *(*searchNearPlayerFunc)(mVec2_c &delta, const mVec2_c &pos);
265 static dAcPy_c *searchNearPlayer_Main(mVec2_c &delta, const mVec2_c &pos); ///< See ::searchNearPlayerFunc.
266 static dAcPy_c *searchNearPlayerNormal(mVec2_c &delta, const mVec2_c &pos); ///< See ::searchNearPlayerFunc.
267 static dAcPy_c *searchNearPlayerLoop(mVec2_c &delta, const mVec2_c &pos); ///< See ::searchNearPlayerFunc.
268
269 /// @brief Gets the direction the target position is in, from the source position's viewpoint.
270 /// @param trgX The target X position.
271 /// @param srcX The source X position.
272 /// @return The direction the target is in.
273 typedef bool (*getTrgToSrcDirFunc)(float trgX, float srcX);
274 static bool getTrgToSrcDir_Main(float trgX, float srcX); ///< See ::getTrgToSrcDirFunc.
275 static bool getTrgToSrcDirNormal(float trgX, float srcX); ///< See ::getTrgToSrcDirFunc.
276 static bool getTrgToSrcDirLoop(float trgX, float srcX); ///< See ::getTrgToSrcDirFunc.
277
278 /// @brief Adjusts the actor's position to account for looping stages.
279 /// @param pos The position to be updated.
280 /// @param ang The rotation (unused).
281 /// @param param3 Always @p 1 (unused).
282 static void changePosAngle(mVec3_c *pos, mAng3_c *ang, int param3);
283
284 /// @brief Sets the player search function to be used for the level.
285 /// @param loopType The loop type. See dScStage_c::LOOP_TYPE_e.
286 static void setSearchNearPlayerFunc(int loopType);
287
288 /// @brief Sets the direction detection function to be used for the level.
289 /// @param loopType The loop type. See dScStage_c::LOOP_TYPE_e.
290 static void setGetTrgToSrcDirFunc(int loopType);
291
292 /// @brief Sets the position update function to be used for the level.
293 /// @param loopType The loop type. See dScStage_c::LOOP_TYPE_e.
294 static void setChangePosAngleFunc(int loopType);
295
296 /// @brief Sets the position-related functions for the level.
297 /// @param loopType The loop type. See dScStage_c::LOOP_TYPE_e.
298 static void setLoopFunc(int loopType);
299
300 void setKind(u8 kind); ///< Sets the actor's kind. See ::STAGE_ACTOR_KIND_e.
301
302 /// @brief Sets temporary data to be used for the next actor's construction.
303 /// @param layer The actor's layer.
304 static void setTmpCtData(u8 layer);
305
306 /**
307 * @brief Creates a stage actor without a parent.
308 *
309 * @details The actor is created as a child of the current scene actor, so that all actors can be
310 * deleted on a scene change, acting as a garbage collection mechanism.
311 * @param profName The actor's profile name.
312 * @param param The actor's parameters.
313 * @param position The actor's position.
314 * @param rotation The actor's rotation.
315 * @param layer The actor's layer.
316 * @return A pointer to the instantiated actor, or @p nullptr .
317 */
318 static dActor_c *construct(ProfileName profName, unsigned long param, const mVec3_c *position, const mAng3_c *rotation, u8 layer);
319
320 /**
321 * @brief Creates a child stage actor with the given parent.
322 *
323 * @param profName The actor's profile name.
324 * @param parent The actor's parent. Must not be @p nullptr .
325 * @param param The actor's parameters.
326 * @param position The actor's position.
327 * @param rotation The actor's rotation.
328 * @param layer The actor's layer.
329 * @return A pointer to the instantiated actor, or @p nullptr .
330 */
331 static dActor_c *construct(ProfileName profName, dBase_c *parent, unsigned long param, const mVec3_c *position, const mAng3_c *rotation, u8 layer);
332
333 u8 m_00; ///< Seems to be a player bit flag. @unused
334 u32 mCarryFukidashiPlayerNo; ///< The player for whom an action prompt related to the actor is being displayed. @p -1 if no players meet this criteria.
335 CARRY_ACTION_e mCarryingFlags; ///< The actor's carry actions.
336 u32 mThrowDirection; ///< The actor's direction when thrown or dropped after carrying.
337 u32 mComboMultiplier; ///< The current combo multiplier obtained by the actor by colliding with other actors.
338 u8 m_13; ///< @unused
339 u32 m_17; ///< @unused
340 float m_1b; ///< @unused
341 u32 m_1f; ///< @unused
342
343 dCc_c mCc; ///< The actor-to-actor collision sensor.
344 dBc_c mBc; ///< The actor-to-tile collision sensor.
345 dRc_c mRc; ///< The actor's ride surface manager.
346
347 mVec2_c m_1eb; ///< @todo Figure out the purpose of this field.
348
349 mVec2_c mVisibleAreaSize; ///< The size of the area inside which the actor is visible.
350 mVec2_c mVisibleAreaOffset; ///< The offset applied to the area size.
351 mBoundBox mMaxBound; ///< @todo Figure out the exact purpose of this field.
352 mBoundBox mDestroyBound; ///< @todo Figure out the exact purpose of this field.
353 u8 mDirection; ///< The actor's facing direction.
354 u8 mAreaNo; ///< The actor's zone ID.
355 u8 mBgCollFlags; ///< The collision directions that the actor can respond to.
356
357 u8 *mpSpawnFlags; ///< The spawn flags for the actor. See ::ACTOR_SPAWN_FLAG_e.
358 u16 *mpDeleteVal; ///< @unused
359 u16 mEventNums; ///< The event IDs the actor is tracking.
360 u64 mEventMask; ///< The event mask, generated from ::mEventNums.
361
362 u32 m_23b; ///< @todo Figure out the purpose of this field.
363 u16 mSpriteSpawnFlags; ///< The spawn flags from the sprite data entry.
364 bool mBlockHit; ///< Whether a block below the actor was hit.
365
366 u32 mEatenByID; ///< The @ref fBase_c::mUniqueID "unique identifier" of the eating actor.
367 u8 mEatState; ///< The actor's eat state. Value is a ::EAT_STATE_e.
368 u8 mEatBehaviour; ///< The actor's eat behaviour. Value is a ::EAT_BEHAVIOR_e.
369 mVec3_c mPreEatScale; ///< The actor's scale before being eaten.
370
371 EAT_POINTS_e mEatPoints; ///< @copydoc EAT_POINTS_e
372 int mAttentionMode; ///< @todo Document this field and its values.
373 u32 mAttentionFlags; ///< @todo Document this field and its values.
374
375 dPropelParts_c *mPropelParts; ///< The actor's propeller effect manager.
376 u8 mKind; ///< The actor's kind. Value is a ::STAGE_ACTOR_KIND_e.
377 s8 mPlayerNo; ///< The player associated with the actor, @p -1 if not associated to any player.
378 u8 mExecStopMask; ///< The mask required to disable the @p execute operation for the actor.
379 u8 mLayer; ///< The actor's layer.
380 bool mNoRespawn; ///< Whether the actor should not respawn after being deleted.
381 bool mBackFence; ///< Whether the actor is on the back side of chainlink fences.
382
383 mBoundBox getDestroyBound() { return mDestroyBound; }
384
385 void setDefaultMaxBound() {
387 }
388
389 float getCenterX() { return getCenterPos().x; }
390 float getCenterY() { return getCenterPos().y; }
391
392 u8 getKindMask() { return 1 << mKind; }
393
394 static const float smc_CULL_XLIMIT; ///< The default @ref mMaxBound "max bound" X offset.
395 static const float smc_CULL_YLIMIT; ///< The default @ref mMaxBound "max bound" Y offset.
396 static const float smc_CULL_AREA_XLIMIT; ///< The default @ref mMaxBound "max bound" X size.
397 static const float smc_CULL_AREA_YLIMIT; ///< The default @ref mMaxBound "max bound" Y size.
398 static const mVec2_c smc_FUKIDASHI_RANGE; ///< The default trigger area size for displaying action prompts.
399
400 static u8 mExecStopReq; ///< The actors for which the @p execute operation is requested to be disabled.
401 static u8 mDrawStopReq; ///< The actor kinds for which the @p draw operation is requested to be disabled.
402 static u8 mExecStop; ///< The actors for which the @p execute operation is currently disabled.
403 static u8 mDrawStop; ///< The actor kinds for which the @p draw operation is currently disabled.
404 static searchNearPlayerFunc mSearchNearPlayerFunc; ///< The player search function.
405 static getTrgToSrcDirFunc mGetTrgToSrcDirFunc; ///< The direction detection function.
406 static u8 m_tmpCtLayerNo; ///< Temporary storage for the next constructed actor's layer. See ::mLayer.
407
408 /// @brief Temporary storage for the next created sprite actor's spawn flags. See ::mpSpawnFlags. @unofficial
410
411 /// @brief Temporary storage for the next created sprite actor's tracked event IDs. See ::mEventNums. @unofficial
413
414 /// @brief Temporary storage for the next created sprite actor's event mask. See ::mEventMask. @unofficial
416
417 /// @brief Temporary storage for the next created sprite actor's layer. See ::mLayer. @unofficial
419};
420
421extern const u8 l_Ami_Line[2]; ///< The sub-layer for each side of chainlink fences.
422extern const float l_Ami_Zpos[2]; ///< The additional Z offset for each side of chainlink fences.
The minimum required implementation for a stage actor.
Definition d_actor.hpp:16
float m_1b
Definition d_actor.hpp:340
static u8 mExecStopReq
The actors for which the execute operation is requested to be disabled.
Definition d_actor.hpp:400
static u8 mExecStop
The actors for which the execute operation is currently disabled.
Definition d_actor.hpp:402
static bool getTrgToSrcDirLoop(float trgX, float srcX)
See getTrgToSrcDirFunc.
Definition d_actor.cpp:285
void deleteActor(u8 deleteForever)
Deletes the actor and optionally disables respawn.
Definition d_actor.cpp:356
static const float smc_CULL_AREA_XLIMIT
The default max bound X size.
Definition d_actor.hpp:396
u8 mExecStopMask
The mask required to disable the execute operation for the actor.
Definition d_actor.hpp:378
static dActor_c * construct(ProfileName profName, unsigned long param, const mVec3_c *position, const mAng3_c *rotation, u8 layer)
Creates a stage actor without a parent.
Definition d_actor.cpp:167
void slideComboSE(int multiplier, bool shortCombo)
Plays the combo kill sound effect.
Definition d_actor.cpp:699
virtual bool setEatGlupDown(dActor_c *eatingActor)
Callback for when the actor is about to be fully swallowed.
Definition d_actor.cpp:625
virtual void setCarryFall(dActor_c *carryingActor, int collisionDelay)
Callback for when the actor is dropped by the carrying actor.
Definition d_actor.hpp:119
bool mBlockHit
Whether a block below the actor was hit.
Definition d_actor.hpp:364
dAcPy_c * searchNearPlayer(mVec2_c &delta)
Gets the closest player to the actor and its distance.
Definition d_actor.cpp:191
CARRY_ACTION_e
The possible carry actions.
Definition d_actor.hpp:54
@ CARRY_RELEASE
The actor is being released from carry.
Definition d_actor.hpp:55
@ CARRY_THROW
The actor is being actively thrown by the player.
Definition d_actor.hpp:56
static void setLoopFunc(int loopType)
Sets the position-related functions for the level.
Definition d_actor.cpp:306
bool checkAreaNo()
Checks if at least one player is in the same zone as the actor.
Definition d_actor.cpp:312
void carryFukidashiCancel(int fukidashiAction, int playerId)
Hides the given action prompt for all players.
Definition d_actor.cpp:538
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
Definition d_actor.cpp:89
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
Definition d_actor.cpp:101
mVec3_c mPreEatScale
The actor's scale before being eaten.
Definition d_actor.hpp:369
static void setSoftLight_MapObj(m3d::bmdl_c &mdl)
Sets the soft light effect for map objects.
Definition d_actor.cpp:334
virtual void cancelFunsuiActUpper()
Definition d_actor.cpp:693
u8 m_00
Seems to be a player bit flag.
Definition d_actor.hpp:333
static u8 * m_tmpCtSpawnFlags
Temporary storage for the next created sprite actor's spawn flags. See mpSpawnFlags.
Definition d_actor.hpp:409
static void setSoftLight_Map(m3d::bmdl_c &mdl)
Sets the soft light effect for map actors.
Definition d_actor.cpp:330
bool mNoRespawn
Whether the actor should not respawn after being deleted.
Definition d_actor.hpp:380
virtual void setSpinLiftUpActor(dActor_c *carryingActor)
Callback for when the actor is picked up by another actor.
Definition d_actor.cpp:611
virtual void reviveCc()
Enables the actor's collision.
Definition d_actor.cpp:803
static void setTmpCtData(u8 layer)
Sets temporary data to be used for the next actor's construction.
Definition d_actor.cpp:162
dPropelParts_c * mPropelParts
The actor's propeller effect manager.
Definition d_actor.hpp:375
static u64 m_tmpCtEventMask
Temporary storage for the next created sprite actor's event mask. See mEventMask.
Definition d_actor.hpp:415
static u8 m_tmpCtLayerNo
Temporary storage for the next constructed actor's layer. See mLayer.
Definition d_actor.hpp:406
u8 * mpSpawnFlags
The spawn flags for the actor. See ACTOR_SPAWN_FLAG_e.
Definition d_actor.hpp:357
CARRY_ACTION_e mCarryingFlags
The actor's carry actions.
Definition d_actor.hpp:335
dBc_c mBc
The actor-to-tile collision sensor.
Definition d_actor.hpp:344
static getTrgToSrcDirFunc mGetTrgToSrcDirFunc
The direction detection function.
Definition d_actor.hpp:405
static u8 m_tmpCtSpriteLayerNo
Temporary storage for the next created sprite actor's layer. See mLayer.
Definition d_actor.hpp:418
virtual void poisonSplashEffect(const mVec3_c &pos, float size)
Generates a poison water splash effect.
Definition d_actor.cpp:766
static bool getTrgToSrcDir_Main(float trgX, float srcX)
See getTrgToSrcDirFunc.
Definition d_actor.cpp:277
static void setSoftLight_Enemy(m3d::bmdl_c &mdl)
Sets the soft light effect for enemies.
Definition d_actor.cpp:326
virtual bool isSpinLiftUpEnable()
Returns whether the actor can be carried.
Definition d_actor.hpp:110
void clrComboCnt()
Clears the actor's combo counter.
Definition d_actor.cpp:726
virtual void setEatTongue(dActor_c *eatingActor)
Callback for when the actor is targeted by Yoshi's tongue.
Definition d_actor.cpp:613
EAT_POINTS_e
The score awarded when the actor is eaten by Yoshi.
Definition d_actor.hpp:20
@ EAT_POINTS_1000
Awards 1000 points.
Definition d_actor.hpp:22
@ EAT_POINTS_200
Awards 200 points (default).
Definition d_actor.hpp:21
@ EAT_POINTS_NONE
No points are awarded.
Definition d_actor.hpp:23
virtual mVec2_c getLookatPos() const
Gets the position players look to when focused on the actor.
Definition d_actor.cpp:574
SCREEN_OUT_e
Flags used to control out of screen checks.
Definition d_actor.hpp:75
@ SKIP_SCREEN_CHECK
The actor position is not checked against the screen boundaries.
Definition d_actor.hpp:78
@ SKIP_NONE
No checks are skipped.
Definition d_actor.hpp:76
@ SKIP_RIDE_CHECK
The actor's ride status is not checked.
Definition d_actor.hpp:79
@ SKIP_ACTOR_DELETE
The actor is not deleted if out of screen.
Definition d_actor.hpp:77
static bool getTrgToSrcDirNormal(float trgX, float srcX)
See getTrgToSrcDirFunc.
Definition d_actor.cpp:281
static void setSoftLight_Boss(m3d::bmdl_c &mdl)
Sets the soft light effect for bosses.
Definition d_actor.cpp:338
static const float smc_CULL_YLIMIT
The default max bound Y offset.
Definition d_actor.hpp:395
static void setSoftLight_Player(m3d::bmdl_c &mdl)
Sets the soft light effect for players.
Definition d_actor.cpp:322
virtual float calcEatScaleRate(dActor_c *eatingActor)
Computes the scaling rate during eating.
Definition d_actor.cpp:663
mVec2_c m_1eb
Definition d_actor.hpp:347
static dAcPy_c * searchNearPlayerLoop(mVec2_c &delta, const mVec2_c &pos)
See searchNearPlayerFunc.
Definition d_actor.cpp:222
static u16 m_tmpCtEventNums
Temporary storage for the next created sprite actor's tracked event IDs. See mEventNums.
Definition d_actor.hpp:412
u8 mKind
The actor's kind. Value is a STAGE_ACTOR_KIND_e.
Definition d_actor.hpp:376
virtual void funsuiMoveX()
Definition d_actor.hpp:159
u8 mEatState
The actor's eat state. Value is a EAT_STATE_e.
Definition d_actor.hpp:367
static void changePosAngle(mVec3_c *pos, mAng3_c *ang, int param3)
Adjusts the actor's position to account for looping stages.
Definition d_actor.cpp:298
bool areaCullCheck(const mVec3_c &pos, const mBoundBox &bound, u8 areaID) const
Checks if the actor should be culled due to zone limits.
Definition d_actor.cpp:379
u8 mDirection
The actor's facing direction.
Definition d_actor.hpp:353
dCc_c mCc
The actor-to-actor collision sensor.
Definition d_actor.hpp:343
static dAcPy_c * searchNearPlayerNormal(mVec2_c &delta, const mVec2_c &pos)
See searchNearPlayerFunc.
Definition d_actor.cpp:200
EAT_BEHAVIOR_e
The possible actor behaviors when eaten by Yoshi.
Definition d_actor.hpp:36
@ EAT_TYPE_ICEBALL
Yoshi can spit an iceball after eating the actor.
Definition d_actor.hpp:42
@ EAT_TYPE_EAT
The actor can be eaten and then spat out.
Definition d_actor.hpp:38
@ EAT_TYPE_UNK3
Unknown behaviour. Used on Fruits, Pokeys and Giant Fuzzies.
Definition d_actor.hpp:40
@ EAT_TYPE_NONE
The actor cannot be eaten.
Definition d_actor.hpp:37
@ EAT_TYPE_FIREBALL
Yoshi can spit a fireball after eating the actor.
Definition d_actor.hpp:41
@ EAT_TYPE_EAT_PERMANENT
The actor is consumed permanently after being eaten (default).
Definition d_actor.hpp:39
virtual bool ActorDrawCullCheck()
Checks if the actor is out of view.
Definition d_actor.cpp:443
dAcPy_c * searchCarryFukidashiPlayer(int fukidashiAction)
Searches the closest player who has not yet performed the given action.
Definition d_actor.cpp:550
static void setSearchNearPlayerFunc(int loopType)
Sets the player search function to be used for the level.
Definition d_actor.cpp:182
mVec2_c mVisibleAreaSize
The size of the area inside which the actor is visible.
Definition d_actor.hpp:349
u32 mThrowDirection
The actor's direction when thrown or dropped after carrying.
Definition d_actor.hpp:336
virtual void removeCc()
Disables the actor's collision.
Definition d_actor.cpp:799
virtual int preCreate()
pre method for the create operation.
Definition d_actor.cpp:85
static dAcPy_c * searchNearPlayer_Main(mVec2_c &delta, const mVec2_c &pos)
See searchNearPlayerFunc.
Definition d_actor.cpp:196
virtual void vfb4()
Definition d_actor.cpp:691
static u8 mDrawStopReq
The actor kinds for which the draw operation is requested to be disabled.
Definition d_actor.hpp:401
bool mBackFence
Whether the actor is on the back side of chainlink fences.
Definition d_actor.hpp:381
dAcPy_c *(* searchNearPlayerFunc)(mVec2_c &delta, const mVec2_c &pos)
Gets the closest player to the given position and its distance.
Definition d_actor.hpp:264
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
Definition d_actor.cpp:123
virtual void eatMove(dActor_c *eatingActor)
Updates the actor's position during eating actions.
Definition d_actor.cpp:682
int mAttentionMode
Definition d_actor.hpp:372
static void setGetTrgToSrcDirFunc(int loopType)
Sets the direction detection function to be used for the level.
Definition d_actor.cpp:268
u8 mEatBehaviour
The actor's eat behaviour. Value is a EAT_BEHAVIOR_e.
Definition d_actor.hpp:368
u8 mAreaNo
The actor's zone ID.
Definition d_actor.hpp:354
void setKind(u8 kind)
Sets the actor's kind. See STAGE_ACTOR_KIND_e.
Definition d_actor.cpp:177
virtual int preExecute()
pre method for the execute operation.
Definition d_actor.cpp:105
virtual void allEnemyDeathEffSet()
Spawns the visual effects for when all players reach the flagpole and all enemies are cleared.
Definition d_actor.cpp:580
static void setSoftLight_Item(m3d::bmdl_c &mdl)
Sets the soft light effect for items.
Definition d_actor.cpp:342
virtual const char * getKindString() const
Gets the base's kind string.
Definition d_actor.cpp:158
s8 mPlayerNo
The player associated with the actor, -1 if not associated to any player.
Definition d_actor.hpp:377
bool ActorScrOutCheck(u16 flags)
Checks if the actor is out of gameplay and optionally deletes it.
Definition d_actor.cpp:412
u32 mComboMultiplier
The current combo multiplier obtained by the actor by colliding with other actors.
Definition d_actor.hpp:337
virtual void cancelFunsuiActSide(int)
Definition d_actor.cpp:695
virtual void cancelFunsuiActVanish()
Definition d_actor.cpp:697
virtual void setEatMouth(dActor_c *eatingActor)
Callback for when the actor is being eaten.
Definition d_actor.cpp:619
u32 mEatenByID
The unique identifier of the eating actor.
Definition d_actor.hpp:366
bool carryFukidashiCheck(int fukidashiAction, mVec2_c fukidashiTriggerSize)
Checks if the prompt for the given action should be displayed for each player.
Definition d_actor.cpp:474
virtual void waterSplashEffect(const mVec3_c &pos, float size)
Generates a water splash effect.
Definition d_actor.cpp:730
void killActor(s8 playerId, int noScore)
Kills the actor and optionally awards points to one or all players.
Definition d_actor.cpp:586
virtual void setEatTongueOff(dActor_c *eatingActor)
Callback for when the eating action is canceled.
Definition d_actor.cpp:617
virtual void block_hit_init()
Callback for when a block directly beneath the actor is hit.
Definition d_actor.cpp:578
u64 mEventMask
The event mask, generated from mEventNums.
Definition d_actor.hpp:360
EAT_STATE_e
The possible actor eat states.
Definition d_actor.hpp:27
@ EAT_STATE_EATING
The actor is in the process of being eaten.
Definition d_actor.hpp:29
@ EAT_STATE_SPAT
The actor has been spat out.
Definition d_actor.hpp:32
@ EAT_STATE_SPIT
The actor is about to be spat out. Used for spitting out players when Yoshi is dismounted.
Definition d_actor.hpp:31
@ EAT_STATE_NONE
The actor is not being eaten.
Definition d_actor.hpp:28
@ EAT_STATE_EATEN
The actor has been successfully eaten.
Definition d_actor.hpp:30
bool checkCarried(int *playerNum)
Returns whether the actor is being carried by a player.
Definition d_actor.cpp:783
dActor_c()
Constructs a new actor.
Definition d_actor.cpp:46
bool checkBgColl()
Returns whether the actor is colliding with any enabled collision sides.
Definition d_actor.cpp:456
virtual void yoganSplashEffect(const mVec3_c &pos, float size)
Generates a lava splash effect.
Definition d_actor.cpp:749
BG_COLL_FLAG_e
The collision directions that an actor can respond to.
Definition d_actor.hpp:60
@ COLL_FOOT
The actor can collide with the ground.
Definition d_actor.hpp:65
@ COLL_HEAD
The actor can collide with ceilings.
Definition d_actor.hpp:62
@ COLL_WALL_L
The actor can collide with walls on its left.
Definition d_actor.hpp:63
@ COLL_WALL_R
The actor can collide with walls on its right.
Definition d_actor.hpp:64
@ COLL_NONE
The actor does not collide with any surface.
Definition d_actor.hpp:61
static const float smc_CULL_AREA_YLIMIT
The default max bound Y size.
Definition d_actor.hpp:397
dRc_c mRc
The actor's ride surface manager.
Definition d_actor.hpp:345
u16 mSpriteSpawnFlags
The spawn flags from the sprite data entry.
Definition d_actor.hpp:363
ACTOR_SPAWN_FLAG_e
Information related to actor spawning.
Definition d_actor.hpp:69
@ ACTOR_SPAWNED
The actor is spawned.
Definition d_actor.hpp:70
@ ACTOR_NO_RESPAWN
The actor must not respawn after deletion.
Definition d_actor.hpp:71
virtual void calcEatInScale(dActor_c *eatingActor)
Adjusts the actor's scale while being eaten.
Definition d_actor.cpp:673
u32 mCarryFukidashiPlayerNo
The player for whom an action prompt related to the actor is being displayed. -1 if no players meet t...
Definition d_actor.hpp:334
virtual bool vf68(dBg_ctr_c *collider)
Unknown, related to collision.
Definition d_actor.hpp:105
virtual int preDraw()
pre method for the draw operation.
Definition d_actor.cpp:141
u32 mAttentionFlags
Definition d_actor.hpp:373
virtual s8 * getPlrNo()
Gets the player number associated with the actor. See mPlayerNo.
Definition d_actor.hpp:106
virtual void setAfterEatScale()
Restores the actor's scale once spat out.
Definition d_actor.cpp:646
static bool screenCullCheck(const mVec3_c &pos, const mBoundBox &visibleBound, mBoundBox destroyBound, u8 areaID)
Checks if the actor should be culled due to being outside the screen.
static const mVec2_c smc_FUKIDASHI_RANGE
The default trigger area size for displaying action prompts.
Definition d_actor.hpp:398
virtual bool setEatSpitOut(dActor_c *eatingActor)
Callback for when the actor is about to be spat out.
Definition d_actor.cpp:621
STAGE_ACTOR_KIND_e
The possible stage actor kinds.
Definition d_actor.hpp:46
@ STAGE_ACTOR_GENERIC
A generic stage actor (default).
Definition d_actor.hpp:47
@ STAGE_ACTOR_YOSHI
The Yoshi actor.
Definition d_actor.hpp:49
@ STAGE_ACTOR_PLAYER
The player actor.
Definition d_actor.hpp:48
@ STAGE_ACTOR_ENTITY
An interactable entity actor.
Definition d_actor.hpp:50
u32 m_23b
Definition d_actor.hpp:362
virtual void calcSpitOutPos(dActor_c *eatingActor)
Calculates the position where the actor will be spat out.
Definition d_actor.cpp:650
static void setChangePosAngleFunc(int loopType)
Sets the position update function to be used for the level.
Definition d_actor.cpp:302
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
Definition d_actor.cpp:154
virtual int preDelete()
pre method for the delete operation.
Definition d_actor.cpp:93
u16 mEventNums
The event IDs the actor is tracking.
Definition d_actor.hpp:359
static const float smc_CULL_XLIMIT
The default max bound X offset.
Definition d_actor.hpp:394
u16 * mpDeleteVal
Definition d_actor.hpp:358
static searchNearPlayerFunc mSearchNearPlayerFunc
The player search function.
Definition d_actor.hpp:404
u8 mLayer
The actor's layer.
Definition d_actor.hpp:379
mVec2_c mVisibleAreaOffset
The offset applied to the area size.
Definition d_actor.hpp:350
bool(* getTrgToSrcDirFunc)(float trgX, float srcX)
Gets the direction the target position is in, from the source position's viewpoint.
Definition d_actor.hpp:273
~dActor_c()
Destroys the actor.
Definition d_actor.cpp:81
mBoundBox mMaxBound
Definition d_actor.hpp:351
u8 mBgCollFlags
The collision directions that the actor can respond to.
Definition d_actor.hpp:355
static u8 mDrawStop
The actor kinds for which the draw operation is currently disabled.
Definition d_actor.hpp:403
EAT_POINTS_e mEatPoints
The score awarded when the actor is eaten by Yoshi.
Definition d_actor.hpp:371
mBoundBox mDestroyBound
Definition d_actor.hpp:352
mVec3_c getCenterPos() const
Gets the actor's centered position.
dBaseActor_c()
Constructs a new actor.
dBase_c()
Constructs a new base.
Definition d_base.cpp:13
Definition d_bc.hpp:5
Collider ("Collision Check") class - handles collisions between actors.
Definition d_cc.hpp:12
Definition d_rc.hpp:10
MAIN_STATE_e
The possible operation results.
Definition f_base.hpp:33
A three-dimensional short angle vector.
Definition m_angle.hpp:59
A two-dimensional floating point vector.
Definition m_vec.hpp:9
A three-dimensional floating point vector.
Definition m_vec.hpp:100
const u8 l_Ami_Line[]
The sub-layer for each side of chainlink fences.
Definition d_actor.cpp:38
const float l_Ami_Zpos[]
The additional Z offset for each side of chainlink fences.
Definition d_actor.cpp:39
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32