General: Be explicit about athena's Endian type

Allows this code to still compile if the Endian type is ever changed
into a strong enumeration.
This commit is contained in:
Lioncash 2019-09-14 10:53:08 -04:00
parent 002ca71104
commit 5b7f159233
6 changed files with 10 additions and 10 deletions

View File

@ -17,9 +17,9 @@ extern ThreadLocalPtr<class PAKRouterBase> g_PakRouter;
extern ThreadLocalPtr<hecl::blender::Token> g_ThreadBlenderToken;
/* This comes up a great deal */
typedef athena::io::DNA<athena::Big> BigDNA;
typedef athena::io::DNAV<athena::Big> BigDNAV;
typedef athena::io::DNAVYaml<athena::Big> BigDNAVYaml;
using BigDNA = athena::io::DNA<athena::Endian::Big>;
using BigDNAV = athena::io::DNAV<athena::Endian::Big>;
using BigDNAVYaml = athena::io::DNAVYaml<athena::Endian::Big>;
/** FourCC with DNA read/write */
using DNAFourCC = hecl::DNAFourCC;

View File

@ -3,15 +3,15 @@
namespace GX {
template <>
void Color::Enumerate<athena::io::DNA<athena::Big>::Read>(typename Read::StreamT& reader) {
void Color::Enumerate<athena::io::DNA<athena::Endian::Big>::Read>(Read::StreamT& reader) {
reader.readUBytesToBuf(&num, 4);
}
template <>
void Color::Enumerate<athena::io::DNA<athena::Big>::Write>(typename Write::StreamT& writer) {
void Color::Enumerate<athena::io::DNA<athena::Endian::Big>::Write>(Write::StreamT& writer) {
writer.writeUBytes(reinterpret_cast<const atUint8*>(&num), 4);
}
template <>
void Color::Enumerate<athena::io::DNA<athena::Big>::BinarySize>(typename BinarySize::StreamT& s) {
void Color::Enumerate<athena::io::DNA<athena::Endian::Big>::BinarySize>(BinarySize::StreamT& s) {
s += 4;
}

View File

@ -246,7 +246,7 @@ enum BlendFactor : uint16_t {
BL_INVDSTALPHA
};
struct Color : athena::io::DNA<athena::Big> {
struct Color : athena::io::DNA<athena::Endian::Big> {
union {
uint8_t color[4];
uint32_t num = 0;

View File

@ -238,7 +238,7 @@ bool AGSC::Cook(const hecl::ProjectPath& dir, const hecl::ProjectPath& refOutPat
amuse::AudioGroupDatabase group(path.getAbsolutePath());
auto proj = group.getProj().toGCNData(group.getPool(), group.getSdir());
auto pool = group.getPool().toData<athena::Big>();
auto pool = group.getPool().toData<athena::Endian::Big>();
auto sdirSamp = group.getSdir().toGCNData(group);
w.writeUint32Big(pool.size());

View File

@ -57,7 +57,7 @@ bool AGSC::Cook(const hecl::ProjectPath& dir, const hecl::ProjectPath& outPath)
amuse::AudioGroupDatabase group(dir.getAbsolutePath());
auto proj = group.getProj().toGCNData(group.getPool(), group.getSdir());
auto pool = group.getPool().toData<athena::Big>();
auto pool = group.getPool().toData<athena::Endian::Big>();
auto sdirSamp = group.getSdir().toGCNData(group);
Header head;

View File

@ -42,7 +42,7 @@ public:
GameMode
};
struct State : athena::io::DNAVYaml<athena::Big> {
struct State : athena::io::DNAVYaml<athena::Endian::Big> {
Delete _d;
};
static Space* NewSpaceFromConfigStream(ViewManager& vm, Space* parent, ConfigReader& r);