#ifndef _DNAMP1_FRME_HPP_ #define _DNAMP1_FRME_HPP_ #include "../DNACommon/DNACommon.hpp" #include "DNAMP1.hpp" #include namespace Retro { namespace DNAMP1 { struct FRME : BigDNA { DECL_EXPLICIT_DNA Value version; Value unk1; Value modelCount; // Matches MODL widgets Value unk3; Value widgetCount; struct Widget : BigDNA { DECL_EXPLICIT_DNA FRME* owner; DNAFourCC type; struct WidgetHeader : BigDNA { DECL_DNA String<-1> name; String<-1> parent; Value unk1; Value unk2; Value unk3; Value unk4; Value color; Value modelDrawFlags; } header; struct IWidgetInfo : BigDNA { Delete _d; virtual void read(Athena::io::IStreamReader&) {} void write(Athena::io::IStreamWriter&) const {} size_t binarySize(size_t __isz) const { return __isz; } }; std::unique_ptr widgetInfo; Value hasGroup; Value group; Value origin; Value basis[3]; Value rotationCenter; Value unk2; Value unk3; Value unk4; struct BWIGInfo : IWidgetInfo { Delete _d; }; struct HWIGInfo : IWidgetInfo { Delete _d; }; struct CAMRInfo : IWidgetInfo { DECL_EXPLICIT_DNA enum class ProjectionType { Perspective, Orthographic }; Value projectionType; struct IProjection : BigDNA { Delete _d; const ProjectionType type; IProjection(ProjectionType t) : type(t) {} }; struct PerspectiveProjection : IProjection { DECL_DNA PerspectiveProjection() : IProjection(ProjectionType::Perspective) {} Value fov; Value aspect; Value znear; Value zfar; }; struct OrthographicProjection : IProjection { DECL_DNA OrthographicProjection() : IProjection(ProjectionType::Orthographic) {} Value left; Value right; Value top; Value bottom; Value znear; Value zfar; }; std::unique_ptr projection; }; struct MODLInfo : IWidgetInfo { DECL_DNA UniqueID32 model; enum class BlendMode { Unknown0, Unknown1, Unknown2, Additive }; Value blendMode; Value lightMode; }; struct LITEInfo : IWidgetInfo { DECL_DNA Value unk1; Value unk2; Value unk3; Value unk4; Value unk5; Value unk6; Value unk7; Value unk8; }; struct ENRGInfo : IWidgetInfo { DECL_DNA UniqueID32 texture; }; struct METRInfo : IWidgetInfo { DECL_DNA Value unk1; Value value1; Value value2; }; struct GRUPInfo : IWidgetInfo { DECL_DNA Value unk1; Value unk2; Value unk3; }; struct TBGPInfo : IWidgetInfo { DECL_DNA Value unk1; Value unk2; Value unkEnum; Value unk3; Value un4; Value unk5; Value unk6; Value unkFloat1; Value unkFloat2; Value unk7; Value unkFloat3; Value unk8; Value unk9; Value unk10; Value unk11; }; struct SLGPInfo : IWidgetInfo { DECL_DNA Value min; Value max; Value unk1; Value unk2; }; struct TXPNInfo : IWidgetInfo { DECL_EXPLICIT_DNA atUint32 version = 0; TXPNInfo() {} TXPNInfo(atUint32 version) : version(version) {} Value frameVals[5]; UniqueID32 font; Value unk1; Value unk2; Value unk3; Value unk4; Value fillColor; Value outlineColor; Value pointScale; /* The following is only found in V1 */ UniqueID32 jpnFont; Value jpnPointScale[2]; }; struct IMGPInfo : IWidgetInfo { DECL_DNA UniqueID32 texture; Value unk1; Value unk2; Value quadCoordCount; Vector quadCoords; Value uvCoordCount; Vector uvCoords; }; }; Vector widgets; static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const HECL::ProjectPath& outPath, PAKRouter& pakRouter, const PAK::Entry& entry, bool force, std::function fileChanged); }; } } #endif // _DNAMP1_FRME_HPP_