mirror of https://github.com/AxioDL/metaforce.git
199 lines
6.1 KiB
C++
199 lines
6.1 KiB
C++
#ifndef _DNAMP1_OCULUS_HPP_
|
|
#define _DNAMP1_OCULUS_HPP_
|
|
|
|
#include "../../DNACommon/DNACommon.hpp"
|
|
#include "IScriptObject.hpp"
|
|
#include "Parameters.hpp"
|
|
|
|
namespace Retro
|
|
{
|
|
namespace DNAMP1
|
|
{
|
|
struct Oculus : IScriptObject
|
|
{
|
|
Delete expl;
|
|
String<-1> name;
|
|
Value<atVec3f> location;
|
|
Value<atVec3f> orientation;
|
|
Value<atVec3f> scale;
|
|
PatternedInfo patternedInfo;
|
|
ActorParameters actorParameters;
|
|
Value<float> unknown1;
|
|
Value<float> unknown2;
|
|
Value<float> unknown3;
|
|
Value<float> unknown4;
|
|
Value<float> unknown5;
|
|
Value<float> unknown6;
|
|
DamageVulnerability damageVulnerabilty;
|
|
Value<float> unknown7;
|
|
DamageInfo damageInfo;
|
|
|
|
/* Trilogy addition */
|
|
Value<float> unknown8;
|
|
|
|
void read(Athena::io::IStreamReader& __dna_reader)
|
|
{
|
|
IScriptObject::read(__dna_reader);
|
|
/* name */
|
|
name = __dna_reader.readString(-1);
|
|
/* location */
|
|
location = __dna_reader.readVec3fBig();
|
|
/* orientation */
|
|
orientation = __dna_reader.readVec3fBig();
|
|
/* scale */
|
|
scale = __dna_reader.readVec3fBig();
|
|
/* patternedInfo */
|
|
patternedInfo.read(__dna_reader);
|
|
/* actorParameters */
|
|
actorParameters.read(__dna_reader);
|
|
/* unknown1 */
|
|
unknown1 = __dna_reader.readFloatBig();
|
|
/* unknown2 */
|
|
unknown2 = __dna_reader.readFloatBig();
|
|
/* unknown3 */
|
|
unknown3 = __dna_reader.readFloatBig();
|
|
/* unknown4 */
|
|
unknown4 = __dna_reader.readFloatBig();
|
|
/* unknown5 */
|
|
unknown5 = __dna_reader.readFloatBig();
|
|
/* unknown6 */
|
|
unknown6 = __dna_reader.readFloatBig();
|
|
/* damageVulnerabilty */
|
|
damageVulnerabilty.read(__dna_reader);
|
|
/* unknown7 */
|
|
unknown7 = __dna_reader.readFloatBig();
|
|
/* damageInfo */
|
|
damageInfo.read(__dna_reader);
|
|
|
|
if (propertyCount == 16)
|
|
unknown8 = __dna_reader.readFloatBig();
|
|
else
|
|
unknown8 = 0.0;
|
|
}
|
|
|
|
void write(Athena::io::IStreamWriter& __dna_writer) const
|
|
{
|
|
IScriptObject::write(__dna_writer);
|
|
/* name */
|
|
__dna_writer.writeString(name, -1);
|
|
/* location */
|
|
__dna_writer.writeVec3fBig(location);
|
|
/* orientation */
|
|
__dna_writer.writeVec3fBig(orientation);
|
|
/* scale */
|
|
__dna_writer.writeVec3fBig(scale);
|
|
/* patternedInfo */
|
|
patternedInfo.write(__dna_writer);
|
|
/* actorParameters */
|
|
actorParameters.write(__dna_writer);
|
|
/* unknown1 */
|
|
__dna_writer.writeFloatBig(unknown1);
|
|
/* unknown2 */
|
|
__dna_writer.writeFloatBig(unknown2);
|
|
/* unknown3 */
|
|
__dna_writer.writeFloatBig(unknown3);
|
|
/* unknown4 */
|
|
__dna_writer.writeFloatBig(unknown4);
|
|
/* unknown5 */
|
|
__dna_writer.writeFloatBig(unknown5);
|
|
/* unknown6 */
|
|
__dna_writer.writeFloatBig(unknown6);
|
|
/* damageVulnerabilty */
|
|
damageVulnerabilty.write(__dna_writer);
|
|
/* unknown7 */
|
|
__dna_writer.writeFloatBig(unknown7);
|
|
/* damageInfo */
|
|
damageInfo.write(__dna_writer);
|
|
|
|
if (propertyCount == 16)
|
|
__dna_writer.writeFloatBig(unknown8);
|
|
}
|
|
|
|
void fromYAML(Athena::io::YAMLDocReader& __dna_docin)
|
|
{
|
|
IScriptObject::fromYAML(__dna_docin);
|
|
/* name */
|
|
name = __dna_docin.readString("name");
|
|
/* location */
|
|
location = __dna_docin.readVec3f("location");
|
|
/* orientation */
|
|
orientation = __dna_docin.readVec3f("orientation");
|
|
/* scale */
|
|
scale = __dna_docin.readVec3f("scale");
|
|
/* patternedInfo */
|
|
__dna_docin.enumerate("patternedInfo", patternedInfo);
|
|
/* actorParameters */
|
|
__dna_docin.enumerate("actorParameters", actorParameters);
|
|
/* unknown1 */
|
|
unknown1 = __dna_docin.readFloat("unknown1");
|
|
/* unknown2 */
|
|
unknown2 = __dna_docin.readFloat("unknown2");
|
|
/* unknown3 */
|
|
unknown3 = __dna_docin.readFloat("unknown3");
|
|
/* unknown4 */
|
|
unknown4 = __dna_docin.readFloat("unknown4");
|
|
/* unknown5 */
|
|
unknown5 = __dna_docin.readFloat("unknown5");
|
|
/* unknown6 */
|
|
unknown6 = __dna_docin.readFloat("unknown6");
|
|
/* damageVulnerabilty */
|
|
__dna_docin.enumerate("damageVulnerabilty", damageVulnerabilty);
|
|
/* unknown7 */
|
|
unknown7 = __dna_docin.readFloat("unknown7");
|
|
/* damageInfo */
|
|
__dna_docin.enumerate("damageInfo", damageInfo);
|
|
|
|
if (propertyCount == 16)
|
|
unknown8 = __dna_docin.readFloat("unknown8");
|
|
else
|
|
unknown8 = 0.0;
|
|
}
|
|
|
|
void toYAML(Athena::io::YAMLDocWriter& __dna_docout) const
|
|
{
|
|
IScriptObject::toYAML(__dna_docout);
|
|
/* name */
|
|
__dna_docout.writeString("name", name);
|
|
/* location */
|
|
__dna_docout.writeVec3f("location", location);
|
|
/* orientation */
|
|
__dna_docout.writeVec3f("orientation", orientation);
|
|
/* scale */
|
|
__dna_docout.writeVec3f("scale", scale);
|
|
/* patternedInfo */
|
|
__dna_docout.enumerate("patternedInfo", patternedInfo);
|
|
/* actorParameters */
|
|
__dna_docout.enumerate("actorParameters", actorParameters);
|
|
/* unknown1 */
|
|
__dna_docout.writeFloat("unknown1", unknown1);
|
|
/* unknown2 */
|
|
__dna_docout.writeFloat("unknown2", unknown2);
|
|
/* unknown3 */
|
|
__dna_docout.writeFloat("unknown3", unknown3);
|
|
/* unknown4 */
|
|
__dna_docout.writeFloat("unknown4", unknown4);
|
|
/* unknown5 */
|
|
__dna_docout.writeFloat("unknown5", unknown5);
|
|
/* unknown6 */
|
|
__dna_docout.writeFloat("unknown6", unknown6);
|
|
/* damageVulnerabilty */
|
|
__dna_docout.enumerate("damageVulnerabilty", damageVulnerabilty);
|
|
/* unknown7 */
|
|
__dna_docout.writeFloat("unknown7", unknown7);
|
|
/* damageInfo */
|
|
__dna_docout.enumerate("damageInfo", damageInfo);
|
|
|
|
if (propertyCount == 16)
|
|
__dna_docout.writeFloat("unknown8", unknown8);
|
|
}
|
|
|
|
static const char* DNAType()
|
|
{
|
|
return "Retro::DNAMP1::Oculus";
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif
|