2016-02-02 04:29:58 +00:00
|
|
|
#ifndef __COMMON_PART_HPP__
|
|
|
|
#define __COMMON_PART_HPP__
|
|
|
|
|
|
|
|
#include "ParticleCommon.hpp"
|
2016-02-03 03:58:33 +00:00
|
|
|
#include "PAK.hpp"
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "athena/FileWriter.hpp"
|
2016-02-02 04:29:58 +00:00
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace DataSpec
|
2016-02-02 04:29:58 +00:00
|
|
|
{
|
|
|
|
namespace DNAParticle
|
|
|
|
{
|
|
|
|
|
|
|
|
template <class IDType>
|
|
|
|
struct GPSM : BigYAML
|
|
|
|
{
|
2016-03-26 00:51:59 +00:00
|
|
|
static const char* DNAType() {return "GPSM";}
|
2016-02-02 04:29:58 +00:00
|
|
|
const char* DNATypeV() const {return DNAType();}
|
|
|
|
|
2016-02-02 23:12:55 +00:00
|
|
|
VectorElementFactory x0_PSIV;
|
|
|
|
ModVectorElementFactory x4_PSVM;
|
|
|
|
VectorElementFactory x8_PSOV;
|
|
|
|
IntElementFactory xc_PSLT;
|
|
|
|
IntElementFactory x10_PSWT;
|
|
|
|
RealElementFactory x14_PSTS;
|
2016-02-02 19:11:17 +00:00
|
|
|
VectorElementFactory x18_POFS;
|
2016-02-13 05:16:39 +00:00
|
|
|
IntElementFactory x1c_SEED;
|
2016-02-02 19:11:17 +00:00
|
|
|
RealElementFactory x20_LENG;
|
|
|
|
RealElementFactory x24_WIDT;
|
|
|
|
IntElementFactory x28_MAXP;
|
|
|
|
RealElementFactory x2c_GRTE;
|
|
|
|
ColorElementFactory x30_COLR;
|
|
|
|
IntElementFactory x34_LTME;
|
|
|
|
VectorElementFactory x38_ILOC;
|
|
|
|
VectorElementFactory x3c_IVEC;
|
2016-02-03 03:58:33 +00:00
|
|
|
EmitterElementFactory x40_EMTR;
|
2016-02-04 00:55:39 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x44_28_SORT : 1; bool x44_30_MBLR : 1; bool x44_24_LINE : 1; bool x44_29_LIT_ : 1;
|
|
|
|
bool x44_26_AAPH : 1; bool x44_27_ZBUF : 1; bool x44_25_FXLL : 1; bool x44_31_PMAB : 1;
|
|
|
|
bool x45_29_VMD4 : 1; bool x45_28_VMD3 : 1; bool x45_27_VMD2 : 1; bool x45_26_VMD1 : 1;
|
|
|
|
bool x45_31_OPTS : 1; bool x45_24_PMUS : 1; bool x45_25_PMOO : 1; bool x45_30_CIND : 1;
|
|
|
|
};
|
|
|
|
uint16_t dummy1 = 0;
|
|
|
|
};
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory x48_MBSP;
|
|
|
|
RealElementFactory x4c_SIZE;
|
|
|
|
RealElementFactory x50_ROTA;
|
2016-02-03 03:58:33 +00:00
|
|
|
UVElementFactory<IDType> x54_TEXR;
|
|
|
|
UVElementFactory<IDType> x58_TIND;
|
|
|
|
ChildResourceFactory<IDType> x5c_PMDL;
|
2016-02-02 19:11:17 +00:00
|
|
|
VectorElementFactory x6c_PMOP;
|
|
|
|
VectorElementFactory x70_PMRT;
|
|
|
|
VectorElementFactory x74_PMSC;
|
|
|
|
ColorElementFactory x78_PMCL;
|
2016-02-02 22:35:17 +00:00
|
|
|
ModVectorElementFactory x7c_VEL1;
|
|
|
|
ModVectorElementFactory x80_VEL2;
|
|
|
|
ModVectorElementFactory x84_VEL3;
|
|
|
|
ModVectorElementFactory x88_VEL4;
|
2016-02-03 03:58:33 +00:00
|
|
|
ChildResourceFactory<IDType> x8c_ICTS;
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory x9c_NCSY;
|
|
|
|
IntElementFactory xa0_CSSD;
|
2016-02-03 03:58:33 +00:00
|
|
|
ChildResourceFactory<IDType> xa4_IDTS;
|
2016-02-04 00:55:39 +00:00
|
|
|
IntElementFactory xb4_NDSY;
|
|
|
|
ChildResourceFactory<IDType> xb8_IITS;
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory xc8_PISY;
|
|
|
|
IntElementFactory xcc_SISY;
|
2016-02-03 03:58:33 +00:00
|
|
|
SpawnSystemKeyframeData<IDType> xd0_KSSM;
|
|
|
|
ChildResourceFactory<IDType> xd4_SSWH;
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory xe4_SSSD;
|
|
|
|
VectorElementFactory xe8_SSPO;
|
2016-02-02 23:12:55 +00:00
|
|
|
IntElementFactory xf8_SESD;
|
|
|
|
VectorElementFactory xfc_SEPO;
|
2016-02-03 03:58:33 +00:00
|
|
|
ChildResourceFactory<IDType> xec_PMLC;
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory x100_LTYP;
|
|
|
|
ColorElementFactory x104_LCLR;
|
|
|
|
RealElementFactory x108_LINT;
|
|
|
|
VectorElementFactory x10c_LOFF;
|
2016-02-02 22:35:17 +00:00
|
|
|
VectorElementFactory x110_LDIR;
|
2016-02-02 19:11:17 +00:00
|
|
|
IntElementFactory x114_LFOT;
|
|
|
|
RealElementFactory x118_LFOR;
|
|
|
|
RealElementFactory x11c_LSLA;
|
2016-02-02 04:29:58 +00:00
|
|
|
|
2016-02-03 03:58:33 +00:00
|
|
|
/* 0-00 additions */
|
2016-02-04 00:55:39 +00:00
|
|
|
ChildResourceFactory<IDType> xd8_SELC;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x30_30_ORNT : 1;
|
|
|
|
bool x30_31_RSOP : 1;
|
|
|
|
};
|
|
|
|
uint16_t dummy2 = 0;
|
|
|
|
};
|
|
|
|
RealElementFactory x10c_ADV1;
|
|
|
|
RealElementFactory x110_ADV2;
|
|
|
|
RealElementFactory x114_ADV3;
|
|
|
|
RealElementFactory x118_ADV4;
|
|
|
|
RealElementFactory x11c_ADV5;
|
|
|
|
RealElementFactory x120_ADV6;
|
|
|
|
RealElementFactory x124_ADV7;
|
|
|
|
RealElementFactory x128_ADV8;
|
|
|
|
|
|
|
|
GPSM()
|
|
|
|
{
|
|
|
|
x45_25_PMOO = true;
|
|
|
|
}
|
2016-02-03 03:58:33 +00:00
|
|
|
|
2016-03-05 00:03:41 +00:00
|
|
|
void read(athena::io::YAMLDocReader& r);
|
|
|
|
void write(athena::io::YAMLDocWriter& w) const;
|
2016-03-02 07:29:19 +00:00
|
|
|
size_t binarySize(size_t __isz) const;
|
2016-03-05 00:03:41 +00:00
|
|
|
void read(athena::io::IStreamReader& r);
|
|
|
|
void write(athena::io::IStreamWriter& w) const;
|
2016-02-02 04:29:58 +00:00
|
|
|
};
|
|
|
|
|
2016-02-03 03:58:33 +00:00
|
|
|
template <class IDType>
|
2016-03-05 00:03:41 +00:00
|
|
|
bool ExtractGPSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath);
|
2016-02-03 03:58:33 +00:00
|
|
|
|
2016-02-04 00:55:39 +00:00
|
|
|
template <class IDType>
|
2016-03-05 00:03:41 +00:00
|
|
|
bool WriteGPSM(const GPSM<IDType>& gpsm, const hecl::ProjectPath& outPath);
|
2016-02-04 00:55:39 +00:00
|
|
|
|
2016-02-02 04:29:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __COMMON_PART_HPP__
|