Skip to content

Commit

Permalink
Fix movtex quad parser (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
inspectredc authored Jun 12, 2024
1 parent 84ee843 commit aa95f29
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/factories/sm64/MovtexQuadFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,17 @@ std::optional<std::shared_ptr<IParsedData>> SM64::MovtexQuadFactory::parse(std::

for (size_t i = 0; i < count; ++i) {
auto id = reader.ReadInt16();
auto pad = reader.ReadInt16();
auto movtexPtr = reader.ReadUInt32();
movtexQuads.emplace_back(std::make_pair(id, movtexPtr));

YAML::Node movtexNode;
movtexNode["type"] = "SM64:MOVTEX";
movtexNode["offset"] = movtexPtr;
movtexNode["quad"] = true;
Companion::Instance->AddAsset(movtexNode);
if (movtexPtr != 0) {
YAML::Node movtexNode;
movtexNode["type"] = "SM64:MOVTEX";
movtexNode["offset"] = movtexPtr;
movtexNode["quad"] = true;
Companion::Instance->AddAsset(movtexNode);
}
}

return std::make_shared<SM64::MovtexQuadData>(movtexQuads);
Expand Down

0 comments on commit aa95f29

Please sign in to comment.