diff options
Diffstat (limited to 'include/JSystem/J2DGraph')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DMatBlock.h | 7 | ||||
| -rw-r--r-- | include/JSystem/J2DGraph/J2DTevs.h | 23 |
2 files changed, 19 insertions, 11 deletions
diff --git a/include/JSystem/J2DGraph/J2DMatBlock.h b/include/JSystem/J2DGraph/J2DMatBlock.h index 90321c9196..381f581f07 100644 --- a/include/JSystem/J2DGraph/J2DMatBlock.h +++ b/include/JSystem/J2DGraph/J2DMatBlock.h @@ -20,7 +20,7 @@ struct ResTLUT; struct J2DGXColorS10 : public GXColorS10 { J2DGXColorS10() {} -#if PLATFORM_GCN +#if PLATFORM_GCN && __MWERKS__ J2DGXColorS10(J2DGXColorS10& other) { r = other.r; g = other.g; @@ -637,6 +637,11 @@ struct J2DAlphaComp { mAlphaCmp = J2DCalcAlphaCmp(info.field_0x0, info.mRef0, info.mRef1); mRef0 = info.field_0x1; mRef1 = info.field_0x4; + } + void operator=(const J2DAlphaComp& other) { + mAlphaCmp = other.mAlphaCmp; + mRef0 = other.mRef0; + mRef1 = other.mRef1; } u8 getComp0() { return mAlphaCmp >> 5 & 7; } u8 getRef0() { return mRef0; } diff --git a/include/JSystem/J2DGraph/J2DTevs.h b/include/JSystem/J2DGraph/J2DTevs.h index 62c9c4c548..5630d4a028 100644 --- a/include/JSystem/J2DGraph/J2DTevs.h +++ b/include/JSystem/J2DGraph/J2DTevs.h @@ -562,7 +562,7 @@ inline u8 J2DCalcTevSwapTable(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { } extern const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable; -extern const u8 data_804561AC; +extern const u8 j2dDefaultTevSwapTableID; /** * @ingroup jsystem-j2d @@ -571,21 +571,24 @@ extern const u8 data_804561AC; class J2DTevSwapModeTable { public: - J2DTevSwapModeTable() { field_0x0 = data_804561AC; } + J2DTevSwapModeTable() { mIdx = j2dDefaultTevSwapTableID; } J2DTevSwapModeTable(const J2DTevSwapModeTableInfo& info) { - field_0x0 = J2DCalcTevSwapTable(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); + mIdx = J2DCalcTevSwapTable(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); + } + void operator=(const J2DTevSwapModeTable& other) { + mIdx = other.mIdx; } void setTevSwapModeTableInfo(const J2DTevSwapModeTableInfo& info) { - field_0x0 = J2DCalcTevSwapTable(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); + mIdx = J2DCalcTevSwapTable(info.field_0x0, info.field_0x1, info.field_0x2, info.field_0x3); } - u8 getR() const { return field_0x0 >> 6 & 3; } - u8 getG() const { return field_0x0 >> 4 & 3; } - u8 getB() const { return field_0x0 >> 2 & 3; } - u8 getA() const { return field_0x0 & 3; } + u8 getR() const { return mIdx >> 6 & 3; } + u8 getG() const { return mIdx >> 4 & 3; } + u8 getB() const { return mIdx >> 2 & 3; } + u8 getA() const { return mIdx & 3; } private: - /* 0x0 */ u8 field_0x0; + /* 0x0 */ u8 mIdx; }; /** @@ -638,7 +641,7 @@ extern const GXColorS10 j2dDefaultTevColor; extern const GXColor j2dDefaultTevKColor; extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; extern const u8 j2dDefaultPEBlockDither; -extern const u8 data_804561AC; +extern const u8 j2dDefaultTevSwapTableID; extern const u16 j2dDefaultAlphaCmp; #endif /* J2DTEVS_H */ |
