diff options
| author | Aetias <aetias@outlook.com> | 2025-05-10 20:42:30 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-05-10 20:42:30 +0200 |
| commit | 2eb989a4cf55fcf4de543f1ca89bfd391c664da5 (patch) | |
| tree | 74639030f35efc4ccbd8e8e6d0b30b4fdc3548f3 /src | |
| parent | b4cd6ce4d7e247af857d262f983c4f69fff03bef (diff) | |
Match `LinkStateMove`
Diffstat (limited to 'src')
| -rw-r--r-- | src/00_Core/Player/LinkStateMove.cpp | 77 | ||||
| -rw-r--r-- | src/Main/Debug/DebugHierarchyBase.cpp | 5 |
2 files changed, 72 insertions, 10 deletions
diff --git a/src/00_Core/Player/LinkStateMove.cpp b/src/00_Core/Player/LinkStateMove.cpp index 918a92fe..889b3743 100644 --- a/src/00_Core/Player/LinkStateMove.cpp +++ b/src/00_Core/Player/LinkStateMove.cpp @@ -1,10 +1,71 @@ #include "Player/LinkStateMove.hpp" -void LinkStateMove::vfunc_00() {} -LinkStateId LinkStateMove::GetId() {} -void LinkStateMove::CreateDebugHierarchy() {} -void LinkStateMove::OnStateEnter() {} -void LinkStateMove::OnStateLeave(s32 param1) {} -bool LinkStateMove::vfunc_24(s32 param1) {} -bool LinkStateMove::func_ov00_020a8f2c() {} -bool LinkStateMove::func_ov00_020a8f4c() {} +unk32 data_ov000_020e56f0 = 0x800; + +THUMB void LinkStateMove::vfunc_00() {} + +ARM LinkStateId LinkStateMove::GetId() { + return LinkStateId_Move; +} + +THUMB void LinkStateMove::CreateDebugHierarchy() { + unk32 id = 'LMOV'; + // Breath volume decay rate "息吹きボリューム低下率" + const char *description = "\x91\xa7\x90\x81\x82\xab\x83{\x83\x8a\x83\x85\x81[\x83\x80\x92\xe1\x89\xba\x97\xa6"; + + DebugHierarchy *debugHierarchy = this->GetDebugHierarchy0(); + debugHierarchy->vfunc_3c(id, &data_ov000_020e56f0); + + debugHierarchy->GetChildNode(1, description, id, &data_ov000_020e56f0, 8, 0, 0x1000, 0); +} + +extern u32 data_ov000_020eec9c; +extern "C" void func_ov000_020d77e4(void *param1, s32 param2); + +ARM void LinkStateMove::OnStateEnter() { + this->mUnk_0c = 0; + this->mUnk_10 = 0; + this->mUnk_12 = 0; + if (this->mUnk_14 == 0) { + return; + } + + EquipItem *sword = this->GetEquipItem(ItemFlag_OshusSword); + sword->UpdateInUse(1); + EquipItem *shield = this->GetEquipItem(ItemFlag_WoodenShield); + shield->UpdateInUse(1); + + PlayerBase::GetEquipSword()->func_ov000_020c06b0(-1); + func_ov000_020d77e4(&data_ov000_020eec9c, 0xD); +} + +ARM void LinkStateMove::OnStateLeave(s32 param1) { + LinkStateBase::OnStateLeave(param1); + this->mUnk_14 = 0; + this->mUnk_15 = 0; + this->mUnk_16 = 0; +} + +ARM bool LinkStateMove::vfunc_24(s32 param1) { + if (this->GetHealth() > 0) { + return LinkStateBase::vfunc_24(param1); + } + switch (param1) { + case 2: return true; + default: return false; + } +} + +ARM bool LinkStateMove::func_ov00_020a8f2c() { + static unk32 data_ov000_020e56f4 = 0x100; + return this->mUnk_0c > data_ov000_020e56f4; +} + +ARM bool LinkStateMove::func_ov00_020a8f4c() { + if (this->mUnk_15) { + return false; + } + this->mUnk_15 = true; + this->mUnk_16 = false; + return true; +} diff --git a/src/Main/Debug/DebugHierarchyBase.cpp b/src/Main/Debug/DebugHierarchyBase.cpp index 75b2f444..e6bf24c1 100644 --- a/src/Main/Debug/DebugHierarchyBase.cpp +++ b/src/Main/Debug/DebugHierarchyBase.cpp @@ -3,7 +3,8 @@ DebugHierarchyBase::DebugHierarchyBase() {} DebugHierarchyBase::~DebugHierarchyBase() {} DebugHierarchyNode *DebugHierarchyBase::FindNode(u32 id) {} -bool DebugHierarchyBase::GetChildNode(unk32 param1, const char *description, u32 parent, s32 *param4) {} +bool DebugHierarchyBase::GetChildNode(unk32 param1, const char *description, u32 parent, s32 *param4, unk32 param5, + unk32 param6, unk32 param7, unk32 param8) {} void DebugHierarchyBase::vfunc_08() {} void DebugHierarchyBase::vfunc_0c() {} void DebugHierarchyBase::vfunc_10() {} @@ -16,4 +17,4 @@ void DebugHierarchyBase::vfunc_28() {} void DebugHierarchyBase::vfunc_2c() {} void DebugHierarchyBase::vfunc_30() {} void DebugHierarchyBase::vfunc_38() {} -void DebugHierarchyBase::vfunc_3c() {} +void DebugHierarchyBase::vfunc_3c(unk32 param1, void *param2) {} |
