Collision mesh extraction (#1330)

* temp

* extract collision mesh

* temp

* improve

* toggle, cleanup
This commit is contained in:
water111
2022-04-25 21:53:23 -04:00
committed by GitHub
parent 1bede6954d
commit 61766d2d22
37 changed files with 877 additions and 46 deletions
+4 -2
View File
@@ -234,7 +234,8 @@ TypedRef typed_ref_from_basic(const Ref& object, const decompiler::DecompilerTyp
const auto& word = object.data->words_by_seg.at(object.seg).at(byte_in_words / 4);
if (word.kind() != decompiler::LinkedWord::TYPE_PTR) {
throw Error("typed_ref_from_basic did not get a type tag (offset {} words)", byte_in_words / 4);
throw Error("typed_ref_from_basic did not get a type tag (offset {} words). Got {}",
byte_in_words / 4, (int)word.kind());
}
TypedRef result;
@@ -252,7 +253,8 @@ Ref deref_label(const Ref& object) {
const auto& word = object.data->words_by_seg.at(object.seg).at(byte_in_words / 4);
if (word.kind() != decompiler::LinkedWord::PTR) {
throw Error("deref_label did not get a label (offset {} words)", byte_in_words / 4);
throw Error("deref_label did not get a label (offset {} words). Got {} {}", byte_in_words / 4,
(int)word.kind(), word.data);
}
const auto& lab = object.data->labels.at(word.label_id());