Improving compatibility with standard cpp compiler (#2920)

* Improving compatibility with standard cpp compiler

* Add __REGISTER macro for non mwcc compatibility

* Fix for PR comments

* fix missing define for revolution

* Simplifying cSAngle conversion
This commit is contained in:
kipcode66
2025-12-07 00:08:05 -05:00
committed by GitHub
parent 7ac2c38caf
commit fc31053cb6
68 changed files with 1417 additions and 1399 deletions
+6 -6
View File
@@ -288,10 +288,10 @@ extern int __OSInIPL;
#define ASSERT(cond) ASSERTLINE(__LINE__, cond)
inline s16 __OSf32tos16(register f32 inF) {
register s16 out;
inline s16 __OSf32tos16(__REGISTER f32 inF) {
__REGISTER s16 out;
u32 tmp;
register u32* tmpPtr = &tmp;
__REGISTER u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -308,10 +308,10 @@ inline void OSf32tos16(f32* f, s16* out) {
*out = __OSf32tos16(*f);
}
inline u8 __OSf32tou8(register f32 inF) {
register u8 out;
inline u8 __OSf32tou8(__REGISTER f32 inF) {
__REGISTER u8 out;
u32 tmp;
register u32* tmpPtr = &tmp;
__REGISTER u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
+6
View File
@@ -76,6 +76,12 @@ typedef unsigned int uint;
#endif
#endif
#ifdef __MWERKS__
#define __REGISTER register
#else
#define __REGISTER
#endif
#include <stddef.h>
#endif