Skip to content

Commit

Permalink
Merge pull request #299 from roblabla/perfect-bin-match-asciimanager
Browse files Browse the repository at this point in the history
Improve AsciiManager.obj accuracy
  • Loading branch information
roblabla authored Nov 2, 2024
2 parents 4272339 + 1c71f7a commit aea2218
Show file tree
Hide file tree
Showing 6 changed files with 537 additions and 541 deletions.
3 changes: 1 addition & 2 deletions config/ghidra_ns_to_obj.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AnmManager,th06::AnmManager
AnmVm,th06::AnmVm
AsciiManager,th06::AsciiManager
AsciiManager,th06::AsciiManager,th06::StageMenu
BulletManager,th06::BulletManager
Chain,th06::Chain,th06::ChainElem
EclManager,th06::EclManager
Expand All @@ -26,7 +26,6 @@ Rng,th06::Rng
ScreenEffect,th06::ScreenEffect
SoundPlayer,th06::SoundPlayer
Stage,th06::Stage
StageMenu,th06::StageMenu
Supervisor,th06::Supervisor,th06::Controller
TextHelper,th06::TextHelper
utils,th06::utils
Expand Down
8 changes: 0 additions & 8 deletions objdiff.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,6 @@

"reverse_fn_order": false
},
{
"name": "StageMenu",

"target_path": "build/objdiff/orig/StageMenu.obj",
"base_path": "build/objdiff/reimpl/StageMenu.obj",

"reverse_fn_order": false
},
{
"name": "Supervisor",

Expand Down
12 changes: 5 additions & 7 deletions scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def configure(build_type):
"cl_common_flags",
"/MT /EHsc /G5 /Gs /GS /DNDEBUG /Zi /I $builddir/autogenerated /I src /I 3rdparty/munit /I 3rdparty/Detours/src",
)
writer.variable("cl_flags", "$cl_common_flags /Od /Oi /Ob1 /Op")
writer.variable("cl_flags", "$cl_common_flags /Od /Oi /Ob1 /Op /Gy")
writer.variable("cl_flags_pbg3", "$cl_common_flags /O2")
writer.variable(
"cl_flags_detours",
Expand Down Expand Up @@ -90,7 +90,6 @@ def configure(build_type):
"python scripts/generate_objdiff_objs.py $in",
)

main_sources = ["main"]
cxx_sources = [
"AsciiManager",
"BulletData",
Expand All @@ -113,7 +112,6 @@ def configure(build_type):
"SoundPlayer",
"Player",
"Stage",
"StageMenu",
"AnmVm",
"AnmManager",
"GameManager",
Expand All @@ -123,6 +121,7 @@ def configure(build_type):
"utils",
"ZunTimer",
"zwave",
"main",
]

pbg3_sources = [
Expand Down Expand Up @@ -163,7 +162,7 @@ def configure(build_type):
objdiff_deps.append(obj["base_path"].replace("build", "$builddir"))
writer.build("objdiff", "phony", [], objdiff_deps)

for rule in main_sources + cxx_sources:
for rule in cxx_sources:
writer.build(
"$builddir/" + rule + ".obj",
"cc",
Expand Down Expand Up @@ -269,13 +268,12 @@ def configure(build_type):
"gendef",
inputs=[
"$builddir/" + x + ".obj"
for x in (main_sources + cxx_sources + pbg3_sources + ["stubs"])
for x in (cxx_sources + pbg3_sources + ["stubs"])
],
implicit=["scripts/gendef.py"],
)
objfiles = (
["$builddir/" + src + ".obj" for src in main_sources]
+ ["$builddir/" + src + ".obj" for src in cxx_sources]
["$builddir/" + src + ".obj" for src in cxx_sources]
+ ["$builddir/" + src + ".obj" for src in pbg3_sources]
+ ["$builddir/th06.res", "$builddir/stubs.obj"]
)
Expand Down
Loading

0 comments on commit aea2218

Please sign in to comment.