[decomp] background and tfrag (#1909)

This commit is contained in:
water111
2022-09-24 14:30:44 -04:00
committed by GitHub
parent d00ebe5397
commit 80cefb9575
55 changed files with 3346 additions and 786 deletions
+8 -5
View File
@@ -1355,7 +1355,6 @@ void DrawableTreeInstanceShrub::read_from_file(TypedRef ref,
word.symbol_name() == "collide-hash-fragment") {
done = true;
} else {
fmt::print("unknown next thing: {}\n", word.symbol_name());
ASSERT(word.symbol_name() == "draw-node" || word.symbol_name() == "instance-shrubbery");
}
}
@@ -1779,10 +1778,14 @@ std::unique_ptr<DrawableTree> make_drawable_tree(TypedRef ref,
return tree;
}
if (ref.type->get_name() == "drawable-tree-instance-shrub") {
auto tree = std::make_unique<shrub_types::DrawableTreeInstanceShrub>();
tree->read_from_file(ref, dts, stats, version);
return tree;
if (version == GameVersion::Jak2) {
lg::warn("skipping drawable-tree-instance-shrub reading for jak 2");
} else {
if (ref.type->get_name() == "drawable-tree-instance-shrub") {
auto tree = std::make_unique<shrub_types::DrawableTreeInstanceShrub>();
tree->read_from_file(ref, dts, stats, version);
return tree;
}
}
if (ref.type->get_name() == "drawable-tree-collide-fragment") {