Use the "next TU" fakematch to link d_door

This commit is contained in:
LagoLunatic
2024-06-30 11:15:20 -04:00
parent 8f371a7c1b
commit 8634478bc1
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -407,7 +407,7 @@ config.libs = [
Object(Matching, "d/d_a_race_item_static.cpp"),
Object(NonMatching, "d/d_a_leaflift_static.cpp"),
Object(NonMatching, "d/d_demo.cpp"),
Object(NonMatching, "d/d_door.cpp"),
Object(Matching, "d/d_door.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(Matching, "d/d_resorce.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(Matching, "d/d_material.cpp"),
Object(Matching, "d/d_event.cpp"),
+1 -1
View File
@@ -503,7 +503,7 @@ public:
virtual MtxP getModelJointMtx(u16) { return NULL; }
virtual f32 getOldSpeedY() { return 0.0f; }
virtual BOOL setHookshotCarryOffset(uint, const cXyz*) { return FALSE; }
virtual void setPlayerPosAndAngle(cXyz*, s16) {}
virtual void setPlayerPosAndAngle(cXyz*, s16);// {}
virtual void setPlayerPosAndAngle(cXyz*, csXyz*) {}
virtual void setPlayerPosAndAngle(MtxP) {}
virtual BOOL setThrowDamage(cXyz*, s16, f32, f32, int) { return FALSE; }
+7
View File
@@ -3,6 +3,13 @@
// Translation Unit: d_resorce.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_door TU. But weak function ordering is currently broken, so to get d_door to match, we define it
// here (at the start of the *next* TU after d_door) 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"
void daPy_py_c::setPlayerPosAndAngle(cXyz*, s16) { }
#include "d/d_resorce.h"
#include "d/d_bg_s.h"
#include "d/d_com_inf_game.h"