Decompiling actor for boomerang (#93)

* 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>
This commit is contained in:
Alessevan
2026-07-02 20:51:46 +02:00
committed by GitHub
parent 58235d4f98
commit 66eb66f081
26 changed files with 762 additions and 285 deletions
+5 -1
View File
@@ -909,7 +909,11 @@ extern "C" void func_ov000_02072fd0(UnkStackStruct1 *);
struct UnkSystem7_UnkStruct_00 {
/* 00 */ STRUCT_PAD(0x00, 0x24);
/* 24 */ unk32 mUnk_24;
/* 28 */ STRUCT_PAD(0x28, 0xA4);
/* 28 */ unk32 mUnk_28;
/* 2C */ unk32 mUnk_2C;
/* 30 */ unk32 mUnk_30;
/* 34 */ STRUCT_PAD(0x34, 0xA0);
/* A0 */ unk32 mUnk_A0;
/* A4 */ unk16 mUnk_A4;
void func_ov000_02052c48(VecFx32 *param1, VecFx32 *param2);
+1 -1
View File
@@ -17,7 +17,7 @@ public:
// overlay 0
void func_ov000_0207da40();
void func_ov000_0207e58c(ActorRef param1, unk32 param2, u8 param3, ActorShotArrow_194 *param4);
void func_ov000_0207e58c(ActorRef param1, unk32 param2, u8 param3, UnkStruct_ov031_Items_01 *param4);
// overlay 1
void func_ov001_020be394();
+10 -2
View File
@@ -81,6 +81,12 @@ public:
/* 20 */
};
class UnkStruct_ov031_020e54d4 {
public:
/* 00 */ STRUCT_PAD(0x00, 0x08);
/* 08 */ u32 mUnk_08;
};
class UnkStruct_027e0ce0_38_Base {
public:
/* 00 (vtable) */
@@ -89,7 +95,7 @@ public:
// data_ov000_020b2838
/* 00 */ virtual ~UnkStruct_027e0ce0_38_Base();
/* 08 */ virtual bool vfunc_08(const UnkStruct_ov031_020f3310 *param1);
/* 0C */ virtual bool vfunc_0C();
/* 0C */ virtual bool vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2);
/* 10 */ virtual void vfunc_10();
/* 14 */
};
@@ -439,10 +445,12 @@ public:
void func_ov000_0208bbd4(unk32 param1, VecFx32 *param2, u16 param3);
void func_ov000_0208bbd4(unk32 param1, VecFx32 *param2, void *param3);
void func_ov000_0208bc1c(unk32 param1, unk32 param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6);
bool func_ov000_0208bc1c(unk32 param1, unk32 param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6);
void func_ov000_0208bc9c(unk32 param1, unk32 param2);
void func_ov000_0208bd30(bool param1, unk32 param2, unk32 param3, unk32 param4);
G3d_Model *func_ov000_0208ed30(unk32 param1, unk32 param2, char *param3);
static UnkStruct_027e0ce0_34 *func_ov000_0205c904();
// overlay 1
+2
View File
@@ -13,6 +13,8 @@ public:
void func_ov000_0209ff24(unk32 param1, VecFx32 *param2, VecFx16 *param3, unk32 param4);
void func_ov000_0209ff8c(UnkStruct_PlayerGet_ec *param1, unk32 param2, VecFx32 *param3, unk32 param4);
void func_ov000_020a0000(UnkStruct_PlayerGet_ec *param1, void *param2, unk32 *param3, VecFx32 *param4, unk32 param5);
void func_ov000_020a00d4(UnkStruct_PlayerGet_ec *param1, unk32 param2, unk32 param3, unk32 param4, VecFx32 *param5,
unk32 param6);
void func_ov000_020a0110(UnkStruct_PlayerGet_ec *param1);
void func_ov000_020a0220(void *param1, void *param2);
void func_ov001_020bf028();
+15
View File
@@ -0,0 +1,15 @@
#pragma once
#include "Actor/ActorRef.hpp"
#include "math.hpp"
#include "types.h"
class UnkStruct_027e0d2c : public AutoInstance<UnkStruct_027e0d2c> {
public:
// overlay 31
void func_ov031_020d95b4();
void func_ov031_020d95c8(ActorRef param1);
bool func_ov031_020d962c(VecFx32 *param1, unk32 param2, VecFx32 *param3, ActorRef *param4);
};
extern UnkStruct_027e0d2c *data_027e0d2c;
+55
View File
@@ -0,0 +1,55 @@
#pragma once
#include "UnkStruct_027e0ce0.hpp"
class UnkStruct_ov031_Items_00 : public UnkStruct_027e0ce0_38_Base {
public:
/* 00 (vtable) */
/* 04 */
UnkStruct_ov031_Items_00();
// data_ov000_020b30d0
/* 00 */ virtual ~UnkStruct_ov031_Items_00();
/* 08 */ virtual bool vfunc_08(const UnkStruct_ov031_020f3310 *param1) override;
};
class UnkStruct_ov031_Items_01 {
public:
/* 00 (vtable) */
/* 04 */ ActorRef mUnk_04;
/* 08 */ unk16 mUnk_08;
/* 08 */ unk16 mUnk_0A;
/* 0C */ VecFx32 mUnk_0C;
/* 18 */ fx32 mUnk_18;
/* 1C */ unk32 mUnk_1C;
/* 20 */ unk32 mUnk_20;
/* 24 */ unk32 mUnk_24;
/* 28 */ unk32 mUnk_28;
/* 2C */
UnkStruct_ov031_Items_01() {
this->mUnk_04 = 0;
this->mUnk_08 = 0;
VecFx32_Init(0, 0, 0, &this->mUnk_0C);
this->mUnk_18 = 0;
this->mUnk_1C = 0;
this->mUnk_20 = 0;
this->mUnk_24 = 0;
this->mUnk_28 = 0;
}
// data_ov000_020b27c8
/* 00 */ virtual ~UnkStruct_ov031_Items_01();
/* 08 */ virtual void vfunc_08();
/* 0C */ virtual bool vfunc_0C(Actor *param1, VecFx32 *vector);
/* 10 */ virtual void vfunc_10(Actor *actor);
};
class UnkStruct_ov031_Items_02 {
public:
/* 00 */ VecFx32 mUnk_00;
/* 0C */
UnkStruct_ov031_Items_02(unk32 param1, unk32 param2);
~UnkStruct_ov031_Items_02();
};