Fix false pointer relocations in data breaking shiftability (#2296)

* Fix false pointer relocations in data breaking shiftability

* Update matDL_dis.py from tww

* remove debug prints from matDL build script
* matDL build rule: Allow specifying global/local scope

* Use asset extraction for ShieldD

* Set mode `+x` on executable Python scripts

* set `+x` on matDL_dis
This commit is contained in:
LagoLunatic 2025-01-31 16:58:59 -05:00 committed by GitHub
parent 6b0e392c13
commit ca3e900835
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 292 additions and 179 deletions

View File

@ -343,8 +343,8 @@ modules:
binary: assets/l_J_hana00_cDL.bin
header: assets/l_J_hana00_cDL.h
- symbol: l_matDL
binary: assets/l_matDL.bin
header: assets/l_matDL.h
binary: assets/l_matDL__d_a_grass.bin
header: assets/l_matDL__d_a_grass.h
header_type: none
custom_type: matDL
- symbol: l_matLight4DL
@ -365,8 +365,8 @@ modules:
binary: assets/l_J_hana01_c_01DL.bin
header: assets/l_J_hana01_c_01DL.h
- symbol: l_mat2DL
binary: assets/l_mat2DL.bin
header: assets/l_mat2DL.h
binary: assets/l_mat2DL__d_a_grass.bin
header: assets/l_mat2DL__d_a_grass.h
header_type: none
custom_type: matDL
- symbol: l_mat2Light4DL

View File

@ -16605,7 +16605,7 @@ typeToTypeGroup__7dTres_c = .rodata:0x8037B0D8; // type:object size:0x22 scope:g
@stringBase0 = .rodata:0x8037B100; // type:object size:0x2A scope:local align:4 data:string_table
black_tex = .rodata:0x8037B140; // type:object size:0x40 scope:global align:32
msg_data = .rodata:0x8037B180; // type:object size:0x260 scope:global align:4
font_data = .rodata:0x8037B3E0; // type:object size:0x12260 scope:global align:4
font_data = .rodata:0x8037B3E0; // type:object size:0x12260 scope:global align:4 noreloc
@stringBase0 = .rodata:0x8038D640; // type:object size:0x13 scope:local align:4 data:string_table
...rodata.0 = .rodata:0x8038D658; // type:label scope:local
@3757 = .rodata:0x8038D658; // type:object size:0xC scope:local
@ -16753,7 +16753,7 @@ m_mainBckShield__9daAlink_c = .rodata:0x8038FBD4; // type:object size:0x50 scope
m_mainBckSword__9daAlink_c = .rodata:0x8038FC24; // type:object size:0x14 scope:global align:4
m_mainBckFishing__9daAlink_c = .rodata:0x8038FC38; // type:object size:0x70 scope:global align:4
m_anmDataTable__9daAlink_c = .rodata:0x8038FCA8; // type:object size:0x1368 scope:global align:4
m_wlAnmDataTable__9daAlink_c = .rodata:0x80391010; // type:object size:0x498 scope:global align:4
m_wlAnmDataTable__9daAlink_c = .rodata:0x80391010; // type:object size:0x498 scope:global align:4 noreloc
m_faceTexDataTable__9daAlink_c = .rodata:0x803914A8; // type:object size:0x28C scope:global align:4
@5908 = .rodata:0x80391734; // type:object size:0xC scope:local align:4 data:4byte
atnNormalType1$6976 = .rodata:0x80391740; // type:object size:0x14 scope:local align:4
@ -17054,7 +17054,7 @@ key_tag$5002 = .rodata:0x80395730; // type:object size:0x18 scope:local align:8
item_tag$5040 = .rodata:0x80395748; // type:object size:0x18 scope:local align:8
@stringBase0 = .rodata:0x80395760; // type:object size:0xEB scope:local align:4 data:string_table
...rodata.0 = .rodata:0x80395860; // type:label scope:local
l_paletteDmap_m = .rodata:0x80395860; // type:object size:0xF0 scope:global align:4
l_paletteDmap_m = .rodata:0x80395860; // type:object size:0xF0 scope:global align:4 noreloc
l_dungeon_offColor$3841 = .rodata:0x80395950; // type:object size:0x24 scope:local align:4
l_dungeon_onColor$3842 = .rodata:0x80395974; // type:object size:0x24 scope:local align:4
l_dungeon_stayColor$3843 = .rodata:0x80395998; // type:object size:0x24 scope:local align:4
@ -17639,7 +17639,7 @@ g_ntscZeldaProg = .data:0x803A2F9C; // type:object size:0x3C scope:global align:
g_mDoMtx_identity = .data:0x803A2FD8; // type:object size:0x30 scope:global align:4
l_invisibleMat$7041 = .data:0x803A3020; // type:object size:0x85 scope:local align:32
l_matDL = .data:0x803A30C0; // type:object size:0x84 scope:global align:4
l_mat1DL = .data:0x803A3160; // type:object size:0x8D scope:global align:4
l_mat1DL = .data:0x803A3160; // type:object size:0x8D scope:global align:4 noreloc
__vt__7JUTFont = .data:0x803A31F0; // type:object size:0x44 scope:global align:4
__vt__26mDoExt_3DlineMatSortPacket = .data:0x803A3234; // type:object size:0x14 scope:global align:4
__vt__19mDoExt_3DlineMat1_c = .data:0x803A3248; // type:object size:0x14 scope:global align:4
@ -17841,7 +17841,7 @@ l_frontNoZSubMat = .data:0x803A8800; // type:object size:0x2A scope:global align
l_shadowVolPos = .data:0x803A882C; // type:object size:0x60 scope:global align:4
l_shadowVolDL = .data:0x803A88A0; // type:object size:0x3B scope:global align:32
l_shadowProjMat = .data:0x803A88E0; // type:object size:0x5A scope:global align:32
l_shadowVolMat = .data:0x803A8940; // type:object size:0x5A scope:global align:32
l_shadowVolMat = .data:0x803A8940; // type:object size:0x5A scope:global align:32 noreloc
l_clearMat = .data:0x803A89A0; // type:object size:0x55 scope:global align:32
l_frontMat = .data:0x803A8A00; // type:object size:0x55 scope:global align:32
l_backSubMat = .data:0x803A8A60; // type:object size:0x3C scope:global align:32
@ -18543,7 +18543,7 @@ __vt__8daItem_c = .data:0x803B9FA4; // type:object size:0x44 scope:global align:
__vt__9dInsect_c = .data:0x803BA078; // type:object size:0xC scope:global align:4
__vt__14daObj_SSBase_c = .data:0x803BA088; // type:object size:0x14 scope:global align:4
arcName$4622 = .data:0x803BA0A0; // type:object size:0x20 scope:local align:4
l_sightDL = .data:0x803BA0C0; // type:object size:0x89 scope:global align:4
l_sightDL = .data:0x803BA0C0; // type:object size:0x89 scope:global align:4 noreloc
__vt__18daPy_sightPacket_c = .data:0x803BA14C; // type:object size:0x10 scope:global align:4
...data.0 = .data:0x803BA160; // type:label scope:local
cNullVec__6Z2Calc = .data:0x803BA160; // type:object size:0xC scope:local align:4
@ -18989,7 +18989,7 @@ __vt__14dMenu_DmapBg_c = .data:0x803BCB38; // type:object size:0x1C scope:global
...data.0 = .data:0x803BCB60; // type:label scope:local
cNullVec__6Z2Calc = .data:0x803BCB60; // type:object size:0xC scope:local align:4
@3798 = .data:0x803BCB6C; // type:object size:0x44 scope:local align:4
l_data = .data:0x803BCBC0; // type:object size:0xF4 scope:global align:4
l_data = .data:0x803BCBC0; // type:object size:0xF4 scope:global align:4 noreloc
@3922 = .data:0x803BCCB4; // type:object size:0xC scope:local align:4
@3923 = .data:0x803BCCC0; // type:object size:0xC scope:local align:4
@3924 = .data:0x803BCCCC; // type:object size:0xC scope:local align:4
@ -20243,8 +20243,8 @@ sCpuExpName__12JUTException = .data:0x803CC660; // type:object size:0x44 scope:g
__vt__12JUTException = .data:0x803CC6A4; // type:object size:0x10 scope:global align:4
...data.0 = .data:0x803CC6B8; // type:label scope:local
sAsciiTable__14JUTDirectPrint = .data:0x803CC6B8; // type:object size:0x80 scope:global align:4
sFontData__14JUTDirectPrint = .data:0x803CC738; // type:object size:0x100 scope:global align:4
sFontData2__14JUTDirectPrint = .data:0x803CC838; // type:object size:0x134 scope:global align:4
sFontData__14JUTDirectPrint = .data:0x803CC738; // type:object size:0x100 scope:global align:4 noreloc
sFontData2__14JUTDirectPrint = .data:0x803CC838; // type:object size:0x134 scope:global align:4 noreloc
twiceBit$371 = .data:0x803CC96C; // type:object size:0x10 scope:local align:4
__vt__8JUTVideo = .data:0x803CC980; // type:object size:0xC scope:global align:4
__vt__8JUTFader = .data:0x803CC990; // type:object size:0x18 scope:global align:4
@ -22608,7 +22608,7 @@ borderColor1$3976 = .sdata2:0x80451CDC; // type:object size:0x4 scope:local alig
@6980 = .sdata2:0x80451D18; // type:object size:0x4 scope:local align:4 data:float
@6981 = .sdata2:0x80451D1C; // type:object size:0x4 scope:local align:4 data:float
@7580 = .sdata2:0x80451D20; // type:object size:0x8 scope:local align:8 data:double
M_dir_base__Q212daObjMovebox5Act_c = .sdata2:0x80451D28; // type:object size:0x8 scope:global align:4
M_dir_base__Q212daObjMovebox5Act_c = .sdata2:0x80451D28; // type:object size:0x8 scope:global align:4 noreloc
OPEN_SIZE__7daDsh_c = .sdata2:0x80451D30; // type:object size:0x4 scope:global align:4
OPEN_ACCEL__7daDsh_c = .sdata2:0x80451D34; // type:object size:0x4 scope:global align:4
OPEN_SPEED__7daDsh_c = .sdata2:0x80451D38; // type:object size:0x4 scope:global align:4

View File

@ -1083,6 +1083,19 @@ modules:
symbols: config/ShieldD/rels/d_a_mantD/symbols.txt
splits: config/ShieldD/rels/d_a_mantD/splits.txt
# map: orig/ShieldD/fixed_maps/d_a_mantD.map
extract:
- symbol: l_Egnd_mantTEX
binary: assets/l_Egnd_mantTEX.bin
header: assets/l_Egnd_mantTEX.h
- symbol: l_Egnd_mantTEX_U
binary: assets/l_Egnd_mantTEX_U.bin
header: assets/l_Egnd_mantTEX_U.h
- symbol: l_Egnd_mantPAL
binary: assets/l_Egnd_mantPAL.bin
header: assets/l_Egnd_mantPAL.h
- symbol: l_Egnd_mantDL
binary: assets/l_Egnd_mantDL.bin
header: assets/l_Egnd_mantDL.h
- object: files/rel/RVL/Debug/d_a_mg_fishD.rel
hash: 23e9ec4daf37074c32c6dbfc681e8a6bf66a6c9c
@ -4497,3 +4510,86 @@ modules:
symbols: config/ShieldD/rels/f_pc_profile_lstD/symbols.txt
splits: config/ShieldD/rels/f_pc_profile_lstD/splits.txt
# map: orig/ShieldD/fixed_maps/f_pc_profile_lstD.map
extract:
- symbol: black_tex
binary: assets/black_tex.bin
header: assets/black_tex.h
- symbol: msg_data
binary: assets/msg_data.bin
header: assets/msg_data.h
- symbol: font_data
binary: assets/font_data.bin
header: assets/font_data.h
- symbol: l_M_kusa05_RGBATEX
binary: assets/l_M_kusa05_RGBATEX.bin
header: assets/l_M_kusa05_RGBATEX.h
- symbol: l_M_Hijiki00TEX
binary: assets/l_M_Hijiki00TEX.bin
header: assets/l_M_Hijiki00TEX.h
- symbol: l_M_Kusa_9qDL
binary: assets/l_M_Kusa_9qDL.bin
header: assets/l_M_Kusa_9qDL.h
- symbol: l_M_Kusa_9q_cDL
binary: assets/l_M_Kusa_9q_cDL.bin
header: assets/l_M_Kusa_9q_cDL.h
- symbol: l_M_TenGusaDL
binary: assets/l_M_TenGusaDL.bin
header: assets/l_M_TenGusaDL.h
- symbol: l_Tengusa_matDL
binary: assets/l_Tengusa_matDL.bin
header: assets/l_Tengusa_matDL.h
header_type: none
custom_type: matDL
- symbol: l_kusa9q_matDL
binary: assets/l_kusa9q_matDL.bin
header: assets/l_kusa9q_matDL.h
header_type: none
custom_type: matDL
- symbol: l_kusa9q_l4_matDL
binary: assets/l_kusa9q_l4_matDL.bin
header: assets/l_kusa9q_l4_matDL.h
header_type: none
custom_type: matDL
- symbol: l_J_Ohana00_64TEX
binary: assets/l_J_Ohana00_64TEX.bin
header: assets/l_J_Ohana00_64TEX.h
- symbol: l_J_hana00DL
binary: assets/l_J_hana00DL.bin
header: assets/l_J_hana00DL.h
- symbol: l_J_hana00_cDL
binary: assets/l_J_hana00_cDL.bin
header: assets/l_J_hana00_cDL.h
- symbol: l_matDL!.data:0x806be780
binary: assets/l_matDL__d_a_grass.bin
header: assets/l_matDL__d_a_grass.h
header_type: none
custom_type: matDL
- symbol: l_matLight4DL
binary: assets/l_matLight4DL.bin
header: assets/l_matLight4DL.h
header_type: none
custom_type: matDL
- symbol: l_J_Ohana01_64128_0419TEX
binary: assets/l_J_Ohana01_64128_0419TEX.bin
header: assets/l_J_Ohana01_64128_0419TEX.h
- symbol: l_J_hana01DL
binary: assets/l_J_hana01DL.bin
header: assets/l_J_hana01DL.h
- symbol: l_J_hana01_c_00DL
binary: assets/l_J_hana01_c_00DL.bin
header: assets/l_J_hana01_c_00DL.h
- symbol: l_J_hana01_c_01DL
binary: assets/l_J_hana01_c_01DL.bin
header: assets/l_J_hana01_c_01DL.h
- symbol: l_mat2DL!.data:0x806c0340
binary: assets/l_mat2DL__d_a_grass.bin
header: assets/l_mat2DL__d_a_grass.h
header_type: none
custom_type: matDL
- symbol: l_mat2Light4DL
binary: assets/l_mat2Light4DL.bin
header: assets/l_mat2Light4DL.h
header_type: none
custom_type: matDL

View File

@ -31137,7 +31137,7 @@ black_tex = .rodata:0x80633F60; // type:object size:0x40 scope:global
msg_data = .rodata:0x80633FA0; // type:object size:0x3C0 scope:global
msg_data_fr = .rodata:0x80634360; // type:object size:0x4C0 scope:global
msg_data_sp = .rodata:0x80634820; // type:object size:0x400 scope:global
font_data = .rodata:0x80634C20; // type:object size:0x12260 scope:global
font_data = .rodata:0x80634C20; // type:object size:0x12260 scope:global noreloc
cBmpHeader__13CaptureScreen = .rodata:0x80646E80; // type:object size:0x36 scope:global
mode_name__11dDebugPad_c = .rodata:0x80646EB8; // type:object size:0x24 scope:global
@117855 = .rodata:0x80646EE0; // type:object size:0x39 scope:local
@ -31400,7 +31400,7 @@ m_mainBckShield__9daAlink_c = .rodata:0x8064AF28; // type:object size:0x50 scope
m_mainBckSword__9daAlink_c = .rodata:0x8064AF78; // type:object size:0x14 scope:global
m_mainBckFishing__9daAlink_c = .rodata:0x8064AF90; // type:object size:0x70 scope:global
m_anmDataTable__9daAlink_c = .rodata:0x8064B000; // type:object size:0x1368 scope:global
m_wlAnmDataTable__9daAlink_c = .rodata:0x8064C368; // type:object size:0x498 scope:global
m_wlAnmDataTable__9daAlink_c = .rodata:0x8064C368; // type:object size:0x498 scope:global noreloc
m_faceTexDataTable__9daAlink_c = .rodata:0x8064C800; // type:object size:0x28C scope:global
m_procInitTable__9daAlink_c = .rodata:0x8064CA90; // type:object size:0x1600 scope:global
@LOCAL@checkCutAction__9daAlink_cFv@atnNormalType1 = .rodata:0x8064E090; // type:object size:0x14 scope:local
@ -31681,7 +31681,7 @@ cNullVec__6Z2Calc = .rodata:0x80650170; // type:object size:0xC scope:local
cNullVec__6Z2Calc = .rodata:0x806504F8; // type:object size:0xC scope:local
...rodata.0 = .rodata:0x80650520; // type:label scope:local
l_listData__9dMd_HIO_c = .rodata:0x80650520; // type:object size:0x8F8 scope:global
l_paletteDmap_m = .rodata:0x80650E20; // type:object size:0xF0 scope:global
l_paletteDmap_m = .rodata:0x80650E20; // type:object size:0xF0 scope:global noreloc
m_other__22dMdm_HIO_prm_res_src_s = .rodata:0x80650F10; // type:object size:0x1C scope:global
@LOCAL@getColor__15renderingDmap_cFi@l_dungeon_offColor = .rodata:0x80650F2C; // type:object size:0x24 scope:local
@LOCAL@getColor__15renderingDmap_cFi@l_dungeon_onColor@0 = .rodata:0x80650F50; // type:object size:0x24 scope:local
@ -32029,7 +32029,7 @@ sIrritated__8Z2MdnPrm = .rodata:0x80655B3C; // type:object size:0x5E scope:globa
sIrritatedTail__8Z2MdnPrm = .rodata:0x80655B9C; // type:object size:0xA scope:global
sOrder__8Z2MdnPrm = .rodata:0x80655BA8; // type:object size:0x72 scope:global
sResent__8Z2MdnPrm = .rodata:0x80655C1C; // type:object size:0x6A scope:global
sCheerful__8Z2MdnPrm = .rodata:0x80655C88; // type:object size:0x6A scope:global
sCheerful__8Z2MdnPrm = .rodata:0x80655C88; // type:object size:0x6A scope:global noreloc
sConfused__8Z2MdnPrm = .rodata:0x80655CF4; // type:object size:0x6A scope:global
sHostility__8Z2MdnPrm = .rodata:0x80655D60; // type:object size:0x68 scope:global
sTired__8Z2MdnPrm = .rodata:0x80655DC8; // type:object size:0x6A scope:global
@ -32037,7 +32037,7 @@ sSerious__8Z2MdnPrm = .rodata:0x80655E34; // type:object size:0x6A scope:global
sReplyb__8Z2MdnPrm = .rodata:0x80655EA0; // type:object size:0x54 scope:global
sApologize__8Z2MdnPrm = .rodata:0x80655EF4; // type:object size:0x64 scope:global
sApologizeTail__8Z2MdnPrm = .rodata:0x80655F58; // type:object size:0x9 scope:global data:string
sDeside__8Z2MdnPrm = .rodata:0x80655F64; // type:object size:0x64 scope:global
sDeside__8Z2MdnPrm = .rodata:0x80655F64; // type:object size:0x64 scope:global noreloc
sAfford__8Z2MdnPrm = .rodata:0x80655FC8; // type:object size:0x68 scope:global
sAffordTail__8Z2MdnPrm = .rodata:0x80656030; // type:object size:0xC scope:global
sPrm__8Z2MdnPrm = .rodata:0x8065603C; // type:object size:0xCC scope:global
@ -32564,8 +32564,8 @@ l_matDL = .data:0x80662C00; // type:object size:0x84 scope:local
@118189 = .data:0x80662C84; // type:object size:0xD scope:local data:string
@118190 = .data:0x80662C98; // type:object size:0x20 scope:local data:string
@118373 = .data:0x80662CB8; // type:object size:0xC scope:local data:string
l_mat1DL = .data:0x80662CE0; // type:object size:0x8D scope:global
l_mat2DL = .data:0x80662D80; // type:object size:0x84 scope:local
l_mat1DL = .data:0x80662CE0; // type:object size:0x8D scope:global noreloc
l_mat2DL = .data:0x80662D80; // type:object size:0x84 scope:local noreloc
@119068 = .data:0x80662E04; // type:object size:0x11 scope:local data:string
@119069 = .data:0x80662E18; // type:object size:0x14 scope:local data:string
@119070 = .data:0x80662E2C; // type:object size:0x14 scope:local data:string
@ -35332,7 +35332,7 @@ __vt__Q25daObj12HioVarious_c = .data:0x80675738; // type:object size:0x1C scope:
@119569 = .data:0x80675B3C; // type:object size:0xA scope:local data:string
@119705 = .data:0x80675B48; // type:object size:0xC scope:local data:string
@119706 = .data:0x80675B58; // type:object size:0x20 scope:local
@LOCAL@draw__6dBgp_cFP10fopAc_ac_c@l_dispBitTable = .data:0x80675B78; // type:object size:0x10 scope:local
@LOCAL@draw__6dBgp_cFP10fopAc_ac_c@l_dispBitTable = .data:0x80675B78; // type:object size:0x10 scope:local noreloc
@119776 = .data:0x80675B88; // type:object size:0xC scope:local data:string
@119828 = .data:0x80675B98; // type:object size:0x10 scope:local data:string
@119829 = .data:0x80675BA8; // type:object size:0xC scope:local data:string
@ -39297,7 +39297,7 @@ l_shadowVolPos = .data:0x80693318; // type:object size:0x60 scope:global
l_shadowVolDL = .data:0x80693380; // type:object size:0x3B scope:global
l_dbgShadowProjMat = .data:0x806933C0; // type:object size:0x55 scope:global
l_shadowProjMat = .data:0x80693420; // type:object size:0x5A scope:global
l_shadowVolMat = .data:0x80693480; // type:object size:0x5A scope:global
l_shadowVolMat = .data:0x80693480; // type:object size:0x5A scope:global noreloc
l_clearMat = .data:0x806934E0; // type:object size:0x55 scope:global
@121337 = .data:0x80693538; // type:object size:0x16 scope:local data:string
@121358 = .data:0x80693550; // type:object size:0xD scope:local data:string
@ -43233,9 +43233,9 @@ l_texCoord = .data:0x806BD240; // type:object size:0xA0 scope:global
l_M_Kusa_9qDL = .data:0x806BD2E0; // type:object size:0xCB scope:global
l_M_Kusa_9q_cDL = .data:0x806BD3C0; // type:object size:0xCB scope:global
l_M_TenGusaDL = .data:0x806BD4A0; // type:object size:0xD4 scope:global
l_Tengusa_matDL = .data:0x806BD580; // type:object size:0xA8 scope:global
l_kusa9q_matDL = .data:0x806BD640; // type:object size:0xA8 scope:global
l_kusa9q_l4_matDL = .data:0x806BD700; // type:object size:0xA8 scope:global
l_Tengusa_matDL = .data:0x806BD580; // type:object size:0xA8 scope:global noreloc
l_kusa9q_matDL = .data:0x806BD640; // type:object size:0xA8 scope:global noreloc
l_kusa9q_l4_matDL = .data:0x806BD700; // type:object size:0xA8 scope:global noreloc
@119725 = .data:0x806BD7A8; // type:object size:0xC scope:local
@119727 = .data:0x806BD7B4; // type:object size:0x11 scope:local
@LOCAL@draw__15dGrass_packet_cFv@l_vtxDescList = .data:0x806BD7C8; // type:object size:0x28 scope:local
@ -43776,7 +43776,7 @@ __vt__14daObj_SSBase_c = .data:0x806C9BA0; // type:object size:0x14 scope:global
@130813 = .data:0x806C9C24; // type:object size:0xB scope:local data:string
@130814 = .data:0x806C9C30; // type:object size:0xB scope:local data:string
@LOCAL@loadData__14daPy_anmHeap_cFUs@arcName@7 = .data:0x806C9C40; // type:object size:0x20 scope:local
l_sightDL = .data:0x806C9C60; // type:object size:0x89 scope:global
l_sightDL = .data:0x806C9C60; // type:object size:0x89 scope:global noreloc
__vt__18daPy_sightPacket_c = .data:0x806C9CF0; // type:object size:0x10 scope:global
@131223 = .data:0x806C9D00; // type:object size:0x13 scope:local data:string
@131224 = .data:0x806C9D14; // type:object size:0xC scope:local
@ -45392,7 +45392,7 @@ __vt__10dMdm_HIO_c = .data:0x806D3B78; // type:object size:0x20 scope:global
@118636 = .data:0x806D3FE4; // type:object size:0x44 scope:local
@118770 = .data:0x806D4028; // type:object size:0xD scope:local data:string
@118771 = .data:0x806D4038; // type:object size:0x20 scope:local data:string
l_data = .data:0x806D4060; // type:object size:0xF4 scope:local
l_data = .data:0x806D4060; // type:object size:0xF4 scope:local noreloc
@118790 = .data:0x806D4154; // type:object size:0x9 scope:local data:string
@118844 = .data:0x806D4160; // type:object size:0x16 scope:local data:string
@118845 = .data:0x806D4178; // type:object size:0x13 scope:local data:string
@ -45628,7 +45628,7 @@ __vt__9dMf_HIO_c = .data:0x806D5778; // type:object size:0x20 scope:global
@116762 = .data:0x806D5D64; // type:object size:0xF scope:local data:string
@116794 = .data:0x806D5D74; // type:object size:0x11 scope:local data:string
@116795 = .data:0x806D5D88; // type:object size:0x16 scope:local data:string
l_data = .data:0x806D5DA0; // type:object size:0x16E scope:local
l_data = .data:0x806D5DA0; // type:object size:0x16E scope:local noreloc
@116880 = .data:0x806D5F10; // type:object size:0xB scope:local data:string
@116881 = .data:0x806D5F1C; // type:object size:0xB scope:local data:string
@117071 = .data:0x806D5F28; // type:object size:0x11 scope:local data:string
@ -50938,7 +50938,7 @@ SEND_TABLE__6JASDsp = .data:0x806FE3D8; // type:object size:0x18 scope:global
@3887 = .data:0x806FE45C; // type:object size:0x16 scope:local data:string
@3921 = .data:0x806FE474; // type:object size:0x9 scope:local data:string
@3922 = .data:0x806FE480; // type:object size:0x3C scope:local
jdsp = .data:0x806FE4C0; // type:object size:0x1F80 scope:global
jdsp = .data:0x806FE4C0; // type:object size:0x1F80 scope:global noreloc
__vt__10JAIAudible = .data:0x80700440; // type:object size:0x14 scope:global
@15963 = .data:0x80700454; // type:object size:0xB scope:local data:string
...data.0 = .data:0x80700460; // type:label scope:local
@ -53111,8 +53111,8 @@ __vt__12JUTException = .data:0x807102D0; // type:object size:0x10 scope:global
@67118 = .data:0x8071031C; // type:object size:0xC scope:local data:string
...data.0 = .data:0x80710328; // type:label scope:local
sAsciiTable__14JUTDirectPrint = .data:0x80710328; // type:object size:0x80 scope:global
sFontData__14JUTDirectPrint = .data:0x807103A8; // type:object size:0x100 scope:global
sFontData2__14JUTDirectPrint = .data:0x807104A8; // type:object size:0x134 scope:global
sFontData__14JUTDirectPrint = .data:0x807103A8; // type:object size:0x100 scope:global noreloc
sFontData2__14JUTDirectPrint = .data:0x807104A8; // type:object size:0x134 scope:global noreloc
@LOCAL@drawChar__14JUTDirectPrintFiii@twiceBit = .data:0x807105E0; // type:object size:0x10 scope:local
@21132 = .data:0x807105F0; // type:object size:0xF scope:local data:string
@21134 = .data:0x80710600; // type:object size:0x13 scope:local data:string
@ -55462,7 +55462,7 @@ ShutdownFunctionInfo = .data:0x8072C8A8; // type:object size:0x10 scope:local
@2337 = .data:0x8072CDC0; // type:object size:0x39 scope:local data:string
@2373 = .data:0x8072CDFC; // type:object size:0x1E scope:local data:string
...data.0 = .data:0x8072CE20; // type:label scope:local
gammaSet = .data:0x8072CE20; // type:object size:0x41E scope:global
gammaSet = .data:0x8072CE20; // type:object size:0x41E scope:global noreloc
VINtscACPType1 = .data:0x8072D240; // type:object size:0x1A scope:global
VINtscACPType2 = .data:0x8072D25C; // type:object size:0x1A scope:global
VINtscACPType3 = .data:0x8072D278; // type:object size:0x1A scope:global
@ -65355,7 +65355,7 @@ l_list__10dMap_HIO_c = .sdata2:0x8074DA40; // type:object size:0x8 scope:global
@134906 = .sdata2:0x8074DB00; // type:object size:0x4 scope:local data:float
@134907 = .sdata2:0x8074DB04; // type:object size:0x4 scope:local data:float
@135380 = .sdata2:0x8074DB08; // type:object size:0x8 scope:local data:double
M_dir_base__Q212daObjMovebox5Act_c = .sdata2:0x8074DB10; // type:object size:0x8 scope:global
M_dir_base__Q212daObjMovebox5Act_c = .sdata2:0x8074DB10; // type:object size:0x8 scope:global noreloc
@122969 = .sdata2:0x8074DB18; // type:object size:0x4 scope:local data:4byte
@122973 = .sdata2:0x8074DB1C; // type:object size:0x4 scope:local data:float
@123218 = .sdata2:0x8074DB20; // type:object size:0x4 scope:local data:float
@ -66330,7 +66330,7 @@ l_tksStartColor = .sdata2:0x8074DD10; // type:object size:0x4 scope:global
@117671 = .sdata2:0x8074EBA0; // type:object size:0x4 scope:local data:4byte
@117673 = .sdata2:0x8074EBA4; // type:object size:0x4 scope:local data:4byte
@117675 = .sdata2:0x8074EBA8; // type:object size:0x4 scope:local data:4byte
@117696 = .sdata2:0x8074EBAC; // type:object size:0x4 scope:local data:4byte
@117696 = .sdata2:0x8074EBAC; // type:object size:0x4 scope:local data:4byte noreloc
@117700 = .sdata2:0x8074EBB0; // type:object size:0x4 scope:local data:4byte
@117768 = .sdata2:0x8074EBB4; // type:object size:0x4 scope:local data:float
@117769 = .sdata2:0x8074EBB8; // type:object size:0x4 scope:local data:float
@ -66976,7 +66976,7 @@ l_arcName = .sdata2:0x8074EDF0; // type:object size:0x6 scope:local data:string
@125985 = .sdata2:0x8074F6A4; // type:object size:0x4 scope:local data:float
@125986 = .sdata2:0x8074F6A8; // type:object size:0x4 scope:local data:float
@125998 = .sdata2:0x8074F6AC; // type:object size:0x4 scope:local data:4byte
@126000 = .sdata2:0x8074F6B0; // type:object size:0x4 scope:local data:4byte
@126000 = .sdata2:0x8074F6B0; // type:object size:0x4 scope:local data:4byte noreloc
@126002 = .sdata2:0x8074F6B4; // type:object size:0x4 scope:local data:4byte
@126004 = .sdata2:0x8074F6B8; // type:object size:0x4 scope:local data:4byte
@126037 = .sdata2:0x8074F6BC; // type:object size:0x4 scope:local data:float
@ -66986,7 +66986,7 @@ l_arcName = .sdata2:0x8074EDF0; // type:object size:0x6 scope:local data:string
@126410 = .sdata2:0x8074F6CC; // type:object size:0x4 scope:local data:float
@126509 = .sdata2:0x8074F6D0; // type:object size:0x4 scope:local data:float
@126519 = .sdata2:0x8074F6D4; // type:object size:0x4 scope:local data:4byte
@126521 = .sdata2:0x8074F6D8; // type:object size:0x4 scope:local data:4byte
@126521 = .sdata2:0x8074F6D8; // type:object size:0x4 scope:local data:4byte noreloc
@126523 = .sdata2:0x8074F6DC; // type:object size:0x4 scope:local data:4byte
@126525 = .sdata2:0x8074F6E0; // type:object size:0x4 scope:local data:4byte
@126537 = .sdata2:0x8074F6E4; // type:object size:0x4 scope:local data:float
@ -67011,13 +67011,13 @@ l_arcName = .sdata2:0x8074EDF0; // type:object size:0x6 scope:local data:string
@128307 = .sdata2:0x8074F730; // type:object size:0x4 scope:local data:float
@128308 = .sdata2:0x8074F734; // type:object size:0x4 scope:local data:float
@128852 = .sdata2:0x8074F738; // type:object size:0x4 scope:local data:4byte
@128854 = .sdata2:0x8074F73C; // type:object size:0x4 scope:local data:4byte
@128854 = .sdata2:0x8074F73C; // type:object size:0x4 scope:local data:4byte noreloc
@128856 = .sdata2:0x8074F740; // type:object size:0x4 scope:local data:4byte
@128858 = .sdata2:0x8074F744; // type:object size:0x4 scope:local data:4byte
@128994 = .sdata2:0x8074F748; // type:object size:0x4 scope:local data:float
@128995 = .sdata2:0x8074F74C; // type:object size:0x4 scope:local data:float
@130333 = .sdata2:0x8074F750; // type:object size:0x4 scope:local data:4byte
@130335 = .sdata2:0x8074F754; // type:object size:0x4 scope:local data:4byte
@130335 = .sdata2:0x8074F754; // type:object size:0x4 scope:local data:4byte noreloc
@130337 = .sdata2:0x8074F758; // type:object size:0x4 scope:local data:4byte
@130339 = .sdata2:0x8074F75C; // type:object size:0x4 scope:local data:4byte
@130356 = .sdata2:0x8074F760; // type:object size:0x4 scope:local data:4byte
@ -67178,7 +67178,7 @@ m_cullfar_max__12daShopItem_c = .sdata2:0x8074F9C4; // type:object size:0x4 scop
@118049 = .sdata2:0x8074FA1C; // type:object size:0x4 scope:local data:float
@118141 = .sdata2:0x8074FA20; // type:object size:0x4 scope:local data:float
@117226 = .sdata2:0x8074FA28; // type:object size:0x4 scope:local data:float
@117263 = .sdata2:0x8074FA2C; // type:object size:0x4 scope:local data:4byte
@117263 = .sdata2:0x8074FA2C; // type:object size:0x4 scope:local data:4byte noreloc
@117267 = .sdata2:0x8074FA30; // type:object size:0x4 scope:local data:float
@117345 = .sdata2:0x8074FA34; // type:object size:0x4 scope:local data:float
@130833 = .sdata2:0x8074FA38; // type:object size:0x4 scope:local data:float

4
configure.py Normal file → Executable file
View File

@ -2170,7 +2170,7 @@ config.libs = [
config.custom_build_rules = [
{
"name": "convert_matDL",
"command": "$python tools/converters/matDL_dis.py $in $out --symbol $symbol",
"command": "$python tools/converters/matDL_dis.py $in $out --symbol $symbol --scope $scope",
"description": "CONVERT $symbol",
},
]
@ -2184,6 +2184,7 @@ out_dir = config.build_dir / version
# This generates the build steps needed for preprocessing
def emit_build_rule(asset):
steps = config.custom_build_steps.setdefault("pre-compile", [])
custom_data = asset.get("custom_data") or {}
match asset.get("custom_type"):
case None:
@ -2197,6 +2198,7 @@ def emit_build_rule(asset):
"outputs": out_dir / "include" / asset["header"],
"variables": {
"symbol": asset["symbol"],
"scope": custom_data.get("scope", "local")
},
"implicit": Path("tools/converters/matDL_dis.py"),
}

View File

@ -1178,8 +1178,8 @@ SECTION_DATA static u8 l_flowerTexCoord[] = {
#include "assets/l_J_hana00_cDL.h" // ALIGN 32
/* 80525AD8-80525B78 002900 0099+07 0/2 0/0 0/0 .data l_matDL */
#include "assets/l_matDL.h"
l_matDL(l_J_Ohana00_64TEX)
#include "assets/l_matDL__d_a_grass.h"
l_matDL__d_a_grass(l_J_Ohana00_64TEX)
/* 80525B78-80525C18 0029A0 0099+07 0/2 0/0 0/0 .data l_matLight4DL */
#include "assets/l_matLight4DL.h"
@ -1341,8 +1341,8 @@ SECTION_DATA static u8 l_flowerTexCoord2[] = {
#include "assets/l_J_hana01_c_01DL.h" // ALIGN 32
/* 80527698-80527738 0044C0 0099+07 0/2 0/0 0/0 .data l_mat2DL */
#include "assets/l_mat2DL.h"
l_mat2DL(l_J_Ohana01_64128_0419TEX)
#include "assets/l_mat2DL__d_a_grass.h"
l_mat2DL__d_a_grass(l_J_Ohana01_64128_0419TEX)
/* 80527738-805277D4 004560 0099+03 0/2 0/0 0/0 .data l_mat2Light4DL */
#include "assets/l_mat2Light4DL.h"

View File

@ -586,7 +586,7 @@ static u8 l_shadowVolMat[] ALIGN_DECL(32) = {
0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFC, 0x61, 0xC1, 0x08, 0xFF, 0x90,
0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x0D, 0x61, 0x41, 0x00, 0x01, 0x35,
0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@ -35,7 +35,7 @@ static void messageSet(u32 status, bool i_drawBg) {
BMG_INF1* inf1 = (BMG_INF1*)&msg_data[0x20];
const char* msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]);
JUT_ASSERT(std::strlen(msg_p)-1 < 512);
JUT_ASSERT(102, std::strlen(msg_p)-1 < 512);
J2DTextBox tpane('TEXT1', JGeometry::TBox2<f32>(0.0f, 0.0f, 608.0f, 200.0f), (ResFONT*)font_data, msg_p, 512, HBIND_CENTER, VBIND_CENTER);
J2DTextBox spane('TEXT2', JGeometry::TBox2<f32>(0.0f, 0.0f, 608.0f, 200.0f), (ResFONT*)font_data, msg_p, 512, HBIND_CENTER, VBIND_CENTER);
@ -85,7 +85,7 @@ static void messageSet(u32 status, bool i_drawBg) {
if (*msg_p == '\n') {
height += 23.0f;
cnt++;
JUT_ASSERT(cnt < lineMax);
JUT_ASSERT(191, cnt < lineMax);
continue;
}

View File

@ -477,67 +477,67 @@ void renderingDmap_c::getLineWidth(int param_0) {
/* ############################################################################################## */
/* 80395860-80395950 -00001 00F0+00 1/1 0/0 0/0 .rodata l_paletteDmap_m */
SECTION_RODATA static void* const l_paletteDmap_m[60] = {
(void*)NULL,
(void*)NULL,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0xA208A208,
(void*)0xA208A208,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x81008100,
(void*)0x81008100,
(void*)0xA208A208,
(void*)0xA208A208,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x9CE79CE7,
(void*)0x9CE79CE7,
(void*)0x81108110,
(void*)0x81108110,
(void*)0xA208A208,
(void*)0xA208A208,
(void*)0x98109810,
(void*)0x98109810,
(void*)0x98009800,
(void*)0x98009800,
(void*)0x82008200,
(void*)0x82008200,
(void*)0xC3F0C3F0,
(void*)0xC3F0C3F0,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x9CE79CE7,
(void*)0x9CE79CE7,
(void*)0x821F821F,
(void*)0x821F821F,
(void*)0xC3F0C3F0,
(void*)0xC3F0C3F0,
(void*)0xB01FB01F,
(void*)0xB01FB01F,
(void*)0xB000B000,
(void*)0xB000B000,
(void*)0x98C698C6,
(void*)0x98C698C6,
(void*)0xE739E739,
(void*)0xE739E739,
(void*)0x98C698C6,
(void*)0x98C698C6,
(void*)0xE739E739,
(void*)0xE739E739,
(void*)NULL,
(void*)NULL,
SECTION_RODATA static u32 const l_paletteDmap_m[60] = {
0x00000000,
0x00000000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0xA208A208,
0xA208A208,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x81008100,
0x81008100,
0xA208A208,
0xA208A208,
0x80008000,
0x80008000,
0x9CE79CE7,
0x9CE79CE7,
0x81108110,
0x81108110,
0xA208A208,
0xA208A208,
0x98109810,
0x98109810,
0x98009800,
0x98009800,
0x82008200,
0x82008200,
0xC3F0C3F0,
0xC3F0C3F0,
0x80008000,
0x80008000,
0x9CE79CE7,
0x9CE79CE7,
0x821F821F,
0x821F821F,
0xC3F0C3F0,
0xC3F0C3F0,
0xB01FB01F,
0xB01FB01F,
0xB000B000,
0xB000B000,
0x98C698C6,
0x98C698C6,
0xE739E739,
0xE739E739,
0x98C698C6,
0x98C698C6,
0xE739E739,
0xE739E739,
0x00000000,
0x00000000,
};
COMPILER_STRIP_GATE(0x80395860, &l_paletteDmap_m);
@ -792,68 +792,68 @@ void dMenu_DmapMapCtrl_c::getZoomCmPerPixel() {
/* 803BCBC0-803BCCB4 -00001 00F4+00 0/0 0/0 0/0 .data l_data */
#pragma push
#pragma force_active on
SECTION_DATA static void* l_data[61] = {
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)NULL,
(void*)NULL,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0xA208A208,
(void*)0xA208A208,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x81008100,
(void*)0x81008100,
(void*)0xA208A208,
(void*)0xA208A208,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x9CE79CE7,
(void*)0x9CE79CE7,
(void*)0x81108110,
(void*)0x81108110,
(void*)0xA208A208,
(void*)0xA208A208,
(void*)0x98109810,
(void*)0x98109810,
(void*)0x98009800,
(void*)0x98009800,
(void*)0x82008200,
(void*)0x82008200,
(void*)0xC3F0C3F0,
(void*)0xC3F0C3F0,
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
(void*)0x9CE79CE7,
(void*)0x9CE79CE7,
(void*)0x821F821F,
(void*)0x821F821F,
(void*)0xC3F0C3F0,
(void*)0xC3F0C3F0,
(void*)0xB01FB01F,
(void*)0xB01FB01F,
(void*)0xB000B000,
(void*)0xB000B000,
(void*)0x98C698C6,
(void*)0x98C698C6,
(void*)0xE739E739,
(void*)0xE739E739,
(void*)0x98C698C6,
(void*)0x98C698C6,
(void*)0xE739E739,
(void*)0xE739E739,
(void*)0x45610000,
SECTION_DATA static u32 l_data[61] = {
0x80008000,
0x80008000,
0x00000000,
0x00000000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0xA208A208,
0xA208A208,
0x80008000,
0x80008000,
0x80008000,
0x80008000,
0x81008100,
0x81008100,
0xA208A208,
0xA208A208,
0x80008000,
0x80008000,
0x9CE79CE7,
0x9CE79CE7,
0x81108110,
0x81108110,
0xA208A208,
0xA208A208,
0x98109810,
0x98109810,
0x98009800,
0x98009800,
0x82008200,
0x82008200,
0xC3F0C3F0,
0xC3F0C3F0,
0x80008000,
0x80008000,
0x9CE79CE7,
0x9CE79CE7,
0x821F821F,
0x821F821F,
0xC3F0C3F0,
0xC3F0C3F0,
0xB01FB01F,
0xB01FB01F,
0xB000B000,
0xB000B000,
0x98C698C6,
0x98C698C6,
0xE739E739,
0xE739E739,
0x98C698C6,
0x98C698C6,
0xE739E739,
0xE739E739,
0x45610000,
};
#pragma pop
@ -1286,4 +1286,4 @@ SECTION_DATA extern void* __vt__15renderingDmap_c[43 + 1 /* padding */] = {
(void*)getRestartCursorSize__15renderingDmap_cFv,
/* padding */
NULL,
};
};

View File

@ -2141,7 +2141,7 @@ static u8 l_matDL[132] ALIGN_DECL(32) = {
/* 803A3160-803A31F0 000280 008D+03 1/1 0/0 0/0 .data l_mat1DL */
static u8 l_mat1DL[141] ALIGN_DECL(32) = {
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x00, 0x00, 0x00, 0x00, 0xF3, 0xCF, 0x00, 0x10,
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x80, 0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10,
0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F,
0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF,
0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08,

27
tools/converters/matDL_dis.py Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from argparse import ArgumentParser
import struct
import os
@ -322,7 +324,7 @@ def read_u16(binary_file):
return struct.unpack(">H", chunk)[0]
def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name):
def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name, scope):
# Load data
macro_name = os.path.splitext(os.path.basename(src_path))[0]
with open(src_path, "rb") as binary_file, open(dest_path, "w") as c_file:
@ -340,11 +342,15 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name):
line_with_escape = line + (" "*(99-len(line))) + "\\\n"
c_file.write(line_with_escape)
if scope == "local":
var_def_prefix = "static "
else:
var_def_prefix = ""
write_macro_line(f"#define {macro_name}(TEX_NAME)")
write_macro_line(f"u8 {symbol_name}[] ALIGN_DECL(32) = {{")
write_macro_line(f"{var_def_prefix}u8 {symbol_name}[] ALIGN_DECL(32) = {{")
while True:
print(binary_file.tell())
command_type = read_u8(binary_file)
if command_type is None:
break
@ -397,7 +403,6 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name):
else:
raise Exception(f"Unknown command type: {command_type:02X}")
print(line_elements)
write_macro_line(" " + ", ".join(line_elements) + ",")
c_file.write("};\n")
@ -409,10 +414,20 @@ def main():
)
parser.add_argument("src_path", type=str, help="Binary source file path")
parser.add_argument("dest_path", type=str, help="Destination C include file path")
parser.add_argument("--symbol", type=str, help="Symbol name")
parser.add_argument(
"--symbol",
type=str,
help="Symbol name",
)
parser.add_argument(
"--scope",
choices=["global", "local"],
default="local",
help="The scope of the symbol",
)
args = parser.parse_args()
convert_binary_to_matDL_c_source(args.src_path, args.dest_path, args.symbol)
convert_binary_to_matDL_c_source(args.src_path, args.dest_path, args.symbol, args.scope)
if __name__ == "__main__":

0
tools/download_tool.py Normal file → Executable file
View File

0
tools/transform_dep.py Normal file → Executable file
View File

0
tools/upload_progress.py Normal file → Executable file
View File