Fix compilation errors after decomp/main merge

- Fix <string> -> <cstring> across all source files (upstream fix)
- Add <cstring> to JASGadget.h, <cstdarg> to JUTDbPrint.cpp
- Fix <string> -> <cstring> in JUTFont.h, d_save.h, f_ap_game.h
- Fix std::isnan usage in c_cc_d.cpp
- Fix cCcD_Src types: s32 -> u32 for bitmask fields (upstream fix)
- Fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK unsigned literals (upstream fix)
- Remove (s32) casts on hex literals in collision data (upstream fix)
- Fix 0xFFFFFFFF literal in d_a_obj_wood_statue.cpp (upstream fix)
- Add braces to case 0 in d_a_e_gb.cpp to fix jump-over-init
- Fix Z2AudioCS.h include path (Z2AudioLib -> Z2AudioCS)
- Forward-declare Z2AudioCS in stubs.cpp to avoid revolution conflicts
- Guard JASGlobalInstance specializations with __MWERKS__ in m_Do_main
- Remove duplicate inline functions from d_com_inf_game.h
- Mark dummy() functions as static (upstream fix)
- Add JAUSectionHeap.h include to m_Do_main.cpp
This commit is contained in:
Luke Street
2026-02-28 13:52:06 -07:00
parent 32c32a73ca
commit 1eb018ea26
72 changed files with 108 additions and 230 deletions
+3 -3
View File
@@ -1467,7 +1467,7 @@ static f32 l_ladderAnmBaseTransY = 102.00054168701172f;
static dCcD_SrcCyl l_cylSrc = {
{
{0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {(s32)0xD8FFFDFF, 5}, 0x73}},
{0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {0xD8FFFDFF, 5}, 0x73}},
{dCcD_SE_WOLF_BITE, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -1483,7 +1483,7 @@ static dCcD_SrcCyl l_cylSrc = {
static dCcD_SrcSph l_sphSrc = {
{
{0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {(s32)0xD8FBFDFF, 5}, 0x73}},
{0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {0xD8FBFDFF, 5}, 0x73}},
{dCcD_SE_SWORD, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -4640,7 +4640,7 @@ void daAlink_c::playerInit() {
}
}
void dummy(fopAc_ac_c* i_this) {
static void dummy(fopAc_ac_c* i_this) {
fopAcM_RegisterCreateID(i_this, "ALINK");
}
+1 -1
View File
@@ -44,7 +44,7 @@ void daE_BG_HIO_c::genMessage(JORMContext* ctx) {
namespace {
dCcD_SrcSph cc_bg_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x03}, 0x75}}, // mObj
{0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x03}, 0x75}}, // mObj
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -46,7 +46,7 @@ enum E_DK_RES_FILE_ID {
namespace {
static dCcD_SrcSph cc_dk_src = {
{ // mObjInf
{ 0x0, { { 0, 0, { 0 } }, { (s32)0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
{ 0x0, { { 0, 0, { 0 } }, { 0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
{ 0x09, 0, 0, 0, { 0 } }, // mGObjAt
{ 0x00, 0x00, 0x00, 0x00, { 5 } }, // mGObjTg
{ { 0 } }, // mGObjCo
+2 -1
View File
@@ -394,7 +394,7 @@ static void e_gb_damage(e_gb_class* i_this) {
i_this->invulnerabilityTimer = 35;
switch (i_this->mode) {
case 0:
case 0: {
i_this->mode = 1;
s16 angleDiff = i_this->angleYTarget - actor->current.angle.y;
if (angleDiff < 0) {
@@ -413,6 +413,7 @@ static void e_gb_damage(e_gb_class* i_this) {
actor->speed.y = fabsf(actor->current.pos.y - i_this->currentPosTarget.y) * 0.2f;
actor->speed.z = fabsf(actor->current.pos.z - i_this->currentPosTarget.z) * 0.2f;
i_this->timer[0] = KREG_S(7) + 15;
}
// fallthrough
case 1:
if (i_this->timer[0] == 0) {
+1 -1
View File
@@ -94,7 +94,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
void daE_HM_c::initCcCylinder() {
static const dCcD_SrcSph ccShpSrc = {
{
{0x0, {{0x2, 0x1, 0xd}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
{0x0, {{0x2, 0x1, 0xd}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
{0x0}, // mGObjCo
+2 -2
View File
@@ -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
+1 -1
View File
@@ -2016,7 +2016,7 @@ int daE_HZ_c::create() {
static dCcD_SrcSph cc_sph_src2 = {
{
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {(s32)0xd8fafdff, 0x3}, 0x75}}, // mObj
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fafdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+2 -2
View File
@@ -2258,7 +2258,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
};
static dCcD_SrcSph head_tg_sph_src = {
{
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -2270,7 +2270,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph body_tg_sph_src = {
{
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -1160,7 +1160,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
static int daE_SH_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x75}}, // mObj
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+2 -2
View File
@@ -1361,7 +1361,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
static int daE_YD_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fbfdff, 0x3}, 0x25}}, // mObj
{0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x25}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -1383,7 +1383,7 @@ static int daE_YD_Create(fopAc_ac_c* i_this) {
};
static dCcD_SrcSph kuki_sph_src = {
{
{0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
{0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+2 -2
View File
@@ -2416,7 +2416,7 @@ static int daE_Yr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph head_tg_sph_src = {
{
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -2428,7 +2428,7 @@ static int daE_Yr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph body_tg_sph_src = {
{
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -10,7 +10,7 @@
#include "SSystem/SComponent/c_math.h"
#include "d/d_com_inf_game.h"
#include "Z2AudioLib/Z2Instances.h"
#include <string>
#include <cstring>
#include "d/actor/d_grass.inc" // IWYU pragma: keep
#include "d/actor/d_flower.inc"
+1 -1
View File
@@ -84,7 +84,7 @@ int daObjHBarrel_c::execute() {
dCcD_SrcCyl const daObjHBarrel_c::s_CcDCyl = {
{
{0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fafdff, 0x11}, 0x79}}, // mObj
{0x0, {{0x0, 0x0, 0xd}, {0xd8fafdff, 0x11}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x5}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -22,7 +22,7 @@ const daObj_KBacket_HIOParam daObj_KBacket_Param_c::m = {
};
static const dCcD_SrcGObjInf l_ccDObjData = {
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x0}, 0x79}}, // mObj
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x0}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -78,7 +78,7 @@ static const char* l_arcName = "K_lift00";
static dCcD_SrcSph l_cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x11}, 0x79}}, // mObj
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x11}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x5, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -14,7 +14,7 @@
const static dCcD_SrcCyl l_cyl_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {-1, 0x11}, 0x59}}, // mObj
{0x0, {{0x0, 0x0, 0x0}, {0xFFFFFFFF, 0x11}, 0x59}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x4}, // mGObjTg
{0x0}, // mGObjCo
+1 -1
View File
@@ -4,7 +4,7 @@
#include "d/actor/d_a_npc.h"
#include "d/actor/d_a_player.h"
#include "SSystem/SComponent/c_counter.h"
#include <string>
#include <cstring>
struct EventListItem {
char* mEventName;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_path.h"
#include "f_op/f_op_camera_mng.h"
#include <string>
#include <cstring>
static int dEnvSe_Draw(dEnvSe_c* i_this) {
return 1;
+1 -1
View File
@@ -5,7 +5,7 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include <string>
#include <cstring>
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/J2DGraph/J2DPicture.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
+1 -1
View File
@@ -13,7 +13,7 @@
#include "d/d_demo.h"
#include "d/d_s_play.h"
#include "SSystem/SComponent/c_counter.h"
#include <string>
#include <cstring>
#if DEBUG
static dEvM_HIO_c l_HIO;
+1 -1
View File
@@ -12,7 +12,7 @@
#include "d/d_kankyo.h"
#include "d/d_kankyo_rain.h"
#include "f_op/f_op_camera_mng.h"
#include <string>
#include <cstring>
#include "m_Do/m_Do_audio.h"
static void dKyw_pntlight_set(WIND_INFLUENCE* pntwind);
+1 -1
View File
@@ -22,7 +22,7 @@
#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include <string>
#include <cstring>
typedef void (dMenu_Option_c::*initFunc)();
static initFunc init[] = {
+1 -1
View File
@@ -25,7 +25,7 @@
#include "d/d_msg_string.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include <string>
#include <cstring>
#include <cstdio>
+1 -1
View File
@@ -20,7 +20,7 @@
#include "d/d_msg_class.h"
#include "d/d_msg_object.h"
#include "d/d_pane_class.h"
#include <string>
#include <cstring>
dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
OS_REPORT("enter dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap *mp_heap)\n");
+1 -1
View File
@@ -10,7 +10,7 @@
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include <string>
#include <cstring>
#include "d/d_com_inf_game.h"
#include "d/d_select_cursor.h"
#include "d/d_msg_object.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "d/d_pane_class.h"
#include <string>
#include <cstring>
dMsgScrnBase_c::dMsgScrnBase_c() {
init();
+1 -1
View File
@@ -20,7 +20,7 @@
#include <cstring>
#ifndef __MWERKS__
#include <string>
#include <cstring>
#include "dusk/extras.h"
#endif