summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_e_hp.cpp
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2026-02-28 14:35:07 -0700
committerGitHub <noreply@github.com>2026-02-28 13:35:07 -0800
commitb5d3b8c059c10711370437f7db7539cd90f1cb29 (patch)
tree8e1ef45570cb137160ceb1f16fb3451d2a359544 /src/d/actor/d_a_e_hp.cpp
parent06ebc176c25f71ce2268755d6c0890a36e78d041 (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/d/actor/d_a_e_hp.cpp')
-rw-r--r--src/d/actor/d_a_e_hp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp
index 49d563fec3..a1f202489a 100644
--- a/src/d/actor/d_a_e_hp.cpp
+++ b/src/d/actor/d_a_e_hp.cpp
@@ -31,7 +31,7 @@ public:
namespace {
static dCcD_SrcCyl cc_hp_src = {
{
- {0, {{0x0, 0x0, 0x0}, {(s32)0xd8000000, 0x3}, 0x0}},
+ {0, {{0x0, 0x0, 0x0}, {0xd8000000, 0x3}, 0x0}},
{dCcD_SE_13, 0, 0, 0, {0}},
{dCcD_SE_NONE, 0, 0, 0, {6}},
{0},
@@ -47,7 +47,7 @@ static dCcD_SrcCyl cc_hp_src = {
static dCcD_SrcSph cc_lamp_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
{dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x6}, // mGObjTg
{0x0}, // mGObjCo