mirror of
https://github.com/zeldaret/ph
synced 2026-08-13 04:00:03 -04:00
started EquipHammer.cpp
This commit is contained in:
@@ -192,7 +192,7 @@ unk8 MapManager::func_ov00_0208527c() {}
|
||||
unk8 MapManager::func_ov00_020853fc() {}
|
||||
unk8 MapManager::func_ov00_02085594() {}
|
||||
void MapManager::func_ov00_0208583c(unk32 param_1, Vec3p *param_2, unk32 param_3) {}
|
||||
unk8 MapManager::func_ov00_020858b0() {}
|
||||
unk8 MapManager::func_ov00_020858b0(MapManager *param_1, Vec3p *param_2, s32 param_3) {}
|
||||
s32 MapManager::func_ov00_02085a34(unk32 param_2, unk32 param_3) {}
|
||||
unk8 MapManager::func_ov00_02085c60(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5) {}
|
||||
unk8 MapManager::func_ov00_02086044(unk32 param_2, unk32 param_3, unk32 param_4) {}
|
||||
|
||||
@@ -44,7 +44,7 @@ bool LinkStateBase::func_ov00_020a8774(Vec3p *param1, s32 angle) {}
|
||||
void LinkStateBase::func_ov00_020a8844(Vec3p *param1, bool param2, bool param3) {}
|
||||
void LinkStateBase::func_ov00_020a8954(bool param1, unk32 *param2) {}
|
||||
void LinkStateBase::func_ov00_020a8994() {}
|
||||
void LinkStateBase::func_ov00_020a89bc(unk32 param1, unk32 param2) {}
|
||||
void LinkStateBase::func_ov00_020a89bc(unk32* param1, unk32 param2) {}
|
||||
void LinkStateBase::func_ov00_020a8a08(unk32 param1) {}
|
||||
void LinkStateBase::func_ov00_020a8a4c(unk32 param1, unk32 param2) {}
|
||||
void LinkStateBase::func_ov00_020a8a90(unk32 param1) {}
|
||||
|
||||
@@ -1,21 +1,133 @@
|
||||
#include "Player/EquipHammer.hpp"
|
||||
#include "Player/LinkStateItem.hpp"
|
||||
#include "Map/MapManager.hpp"
|
||||
#include "Item/ItemManager.hpp"
|
||||
|
||||
bool EquipHammer::IsUsable(unk32 param1) const {}
|
||||
LinkStateItem *GetLinkStateItem() {}
|
||||
void EquipHammer::vfunc_18() {}
|
||||
void EquipHammer::vfunc_1c() {}
|
||||
void EquipHammer::vfunc_30() {}
|
||||
void EquipHammer::func_ov059_02198e90() {}
|
||||
bool EquipHammer::func_ov059_02198ebc() {}
|
||||
bool EquipHammer::func_ov059_02198ed4() {}
|
||||
void EquipHammer::func_ov059_02198f10(Vec3p *vec, unk32 param2, s32 param3) {}
|
||||
void EquipHammer::func_ov059_02198fa8(unk32 param1) {}
|
||||
void EquipHammer::vfunc_38(unk32 param1) {}
|
||||
u32 EquipHammer::vfunc_2c() {}
|
||||
bool EquipHammer::func_ov059_02198fe0() {}
|
||||
void LinkStateItem::func_ov059_02198ffc() {}
|
||||
void LinkStateItem::func_ov059_0219907c() {}
|
||||
void LinkStateItem::func_ov059_021990a4() {}
|
||||
EquipHammer *GetEquipHammer() {}
|
||||
void LinkStateItem::StopUsingHammer() {}
|
||||
extern "C" void ApproachAngle_thunk(s16* src, s16* dst, u32 param3);
|
||||
extern "C" void func_ov000_020b853c(void);
|
||||
extern unk32 data_ov059_0219b180;
|
||||
|
||||
ARM bool EquipHammer::IsUsable(unk32 param1) const {}
|
||||
|
||||
ARM LinkStateItem *GetLinkStateItem() {
|
||||
return (LinkStateItem*)GetLinkState(1);
|
||||
}
|
||||
|
||||
ARM void EquipHammer::vfunc_18() {
|
||||
this->mUnk_1c = 0;
|
||||
this->mUnk_1d = 0;
|
||||
this->mUnk_18 = 0;
|
||||
this->mUnk_28 = 0x1000;
|
||||
}
|
||||
|
||||
ARM void EquipHammer::vfunc_1c() {
|
||||
this->mUnk_1c = 0;
|
||||
this->mUnk_1d = 0;
|
||||
this->mUnk_18 = 0;
|
||||
}
|
||||
|
||||
ARM void EquipHammer::vfunc_30() {
|
||||
if (this->mUnk_24 > 0) {
|
||||
this->mUnk_24--;
|
||||
|
||||
if (this->mUnk_24 <= 1) {
|
||||
this->mUnk_18 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ARM void EquipHammer::func_ov059_02198e90() {
|
||||
if (this->mUnk_24 <= 0 && this->mUnk_1c == 0) {
|
||||
this->mUnk_1c = 1;
|
||||
this->mUnk_20 = 0x28;
|
||||
}
|
||||
}
|
||||
|
||||
ARM bool EquipHammer::func_ov059_02198ebc() {
|
||||
if (this->mUnk_24 <= 0) {
|
||||
this->mUnk_1d = 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ARM bool EquipHammer::func_ov059_02198ed4() {
|
||||
if (this->mUnk_20 > 0) {
|
||||
this->mUnk_18 = 0x10000;
|
||||
this->mUnk_20--;
|
||||
return this->mUnk_20 == 0;
|
||||
}
|
||||
|
||||
this->mUnk_18 = 0x20000;
|
||||
return false;
|
||||
}
|
||||
|
||||
ARM void EquipHammer::func_ov059_02198f10(Vec3p *vec, unk32 param2, s32 param3) {
|
||||
Vec3p local_18;
|
||||
|
||||
this->mUnk_0c = *vec;
|
||||
|
||||
if (this->mUnk_1d != 0) {
|
||||
this->mUnk_1d = 0;
|
||||
|
||||
if (param3 == 0) {
|
||||
local_18 = this->mUnk_0c;
|
||||
MapManager::func_ov00_020858b0(gMapManager, &local_18, this->mUnk_20 == 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
this->mUnk_1c = 0;
|
||||
this->mUnk_24 = 4;
|
||||
this->mUnk_28 = param2;
|
||||
}
|
||||
|
||||
ARM void EquipHammer::func_ov059_02198fa8(unk32 param1) {
|
||||
this->mUnk_1d = 0;
|
||||
this->mUnk_1c = 0;
|
||||
this->mUnk_18 = 0;
|
||||
this->mUnk_24 = 4;
|
||||
this->mUnk_28 = param1;
|
||||
}
|
||||
|
||||
ARM void EquipHammer::vfunc_38(unk32 param1) {
|
||||
}
|
||||
|
||||
ARM u32 EquipHammer::vfunc_2c() {
|
||||
//! TODO: fake?
|
||||
return (this->mUnk_18 + (s32)((u32)(this->mUnk_18 >> 0xB) >> 0x14)) >> 0xC;
|
||||
}
|
||||
|
||||
ARM bool EquipHammer::func_ov059_02198fe0() {
|
||||
return this->mUnk_18 == 0x20000 && this->mUnk_20 == 0;
|
||||
}
|
||||
|
||||
// non-matching
|
||||
ARM void LinkStateItem::func_ov059_02198ffc() {
|
||||
s16 dest;
|
||||
Vec3p local_20;
|
||||
Vec3p local_14;
|
||||
|
||||
local_14 = this->mUnk_38;
|
||||
local_20 = *this->GetPlayerPos();
|
||||
|
||||
Vec3p_Sub(&local_14, &local_20, &local_14);
|
||||
dest = Atan2(local_14.x, local_14.z);
|
||||
ApproachAngle_thunk(this->GetPlayerAngle(), &dest, 0x2000);
|
||||
}
|
||||
|
||||
ARM void LinkStateItem::func_ov059_0219907c() {
|
||||
this->func_ov00_020a89bc(&data_ov059_0219b180, 1);
|
||||
this->mUnk_25[2] = 0;
|
||||
this->mUnk_25[3] = 0;
|
||||
}
|
||||
|
||||
ARM void LinkStateItem::func_ov059_021990a4() {}
|
||||
|
||||
ARM EquipHammer *GetEquipHammer() {
|
||||
return (EquipHammer*)ItemManager::GetEquipItemUnchecked(ItemFlag_Hammer);
|
||||
}
|
||||
|
||||
ARM void LinkStateItem::StopUsingHammer() {
|
||||
gItemManager->GetFairy(FairyId_Courage);
|
||||
func_ov000_020b853c();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user