Fakematch d_a_agb's weak order with next-TU hack

This commit is contained in:
LagoLunatic
2024-02-12 16:15:48 -05:00
parent b8a8861f41
commit e713c46d12
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -419,7 +419,7 @@ config.libs = [
Object(NonMatching, "d/d_salvage.cpp"),
Object(Matching, "d/d_snap.cpp"),
Object(Matching, "d/d_point_wind.cpp"),
Object(NonMatching, "d/actor/d_a_agb.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(Matching, "d/actor/d_a_agb.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(Matching, "d/actor/d_a_arrow.cpp", extra_cflags=["-sym off"]),
Object(Matching, "d/actor/d_a_bg.cpp"),
Object(NonMatching, "d/actor/d_a_bomb.cpp", extra_cflags=['-pragma "nosyminline on"']),
+2 -2
View File
@@ -473,11 +473,11 @@ public:
virtual MtxP getLeftHandMatrix() = 0;
virtual MtxP getRightHandMatrix() = 0;
virtual f32 getGroundY() = 0;
virtual s32 getTactMusic() const { return -1; }
virtual s32 getTactMusic() const;// { return -1; }
virtual int getTactTimerCancel() const { return 0; }
virtual BOOL checkPlayerGuard() const { return FALSE; }
virtual fopAc_ac_c* getGrabMissActor() { return NULL; }
virtual u32 checkPlayerFly() const { return 0; }
virtual u32 checkPlayerFly() const;// { return 0; }
virtual BOOL checkFrontRoll() const { return FALSE; }
virtual BOOL checkBottleSwing() const { return FALSE; }
virtual BOOL checkCutCharge() const { return FALSE; }
+7
View File
@@ -3,6 +3,13 @@
// Translation Unit: d_a_arrow.cpp
//
// Fakematch: This is supposed to be a weak function defined in d_a_player.h that wind up at the end of the
// d_a_agb TU. But weak function ordering is currently broken, so to get d_a_agb to match, we define it
// here (at the start of the *next* TU after d_a_agb) so that it gets placed into the correct spot in
// the DOL, even though this is an ugly hack and they're now in the wrong translation unit instead.
#include "d/actor/d_a_player.h"
u32 daPy_py_c::checkPlayerFly() const { return 0; }
#include "d/actor/d_a_arrow.h"
#include "m_Do/m_Do_mtx.h"
#include "d/d_com_inf_game.h"