Skip to content

Commit 07403fe

Browse files
authored
Pragma hack to de-inline the daNpcF_c ctors (#2523)
* A means of de-inlining the daNpcT_c ctors * Refactor daNpcF_c hack into variable, and add for more attempted NPC Fs * Address Taka's comment and add npc_wrestler to hack
1 parent 339c00f commit 07403fe

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

configure.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,11 @@ def MatchingFor(*versions) -> bool:
412412
return config.version in versions
413413

414414

415+
# For whatever reason, daNpcF_c::daNpcF_c gets inlined.
416+
# Using the following prevents that from happening:
417+
# TODO: This is just a temporary hack and should be looked into more extensively in the future
418+
DANPCF_C_HACK = '-pragma "inline_max_size(494)"'
419+
415420
config.warn_missing_config = True
416421
config.warn_missing_source = False
417422
config.libs = [
@@ -1756,8 +1761,8 @@ def MatchingFor(*versions) -> bool:
17561761
ActorRel(Equivalent, "d_a_myna"), # weak function order
17571762
ActorRel(NonMatching, "d_a_ni"),
17581763
ActorRel(NonMatching, "d_a_npc_aru"),
1759-
ActorRel(NonMatching, "d_a_npc_ash"),
1760-
ActorRel(NonMatching, "d_a_npc_ashB"),
1764+
ActorRel(NonMatching, "d_a_npc_ash", extra_cflags=[DANPCF_C_HACK]),
1765+
ActorRel(NonMatching, "d_a_npc_ashB", extra_cflags=[DANPCF_C_HACK]),
17611766
ActorRel(NonMatching, "d_a_npc_bans"),
17621767
ActorRel(NonMatching, "d_a_npc_blue_ns"),
17631768
ActorRel(Equivalent, "d_a_npc_bou"),
@@ -1791,7 +1796,7 @@ def MatchingFor(*versions) -> bool:
17911796
ActorRel(Equivalent, "d_a_npc_hanjo"),
17921797
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_henna0"),
17931798
ActorRel(NonMatching, "d_a_npc_hoz"),
1794-
ActorRel(NonMatching, "d_a_npc_impal"),
1799+
ActorRel(NonMatching, "d_a_npc_impal", extra_cflags=[DANPCF_C_HACK]),
17951800
ActorRel(NonMatching, "d_a_npc_inko"),
17961801
ActorRel(NonMatching, "d_a_npc_ins"),
17971802
ActorRel(NonMatching, "d_a_npc_jagar"),
@@ -1821,7 +1826,7 @@ def MatchingFor(*versions) -> bool:
18211826
ActorRel(NonMatching, "d_a_npc_passer2"),
18221827
ActorRel(NonMatching, "d_a_npc_post"),
18231828
ActorRel(NonMatching, "d_a_npc_pouya"),
1824-
ActorRel(NonMatching, "d_a_npc_prayer"),
1829+
ActorRel(Equivalent, "d_a_npc_prayer", extra_cflags=[DANPCF_C_HACK]), # weak func order
18251830
ActorRel(NonMatching, "d_a_npc_raca"),
18261831
ActorRel(NonMatching, "d_a_npc_rafrel"),
18271832
ActorRel(NonMatching, "d_a_npc_saru"),
@@ -1833,14 +1838,14 @@ def MatchingFor(*versions) -> bool:
18331838
ActorRel(NonMatching, "d_a_npc_seirei"),
18341839
ActorRel(NonMatching, "d_a_npc_shad"),
18351840
ActorRel(NonMatching, "d_a_npc_shaman"),
1836-
ActorRel(NonMatching, "d_a_npc_shoe"),
1841+
ActorRel(NonMatching, "d_a_npc_shoe", extra_cflags=[DANPCF_C_HACK]),
18371842
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_shop0"),
18381843
ActorRel(Equivalent, "d_a_npc_shop_maro"), # weak function order
18391844
ActorRel(NonMatching, "d_a_npc_sola"),
18401845
ActorRel(NonMatching, "d_a_npc_soldierA"),
18411846
ActorRel(NonMatching, "d_a_npc_soldierB"),
18421847
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_sq"),
1843-
ActorRel(NonMatching, "d_a_npc_the"),
1848+
ActorRel(NonMatching, "d_a_npc_the", extra_cflags=[DANPCF_C_HACK]),
18441849
ActorRel(NonMatching, "d_a_npc_theB"),
18451850
ActorRel(Equivalent, "d_a_npc_tk"), # weak function order
18461851
ActorRel(NonMatching, "d_a_npc_tkc"),
@@ -1850,7 +1855,7 @@ def MatchingFor(*versions) -> bool:
18501855
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_tr"),
18511856
ActorRel(NonMatching, "d_a_npc_uri"),
18521857
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_worm", extra_cflags=['-pragma "nosyminline off"']),
1853-
ActorRel(NonMatching, "d_a_npc_wrestler"),
1858+
ActorRel(NonMatching, "d_a_npc_wrestler", extra_cflags=[DANPCF_C_HACK]),
18541859
ActorRel(NonMatching, "d_a_npc_yamid"),
18551860
ActorRel(NonMatching, "d_a_npc_yamis"),
18561861
ActorRel(NonMatching, "d_a_npc_yamit"),
@@ -1862,9 +1867,9 @@ def MatchingFor(*versions) -> bool:
18621867
ActorRel(NonMatching, "d_a_npc_zelR"),
18631868
ActorRel(NonMatching, "d_a_npc_zelRo"),
18641869
ActorRel(Equivalent, "d_a_npc_zelda"), # weak function order
1865-
ActorRel(NonMatching, "d_a_npc_zra"),
1866-
ActorRel(NonMatching, "d_a_npc_zrc"),
1867-
ActorRel(NonMatching, "d_a_npc_zrz"),
1870+
ActorRel(NonMatching, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]),
1871+
ActorRel(NonMatching, "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]),
1872+
ActorRel(NonMatching, "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]),
18681873
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_Lv5Key"),
18691874
ActorRel(Equivalent, "d_a_obj_Turara"),
18701875
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_TvCdlst"),

0 commit comments

Comments
 (0)