2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Add texture cache containing information about textures

This commit is contained in:
2019-08-03 16:44:52 -07:00
parent 0ab08daae7
commit 9d2cbf61ed
5 changed files with 108 additions and 22 deletions

View File

@@ -6,10 +6,29 @@ namespace DataSpec {
class PAKEntryReadStream;
struct TXTR {
struct PaletteMeta : BigDNAVYaml {
AT_DECL_EXPLICIT_DNA_YAML
AT_DECL_DNAV
Value<atUint32> format = UINT_MAX;
Value<atUint32> elementCount = 0;
Value<atUint64> dolphinHash = 0;
};
struct Meta : BigDNAVYaml {
AT_DECL_EXPLICIT_DNA_YAML
AT_DECL_DNAV
Value<atUint32> format = UINT_MAX;
Value<atUint32> mips = 0;
Value<atUint16> width = 0;
Value<atUint16> height = 0;
Value<atUint64> dolphinHash = 0;
Value<bool> hasPalette = false;
PaletteMeta palette;
};
static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath);
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath);
static bool CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath);
static std::string CalculateDolphinName(PAKEntryReadStream& rs);
static TXTR::Meta GetMetaData(PAKEntryReadStream& rs);
};
} // namespace DataSpec