diff options
| author | Luke Street <luke@street.dev> | 2026-02-28 14:35:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-28 13:35:07 -0800 |
| commit | b5d3b8c059c10711370437f7db7539cd90f1cb29 (patch) | |
| tree | 8e1ef45570cb137160ceb1f16fb3451d2a359544 /src/JSystem/J3DGraphBase | |
| parent | 06ebc176c25f71ce2268755d6c0890a36e78d041 (diff) | |
Another round of GCC fixes (#3115)
* Fix remaining <string> -> <cstring> for GCC compilation (#3114 follow-up)
MWerks' <string> header transitively includes C string functions
(memcpy, strlen, strcmp, etc.), but GCC/Clang's <string> is the C++
std::string header. These files all use C string functions and should
include <cstring> instead.
* Use std::isnan instead of isnan for GCC compilation
GCC's <cmath> places isnan in the std namespace. Using the unqualified
isnan fails to compile with GCC/Clang.
* Fix cCcD_Src types: s32 -> u32 for bitmask fields
cCcD_SrcObjCommonBase::mSPrm, cCcD_SrcObjTg::mType, and
cCcD_SrcObjAt::mType are used as bitmasks (SetType/SetSPrm take u32,
MskType/MskSPrm use u32, values like 0xFFFFFFFF are common in
aggregate inits). Change from s32 to u32 to match usage.
Also fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK to use unsigned literals,
and remove now-unnecessary (s32) casts on hex literals in collision
source data.
* Mark dummy() functions as static to avoid multiple definition errors
These decomp artifact functions have the same name and signature across
TUs, causing linker errors when building as a single binary.
Diffstat (limited to 'src/JSystem/J3DGraphBase')
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DMatBlock.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DPacket.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DShapeDraw.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DVertex.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp index 21a8bf5789..004189a89b 100644 --- a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp +++ b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp @@ -5,7 +5,7 @@ #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/J3DGraphBase/J3DTransform.h" #include "global.h" -#include <string> +#include <cstring> inline void loadMatColors(const J3DGXColor* color) { J3DGDWriteXFCmdHdr(0x100C, 2); diff --git a/src/JSystem/J3DGraphBase/J3DPacket.cpp b/src/JSystem/J3DGraphBase/J3DPacket.cpp index 173061882c..5eb6e77392 100644 --- a/src/JSystem/J3DGraphBase/J3DPacket.cpp +++ b/src/JSystem/J3DGraphBase/J3DPacket.cpp @@ -7,7 +7,7 @@ #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/JKernel/JKRHeap.h" #include <dolphin/os.h> -#include <string> +#include <cstring> #include "global.h" J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) { diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp index e001a8a8b9..94d4534a82 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp +++ b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp @@ -2,7 +2,7 @@ #include "JSystem/J3DGraphBase/J3DShapeDraw.h" #include "JSystem/JKernel/JKRHeap.h" -#include <string> +#include <cstring> #include <stdint.h> #include <dolphin/gx.h> diff --git a/src/JSystem/J3DGraphBase/J3DVertex.cpp b/src/JSystem/J3DGraphBase/J3DVertex.cpp index d455f27c8c..478ff42b0e 100644 --- a/src/JSystem/J3DGraphBase/J3DVertex.cpp +++ b/src/JSystem/J3DGraphBase/J3DVertex.cpp @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphAnimator/J3DJointTree.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/JKernel/JKRHeap.h" -#include <string> +#include <cstring> J3DVertexData::J3DVertexData() { mVtxNum = 0; |
