From a8a159ae2c18e2ce3c0f98b1cc54e36ed14cff60 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Mon, 8 Jan 2024 12:10:05 +0200 Subject: Various Matches, J2DTextBoxEx and J2DTevs OK (#2025) * Work on src/d/bg * misc work * J2dTextBoxEx OK * J2DTevs OK * Better return values for bool --- include/JSystem/J2DGraph/J2DMatBlock.h | 6 ++---- include/JSystem/J2DGraph/J2DTevs.h | 13 ++++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'include/JSystem/J2DGraph') diff --git a/include/JSystem/J2DGraph/J2DMatBlock.h b/include/JSystem/J2DGraph/J2DMatBlock.h index d9021adf2b..0e699ef722 100644 --- a/include/JSystem/J2DGraph/J2DMatBlock.h +++ b/include/JSystem/J2DGraph/J2DMatBlock.h @@ -444,8 +444,6 @@ struct J2DAlphaCompInfo { /* 0x7 */ u8 field_0x7; }; -extern u16 j2dDefaultAlphaCmp; - inline u16 J2DCalcAlphaCmp(s32 param_1, u32 param_2, u32 param_3) { return ((param_1) << 5) | ((param_2 & 0xff) << 3) | (param_3 & 0xff); } @@ -486,7 +484,7 @@ struct J2DBlendInfo { /* 0x3 */ u8 mOp; }; -extern J2DBlendInfo j2dDefaultBlendInfo; +extern const J2DBlendInfo j2dDefaultBlendInfo; struct J2DBlend { J2DBlend() { mBlendInfo = j2dDefaultBlendInfo; } @@ -595,7 +593,7 @@ struct J2DColorChanInfo { }; inline u8 J2DCalcColorChanID(u8 param_1) { return param_1; } -extern J2DColorChanInfo j2dDefaultColorChanInfo; +extern const J2DColorChanInfo j2dDefaultColorChanInfo; class J2DColorChan { public: diff --git a/include/JSystem/J2DGraph/J2DTevs.h b/include/JSystem/J2DGraph/J2DTevs.h index 85eaff013e..1244020b19 100644 --- a/include/JSystem/J2DGraph/J2DTevs.h +++ b/include/JSystem/J2DGraph/J2DTevs.h @@ -2,6 +2,7 @@ #define J2DTEVS_H #include "dolphin/gx/GXEnum.h" +#include "dolphin/gx/GXStruct.h" #include "dolphin/mtx/mtxvec.h" struct J2DTextureSRTInfo { @@ -244,7 +245,7 @@ struct J2DTevOrderInfo { } }; -extern J2DTevOrderInfo j2dDefaultTevOrderInfoNull; +extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; class J2DTevOrder { public: @@ -294,6 +295,8 @@ struct J2DTevSwapModeInfo { /* 0x3 */ u8 field_0x3; }; +extern const J2DTevSwapModeInfo j2dDefaultTevSwapMode; + class J2DTevStage { public: /* 802F4110 */ J2DTevStage(J2DTevStageInfo const&); @@ -455,4 +458,12 @@ private: /* 0x0 */ u8 field_0x0; }; +extern const GXColor j2dDefaultColInfo; +extern const GXColorS10 j2dDefaultTevColor; +extern const GXColor j2dDefaultTevKColor; +extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; +extern const u8 j2dDefaultPEBlockDither; +extern const u8 data_804561AC; +extern const u16 j2dDefaultAlphaCmp; + #endif /* J2DTEVS_H */ -- cgit v1.2.3