More element types

This commit is contained in:
Phillip Stephens 2016-02-02 11:11:17 -08:00
parent 9649acb829
commit 5d5bd53db8
1 changed files with 79 additions and 34 deletions

View File

@ -14,33 +14,58 @@ struct GPSM : BigYAML
static const char* DNAType() {return "Retro::GPSM";} static const char* DNAType() {return "Retro::GPSM";}
const char* DNATypeV() const {return DNAType();} const char* DNATypeV() const {return DNAType();}
VectorElement x18_POFS;
RealElement x20_LENG; VectorElementFactory x18_POFS;
RealElement x24_WIDT; IntElementFactory x1c_PMED;
IntElement x28_MAXP; RealElementFactory x20_LENG;
ColorElement x30_COLR; RealElementFactory x24_WIDT;
IntElement x34_LTME; IntElementFactory x28_MAXP;
VectorElement x38_ILOC; RealElementFactory x2c_GRTE;
VectorElement x3c_IVEC; ColorElementFactory x30_COLR;
EmitterElement x40_EMTR; IntElementFactory x34_LTME;
atUint8 x44_settings; // SORT,MBLR,LINE VectorElementFactory x38_ILOC;
atUint8 x45_options; // VMD1-4, OPTS VectorElementFactory x3c_IVEC;
RealElement x4c_SIZE; //EmitterElementFactory x40_EMTR;
RealElement x50_ROTA; bool x44_0_SORT : 1; bool x44_1_MBLR : 1; bool x44_2_LINE : 1; bool x44_3_LIT_ : 1;
TextureElement x54_TEXR; bool x44_4_AAPH : 1; bool x44_5_ZBUF : 1; bool x44_6_FXLL : 1; bool x44_7_PMAB : 1;
TextureElement x58_TIND; bool x45_0_VMD4 : 1; bool x45_1_VMD3 : 1; bool x45_2_VMD2 : 1; bool x45_3_VMD1 : 1;
IntElement xb4_NDSY; bool x45_4_OPTS : 1; bool x45_5_PMUS : 1; bool x45_6_PMOO : 1; // is the last bit unused?
VectorElement x110_LDIR; IntElementFactory x48_MBSP;
ColorElement x104_LCLR; RealElementFactory x4c_SIZE;
RealElement x108_LINT; RealElementFactory x50_ROTA;
VectorElement x10c_LOFF; //TextureElementFactory x54_TEXR;
IntElement x114_LFOT; //TextureElementFactory x58_TIND;
RealElement x118_LFOR; // x5c_PMDL Model
RealElement x11c_LSLA; VectorElementFactory x6c_PMOP;
VectorElementFactory x70_PMRT;
VectorElementFactory x74_PMSC;
ColorElementFactory x78_PMCL;
ChildGeneratorDesc<IDType> x8c_ICTS;
IntElementFactory x9c_NCSY;
IntElementFactory xb4_NDSY;
IntElementFactory xa0_CSSD;
ChildGeneratorDesc<IDType> xa4_IDTS; ChildGeneratorDesc<IDType> xa4_IDTS;
IntElementFactory xc8_PISY;
IntElementFactory xcc_SISY;
IntElementFactory xe4_SSSD;
VectorElementFactory xe8_SSPO;
// xec_PMLC Electric Generator
IntElementFactory x100_LTYP;
ColorElementFactory x104_LCLR;
RealElementFactory x108_LINT;
VectorElementFactory x110_LDIR;
VectorElementFactory x10c_LOFF;
IntElementFactory x114_LFOT;
RealElementFactory x118_LFOR;
RealElementFactory x11c_LSLA;
void read(Athena::io::YAMLDocReader& r) void read(Athena::io::YAMLDocReader& r)
{ {
if (r.enterSubRecord("PMCL"))
{
x78_PMCL.read(r);
r.leaveSubRecord();
}
if (r.enterSubRecord("LFOR")) if (r.enterSubRecord("LFOR"))
{ {
x118_LFOR.read(r); x118_LFOR.read(r);
@ -53,7 +78,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("EMTR")) if (r.enterSubRecord("EMTR"))
{ {
x40_EMTR.read(r); //x40_EMTR.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("COLR")) if (r.enterSubRecord("COLR"))
@ -67,18 +92,17 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("AAPH")) if (r.enterSubRecord("AAPH"))
{ {
x44_4_AAPH = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("CSSD")) if (r.enterSubRecord("CSSD"))
{ {
xa0_CSSD.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("GRTE")) if (r.enterSubRecord("GRTE"))
{ {
r.leaveSubRecord(); x2c_GRTE.read(r);
}
if (r.enterSubRecord("COLR"))
{
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("FXLL")) if (r.enterSubRecord("FXLL"))
@ -87,6 +111,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("ICTS")) if (r.enterSubRecord("ICTS"))
{ {
x8c_ICTS.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("KSSM")) if (r.enterSubRecord("KSSM"))
@ -142,6 +167,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("LINE")) if (r.enterSubRecord("LINE"))
{ {
x44_2_LINE = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("LFOT")) if (r.enterSubRecord("LFOT"))
@ -151,6 +177,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("LIT_")) if (r.enterSubRecord("LIT_"))
{ {
x44_3_LIT_ = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("LTME")) if (r.enterSubRecord("LTME"))
@ -165,6 +192,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("LTYP")) if (r.enterSubRecord("LTYP"))
{ {
x100_LTYP.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("NDSY")) if (r.enterSubRecord("NDSY"))
@ -174,26 +202,32 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("MBSP")) if (r.enterSubRecord("MBSP"))
{ {
x48_MBSP.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("MBLR")) if (r.enterSubRecord("MBLR"))
{ {
x44_1_MBLR = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("NCSY")) if (r.enterSubRecord("NCSY"))
{ {
x9c_NCSY.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PISY")) if (r.enterSubRecord("PISY"))
{ {
xc8_PISY.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("OPTS")) if (r.enterSubRecord("OPTS"))
{ {
x45_4_OPTS = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PMAB")) if (r.enterSubRecord("PMAB"))
{ {
x44_7_PMAB = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SESD")) if (r.enterSubRecord("SESD"))
@ -206,10 +240,12 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("PMSC")) if (r.enterSubRecord("PMSC"))
{ {
x74_PMSC.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PMOP")) if (r.enterSubRecord("PMOP"))
{ {
x6c_PMOP.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PMDL")) if (r.enterSubRecord("PMDL"))
@ -222,6 +258,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("PMRT")) if (r.enterSubRecord("PMRT"))
{ {
x70_PMRT.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("POFS")) if (r.enterSubRecord("POFS"))
@ -231,6 +268,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("PMUS")) if (r.enterSubRecord("PMUS"))
{ {
x45_5_PMUS = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PSIV")) if (r.enterSubRecord("PSIV"))
@ -264,22 +302,22 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("PMED")) if (r.enterSubRecord("PMED"))
{ {
x1c_PMED.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("PMOO")) if (r.enterSubRecord("PMOO"))
{ {
r.leaveSubRecord(); x45_6_PMOO = r.readBool(nullptr);
}
if (r.enterSubRecord("VEL1"))
{
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SSSD")) if (r.enterSubRecord("SSSD"))
{ {
xe4_SSSD.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SORT")) if (r.enterSubRecord("SORT"))
{ {
x44_0_SORT = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SIZE")) if (r.enterSubRecord("SIZE"))
@ -289,15 +327,17 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("SISY")) if (r.enterSubRecord("SISY"))
{ {
xcc_SISY.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SSPO")) if (r.enterSubRecord("SSPO"))
{ {
xe8_SSPO.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("TEXR")) if (r.enterSubRecord("TEXR"))
{ {
x54_TEXR.read(r); //x54_TEXR.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("SSWH")) if (r.enterSubRecord("SSWH"))
@ -306,23 +346,27 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("TIND")) if (r.enterSubRecord("TIND"))
{ {
x58_TIND.read(r); //x58_TIND.read(r);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("VMD4")) if (r.enterSubRecord("VMD4"))
{ {
x45_0_VMD4 = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("VMD3")) if (r.enterSubRecord("VMD3"))
{ {
x45_1_VMD3 = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("VMD2")) if (r.enterSubRecord("VMD2"))
{ {
x45_2_VMD2 = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("VMD1")) if (r.enterSubRecord("VMD1"))
{ {
x45_3_VMD1 = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("VEL4")) if (r.enterSubRecord("VEL4"))
@ -343,6 +387,7 @@ struct GPSM : BigYAML
} }
if (r.enterSubRecord("ZBUF")) if (r.enterSubRecord("ZBUF"))
{ {
x44_5_ZBUF = r.readBool(nullptr);
r.leaveSubRecord(); r.leaveSubRecord();
} }
if (r.enterSubRecord("WIDT")) if (r.enterSubRecord("WIDT"))