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 23:31:22 -05:00
committed by GitHub
parent a3d6bafcdd
commit 3b26aae532
154 changed files with 756 additions and 718 deletions
+3 -2
View File
@@ -9,6 +9,7 @@
#include "dolphin/gx.h"
#include <dolphin/vi.h>
#include "global.h"
#include "stdint.h"
void JFWDisplay::ctor_subroutine(bool enableAlpha) {
mEnableAlpha = enableAlpha;
@@ -362,8 +363,8 @@ static void waitForTick(u32 p1, u16 p2) {
if (!OSReceiveMessage(JUTVideo::getManager()->getMessageQueue(), &msg, OS_MESSAGE_BLOCK)) {
msg = 0;
}
} while (((int)msg - (int)nextCount) < 0);
nextCount = (int)msg + uVar1;
} while (((intptr_t)msg - (intptr_t)nextCount) < 0);
nextCount = (intptr_t)msg + uVar1;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JHostIO/JHIMccBuf.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JHostIO/JHIRMcc.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include <cstring.h>
extern "C" int HIO2Read(u32, u32, void*, u32);
+1 -1
View File
@@ -2,7 +2,7 @@
#include "JSystem/JHostIO/JHICommonMem.h"
#include "JSystem/JKernel/JKRHeap.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
int JHIMemBuf::create() {
int rt = 1;
+1 -1
View File
@@ -2,7 +2,7 @@
#include "JSystem/JHostIO/JHIMccBuf.h"
#include "JSystem/JHostIO/JHIRMcc.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include "global.h"
u32 gsEnableHostio;
+1 -1
View File
@@ -2,7 +2,7 @@
#include "JSystem/JHostIO/JORFile.h"
#include "JSystem/JHostIO/JORServer.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
JORFile::JORFile()
: mHandle(0),
@@ -778,8 +778,8 @@ f64 TFunctionValue_list_parameter::update_INTERPOLATE_BSPLINE_dataMore3_(
local_68[2] = pfVar2[1];
local_48[2] = pfVar2[-2];
local_48[3] = pfVar2[0];
s32 iVar5 = ((int)pfVar2 - (int)rThis.dat1.get()) / 4;
s32 iVar3 = ((int)rThis.dat2.get() - (int)pfVar2) / 4;
s32 iVar5 = ((intptr_t)pfVar2 - (intptr_t)rThis.dat1.get()) / 4;
s32 iVar3 = ((intptr_t)rThis.dat2.get() - (intptr_t)pfVar2) / 4;
switch(iVar5) {
case 2:
local_68[0] = 2.0 * local_68[1] - local_68[2];
@@ -186,7 +186,7 @@ void JStudio::TAdaptor::adaptor_setVariableValue_n(JStudio::TControl* pControl,
JGadget::TEnumerator<const u32*> enumerator(param_2, param_2 + param_3);
while (enumerator) {
(*pcVar6)(this, pControl, **enumerator, param_5, iVar7);
param_5 = (const void*)((int)param_5 + iVar7);
param_5 = (const void*)((intptr_t)param_5 + iVar7);
}
}
@@ -3,6 +3,7 @@
#include "JSystem/JStudio/JStudio/stb-data-parse.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/os.h"
#include "stdint.h"
namespace JStudio {
namespace stb {
@@ -22,12 +23,12 @@ void TParse_TSequence::getData(TData* pData) const {
if (type == 0)
return;
const void* next = (const void*)((int)getRaw() + 4);
const void* next = (const void*)((intptr_t)getRaw() + 4);
if (type <= 0x7f) {
pData->next = next;
} else {
pData->content = next;
pData->next = (const void*)((int)next + param);
pData->next = (const void*)((intptr_t)next + param);
}
}
@@ -43,7 +44,7 @@ void TParse_TParagraph::getData(TData* pData) const {
pData->next = data;
} else {
pData->content = data;
pData->next = (const void*)((int)data + align_roundUp(result, 4));
pData->next = (const void*)((intptr_t)data + align_roundUp(result, 4));
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
#include "JSystem/JSupport/JSUInputStream.h"
#include "JSystem/JSupport/JSURandomInputStream.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
JSUInputStream::~JSUInputStream() {
if (!isGood()) {
+1 -1
View File
@@ -2,7 +2,7 @@
#include "JSystem/JSupport/JSUOutputStream.h"
#include "JSystem/JSupport/JSURandomOutputStream.h"
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include <cstring.h>
JSUOutputStream::~JSUOutputStream() {
+1 -1
View File
@@ -7,7 +7,7 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include <stdint.h>
OSMessageQueue JUTException::sMessageQueue = {0};
@@ -1,6 +1,6 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include <dolphin.h>
#include <dolphin/dolphin.h>
#include "global.h"
extern u8 const JUTResFONT_Ascfont_fix12[16736] ATTRIBUTE_ALIGN(32) = {