d_a_fganon 100% (#695)

* added `cBgS_Chk::OffSameActorChk`inline function

* initial progress of d_a_fganon

100% Matching:
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `daFganon_IsDelete`

Partial Matching:
- `daFganon_Hio_C::daFganon_HIO_c` (88%)
- `deru_brk` (98%, code is matching, variable memory locations needed for 100% match)
- `kieru_brk` (98%, code is matching, variable memory locations needed for 100% match)
- `deru_brk2` (98%, code is matching, variable memory locations needed for 100% match)
- `kieru_brk2` (98%, code is matching, variable memory locations needed for 100% match)
- `pos_move` (73%)
- `move` (80%)
- `mahou_se_set` (82%)
- `daFganon_Delete` (94%, code is matching, variable memory locations needed for 100% match)
- `useHeapInit` (92%)
- `daFganon_Create` (77%)
- `fgannon_class::fganon_class()` (88%)

Remainder haven't been started

* Additional progress, more functions at 100% matching

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `mahou_set`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`

Partial Matching:
- `fly` (60%)
- `shot` (46%)
- `move` (92%)
- `daFganon_Execute` (11%)
- `daFganon_Create` (60%)
- `fgannon_class::fganon_class()` (93%)

* More functions at 100% matching

- Added a `cXyz` member to `mant_class` that is referenced in this TU.
- Changed 'fganon_class` to inherit from `fopEn_enemy_c` instead of `fopAc_ac_c`

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `fly`
- `shot`
- `spinattack`
- `fly2`
- `tama_set`
- `mahou_set`
- `mahou_set`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`
- `fgannon_class::fganon_class()`

Partial Matching:
- `move` (96%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Execute` (96%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Create` (96%, code is matching, variable memory locations needed for 100% match)

* additional functions at 100% matching

Cleaned up the values of the static globals, will resolve their symbols later

100% Matching:
- `daFganon_Hio_C::daFganon_HIO_c`
- `anim_init`
- `tama_draw`
- `daFganon_Draw`
- `deru_brk`
- `kieru_brk`
- `deru_brk2`
- `kieru_brk2`
- `pos_move`
- `fly_se_set`
- `fly`
- `shot`
- `spinattack`
- `fly2`
- `tama_set`
- `mahou_set`
- `shot2`
- `spinattack2`
- `down`
- `kabe_check`
- `deru`
- `kieru`
- `fail`
- `standby`
- `start`
- `last_end`
- `damage_check`
- `ball_tg_check`
- `mahou_se_set`
- `daFganon_IsDelete`
- `daFganon_Delete`
- `useHeapInit`
- `fgannon_class::fganon_class()`

Partial Matching:
- `end` (97%, code is matching, variable memory locations needed for 100% match)
- `move` (97%, code is matching, variable memory locations needed for 100% match)
- `demo_camera` (63%)
- `daFganon_Execute` (97%, code is matching, variable memory locations needed for 100% match)
- `daFganon_Create` (98%, code is matching, variable memory locations needed for 100% match)

* added `mDoAud_changeSubBgmStatus` inline

* changed return type of `dComIfGp_getPlayerCameraID` inline

needed this change to get a match for this `d_a_fganon`

* d_a_fganon 100% matching

Currently the checksum fails but I have some theories as to why that might be. I'll continue to cleanup the symbols.

* symbol cleanup

* fixed `mDoAud_changeSubBgmStatus` calling wrong function

* 100% matching now, checksum passes

There is a weak function ordering issue so I included the param in `configure.py`

* PR changes made

* Additional PR changes, better naming of class members
This commit is contained in:
mattias-blum
2025-03-16 19:04:00 -04:00
committed by GitHub
parent 243c576d6e
commit ae528dc3d9
10 changed files with 2900 additions and 118 deletions
+1 -1
View File
@@ -1538,7 +1538,7 @@ config.libs = [
ActorRel(Matching, "d_a_dummy"),
ActorRel(NonMatching, "d_a_fallrock_tag"),
ActorRel(Matching, "d_a_fan", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_fganon"),
ActorRel(Matching, "d_a_fganon", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_fgmahou"),
ActorRel(NonMatching, "d_a_fire"),
ActorRel(NonMatching, "d_a_fm"),
+4 -3
View File
@@ -16,20 +16,20 @@ private:
/* 0x0 */ cBgS_PolyPassChk* mPolyPassChk;
/* 0x4 */ cBgS_GrpPassChk* mGrpPassChk;
/* 0x8 */ fpc_ProcID mActorPid;
/* 0xC */ u8 unk_0x0C;
/* 0xC */ bool mSameActorChk;
/* 0x10 */ // __vtable__
public:
cBgS_Chk() {
mPolyPassChk = NULL;
mGrpPassChk = NULL;
unk_0x0C = 1;
mSameActorChk = 1;
}
void SetExtChk(cBgS_Chk& other) {
mPolyPassChk = other.mPolyPassChk;
mGrpPassChk = other.mGrpPassChk;
mActorPid = other.mActorPid;
unk_0x0C = other.unk_0x0C;
mSameActorChk = other.mSameActorChk;
}
bool ChkSameActorPid(fpc_ProcID) const;
@@ -39,6 +39,7 @@ public:
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
cBgS_GrpPassChk* GetGrpPassChk() const { return mGrpPassChk; }
void OffSameActorChk() { mSameActorChk = false; }
virtual ~cBgS_Chk();
}; // Size: 0x14
+119 -37
View File
@@ -4,68 +4,150 @@
#include "f_op/f_op_actor.h"
#include "d/d_cc_d.h"
#include "d/d_bg_s_acch.h"
#include "SSystem/SComponent/c_phase.h"
#include "d/d_particle.h"
class camera_class;
class mant_class;
class daBoko_c;
class daPy_py_c;
class mDoExt_McaMorf;
class mDoExt_brkAnm;
class mDoExt_btkAnm;
class fganon_class : public fopAc_ac_c {
class fganon_class : public fopEn_enemy_c {
public:
/* 0x290 */ f32 m290;
/* 0x294 */ u8 m294[0x2AC - 0x294];
/* 0x2AC */ request_of_phase_process_class m2AC;
/* 0x2B4 */ request_of_phase_process_class m2B4;
/* 0x2AC */ request_of_phase_process_class mPhs1;
/* 0x2B4 */ request_of_phase_process_class mPhs2;
/* 0x2BC */ u8 m2BC;
/* 0x2BD */ u8 m2BD;
/* 0x2BE */ u8 m2BE;
/* 0x2BE */ u8 mSwitchNo;
/* 0x2BF */ u8 m2BF;
/* 0x2C0 */ mDoExt_McaMorf* m2C0;
/* 0x2C4 */ mDoExt_brkAnm* m2C4;
/* 0x2C8 */ J3DModel* m2C8;
/* 0x2CC */ mDoExt_brkAnm* m2CC;
/* 0x2D0 */ u8 m2D0[0x386 - 0x2D0];
/* 0x2C0 */ mDoExt_McaMorf* mpMorf;
/* 0x2C4 */ mDoExt_brkAnm* mpBrkAnm1;
/* 0x2C8 */ J3DModel* mpKenModel;
/* 0x2CC */ mDoExt_brkAnm* mpBrkAnm2;
/* 0x2D0 */ s8 m2D0;
/* 0x2D1 */ u8 m2D1[0x2D4 - 0x2D1];
/* 0x2D4 */ dKy_tevstr_c mKenTevStr;
/* 0x384 */ s16 m384;
/* 0x386 */ s16 m386;
/* 0x388 */ s16 m388;
/* 0x38A */ u8 m38A[0x3AE - 0x38A];
/* 0x38A */ s16 m38A;
/* 0x38C */ cXyz m38C;
/* 0x398 */ s16 m398;
/* 0x39A */ s16 m39A;
/* 0x39C */ f32 m39C;
/* 0x3A0 */ f32 m3A0;
/* 0x3A4 */ s16 m3A4[5];
/* 0x3AE */ s16 m3AE;
/* 0x3B0 */ u8 m3B0[0x3B6 - 0x3B0];
/* 0x3B0 */ f32 m3B0;
/* 0x3B4 */ s16 m3B4;
/* 0x3B6 */ s16 m3B6;
/* 0x3B8 */ u8 m3B8[0x408 - 0x3B8];
/* 0x408 */ u8 m408;
/* 0x409 */ u8 m409[0x40C - 0x409];
/* 0x40C */ dCcD_Sph m40C;
/* 0x538 */ dCcD_Sph m538;
/* 0x664 */ u8 m664[0x674 - 0x664];
/* 0x674 */ J3DModel* m674;
/* 0x678 */ mDoExt_btkAnm* m678;
/* 0x67C */ mDoExt_brkAnm* m67C;
/* 0x680 */ u8 m680[0x68C - 0x680];
/* 0x68C */ u8 m68C;
/* 0x68D */ u8 m68D[0x68F - 0x68D];
/* 0x3B8 */ s16 m3B8;
/* 0x3BA */ u8 m3BA[0x3BC - 0x3BA];
/* 0x3BC */ f32 m3BC;
/* 0x3C0 */ f32 m3C0;
/* 0x3C4 */ JPABaseEmitter* mEmitters1[2];
/* 0x3CC */ JPABaseEmitter* mEmitters2[2];
/* 0x3D4 */ JPABaseEmitter* mEmitters3[2];
/* 0x3DC */ u32 m3DC;
/* 0x3E0 */ cXyz m3E0;
/* 0x3EC */ cXyz m3EC;
/* 0x3F8 */ cXyz m3F8;
/* 0x404 */ f32 m404;
/* 0x408 */ s8 m408;
/* 0x409 */ s8 m409;
/* 0x40A */ s8 m40A;
/* 0x40B */ s8 m40B;
/* 0x40C */ dCcD_Sph mBallTgSph;
/* 0x538 */ dCcD_Sph mBallAtSph;
/* 0x664 */ cXyz m664;
/* 0x670 */ s8 m670;
/* 0x671 */ s8 m671;
/* 0x672 */ u8 m672;
/* 0x673 */ s8 m673;
/* 0x674 */ J3DModel* mpEnergySphereModel;
/* 0x678 */ mDoExt_btkAnm* mpBtkAnm;
/* 0x67C */ mDoExt_brkAnm* mpBrkAnm3;
/* 0x680 */ f32 m680;
/* 0x684 */ s8 m684;
/* 0x685 */ s8 m685;
/* 0x686 */ s8 m686;
/* 0x687 */ s8 m687;
/* 0x688 */ s8 m688;
/* 0x689 */ s8 m689;
/* 0x68A */ s8 m68A;
/* 0x68B */ s8 m68B;
/* 0x68C */ s8 m68C;
/* 0x68D */ s8 mbIsMaterialized; // Flag for PG's appearance state, set to `FALSE` when he disappears, `TRUE` when he appears
/* 0x68E */ s8 m68E;
/* 0x68F */ u8 m68F;
/* 0x690 */ u8 m690;
/* 0x691 */ u8 m691[0x6B4 - 0x691];
/* 0x690 */ s8 m690;
/* 0x691 */ u8 m691[0x694 - 0x691];
/* 0x694 */ f32 m694;
/* 0x698 */ f32 m698;
/* 0x69C */ f32 m69C;
/* 0x6A0 */ s16 m6A0;
/* 0x6A2 */ s16 m6A2;
/* 0x6A4 */ s16 m6A4;
/* 0x6A6 */ s16 m6A6;
/* 0x6A8 */ u32 m6A8;
/* 0x6AC */ s8 m6AC;
/* 0x6AD */ u8 m6AD[0x6B0 - 0x6AD];
/* 0x6B0 */ fpc_ProcID mBokoID;
/* 0x6B4 */ fpc_ProcID mCapeID;
/* 0x6B8 */ dBgS_AcchCir m6B8;
/* 0x6F8 */ dBgS_Acch m6F8;
/* 0x6B8 */ dBgS_AcchCir mAcchCir;
/* 0x6F8 */ dBgS_ObjAcch mAcch;
/* 0x8BC */ dCcD_Stts mStts;
/* 0x8F8 */ dCcD_GObjInf mCcDObjInf;
/* 0x9F0 */ u8 m9F0[0xA28 - 0x9F0];
/* 0xA28 */ dCcD_Sph mA28;
/* 0xB54 */ u8 mB54[0xB88 - 0xB54];
/* 0x8F8 */ dCcD_Cyl mCyl;
/* 0xA28 */ dCcD_Sph mWeponSph;
/* 0xB54 */ s16 mB54;
/* 0xB56 */ s16 mB56;
/* 0xB58 */ u8 mB58[0xB5C - 0xB58];
/* 0xB5C */ cXyz mB5C;
/* 0xB68 */ cXyz mB68;
/* 0xB74 */ s16 mB74;
/* 0xB76 */ s16 mB76;
/* 0xB78 */ u8 mB78[0xB80 - 0xB78];
/* 0xB80 */ f32 mB80;
/* 0xB84 */ f32 mB84;
/* 0xB88 */ u8 mB88;
/* 0xB89 */ u8 mB89[0xB8A - 0xB89];
/* 0xB89 */ s8 mB89;
/* 0xB8A */ u8 mB8A;
/* 0xB8B */ u8 mB8B[0xB8C - 0xB8B];
/* 0xB8B */ u8 mB8B;
};
class daFganon_HIO_c {
public:
daFganon_HIO_c();
virtual ~daFganon_HIO_c(){}
public:
/* Place member variables here */
/* 0x00 */ // vtable
/* 0x04 */ s8 mNo;
/* 0x05 */ u8 m05;
/* 0x06 */ u8 m06;
/* 0x07 */ u8 m07;
/* 0x08 */ s16 m08;
/* 0x0A */ s16 m0A;
/* 0x0C */ f32 m0C;
/* 0x10 */ f32 m10;
/* 0x14 */ f32 m14;
/* 0x18 */ f32 m18;
/* 0x1C */ f32 m1C;
/* 0x20 */ f32 m20;
/* 0x24 */ f32 m24;
/* 0x28 */ f32 m28;
/* 0x2C */ f32 m2C;
/* 0x30 */ f32 m30;
/* 0x34 */ f32 m34;
/* 0x38 */ f32 m38;
/* 0x3C */ s16 m3C;
/* 0x3E */ s16 m3E;
/* 0x40 */ s16 m40;
/* 0x42 */ s16 m42;
/* 0x44 */ f32 m44;
/* 0x4A */ s16 m48;
};
#endif /* D_A_FGANON_H */
+2 -1
View File
@@ -23,7 +23,8 @@ public:
class mant_class : public fopAc_ac_c {
public:
/* 0x0290 */ u8 m0290[0x1BEC - 0x0290];
/* 0x0290 */ u8 m0290[0x1BE0 - 0x0290];
/* 0x1BE0 */ cXyz m1BE0;
/* 0x1BEC */ cXyz m1BEC;
/* 0x1BF8 */ u8 m1BF8[0x283C - 0x1BF8];
};
+3
View File
@@ -96,6 +96,7 @@ enum CcG_At_HitMark {
enum CcG_Tg_HitMark {
/* 0x1 */ dCcG_TgHitMark_Unk1_e = dPa_name::ID_COMMON_0001,
/* 0xC */ dCcg_TgHitMark_Purple_e = dPa_name::ID_COMMON_PURPLE_HIT,
/* 0xD */ dCcG_TgHitMark_Nrm_e = dPa_name::ID_COMMON_NORMAL_HIT,
};
enum dCcG_At_Spl {
@@ -103,8 +104,10 @@ enum dCcG_At_Spl {
/* 0x1 */ dCcG_At_Spl_UNK1 = 1,
/* 0x3 */ dCcG_At_Spl_UNK3 = 3,
/* 0x6 */ dCcG_At_Spl_UNK6 = 6,
/* 0x7 */ dCcG_At_Spl_UNK7 = 7,
/* 0x8 */ dCcG_At_Spl_UNK8 = 8,
/* 0x9 */ dCcG_At_Spl_UNK9 = 9,
/* 0xA */ dCcG_At_Spl_UNKA = 0xA,
/* 0xB */ dCcG_At_Spl_UNKB = 0xB,
};
+1 -1
View File
@@ -2165,7 +2165,7 @@ inline daPy_lk_c* daPy_getPlayerLinkActorClass() {
return (daPy_lk_c*)dComIfGp_getLinkPlayer();
}
inline s8 dComIfGp_getPlayerCameraID(int idx) {
inline int dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
+2
View File
@@ -595,4 +595,6 @@ extern dMeter_menuHIO_c g_menuHIO;
extern dMeter_msg_HIO_c g_msgHIO;
extern dMeter_message_HIO_c g_messageHIO;
void dMeter_mtrShow();
#endif /* D_METER_H */
+4
View File
@@ -64,6 +64,10 @@ inline void mDoAud_subBgmStop() {
mDoAud_zelAudio_c::getInterface()->subBgmStop();
}
inline void mDoAud_changeSubBgmStatus(u32 status) {
mDoAud_zelAudio_c::getInterface()->changeSubBgmStatus(status);
}
inline void mDoAud_bgmStreamPrepare(u32 id) {
mDoAud_zelAudio_c::getInterface()->bgmStreamPrepare(id);
}
+1 -1
View File
@@ -12,7 +12,7 @@ cBgS_Chk::~cBgS_Chk() {
/* 8024734C-8024738C .text ChkSameActorPid__8cBgS_ChkCFUi */
bool cBgS_Chk::ChkSameActorPid(fpc_ProcID pid) const {
if (mActorPid == fpcM_ERROR_PROCESS_ID_e || pid == fpcM_ERROR_PROCESS_ID_e || unk_0x0C == 0) {
if (mActorPid == fpcM_ERROR_PROCESS_ID_e || pid == fpcM_ERROR_PROCESS_ID_e || mSameActorChk == 0) {
return FALSE;
} else {
return (mActorPid == pid) ? TRUE : FALSE;
+2763 -74
View File
File diff suppressed because it is too large Load Diff