diff options
| author | robojumper <robojumper@gmail.com> | 2026-05-31 00:09:11 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2026-05-31 00:22:16 +0200 |
| commit | 9b4820921c10c7157b9f21fbf0da0acc93075bcb (patch) | |
| tree | a18c851ac393218e8b88f7cd90c3fdd5574ba063 /include | |
| parent | 31423c25ae448ddf8c4c6c8577bd76530eb33e02 (diff) | |
Re-import MSL_C from TP
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JGeometry.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JMath/JMath.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JParticle/JPAEmitter.h | 2 | ||||
| -rw-r--r-- | include/c/c_math.h | 2 | ||||
| -rw-r--r-- | include/common.h | 5 | ||||
| -rw-r--r-- | include/d/col/c/c_m3d.h | 3 | ||||
| -rw-r--r-- | include/egg/math/eggMath.h | 1 | ||||
| -rw-r--r-- | include/egg/prim/eggAssert.h | 2 | ||||
| -rw-r--r-- | include/egg/prim/eggBinary.h | 2 | ||||
| -rw-r--r-- | include/libms/libms.h | 2 | ||||
| -rw-r--r-- | include/libms/msgfile.h | 2 | ||||
| -rw-r--r-- | include/m/m_angle.h | 3 | ||||
| -rw-r--r-- | include/nw4r/db/db_directPrint.h | 3 | ||||
| -rw-r--r-- | include/nw4r/math/math_arithmetic.h | 5 | ||||
| -rw-r--r-- | include/nw4r/math/math_triangular.h | 2 | ||||
| -rw-r--r-- | include/rvl/AXFX/AXFXHooks.h | 3 | ||||
| -rw-r--r-- | include/rvl/OS/OSArena.h | 2 | ||||
| -rw-r--r-- | include/rvl/OS/OSError.h | 2 | ||||
| -rw-r--r-- | include/rvl/OS/OSUtf.h | 2 | ||||
| -rw-r--r-- | include/rvl/OS/__ppc_eabi_init.h | 2 | ||||
| -rw-r--r-- | include/sized_string.h | 8 |
21 files changed, 34 insertions, 24 deletions
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 8a298132..cfe10968 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -2,9 +2,10 @@ #define JGEOMETRY_H #include "common.h" -#include "math.h" #include "JSystem/JMath/JMath.h" +#include <cmath> + // TODO - a lot of this has been moved to nw4r and egg. Kept for reference for now. namespace JGeometry { diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h index 343571b8..5a86c82c 100644 --- a/include/JSystem/JMath/JMath.h +++ b/include/JSystem/JMath/JMath.h @@ -3,7 +3,7 @@ #include "common.h" #include "rvl/MTX.h" -#include "math.h" +#include <cmath> void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32); void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3); diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h index 807c2d96..ecf1e9f5 100644 --- a/include/JSystem/JParticle/JPAEmitter.h +++ b/include/JSystem/JParticle/JPAEmitter.h @@ -12,6 +12,8 @@ #include "egg/math/eggVector.h" #include "m/m_angle.h" +#include <cstdint> + class JPAResourceManager; class JPABaseEmitter; class JPAEmitterManager; diff --git a/include/c/c_math.h b/include/c/c_math.h index 914eff24..ff4a5eff 100644 --- a/include/c/c_math.h +++ b/include/c/c_math.h @@ -4,7 +4,7 @@ #include "common.h" #include "egg/math/eggMath.h" -#include <cmath.h> +#include <cmath> namespace cM { s16 atan2s(f32, f32); diff --git a/include/common.h b/include/common.h index 3dbf5b4d..0fb49af7 100644 --- a/include/common.h +++ b/include/common.h @@ -108,8 +108,6 @@ #define DECOMP_DONT_INLINE __attribute__((never_inline)) #endif -#include "stddef.h" - typedef signed char s8; typedef signed short s16; typedef signed long s32; @@ -174,8 +172,7 @@ private: }; #endif -#define INT32_MAX (0x7fffffff) -#define UINT32_MAX (0xffffffff) +#define MSL_INLINE inline #define FLOAT_MIN (1.175494351e-38f) #define FLOAT_MAX (3.40282346638528860e+38f) diff --git a/include/d/col/c/c_m3d.h b/include/d/col/c/c_m3d.h index 8623afb9..dfbd8ab7 100644 --- a/include/d/col/c/c_m3d.h +++ b/include/d/col/c/c_m3d.h @@ -2,11 +2,12 @@ #define C_M3D_H #include "common.h" -#include "math.h" #include "nw4r/types_nw4r.h" #include "nw4r/math.h" // IWYU pragma: export +#include <cmath> + class cM3dGAab; class cM3dGCps; class cM3dGCyl; diff --git a/include/egg/math/eggMath.h b/include/egg/math/eggMath.h index ddab706a..32023ac6 100644 --- a/include/egg/math/eggMath.h +++ b/include/egg/math/eggMath.h @@ -2,7 +2,6 @@ #define EGG_MATH_H #include "common.h" -#include "math.h" namespace EGG { diff --git a/include/egg/prim/eggAssert.h b/include/egg/prim/eggAssert.h index 61afd754..18c1365d 100644 --- a/include/egg/prim/eggAssert.h +++ b/include/egg/prim/eggAssert.h @@ -1,8 +1,8 @@ #ifndef EGG_ASSERT_H #define EGG_ASSERT_H -#include "__va_arg.h" #include "common.h" +#include <cstdarg> namespace EGG { // All this is guess diff --git a/include/egg/prim/eggBinary.h b/include/egg/prim/eggBinary.h index 9b517545..a03b77a9 100644 --- a/include/egg/prim/eggBinary.h +++ b/include/egg/prim/eggBinary.h @@ -3,6 +3,8 @@ #include "common.h" +#include <cstddef> + namespace EGG { /** diff --git a/include/libms/libms.h b/include/libms/libms.h index 5751bb81..4c0019ba 100644 --- a/include/libms/libms.h +++ b/include/libms/libms.h @@ -3,6 +3,8 @@ #include "common.h" +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif diff --git a/include/libms/msgfile.h b/include/libms/msgfile.h index b9433f05..aec8ab22 100644 --- a/include/libms/msgfile.h +++ b/include/libms/msgfile.h @@ -2,7 +2,7 @@ #define LIBMS_MSGFILE_H #include "common.h" -#include <wchar.h> +#include <cstddef> #ifdef __cplusplus extern "C" { diff --git a/include/m/m_angle.h b/include/m/m_angle.h index bd3e30f3..7282ac39 100644 --- a/include/m/m_angle.h +++ b/include/m/m_angle.h @@ -4,10 +4,11 @@ #include "c/c_math.h" #include "common.h" #include "m/m_vec.h" -#include "math.h" #include "nw4r/math/math_triangular.h" #include "s/s_Math.h" +#include <cmath> + class mAng { public: mAng() {} diff --git a/include/nw4r/db/db_directPrint.h b/include/nw4r/db/db_directPrint.h index d07ae7ce..8c956f99 100644 --- a/include/nw4r/db/db_directPrint.h +++ b/include/nw4r/db/db_directPrint.h @@ -1,11 +1,12 @@ #ifndef NW4R_DB_DIRECT_PRINT_H #define NW4R_DB_DIRECT_PRINT_H -#include "__va_arg.h" #include "common.h" #include "rvl/GX.h" // IWYU pragma: export +#include <cstdarg> + namespace nw4r { namespace db { diff --git a/include/nw4r/math/math_arithmetic.h b/include/nw4r/math/math_arithmetic.h index 2892128b..b4cffecb 100644 --- a/include/nw4r/math/math_arithmetic.h +++ b/include/nw4r/math/math_arithmetic.h @@ -1,7 +1,6 @@ #ifndef NW4R_MATH_ARITHMETIC_H #define NW4R_MATH_ARITHMETIC_H -#include "math.h" #include "nw4r/types_nw4r.h" // IWYU pragma: export #include "rvl/OS.h" // IWYU pragma: export @@ -32,7 +31,7 @@ inline f32 FAbs(register f32 x) { } inline f32 FCeil(f32 x) { - return std::ceilf(x); + return std::ceil(x); } inline f32 FExp(f32 x) { @@ -40,7 +39,7 @@ inline f32 FExp(f32 x) { } inline f32 FFloor(f32 x) { - return std::floorf(x); + return std::floor(x); } inline f32 FInv(register f32 x) { diff --git a/include/nw4r/math/math_triangular.h b/include/nw4r/math/math_triangular.h index 0e3cea17..08eab5d1 100644 --- a/include/nw4r/math/math_triangular.h +++ b/include/nw4r/math/math_triangular.h @@ -1,6 +1,6 @@ #ifndef NW4R_MATH_TRIANGULAR_H #define NW4R_MATH_TRIANGULAR_H -#include "math.h" +#include <cmath> #include "nw4r/math/math_arithmetic.h" #include "nw4r/types_nw4r.h" diff --git a/include/rvl/AXFX/AXFXHooks.h b/include/rvl/AXFX/AXFXHooks.h index b870c8a4..142d3fcf 100644 --- a/include/rvl/AXFX/AXFXHooks.h +++ b/include/rvl/AXFX/AXFXHooks.h @@ -1,6 +1,9 @@ #ifndef RVL_SDK_AXFX_HOOKS_H #define RVL_SDK_AXFX_HOOKS_H #include "common.h" + +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSArena.h b/include/rvl/OS/OSArena.h index 77adb6ba..07422106 100644 --- a/include/rvl/OS/OSArena.h +++ b/include/rvl/OS/OSArena.h @@ -1,6 +1,8 @@ #ifndef RVL_SDK_OS_ARENA_H #define RVL_SDK_OS_ARENA_H #include "common.h" + +#include <stddef.h> #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSError.h b/include/rvl/OS/OSError.h index 0752584d..b11ce873 100644 --- a/include/rvl/OS/OSError.h +++ b/include/rvl/OS/OSError.h @@ -1,8 +1,8 @@ #ifndef RVL_SDK_OS_ERROR_H #define RVL_SDK_OS_ERROR_H -#include "__va_arg.h" #include "common.h" +#include <stdarg.h> #include "rvl/OS/OSContext.h" diff --git a/include/rvl/OS/OSUtf.h b/include/rvl/OS/OSUtf.h index f688a43a..86698f72 100644 --- a/include/rvl/OS/OSUtf.h +++ b/include/rvl/OS/OSUtf.h @@ -2,7 +2,7 @@ #define RVL_SDK_OS_UTF_H #include "common.h" -#include "wchar.h" +#include "stddef.h" #ifdef __cplusplus extern "C" { diff --git a/include/rvl/OS/__ppc_eabi_init.h b/include/rvl/OS/__ppc_eabi_init.h index 087ecfd9..80dbe483 100644 --- a/include/rvl/OS/__ppc_eabi_init.h +++ b/include/rvl/OS/__ppc_eabi_init.h @@ -12,7 +12,7 @@ DECL_SECTION(".init") void __flush_cache(void *, size_t); void __init_user(void); void __init_cpp(void); void __fini_cpp(void); -DECL_WEAK void exit(void); +DECL_WEAK void exit(int status); void _ExitProcess(void); /** diff --git a/include/sized_string.h b/include/sized_string.h index 2bcec9b9..64f2ba27 100644 --- a/include/sized_string.h +++ b/include/sized_string.h @@ -1,11 +1,11 @@ #ifndef SIZED_STRING_H #define SIZED_STRING_H -#include "__va_arg.h" #include "common.h" -#include "string.h" -#include "wstring.h" -#include "printf.h" +#include <stdarg.h> +#include <string.h> +#include <stddef.h> +#include <printf.h> extern "C" bool strequals(const char *a, const char *b); |
