Fix HIO load issues (#2903)

* Fix HIO load order in daHoZelda_c::searchBodyAngle

* Fix regression in daHoZelda_c::createHeap

Apparently the HIO class being constructed having an explicit ctor breaks the compiler ability to branchlessly optimize the false/true return afterwards. Without an explicit ctor the compiler is able to optimize it successfully, which breaks the match.

* Fix HIO load order in daNpc_ykW_c::setAttnPos

* Remove false version diff

* Update configure.py

* Remove old comment

* Fix alink HIO members being private

* alink: Fix HIO loads in 3 retail functions and almost all debug functions
This commit is contained in:
LagoLunatic
2025-12-01 21:37:04 -05:00
committed by GitHub
parent cacdcb55f6
commit d56ddde6e8
35 changed files with 2658 additions and 2157 deletions
File diff suppressed because it is too large Load Diff
+11 -3
View File
@@ -48,6 +48,8 @@ struct daHoZelda_hio_c1 {
};
struct daHoZelda_hio_c0 {
daHoZelda_hio_c0() {}
static daHoZelda_hio_c1 const m;
};
@@ -55,7 +57,7 @@ class daHoZelda_hio_c : public JORReflexible {
public:
daHoZelda_hio_c() {
#if DEBUG
mParameters = daHoZelda_hio_c0::m;
m = daHoZelda_hio_c0::m;
#endif
}
@@ -64,10 +66,16 @@ public:
#if DEBUG
void genMessage(JORMContext*);
virtual ~daHoZelda_hio_c() {}
/* 0x8 */ daHoZelda_hio_c1 mParameters;
/* 0x8 */ daHoZelda_hio_c1 m;
#endif
};
#if DEBUG
#define HOZELDA_HIO_CLASS daHoZelda_hio_c
#else
#define HOZELDA_HIO_CLASS daHoZelda_hio_c0
#endif
/**
* @ingroup actors-unsorted
* @class daHoZelda_c
@@ -125,7 +133,7 @@ public:
/* 0x6A8 */ mDoExt_bckAnm mBowBck;
/* 0x6C4 */ daPy_actorKeep_c mArrowAcKeep;
/* 0x6CC */ daPy_actorKeep_c mGndAcKeep;
/* 0x6D4 */ daHoZelda_hio_c* mpHIO;
/* 0x6D4 */ HOZELDA_HIO_CLASS* mpHIO;
/* 0x6D8 */ u8 mBowMode;
/* 0x6D9 */ u8 mAnmTimer;
/* 0x6DA */ u8 field_0x6da;
+8 -1
View File
@@ -4,6 +4,13 @@
#include "d/actor/d_a_npc.h"
class daNpc_ykW_HIO_c;
class daNpc_ykW_Param_c;
#if DEBUG
#define NPC_YKW_HIO_CLASS daNpc_ykW_HIO_c
#else
#define NPC_YKW_HIO_CLASS daNpc_ykW_Param_c
#endif
/**
* @ingroup actors-npcs
@@ -139,7 +146,7 @@ public:
field_0x101c = 10;
}
/* 0x0E40 */ daNpc_ykW_HIO_c* mpHIO;
/* 0x0E40 */ NPC_YKW_HIO_CLASS* mpHIO;
/* 0x0E44 */ dCcD_Cyl mCyl;
/* 0x0F80 */ u8 field_0xf80;
/* 0x0F84 */ daNpcT_ActorMngr_c mActorMngrs[5];