1#include <game/bases/d_enemy.hpp>
2#include <game/bases/d_bc.hpp>
3#include <game/bases/d_quake.hpp>
4#include <game/mLib/m_effect.hpp>
5#include <game/bases/d_a_player.hpp>
6#include <game/bases/d_a_player_manager.hpp>
7#include <game/bases/d_bg.hpp>
8#include <game/bases/d_score_mng.hpp>
9#include <game/bases/d_ef.hpp>
10#include <game/bases/d_effectmanager.hpp>
11#include <game/bases/d_effactor_mng.hpp>
13#include <game/bases/d_multi_mng.hpp>
14#include <game/bases/d_bg_parameter.hpp>
15#include <game/bases/d_enemy_manager.hpp>
18const s8 l_EnMuki[] = { 1, -1 };
19const s16 l_base_angleY[] = { 0x2000, -0x2000 };
20const s16 l_base_angleY_add[] = { 0x400, -0x400 };
21const float l_base_fall_speed_x[] = { 1.5f, -1.5f };
23const float dEn_c::smc_WATER_GRAVITY = -0.0625f;
24const float dEn_c::smc_WATER_YMAXSPD = 1.5f;
25const float dEn_c::smc_WATER_FALLMAXSPD = -1.5f;
26const float dEn_c::smc_WATER_ROLL_DEC_RATE = 0.5f;
47 for (
int i = 0; i < PLAYER_COUNT; i++) {
69 if (dQuake_c::m_instance->
mFlags & dQuake_c::FLAG_1) {
71 setDeathInfo_Quake(0);
73 }
else if (dQuake_c::m_instance->
mFlags & dQuake_c::FLAG_2) {
75 setDeathInfo_Quake(1);
77 }
else if (dQuake_c::m_instance->
mFlags & dQuake_c::FLAG_0) {
99 for (u32 i = 0; i < PLAYER_COUNT; i++) {
122void dEn_c::hitdamageEffect(
const mVec3_c &pos) {
125 mEf::createEffect(
"Wm_en_hit", 0, &efPos,
nullptr,
nullptr);
128void dEn_c::fumidamageEffect(
const mVec3_c &pos) {
129 hitdamageEffect(pos);
132void dEn_c::hipatkEffect(
const mVec3_c &pos) {
134 dEf::createEffect_change(
"Wm_mr_hardhit", 0, &pos,
nullptr,
nullptr);
136 dEf::createEffect_change(
"Wm_mr_softhit", 0, &pos,
nullptr,
nullptr);
140void dEn_c::fumidamageSE(
const mVec3_c &,
int) {
141 dAudio::SoundEffectID_t(SE_EMY_DOWN).playEmySound(
mPos, 0);
148void dEn_c::posMove() {
149 u16 ang =
mBc.getSakaMoveAngle(
mSpeed.x < 0.0f);
152 move.set(0.0f, 0.0f, 0.0f);
154 float speedX = std::fabs(
mSpeed.x);
155 float cos = mAng(ang).cos();
156 float sin = mAng(ang).sin();
157 move.x = speedX * cos;
158 move.y =
mSpeed.y + speedX * sin;
162 mFootPush2.set(0.0f, 0.0f, 0.0f);
166 if (!ok &&
mSpeed.y <= 0.0f) {
167 move.x += mFootPush2.x;
175void dEn_c::Bound(
float epsY,
float scaleX,
float scaleY) {
182 if (std::fabs(
mSpeed.x) < 1.0f / 16.0f) {
196bool dEn_c::checkDispIn() {
200 dBgParameter_c *bgParam = dBgParameter_c::ms_Instance_p;
201 float xStart = bgParam->xStart();
202 float xEnd = bgParam->xEnd();
203 float yStart = bgParam->yStart();
204 float yEnd = bgParam->yEnd();
221void dEn_c::normal_collcheck(
dCc_c *cc1,
dCc_c *cc2) {
225 if (actor1->mDeathInfo.mIsDead) {
230 u32 kind = actor2->mKind;
232 if (actor1->EnDamageCheck(cc1, cc2)) {
235 actor1->Normal_VsEnHitCheck(cc1, cc2);
238 if (actor1->mFlags & FLAG_24 || !CeilCheck(actor1->mPos.y, cc1)) {
239 if (actor1->PlDamageCheck(cc1, cc2)) {
240 actor1->mCcValue = cc1->unk3;
243 s8 *plrNo = actor2->getPlrNo();
244 if (*plrNo >= 0 && *plrNo < PLAYER_COUNT) {
245 if (actor1->mNoHitPlayer.mTimer[*plrNo] == 0) {
247 actor1->Normal_VsPlHitCheck(cc1, cc2);
253 s8 *plrNo = actor2->getPlrNo();
254 if (*plrNo >= 0 && *plrNo < PLAYER_COUNT) {
255 if (cc2->mCcData.mAttackCategory == dCc_c::ATTACK_YOSHI_EAT) {
256 actor1->hitYoshiEat(cc1, cc2);
258 if (!CeilCheck(actor1->mPos.y, cc1)) {
259 if (actor1->YoshiDamageCheck(cc1, cc2)) {
260 actor1->mCcValue = cc1->unk3;
262 }
else if (actor1->mNoHitPlayer.mTimer[*plrNo] == 0) {
264 actor1->Normal_VsYoshiHitCheck(cc1, cc2);
270 if (actor1->EtcDamageCheck(cc1, cc2)) {
271 actor1->mCcValue = cc1->unk3;
277void dEn_c::Normal_VsEnHitCheck(
dCc_c *cc1,
dCc_c *cc2) {}
279void dEn_c::Normal_VsPlHitCheck(
dCc_c *cc1,
dCc_c *cc2) {
281 if (!LineBoundaryCheck(owner)){
286void dEn_c::Normal_VsYoshiHitCheck(
dCc_c *cc1,
dCc_c *cc2) {
288 if (!LineBoundaryCheck(owner)){
293bool dEn_c::EnDamageCheck(
dCc_c *cc1,
dCc_c *cc2) {
295 if (hitCallback_Shell(cc1, cc2)) {
302bool dEn_c::PlDamageCheck(
dCc_c *cc1,
dCc_c *cc2) {
303 daPlBase_c *owner = (daPlBase_c *) cc2->
mpOwner;
312 if (owner->isMameAction()) {
315 if (hitCallback_HipAttk(cc1, cc2)) {
328 if (hitCallback_PenguinSlide(cc1, cc2)) {
344bool dEn_c::YoshiDamageCheck(
dCc_c *cc1,
dCc_c *cc2) {
345 daPlBase_c *owner = (daPlBase_c *) cc2->
mpOwner;
364bool dEn_c::EtcDamageCheck(
dCc_c *cc1,
dCc_c *cc2) {
384 if (owner->hitCallback_Ice(cc1, cc2)) {
396void dEn_c::hitYoshiEat(
dCc_c *cc1,
dCc_c *cc2) {}
404 return playerPos.x < 0;
413 return playerPos.y < 0;
416bool dEn_c::CeilCheck(
float y,
dCc_c *cc) {
420bool dEn_c::carry_check(
dActor_c *actor) {
421 dAcPy_c *pl = (dAcPy_c *) actor;
437int dEn_c::Enfumi_check(
dCc_c *cc1,
dCc_c *cc2,
int step) {
440 int fumiRes = mFumiProc.operate(fumiInfo, 1);
448 }
else if (step == 1) {
456 yoshifumiEffect(owner);
457 }
else if (step == 1) {
458 yoshifumistepSE(owner);
460 YoshiFumiJumpSet(owner);
461 YoshiFumiScoreSet(owner);
465 MameFumiJumpSet(owner);
467 mamefumiEffect(owner);
472 spinfumiEffect(owner);
473 }
else if (step == 1) {
476 SpinFumiJumpSet(owner);
477 SpinFumiScoreSet(owner);
483void dEn_c::FumiScoreSet(
dActor_c *actor) {
484 setFumiComboScore(actor);
487void dEn_c::FumiJumpSet(
dActor_c *actor) {
488 PlayerFumiJump(actor, dAcPy_c::msc_JUMP_SPEED + 0.2815f);
491void dEn_c::MameFumiJumpSet(
dActor_c *actor) {
492 float jumpSpeed = (dAcPy_c::msc_JUMP_SPEED + 0.2815f);
493 jumpSpeed *= 0.8125f;
495 jumpSpeed +=
mSpeed.y * 0.2f;
497 PlayerFumiJump(actor, jumpSpeed);
500void dEn_c::YoshiFumiJumpSet(
dActor_c *actor) {
501 PlayerFumiJump(actor, dAcPy_c::msc_JUMP_SPEED + 0.2815f);
504void dEn_c::YoshiFumiScoreSet(
dActor_c *actor) {
508void dEn_c::SpinFumiJumpSet(
dActor_c *actor) {
512void dEn_c::SpinFumiScoreSet(
dActor_c *actor) {
516void dEn_c::PlayerFumiJump(
dActor_c *actor,
float param_2) {
517 ((daPlBase_c *) actor)->vf3fc(param_2, actor->
mSpeedF, 1, 0, 2);
518 dEnemyMng_c::m_instance->m_138 = 1;
521void dEn_c::setFumiComboScore(
dActor_c *actor) {
522 int treadCount = dEnCombo_c::calcPlFumiCnt(actor);
523 if (treadCount >= 0) {
526 pos.y =
mPos.y + scY;
528 case dEnCombo_c::COMBO_REGULAR: {
529 dScoreMng_c *instance = dScoreMng_c::getInstance();
530 instance->ScoreSet(pos, treadCount, *actor->
getPlrNo(), 1);
533 case dEnCombo_c::COMBO_SHORT: {
534 dScoreMng_c *instance = dScoreMng_c::getInstance();
535 instance->ScoreSet2(pos, treadCount, *actor->
getPlrNo());
546 static const int claps[] = { 7, 7, 4 };
547 return num >= claps[
mCombo.mType];
550void dEn_c::fumiSE(
dActor_c *actor) {
563 int count = ((daPlBase_c *) actor)->getTreadCount();
564 if (count >= ARRAY_SIZE(cs_combo_se)) {
565 count = ARRAY_SIZE(cs_combo_se) - 1;
574void dEn_c::spinfumiSE(
dActor_c *actor) {
575 const static dAudio::SoundEffectID_t cs_combo_se[] = {
587 int count = ((daPlBase_c *) actor)->getTreadCount();
588 if (count >= ARRAY_SIZE(cs_combo_se)) {
589 count = ARRAY_SIZE(cs_combo_se) - 1;
598void dEn_c::yoshifumiSE(
dActor_c *actor) {
599 const static dAudio::SoundEffectID_t cs_combo_se[] = {
611 int count = ((daPlBase_c *) actor)->getTreadCount();
612 if (count >= ARRAY_SIZE(cs_combo_se)) {
613 count = ARRAY_SIZE(cs_combo_se) - 1;
622void dEn_c::mamefumiSE(
dActor_c *actor) {
623 dAudio::SoundEffectID_t(SE_EMY_MAME_STEP).playEmySound(
getCenterPos(), 0);
626void dEn_c::fumistepSE(
dActor_c *actor) {
627 dAudio::SoundEffectID_t(SE_EMY_CMN_STEP).playEmySound(
getCenterPos(), 0);
630void dEn_c::yoshifumistepSE(
dActor_c *actor) {
631 dAudio::SoundEffectID_t(SE_EMY_YOSHI_STEP).playEmySound(
getCenterPos(), 0);
634void dEn_c::fumiEffect(
dActor_c *actor) {
639 daPlBase_c *pl = (daPlBase_c *) actor;
641 efPos.x = pl->getAnkleCenterX();
642 efPos.y = pl->getAnkleCenterY();
644 mEf::createEffect(
"Wm_en_hit", 0, &efPos,
nullptr,
nullptr);
647void dEn_c::spinfumiEffect(
dActor_c *actor) {
649 efPos.x = actor->
mPos.x;
650 efPos.y = actor->
mPos.y;
652 mEf::createEffect(
"Wm_en_hit", 0, &efPos,
nullptr,
nullptr);
655void dEn_c::yoshifumiEffect(
dActor_c *actor) {}
657void dEn_c::mamefumiEffect(
dActor_c *actor) {}
659u32 dEn_c::EnBgCheck() {
661 u32 footCheckRes = EnBgCheckFoot();
666 u32 checkHeadRes =
mBc.checkHead(footCheckRes);
670 u32 bgCheckWallRes = EnBgCheckWall();
671 if (bgCheckWallRes) {
674 u32 arg = checkHeadRes | bgCheckWallRes;
675 u32 actArg = arg | footCheckRes;
676 if (
mBc.mFlags & 0x8000 &&
mBc.mFlags & 3 &&
mBc.mpRc !=
nullptr) {
681 if (!
mBc.mpRc->check2(actArg & 0x1f6000, v, 0)) {
682 mBc.mFlags &= 0xffff7fff;
688bool dEn_c::EnBgCheckFoot() {
689 if (!
mBc.hasSensorFoot()) {
690 mFootPush2.set(0.0f, 0.0f, 0.0f);
693 bool res =
mBc.checkFootEnm();
697 u32 footAttr =
mBc.getFootAttr();
698 if ((u16) footAttr == 3) {
701 if ((u16) footAttr == 1) {
704 mFootPush =
mBc.mPushForce;
705 mFootPush2.set(0.0f, 0.0f, 0.0f);
707 mFootPush.set(0.0f, 0.0f, 0.0f);
712u32 dEn_c::EnBgCheckWall() {
713 if (!
mBc.hasSensorWall()) {
716 float tmpX =
mBc.m_4c;
717 u8 dir =
mPos.x - tmpX < 0.0f;
718 float dirVal = l_EnMuki[dir];
719 u32 flags =
mBc.checkWallEnm(&dirVal);
720 dirVal = l_EnMuki[dir ^ 1];
721 u32 wallFlags =
mBc.checkWallEnm(&dirVal);
723 wallFlags |=
mBc.checkWallEnm(&dirVal);
725 mBc.mFlags |= flags | wallFlags;
733 int waterLineRes = WaterLineProc(pos, h);
734 if (waterLineRes == dBc_c::WATER_CHECK_YOGAN) {
735 setDeathInfo_Smoke(
nullptr);
737 }
else if (waterLineRes != dBc_c::WATER_CHECK_NONE &&
mNoRespawn) {
742bool dEn_c::LineBoundaryCheck(
dActor_c *actor) {
745 if (pl->mFlags & 0x80000 || pl->mFlags & 0x100000) {
752dBc_c::WATER_TYPE_e dEn_c::WaterLineProc(
const mVec3_c &pos,
float h) {
754 dBc_c::WATER_TYPE_e res = dBc_c::checkWater(pos.x, pos.y,
mLayer, &height);
755 mVec3_c waterPos(
mPos.x, height, 6500.0f);
757 case dBc_c::WATER_CHECK_WATER:
758 case dBc_c::WATER_CHECK_WATER_BUBBLE:
768 case dBc_c::WATER_CHECK_YOGAN:
774 case dBc_c::WATER_CHECK_POISON:
794 mVec3_c efScale(scale, scale, scale);
795 u32 flags =
mLayer << 16 | 5;
796 dEffActorMng_c::m_instance->createWaterSplashEff(efPos, flags, -1, efScale);
801 dBg_c::m_bg_p->setWaterInWave(pos.x, pos.y, 16);
803 dBg_c::m_bg_p->setWaterInWave(pos.x, pos.y, 14);
809 mVec3_c efScale(scale, scale, scale);
810 u32 flags =
mLayer << 16 | 7;
811 dEffActorMng_c::m_instance->createWaterSplashEff(efPos, flags, -1, efScale);
816 dBg_c::m_bg_p->setWaterInWave(pos.x, pos.y, 23);
818 dBg_c::m_bg_p->setWaterInWave(pos.x, pos.y, 21);
822bool dEn_c::EnLavaCheck(
const mVec3_c &pos) {
824 dBc_c::WATER_TYPE_e res = dBc_c::checkWater(pos.x, pos.y,
mLayer, &height);
825 if (res == dBc_c::WATER_CHECK_YOGAN) {
826 if (height < 0.0f && mLastPos.y > height &&
mPos.y <= height) {
834bool dEn_c::EnWaterCheck(
const mVec3_c &pos) {
835 if (EnWaterFlagCheck(pos) != dBc_c::WATER_CHECK_NONE) {
843bool dEn_c::EnWaterFlagCheck(
const mVec3_c &pos) {
844 switch (dBc_c::checkWater(pos.x, pos.y,
mLayer,
nullptr)) {
845 case dBc_c::WATER_CHECK_WATER:
846 case dBc_c::WATER_CHECK_WATER_BUBBLE:
854void dEn_c::setWaterSpeed() {
859 }
else if (
mSpeedMax.y > smc_WATER_YMAXSPD) {
869 if (
mSpeed.y < -smc_WATER_YMAXSPD) {
870 mSpeed.y = -smc_WATER_YMAXSPD;
871 }
else if (
mSpeed.y > smc_WATER_YMAXSPD) {
872 mSpeed.y = smc_WATER_YMAXSPD;
876bool dEn_c::Area_X_check(
float x) {
877 for (
int i = 0; i < PLAYER_COUNT; i++) {
878 dAcPy_c *player = daPyMng_c::getPlayer(i);
879 if (player !=
nullptr && daPyMng_c::checkPlayer(i)) {
880 mVec3_c playerPos = player->
mPos;
881 float diff = std::fabs(playerPos.x -
mPos.x);
890bool dEn_c::Area_XY_check(
float x,
float y) {
891 for (
int i = 0; i < PLAYER_COUNT; i++) {
892 dAcPy_c *player = daPyMng_c::getPlayer(i);
893 if (player !=
nullptr && daPyMng_c::checkPlayer(i)) {
894 mVec3_c playerPos = player->
mPos;
895 if (std::fabs(playerPos.x -
mPos.x) < x && std::fabs(playerPos.y -
mPos.y) < y) {
903bool dEn_c::PlayerCarryCheck(
dActor_c *actor) {
904 for (
int i = 0; i < PLAYER_COUNT; i++) {
905 dAcPy_c *player = daPyMng_c::getPlayer(i);
914 dAcPy_c *player = daPyMng_c::getPlayer(
mPlayerNo);
915 if (player->isStatus(4)) {
918 mMtx_c mtx = player->getCarryMtx();
919 mMtx_c transposeMtx = mMtx_c::createTrans(pos);
925bool dEn_c::turnangle_calc(
const short *target,
const short *delta) {
934void dEn_c::slipBound(
dActor_c *actor) {
935 static const float cs_jump_xspeed[] = { 1.5f, -1.5f };
936 daPlBase_c *pl = (daPlBase_c *) actor;
939 pl->
vf3fc(3.0f, cs_jump_xspeed[idx], 1, 0, 0);
970 mBoyoMng.mCounter = 0;
973void dEn_c::setNicePoint_Death() {
980void dEn_c::fireballInvalid(
dCc_c *cc1,
dCc_c *cc2) {
981 dAudio::g_pSndObjMap->startSound(SE_OBJ_FIREBALL_DISAPP, cc2->
mpOwner->
mPos, 0);
984void dEn_c::iceballInvalid(
dCc_c *cc1,
dCc_c *cc2) {
986 dAudio::g_pSndObjMap->startSound(SE_OBJ_PNGN_ICEBALL_DISAPP, owner->
mPos, 0);
988 mVec3_c efPos(owner->
mPos.x, owner->
mPos.y, 5500.0f);
989 EffectManager_c::SetIceBallMissshitEffect(&efPos);
992void dEn_c::setDamage(
dActor_c *actor) {
993 daPlBase_c *pl = (daPlBase_c *) actor;
994 pl->setDamage(
this, daPlBase_c::DAMAGE_NONE);
997void dEn_c::boyonInit() {
998 mBoyoMng.mScale = mBoyoMng.mpOwner->mScale;
1001void dEn_c::boyonBegin() {
1002 mBoyoMng.begin(dEnBoyoMng_c::smc_BOYON_TIME, dEnBoyoMng_c::smc_DELTA_SCALE);
1011 hitdamageEffect(efPos);
1015 l_base_fall_speed_x[dir],
bool FUN_8012e540(dActor_c *, bool)
bool isState(const sStateIDIf_c &other) const
Checks if the actor is currently in the given state.
sFStateStateMgr_c< dActorMultiState_c, sStateMethodUsr_FI_c, sStateMethodUsr_FI_c > mStateMgr
The state manager.
The minimum required implementation for a stage actor.
static u8 mExecStop
The actors for which the execute operation is currently disabled.
u8 mExecStopMask
The mask required to disable the execute operation for the actor.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
mVec3_c mPreEatScale
The actor's scale before being eaten.
bool mNoRespawn
Whether the actor should not respawn after being deleted.
virtual void reviveCc()
Enables the actor's collision.
dBc_c mBc
The actor-to-tile collision sensor.
u8 mKind
The actor's kind. Value is a STAGE_ACTOR_KIND_e.
u8 mAmiLayer
The actor's layer for chainlink fences.
u8 mDirection
The actor's facing direction.
virtual void removeCc()
Disables the actor's collision.
static dAcPy_c * searchNearPlayer_Main(mVec2_c &delta, const mVec2_c &pos)
See searchNearPlayerFunc.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
void setKind(u8 kind)
Sets the actor's kind. See STAGE_ACTOR_KIND_e.
virtual int preExecute()
pre method for the execute operation.
s8 mPlayerNo
The player associated with the actor, -1 if not associated to any player.
virtual void waterSplashEffect(const mVec3_c &pos, float size)
Generates a water splash effect.
dActor_c()
Constructs a new actor.
virtual void calcEatInScale(dActor_c *eatingActor)
Adjusts the actor's scale while being eaten.
virtual int preDraw()
pre method for the draw operation.
virtual s8 * getPlrNo()
Gets the player number associated with the actor. See mPlayerNo.
virtual void setAfterEatScale()
Restores the actor's scale once spat out.
@ STAGE_ACTOR_ENEMY
An enemy actor.
@ STAGE_ACTOR_YOSHI
The Yoshi actor.
@ STAGE_ACTOR_PLAYER
The player actor.
virtual void calcSpitOutPos(dActor_c *eatingActor)
Calculates the position where the actor will be spat out.
u8 mLayer
The actor's layer.
u8 mBgCollFlags
The collision directions that the actor can respond to.
mVec3_c mScale
The actor's scale (defaults to 1).
mVec3_c mSpeed
The actor's speed.
mVec3_c mPos
The actor's position.
mVec3_c mSpeedMax
The actor's maximum speed.
mVec3_c mCenterOffs
The offset from the position to the center of the actor (defaults to 0).
float mSpeedF
The actor's horizontal speed.
float mMaxFallSpeed
The actor's maximum fall speed.
mVec3_c getCenterPos() const
Gets the actor's centered position.
mAng3_c mAngle
The actor's rotation (for 2D actors).
u32 mActorProperties
The actor's properties. See fProfile::fActorProfile_c::mActorProperties.
float mAccelY
The actor's vertical acceleration.
@ ACTOR_MAP_ENEMY
A map enemy (dWmEnemy_c).
dBaseActor_c()
Constructs a new actor.
Collider ("Collision Check") class - handles collisions between actors.
dBaseActor_c * getOwner() const
Gets the owner actor of this collider.
CcData_s mCcData
The collision data of this collider.
dBaseActor_c * mpOwner
The actor this collider belongs to.
@ CC_DISABLE
Disables all collisions with this collider.
static const u16 smc_NO_HIT_PLAYER_TIMER_DEFAULT
float mAirMaxFallSpeed
The maximum fall speed before entering a liquid.
virtual ~dEn_c()
Destroys the actor.
u16 mTimer2
[Used in EN_HATENA_BALLON, for example]
bool getPl_LRflag(const mVec3_c &pos)
Checks whether the nearest player is to the left of pos.
u8 mDeathFallDirection
The X direction to move towards on death.
void WaterCheck(mVec3_c &pos, float h)
virtual bool setEatSpitOut(dActor_c *)
Callback for when the actor is about to be spat out.
float mAirAccelY
The Y acceleration before entering a liquid.
dDeathInfo_c mDeathInfo
The parameters for the death animation.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
dIceMng_c mIceMng
The ice manager for this enemy.
dEnCombo_c mCombo
The enemy combo manager.
u16 mTimer1
[Used in EN_HATENA_BALLON, for example]
dEn_c()
Constructs a new enemy actor.
static const u16 smc_NO_HIT_PLAYER_TIMER_SPIT_OUT
bool mKilledByLiquid
Whether the enemy was killed by falling in a liquid.
virtual void quakeAction()
virtual void setEatTongueOff(dActor_c *)
Callback for when the eating action is canceled.
virtual int preExecute()
pre method for the execute operation.
virtual void block_hit_init()
Callback for when a block directly beneath the actor is hit.
float mAirSpeedMaxY
The maximum Y speed before entering a liquid.
dPlayerDownTimer_c mNoHitPlayer
Hit cooldown timers for each player. This is used to prevent, for example, a thrown shell from hittin...
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
virtual void calcEatInScale(dActor_c *)
Adjusts the actor's scale while being eaten.
virtual void poisonSplashEffect(const mVec3_c &, float)
Generates a poison water splash effect.
virtual void setEatTongue(dActor_c *)
Callback for when the actor is targeted by Yoshi's tongue.
virtual void yoganSplashEffect(const mVec3_c &, float)
Generates a lava splash effect.
virtual int preDraw()
pre method for the draw operation.
u32 mFlags
Flags for this actor. See FLAGS_e.
bool getPl_UDflag(const mVec3_c &pos)
Checks whether the nearest player is below pos.
bool mInLiquid
Whether the enemy is in a liquid.
virtual void changeState(const sStateIDIf_c &newState)
Changes the actor's state to the given state.
virtual bool checkComboClap(int max)
static dMultiMng_c * mspInstance
The instance of this class.
void setClapSE()
Plays the clap sound effect.
static float smc_SCORE_Y
The score's vertical offset from the actor position.
virtual u32 vf3fc(float, float, int, int, int)
MAIN_STATE_e
The possible operation results.
@ SUCCESS
The operation was completed successfully.
bool mDeleteRequested
If deletion of the base was requested, but the delete operation has not been scheduled yet.
@ NOT_READY
The step could not completed at this time.
@ SUCCEEDED
The step was completed successfully.
static fBase_c * searchBaseByID(fBaseID_e id)
Searches for a base with the given ID.
void multVecZero(nw4r::math::VEC3 &out) const
Extracts the translation vector from the matrix.
A two-dimensional floating point vector.
A three-dimensional floating point vector.
const u8 l_Ami_Line[]
The sub-layer for each side of chainlink fences.
float mHeight
The height of the collider.
u32 mAttackCategoryInteract
Which attack categories this collider should be able to receive.
u8 mAttackCategory
The attack category of this collider. See CC_ATTACK_e .
float mOffsetY
The Y offset of the collider.