JSRF-Decompilation/ghidra/make_header.sh
KeybadeBlox 20fecdd5fb Fixes for delinking
Fixes delink failures in Action.obj and ActSequence.obj.

Some missing data types have been added to each corresponding header
file, and entries have been added to the symbol table to fix errors from
undefined types.  The mangling script has also been amended to handle
method pointers as they're currently imported into Ghidra (which are
missing the calling convention, and likely behind a typedef).
2026-05-02 20:34:05 -04:00

24 lines
657 B
Bash
Executable file

#!/bin/sh -eu
# Merges all header files in the decompilation into a C header file called
# jsrf.h for importing into Ghidra
# Create output file
printf '%s\n' '// Automatically generated mass header file for Ghidra' > jsrf.h
# Figuring out include order programmatically is awful, so we'll have to add
# all the headers here by hand in an order that functions properly
HEADERS="
XDK/CRT/stddef.h
XDK/Win32.h
XDK/CRT/ehdata.h
XDK/D3D.h
MUSASHI/MMatrix.hpp
JSRF/Action.hpp
JSRF/ActSequence.hpp
JSRF/SaveData.hpp
"
# Process each header file into jsrf.h
for header in $HEADERS; do
awk -f headerconvert.awk "../decompile/src/$header" >> jsrf.h
done