diff options
| author | Yanis <35189056+Yanis002@users.noreply.github.com> | 2025-07-16 15:33:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 15:33:58 +0200 |
| commit | 7a01af4783ca2904590ed0ba6e61261d98706f47 (patch) | |
| tree | 5491fa87030e5c32a11e536607a14dca459bf8dc /src/00_Core/Player | |
| parent | ce9f96d932c0028262821ff3fc39a4b05c977285 (diff) | |
update .clang-format rules (#120)
Diffstat (limited to 'src/00_Core/Player')
| -rw-r--r-- | src/00_Core/Player/LinkStateItem.cpp | 44 | ||||
| -rw-r--r-- | src/00_Core/Player/LinkStateMove.cpp | 6 | ||||
| -rw-r--r-- | src/00_Core/Player/PlayerControl.cpp | 38 |
3 files changed, 56 insertions, 32 deletions
diff --git a/src/00_Core/Player/LinkStateItem.cpp b/src/00_Core/Player/LinkStateItem.cpp index 9e42961f..ab629db6 100644 --- a/src/00_Core/Player/LinkStateItem.cpp +++ b/src/00_Core/Player/LinkStateItem.cpp @@ -19,8 +19,10 @@ ARM LinkStateId LinkStateItem::GetId() { ARM s32 LinkStateItem::IsHammerEquipped() { switch (this->mEquipId) { - case ItemFlag_Hammer: return 0; - default: return -1; + case ItemFlag_Hammer: + return 0; + default: + return -1; } } @@ -40,20 +42,32 @@ ARM void LinkStateItem::OnStateLeave(s32 param1) { } data_027e1098->func_ov014_0211fd04(); break; - case ItemFlag_OshusSword: break; - case ItemFlag_WoodenShield: break; - case ItemFlag_Boomerang: break; - case ItemFlag_BombBag: this->StopUsingBomb(param1); break; - case ItemFlag_Bow: break; - case ItemFlag_GrapplingHook: this->StopUsingRope(); break; - case ItemFlag_Hammer: this->StopUsingHammer(); break; + case ItemFlag_OshusSword: + break; + case ItemFlag_WoodenShield: + break; + case ItemFlag_Boomerang: + break; + case ItemFlag_BombBag: + this->StopUsingBomb(param1); + break; + case ItemFlag_Bow: + break; + case ItemFlag_GrapplingHook: + this->StopUsingRope(); + break; + case ItemFlag_Hammer: + this->StopUsingHammer(); + break; case ItemFlag_PotionA: case ItemFlag_PotionB: UnkStruct_027e103c *pData_027e103c = data_027e103c; pData_027e103c->mUnk_2a = 0; pData_027e103c->func_ov000_020cf9dc(0, 0); break; - case ItemFlag_Shovel: this->StopUsingScoop(); break; + case ItemFlag_Shovel: + this->StopUsingScoop(); + break; } if (this->mEquipId != ItemFlag_None) { @@ -63,10 +77,14 @@ ARM void LinkStateItem::OnStateLeave(s32 param1) { switch (this->mEquipId) { case ItemFlag_None: - case ItemFlag_OshusSword: break; - case ItemFlag_WoodenShield: break; + case ItemFlag_OshusSword: + break; + case ItemFlag_WoodenShield: + break; case ItemFlag_PotionA: - case ItemFlag_PotionB: this->EquipItem_vfunc_28(); break; + case ItemFlag_PotionB: + this->EquipItem_vfunc_28(); + break; default: this->EquipItem_vfunc_28(); if (param1 != 4 && param1 != 2) { diff --git a/src/00_Core/Player/LinkStateMove.cpp b/src/00_Core/Player/LinkStateMove.cpp index 5509be66..a0980773 100644 --- a/src/00_Core/Player/LinkStateMove.cpp +++ b/src/00_Core/Player/LinkStateMove.cpp @@ -51,8 +51,10 @@ ARM bool LinkStateMove::vfunc_24(s32 param1) { return LinkStateBase::vfunc_24(param1); } switch (param1) { - case 2: return true; - default: return false; + case 2: + return true; + default: + return false; } } diff --git a/src/00_Core/Player/PlayerControl.cpp b/src/00_Core/Player/PlayerControl.cpp index 10b41064..5476834e 100644 --- a/src/00_Core/Player/PlayerControl.cpp +++ b/src/00_Core/Player/PlayerControl.cpp @@ -236,8 +236,10 @@ ARM bool PlayerControl::func_ov00_020af4a4() { switch (data_027e077c.GetUnk0()) { case 0x1a: case 0x1b: - case 0x1c: return true; - default: return false; + case 0x1c: + return true; + default: + return false; } } return false; @@ -419,8 +421,12 @@ ARM void PlayerControl::func_ov00_020afb6c() { s32 iVar8 = 0; u32 uVar9 = 3; switch (followActor->mUnk_12c) { - case 0: mFollowRef.Reset(); break; - case 1: iVar8 = 1; break; + case 0: + mFollowRef.Reset(); + break; + case 1: + iVar8 = 1; + break; case 5: iVar8 = 2; uVar9 = 1; @@ -518,12 +524,15 @@ ARM bool PlayerControl::func_ov00_020afeec(unk32 param1, bool param2) { case 1: case 2: case 7: - case 13: return true; + case 13: + return true; case 10: - case 11: return param2; + case 11: + return param2; - default: return !param2; + default: + return !param2; } } @@ -749,14 +758,12 @@ ARM bool PlayerControl::func_ov00_020b0778(Vec3p *param1, u32 angle, unk32 *para temp_r5 = mTouchY - sp4; if (this->CheckTouchedNow(1) != 0) { if (((var_r6 - 0x18) <= temp_r4) && (temp_r4 <= (var_r6 + 0x18)) && ((var_r7 - 0x18) <= temp_r5) && - (temp_r5 <= (var_r7 + 0x18))) - { + (temp_r5 <= (var_r7 + 0x18))) { *param3 = FLOAT_TO_Q20(1.0); return true; } if (((-0x18 - var_r6) <= temp_r4) && (temp_r4 <= (0x18 - var_r6)) && ((-0x18 - var_r7) <= temp_r5) && - (temp_r5 <= (0x18 - var_r7))) - { + (temp_r5 <= (0x18 - var_r7))) { *param3 = -FLOAT_TO_Q20(1.0); return true; } @@ -783,14 +790,12 @@ ARM bool PlayerControl::func_ov00_020b0778(Vec3p *param1, u32 angle, unk32 *para } if (this->CheckTouching(1) != 0) { if (((var_r6 < 0) && (temp_r4 < (var_r6 + 0x18))) || ((var_r6 > 0) && (temp_r4 > (var_r6 - 0x18))) || - ((var_r7 < 0) && (temp_r5 < (var_r7 + 0x18))) || ((var_r7 > 0) && (temp_r5 > (var_r7 - 0x18)))) - { + ((var_r7 < 0) && (temp_r5 < (var_r7 + 0x18))) || ((var_r7 > 0) && (temp_r5 > (var_r7 - 0x18)))) { *param3 = FLOAT_TO_Q20(1.0); return true; } if (((var_r6 > 0) && (temp_r4 < (0x18 - var_r6))) || ((var_r6 < 0) && (temp_r4 > (-0x18 - var_r6))) || - ((var_r7 > 0) && (temp_r5 < (0x18 - var_r7))) || ((var_r7 < 0) && (temp_r5 > (-0x18 - var_r7)))) - { + ((var_r7 > 0) && (temp_r5 < (0x18 - var_r7))) || ((var_r7 < 0) && (temp_r5 > (-0x18 - var_r7)))) { *param3 = -FLOAT_TO_Q20(1.0); return true; } @@ -852,8 +857,7 @@ ARM bool PlayerControl::func_ov00_020b0b0c(s16 *pAngle, ItemFlag *pEquipId, unk3 } if ((this->CheckUntouchedNow(1) && mTouchDuration >= 0 && mTouchDuration < 21) || - (this->CheckTouchFast(1) && mTouchSlowDuration > 21)) - { + (this->CheckTouchFast(1) && mTouchSlowDuration > 21)) { s32 dy = INT_TO_Q20(mTouchLastY - mTouchFastY); s32 dx = INT_TO_Q20(mTouchLastX - mTouchFastX); Vec3p local_20; |
