mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 05:28:43 -04:00
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:
@@ -2,6 +2,7 @@
|
||||
#define JASGADGET_H
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#ifdef __MWERKS__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTFONT_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include "dusk/endian.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,8 +62,8 @@ enum cCcD_ObjAtType {
|
||||
/* 0x10000000 */ AT_TYPE_10000000 = (1 << 28),
|
||||
/* 0x10000000 */ AT_TYPE_20000000 = (1 << 29),
|
||||
/* 0x40000000 */ AT_TYPE_WOLF_CUT_TURN = (1 << 30),
|
||||
/* 0x80000000 */ AT_TYPE_WOLF_ATTACK = (1 << 31),
|
||||
/* 0xD8000000 */ AT_TYPE_UNK = 0xD8000000
|
||||
/* 0x80000000 */ AT_TYPE_WOLF_ATTACK = (1u << 31),
|
||||
/* 0xD8000000 */ AT_TYPE_UNK = 0xD8000000u
|
||||
};
|
||||
|
||||
struct cCcD_SrcTriAttr {
|
||||
@@ -120,16 +120,16 @@ public:
|
||||
STATIC_ASSERT(0x40 == sizeof(cCcD_DivideArea));
|
||||
|
||||
struct cCcD_SrcObjCommonBase {
|
||||
/* 0x0 */ s32 mSPrm;
|
||||
/* 0x0 */ u32 mSPrm;
|
||||
};
|
||||
|
||||
struct cCcD_SrcObjTg {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x0 */ u32 mType;
|
||||
/* 0x4 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct cCcD_SrcObjAt {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x0 */ u32 mType;
|
||||
/* 0x4 */ u8 mAtp;
|
||||
/* 0x8 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0xC
|
||||
|
||||
+1
-148
@@ -1038,10 +1038,6 @@ extern GXColor g_clearColor;
|
||||
extern GXColor g_whiteColor;
|
||||
extern GXColor g_saftyWhiteColor;
|
||||
|
||||
inline void dComIfG_ct() {
|
||||
g_dComIfG_gameInfo.ct();
|
||||
}
|
||||
|
||||
int dComLbG_PhaseHandler(request_of_phase_process_class*, request_of_phase_process_fn*,
|
||||
void*);
|
||||
BOOL dComIfG_resetToOpening(scene_class* scene);
|
||||
@@ -1064,144 +1060,6 @@ int dComIfG_TimerReStart(int);
|
||||
int dComIfG_TimerEnd(int i_mode, int param_1);
|
||||
void dComIfGs_onStageBossEnemy(int i_stageNo);
|
||||
|
||||
inline void dComIfG_setBrightness(u8 brightness) {
|
||||
g_dComIfG_gameInfo.mFadeBrightness = brightness;
|
||||
}
|
||||
|
||||
inline int dComIfG_getTimerMode() {
|
||||
return g_dComIfG_gameInfo.play.getTimerMode();
|
||||
}
|
||||
|
||||
inline void dComIfG_setTimerMode(int mode) {
|
||||
return g_dComIfG_gameInfo.play.setTimerMode(mode);
|
||||
}
|
||||
|
||||
inline dTimer_c* dComIfG_getTimerPtr() {
|
||||
return g_dComIfG_gameInfo.play.getTimerPtr();
|
||||
}
|
||||
|
||||
inline void dComIfG_setTimerPtr(dTimer_c* i_ptr) {
|
||||
g_dComIfG_gameInfo.play.setTimerPtr(i_ptr);
|
||||
}
|
||||
|
||||
inline void dComIfG_setTimerType(u8 i_type) {
|
||||
g_dComIfG_gameInfo.play.setTimerType(i_type);
|
||||
}
|
||||
|
||||
inline u8 dComIfG_getTimerType() {
|
||||
return g_dComIfG_gameInfo.play.getTimerType();
|
||||
}
|
||||
|
||||
inline int dComIfG_getTimerLimitTimeMs() {
|
||||
return g_dComIfG_gameInfo.play.getTimerLimitTimeMs();
|
||||
}
|
||||
|
||||
inline void dComIfG_setTimerLimitTimeMs(int i_time) {
|
||||
g_dComIfG_gameInfo.play.setTimerLimitTimeMs(i_time);
|
||||
}
|
||||
|
||||
inline BOOL dComIfG_isDebugMode() {
|
||||
return g_dComIfG_gameInfo.mIsDebugMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to add a new Object Resource Archive (*.arc) into the Resource Control.
|
||||
* @param i_arcName Name of archive to be added
|
||||
* @param i_mountDirection The direction to mount the archive. mDoDvd_MOUNT_DIRECTION_HEAD or
|
||||
* mDoDvd_MOUNT_DIRECTION_TAIL
|
||||
* @param i_heap Pointer to heap to load resources into
|
||||
* @return TRUE if successful, FALSE otherwise
|
||||
*/
|
||||
inline int dComIfG_setObjectRes(const char* i_arcName, u8 i_mountDirection, JKRHeap* i_heap) {
|
||||
return g_dComIfG_gameInfo.mResControl.setObjectRes(i_arcName, i_mountDirection, i_heap);
|
||||
}
|
||||
|
||||
inline int dComIfG_setObjectRes(const char* i_arcName, void* i_archiveRes, u32 i_bufferSize) {
|
||||
return g_dComIfG_gameInfo.mResControl.setObjectRes(i_arcName, i_archiveRes, i_bufferSize, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to add a new Stage Resource Archive (*.arc) into the Resource Control.
|
||||
* @param i_arcName Name of archive to be added
|
||||
* @param i_heap Pointer to heap to load resources into
|
||||
* @return TRUE if successful, FALSE otherwise
|
||||
*/
|
||||
inline int dComIfG_setStageRes(const char* i_arcName, JKRHeap* i_heap) {
|
||||
return g_dComIfG_gameInfo.mResControl.setStageRes(i_arcName, i_heap);
|
||||
}
|
||||
|
||||
inline int dComIfG_syncObjectRes(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.syncObjectRes(i_arcName);
|
||||
}
|
||||
|
||||
inline int dComIfG_syncStageRes(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.syncStageRes(i_arcName);
|
||||
}
|
||||
|
||||
inline int dComIfG_deleteObjectResMain(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.deleteObjectRes(i_arcName);
|
||||
}
|
||||
|
||||
inline int dComIfG_deleteStageRes(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.deleteStageRes(i_arcName);
|
||||
}
|
||||
|
||||
inline void* dComIfG_getStageRes(const char* i_arcName, const char* i_resName) {
|
||||
return g_dComIfG_gameInfo.mResControl.getStageRes(i_arcName, i_resName);
|
||||
}
|
||||
|
||||
inline void* dComIfG_getObjectRes(const char* i_arcName, const char* i_resName) {
|
||||
return g_dComIfG_gameInfo.mResControl.getObjectRes(i_arcName, i_resName);
|
||||
}
|
||||
|
||||
inline void* dComIfG_getObjectRes(const char* i_arcName, int i_index) {
|
||||
return g_dComIfG_gameInfo.mResControl.getObjectRes(i_arcName, i_index);
|
||||
}
|
||||
|
||||
inline void dComIfG_dumpResControl() {
|
||||
g_dComIfG_gameInfo.mResControl.dump();
|
||||
}
|
||||
|
||||
inline dBgS& dComIfG_Bgsp() {
|
||||
return g_dComIfG_gameInfo.play.mBgs;
|
||||
}
|
||||
|
||||
inline dCcS* dComIfG_Ccsp() {
|
||||
return &g_dComIfG_gameInfo.play.mCcs;
|
||||
}
|
||||
|
||||
inline dCcS& dComIfG_Ccsp2() {
|
||||
return g_dComIfG_gameInfo.play.mCcs;
|
||||
}
|
||||
|
||||
inline dRes_info_c* dComIfG_getObjectResInfo(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.getObjectResInfo(i_arcName);
|
||||
}
|
||||
|
||||
inline dRes_info_c* dComIfG_getStageResInfo(const char* i_arcName) {
|
||||
return g_dComIfG_gameInfo.mResControl.getStageResInfo(i_arcName);
|
||||
}
|
||||
|
||||
inline int dComIfG_syncAllObjectRes() {
|
||||
return g_dComIfG_gameInfo.mResControl.syncAllObjectRes();
|
||||
}
|
||||
|
||||
inline void* dComIfG_getObjectIDRes(const char* i_arcName, u16 i_resID) {
|
||||
return g_dComIfG_gameInfo.mResControl.getObjectIDRes(i_arcName, i_resID);
|
||||
}
|
||||
|
||||
inline u8 dComIfG_getBrightness() {
|
||||
return g_dComIfG_gameInfo.mFadeBrightness;
|
||||
}
|
||||
|
||||
inline int dComIfG_getObjctResName2Index(const char* i_arcName, const char* i_resName) {
|
||||
return g_dComIfG_gameInfo.mResControl.getObjectResName2Index(i_arcName, i_resName);
|
||||
}
|
||||
|
||||
inline u32 dComIfG_getTrigB(u32 i_padNo) {
|
||||
return mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_B;
|
||||
}
|
||||
|
||||
u8 dComIfGs_getMixItemIndex(int i_no);
|
||||
void dComIfGs_setSelectItemIndex(int i_no, u8 item_index);
|
||||
void dComIfGs_setMixItemIndex(int i_no, u8 item_index);
|
||||
@@ -1217,7 +1075,7 @@ cXyz& dComIfGs_getWarpPlayerPos();
|
||||
const char* dComIfGs_getWarpStageName();
|
||||
s16 dComIfGs_getWarpPlayerAngleY();
|
||||
s8 dComIfGs_getWarpRoomNo();
|
||||
bool dComIfGs_getWarpMarkFlag();
|
||||
// dComIfGs_getWarpMarkFlag declared below
|
||||
BOOL dComIfGs_isOneZoneSwitch(int i_swBit, int i_roomNo);
|
||||
BOOL dComIfGs_isOneZoneItem(int i_swBit, int i_roomNo);
|
||||
BOOL dComIfGs_isZoneSwitch(int, int);
|
||||
@@ -2835,11 +2693,6 @@ inline void dComIfGp_event_setGtItm(u8 i_itemNo) {
|
||||
g_dComIfG_gameInfo.play.getEvent()->setGtItm(i_itemNo);
|
||||
}
|
||||
|
||||
inline int dComIfGp_evmng_getMyActIdx(int i_staffId, char** i_actions, int i_actionNum,
|
||||
BOOL param_3, BOOL param_4) {
|
||||
return dComIfGp_getPEvtManager()->getMyActIdx(i_staffId, i_actions, i_actionNum, param_3, param_4);
|
||||
}
|
||||
|
||||
inline dEvent_manager_c& dComIfGp_getEventManager() {
|
||||
return g_dComIfG_gameInfo.play.getEvtManager();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef D_SAVE_D_SAVE_H
|
||||
#define D_SAVE_D_SAVE_H
|
||||
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JFramework/JFWDisplay.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "CaptureScreen.h"
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
void fapGm_After();
|
||||
void fapGm_Create();
|
||||
|
||||
@@ -195,4 +195,9 @@ static const float INF = 2000000000.0f;
|
||||
#define FABSF std::fabsf
|
||||
#endif
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <cmath>
|
||||
using std::isnan;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user