mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #67 from lioncash/endian
General: Be explicit about athena's Endian type
This commit is contained in:
commit
16ce349f1c
|
@ -17,9 +17,9 @@ extern ThreadLocalPtr<class PAKRouterBase> g_PakRouter;
|
||||||
extern ThreadLocalPtr<hecl::blender::Token> g_ThreadBlenderToken;
|
extern ThreadLocalPtr<hecl::blender::Token> g_ThreadBlenderToken;
|
||||||
|
|
||||||
/* This comes up a great deal */
|
/* This comes up a great deal */
|
||||||
typedef athena::io::DNA<athena::Big> BigDNA;
|
using BigDNA = athena::io::DNA<athena::Endian::Big>;
|
||||||
typedef athena::io::DNAV<athena::Big> BigDNAV;
|
using BigDNAV = athena::io::DNAV<athena::Endian::Big>;
|
||||||
typedef athena::io::DNAVYaml<athena::Big> BigDNAVYaml;
|
using BigDNAVYaml = athena::io::DNAVYaml<athena::Endian::Big>;
|
||||||
|
|
||||||
/** FourCC with DNA read/write */
|
/** FourCC with DNA read/write */
|
||||||
using DNAFourCC = hecl::DNAFourCC;
|
using DNAFourCC = hecl::DNAFourCC;
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
namespace GX {
|
namespace GX {
|
||||||
|
|
||||||
template <>
|
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);
|
reader.readUBytesToBuf(&num, 4);
|
||||||
}
|
}
|
||||||
template <>
|
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);
|
writer.writeUBytes(reinterpret_cast<const atUint8*>(&num), 4);
|
||||||
}
|
}
|
||||||
template <>
|
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;
|
s += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ enum BlendFactor : uint16_t {
|
||||||
BL_INVDSTALPHA
|
BL_INVDSTALPHA
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Color : athena::io::DNA<athena::Big> {
|
struct Color : athena::io::DNA<athena::Endian::Big> {
|
||||||
union {
|
union {
|
||||||
uint8_t color[4];
|
uint8_t color[4];
|
||||||
uint32_t num = 0;
|
uint32_t num = 0;
|
||||||
|
|
|
@ -238,7 +238,7 @@ bool AGSC::Cook(const hecl::ProjectPath& dir, const hecl::ProjectPath& refOutPat
|
||||||
amuse::AudioGroupDatabase group(path.getAbsolutePath());
|
amuse::AudioGroupDatabase group(path.getAbsolutePath());
|
||||||
|
|
||||||
auto proj = group.getProj().toGCNData(group.getPool(), group.getSdir());
|
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);
|
auto sdirSamp = group.getSdir().toGCNData(group);
|
||||||
|
|
||||||
w.writeUint32Big(pool.size());
|
w.writeUint32Big(pool.size());
|
||||||
|
|
|
@ -57,7 +57,7 @@ bool AGSC::Cook(const hecl::ProjectPath& dir, const hecl::ProjectPath& outPath)
|
||||||
amuse::AudioGroupDatabase group(dir.getAbsolutePath());
|
amuse::AudioGroupDatabase group(dir.getAbsolutePath());
|
||||||
|
|
||||||
auto proj = group.getProj().toGCNData(group.getPool(), group.getSdir());
|
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);
|
auto sdirSamp = group.getSdir().toGCNData(group);
|
||||||
|
|
||||||
Header head;
|
Header head;
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
GameMode
|
GameMode
|
||||||
};
|
};
|
||||||
|
|
||||||
struct State : athena::io::DNAVYaml<athena::Big> {
|
struct State : athena::io::DNAVYaml<athena::Endian::Big> {
|
||||||
Delete _d;
|
Delete _d;
|
||||||
};
|
};
|
||||||
static Space* NewSpaceFromConfigStream(ViewManager& vm, Space* parent, ConfigReader& r);
|
static Space* NewSpaceFromConfigStream(ViewManager& vm, Space* parent, ConfigReader& r);
|
||||||
|
|
Loading…
Reference in New Issue