Document asset extraction

This commit is contained in:
Luke Street 2023-11-26 00:45:22 -05:00
parent bc31a5b90d
commit 90a464aea1
4 changed files with 21 additions and 4 deletions

View File

@ -3,7 +3,8 @@
{ {
"name": "Linux", "name": "Linux",
"includePath": [ "includePath": [
"${workspaceFolder}/include/**" "${workspaceFolder}/include/**",
"${workspaceFolder}/build/*/include"
], ],
"cStandard": "c99", "cStandard": "c99",
"cppStandard": "c++98", "cppStandard": "c++98",

View File

@ -98,3 +98,18 @@ modules:
# (optional) Custom template for `ldscript.lcf`, if needed. # (optional) Custom template for `ldscript.lcf`, if needed.
# See https://github.com/encounter/decomp-toolkit/blob/main/assets/ldscript_partial.lcf # See https://github.com/encounter/decomp-toolkit/blob/main/assets/ldscript_partial.lcf
ldscript_template: config/GAMEID/module/ldscript.tpl ldscript_template: config/GAMEID/module/ldscript.tpl
# (optional) Configuration for asset extraction.
extract:
- # The symbol name to extract.
symbol: SomeSymbol
# (optional) The path to extract raw binary data to.
# Path is relative to `build/GAMEID/bin`.
binary: Lib/SomeSymbol.bin
# (optional) The path to extract a C array representation to.
# In a C/C++ file, the symbol can be included with `#include "Lib/SomeSymbol.inc"`.
# Path is relative to `build/GAMEID/include`.
header: Lib/SomeSymbol.inc

View File

@ -118,7 +118,7 @@ if not is_windows():
# Tool versions # Tool versions
config.compilers_tag = "20231018" config.compilers_tag = "20231018"
config.dtk_tag = "v0.6.0" config.dtk_tag = "v0.6.2"
config.sjiswrap_tag = "v1.1.1" config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.9" config.wibo_tag = "0.6.9"
@ -150,8 +150,9 @@ cflags_base = [
"-RTTI off", "-RTTI off",
"-fp_contract on", "-fp_contract on",
"-str reuse", "-str reuse",
"-i include",
"-multibyte", # For Wii compilers, replace with `-enc SJIS` "-multibyte", # For Wii compilers, replace with `-enc SJIS`
"-i include",
f"-i build/{config.version}/include",
f"-DVERSION={version_num}", f"-DVERSION={version_num}",
] ]

View File

@ -9,7 +9,7 @@ path/to/file.cpp:
.text start:0x80047E5C end:0x8004875C .text start:0x80047E5C end:0x8004875C
.ctors start:0x803A54C4 end:0x803A54C8 .ctors start:0x803A54C4 end:0x803A54C8
.data start:0x803B1B40 end:0x803B1B60 .data start:0x803B1B40 end:0x803B1B60
.bss start:0x803DF828 end:0x803DFA8C .bss start:0x803DF828 end:0x803DFA8C
.bss start:0x8040D4AC end:0x8040D4D8 common .bss start:0x8040D4AC end:0x8040D4D8 common
``` ```