mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 22:04:41 -04:00
Templated out lyt_material
This commit is contained in:
@@ -12,7 +12,35 @@ namespace lyt {
|
||||
|
||||
class Material {
|
||||
public:
|
||||
Material(const res::Material *pResMat, const ResBlockSet &ResBlockSet);
|
||||
Material(const res::Material *pRes, const ResBlockSet &resBlockSet);
|
||||
|
||||
void Init();
|
||||
static void InitBitGXNums(detail::BitGXNums *ptr);
|
||||
void ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, u8 indStageNum,
|
||||
u8 indSRTNum, bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode);
|
||||
|
||||
TexMap *GetTexMapAry() const;
|
||||
TexMap *GetTexMapAry();
|
||||
TexSRT *GetTexSRTAry() const;
|
||||
TexSRT *GetTexSRTAry();
|
||||
TexCoordGen *GetTexCoordGenAry() const;
|
||||
TexCoordGen *GetTexCoordGenAry();
|
||||
ChanCtrl *GetChanCtrlAry();
|
||||
ut::Color *GetMatColAry();
|
||||
TevSwapMode *GetTevSwapAry();
|
||||
AlphaCompare *GetAlphaComparePtr();
|
||||
BlendMode *GetBlendModePtr();
|
||||
IndirectStage *GetIndirectStageAry();
|
||||
TexSRT *GetIndTexSRTAry();
|
||||
TevStage *GetTevStageAry();
|
||||
void SetName(const char *name);
|
||||
void SetTextureNum(u8 val);
|
||||
void SetTexCoordGenNum(u8 val);
|
||||
void SetTevStageNum(u8 val);
|
||||
void SetIndStageNum(u8 val);
|
||||
void SetColorElement(u32 colorType, s16 value);
|
||||
void AddAnimationLink(AnimationLink *pAnimationLink);
|
||||
|
||||
// IsBlendModeCap__Q34nw4r3lyt8MaterialCFv
|
||||
bool IsBlendModeCap() const {
|
||||
return mGXMemCap.blendMode;
|
||||
@@ -75,11 +103,6 @@ public:
|
||||
u8 GetTextureNum() const {
|
||||
return mGXMemNum.texMap;
|
||||
}
|
||||
void SetTextureNum(u8 val);
|
||||
void SetTexCoordGenNum(u8 val);
|
||||
TexMap *GetTexMapAry() const;
|
||||
TexMap *GetTexMapAry();
|
||||
TexCoordGen *GetTexCoordGenAry();
|
||||
|
||||
GXColorS10 GetTevColor(u32 idx) const {
|
||||
return mTevCols[idx];
|
||||
@@ -112,8 +135,8 @@ private:
|
||||
ut::LinkList<AnimationLink, 0> mAnimList; // at 0x4
|
||||
GXColorS10 mTevCols[3]; // at 0x10
|
||||
ut::Color mTevKCols[4]; // at 0x28
|
||||
BitGXNums mGXMemCap; // at 0x38
|
||||
BitGXNums mGXMemNum; // at 0x3C
|
||||
detail::BitGXNums mGXMemCap; // at 0x38
|
||||
detail::BitGXNums mGXMemNum; // at 0x3C
|
||||
void *mpGXMem; // at 0x40
|
||||
char mName[MATERIAL_NAME_SIZE + 1]; // at 0x44
|
||||
bool mbUserAllocated; // at 0x59
|
||||
|
||||
@@ -33,36 +33,108 @@ struct DataBlockHeader {
|
||||
u32 size; // at 0x4
|
||||
};
|
||||
|
||||
struct TexMap {
|
||||
// GetWarpModeS__Q44nw4r3lyt3res6TexMapCFv
|
||||
// GetWarpModeT__Q44nw4r3lyt3res6TexMapCFv
|
||||
// GetMinFilter__Q44nw4r3lyt3res6TexMapCFv
|
||||
// GetMagFilter__Q44nw4r3lyt3res6TexMapCFv
|
||||
u8 texIdx; // at 0x0
|
||||
u8 wrapSflt; // at 0x1
|
||||
u8 wrapTflt; // at 0x2
|
||||
struct TexSRT {
|
||||
math::VEC2 translate; // at 0x00
|
||||
f32 rotate; // at 0x08
|
||||
math::VEC2 scale; // at 0x0C
|
||||
};
|
||||
|
||||
struct TexMap {
|
||||
// GetWarpModeS__Q44nw4r3lyt3res6TexMapCFv
|
||||
GXTexWrapMode GetWarpModeS() const {
|
||||
return (GXTexWrapMode)wrapSflt; // TODO
|
||||
}
|
||||
|
||||
// GetWarpModeT__Q44nw4r3lyt3res6TexMapCFv
|
||||
GXTexWrapMode GetWarpModeT() const {
|
||||
return (GXTexWrapMode)wrapTflt; // TODO
|
||||
}
|
||||
|
||||
// GetMinFilter__Q44nw4r3lyt3res6TexMapCFv
|
||||
GXTexFilter GetMinFilter() const {
|
||||
u8 bitData;
|
||||
return (GXTexFilter)bitData; // TODO
|
||||
}
|
||||
|
||||
// GetMagFilter__Q44nw4r3lyt3res6TexMapCFv
|
||||
GXTexFilter GetMagFilter() const {
|
||||
u8 bitData;
|
||||
return (GXTexFilter)bitData; // TODO
|
||||
}
|
||||
u16 texIdx; // at 0x0
|
||||
u8 wrapSflt; // at 0x2
|
||||
u8 wrapTflt; // at 0x3
|
||||
};
|
||||
|
||||
struct MaterialResourceNum {
|
||||
// GetTevStageNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetTevStageNum() const {
|
||||
return (bits >> 18) & 0x1F;
|
||||
}
|
||||
|
||||
// GetIndTexStageNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetIndTexStageNum() const {
|
||||
return (bits >> 15) & 0x7;
|
||||
}
|
||||
// GetIndTexSRTNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetIndTexSRTNum() const {
|
||||
return (bits >> 4) & 0xF;
|
||||
}
|
||||
|
||||
// HasBlendMode__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
bool HasBlendMode() const {
|
||||
return (bits >> 24) & 1;
|
||||
}
|
||||
|
||||
// HasAlphaCompare__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
bool HasAlphaCompare() const {
|
||||
return (bits >> 23) & 1;
|
||||
}
|
||||
|
||||
// HasTevSwapTable__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
bool HasTevSwapTable() const {
|
||||
return (bits >> 12) & 1;
|
||||
}
|
||||
|
||||
// GetMatColNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetMatColNum() const {
|
||||
return (bits >> 27) & 1;
|
||||
}
|
||||
|
||||
// GetChanCtrlNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetChanControlNum() const {
|
||||
return (bits >> 25) & 1;
|
||||
}
|
||||
|
||||
// GetTexCoordGenNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetTexCoordGenNum() const {
|
||||
return (bits >> 8) & 0xF;
|
||||
}
|
||||
|
||||
// GetTexSRTNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetTexSRTNum() const {
|
||||
return (bits >> 13) & 0x3;
|
||||
}
|
||||
|
||||
// GetTexMapNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u8 GetTexMapNum() const {
|
||||
return (bits >> 0) & 0xF;
|
||||
}
|
||||
|
||||
u32 bits;
|
||||
};
|
||||
struct Material {
|
||||
char name[20]; // at 0x00
|
||||
GXColorS10 tevCols[3]; // at 0x14
|
||||
GXColorS10 tevKCols[3]; // at 0x2C
|
||||
MaterialResourceNum resNum; // at 0x3C
|
||||
};
|
||||
|
||||
struct Material {};
|
||||
struct MaterialList {
|
||||
DataBlockHeader blockHeader; // at 0x00
|
||||
u16 materialNum; // at 0x08
|
||||
u8 padding[2]; // at 0x0A
|
||||
};
|
||||
struct MaterialResourceNum {
|
||||
// GetTevStageNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetIndTexStageNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetIndTexSRTNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// HasBlendMode__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// HasAlphaCompare__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// HasTevSwapTable__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetMatColNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetChanCtrlNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetTexCoordGenNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetTexSRTNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
// GetTexMapNum__Q44nw4r3lyt3res19MaterialResourceNumCFv
|
||||
u32 bits;
|
||||
};
|
||||
|
||||
struct Group {
|
||||
DataBlockHeader blockHeader; // at 0x00 "grp1"
|
||||
@@ -116,6 +188,12 @@ struct Font {
|
||||
u8 padding[3]; // at 0x5
|
||||
};
|
||||
|
||||
struct Texture {
|
||||
u32 nameStrOffset; // at 0x0
|
||||
u8 type; // at 0x4
|
||||
u8 padding[3]; // at 0x5
|
||||
};
|
||||
|
||||
struct TextureList {
|
||||
DataBlockHeader blockHeader; // at 0x00
|
||||
u16 texNum; // at 0x08
|
||||
|
||||
+353
-18
@@ -8,6 +8,20 @@ namespace nw4r {
|
||||
namespace lyt {
|
||||
|
||||
namespace detail {
|
||||
struct BitGXNums {
|
||||
u32 texMap : 4;
|
||||
u32 texSRT : 4;
|
||||
u32 texCoordGen : 4;
|
||||
u32 indSRT : 2;
|
||||
u32 indStage : 3;
|
||||
u32 tevSwap : 1;
|
||||
u32 tevStage : 5;
|
||||
u32 chanCtrl : 1;
|
||||
u32 matCol : 1;
|
||||
u32 alpComp : 1;
|
||||
u32 blendMode : 1;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline bool TestBit(T bits, int index) {
|
||||
T mask = 1 << index;
|
||||
@@ -19,10 +33,17 @@ inline void SetBit(T *bits, int pos, bool val) {
|
||||
*bits = T((*bits & ~mask)) | (val << pos);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T GetBits(T bits, int pos, int len) {
|
||||
u32 mask = T(1 << pos);
|
||||
return bits & mask;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T *ConvertOffsToPtr(const void *baseAddress, unsigned int offset) {
|
||||
return (T *)((u32)baseAddress + offset);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
struct Size {
|
||||
Size() : width(), height() {}
|
||||
@@ -135,17 +156,17 @@ struct TexCoordGen {
|
||||
}
|
||||
|
||||
// GetTexGenType__Q34nw4r3lyt11TexCoordGenCFv
|
||||
u8 GetTexGenType() const {
|
||||
return texGenType;
|
||||
GXTexGenType GetTexGenType() const {
|
||||
return (GXTexGenType)texGenType;
|
||||
}
|
||||
|
||||
// GetTexGenSrc__Q34nw4r3lyt11TexCoordGenCFv
|
||||
u8 GetTexGenSrc() const {
|
||||
return texGenSrc;
|
||||
GXTexGenSrc GetTexGenSrc() const {
|
||||
return (GXTexGenSrc)texGenSrc;
|
||||
}
|
||||
|
||||
// GetTexMtx__Q34nw4r3lyt11TexCoordGenCFv
|
||||
u8 GetTexMtx() const {
|
||||
u32 GetTexMtx() const {
|
||||
return texMtx;
|
||||
}
|
||||
|
||||
@@ -156,9 +177,23 @@ struct TexCoordGen {
|
||||
};
|
||||
struct ChanCtrl { // 17552
|
||||
// __ct__Q34nw4r3lyt8ChanCtrlFv
|
||||
ChanCtrl() {}
|
||||
|
||||
// Set__Q34nw4r3lyt8ChanCtrlF11_GXColorSrc11_GXColorSrc
|
||||
void Set(GXColorSrc colSrc, GXColorSrc alpSrc) {
|
||||
matSrcCol = colSrc;
|
||||
matSrcAlp = alpSrc;
|
||||
}
|
||||
|
||||
// GetColorSrc__Q34nw4r3lyt8ChanCtrlCFv
|
||||
GXColorSrc GetColorSrc() const {
|
||||
return (GXColorSrc)matSrcCol;
|
||||
}
|
||||
|
||||
// GetAlphaSrc__Q34nw4r3lyt8ChanCtrlCFv
|
||||
GXColorSrc GetAlphaSrc() const {
|
||||
return (GXColorSrc)matSrcAlp;
|
||||
}
|
||||
|
||||
u8 matSrcCol; // at 0x0
|
||||
u8 matSrcAlp; // at 0x1
|
||||
@@ -166,26 +201,37 @@ struct ChanCtrl { // 17552
|
||||
u8 reserve2; // at 0x3
|
||||
};
|
||||
|
||||
struct BitGXNums {
|
||||
u32 texMap : 4;
|
||||
u32 texSRT : 4;
|
||||
u32 texCoordGen : 4;
|
||||
u32 indSRT : 2;
|
||||
u32 indStage : 3;
|
||||
u32 tevSwap : 1;
|
||||
u32 tevStage : 5;
|
||||
u32 chanCtrl : 1;
|
||||
u32 matCol : 1;
|
||||
u32 alpComp : 1;
|
||||
u32 blendMode : 1;
|
||||
};
|
||||
struct BlendMode { // 10c41
|
||||
// __ct__Q34nw4r3lyt9BlendModeFv
|
||||
BlendMode() {}
|
||||
|
||||
// Set__Q34nw4r3lyt9BlendModeF12_GXBlendMode14_GXBlendFactor14_GXBlendFactor10_GXLogicOp
|
||||
void Set(GXBlendMode aType, GXBlendFactor srcFactor, GXBlendFactor destFactor, GXLogicOp aOp) {
|
||||
type = aType;
|
||||
srcFactor = srcFactor;
|
||||
dstFactor = destFactor;
|
||||
op = aOp;
|
||||
}
|
||||
|
||||
// GetType__Q34nw4r3lyt9BlendModeCFv
|
||||
GXBlendMode GetType() const {
|
||||
return GXBlendMode(type);
|
||||
}
|
||||
|
||||
// GetSrcFactor__Q34nw4r3lyt9BlendModeCFv
|
||||
GXBlendFactor GetSrcFactor() const {
|
||||
return (GXBlendFactor)srcFactor;
|
||||
}
|
||||
|
||||
// GetDstFactor__Q34nw4r3lyt9BlendModeCFv
|
||||
GXBlendFactor GetDstFactor() const {
|
||||
return (GXBlendFactor)dstFactor;
|
||||
}
|
||||
|
||||
// GetOp__Q34nw4r3lyt9BlendModeCFv
|
||||
GXLogicOp GetOp() const {
|
||||
return (GXLogicOp)op;
|
||||
}
|
||||
|
||||
u8 type; // at 0x0
|
||||
u8 srcFactor; // at 0x1
|
||||
@@ -195,12 +241,35 @@ struct BlendMode { // 10c41
|
||||
|
||||
struct AlphaCompare { // 17457
|
||||
// __ct__Q34nw4r3lyt12AlphaCompareFv
|
||||
AlphaCompare() {}
|
||||
|
||||
// Set__Q34nw4r3lyt12AlphaCompareF10_GXCompareUc10_GXAlphaOp10_GXCompareUc
|
||||
void Set(GXCompare aComp0, u8 aRef0, GXAlphaOp aOp, GXCompare aComp1, u8 aRef1) {}
|
||||
|
||||
// GetComp0__Q34nw4r3lyt12AlphaCompareCFv
|
||||
GXCompare GetComp0() const {
|
||||
// return (GXCompare)
|
||||
}
|
||||
|
||||
// GetRef0__Q34nw4r3lyt12AlphaCompareCFv
|
||||
u8 GetRef0() const {
|
||||
return ref0;
|
||||
}
|
||||
|
||||
// GetOp__Q34nw4r3lyt12AlphaCompareCFv
|
||||
GXAlphaOp GetOp() const {
|
||||
return (GXAlphaOp)op;
|
||||
}
|
||||
|
||||
// GetComp1__Q34nw4r3lyt12AlphaCompareCFv
|
||||
GXCompare GetComp1() const {
|
||||
// return (GXCompare)
|
||||
}
|
||||
|
||||
// GetRef1__Q34nw4r3lyt12AlphaCompareCFv
|
||||
u8 GetRef1() const {
|
||||
return ref1;
|
||||
}
|
||||
|
||||
u8 comp; // at 0x0
|
||||
u8 op; // at 0x1
|
||||
@@ -209,11 +278,35 @@ struct AlphaCompare { // 17457
|
||||
};
|
||||
struct IndirectStage { // 172da
|
||||
// __ct__Q34nw4r3lyt13IndirectStageFv
|
||||
IndirectStage() {}
|
||||
|
||||
// Set__Q34nw4r3lyt13IndirectStageF13_GXTexCoordID11_GXTexMapID14_GXIndTexScale14_GXIndTexScale
|
||||
void Set(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXIndTexScale aScaleS, GXIndTexScale aScaleT) {
|
||||
texCoordGen = aTexCoordGen;
|
||||
texMap = aTexMap;
|
||||
scaleS = aScaleS;
|
||||
scaleT = aScaleT;
|
||||
}
|
||||
|
||||
// GetTexCoordGen__Q34nw4r3lyt13IndirectStageCFv
|
||||
GXTexCoordID GetTexCoordGen() const {
|
||||
return (GXTexCoordID)texCoordGen;
|
||||
}
|
||||
|
||||
// GetTexMap__Q34nw4r3lyt13IndirectStageCFv
|
||||
GXTexMapID GetTexMap() const {
|
||||
return (GXTexMapID)texMap;
|
||||
}
|
||||
|
||||
// GetScaleS__Q34nw4r3lyt13IndirectStageCFv
|
||||
GXIndTexScale GetScaleS() const {
|
||||
return (GXIndTexScale)scaleS;
|
||||
}
|
||||
|
||||
// GetScaleT__Q34nw4r3lyt13IndirectStageCFv
|
||||
GXIndTexScale GetScaleT() const {
|
||||
return (GXIndTexScale)scaleT;
|
||||
}
|
||||
|
||||
u8 texCoordGen; // at 0x0
|
||||
u8 texMap; // at 0x1
|
||||
@@ -230,64 +323,284 @@ struct TexSRT { // 17243
|
||||
|
||||
struct TevStageInOp { // 16fe7
|
||||
// GetA__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetA() const {
|
||||
return ab; // TODO
|
||||
}
|
||||
|
||||
// GetB__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetB() const {
|
||||
return ab; // TODO
|
||||
}
|
||||
|
||||
// GetC__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetC() const {
|
||||
return cd; // TODO
|
||||
}
|
||||
|
||||
// GetD__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetD() const {
|
||||
return cd; // TODO
|
||||
}
|
||||
|
||||
// GetOp__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetOp() const {
|
||||
return op; // TODO
|
||||
}
|
||||
|
||||
// GetBias__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetBias() const {
|
||||
return op; // TODO
|
||||
}
|
||||
|
||||
// GetScale__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetScale() const {
|
||||
return op; // TODO
|
||||
}
|
||||
|
||||
// IsClamp__Q34nw4r3lyt12TevStageInOpCFv
|
||||
bool IsClamp() const {
|
||||
return cl; // TODO
|
||||
}
|
||||
|
||||
// GetOutReg__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetOutReg() const {
|
||||
return op; // TODO
|
||||
}
|
||||
|
||||
// GetKSel__Q34nw4r3lyt12TevStageInOpCFv
|
||||
u8 GetKSel() const {
|
||||
return cl; // TODO
|
||||
}
|
||||
|
||||
// SetIn__Q34nw4r3lyt12TevStageInOpFUcUcUcUc
|
||||
void SetIn(u8 a, u8 b, u8 c, u8 d) {}
|
||||
|
||||
// SetOp__Q34nw4r3lyt12TevStageInOpFUcUcUcbUcUc
|
||||
void SetOp(u8 aOp, u8 bias, u8 scale, bool clamp, u8 outReg, u8 kSel) {}
|
||||
|
||||
u8 ab; // at 0x0
|
||||
u8 cd; // at 0x1
|
||||
u8 op; // at 0x2
|
||||
u8 cl; // at 0x3
|
||||
};
|
||||
|
||||
struct TevStage { // 17094
|
||||
// __ct__Q34nw4r3lyt8TevStageFv
|
||||
TevStage() {}
|
||||
|
||||
// GetTexCoordGen__Q34nw4r3lyt8TevStageCFv
|
||||
GXTexCoordID GetTexCoordGen() const {
|
||||
return (GXTexCoordID)texCoordGen;
|
||||
}
|
||||
|
||||
// GetTexMap__Q34nw4r3lyt8TevStageCFv
|
||||
GXTexMapID GetTexMap() const {
|
||||
return (GXTexMapID)texMap;
|
||||
}
|
||||
|
||||
// GetColorChan__Q34nw4r3lyt8TevStageCFv
|
||||
GXChannelID GetColorChan() const {
|
||||
return (GXChannelID)colChan;
|
||||
}
|
||||
|
||||
// GetRasSwapSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevSwapSel GetRasSwapSel() const {
|
||||
return (GXTevSwapSel)swapSel; // TODO
|
||||
}
|
||||
|
||||
// GetTexSwapSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevSwapSel GetTexSwapSel() const {
|
||||
return (GXTevSwapSel)swapSel; // TODO
|
||||
}
|
||||
|
||||
// GetColorInA__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevColorArg GetColorInA() const {
|
||||
return (GXTevColorArg)colIn.GetA();
|
||||
}
|
||||
|
||||
// GetColorInB__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevColorArg GetColorInB() const {
|
||||
return (GXTevColorArg)colIn.GetB();
|
||||
}
|
||||
|
||||
// GetColorInC__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevColorArg GetColorInC() const {
|
||||
return (GXTevColorArg)colIn.GetC();
|
||||
}
|
||||
|
||||
// GetColorInD__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevColorArg GetColorInD() const {
|
||||
return (GXTevColorArg)colIn.GetD();
|
||||
}
|
||||
|
||||
// GetColorOp__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevOp GetColorOp() const {
|
||||
return (GXTevOp)colIn.GetOp();
|
||||
}
|
||||
|
||||
// GetColorBias__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevBias GetColorBias() const {
|
||||
return (GXTevBias)colIn.GetBias();
|
||||
}
|
||||
|
||||
// GetColorScale__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevScale GetColorScale() const {
|
||||
return (GXTevScale)colIn.GetScale();
|
||||
}
|
||||
|
||||
// IsColorClamp__Q34nw4r3lyt8TevStageCFv
|
||||
bool IsColorClamp() const {
|
||||
return colIn.IsClamp();
|
||||
}
|
||||
|
||||
// GetColorOutReg__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevRegID GetColorOutReg() const {
|
||||
return (GXTevRegID)colIn.GetOutReg();
|
||||
}
|
||||
|
||||
// GetKColorSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevKColorSel GetKColorSel() const {
|
||||
return (GXTevKColorSel)colIn.GetKSel();
|
||||
}
|
||||
|
||||
// GetAlphaInA__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevAlphaArg GetAlphaInA() const {
|
||||
return (GXTevAlphaArg)alpIn.GetA();
|
||||
}
|
||||
|
||||
// GetAlphaInB__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevAlphaArg GetAlphaInB() const {
|
||||
return (GXTevAlphaArg)alpIn.GetB();
|
||||
}
|
||||
|
||||
// GetAlphaInC__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevAlphaArg GetAlphaInC() const {
|
||||
return (GXTevAlphaArg)alpIn.GetC();
|
||||
}
|
||||
|
||||
// GetAlphaInD__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevAlphaArg GetAlphaInD() const {
|
||||
return (GXTevAlphaArg)alpIn.GetD();
|
||||
}
|
||||
|
||||
// GetAlphaOp__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevOp GetAlphaOp() const {
|
||||
return (GXTevOp)alpIn.GetOp();
|
||||
}
|
||||
|
||||
// GetAlphaBias__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevBias GetAlphaBias() const {
|
||||
return (GXTevBias)alpIn.GetBias();
|
||||
}
|
||||
|
||||
// GetAlphaScale__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevScale GetAlphaScale() const {
|
||||
return (GXTevScale)alpIn.GetScale();
|
||||
}
|
||||
|
||||
// IsAlphaClamp__Q34nw4r3lyt8TevStageCFv
|
||||
bool IsAlphaClamp() const {
|
||||
return alpIn.IsClamp();
|
||||
}
|
||||
|
||||
// GetAlphaOutReg__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevRegID GetAlphaOutReg() const {
|
||||
return (GXTevRegID)alpIn.GetOutReg();
|
||||
}
|
||||
|
||||
// GetKAlphaSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXTevKAlphaSel GetKAlphaSel() const {
|
||||
return (GXTevKAlphaSel)alpIn.GetKSel();
|
||||
}
|
||||
|
||||
// GetIndMtxSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexMtxID GetIndMtxSel() const {
|
||||
return (GXIndTexMtxID)inBiMt; // TODO
|
||||
}
|
||||
|
||||
// GetIndStage__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexStageID GetIndStage() const {
|
||||
return (GXIndTexStageID)indStage;
|
||||
}
|
||||
|
||||
// GetIndFormat__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexFormat GetIndFormat() const {
|
||||
return (GXIndTexFormat)indFoAdUtAl; // TODO
|
||||
}
|
||||
|
||||
// GetIndBiasSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexBiasSel GetIndBiasSel() const {
|
||||
return (GXIndTexBiasSel)inBiMt; // TODO
|
||||
}
|
||||
|
||||
// GetIndWrapS__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexWrap GetIndWrapS() const {
|
||||
return (GXIndTexWrap)indWrap; // TODO
|
||||
}
|
||||
|
||||
// GetIndWrapT__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexWrap GetIndWrapT() const {
|
||||
return (GXIndTexWrap)indWrap; // TODO
|
||||
}
|
||||
|
||||
// IsIndAddPrev__Q34nw4r3lyt8TevStageCFv
|
||||
bool IsIndAddPrev() const {
|
||||
return indFoAdUtAl; // TODO
|
||||
}
|
||||
|
||||
// IsIndUtcLod__Q34nw4r3lyt8TevStageCFv
|
||||
bool IsIndUtcLod() const {
|
||||
return indFoAdUtAl; // TODO
|
||||
}
|
||||
|
||||
// GetIndAlphaSel__Q34nw4r3lyt8TevStageCFv
|
||||
GXIndTexAlphaSel GetIndAlphaSel() const {
|
||||
return (GXIndTexAlphaSel)indFoAdUtAl; // TODO
|
||||
}
|
||||
|
||||
// SetOrder__Q34nw4r3lyt8TevStageF13_GXTexCoordID11_GXTexMapID12_GXChannelID13_GXTevSwapSel13_GXTevSwapSel
|
||||
void SetOrder(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXChannelID aColChan, GXTevSwapSel rasSel,
|
||||
GXTevSwapSel texSel) {
|
||||
texCoordGen = aTexCoordGen;
|
||||
colChan = aColChan;
|
||||
texMap = aTexMap;
|
||||
swapSel = rasSel; // TODO
|
||||
swapSel = texSel; // TODO
|
||||
}
|
||||
|
||||
// SetColorIn__Q34nw4r3lyt8TevStageF14_GXTevColorArg14_GXTevColorArg14_GXTevColorArg14_GXTevColorArg
|
||||
void SetColorIn(GXTevColorArg a, GXTevColorArg b, GXTevColorArg c, GXTevColorArg d) {
|
||||
colIn.SetIn(a, b, c, d);
|
||||
}
|
||||
|
||||
// SetAlphaIn__Q34nw4r3lyt8TevStageF14_GXTevAlphaArg14_GXTevAlphaArg14_GXTevAlphaArg14_GXTevAlphaArg
|
||||
void SetAlphaIn(GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c, GXTevAlphaArg d) {
|
||||
alpIn.SetIn(a, b, c, d);
|
||||
}
|
||||
|
||||
// SetColorOp__Q34nw4r3lyt8TevStageF8_GXTevOp10_GXTevBias11_GXTevScaleb11_GXTevRegID15_GXTevKColorSel
|
||||
void SetColorOp(GXTevOp op, GXTevBias bias, GXTevScale scale, bool clamp, GXTevRegID outReg, GXTevKColorSel kSel) {
|
||||
colIn.SetOp(op, bias, scale, clamp, outReg, kSel);
|
||||
}
|
||||
|
||||
// SetAlphaOp__Q34nw4r3lyt8TevStageF8_GXTevOp10_GXTevBias11_GXTevScaleb11_GXTevRegID15_GXTevKAlphaSel
|
||||
void SetAlphaOp(GXTevOp op, GXTevBias bias, GXTevScale scale, bool clamp, GXTevRegID outReg, GXTevKAlphaSel kSel) {
|
||||
alpIn.SetOp(op, bias, scale, clamp, outReg, kSel);
|
||||
}
|
||||
|
||||
// SetIndirect__Q34nw4r3lyt8TevStageF16_GXIndTexStageID15_GXIndTexFormat16_GXIndTexBiasSel14_GXIndTexMtxID13_GXIndTexWrap13_GXIndTexWrapbb17_GXIndTexAlphaSel
|
||||
void SetIndirect(GXIndTexStageID stage, GXIndTexFormat format, GXIndTexBiasSel bias, GXIndTexMtxID mtxSel,
|
||||
GXIndTexWrap wrapS, GXIndTexWrap wrapT, bool addPrev, bool utcLod, GXIndTexAlphaSel alphaSel) {
|
||||
indStage = stage;
|
||||
indFoAdUtAl = format; // TODO
|
||||
inBiMt = bias; // TODO
|
||||
inBiMt = mtxSel; // TODO
|
||||
indWrap = wrapS; // TODO
|
||||
indWrap = wrapT; // TODO
|
||||
indFoAdUtAl = addPrev; // TODO
|
||||
indFoAdUtAl = utcLod; // TODO
|
||||
indFoAdUtAl = alphaSel; // TODO
|
||||
}
|
||||
|
||||
u8 texCoordGen; // at 0x0
|
||||
u8 colChan; // at 0x1
|
||||
@@ -304,10 +617,32 @@ struct TevStage { // 17094
|
||||
struct TevSwapMode { // 1750a
|
||||
|
||||
// GetR__Q34nw4r3lyt11TevSwapModeCFv
|
||||
GXTevColorChan GetR() const {
|
||||
return (GXTevColorChan)swap; // TODO
|
||||
}
|
||||
|
||||
// GetG__Q34nw4r3lyt11TevSwapModeCFv
|
||||
GXTevColorChan GetG() const {
|
||||
return (GXTevColorChan)swap; // TODO
|
||||
}
|
||||
|
||||
// GetB__Q34nw4r3lyt11TevSwapModeCFv
|
||||
GXTevColorChan GetB() const {
|
||||
return (GXTevColorChan)swap; // TODO
|
||||
}
|
||||
|
||||
// GetA__Q34nw4r3lyt11TevSwapModeCFv
|
||||
GXTevColorChan GetA() const {
|
||||
return (GXTevColorChan)swap; // TODO
|
||||
}
|
||||
|
||||
// Set__Q34nw4r3lyt11TevSwapModeF15_GXTevColorChan15_GXTevColorChan15_GXTevColorChan15_GXTevColorChan
|
||||
void Set(GXTevColorChan r, GXTevColorChan g, GXTevColorChan b, GXTevColorChan a) {
|
||||
swap = r; // TODO
|
||||
swap = g; // TODO
|
||||
swap = b; // TODO
|
||||
swap = a; // TODO
|
||||
}
|
||||
|
||||
u8 swap; // at 0x0
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user