[merc] Add merc extraction (#1356)

* docs for ee merc code

* wip

* more extraction stuff

* partial mat1 working

* mat1

* cleanup

* partial mat2 and mat3 support

* merc extraction seems to work
This commit is contained in:
water111
2022-05-11 22:53:53 -04:00
committed by GitHub
parent 84b2ba43be
commit be976d2e69
23 changed files with 4539 additions and 235 deletions
-11
View File
@@ -206,17 +206,6 @@ std::string TFragmentDebugData::print(int indent) const {
return result;
}
u32 deref_u32(const Ref& ref, int word_offset) {
if ((ref.byte_offset % 4) != 0) {
throw Error("deref_u32 bad alignment");
}
const auto& word = ref.data->words_by_seg.at(ref.seg).at(word_offset + (ref.byte_offset / 4));
if (word.kind() != decompiler::LinkedWord::PLAIN_DATA) {
throw Error("deref_u32 bad kind: {}", (int)word.kind());
}
return word.data;
}
void tfrag_debug_print_unpack(Ref start, int qwc_total) {
int word_offset = 0;