Improving standard compiler compatibility (#2926)

* Adding explicit dolphin/ prefix & fix characters

* Rename ShiftJIS to SJIS

* Separate JASSeqReader read methods implementation between compilers.

* Fix pointer.h

* fix d_item_data typo

* fix gcn matching issue
This commit is contained in:
kipcode66
2025-12-08 20:31:22 -08:00
committed by GitHub
parent a3d6bafcdd
commit 3b26aae532
154 changed files with 756 additions and 718 deletions
+12
View File
@@ -37,11 +37,23 @@ public:
u8* getCur() { return field_0x04; }
u32 readByte() { return *field_0x04++; }
u32 read16() {
#ifdef __MWERKS__
return *((u16*)field_0x04)++;
#else
u16* value = (u16*)field_0x04;
field_0x04 += 2;
return *value;
#endif
}
u32 read24() {
field_0x04--;
#ifdef __MWERKS__
return (*((u32*)field_0x04)++) & 0x00ffffff;
#else
u32* value = (u32*)field_0x04;
field_0x04 += 4;
return (*value) & 0x00ffffff;
#endif
}
u16 getLoopCount() const {
if (field_0x08 == 0) {
+7
View File
@@ -15,10 +15,17 @@ public:
template<class T>
class TPointer_delete : public TPointer<T> {
public:
#ifdef __MWERKS__
TPointer_delete(T* ptr) : TPointer(ptr) {}
~TPointer_delete() {
delete mPtr;
}
#else
TPointer_delete(T* ptr) : TPointer<T>(ptr) {}
~TPointer_delete() {
delete this->mPtr;
}
#endif
};
}
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JHIRMCC_H
#define JHIRMCC_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
struct JHIMccContext;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JORHOSTINFO_H
#define JORHOSTINFO_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
#define HOSTINFO_REQ_COMPUTER_NAME 0
#define HOSTINFO_REQ_USERNAME 1
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JORMCONTEXT_H
#define JORMCONTEXT_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include <stdint.h>
#include "JSystem/JHostIO/JORReflexible.h"
#include "JSystem/JSupport/JSUMemoryStream.h"
+1 -1
View File
@@ -42,7 +42,7 @@ public:
TRandom_(u32 value) : RandomT(value) {}
u8 get_uint8(u8 param_0) {
return get_ufloat_1() * param_0;
return this->get_ufloat_1() * param_0;
}
};
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JMESSAGE_H
#define JMESSAGE_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
// Struct definitions might be wrong
typedef struct bmg_header_t {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JMESSAGE_LOCALE_H
#define JMESSAGE_LOCALE_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
namespace JMessage {
@@ -27,7 +27,7 @@ public:
return ret;
}
const void* getContent() const {
return (const void*)((int)getBlockEnd_() + align_roundUp(get_IDSize(), 4));
return (const void*)((intptr_t)getBlockEnd_() + align_roundUp(get_IDSize(), 4));
}
};
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JSUPPORT_H
#define JSUPPORT_H
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include <stdint.h>
/**
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JUtility/JUTAssert.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
typedef void (*callbackFn)(int, void*);
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef F_PC_DEBUG_SV_H_
#define F_PC_DEBUG_SV_H_
#include <dolphin.h>
#include <dolphin/dolphin.h>
#if DEBUG
+6
View File
@@ -113,4 +113,10 @@ static const float INF = 2000000000.0f;
(void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; \
(void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0;
#ifdef __MWERKS__
#define SJIS(character, value) character
#else
#define SJIS(character, value) ((u32)value)
#endif
#endif