2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

more GX material additions

This commit is contained in:
Jack Andersen
2015-07-25 12:59:39 -10:00
parent 4972c2ae95
commit c526c7df85
7 changed files with 437 additions and 132 deletions

View File

@@ -0,0 +1,67 @@
#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<atUint32> textureCount;
Vector<UniqueID32, DNA_COUNT(textureCount)> texureIdxs;
DNAMP1::MaterialSet::Material::VAFlags vaFlags;
Value<atUint32> unk0; /* MP2 only */
Value<atUint32> unk1; /* MP2 only */
Value<atUint32> groupIdx;
Value<atUint32> konstCount;
Vector<GX::Color, DNA_COUNT(konstCount)> konstColors;
Value<atUint16> _blendDstFac;
inline DNAMP1::MaterialSet::Material::BlendFactor blendDestFactor() const
{return DNAMP1::MaterialSet::Material::BlendFactor(_blendDstFac);}
inline void setBlendDestFactor(DNAMP1::MaterialSet::Material::BlendFactor fac)
{_blendDstFac = fac;}
Value<atUint16> _blendSrcFac;
inline DNAMP1::MaterialSet::Material::BlendFactor blendSrcFactor() const
{return DNAMP1::MaterialSet::Material::BlendFactor(_blendSrcFac);}
inline void setBlendSrcFactor(DNAMP1::MaterialSet::Material::BlendFactor fac)
{_blendSrcFac = fac;}
Vector<atUint32, DNA_COUNT(flags.samusReflectionIndirectTexture())> indTexSlot;
Value<atUint32> colorChannelCount;
Vector<DNAMP1::MaterialSet::Material::ColorChannel, DNA_COUNT(colorChannelCount)> colorChannels;
Value<atUint32> tevStageCount;
Vector<DNAMP1::MaterialSet::Material::TEVStage, DNA_COUNT(tevStageCount)> tevStages;
Vector<DNAMP1::MaterialSet::Material::TEVStageTexInfo, DNA_COUNT(tevStageCount)> tevStageTexInfo;
Value<atUint32> tcgCount;
Vector<DNAMP1::MaterialSet::Material::TexCoordGen, DNA_COUNT(tcgCount)> tgcs;
Value<atUint32> uvAnimsSize;
Value<atUint32> uvAnimsCount;
Vector<DNAMP1::MaterialSet::Material::UVAnimation, DNA_COUNT(uvAnimsCount)> uvAnims;
};
Vector<Material, DNA_COUNT(head.materialCount)> materials;
};
}
}
#endif // _DNAMP2_CMDL_MATERIALS_HPP_

View File

@@ -1,6 +1,7 @@
make_dnalist(liblist
MLVL
STRG)
STRG
CMDLMaterials)
add_library(DNAMP2
DNAMP2.hpp DNAMP2.cpp
${liblist}