[jak2] fix atest flag in tfrag (#2381)

Support the weird `tfrag-gs-test` and `texture-page-flag` stuff added in
jak 2. Solves some issues with partially invisible tfrags.
This commit is contained in:
water111
2023-03-21 20:40:29 -04:00
committed by GitHub
parent df646282ab
commit b18198e655
6 changed files with 45 additions and 15 deletions
+5
View File
@@ -1942,6 +1942,11 @@ void BspHeader::read_from_file(const decompiler::LinkedObjectFile& file,
texture_remap_table.push_back(remap);
}
}
if (version > GameVersion::Jak1) {
auto ff = get_field_ref(ref, "texture-flags", dts);
memcpy_plain_data((u8*)texture_flags, ff, sizeof(u16) * kNumTextureFlags);
}
}
std::string BspHeader::print(const PrintSettings& settings) const {