1#include <game/bases/d_a_ice.hpp>
2#include <game/bases/d_a_player_manager.hpp>
3#include <game/bases/d_actor_manager.hpp>
4#include <game/bases/d_bg_parameter.hpp>
5#include <game/bases/d_enemy.hpp>
6#include <game/bases/d_enemy_manager.hpp>
7#include <game/bases/d_game_com.hpp>
8#include <game/bases/d_multi_manager.hpp>
9#include <game/bases/d_quake.hpp>
10#include <game/bases/d_s_stage.hpp>
11#include <game/bases/d_score_manager.hpp>
17mVec3_c l_mdl_defsize[daIce_c::ICE_TYPE_COUNT] = {
18 dIceParam_c::smc_ICE_DEFSIZE_SQUARE,
19 dIceParam_c::smc_ICE_DEFSIZE_TATE,
20 dIceParam_c::smc_ICE_DEFSIZE_YOKO,
21 dIceParam_c::smc_ICE_DEFSIZE_BIG_SQUARE,
22 dIceParam_c::smc_ICE_DEFSIZE_BIG_TATE,
23 dIceParam_c::smc_ICE_DEFSIZE_BIG_YOKO
26const float l_float_speed[daIce_c::ICE_WEIGHT_COUNT] = { 0.8f, 0.8f, 0.8f, 0.8f };
27const float l_toge_float_speed[daIce_c::ICE_WEIGHT_COUNT] = { 0.5f, 0.5f, 0.5f, 0.5f };
28const float l_attach_float_speed[daIce_c::ICE_WEIGHT_COUNT] = { 0.3f, 0.35f, 0.425f, 0.8f };
37 BIT_FLAG(CC_KIND_PLAYER) | BIT_FLAG(CC_KIND_PLAYER_ATTACK) | BIT_FLAG(CC_KIND_YOSHI) |
38 BIT_FLAG(CC_KIND_ENEMY) | BIT_FLAG(CC_KIND_ITEM) | BIT_FLAG(CC_KIND_TAMA) | BIT_FLAG(CC_KIND_KILLER),
39 BIT_FLAG(CC_ATTACK_ICE_BREAK) | BIT_FLAG(CC_ATTACK_YOSHI_FIRE) | BIT_FLAG(CC_ATTACK_YOSHI_BULLET),
67 mScale.set(1.0f, 1.0f, 1.0f);
70 if (!ACTOR_PARAM(Unbreakable)) {
73 if (!ACTOR_PARAM(NoCarry)) {
108 case dBc_c::WATER_CHECK_YOGAN:
109 case dBc_c::WATER_CHECK_POISON:
131 int iceType = ACTOR_PARAM(IceType);
135 const static char *cs_ice_mdl_name[daIce_c::ICE_TYPE_COUNT] = {
136 "ice_A1",
"ice_B1",
"ice_C1",
137 "ice_A2",
"ice_B2",
"ice_C2"
139 const char *iceMdlName = cs_ice_mdl_name[iceType];
140 nw4r::g3d::ResMdl mdl =
mResFileMdl.GetResMdl(iceMdlName);
143 mMdl.setPriorityDraw(127, 128);
145 const static char *cs_ice_anm_name[daIce_c::ICE_TYPE_COUNT] = {
146 "ice_A1",
"ice_B1",
"ice_C1",
147 "ice_A2",
"ice_B2",
"ice_C2"
149 const char *iceAnmName = cs_ice_anm_name[iceType];
163 if (parent ==
nullptr) {
171 mCc.mCcData.mVsDamage |= BIT_FLAG(CC_ATTACK_SPIN_LIFT_UP);
172 mCc.mCcData.mAttack = CC_ATTACK_NONE;
210 for (
int i = 0; i < PLAYER_COUNT; i++) {
211 dAcPy_c *player = daPyMng_c::getPlayer(i);
213 player->cancelCarry(
this);
230 mMatrix.trans(pos.x, pos.y, pos.z);
233 mMatrix.concat(mMtx_c::createTrans(0.0f,
mSize.y * 0.5f, 0.0f));
235 mMatrix.concat(mMtx_c::createTrans(0.0f,
mSize.y * -0.5f, 0.0f));
242 if (collider !=
nullptr && collider->mFlags & 0x800 && collider->mpActor->
checkCarried(
nullptr)) {
251 if (
mBc.mpCtrFoot !=
nullptr) {
263 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_FREEZE);
264 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_SMOKE);
271 blockSize.x = l_mdl_defsize[ACTOR_PARAM(IceType)].x * scale.x;
272 blockSize.y = l_mdl_defsize[ACTOR_PARAM(IceType)].y * scale.y;
273 blockSize.z = l_mdl_defsize[ACTOR_PARAM(IceType)].z * scale.z;
283 mPos.y = height + 1.0f;
289 mPos.y = height + 1.0f;
299 }
else if (area < 1536.0f) {
301 }
else if (area < 3072.0f) {
316 float sides[] = { 1.0f, -1.0f };
318 mBc.checkWall(&sides[0]);
319 mBc.checkWall(&sides[1]);
323 mCc.mCcData.mBase.mOffset.set(0.0f,
mSize.y * 0.5f);
324 mCc.mCcData.mBase.mSize.set(
mSize.x * 0.5f,
mSize.y * 0.5f - 1.0f);
325 mCc.mpFriendActor = parent;
327 mCc.mCcData.mAttack = CC_ATTACK_SHELL;
330 float w =
mSize.x * 0.5f;
331 float h =
mSize.y * 0.5f;
332 mBgCtr.set(
this, 0.0f, 0.0f, 0.0f, 0.0f,
callBackFoot,
callBackHead,
callBackWall, 1, 0,
nullptr);
347 mBgCtr.setAngleY3((s16 *) &smc_OBJBG_DUMMY_ANGLE);
354 if (parent->
mFlags & dEn_c::EN_FLAG_2) {
357 mCc.mAmiLine = amiLine;
358 mBc.mAmiLine = amiLine;
359 mBgCtr.mAmiLine = amiLine;
364 if (scale != dIceEfScale_c::Zero) {
383 float boundLeft =
mPos.x -
mSize.x * 0.5f;
384 float boundRight =
mPos.x +
mSize.x * 0.5f;
386 float boundBottom =
mPos.y;
390 for (
int i = 0; i < PLAYER_COUNT; i++) {
391 player = daPyMng_c::getCtrlPlayer(i);
392 if (player !=
nullptr && daPyMng_c::checkPlayer(i)) {
393 playerColl = &player->
mCc;
398 if (plLeft > boundRight || plRight < boundLeft || plBottom > boundTop || plTop < boundBottom) {
408 u8 layer = getLayer();
409 u8 amiLine = getAmiLine();
411 float yBottom =
mPos.y + 4.0f;
412 for (; yTop > yBottom; yTop -= 16.0f) {
413 float xLeft =
mPos.x - (
mSize.x * 0.5f - 4.0f);
414 float xRight =
mPos.x + (
mSize.x * 0.5f - 4.0f);
415 while (xLeft < xRight) {
416 if (dBc_c::checkBg(xLeft, yTop, layer, amiLine, 0x819)) {
421 if (dBc_c::checkBg(xRight, yTop, layer, amiLine, 0x819)) {
425 float xLeft =
mPos.x - (
mSize.x * 0.5f - 4.0f);
426 float xRight =
mPos.x + (
mSize.x * 0.5f - 4.0f);
427 for (; xLeft < xRight; xLeft += 16.0f) {
428 if (dBc_c::checkBg(xLeft, yBottom, layer, amiLine, 0x819)) {
432 return dBc_c::checkBg(xRight, yBottom, layer, amiLine, 0x819);
437 int linePointCount = 0;
443 xLeft =
mPos.x - (
mSize.x * 0.5f - 4.0f);
444 xRight =
mPos.x + (
mSize.x * 0.5f - 4.0f);
445 yBottom =
mPos.y + 10.0f;
447 for (; xLeft < xRight; xLeft += 8.0f) {
449 float groundHeight = 0.0f;
450 bool checkRes = dBc_c::checkGround(&pos, &groundHeight,
mLayer, 1, -1);
451 landLine[linePointCount] = -3e7f;
453 landLine[linePointCount] = groundHeight;
460 float groundHeight = 0.0f;
461 bool checkRes = dBc_c::checkGround(&pos, &groundHeight,
mLayer, 1, -1);
462 landLine[linePointCount] = -3e7f;
464 landLine[linePointCount] = groundHeight;
468 float maxHeight = -3e7;
469 for (
int i = 0; i < linePointCount; i++) {
470 if (landLine[i] > maxHeight && landLine[i] <= yBottom) {
471 maxHeight = landLine[i];
476 if (maxHeight >
mPos.y - 1.0f) {
494 float side[] = { 1.0f, -1.0f };
495 if (
mBc.checkWallEnm(&side[dir])) {
525 float groundHeight = 0.0f;
526 if (dBc_c::checkGround(&pos, &groundHeight,
mLayer, 1, -1)) {
527 if (groundHeight > pos.y - 2.0f) {
543 if (!ACTOR_PARAM(NoQuakeScore)) {
544 dEnemyMng_c::m_instance->breakdownSE(dEnemyMng_c::m_instance->m_154,
mPos);
545 dEnemyMng_c::m_instance->incQuakeComboCount(0);
546 int comboCount = dEnemyMng_c::m_instance->m_154;
547 if (comboCount >= 0) {
548 if (comboCount >= 8) {
551 dScoreMng_c::getInstance()->UnKnownScoreSet(
this, comboCount, 0.0f, 24.0f);
561 if (plrNo >= 0 && plrNo < PLAYER_COUNT) {
568 if (comboCount >= 0) {
569 int comboScore = parent->
mCombo.getComboScore(comboCount);
570 if (comboScore >= 8) {
573 dScoreMng_c::getInstance()->ScoreSet(
this, comboScore, plrNo);
583 if (plrNo >= 0 && plrNo < PLAYER_COUNT) {
584 comboCount = dEnCombo_c::calcPlComboCnt(initiator);
586 if (comboCount >= 0) {
587 int comboScore = parent->
mCombo.getComboScore(comboCount);
588 if (comboScore >= 8) {
591 dScoreMng_c::getInstance()->ScoreSet(
this, comboScore, plrNo);
600 int comboScore = parent->
mCombo.getFumiScore(initiator);
601 if (comboScore >= 8) {
605 dScoreMng_c::getInstance()->ScoreSet(
this, comboScore, initiator->
getPlrNo());
613 int comboScore = parent->
mCombo.getStarScore(initiator);
614 if (comboScore >= 8) {
618 dScoreMng_c::getInstance()->ScoreSet(
this, comboScore, initiator->
getPlrNo());
625 mBc.set(
this,
nullptr,
nullptr,
nullptr);
650 mBc.set(
this,
nullptr,
nullptr,
nullptr);
670 if (
mSize.x < 26.0f) {
680 const static EnlargeFunc cs_enlarge_f[] = {
688 float width =
mSize.x * 0.5f;
706 float width =
mSize.x * 0.5f;
712 float height =
mSize.y * 0.5f;
739 float shakeDir = (dScStage_c::m_exeFrame & 2) ? 1.0f : -1.0f;
755 const static short cs_angle_dir[] = { -0x200, 0x200 };
758 mFloatAngle += cs_angle_dir[parent->mBoyoMng.mDirection & 1];
786 if (player->isMameAction()) {
795 }
else if (player->
mSpeed.y < -3.0f) {
805 }
else if (yoshi->
mSpeed.y < -3.0f) {
824 if (plrNo >= 0 && plrNo < PLAYER_COUNT) {
825 dQuake_c::getInstance()->startShock(actor->
getPlrNo(), dQuake_c::TYPE_6, 2, 0,
false);
828 pl->setDamage(
this, daPlBase_c::DAMAGE_HEAD_BONK);
843 pl->setDamage(
this, daPlBase_c::DAMAGE_HIP_ATTACK);
852 if (dBc_c::checkWater(
mPos.x,
mPos.y +
mSize.y * 0.7f,
mLayer,
nullptr) == dBc_c::WATER_CHECK_WATER) {
854 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_WATER_BREAK);
857 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_BREAK);
863 if (dBc_c::checkWater(
mPos.x,
mPos.y +
mSize.y * 0.7f,
mLayer,
nullptr) == dBc_c::WATER_CHECK_WATER) {
865 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_WATER_BREAK);
868 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_RELEASE);
875 if (ice->isDestroy()) {
881 int dir = !(ice->
mPos.x >= other->
mPos.x);
896 if (ice->isDestroy()) {
913 int dir = !(ice->
mPos.x >= other->
mPos.x);
929 if (ice->isDestroy()) {
933 int breakDir = !(ice->
mPos.x >= other->
mPos.x);
934 switch (other->
mKind) {
976 if (dir == DIR_LR_L) {
992 int dir = !(ice->
mPos.x <= actor->
mPos.x);
995 if (otherProf == fProf::ICE_ACTOR) {
1002 if (otherProf == fProf::EN_TOGETEKKYU || otherProf == fProf::EN_BIG_TOGETEKKYU) {
1006 if (ice->isDestroy()) {
1012 self->
mInfo |= CC_NO_HIT;
1024 self->
mInfo |= CC_NO_HIT;
1034 self->
mInfo |= CC_NO_HIT;
1049 self->
mInfo |= CC_NO_HIT;
1059 self->
mInfo |= CC_NO_HIT;
1065 other->
mCcData.mVsDamage & BIT_FLAG(CC_ATTACK_SHELL) &&
1069 self->
mInfo |= CC_NO_HIT;
1077 int dir = !(ice->
mPos.x <= actor->
mPos.x);
1079 if (actor->
mProfName == fProf::ICE_ACTOR) {
1087 self->
mInfo |= CC_NO_HIT;
1101 getManager()->setDestroyMode(dIceMng_c::DESTROY_BREAK);
1103 if (playerNo >= 0 && playerNo < PLAYER_COUNT) {
1104 int damageScore = parent->
mCombo.getDamageScore();
1105 dScoreMng_c::getInstance()->ScoreSet(
this, damageScore, playerNo);
1118 getManager()->setDestroyMode(dIceMng_c::DESTROY_VANISH);
1123 float width =
mSize.x * 0.5f - 6.0f;
1130 if (dBc_c::checkWireNet(
mPos.x - width,
mPos.y + 6.0f,
mLayer)) {
1133 if (dBc_c::checkWireNet(
mPos.x + width,
mPos.y + 6.0f,
mLayer)) {
1142 mBgCtr.mpCarryActor = actor;
1165 if (playerTouchingCeiling !=
nullptr) {
1166 *playerTouchingCeiling = FALSE;
1169 bool result =
false;
1170 for (
dBc_c *curr =
mBgCtr.mpTriggeredHead; curr !=
nullptr; curr = curr->mTriggeredHeadSensor) {
1174 *playerTouchingCeiling = TRUE;
1183 if (playerTouchingFloor !=
nullptr) {
1184 *playerTouchingFloor = FALSE;
1186 if (plrNo !=
nullptr) {
1190 bool result =
false;
1191 for (
dBc_c *curr =
mBgCtr.mpTriggeredFoot; curr !=
nullptr; curr = curr->mTriggeredFootSensor) {
1195 *playerTouchingFloor = TRUE;
1197 if (plrNo !=
nullptr) {
1207 if (checkResult !=
nullptr) {
1211 bool result =
false;
1212 for (
dBc_c *curr =
mBgCtr.mpTriggeredWall; curr !=
nullptr; curr = curr->getLinkW(&
mBgCtr)) {
1215 if (dir == DIR_LR_R) {
1217 if (checkResult !=
nullptr && (pl->isNowBgCross(daPlBase_c::BGC_WALL_TOUCH_R_2) || pl->isNowBgCross(daPlBase_c::BGC_SIDE_LIMIT_R))) {
1227 if (checkResult !=
nullptr && (pl->isNowBgCross(daPlBase_c::BGC_WALL_TOUCH_L_2) || pl->isNowBgCross(daPlBase_c::BGC_SIDE_LIMIT_L))) {
1242 const static float sc_dir[] = { 1.0f, -1.0f };
1246 bool result =
false;
1247 float margin = -2.0f;
1251 }
else if (pl->m_d80[(u8) dir] * sc_dir[dir] < 0.0f) {
1256 if (result && pl->checkInsideCrossBg(margin)) {
1271 mMtx_c carryMtx = mMtx_c::createTrans(player->getCarryPos());
1272 carryMtx.concat(player->getModel()->getMtx());
1273 carryMtx.concat(mMtx_c::createTrans(zero, zero, zero));
1301 if (parent ==
nullptr) {
1311 if (dScStage_c::m_instance !=
nullptr && dScStage_c::m_instance->mCurrWorld == WORLD_8 && dScStage_c::m_instance->mCurrCourse == STAGE_3) {
1315 mEf::createEffect(
"Wm_en_cmnmagmawave", 0, &efPos,
nullptr,
nullptr);
1317 mEf::createEffect(
"Wm_en_magmawave", 0, &efPos,
nullptr,
nullptr);
1321 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_YOGAN);
1322 dAudio::g_pSndObjMap->startSound(SE_OBJ_CMN_SPLASH_LAVA, efPos, 0);
1329 mIceEfMaker.createEffect(dIceEfMaker_c::ICE_EF_POISON);
1330 dAudio::g_pSndObjMap->startSound(SE_OBJ_CMN_SPLASH_POISON, efPos, 0);
1333void daIce_c::initializeState_Freeze() {
1337void daIce_c::finalizeState_Freeze() {
1342void daIce_c::executeState_Freeze() {
1345 breakReq(dGameCom::rndInt(2), plr);
1349void daIce_c::initializeState_Hop() {
1368void daIce_c::finalizeState_Hop() {
1374void daIce_c::executeState_Hop() {
1377 int dir = !(
mSpeed.x >= 0.0f);
1379 bool isFoot =
mBc.isFoot();
1380 if (
mBc.checkWall(
nullptr)) {
1383 if (
mBc.checkFootEnm()) {
1389 dAudio::g_pSndObjMap->startSound(SE_OBJ_PNGN_ICE_LAND,
mPos, 0);
1400void daIce_c::initializeState_Land() {
1401 mSpeed.set(0.0f, 0.0f, 0.0f);
1404 mBgCtr.mFlags |= BIT_FLAG(11);
1407void daIce_c::finalizeState_Land() {
1412void daIce_c::executeState_Land() {
1413 float height = 0.0f;
1414 dBc_c::WATER_TYPE_e waterRes = dBc_c::checkWater(
mPos.x,
mPos.y,
mLayer, &height);
1415 if (waterRes == dBc_c::WATER_CHECK_WATER) {
1416 if (height >=
mPos.y +
mSize.y + 8.0f) {
1422 }
else if (waterRes == dBc_c::WATER_CHECK_YOGAN) {
1423 if (height >=
mPos.y + 4.0f) {
1435 if (!
mCc.isLinked()) {
1441 dBc_c::Flag_e isFootEnm =
mBc.checkFootEnm();
1446 if (!(
mBc.mFlags & dBc_c::FLAG_15)) {
1450 mBc.checkHead(isFootEnm);
1452 u8 dir =
mPos.x -
mBc.get_4c() < 0.0f;
1453 float dirs[] = { 1.0f, -1.0f };
1454 mBc.checkWallEnm(&dirs[dir]);
1455 mBc.checkWallEnm(&dirs[dir ^ 1]);
1467 breakReq(dGameCom::rndInt(2), plr);
1468 }
else if (!isFootEnm) {
1475void daIce_c::initializeState_Cover() {}
1477void daIce_c::finalizeState_Cover() {}
1479void daIce_c::executeState_Cover() {
1485 breakReq(dGameCom::rndInt(2), plr);
1489void daIce_c::initializeState_Sink() {
1497void daIce_c::finalizeState_Sink() {}
1499void daIce_c::executeState_Sink() {
1504 if (
mPos.y >= getFloatPosY()) {
1505 mPos.y = getFloatPosY();
1524 float yPos =
mPos.y;
1525 if (
mBc.checkFoot()) {
1526 if (
mBc.mFlags & dBc_c::FLAG_21) {
1529 BOOL playerTouchingCeiling = FALSE;
1538void daIce_c::initializeState_Float() {
1546void daIce_c::finalizeState_Float() {}
1548void daIce_c::executeState_Float() {
1567 BOOL playerTouchingCeiling = FALSE;
1572 }
else if (playerTouchingCeiling != FALSE) {
1582 if (
mPos.y >= getFloatPosY()) {
1585 if (
mBc.checkHead(0)) {
1591void daIce_c::initializeState_SmallFloat() {
1599void daIce_c::finalizeState_SmallFloat() {}
1601void daIce_c::executeState_SmallFloat() {
1619 BOOL playerTouchingCeiling = FALSE;
1624 }
else if (playerTouchingCeiling != FALSE) {
1635 if (
mPos.y >= getFloatPosY()) {
1640 }
else if (
mBc.checkHead(0)) {
1646void daIce_c::initializeState_FloatWait() {
1654void daIce_c::finalizeState_FloatWait() {
1658void daIce_c::executeState_FloatWait() {
1659 mAngle.z.chaseAngle(0, 0x10);
1664 float waterHeightDiff =
mWaterHeight - prevWaterHeight;
1665 if (waterHeightDiff > 0.0f) {
1667 }
else if (waterHeightDiff < 0.0f) {
1678 if (waterHeightDiff < 0.0f) {
1680 if (
mPos.y > maxPosY) {
1692 if (
mBc.checkHead(0)) {
1695 BOOL playerTouchingCeiling = FALSE;
1703void daIce_c::initializeState_PushSink() {
1704 const static float cs_float_speed[PUSH_SINK_COUNT] = {
1714void daIce_c::finalizeState_PushSink() {}
1716void daIce_c::executeState_PushSink() {
1719 if (
mWaterHeight - prevWaterHeight < 0.0f && mPos.y >= getFloatPosY()) {
1720 mPos.y = getFloatPosY();
1731 if (newVal < 0.125f) {
1743 float prevY =
mPos.y;
1744 if (
mBc.checkFoot()) {
1745 if (
mBc.mFlags & dBc_c::FLAG_21) {
1748 BOOL playerTouchingCeiling = FALSE;
1758void daIce_c::initializeState_TogeFloat() {
1766void daIce_c::finalizeState_TogeFloat() {}
1768void daIce_c::executeState_TogeFloat() {
1788 BOOL playerTouchingCeiling = FALSE;
1793 }
else if (playerTouchingCeiling != FALSE) {
1801 if (
mPos.y >= getFloatPosY()) {
1802 mPos.y = getFloatPosY();
1804 if (
mBc.checkHead(0)) {
1811void daIce_c::initializeState_ShakeFloat() {
1818void daIce_c::finalizeState_ShakeFloat() {}
1820void daIce_c::executeState_ShakeFloat() {
1838 BOOL playerTouchingCeiling = FALSE;
1843 }
else if (playerTouchingCeiling != FALSE) {
1850 if (
mPos.y >= getFloatPosY()) {
1851 mPos.y = getFloatPosY();
1853 if (
mBc.checkHead(0)) {
1858void daIce_c::initializeState_Air() {
1860 mSpeed.set(0.0f, 0.0f, 0.0f);
1865void daIce_c::finalizeState_Air() {
1870void daIce_c::executeState_Air() {
1873 mSpeed.set(0.0f, 0.0f, 0.0f);
1875 }
else if (
mTimer == 40) {
1880 breakReq(dGameCom::rndInt(2), plr);
1882 u8 dir =
mPos.x -
mBc.get_4c() < 0.0f;
1883 float dirs[] = { 1.0f, -1.0f };
1884 mBc.checkWallEnm(&dirs[dir]);
1885 mBc.checkWallEnm(&dirs[dir ^ 1]);
1886 float prevY =
mPos.y;
1892void daIce_c::initializeState_Fall() {
1903void daIce_c::finalizeState_Fall() {
1908void daIce_c::executeState_Fall() {
1914 u8 dir =
mPos.x -
mBc.get_4c() < 0.0f;
1915 float dirs[] = { 1.0f, -1.0f };
1916 mBc.checkWallEnm(&dirs[dir]);
1917 mBc.checkWallEnm(&dirs[dir ^ 1]);
1918 if (
mBc.checkFootEnm()) {
1921 if (parent->
mFlags & BIT_FLAG(17) || fallHeight >= 24.0f) {
1922 int dir = dGameCom::rndInt(2);
1923 dActorMng_c::m_instance->createUpCoin(
getCenterPos(), dir, 1, 0);
1926 if (fallHeight >= 12.0f) {
1927 dAudio::g_pSndObjMap->startSound(SE_OBJ_PNGN_ICE_LAND,
mPos, 0);
1934 dBc_c::WATER_TYPE_e waterRes = dBc_c::checkWater(
mPos.x,
mPos.y +
mSize.y * 0.2f,
mLayer, &height);
1935 if (waterRes == dBc_c::WATER_CHECK_WATER) {
1937 mVec3_c efPos(
mPos.x, height, 6500.0f);
1940 }
else if (waterRes == dBc_c::WATER_CHECK_YOGAN) {
1944 }
else if (waterRes == dBc_c::WATER_CHECK_POISON) {
1952void daIce_c::initializeState_Dive() {
1955 iceMng->mThawTimer = iceMng->mThawDuration;
1956 iceMng->stopMeltShake();
1968void daIce_c::finalizeState_Dive() {
1969 mCc.mCcData.mAttack = CC_ATTACK_NONE;
1970 mCc.mCcData.mVsKind &= ~(BIT_FLAG(CC_KIND_BALLOON) | BIT_FLAG(CC_KIND_ITEM) | BIT_FLAG(CC_KIND_KILLER));
1974void daIce_c::executeState_Dive() {
1975 float prevY =
mPos.y;
1983 mCc.mCcData.mAttack = CC_ATTACK_NONE;
1989 if (
mBc.checkFoot()) {
1992 if (
mBc.checkWall(
nullptr)) {
1998void daIce_c::initializeState_YoganDive() {
2001 iceMng->mThawTimer = iceMng->mThawDuration;
2002 iceMng->stopMeltShake();
2014void daIce_c::finalizeState_YoganDive() {}
2016void daIce_c::executeState_YoganDive() {
2022 float height = 0.0f;
2023 dBc_c::WATER_TYPE_e waterRes = dBc_c::checkWater(
mPos.x,
mPos.y,
mLayer, &height);
2024 if (waterRes == dBc_c::WATER_CHECK_NONE &&
mPos.y +
mSize.y < height) {
2026 if (parent !=
nullptr) {
2030 if (std::fabs(
mSpeed.x) > 0.25f &&
mBc.checkWall(
nullptr)) {
2036void daIce_c::initializeState_Carry() {
2039 iceMng->mThawTimer = iceMng->mThawDuration;
2040 iceMng->stopMeltShake();
2043 mCc.mCcData.mAttack = CC_ATTACK_SHELL;
2044 mCc.mCcData.mVsKind &= ~BIT_FLAG(CC_KIND_ITEM);
2045 mCc.mCcData.mBase.mSize.set(
mSize.x * 0.5f + 1.0f,
mSize.y * 0.5f + 1.0f);
2051void daIce_c::finalizeState_Carry() {
2054 mCc.mCcData.mVsKind |= BIT_FLAG(CC_KIND_ITEM);
2058void daIce_c::executeState_Carry() {
2062 if (
mPos.z >= 0.0f) {
2068 mCc.mAmiLine = amiLine;
2069 mBc.mAmiLine = amiLine;
2070 mBgCtr.mAmiLine = amiLine;
2080 u8 dir = !(delta.x >= 0.0f);
2083 if (player->
isStatus(daPlBase_c::STATUS_46) || delta.y > 0.0f) {
2085 bool headRes =
mBc.checkHead(0);
2092 BOOL playerTouchingCeiling = FALSE;
2098 if (!player->
isStatus(daPlBase_c::STATUS_46)) {
2099 if (
mBc.checkWall(&delta.x)) {
2114void daIce_c::initializeState_Drop() {
2115 const static float cs_drop_speed_x[] = { 1.25f, -1.25f };
2117 mBgCtr.mpCarryActor =
nullptr;
2118 mBgCtr.mFlags |= BIT_FLAG(12);
2120 if (
mPos.z > 2000.0f) {
2126void daIce_c::finalizeState_Drop() {
2129 iceMng->mThawTimer = iceMng->mThawDuration;
2130 iceMng->stopMeltShake();
2131 mCc.mCcData.mAttack = CC_ATTACK_NONE;
2135void daIce_c::executeState_Drop() {
2140 float height = 0.0f;
2141 dBc_c::WATER_TYPE_e waterRes = dBc_c::checkWater(
mPos.x,
mPos.y +
mSize.y * 0.2f,
mLayer, &height);
2142 if (waterRes == dBc_c::WATER_CHECK_WATER) {
2143 mCc.mCcData.mAttack = CC_ATTACK_NONE;
2146 mVec3_c efPos(
mPos.x, height, 6500.0f);
2149 }
else if (waterRes == dBc_c::WATER_CHECK_YOGAN) {
2154 }
else if (waterRes == dBc_c::WATER_CHECK_POISON) {
2160 if (
mBc.checkFootEnm()) {
2162 }
else if (
mBc.checkWall(
nullptr)) {
2169void daIce_c::initializeState_Throw() {
2170 const static float cs_throw_speed[] = { 3.0f, -3.0f };
2171 const static float cs_throw_max_speed[] = { 4.0f, -4.0f };
2173 dAcPy_c *pl = daPyMng_c::getPlayer(
mPlayerNo);
2175 float throwSpeed = pl->threeQuarterSpeedX() + cs_throw_speed[
mDirection];
2176 float throwMaxSpeed = cs_throw_max_speed[
mDirection];
2186 mSpeed.set(throwSpeed, -1.0f, 0.0f);
2189 mBgCtr.mFlags |= BIT_FLAG(12);
2190 mCc.mCcData.mAttack = CC_ATTACK_SHELL;
2191 mCc.mCcData.mVsKind |= BIT_FLAG(CC_KIND_BALLOON) | BIT_FLAG(CC_KIND_ITEM) | BIT_FLAG(CC_KIND_KILLER);
2192 mCc.mCcData.mVsDamage |= BIT_FLAG(CC_ATTACK_SHELL);
2193 mCc.mCcData.mVsDamage &= ~BIT_FLAG(CC_ATTACK_SPIN_LIFT_UP);
2194 mBcPointHead.mFlags |= BIT_FLAG(18) | BIT_FLAG(19) | BIT_FLAG(20) | BIT_FLAG(23);
2196 mBcPointWall.mFlags |= BIT_FLAG(18) | BIT_FLAG(19) | BIT_FLAG(20) | BIT_FLAG(23);
2197 if (
mPos.z > 2000.0f) {
2203void daIce_c::finalizeState_Throw() {
2204 mBcPointHead.mFlags &= ~(BIT_FLAG(18) | BIT_FLAG(19) | BIT_FLAG(20) | BIT_FLAG(23));
2206 mBcPointWall.mFlags &= ~(BIT_FLAG(18) | BIT_FLAG(19) | BIT_FLAG(20) | BIT_FLAG(23));
2207 mBc.mOwningPlrNo = -1;
2208 mBgCtr.mpCarryActor =
nullptr;
2211void daIce_c::executeState_Throw() {
2218 float height = 0.0f;
2219 dBc_c::WATER_TYPE_e waterRes = dBc_c::checkWater(
mPos.x,
mPos.y +
mSize.y * 0.2f,
mLayer, &height);
2220 if (waterRes == dBc_c::WATER_CHECK_WATER) {
2221 mVec3_c efPos(
mPos.x, height, 6500.0f);
2224 }
else if (waterRes == dBc_c::WATER_CHECK_YOGAN) {
2228 }
else if (waterRes == dBc_c::WATER_CHECK_POISON) {
2233 bool isFoot =
mBc.isFoot();
2234 if (
mBc.checkFootEnm()) {
2236 dAudio::SoundEffectID_t(SE_OBJ_PNGN_ICE_LAND).playMapSound(
mPos, 0);
2239 dAudio::SoundEffectID_t(SE_OBJ_PNGN_ICE_SLIDE).holdMapSound(
mUniqueID,
mPos, 0);
2241 if (
mBc.checkWall(
nullptr)) {
2245 float loopX = dBgParameter_c::ms_Instance_p->getLoopScrollDispPosX(
mPos.x);
2246 float endX = loopX + dBgParameter_c::ms_Instance_p->xSize();
2248 mPos.x < loopX - 64.0f ||
2249 mPos.x > endX + 64.0f
2256void daIce_c::initializeState_Melt_Normal() {
2261void daIce_c::finalizeState_Melt_Normal() {}
2263void daIce_c::executeState_Melt_Normal() {
The player class for Mario, Luigi and the Toads.
sFStateMgr_c< dActorState_c, sStateMethodUsr_FI_c > mStateMgr
The state manager.
static u8 mExecStop
The actors for which the execute operation is currently disabled.
@ CARRY_RELEASE
The actor is being released from carry.
@ CARRY_THROW
The actor is being actively thrown by the player.
void carryFukidashiCancel(int fukidashiAction, int playerId)
Hides the given action prompt for all players.
static void setSoftLight_MapObj(m3d::bmdl_c &mdl)
Sets the soft light effect for map objects.
virtual s8 & getPlrNo()
Gets the player number associated with the actor. See mPlayerNo.
bool HasamareBgCheck()
Returns whether the actor is colliding with any enabled collision sides.
dBc_c mBc
The actor-to-tile collision sensor.
void clrComboCnt()
Clears the actor's combo counter.
u32 mCarryingFlags
The actor's carry actions. See CARRY_ACTION_e.
int mCarryFukidashiPlayerNo
The player for whom an action prompt related to the actor is being displayed. -1 if no players meet t...
u8 mKind
The actor's kind. Value is a STAGE_ACTOR_KIND_e.
static void changePosAngle(mVec3_c *pos, mAng3_c *ang, int param3)
Adjusts the actor's position to account for looping stages.
u8 mAmiLayer
The actor's layer for chainlink fences.
u8 mDirection
The actor's facing direction.
dCc_c mCc
The actor-to-actor collision sensor.
u8 mThrowDirection
The actor's direction when thrown or dropped after carrying.
virtual int preExecute()
pre method for the execute operation.
int mComboMultiplier
The current combo multiplier obtained by the actor by colliding with other actors.
s8 mPlayerNo
The player associated with the actor, -1 if not associated to any player.
bool carryFukidashiCheck(int fukidashiAction, mVec2_c fukidashiTriggerSize)
Checks if the prompt for the given action should be displayed for each player.
virtual void waterSplashEffect(const mVec3_c &pos, float size)
Generates a water splash effect.
bool checkCarried(int *playerNum)
Returns whether the actor is being carried by a player.
dActor_c()
Constructs a new actor.
@ COLL_FOOT
The actor collided with the ground.
@ COLL_NONE
The actor did not collide with any surface.
@ STAGE_ACTOR_GENERIC
A generic stage actor (default).
@ STAGE_ACTOR_ENEMY
An enemy actor.
@ STAGE_ACTOR_YOSHI
The Yoshi actor.
@ STAGE_ACTOR_PLAYER
The player actor.
u8 mLayer
The actor's layer.
u8 mBgCollFlags
The collision directions that the actor collided with in the previous frame. Value is a BG_COLL_FLAG_...
mMtx_c mMatrix
The actor's partial transformation matrix. See makeMtx() for details.
mVec3_c mScale
The actor's scale (defaults to 1).
float mAccelF
The actor's horizontal acceleration.
mVec3_c mSpeed
The actor's speed.
mVec3_c mLastPos
The actor's position in the previous frame.
mVec3_c mPos
The actor's position.
mVec3_c mSpeedMax
The actor's maximum speed.
void calcSpeedX()
Updates the actor's X speed. See here for details.
mVec3_c mPosDelta
The actor's position delta since the previous frame.
mVec3_c mCenterOffs
The offset from the position to the center of the actor (defaults to 0).
float mSpeedF
The actor's horizontal speed.
void posMove()
Moves the actor by its speed.
mVec3_c getCenterPos() const
Gets the actor's centered position.
mAng3_c mAngle
The actor's rotation (for 2D actors).
float mAccelY
The actor's vertical acceleration.
void calcSpeedY()
Updates the actor's Y speed. See here for details.
Collider ("Collision Check") class - handles collisions between actors.
u8 mInfo
Info flags for this collider. See CC_INFO_e.
void entry()
Places this collider in the collider list.
float getLeftPos()
Gets the X position of the left side of the collider.
float getRightPos()
Gets the X position of the right side of the collider.
dActor_c * getOwner() const
Gets the owner actor of this collider.
sCcDatNewF mCcData
The collision data of this collider.
An enemy actor. Note that the definition of "enemy" in this context is actually any interactible stag...
u8 mIceDeathDirection
The X direction to move towards on ice death.
dIceMng_c mIceMng
The ice manager for this enemy.
dEnCombo_c mCombo
The enemy combo manager.
u32 mFlags
Flags for this actor. See FLAGS_e.
static dMultiMng_c * mspInstance
The instance of this class.
static dResMng_c * m_instance
The instance of this class.
InitType_e
How the ice block behaves when it's created.
@ INIT_COVER
The block follows the parent enemy.
@ INIT_WATER_STUCK
The block was created underwater, but doesn't float up.
@ INIT_AIR
The block hangs in the air for a while, then falls down.
@ INIT_WATER_TOGE
Same as INIT_WATER, but for spiky enemies that break the ice block after a while.
@ INIT_FREEZE
The block is frozen in place indefinitely.
@ INIT_WATER
The block was created underwater and floats up.
@ INIT_HOP
The block is launched with the parent enemy's speed.
@ INIT_FALL
The block falls down immediately.
void setCarryBc()
Sets up the tile collision sensors while the block is being carried.
bool checkUnderBreak(dActor_c *actor)
Checks whether a falling block hits a player / Yoshi from above and causes daPlBase_c::DAMAGE_HEAD_BO...
void setCarry(dActor_c *actor)
Starts being carried by the given actor.
static sFStateID_c< daIce_c > StateID_Carry
Being carried by a player.
BOOL canCarry() const
Checks whether the ice block can currently be picked up.
bool checkInstantBreak(BOOL checkBg)
Checks whether the ice block should be broken immediately after creation.
int doDelete() override
do method for the delete operation.
mVec3_c calcCarryPos()
Calculates the position of the block in the carrying player's hands.
short mShakeRotAmplitude
The maximum rotation of the swinging motion.
bool checkPushSink(dActor_c *actor)
Checks whether the given actor should push the ice block down and sets mPushSinkType accordingly.
IceWeight_e mWeightType
The weight class.
@ PUSH_SINK_HIP_ATTACK
A player ground-pounded the block.
@ PUSH_SINK_LAND
A player landed on the block.
@ PUSH_SINK_PRESS
A player standing on the block is pressed against a ceiling.
void watertogeShake()
Swings the model left and right with increasing frequency. Used for INIT_WATER_TOGE.
static sFStateID_c< daIce_c > StateID_Drop
Falling down after being dropped. Breaks on landing.
static sFStateID_c< daIce_c > StateID_ShakeFloat
Floating up slowly while shaking before melting.
static void ccCallBack_Water(dCc_c *self, dCc_c *other)
The actor collision callback in water.
void meltEffect()
Plays the melt effect.
nw4r::g3d::ResFile mResFileMdl
The resource file.
static sFStateID_c< daIce_c > StateID_SmallFloat
Floating back up to the water surface after a small push downwards.
bool calcLandLine(float &height)
Calculates the highest ground position below the ice block.
void finalUpdate() override
Code to be executed after all actors' execute operation has run.
float mFloatTargetSpeed
The target speed when floating.
void initPos()
Places the block on the ground if it's landing or falling.
PushSinkType_e mPushSinkType
How the block got pushed under the water surface.
sBcMany mBcPointFoot
The foot sensor for tile collision.
fBaseID_e getParentID()
Gets the ID of the parent enemy.
static sFStateID_c< daIce_c > StateID_Dive
Slowing down after falling into water.
short mFloatAngle
The current angle while floating up.
static sFStateID_c< daIce_c > StateID_Freeze
Frozen in place.
dHeapAllocator_c mAllocator
The allocator.
void plcombobreakReq(int dir, dActor_c *initiator)
Like combobreakReq(), but uses the player's combo counter.
void breakEffect()
Plays the break effect.
void shake()
Shakes the model of the ice block.
static sFStateID_c< daIce_c > StateID_Melt_Normal
Breaking apart after the ice block has has melted.
int draw() override
do method for the draw operation.
static sFStateID_c< daIce_c > StateID_YoganDive
Sinking into lava or poison.
static void ccCallBack(dCc_c *self, dCc_c *other)
The actor collision callback.
void enemyAttach()
Moves the parent enemy along with the ice block.
void yoganEffect()
Plays the lava splash effect.
void floatbreakReq()
Requests the ice block to break on water. No score is awarded.
bool checkUpperBreak(dActor_c *actor)
Checks whether an actor landing on the block breaks it. [Always false].
void setBc()
Sets up the tile collision sensors.
void enlargeBgcWater()
Enlarges the dynamic collider when in water.
static sFStateID_c< daIce_c > StateID_Float
Floating up to the water surface while tilting back and forth.
u32 mFlags
Value is a FLAG_e.
void initSize(const mVec3_c &scale)
Calculates the block's size from the ice type and the given scale.
void breakReq(int dir, int playerNo)
Requests the ice block to be broken.
bool checkPlHasami_Wall(dActor_c *actor, int dir)
Checks whether the given player is stuck between the ice block and a wall.
static void callBackFoot(dActor_c *self, dActor_c *other)
Called when another actor's foot sensor touches the ice block.
float mWaterHeight
The height of the water surface.
dIceMng_c * mpIceMng
The ice manager.
@ COLLISION_NO_SINK_COLLISION
The block does not check for ground collision while sinking in water.
@ COLLISION_NONE
The block does not collide with tiles.
bool checkNetIn()
Checks whether the ice block overlaps a climbable fence.
short mShakeRotSpeed
The angular speed of mShakeRotAngle.
int create() override
do method for the create operation.
float mFloatAccel
The acceleration towards mFloatTargetSpeed.
@ FLAG_CARRYABLE
The block can be picked up by players.
@ FLAG_BREAKABLE
The block can be broken by ground pounding or attacking it from below.
int preExecute() override
pre method for the execute operation.
void createMdl()
Creates the model and texture animation according to the ice type.
static void callBackWall(dActor_c *self, dActor_c *other, u8 dir)
Called when another actor's wall sensor touches the ice block.
mVec3_c mPosDiff
The offset to the parent actor.
static void callBackHead(dActor_c *self, dActor_c *other)
Called when another actor's head sensor touches the ice block.
void quakeDamage()
Awards the earthquake combo score and breaks the ice block.
nw4r::g3d::ResAnmTexSrt mResFileAnm
The texture animation resource file.
float mStartFallY
The Y position where the block started falling, used to check whether the block falls far enough to b...
InitType_e mInitType
The initial behavior.
sBcMany mBcPointWall
The wall sensor for tile collision.
static bool checkRevFoot(dActor_c *self, dActor_c *other)
Returns whether the ice block should push up the actor standing on it.
bool vf68(dBg_ctr_c *collider) override
Unknown, related to collision.
int execute() override
do method for the execute operation.
static sFStateID_c< daIce_c > StateID_Throw
Sliding across the ground after being thrown.
virtual bool checkFootBgcIsGround()
Returns whether touching the collider beneath the ice block counts as touching the ground.
@ WALL_ATTACH_NONE
The player is not touching a wall.
@ WALL_ATTACH_STUCK
The player is stuck between the ice block and a wall.
@ WALL_ATTACH_TOUCH
The player is also touching a wall on the other side of the ice block.
static sFStateID_c< daIce_c > StateID_TogeFloat
Floating up to the water surface, variant for spiky enemies.
void combobreakReq(int dir, dActor_c *initiator)
Requests the ice block to be broken by a combo attack (e.g. a shell being thrown).
static bool checkRevWall(dActor_c *self, dActor_c *other, u8 dir)
Returns whether the ice block should push the actor at its side.
void calcFloatSpeed()
Accelerates the ice block towards mFloatTargetSpeed in the direction it is tilted to.
bool checkPlAttach_Head(BOOL *playerTouchingCeiling)
Returns whether a player is standing on the ice block.
void initWeight()
Calculates the weight class of the block.
BOOL mShake
Whether the ice block should shake.
bool checkPlHasami(int *plrNo)
Returns whether a player is stuck between the ice block and the background collision.
int mTimer
A general purpose timer.
void poisonEffect()
Plays the poison splash effect.
void deleteReady() override
Informs the base that it's about to be deleted.
daIce_c()
Constructs a new actor.
static sFStateID_c< daIce_c > StateID_Land
Resting on the ground.
static sFStateID_c< daIce_c > StateID_Sink
Slowing down after being created underwater.
int mCarriedByPlrNo
The player number of the player carrying the ice block.
static sFStateID_c< daIce_c > StateID_Fall
Falling down.
float mExtraFloatSpeedX
Added to the X speed while floating.
mVec2_c mBgcSizeIncrease
The amount to increase mCurrBgcSize per frame until the full size is reached.
void calcFloatAngle()
Tilts the ice block back and forth while floating up.
static sFStateID_c< daIce_c > StateID_Cover
Following the parent enemy. [Used for Fuzzies].
dBg_ctr_c mBgCtr
The dynamic collider.
static bool checkRevHead(dActor_c *self, dActor_c *other)
Returns whether the ice block should push down the actor below it.
mVec3_c mSize
The size of the ice block.
BOOL mBreakRequested
Whether the ice block should break.
m3d::anmTexSrt_c mAnm
The texture animation.
bool checkPlayerIn()
Checks whether a player overlaps the ice block.
mVec3_c mInitialPos
The position at creation.
bool checkSideBreak(dActor_c *actor, int direction)
Checks whether a thrown block hits a player / Yoshi from the side and causes daPlBase_c::DAMAGE_HIP_A...
mVec2_c mCurrBgcSize
The current dynamic collider size, grows over time.
void block_hit_init() override
Callback for when a block directly beneath the actor is hit.
mVec3_c mModelPos
The position of the model, including the shake offset.
void treadcombobreakReq(int dir, dActor_c *initiator)
Like combobreakReq(), but uses the stomp combo score.
void enlargeBgc()
Enlarges the dynamic collider until it reaches the full size.
void initEffect(dIceEfScale_c scale)
Initializes the effect maker.
static sFStateID_c< daIce_c > StateID_Hop
Being launched with the parent enemy's speed. [Used for the Pokey segments].
short mShakeRotAngle
The current angle of the swinging motion.
BOOL mIsWater
Whether the block was created in water.
@ FLOAT_STATE_LOWERING
The water level is lowering.
@ FLOAT_STATE_RISING
The water level is rising.
@ FLOAT_STATE_STILL
The water level is constant, the block bobs up and down.
@ FLOAT_STATE_INIT
The water level has not been checked yet.
bool checkPlAttach_Foot(BOOL *playerTouchingFloor, int *plrNo)
Returns whether a player's head is touching the ice block.
void normalShake()
Shakes the model left and right.
sBcMany mBcPointHead
The head sensor for tile collision.
FloatState_e mFloatState
The state of the water surface, used in StateID_FloatWait.
void starbreakReq(int dir, dActor_c *initiator)
Like combobreakReq(), but uses the star combo score.
static sFStateID_c< daIce_c > StateID_Air
Hanging in the air before falling down.
void setInfo(mVec3_c size, dIceEfScale_c scale)
Sets up the ice block. Called by the ice manager after creation.
float mPrevPosX
The X position before running execute().
m3d::mdl_c mMdl
The model.
void calcMdl()
Updates the model matrix.
mVec3_c mPrevPos
The position on the previous frame.
static sFStateID_c< daIce_c > StateID_PushSink
Being pushed under the water surface.
int mCollEntryTimer
Countdown until the collision is fully activated.
bool isQuakeDamage()
Checks whether the ice block should be broken by an earthquake.
dIceMng_c * getManager()
Gets the ice manager of the parent enemy.
bool checkBgIn()
Checks whether a solid tile overlaps the ice block.
void initCollision()
Sets up the tile collision, the actor collision and the dynamic collider.
dIceEfMaker_c mIceEfMaker
The ice effect maker.
void enlargeBgcLand()
Enlarges the dynamic collider when not in water.
bool checkPlAttach_Wall(int dir, int *checkResult)
Returns whether a player is touching the given side of the ice block.
short mCurrFloatUpDown
Counter for bobbing up and down on the water surface.
static sFStateID_c< daIce_c > StateID_FloatWait
Floating on the water surface.
The base class for the player and Yoshi.
@ BGC_HEAD
Colliding with the head sensor.
@ BGC_FOOT
Colliding with the foot sensor.
@ STATUS_PENGUIN_SLIDE
The player is sliding with the penguin suit.
@ STATUS_SPIN_HIP_ATTACK_FALL
The player is falling while doing a down spin.
@ STATUS_OUT_OF_PLAY
The player is in a bubble or has died.
@ STATUS_HIP_ATTACK_FALL
The player is falling while ground pounding.
The base class for all scenes, actors and various other processes.
void deleteRequest()
Requests deletion of the base.
ProfileName mProfName
The base's profile name.
fBase_c * getConnectParent() const
Gets the base's parent.
@ NOT_READY
The step could not completed at this time.
@ SUCCEEDED
The step was completed successfully.
fBaseID_e mUniqueID
The base's unique identifier.
static fBase_c * searchBaseByID(fBaseID_e id)
Searches for a base with the given ID.
A three-dimensional short angle vector.
mAng y
The rotation on the Y axis.
mAng z
The rotation on the Z axis.
mAng x
The rotation on the X axis.
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.
fBaseID_e
A unique identifier for each base.
@ BASE_ID_NULL
Represents the null base.
#define ACTOR_PROFILE(profName, className, properties)
Creates an actor profile, using the profile number as the execute and draw order value.
u16 ProfileName
The name of a profile. Value is a fProf::PROFILE_NAME_e.
void hideFukidashiForSession(int playerId, int fukidashiAction)
Hides the given action prompt for the given player for the rest of the current session.
@ FORWARD_LOOP
Play the animation forward in a loop.
@ GAME_HEAP_DEFAULT
The default game heap (alias of MEM1 or MEM2).
EGG::ExpHeap * g_gameHeaps[GAME_HEAP_COUNT]
The game heaps.
float addCalc(float *value, float target, float smoothing, float maxStep, float minStep)
Smoothly moves value towards target using proportional scaling.
BOOL chase(s16 *value, s16 target, s16 step)
Moves value towards target by a fixed step amount.
#define STATE_DEFINE(class, name)
Defines a state.
A one-dimensional short angle vector.
float sin() const
Computes the sine of the angle.
A structure that contains information about a collider.
u8 mKind
The type of this collider. See CC_KIND_e.
u8 mAttack
The attack type of this collider. See CC_ATTACK_e.
u16 mStatus
Status flags for this collider. See CC_STATUS_FLAG_e.