diff --git a/data/file_list.yml b/data/file_list.yml index fa6390cb29..72465a6f68 100644 --- a/data/file_list.yml +++ b/data/file_list.yml @@ -113306,23 +113306,23 @@ Player/EquipmentInfo.o: label: - _ZN13EquipmentInfoC1EPKN2al9LiveActorE - _ZN13EquipmentInfoC2EPKN2al9LiveActorE - status: NotDecompiled + status: Matching - offset: 0x3f967c size: 16 label: _ZN13EquipmentInfo12onNoCapThrowEv - status: NotDecompiled + status: Matching - offset: 0x3f968c size: 20 label: _ZN13EquipmentInfo11onForceDashEif - status: NotDecompiled + status: Matching - offset: 0x3f96a0 size: 12 label: _ZNK13EquipmentInfo12isNoCapThrowEv - status: NotDecompiled + status: Matching - offset: 0x3f96ac size: 12 label: _ZNK13EquipmentInfo11isForceDashEv - status: NotDecompiled + status: Matching Player/HackCap.o: '.text': - offset: 0x3f96b8 diff --git a/src/Player/EquipmentInfo.cpp b/src/Player/EquipmentInfo.cpp new file mode 100644 index 0000000000..d3663f55fa --- /dev/null +++ b/src/Player/EquipmentInfo.cpp @@ -0,0 +1,26 @@ +#include "Player/EquipmentInfo.h" + +EquipmentInfo::EquipmentInfo(const al::LiveActor* actor) { + mActor = actor; + _8 = 0; + _c = 0; + _10 = 0.0f; +} + +void EquipmentInfo::onNoCapThrow() { + _8 |= 1; +} + +void EquipmentInfo::onForceDash(s32 param_1, f32 param_2) { + _8 |= 2; + _c = param_1; + _10 = param_2; +} + +bool EquipmentInfo::isNoCapThrow() const { + return (_8 & 1) != 0; +} + +bool EquipmentInfo::isForceDash() const { + return (_8 & 2) != 0; +} diff --git a/src/Player/EquipmentInfo.h b/src/Player/EquipmentInfo.h new file mode 100644 index 0000000000..328def5cf6 --- /dev/null +++ b/src/Player/EquipmentInfo.h @@ -0,0 +1,25 @@ +#pragma once + +#include + +namespace al { +class LiveActor; +} // namespace al + +class EquipmentInfo { +public: + EquipmentInfo(const al::LiveActor* actor); + + void onNoCapThrow(); + void onForceDash(s32, f32); + bool isNoCapThrow() const; + bool isForceDash() const; + +private: + const al::LiveActor* mActor; + u32 _8; + s32 _c; + f32 _10; +}; + +static_assert(sizeof(EquipmentInfo) == 0x18);