From 80c77196360c10e3a91b8157218f73b9d4d27255 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Sun, 16 Aug 2026 08:15:07 -0700 Subject: [PATCH] Compiler compatibility (#1171) * mark functions with duplicate names as static * make std::__tag_va_List work with other compilers * fix some offset comments * use inlines in J3DJointFactory, JUTCacheFont * fix class/struct mismatch * improve const correctness * fix missing return values * make some JAudio namespaces more explicit --- include/JSystem/JParticle/JPAEmitter.h | 4 ++-- include/JSystem/JParticle/JPATexture.h | 4 ++-- include/JSystem/JUtility/JUTCacheFont.h | 1 + include/JSystem/JUtility/JUTDirectPrint.h | 4 +++- include/JSystem/JUtility/JUTGamePad.h | 2 +- include/SSystem/SComponent/c_bg_s.h | 2 +- include/SSystem/SComponent/c_m3d.h | 2 +- include/d/actor/d_a_daiocta.h | 4 ++-- include/d/actor/d_a_npc_so.h | 2 +- include/d/actor/d_a_obj_canon.h | 2 +- include/d/actor/d_a_obj_mknjd.h | 2 +- include/d/actor/d_a_shop_item.h | 2 +- include/d/actor/d_a_tag_island.h | 2 +- include/d/actor/d_a_tag_mk.h | 2 +- include/d/d_door.h | 2 +- include/d/d_kankyo.h | 22 +++++++++---------- include/d/d_kankyo_demo.h | 2 +- include/d/d_kankyo_rain.h | 2 +- include/d/d_message.h | 2 +- include/d/d_meter.h | 2 +- include/d/d_msg.h | 2 +- include/d/d_shop.h | 2 +- include/d/d_spline_path.h | 2 +- include/f_op/f_op_kankyo_mng.h | 2 +- include/f_op/f_op_msg_mng.h | 2 +- include/f_op/f_op_overlap_req.h | 2 +- include/f_pc/f_pc_method.h | 8 +++---- include/f_pc/f_pc_node.h | 4 ++-- .../J3DGraphLoader/J3DJointFactory.cpp | 12 +++++----- src/JSystem/JAudio/JASBankMgr.cpp | 2 +- src/JSystem/JAudio/JASPlayer_impl.cpp | 6 ++--- src/JSystem/JUtility/JUTCacheFont.cpp | 6 ++--- src/JSystem/JUtility/JUTDirectPrint.cpp | 6 ++--- src/d/actor/d_a_bb.cpp | 2 +- src/d/actor/d_a_bmd.cpp | 2 +- src/d/actor/d_a_bmdfoot.cpp | 2 +- src/d/actor/d_a_bmdhand.cpp | 2 +- src/d/actor/d_a_bridge.cpp | 2 +- src/d/actor/d_a_cc.cpp | 2 +- src/d/actor/d_a_dr2.cpp | 2 +- src/d/actor/d_a_floor.cpp | 2 +- src/d/actor/d_a_goal_flag.cpp | 2 +- src/d/actor/d_a_icelift.cpp | 2 +- src/d/actor/d_a_kamome.cpp | 2 +- src/d/actor/d_a_kita.cpp | 2 +- src/d/actor/d_a_klft.cpp | 2 +- src/d/actor/d_a_ks.cpp | 2 +- src/d/actor/d_a_majuu_flag.cpp | 2 +- src/d/actor/d_a_mflft.cpp | 2 +- src/d/actor/d_a_msw.cpp | 2 +- src/d/actor/d_a_nz.cpp | 2 +- src/d/actor/d_a_obj_balancelift.cpp | 2 +- src/d/actor/d_a_obj_ice.cpp | 4 ++-- src/d/actor/d_a_obj_leaves.cpp | 6 ++--- src/d/actor/d_a_obj_pirateship.cpp | 2 +- src/d/actor/d_a_obj_stair.cpp | 2 +- src/d/actor/d_a_shop_item.cpp | 2 +- src/d/actor/d_a_tag_md_cb.cpp | 4 ++-- src/d/actor/d_a_tag_mk.cpp | 2 +- src/d/d_auction_screen.cpp | 2 +- src/d/d_boss_magma.cpp | 2 +- src/d/d_cloth_packet.cpp | 2 +- src/d/d_msg.cpp | 4 ++-- 63 files changed, 97 insertions(+), 96 deletions(-) diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h index f7d7b2567..76af93a70 100644 --- a/include/JSystem/JParticle/JPAEmitter.h +++ b/include/JSystem/JParticle/JPAEmitter.h @@ -130,8 +130,8 @@ public: /* 0x0E0 */ JGeometry::TVec3 mEmitterGlobalCenter; /* 0x0EC */ JGeometry::TVec3 mPublicScale; /* 0x0F8 */ JGeometry::TVec3 mgReRDir; - /* 0x100 */ f32 mFovy; - /* 0x104 */ f32 mAspect; + /* 0x104 */ f32 mFovy; + /* 0x108 */ f32 mAspect; /* 0x10C */ JGeometry::TVec3 mVolumePos; /* 0x118 */ JGeometry::TVec3 mVelOmni; /* 0x124 */ JGeometry::TVec3 mVelAxis; diff --git a/include/JSystem/JParticle/JPATexture.h b/include/JSystem/JParticle/JPATexture.h index 0e0d28742..9d681e5b7 100644 --- a/include/JSystem/JParticle/JPATexture.h +++ b/include/JSystem/JParticle/JPATexture.h @@ -32,8 +32,8 @@ public: virtual JUTTexture* getJUTTexture() { return &mTexture; } public: - /* 0x00 */ JUTTexture mTexture; - /* 0x40 */ const JPATextureData* mpData; + /* 0x04 */ JUTTexture mTexture; + /* 0x44 */ const JPATextureData* mpData; }; struct JPADefaultTexture { diff --git a/include/JSystem/JUtility/JUTCacheFont.h b/include/JSystem/JUtility/JUTCacheFont.h index 5d72910e1..3c5048dac 100644 --- a/include/JSystem/JUtility/JUTCacheFont.h +++ b/include/JSystem/JUtility/JUTCacheFont.h @@ -54,6 +54,7 @@ public: void setPagingType(EPagingType type) { mPagingType = type; } GXTexObj* getTexObj(void* buffer) { return &((TCachePage*)buffer)->mTexObj; } + void delete_and_initialize() { deleteMemBlocks_CacheFont(); initialize_state(); } static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; } diff --git a/include/JSystem/JUtility/JUTDirectPrint.h b/include/JSystem/JUtility/JUTDirectPrint.h index e82c6f9d7..092caf7ea 100644 --- a/include/JSystem/JUtility/JUTDirectPrint.h +++ b/include/JSystem/JUtility/JUTDirectPrint.h @@ -6,7 +6,9 @@ namespace std { // no idea what this is or why it is used instead of va_list - struct __tag_va_List : __va_list_struct {}; + struct __tag_va_List { + va_list list; + }; } class JUTDirectPrint { diff --git a/include/JSystem/JUtility/JUTGamePad.h b/include/JSystem/JUtility/JUTGamePad.h index 21c5d7428..34b0c5ce3 100644 --- a/include/JSystem/JUtility/JUTGamePad.h +++ b/include/JSystem/JUtility/JUTGamePad.h @@ -238,7 +238,7 @@ public: /* 0x90 */ JUTGamePadRecordBase* mPadReplay; /* 0x94 */ u8 field_0x94[4]; /* 0x98 */ C3ButtonReset mButtonReset; - /* 0x9C */ OSTime mResetTime; + /* 0xA0 */ OSTime mResetTime; static JSUList mPadList; static bool mListInitialized; diff --git a/include/SSystem/SComponent/c_bg_s.h b/include/SSystem/SComponent/c_bg_s.h index 63aa41390..d6e7e1aad 100644 --- a/include/SSystem/SComponent/c_bg_s.h +++ b/include/SSystem/SComponent/c_bg_s.h @@ -10,7 +10,7 @@ class cBgS_ShdwDraw; class cBgS_LinChk; class cBgS_GndChk; class cM3dGPla; -class cXyz; +struct cXyz; class cBgS_ChkElm { public: diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 04b66ff41..41466e660 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -14,7 +14,7 @@ class cM3dGPla; class cM3dGSph; class cM3dGTri; class csXyz; -class cXyz; +struct cXyz; struct Vec; diff --git a/include/d/actor/d_a_daiocta.h b/include/d/actor/d_a_daiocta.h index f613c279d..f457adf7d 100644 --- a/include/d/actor/d_a_daiocta.h +++ b/include/d/actor/d_a_daiocta.h @@ -9,8 +9,8 @@ #include "m_Do/m_Do_hostIO.h" class J3DNode; -class dCcD_SrcSph; -class dCcD_SrcCps; +struct dCcD_SrcSph; +struct dCcD_SrcCps; class daDaiocta_c : public fopAc_ac_c { public: diff --git a/include/d/actor/d_a_npc_so.h b/include/d/actor/d_a_npc_so.h index 36b0b10fd..ca7d32891 100644 --- a/include/d/actor/d_a_npc_so.h +++ b/include/d/actor/d_a_npc_so.h @@ -4,7 +4,7 @@ #include "f_op/f_op_actor.h" class J3DNode; -class dCcD_SrcSph; +struct dCcD_SrcSph; class daNpc_So_c : public fopAc_ac_c { public: diff --git a/include/d/actor/d_a_obj_canon.h b/include/d/actor/d_a_obj_canon.h index 0cbd26ca9..643785579 100644 --- a/include/d/actor/d_a_obj_canon.h +++ b/include/d/actor/d_a_obj_canon.h @@ -8,7 +8,7 @@ #include "m_Do/m_Do_hostIO.h" class J3DNode; -class dCcD_SrcSph; +struct dCcD_SrcSph; class daObj_Canon_c : public fopAc_ac_c { public: diff --git a/include/d/actor/d_a_obj_mknjd.h b/include/d/actor/d_a_obj_mknjd.h index 50a2cd82c..0c5fbec94 100644 --- a/include/d/actor/d_a_obj_mknjd.h +++ b/include/d/actor/d_a_obj_mknjd.h @@ -8,7 +8,7 @@ #include "d/d_com_inf_game.h" #include "SSystem/SComponent/c_phase.h" -class msg_class; +struct msg_class; namespace daObjMknjD { class Act_c : public dBgS_MoveBgActor { diff --git a/include/d/actor/d_a_shop_item.h b/include/d/actor/d_a_shop_item.h index f9cab27ba..1f8725805 100644 --- a/include/d/actor/d_a_shop_item.h +++ b/include/d/actor/d_a_shop_item.h @@ -17,7 +17,7 @@ public: inline bool _delete(); void setTevType(int type) { mTevType = type; } - char* getShopArcname(); + const char* getShopArcname(); s16 getShopBmdIdx(); void CreateInit(); bool _execute(); diff --git a/include/d/actor/d_a_tag_island.h b/include/d/actor/d_a_tag_island.h index c00d6e8ef..5e7ef88b7 100644 --- a/include/d/actor/d_a_tag_island.h +++ b/include/d/actor/d_a_tag_island.h @@ -3,7 +3,7 @@ #include "f_op/f_op_actor.h" -class msg_class; +struct msg_class; class daTag_Island_c : public fopAc_ac_c { public: diff --git a/include/d/actor/d_a_tag_mk.h b/include/d/actor/d_a_tag_mk.h index 5869f9b5b..1489661f3 100644 --- a/include/d/actor/d_a_tag_mk.h +++ b/include/d/actor/d_a_tag_mk.h @@ -40,7 +40,7 @@ public: void demoInitWait(); BOOL demoProcWait(); void demoInitCom(); - BOOL demoProcCom(); + void demoProcCom(); s32 getNowEventAction(); void demoProc(); BOOL actionEvent(); diff --git a/include/d/d_door.h b/include/d/d_door.h index 6d32aadeb..110cb6672 100644 --- a/include/d/d_door.h +++ b/include/d/d_door.h @@ -5,7 +5,7 @@ #include "d/d_particle.h" #include "SSystem/SComponent/c_phase.h" -class msg_class; +struct msg_class; class dDoor_info_c : public fopAc_ac_c { public: diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index d8666cd30..881635d35 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -50,17 +50,17 @@ struct WIND_INF_ENTITY { struct GB_WIND_INFLUENCE { /* 0x00 */ cXyz mWindVec; - /* 0x04 */ cXyz* mpWindVecOverride; - /* 0x08 */ cXyz field_0x8; - /* 0x14 */ f32 mWindPower; - /* 0x18 */ f32 mWindStrengthOverride; - /* 0x1C */ f32 mCustomWindPower; - /* 0x20 */ s16 mTactWindAngleX; - /* 0x22 */ s16 mTactWindAngleY; - /* 0x24 */ s16 mEvtWindAngleX; - /* 0x26 */ s16 mEvtWindAngleY; - /* 0x28 */ u8 mTactWindAngleFlags; - /* 0x2E */ u8 mEvtWindSet; + /* 0x0C */ cXyz* mpWindVecOverride; + /* 0x10 */ cXyz field_0x8; + /* 0x1C */ f32 mWindPower; + /* 0x20 */ f32 mWindStrengthOverride; + /* 0x24 */ f32 mCustomWindPower; + /* 0x28 */ s16 mTactWindAngleX; + /* 0x2A */ s16 mTactWindAngleY; + /* 0x2C */ s16 mEvtWindAngleX; + /* 0x2E */ s16 mEvtWindAngleY; + /* 0x30 */ u8 mTactWindAngleFlags; + /* 0x31 */ u8 mEvtWindSet; }; struct EF_THUNDER { diff --git a/include/d/d_kankyo_demo.h b/include/d/d_kankyo_demo.h index a45d104b6..3a5f9c946 100644 --- a/include/d/d_kankyo_demo.h +++ b/include/d/d_kankyo_demo.h @@ -3,7 +3,7 @@ #include "d/d_kankyo.h" -class cXyz; +struct cXyz; struct DEMO_PLIGHT { /* 0x00 */ int field_0x00; diff --git a/include/d/d_kankyo_rain.h b/include/d/d_kankyo_rain.h index d2f2e2b1f..8dee41052 100644 --- a/include/d/d_kankyo_rain.h +++ b/include/d/d_kankyo_rain.h @@ -8,7 +8,7 @@ struct DOUBLE_POS { f64 x, y, z; }; -class cXyz; +struct cXyz; void dKyr_drawSun(Mtx, cXyz*, GXColor&, u8**); void dKyr_drawLenzflare(Mtx, cXyz*, GXColor&, u8**); diff --git a/include/d/d_message.h b/include/d/d_message.h index 6b5971c10..2078ea8cf 100644 --- a/include/d/d_message.h +++ b/include/d/d_message.h @@ -4,7 +4,7 @@ #include "f_op/f_op_msg_mng.h" #include "d/d_drawlist.h" -class sub_msg2_class; +struct sub_msg2_class; class dDlst_2DMSG2_c : public dDlst_base_c { public: diff --git a/include/d/d_meter.h b/include/d/d_meter.h index d31da77f1..f5d28a6c0 100644 --- a/include/d/d_meter.h +++ b/include/d/d_meter.h @@ -10,7 +10,7 @@ class J2DPane; class JPABaseEmitter; class fopAc_ac_c; struct fopMsgM_pane_class; -class msg_class; +struct msg_class; class sub_meter_class; class dMeter_HIO_c : public JORReflexible { diff --git a/include/d/d_msg.h b/include/d/d_msg.h index b59217d59..f586b9b98 100644 --- a/include/d/d_msg.h +++ b/include/d/d_msg.h @@ -7,7 +7,7 @@ #include "f_op/f_op_msg.h" #include "f_op/f_op_msg_mng.h" -class msg_class; +struct msg_class; class sub_msg_class; class sub_msg_class : public msg_class { diff --git a/include/d/d_shop.h b/include/d/d_shop.h index 522a40aaf..da4ec4491 100644 --- a/include/d/d_shop.h +++ b/include/d/d_shop.h @@ -6,7 +6,7 @@ #include "m_Do/m_Do_ext.h" #include "f_pc/f_pc_manager.h" -class msg_class; +struct msg_class; class STControl; typedef u32 (*dShop_DefaultMsgCallback)(void*); diff --git a/include/d/d_spline_path.h b/include/d/d_spline_path.h index 57a1dace6..35397134c 100644 --- a/include/d/d_spline_path.h +++ b/include/d/d_spline_path.h @@ -3,7 +3,7 @@ #include "dolphin/types.h" -class cXyz; +struct cXyz; class d2DBSplinePath { public: diff --git a/include/f_op/f_op_kankyo_mng.h b/include/f_op/f_op_kankyo_mng.h index daba6c525..a0bec1e88 100644 --- a/include/f_op/f_op_kankyo_mng.h +++ b/include/f_op/f_op_kankyo_mng.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_xyz.h" #include "f_pc/f_pc_manager.h" -class kankyo_class; +struct kankyo_class; struct fopKyM_prm_class { /* 0x00 */ cXyz mPos; diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h index e573e818a..04fe4a80e 100644 --- a/include/f_op/f_op_msg_mng.h +++ b/include/f_op/f_op_msg_mng.h @@ -9,7 +9,7 @@ class JKRExpHeap; class JKRHeap; class fopAc_ac_c; -class msg_class; +struct msg_class; class J2DPane; class J2DScreen; class J2DPicture; diff --git a/include/f_op/f_op_overlap_req.h b/include/f_op/f_op_overlap_req.h index bcbf5abd5..1206b9936 100644 --- a/include/f_op/f_op_overlap_req.h +++ b/include/f_op/f_op_overlap_req.h @@ -6,7 +6,7 @@ #include "f_pc/f_pc_base.h" struct layer_class; -class overlap_task_class; +struct overlap_task_class; struct overlap_request_class { /* 0x00 */ request_base_class base; diff --git a/include/f_pc/f_pc_method.h b/include/f_pc/f_pc_method.h index bad955c9c..46895c264 100644 --- a/include/f_pc/f_pc_method.h +++ b/include/f_pc/f_pc_method.h @@ -8,10 +8,10 @@ typedef int (*process_method_func)(void*); typedef struct process_method_class { - process_method_func mpCreateFunc; - process_method_func mpDeleteFunc; - process_method_func mpExecuteFunc; - process_method_func mpIsDeleteFunc; + /* 0x00 */ process_method_func mpCreateFunc; + /* 0x04 */ process_method_func mpDeleteFunc; + /* 0x08 */ process_method_func mpExecuteFunc; + /* 0x0C */ process_method_func mpIsDeleteFunc; } process_method_class; int fpcMtd_Method(process_method_func pFunc, void* pUserData); diff --git a/include/f_pc/f_pc_node.h b/include/f_pc/f_pc_node.h index 079f06dcc..a53d6f2ff 100644 --- a/include/f_pc/f_pc_node.h +++ b/include/f_pc/f_pc_node.h @@ -8,8 +8,8 @@ #include "f_pc/f_pc_profile.h" typedef struct nodedraw_method_class { - process_method_class base; - process_method_func mpDrawFunc; + /* 0x00 */ process_method_class base; + /* 0x10 */ process_method_func mpDrawFunc; } nodedraw_method_class; typedef struct process_node_class { diff --git a/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp b/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp index d96f059e9..6b4e2e579 100644 --- a/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp +++ b/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp @@ -19,12 +19,12 @@ J3DJointFactory::J3DJointFactory(const J3DJointBlock& jointBlock) { J3DJoint* J3DJointFactory::create(int jntNo) { J3DJoint* joint = new J3DJoint(); joint->mJntNo = jntNo; - joint->mKind = mJointInitData[mIndexTable[jntNo]].mKind; - joint->mScaleCompensate = mJointInitData[mIndexTable[jntNo]].mScaleCompensate; - joint->mTransformInfo = mJointInitData[mIndexTable[jntNo]].mTransformInfo; - joint->mRadius = mJointInitData[mIndexTable[jntNo]].mRadius; - joint->mMin = mJointInitData[mIndexTable[jntNo]].mMin; - joint->mMax = mJointInitData[mIndexTable[jntNo]].mMax; + joint->mKind = getKind(jntNo); + joint->mScaleCompensate = getScaleCompensate(jntNo); + joint->mTransformInfo = getTransformInfo(jntNo); + joint->mRadius = getRadius(jntNo); + joint->mMin = getMin(jntNo); + joint->mMax = getMax(jntNo); joint->mMtxCalc = NULL; joint->mOldMtxCalc = NULL; if (joint->mScaleCompensate == 0xFF) { diff --git a/src/JSystem/JAudio/JASBankMgr.cpp b/src/JSystem/JAudio/JASBankMgr.cpp index a7eeb7787..117d9a459 100644 --- a/src/JSystem/JAudio/JASBankMgr.cpp +++ b/src/JSystem/JAudio/JASBankMgr.cpp @@ -19,7 +19,7 @@ #include "JSystem/JUtility/JUTAssert.h" s16 JASystem::BankMgr::OSC_RELEASE_TABLE[6] = { 1, 10, 0, 15, 0, 0}; -JASystem::TOscillator::Osc_ JASystem::BankMgr::OSC_ENV = { 0, 1.0f, NULL, BankMgr::OSC_RELEASE_TABLE, 1.0f, 0.0f }; +JASystem::TOscillator::Osc_ JASystem::BankMgr::OSC_ENV = { 0, 1.0f, NULL, JASystem::BankMgr::OSC_RELEASE_TABLE, 1.0f, 0.0f }; s32 JASystem::BankMgr::sTableSize; JASystem::TBank** JASystem::BankMgr::sBankArray; diff --git a/src/JSystem/JAudio/JASPlayer_impl.cpp b/src/JSystem/JAudio/JASPlayer_impl.cpp index c6991bfd8..217b6e45a 100644 --- a/src/JSystem/JAudio/JASPlayer_impl.cpp +++ b/src/JSystem/JAudio/JASPlayer_impl.cpp @@ -67,15 +67,15 @@ const JASystem::TOscillator::Osc_ JASystem::Player::sAdsrDef = { }; const JASystem::TOscillator::Osc_ JASystem::Player::sEnvelopeDef = { - 0, 1.0f, NULL, sRelTable, 1.0f, 0.0f + 0, 1.0f, NULL, JASystem::Player::sRelTable, 1.0f, 0.0f }; const JASystem::TOscillator::Osc_ JASystem::Player::sVibratoDef = { - 1, 0.5f, sVibTable, sVibTable, 0.0f, 1.0f + 1, 0.5f, JASystem::Player::sVibTable, JASystem::Player::sVibTable, 0.0f, 1.0f }; const JASystem::TOscillator::Osc_ JASystem::Player::sTremoroDef = { - 0, 0.5f, sTreTable, sTreTable, 0.0f, 1.0f + 0, 0.5f, JASystem::Player::sTreTable, JASystem::Player::sTreTable, 0.0f, 1.0f }; s16 JASystem::Player::CUTOFF_TO_IIR_TABLE[] = { diff --git a/src/JSystem/JUtility/JUTCacheFont.cpp b/src/JSystem/JUtility/JUTCacheFont.cpp index 33fa6f78b..79a40c303 100644 --- a/src/JSystem/JUtility/JUTCacheFont.cpp +++ b/src/JSystem/JUtility/JUTCacheFont.cpp @@ -23,11 +23,9 @@ JUTCacheFont::JUTCacheFont(const ResFONT* p_fontRes, u32 cacheSize, JKRHeap* p_h /* 802C0454-802C04E8 .text __dt__12JUTCacheFontFv */ JUTCacheFont::~JUTCacheFont() { if (isValid()) { - deleteMemBlocks_CacheFont(); - initialize_state(); + delete_and_initialize(); - deleteMemBlocks_ResFont(); - JUTResFont::initialize_state(); + JUTResFont::delete_and_initialize(); JUTFont::initialize_state(); } diff --git a/src/JSystem/JUtility/JUTDirectPrint.cpp b/src/JSystem/JUtility/JUTDirectPrint.cpp index 180d7aecb..cc47bf90b 100644 --- a/src/JSystem/JUtility/JUTDirectPrint.cpp +++ b/src/JSystem/JUtility/JUTDirectPrint.cpp @@ -139,7 +139,7 @@ void JUTDirectPrint::printSub(u16 position_x, u16 position_y, const char* format return; } - int buffer_length = vsnprintf(buffer, ARRAY_SIZE(buffer), format, args); + int buffer_length = vsnprintf(buffer, ARRAY_SIZE(buffer), format, args->list); u16 x = position_x; if (buffer_length > 0) { if (clear) { @@ -177,8 +177,8 @@ void JUTDirectPrint::drawString(u16 position_x, u16 position_y, char* text) { void JUTDirectPrint::drawString_f(u16 position_x, u16 position_y, char const* format, ...) { if (mFrameBuffer) { std::__tag_va_List args; - va_start(args, format); + va_start(args.list, format); printSub(position_x, position_y, format, &args, false); - va_end(args); + va_end(args.list); } } diff --git a/src/d/actor/d_a_bb.cpp b/src/d/actor/d_a_bb.cpp index 16b8fe104..85e151b1a 100644 --- a/src/d/actor/d_a_bb.cpp +++ b/src/d/actor/d_a_bb.cpp @@ -365,7 +365,7 @@ void anm_init(bb_class* i_this, int animFileIdx, f32 morf, u8 loopMode, f32 spee } /* 00000D74-00001048 .text s_a_d_sub__FPvPv */ -void* s_a_d_sub(void* ac1, void* ac2) { +static void* s_a_d_sub(void* ac1, void* ac2) { dBgS_LinChk linChk; cXyz sp14; cXyz sp8; diff --git a/src/d/actor/d_a_bmd.cpp b/src/d/actor/d_a_bmd.cpp index 704e0c50b..fc9bdf79f 100644 --- a/src/d/actor/d_a_bmd.cpp +++ b/src/d/actor/d_a_bmd.cpp @@ -1128,7 +1128,7 @@ void eff_cont(bmd_class* i_this) { } /* 00003D48-00003E38 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { +static void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { bmd_class* i_this = (bmd_class*)i_ac; #if VERSION == VERSION_DEMO if (i_this->m304 == 3) diff --git a/src/d/actor/d_a_bmdfoot.cpp b/src/d/actor/d_a_bmdfoot.cpp index 82192c655..cfc8830f8 100644 --- a/src/d/actor/d_a_bmdfoot.cpp +++ b/src/d/actor/d_a_bmdfoot.cpp @@ -587,7 +587,7 @@ void move(bmdfoot_class* i_this) { } /* 000021B8-00002204 .text s_a_d_sub__FPvPv */ -void* s_a_d_sub(void* search, void* param_2) { +static void* s_a_d_sub(void* search, void* param_2) { UNUSED(param_2); if ((fopAcM_IsActor(search)) && (fopAcM_GetName(search) == fpcNm_BMD_e)) { return search; diff --git a/src/d/actor/d_a_bmdhand.cpp b/src/d/actor/d_a_bmdhand.cpp index e2c30d106..84f2ebcf7 100644 --- a/src/d/actor/d_a_bmdhand.cpp +++ b/src/d/actor/d_a_bmdhand.cpp @@ -656,7 +656,7 @@ void hand_move(bmdhand_class* i_this) { } /* 00002E74-00002EC0 .text s_a_d_sub__FPvPv */ -void* s_a_d_sub(void* param_1, void* param_2) { +static void* s_a_d_sub(void* param_1, void* param_2) { UNUSED(param_2); if ((fopAcM_IsActor(param_1)) && (fopAcM_GetName(param_1) == fpcNm_BMD_e)) { return param_1; diff --git a/src/d/actor/d_a_bridge.cpp b/src/d/actor/d_a_bridge.cpp index 97b828733..3ae97ae35 100644 --- a/src/d/actor/d_a_bridge.cpp +++ b/src/d/actor/d_a_bridge.cpp @@ -26,7 +26,7 @@ static f32* wp; static f32 ita_z_p[] = { 0.1f, 0.3f, 0.5f, 0.75f, 0.9f, 1.0f, 0.9f, 0.75f, 0.5f, 0.3f, 0.1f }; /* 00000078-00000504 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { +static void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { bridge_class* i_this = (bridge_class*)i_ac; cXyz pos = i_this->mBr[0].mPosition - i_pt->current.pos; diff --git a/src/d/actor/d_a_cc.cpp b/src/d/actor/d_a_cc.cpp index 6de742da3..a72b33bf1 100644 --- a/src/d/actor/d_a_cc.cpp +++ b/src/d/actor/d_a_cc.cpp @@ -1995,7 +1995,7 @@ void action_tomaru(cc_class* i_this) { } /* 000056CC-00005778 .text tsubo_search__FPvPv */ -void* tsubo_search(void* arg1, void* arg2) { +static void* tsubo_search(void* arg1, void* arg2) { fopAc_ac_c* actor1 = (fopAc_ac_c*)arg1; cc_class* i_this = (cc_class*)arg2; diff --git a/src/d/actor/d_a_dr2.cpp b/src/d/actor/d_a_dr2.cpp index 65f05fa5b..dde7a10c1 100644 --- a/src/d/actor/d_a_dr2.cpp +++ b/src/d/actor/d_a_dr2.cpp @@ -194,7 +194,7 @@ static BOOL daDr2_Draw(dr2_class* i_this) { } /* 000006D4-00000720 .text s_a_d_sub__FPvPv */ -void* s_a_d_sub(void* ac1, void* ac2) { +static void* s_a_d_sub(void* ac1, void* ac2) { UNUSED(ac2); if (fopAcM_IsActor(ac1) && fopAcM_GetName(ac1) == fpcNm_BTD_e) { return ac1; diff --git a/src/d/actor/d_a_floor.cpp b/src/d/actor/d_a_floor.cpp index 95d9edd58..95402953b 100644 --- a/src/d/actor/d_a_floor.cpp +++ b/src/d/actor/d_a_floor.cpp @@ -17,7 +17,7 @@ namespace daFloor_prm { const char daFloor_c::m_arcname[6] = "Hhyu1"; /* 00000078-000000DC .text rideCallBack__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void rideCallBack(dBgW*, fopAc_ac_c* i_this, fopAc_ac_c* i_other) { +static void rideCallBack(dBgW*, fopAc_ac_c* i_this, fopAc_ac_c* i_other) { if (fopAcM_GetName(i_other) == fpcNm_PLAYER_e && !((daPy_py_c*)i_other)->checkEquipHeavyBoots()) { ((daFloor_c*)i_this)->field_0x2d9 = 1; } else if (fopAcM_GetName(i_other) == fpcNm_PLAYER_e && ((daFloor_c*)i_this)->field_0x2d9 && ((daPy_py_c*)i_other)->checkEquipHeavyBoots() && !((daFloor_c*)i_this)->field_0x2d8) { diff --git a/src/d/actor/d_a_goal_flag.cpp b/src/d/actor/d_a_goal_flag.cpp index 5a8dba74f..f6e578742 100644 --- a/src/d/actor/d_a_goal_flag.cpp +++ b/src/d/actor/d_a_goal_flag.cpp @@ -615,7 +615,7 @@ cPhs_State daGoal_Flag_c::_create() { /* 0000183C-00001970 .text get_cloth_anim_sub_factor__FP4cXyzP4cXyzP4cXyzf */ -void get_cloth_anim_sub_factor(cXyz* i_posP, cXyz* i_otherP, cXyz* o_dst, f32 i_idealDist) { +static void get_cloth_anim_sub_factor(cXyz* i_posP, cXyz* i_otherP, cXyz* o_dst, f32 i_idealDist) { cXyz vec_to_neighbor = *i_otherP - *i_posP; cXyz correction_dir = vec_to_neighbor.normZP(); diff --git a/src/d/actor/d_a_icelift.cpp b/src/d/actor/d_a_icelift.cpp index 6c0b39cc6..4bc5da9a3 100644 --- a/src/d/actor/d_a_icelift.cpp +++ b/src/d/actor/d_a_icelift.cpp @@ -23,7 +23,7 @@ void daIlift_c::CreateHeap() { } /* 00000284-00000480 .text rideCallBack__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void rideCallBack(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { +static void rideCallBack(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { /* Nonmatching */ } diff --git a/src/d/actor/d_a_kamome.cpp b/src/d/actor/d_a_kamome.cpp index a3ab1c0cd..bbbedfcda 100644 --- a/src/d/actor/d_a_kamome.cpp +++ b/src/d/actor/d_a_kamome.cpp @@ -56,7 +56,7 @@ void anm_init(kamome_class* i_this, int anmResIdx, float morf, unsigned char loo } /* 000001E4-000004B8 .text s_a_d_sub__FPvPv */ -void* s_a_d_sub(void* ac1, void* ac2) { +static void* s_a_d_sub(void* ac1, void* ac2) { dBgS_LinChk linChk; fopAc_ac_c* actor2 = (fopAc_ac_c*)ac2; diff --git a/src/d/actor/d_a_kita.cpp b/src/d/actor/d_a_kita.cpp index 8a7363959..312b89fa7 100644 --- a/src/d/actor/d_a_kita.cpp +++ b/src/d/actor/d_a_kita.cpp @@ -18,7 +18,7 @@ #include "d/d_bg_s_movebg_actor.h" /* 00000078-0000032C .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { +static void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { kita_class* pActor = static_cast(i_ac); cXyz delta_pos, local_44, local_50; diff --git a/src/d/actor/d_a_klft.cpp b/src/d/actor/d_a_klft.cpp index 7623cb79b..76aa4bb25 100644 --- a/src/d/actor/d_a_klft.cpp +++ b/src/d/actor/d_a_klft.cpp @@ -9,7 +9,7 @@ #include "d/d_cc_d.h" /* 00000078-00000374 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { +static void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { /* Nonmatching */ } diff --git a/src/d/actor/d_a_ks.cpp b/src/d/actor/d_a_ks.cpp index 14064ef5c..00cb2b52d 100644 --- a/src/d/actor/d_a_ks.cpp +++ b/src/d/actor/d_a_ks.cpp @@ -1181,7 +1181,7 @@ void action_omoi(ks_class* i_this) { } /* 000026DC-000027A0 .text tsubo_search__FPvPv */ -void* tsubo_search(void* param_1, void* i_data) { +static void* tsubo_search(void* param_1, void* i_data) { ks_class* i_this = (ks_class*)i_data; fopAc_ac_c* actor = &i_this->actor; int r0 = 0; diff --git a/src/d/actor/d_a_majuu_flag.cpp b/src/d/actor/d_a_majuu_flag.cpp index 9a5e8d920..055eb7785 100644 --- a/src/d/actor/d_a_majuu_flag.cpp +++ b/src/d/actor/d_a_majuu_flag.cpp @@ -499,7 +499,7 @@ static BOOL daMajuu_Flag_Draw(daMajuu_Flag_c* i_this) { /* 00000DCC-00000F00 .text get_cloth_anim_sub_factor__FP4cXyzP4cXyzP4cXyzf */ -void get_cloth_anim_sub_factor(cXyz* pPos, cXyz* pOther, cXyz* pDst, float distIdeal) { +static void get_cloth_anim_sub_factor(cXyz* pPos, cXyz* pOther, cXyz* pDst, float distIdeal) { cXyz sp30 = *pOther - *pPos; cXyz sp24 = sp30.normZC(); diff --git a/src/d/actor/d_a_mflft.cpp b/src/d/actor/d_a_mflft.cpp index 362889931..4a9f9cde8 100644 --- a/src/d/actor/d_a_mflft.cpp +++ b/src/d/actor/d_a_mflft.cpp @@ -36,7 +36,7 @@ void mflft_class::setLiftUp(cXyz arg1) { } /* 000001AC-00000408 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW*, fopAc_ac_c* arg1, fopAc_ac_c* arg2) { +static void ride_call_back(dBgW*, fopAc_ac_c* arg1, fopAc_ac_c* arg2) { mflft_class* i_this = (mflft_class*)arg1; cMtx_YrotS(*calc_mtx, -i_this->actor.current.angle.y); diff --git a/src/d/actor/d_a_msw.cpp b/src/d/actor/d_a_msw.cpp index 76d20fe30..1d3badf2e 100644 --- a/src/d/actor/d_a_msw.cpp +++ b/src/d/actor/d_a_msw.cpp @@ -12,7 +12,7 @@ #include "d/d_s_play.h" /* 00000078-000002D4 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { +static void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { msw_class* pActor = static_cast(i_ac); cMtx_YrotS(*calc_mtx, -i_ac->current.angle.y); diff --git a/src/d/actor/d_a_nz.cpp b/src/d/actor/d_a_nz.cpp index d71b44c91..4c027f16d 100644 --- a/src/d/actor/d_a_nz.cpp +++ b/src/d/actor/d_a_nz.cpp @@ -64,7 +64,7 @@ void naraku_water_check(nz_class*) { } /* 0000206C-0000214C .text s_a_d_sub__FPvPv */ -void s_a_d_sub(void*, void*) { +static void s_a_d_sub(void*, void*) { /* Nonmatching */ } diff --git a/src/d/actor/d_a_obj_balancelift.cpp b/src/d/actor/d_a_obj_balancelift.cpp index 7177aaedd..0236dd0a4 100644 --- a/src/d/actor/d_a_obj_balancelift.cpp +++ b/src/d/actor/d_a_obj_balancelift.cpp @@ -50,7 +50,7 @@ void daObjBlift_ride_actor_check(fopAc_ac_c*) { } /* 00000264-0000033C .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { +static void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c*) { /* Nonmatching */ } diff --git a/src/d/actor/d_a_obj_ice.cpp b/src/d/actor/d_a_obj_ice.cpp index 2df048227..e6d691f1a 100644 --- a/src/d/actor/d_a_obj_ice.cpp +++ b/src/d/actor/d_a_obj_ice.cpp @@ -422,7 +422,7 @@ bool daObjIce_c::_execute() { } /* 00000EB8-00000F48 .text set_material_sub__FP11J3DMaterialUc */ -void set_material_sub(J3DMaterial* material, unsigned char alpha) { +static void set_material_sub(J3DMaterial* material, unsigned char alpha) { while (material != NULL) { if (alpha == 0) { material->getShape()->hide(); @@ -435,7 +435,7 @@ void set_material_sub(J3DMaterial* material, unsigned char alpha) { } /* 00000F48-00000FB0 .text set_material__FP8J3DModelUc */ -void set_material(J3DModel* model, unsigned char alpha) { +static void set_material(J3DModel* model, unsigned char alpha) { J3DModelData* modelData = model->getModelData(); for (u16 i = 0; i < modelData->getJointNum(); i++) { set_material_sub(modelData->getJointNodePointer(i)->getMesh(), alpha); diff --git a/src/d/actor/d_a_obj_leaves.cpp b/src/d/actor/d_a_obj_leaves.cpp index f3926172d..b74aa1600 100644 --- a/src/d/actor/d_a_obj_leaves.cpp +++ b/src/d/actor/d_a_obj_leaves.cpp @@ -254,7 +254,7 @@ void daObjLeaves_c::birthEffect(int arg1, cXyz* arg2, csXyz* arg3, GXColor* arg4 } /* 000002E4-00000360 .text rideCallBack__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void rideCallBack(dBgW*, fopAc_ac_c* a_this, fopAc_ac_c* a_player) { +static void rideCallBack(dBgW*, fopAc_ac_c* a_this, fopAc_ac_c* a_player) { daObjLeaves_c* i_this = (daObjLeaves_c*)a_this; if (fopAcM_GetName(a_player) == fpcNm_PLAYER_e) { @@ -718,7 +718,7 @@ bool daObjLeaves_c::_execute() { } /* 0000107C-000011B0 .text set_material_sub__FP11J3DMaterialUc */ -void set_material_sub(J3DMaterial* material, unsigned char alpha) { +static void set_material_sub(J3DMaterial* material, unsigned char alpha) { while (material != NULL) { if (alpha == 0) { material->getShape()->hide(); @@ -739,7 +739,7 @@ void set_material_sub(J3DMaterial* material, unsigned char alpha) { } /* 000011B0-00001218 .text set_material__FP8J3DModelUc */ -void set_material(J3DModel* model, unsigned char alpha) { +static void set_material(J3DModel* model, unsigned char alpha) { J3DModelData* modelData = model->getModelData(); for (u16 i = 0; i < modelData->getJointNum(); i++) { set_material_sub(modelData->getJointNodePointer(i)->getMesh(), alpha); diff --git a/src/d/actor/d_a_obj_pirateship.cpp b/src/d/actor/d_a_obj_pirateship.cpp index e5d04b344..1f82eb111 100644 --- a/src/d/actor/d_a_obj_pirateship.cpp +++ b/src/d/actor/d_a_obj_pirateship.cpp @@ -145,7 +145,7 @@ static int create_idx_tbl_Yuukaigo[] = {0, 1, 5, -1}; } // namespace daObjPirateship /* 000000EC-000000FC .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c* arg2) { +static void ride_call_back(dBgW*, fopAc_ac_c*, fopAc_ac_c* arg2) { fopAcM_OffStatus(arg2, fopAcStts_NOCULLEXEC_e); } diff --git a/src/d/actor/d_a_obj_stair.cpp b/src/d/actor/d_a_obj_stair.cpp index d8ec620d7..c3013490d 100644 --- a/src/d/actor/d_a_obj_stair.cpp +++ b/src/d/actor/d_a_obj_stair.cpp @@ -69,7 +69,7 @@ daobj_stairHIO_c::daobj_stairHIO_c() { } /* 00000130-000001D8 .text ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -void ride_call_back(dBgW* i_arg0, fopAc_ac_c* i_arg1, fopAc_ac_c* i_arg2) { +static void ride_call_back(dBgW* i_arg0, fopAc_ac_c* i_arg1, fopAc_ac_c* i_arg2) { daObj_Stair_c* i_this = (daObj_Stair_c*)i_arg1; if (fopAcM_GetProfName(i_arg2) == fpcNm_PLAYER_e && i_this->field_0x2E0 < l_HIO.m18){ i_this->field_0x2E4 = 1; diff --git a/src/d/actor/d_a_shop_item.cpp b/src/d/actor/d_a_shop_item.cpp index 98b8f18a9..4224a08b8 100644 --- a/src/d/actor/d_a_shop_item.cpp +++ b/src/d/actor/d_a_shop_item.cpp @@ -20,7 +20,7 @@ const char daShopItem_c::m_cloth_arcname[] = "Cloth"; const f32 daShopItem_c::m_cullfar_max = 5000.0f; /* 00000078-000000D8 .text getShopArcname__12daShopItem_cFv */ -char* daShopItem_c::getShopArcname() { +const char* daShopItem_c::getShopArcname() { u8 type = fopAcM_GetParamBit(fopAcM_GetParam(this), 8, 4); if(type == 1 || (type == 0 && mModelType[m_itemNo] == 0x01)) { return dItem_data::getFieldArc(m_itemNo); diff --git a/src/d/actor/d_a_tag_md_cb.cpp b/src/d/actor/d_a_tag_md_cb.cpp index 4a9326c4a..1ddc093f0 100644 --- a/src/d/actor/d_a_tag_md_cb.cpp +++ b/src/d/actor/d_a_tag_md_cb.cpp @@ -441,12 +441,12 @@ void daTag_MdCb_c::initialMsgSetEvent(int arg1) { /* 00000FB0-00000FD0 .text actionMsgSetEvent__12daTag_MdCb_cFi */ BOOL daTag_MdCb_c::actionMsgSetEvent(int) { - talk_init(); + return talk_init(); } /* 00000FD0-00000FF0 .text actionMessageEvent__12daTag_MdCb_cFi */ BOOL daTag_MdCb_c::actionMessageEvent(int) { - talk(); + return talk(); } /* 00000FF0-0000100C .text initialPlayerOffDrow__12daTag_MdCb_cFi */ diff --git a/src/d/actor/d_a_tag_mk.cpp b/src/d/actor/d_a_tag_mk.cpp index db9083f33..08db9e98b 100644 --- a/src/d/actor/d_a_tag_mk.cpp +++ b/src/d/actor/d_a_tag_mk.cpp @@ -203,7 +203,7 @@ void daTag_Mk_c::demoInitCom() { } /* 000006F8-000006FC .text demoProcCom__10daTag_Mk_cFv */ -BOOL daTag_Mk_c::demoProcCom() { +void daTag_Mk_c::demoProcCom() { } /* 000006FC-00000744 .text getNowEventAction__10daTag_Mk_cFv */ diff --git a/src/d/d_auction_screen.cpp b/src/d/d_auction_screen.cpp index 617e68d08..0078b8c11 100644 --- a/src/d/d_auction_screen.cpp +++ b/src/d/d_auction_screen.cpp @@ -568,7 +568,7 @@ static cPhs_State dAs_Create(msg_class* msg) { talkFlag = FALSE; dAs_c* i_this = (dAs_c*)msg; - i_this->_create(); + return i_this->_create(); } /* 80160D20-80160D70 .text dAuction_screen_create__Fv */ diff --git a/src/d/d_boss_magma.cpp b/src/d/d_boss_magma.cpp index 932f8b66f..60872470c 100644 --- a/src/d/d_boss_magma.cpp +++ b/src/d/d_boss_magma.cpp @@ -49,7 +49,7 @@ void dMagma_ballBoss_c::update() { } /* 80076D50-80076D9C .text b_a_sub__FPvPv */ -void* b_a_sub(void* param_1, void* param_2) { +static void* b_a_sub(void* param_1, void* param_2) { if (fopAcM_IsActor(param_1) && fopAcM_GetName(param_1) == fpcNm_BTD_e) { return param_1; } diff --git a/src/d/d_cloth_packet.cpp b/src/d/d_cloth_packet.cpp index a53ab8418..63676d3ac 100644 --- a/src/d/d_cloth_packet.cpp +++ b/src/d/d_cloth_packet.cpp @@ -211,7 +211,7 @@ void dCloth_packet_c::draw() { } /* 800638E4-80063A10 .text get_cloth_anim_sub_factor__FP4cXyzP4cXyzP4cXyzff */ -void get_cloth_anim_sub_factor(cXyz* pPos, cXyz* pOther, cXyz* pDst, float restDist, float springFactor) { +static void get_cloth_anim_sub_factor(cXyz* pPos, cXyz* pOther, cXyz* pDst, float restDist, float springFactor) { cXyz diff = *pOther - *pPos; cXyz norm = diff.normZP(); f32 dist = diff.abs() - restDist; diff --git a/src/d/d_msg.cpp b/src/d/d_msg.cpp index eec7e53a2..b0c15a7a5 100644 --- a/src/d/d_msg.cpp +++ b/src/d/d_msg.cpp @@ -45,7 +45,7 @@ static dDlst_2DMSG_c message; dDlst_2Dtact_c capture; dDlst_2DM_c multiTex; -char* mLayout[] = { +const char* mLayout[] = { "hukidashi_14_1.blo", "hukidashi_14_1.blo", "hukidashi_14_3.blo", @@ -1495,7 +1495,7 @@ void dMsg_tactGuideShow(sub_msg_class* i_Msg, u8 param_2) { /* 80210AA0-80210CA4 .text dMsg_numberInput__FP13sub_msg_class */ void dMsg_numberInput(sub_msg_class* i_Msg) { - static char* num_str[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; + static const char* num_str[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; for (s32 i = 0; i < 8; i++) { if (i_Msg->mMsgDataProc.getIconNum(i) == fopMsgM_Icon_INPUT_e) {