#ifndef _DNAMP2_CMDL_MATERIALS_HPP_ #define _DNAMP2_CMDL_MATERIALS_HPP_ #include "../DNACommon/DNACommon.hpp" #include "../DNACommon/GX.hpp" #include "../DNAMP1/CMDLMaterials.hpp" namespace Retro { namespace DNAMP2 { /* Structurally identical to DNAMP1::MaterialSet except unk0 and unk1 fields */ struct MaterialSet : BigDNA { DECL_DNA DNAMP1::MaterialSet::MaterialSetHead head; struct Material : BigDNA { DECL_DNA DNAMP1::MaterialSet::Material::Flags flags; Value textureCount; Vector texureIdxs; DNAMP1::MaterialSet::Material::VAFlags vaFlags; Value unk0; /* MP2 only */ Value unk1; /* MP2 only */ Value groupIdx; Value konstCount; Vector konstColors; Value _blendDstFac; using BlendFactor = DNAMP1::MaterialSet::Material::BlendFactor; inline BlendFactor blendDestFactor() const {return BlendFactor(_blendDstFac);} inline void setBlendDestFactor(BlendFactor fac) {_blendDstFac = fac;} Value _blendSrcFac; inline BlendFactor blendSrcFactor() const {return BlendFactor(_blendSrcFac);} inline void setBlendSrcFactor(BlendFactor fac) {_blendSrcFac = fac;} Vector indTexSlot; Value colorChannelCount; Vector colorChannels; Value tevStageCount; Vector tevStages; Vector tevStageTexInfo; Value tcgCount; Vector tgcs; Value uvAnimsSize; Value uvAnimsCount; Vector uvAnims; }; Vector materials; }; } } #endif // _DNAMP2_CMDL_MATERIALS_HPP_