Decompiling ActorUnkCANS (#103)

* feat: Start decompiling ActorUnkCANS ctor and vfunc_10

* feat: Improve vfunc_10

* feat: Decompile vfunc_18 and 1C

* fix: Remove trailing return

* feat: Progress on vfunc_20

* fix: Rename symbol

* feat: Finish first run over vfunc_20

* feat: Improve vfunc_20

* feat: Improve vfunc_20

* feat: Heavily improve vfunc_20

Almost done

* feat: Keep vfunc_20 going, add UnkAngleStruct to Actor.hpp

* feat: Some polish on vfunc_20

That's about what I can do, there are some tweaks left but I'm unable to
get anywhere.
Kind of proud ngl

* feat: Rename symbols and match vfunc_24

* fix: Fix jp symbol conflict

* feat: Decompile vfunc_2C

* feat: Fix symbols and signatures

* fix: Match switch statement by adding every cases

* feat: Match func_ov063_02157fa4

* feat: Match func_ov063_02158424

* feat: Match func_ov063_02158448

* feat: Match func_ov063_02158490

* feat: Match func_ov063_02158b0c

* feat: Match func_ov063_02158b34

* feat: Decompile most of func_ov063_02158b98 (need regalloc fix)

* feat: Create inner classes of ActorUnkCANS, match some vfuncs

* feat: Update some dtor symbol and match some ctor

* feat: Decompile UnkStruct 02162ee8 ctor

* feat: Rename jp symbols

* feat: Match func_ov063_021590c8

* feat: Match func_ov063_02159dfc

* feat: Decompile some functions

* fix: Fix old accesses

* fix: More merge artifacts

* fix: More merge artifacts

* chore: Move structs around and fix some uses

* feat: Start decompiling func_ov063_02158db0

* feat: Decompile some vfunc

vfunc_0C is really really weird

* fix: Fix use of removed struct

* feat: Match func_ov063_02159258

* feat: Match func_ov063_02159494

* feat: Match func_ov063_021595a4

* feat: Match func_ov063_02159618

* feat: Match func_ov063_02159714

* feat: Match func_ov063_02159784

* fix: Move UnkAngleStruct to math.hpp

* fix: .data of ActorRollingStone & ActorShotArrow

* feat: Match func_ov063_021598fc

* fix: Cleanup code for func_ov063_021598fc

* feat: Match func_ov063_02159ca8

* feat: Match func_ov063_02159d68

* fix: Fix double declaration of func

* feat: Match func_ov063_02159e20

* feat: Decompile most of func_ov063_02159ec0

* feat: Match func_ov063_0215a428

* feat: Match func_ov063_0215a474

* feat: Update lots of symbols (mainly for jp)

* feat: Start decompiling two funcs with fx mul

* fix: Fix broken symbol def after merge

* feat: Match func_ov063_0215a514

* feat: Match func_ov063_0215a56c

* feat: Match func_ov063_0215a5a0

* feat: Match func_ov063_0215a5bc

* feat: Match func_ov063_0215a5d8

* feat: Decompile most of func_ov063_0215a678

* fix: Fix some regalloc order in func_ov063_0215a678

* feat: Update symbols and create unk class

* feat: Update CANS member with the new class

* feat: Update symbols, remove dead variables

* feat: Improve ctor and some local struct layout

* feat: Improve ActorUnkCANS ctor

* fix: Fix ActorUnkCANS members layout

* feat: Improve ActorUnkCANS ctor more

* fix: Fix wrong symbol reloc

* feat: Add intermediate struct and update symbols

* feat: Match some jp only code, symbols

* feat: Decompile part of func_ov063_0215a2c0

* fix: Fix jp only code in func_ov063_0215a2c0

* feat: Update symbols

* feat: Cleanup unused functions

* feat: Cleanup JP ifguards handling

* feat: Remove lot of useless temps, use DEG_TO_ANG where it seems appropriate

* feat: Small code cleanup

* Apply suggestions from code review

Co-authored-by: Alessevan <44125445+Alessevan@users.noreply.github.com>

* fix: Fix style

* feat: Apply suggestions from review

* feat: More code cleanup

* feat: Some more improvements

* fix: Remove auto-generated comment headers

* fix broken matches

* fix broken matches 2

---------

Co-authored-by: Alessevan <44125445+Alessevan@users.noreply.github.com>
Co-authored-by: Yanis002 <35189056+Yanis002@users.noreply.github.com>
This commit is contained in:
Mityno
2026-08-02 13:27:10 +00:00
committed by GitHub
parent 418954b3cd
commit 7c266293a7
34 changed files with 1636 additions and 300 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ unk32 Actor_Derived1::vfunc_A8() {
return 1;
}
void Actor_Derived1::func_ov000_020a9804() {}
void Actor_Derived1::func_ov000_020a9804(void *param1, unk32 param2) {}
void Actor_Derived1::vfunc_20() {}
// non-matching
@@ -1,3 +1,4 @@
#include "Actor/Actor.hpp"
#include "Player/PlayerActorBase.hpp"
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
@@ -68,7 +69,7 @@ PlayerActorBase_70::~PlayerActorBase_70() {
delete this->mUnk_00C.GetUnk08();
}
void PlayerActorBase_70::func_ov001_020bbe18(unk32 param1, UnkStruct_func_ov001_020bbe18 param2, u32 param3, u8 param4) {
void PlayerActorBase_70::func_ov001_020bbe18(unk32 param1, UnkAngleStruct param2, u32 param3, u8 param4) {
this->mUnk_129 = true;
this->mUnk_12A = true;
+3 -3
View File
@@ -317,7 +317,7 @@ void ActorItemBoomerang::func_ov031_020e52a0() {
// non-matching
void ActorItemBoomerang::vfunc_2C(unk32 param1) {
if (Actor::func_01fff5d0(param1, 0x0)) {
this->mUnk_94.func_01ffc6d4((u16) this->mAngle, &this->mPos);
this->mUnk_94.func_01ffc6d4(this->mAngleStruct, &this->mPos);
data_027e09b4->func_ov017_020c08c4(&this->mPos, 0x400, 0x400, 0x1F, 0x0, 0x1);
}
}
@@ -365,7 +365,7 @@ bool ActorItemBoomerang_11C::vfunc_08(const UnkStruct_ov031_020f3310 *param1) {
return func_ov000_020982d8();
}
bool ActorItemBoomerang_11C::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2) {
bool ActorItemBoomerang_11C::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2, unk32 param3) {
u32 val = (param1->mUnk_08 >> 9) & 7;
if (val == 0x2) {
this->mUnk_08->func_ov031_020e5034(0x1);
@@ -412,7 +412,7 @@ bool ActorItemBoomerang_11C::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, un
}
}
UnkStruct_027e0ce0_38_Base::vfunc_0C(param1, param2);
UnkStruct_027e0ce0_38_Base::vfunc_0C(param1, param2, param3);
}
void ActorItemBoomerang_Unknown::func_ov031_020e5704() {
+1 -1
View File
@@ -61,7 +61,7 @@ ActorProfileRollingStone::ActorProfileRollingStone() :
}
// non-matching
bool ActorRollingStone_104::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2) {}
bool ActorRollingStone_104::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2, unk32 param3) {}
// non-matching
void ActorRollingStone_104::vfunc_10() {}
+1 -1
View File
@@ -988,7 +988,7 @@ bool ActorShotArrow_178::vfunc_08(const UnkStruct_ov031_020f3310 *param1) {
}
// non-matching
bool ActorShotArrow_178::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2) {}
bool ActorShotArrow_178::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2, unk32 param3) {}
ActorShotArrow_194::ActorShotArrow_194(ActorShotArrow *param1) {
this->mUnk_2C = param1;
+1 -1
View File
@@ -1422,7 +1422,7 @@ void ActorUnkZLSL_27CC::vfunc_3C() {
}
void ActorUnkZLSL_27CC::vfunc_38(unk32 param1, unk32 param2) {
func_ov000_020578a4(this->mUnk_04);
func_ov000_020578a4((unk32) this->mUnk_04);
}
s8 ActorUnkZLSL_27CC::vfunc_30() {
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -1,7 +1,9 @@
//! TODO: This file was generated automatically and might contain errors
#include "Actor/ActorUnkCASE.hpp"
#include "Actor/ActorRef.hpp"
#include "System/SysNew.hpp"
#include "nitro/fx.h"
DECL_PROFILE(ActorProfileUnkCASE);
@@ -21,7 +23,7 @@ void ActorUnkCASE::func_ov063_0215ac4c(void) {}
void ActorUnkCASE::func_ov063_0215ac68(void) {}
void ActorUnkCASE::func_ov063_0215ac8c(void) {}
void ActorUnkCASE::func_ov063_0215acc8(void) {}
void ActorUnkCASE::func_ov063_0215acec(void) {}
void ActorUnkCASE::func_ov063_0215acec(ActorRef *ref1, ActorRef ref2) {};
void ActorUnkCASE::func_ov063_0215ae6c(void) {}
void ActorUnkCASE::func_ov063_0215ae80(void) {}
void ActorUnkCASE::func_ov063_0215ae94(void) {}
@@ -41,7 +43,7 @@ void ActorUnkCASE::func_ov063_0215b2c4(void) {}
void ActorUnkCASE::func_ov063_0215b2c8(void) {}
void ActorUnkCASE::func_ov063_0215b2ec(void) {}
void ActorUnkCASE::func_ov063_0215b624(void) {}
void ActorUnkCASE::func_ov063_0215b6c8(void) {}
void ActorUnkCASE::func_ov063_0215b6c8(VecFx32 *param1, UnkAngleStruct angle) {}
void ActorUnkCASE::func_ov063_0215b724(void) {}
void ActorUnkCASE::func_ov063_0215b7cc(void) {}
void ActorUnkCASE::func_ov063_0215b814(void) {}