From fa4ce249a19c6d82280f712aa8aed142801148de Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Sat, 1 Jun 2024 02:09:53 -0400 Subject: [PATCH] Templated out lyt_material --- config/SOUE01/splits.txt | 4 + config/SOUE01/symbols.txt | 2 +- configure.py | 1 + include/nw4r/lyt/lyt_material.h | 39 ++- include/nw4r/lyt/lyt_resources.h | 124 +++++++-- include/nw4r/lyt/lyt_types.h | 371 ++++++++++++++++++++++++-- src/nw4r/lyt/lyt_material.cpp | 429 +++++++++++++++++++++++++++++++ 7 files changed, 920 insertions(+), 50 deletions(-) diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 80040998..f0672a3f 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -366,6 +366,10 @@ nw4r/lyt/lyt_bounding.cpp: .data start:0x8056E6C0 end:0x8056E734 .sbss start:0x80576718 end:0x8057671C +nw4r/lyt/lyt_material.cpp: + .text start:0x8048D7D0 end:0x804905D0 + .data start:0x8056E738 end:0x8056E7A8 + nw4r/lyt/lyt_resourceAccessor.cpp: .text start:0x80492000 end:0x80492058 .data start:0x8056E7E0 end:0x8056E7F8 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index fa3fc80e..e08f5331 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -25997,7 +25997,7 @@ __as__Q34nw4r3lyt11TexCoordGenFRCQ34nw4r3lyt11TexCoordGen = .text:0x8048E320; // __as__Q34nw4r3lyt8ChanCtrlFRCQ34nw4r3lyt8ChanCtrl = .text:0x8048E350; // type:function size:0x24 __as__Q34nw4r2ut5ColorFRCQ34nw4r2ut5Color = .text:0x8048E380; // type:function size:0x24 __as__Q34nw4r3lyt11TevSwapModeFRCQ34nw4r3lyt11TevSwapMode = .text:0x8048E3B0; // type:function size:0xC -__as__Q34nw4r3lyt6TexSRTFRCQ34nw4r3lyt6TexSR = .text:0x8048E3C0; // type:function size:0x2C +__as__Q34nw4r3lyt6TexSRTFRCQ34nw4r3lyt6TexSRT = .text:0x8048E3C0; // type:function size:0x2C __as__Q34nw4r3lyt13IndirectStageFRCQ34nw4r3lyt13IndirectStage = .text:0x8048E3F0; // type:function size:0x24 __as__Q34nw4r3lyt8TevStageFRCQ34nw4r3lyt8TevStage = .text:0x8048E420; // type:function size:0x64 __as__Q34nw4r3lyt12AlphaCompareFRCQ34nw4r3lyt12AlphaCompare = .text:0x8048E490; // type:function size:0x24 diff --git a/configure.py b/configure.py index 1cef6782..8f362118 100644 --- a/configure.py +++ b/configure.py @@ -360,6 +360,7 @@ config.libs = [ Object(Matching, "nw4r/lyt/lyt_textBox.cpp"), Object(Matching, "nw4r/lyt/lyt_window.cpp"), Object(Matching, "nw4r/lyt/lyt_bounding.cpp"), + Object(NonMatching, "nw4r/lyt/lyt_material.cpp"), Object(Matching, "nw4r/lyt/lyt_resourceAccessor.cpp"), Object(Matching, "nw4r/lyt/lyt_arcResourceAccessor.cpp"), Object(Matching, "nw4r/lyt/lyt_common.cpp"), diff --git a/include/nw4r/lyt/lyt_material.h b/include/nw4r/lyt/lyt_material.h index 970fe84f..94b2110f 100644 --- a/include/nw4r/lyt/lyt_material.h +++ b/include/nw4r/lyt/lyt_material.h @@ -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 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 diff --git a/include/nw4r/lyt/lyt_resources.h b/include/nw4r/lyt/lyt_resources.h index a5687948..168503da 100644 --- a/include/nw4r/lyt/lyt_resources.h +++ b/include/nw4r/lyt/lyt_resources.h @@ -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 diff --git a/include/nw4r/lyt/lyt_types.h b/include/nw4r/lyt/lyt_types.h index 31f75a7f..563b0689 100644 --- a/include/nw4r/lyt/lyt_types.h +++ b/include/nw4r/lyt/lyt_types.h @@ -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 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 +T GetBits(T bits, int pos, int len) { + u32 mask = T(1 << pos); + return bits & mask; +} + template 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 }; diff --git a/src/nw4r/lyt/lyt_material.cpp b/src/nw4r/lyt/lyt_material.cpp index 9546dd49..f151de6d 100644 --- a/src/nw4r/lyt/lyt_material.cpp +++ b/src/nw4r/lyt/lyt_material.cpp @@ -1,10 +1,439 @@ +#include + +// DefaultBlackColor +// DefaultWhiteColor + +// __eq__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRC11_GXColorS10RC11_GXColorS10 +inline bool operator==(const GXColorS10 &a, const GXColorS10 &b) { + return (a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a); +} + +inline bool operator!=(const GXColorS10 &a, const GXColorS10 &b) { + return (a.r != b.r || a.g != b.g || a.b != b.b || a.a != b.a); +} +namespace nw4r { +namespace lyt { + +namespace { + +// CalcTextureMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FPQ34nw4r4math5MTX34RCQ34nw4r3lyt6TexSRT +void CalcTextureMtx(math::MTX34 *pMtx, const TexSRT &texSRT) { + math::VEC2 center; + f32 cosR; + f32 sinR; + f32 a0; + f32 a1; +} + +// CalcIndTexMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FPA3_fRCQ34nw4r3lyt6TexSRT +void CalcIndTexMtx(f32 (*mtx)[3], const TexSRT &texSRT) { + f32 cosR; + f32 sinR; +} + +// SetColorComponentValue__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FPQ34nw4r2ut5ColorUls +void SetColorComponentValue(ut::Color *pCol, u32 compIdx, s16 value) { + u8 u8Val; +} + +// SetIndTexMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@F14_GXIndTexMtxIDPA3_Cf +void SetIndTexMtx(GXIndTexMtxID id, const f32 (*mtx)[3]) { + f32 m00, m01, m02, m10, m11, m12, a00, a01, a02, a10, a11, a12; + s8 scaleExp; + f32 outMtx[3]; +} + +// InitTexSRT__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FPQ34nw4r3lyt6TexSRTUl +void InitTexSRT(TexSRT *texSRTs, u32 num) { + u32 i; +} + +// CalcOffsetTexSRTAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetTexSRTAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetTexCoordGenAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetTexCoordGenAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetChanCtrlAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetChanCtrlAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetMatColAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetMatColAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetTevSwapAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetTevSwapAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetGetAlphaCompare__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetGetAlphaCompare(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetBlendMode__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetBlendMode(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetIndirectStageAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetIndirectStageAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetIndTexSRTAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetIndTexSRTAry(const detail::BitGXNums &bitGXNums) {} + +// CalcOffsetTevStageAry__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FRCQ44nw4r3lyt6detail9BitGXNums +u32 CalcOffsetTevStageAry(const detail::BitGXNums &bitGXNums) {} + +} // namespace + +// __ct__Q34nw4r3lyt8MaterialFPCQ44nw4r3lyt3res8MaterialRCQ34nw4r3lyt11ResBlockSet +Material::Material(const res::Material *pRes, const ResBlockSet &resBlockSet) { + { int i; } + { int i; } + u32 resOffs; + const res::TexMap *pResTexMap; + const res::TexSRT *pResTexSRTs; + const TexCoordGen *resTexCoordGen; + u8 texMapNum; + u8 texSRTNum; + u8 texCoordGenNum; + bool allocChanCtrl; + bool allocMatCol; + bool allocTevSwap; + bool allocAlpComp; + bool allocBlendMode; + u8 indTexSRTNum; + u8 indStageNum; + u8 tevStageNum; + const res::Texture *textures; + const TexMap *texMaps; + u8 di, si; + const char *fileName; + void *pTplRes; + res::TexSRT *texSRTs; + { int i; } + TexCoordGen *texCoordGens; + { int i; } + const ChanCtrl *pResChanCtrl; + ut::Color *pResMatCol; + const TevSwapMode *pResTevSwap; + const TevSwapMode *tevSwaps; + { int i; } + const TexSRT *indTexSRTs; + const TexSRT *pResIndMtx; + { int i; } + IndirectStage *indirectStages; + const IndirectStage *pResIndStg; + { int i; } + const TevStage *tevStages; + const TevStage *pResTevStg; + { int i; } + const AlphaCompare *pResAlphaCompare; + const BlendMode *pResBlendMode; +} + +// Init__Q34nw4r3lyt8MaterialFv +void Material::Init() {} + +// __dt__Q34nw4r3lyt8MaterialFv +Material::~Material() {} + +// InitBitGXNums__Q34nw4r3lyt8MaterialFPQ44nw4r3lyt6detail9BitGXNums +void Material::InitBitGXNums(detail::BitGXNums *ptr) {} + +// ReserveGXMem__Q34nw4r3lyt8MaterialFUcUcUcUcbUcUcbbbb +void Material::ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, + u8 indStageNum, u8 indSRTNum, bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode) { + int tevSwapNum; + int chanCtrlNum; + int matColNum; + int alpCompNum; + int blendModeNum; + const TevSwapMode *tevSwaps; +} + +// GetTexMapAry__Q34nw4r3lyt8MaterialCFv +TexMap *Material::GetTexMapAry() const {} + +// GetTexMapAry__Q34nw4r3lyt8MaterialFv +TexMap *Material::GetTexMapAry() {} + +// GetTexSRTAry__Q34nw4r3lyt8MaterialFv +TexSRT *Material::GetTexSRTAry() {} + +// GetTexCoordGenAry__Q34nw4r3lyt8MaterialFv +TexCoordGen *Material::GetTexCoordGenAry() {} + +// GetChanCtrlAry__Q34nw4r3lyt8MaterialFv +ChanCtrl *Material::GetChanCtrlAry() {} + +// GetMatColAry__Q34nw4r3lyt8MaterialFv +ut::Color *Material::GetMatColAry() {} + +// GetTevSwapAry__Q34nw4r3lyt8MaterialFv +TevSwapMode *Material::GetTevSwapAry() {} + +// GetAlphaComparePtr__Q34nw4r3lyt8MaterialFv +AlphaCompare *Material::GetAlphaComparePtr() {} + +// GetBlendModePtr__Q34nw4r3lyt8MaterialFv +BlendMode *Material::GetBlendModePtr() {} + +// GetIndirectStageAry__Q34nw4r3lyt8MaterialFv +IndirectStage *Material::GetIndirectStageAry() {} + +// GetIndTexSRTAry__Q34nw4r3lyt8MaterialFv +TexSRT *Material::GetIndTexSRTAry() {} + +// GetTevStageAry__Q34nw4r3lyt8MaterialFv +TevStage *Material::GetTevStageAry() {} + +// SetName__Q34nw4r3lyt8MaterialFPCc +void Material::SetName(const char *name) {} + +// SetTextureNum__Q34nw4r3lyt8MaterialFUc +void Material::SetTextureNum(u8 num) { + TexMap *texMaps; + u32 i; +} + +// SetTexCoordGenNum__Q34nw4r3lyt8MaterialFUc +void Material::SetTexCoordGenNum(u8 num) { + TexCoordGen *texCoordGens; + u32 i; +} + +// SetTevStageNum__Q34nw4r3lyt8MaterialFUc +void Material::SetTevStageNum(u8 num) { + TevStage *tevStages; + u32 i; +} + +// SetIndStageNum__Q34nw4r3lyt8MaterialFUc +void Material::SetIndStageNum(u8 num) { + IndirectStage *indStages; + u32 i; +} + +// SetColorElement__Q34nw4r3lyt8MaterialFUls +void Material::SetColorElement(u32 colorType, s16 value) { + ut::Color *matCols; + { u32 regIdx; } + { u32 regIdx; } + GXTevKColorSel kColSels[8]; + GXTevKAlphaSel kAlpSels[8]; +} // SetupGX__Q34nw4r3lyt8MaterialFbUc +bool Material::SetupGX(bool bModVtxCol, u8 alpha) { + bool bUseVtxCol; + bool bUseMatCol; + const ChanCtrl *chanCtrls; + bool bUseRasStage; + ut::Color matCol; + bool bSetTexMtx; + bool bUseTexMtxl; + { int i; } + const TexCoordGen *texCoordGens; + { int i; } + u32 texMtx; + const TexSRT *texSRTs; + { int i; } + { math::MTX34 texMtx; } + u32 tlutID; + u32 bigTlutID; + const TexMap *texMaps; + { int i; } + // TexMap & texMap; + GXTexObj texObj; + u32 tlutName; + GXTlutObj tlutObj; + const TevSwapMode *tevSwaps; + { int i; } + bool bSetIndTexMtx; + bool bUseIndTexMtx; + { int i; } + const TevStage *tevStages; + { int i; } + GXTevStageID tevStage; + GXIndTexMtxID indMtxSel; + u8 tevStageID; + { GXTevStageID tevStage; } + { GXTevStageID tevStage; } + { GXTevStageID tevStage; } + { int i; } + { GXTevStageID tevStage; } + GXTevColorArg colDIn; + GXTevAlphaArg alpDIn; + { GXTevStageID tevStage; } + { GXTevStageID tevStage; } + u8 tevStageNum; + u8 id; + { GXTevStageID tevStage; } + const TexSRT *indTexSRTs; + { int i; } + f32 mtx[2][3]; + const IndirectStage *indirectStages; + { int i; } + GXIndTexStageID indStage; + const AlphaCompare *pAlpComp; + const BlendMode *pBlendMode; +} + +namespace { +// GetTexMtx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FUl +u32 GetTexMtx(u32 texMtxIdx) {} + +// GetTexMtxIdx__Q34nw4r3lyt26@unnamed@lyt_material_cpp@FUl +u32 GetTexMtxIdx(u32 texMtx) {} + +} // namespace + // BindAnimation__Q34nw4r3lyt8MaterialFPQ34nw4r3lyt13AnimTransform +void Material::BindAnimation(AnimTransform *pAnimTrans) {} + // UnbindAnimation__Q34nw4r3lyt8MaterialFPQ34nw4r3lyt13AnimTransform +void Material::UnbindAnimation(AnimTransform *pAnimTrans) {} + // UnbindAllAnimation__Q34nw4r3lyt8MaterialFv +void Material::UnbindAllAnimation() {} + // Animate__Q34nw4r3lyt8MaterialFv +void Material::Animate() { + ut::LinkList::Iterator it; + AnimTransform *animTrans; +} + +// AddAnimationLink__Q34nw4r3lyt8MaterialFPQ34nw4r3lyt13AnimationLink +void Material::AddAnimationLink(AnimationLink *pAnimationLink) {} + // FindAnimationLink__Q34nw4r3lyt8MaterialFPQ34nw4r3lyt13AnimTransform +AnimationLink *Material::FindAnimationLink(AnimTransform *pAnimTrans) {} + // FindAnimationLink__Q34nw4r3lyt8MaterialFRCQ34nw4r3lyt12AnimResource +AnimationLink *Material::FindAnimationLink(const AnimResource &animRes) {} + // SetAnimationEnable__Q34nw4r3lyt8MaterialFPQ34nw4r3lyt13AnimTransformb +void Material::SetAnimationEnable(AnimTransform *pAnimTrans, bool bEnable) {} + // SetAnimationEnable__Q34nw4r3lyt8MaterialFRCQ34nw4r3lyt12AnimResourceb +void Material::SetAnimationEnable(const AnimResource &animRes, bool bEnable) { + AnimationLink *pAnimLink; +} + +namespace detail { + +// GetTextureSize__Q34nw4r3lyt6detailFPQ34nw4r3lyt8MaterialUc +Size GetTextureSize(Material *pMaterial, u8 texMapIdx) {} + +} // namespace detail + +} // namespace lyt + +} // namespace nw4r + +// INLINED FROM OTHER FILES +// ut_inlines.h +// Min__Q34nw4r2ut26@unnamed@lyt_material_cpp@Fss_s +// Max__Q34nw4r2ut26@unnamed@lyt_material_cpp@Fss_s +// Min__Q34nw4r2ut26@unnamed@lyt_material_cpp@FUcUc_Uc + +// lyt_types.h +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt9BlendMode +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt12AlphaCompare +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt8TevStage +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt13IndirectStage +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt11TevSwapMode +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r2ut5Color +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt8ChanCtrl +// GetBits__Q34nw4r3lyt6detailFiii_i +// GetBits__Q34nw4r3lyt6detailFUcii_Uc +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ44nw4r3lyt3res7Texture +// GetBits
    __Q34nw4r3lyt6detailFUlii_Ul +// TestBit
      __Q34nw4r3lyt6detailFUli_b +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt11TexCoordGen +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ34nw4r3lyt6TexSRT +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPCvUi_PCQ44nw4r3lyt3res6TexMap +// __ct__Q34nw4r3lyt9BlendModeFv +// Set__Q34nw4r3lyt9BlendModeF12_GXBlendMode14_GXBlendFactor14_GXBlendFactor10_GXLogicOp +// __ct__Q34nw4r3lyt12AlphaCompareFv +// Set__Q34nw4r3lyt12AlphaCompareF10_GXCompareUc10_GXAlphaOp10_GXCompareUc +// Set__Q34nw4r3lyt11TevSwapModeF15_GXTevColorChan15_GXTevColorChan15_GXTevColorChan15_GXTevColorChan +// __ct__Q34nw4r3lyt8ChanCtrlFv +// Set__Q34nw4r3lyt8ChanCtrlF11_GXColorSrc11_GXColorSrc +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt6TexMap +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt6TexSRT +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt11TexCoordGen +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt8ChanCtrl +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r2ut5Color +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt11TevSwapMode +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt12AlphaCompare +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt9BlendMode +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt13IndirectStage +// ConvertOffsToPtr__Q34nw4r3lyt6detailFPvUi_PQ34nw4r3lyt8TevStage +// __ct__Q34nw4r3lyt8TevStageFv +// SetIndirect__Q34nw4r3lyt8TevStageF16_GXIndTexStageID15_GXIndTexFormat16_GXIndTexBiasSel14_GXIndTexMtxID13_GXIndTexWrap13_GXIndTexWrapbb17_GXIndTexAlphaSel +// SetAlphaOp__Q34nw4r3lyt8TevStageF8_GXTevOp10_GXTevBias11_GXTevScaleb11_GXTevRegID15_GXTevKAlphaSel +// SetOp__Q34nw4r3lyt12TevStageInOpFUcUcUcbUcUc +// SetColorOp__Q34nw4r3lyt8TevStageF8_GXTevOp10_GXTevBias11_GXTevScaleb11_GXTevRegID15_GXTevKColorSel +// SetAlphaIn__Q34nw4r3lyt8TevStageF14_GXTevAlphaArg14_GXTevAlphaArg14_GXTevAlphaArg14_GXTevAlphaArg +// SetIn__Q34nw4r3lyt12TevStageInOpFUcUcUcUc +// SetColorIn__Q34nw4r3lyt8TevStageF14_GXTevColorArg14_GXTevColorArg14_GXTevColorArg14_GXTevColorArg +// SetOrder__Q34nw4r3lyt8TevStageF13_GXTexCoordID11_GXTexMapID12_GXChannelID13_GXTevSwapSel13_GXTevSwapSel +// __ct__Q34nw4r3lyt13IndirectStageFv +// Set__Q34nw4r3lyt13IndirectStageF13_GXTexCoordID11_GXTexMapID14_GXIndTexScale14_GXIndTexScale +// GetOp__Q34nw4r3lyt9BlendModeCFv +// GetDstFactor__Q34nw4r3lyt9BlendModeCFv +// GetSrcFactor__Q34nw4r3lyt9BlendModeCFv +// GetType__Q34nw4r3lyt9BlendModeCFv +// GetRef1__Q34nw4r3lyt12AlphaCompareCFv +// GetComp1__Q34nw4r3lyt12AlphaCompareCFv +// GetOp__Q34nw4r3lyt12AlphaCompareCFv +// GetRef0__Q34nw4r3lyt12AlphaCompareCFv +// GetComp0__Q34nw4r3lyt12AlphaCompareCFv +// GetScaleT__Q34nw4r3lyt13IndirectStageCFv +// GetScaleS__Q34nw4r3lyt13IndirectStageCFv +// GetTexMap__Q34nw4r3lyt13IndirectStageCFv +// GetTexCoordGen__Q34nw4r3lyt13IndirectStageCFv +// GetIndAlphaSel__Q34nw4r3lyt8TevStageCFv +// IsIndUtcLod__Q34nw4r3lyt8TevStageCFv +// IsIndAddPrev__Q34nw4r3lyt8TevStageCFv +// GetIndWrapT__Q34nw4r3lyt8TevStageCFv +// GetIndWrapS__Q34nw4r3lyt8TevStageCFv +// GetIndBiasSel__Q34nw4r3lyt8TevStageCFv +// GetIndFormat__Q34nw4r3lyt8TevStageCFv +// GetIndStage__Q34nw4r3lyt8TevStageCFv +// GetIndMtxSel__Q34nw4r3lyt8TevStageCFv +// GetKAlphaSel__Q34nw4r3lyt8TevStageCFv +// GetKSel__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaOutReg__Q34nw4r3lyt8TevStageCFv +// GetOutReg__Q34nw4r3lyt12TevStageInOpCFv +// IsAlphaClamp__Q34nw4r3lyt8TevStageCFv +// IsClamp__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaScale__Q34nw4r3lyt8TevStageCFv +// GetScale__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaBias__Q34nw4r3lyt8TevStageCFv +// GetBias__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaOp__Q34nw4r3lyt8TevStageCFv +// GetOp__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaInD__Q34nw4r3lyt8TevStageCFv +// GetD__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaInC__Q34nw4r3lyt8TevStageCFv +// GetC__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaInB__Q34nw4r3lyt8TevStageCFv +// GetB__Q34nw4r3lyt12TevStageInOpCFv +// GetAlphaInA__Q34nw4r3lyt8TevStageCFv +// GetA__Q34nw4r3lyt12TevStageInOpCFv +// GetKColorSel__Q34nw4r3lyt8TevStageCFv +// GetColorOutReg__Q34nw4r3lyt8TevStageCFv +// IsColorClamp__Q34nw4r3lyt8TevStageCFv +// GetColorScale__Q34nw4r3lyt8TevStageCFv +// GetColorBias__Q34nw4r3lyt8TevStageCFv +// GetColorOp__Q34nw4r3lyt8TevStageCFv +// GetColorInD__Q34nw4r3lyt8TevStageCFv +// GetColorInC__Q34nw4r3lyt8TevStageCFv +// GetColorInB__Q34nw4r3lyt8TevStageCFv +// GetColorInA__Q34nw4r3lyt8TevStageCFv +// GetTexSwapSel__Q34nw4r3lyt8TevStageCFv +// GetRasSwapSel__Q34nw4r3lyt8TevStageCFv +// GetColorChan__Q34nw4r3lyt8TevStageCFv +// GetTexMap__Q34nw4r3lyt8TevStageCFv +// GetTexCoordGen__Q34nw4r3lyt8TevStageCFv +// GetA__Q34nw4r3lyt11TevSwapModeCFv +// GetB__Q34nw4r3lyt11TevSwapModeCFv +// GetG__Q34nw4r3lyt11TevSwapModeCFv +// GetR__Q34nw4r3lyt11TevSwapModeCFv