Skip to content

Commit

Permalink
Skipped autogenerated assets
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Mar 10, 2024
1 parent 8fe6b2f commit 866e132
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,10 @@ std::optional<std::vector<std::tuple<std::string, YAML::Node>>> Companion::GetNo
for(auto& [addr, tpl] : this->gAddrMap[this->gCurrentFile]){
auto [name, node] = tpl;
const auto n_type = GetSafeNode<std::string>(node, "type");
if(node["autogen"]){
SPDLOG_DEBUG("Skipping autogenerated asset {}", name);
continue;
}
if(n_type == type){
nodes.push_back(tpl);
}
Expand Down
3 changes: 3 additions & 0 deletions src/factories/DisplayListFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
dl["type"] = "GFX";
dl["offset"] = ptr;
dl["symbol"] = output;
dl["autogen"] = true;

auto result = factory->parse(rom, dl);

Expand Down Expand Up @@ -389,6 +390,7 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
light["type"] = "lights";
light["offset"] = ptr;
light["symbol"] = output;
light["autogen"] = true;
auto result = factory->parse(rom, light);
if(result.has_value()){
Companion::Instance->RegisterAsset(output, light);
Expand Down Expand Up @@ -454,6 +456,7 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
vtx["offset"] = ptr;
vtx["count"] = nvtx;
vtx["symbol"] = output;
vtx["autogen"] = true;
auto result = factory->parse(rom, vtx);
if(result.has_value()){
Companion::Instance->RegisterAsset(output, vtx);
Expand Down

0 comments on commit 866e132

Please sign in to comment.