NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_player_base.hpp
1#pragma once
2
3#include <game/bases/d_actor.hpp>
4#include <game/bases/d_a_player_data.hpp>
5#include <game/bases/d_a_player_hio.hpp>
6#include <game/bases/d_ac_py_key.hpp>
7#include <game/bases/d_cc.hpp>
8#include <game/bases/d_player_model_manager.hpp>
9#include <game/bases/d_quake.hpp>
10#include <game/mLib/m_3d.hpp>
11#include <game/sLib/s_State.hpp>
12#include <game/bases/d_effect.hpp>
15
16/**
17 * @brief The base class for the player and Yoshi.
18 * @statetable
19 */
20class daPlBase_c : public dActor_c {
21public:
22 enum DamageType_e {
23 DAMAGE_DEFAULT,
24 DAMAGE_BG,
25 DAMAGE_2,
26 DAMAGE_HIP_ATTACK,
27 DAMAGE_4,
28 DAMAGE_CLIMB,
29 DAMAGE_6,
30 DAMAGE_YOGAN,
31 DAMAGE_8,
32 DAMAGE_ELEC_SHOCK,
33 DAMAGE_POISON,
34 DAMAGE_SQUISH,
35 DAMAGE_EAT_DIE,
36 DAMAGE_D,
37 DAMAGE_E,
38 DAMAGE_FREEZE,
39 DAMAGE_10,
40 DAMAGE_11,
41 DAMAGE_POISON_FOG
42 };
43
44 enum DokanDir_e {
45 DOKAN_U,
46 DOKAN_D,
47 DOKAN_L,
48 DOKAN_R,
49 DOKAN_ROLL
50 };
51
52 enum StarSet_e {
53 STAR_SET_0,
54 STAR_SET_1,
55 STAR_SET_2
56 };
57
58 /// @brief Blending modes for animations.
60 BLEND_NONE, ///< Do not blend between animations.
61 BLEND_DEFAULT ///< Use the default blend duration specified in the animation HIO.
62 };
63
64 enum ClearType_e {
65 CLEAR_TYPE_GOAL,
66 CLEAR_TYPE_BOSS,
67 CLEAR_TYPE_FINAL_BOSS
68 };
69
70 enum BgPress_e {
71 BG_PRESS_FOOT = 9,
72 BG_PRESS_HEAD,
73 BG_PRESS_R,
74 BG_PRESS_L,
75 BG_PRESS_COUNT
76 };
77
78 /// @unofficial
80 GROUND_TYPE_DEFAULT,
81 GROUND_TYPE_SNOW,
82 GROUND_TYPE_SAND,
83 GROUND_TYPE_ICE,
84 GROUND_TYPE_DIRT,
85 GROUND_TYPE_WATER,
86 GROUND_TYPE_CLOUD,
87 GROUND_TYPE_FUNSUI,
88 GROUND_TYPE_MANTA,
89 GROUND_TYPE_BEACH,
90 GROUND_TYPE_CARPET,
91 GROUND_TYPE_LEAF,
92 GROUND_TYPE_WOOD
93 };
94
95 /// @unofficial
97 SLIP_ACTION_NONE,
98 SLIP_ACTION_STOOP,
99 SLIP_ACTION_END
100 };
101
102 /// @unofficial
104 HIP_ACTION_READY,
105 HIP_ACTION_ATTACK_START,
106 HIP_ACTION_ATTACK_FALL,
107 HIP_ACTION_GROUND,
108 HIP_ACTION_STAND_NORMAL,
109 HIP_ACTION_STAND_NORMAL_END,
110 HIP_ACTION_TO_STOOP
111 };
112
113 /// @unofficial
115 JUMP_DAI_MOVE_DOWN, ///< Moving down on the player or spring.
116 JUMP_DAI_HIGH_JUMP, ///< The jump button was pressed to do a higher jump.
117 };
118
119 /// @unofficial
121 FUNSUI_ACTION_NONE,
122 FUNSUI_ACTION_START
123 };
124
125 /// @unofficial
127 ANIME_PLAY_ACTION_0,
128 ANIME_PLAY_ACTION_1,
129 ANIME_PLAY_ACTION_2
130 };
131
132 /// @unofficial
134 DEMO_0,
135 DEMO_1,
136 DEMO_2,
137 DEMO_3,
138 DEMO_PLAYER,
139 DEMO_KINOPIO,
140 DEMO_ENDING_DANCE
141 };
142
143 /// @unofficial
145 DEMO_DOKAN_NONE,
146 DEMO_DOKAN_NORMAL,
147 DEMO_DOKAN_RAIL,
148 DEMO_DOKAN_WATER_TANK
149 };
150
151 /// @brief Arguments for transitioning to the @ref StateID_Crouch "crouch" state.
152 /// @unofficial
154 CROUCH_ARG_FROM_WALK, ///< Crouching while already on the ground.
155 CROUCH_ARG_FROM_OTHER, ///< Crouching after a slide or a ground pound.
156 CROUCH_ARG_FROM_SIT_JUMP ///< Landing from a crouch jump.
157 };
158
159 /// @brief Arguments for transitioning to the @ref StateID_HipAttack "ground pound" state.
160 /// @unofficial
162 HIP_ATTACK_ARG_PLAYER, ///< A regular player is doing a ground pound.
163 HIP_ATTACK_ARG_ITEM_KINOPIO ///< The rescue Toad is doing a ground pound out of the item block. @unused
164 };
165
166 /// @brief Arguments for transitioning to the @ref StateID_Swim "swim" state.
167 /// @unofficial
169 SWIM_ARG_INITIAL, ///< Already in water at the start of the swim action.
170 SWIM_ARG_ENTERING, ///< Just entered the water.
171 SWIM_ARG_FIREBALL, ///< Player was about to shoot a fireball, shoot it while in water.
172 SWIM_ARG_CLIFF_HANG ///< Falling from a cliff into water.
173 };
174
175 /// @brief Arguments for transitioning to the @ref StateID_Kani "cliff" state.
176 /// @unofficial
178 KANI_ARG_WALK, ///< Standing on the cliff and walking.
179 KANI_ARG_HANG, ///< Landing high enough on the cliff to stand on it, but hang down from it instead.
180 KANI_ARG_JUMP_HANG, ///< Falling onto the cliff, immediately hang from it.
181 KANI_ARG_WALK_FORCE, ///< Standing on the cliff, disallow immediately hanging from it by holding down.
182 KANI_ARG_HANG_UP_VINE, ///< Climbing onto the cliff from a vine.
183 KANI_ARG_HANG_HAND ///< Catching the cliff from below, hang from it.
184 };
185
186 /// @brief Arguments for transitioning to the @ref StateID_AnimePlay "animation" state.
187 /// @unofficial
189 DEMO_ANIME_NORMAL,
190 DEMO_ANIME_BOSS_SET_UP,
191 DEMO_ANIME_BOSS_GLAD,
192 DEMO_ANIME_BOSS_ATTENTION,
193 DEMO_ANIME_BOSS_KEY_GET,
194 DEMO_ANIME_BOSS_GLAD_2
195 };
196
197 /// @brief Arguments for transitioning to the @ref StateID_DemoWait "demo wait" state.
198 /// @unofficial
200 DEMO_WAIT_ARG_TO_NONE,
201 DEMO_WAIT_ARG_TO_CONTROL
202 };
203
204 /// @unofficial
206 DEMO_WAIT_DELAY,
207 DEMO_WAIT_TRANSITION
208 };
209
210 /// @unofficial
212 DOKAN_TYPE_NORMAL,
213 DOKAN_TYPE_CONNECTED,
214 DOKAN_TYPE_MINI
215 };
216
217 /// @unofficial
219 DEMO_DOWN_ARG_HIT,
220 DEMO_DOWN_ARG_TIME_UP,
221 DEMO_DOWN_ARG_POISON,
222 DEMO_DOWN_ARG_POISON_FOG
223 };
224
225 /// @unofficial
227 GOAL_DEMO_ACTION_POLE,
228 GOAL_DEMO_ACTION_WAIT,
229 GOAL_DEMO_ACTION_KIME_POSE,
230 GOAL_DEMO_ACTION_RUN
231 };
232
233 /// @unofficial
235 GOAL_DEMO_POLE_SWING, ///< Swinging around the pole to the other side.
236 GOAL_DEMO_WAIT_BELOW_PLAYER, ///< Waiting for the player below to slide far enough down the pole to not be in the way of this player.
237 GOAL_DEMO_POLE_SLIDE, ///< Sliding down the pole.
238 GOAL_DEMO_POLE_WAIT_JUMP, ///< Waiting at the bottom of the pole to jump off.
239 GOAL_DEMO_POLE_JUMP, ///< Jumping off the pole.
240 GOAL_DEMO_POLE_LAND, ///< Playing the landing animation after landing.
241 GOAL_DEMO_POLE_WAIT_TURN, ///< Waiting #sc_DemoPoleWaitTurn frames to turn toward the screen.
242 GOAL_DEMO_POLE_TURN, ///< Turning toward the screen.
243 GOAL_DEMO_POLE_WAIT_END ///< Waiting #sc_DemoPoleWaitEnd frames before transitioning to the course clear dance.
244 };
245
246 /// @unofficial
248 KIME_POSE_NONE,
249 KIME_POSE_WITH_HAT,
250 KIME_POSE_PENGUIN,
251 KIME_POSE_NO_HAT,
252 KIME_POSE_PROPELLER
253 };
254
255 /// @unofficial
257 CONTROL_DEMO_WAIT,
258 CONTROL_DEMO_WALK,
259 CONTROL_DEMO_REGULAR_ANIM,
260 CONTROL_DEMO_CUTSCENE_ANIM,
261 CONTROL_DEMO_4,
262 CONTROL_DEMO_KINOPIO_WALK,
263 CONTROL_DEMO_KINOPIO_SWIM,
264 CONTROL_DEMO_KINOPIO_SINK_SAND,
265 CONTROL_DEMO_ENDING_DANCE,
266 };
267
268 /// @unofficial
270 POWER_CHANGE_NORMAL,
271 POWER_CHANGE_ICE,
272 POWER_CHANGE_LOW_SLIP
273 };
274
275 /// @unofficial
277 SQUISH_OFF,
278 SQUISH_INIT,
279 SQUISH_SET_REDUCTION,
280 SQUISH_ANIMATION
281 };
282
283 /// @unofficial
285 BGC_FOOT = BIT_FLAG(0), ///< Colliding with the foot sensor.
286 BGC_HEAD = BIT_FLAG(1), ///< Colliding with the head sensor.
287 BGC_WALL = BIT_FLAG(2), ///< Colliding with the wall sensor.
288 BGC_WALL_TOUCH_L = BIT_FLAG(3),
289 BGC_WALL_TOUCH_R = BIT_FLAG(4),
290 BGC_WALL_TOUCH_L_2 = BIT_FLAG(5),
291 BGC_WALL_TOUCH_R_2 = BIT_FLAG(6),
292 BGC_OBJBG_TOUCH_L = BIT_FLAG(7), ///< Touching a background object on the left.
293 BGC_OBJBG_TOUCH_R = BIT_FLAG(8), ///< Touching a background object on the right.
294 BGC_OBJBG_TOUCH_CARRIED_L = BIT_FLAG(9), ///< The touching background object on the left is being carried by a player.
295 BGC_OBJBG_TOUCH_CARRIED_R = BIT_FLAG(10), ///< The touching background object on the right is being carried by a player.
296 BGC_11 = BIT_FLAG(11),
297 BGC_12 = BIT_FLAG(12),
298 BGC_13 = BIT_FLAG(13),
299 BGC_WATER_SHALLOW = BIT_FLAG(14), ///< At least slightly inside of water (hip height or higher).
300 BGC_WATER_TOUCH = BIT_FLAG(15), ///< At least touching water.
301 BGC_WATER_SUBMERGED = BIT_FLAG(16), ///< Fully submerged in water.
302 BGC_ON_WATER_MOVE = BIT_FLAG(17), ///< On water by being mini or sliding with the penguin suit.
303 BGC_WATER_BUBBLE = BIT_FLAG(18), ///< Inside a floating water bubble.
304 BGC_SIDE_LIMIT_L = BIT_FLAG(19),
305 BGC_SIDE_LIMIT_R = BIT_FLAG(20),
306 BGC_ON_SNOW = BIT_FLAG(22),
307 BGC_ON_ICE = BIT_FLAG(23),
308 BGC_ON_ICE_LOW_SLIP = BIT_FLAG(24),
309 BGC_SLOPE_AND_HEAD = BIT_FLAG(25),
310 BGC_ON_SAND = BIT_FLAG(26),
311 BGC_ON_SINK_SAND = BIT_FLAG(27),
312 BGC_IN_SINK_SAND = BIT_FLAG(28),
313 BGC_INSIDE_SINK_SAND = BIT_FLAG(29),
314 BGC_ON_BELT_L = BIT_FLAG(30),
315 BGC_ON_BELT_R = BIT_FLAG(31)
316 };
317
318 /// @unofficial
320 BGC_SEMISOLID = BIT_FLAG(0),
321 BGC_LIFT = BIT_FLAG(1), ///< [Figure out a better name for this].
322 BGC_HANG_ROPE = BIT_FLAG(2),
323 BGC_AUTOSLIP = BIT_FLAG(3),
324 BGC_36 = BIT_FLAG(4),
325 BGC_GROUNDED_MOVE_UP = BIT_FLAG(5),
326 BGC_37 = BIT_FLAG(6), ///< Cannot wall kick or ground pound while this is set.
327 BGC_SLOPE = BIT_FLAG(7),
328 BGC_CLIFF = BIT_FLAG(8),
329 BGC_CLIFF_ABOVE_1 = BIT_FLAG(9),
330 BGC_CLIFF_ABOVE_2 = BIT_FLAG(10),
331 BGC_CAN_CLIMB = BIT_FLAG(11),
332 BGC_44 = BIT_FLAG(12),
333 BGC_VINE_TOUCH_FULL = BIT_FLAG(13), ///< Fully touching a vine / mesh net / rock wall.
334 BGC_VINE_TOUCH_U = BIT_FLAG(14), ///< Touching a vine / mesh net / rock wall on the top.
335 BGC_VINE_TOUCH_D = BIT_FLAG(15), ///< Touching a vine / mesh net / rock wall on the bottom.
336 BGC_VINE_TOUCH_2 = BIT_FLAG(16),
337 BGC_VINE_TOUCH = BIT_FLAG(17), ///< Touching a vine / mesh net / rock wall on any side.
338 BGC_VINE_TOUCH_L = BIT_FLAG(19), ///< Touching a vine / mesh net / rock wall on the left.
339 BGC_VINE_TOUCH_R = BIT_FLAG(20), ///< Touching a vine / mesh net / rock wall on the right.
340 BGC_NON_BREAK_BLOCK_HIT = BIT_FLAG(21),
341 BGC_COIN_BLOCK_HIT = BIT_FLAG(22),
342 BGC_PRESS_HEAD_HIT = BIT_FLAG(23),
343 BGC_BLOCK_HIT = BIT_FLAG(24),
344 BGC_57 = BIT_FLAG(25),
345 BGC_58 = BIT_FLAG(26),
346 BGC_LINE_BLOCK_HIT = BIT_FLAG(27),
347 BGC_60 = BIT_FLAG(28),
348 BGC_61 = BIT_FLAG(29),
349 BGC_62 = BIT_FLAG(30),
350 BGC_63 = BIT_FLAG(31)
351 };
352
353 /// @brief The status IDs to be used with onStatus(), offStatus(), isStatus() and setStatus().
354 /// @unofficial
355 enum Status_e {
356 STATUS_CREATED, ///< The player was created.
357 STATUS_CAN_EXECUTE, ///< The player can execute this frame or not.
358 STATUS_NO_ANIM, ///< Don't play any animations.
359 STATUS_DISABLE_STATE_CHANGE, ///< Disallow state changes.
360 STATUS_OUT_OF_PLAY, ///< The player is in a bubble or has died.
361 STATUS_ALL_DOWN_FADE, ///< All players have died and the screen is transitioning.
362 STATUS_STUNNED, ///< Stunned by electric shock or ice.
363 STATUS_07, ///< [Ice related]
364 STATUS_QUAKE, ///< The player was stunned by an earthquake.
365 STATUS_JUMP = 0x0a, ///< The player is jumping.
366 STATUS_CAN_PENGUIN_SLIDE, ///< If the player can start sliding as a penguin.
367 STATUS_STAR_JUMP, ///< The player is jumping while in star mode.
368 STATUS_KANI_JUMP, ///< The player is doing a crab jump on a cliff.
369 STATUS_SINK_SAND_JUMP, ///< The player is jumping while in sinking sand.
370 STATUS_SIT_JUMP, ///< The player is doing a sitting jump.
371 STATUS_YOSHI_DISMOUNT_JUMP, ///< The player is doing a jump to dismount Yoshi.
372 STATUS_CANNON_JUMP, ///< The player is flying out of a pipe cannon.
373 STATUS_WAIT_JUMP, ///< The player is doing a small hop after being affected by a small quake.
374 STATUS_WALL_SLIDE, ///< The player is sliding down a wall.
375 STATUS_BIG_JUMP, ///< The player is doing a jump on a spring or another player.
376 STATUS_SPRING_JUMP, ///< The player is doing a jump on a springboard.
377 STATUS_PLAYER_JUMP, ///< The player is doing a jump on another player.
378 STATUS_17, ///< [Dokan related]
379 STATUS_THROW, ///< The player is throwing something.
380 STATUS_KANI_WALK, ///< The player is doing a crab walk on a cliff.
381 STATUS_SLOPE_HEAD_PUSH_L, ///< The player cannot move further left on a slope because of a ceiling.
382 STATUS_SLOPE_HEAD_PUSH_R, ///< The player cannot move further right on a slope because of a ceiling.
383 STATUS_HIP_ATTACK_FALL, ///< The player is falling while ground pounding.
384 STATUS_HIP_ATTACK_LAND, ///< The player has landed after ground pounding. Only active on one frame.
385 STATUS_HIP_ATTACK_STAND_UP, ///< The player is standing up after ground pounding. Only active on one frame.
386 STATUS_SPIN_HIP_ATTACK_FALL, ///< The player is falling while doing a down spin.
387 STATUS_SPIN_HIP_ATTACK_LANDED,
388 STATUS_SPIN_HIP_ATTACK_LANDING,
389 STATUS_PRESS_ATTACH, ///< The player is is attached to a enemy while ground pounding or doing a down spin. [Used for the big goombas].
390 STATUS_HIP_ATTACK_DAMAGE_PLAYER, ///< The player was ground pounded by another player.
391 STATUS_24,
392 STATUS_PROPEL = 0x26, ///< The player is flying with the propeller suit.
393 STATUS_PROPEL_UP, ///< The player is flying upwards with the propeller suit.
394 STATUS_PROPEL_SLOW_FALL = 0x29, ///< The player will fall slowly while spinning down with the propeller suit.
395 STATUS_PROPEL_NO_ROLL, ///< Don't rotate the player because of the propeller suit.
396 STATUS_SPIN, ///< The player is spinning, either from a spin jump, a propeller spin (upwards or downwards) or screw spinning.
397 STATUS_IS_SPIN_HOLD_REQ, ///< If the player spins, stay in place. [Used for the twisting screws].
398 STATUS_TWIRL, ///< The player is twirling in midair.
399 STATUS_WAS_TWIRL, ///< The player was twirling in midair the previous frame.
400 STATUS_SLIP_ACTIVE = 0x30, ///< The player is sliding.
401 STATUS_31,
402 STATUS_32,
403 STATUS_VINE, ///< The player is clinging to a vine / mesh net / rock wall.
404 STATUS_HANG, ///< The player is hanging from a ceiling rope.
405 STATUS_POLE, ///< The player is climbing a pole.
406 STATUS_TARZAN_ROPE,
407 STATUS_KANI_HANG, ///< The player is hanging from a cliff.
408 STATUS_KANI_HANG_ANIMATION, ///< The player is animating into the hanging pose on a cliff.
409 STATUS_39, ///< [Swim related]
410 STATUS_SWIM, ///< The player is swimming.
411 STATUS_PENGUIN_SWIM, ///< The player is swimming with the penguin suit.
412 STATUS_PENGUIN_SLIDE, ///< The player is sliding with the penguin suit.
413 STATUS_PENGUIN_SLIDE_JUMP, ///< The player is doing a penguin slide jump.
414 STATUS_INITIAL_SLIDE, ///< The player is in an initial slide action. [Used in 6-6 to slide all the way down automatically].
415 STATUS_PENGUIN_RECOIL, ///< The player is bouncing back after hitting an enemy that cannot be killed by a penguin slide.
416 STATUS_40, ///< [Water jump?]
417 STATUS_SWIM_AGAINST_JET_H, ///< The player is swimming against a horizontal water jet stream.
418 STATUS_SWIM_AGAINST_JET_V, ///< The player is swimming against a vertical water jet stream.
419 STATUS_WIND_AIRBORNE, ///< The player is airborne while in a wind zone.
420 STATUS_45 = 0x45,
421 STATUS_46,
422 STATUS_47,
423 STATUS_48,
424 STATUS_49,
425 STATUS_4A,
426 STATUS_RIDE_YOSHI, ///< The player is riding Yoshi.
427 STATUS_JUMP_DAI_COOLDOWN = 0x4d, ///< The player recently failed to perform a big jump because of a ceiling.
428 STATUS_4E,
429 STATUS_4F,
430 STATUS_50,
431 STATUS_51,
432 STATUS_52,
433 STATUS_53,
434 STATUS_54,
435 STATUS_55,
436 STATUS_56,
437 STATUS_57,
438 STATUS_RIDE_NUT_2,
439 STATUS_RIDE_NUT,
440 STATUS_5A,
441 STATUS_5B,
442 STATUS_5C,
443 STATUS_EXTRA_PUSH_FORCE,
444 STATUS_5E,
445 STATUS_5F,
446 STATUS_ENEMY_STAGE_CLEAR, ///< The player has cleared an enemy ambush.
447 STATUS_JUMP_COUNT_INCREASED, ///< The @ref mJumpComboTimer "jump combo counter" was incremented this frame.
448 STATUS_62,
449 STATUS_63,
450 STATUS_64,
451 STATUS_GOAL_POLE_TOUCHED, ///< The player has touched the goal pole.
452 STATUS_GOAL_POLE_WAIT_BELOW_PLAYER, ///< The player is waiting for the player below to slide down the goal pole.
453 STATUS_GOAL_POLE_CAN_SLIDE, ///< The player can start sliding down the goal pole.
454 STATUS_GOAL_POLE_FINISHED_SLIDE_DOWN, ///< The player has reached the bottom of the goal pole after sliding down.
455 STATUS_GOAL_POLE_READY_FOR_JUMP_OFF, ///< The player is ready to jump off the goal pole.
456 STATUS_GOAL_POLE_TURN, ///< The player is turning toward the screen after jumping off the goal pole.
457 STATUS_6B,
458 STATUS_6C,
459 STATUS_6D,
460 STATUS_6E,
461 STATUS_GOAL_POLE_NOT_GOAL_NO_MOVE, ///< The player did not reach the goal pole in time and mustn't move anymore.
462 STATUS_70,
463 STATUS_71,
464 STATUS_72,
465 STATUS_73,
466 STATUS_74,
467 STATUS_ENDING_DANCE_AUTO,
468 STATUS_DEMO_NEXT_GOTO_BLOCK, ///< The player is transitioning after touching a next goto area.
469 STATUS_77,
470 STATUS_78,
471 STATUS_79,
472 STATUS_7A,
473 STATUS_STOP_EXECUTE = 0x7d, ///< Stop executing this player indefinitely.
474 STATUS_7E,
475 STATUS_7F,
476 STATUS_80,
477 STATUS_81,
478 STATUS_82,
479 STATUS_83,
480 STATUS_84,
481 STATUS_85,
482 STATUS_86,
483 STATUS_AUTO_BOUNCE,
484 STATUS_88,
485 STATUS_89,
486 STATUS_8A,
487 STATUS_QUAKE_BIG, ///< A big quake that stuns the player was triggered.
488 STATUS_QUAKE_SMALL, ///< A small quake that makes the player do a hop was triggered.
489 STATUS_8D, ///< [Cannon shot related]
490 STATUS_8E, ///< [Cannon shot related]
491 STATUS_CAN_LAND, ///< The player can land on Yoshi or another player.
492 STATUS_91 = 0x91,
493 STATUS_92,
494 STATUS_93,
495 STATUS_94,
496 STATUS_95,
497 STATUS_96,
498 STATUS_97,
499 STATUS_98,
500 STATUS_99,
501 STATUS_9B = 0x9b,
502 STATUS_9C,
503 STATUS_9D,
504 STATUS_9E,
505 STATUS_CAN_SPIN, ///< The player can shake the controller to do a spin jump or a propeller spin.
506 STATUS_A0,
507 STATUS_A1,
508 STATUS_A2,
509 STATUS_A3,
510 STATUS_A4,
511 STATUS_A5, ///< [Jump moving up?]
512 STATUS_FIREBALL_PREPARE_SHOOT, ///< The player is about to shoot a fireball.
513 STATUS_A7,
514 STATUS_A8,
515 STATUS_A9,
516 STATUS_AA,
517 STATUS_AB,
518 STATUS_FOLLOW_MAME_KURIBO, ///< Mini Goombas are attached to the player.
519 STATUS_IS_PENGUIN, ///< The player is in the penguin suit.
520 STATUS_HIP_ATTACK, ///< The player is in the ground pound action and is not yet about to stand back up.
521 STATUS_B3 = 0xb3, /// [Yoshi only?]
523 STATUS_ITEM_KINOPIO_DISPLAY_OUT,
524 STATUS_B7,
525 STATUS_B8,
526 STATUS_DISPLAY_OUT_DEAD, ///< The player is outside of the screen bounds and should die as a result.
527 STATUS_DISPLAY_OUT_NO_DAMAGE, ///< The player is outside of the screen bounds and should not be able to be attacked.
528 STATUS_INVISIBLE, ///< The player is invisible.
529 STATUS_INVULNERABLILITY_BLINK, ///< Skip drawing the player this frame to create a blinking effect.
530 STATUS_BD,
531 STATUS_BE,
532 STATUS_BF,
533 STATUS_C0,
534 STATUS_CAN_WATER_WALK, ///< The player can walk on water because of the mini mushroom.
535 STATUS_ON_WATER_MOVE, ///< The player is on water by being mini or sliding with the penguin suit.
536 STATUS_CAN_WATER_SLIDE, ///< The player can slide on water because of the penguin suit.
537 STATUS_C4,
538 STATUS_C5,
539 STATUS_C8 = 0xc8,
540 STATUS_C9,
541 STATUS_CA
542 };
543
544 class jmpInf_c {
545 public:
546 jmpInf_c(float speed, int jumpMode, AnmBlend_e blendMode) : mSpeed(speed), mJumpMode(jumpMode), mBlendMode(blendMode) {}
547 virtual ~jmpInf_c() {};
548
549 float mSpeed;
550 int mJumpMode;
551 AnmBlend_e mBlendMode;
552 };
553
554 typedef void (daPlBase_c::*ProcFunc)();
555
556 daPlBase_c();
557 virtual ~daPlBase_c();
558
559 virtual int create();
560 virtual int preExecute();
561 virtual int execute();
562 virtual void postExecute(fBase_c::MAIN_STATE_e status);
563 virtual int doDelete();
564 virtual int preDraw();
565 virtual int draw();
566
567 virtual void executeMain() {}
568 virtual void executeLastPlayer() {}
569 virtual void executeLastAll() {}
570 virtual bool isItemKinopio() { return false; }
571 virtual void setPowerup(PLAYER_POWERUP_e, int); ///< @unofficial
572 virtual u8 getTallType(s8);
573 virtual const sBcPointData *getHeadBgPointData() { return nullptr; };
574 virtual const sBcPointData *getWallBgPointData() { return nullptr; };
575 virtual const sBcPointData *getFootBgPointData() { return nullptr; };
576 virtual float getStandHeadBgPointY() { return 0.0f; }
577 virtual void checkBgCrossSub() {}
578 virtual void postBgCross();
579 virtual float getSandSinkRate() { return 0.0f; }
580 virtual void setReductionScale();
581 virtual void initStampReduction();
582 virtual void calcJumpDaiReductionScale(int, int);
583 virtual void setReductionBoyon();
584 virtual bool setPressBgDamage(int, int);
585 virtual bool setBalloonInDispOut(int) { return false; }
586 virtual bool isChange() { return false; }
587 virtual void changeNextScene(int);
588 virtual bool isEnableDokanInStatus();
589 virtual bool setHideNotGoalPlayer();
590 virtual int setDemoGoal(mVec3_c &landPos, float goalCastleX, u8 goalType);
591 virtual bool setDemoCannonWarp(int, short, short) { return false; }
592
593 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoNone); ///< Default demo state, checking for pipe entry. Argument: Whether to not force execution start (@p bool).
594 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoStartWait); ///< Course in default state. Argument: None.
595 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoWait); ///< Waiting before transitioning to StateID_DemoNone or StateID_DemoControl. Argument: See DemoWaitArg_e.
596 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoInDokanU); ///< Entering an area via a pipe above the player. Argument: Pipe type (DokanType_e).
597 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoInDokanD); ///< Entering an area via a pipe below the player. Argument: Pipe type (DokanType_e).
598 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoInDokanR); ///< Entering an area via a pipe to the right of the player. Argument: Pipe type (DokanType_e).
599 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoInDokanL); ///< Entering an area via a pipe to the left of the player. Argument: Pipe type (DokanType_e).
600 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutDokanU); ///< Leaving an area via a pipe above the player. Argument: None.
601 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutDokanD); ///< Leaving an area via a pipe below the player. Argument: None.
602 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutDokanR); ///< Leaving an area via a pipe to the right of the player. Argument: None.
603 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutDokanL); ///< Leaving an area via a pipe to the left of the player. Argument: None.
604 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutDokanRoll); ///< Leaving an area via a rolling hill pipe. Argument: None.
605 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoInWaterTank); ///< Entering an area via a water tank pipe. @unused Argument: Pipe type (DokanType_e).
606 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoOutWaterTank); ///< Leaving an area via a water tank pipe. @unused Argument: None.
607 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoRailDokan); ///< Transitioning between two rail pipes without leaving the area. Argument: None.
608 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoDown); ///< Death animation. Argument: See DemoDownArg_e.
609 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoNextGotoBlock); ///< Transition to a new area. Argument: Lower 8 bits: next goto ID, upper 8 bits: fader type (dFader_c::fader_type_e)
610 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoGoal); ///< Goal pole cutscene. Argument: Is Yoshi (@p bool).
611 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, DemoControl); ///< Cutscene controlling the player. Argument: See ControlDemoSubstate_e.
612
613 virtual void initialDokanUnder();
614 virtual void initialDokanUper();
615 virtual void initialDokanRight();
616 virtual void initialDokanLeft();
617 virtual void initialDokanUnderM();
618 virtual void initialDokanUperM();
619 virtual void initialDokanRightM();
620 virtual void initialDokanLeftM();
621 virtual void initialDokanDepth();
622 virtual void initialDoor();
623 virtual void initialFall();
624 virtual void initialVine();
625 virtual void initialJumpRight();
626 virtual void initialJumpLeft();
627 virtual void initialHipAttack();
628 virtual void initialSlip();
629 virtual void initialSwim();
630 virtual void initialBlockJump();
631 virtual void initialBlockJumpBelow();
632 virtual void initialTorideBoss();
633 virtual void initialNormal();
634
635 virtual void setCreateAction(int);
636 virtual bool setTimeOverDemo() { return false; }
637 virtual void setFallDownDemo() {}
638 virtual bool setDokanIn(DokanDir_e dir);
639 virtual void initDemoOutDokan();
640 virtual bool updateDemoKimePose(ClearType_e clearType);
641 virtual void initDemoGoalBase();
642 virtual void executeDemoGoal_Run();
643 virtual void initializeDemoControl() {}
644
645 /// @brief Transitions to a new state with the given state ID and argument.
646 /// @param stateID The ID of the state to transition to.
647 /// @param arg An optional argument to pass to the new state. The type of this argument depends on the state being transitioned to.
648 virtual void changeState(const sStateIDIf_c &stateID, void *arg);
649
650 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, None); ///< Default state, does nothing. Argument: None.
651 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Walk); ///< Player on the ground. Argument: Blending mode (AnmBlend_e).
652 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Jump); ///< Jumping. Argument: Jump information (jmpInf_c *).
653 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, SitJump); ///< Crouch jump. Argument: Should initiate jump (@p bool).
654 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Fall); ///< Falling. Argument: Should play animation (@p bool).
655 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Land); ///< Landing after a jump. Argument: @p bool [Unknown purpose, never read from].
656 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Crouch); ///< Crouching on the ground. Argument: See CrouchArg_e.
657 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Slip); ///< Sliding down a slope. Argument: None.
658 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Turn); ///< Turning around after running fast. Argument: None.
659 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, HipAttack); ///< Ground pounding. Argument: See HipAttackArg_e.
660 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Swim); ///< Swimming. Argument: See SwimArg_e.
661 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, JumpDai); ///< Jumping on a spring. Argument: None.
662 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, PlayerJumpDai); ///< Jumping on a player. Argument: None.
663 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Funsui); ///< Being blown upwards by a fountain. Argument: None.
664 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Kani); ///< Moving on a cliff. Argument: See KaniArg_e.
665 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, Cloud); ///< Riding a cloud. Argument: None.
666 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, AnimePlay); ///< Playing a cutscene animation. Argument: See AnimePlayArg_e.
667 STATE_VIRTUAL_FUNC_DECLARE(daPlBase_c, WaitJump); ///< Doing a hop caused by a small quake. Argument: None.
668
669 virtual bool isWaitFrameCountMax() { return false; }
670 virtual bool checkWalkNextAction() { return false; }
671 virtual void setWaitActionAnm(AnmBlend_e);
672 virtual void setWalkActionAnm(AnmBlend_e);
673 virtual void walkActionInit_Wait(AnmBlend_e);
674 virtual void walkAction_Wait();
675 virtual void walkActionInit_Move(AnmBlend_e);
676 virtual void walkAction_Move();
677 virtual bool checkCrouch();
678 virtual bool setCancelCrouch();
679 virtual void setSlipAction();
680 virtual void slipActionMove(int);
681 virtual void setFallAction();
682 virtual void setHipAttack_AttackStart();
683
684 virtual void releaseFunsuiAction();
685
686 virtual float getCloudOffsetY();
687 virtual bool setRideJrCrown(const dActor_c *) { return false; }
688 virtual bool isRideJrCrownOwn(const dActor_c *) { return false; }
689 virtual void setRideJrCrownMtx(const mMtx_c *) {}
690 virtual void setRideJrCrownAnm(int) {}
691
692 virtual const mVec3_c *getHeadTopPosP() { return nullptr; }
693 virtual const float *getGravityData() { return mGravityData; }
694 virtual bool isCarry() const { return false; }
695 virtual bool isLiftUp() { return false; }
696
697 virtual bool isLiftUpExceptMame() { return false; }
698 virtual int isStar() const;
699 virtual void setStar(StarSet_e, int);
700 virtual void endStar() {}
701 virtual void setVirusStar(daPlBase_c *) {}
702 virtual void clearStarCount();
703 virtual s8 getStarCount() const { return mStarCount; }
704 virtual s8 calcStarCount(int);
705
706 virtual bool isNoDamage();
707 virtual bool setDamage(dActor_c *, DamageType_e);
708 virtual bool setForcedDamage(dActor_c *, DamageType_e);
709
710 /**
711 * @brief Starts a jump action with the given parameters.
712 * @unofficial
713 * @details Does not start a jump if the player is in a climbing state.
714 * @param jumpSpeed The vertical speed of the jump.
715 * @param speedF The @ref mSpeedF "forward speed".
716 * @param allowSteer Whether the player can steer in midair.
717 * @param keyMode The input settings for the jump. (0: none, 1: force jump pressed, 2: force jump not pressed)
718 * @param jumpMode The type of jump to perform. [TODO: document the jump modes]
719 */
720 virtual bool setJump(float jumpSpeed, float speedF, bool allowSteer, int keyMode, int jumpMode);
721 /// @brief Starts a jump action unconditionally. See setJump().
722 /// @unofficial
723 virtual bool _setJump(float jumpSpeed, float speedF, bool allowSteer, int keyMode, int jumpMode);
724 virtual bool setWaitJump(float jumpSpeed);
725
726 virtual bool setHipAttackOnEnemy(mVec3_c *);
727
728 virtual void clearJumpActionInfo(int) {}
729 virtual bool setSwimSpeed(float speedY, float speedF);
730 virtual void setLandSE();
731
732 virtual void set1UpKinokoEffect() {}
733 virtual void setFlagGetEffect() {}
734 virtual void setHipAttackEffect();
735
736 virtual void setZPosition();
737 virtual void setZPosition(float);
738 virtual void setZPositionDirect(float);
739 virtual void offZPosSetNone();
740
741 virtual void startPlayerVoice(int, int); ///< @unofficial
742 virtual void holdPlayerVoice(int, int); ///< @unofficial
743
744 virtual void startQuakeShock(dQuake_c::TYPE_SHOCK_e);
745 virtual void startPatternRumble(const char *pattern);
746
747 virtual short getMukiAngle(u8 direction);
748 virtual int turnAngle();
749 virtual void maxFallSpeedSet();
750
751 virtual bool setDamage2(dActor_c *, daPlBase_c::DamageType_e);
752
753 void executeState();
754
755 /// @brief Transitions to a new state with the given state ID and argument.
756 /// @param stateID The ID of the state to transition to.
757 /// @param arg An argument to pass to the new state.
758 void changeDemoState(const sStateIDIf_c &stateID, int arg);
759
760 void onStatus(int id); ///< Enables the status with the given ID. See Status_e.
761 void offStatus(int id); ///< Disables the status with the given ID. See Status_e.
762 bool isStatus(int id); ///< Checks if the status with the given ID is active. See Status_e.
763 /// Enables the status with the given ID and disables all others.
764 /// @bug The implemententation of this is broken. Presumably this was written before
765 /// the status bits were split up into multiple bytes, because it only clears the bits in the byte
766 /// where the selected status bit is and leaves the other status bytes unchanged.
767 void setStatus(int id);
768
769 void calcPlayerSpeedXY();
770 void posMoveAnglePenguin(mVec3_c, u16);
771 void posMoveAnglePlayer(mVec3_c);
772 bool setSandMoveSpeed();
773 void calcWindSpeed();
774 void calcHeadAttentionAngle();
775
776 void calcSpeedOnIceLift();
777 void calcAccOnIceLift();
778 bool checkStandUpRoofOnLift();
779 bool checkStandUpRoof();
780
781 void gravitySet();
782 void powerSet();
783 void moveSpeedSet();
784 void airPowerSet();
785 void simpleMoveSpeedSet();
786 void normalPowerSet();
787 void grandPowerSet(); // [misspelling of "ground"]
788 void slipPowerSet(int);
789 void icePowerChange(int);
790 void getPowerChangeSpeedData(sPowerChangeSpeedData &data); ///< @unofficial
791 void getTurnPower(sTurnPowerData &); ///< @unofficial
792 PowerChangeType_e getPowerChangeType(bool affectPenguin);
793 const sSpeedData *getSpeedData();
794
795 int addCalcAngleY(short, short);
796 short getBesideMukiAngle(u8 direction);
797 void turnBesideAngle();
798 bool checkTurn();
799 void setTurnEnd();
800
801 void setJumpGravity();
802 void setButtonJumpGravity();
803 void setNormalJumpGravity();
804 float setJumpAddSpeedF(float);
805 float setAddLiftSpeedF();
806 bool setDelayHelpJump();
807 bool setCrouchJump();
808 bool checkJumpTrigger();
809 bool startJump(AnmBlend_e blendMode, int jumpType); ///< @unofficial
810
811 void setStampReduction();
812 void setStampPlayerJump(bool b, float yOffset);
813 void calcReductionScale();
814 mVec3_c getReductionModelScale();
815
816 bool setJumpDaiRide();
817 bool setPlayerJumpDai(daPlBase_c *other);
818 void setPlayerJumoDaiPos();
819
820 bool setCloudOn(dActor_c *cloudActor);
821 void cancelCloudOn();
822 mVec3_c getCloudPos();
823 bool updateCloudMove();
824
825 bool setFunsui();
826 bool updateFunsuiPos(float, float);
827 bool releaseFunsui(float);
828
829 void setRideNat(float);
830 void updateRideNat();
831
832 bool isSaka();
833 bool isSlipSaka();
834 bool checkSakaReverse();
835 bool checkSlip();
836 bool checkCrouchSlip();
837 bool checkSlipEndKey();
838 float getSlipMaxSpeedF();
839 float getSakaMaxSpeedRatio(u8 direction);
840 float getSakaStopAccele(u8 direction);
841 float getSakaMoveAccele(u8 direction);
842 float getIceSakaSlipOffSpeed();
843
844 void changeActionSlipEnd(AnmBlend_e);
845 void setSlipAction_ToStoop();
846 void setSlipAction_ToEnd();
847 void setSlipActionEnd();
848 void setSlipActionViewLimitEnd();
849
850 void setHipAttackDropEffect();
851 void setHipBlockBreak();
852 void setHipAttack_Ready();
853 void setHipAttack_KinopioStart();
854 void setHipAttack_AttackFall();
855 void setHipAttack_StandNormal();
856 void setHipAttack_StandNormalEnd();
857 void setHipAttack_ToStoop();
858 void HipAction_Ready();
859 void HipAction_AttackStart();
860 void HipAction_AttackFall();
861 void HipAction_Ground();
862 void HipAction_StandNormal();
863 void HipAction_StandNormalEnd();
864 void HipAction_ToStoop();
865
866 void onFollowMameKuribo();
867 void clearFollowMameKuribo();
868 u32 getFollowMameKuribo();
869
870 bool isDemo();
871 bool isControlDemoAll();
872 bool isDemoAll();
873 bool isDemoType(DemoType_e);
874 bool isDemoMode() const;
875 void onDemo();
876 void offDemo();
877 bool executeDemoState();
878
879 bool startControlDemo();
880 void setControlDemoDir(u8);
881 bool isControlDemoWait();
882 void setControlDemoWait();
883 bool isControlDemoAnm(int);
884 void setControlDemoAnm(int);
885 bool isControlDemoWalk();
886 void setControlDemoCutscene(AnimePlayArg_e animID); ///< @unofficial
887 void setControlDemoKinopioWalk();
888 void setControlDemoKinopioSwim();
889 void setControlDemoEndingDance();
890 void setControlDemoWalk(const float &, const float &);
891 void endControlDemo(int);
892
893 void initDemoInDokan();
894 void initDemoInDokanUD(u8);
895 void initDemoInDokanLR(u8);
896 void executeDemoInDokan(u8);
897 void endDemoInDokan();
898 bool setDemoOutDokanAction(int entranceNextGotoID, DokanDir_e dir);
899 void initDemoOutDokanUD(u8);
900 void initDemoOutDokanLR(u8);
901 void executeDemoOutDokanUD();
902 void executeDemoOutDokanLR();
903 void endDemoOutDokan();
904 float getWaterDokanCenterOffset(float);
905 BOOL demo_dokan_move_x(float, float);
906 BOOL demo_dokan_move_y(float, float);
907 void setObjDokanIn(dBg_ctr_c *, mVec3_c &, int);
908 void setExitRailDokan();
909 void setDemoOutNextGotoBlock(int nextGotoID, int delay, int fadeType); ///< @unofficial
910
911 void stopGoalOther();
912 void playGoalOther();
913 void setDemoGoalMode(int, int);
914 void setDemoGoal_MultiJump();
915 void finalizeDemoGoalBase();
916 float getDemoGoalLandPos();
917 void initGoalJump(mVec3_c &, float);
918 bool calcGoalJump();
919 void executeDemoGoal_Pole();
920 void executeDemoGoal_Wait();
921 void executeDemoGoal_KimePose();
922 bool setEnemyStageClearDemo();
923 void updateEndingDance();
924 void initDemoKimePose();
925
926 bool isBossDemoLand();
927 void DemoAnmNormal();
928 void DemoAnmBossSetUp();
929 void DemoAnmBossGlad();
930 void DemoAnmBossAttention();
931 void DemoAnmBossKeyGet();
932
933 void setRunFootEffect();
934 void setVsPlHipAttackEffect();
935 void setLandSmokeEffect(int);
936 void setLandSmokeEffectLight();
937 void setSandEffect();
938 bool setSandJumpEffect();
939 bool setSandFunsuiLandEffect();
940 void setStartJumpEffect(int);
941 void setLandJumpEffect(int);
942 void setSlipOnWaterEffect(mEf::levelEffect_c *effect);
943 void setSlipSmokeEffect();
944 void setBrakeSmokeEffect(mVec3_c &offset);
945 void setTurnSmokeEffect();
946 void fadeOutTurnEffect();
947
948 void startKimePoseVoice(ClearType_e clearType);
949 void setSoundPlyMode();
950 void setItemCompleteVoice();
951 void startFootSoundPlayer(unsigned long);
952 void setFootSound();
953 void setSlipSE();
954 bool suppressSound(int suppressionMode); ///< @unofficial
955 void startSound(ulong soundID, bool); ///< @unofficial
956 void startSound(ulong soundID, short, bool); ///< @unofficial
957 void holdSound(ulong soundID, bool); ///< @unofficial
958 void holdSound(ulong soundID, short, bool); ///< @unofficial
959
960 void initCollision(sCcDatNewF *dat1, sCcDatNewF *dat2);
961 void entryCollision();
962 void releaseCcData();
963 void clearCcData();
964 void clearCcPlayerRev();
965 int getCcLineKind();
966 void setCcAtBody(int);
967 void setCcAtSlip();
968 void setCcAtPenguinSlip();
969 void setCcAtHipAttack();
970 void setCcAtStar();
971 void setCcAtCannon();
972 bool isActionRevisionY();
973 void setCcPlayerRev(dCc_c *, dCc_c *, float, int);
974 bool calcCcPlayerRev(float *);
975 bool isEnableStampPlayerJump(dCc_c *, dCc_c *);
976
977 void bgCheck(int);
978 void setOldBGCross();
979 void checkBgCross();
980 bool checkInsideCrossBg(float);
981 void clearBgCheckInfo();
982 bool isCarryObjBgCarried(u8 side);
983 bool checkBGCrossWall(u8 direction);
984 void checkDamageBg();
985 bool setBgDamage();
986 bool checkSinkSand();
987 float getWaterCheckPosY();
988 void checkWater();
989 bool isHitWallKinopioWalk(int);
990 bool isHitGroundKinopioWalk(int, float, int); ///< @unofficial
991 bool checkKinopioWaitBG(int);
992 void underOverCheck();
993 void checkDispOver();
994 bool checkPressBg();
995 bool isBgPress(dActor_c *);
996 bool isEnablePressUD();
997 bool isEnablePressLR();
998 void checkDisplayOutDead();
999 void calcDispSideLimit(); ///< @unofficial
1000 void setBgPressReq(dActor_c *, BgPress_e);
1001
1002 bool isDispOutCheckOn();
1003 bool calcSideLimitMultL(float);
1004 bool calcSideLimitMultR(float);
1005 void checkSideViewLemit();
1006 bool checkDispSideLemit();
1007 bool revSideLimitCommon(float);
1008
1009 void calcTimerProc();
1010 void changeNormalAction();
1011 void stopOther();
1012 void playOther();
1013 void setAutoBounce(); ///< @unofficial
1014 void setExtraPushForce(float f); ///< @unofficial
1015
1016 daPlBase_c *getHipAttackDamagePlayer();
1017 void setHipAttackDamagePlayer(daPlBase_c *player);
1018 void clearHipAttackDamagePlayer();
1019
1020 void setNoHitPlayer(const daPlBase_c *, int);
1021 void updateNoHitPlayer();
1022 void setNoHitObjBg(dActor_c *, int);
1023 void calcNoHitObjBgTimer();
1024
1025 void clearTreadCount();
1026 s8 calcTreadCount(int);
1027 void clearComboCount();
1028 s8 calcComboCount(int);
1029
1030 dPyMdlBase_c *getModel();
1031 mVec3_c getAnkleCenterPos();
1032 bool isMaskDraw();
1033 bool isMameAction();
1034 bool isPlayerGameStop();
1035 bool checkTimeOut();
1036 bool checkRideActor(daPlBase_c *other);
1037 bool isRideCheckEnable();
1038
1039 // [Needed to place getOldStateID in the correct location]
1040 const sStateIDIf_c &getOldState() {
1041 return *mStateMgr.getOldStateID();
1042 }
1043
1044 bool isState(sStateIDIf_c &id) {
1045 return mStateMgr.getStateID()->isEqual(id);
1046 }
1047
1048 bool isDemoState(sStateIDIf_c &id) {
1049 return mDemoStateMgr.getStateID()->isEqual(id);
1050 }
1051
1052 float calcSomeAccel(float f) { return 3.0f * f; }
1053 void set_m_d80(int side, float f) { m_d80[side] = f; }
1054 float getModelHeight() const { return mModelHeight; }
1055 float getCcRevOffsX() const { return mCcRevTotalOffsX; }
1056 float getCcRevOffsY() const { return mCcRevTotalOffsY; }
1057 float getCcRevRate() const { return mCcRevRate; }
1058
1059 u32 isNowBgCross(BgCross1_e m) { return mNowBgCross1 & m; }
1060 u32 isNowBgCross(BgCross2_e m) { return mNowBgCross2 & m; }
1061 void onNowBgCross(BgCross1_e m) { mNowBgCross1 |= m; }
1062 void onNowBgCross(BgCross2_e m) { mNowBgCross2 |= m; }
1063 void offNowBgCross(BgCross1_e m) { mNowBgCross1 &= ~m; }
1064 void offNowBgCross(BgCross2_e m) { mNowBgCross2 &= ~m; }
1065 void clearNowBgCross() { mNowBgCross1 = mNowBgCross2 = 0; }
1066
1067 u32 isOldBgCross(BgCross1_e m) { return mOldBgCross1 & m; }
1068 u32 isOldBgCross(BgCross2_e m) { return mOldBgCross2 & m; }
1069 void onOldBgCross(BgCross1_e m) { mOldBgCross1 |= m; }
1070 void onOldBgCross(BgCross2_e m) { mOldBgCross2 |= m; }
1071 void offOldBgCross(BgCross1_e m) { mOldBgCross1 &= ~m; }
1072 void offOldBgCross(BgCross2_e m) { mOldBgCross2 &= ~m; }
1073 void clearOldBgCross() { mOldBgCross1 = mOldBgCross2 = 0; }
1074
1075 bool isOnSinkSand() { return isNowBgCross(BGC_ON_SINK_SAND) | isNowBgCross(BGC_IN_SINK_SAND); }
1076 bool wasOnSinkSand() { return isOldBgCross(BGC_ON_SINK_SAND) | isOldBgCross(BGC_IN_SINK_SAND); }
1077
1078 float getDirSpeed() const { return sc_DirSpeed[mDirection]; }
1079
1080 PLAYER_TYPE_e getPlayerType() const { return mPlayerType; }
1081 u8 getDirection() const { return mDirection; }
1082 PLAYER_POWERUP_e getPowerup() const { return mPowerup; }
1083
1084 void changeState(const sStateIDIf_c &stateID) {
1085 changeState(stateID, 0);
1086 }
1087
1088 template <typename T>
1089 void changeState(const sStateIDIf_c &stateID, T arg) {
1090 changeState(stateID, (void *) arg);
1091 }
1092
1093 void changeDemoState(const sStateIDIf_c &stateID) {
1094 changeDemoState(stateID, 0);
1095 }
1096
1097 template <typename T>
1098 T stateArg() const {
1099 return (T) mStateArg;
1100 }
1101
1102 SquishState_e mSquishState; ///< The player's current squish state for being jumped on by another player.
1103 int mSquishKeyframeIdx; ///< The current target index for the squishing animation keyframes.
1104 float mSquishScale; ///< The current scale of the player during the squish animation.
1105 int mSquishNoMoveTimer; ///< Timer for how long to freeze the squished player in position.
1106 int mSquishCooldownTimer; ///< Cooldown for another player to squish this player.
1107
1108 const daPlBase_c *mpNoHitPlayer; ///< The player that cannot collide with this player.
1109 int mNoHitTimer; ///< Timer for how long the no-hit status lasts.
1110
1111 u32 mBgPressActive;
1112 u32 mBgPressFlags;
1113 fBaseID_e mBgPressIDs[13]; ///< Index into this array with BgPress_e.
1114 float mViewLimitPadding;
1115
1116 KimePoseMode_e mKimePoseMode;
1117 s8 mDemoState; /// Value is a ControlDemoState_e.
1118
1119 int mDokanEnterNextGotoID; ///< The ID of the next-goto of the pipe being entered.
1120 /// Position of the door or pipe the player is entering.
1121 /// Also used as the target for the player running towards the castle after touching the goal pole.
1123 mVec2_c mDokanMoveSpeed; ///< Direction to move the player while entering a rolling hill pipe or a rail pipe.
1124 short mRollDokanAngle;
1125 DemoDokanMode_e mDokanMode;
1126 u8 mDokanDir;
1127 dBg_ctr_c *mpDokanBgCtr;
1128 /// Counts up while walking to the left, and allows the
1129 /// player to enter a pipe when it reaches #sc_DokanEnterThreshold.
1131 /// Counts up while walking to the right, and allows the
1132 /// player to enter a pipe when it reaches #sc_DokanEnterThreshold.
1134 float mDokanOffsetY;
1135 float mDokanShiftXEpsilon;
1136 short mRailDokanRailIndex;
1137 short mRailDokanNextNodeTimer;
1138
1139 int mGoalDemoIndex; ///< Indicates where the player is in the order of players which have touched the goal pole, 0 being the first.
1140 int mGoalTouchOrder;
1141 float mGoalPoleEndY;
1142 int mTimer_a8; ///< [Seems unused - set to 0 when leaving a rolling hill].
1143 mVec3_c mGoalJumpTarget;
1144 int mGoalJumpFrameCount;
1145
1146 mVec3_c mControlDemoTargetPos;
1147 float mControlDemoSpeedF;
1148 int mItemKinopioDirection;
1149 int mItemKinopioTurnTimer;
1150
1151 int mBossDemoLandTimer;
1152 int mEndingDanceKeyTimers[5];
1153 int mEndingDanceInactivityTimer;
1154
1155 int mWalkAnmState;
1156 int mTimer_f4;
1157 int mSlipEndTimer;
1158 s8 mAutoSlipTimer;
1159 dEf::followEffect_c mTurnSmokeEffect; ///< The wind effect when turning around after running.
1160 int mTurnGroundType;
1161 u8 mTurnEffectFade;
1162 mEf::levelEffect_c mHitAttackDropEffect; ///< The wind effect when doing a ground pound.
1163 int wasStaffCreditGroundHipAttack; ///< Whether the floor was ground pounded during the staff credits. [Used to allow for the coin block ground pounding].
1164 mVec3_c mJumpDaiOffset; ///< The difference vector between this player and the player being jumped on.
1165 float mJumpDaiSpeedF; ///< The forward speed before doing a big jump.
1166 /// Timer for disabling another big jump after being unable to do a big jump
1167 /// due to colliding with a ceiling.
1169
1170 AnimePlayArg_e mDemoAnime;
1171
1172 int mIsBeingDeleted;
1173
1174 /// Effect when being sent upwards by a sand fountain,
1175 /// also used for the wall slide, water run and death smoke effect.
1177 mEf::levelEffect_c mSlipSmokeEffect; ///< Smoke when sliding down a slope or into a cannon.
1178 mEf::levelEffect_c mBrakeSmokeEffect; ///< Smoke when turning around after running.
1179 mEf::levelEffect_c mRunEffect; ///< E.g. sand particles / snowflakes when running.
1180 mEf::levelEffect_c mQuicksandSplashEffect; ///< Sand splash effect when landing on quicksand.
1181 mEf::levelEffect_c mQuicksandSinkEffect; ///< Sand particles when the player is submerged in quicksand.
1182
1183 dPyMdlMng_c *mpMdlMng;
1184 dAudio::SndObjctPly_c mSndObj;
1185 dAcPyKey_c mKey;
1186
1187 fBaseID_e mRideActorID;
1188 fBaseID_e mRelatedActorID; ///< Actor that is eating the player, or the door actor.
1189 fBaseID_e mHipAttackPlayerID;
1190
1191 u32 mStatusFlags[7];
1192 float mModelHeight;
1193 u8 mPrevDirection;
1194 u8 mAmiLayer;
1195 u8 mPlayerLayer;
1196
1197 mVec3_c mLastPosDelta;
1198 mVec3_c mLiftRelatedPos;
1199 float mPrevSpeedF;
1200 float mPrevSpeedY;
1201 float mTopHeight; ///< Stores the highest Y position reached, resets when landing on the ground again.
1202 float mAirTopHeight; ///< The highest Y position since being on the ground last. Not reset when landing on the ground.
1203 const sSpeedData *mSpeedDataNormal;
1204 const sSpeedData *mSpeedDataStar;
1205 const float *mGravityData;
1206
1207 int mNoGravityTimer;
1208 int mStarTimer;
1209 int mDamageInvulnTimer;
1210 int mPowerupChangeInvulnTimer;
1211 int mTimer_ce8; ///< [Related to balloon break jump]
1212
1213 s8 mTreadCount;
1214 s8 mStarCount;
1215 s8 mPlComboCount;
1216 u32 mNewFollowMameKuribo;
1217 u32 mFollowMameKuribo;
1218 fBaseID_e mIceActorID;
1219 PLAYER_POWERUP_e mPowerup;
1220 sBcPointData mHeadBcData;
1221 sBcPointData mFootBcData;
1222 sBcPointData mWallBcData;
1223 mVec3_c mBgPushForce; ///< Belts, quicksand etc.
1224 float mExtraPushForceX;
1225
1226 u32 mNowBgCross1, mNowBgCross2;
1227 u32 mOldBgCross1, mOldBgCross2;
1228 u32 mBgFootHistory[10];
1229
1230 u32 mStandOnUnitType;
1231 u32 mPrevStandOnUnitType;
1232 float m_d80[2];
1233 GroundType_e mGroundType;
1234
1235 float m_d8c;
1236 int mNoHitObjTimer;
1237
1238 short mMoveSakaAngle;
1239 short mPrevMoveSakaAngle;
1240 short mStillSakaAngle;
1241 short mPrevStillSakaAngle;
1242 short mAdjacentSlopeAngle;
1243
1244 int mAirWalkTimer; ///< Timer to wait before changing to the falling state after walking off a ledge.
1245
1246 float mWaterHeight;
1247 float mPrevWaterHeight;
1248 int mWaterDepth;
1249 float mSinkSandHeight;
1250 bool mIsBgDamage;
1251 s8 mBgDamageType;
1252 u8 mWaterType; ///< Value is a dBc_c::WATER_TYPE_e.
1253 mVec3_c mAirWaterHitPos;
1254 short mAirWaterHitAngle;
1255 float mKaniHeight; ///< The height of the last cliff the player interacted with.
1256 float mRideNutHeight;
1257
1258 dCc_c mCc1, mAttCc1, mAttCc2, mAttCc3;
1259 float mCcRevSpeedF;
1260 float mCcRevTotalOffsX;
1261 float mCcRevTotalOffsY;
1262 float mCcRevRate; ///< Multiplier for position revision for colliders. 1.0f moves to the target immediately.
1263 bool mCcRevSet;
1264 bool mCcHasInitialRevY;
1265 int mCcRevDisabledTimer;
1266
1267 u8 mIsDispLimitR; ///< Whether the player is too far to the right and should be pushed to the left.
1268 u8 mIsDispLimitL; ///< Whether the player is too far to the left and should be pushed to the right.
1269 float mDispLimitAdjR; ///< The distance by which the player is too far right.
1270 float mDispLimitAdjL; ///< The distance by which the player is too far left.
1271
1272 sFStateMgr_c<daPlBase_c, sStateMethodUsr_FI_c> mDemoStateMgr; ///< The state manager for demo (cutscene) states.
1273 int mDemoStateArg; ///< To be used as an argument to the new demo state.
1274 int mDemoSubstate; ///< Demo states can use this as a sub-state variable (cast to some enum)
1275 /// Demo states can use this generic timer for various purposes.
1276 /// It is automatically decrememented in executeState() every frame.
1278 bool mIsDemoMode; ///< Whether the player is currently in a demo (cutscene) state.
1279
1280 sFStateMgr_c<daPlBase_c, sStateMethodUsr_FI_c> mStateMgr; ///< The state manager for regular player states.
1281 void *mStateArg; ///< To be used as an argument to the new state.
1282 int mSubstate; ///< States can use this as a sub-state variable (cast to some enum).
1283 /// States can use this generic timer for various purposes.
1284 /// It is automatically decrememented in executeState() every frame.
1286 /// States can use this field for various purposes - as a timer, boolean flag, etc.
1288
1289 mVec3_c mPressAttachPos;
1290
1291 int mWindGroundTimer;
1292 float mWindSpeed;
1293 float mFinalAirPushForceX;
1294 float m_1134;
1295 float m_1138;
1296 float m_113c;
1297
1298 PLAYER_TYPE_e mPlayerType;
1299
1300 static const float sc_DirSpeed[];
1301 static const float sc_JumpSpeed;
1302 static const float sc_JumpSpeedNuma1;
1303 static const float sc_JumpSpeedNuma2;
1304 static const float sc_WaterWalkSpeed;
1305 static const float sc_WaterSwimSpeed;
1306 static const float sc_WaterJumpSpeed;
1307 static const float sc_WaterMaxFallSpeed;
1308 static const float sc_MaxFallSpeed;
1309 static const float sc_MaxFallSpeed_Foot;
1310 static const float sc_MaxFallDownSpeed;
1311 static const float scTurnPowerUpRate;
1312 static const float scDokanInSpeedX;
1313 static const float scDokanInWidthX;
1314 static const float scDokanInMoveSpeed;
1315 static const float scDokanWaitAnmFixFrame;
1316
1317 // [Inofficial constants]
1318
1319 /// Number of walking frames before being able to enter a pipe.
1320 /// @see mDokanCounterL, mDokanCounterR
1321 static const int sc_DokanEnterThreshold = 10;
1322 static const int sc_DemoWaitDuration = 10; ///< Number of frames to wait before transitioning from StateID_DemoWait.
1323 static const int sc_DemoPoleWaitTurn = 5; ///< Number of frames to wait before turning towards the screen in the goal pole animation.
1324 static const int sc_DemoPoleWaitEnd = 7; ///< Number of frames to wait before doing the course clear pose in the goal pole animation.
1325};
A class for managing controller input.
u8 mDirection
The actor's facing direction.
Definition d_actor.hpp:351
dActor_c()
Constructs a new actor.
Definition d_actor.cpp:46
mVec3_c mSpeed
The actor's speed.
Collider ("Collision Check") class - handles collisions between actors.
Definition d_cc.hpp:133
virtual void changeState(const sStateIDIf_c &stateID, void *arg)
Transitions to a new state with the given state ID and argument.
int mDokanEnterNextGotoID
Value is a ControlDemoState_e.
bool suppressSound(int suppressionMode)
void onStatus(int id)
Enables the status with the given ID. See Status_e.
virtual void setPowerup(PLAYER_POWERUP_e, int)
void offStatus(int id)
Disables the status with the given ID. See Status_e.
int mTimer_a8
[Seems unused - set to 0 when leaving a rolling hill].
float mSquishScale
The current scale of the player during the squish animation.
void startSound(ulong soundID, bool)
int mSquishNoMoveTimer
Timer for how long to freeze the squished player in position.
KaniArg_e
Arguments for transitioning to the cliff state.
@ KANI_ARG_HANG_UP_VINE
Climbing onto the cliff from a vine.
@ KANI_ARG_WALK_FORCE
Standing on the cliff, disallow immediately hanging from it by holding down.
@ KANI_ARG_HANG
Landing high enough on the cliff to stand on it, but hang down from it instead.
@ KANI_ARG_HANG_HAND
Catching the cliff from below, hang from it.
@ KANI_ARG_JUMP_HANG
Falling onto the cliff, immediately hang from it.
@ KANI_ARG_WALK
Standing on the cliff and walking.
virtual void holdPlayerVoice(int, int)
void holdSound(ulong soundID, bool)
void setExtraPushForce(float f)
void setDemoOutNextGotoBlock(int nextGotoID, int delay, int fadeType)
@ BGC_WATER_SUBMERGED
Fully submerged in water.
@ BGC_WATER_SHALLOW
At least slightly inside of water (hip height or higher).
@ BGC_HEAD
Colliding with the head sensor.
@ BGC_OBJBG_TOUCH_CARRIED_L
The touching background object on the left is being carried by a player.
@ BGC_OBJBG_TOUCH_R
Touching a background object on the right.
@ BGC_FOOT
Colliding with the foot sensor.
@ BGC_ON_WATER_MOVE
On water by being mini or sliding with the penguin suit.
@ BGC_WALL
Colliding with the wall sensor.
@ BGC_OBJBG_TOUCH_CARRIED_R
The touching background object on the right is being carried by a player.
@ BGC_WATER_BUBBLE
Inside a floating water bubble.
@ BGC_OBJBG_TOUCH_L
Touching a background object on the left.
@ BGC_WATER_TOUCH
At least touching water.
sFStateMgr_c< daPlBase_c, sStateMethodUsr_FI_c > mStateMgr
The state manager for regular player states.
float mCcRevRate
Multiplier for position revision for colliders. 1.0f moves to the target immediately.
int mGoalDemoIndex
Indicates where the player is in the order of players which have touched the goal pole,...
mVec3_c mBgPushForce
Belts, quicksand etc.
virtual int create()
do method for the create operation.
bool mIsDemoMode
Whether the player is currently in a demo (cutscene) state.
int mSquishKeyframeIdx
The current target index for the squishing animation keyframes.
float mDispLimitAdjR
The distance by which the player is too far right.
mEf::levelEffect_c mBrakeSmokeEffect
Smoke when turning around after running.
bool startJump(AnmBlend_e blendMode, int jumpType)
mEf::levelEffect_c mRunEffect
E.g. sand particles / snowflakes when running.
mEf::levelEffect_c mSlipSmokeEffect
Smoke when sliding down a slope or into a cannon.
void getPowerChangeSpeedData(sPowerChangeSpeedData &data)
HipAttackArg_e
Arguments for transitioning to the ground pound state.
@ HIP_ATTACK_ARG_PLAYER
A regular player is doing a ground pound.
@ HIP_ATTACK_ARG_ITEM_KINOPIO
The rescue Toad is doing a ground pound out of the item block.
virtual void startPlayerVoice(int, int)
void initDemoInDokanUD(u8)
u8 mWaterType
Value is a dBc_c::WATER_TYPE_e.
mEf::levelEffect_c mQuicksandSinkEffect
Sand particles when the player is submerged in quicksand.
mVec3_c mJumpDaiOffset
The difference vector between this player and the player being jumped on.
fBaseID_e mRelatedActorID
Actor that is eating the player, or the door actor.
virtual bool _setJump(float jumpSpeed, float speedF, bool allowSteer, int keyMode, int jumpMode)
Starts a jump action unconditionally. See setJump().
@ GOAL_DEMO_POLE_JUMP
Jumping off the pole.
@ GOAL_DEMO_POLE_TURN
Turning toward the screen.
@ GOAL_DEMO_POLE_SWING
Swinging around the pole to the other side.
@ GOAL_DEMO_POLE_WAIT_END
Waiting sc_DemoPoleWaitEnd frames before transitioning to the course clear dance.
@ GOAL_DEMO_POLE_WAIT_JUMP
Waiting at the bottom of the pole to jump off.
@ GOAL_DEMO_POLE_SLIDE
Sliding down the pole.
@ GOAL_DEMO_WAIT_BELOW_PLAYER
Waiting for the player below to slide far enough down the pole to not be in the way of this player.
@ GOAL_DEMO_POLE_WAIT_TURN
Waiting sc_DemoPoleWaitTurn frames to turn toward the screen.
@ GOAL_DEMO_POLE_LAND
Playing the landing animation after landing.
virtual int doDelete()
do method for the delete operation.
int mNoHitTimer
Timer for how long the no-hit status lasts.
virtual int preExecute()
pre method for the execute operation.
sFStateMgr_c< daPlBase_c, sStateMethodUsr_FI_c > mDemoStateMgr
The state manager for demo (cutscene) states.
void calcSpeedOnIceLift()
int mAirWalkTimer
Timer to wait before changing to the falling state after walking off a ledge.
SquishState_e mSquishState
The player's current squish state for being jumped on by another player.
mEf::levelEffect_c mQuicksandSplashEffect
Sand splash effect when landing on quicksand.
float mKaniHeight
The height of the last cliff the player interacted with.
void setStatus(int id)
AnimePlayArg_e
Arguments for transitioning to the animation state.
dEf::followEffect_c mTurnSmokeEffect
The wind effect when turning around after running.
static const int sc_DemoPoleWaitEnd
Number of frames to wait before doing the course clear pose in the goal pole animation.
DemoWaitArg_e
Arguments for transitioning to the demo wait state.
@ JUMP_DAI_HIGH_JUMP
The jump button was pressed to do a higher jump.
@ JUMP_DAI_MOVE_DOWN
Moving down on the player or spring.
static const int sc_DemoWaitDuration
Number of frames to wait before transitioning from StateID_DemoWait.
float mAirTopHeight
The highest Y position since being on the ground last. Not reset when landing on the ground.
int mDemoStateArg
To be used as an argument to the new demo state.
static const int sc_DokanEnterThreshold
bool isHitGroundKinopioWalk(int, float, int)
mEf::levelEffect_c mSmokeEffect
mEf::levelEffect_c mHitAttackDropEffect
The wind effect when doing a ground pound.
fBaseID_e mBgPressIDs[13]
Index into this array with BgPress_e.
float mDispLimitAdjL
The distance by which the player is too far left.
mVec2_c mDokanMoveSpeed
Direction to move the player while entering a rolling hill pipe or a rail pipe.
virtual int draw()
do method for the draw operation.
void getTurnPower(sTurnPowerData &)
virtual bool setJump(float jumpSpeed, float speedF, bool allowSteer, int keyMode, int jumpMode)
Starts a jump action with the given parameters.
int mTimer_ce8
[Related to balloon break jump]
const daPlBase_c * mpNoHitPlayer
The player that cannot collide with this player.
float getWaterDokanCenterOffset(float)
float mTopHeight
Stores the highest Y position reached, resets when landing on the ground again.
Status_e
The status IDs to be used with onStatus(), offStatus(), isStatus() and setStatus().
@ STATUS_KANI_HANG
The player is hanging from a cliff.
@ STATUS_THROW
The player is throwing something.
@ STATUS_SPIN
The player is spinning, either from a spin jump, a propeller spin (upwards or downwards) or screw spi...
@ STATUS_POLE
The player is climbing a pole.
@ STATUS_CAN_WATER_SLIDE
The player can slide on water because of the penguin suit.
@ STATUS_TWIRL
The player is twirling in midair.
@ STATUS_INVULNERABLILITY_BLINK
Skip drawing the player this frame to create a blinking effect.
@ STATUS_PENGUIN_SWIM
The player is swimming with the penguin suit.
@ STATUS_DISPLAY_OUT_NO_DAMAGE
The player is outside of the screen bounds and should not be able to be attacked.
@ STATUS_PENGUIN_SLIDE_JUMP
The player is doing a penguin slide jump.
@ STATUS_17
[Dokan related]
@ STATUS_KANI_WALK
The player is doing a crab walk on a cliff.
@ STATUS_WAIT_JUMP
The player is doing a small hop after being affected by a small quake.
@ STATUS_HANG
The player is hanging from a ceiling rope.
@ STATUS_SINK_SAND_JUMP
The player is jumping while in sinking sand.
@ STATUS_SLOPE_HEAD_PUSH_R
The player cannot move further right on a slope because of a ceiling.
@ STATUS_IS_SPIN_HOLD_REQ
If the player spins, stay in place. [Used for the twisting screws].
@ STATUS_GOAL_POLE_TOUCHED
The player has touched the goal pole.
@ STATUS_VINE
The player is clinging to a vine / mesh net / rock wall.
@ STATUS_8D
[Cannon shot related]
@ STATUS_ENEMY_STAGE_CLEAR
The player has cleared an enemy ambush.
@ STATUS_KANI_HANG_ANIMATION
The player is animating into the hanging pose on a cliff.
@ STATUS_INITIAL_SLIDE
The player is in an initial slide action. [Used in 6-6 to slide all the way down automatically].
@ STATUS_PROPEL
The player is flying with the propeller suit.
@ STATUS_SPRING_JUMP
The player is doing a jump on a springboard.
@ STATUS_QUAKE_SMALL
A small quake that makes the player do a hop was triggered.
@ STATUS_ALL_DOWN_FADE
All players have died and the screen is transitioning.
@ STATUS_PRESS_ATTACH
The player is is attached to a enemy while ground pounding or doing a down spin. [Used for the big go...
@ STATUS_DISPLAY_OUT_DEAD
The player is outside of the screen bounds and should die as a result.
@ STATUS_GOAL_POLE_CAN_SLIDE
The player can start sliding down the goal pole.
@ STATUS_CANNON_JUMP
The player is flying out of a pipe cannon.
@ STATUS_PLAYER_JUMP
The player is doing a jump on another player.
@ STATUS_INVISIBLE
The player is invisible.
@ STATUS_ABOUT_TO_BE_DELETED
[Yoshi only?]
@ STATUS_QUAKE
The player was stunned by an earthquake.
@ STATUS_HIP_ATTACK
The player is in the ground pound action and is not yet about to stand back up.
@ STATUS_HIP_ATTACK_LAND
The player has landed after ground pounding. Only active on one frame.
@ STATUS_PENGUIN_SLIDE
The player is sliding with the penguin suit.
@ STATUS_WAS_TWIRL
The player was twirling in midair the previous frame.
@ STATUS_GOAL_POLE_TURN
The player is turning toward the screen after jumping off the goal pole.
@ STATUS_PENGUIN_RECOIL
The player is bouncing back after hitting an enemy that cannot be killed by a penguin slide.
@ STATUS_CREATED
The player was created.
@ STATUS_JUMP
The player is jumping.
@ STATUS_STOP_EXECUTE
Stop executing this player indefinitely.
@ STATUS_FOLLOW_MAME_KURIBO
Mini Goombas are attached to the player.
@ STATUS_YOSHI_DISMOUNT_JUMP
The player is doing a jump to dismount Yoshi.
@ STATUS_SPIN_HIP_ATTACK_FALL
The player is falling while doing a down spin.
@ STATUS_SIT_JUMP
The player is doing a sitting jump.
@ STATUS_8E
[Cannon shot related]
@ STATUS_PROPEL_SLOW_FALL
The player will fall slowly while spinning down with the propeller suit.
@ STATUS_CAN_SPIN
The player can shake the controller to do a spin jump or a propeller spin.
@ STATUS_GOAL_POLE_READY_FOR_JUMP_OFF
The player is ready to jump off the goal pole.
@ STATUS_BIG_JUMP
The player is doing a jump on a spring or another player.
@ STATUS_HIP_ATTACK_DAMAGE_PLAYER
The player was ground pounded by another player.
@ STATUS_STAR_JUMP
The player is jumping while in star mode.
@ STATUS_JUMP_DAI_COOLDOWN
The player recently failed to perform a big jump because of a ceiling.
@ STATUS_RIDE_YOSHI
The player is riding Yoshi.
@ STATUS_FIREBALL_PREPARE_SHOOT
The player is about to shoot a fireball.
@ STATUS_HIP_ATTACK_STAND_UP
The player is standing up after ground pounding. Only active on one frame.
@ STATUS_CAN_WATER_WALK
The player can walk on water because of the mini mushroom.
@ STATUS_CAN_PENGUIN_SLIDE
If the player can start sliding as a penguin.
@ STATUS_OUT_OF_PLAY
The player is in a bubble or has died.
@ STATUS_QUAKE_BIG
A big quake that stuns the player was triggered.
@ STATUS_HIP_ATTACK_FALL
The player is falling while ground pounding.
@ STATUS_KANI_JUMP
The player is doing a crab jump on a cliff.
@ STATUS_CAN_EXECUTE
The player can execute this frame or not.
@ STATUS_IS_PENGUIN
The player is in the penguin suit.
@ STATUS_SLOPE_HEAD_PUSH_L
The player cannot move further left on a slope because of a ceiling.
@ STATUS_DISABLE_STATE_CHANGE
Disallow state changes.
@ STATUS_WIND_AIRBORNE
The player is airborne while in a wind zone.
@ STATUS_STUNNED
Stunned by electric shock or ice.
@ STATUS_CAN_LAND
The player can land on Yoshi or another player.
@ STATUS_WALL_SLIDE
The player is sliding down a wall.
@ STATUS_DEMO_NEXT_GOTO_BLOCK
The player is transitioning after touching a next goto area.
@ STATUS_GOAL_POLE_WAIT_BELOW_PLAYER
The player is waiting for the player below to slide down the goal pole.
@ STATUS_SWIM_AGAINST_JET_H
The player is swimming against a horizontal water jet stream.
@ STATUS_PROPEL_NO_ROLL
Don't rotate the player because of the propeller suit.
@ STATUS_07
[Ice related]
@ STATUS_GOAL_POLE_FINISHED_SLIDE_DOWN
The player has reached the bottom of the goal pole after sliding down.
@ STATUS_SWIM
The player is swimming.
@ STATUS_SLIP_ACTIVE
The player is sliding.
@ STATUS_GOAL_POLE_NOT_GOAL_NO_MOVE
The player did not reach the goal pole in time and mustn't move anymore.
@ STATUS_SWIM_AGAINST_JET_V
The player is swimming against a vertical water jet stream.
@ STATUS_ON_WATER_MOVE
The player is on water by being mini or sliding with the penguin suit.
@ STATUS_PROPEL_UP
The player is flying upwards with the propeller suit.
@ STATUS_JUMP_COUNT_INCREASED
The jump combo counter was incremented this frame.
@ STATUS_40
[Water jump?]
@ STATUS_NO_ANIM
Don't play any animations.
@ STATUS_A5
[Jump moving up?]
@ STATUS_39
[Swim related]
virtual int preDraw()
pre method for the draw operation.
void * mStateArg
To be used as an argument to the new state.
int wasStaffCreditGroundHipAttack
Whether the floor was ground pounded during the staff credits. [Used to allow for the coin block grou...
void setControlDemoCutscene(AnimePlayArg_e animID)
virtual int execute()
do method for the execute operation.
void slipPowerSet(int)
static const int sc_DemoPoleWaitTurn
Number of frames to wait before turning towards the screen in the goal pole animation.
int mSubstateValue
States can use this field for various purposes - as a timer, boolean flag, etc.
SwimArg_e
Arguments for transitioning to the swim state.
@ SWIM_ARG_FIREBALL
Player was about to shoot a fireball, shoot it while in water.
@ SWIM_ARG_ENTERING
Just entered the water.
@ SWIM_ARG_INITIAL
Already in water at the start of the swim action.
@ SWIM_ARG_CLIFF_HANG
Falling from a cliff into water.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
u8 mIsDispLimitR
Whether the player is too far to the right and should be pushed to the left.
bool isStatus(int id)
u8 mIsDispLimitL
Whether the player is too far to the left and should be pushed to the right.
void changeDemoState(const sStateIDIf_c &stateID, int arg)
Transitions to a new state with the given state ID and argument.
int mSquishCooldownTimer
Cooldown for another player to squish this player.
CrouchArg_e
Arguments for transitioning to the crouch state.
@ CROUCH_ARG_FROM_WALK
Crouching while already on the ground.
@ CROUCH_ARG_FROM_SIT_JUMP
Landing from a crouch jump.
@ CROUCH_ARG_FROM_OTHER
Crouching after a slide or a ground pound.
AnmBlend_e
Blending modes for animations.
@ BLEND_DEFAULT
Use the default blend duration specified in the animation HIO.
@ BLEND_NONE
Do not blend between animations.
@ BGC_37
Cannot wall kick or ground pound while this is set.
@ BGC_VINE_TOUCH_R
Touching a vine / mesh net / rock wall on the right.
@ BGC_VINE_TOUCH_FULL
Fully touching a vine / mesh net / rock wall.
@ BGC_VINE_TOUCH_U
Touching a vine / mesh net / rock wall on the top.
@ BGC_LIFT
[Figure out a better name for this].
@ BGC_VINE_TOUCH_L
Touching a vine / mesh net / rock wall on the left.
@ BGC_VINE_TOUCH_D
Touching a vine / mesh net / rock wall on the bottom.
@ BGC_VINE_TOUCH
Touching a vine / mesh net / rock wall on any side.
MAIN_STATE_e
The possible operation results.
Definition f_base.hpp:36
A two-dimensional floating point vector.
Definition m_vec.hpp:26
A three-dimensional floating point vector.
Definition m_vec.hpp:122
A wrapper for sStateMgr_c that uses sFStateFct_c and sStateIDChk_c.
PLAYER_TYPE_e
The identifiers for each player type.
PLAYER_POWERUP_e
The identifiers for each powerup.
fBaseID_e
A unique identifier for each base.
Definition f_base_id.hpp:6
#define STATE_VIRTUAL_FUNC_DECLARE(class, name)
Declares a virtual state.
Definition s_State.hpp:22