diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-01-27 01:01:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-26 22:01:05 -0800 |
| commit | bf4053fefa301a307065a07ffc4c3f9f970f2638 (patch) | |
| tree | afc005dc11ce0d21654c5023349ab074683a1f30 /src/JSystem | |
| parent | 5644936254b6617875c5a55caeae3e2526849d5a (diff) | |
Fix spurious differences when using `ninja diff` (#2294)
* Fix spurious differences when using ninja diff
* Fix some clangd errors/warnings
Diffstat (limited to 'src/JSystem')
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DGD.cpp | 5 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DSys.cpp | 4 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DTevs.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/J3DU/J3DUClipper.cpp | 4 | ||||
| -rw-r--r-- | src/JSystem/JAudio2/JASDSPInterface.cpp | 15 | ||||
| -rw-r--r-- | src/JSystem/JAudio2/JAUSectionHeap.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JAudio2/dsptask.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JKernel/JKRAram.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JMath/JMATrigonometric.cpp | 15 | ||||
| -rw-r--r-- | src/JSystem/JStudio/JStudio/jstudio-object.cpp | 2 |
10 files changed, 16 insertions, 37 deletions
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; diff --git a/src/JSystem/J3DU/J3DUClipper.cpp b/src/JSystem/J3DU/J3DUClipper.cpp index 1561d917cf..cd2e9c2894 100644 --- a/src/JSystem/J3DU/J3DUClipper.cpp +++ b/src/JSystem/J3DU/J3DUClipper.cpp @@ -182,7 +182,5 @@ static char const* const stringBase_8039A9B8 = " J3DUClipper::mNear = %f"; /* 8039A9D1-8039A9F0 027031 0018+07 0/0 0/0 0/0 .rodata None */ static char const* const stringBase_8039A9D1 = " J3DUClipper::mFar = %f"; -/* @stringBase0 padding */ -static char const* const pad_8039A9E9 = "\0\0\0\0\0\0"; -/* 8039A984-8039A984 026FE4 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
\ No newline at end of file +/* 8039A984-8039A984 026FE4 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/JSystem/JAudio2/JASDSPInterface.cpp b/src/JSystem/JAudio2/JASDSPInterface.cpp index 2580802278..605724dc8d 100644 --- a/src/JSystem/JAudio2/JASDSPInterface.cpp +++ b/src/JSystem/JAudio2/JASDSPInterface.cpp @@ -428,7 +428,7 @@ void JASDsp::initBuffer() { } /* 803C78F0-803C7920 024A10 0018+18 1/1 0/0 0/0 .data SEND_TABLE__6JASDsp */ -u16 JASDsp::SEND_TABLE[12 + 12 /* padding */] = { +u16 JASDsp::SEND_TABLE[] = { 0x0D00, 0x0D60, 0x0DC8, @@ -441,19 +441,6 @@ u16 JASDsp::SEND_TABLE[12 + 12 /* padding */] = { 0x0B00, 0x09A0, 0x0000, - /* padding */ - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, }; /* 8029DB78-8029DCA4 2984B8 012C+00 1/1 1/1 0/0 .text diff --git a/src/JSystem/JAudio2/JAUSectionHeap.cpp b/src/JSystem/JAudio2/JAUSectionHeap.cpp index ced71b66ca..a036282c89 100644 --- a/src/JSystem/JAudio2/JAUSectionHeap.cpp +++ b/src/JSystem/JAudio2/JAUSectionHeap.cpp @@ -310,8 +310,6 @@ void* JAUSection::newCopy(void const* param_0, u32 param_1, s32 param_2) { #pragma force_active on SECTION_DEAD static char const* const stringBase_8039B974 = "index out of range of bitset::test"; SECTION_DEAD static char const* const stringBase_8039B997 = "index out of range of bitset::set"; -/* @stringBase0 padding */ -SECTION_DEAD static char const* const pad_8039B9B9 = "\0\0\0\0\0\0"; #pragma pop /* 802A5854-802A5948 2A0194 00F4+00 0/0 1/1 0/0 .text newWaveBank__10JAUSectionFUlPCv */ diff --git a/src/JSystem/JAudio2/dsptask.cpp b/src/JSystem/JAudio2/dsptask.cpp index 3ba233405a..2296db43e9 100644 --- a/src/JSystem/JAudio2/dsptask.cpp +++ b/src/JSystem/JAudio2/dsptask.cpp @@ -31,7 +31,7 @@ void DspHandShake(void*) { /* ############################################################################################## */ /* 803C7920-803C9820 024A40 1F00+00 1/1 0/0 0/0 .data jdsp */ -static u8 jdsp[7936] = { +static u8 jdsp[7936] ALIGN_DECL(32) = { 0x02, 0x9F, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, 0x00, 0x02, 0xFF, 0x00, 0x00, 0x02, 0xFF, 0x00, 0x00, 0x02, 0xFF, 0x00, 0x00, 0x02, 0xFF, 0x00, 0x00, 0x02, 0x9F, 0x06, 0xA5, 0x02, 0x9F, 0x00, 0x4E, 0x12, 0x05, 0x02, 0xBF, 0x00, 0x57, 0x81, 0x00, 0x00, 0x9F, 0x10, 0x00, diff --git a/src/JSystem/JKernel/JKRAram.cpp b/src/JSystem/JKernel/JKRAram.cpp index 7b6ed3f78d..36970e97ec 100644 --- a/src/JSystem/JKernel/JKRAram.cpp +++ b/src/JSystem/JKernel/JKRAram.cpp @@ -536,5 +536,3 @@ static u8* nextSrcData(u8* current) { /* ############################################################################################## */ /* 8039D0A6-8039D0B8 029706 000E+04 0/0 0/0 0/0 .rodata None */ static const char* stringBase_8039D0A6 = "bad aramSync\n"; -/* @stringBase0 padding */ -static const char* pad_8039D0B4 = "\0\0\0";
\ No newline at end of file diff --git a/src/JSystem/JMath/JMATrigonometric.cpp b/src/JSystem/JMath/JMATrigonometric.cpp index 0e9936b301..b5b0ca4b02 100644 --- a/src/JSystem/JMath/JMATrigonometric.cpp +++ b/src/JSystem/JMath/JMATrigonometric.cpp @@ -9,13 +9,17 @@ #include "dol2asm.h" #include "global.h" +static f32 dummy() { + return 0.0f; +} + namespace std { template <typename A1, typename B1> struct pair { A1 a1; B1 b1; pair() { - f32 tmp = FLOAT_LABEL(zero); + f32 tmp = 0.0f; a1 = tmp; b1 = tmp; // a1 = A1(); @@ -24,9 +28,6 @@ struct pair { }; } // namespace std -// fake, but couldn't find another way to make 0.0f go first in sdata2 in this TU -SECTION_SDATA2 static f32 zero[1 + 1] = {0.0f, 0.0f}; - inline f64 getConst() { return 6.2831854820251465; } @@ -54,7 +55,7 @@ struct TAtanTable { for (int i = 0; i < (u32)1024; i++) { table[i] = atan(getConst2() * i); } - table[0] = FLOAT_LABEL(zero); + table[0] = 0.0f; table[1024] = 0.7853982; // 0.25 * PI } }; @@ -66,7 +67,7 @@ struct TAsinAcosTable { for (int i = 0; i < 1024; i++) { table[i] = asin(getConst2() * i); } - table[0] = FLOAT_LABEL(zero); + table[0] = 0.0f; table[1024] = 0.7853982; // 0.25 * PI } }; @@ -87,4 +88,4 @@ TAtanTable atanTable_; /* 8044AA40-8044BA60 077760 1020+00 1/1 1/1 0/0 .bss asinAcosTable___5JMath */ TAsinAcosTable asinAcosTable_; -} // namespace JMath
\ No newline at end of file +} // namespace JMath diff --git a/src/JSystem/JStudio/JStudio/jstudio-object.cpp b/src/JSystem/JStudio/JStudio/jstudio-object.cpp index f021932f03..5952007214 100644 --- a/src/JSystem/JStudio/JStudio/jstudio-object.cpp +++ b/src/JSystem/JStudio/JStudio/jstudio-object.cpp @@ -2321,8 +2321,6 @@ void func_8028892C() { #pragma push #pragma force_active on SECTION_DEAD static char const* const stringBase_8039AB78 = "(unnamed)"; -/* @stringBase0 padding */ -SECTION_DEAD static char const* const pad_8039AB82 = "\0\0\0\0\0"; #pragma pop /* 804511F8-80451200 0006F8 0008+00 0/0 1/1 0/0 .sbss None */ |
