decomp: finish _almost all of_ the remaining camera code (#845)

* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* address feedback - leave the float labels alone for now

* address feedback

* linting/formatting

* update gsrc and ref tests

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
This commit is contained in:
Tyler Wilding
2021-10-16 21:01:23 -04:00
committed by GitHub
parent 993f348c93
commit 45318be063
57 changed files with 29413 additions and 3078 deletions
+6 -4
View File
@@ -33,9 +33,11 @@ namespace decompiler {
* At this point, we assume that the files are loaded and we've run find_code to locate all
* functions, but nothing else.
*/
void ObjectFileDB::analyze_functions_ir2(const std::string& output_dir,
const Config& config,
const std::unordered_set<std::string>& skip_functions) {
void ObjectFileDB::analyze_functions_ir2(
const std::string& output_dir,
const Config& config,
const std::unordered_set<std::string>& skip_functions,
const std::unordered_map<std::string, std::unordered_set<std::string>>& skip_states) {
// First, do basic analysis on the top level:
lg::info("Using IR2 analysis...");
@@ -57,7 +59,7 @@ void ObjectFileDB::analyze_functions_ir2(const std::string& output_dir,
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());
run_defstate(data.linked_data.functions_by_seg.at(2).front(), skip_states);
}
} catch (const std::exception& e) {
lg::error("Failed to find defstates: {}", e.what());