[decomp] add mips2c converter (#842)

* mips 2 c basic version, not yet tested

* calling works without crashing, but the function doesn't

* it works

* add test

* cleanup and actually add the test

* dont use mips2c by default for font

* clean up formatting
This commit is contained in:
water111
2021-09-11 20:52:35 -04:00
committed by GitHub
parent e47476983a
commit f9d8fcd6e4
61 changed files with 3463 additions and 153 deletions
+6
View File
@@ -17,6 +17,7 @@
#include "kprint.h"
#include "common/symbols.h"
#include "common/goal_constants.h"
#include "game/mips2c/mips2c_table.h"
namespace {
// turn on printf's for debugging linking issues.
@@ -785,6 +786,11 @@ void link_control::finish() {
if (ofh->object_file_version == 3) {
// todo check function type of entry
// setup mips2c functions
for (auto& x : Mips2C::gMips2CLinkCallbacks[m_object_name]) {
x();
}
// execute top level!
if (m_entry.offset && (m_flags & LINK_FLAG_EXECUTE)) {
call_goal(m_entry.cast<Function>(), 0, 0, 0, s7.offset, g_ee_main_mem);