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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user