metaforce/DataSpec/DNACommon/TXTR.hpp

39 lines
1006 B
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2015-07-19 06:19:46 +00:00
#include <climits>
#include "DataSpec/DNACommon/DNACommon.hpp"
namespace hecl {
class ProjectPath;
}
2015-07-19 06:19:46 +00:00
2018-12-08 05:30:43 +00:00
namespace DataSpec {
2015-08-22 01:58:41 +00:00
class PAKEntryReadStream;
2015-07-19 06:19:46 +00:00
2018-12-08 05:30:43 +00:00
struct TXTR {
struct PaletteMeta : BigDNAVYaml {
2019-08-11 00:49:41 +00:00
AT_DECL_EXPLICIT_DNA_YAMLV
Value<atUint32> format = UINT_MAX;
Value<atUint32> elementCount = 0;
Value<atUint64> dolphinHash = 0;
};
struct Meta : BigDNAVYaml {
2019-08-11 00:49:41 +00:00
AT_DECL_EXPLICIT_DNA_YAMLV
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;
};
2018-12-08 05:30:43 +00:00
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 TXTR::Meta GetMetaData(PAKEntryReadStream& rs);
2015-07-19 06:19:46 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace DataSpec