clangd: Started fixing warnings and errors, code cleanup

This commit is contained in:
LagoLunatic
2024-10-17 21:35:18 -04:00
parent f1d73f7fc7
commit 34afbd84db
58 changed files with 417 additions and 316 deletions
+16 -8
View File
@@ -521,7 +521,7 @@ static void action_dousa(am_class* i_this) {
i_this->mTargetAngleY = fopAcM_searchPlayerAngleY(i_this);
i_this->mState += 1;
// Fall-through
case 4:
case 4: {
if (i_this->mCountDownTimers[2] == 1) {
i_this->mNeedleCyl.OnAtSPrmBit(AT_SPRM_SET);
i_this->mNeedleCyl.OnAtHitBit();
@@ -555,6 +555,7 @@ static void action_dousa(am_class* i_this) {
i_this->mState += 1;
}
break;
}
case 5:
i_this->speedF = 30.0f;
i_this->gravity = -11.0f;
@@ -655,7 +656,7 @@ 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 0x14:
case 0x14: {
anm_init(i_this, AM_BCK_CLOSE_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1);
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
@@ -669,9 +670,10 @@ static void action_modoru_move(am_class* i_this) {
i_this->mTargetAngleY = cM_atan2s(xDistToSpawn, zDistToSpawn);
i_this->mState += 1;
break;
case 0x15:
xDistToSpawn = i_this->mSpawnPos.x - i_this->current.pos.x;
zDistToSpawn = i_this->mSpawnPos.z - i_this->current.pos.z;
}
case 0x15: {
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()) {
i_this->mSmokeCbs[0].end();
dComIfGp_particle_setToon(
@@ -697,7 +699,8 @@ static void action_modoru_move(am_class* i_this) {
i_this->mState += 1;
}
break;
case 0x16:
}
case 0x16: {
s16 angleDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->mTargetAngleY);
if (angleDiff < 0x100) {
i_this->mNeedleCyl.OffAtSetBit();
@@ -708,13 +711,14 @@ static void action_modoru_move(am_class* i_this) {
}
break;
}
}
}
/* 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 0x1E:
case 0x1E: {
i_this->speedF = 20.0f;
s16 angleToPlayer = fopAcM_searchPlayerAngleY(i_this);
i_this->current.angle.y = angleToPlayer + 0x8000;
@@ -731,7 +735,9 @@ static void action_handou_move(am_class* i_this) {
anm_init(i_this, AM_BCK_CLOSE, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
}
i_this->mState += 1;
case 0x1F:
// Fall-through
}
case 0x1F: {
cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f);
if (i_this->speedF < 0.1f) {
i_this->speedF = 0.0f;
@@ -740,6 +746,8 @@ static void action_handou_move(am_class* i_this) {
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
}
break;
}
}
}