Standardize mMode/mAction names in C-style actors

This commit is contained in:
LagoLunatic
2025-05-17 14:01:12 -04:00
parent 98b8f3f559
commit 337303fc79
21 changed files with 979 additions and 962 deletions
+4 -4
View File
@@ -17,7 +17,7 @@ public:
/* 0x007 */ u8 m007[0x008 - 0x007];
/* 0x008 */ f32 mYOffset;
/* 0x00C */ s8 m00C;
/* 0x00D */ s8 mState;
/* 0x00D */ s8 mMode;
/* 0x00E */ s16 mFreezeTimer;
/* 0x010 */ s16 mMoveDelayTimer;
/* 0x012 */ s16 mAngleY;
@@ -46,7 +46,7 @@ struct enemyfire {
public:
/* 0x000 */ fopAc_ac_c* mpActor;
/* 0x004 */ s16 mFireDuration;
/* 0x006 */ s8 mState;
/* 0x006 */ s8 mMode;
/* 0x007 */ u8 m007[0x008 - 0x007];
/* 0x008 */ s16 mFireTimer;
/* 0x00A */ u8 m00A[0x00C - 0x00A];
@@ -77,8 +77,8 @@ public:
};
/* 0x000 */ fopEn_enemy_c* mpEnemy;
/* 0x004 */ s16 m004;
/* 0x006 */ s16 mState;
/* 0x004 */ s16 mMode;
/* 0x006 */ s16 mAction;
/* 0x008 */ s16 mEnemyType;
/* 0x00A */ u8 m00A[0x00C - 0x00A];
/* 0x00C */ int mTimer;
+1 -1
View File
@@ -19,7 +19,7 @@ public:
/* 0x02C2 */ u8 mStartsInactive;
/* 0x02C3 */ u8 mSwitch;
/* 0x02C4 */ u8 mAction;
/* 0x02C5 */ u8 mState;
/* 0x02C5 */ u8 mMode;
/* 0x02C6 */ u8 mHugeKnockback;
/* 0x02C7 */ bool mbIsBodyBeingHit;
/* 0x02C8 */ s16 mCountDownTimers[4];
+1 -1
View File
@@ -21,7 +21,7 @@ public:
/* 0x2CA */ u8 mStartsInactive;
/* 0x2CB */ u8 mSwitch;
/* 0x2CC */ u8 mAction;
/* 0x2CD */ u8 mState;
/* 0x2CD */ u8 mMode;
/* 0x2CE */ u8 m2CE;
/* 0x2CF */ bool mbIsWeakBeingHit;
/* 0x2D0 */ bool mbNotInHomeRoom;
+1 -1
View File
@@ -16,7 +16,7 @@ public:
/* 0x290 */ u8 m290[0x2AC - 0x290];
/* 0x2AC */ request_of_phase_process_class mPhs;
/* 0x2B4 */ mDoExt_McaMorf* mpMorf;
/* 0x2B8 */ u8 mState;
/* 0x2B8 */ u8 mMode;
/* 0x2B9 */ u8 m2B9[0x2BA - 0x2B9];
/* 0x2BA */ s16 mCountDownTimers[3];
/* 0x2C0 */ int mCurrBckIdx;
+2 -2
View File
@@ -30,8 +30,8 @@ public:
/* 0x2D1 */ u8 m2D1[0x2D4 - 0x2D1];
/* 0x2D4 */ dKy_tevstr_c mKenTevStr;
/* 0x384 */ s16 m384;
/* 0x386 */ s16 m386;
/* 0x388 */ s16 m388;
/* 0x386 */ s16 mAction;
/* 0x388 */ s16 mMode;
/* 0x38A */ s16 m38A;
/* 0x38C */ cXyz m38C;
/* 0x398 */ s16 m398;
+2 -2
View File
@@ -20,8 +20,8 @@ public:
/* 0x2C8 */ u8 m2C8;
/* 0x2C9 */ u8 m2C9;
/* 0x2CA */ u8 m2CA;
/* 0x2CB */ u8 m2CB;
/* 0x2CC */ u8 m2CC;
/* 0x2CB */ u8 mAction;
/* 0x2CC */ u8 mMode;
/* 0x2CD */ u8 m2CD;
/* 0x2CE */ u8 m2CE;
/* 0x2CF */ u8 m2CF;
+1 -1
View File
@@ -26,7 +26,7 @@ public:
/* 0x308 */ cXyz mHomePos;
/* 0x314 */ s16 mTimer[3];
/* 0x31A */ s16 mAngleRoll;
/* 0x31C */ s8 mState;
/* 0x31C */ s8 mMode;
/* 0x31D */ u8 field_0x31d;
/* 0x31E */ bool mHitGround;
/* 0x31E */ u8 field_0x31f;
+1 -1
View File
@@ -47,7 +47,7 @@ public:
/* 0x359 */ u8 mPathIndex;
/* 0x35A */ u8 m35A[0x366 - 0x35A];
/* 0x366 */ s16 mAction;
/* 0x368 */ s16 mState;
/* 0x368 */ s16 mMode;
/* 0x36A */ u8 m36A[0x36C - 0x36A];
/* 0x36C */ fpc_ProcID mJalhallaID;
/* 0x370 */ fpc_ProcID mKanteraID;
+14 -14
View File
@@ -175,7 +175,7 @@ BOOL enemy_ice(enemyice* ei) {
BOOL frozen = FALSE;
BOOL moveAndCollide = FALSE;
switch (ei->mState) {
switch (ei->mMode) {
case 0: // Not initialized
// Initialize the enemyice now.
ei->mStts.Init(250, 0xFF, ac);
@@ -192,7 +192,7 @@ BOOL enemy_ice(enemyice* ei) {
if (std::fabsf(ei->mYOffset) < 0.1f) {
ei->mYOffset = 80.0f;
}
ei->mState = 1;
ei->mMode = 1;
ei->mScaleY = 1.0f;
ei->mScaleXZ = 1.0f;
fopAcM_OnStatus(ac, fopAcStts_UNK8000000_e);
@@ -202,7 +202,7 @@ BOOL enemy_ice(enemyice* ei) {
// The enemy has signaled that it wants to be frozen for some length of time.
ei->mFreezeTimer = ei->mFreezeDuration;
ei->mFreezeDuration = 0;
ei->mState = 2;
ei->mMode = 2;
if (ei->m00C == 0) {
ei->mSpeed.y = 30.0f;
ei->mAngularVelY = (s16)cM_rndFX(3000.0f);
@@ -232,7 +232,7 @@ BOOL enemy_ice(enemyice* ei) {
ac->attention_info.distances[fopAc_Attn_TYPE_CARRY_e] = 0x12;
if (fopAcM_CheckStatus(ac, fopAcStts_CARRY_e)) {
cLib_offBit<u32>(ac->attention_info.flags, fopAc_Attn_ACTION_CARRY_e);
ei->mState = 3;
ei->mMode = 3;
if (ei->m00C == 2) {
ei->m00C = 0;
}
@@ -250,7 +250,7 @@ BOOL enemy_ice(enemyice* ei) {
ei->mSpeed.y = -15.0f;
}
ei->mAngleY = player->shape_angle.y;
ei->mState = 2;
ei->mMode = 2;
}
break;
}
@@ -349,7 +349,7 @@ BOOL enemy_ice(enemyice* ei) {
}
if (ei->mFreezeTimer == 0) {
ei->mState = 1;
ei->mMode = 1;
ei->mCyl.SetC(non_pos);
dComIfG_Ccsp()->Set(&ei->mCyl);
@@ -440,7 +440,7 @@ void enemy_fire(enemyfire* ef) {
cXyz pos;
offset.setall(0.0f);
switch (ef->mState) {
switch (ef->mMode) {
case 0: // Not on fire.
if (ef->mFireDuration == 0) {
return;
@@ -449,7 +449,7 @@ void enemy_fire(enemyfire* ef) {
ef->mFireTimer = ef->mFireDuration;
ef->mFireDuration = 0;
ef->mState = 1; // On fire
ef->mMode = 1; // On fire
dKy_plight_set(&ef->mLight);
@@ -562,7 +562,7 @@ void enemy_fire(enemyfire* ef) {
fopAcM_seStart(ac, JA_SE_OBJ_TORCH_BURNING, 0);
if (ef->mFireTimer == 0) {
ef->mState = 0; // Not on fire
ef->mMode = 0; // Not on fire
dKy_plight_cut(&ef->mLight);
ef->mSph.SetC(non_pos);
dComIfG_Ccsp()->Set(&ef->mSph);
@@ -579,7 +579,7 @@ void enemy_fire(enemyfire* ef) {
/* 8001D3B0-8001D428 .text enemy_fire_remove__FP9enemyfire */
void enemy_fire_remove(enemyfire* ef) {
ef->mState = 0; // Not on fire
ef->mMode = 0; // Not on fire
dKy_plight_cut(&ef->mLight);
for (int i = 0; i < 10; i++) {
@@ -641,7 +641,7 @@ void dr_body_bg_check(damagereaction* dr) {
dr->m71E--;
}
if (dr->mState != 21 && dr->mState != 22) {
if (dr->mAction != 21 && dr->mAction != 22) {
dBgS_ObjGndChk_Spl gndChk;
f32 x = dr->mpEnemy->current.pos.x;
f32 y = dr->mpEnemy->current.pos.y;
@@ -655,14 +655,14 @@ void dr_body_bg_check(damagereaction* dr) {
f32 floor_y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (floor_y != C_BG_MIN_HEIGHT && dr->mpEnemy->current.pos.y <= floor_y) {
dr->mpEnemy->current.pos.y = floor_y + REG0_F(13);
dr->m004 = 0;
dr->mMode = 0;
dr->m47C = 0;
if (dComIfG_Bgsp()->ChkGrpInf(gndChk, 0x100)) {
dr->mState = 22;
dr->mAction = 22;
cXyz sp14(x, floor_y, z);
fopKyM_createWpillar(&sp14, REG0_F(9) + 1.0f, REG0_F(10) + 1.0f, 0);
} else {
dr->mState = 21;
dr->mAction = 21;
cXyz sp08(x, floor_y, z);
fopKyM_createMpillar(&sp08, REG0_F(14) + 0.5f);
}
+61 -61
View File
@@ -34,17 +34,17 @@ enum Action {
ACTION_ITAI_MOVE = 3,
};
enum State {
STATE_DOUSA_INIT = 0,
STATE_DOUSA_OKIRU = 2,
STATE_DOUSA_SLEEP_INIT = 9,
STATE_DOUSA_SLEEP_MAIN = 10,
STATE_MODORU_MOVE_INIT = 20,
STATE_MODORU_MOVE_MAIN = 21,
STATE_MODORU_MOVE_END = 22,
STATE_HANDOU_MOVE_INIT = 30,
STATE_HANDOU_MOVE_MAIN = 31,
STATE_ITAI_MOVE_INIT = 40,
enum Mode {
MODE_DOUSA_INIT = 0,
MODE_DOUSA_OKIRU = 2,
MODE_DOUSA_SLEEP_INIT = 9,
MODE_DOUSA_SLEEP_MAIN = 10,
MODE_MODORU_MOVE_INIT = 20,
MODE_MODORU_MOVE_MAIN = 21,
MODE_MODORU_MOVE_END = 22,
MODE_HANDOU_MOVE_INIT = 30,
MODE_HANDOU_MOVE_MAIN = 31,
MODE_ITAI_MOVE_INIT = 40,
};
/* 00000078-0000021C .text nodeCallBack__FP7J3DNodei */
@@ -195,7 +195,7 @@ static void body_atari_check(am_class* i_this) {
return;
}
i_this->mAction = ACTION_HANDOU_MOVE;
i_this->mState = STATE_HANDOU_MOVE_INIT;
i_this->mMode = MODE_HANDOU_MOVE_INIT;
i_this->mHugeKnockback = 0;
if (player->getCutType() == 0x11) {
// If the player hits the Armos Knight with the Skull Hammer's side swing, knock it back much farther than normal.
@@ -284,14 +284,14 @@ static BOOL medama_atari_check(am_class* i_this) {
i_this->mNeedleCyl.OnAtSPrmBit(cCcD_AtSPrm_Set_e);
i_this->mNeedleCyl.OnAtHitBit();
i_this->mAction = ACTION_DOUSA;
i_this->mState = STATE_DOUSA_OKIRU;
i_this->mMode = MODE_DOUSA_OKIRU;
} else {
dComIfGp_particle_set(dPa_name::ID_COMMON_0010, &i_this->mEyeballPos, &player->shape_angle);
// fopAcM_seStart(i_this, JA_SE_CM_AM_EYE_DAMAGE, 0);
mDoAud_seStart(JA_SE_CM_AM_EYE_DAMAGE, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
fopAcM_monsSeStart(i_this, JA_SE_CV_AM_EYE_DAMAGE, 0x42);
i_this->mAction = ACTION_ITAI_MOVE;
i_this->mState = STATE_ITAI_MOVE_INIT;
i_this->mMode = MODE_ITAI_MOVE_INIT;
}
break;
default:
@@ -394,7 +394,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
bomb->setBombNoHit();
bomb_move_set(i_this, 0);
i_this->mAction = ACTION_ITAI_MOVE;
i_this->mState = 44;
i_this->mMode = 44;
return TRUE;
}
}
@@ -409,7 +409,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
bomb2->set_no_hit();
bomb_move_set(i_this, 0);
i_this->mAction = ACTION_ITAI_MOVE;
i_this->mState = 44;
i_this->mMode = 44;
return TRUE;
}
}
@@ -481,13 +481,13 @@ static void medama_move(am_class* i_this) {
/* 00001B00-00002564 .text action_dousa__FP8am_class */
static void action_dousa(am_class* i_this) {
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
switch (i_this->mState) {
case STATE_DOUSA_INIT:
switch (i_this->mMode) {
case MODE_DOUSA_INIT:
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
i_this->mCountUpTimers[i] = 0;
}
anm_init(i_this, AM_BCK_SLEEP_LOOP, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 1:
if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) {
@@ -506,15 +506,15 @@ static void action_dousa(am_class* i_this) {
i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
i_this->mState += 1; // STATE_DOUSA_OKIRU
i_this->mMode += 1; // MODE_DOUSA_OKIRU
}
}
break;
case STATE_DOUSA_OKIRU:
case MODE_DOUSA_OKIRU:
if (!i_this->mpMorf->isStop()) {
break;
}
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 3:
if (i_this->mCurrBckIdx != AM_BCK_CLOSE && i_this->mCurrBckIdx != AM_BCK_CLOSE_LOOP) {
@@ -528,7 +528,7 @@ static void action_dousa(am_class* i_this) {
i_this->mCountDownTimers[2] = 6;
}
i_this->mTargetAngleY = fopAcM_searchPlayerAngleY(i_this);
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 4: {
if (i_this->mCountDownTimers[2] == 1) {
@@ -544,24 +544,24 @@ static void action_dousa(am_class* i_this) {
f32 xzDist = std::sqrtf(xDist*xDist + zDist*zDist);
if (xzDist > i_this->mAreaRadius) {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = STATE_MODORU_MOVE_INIT;
i_this->mMode = MODE_MODORU_MOVE_INIT;
return;
}
} else {
if (fopAcM_searchPlayerDistance(i_this) > 2000.0f) {
i_this->mState = STATE_DOUSA_SLEEP_INIT;
i_this->mMode = MODE_DOUSA_SLEEP_INIT;
break;
}
f32 yDist = player->current.pos.y - i_this->current.pos.y;
yDist = std::sqrtf(yDist*yDist); // ???
if (yDist > 300.0f) {
i_this->mState = STATE_DOUSA_SLEEP_INIT;
i_this->mMode = MODE_DOUSA_SLEEP_INIT;
break;
}
}
s16 yRotDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->mTargetAngleY);
if (yRotDiff < 0x100) {
i_this->mState += 1;
i_this->mMode += 1;
}
break;
}
@@ -573,7 +573,7 @@ static void action_dousa(am_class* i_this) {
if (!Line_check(i_this, player->current.pos) || player->getDamageWaitTimer() != 0) {
i_this->speedF = 0.0f;
}
i_this->mState += 1;
i_this->mMode += 1;
break;
case 6:
if (i_this->mCurrBckIdx == AM_BCK_CLOSE) {
@@ -596,7 +596,7 @@ static void action_dousa(am_class* i_this) {
if (i_this->mCountUpTimers[0] < 2) {
i_this->mCountDownTimers[0] = 10;
}
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 7:
if (i_this->mCountDownTimers[0] != 0) {
@@ -621,9 +621,9 @@ static void action_dousa(am_class* i_this) {
0xB9, &i_this->mSmokeCbs[2], fopAcM_GetRoomNo(i_this)
);
}
i_this->mState = 8;
i_this->mMode = 8;
} else {
i_this->mState = 3;
i_this->mMode = 3;
}
break;
case 8:
@@ -635,27 +635,27 @@ static void action_dousa(am_class* i_this) {
}
if (i_this->mCountDownTimers[0] == 0) {
i_this->mSmokeCbs[2].remove();
i_this->mState = 3;
i_this->mMode = 3;
}
break;
case STATE_DOUSA_SLEEP_INIT:
case MODE_DOUSA_SLEEP_INIT:
anm_init(i_this, AM_BCK_SLEEP, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_IN, 0);
i_this->mNeedleCyl.OffAtSetBit();
i_this->mNeedleCyl.OffAtSetBit();
i_this->attention_info.flags = 0;
i_this->mState += 1;
i_this->mMode += 1;
break;
case STATE_DOUSA_SLEEP_MAIN:
case MODE_DOUSA_SLEEP_MAIN:
if (i_this->mpMorf->isStop()) {
i_this->mState = 0;
i_this->mMode = 0;
}
break;
}
medama_move(i_this);
if (i_this->mState != 2 && medama_atari_check(i_this)) {
if (i_this->mMode != 2 && medama_atari_check(i_this)) {
i_this->mSmokeCbs[2].remove();
} else if (bomb_nomi_check(i_this)) {
i_this->mSmokeCbs[2].remove();
@@ -664,8 +664,8 @@ static void action_dousa(am_class* i_this) {
/* 00002564-000028C4 .text action_modoru_move__FP8am_class */
static void action_modoru_move(am_class* i_this) {
switch (i_this->mState) {
case STATE_MODORU_MOVE_INIT: {
switch (i_this->mMode) {
case MODE_MODORU_MOVE_INIT: {
anm_init(i_this, AM_BCK_CLOSE_LOOP, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
@@ -677,10 +677,10 @@ static void action_modoru_move(am_class* i_this) {
f32 xDistToSpawn = i_this->mSpawnPos.x - i_this->current.pos.x;
f32 zDistToSpawn = i_this->mSpawnPos.z - i_this->current.pos.z;
i_this->mTargetAngleY = cM_atan2s(xDistToSpawn, zDistToSpawn);
i_this->mState += 1;
i_this->mMode += 1;
break;
}
case STATE_MODORU_MOVE_MAIN: {
case MODE_MODORU_MOVE_MAIN: {
f32 xDistToSpawn = i_this->mSpawnPos.x - i_this->current.pos.x;
f32 zDistToSpawn = i_this->mSpawnPos.z - i_this->current.pos.z;
if (i_this->mAcch.ChkGroundHit()) {
@@ -705,18 +705,18 @@ static void action_modoru_move(am_class* i_this) {
if (xzDist < 20.0f) {
i_this->mTargetAngleY = i_this->mSpawnRotY;
i_this->speedF = 0.0f;
i_this->mState += 1;
i_this->mMode += 1;
}
break;
}
case STATE_MODORU_MOVE_END: {
case MODE_MODORU_MOVE_END: {
s16 angleDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->mTargetAngleY);
if (angleDiff < 0x100) {
i_this->mNeedleCyl.OffAtSetBit();
i_this->mNeedleCyl.OffAtSetBit();
i_this->attention_info.flags = 0;
i_this->mAction = ACTION_DOUSA;
i_this->mState = STATE_DOUSA_INIT;
i_this->mMode = MODE_DOUSA_INIT;
}
break;
}
@@ -726,8 +726,8 @@ static void action_modoru_move(am_class* i_this) {
/* 000028C4-00002A6C .text action_handou_move__FP8am_class */
static void action_handou_move(am_class* i_this) {
daPy_py_c* player = daPy_getPlayerActorClass();
switch (i_this->mState) {
case STATE_HANDOU_MOVE_INIT: {
switch (i_this->mMode) {
case MODE_HANDOU_MOVE_INIT: {
i_this->speedF = 20.0f;
s16 angleToPlayer = fopAcM_searchPlayerAngleY(i_this);
i_this->current.angle.y = angleToPlayer + 0x8000;
@@ -743,17 +743,17 @@ static void action_handou_move(am_class* i_this) {
mDoAud_seStart(JA_SE_CM_AM_MOUTH_CLOSE, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
anm_init(i_this, AM_BCK_CLOSE, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
}
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
}
case STATE_HANDOU_MOVE_MAIN: {
case MODE_HANDOU_MOVE_MAIN: {
cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f);
if (i_this->speedF < 0.1f) {
i_this->speedF = 0.0f;
i_this->mCountDownTimers[2] = 6;
i_this->current.angle.y = i_this->shape_angle.y;
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
i_this->mMode = 3;
}
break;
}
@@ -762,8 +762,8 @@ static void action_handou_move(am_class* i_this) {
/* 00002A6C-000034F4 .text action_itai_move__FP8am_class */
static void action_itai_move(am_class* i_this) {
switch (i_this->mState) {
case STATE_ITAI_MOVE_INIT:
switch (i_this->mMode) {
case MODE_ITAI_MOVE_INIT:
i_this->mEyeRot.setall(0);
i_this->mNeedleCyl.OffAtSetBit();
i_this->mNeedleCyl.OffAtSetBit();
@@ -772,7 +772,7 @@ static void action_itai_move(am_class* i_this) {
i_this->mTargetAngleY = i_this->current.angle.y;
fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_IN, 0);
anm_init(i_this, AM_BCK_DAMAGE, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 41:
cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f);
@@ -782,7 +782,7 @@ static void action_itai_move(am_class* i_this) {
i_this->mCountDownTimers[0] = 100;
i_this->speedF = 0.0f;
anm_init(i_this, AM_BCK_DAMAGE_LOOP, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mState += 1;
i_this->mMode += 1;
break;
case 42:
if (i_this->mCountDownTimers[0] != 0) {
@@ -793,7 +793,7 @@ static void action_itai_move(am_class* i_this) {
// Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match.
// fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_CLOSE, 0);
mDoAud_seStart(JA_SE_CM_AM_MOUTH_CLOSE, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
i_this->mState += 1;
i_this->mMode += 1;
break;
case 43:
if (!i_this->mpMorf->isStop()) {
@@ -803,7 +803,7 @@ static void action_itai_move(am_class* i_this) {
i_this->mNeedleCyl.OnAtHitBit();
i_this->mCountUpTimers[0] = 0;
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
i_this->mMode = 3;
break;
case 44:
i_this->mSmokeCbs[3].remove();
@@ -819,7 +819,7 @@ static void action_itai_move(am_class* i_this) {
i_this->mNeedleCyl.OffAtSetBit();
i_this->mNeedleCyl.OffAtSetBit();
i_this->mCountDownTimers[1] = 10;
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 45:
bomb_move_set(i_this, 0);
@@ -846,7 +846,7 @@ static void action_itai_move(am_class* i_this) {
}
i_this->mCountDownTimers[0] = 100;
i_this->mTargetAngleY = fopAcM_searchPlayerAngleY(i_this);
i_this->mState += 1;
i_this->mMode += 1;
break;
case 46:
bomb_move_set(i_this, 1);
@@ -889,7 +889,7 @@ static void action_itai_move(am_class* i_this) {
i_this->m0340 = NULL;
}
i_this->speedF = 0.0f;
i_this->mState += 1;
i_this->mMode += 1;
break;
case 47:
bomb_move_set(i_this, 1);
@@ -930,7 +930,7 @@ static void action_itai_move(am_class* i_this) {
i_this->m0340->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(2));
}
if (i_this->mState == 41 || i_this->mState == 42) {
if (i_this->mMode == 41 || i_this->mMode == 42) {
bomb_nomi_check(i_this);
}
}
@@ -987,11 +987,11 @@ static BOOL daAM_Execute(am_class* i_this) {
i_this->speedF = 0.0f;
i_this->mAction = ACTION_ITAI_MOVE;
i_this->mState = 47;
i_this->mMode = 47;
}
cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 1, 0x500);
if (i_this->mState != 46 && i_this->mState != 47 && i_this->mState != 31) {
if (i_this->mMode != 46 && i_this->mMode != 47 && i_this->mMode != 31) {
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 1, 0x500);
}
+55 -55
View File
@@ -177,7 +177,7 @@ static BOOL medama_atari_check(am2_class* i_this) {
i_this->mNeedleCyl.OnAtHitBit();
i_this->mNeedleCyl.OnTgSetBit();
i_this->mAction = ACTION_DOUSA;
i_this->mState = 2;
i_this->mMode = 2;
} else {
dComIfGp_particle_set(dPa_name::ID_COMMON_0010, &hitPos, &player->shape_angle);
// Using the fopAcM_seStart inline breaks the codegen.
@@ -185,7 +185,7 @@ static BOOL medama_atari_check(am2_class* i_this) {
mDoAud_seStart(JA_SE_CM_AM2_PARALYZED, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
fopAcM_monsSeStart(i_this, JA_SE_CV_AM2_PARALYZED, 0x42);
i_this->mAction = ACTION_MAHI;
i_this->mState = 10;
i_this->mMode = 10;
}
return TRUE;
}
@@ -294,7 +294,7 @@ static BOOL week_atari_check(am2_class* i_this) {
}
i_this->mAction = ACTION_ITAI;
i_this->mState = 20;
i_this->mMode = 20;
if (i_this->m2CE == 7 || i_this->m2CE == 8) {
actor->health = 0;
}
@@ -341,7 +341,7 @@ static BOOL body_atari_check(am2_class* i_this) {
break;
}
i_this->mAction = ACTION_HANDOU_MOVE;
i_this->mState = 30;
i_this->mMode = 30;
i_this->m2CE = 7;
if (player->getCutType() == 0x11) {
i_this->m2CE = 8;
@@ -448,7 +448,7 @@ static void action_dousa(am2_class* i_this) {
cXyz offset;
cXyz rotOffset;
if (i_this->mState == 4 || i_this->mState == 5) {
if (i_this->mMode == 4 || i_this->mMode == 5) {
cMtx_YrotS(*calc_mtx, i_this->current.angle.y);
offset.set(0.0f, 0.0f, 200.0f);
MtxPosition(&offset, &rotOffset);
@@ -456,7 +456,7 @@ static void action_dousa(am2_class* i_this) {
rotOffset.y += 100.0f + REG12_F(19);
}
switch (i_this->mState) {
switch (i_this->mMode) {
case 0:
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
i_this->mCountUpTimers[i] = 0;
@@ -465,7 +465,7 @@ static void action_dousa(am2_class* i_this) {
if (i_this->mCurrBckIdx != AM2_BCK_WAIT) {
anm_init(i_this, AM2_BCK_WAIT, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
}
i_this->mState++;
i_this->mMode++;
// Fall-through
case 1: {
f32 playerDist = fopAcM_searchPlayerDistance(i_this);
@@ -479,7 +479,7 @@ static void action_dousa(am2_class* i_this) {
fopAcM_monsSeStart(i_this, JA_SE_CV_AM2_AWAKE, 0);
i_this->mEyeSph.OnTgSetBit();
i_this->mWeakSph.OnTgSetBit();
i_this->mState += 1;
i_this->mMode += 1;
}
}
break;
@@ -491,7 +491,7 @@ static void action_dousa(am2_class* i_this) {
if (!i_this->mpMorf->isStop()) {
break;
}
i_this->mState++;
i_this->mMode++;
// Fall-through
case 3: {
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
@@ -501,7 +501,7 @@ static void action_dousa(am2_class* i_this) {
f32 playerDist = fopAcM_searchPlayerDistance(i_this);
f32 radiusAdjust = 200.0f;
if (playerDist > i_this->mAreaRadius + radiusAdjust) {
i_this->mState = 6;
i_this->mMode = 6;
} else {
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
@@ -512,7 +512,7 @@ static void action_dousa(am2_class* i_this) {
if (i_this->mCurrBckIdx != AM2_BCK_JUMP) {
anm_init(i_this, AM2_BCK_JUMP, 2.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
i_this->mState++;
i_this->mMode++;
}
break;
}
@@ -521,11 +521,11 @@ static void action_dousa(am2_class* i_this) {
i_this->gravity = -3.0f;
i_this->speed.y = 12.0f;
fopAcM_seStart(i_this, JA_SE_CM_AM2_LANDING, 0);
i_this->mState = 3;
i_this->mMode = 3;
s16 angleDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->current.angle.y);
if (angleDiff < 0x1000) {
if (Line_check(i_this, rotOffset) || player->getDamageWaitTimer() == 0) {
i_this->mState = 5;
i_this->mMode = 5;
}
}
}
@@ -552,7 +552,7 @@ static void action_dousa(am2_class* i_this) {
}
if (i_this->mCountUpTimers[0] > 8) {
i_this->mState = 3;
i_this->mMode = 3;
} else {
i_this->speedF = 9.0f;
i_this->gravity = -8.0f;
@@ -570,7 +570,7 @@ static void action_dousa(am2_class* i_this) {
fopAcM_seStart(i_this, JA_SE_CM_AM2_SPIKE_IN, 0);
i_this->mWeakSph.OffTgSetBit();
i_this->mWeakSph.ClrTgHit();
i_this->mState++;
i_this->mMode++;
// Fall-through
case 7:
if (i_this->mpMorf->isStop()) {
@@ -583,7 +583,7 @@ static void action_dousa(am2_class* i_this) {
i_this->mNeedleCyl.ClrTgHit();
i_this->m304 = i_this->current.pos;
i_this->mAction = ACTION_DOUSA;
i_this->mState = 1;
i_this->mMode = 1;
}
break;
}
@@ -598,10 +598,10 @@ static void action_dousa(am2_class* i_this) {
fopAcM_delete(i_this);
} else {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
}
} else if (!medama_atari_check(i_this)) {
if (i_this->mState < 3 || !week_atari_check(i_this)) {
if (i_this->mMode < 3 || !week_atari_check(i_this)) {
body_atari_check(i_this);
}
}
@@ -612,7 +612,7 @@ static void action_mahi(am2_class* i_this) {
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
fopAc_ac_c* actor = i_this; // Fixes regswaps
switch (i_this->mState) {
switch (i_this->mMode) {
case 10:
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
i_this->mCountUpTimers[i] = 0;
@@ -631,7 +631,7 @@ static void action_mahi(am2_class* i_this) {
fopAcM_seStart(actor, JA_SE_CM_AM2_SPIKE_IN, 0);
anm_init(i_this, AM2_BCK_DAMAGE, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState++;
i_this->mMode++;
break;
case 11:
cLib_addCalc0(&actor->speedF, 0.5f, 1.0f);
@@ -640,7 +640,7 @@ static void action_mahi(am2_class* i_this) {
actor->speedF = 0.0f;
i_this->mCountDownTimers[2] = 20*30;
anm_init(i_this, AM2_BCK_MAHI, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mState++;
i_this->mMode++;
}
}
break;
@@ -653,7 +653,7 @@ static void action_mahi(am2_class* i_this) {
fopAcM_delete(actor);
} else {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
}
} else {
if (i_this->mCountUpTimers[1] != 0 && i_this->mAcch.ChkGroundHit()) {
@@ -672,7 +672,7 @@ static void action_mahi(am2_class* i_this) {
actor->speedF = 0.0f;
i_this->mbNotInHomeRoom = false;
i_this->mBodyCyl.OffCoSetBit();
i_this->mState++;
i_this->mMode++;
}
}
break;
@@ -692,11 +692,11 @@ static void action_mahi(am2_class* i_this) {
actor->speed.y = 25.0f;
actor->speedF = 35.0f;
i_this->mAcch.OnLineCheck();
i_this->mState = 14;
i_this->mMode = 14;
} else {
actor->gravity = -3.0f;
i_this->mCountUpTimers[1] = 1;
i_this->mState = 12;
i_this->mMode = 12;
}
}
break;
@@ -710,7 +710,7 @@ static void action_mahi(am2_class* i_this) {
} else {
i_this->mAcch.OffLineCheck();
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
}
} else {
if (i_this->mAcch.ChkGroundHit()) {
@@ -740,7 +740,7 @@ static void action_mahi(am2_class* i_this) {
} else {
actor->speedF = 0.0f;
i_this->mCountUpTimers[0] = 0;
i_this->mState = 12;
i_this->mMode = 12;
}
}
@@ -753,7 +753,7 @@ static void action_mahi(am2_class* i_this) {
fopAcM_delete(actor);
} else {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
return;
}
}
@@ -764,14 +764,14 @@ static void action_mahi(am2_class* i_this) {
actor->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(actor, fopAcStts_SHOWMAP_e);
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
i_this->mMode = 3;
}
break;
}
i_this->mTargetAngleY = actor->current.angle.y;
if (i_this->mState >= 12 && i_this->mState != 15) {
if (i_this->mMode >= 12 && i_this->mMode != 15) {
if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF) {
if (!dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) {
i_this->mCountDownTimers[2] = 20*30;
@@ -781,7 +781,7 @@ static void action_mahi(am2_class* i_this) {
i_this->mSwitch = 0xFF;
i_this->mAction = ACTION_DOUSA;
i_this->mState = 0;
i_this->mMode = 0;
if (fopAcM_CheckStatus(actor, fopAcStts_CARRY_e)) {
fopAcM_cancelCarryNow(actor);
@@ -811,19 +811,19 @@ static void action_mahi(am2_class* i_this) {
actor->gravity = -4.0f;
actor->speed.y = 20.0f;
i_this->mBodyCyl.OnCoSetBit();
i_this->mState = 15;
i_this->mMode = 15;
}
}
}
if (fopAcM_CheckStatus(actor, fopAcStts_CARRY_e) || i_this->mState == 15 || !week_atari_check(i_this)) {
if (fopAcM_CheckStatus(actor, fopAcStts_CARRY_e) || i_this->mMode == 15 || !week_atari_check(i_this)) {
body_atari_check(i_this);
}
}
/* 00002B08-000032AC .text action_itai__FP9am2_class */
static void action_itai(am2_class* i_this) {
switch (i_this->mState) {
switch (i_this->mMode) {
case 20:
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
i_this->mCountUpTimers[i] = 0;
@@ -845,9 +845,9 @@ static void action_itai(am2_class* i_this) {
if (i_this->mCountDownTimers[2] > 5) {
i_this->speedF = 5.0f;
}
i_this->mState++;
i_this->mMode++;
} else {
i_this->mState = 22;
i_this->mMode = 22;
}
break;
case 21:
@@ -857,11 +857,11 @@ static void action_itai(am2_class* i_this) {
i_this->gravity = -3.0f;
if (i_this->mCountDownTimers[2] < 5) {
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
i_this->mMode = 3;
} else {
anm_init(i_this, AM2_BCK_MAHI, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mAction = ACTION_MAHI;
i_this->mState = 12;
i_this->mMode = 12;
}
}
break;
@@ -871,7 +871,7 @@ static void action_itai(am2_class* i_this) {
i_this->mEyeSph.ClrTgHit();
i_this->mWeakSph.ClrTgHit();
anm_init(i_this, AM2_BCK_DEAD1, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState++;
i_this->mMode++;
break;
case 23:
if (!i_this->mpMorf->isStop()) {
@@ -885,7 +885,7 @@ static void action_itai(am2_class* i_this) {
i_this->mCountDownTimers[0] = 100;
i_this->current.angle.y = fopAcM_searchPlayerAngleY(i_this);
anm_init(i_this, AM2_BCK_DEAD2, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState++;
i_this->mMode++;
// Fall-through
case 24:
if (i_this->speed.y > 0.0f && i_this->mCountUpTimers[1] == 0) {
@@ -921,7 +921,7 @@ static void action_itai(am2_class* i_this) {
i_this->speedF = 0.0f;
i_this->mState++;
i_this->mMode++;
}
break;
case 25:
@@ -942,15 +942,15 @@ static void action_itai(am2_class* i_this) {
if (naraku_check(i_this)) {
if (i_this->mbNotInHomeRoom || i_this->health <= 0) {
if (i_this->mState != 25) {
if (i_this->mMode != 25) {
anm_init(i_this, AM2_BCK_DEAD3, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
fopAcM_seStart(i_this, JA_SE_CM_AM2_BEF_EXPLODE, 0);
i_this->speedF = 0.0f;
i_this->mState = 25;
i_this->mMode = 25;
}
} else {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
}
}
}
@@ -958,7 +958,7 @@ static void action_itai(am2_class* i_this) {
/* 000032AC-000034A4 .text action_handou_move__FP9am2_class */
static void action_handou_move(am2_class* i_this) {
daPy_py_c* player = daPy_getPlayerActorClass();
switch (i_this->mState) {
switch (i_this->mMode) {
case 30: {
i_this->speedF = 40.0f;
s16 angleToPlayer = fopAcM_searchPlayerAngleY(i_this);
@@ -972,7 +972,7 @@ static void action_handou_move(am2_class* i_this) {
i_this->mNeedleCyl.OffTgSetBit();
i_this->mNeedleCyl.ClrTgHit();
i_this->mTargetAngleY = i_this->current.angle.y;
i_this->mState++;
i_this->mMode++;
// Fall-through
}
case 31:
@@ -982,12 +982,12 @@ static void action_handou_move(am2_class* i_this) {
i_this->speedF = 0.0f;
i_this->current.angle.y = i_this->shape_angle.y;
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
i_this->mMode = 3;
if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) {
i_this->attention_info.flags = 0;
i_this->mCountDownTimers[2] = 20*30;
i_this->mAction = ACTION_MAHI;
i_this->mState = 12;
i_this->mMode = 12;
}
}
}
@@ -997,7 +997,7 @@ static void action_handou_move(am2_class* i_this) {
fopAcM_delete(i_this);
} else {
i_this->mAction = ACTION_MODORU_MOVE;
i_this->mState = 40;
i_this->mMode = 40;
}
}
}
@@ -1005,7 +1005,7 @@ static void action_handou_move(am2_class* i_this) {
/* 000034A4-0000379C .text action_modoru_move__FP9am2_class */
static void action_modoru_move(am2_class* i_this) {
// Respawns the Armos back at its spawn point after it falls into an abyss.
switch (i_this->mState) {
switch (i_this->mMode) {
case 40:
dCam_getBody()->ForceLockOff(fopAcM_GetID(i_this));
i_this->mInAbyssTimer = 0;
@@ -1013,7 +1013,7 @@ static void action_modoru_move(am2_class* i_this) {
i_this->mRippleCb.remove();
anm_init(i_this, AM2_BCK_WAIT, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
fopAcM_seStart(i_this, JA_SE_CM_AM2_WTR_RECOVER, 0);
i_this->mState++;
i_this->mMode++;
// Fall-through
case 41:
cLib_addCalc0(&i_this->scale.x, 1.0f, 0.1f);
@@ -1034,7 +1034,7 @@ static void action_modoru_move(am2_class* i_this) {
i_this->current.pos = i_this->mSpawnPos;
i_this->mTargetAngleY = i_this->current.angle.y;
i_this->mState++;
i_this->mMode++;
}
break;
case 42:
@@ -1056,13 +1056,13 @@ static void action_modoru_move(am2_class* i_this) {
i_this->mWeakSph.ClrTgHit();
i_this->mNeedleCyl.ClrTgHit();
i_this->mAction = ACTION_DOUSA;
i_this->mState = 0;
i_this->mMode = 0;
if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) {
i_this->attention_info.flags = 0;
i_this->mCountDownTimers[2] = 20*30;
i_this->mAction = ACTION_MAHI;
i_this->mState = 12;
i_this->mMode = 12;
}
}
break;
@@ -1456,7 +1456,7 @@ static cPhs_State daAM2_Create(fopAc_ac_c* i_actor) {
i_this->attention_info.flags = 0;
i_this->mCountDownTimers[2] = 20*30;
i_this->mAction = ACTION_MAHI;
i_this->mState = 12;
i_this->mMode = 12;
}
i_this->mAcchRadius = 40.0f + REG8_F(10);
+289 -289
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -58,29 +58,29 @@ static void anm_init(dr_class* i_this, int bckFileIdx, f32 morf, u8 loopMode, f3
/* 00000320-0000091C .text move__FP8dr_class */
static void move(dr_class* i_this) {
bool isIdle = false;
switch (i_this->mState) {
switch (i_this->mMode) {
case 0:
isIdle = true;
anm_init(i_this, DR_BCK_DR_WAIT1, l_HIO.mWait1Morf, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mState++;
i_this->mMode++;
i_this->mCountDownTimers[0] = (s16)(200.0f + cM_rndF(200.0f));
break;
case 1:
isIdle = true;
if (i_this->mCountDownTimers[0] == 0) {
anm_init(i_this, DR_BCK_DR_AKUBI1, l_HIO.mAkubi1Morf, J3DFrameCtrl::EMode_NONE, 1.0f, DR_BAS_AKUBI1);
i_this->mState++;
i_this->mMode++;
}
break;
case 2:
isIdle = true;
if (i_this->mpMorf->isStop()) {
i_this->mState = 0;
i_this->mMode = 0;
}
break;
case 10:
anm_init(i_this, DR_BCK_DR_BIKU1, l_HIO.mBiku1Morf, J3DFrameCtrl::EMode_NONE, 1.0f, DR_BAS_BIKU1);
i_this->mState++;
i_this->mMode++;
i_this->mCountDownTimers[0] = l_HIO.m0E;
i_this->mpBreathEmitter = dComIfGp_particle_set(dPa_name::ID_SCENE_81C4, &i_this->current.pos);
i_this->m2C9 = 0;
@@ -118,7 +118,7 @@ static void move(dr_class* i_this) {
} else {
anm_init(i_this, DR_BCK_DR_HO1, l_HIO.mHo1Morf, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mpBreathEmitter = dComIfGp_particle_set(dPa_name::ID_SCENE_81C6, &i_this->current.pos);
i_this->mState++;
i_this->mMode++;
}
}
@@ -138,7 +138,7 @@ static void move(dr_class* i_this) {
}
if (i_this->mpMorf->isStop()) {
i_this->mState = 0;
i_this->mMode = 0;
if (i_this->mpBreathEmitter) {
i_this->mpBreathEmitter->becomeInvalidEmitter();
i_this->mpBreathEmitter = NULL;
@@ -151,7 +151,7 @@ static void move(dr_class* i_this) {
if ((isIdle && (l_HIO.m0C || dComIfGp_getVibration().CheckQuake())) || i_this->m2C8 != 0) {
l_HIO.m0C = false;
i_this->m2C8 = 0;
i_this->mState = 10;
i_this->mMode = 10;
}
}
+152 -152
View File
@@ -185,23 +185,23 @@ void fly(fganon_class* i_this) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
if ((((i_this->m384 & 0xF) == 0) && (cM_rndF(1.0f) < 0.5f)) || (i_this->m388 == -10)) {
if ((((i_this->m384 & 0xF) == 0) && (cM_rndF(1.0f) < 0.5f)) || (i_this->mMode == -10)) {
i_this->m398 = player->shape_angle.y;
}
switch (i_this->m388) {
switch (i_this->mMode) {
case -10:
deru_brk(i_this);
i_this->current.pos = i_this->home.pos;
i_this->current.pos.y = player->current.pos.y + l_HIO.m10;
i_this->shape_angle.y = fopAcM_searchPlayerAngleY(a_this);
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, FGANON_BCK_WAIT1, 20.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m3A4[1] = 60;
break;
case 0:
anm_init(i_this, FGANON_BCK_WAIT1, 20.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
i_this->m3A0 = 0.0f;
i_this->m3A4[1] = (short)(cM_rndF(50.0f) + 50.0f);
// Fall-through
@@ -235,24 +235,24 @@ void fly(fganon_class* i_this) {
fly_se_set(i_this);
if (i_this->m3A4[1] == 0) {
i_this->m386 = 6;
i_this->m388 = 0;
i_this->mAction = 6;
i_this->mMode = 0;
}
if (i_this->m3A4[2] == 0) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
}
/* 000015A8-00001BD0 .text shot__FP12fganon_class */
void shot(fganon_class* i_this) {
cLib_addCalcAngleS2(&i_this->shape_angle.y, fopAcM_searchPlayerAngleY(i_this), 10, 0x400);
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
if (!i_this->m408) {
anm_init(i_this, FGANON_BCK_TAME1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
i_this->m3A4[0] = 40;
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_EBALL_MAKE_S, 0);
// Fall-through
@@ -269,7 +269,7 @@ void shot(fganon_class* i_this) {
}
if (i_this->m3A4[0] == 0) {
anm_init(i_this, FGANON_BCK_NAGERU1, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_EBALL_FIRE_S, 0);
mDoAud_seStart(JA_SE_CM_PG_EBALL_FIRE_S, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
}
@@ -285,7 +285,7 @@ void shot(fganon_class* i_this) {
}
if (i_this->mpMorf->isStop()) {
anm_init(i_this, FGANON_BCK_WAIT1, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
}
// Fall-through
}
@@ -300,7 +300,7 @@ void shot(fganon_class* i_this) {
else {
anm_init(i_this, FGANON_BCK_TENNISRL1, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
}
i_this->m388++;
i_this->mMode++;
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_REFLECT_EBALL, 0);
mDoAud_seStart(JA_SE_CM_PG_SWING_S, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
i_this->m687++;
@@ -309,8 +309,8 @@ void shot(fganon_class* i_this) {
}
}
else if (i_this->m2BC == 2) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
return;
}
}
@@ -324,7 +324,7 @@ void shot(fganon_class* i_this) {
if (i_this->mpMorf->isStop() || ((i_this->m2BC >= 1) && (i_this->mpMorf->getFrame() >= 20.0f)))
{
anm_init(i_this, FGANON_BCK_WAIT1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388 = 3;
i_this->mMode = 3;
}
// Fall-through
}
@@ -332,11 +332,11 @@ void shot(fganon_class* i_this) {
cLib_addCalc0(&i_this->speedF, 1.0f, REG0_F(14) + 1.0f);
pos_move(i_this, 0);
fly_se_set(i_this);
if ((i_this->m388 >= 2) && (i_this->m408 == 0)) {
i_this->m386 = 5;
i_this->m388 = 0;
if ((i_this->mMode >= 2) && (i_this->m408 == 0)) {
i_this->mAction = 5;
i_this->mMode = 0;
}
if ((i_this->m388 == 3) || (i_this->m388 == 4)) {
if ((i_this->mMode == 3) || (i_this->mMode == 4)) {
mDoAud_monsSeStart(JA_SE_OBJ_PG_EBALL_FLY_S, &i_this->m3E0, 100, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
}
}
@@ -347,10 +347,10 @@ void spinattack(fganon_class* i_this) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
int mFrame = i_this->mpMorf->mFrameCtrl.getFrame();
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
i_this->shape_angle.y = player->shape_angle.y;
i_this->m388 = 1;
i_this->mMode = 1;
// Fall-through
}
case 1: {
@@ -363,7 +363,7 @@ void spinattack(fganon_class* i_this) {
if (!dComIfG_Bgsp()->LineCross(&linChk)) {
i_this->current.pos.y -= 100.0f;
anm_init(i_this, FGANON_BCK_WAIT1, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388 = 2;
i_this->mMode = 2;
i_this->m3A4[0] = 30;
deru_brk(i_this);
// Fall-through
@@ -376,7 +376,7 @@ void spinattack(fganon_class* i_this) {
case 2: {
if (i_this->m3A4[0] == 0) {
anm_init(i_this, FGANON_BCK_KAITEN1, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388 = 3;
i_this->mMode = 3;
i_this->speedF = 0.0f;
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_EBALL_FIRE_S, 0);
}
@@ -406,8 +406,8 @@ void spinattack(fganon_class* i_this) {
i_this->current.angle.x = 0;
pos_move(i_this, 1);
if (i_this->mpMorf->isStop()) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
break;
}
@@ -420,22 +420,22 @@ void fly2(fganon_class* i_this) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
if ((((i_this->m384 & 0xF) == 0) && (cM_rndF(1.0f) < 0.5f)) || (i_this->m388 == -10)) {
if ((((i_this->m384 & 0xF) == 0) && (cM_rndF(1.0f) < 0.5f)) || (i_this->mMode == -10)) {
i_this->m398 = player->shape_angle.y;
}
switch (i_this->m388) {
switch (i_this->mMode) {
case -10:
deru_brk(i_this);
i_this->current.pos = i_this->home.pos;
i_this->current.pos.y = player->current.pos.y + l_HIO.m18;
i_this->shape_angle.y = fopAcM_searchPlayerAngleY(a_this);
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, FGANON_BCK_WAIT1, 20.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m3A4[1] = 40;
break;
case 0:
anm_init(i_this, FGANON_BCK_WAIT1, 20.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
i_this->m3A0 = 0.0f;
i_this->m3A4[1] = (short)(cM_rndF(50.0f) + 50.0f);
// Fall-through
@@ -469,13 +469,13 @@ void fly2(fganon_class* i_this) {
fly_se_set(i_this);
if (i_this->m3A4[1] == 0) {
i_this->m386 = 11;
i_this->m388 = 0;
i_this->mAction = 11;
i_this->mMode = 0;
}
if (i_this->m3A4[2] == 0) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
}
@@ -568,7 +568,7 @@ void mahou_set(fganon_class* i_this) {
void shot2(fganon_class* i_this) {
cLib_addCalcAngleS2(&i_this->shape_angle.y, fopAcM_searchPlayerAngleY(i_this), 10, 0x400);
int mFrame = i_this->mpMorf->mFrameCtrl.getFrame();
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
anm_init(i_this, FGANON_BCK_TAME_S1, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
for (int i = 0; i < 2; i++) {
@@ -580,7 +580,7 @@ void shot2(fganon_class* i_this) {
i_this->mEmitters2[0] = dComIfGp_particle_set(dPa_name::ID_SCENE_8218, &i_this->current.pos, NULL);
i_this->mEmitters2[1] = dComIfGp_particle_set(dPa_name::ID_SCENE_8219, &i_this->current.pos, NULL);
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_EBALL_MAKE_L, 0);
i_this->m388++;
i_this->mMode++;
// Fall-through
}
case 1: {
@@ -593,7 +593,7 @@ void shot2(fganon_class* i_this) {
if (i_this->mpMorf->isStop()) {
anm_init(i_this, FGANON_BCK_TAME_S2, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m3A4[0] = l_HIO.m3C;
i_this->m388++;
i_this->mMode++;
for (int i = 0; i < 2; i++) {
if (i_this->mEmitters2[i] != NULL) {
i_this->mEmitters2[i]->becomeInvalidEmitter();
@@ -611,7 +611,7 @@ void shot2(fganon_class* i_this) {
fopAcM_seStart(i_this, JA_SE_CM_PG_EBALL_MAKING_L, 0);
if (i_this->m3A4[0] == 0) {
anm_init(i_this, FGANON_BCK_NAGERU_S1, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
i_this->mEmitters2[0] = dComIfGp_particle_set(dPa_name::ID_SCENE_821C, &i_this->current.pos, NULL);
i_this->mEmitters2[1] = dComIfGp_particle_set(dPa_name::ID_SCENE_821D, &i_this->current.pos, NULL);
}
@@ -642,7 +642,7 @@ void shot2(fganon_class* i_this) {
}
if (i_this->mpMorf->isStop()) {
i_this->m3A4[0] = 60;
i_this->m388 = 4;
i_this->mMode = 4;
for (int i = 0; i < 2; i++) {
if (i_this->mEmitters2[i] != NULL) {
i_this->mEmitters2[i]->becomeInvalidEmitter();
@@ -657,8 +657,8 @@ void shot2(fganon_class* i_this) {
anm_init(i_this, FGANON_BCK_WAIT1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
if (i_this->m3A4[0] == 0) {
i_this->m386 = 9;
i_this->m388 = 0;
i_this->mAction = 9;
i_this->mMode = 0;
}
break;
}
@@ -678,10 +678,10 @@ void spinattack2(fganon_class* i_this) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
int mFrame = i_this->mpMorf->mFrameCtrl.getFrame();
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
i_this->shape_angle.y = player->shape_angle.y + i_this->m68F * 0x3333;
i_this->m388 = 1;
i_this->mMode = 1;
if (i_this->m68F == 0) {
for (int i = 1; i < 5; i++) {
fopAcM_create(PROC_FGANON, (i * 16) | 3, &i_this->current.pos, i_this->current.roomNo);
@@ -698,7 +698,7 @@ void spinattack2(fganon_class* i_this) {
MtxPosition(&offset, &transformedPos);
i_this->current.pos = player->current.pos + transformedPos;
anm_init(i_this, 10, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388 = 2;
i_this->mMode = 2;
deru_brk(i_this);
i_this->m38C = player->current.pos;
}
@@ -711,7 +711,7 @@ void spinattack2(fganon_class* i_this) {
local_e4 = i_this->m38C - i_this->current.pos;
if (local_e4.abs() < l_HIO.m38) {
anm_init(i_this, 9, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388 = 3;
i_this->mMode = 3;
i_this->speedF = 0.0f;
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_EBALL_FIRE_S, 0);
break;
@@ -731,21 +731,21 @@ void spinattack2(fganon_class* i_this) {
}
if (i_this->mpMorf->isStop()) {
if (i_this->m68F == 0) {
i_this->m388 = 4;
i_this->mMode = 4;
i_this->m3A4[0] = 40;
anm_init(i_this, FGANON_BCK_WAIT1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
else {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
}
break;
}
case 4: {
if (i_this->m3A4[0] == 0) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
break;
}
@@ -756,17 +756,17 @@ void spinattack2(fganon_class* i_this) {
/* 00003690-00003B3C .text down__FP12fganon_class */
void down(fganon_class* i_this) {
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
anm_init(i_this, 6, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388++;
i_this->mMode++;
i_this->speed.y = 0.0f;
}
case 1: {
i_this->m3AE = 5;
if (i_this->mAcch.ChkGroundHit()) {
if (i_this->mpMorf->isStop()) {
i_this->m388++;
i_this->mMode++;
anm_init(i_this, FGANON_BCK_TYAKUTI1, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
}
}
@@ -775,7 +775,7 @@ void down(fganon_class* i_this) {
}
case 2: {
if (i_this->mpMorf->isStop()) {
i_this->m388++;
i_this->mMode++;
anm_init(i_this, 8, 2.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
break;
@@ -789,7 +789,7 @@ void down(fganon_class* i_this) {
}
case 10: {
anm_init(i_this, 7, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388 = 2;
i_this->mMode = 2;
}
default:
break;
@@ -811,8 +811,8 @@ void down(fganon_class* i_this) {
bVar3 = TRUE;
}
if ((i_this->m3A4[0] == 0) || bVar3) {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
if (i_this->m2BC != 0) {
i_this->health = 100;
}
@@ -844,54 +844,54 @@ BOOL kabe_check(fganon_class* i_this) {
/* 00004300-000044CC .text deru__FP12fganon_class */
void deru(fganon_class* i_this) {
i_this->m3AE = 3;
switch(i_this->m388) {
switch(i_this->mMode) {
case 0:
if(l_HIO.m06 != 0) {
if (l_HIO.m06 == 1) {
i_this->m386 = 5;
i_this->m388 = -10;
i_this->mAction = 5;
i_this->mMode = -10;
i_this->m3A4[2] = l_HIO.m0A;
}
else if (l_HIO.m06 == 2) {
i_this->m386 = 7;
i_this->m388 = 0;
i_this->mAction = 7;
i_this->mMode = 0;
}
else if (l_HIO.m06 == 3) {
i_this->m386 = 9;
i_this->m388 = -10;
i_this->mAction = 9;
i_this->mMode = -10;
i_this->m3A4[2] = l_HIO.m0A;
}
else if (l_HIO.m06 == 4) {
i_this->m386 = 10;
i_this->m388 = 0;
i_this->mAction = 10;
i_this->mMode = 0;
}
}
else {
if (i_this->m2BC == 0) {
if (cM_rndF(1.0f) < 0.5f) {
i_this->m386 = 5;
i_this->m388 = -10;
i_this->mAction = 5;
i_this->mMode = -10;
i_this->m3A4[2] = l_HIO.m0A;
}
else {
i_this->m386 = 7;
i_this->m388 = 0;
i_this->mAction = 7;
i_this->mMode = 0;
}
}
else {
if ((cM_rndF(1.0f) < 0.4f) && !kabe_check(i_this)) {
i_this->m386 = 10;
i_this->m388 = 0;
i_this->mAction = 10;
i_this->mMode = 0;
}
else {
if (cM_rndF(1.0f) < 0.5f) {
i_this->m386 = 9;
i_this->m388 = -10;
i_this->mAction = 9;
i_this->mMode = -10;
i_this->m3A4[2] = l_HIO.m0A;
}
else {
i_this->m386 = 5;
i_this->m388 = -10;
i_this->mAction = 5;
i_this->mMode = -10;
i_this->m3A4[2] = l_HIO.m0A;
}
}
@@ -904,19 +904,19 @@ void deru(fganon_class* i_this) {
/* 000044CC-00004584 .text kieru__FP12fganon_class */
void kieru(fganon_class* i_this) {
i_this->m3AE = 3;
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
if ((i_this->m408 == 1) || (i_this->m408 == 2)) {
i_this->m408 = 35;
}
kieru_brk(i_this, 0);
if (i_this->m68F != 0) {
i_this->m388 = 1;
i_this->mMode = 1;
i_this->m3A4[0] = 30;
}
else {
i_this->m386 = 0;
i_this->m388 = 0;
i_this->mAction = 0;
i_this->mMode = 0;
}
break;
}
@@ -934,16 +934,16 @@ void fail(fganon_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
i_this->m3AE = 3;
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
kieru_brk(i_this, 1);
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, 7, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
break;
}
case 1: {
if (i_this->mpMorf->isStop()) {
i_this->m388 = 2;
i_this->mMode = 2;
i_this->m3A4[0] = 30;
dBgS_LinChk linChk;
@@ -1013,7 +1013,7 @@ void fail(fganon_class* i_this) {
else {
i_this->m698 = 0.0f;
i_this->m3A4[0] = 0;
i_this->m388 = 3;
i_this->mMode = 3;
}
}
}
@@ -1023,7 +1023,7 @@ void fail(fganon_class* i_this) {
if (i_this->m3A4[0] == 0) {
kieru_brk(i_this, 2);
i_this->m3A4[0] = 10;
i_this->m388 = 4;
i_this->mMode = 4;
i_this->mBokoID = fopAcM_create(PROC_BOKO, 5, &i_this->current.pos, i_this->current.roomNo);
}
break;
@@ -1052,7 +1052,7 @@ void fail(fganon_class* i_this) {
void standby(fganon_class* i_this) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
i_this->m3AE = 3;
switch(i_this->m388) {
switch(i_this->mMode) {
case -1: {
if (i_this->m2BC == 2) {
if (!dComIfGs_checkGetItem(dItem_LIGHT_ARROW_e)) {
@@ -1069,7 +1069,7 @@ void standby(fganon_class* i_this) {
float distXZ = std::sqrtf(xOffset * xOffset + zOffset * zOffset);
if (distXZ < i_this->m2BD * 10.0f) {
i_this->m3A4[0] = l_HIO.m08;
i_this->m388 = 1;
i_this->mMode = 1;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
i_this->mB89 = 22;
}
@@ -1077,13 +1077,13 @@ void standby(fganon_class* i_this) {
}
case 0: {
i_this->m3A4[0] = l_HIO.m08;
i_this->m388++;
i_this->mMode++;
// fallthrough
}
case 1: {
if (i_this->m3A4[0] == 0) {
i_this->m386 = 1;
i_this->m388 = 0;
i_this->mAction = 1;
i_this->mMode = 0;
i_this->m69C = 0.0f;
i_this->m698 = 0.0f;
i_this->m694 = 0.0f;
@@ -1101,13 +1101,13 @@ void start(fganon_class* i_this) {
i_this->m3AE = 3;
fopAcM_OffStatus(i_this, 0);
i_this->attention_info.flags = 0;
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
offset = player->current.pos - i_this->home.pos;
float distXZ = std::sqrtf(offset.x * offset.x + offset.z * offset.z);
if (distXZ < i_this->m2BD * 10.0f) {
i_this->mB54 = 1;
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, FGANON_BCK_WAIT1, 0.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
mDoAud_bgmAllMute(30);
}
@@ -1120,11 +1120,11 @@ void start(fganon_class* i_this) {
case 2: {
anm_init(i_this, FGANON_BCK_WARAU1, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_LAUGH_2, 0);
i_this->m388 = 3;
i_this->mMode = 3;
break;
}
case 4: {
i_this->m388 = 5;
i_this->mMode = 5;
i_this->m3A4[0] = REG0_S(0) + 0x50;
anm_init(i_this, FGANON_BCK_TAME1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
@@ -1162,9 +1162,9 @@ void end(fganon_class* i_this) {
fopAcM_OffStatus(i_this, 0);
i_this->attention_info.flags = 0;
s32 mFrame = i_this->mpMorf->mFrameCtrl.getFrame();
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, FGANON_BCK_LAST_DAMAGE1, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mB54 = 50;
dComIfGs_onEventBit(0x3f20); // PG_DEFEATED? It appears further down in `energy_ball_move`
@@ -1179,13 +1179,13 @@ void end(fganon_class* i_this) {
deru_brk(i_this);
anm_init(i_this, FGANON_BCK_WARAU1, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
fopAcM_monsSeStart(i_this, JA_SE_CV_PG_LAUGH_2, 0);
i_this->m388 = 3;
i_this->mMode = 3;
break;
}
case 4: {
deru_brk(i_this);
anm_init(i_this, FGANON_BCK_SARU1, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388 = 5;
i_this->mMode = 5;
i_this->speed.y = 0.0f;
fopAcM_seStart(i_this, JA_SE_CM_PG_END_1, 0);
}
@@ -1199,7 +1199,7 @@ void end(fganon_class* i_this) {
kieru_brk2(i_this);
}
if (mFrame == 48) {
i_this->m388 = 6;
i_this->mMode = 6;
}
}
case 6:
@@ -1214,9 +1214,9 @@ void last_end(fganon_class* i_this) {
i_this->m3AE = 3;
fopAcM_OffStatus(i_this, 0);
i_this->attention_info.flags = 0;
switch(i_this->m388) {
switch(i_this->mMode) {
case 0: {
i_this->m388 = 1;
i_this->mMode = 1;
anm_init(i_this, FGANON_BCK_MOGAKU1, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mB54 = 100;
i_this->m3C0 = 10000.0f;
@@ -1225,7 +1225,7 @@ void last_end(fganon_class* i_this) {
}
case 1: {
if (i_this->m3A4[1] == 0) {
i_this->m388 = 2;
i_this->mMode = 2;
i_this->m3A4[1] = 20;
i_this->m2D0 = 1;
i_this->mB54++;
@@ -1237,7 +1237,7 @@ void last_end(fganon_class* i_this) {
cLib_addCalc2(&i_this->scale.z, 0.1f, 1.0f, 0.05f);
cLib_addCalc2(&i_this->scale.y, 0.1f, 1.0f, 0.05f);
if (i_this->m3A4[1] == 0) {
i_this->m388 = 3;
i_this->mMode = 3;
i_this->m3A4[1] = 30;
fopAcM_seStart(i_this, JA_SE_CM_L_ARROW_PASS_AWAY, 0);
}
@@ -1251,7 +1251,7 @@ void last_end(fganon_class* i_this) {
i_this->scale.x = 0.0f;
i_this->scale.y = 0.0f;
i_this->scale.z = 0.0f;
i_this->m388 = 4;
i_this->mMode = 4;
i_this->m3A4[1] = 30;
}
break;
@@ -1270,7 +1270,7 @@ void last_end(fganon_class* i_this) {
mBoko->setMatrix(i_this->mpKenModel->getBaseTRMtx());
if (i_this->m3A4[1] == 1) {
fopAcM_cancelCarryNow(mBoko);
i_this->m388 = 5;
i_this->mMode = 5;
i_this->mB54++;
i_this->mB56 = 0;
}
@@ -1340,8 +1340,8 @@ void damage_check(fganon_class* i_this) {
dComIfGp_particle_set(dPa_name::ID_COMMON_NORMAL_HIT, &i_this->eyePos, &local_a0, &local_44);
dKy_SordFlush_set(i_this->eyePos, 1);
i_this->m386 = 22;
i_this->m388 = 0;
i_this->mAction = 22;
i_this->mMode = 0;
i_this->m3AE = 1000;
mDoAud_subBgmStop();
@@ -1364,8 +1364,8 @@ void damage_check(fganon_class* i_this) {
i_this->speedF = 0.0f;
}
else {
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
if ((i_this->m408 == 1) || (i_this->m408 == 2)) {
i_this->m408 = 35;
}
@@ -1408,8 +1408,8 @@ void damage_check(fganon_class* i_this) {
dComIfGp_particle_set(dPa_name::ID_COMMON_NORMAL_HIT, &i_this->eyePos, &local_a0, &local_44);
dKy_SordFlush_set(i_this->eyePos, 1);
i_this->m386 = 8;
i_this->m388 = 0;
i_this->mAction = 8;
i_this->mMode = 0;
i_this->m3B0 = REG8_F(11) + 80.0f;
i_this->m3B8 = REG8_S(2) + 7;
@@ -1426,7 +1426,7 @@ void damage_check(fganon_class* i_this) {
}
}
if (i_this->m68F) {
if ((i_this->mCyl.ChkTgHit()) || (master->m386 == 8)) {
if ((i_this->mCyl.ChkTgHit()) || (master->mAction == 8)) {
mEmitter = dComIfGp_particle_set(dPa_name::ID_SCENE_826B, &i_this->current.pos, NULL);
if (mEmitter != NULL) {
mEmitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(0));
@@ -1438,7 +1438,7 @@ void damage_check(fganon_class* i_this) {
if ((i_this->mCyl.ChkTgHit()) || (i_this->m68C)) {
i_this->m3AE = 6;
if (i_this->mCyl.ChkTgHit()) {
if(((i_this->m386 == 8) || (i_this->m386 == 7)) || (i_this->m386 == 10)) {
if(((i_this->mAction == 8) || (i_this->mAction == 7)) || (i_this->mAction == 10)) {
atInfo.mpObj = i_this->mCyl.GetTgHitObj();
pPos = i_this->mCyl.GetTgHitPosP();
atInfo.pParticlePos = pPos;
@@ -1472,14 +1472,14 @@ void damage_check(fganon_class* i_this) {
dComIfGp_particle_set(dPa_name::ID_COMMON_NORMAL_HIT, pPos, &local_a0, &local_44);
if ((i_this->m386 == 7) || (i_this->m386 == 10)) {
i_this->m386 = 8;
i_this->m388 = 0;
if ((i_this->mAction == 7) || (i_this->mAction == 10)) {
i_this->mAction = 8;
i_this->mMode = 0;
}
else if (i_this->m2BC == 0) {
if (i_this->health <= 0) {
i_this->m386 = 21;
i_this->m388 = 0;
i_this->mAction = 21;
i_this->mMode = 0;
i_this->m3AE = 1000;
mDoAud_subBgmStop();
}
@@ -1487,17 +1487,17 @@ void damage_check(fganon_class* i_this) {
i_this->m690 -= atInfo.mDamage;
if (i_this->m690 <= 0) {
i_this->m690 = 10;
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
}
else {
i_this->m388 = 10;
i_this->mMode = 10;
}
}
}
else if (i_this->m2BC == 1) {
i_this->m386 = 3;
i_this->m388 = 0;
i_this->mAction = 3;
i_this->mMode = 0;
i_this->health = 0;
mDoAud_subBgmStop();
}
@@ -1519,8 +1519,8 @@ void damage_check(fganon_class* i_this) {
dComIfGp_particle_set(dPa_name::ID_COMMON_NORMAL_HIT, &i_this->eyePos, &local_a0, &local_44);
dKy_SordFlush_set(i_this->eyePos, 1);
i_this->m386 = 8;
i_this->m388 = 0;
i_this->mAction = 8;
i_this->mMode = 0;
i_this->m3B0 = REG8_F(11) + 80.0f;
i_this->m3B8 = REG8_S(2) + 7;
@@ -1537,8 +1537,8 @@ void damage_check(fganon_class* i_this) {
/* 00006288-00006560 .text move__FP12fganon_class */
s32 move(fganon_class* i_this) {
int res = 0;
if (!dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) && !dComIfGp_checkPlayerStatus0(0, daPyStts0_SWIM_e) && i_this->m386) {
if (i_this->m386 == 10) {
if (!dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) && !dComIfGp_checkPlayerStatus0(0, daPyStts0_SWIM_e) && i_this->mAction) {
if (i_this->mAction == 10) {
dCam_getBody()->SetTypeForce("P_Ganon3", NULL);
}
else if (i_this->m2BC != 1) {
@@ -1548,17 +1548,17 @@ s32 move(fganon_class* i_this) {
dCam_getBody()->SetTypeForce("P_Ganon2", NULL);
}
}
if ((i_this->m2BC == 0) && (i_this->m386 < 20)) {
if ((i_this->m2BC == 0) && (i_this->mAction < 20)) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
if ((i_this->m386 == 0) && (player->current.pos.y < 710.0f)) {
if ((i_this->mAction == 0) && (player->current.pos.y < 710.0f)) {
return 0;
}
if ((i_this->m386 != 2) && (player->current.pos.y < 710.0f)) {
i_this->m386 = 2;
i_this->m388 = 0;
if ((i_this->mAction != 2) && (player->current.pos.y < 710.0f)) {
i_this->mAction = 2;
i_this->mMode = 0;
}
}
switch(i_this->m386) {
switch(i_this->mAction) {
case 0:
standby(i_this);
break;
@@ -1734,14 +1734,14 @@ void demo_camera(fganon_class* i_this) {
cLib_addCalc2(&i_this->mB80, 0.1f, 1.0f, REG8_F(7) + 0.01f);
}
if (i_this->mB56 == 110) {
i_this->m388 = 2;
i_this->mMode = 2;
}
if (i_this->mB56 == 180) {
i_this->m388 = 4;
i_this->mMode = 4;
}
if (i_this->mB56 == 280) {
i_this->m386 = 6;
i_this->m388 = 1;
i_this->mAction = 6;
i_this->mMode = 1;
i_this->m3A4[0] = 29;
i_this->mB54 = 150;
if (i_this->m2BF != 0xFF) {
@@ -1822,7 +1822,7 @@ void demo_camera(fganon_class* i_this) {
player->setPlayerPosAndAngle(&transformedPos, 0.0f);
if (i_this->mB56 == 10) {
i_this->m388++;
i_this->mMode++;
}
i_this->current.pos.x = (i_this->mB68.x - 50.0f) + REG0_F(4);
@@ -1859,7 +1859,7 @@ void demo_camera(fganon_class* i_this) {
i_this->mB68 = i_this->eyePos;
i_this->mB68.y -= REG0_F(11) + 30.0f;
i_this->m388++;
i_this->mMode++;
}
case 54: {
cLib_addCalc2(&i_this->mB68.y, (i_this->eyePos.y - 30.0f) + REG0_F(11), 0.1f, 20.0f);
@@ -2130,8 +2130,8 @@ void energy_ball_move(fganon_class* i_this) {
if (i_this->m40A != 0) {
return;
}
i_this->m386 = 2;
i_this->m388 = 0;
i_this->mAction = 2;
i_this->mMode = 0;
i_this->m40A = 50;
return;
}
@@ -2283,10 +2283,10 @@ void energy_ball_move(fganon_class* i_this) {
if (i_this->mBallAtSph.ChkAtHit() != 0) {
atInfo.mpActor = i_this->mBallAtSph.GetAtHitObj()->GetAc();
if ((atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == PROC_PLAYER)) && (i_this->m386 != 22)) {
if ((atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == PROC_PLAYER)) && (i_this->mAction != 22)) {
i_this->m68B = 1;
i_this->m386 = 5;
i_this->m388 = 1;
i_this->mAction = 5;
i_this->mMode = 1;
i_this->m3A4[1] = (cM_rndF(30.0f)) + 70.f;
}
}
@@ -2336,7 +2336,7 @@ static BOOL daFganon_Execute(fganon_class* i_this) {
fpcM_Search(&mahou_se_set, i_this);
g_env_light.settingTevStruct(TEV_TYPE_ACTOR, &i_this->current.pos, &i_this->tevStr);
if (((((i_this->m386 == 5) || (i_this->m386 == 9)) || (i_this->m386 == 7)) || (i_this->m386 == 10)) && ((i_this->m68B != 0 && (i_this->m68A == 0)))) {
if (((((i_this->mAction == 5) || (i_this->mAction == 9)) || (i_this->mAction == 7)) || (i_this->mAction == 10)) && ((i_this->m68B != 0 && (i_this->m68A == 0)))) {
i_this->m68B = 0;
anm_init(i_this, FGANON_BCK_WARAU1, 6.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m68A = 60;
@@ -2431,7 +2431,7 @@ static BOOL daFganon_Execute(fganon_class* i_this) {
energy_ball_move(i_this);
for (int i = 0; i < 2; i++) {
if ((i_this->mbIsMaterialized != 0) && (i_this->m386 != 22)) {
if ((i_this->mbIsMaterialized != 0) && (i_this->mAction != 22)) {
if (i_this->mEmitters1[i] != NULL) {
i_this->mEmitters1[i]->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(jno[i]));
}
@@ -2831,8 +2831,8 @@ static cPhs_State daFganon_Create(fopAc_ac_c* i_act) {
if (i_this->m68F == 0) {
master = i_this;
if (i_this->m2BC == 0) {
i_this->m386 = 20;
i_this->m388 = 0;
i_this->mAction = 20;
i_this->mMode = 0;
kieru_brk(i_this, 0);
i_this->max_health = 30;
i_this->health = 30;
@@ -2841,14 +2841,14 @@ static cPhs_State daFganon_Create(fopAc_ac_c* i_act) {
else {
i_this->max_health = 100;
i_this->health = 100;
i_this->m386 = 0;
i_this->m388= -1;
i_this->mAction = 0;
i_this->mMode= -1;
}
i_this->current.pos.y += 10000.0f;
}
else {
i_this->m386 = 10;
i_this->m388 = 0;
i_this->mAction = 10;
i_this->mMode = 0;
deru_brk(i_this);
}
i_this->initBt(REG8_F(8) + 300.0f, 300.0f);
+113 -93
View File
@@ -186,25 +186,26 @@ BOOL tyaku_check(ks_class* i_this) {
/* 00000788-0000087C .text ks_kuttuki_check__FP8ks_class */
BOOL ks_kuttuki_check(ks_class* i_this) {
fopAc_ac_c* mAtHitAc;
if (i_this->mSph.ChkAtHit() && !i_this->mSph.ChkAtShieldHit() && (mAtHitAc = i_this->mSph.GetAtHitAc(), mAtHitAc) && mAtHitAc == dComIfGp_getLinkPlayer() && KUTTUKU_ALL_COUNT >= 0 && KUTTUKU_ALL_COUNT < 0x14 && GORON_COUNT == 0) {
i_this->mSph.OffTgSetBit();
i_this->mSph.ClrCoSet();
i_this->mSph.ClrTgHit();
if (i_this->mSph.ChkAtHit() && !i_this->mSph.ChkAtShieldHit()) {
mAtHitAc = i_this->mSph.GetAtHitAc();
if (mAtHitAc && mAtHitAc == dComIfGp_getLinkPlayer() && KUTTUKU_ALL_COUNT >= 0 && KUTTUKU_ALL_COUNT < 20 && GORON_COUNT == 0) {
i_this->mSph.OffTgSetBit();
i_this->mSph.ClrCoSet();
i_this->mSph.ClrTgHit();
if (i_this->m2CF) {
i_this->m2CF = 0;
if (i_this->m2CF) {
i_this->m2CF = 0;
i_this->m52C.remove();
i_this->m52C.remove();
}
i_this->mAction = 4;
i_this->mMode = 40;
return TRUE;
}
i_this->m2CB = 4;
i_this->m2CC = 0x28;
return TRUE;
}
else {
return FALSE;
}
return FALSE;
}
/* 0000087C-000008F4 .text gm_birth_delet__FP8ks_class */
@@ -232,8 +233,8 @@ BOOL shock_damage_check(ks_class* i_this) {
if (distXZ < 200.0f) {
if (std::sqrtf(mSwordTopPos.y * mSwordTopPos.y) < 40.0f) {
i_this->m2CB = 3;
i_this->m2CC = 0x20;
i_this->mAction = 3;
i_this->mMode = 32;
return TRUE;
}
@@ -263,28 +264,28 @@ BOOL body_atari_check(ks_class* i_this) {
a_this->current.angle.y = fopAcM_searchPlayerAngleY(a_this) + 0x8000;
i_this->m2CB = 3;
i_this->mAction = 3;
switch (mTgHitObj->GetAtType()) {
case AT_TYPE_WIND: {
a_this->current.angle.y = cM_atan2s(a_this->current.pos.x - mTgHitPos.x, a_this->current.pos.z - mTgHitPos.z);
i_this->m2CB = 2;
i_this->m2CC = 20;
i_this->mAction = 2;
i_this->mMode = 20;
return FALSE;
}
case AT_TYPE_UNK8: {
i_this->m2CC = 0x20;
i_this->mMode = 32;
a_this->health = 0;
i_this->m2CC = 30;
i_this->mMode = 30;
return FALSE;
}
case AT_TYPE_SWORD: {
if (i_this->m2CC != 43 || i_this->m2CE) {
if (i_this->mMode != 43 || i_this->m2CE) {
dScnPly_ply_c::setPauseTimer(2);
a_this->stealItemBitNo = 1;
}
@@ -306,7 +307,7 @@ BOOL body_atari_check(ks_class* i_this) {
a_this->stealItemBitNo = 1;
i_this->m2CC = 0x20;
i_this->mMode = 32;
return TRUE;
}
@@ -343,12 +344,13 @@ BOOL body_atari_check(ks_class* i_this) {
default: {
mParticleScale.setall(REG8_F(0) + 0.8f);
dComIfGp_particle_set(dPa_name::ID_COMMON_NORMAL_HIT, &mTgHitPos, &mpCurPlayerActor->shape_angle, &mParticleScale);
break;
}
}
a_this->health = 0;
i_this->m2CC = 30;
i_this->mMode = 30;
return TRUE;
}
@@ -379,7 +381,7 @@ void speed_keisan(ks_class* i_this, short i_speed) {
void action_dousa_move(ks_class* i_this) {
daPy_lk_c* link = daPy_getPlayerLinkActorClass();
switch (i_this->m2CC) {
switch (i_this->mMode) {
case 0:
i_this->m30C = 0.0f;
@@ -389,7 +391,8 @@ void action_dousa_move(ks_class* i_this) {
i_this->m2F0[i] = 0;
}
i_this->m2CC++;
i_this->mMode++;
// Fall-through
case 1:
cLib_addCalcAngleS2(&i_this->shape_angle.z, 0, 1, 0x1000);
@@ -414,7 +417,8 @@ void action_dousa_move(ks_class* i_this) {
i_this->current.angle.y = i_this->m2FC + fopAcM_searchPlayerAngleY(i_this);
i_this->m2CC++;
i_this->mMode++;
// Fall-through
case 2:
if (i_this->mAcch.ChkGroundHit()) {
i_this->current.angle.y = i_this->m2FC + fopAcM_searchPlayerAngleY(i_this);
@@ -426,8 +430,8 @@ void action_dousa_move(ks_class* i_this) {
!dComIfGp_checkPlayerStatus0(0, daPyStts0_SWIM_e) &&
tyaku_check(i_this)) {
i_this->m2CB = 1;
i_this->m2CC = 10;
i_this->mAction = 1;
i_this->mMode = 10;
return;
}
@@ -468,9 +472,10 @@ void action_dousa_move(ks_class* i_this) {
if (fopAcM_searchActorDistance(i_this, dComIfGp_getPlayer(0)) < 500.0f) {
i_this->current.angle.y = fopAcM_searchPlayerAngleY(i_this);
}
break;
}
if (i_this->m2CC == 2 || i_this->m2CC == 3) {
if (i_this->mMode == 2 || i_this->mMode == 3) {
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 1, 0x1000);
}
@@ -489,8 +494,8 @@ void action_kougeki_move(ks_class* i_this) {
i_this->m31C = 60.0f;
}
switch (i_this->m2CC) {
case 0xa: {
switch (i_this->mMode) {
case 10: {
i_this->mSph.OffCoSetBit();
i_this->speedF = 26.0f;
@@ -509,11 +514,11 @@ void action_kougeki_move(ks_class* i_this) {
fopAcM_monsSeStart(i_this, JA_SE_CV_KS_ATTACK, 0);
i_this->m2CC++;
i_this->mMode++;
break;
}
case 0xb: {
case 11: {
if (i_this->speedF > 0.0f && i_this->m2F0[1] == 0 && i_this->mSph.ChkAtShieldHit()) {
i_this->gravity = -4.0f;
i_this->speed.y = 25.0f;
@@ -534,9 +539,10 @@ void action_kougeki_move(ks_class* i_this) {
i_this->m2E8[2] = (s16)(cM_rndF(20.0f) + 20.0f);
i_this->m2CC++;
i_this->mMode++;
// Fall-through
}
case 0xc:
case 12:
ks_kuttuki_check(i_this);
if (tyaku_check(i_this)) {
@@ -549,9 +555,10 @@ void action_kougeki_move(ks_class* i_this) {
if (i_this->m2E8[2] == 0) {
i_this->speedF = 0.0f;
i_this->m31C = 20.0f;
i_this->m2CB = 0;
i_this->m2CC = 0;
i_this->mAction = 0;
i_this->mMode = 0;
}
break;
}
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 1, 0x1000);
@@ -563,8 +570,8 @@ void action_kougeki_move(ks_class* i_this) {
/* 00001630-00001874 .text action_kaze_move__FP8ks_class */
void action_kaze_move(ks_class* i_this) {
switch (i_this->m2CC) {
case 0x14: {
switch (i_this->mMode) {
case 20: {
for (int i = 0; i < 5; i++) {
i_this->m2F0[i] = 0;
}
@@ -582,20 +589,21 @@ void action_kaze_move(ks_class* i_this) {
i_this->m308 = 0.0f;
i_this->m2CC++;
i_this->mMode++;
// Fall-through
}
case 0x15: {
case 21: {
cLib_addCalc2(&i_this->speed.y, i_this->m314, 0.8f, i_this->m308);
cLib_addCalc2(&i_this->m308, 5.0f, 1.0f, 0.5f);
if (i_this->m310 + 200.0f < i_this->current.pos.y || i_this->m2E8[1] == 0) {
i_this->m2CC++;
i_this->mMode++;
}
break;
}
case 0x16: {
case 22: {
cLib_addCalc2(&i_this->gravity, -1.0f, 0.3f, 0.5f);
if (i_this->speed.y < -2.0f) {
@@ -611,10 +619,11 @@ void action_kaze_move(ks_class* i_this) {
i_this->m30C = 2.0f;
if (tyaku_check(i_this)) {
i_this->m2CB = 0;
i_this->m2CC = 0;
i_this->mAction = 0;
i_this->mMode = 0;
return;
}
break;
}
}
@@ -670,8 +679,8 @@ void dead_eff_set(ks_class* i_this, cXyz* i_pos) {
void action_dead_move(ks_class* i_this) {
cXyz local_28;
switch (i_this->m2CC) {
case 0x1e: {
switch (i_this->mMode) {
case 30: {
for (int i = 0; i < 5; i++) {
i_this->m2F0[i] = 0;
}
@@ -686,14 +695,15 @@ void action_dead_move(ks_class* i_this) {
i_this->gravity = -3.0f;
i_this->speed.y = cM_rndF(5.0f) + 20.0f;
i_this->m2CC++;
i_this->mMode++;
i_this->m2F0[1] = (s16)cM_rndFX(4096.0f);
i_this->mSph.OffAtSPrmBit(cCcD_AtSPrm_Set_e);
i_this->mSph.OffAtSPrmBit(cCcD_AtSPrm_Set_e);
// Fall-through
}
case 0x1f: {
case 31: {
i_this->shape_angle.z += i_this->m2F0[1];
if (tyaku_check(i_this)) {
@@ -713,14 +723,16 @@ void action_dead_move(ks_class* i_this) {
local_28 = i_this->current.pos;
local_28.y += 20.0f;
dead_eff_set(i_this, &local_28);
break;
}
}
break;
}
case 0x20: {
case 32: {
local_28 = i_this->current.pos;
local_28.y += 45.0f;
dead_eff_set(i_this, &local_28);
break;
}
}
}
@@ -761,8 +773,8 @@ void action_omoi(ks_class* i_this) {
link->onHeavyState();
}
switch (i_this->m2CC) {
case 0x28: {
switch (i_this->mMode) {
case 40: {
i_this->m52C.remove();
a_this->speedF = 0.0f;
@@ -774,7 +786,7 @@ void action_omoi(ks_class* i_this) {
fopAcM_OffStatus(a_this, fopAcStts_UNK4000_e);
i_this->m2CC = 0x2a;
i_this->mMode = 42;
break;
}
@@ -818,7 +830,8 @@ void action_omoi(ks_class* i_this) {
fopAcM_setStageLayer(a_this);
i_this->m2CC++;
i_this->mMode++;
// Fall-through
}
case 0x29: {
fopAcM_SetRoomNo(a_this, fopAcM_GetRoomNo(mpCurPlayerActor));
@@ -887,6 +900,7 @@ void action_omoi(ks_class* i_this) {
i_this->m2D2 = 0;
i_this->m300++;
}
break;
}
}
@@ -924,7 +938,7 @@ void action_omoi(ks_class* i_this) {
i_this->m2F0[1] = 0;
}
i_this->m2CC = 0x2a;
i_this->mMode = 42;
return;
}
@@ -966,6 +980,7 @@ void action_omoi(ks_class* i_this) {
break;
case 2:
GORON_COUNT = KUTTUKU_ALL_COUNT;
break;
}
if (GORON_COUNT == 0) {
@@ -992,7 +1007,7 @@ void action_omoi(ks_class* i_this) {
GORON_COUNT = KUTTUKU_ALL_COUNT;
i_this->m2CC = 0x2a;
i_this->mMode = 42;
return;
}
@@ -1006,12 +1021,12 @@ void action_omoi(ks_class* i_this) {
link->offHeavyState();
}
i_this->m2CC = 0x2a;
i_this->mMode = 42;
}
break;
}
case 0x2a: {
case 42: {
if (i_this->m528) {
fopAcM_OffStatus(a_this, fopAcStts_UNK4000_e);
@@ -1027,22 +1042,24 @@ void action_omoi(ks_class* i_this) {
i_this->gravity = -3.0f;
i_this->speed.y = 26.0f;
i_this->m2CC++;
i_this->mMode++;
// Fall-through
}
case 0x2b: {
case 43: {
if (i_this->mAcch.ChkGroundHit() || i_this->mAcch.ChkWaterIn()) {
i_this->m2E8[2] = (s16)(cM_rndF(40.0f) + 40.0f);
i_this->mSph.OnCoSetBit();
i_this->mSph.OnTgSetBit();
i_this->m2CB = 1;
i_this->m2CC = 0xc;
i_this->mAction = 1;
i_this->mMode = 12;
}
break;
}
}
if (i_this->m2CC == 0x2b && body_atari_check(i_this) && i_this->m2CE) {
if (i_this->mMode == 43 && body_atari_check(i_this) && i_this->m2CE) {
fopAcM_seStart(a_this, JA_SE_LK_LAST_HIT, 0);
i_this->m2CE = 0;
}
@@ -1065,8 +1082,8 @@ BOOL tsubo_search(void* param_1, void* param_2) {
/* 000027A0-00002A40 .text action_tubo_search__FP8ks_class */
void action_tubo_search(ks_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
switch (i_this->m2CC) {
case 0x32: {
switch (i_this->mMode) {
case 50: {
i_this->mKsID = fpcM_ERROR_PROCESS_ID_e;
fpcEx_Search((fpcLyIt_JudgeFunc)tsubo_search, a_this);
@@ -1075,12 +1092,12 @@ void action_tubo_search(ks_class* i_this) {
fopAcM_delete(a_this);
}
else {
i_this->m2CC++;
i_this->mMode++;
}
break;
}
case 0x33: {
case 51: {
fopAc_ac_c* mpCurrActor = (fopAc_ac_c*)fopAcM_SearchByID(i_this->mKsID);
if (mpCurrActor) {
@@ -1113,11 +1130,11 @@ void action_tubo_search(ks_class* i_this) {
dComIfG_Ccsp()->Set(&i_this->mSph);
i_this->m2CC++;
i_this->mMode++;
break;
}
case 0x34: {
case 52: {
i_this->mSph.SetC(a_this->current.pos);
i_this->mSph.SetR(i_this->m31C);
@@ -1143,14 +1160,15 @@ void action_tubo_search(ks_class* i_this) {
}
fopAcM_delete(a_this);
break;
}
}
}
/* 00002A40-00002BC4 .text action_kb_birth_check__FP8ks_class */
void action_kb_birth_check(ks_class* i_this) {
switch (i_this->m2CC) {
case 0x3c: {
switch (i_this->mMode) {
case 60: {
i_this->current.pos.y += REG8_F(13) + 30.0f;
i_this->current.angle.y = cM_rndFX(32767.0f);
@@ -1158,9 +1176,10 @@ void action_kb_birth_check(ks_class* i_this) {
i_this->speed.y = REG8_F(10) + 20.0f + cM_rndF(REG8_F(11) + 5.0f);
i_this->gravity = -(REG8_F(12) + 2.0f);
i_this->m2CC++;
i_this->mMode++;
// Fall-through
}
case 0x3d: {
case 61: {
if (i_this->speed.y <= 0.0f && (i_this->mAcch.ChkGroundHit() || i_this->mAcch.GetGroundH() + (REG8_F(19) + 10.0f) > i_this->current.pos.y )) {
fopAcM_OffStatus(i_this, fopAcStts_UNK4000_e);
@@ -1168,9 +1187,10 @@ void action_kb_birth_check(ks_class* i_this) {
i_this->gravity = 0.0f;
i_this->speed.setall(0.0f);
i_this->m2CB = 0;
i_this->m2CC = 0;
i_this->mAction = 0;
i_this->mMode = 0;
}
break;
}
}
}
@@ -1205,7 +1225,7 @@ static BOOL daKS_Execute(ks_class* i_this) {
}
}
if (i_this->mGmID != 0 && i_this->m2CB != 3) {
if (i_this->mGmID != 0 && i_this->mAction != 3) {
fopAc_ac_c* mpGmActor = fopAcM_SearchByID(i_this->mGmID);
bool bVar5 = false;
@@ -1221,12 +1241,12 @@ static BOOL daKS_Execute(ks_class* i_this) {
}
if (bVar5) {
if (i_this->m2CB != 4) {
i_this->m2CB = 3;
i_this->m2CC = 30;
if (i_this->mAction != 4) {
i_this->mAction = 3;
i_this->mMode = 30;
}
else {
if (i_this->m2CC != 43) {
if (i_this->mMode != 43) {
daPy_py_c* link = (daPy_py_c*)daPy_getPlayerLinkActorClass();
link->offHeavyState();
@@ -1236,14 +1256,14 @@ static BOOL daKS_Execute(ks_class* i_this) {
i_this->m2F0[0] = 0;
i_this->m2F0[1] = 0;
i_this->m2CC = 0x2a;
i_this->mMode = 42;
}
}
}
}
}
switch(i_this->m2CB) {
switch(i_this->mAction) {
case 0:
action_dousa_move(i_this);
ks_kuttuki_check(i_this);
@@ -1295,7 +1315,7 @@ static BOOL daKS_Execute(ks_class* i_this) {
i_this->speed.x = local_c.x;
i_this->speed.z = local_c.z;
if (i_this->m2CC != 41 && !i_this->mAcch.ChkGroundHit() && !i_this->mAcch.ChkWaterIn()) {
if (i_this->mMode != 41 && !i_this->mAcch.ChkGroundHit() && !i_this->mAcch.ChkWaterIn()) {
i_this->speed.y += i_this->gravity;
if (i_this->speed.y < -20.0f) {
@@ -1312,14 +1332,14 @@ static BOOL daKS_Execute(ks_class* i_this) {
dComIfG_Ccsp()->Set(&i_this->mSph);
if (i_this->mSph.ChkCoSet() && (i_this->m2CB == 0 || i_this->m2CB == 2)) {
if (i_this->mSph.ChkCoSet() && (i_this->mAction == 0 || i_this->mAction == 2)) {
fopAcM_posMove(i_this, i_this->mStts.GetCCMoveP());
}
else {
fopAcM_posMove(i_this, NULL);
}
if (i_this->m2CC != 41) {
if (i_this->mMode != 41) {
BG_check(i_this);
naraku_check(i_this);
}
@@ -1588,8 +1608,8 @@ static cPhs_State daKS_Create(fopAc_ac_c* i_this) {
a_this->mSph.OffCoSetBit();
a_this->mSph.ClrTgHit();
a_this->m2CB = 10;
a_this->m2CC = 0x32;
a_this->mAction = 10;
a_this->mMode = 50;
return res;
}
@@ -1597,15 +1617,15 @@ static cPhs_State daKS_Create(fopAc_ac_c* i_this) {
if (a_this->m2C8 == 7) {
fopAcM_OnStatus(i_this, fopAcStts_UNK4000_e);
a_this->m2CB = 0x14;
a_this->m2CC = 0x3c;
a_this->mAction = 20;
a_this->mMode = 60;
return res;
}
if (a_this->m2C8 == 2) {
a_this->m2CB = 0;
a_this->m2CC = 3;
a_this->mAction = 0;
a_this->mMode = 3;
fopAcM_SetGravity(i_this, -3.0f);
+12 -12
View File
@@ -74,20 +74,20 @@ void kotori_move(kt_class* i_this) {
s16* r17;
s16* r16;
switch (i_this->mState) {
switch (i_this->mMode) {
case 0:
i_this->mSpeedFwd = kt_scale * 20.0f + 30.0f;
if (CPad_CHECK_TRIG_LEFT(0) && fopAcM_GetParam(i_this) == 1000) {
i_this->mTargetPos.x = player->current.pos.x;
i_this->mTargetPos.y = player->current.pos.y + 500.0f;
i_this->mTargetPos.z = player->current.pos.z;
i_this->mState = 2;
i_this->mMode = 2;
i_this->mSpeedLerp = 0.0f;
break;
}
if (i_this->mTimer[2] == 0) {
i_this->mState = 1;
i_this->mMode = 1;
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = REG0_F(13) * 100.0f + 3000.0f;
@@ -117,7 +117,7 @@ void kotori_move(kt_class* i_this) {
case 1:
dist = std::sqrtf(vx*vx + vy*vy + vz*vz);
if (dist < REG0_F(1) * 10.0f + 800.0f) {
i_this->mState = 8;
i_this->mMode = 8;
}
cLib_addCalc2(&i_this->mSpeedLerp, 3.0f, 1.0f, 0.1f);
calc_012:
@@ -153,7 +153,7 @@ calc_012:
cLib_addCalc2(&*r26, i_this->mGroundY, REG0_F(6) + 0.3f, REG0_F(7) + 20.0f);
if (std::fabsf(*r26 - i_this->mGroundY) < 1.0f) {
*r26 = i_this->mGroundY;
i_this->mState = 10;
i_this->mMode = 10;
}
dispWing = true;
ret = 1;
@@ -163,7 +163,7 @@ calc_012:
i_this->mTargetPos.y += 200.0f;
dist = std::sqrtf(vx*vx + vy*vy + vz*vz);
if (dist < REG0_F(1) * 10.0f + 800.0f) {
i_this->mState = 9;
i_this->mMode = 9;
}
cLib_addCalc2(&i_this->mSpeedLerp, 3.0f, 1.0f, 0.1f);
goto calc_012;
@@ -184,7 +184,7 @@ calc_012:
*r27 += pt.z;
cLib_addCalc2(&*r26, i_this->mTargetPos.y, REG0_F(6) + 0.5f, REG0_F(7) + 20.0f);
if (std::fabsf(*r26 - i_this->mTargetPos.y) < 1.0f) {
i_this->mState = 20;
i_this->mMode = 20;
i_this->mSpeedLerp = 0.0f;
}
dispWing = true;
@@ -200,7 +200,7 @@ calc_012:
if (std::fabsf(*r26 - i_this->mTargetPos.y) > 1.0f)
dispWing = true;
if (CPad_CHECK_TRIG_LEFT(0)) {
i_this->mState = 0;
i_this->mMode = 0;
i_this->mTimer[0] = 0;
i_this->mLiftYTimer = cM_rndFX(10.0f) + 10.0f;
i_this->mTargetPosHome.y += 2000.0f;
@@ -219,7 +219,7 @@ calc_012:
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)(REG0_F(10) * 10.0f + 500.0f));
if (i_this->mTimer[1] == 0 && i_this->mLiftY <= 0.0f) {
i_this->mTimer[1] = 20.0f + cM_rndF(20.0f);
i_this->mState = 11;
i_this->mMode = 11;
}
offs.x = 0.0f;
offs.y = 0.0f;
@@ -240,14 +240,14 @@ calc_012:
}
if (i_this->mTimer[1] == 0) {
i_this->mTimer[1] = 20.0f + cM_rndF(50.0f);
i_this->mState = 10;
i_this->mMode = 10;
i_this->mTargetPos.x = i_this->mTargetPosHome.x + cM_rndFX(1000.0f);
i_this->mTargetPos.z = i_this->mTargetPosHome.z + cM_rndFX(1000.0f);
}
calc_11:
*r26 -= 5.0f;
if (!i_this->mHitGround || dist_xz < (REG0_F(15) * 100.0f + 1500.0f)) {
i_this->mState = 0;
i_this->mMode = 0;
i_this->mTimer[0] = 0;
i_this->mLiftYTimer = 10.0f + cM_rndFX(10.0f);
i_this->mTargetPosHome.y += 2000.0f;
@@ -258,7 +258,7 @@ calc_11:
}
i_this->mHitGround = false;
if (i_this->mState >= 8) {
if (i_this->mMode >= 8) {
Vec pos;
pos.x = *r28;
pos.y = *r26;
+2 -3
View File
@@ -151,9 +151,8 @@ void raincnt_set(f32 count) {
s32 newCount = 0;
if (dKy_checkEventNightStop()) {
s32 newCount2;
if (g_env_light.mRainCount < (newCount2 = (count * count * count) * 250.0f))
newCount = newCount2;
if (g_env_light.mRainCount < (s32)((count * count * count) * 250.0f))
newCount = (count * count * count) * 250.0f;
} else {
newCount = (count * count * count) * 250.0f;
}
+173 -175
View File
@@ -980,206 +980,204 @@ u32 daNpc_Bs1_c::getMsg() {
msgNo = m740;
m740 = 0;
}
else {
if(dComIfGp_event_chkTalkXY()) {
u8 itemNo = dComIfGp_event_getPreItemNo();
else if(dComIfGp_event_chkTalkXY()) {
u8 itemNo = dComIfGp_event_getPreItemNo();
if(mType == 0) {
if(isEmono(itemNo)) {
m840 = itemNo;
switch(itemNo) {
case dItem_BOKOBABA_SEED_e:
msgNo = 0xF78;
if(mType == 0) {
if(isEmono(itemNo)) {
m840 = itemNo;
switch(itemNo) {
case dItem_BOKOBABA_SEED_e:
msgNo = 0xF78;
break;
case dItem_SKULL_NECKLACE_e:
msgNo = 0xF80;
break;
case dItem_RED_JELLY_e:
msgNo = 0xF85;
break;
case dItem_GREEN_JELLY_e:
msgNo = 0xF8A;
break;
case dItem_BLUE_JELLY_e:
msgNo = 0xF8F;
break;
case dItem_JOY_PENDANT_e:
msgNo = 0xF94;
break;
case dItem_GOLDEN_FEATHER_e:
msgNo = 0xF99;
break;
default:
if(dComIfGs_getEventReg(0x7F0F) < 10) {
msgNo = 0xF9E;
break;
case dItem_SKULL_NECKLACE_e:
msgNo = 0xF80;
break;
case dItem_RED_JELLY_e:
msgNo = 0xF85;
break;
case dItem_GREEN_JELLY_e:
msgNo = 0xF8A;
break;
case dItem_BLUE_JELLY_e:
msgNo = 0xF8F;
break;
case dItem_JOY_PENDANT_e:
msgNo = 0xF94;
break;
case dItem_GOLDEN_FEATHER_e:
msgNo = 0xF99;
break;
default:
if(dComIfGs_getEventReg(0x7F0F) < 10) {
msgNo = 0xF9E;
break;
}
}
msgNo = 0xFD4;
break;
}
}
else if(itemNo == KAISEN_PRESENT1) {
msgNo = 0xF6F;
}
else if(itemNo == KAISEN_PRESENT2) {
msgNo = 0xF73;
}
else {
msgNo = 0xF75;
msgNo = 0xFD4;
break;
}
}
else if(itemNo == KAISEN_PRESENT1 || itemNo == KAISEN_PRESENT2) {
msgNo = 0x2F56;
else if(itemNo == KAISEN_PRESENT1) {
msgNo = 0xF6F;
}
else if(isEmono(itemNo)) {
msgNo = 0x2F79;
else if(itemNo == KAISEN_PRESENT2) {
msgNo = 0xF73;
}
else {
msgNo = 0x2F57;
msgNo = 0xF75;
}
}
else if(mType == 0) {
u8 points = dComIfGs_getEventReg(0x86FF);
if(mShopItems.isSoldOutItemAll()) {
msgNo = 0xF3D;
}
else if(dComIfGs_checkGetItem(dItem_BOMB_BAG_e) && !dComIfGs_isEventBit(0x1F20) && isSellBomb()) {
dComIfGs_onEventBit(0x1F20);
m837 = 1;
msgNo = 0xF55;
}
else if(m837) {
msgNo = 0xF58;
}
else if(points >= 60) {
if(m836) {
msgNo = 0xF5D;
}
else {
msgNo = 0xF5C;
m836 = 1;
}
}
else if(points != 0) {
if(m836) {
msgNo = 0xF5B;
}
else {
msgNo = 0xF5A;
m836 = 1;
}
}
else if(m836) {
msgNo = 0xF41;
}
else {
m836 = 1;
msgNo = 0xF3D;
}
else if(itemNo == KAISEN_PRESENT1 || itemNo == KAISEN_PRESENT2) {
msgNo = 0x2F56;
}
else if(mShopItems.isSoldOutItemAll()) {
msgNo = 0x2F62;
else if(isEmono(itemNo)) {
msgNo = 0x2F79;
}
else {
msgNo = 0x2F57;
}
}
else if(mType == 0) {
u8 points = dComIfGs_getEventReg(0x86FF);
if(mShopItems.isSoldOutItemAll()) {
msgNo = 0xF3D;
}
else if(dComIfGs_checkGetItem(dItem_BOMB_BAG_e) && !dComIfGs_isEventBit(0x1F20) && isSellBomb()) {
dComIfGs_onEventBit(0x1F20);
m837 = 1;
msgNo = 0x2F64;
msgNo = 0xF55;
}
else if(m837) {
msgNo = 0x2F67;
msgNo = 0xF58;
}
else if(dComIfGs_isEventBit(0x1F08)) {
if(dComIfGs_isEventBit(0x2040)) {
if(m838 == 1) {
msgNo = 0x2F60;
}
else {
msgNo = 0x2F61;
}
else if(points >= 60) {
if(m836) {
msgNo = 0xF5D;
}
else {
dComIfGs_onEventBit(0x2040);
msgNo = 0x2F5F;
m838 = 1;
msgNo = 0xF5C;
m836 = 1;
}
}
else if(points != 0) {
if(m836) {
msgNo = 0xF5B;
}
else {
msgNo = 0xF5A;
m836 = 1;
}
}
else if(m836) {
msgNo = 0xF41;
}
else {
m836 = 1;
msgNo = 0xF3D;
}
}
else if(mShopItems.isSoldOutItemAll()) {
msgNo = 0x2F62;
}
else if(dComIfGs_checkGetItem(dItem_BOMB_BAG_e) && !dComIfGs_isEventBit(0x1F20) && isSellBomb()) {
dComIfGs_onEventBit(0x1F20);
m837 = 1;
msgNo = 0x2F64;
}
else if(m837) {
msgNo = 0x2F67;
}
else if(dComIfGs_isEventBit(0x1F08)) {
if(dComIfGs_isEventBit(0x2040)) {
if(m838 == 1) {
msgNo = 0x2F60;
}
else {
msgNo = 0x2F61;
}
}
else {
switch(dComIfGs_getEventReg(0xBB07)) {
case 0:
if(m836 || dComIfGs_isEventBit(0x1F10)) {
msgNo = 0x2F46;
break;
}
dComIfGs_onEventBit(0x1F10);
msgNo = 0x2F45;
break;
case 1:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F58;
break;
case 2:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F59;
break;
case 3:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5A;
break;
case 4:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5B;
break;
case 5:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5C;
break;
case 6:
if(m836) {
msgNo = 0x2F69;
break;
}
msgNo = 0x2F5D;
break;
case 7:
if(m836) {
msgNo = 0x2F6A;
break;
}
msgNo = 0x2F5E;
break;
}
if(dComIfGs_isEventBit(0x1F10)) {
dComIfGs_onEventBit(0x1F10);
}
m836 = 1;
dComIfGs_onEventBit(0x2040);
msgNo = 0x2F5F;
m838 = 1;
}
}
else {
switch(dComIfGs_getEventReg(0xBB07)) {
case 0:
if(m836 || dComIfGs_isEventBit(0x1F10)) {
msgNo = 0x2F46;
break;
}
dComIfGs_onEventBit(0x1F10);
msgNo = 0x2F45;
break;
case 1:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F58;
break;
case 2:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F59;
break;
case 3:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5A;
break;
case 4:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5B;
break;
case 5:
if(m836) {
msgNo = 0x2F46;
break;
}
msgNo = 0x2F5C;
break;
case 6:
if(m836) {
msgNo = 0x2F69;
break;
}
msgNo = 0x2F5D;
break;
case 7:
if(m836) {
msgNo = 0x2F6A;
break;
}
msgNo = 0x2F5E;
break;
}
if(dComIfGs_isEventBit(0x1F10)) {
dComIfGs_onEventBit(0x1F10);
}
m836 = 1;
}
return msgNo;
}
+55 -55
View File
@@ -2853,151 +2853,151 @@ BOOL daNpc_Ji1_c::setAnm(int param_1, f32 param_2, int param_3) {
fopAcM_seStart(this, JA_SE_CM_JI_DEFENSE, 0);
}
J3DAnmTransform* temp1;
s32 temp2;
J3DAnmTransform* bckAnm;
s32 loopMode;
void* pSoundAnimRes;
switch(param_1) {
case 0:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WAIT01));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WAIT01));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_WAIT01);
break;
case 1:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WAIT02));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WAIT02));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_WAIT02);
break;
case 2:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TALK01));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TALK01));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_TALK01);
break;
case 3:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TALK02));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TALK02));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_TALK02);
break;
case 4:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_AKIRE));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_AKIRE));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_AKIRE);
break;
case 5:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_KAMAE));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_KAMAE));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_KAMAE);
break;
case 6:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_KROT));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_KROT));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_KROT);
speed = l_HIO.field_0x48;
break;
case 7:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_INASI));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_INASI));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_INASI);
speed = l_HIO.field_0x44;
break;
case 8:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TATEGUARD));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TATEGUARD));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_TATEGUARD);
break;
case 9:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_YKGUARD));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_YKGUARD));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_YKGUARD);
break;
case 10:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_JPGUARD));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_JPGUARD));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_JPGUARD);
break;
case 11:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TOKAMAE));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TOKAMAE));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_TOKAMAE);
break;
case 12:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_REI));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_REI));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_REI);
break;
case 13:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WARAI));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_WARAI));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_WARAI);
speed = l_HIO.field_0x4C;
break;
case 14:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_JPGUARD));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_JPGUARD));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_JPGUARD);
speed = 2.0f;
break;
case 15:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_GUARD));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_GUARD));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_GUARD);
speed = 2.0f;
break;
case 16:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BTKAMASI));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BTKAMASI));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_BTKAMASI);
break;
case 17:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BTKAMAE));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BTKAMAE));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_BTKAMAE);
break;
case 18:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_UDEGUMI));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_UDEGUMI));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_UDEGUMI);
break;
case 19:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TATEATTACK));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_TATEATTACK));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_TATEATTACK);
break;
case 20:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_YOKOATTACK));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_YOKOATTACK));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_YOKOATTACK);
break;
case 21:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_ODOROKU));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_ODOROKU));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_ODOROKU);
break;
case 22:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BIBIRI));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_BIBIRI));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_BIBIRI);
BackSlideInit();
@@ -3007,8 +3007,8 @@ BOOL daNpc_Ji1_c::setAnm(int param_1, f32 param_2, int param_3) {
break;
case 23:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_NAKU));
temp2 = 2;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_NAKU));
loopMode = J3DFrameCtrl::EMode_LOOP;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_NAKU);
if(field_0x430 == 0) {
@@ -3018,14 +3018,14 @@ BOOL daNpc_Ji1_c::setAnm(int param_1, f32 param_2, int param_3) {
break;
case 24:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_NUGUI));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_NUGUI));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_NUGUI);
break;
case 25:
temp1 = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_DAMAGE));
temp2 = 0;
bckAnm = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("Ji", JI_BCK_JI_DAMAGE));
loopMode = J3DFrameCtrl::EMode_NONE;
pSoundAnimRes = dComIfG_getObjectRes("Ji", JI_BAS_JI_DAMAGE);
break;
@@ -3033,7 +3033,7 @@ BOOL daNpc_Ji1_c::setAnm(int param_1, f32 param_2, int param_3) {
return 0;
}
field_0x330->setAnm(temp1, temp2, param_2, speed, 0.0f, -1.0f, pSoundAnimRes);
field_0x330->setAnm(bckAnm, loopMode, param_2, speed, 0.0f, -1.0f, pSoundAnimRes);
if(field_0xD64 == 0x13) {
mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Ji", JI_BCK_JIYARI_TATEATTACK), J3DFrameCtrl::EMode_LOOP, 0.0f, 1.0f, 0.0f, -1.0f, NULL);
}
+28 -28
View File
@@ -174,11 +174,11 @@ void action_dousa(pw_class* i_this) {
daPy_py_c* player = daPy_getPlayerActorClass();
camera_class* camera = dComIfGp_getCamera(0);
cXyz camfwd;
switch (i_this->mState) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, PW_BCK_WAIT1, 7.0, J3DFrameCtrl::EMode_LOOP, 1.0, -1);
i_this->m346 = 0;
i_this->mState += 1;
i_this->mMode += 1;
break;
case 1:
if (fopAcM_searchPlayerDistance(i_this) < 500.0f) {
@@ -188,7 +188,7 @@ void action_dousa(pw_class* i_this) {
i_this->shape_angle.y = i_this->m38C;
i_this->m3A4 = -80.0f;
i_this->m340 = 1;
i_this->mState += 1;
i_this->mMode += 1;
}
break;
case 2:
@@ -207,13 +207,13 @@ void action_dousa(pw_class* i_this) {
particle->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(0x17)); // j_pw_item_r1 joint
}
i_this->attention_info.flags = 0;
i_this->mState = 0x0A;
i_this->mMode = 0x0A;
}
break;
case 9:
i_this->m39A = 0;
i_this->m39C = 0;
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 10:
if (i_this->mBehaviorType == InvisibleAtStart) {
@@ -224,15 +224,15 @@ void action_dousa(pw_class* i_this) {
i_this->m382 = 5;
switch (i_this->mBehaviorType) {
case InvisibleAtStart:
i_this->mState = 0xB;
i_this->mMode = 0xB;
break;
case OnlyLanternVisibleAtStart:
i_this->m341 = 2;
i_this->mState = 8;
i_this->mMode = 8;
break;
default:
i_this->m346 = 1;
i_this->mState = 0xD;
i_this->mMode = 0xD;
break;
}
}
@@ -256,7 +256,7 @@ void action_dousa(pw_class* i_this) {
first_mode_change(i_this);
i_this->m382 = 3;
i_this->m346 = 1;
i_this->mState = 0xD;
i_this->mMode = 0xD;
}
}
break;
@@ -269,7 +269,7 @@ void action_dousa(pw_class* i_this) {
i_this->mBehaviorType = VisibleFromStart;
i_this->m346 = 1;
first_mode_change(i_this);
i_this->mState = 0xD;
i_this->mMode = 0xD;
}
break;
case 7:
@@ -278,7 +278,7 @@ void action_dousa(pw_class* i_this) {
i_this->current.angle.y = i_this->m38C;
i_this->shape_angle.y = i_this->m38C;
anm_init(i_this, PW_BCK_DERUB2, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState = 6;
i_this->mMode = 6;
}
break;
case 8:
@@ -286,7 +286,7 @@ void action_dousa(pw_class* i_this) {
i_this->m346 = 1;
if (fopAcM_searchPlayerDistance(i_this) < i_this->m3AC) {
anm_init(i_this, PW_BCK_DERUB1, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->mState = 7;
i_this->mMode = 7;
}
break;
case 13:
@@ -301,14 +301,14 @@ void action_dousa(pw_class* i_this) {
} else if (i_this->mBckIdx != PW_BCK_WAIT2) {
anm_init(i_this, PW_BCK_WAIT2, 7.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 14:
cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f);
if (i_this->m378) {
break;
}
i_this->mState += 1;
i_this->mMode += 1;
// Fall-through
case 15:
i_this->m378 = cM_rndF(120.0f) + 120.0f;
@@ -323,9 +323,9 @@ void action_dousa(pw_class* i_this) {
}
i_this->m38C += (s16)cM_rndFX(16384.0f);
if (i_this->mPathIndex != 0xFF && i_this->mpPath != NULL) {
i_this->mState = 0x14;
i_this->mMode = 0x14;
} else {
i_this->mState = 0x10;
i_this->mMode = 0x10;
}
break;
case 16:
@@ -335,7 +335,7 @@ void action_dousa(pw_class* i_this) {
if (Line_check(i_this, i_this->current.pos, 0) || hani_check(i_this)) {
i_this->m37A = 10;
} else if (i_this->m378 == 0) {
i_this->mState = 0xF;
i_this->mMode = 0xF;
}
}
break;
@@ -361,14 +361,14 @@ void action_dousa(pw_class* i_this) {
i_this->m38C = fopAcM_searchPlayerAngleY(i_this);
anm_init(i_this, PW_BCK_DAMAGE_K1, 9.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->speedF = -2.0f;
i_this->mState += 1;
i_this->mMode += 1;
break;
case 26:
break;
case 27:
case 28:
if (!fopAcM_CheckStatus(i_this, fopAcStts_HOOK_CARRY_e)) {
i_this->mState = 0x5A;
i_this->mMode = 0x5A;
}
break;
case 101:
@@ -385,12 +385,12 @@ void action_dousa(pw_class* i_this) {
break;
case 100:
anm_init(i_this, PW_BCK_JITTAIKA1, 6.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState += 1;
i_this->mMode += 1;
break;
case 110:
anm_init(i_this, PW_BCK_ATTACK1, 7.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
// TODO
i_this->mState += 1;
i_this->mMode += 1;
break;
case 111:
if (i_this->m5C4.getEmitter() != NULL) {
@@ -404,30 +404,30 @@ void action_dousa(pw_class* i_this) {
i_this->speed.setall(0.0f);
i_this->gravity = 0.0f;
anm_init(i_this, PW_BCK_SIRIMOTI1, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->mState += 1;
i_this->mMode += 1;
case 112:
// Fall-through
if (i_this->mpMorf->isStop()) {
i_this->mState = 90;
i_this->mMode = 90;
}
break;
}
if (i_this->mState <= 11) {
if (i_this->mMode <= 11) {
return;
}
if (i_this->m37C == 0 && i_this->mState < 90) {
if (i_this->mState == 14 || i_this->mState == 16 || i_this->mState == 20) {
if (i_this->m37C == 0 && i_this->mMode < 90) {
if (i_this->mMode == 14 || i_this->mMode == 16 || i_this->mMode == 20) {
if (!hani_check(i_this) && fopAcM_searchPlayerDistance(i_this) < 500.0f && std::fabsf(i_this->current.pos.y - player->current.pos.y) < 100.0f) {
if (!Line_check(i_this, i_this->current.pos, 1) && (i_this->m346 == 1 || !TORITUKI_ON)) {
i_this->mAction = 1;
i_this->mState = 30;
i_this->mMode = 30;
}
}
}
}
if (i_this->mState >= 10 && i_this->mState < 90) {
if (i_this->mMode >= 10 && i_this->mMode < 90) {
alpha_anime(i_this);
}
+4 -4
View File
@@ -601,7 +601,7 @@ bool daRd_c::checkTgHit() {
case AT_TYPE_FIRE:
case AT_TYPE_UNK20000:
r29 = false;
if (mEnemyFire.mState == 0) {
if (mEnemyFire.mMode == 0) {
mEnemyFire.mFireDuration = l_HIO.m4C;
} else {
mHitType = 0xD;
@@ -887,7 +887,7 @@ void daRd_c::modeMove() {
temp = 0.1f;
}
f32 temp2 = l_HIO.m68;
if (mEnemyFire.mState != 0) {
if (mEnemyFire.mMode != 0) {
temp2 *= 2.0f;
}
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + REG12_F(0));
@@ -943,7 +943,7 @@ void daRd_c::modeCry() {
temp = 0.1f;
}
f32 temp2 = l_HIO.m68;
if (mEnemyFire.mState != 0) {
if (mEnemyFire.mMode != 0) {
temp2 *= 2.0f;
}
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + REG12_F(0));
@@ -1592,7 +1592,7 @@ bool daRd_c::_execute() {
}
current.angle = shape_angle;
if (mEnemyFire.mState == 0) { // Not on fire (TODO enum)
if (mEnemyFire.mMode == 0) { // Not on fire (TODO enum)
mCyl.SetAtType(0);
m6D4 = l_HIO.m4E;
} else {