Files
Diddy-Kong-Racing/generate_ctx.sh
T
Ryan MyersandGitHub 34508976cd Match audioline_init (#497)
* Fix some AVOID_UB stuff, and some small documenting.

* Fix m2ctx.py and add NON_EQUIV func_80045C48

* Minor issue cleanups

* Clean up audioline_ambient_create match

* Match func_80008040 as audioline_init, fix the generate ctx script, and some small warning stuff.

* Minor work on func_80008174 so it can be NON_EQUIVALENT again

* redefine asm abs

* Hackishly fix the ctx file when generated.

* Use some more constants and got rid of some start: auto stuff which is not recommended in splat anymore for BSS

* Do some documenting, and slightly better matches using JFG source.

* Formatting

* Clean up some more audio stuff

* Further cleanup and naming of things
2025-04-05 16:00:13 -04:00

17 lines
640 B
Bash
Executable File

#!/bin/bash
if [ $# -eq 0 ]; then
.venv/bin/python3 tools/python/m2ctx.py
else
find include/ src/ libultra/ -type f -name "*.h" | sed -e 's/.*/#include "\0"/' > ctx_includes.c
.venv/bin/python3 tools/m2ctx.py ctx_includes.c
fi
#Forcefully fix issues in the ctx.c file in the hackiest way for now. These defines mess things up.
sed -i "/TT_COURSES$/d" ctx.c
sed -i "/SAVE_COURSES$/d" ctx.c
sed -i 's/ u32 courseTime\[COURSE_RECORD_TOTAL\];/ u32 courseTime[47];/' ctx.c
sed -i 's/ HudElement entry\[HUD_ELEMENT_COUNT\];/ HudElement entry[59];/' ctx.c
sed -i 's/ void \*entry\[HUD_ELEMENT_COUNT\];/ void \*entry\[59\];/' ctx.c