NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_enemy_carry.hpp
1#pragma once
2
3#include <game/bases/d_enemy.hpp>
4
5/// @brief A carryable enemy.
6/// This class is only used as a base for daEnJumpdai_c.
7/// @statetable
8/// @ingroup bases
9class dEnemyCarry_c : public dEn_c {
10public:
11 dEnemyCarry_c(); ///< Constructs a new carryable enemy.
12
13 virtual void setThrowSpeed(dActor_c *actor); ///< Sets the throw speed based on the actor throwing it.
14 virtual void setThrowChangeState(); ///< Throws this enemy.
15 virtual void setPutOnChangeState(); ///< Drops this enemy.
16
17 STATE_VIRTUAL_FUNC_DECLARE(dEnemyCarry_c, Carry); ///< The enemy is being carried.
18 STATE_VIRTUAL_FUNC_DECLARE(dEnemyCarry_c, Throw); ///< The enemy is being thrown / put down.
19
20 void setDeathInfo_CarryBgIn(dActor_c *); ///< Sets the death info for when the enemy is stuck in background collision.
21
22protected:
23 bool mWasDropped; ///< Whether the enemy was dropped or thrown. If dropped, it will not collide with other entities.
24 u8 mThrowSpeed; ///< 0 => X speed = 2.5, 1 => X speed = 3.0
25
26 static const float smc_DIR_MODE0[]; ///< @unofficial
27 static const float smc_DIR_MODE1[]; ///< @unofficial
28};
dActor_c()
Constructs a new actor.
Definition d_actor.cpp:46
dEn_c()
Constructs a new enemy actor.
Definition d_enemy.cpp:28
void setDeathInfo_CarryBgIn(dActor_c *)
Sets the death info for when the enemy is stuck in background collision.
virtual void setPutOnChangeState()
Drops this enemy.
static const float smc_DIR_MODE1[]
dEnemyCarry_c()
Constructs a new carryable enemy.
bool mWasDropped
Whether the enemy was dropped or thrown. If dropped, it will not collide with other entities.
virtual void setThrowSpeed(dActor_c *actor)
Sets the throw speed based on the actor throwing it.
virtual void setThrowChangeState()
Throws this enemy.
static const float smc_DIR_MODE0[]
u8 mThrowSpeed
0 => X speed = 2.5, 1 => X speed = 3.0
#define STATE_VIRTUAL_FUNC_DECLARE(class, name)
Declares a virtual state.
Definition s_State.hpp:22