From bf4053fefa301a307065a07ffc4c3f9f970f2638 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 27 Jan 2025 01:01:05 -0500 Subject: Fix spurious differences when using `ninja diff` (#2294) * Fix spurious differences when using ninja diff * Fix some clangd errors/warnings --- src/JSystem/J3DGraphBase/J3DGD.cpp | 5 ++--- src/JSystem/J3DGraphBase/J3DSys.cpp | 4 ++-- src/JSystem/J3DGraphBase/J3DTevs.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/JSystem/J3DGraphBase') diff --git a/src/JSystem/J3DGraphBase/J3DGD.cpp b/src/JSystem/J3DGraphBase/J3DGD.cpp index 5e361862b9..9f247100e2 100644 --- a/src/JSystem/J3DGraphBase/J3DGD.cpp +++ b/src/JSystem/J3DGraphBase/J3DGD.cpp @@ -485,8 +485,7 @@ void J3DGDSetTevOrder(GXTevStageID stage, GXTexCoordID coord0, GXTexMapID map0, coord0 = coord0 >= GX_MAXCOORD ? GX_TEXCOORD0 : coord0; coord1 = coord1 >= GX_MAXCOORD ? GX_TEXCOORD0 : coord1; GDOverflowCheck(5); - static u8 c2r[32] = {0, 1, 0, 1, 0, 1, 7, 5, 6, 0, 0, 0, 0, 0, 0, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + static u8 c2r[] = {0, 1, 0, 1, 0, 1, 7, 5, 6, 0, 0, 0, 0, 0, 0, 7}; J3DGDWriteBPCmd((map0 & 7) | coord0 << 3 | (map0 != GX_TEXMAP_NULL && !(map0 & GX_TEXMAP_DISABLE)) << 6 | c2r[channel0 & 0xf] << 7 | (map1 & 7) << 0xc | coord1 << 0xf | @@ -662,4 +661,4 @@ void J3DFifoLoadTexCached(GXTexMapID id, u32 param_1, GXTexCacheSize param_2, u3 J3DFifoLoadBPCmd(param_3 >> 5 | (param_4 + 3) << 0xf | (param_4 + 3) << 0x12 | J3DTexImage2Ids[id] << 0x18); } -} \ No newline at end of file +} diff --git a/src/JSystem/J3DGraphBase/J3DSys.cpp b/src/JSystem/J3DGraphBase/J3DSys.cpp index 8e6e64f7ab..8f48ba181b 100644 --- a/src/JSystem/J3DGraphBase/J3DSys.cpp +++ b/src/JSystem/J3DGraphBase/J3DSys.cpp @@ -131,7 +131,7 @@ void J3DSys::setTexCacheRegion(GXTexCacheSize size) { } /* 803CD8A0-803CD8B0 02A9C0 0010+00 1/1 0/0 0/0 .data NullTexData */ -SECTION_DATA static u8 NullTexData[16] = { +SECTION_DATA static u8 NullTexData[16] ALIGN_DECL(32) = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; @@ -397,4 +397,4 @@ void J3DSys::reinitPixelProc() { /* ############################################################################################## */ /* 80451598-804515A0 000A98 0004+04 0/0 1/1 0/0 .sbss j3dDefaultViewNo */ -u32 j3dDefaultViewNo; \ No newline at end of file +u32 j3dDefaultViewNo; diff --git a/src/JSystem/J3DGraphBase/J3DTevs.cpp b/src/JSystem/J3DGraphBase/J3DTevs.cpp index 3cf86c18ee..36c740f6a3 100644 --- a/src/JSystem/J3DGraphBase/J3DTevs.cpp +++ b/src/JSystem/J3DGraphBase/J3DTevs.cpp @@ -556,7 +556,7 @@ extern const J3DColorChanInfo j3dDefaultColorChanInfo = { }; /* 804563F8-804563FA 0049F8 0002+00 0/0 1/1 0/0 .sdata2 None */ -extern const u8 data_804563F8 = 0x1B; +extern const u8 j3dDefaultTevSwapTableID = 0x1B; /* 804563FA-804563FC 0049FA 0002+00 0/0 1/1 0/0 .sdata2 j3dDefaultAlphaCmpID */ const u16 j3dDefaultAlphaCmpID = 0x00E7; -- cgit v1.2.3