mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:07:42 +00:00
GameCube spec cook fixes
This commit is contained in:
@@ -17,9 +17,28 @@ struct AT_SPECIALIZE_PARMS(DataSpec::UniqueID32, DataSpec::UniqueID64) DGRP : Bi
|
||||
AT_DECL_DNA_YAML
|
||||
DNAFourCC type;
|
||||
Value<IDType> id;
|
||||
|
||||
bool validate() const
|
||||
{
|
||||
if (!id.operator bool())
|
||||
return false;
|
||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(id);
|
||||
return path && !path.isNone();
|
||||
}
|
||||
};
|
||||
|
||||
Vector<ObjectTag, AT_DNA_COUNT(dependCount)> depends;
|
||||
|
||||
void validateDeps()
|
||||
{
|
||||
std::vector<ObjectTag> newDeps;
|
||||
newDeps.reserve(depends.size());
|
||||
for (const ObjectTag& tag : depends)
|
||||
if (tag.validate())
|
||||
newDeps.push_back(tag);
|
||||
depends = std::move(newDeps);
|
||||
dependCount = atUint32(depends.size());
|
||||
}
|
||||
};
|
||||
|
||||
template <class IDType>
|
||||
|
||||
Reference in New Issue
Block a user