metaforce/DataSpec/DNACommon/PART.hpp

126 lines
3.7 KiB
C++
Raw Normal View History

2016-02-02 04:29:58 +00:00
#ifndef __COMMON_PART_HPP__
#define __COMMON_PART_HPP__
#include "ParticleCommon.hpp"
#include "PAK.hpp"
2016-03-04 23:04:53 +00:00
#include "athena/FileWriter.hpp"
2016-02-02 04:29:58 +00:00
2017-12-29 08:08:12 +00:00
namespace DataSpec::DNAParticle
2016-02-02 04:29:58 +00:00
{
template <class IDType>
struct GPSM : BigYAML
{
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;
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;
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;
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;
ModVectorElementFactory x7c_VEL1;
ModVectorElementFactory x80_VEL2;
ModVectorElementFactory x84_VEL3;
ModVectorElementFactory x88_VEL4;
ChildResourceFactory<IDType> x8c_ICTS;
2016-02-02 19:11:17 +00:00
IntElementFactory x9c_NCSY;
IntElementFactory xa0_CSSD;
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;
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;
ChildResourceFactory<IDType> xec_PMLC;
2016-02-02 19:11:17 +00:00
IntElementFactory x100_LTYP;
ColorElementFactory x104_LCLR;
RealElementFactory x108_LINT;
VectorElementFactory x10c_LOFF;
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
/* 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-03-05 00:03:41 +00:00
void read(athena::io::YAMLDocReader& r);
void write(athena::io::YAMLDocWriter& w) const;
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-10-02 22:41:36 +00:00
void gatherDependencies(std::vector<hecl::ProjectPath>&) const;
2016-02-02 04:29:58 +00:00
};
template <class IDType>
2016-03-05 00:03:41 +00:00
bool ExtractGPSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath);
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__