35 lines
825 B
Python
35 lines
825 B
Python
|
from supSMSGecko import build, make_xml, symbols
|
||
|
|
||
|
extra_ld_input = '''
|
||
|
drawText = 0x817f0238;
|
||
|
|
||
|
/** struct {u8 patterns[3], u8 cursor} */
|
||
|
$patterns = 0x817f0024;
|
||
|
|
||
|
/* size = 0x14 */
|
||
|
$rectOpt = 0x817f0410;
|
||
|
|
||
|
/* size = 0x10 */
|
||
|
$textOpt = 0x817f0424;
|
||
|
|
||
|
/* size = 13 "%c%X%c%X%c%X" */
|
||
|
$fmt = 0x817f0434;
|
||
|
|
||
|
/* size = 53 */
|
||
|
$data = 0x817f0441;
|
||
|
'''
|
||
|
|
||
|
def main(g, ver):
|
||
|
S = symbols[ver]
|
||
|
g.C2(S['TSpineEnemy_goToRandomNextGraphNode'] + 0x50, 'src/selector.s', extra_ld_input=extra_ld_input)
|
||
|
g.C2(S['drawWater'] - 0x24, 'src/draw.s', extra_ld_input=extra_ld_input)
|
||
|
|
||
|
def main_data(g, ver):
|
||
|
g.c_kit(0x817f0441, 'src/pattern-data.s', entries=[])
|
||
|
|
||
|
# compile main code to @code.xml
|
||
|
make_xml(main)
|
||
|
# compile pattern-data.s to @code-data.txt
|
||
|
with open('@code-data.txt', 'w') as fw:
|
||
|
print(build(main_data, 'GMSJ01').dump_txt(''), file=fw)
|