mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -04:00
[glb export] Export bones. (#3087)

This commit is contained in:
@@ -420,4 +420,16 @@ u8 deref_u8(const Ref& ref, int byte) {
|
||||
u8 vals[4];
|
||||
memcpy(vals, &word.data, 4);
|
||||
return vals[total_offset & 3];
|
||||
}
|
||||
|
||||
std::vector<int> find_objects_with_type(const decompiler::LinkedObjectFile& file,
|
||||
const std::string& name) {
|
||||
std::vector<int> result;
|
||||
for (size_t i = 0; i < file.words_by_seg.at(0).size(); i++) {
|
||||
const auto& word = file.words_by_seg[0][i];
|
||||
if (word.kind() == decompiler::LinkedWord::TYPE_PTR && word.symbol_name() == name) {
|
||||
result.push_back(i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user