small documentation

This commit is contained in:
Yanis002
2025-02-08 02:12:17 +01:00
parent 0c6f9f3a44
commit a19141c1f0
4 changed files with 57 additions and 48 deletions
+23 -13
View File
@@ -4,19 +4,27 @@
#include "Player/EquipItem.hpp"
class LinkStateItem;
// how long players should wait until the hammer is charged (aka bigger and more powerful)
#define HAMMER_CHARGE_TIMER 40
//! TODO: change "state" to "flags"? see `vfunc_2c`
typedef enum EquipHammerState {
/* 0x00000 */ EQUIP_HAMMER_STATE_IDLE = (0 << 16),
/* 0x10000 */ EQUIP_HAMMER_STATE_CHARGING = (1 << 16),
/* 0x20000 */ EQUIP_HAMMER_STATE_CHARGED = (2 << 16),
} EquipHammerState;
class EquipHammer : public EquipItem {
private:
/* 00 (base) */
/* 09 */ unk8 mUnk_09[3];
/* 0c */ Vec3p mUnk_0c;
/* 18 */ s32 mUnk_18;
/* 1c */ u8 mUnk_1c;
/* 1d */ u8 mUnk_1d;
/* 1e */ unk8 mUnk_1e[2];
/* 20 */ unk32 mUnk_20;
/* 24 */ unk32 mUnk_24;
/* 0c */ Vec3p mUnk_0c; // hammer's position when it hits a surface? not updated if the hammer can't touch a surface
/* 18 */ EquipHammerState mState;
/* 1c */ bool mIsHeld; // holding the input from the touchscreen
/* 1d */ bool mIsReleased; // released the input from the touchscreen
/* 1e */ unk8 mUnk_1e[2]; // unused?
/* 20 */ s32 mChargeTimer; // charging timer to make it bigger, set to 40 frames by default
/* 24 */ unk32 mUnk_24; // timer that prevents the charge?
/* 28 */ unk32 mUnk_28;
/* 2c */
@@ -41,16 +49,18 @@ public:
bool func_ov059_02198ed4();
void func_ov059_02198f10(Vec3p *vec, unk32 param2, s32 param3);
void func_ov059_02198fa8(unk32 param1);
bool func_ov059_02198fe0();
bool IsHammerCharged();
inline s32 GetUnk_18(void) {
return mUnk_18;
inline s32 GetState(void) {
return mState;
}
inline unk32 GetUnk_20(void) {
return mUnk_20;
inline unk32 GetChargeTimer(void) {
return mChargeTimer;
}
};
class LinkStateItem;
extern LinkStateItem *GetLinkStateItem();
extern EquipHammer *GetEquipHammer();