mirror of
https://github.com/zeldaret/st
synced 2026-07-03 04:53:00 -04:00
66eb66f081
* feat: begin decompiling ActorItemBoomerang * feat: decompile functions * refactor: rename function and use ActorState * feat: match vfunc * feat: magic stuff on addresses to match .data * feat: more black magic * feat: improvements * feat: match .data * feat: unmatch .data 😭 * feat: match stuff * refactor: move shotarrows' class used in boomerang * feat: fix mangled names * feat: weird magic * fix: build issues * fix: build issue for jp version * fix: back to +0.2% :yeah: * feat: improvements before changing laptop * feat: continue decompiling * fix: build issues * feat: improvements * feat: solve build on eur * fix: build issue * fix: better match * fix: match back ActorShotArrow data * feat: increase .text matching * fix: propagate changes to ActorShotArrow * feat: matching func_ov031_020e5034 * fix: logical errors * fix: replace whiles with fors * style: use uppercased hex value Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * style: do not use fx32 for global timer Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * style: add parameters name in prototypes Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * style: use bool instead of unk32 for external function Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * style: use DEG2ANG * refactor: use ActorRef instead of u16 * style: use boring array access instead of chad pointer manipulation * fix: use bool as return type for ActorItemBoomerang::vfunc_2C * feat: remove old non-matching comments * style: explicit null check * revert: change vfunc_2C back to void signature and change 01fff5d0 function's signature to bool --------- Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com>
110 lines
2.9 KiB
C++
110 lines
2.9 KiB
C++
#pragma once
|
|
|
|
#include "Actor/Actor.hpp"
|
|
#include "Actor/ActorProfile.hpp"
|
|
#include "Render/ModelRender.hpp"
|
|
#include "Unknown/UnkStruct_ov031_Items.hpp"
|
|
#include "global.h"
|
|
#include "types.h"
|
|
|
|
enum ActorItemBoomerangState_ {
|
|
ActorItemBoomerangState_0,
|
|
ActorItemBoomerangState_1,
|
|
ActorItemBoomerangState_MAX
|
|
};
|
|
|
|
class ActorItemBoomerang;
|
|
|
|
class ActorItemBoomerang_Unknown { // inherits from UnkStruct_PlayerGet_ec ?
|
|
public:
|
|
/* 00 */ unk32 mUnk_00;
|
|
/* 04 */ VecFx32 mUnk_04;
|
|
/* 10 */
|
|
|
|
void func_ov031_020e45fc();
|
|
void func_ov031_020e5704();
|
|
};
|
|
|
|
class ActorItemBoomerang_11C : public UnkStruct_ov031_Items_00 {
|
|
public:
|
|
/* 00 (vtable) */
|
|
/* 04 */ STRUCT_PAD(0x04, 0x08);
|
|
/* 08 */ ActorItemBoomerang *mUnk_08;
|
|
/* 0C */
|
|
|
|
ActorItemBoomerang_11C(ActorItemBoomerang *param1);
|
|
|
|
/* 00 */ virtual ~ActorItemBoomerang_11C() override;
|
|
/* 08 */ virtual bool vfunc_08(const UnkStruct_ov031_020f3310 *param1) override;
|
|
/* 0C */ virtual bool vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2) override;
|
|
};
|
|
|
|
class ActorItemBoomerang_A0 : public UnkStruct_ov031_Items_01 {
|
|
public:
|
|
/* 00 (vtable) */
|
|
/* 04 */
|
|
|
|
/* 10 */ virtual void vfunc_10(Actor *actor) override;
|
|
};
|
|
|
|
class ActorItemBoomerang_CC : public UnkStruct_ov031_Items_01 {
|
|
public:
|
|
/* 00 (vtable) */
|
|
/* 2C */ unk32 mUnk_2C;
|
|
/* 30 */ ActorItemBoomerang_Unknown mUnk_30;
|
|
/* 40 */
|
|
|
|
ActorItemBoomerang_CC() :
|
|
mUnk_2C(0x0) {}
|
|
|
|
/* 0C */ virtual bool vfunc_0C(Actor *actor, VecFx32 *param2) override;
|
|
/* 10 */ virtual void vfunc_10(Actor *actor) override;
|
|
};
|
|
|
|
class ActorItemBoomerang : public Actor {
|
|
public:
|
|
/* 000 (base) */
|
|
/* 094 */ UnkSystem6_Derived2 mUnk_94;
|
|
/* 09C */ bool mUnk_9C;
|
|
/* 09D */ STRUCT_PAD(0x9D, 0xA0);
|
|
/* 0A0 */ ActorItemBoomerang_A0 mUnk_A0;
|
|
/* 0CC */ ActorItemBoomerang_CC mUnk_CC;
|
|
/* 10C */ VecFx32 mUnk_10C;
|
|
/* 118 */ unk32 mUnk_118;
|
|
/* 11C */ ActorItemBoomerang_11C mUnk_11C;
|
|
/* 128 */ u32 mUnk_128;
|
|
/* 12C */ UnkStruct_PlayerGet_ec mUnk_12C[0x3];
|
|
/* 138 */ u16 mUnk_138; // timer ?
|
|
/* 13A */ u16 mUnk_13A;
|
|
/* 13C */ u16 mUnk_13C;
|
|
/* 13E */ STRUCT_PAD(0x13E, 0x140);
|
|
/* 140 */ UnkStruct_ov031_Items_02 mUnk_140;
|
|
/* 14C */ STRUCT_PAD(0x14C, 0x188);
|
|
/* 188 */
|
|
|
|
ActorItemBoomerang();
|
|
|
|
/* 18 */ virtual bool vfunc_18(unk32 param1) override;
|
|
/* 20 */ virtual void vfunc_20() override;
|
|
/* 2C */ virtual void vfunc_2C(unk32 param1) override;
|
|
/* 4C */ virtual ~ActorItemBoomerang() override;
|
|
|
|
void SetState(ActorState state);
|
|
void func_ov031_020e49b0(unk32 param1);
|
|
void func_ov031_020e5034(unk32 param1);
|
|
void func_ov031_020e5220();
|
|
void func_ov031_020e52a0();
|
|
};
|
|
|
|
class ActorProfileItemBoomerang : public ActorProfile {
|
|
public:
|
|
/* 00 (base) */
|
|
|
|
ActorProfileItemBoomerang();
|
|
~ActorProfileItemBoomerang();
|
|
|
|
/* 0C */ virtual Actor *Create();
|
|
|
|
static ActorProfileItemBoomerang *GetProfile();
|
|
};
|