mirror of
https://github.com/open-goal/jak-project
synced 2026-05-23 06:54:31 -04:00
[decompiler] decompile particle defs using specialized macros (#1077)
* [decompiler] `defpart` and `defpartgroup` * support sounds in part defs natively * make `meters_to_string` * update refs * clang * make macros in pair only work inside `(unquote ...` * update source * update finish * fix
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "decompiler/analysis/static_refs.h"
|
||||
#include "decompiler/analysis/symbol_def_map.h"
|
||||
#include "decompiler/analysis/find_skelgroups.h"
|
||||
#include "decompiler/analysis/find_defpartgroup.h"
|
||||
#include "common/goos/PrettyPrinter.h"
|
||||
#include "decompiler/IR2/Form.h"
|
||||
#include "decompiler/analysis/mips2c.h"
|
||||
@@ -60,14 +61,21 @@ void ObjectFileDB::analyze_functions_ir2(
|
||||
ir2_do_segment_analysis_phase2(TOP_LEVEL_SEGMENT, config, data);
|
||||
try {
|
||||
if (data.linked_data.functions_by_seg.size() == 3) {
|
||||
run_defstate(data.linked_data.functions_by_seg.at(2).front(), skip_states);
|
||||
run_defpartgroup(data.linked_data.functions_by_seg.at(TOP_LEVEL_SEGMENT).front());
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
lg::error("Failed to find defpartgroups: {}", e.what());
|
||||
}
|
||||
try {
|
||||
if (data.linked_data.functions_by_seg.size() == 3) {
|
||||
run_defstate(data.linked_data.functions_by_seg.at(TOP_LEVEL_SEGMENT).front(), skip_states);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
lg::error("Failed to find defstates: {}", e.what());
|
||||
}
|
||||
try {
|
||||
if (data.linked_data.functions_by_seg.size() == 3) {
|
||||
run_defskelgroups(data.linked_data.functions_by_seg.at(2).front());
|
||||
run_defskelgroups(data.linked_data.functions_by_seg.at(TOP_LEVEL_SEGMENT).front());
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
lg::error("Failed to find defskelgroups: {}", e.what());
|
||||
|
||||
Reference in New Issue
Block a user