Skip to content

Commit

Permalink
Update dtk-template, add decomp.me preset IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Nov 7, 2024
1 parent 04a5b59 commit ba5b373
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 11 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
# Tool versions
config.binutils_tag = "2.42-1"
config.compilers_tag = "20240706"
config.dtk_tag = "v1.2.0"
config.objdiff_tag = "v2.3.4"
config.dtk_tag = "v1.3.0"
config.objdiff_tag = "v2.4.0"
config.sjiswrap_tag = "v1.2.0"
config.wibo_tag = "0.6.11"

Expand All @@ -179,6 +179,10 @@
# Use for any additional files that should cause a re-configure when modified
config.reconfig_deps = []

# Optional numeric ID for decomp.me preset
# Can be overridden in libraries or objects
config.scratch_preset_id = 72 # The Wind Waker (DOL)

# Base flags, common to most GC/Wii games.
# Generally leave untouched, with overrides added below.
cflags_base = [
Expand Down Expand Up @@ -292,7 +296,11 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:

# Helper function for actor RELs
def ActorRel(status, rel_name, extra_cflags=[]):
return Rel(rel_name, [Object(status, f"d/actor/{rel_name}.cpp", extra_cflags=extra_cflags)])
return Rel(rel_name, [Object(
status, f"d/actor/{rel_name}.cpp",
extra_cflags=extra_cflags,
scratch_preset_id=73, # The Wind Waker (REL)
)])


# Helper function for JSystem libraries
Expand Down
4 changes: 4 additions & 0 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, completed: bool, name: str, **options: Any) -> None:
"lib": None,
"mw_version": None,
"progress_category": None,
"scratch_preset_id": None,
"shift_jis": None,
"source": name,
"src_dir": None,
Expand Down Expand Up @@ -79,6 +80,7 @@ def set_default(key: str, value: Any) -> None:
set_default("asm_dir", config.asm_dir)
set_default("host", False)
set_default("mw_version", config.linker_version)
set_default("scratch_preset_id", config.scratch_preset_id)
set_default("shift_jis", config.shift_jis)
set_default("src_dir", config.src_dir)

Expand Down Expand Up @@ -174,6 +176,7 @@ def __init__(self) -> None:
True # Generate compile_commands.json for clangd
)
self.extra_clang_flags: List[str] = [] # Extra flags for clangd
self.scratch_preset_id: Optional[int] = None # Default decomp.me preset ID for scratches

# Progress output, progress.json and report.json config
self.progress = True # Enable report.json generation and CLI progress output
Expand Down Expand Up @@ -1384,6 +1387,7 @@ def keep_flag(flag):
"platform": "gc_wii",
"compiler": compiler_version,
"c_flags": cflags_str,
"preset_id": obj.options["scratch_preset_id"],
}
if src_exists:
unit_config["scratch"].update(
Expand Down

0 comments on commit ba5b373

Please sign in to comment.