mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 21:28:00 -04:00
Decompile joint, collide-func, clean up joint decompression code for all games (#3369)
I finally read through all the joint code and wrote up some documentation. I think this will be really helpful when we try to understand all the functions in `process-drawable`, or if somebody ever wants to import/export animations. This switches all three games to using a new faster GOAL joint decompressor. It is on by default, but you can go back to the old version by setting `*use-new-decompressor*` to false. Also fix the log-related crash, fix the clock speed used in timer math.
This commit is contained in:
@@ -228,7 +228,17 @@ struct Mips2C_Output {
|
||||
result += "void link() {\n";
|
||||
// lookup all symbols
|
||||
for (auto& sym : symbol_cache) {
|
||||
result += fmt::format(" cache.{} = intern_from_c(\"{}\").c();\n", goal_to_c_name(sym), sym);
|
||||
switch (version) {
|
||||
case GameVersion::Jak1:
|
||||
case GameVersion::Jak2:
|
||||
result +=
|
||||
fmt::format(" cache.{} = intern_from_c(\"{}\").c();\n", goal_to_c_name(sym), sym);
|
||||
break;
|
||||
case GameVersion::Jak3:
|
||||
result += fmt::format(" cache.{} = intern_from_c(-1, 0, \"{}\").c();\n",
|
||||
goal_to_c_name(sym), sym);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// this adds us to a table for lookup later, and also allocates our trampoline.
|
||||
result += fmt::format(" gLinkedFunctionTable.reg(\"{}\", execute, PUT_STACK_SIZE_HERE);\n",
|
||||
|
||||
Reference in New Issue
Block a user