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:
water111
2024-02-11 09:50:07 -05:00
committed by GitHub
parent a4e629ebf9
commit 79d14af0b5
32 changed files with 8951 additions and 129 deletions
+6 -3
View File
@@ -1,5 +1,6 @@
#include "log.h"
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <mutex>
@@ -118,6 +119,8 @@ void log_vprintf(const char* format, va_list arg_list) {
// We always immediately flush prints because since it has no associated level
// it could be anything from a fatal error to a useless debug log.
std::lock_guard<std::mutex> lock(gLogger.mutex);
va_list arg_list_2;
va_copy(arg_list_2, arg_list);
if (gLogger.fp) {
// Log to File
vfprintf(gLogger.fp, format, arg_list);
@@ -125,7 +128,7 @@ void log_vprintf(const char* format, va_list arg_list) {
}
if (gLogger.stdout_log_level < lg::level::off_unless_die) {
vprintf(format, arg_list);
vprintf(format, arg_list_2);
fflush(stdout);
fflush(stderr);
}
@@ -133,8 +136,8 @@ void log_vprintf(const char* format, va_list arg_list) {
}
} // namespace internal
void printstd(const std::string& format, va_list arg_list) {
internal::log_vprintf(format.c_str(), arg_list);
void printstd(const char* format, va_list arg_list) {
internal::log_vprintf(format, arg_list);
}
// how many extra log files for a single program should be kept?