From 2481e184fb99b7343cbf0893f838cc892feafc4a Mon Sep 17 00:00:00 2001 From: roeming Date: Thu, 11 Dec 2025 18:41:44 -0500 Subject: Link J2DWindowEX (#2946) * Add debug for J2DWindowEx, link GCN version * locking non-const copy ctor behind GCN check * fix typo for define * fix another define typo * update bugged ctor and leave a comment --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/JSystem/J3DGraphBase') diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 9b515bca6c..ee13669988 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -13,8 +13,16 @@ */ struct J3DGXColorS10 : public GXColorS10 { J3DGXColorS10() {} + +#if PLATFORM_GCN + J3DGXColorS10(J3DGXColorS10& other) { __memcpy(this, &other, sizeof(J3DGXColorS10)); } +#else J3DGXColorS10(J3DGXColorS10 const& other) { __memcpy(this, &other, sizeof(J3DGXColorS10)); } +#endif + + // TODO: In theory, this copy ctor should be non-const in GCN versions, as seen in TWW maps J3DGXColorS10(GXColorS10 const& color) : GXColorS10(color) {} + J3DGXColorS10& operator=(const GXColorS10& color) { // FAKE match. __memcpy created issues in J3DTevBlockPatched::initialize ((u32*)this)[0] = ((u32*)&color)[0]; @@ -29,8 +37,10 @@ struct J3DGXColorS10 : public GXColorS10 { */ struct J3DGXColor : public GXColor { J3DGXColor() {} + // TODO: In theory, these copy ctors should be non-const in GCN versions, as seen in TWW maps J3DGXColor(J3DGXColor const& other) { __memcpy(this, &other, sizeof(J3DGXColor)); } J3DGXColor(GXColor const& color) : GXColor(color) {} + // making color a reference breaks J3DColorBlockLightOff::initialize et al J3DGXColor& operator=(GXColor color) { *(GXColor*)this = color; -- cgit v1.2.3