@@ -1000,8 +1000,8 @@ struct J3DIndTexCoordScale : public J3DIndTexCoordScaleInfo {
10001000 /* 8000E0E4 */ J3DIndTexCoordScale() : J3DIndTexCoordScaleInfo(j3dDefaultIndTexCoordScaleInfo) {}
10011001 J3DIndTexCoordScale (J3DIndTexCoordScaleInfo const & info) : J3DIndTexCoordScaleInfo(info) {}
10021002 /* 8000E024 */ ~J3DIndTexCoordScale () {}
1003- GXIndTexScale getScaleS () { return (GXIndTexScale) mScaleS ; }
1004- GXIndTexScale getScaleT () { return (GXIndTexScale) mScaleT ; }
1003+ u8 getScaleS () { return mScaleS ; }
1004+ u8 getScaleT () { return mScaleT ; }
10051005
10061006 J3DIndTexCoordScale& operator =(const J3DIndTexCoordScale& other) {
10071007 // __memcpy(this, &other, sizeof(J3DIndTexCoordScaleInfo));
@@ -1020,8 +1020,8 @@ struct J3DIndTexMtx : public J3DIndTexMtxInfo {
10201020 /* 8000E0F0 */ J3DIndTexMtx() { *(J3DIndTexMtxInfo*)this = j3dDefaultIndTexMtxInfo; }
10211021 J3DIndTexMtx (J3DIndTexMtxInfo const & info) { *(J3DIndTexMtxInfo*)this = info; }
10221022 /* 8000E064 */ ~J3DIndTexMtx () {}
1023- void load (u32 param_1) {
1024- J3DGDSetIndTexMtx ((GXIndTexMtxID)(param_1 + 1 ), field_0x0, field_0x18);
1023+ void load (u32 param_1) const {
1024+ J3DGDSetIndTexMtx ((GXIndTexMtxID)(param_1 + 1 ), (Mtx3P) field_0x0, field_0x18);
10251025 }
10261026}; // Size: 0x1C
10271027
@@ -1045,8 +1045,8 @@ extern const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull;
10451045struct J3DIndTexOrder : public J3DIndTexOrderInfo {
10461046 /* 8000E128 */ J3DIndTexOrder() : J3DIndTexOrderInfo(j3dDefaultIndTexOrderNull) {}
10471047 J3DIndTexOrder (J3DIndTexOrderInfo const & info) : J3DIndTexOrderInfo(info) {}
1048- GXTexMapID getMap () { return (GXTexMapID)mMap ; }
1049- GXTexCoordID getCoord () { return (GXTexCoordID)mCoord ; }
1048+ u8 getMap () const { return (GXTexMapID)mMap ; }
1049+ u8 getCoord () const { return (GXTexCoordID)mCoord ; }
10501050
10511051 J3DIndTexOrder& operator =(const J3DIndTexOrder& other) {
10521052 // __memcpy(this, &other, sizeof(J3DIndTexOrderInfo));
@@ -1195,23 +1195,22 @@ struct J3DColorChan {
11951195 mColorChanID = calcColorChanID (info.mEnable , info.mMatSrc , info.mLightMask ,
11961196 info.mDiffuseFn , info.mAttnFn , ambSrc);
11971197 }
1198- u8 getLightMask () { return ((mColorChanID >> 2 ) & 0xf ) | ((mColorChanID >> 11 ) & 0xf ) << 4 ; }
1198+ u8 getLightMask () const { return ((mColorChanID >> 2 ) & 0xf ) | ((mColorChanID >> 11 ) & 0xf ) << 4 ; }
11991199 void setLightMask (u8 param_1) {
12001200 mColorChanID = (mColorChanID & ~0x3c ) | ((param_1 & 0xf ) << 2 );
12011201 mColorChanID = (mColorChanID & ~0x7800 ) | ((param_1 & 0xf0 ) << 7 );
12021202 }
12031203
1204- u8 getEnable () { return (mColorChanID >> 1 ) & 1 ; }
1205- GXColorSrc getAmbSrc () { return (GXColorSrc)((mColorChanID >> 6 ) & 1 ); }
1206- GXColorSrc getMatSrc () { return (GXColorSrc)(mColorChanID & 1 ); }
1207- GXDiffuseFn getDiffuseFn () { return (GXDiffuseFn) ((mColorChanID >> 7 ) & 3 ); }
1204+ u8 getEnable () const { return (mColorChanID >> 1 ) & 1 ; }
1205+ u8 getAmbSrc () const { return (GXColorSrc)((mColorChanID >> 6 ) & 1 ); }
1206+ u8 getMatSrc () const { return (GXColorSrc)(mColorChanID & 1 ); }
1207+ u8 getDiffuseFn () const { return ((mColorChanID >> 7 ) & 3 ); }
12081208 // This function has to appear in J3DMatBlock.cpp because it generates extra data in .sdata2
1209- inline GXAttnFn getAttnFn ();
1209+ inline u8 getAttnFn () const ;
12101210
1211- // NONMATCHING regalloc
1212- void load () {
1213- J3DGDWrite_u32 (setChanCtrlMacro (getEnable (), getAmbSrc (), getMatSrc (), getLightMask (),
1214- getDiffuseFn (), getAttnFn ()));
1211+ void load () const {
1212+ J3DGDWrite_u32 (setChanCtrlMacro (getEnable (), (GXColorSrc)getAmbSrc (), (GXColorSrc)getMatSrc (), getLightMask (),
1213+ (GXDiffuseFn)getDiffuseFn (), (GXAttnFn)getAttnFn ()));
12151214 }
12161215
12171216 /* 0x0 */ u16 mColorChanID ;
0 commit comments