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