mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-02 00:38:46 -04:00
MSL_C header cleanup (#2988)
* msl_c header cleanup * math header cleanup * fix rest of shieldD configs * cleanup cflag configs a bit * fix shield build
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define J2DPRINT_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "__va_arg.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
class JUTFont;
|
||||
class J2DPrint;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JGEOMETRY_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
|
||||
namespace JGeometry {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
|
||||
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
|
||||
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSTUDIO_MATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
|
||||
namespace JStudio {
|
||||
namespace math {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "JSystem/JStudio/JStudio/jstudio-control.h"
|
||||
#include "global.h"
|
||||
#include "limits.h"
|
||||
#include "math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ private:
|
||||
/* 0x04 */ u32 _4;
|
||||
/* 0x08 */ u32 _8;
|
||||
/* 0x0C */ TFactory* pFactory;
|
||||
/* 0x10 */ JGadget::TLinkList<TObject, -12> mObjectContainer;
|
||||
/* 0x10 */ JGadget::TLinkList<TObject, -12> ocObject_;
|
||||
/* 0x1C */ u32 mStatus;
|
||||
/* 0x20 */ TObject_control mObject_control;
|
||||
/* 0x54 */ s32 _54;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include "__va_arg.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTDIRECTPRINT_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "__va_arg.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "__va_arg.h"
|
||||
#include <stdarg.h>
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef C_M3D_H_
|
||||
#define C_M3D_H_
|
||||
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class cM3dGAab;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_XYZ_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
|
||||
struct cXyz : Vec {
|
||||
static const cXyz Zero;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_resorce.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
#include <cmath.h>
|
||||
#include <math.h>
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define D_MENU_D_MENU_DMAP_MAP_H
|
||||
|
||||
#include "d/d_menu_dmap.h"
|
||||
#include <cmath.h>
|
||||
#include <math.h>
|
||||
|
||||
class dMenu_DmapMap_c {
|
||||
public:
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#include "weak_bss_1109_to_1009.h" // IWYU pragma: export
|
||||
|
||||
// Fixes weak .data
|
||||
#include "math.h" // IWYU pragma: export
|
||||
#include "cmath.h" // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h" // IWYU pragma: export
|
||||
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
|
||||
|
||||
// Fixes weak function ordering
|
||||
#include "cmath.h" // IWYU pragma: export
|
||||
#include "string.h" // IWYU pragma: export
|
||||
#include "math.h" // IWYU pragma: export
|
||||
#include "cstring.h" // IWYU pragma: export
|
||||
#include "JSystem/JUtility/JUTGamePad.h" // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export
|
||||
#include "JSystem/JHostIO/JORReflexible.h" // IWYU pragma: export
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef _DOLPHIN_AR_H_
|
||||
#define _DOLPHIN_AR_H_
|
||||
|
||||
#ifdef __REVOLUTION_SDK__
|
||||
#include <revolution/aralt.h>
|
||||
#else
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -64,8 +67,12 @@ void ARQSetChunkSize(u32 size);
|
||||
u32 ARQGetChunkSize(void);
|
||||
BOOL ARQCheckInit(void);
|
||||
|
||||
u16 __ARGetInterruptStatus(void);
|
||||
void __ARClearInterrupt(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _DOLPHIN_OS_H_
|
||||
#define _DOLPHIN_OS_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio.h>
|
||||
|
||||
#ifdef __REVOLUTION_SDK__
|
||||
#include <revolution/os.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma cplusplus on
|
||||
// fake MSL_C math for sdk specifically since it differs from game MSL_C math
|
||||
|
||||
extern inline float sqrtf(float x) {
|
||||
static const double _half=.5;
|
||||
@@ -46,6 +46,10 @@ extern inline float fabsf(float x) {
|
||||
}
|
||||
|
||||
extern float cosf(float);
|
||||
extern float sinf(float);
|
||||
extern float tanf(float);
|
||||
extern float acosf(float);
|
||||
|
||||
extern inline float cos(float x) {
|
||||
return cosf(x);
|
||||
}
|
||||
@@ -62,5 +66,3 @@ inline float floor(float x) {
|
||||
// x < 0 -> int conversion of x above rounded toward zero(so decrement)
|
||||
return (float)i;
|
||||
}
|
||||
|
||||
#pragma cplusplus reset
|
||||
@@ -82,7 +82,7 @@ typedef unsigned int uint;
|
||||
#define __REGISTER
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef.h>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -1,8 +1,7 @@
|
||||
#ifndef _global_h_
|
||||
#define _global_h_
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Version ordering defined in configure.py
|
||||
#define VERSION_GCN_USA 0
|
||||
#define VERSION_GCN_PAL 1
|
||||
#define VERSION_GCN_JPN 2
|
||||
@@ -49,8 +48,6 @@
|
||||
#define decltype __decltype__
|
||||
#endif
|
||||
|
||||
#define JUT_EXPECT(...)
|
||||
|
||||
#define _SDA_BASE_(dummy) 0
|
||||
#define _SDA2_BASE_(dummy) 0
|
||||
|
||||
|
||||
@@ -40,14 +40,29 @@ typedef struct ARQRequest ARQRequest;
|
||||
|
||||
// AR
|
||||
ARQCallback ARRegisterDMACallback(ARQCallback callback);
|
||||
u32 ARGetDMAStatus(void);
|
||||
void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length);
|
||||
u32 ARAlloc(u32 length);
|
||||
u32 ARFree(u32* length);
|
||||
BOOL ARCheckInit(void);
|
||||
u32 ARInit(u32* stack_index_addr, u32 num_entries);
|
||||
void ARReset(void);
|
||||
void ARSetSize(void);
|
||||
u32 ARGetBaseAddress(void);
|
||||
u32 ARGetSize(void);
|
||||
u32 ARGetInternalSize(void);
|
||||
void ARClear(u32 flag);
|
||||
|
||||
// ARQ
|
||||
void ARQInit(void);
|
||||
void ARQReset(void);
|
||||
void ARQPostRequest(ARQRequest* request, u32 owner, u32 type, u32 priority, u32 source, u32 dest, u32 length, ARQCallback callback);
|
||||
void ARQRemoveRequest(ARQRequest* request);
|
||||
void ARQRemoveOwnerRequest(u32 owner);
|
||||
void ARQFlushQueue(void);
|
||||
void ARQSetChunkSize(u32 size);
|
||||
u32 ARQGetChunkSize(void);
|
||||
BOOL ARQCheckInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _REVOLUTION_OS_H_
|
||||
#define _REVOLUTION_OS_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio.h>
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/gx/GXStruct.h>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef _REVOLUTION_IOSRESTYPES_H_
|
||||
#define _REVOLUTION_IOSRESTYPES_H_
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
@@ -87,3 +88,5 @@ typedef struct {
|
||||
IOSResourceIoctlv ioctlv;
|
||||
} args;
|
||||
} IOSResourceRequest;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef _REVOLUTION_IOSTYPES_H_
|
||||
#define _REVOLUTION_IOSTYPES_H_
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
@@ -41,3 +42,5 @@ typedef struct {
|
||||
IOSCSigDummy dummy;
|
||||
IOSCName issuer;
|
||||
} IOSCSigRsa2048;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma cplusplus on
|
||||
// fake MSL_C math for sdk specifically since it differs from game MSL_C math
|
||||
|
||||
extern inline float sqrtf(float x) {
|
||||
static const double _half=.5;
|
||||
@@ -46,6 +46,10 @@ extern inline float fabsf(float x) {
|
||||
}
|
||||
|
||||
extern float cosf(float);
|
||||
extern float sinf(float);
|
||||
extern float tanf(float);
|
||||
extern float acosf(float);
|
||||
|
||||
extern inline float cos(float x) {
|
||||
return cosf(x);
|
||||
}
|
||||
@@ -62,5 +66,3 @@ inline float floor(float x) {
|
||||
// x < 0 -> int conversion of x above rounded toward zero(so decrement)
|
||||
return (float)i;
|
||||
}
|
||||
|
||||
#pragma cplusplus reset
|
||||
@@ -79,6 +79,6 @@ typedef unsigned int uint;
|
||||
#define __REGISTER
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef.h>
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user