mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
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:
@@ -392,6 +392,9 @@ cflags_revolution_base = [
|
||||
cflags_revolution_retail = [
|
||||
*cflags_revolution_base,
|
||||
"-O4,p",
|
||||
"-DNDEBUG=1",
|
||||
"-DNDEBUG_DEFINED=1",
|
||||
"-DDEBUG_DEFINED=0",
|
||||
]
|
||||
|
||||
cflags_revolution_debug = [
|
||||
@@ -399,6 +402,8 @@ cflags_revolution_debug = [
|
||||
"-opt off",
|
||||
"-inline off",
|
||||
"-DDEBUG=1",
|
||||
"-DDEBUG_DEFINED=1",
|
||||
"-DNDEBUG_DEFINED=0",
|
||||
]
|
||||
|
||||
# Framework flags
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,7 +1,7 @@
|
||||
#ifndef JHIRMCC_H
|
||||
#define JHIRMCC_H
|
||||
|
||||
#include <dolphin.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
struct JHIMccContext;
|
||||
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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,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,7 +1,7 @@
|
||||
#ifndef JSUPPORT_H
|
||||
#define JSUPPORT_H
|
||||
|
||||
#include <dolphin.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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*);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user