Tidy up sched.c and related functions

This commit is contained in:
Ryan Dwyer committed 2021-10-18 17:10:28 +10:00
1 parent 78cae3fe60
commit 3eb8137335
39 files changed
+454 -377

No files matched your search

+4 -1
View File
@@ -32,5 +32,8 @@ opt_flags = [x for x in compile_args if x in ['-g', '-O2', '-O1', '-framepointer
preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c')
subprocess.check_call(asm_processor + opt_flags + [in_file], stdout=preprocessed_file)
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name])
try:
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name])
except subprocess.CalledProcessError:
exit(1)
subprocess.check_call(asm_processor + opt_flags + [in_file, '--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude])
+3 -3
View File
@@ -185,11 +185,11 @@ class Tool:
self.fd = open(sys.argv[1], 'rb+')
self.patch(algo01, '__scHandleRetrace', 'bootPhase1')
self.patch(algo02, 'cheatMenuHandleDialog', '__scHandleRetrace')
self.patch(algo01, '__scHandleTasks', 'bootPhase1')
self.patch(algo02, 'cheatMenuHandleDialog', '__scHandleTasks')
self.patch(algo03, 'propobjHandlePickupByAibot', 'func0f08e2ac')
self.patch(algo04, 'chrUncloak', 'propobjHandlePickupByAibot')
self.patch(algo05, 'chrsCheckForNoise', 'func00002078')
self.patch(algo05, 'chrsCheckForNoise', '__scHandleRetrace')
self.patch(algo06, 'lvInit', 'lvGetSlowMotionType')
self.patch(algo07, 'propAllocateEyespy', 'lvInit')
self.patch(algo08, 'chrConsiderGrenadeThrow', 'bgInit')