Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
416 B
Python
9 lines
416 B
Python
# Replaces one function's block in all.c with a separately decompiled one. Usage: splice.py all.c new.c
|
|
import sys
|
|
src, new = sys.argv[1:3]
|
|
s, n = open(src).read(), open(new).read()
|
|
if 'failed:' in n: sys.exit('still failed: ' + n[:200])
|
|
i = s.index(n.split('\n')[0].rsplit(' ', 1)[0] + ' ') # "//@@ <addr> "
|
|
j = s.find('\n//@@ ', i + 5) + 1 or len(s)
|
|
open(src, 'w').write(s[:i] + n.rstrip('\n') + '\n\n' + s[j:])
|