mirror of
https://github.com/zeldaret/tww.git
synced 2026-10-09 13:36:50 -04:00
@@ -133,8 +133,8 @@ public:
|
||||
Mtx33* getBumpMtxPtr(int idx) { return mpBumpMtxArr[1][idx][mCurrentViewNo]; }
|
||||
Vec* getBaseScale() { return &mBaseScale; } // Unused in TWW
|
||||
void setBaseScale(const Vec& scale) { mBaseScale = scale; }
|
||||
void setUserArea(u32 area) { mUserArea = area; }
|
||||
u32 getUserArea() const { return mUserArea; }
|
||||
void setUserArea(uintptr_t area) { mUserArea = area; }
|
||||
uintptr_t getUserArea() const { return mUserArea; }
|
||||
void setVisibilityManager(J3DVisibilityManager* manager) { mpVisibilityManager = manager; }
|
||||
J3DSkinDeform* getSkinDeform() { return mpSkinDeform; }
|
||||
|
||||
@@ -144,7 +144,7 @@ private:
|
||||
/* 0x008 */ u32 mFlags;
|
||||
/* 0x00C */ u32 mDiffFlag;
|
||||
/* 0x010 */ J3DCalcCallBack mCalcCallBack;
|
||||
/* 0x014 */ u32 mUserArea;
|
||||
/* 0x014 */ uintptr_t mUserArea;
|
||||
/* 0x018 */ Vec mBaseScale;
|
||||
/* 0x024 */ Mtx mBaseTransformMtx;
|
||||
/* 0x054 */ Mtx mViewBaseMtx;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "JSystem/J3DGraphBase/J3DVertex.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
class JUTNameTab;
|
||||
|
||||
enum J3DMaterialCopyFlag {
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
J3DDisplayListObj* getSharedDisplayListObj() { return mSharedDLObj; }
|
||||
J3DIndBlock* getIndBlock() { return mIndBlock; }
|
||||
J3DMaterialAnm* getMaterialAnm() {
|
||||
if ((u32)mMaterialAnm < 0xC0000000) {
|
||||
if ((uintptr_t)mMaterialAnm < 0xC0000000) {
|
||||
return mMaterialAnm;
|
||||
} else {
|
||||
return NULL;
|
||||
|
||||
@@ -110,8 +110,8 @@ public:
|
||||
mpFirstChild = NULL;
|
||||
}
|
||||
|
||||
void setUserArea(u32 area) { mpUserData = (void*)area; }
|
||||
u32 getUserArea() const { return (u32)mpUserData; }
|
||||
void setUserArea(uintptr_t area) { mpUserData = area; }
|
||||
uintptr_t getUserArea() const { return mpUserData; }
|
||||
|
||||
virtual bool isSame(J3DMatPacket*) const;
|
||||
virtual int entry(J3DDrawBuffer*);
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
public:
|
||||
/* 0x04 */ J3DPacket* mpNextPacket;
|
||||
/* 0x08 */ J3DPacket* mpFirstChild;
|
||||
/* 0x0C */ void* mpUserData;
|
||||
/* 0x0C */ uintptr_t mpUserData;
|
||||
}; // Size: 0x10
|
||||
|
||||
class J3DDrawPacket : public J3DPacket {
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
}
|
||||
void setTexture(J3DTexture* pTexture) { mpTexture = pTexture; }
|
||||
void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; }
|
||||
void setMaterialAnmID(u32 materialAnm) { mpMaterialAnm = (J3DMaterialAnm*)materialAnm; }
|
||||
void setMaterialAnmID(uintptr_t materialAnm) { mpMaterialAnm = (J3DMaterialAnm*)materialAnm; }
|
||||
void setMaterialID(u32 id) { mDiffFlag = id; }
|
||||
bool isChanged() { return mDiffFlag & 0x80000000; }
|
||||
bool isEnabled_Diff() { return mpInitShapePacket->getDisplayListObj() != NULL; }
|
||||
|
||||
@@ -15,15 +15,15 @@ public:
|
||||
};
|
||||
|
||||
static inline void JRNLoadCPCmd(u8 cmd, u32 param) {
|
||||
GXFIFO.u8 = GX_CMD_LOAD_CP_REG;
|
||||
GXFIFO.u8 = cmd;
|
||||
GXFIFO.u32 = param;
|
||||
GXCmd1u8(GX_CMD_LOAD_CP_REG);
|
||||
GXCmd1u8(cmd);
|
||||
GXCmd1u32(param);
|
||||
}
|
||||
|
||||
inline void JRNLoadXFCmdHdr(u16 cmd, u8 len) {
|
||||
GXFIFO.u8 = GX_CMD_LOAD_XF_REG;
|
||||
GXFIFO.u16 = len - 1;
|
||||
GXFIFO.u16 = cmd;
|
||||
GXCmd1u8(GX_CMD_LOAD_XF_REG);
|
||||
GXCmd1u16(len - 1);
|
||||
GXCmd1u16(cmd);
|
||||
}
|
||||
|
||||
class J3DCurrentMtx : public J3DCurrentMtxInfo {
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
JRNLoadCPCmd(0x30, getMtxIdxRegA()); // CP_MATINDEX_A
|
||||
JRNLoadCPCmd(0x40, getMtxIdxRegB()); // CP_MATINDEX_B
|
||||
JRNLoadXFCmdHdr(0x1018, 2);
|
||||
GXFIFO.u32 = getMtxIdxRegA();
|
||||
GXFIFO.u32 = getMtxIdxRegB();
|
||||
GXCmd1u32(getMtxIdxRegA());
|
||||
GXCmd1u32(getMtxIdxRegB());
|
||||
}
|
||||
|
||||
void setCurrentTexMtx(u8 t0, u8 t1, u8 t2, u8 t3, u8 t4, u8 t5, u8 t6, u8 t7) {
|
||||
|
||||
@@ -46,8 +46,8 @@ public:
|
||||
void setResTIMG(u16 index, const ResTIMG& timg) {
|
||||
J3D_ASSERT(81, index < mNum, "Error : range over.");
|
||||
mpRes[index] = timg;
|
||||
mpRes[index].imageOffset = ((mpRes[index].imageOffset + (u32)&timg - (u32)(mpRes + index)));
|
||||
mpRes[index].paletteOffset = ((mpRes[index].paletteOffset + (u32)&timg - (u32)(mpRes + index)));
|
||||
mpRes[index].imageOffset = ((mpRes[index].imageOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index)));
|
||||
mpRes[index].paletteOffset = ((mpRes[index].paletteOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index)));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
class J3DModel;
|
||||
class J3DAnmVtxColor;
|
||||
class J3DVertexBuffer;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
u16 countUniqueMaterials();
|
||||
u32 countTexGens(int) const;
|
||||
u32 countStages(int) const;
|
||||
J3DMaterial* create(J3DMaterial*, int, unsigned long) const;
|
||||
J3DMaterial* create(J3DMaterial*, int, u32) const;
|
||||
J3DGXColor newMatColor(int, int) const;
|
||||
u8 newColorChanNum(int) const;
|
||||
J3DColorChan newColorChan(int, int) const;
|
||||
|
||||
@@ -64,12 +64,12 @@ namespace JAIGlobalParameter {
|
||||
f32 getParamSeDolbyCenterValue();
|
||||
f32 getParamSeDolbyFrontDistanceMax();
|
||||
f32 getParamSeDolbyBehindDistanceMax();
|
||||
char* getParamInitDataFileName();
|
||||
char* getParamWavePath();
|
||||
char* getParamSequenceArchivesPath();
|
||||
char* getParamStreamPath();
|
||||
char* getParamAudioResPath();
|
||||
char* getParamSequenceArchivesFileName();
|
||||
const char* getParamInitDataFileName();
|
||||
const char* getParamWavePath();
|
||||
const char* getParamSequenceArchivesPath();
|
||||
const char* getParamStreamPath();
|
||||
const char* getParamAudioResPath();
|
||||
const char* getParamSequenceArchivesFileName();
|
||||
u32 getParamDopplarMoveTime();
|
||||
u8 getParamDistanceParameterMoveTime();
|
||||
u32 getParamDummyObjectMax();
|
||||
@@ -99,12 +99,12 @@ namespace JAIGlobalParameter {
|
||||
extern u32 stayHeapMax;
|
||||
extern u32 autoHeapRoomSize;
|
||||
extern u32 stayHeapSize;
|
||||
extern char* initDataFileName;
|
||||
extern char* wavePath;
|
||||
extern char* sequenceArchivesPath;
|
||||
extern char* streamPath;
|
||||
extern char* audioResPath;
|
||||
extern char* sequenceArchivesFileName;
|
||||
extern const char* initDataFileName;
|
||||
extern const char* wavePath;
|
||||
extern const char* sequenceArchivesPath;
|
||||
extern const char* streamPath;
|
||||
extern const char* audioResPath;
|
||||
extern const char* sequenceArchivesFileName;
|
||||
extern f32 inputGainDown;
|
||||
extern f32 outputGainUp;
|
||||
extern f32 distanceMax;
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "dolphin/os/OSAlarm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
class JKRHeap;
|
||||
|
||||
typedef void (*JFWDisplayUnkFunc)(void);
|
||||
|
||||
@@ -22,8 +22,8 @@ public:
|
||||
|
||||
/* 0x40 */ s32 mTransferDirection;
|
||||
/* 0x44 */ u32 mDataLength;
|
||||
/* 0x48 */ u32 mSrc;
|
||||
/* 0x4C */ u32 mDst;
|
||||
/* 0x48 */ uintptr_t mSrc;
|
||||
/* 0x4C */ uintptr_t mDst;
|
||||
/* 0x50 */ JKRAramBlock* mAramBlock;
|
||||
/* 0x54 */ u32 field_0x54;
|
||||
/* 0x58 */ AsyncCallback mCallback;
|
||||
@@ -50,22 +50,22 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
static JKRAMCommand* prepareCommand(int, u32, u32, u32, JKRAramBlock*,
|
||||
static JKRAMCommand* prepareCommand(int, uintptr_t, uintptr_t, u32, JKRAramBlock*,
|
||||
JKRAMCommand::AsyncCallback);
|
||||
static void sendCommand(JKRAMCommand*);
|
||||
|
||||
static JKRAMCommand* orderAsync(int, u32, u32, u32, JKRAramBlock*, JKRAMCommand::AsyncCallback);
|
||||
static JKRAMCommand* orderAsync(int, uintptr_t, uintptr_t, u32, JKRAramBlock*, JKRAMCommand::AsyncCallback);
|
||||
static BOOL sync(JKRAMCommand*, int);
|
||||
static BOOL orderSync(int, u32, u32, u32, JKRAramBlock*);
|
||||
static BOOL orderSync(int, uintptr_t, uintptr_t, u32, JKRAramBlock*);
|
||||
static void startDMA(JKRAMCommand*);
|
||||
static void doneDMA(u32);
|
||||
static void doneDMA(uintptr_t);
|
||||
|
||||
private:
|
||||
static void lock() { OSLockMutex(&mMutex); }
|
||||
static void unlock() { OSUnlockMutex(&mMutex); }
|
||||
};
|
||||
|
||||
inline BOOL JKRAramPcs(int direction, u32 source, u32 destination, u32 length,
|
||||
inline BOOL JKRAramPcs(int direction, uintptr_t source, uintptr_t destination, u32 length,
|
||||
JKRAramBlock* block) {
|
||||
return JKRAramPiece::orderSync(direction, source, destination, length, block);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
class JKRAMCommand;
|
||||
class JKRDecompCommand {
|
||||
public:
|
||||
typedef void (*AsyncCallback)(u32);
|
||||
typedef void (*AsyncCallback)(uintptr_t);
|
||||
|
||||
JKRDecompCommand();
|
||||
~JKRDecompCommand();
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
/* 0x34 */ int field_0x34;
|
||||
/* 0x38 */ int field_0x38;
|
||||
/* 0x3C */ int field_0x3c;
|
||||
/* 0x40 */ void (*mCallback)(u32);
|
||||
/* 0x40 */ void (*mCallback)(uintptr_t);
|
||||
/* 0x44 */ int field_0x44;
|
||||
/* 0x48 */ bool field_0x48;
|
||||
/* 0x4C */ JKRAramStreamCommand* mStreamCommand;
|
||||
@@ -36,7 +36,7 @@ class JKRDvdAramRipper {
|
||||
public:
|
||||
static JKRAramBlock* loadToAram(s32, u32, JKRExpandSwitch, u32, u32);
|
||||
static JKRAramBlock* loadToAram(JKRDvdFile*, u32, JKRExpandSwitch, u32, u32);
|
||||
static JKRADCommand* loadToAram_Async(JKRDvdFile*, u32, JKRExpandSwitch, void (*)(u32), u32,
|
||||
static JKRADCommand* loadToAram_Async(JKRDvdFile*, u32, JKRExpandSwitch, void (*)(uintptr_t), u32,
|
||||
u32);
|
||||
static JKRADCommand* callCommand_Async(JKRADCommand*);
|
||||
static bool syncAram(JKRADCommand*, int);
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
CMemBlock* getNextBlock() const { return mNext; }
|
||||
u32 getSize() const { return size; }
|
||||
u8 getGroupId() const { return mGroupId; }
|
||||
static CMemBlock* getBlock(void* data) { return (CMemBlock*)((u32)data + -0x10); }
|
||||
static CMemBlock* getBlock(void* data) { return (CMemBlock*)((uintptr_t)data + -sizeof(CMemBlock)); }
|
||||
|
||||
private:
|
||||
/* 0x0 */ u16 mMagic;
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
JKRHeap* find(void* ptr) const;
|
||||
JKRHeap* findAllHeap(void* ptr) const;
|
||||
|
||||
void dispose_subroutine(u32 start, u32 end);
|
||||
void dispose_subroutine(uintptr_t start, uintptr_t end);
|
||||
bool dispose(void* ptr, u32 size);
|
||||
void dispose(void* begin, void* end);
|
||||
void dispose();
|
||||
|
||||
@@ -174,7 +174,7 @@ private:
|
||||
class TFunctionValue_composite : public TFunctionValue, public TFunctionValueAttribute_refer {
|
||||
public:
|
||||
struct TData {
|
||||
TData(void* data) : uintdata((u32)data) {}
|
||||
TData(void* data) : uintdata((uintptr_t)data) {}
|
||||
TData(unsigned int data) : uintdata(data) {}
|
||||
TData(f64 data) : f64data(data) {}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "JSystem/JStudio/JStudio/jstudio-control.h"
|
||||
#include "limits.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
namespace JStudio {
|
||||
namespace data {
|
||||
enum TEOperationData {
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "dolphin/os/OSError.h"
|
||||
#include "global.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
typedef struct OSContext OSContext;
|
||||
class JUTDirectPrint;
|
||||
|
||||
class JUTExternalFB {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
class JKRHeap;
|
||||
|
||||
class JUTXfb {
|
||||
|
||||
@@ -15,7 +15,6 @@ class cCcD_TriAttr;
|
||||
class cCcD_AabAttr;
|
||||
class cCcD_CylAttr;
|
||||
class cCcD_SphAttr;
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
enum cCcD_AtSPrm_e {
|
||||
/* 0x01 */ cCcD_AtSPrm_Set_e = 0x01,
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
static u32 m_bound_se[6];
|
||||
static u32 m_heap_size[6];
|
||||
static char* m_arc_name[6];
|
||||
static const char* m_arc_name[6];
|
||||
static Vec m_cull_min[6];
|
||||
static Vec m_cull_max[6];
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void proc();
|
||||
bool _draw();
|
||||
u32 getMsg();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
|
||||
static void init() {
|
||||
mNowDaizaNum = 0;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
typedef void (daDaiocta_c::*ModeProcFunc)(void);
|
||||
ModeProcFunc mInitFunc;
|
||||
ModeProcFunc mUpdFunc;
|
||||
char* mModeName;
|
||||
const char* mModeName;
|
||||
};
|
||||
|
||||
u8 getSw() { return mSwitchNo; }
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
BOOL chkStopClose();
|
||||
BOOL CreateHeap();
|
||||
u8 getShapeType();
|
||||
char* getArcName();
|
||||
const char* getArcName();
|
||||
s32 getBdlLf();
|
||||
s32 getBdlRt();
|
||||
s32 getDzb();
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
bool chkSwitchPathType();
|
||||
virtual BOOL Draw();
|
||||
|
||||
static char* m_arcname[];
|
||||
static const char* m_arcname[];
|
||||
static const f32 m_speed[];
|
||||
static const s16 m_bmdidx[];
|
||||
static const s16 m_dzbidx[];
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
|
||||
void deleteModelData();
|
||||
#if VERSION > VERSION_DEMO
|
||||
BOOL loadModelData(const char*, J3DModelData*&, JKRSolidHeap*&, unsigned long&);
|
||||
BOOL loadModelData(const char*, J3DModelData*&, JKRSolidHeap*&, u32&);
|
||||
BOOL createModelData();
|
||||
#endif
|
||||
BOOL execCreateWait();
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
daNpcAh_c();
|
||||
|
||||
request_of_phase_process_class* getPhaseP() { return &mPhs; }
|
||||
void setResFlag(unsigned char flag) { field_0x747 = flag; }
|
||||
void setResFlag(u8 flag) { field_0x747 = flag; }
|
||||
|
||||
cPhs_State _create();
|
||||
BOOL createHeap();
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
bool _draw();
|
||||
bool _execute();
|
||||
u8 executeCommon();
|
||||
void executeSetMode(unsigned char);
|
||||
void executeSetMode(u8);
|
||||
BOOL executeWaitInit();
|
||||
void executeWait();
|
||||
BOOL executeTalkInit();
|
||||
@@ -82,10 +82,10 @@ public:
|
||||
bool eventMesSet();
|
||||
void eventGetItemInit();
|
||||
u16 talk2(int);
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
void chkMsg();
|
||||
void setMessage(unsigned long);
|
||||
void setMessage(u32);
|
||||
void setAnmFromMsgTag();
|
||||
u8 getPrmArg0();
|
||||
u8 getSwBit();
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
BOOL initTexPatternAnm(bool);
|
||||
void playTexPatternAnm();
|
||||
void playAnm();
|
||||
void setAnm(unsigned char, int, float);
|
||||
void setAnm(u8, int, float);
|
||||
bool setAnmTbl(sAhAnmDat*);
|
||||
void setCollision(dCcD_Cyl*, cXyz, float, float);
|
||||
BOOL chkEndEvent();
|
||||
|
||||
@@ -28,19 +28,19 @@ public:
|
||||
typedef void (daNpc_kam_c::*EventActionInitFunc)(int evtStaffId);
|
||||
typedef BOOL (daNpc_kam_c::*EventActionFunc)(int evtStaffId);
|
||||
|
||||
void offLineHit() { cLib_offBit(mHitFlags, 0x07UL); }
|
||||
void onFrontLineHit() { cLib_onBit(mHitFlags, 0x01UL); }
|
||||
u32 isFrontLineHit() { return cLib_checkBit(mHitFlags, 0x01UL); }
|
||||
void onLeftLineHit() { cLib_onBit(mHitFlags, 0x02UL); }
|
||||
u32 isLeftLineHit() { return cLib_checkBit(mHitFlags, 0x02UL); }
|
||||
void onRightLineHit() { cLib_onBit(mHitFlags, 0x04UL); }
|
||||
u32 isRightLineHit() { return cLib_checkBit(mHitFlags, 0x04UL); }
|
||||
void onWaterHit() { cLib_onBit(mHitFlags, 0x08UL); }
|
||||
void offWaterHit() { cLib_offBit(mHitFlags, 0x08UL); }
|
||||
u32 isWaterHit() { return cLib_checkBit(mHitFlags, 0x08UL); }
|
||||
void onNoBgCheck() { cLib_onBit(mHitFlags, 0x10UL); }
|
||||
void offNoBgCheck() { cLib_offBit(mHitFlags, 0x10UL); }
|
||||
u32 isNoBgCheck() { return cLib_checkBit(mHitFlags, 0x10UL); }
|
||||
void offLineHit() { cLib_offBit<u32>(mHitFlags, 0x07UL); }
|
||||
void onFrontLineHit() { cLib_onBit<u32>(mHitFlags, 0x01UL); }
|
||||
u32 isFrontLineHit() { return cLib_checkBit<u32>(mHitFlags, 0x01UL); }
|
||||
void onLeftLineHit() { cLib_onBit<u32>(mHitFlags, 0x02UL); }
|
||||
u32 isLeftLineHit() { return cLib_checkBit<u32>(mHitFlags, 0x02UL); }
|
||||
void onRightLineHit() { cLib_onBit<u32>(mHitFlags, 0x04UL); }
|
||||
u32 isRightLineHit() { return cLib_checkBit<u32>(mHitFlags, 0x04UL); }
|
||||
void onWaterHit() { cLib_onBit<u32>(mHitFlags, 0x08UL); }
|
||||
void offWaterHit() { cLib_offBit<u32>(mHitFlags, 0x08UL); }
|
||||
u32 isWaterHit() { return cLib_checkBit<u32>(mHitFlags, 0x08UL); }
|
||||
void onNoBgCheck() { cLib_onBit<u32>(mHitFlags, 0x10UL); }
|
||||
void offNoBgCheck() { cLib_offBit<u32>(mHitFlags, 0x10UL); }
|
||||
u32 isNoBgCheck() { return cLib_checkBit<u32>(mHitFlags, 0x10UL); }
|
||||
|
||||
void onHyoiKamome() { m_hyoi_kamome = true; }
|
||||
void offHyoiKamome() { m_hyoi_kamome = false; }
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
/* 0x6DC */ cXyz field_0x6DC;
|
||||
/* 0x6E8 */ s16 field_0x6E8;
|
||||
/* 0x6EA */ s16 mEventIdx;
|
||||
/* 0x6EC */ char* mpName;
|
||||
/* 0x6EC */ const char* mpName;
|
||||
/* 0x6F0 */ s16 field_0x6F0;
|
||||
/* 0x6F2 */ u8 field_0x6F2[0x6F4 - 0x6F2];
|
||||
/* 0x6F4 */ u32 mMsgNo;
|
||||
|
||||
@@ -58,15 +58,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BOOL isFinish() { return cLib_checkBit(field_0x784, 0x1UL); }
|
||||
void onFinish() { cLib_onBit(field_0x784, 0x1UL); }
|
||||
BOOL isSetHomePos() { return cLib_checkBit(field_0x784, 0x2UL); }
|
||||
void onSetHomePos() { cLib_onBit(field_0x784, 0x2UL); }
|
||||
BOOL isWaterHit() { return cLib_checkBit(field_0x784, 0x4UL); }
|
||||
void onWaterHit() { cLib_onBit(field_0x784, 0x4UL); }
|
||||
BOOL isGravity() { return cLib_checkBit(field_0x784, 0x8UL); }
|
||||
void onGravity() { cLib_onBit(field_0x784, 0x8UL); }
|
||||
void offGravity() { cLib_offBit(field_0x784, 0x8UL); }
|
||||
BOOL isFinish() { return cLib_checkBit<u32>(field_0x784, 0x1UL); }
|
||||
void onFinish() { cLib_onBit<u32>(field_0x784, 0x1UL); }
|
||||
BOOL isSetHomePos() { return cLib_checkBit<u32>(field_0x784, 0x2UL); }
|
||||
void onSetHomePos() { cLib_onBit<u32>(field_0x784, 0x2UL); }
|
||||
BOOL isWaterHit() { return cLib_checkBit<u32>(field_0x784, 0x4UL); }
|
||||
void onWaterHit() { cLib_onBit<u32>(field_0x784, 0x4UL); }
|
||||
BOOL isGravity() { return cLib_checkBit<u32>(field_0x784, 0x8UL); }
|
||||
void onGravity() { cLib_onBit<u32>(field_0x784, 0x8UL); }
|
||||
void offGravity() { cLib_offBit<u32>(field_0x784, 0x8UL); }
|
||||
// Note: The 0x10 bit is used in the final release, but not in the demo debug maps, so its official name is unknown.
|
||||
|
||||
void offPlayerRoom(int idx) { m_playerRoom[idx] = false; }
|
||||
|
||||
@@ -37,13 +37,13 @@ public:
|
||||
BOOL checkCreateInShopPlayer();
|
||||
BOOL initTexPatternAnm(bool);
|
||||
void playTexPatternAnm();
|
||||
void setAnm(signed char);
|
||||
void setTexAnm(signed char);
|
||||
void setAnm(s8);
|
||||
void setTexAnm(s8);
|
||||
void setAnmFromMsgTag();
|
||||
bool chkAttention(cXyz, short);
|
||||
bool chkAttention(cXyz, s16);
|
||||
void eventOrder();
|
||||
void checkOrder();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
void setCollision();
|
||||
void talkInit();
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
BOOL CreateHeap();
|
||||
void CreateInit();
|
||||
void set_mtx();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
void setGoal(int);
|
||||
void setPlayerAngle(int);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace daObjMtest {
|
||||
// TODO: Look into these meshes more.
|
||||
s32 prm_get_arg1() const { return daObj::PrmAbstract(this, PRM_ARG1_W, PRM_ARG1_S); }
|
||||
|
||||
static char* M_arcname[];
|
||||
static const char* M_arcname[];
|
||||
static const dCcD_SrcCyl M_cyl_src;
|
||||
static cXyz M_scl_mult[];
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
typedef void (daOship_c::*ModeProcFunc)(void);
|
||||
ModeProcFunc mInitFunc;
|
||||
ModeProcFunc mUpdFunc;
|
||||
char* mModeName;
|
||||
const char* mModeName;
|
||||
};
|
||||
|
||||
u8 getSw() { return mSwitchA; }
|
||||
|
||||
@@ -13,12 +13,12 @@ public:
|
||||
/* 0x4E9 */ u8 mDamageFogTimer;
|
||||
/* 0x4EA */ u8 field_4EA[0x4EC - 0x4EA];
|
||||
|
||||
void returnLink() { cLib_onBit(m4E4, 0x01UL); }
|
||||
void offReturnLink() { cLib_offBit(m4E4, 0x01UL); }
|
||||
bool isReturnLink() { return cLib_checkBit(m4E4, 0x01UL); }
|
||||
void onEventAccept() { cLib_onBit(m4E4, 0x02UL); }
|
||||
void offEventAccept() { cLib_offBit(m4E4, 0x02UL); }
|
||||
bool isEventAccept() { return cLib_checkBit(m4E4, 0x02UL); }
|
||||
void returnLink() { cLib_onBit<u32>(m4E4, 0x01UL); }
|
||||
void offReturnLink() { cLib_offBit<u32>(m4E4, 0x01UL); }
|
||||
bool isReturnLink() { return cLib_checkBit<u32>(m4E4, 0x01UL); }
|
||||
void onEventAccept() { cLib_onBit<u32>(m4E4, 0x02UL); }
|
||||
void offEventAccept() { cLib_offBit<u32>(m4E4, 0x02UL); }
|
||||
bool isEventAccept() { return cLib_checkBit<u32>(m4E4, 0x02UL); }
|
||||
|
||||
u8 getDamageFogTimer() { return mDamageFogTimer; }
|
||||
void setDamageFogTimer(u8 timer) { mDamageFogTimer = timer; }
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
mSalvageId = -1;
|
||||
}
|
||||
|
||||
static char* m_arcname;
|
||||
static const char* m_arcname;
|
||||
static const f32 m_outersea_near;
|
||||
static const f32 m_inside_near;
|
||||
static const f32 m_cmap_near;
|
||||
|
||||
@@ -29,10 +29,10 @@ public:
|
||||
/* 0x38 */ static const Vec m_cull_min[2];
|
||||
/* 0x50 */ static const Vec m_cull_max[2];
|
||||
|
||||
static char* m_arcname[2];
|
||||
static char* m_open_ev_name[2];
|
||||
static char* m_close_ev_name[2];
|
||||
static char* m_staff_name[2];
|
||||
static const char* m_arcname[2];
|
||||
static const char* m_open_ev_name[2];
|
||||
static const char* m_close_ev_name[2];
|
||||
static const char* m_staff_name[2];
|
||||
|
||||
public:
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
|
||||
@@ -27,10 +27,10 @@ public:
|
||||
/* 0x1C */ static const Vec m_cull_min[1];
|
||||
/* 0x28 */ static const Vec m_cull_max[1];
|
||||
|
||||
static char* m_arcname[1];
|
||||
static char* m_open_ev_name[1];
|
||||
static char* m_close_ev_name[1];
|
||||
static char* m_staff_name[1];
|
||||
static const char* m_arcname[1];
|
||||
static const char* m_open_ev_name[1];
|
||||
static const char* m_close_ev_name[1];
|
||||
static const char* m_staff_name[1];
|
||||
|
||||
public:
|
||||
/* 0x2C8 */ request_of_phase_process_class mPhs;
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
void setPlayerAngle();
|
||||
void darkProc();
|
||||
void startProc();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
void talkInit();
|
||||
u16 talk();
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
BOOL otherCheck();
|
||||
BOOL arrivalTerms();
|
||||
void demoInitProc();
|
||||
int next_msgStatus(unsigned long*);
|
||||
int next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
void talkInit();
|
||||
u16 talk();
|
||||
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
/* 0x2B0 */ s16 mCutEndTimer;
|
||||
/* 0x2B2 */ u8 m2B2[0x2B4 - 0x2B2];
|
||||
/* 0x2B4 */ fpc_ProcID m2B4;
|
||||
/* 0x2B8 */ char* m2B8;
|
||||
/* 0x2B8 */ const char* m2B8;
|
||||
}; // Size: 0x2BC
|
||||
|
||||
#endif /* D_A_TAG_MK_H */
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
f32 mDeltaYMax;
|
||||
f32 mDeltaYMin;
|
||||
f32 mWeightDivisor;
|
||||
int mFrontAngleCheckBits;
|
||||
u32 mFrontAngleCheckBits;
|
||||
} dist_table[];
|
||||
|
||||
// TODO:
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ public:
|
||||
// void ChkDeleteActorRegist(fopAc_ac_c*) {}
|
||||
// void DebugDrawPoly(dBgW&) {}
|
||||
// void Draw() {}
|
||||
// void DrawPoly(cBgS_PolyInfo&, _GXColor&) {}
|
||||
// void DrawPoly(cBgS_PolyInfo&, GXColor&) {}
|
||||
dBgW* GetBgWPointer(cBgS_PolyInfo& i_poly) { return (dBgW*)cBgS::GetBgWPointer(i_poly); }
|
||||
// void GetPolyCamId(cBgS_PolyInfo&) {}
|
||||
// void GroundCross(cBgS_GndChk*) {}
|
||||
|
||||
+1
-1
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "SSystem/SComponent/c_bg_w.h"
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
|
||||
class dBgS_Acch;
|
||||
class cM3dGPla;
|
||||
@@ -14,7 +15,6 @@ class dBgS_CrrPos;
|
||||
class cBgS_PolyInfo;
|
||||
class fopAc_ac_c;
|
||||
class dBgS_CaptPoly;
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
class dBgW : public cBgW {
|
||||
public:
|
||||
|
||||
@@ -3623,7 +3623,7 @@ inline int dComIfGp_evmng_getMyActIdx(int staffIdx, char** pActions, int actionC
|
||||
return dComIfGp_getPEvtManager()->getMyActIdx(staffIdx, pActions, actionCount, force, nameType);
|
||||
}
|
||||
|
||||
inline char* dComIfGp_evmng_getMyActName(int staffIdx) {
|
||||
inline const char* dComIfGp_evmng_getMyActName(int staffIdx) {
|
||||
return dComIfGp_getPEvtManager()->getMyActName(staffIdx);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -345,7 +345,7 @@ private:
|
||||
/* 0x18 */ dMesg_tControl* mMesgControl;
|
||||
/* 0x1C */ JStudio_JMessage::TCreateObject* mMessage;
|
||||
/* 0x20 */ dDemo_object_c mDemoObj;
|
||||
/* 0xD0 */ char* mCurFile;
|
||||
/* 0xD0 */ const char* mCurFile;
|
||||
/* 0xD4 */ int mFrame;
|
||||
/* 0xD8 */ int mFrameNoMsg;
|
||||
/* 0xDC */ int mMode;
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/* 0x30 */ s32 mNextIdx;
|
||||
/* 0x34 */ u32 field_0x34[3];
|
||||
|
||||
char* getName() { return mName; }
|
||||
const char* getName() { return mName; }
|
||||
s32 getNext() { return mNextIdx; }
|
||||
s32 getNumber() { return mSubstanceSize; }
|
||||
s32 getIndex() { return mSubstanceIdx; }
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
BOOL finish_check();
|
||||
void specialStaffProc(dEvDtStaff_c*);
|
||||
|
||||
char * getName() { return mName; }
|
||||
char* getName() { return mName; }
|
||||
int getStaff(int idx) { return mStaffIdx[idx]; }
|
||||
s32 getNStaff() { return mNStaff; }
|
||||
u32 getPriority() { return mPriority; }
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
dEvDtEvent_c* getEventP(int i) { return &mEventP[i]; }
|
||||
dEvDtData_c* getDataP(int i) { return &mDataP[i]; }
|
||||
dEvDtCut_c* getCutP(int i) { return &mCutP[i]; }
|
||||
char* getEventName(int i) { return mEventP[i].getName(); }
|
||||
const char* getEventName(int i) { return mEventP[i].getName(); }
|
||||
int getStaffCurrentCut(int i) { return mStaffP[i].getCurrentCut(); }
|
||||
dEvDtCut_c* getCutStaffCurrentCutP(int i) { return getCutP(getStaffCurrentCut(i)); }
|
||||
int getStaffStartCut(int i) { return mStaffP[i].getStartCut(); }
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
int getMyStaffId(const char*, fopAc_ac_c*, int);
|
||||
BOOL getIsAddvance(int);
|
||||
int getMyActIdx(int staffIdx, const char* const* action, int actionNum, BOOL force, int nameType);
|
||||
char* getMyActName(int);
|
||||
const char* getMyActName(int);
|
||||
char* getMyNowCutName(int);
|
||||
dEvDtData_c* getMyDataP(int, const char*, int);
|
||||
void* getMySubstanceP(int, const char*, int);
|
||||
|
||||
@@ -265,8 +265,8 @@ enum ItemTable {
|
||||
#define MSG_NO_FOR_ITEM(item_no) item_no + 101
|
||||
|
||||
struct dItem_data_item_resource {
|
||||
/* 0x00 */ char* mArcname;
|
||||
/* 0x04 */ char* mTexture; // Filename in /files/res/Msg/itemicon.arc of its inventory icon.
|
||||
/* 0x00 */ const char* mArcname;
|
||||
/* 0x04 */ const char* mTexture; // Filename in /files/res/Msg/itemicon.arc of its inventory icon.
|
||||
/* 0x08 */ s16 mBmdIdx;
|
||||
/* 0x0A */ s16 mSrtIdx; // BTK
|
||||
/* 0x0C */ s16 mSrtIdx2; // BTK
|
||||
@@ -283,7 +283,7 @@ struct dItem_data_item_resource {
|
||||
STATIC_ASSERT(sizeof(dItem_data_item_resource) == 0x24);
|
||||
|
||||
struct dItem_data_field_item_res {
|
||||
/* 0x00 */ char* mArc;
|
||||
/* 0x00 */ const char* mArc;
|
||||
/* 0x04 */ s16 mBmdIdx;
|
||||
/* 0x06 */ s16 mSrtIdx; // BTK
|
||||
/* 0x08 */ s16 mSrtIdx2; // BTK
|
||||
@@ -315,15 +315,15 @@ STATIC_ASSERT(sizeof(dItem_data_effect_info) == 0x4);
|
||||
|
||||
class dItem_data {
|
||||
public:
|
||||
static char* item_arcname_tbl[0x70];
|
||||
static char* item_texture_tbl[0x74];
|
||||
static const char* item_arcname_tbl[0x70];
|
||||
static const char* item_texture_tbl[0x74];
|
||||
static dItem_data_item_resource item_resource[0x100];
|
||||
static dItem_data_field_item_res field_item_res[0x100];
|
||||
static dItem_data_item_info item_info[0x100];
|
||||
static dItem_data_effect_info effect_info[0x81];
|
||||
|
||||
static char* getArcname(u8 no) { return item_resource[no].mArcname; }
|
||||
static char* getTexture(u8 no) { return item_resource[no].mTexture; }
|
||||
static const char* getArcname(u8 no) { return item_resource[no].mArcname; }
|
||||
static const char* getTexture(u8 no) { return item_resource[no].mTexture; }
|
||||
static s16 getBmdIdx(u8 no) { return item_resource[no].mBmdIdx; }
|
||||
static s16 getSrtIdx(u8 no) { return item_resource[no].mSrtIdx; }
|
||||
static s16 getSrtIdx2(u8 no) { return item_resource[no].mSrtIdx2; }
|
||||
@@ -335,7 +335,7 @@ public:
|
||||
static s16 getItemMesgNum(u8 no) { return item_resource[no].mItemMesgNum; }
|
||||
static u32 getHeapSize(u8 no) { return item_resource[no].mHeapSize; }
|
||||
|
||||
static char* getFieldArc(u8 no) { return field_item_res[no].mArc; }
|
||||
static const char* getFieldArc(u8 no) { return field_item_res[no].mArc; }
|
||||
static s16 getFieldBmdIdx(u8 no) { return field_item_res[no].mBmdIdx; }
|
||||
static s16 getFieldSrtIdx(u8 no) { return field_item_res[no].mSrtIdx; }
|
||||
static s16 getFieldSrtIdx2(u8 no) { return field_item_res[no].mSrtIdx2; }
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
class dNpc_EventCut_c {
|
||||
private:
|
||||
/* 0x00 */ char* mpEvtStaffName;
|
||||
/* 0x00 */ const char* mpEvtStaffName;
|
||||
/* 0x04 */ int mEvtStaffId;
|
||||
/* 0x08 */ fopAc_ac_c* mpActor;
|
||||
/* 0x0C */ fopNpc_npc_c* mpTalkActor;
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
void cutContinueTalkStart();
|
||||
void cutTalkMsgProc();
|
||||
|
||||
char* getActorName() { return mpEvtStaffName; }
|
||||
const char* getActorName() { return mpEvtStaffName; }
|
||||
int getNowCut() { return mCurActIdx; }
|
||||
bool getAttnFlag() { return mbAttention; }
|
||||
void setAttnFlag(bool flag) { mbAttention = flag; }
|
||||
|
||||
@@ -9,7 +9,7 @@ extern "C" {
|
||||
|
||||
#define ARQ_CHUNK_SIZE_DEFAULT 4096
|
||||
|
||||
typedef void (*ARQCallback)(u32 request_address);
|
||||
typedef void (*ARQCallback)(uintptr_t request_address);
|
||||
|
||||
typedef enum _ARamType {
|
||||
ARAM_DIR_MRAM_TO_ARAM,
|
||||
|
||||
@@ -286,15 +286,15 @@ struct mDoExt_MtxCalcAnmBlendTblOld : public mDoExt_MtxCalcAnmBlendTbl {
|
||||
mOldFrame = oldFrame;
|
||||
mBeforeCallback = NULL;
|
||||
mAfterCallback = NULL;
|
||||
mUserArea = 0;
|
||||
mUserArea = NULL;
|
||||
}
|
||||
virtual void calc(u16);
|
||||
|
||||
void setUserArea(u32 area) { mUserArea = area; }
|
||||
void setUserArea(uintptr_t area) { mUserArea = area; }
|
||||
void setBeforeCalc(CalcCallback callback) { mBeforeCallback = callback; }
|
||||
void setAfterCalc(CalcCallback callback) { mAfterCallback = callback; }
|
||||
|
||||
/* 0x58 */ u32 mUserArea;
|
||||
/* 0x58 */ uintptr_t mUserArea;
|
||||
/* 0x5C */ mDoExt_MtxCalcOldFrame* mOldFrame;
|
||||
/* 0x60 */ CalcCallback mBeforeCallback;
|
||||
/* 0x64 */ CalcCallback mAfterCallback;
|
||||
@@ -596,11 +596,11 @@ public:
|
||||
// some calls to these functions define i_color inline which is illegal in C++ for a non-const
|
||||
// reference parameter - we add these overloads to enable standard compiler compatibility
|
||||
#if !__MWERKS__
|
||||
void update(u16 i_segs, f32 i_size, const _GXColor& i_color, u16 i_space, dKy_tevstr_c* i_tevStr) {
|
||||
update(i_segs, i_size, const_cast<_GXColor&>(i_color), i_space, i_tevStr);
|
||||
void update(u16 i_segs, f32 i_size, const GXColor& i_color, u16 i_space, dKy_tevstr_c* i_tevStr) {
|
||||
update(i_segs, i_size, const_cast<GXColor&>(i_color), i_space, i_tevStr);
|
||||
}
|
||||
void update(u16 i_segs, const _GXColor& i_color, dKy_tevstr_c* i_tevStr) {
|
||||
update(i_segs, const_cast<_GXColor&>(i_color), i_tevStr);
|
||||
void update(u16 i_segs, const GXColor& i_color, dKy_tevstr_c* i_tevStr) {
|
||||
update(i_segs, const_cast<GXColor&>(i_color), i_tevStr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ class JORServer;
|
||||
class JORMContext {
|
||||
public:
|
||||
void genCheckBox(const char* param_1, u8* param_2, u8 param_3, u32 param_4, JOREventListener* param_5, u16 param_6, u16 param_7, u16 param_8, u16 param_9) {
|
||||
genCheckBoxSub(0x108, param_1, (u32)param_2, param_4, *param_2, param_3, param_5, param_6, param_7, param_8, param_9);
|
||||
genCheckBoxSub(0x108, param_1, (uintptr_t)param_2, param_4, *param_2, param_3, param_5, param_6, param_7, param_8, param_9);
|
||||
}
|
||||
void genCheckBoxSub(u32, const char*, u32, u32, u16, u16, JOREventListener*, u16, u16, u16, u16);
|
||||
void genCheckBoxSub(u32, const char*, uintptr_t, u32, u16, u16, JOREventListener*, u16, u16, u16, u16);
|
||||
};
|
||||
|
||||
class JOREventListener {
|
||||
|
||||
@@ -17,7 +17,7 @@ static inline void dummy_bss_3569() {
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
|
||||
static inline void dummy_bss_3569() {
|
||||
Vec vec = (Vec){0.0f, 0.0f, 0.0f}; // @3569 / @3599
|
||||
Vec vec = {0.0f, 0.0f, 0.0f}; // @3569 / @3599
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ f32 J2DPrint::parse(const u8* param_1, int param_2, int param_3, u16* param_4, J
|
||||
local_f0 = 1;
|
||||
}
|
||||
|
||||
if (r27 == 0 || ((u32)param_1 - (u32)local_a4) > param_2) {
|
||||
if (r27 == 0 || ((uintptr_t)param_1 - (uintptr_t)local_a4) > param_2) {
|
||||
if (param_7 == 0 && param_4 != NULL) {
|
||||
param_4[r29] = 0.5f + f31;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ f32 J2DPrint::parse(const u8* param_1, int param_2, int param_3, u16* param_4, J
|
||||
f31 = 0.0f;
|
||||
}
|
||||
}
|
||||
} else if (local_f0 && ((u32)param_1 - (u32)local_a4 > (u32)param_2)) {
|
||||
} else if (local_f0 && ((uintptr_t)param_1 - (uintptr_t)local_a4 > (u32)param_2)) {
|
||||
if ((!param_7) && (param_4 != NULL)) {
|
||||
param_4[r29] = 0.5f + f31;
|
||||
}
|
||||
@@ -500,11 +500,11 @@ s32 J2DPrint::getNumberS32(const u8** param_1, s32 param_2, s32 param_3, int bas
|
||||
uVar2 = 0;
|
||||
char* local_28;
|
||||
if (base == 10) {
|
||||
uVar2 = strtol((char*)*param_1, &local_28, base);
|
||||
uVar2 = strtol((const char*)*param_1, &local_28, base);
|
||||
} else if (base == 16) {
|
||||
uVar2 = strtoul((char*)*param_1, &local_28, base);
|
||||
if ((u32)local_28 - (u32)*param_1 != 8) {
|
||||
if ((u32)local_28 - (u32)*param_1 == 6) {
|
||||
uVar2 = strtoul((const char*)*param_1, &local_28, base);
|
||||
if ((uintptr_t)local_28 - (uintptr_t)*param_1 != 8) {
|
||||
if ((uintptr_t)local_28 - (uintptr_t)*param_1 == 6) {
|
||||
uVar2 = (uVar2 << 8) | 0xff;
|
||||
} else {
|
||||
*param_1 = puVar1;
|
||||
@@ -537,11 +537,11 @@ f32 J2DPrint::getNumberF32(const u8** param_1, f32 param_2, f32 param_3, int bas
|
||||
uVar2 = 0;
|
||||
char* local_28;
|
||||
if (base == 10) {
|
||||
uVar2 = strtol((char*)*param_1, &local_28, base);
|
||||
uVar2 = strtol((const char*)*param_1, &local_28, base);
|
||||
} else if (base == 16) {
|
||||
uVar2 = strtoul((char*)*param_1, &local_28, base);
|
||||
if ((u32)local_28 - (u32)*param_1 != 8) {
|
||||
if ((u32)local_28 - (u32)*param_1 == 6) {
|
||||
uVar2 = strtoul((const char*)*param_1, &local_28, base);
|
||||
if ((uintptr_t)local_28 - (uintptr_t)*param_1 != 8) {
|
||||
if ((uintptr_t)local_28 - (uintptr_t)*param_1 == 6) {
|
||||
uVar2 = (uVar2 << 8) | 0xff;
|
||||
} else {
|
||||
*param_1 = puVar1;
|
||||
|
||||
@@ -245,7 +245,7 @@ void J3DJoint::entryIn() {
|
||||
mesh->calc(anmMtx);
|
||||
}
|
||||
mesh->setCurrentMtx();
|
||||
matPacket->setMaterialAnmID((u32)mesh->getMaterialAnm());
|
||||
matPacket->setMaterialAnmID((uintptr_t)mesh->getMaterialAnm());
|
||||
matPacket->setShapePacket(shapePacket);
|
||||
J3DDrawBuffer* drawBuffer = j3dSys.getDrawBuffer(mesh->isDrawModeOpaTexEdge());
|
||||
if ((u8)matPacket->entry(drawBuffer)) {
|
||||
|
||||
@@ -32,7 +32,7 @@ void J3DModel::initialize() {
|
||||
mFlags = 0;
|
||||
mDiffFlag = 0;
|
||||
mCalcCallBack = NULL;
|
||||
mUserArea = 0;
|
||||
mUserArea = NULL;
|
||||
|
||||
mBaseScale.x = 1.0f;
|
||||
mBaseScale.y = 1.0f;
|
||||
|
||||
@@ -71,7 +71,7 @@ int J3DDrawBuffer::entryMatSort(J3DMatPacket* pMatPacket) {
|
||||
if (texNo == 0xFFFF) {
|
||||
hash = 0;
|
||||
} else {
|
||||
hash = ((u32)texture->getResTIMG(texNo) + texture->getResTIMG(texNo)->imageOffset) >> 5;
|
||||
hash = ((uintptr_t)texture->getResTIMG(texNo) + texture->getResTIMG(texNo)->imageOffset) >> 5;
|
||||
}
|
||||
u32 slot = hash & (mEntryTableSize - 1);
|
||||
|
||||
@@ -95,7 +95,7 @@ int J3DDrawBuffer::entryMatSort(J3DMatPacket* pMatPacket) {
|
||||
/* 802ECA38-802ECAF0 .text entryMatAnmSort__13J3DDrawBufferFP12J3DMatPacket */
|
||||
int J3DDrawBuffer::entryMatAnmSort(J3DMatPacket* pMatPacket) {
|
||||
J3DMaterialAnm* pMaterialAnm = pMatPacket->mpMaterialAnm;
|
||||
u32 slot = (u32)pMaterialAnm & (mEntryTableSize - 1);
|
||||
u32 slot = (uintptr_t)pMaterialAnm & (mEntryTableSize - 1);
|
||||
|
||||
if (pMaterialAnm == NULL) {
|
||||
return entryMatSort(pMatPacket);
|
||||
|
||||
@@ -56,15 +56,15 @@ u32 J3DShape::countBumpMtxNum() const {
|
||||
|
||||
/* 802DD2F0-802DD308 .text J3DLoadCPCmd__FUcUl */
|
||||
void J3DLoadCPCmd(u8 cmd, u32 param) {
|
||||
GXFIFO.u8 = GX_CMD_LOAD_CP_REG;
|
||||
GXFIFO.u8 = cmd;
|
||||
GXFIFO.u32 = param;
|
||||
GXCmd1u8(GX_CMD_LOAD_CP_REG);
|
||||
GXCmd1u8(cmd);
|
||||
GXCmd1u32(param);
|
||||
}
|
||||
|
||||
/* 802DD308-802DD344 .text J3DLoadArrayBasePtr__F7_GXAttrPv */
|
||||
static void J3DLoadArrayBasePtr(GXAttr attr, void* data) {
|
||||
u32 idx = (attr == GX_VA_NBT) ? 1 : (attr - GX_VA_POS);
|
||||
J3DLoadCPCmd(0xA0 + idx, ((u32)data & 0x7FFFFFFF));
|
||||
J3DLoadCPCmd(0xA0 + idx, ((uintptr_t)data & 0x7FFFFFFF));
|
||||
}
|
||||
|
||||
/* 802DD344-802DD3B4 .text loadVtxArray__8J3DShapeCFv */
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
/* 802FE1A4-802FE1FC .text __ct__15J3DJointFactoryFRC13J3DJointBlock */
|
||||
J3DJointFactory::J3DJointFactory(const J3DJointBlock& jointBlock) {
|
||||
mJointInitData = JSUConvertOffsetToPtr<J3DJointInitData>(&jointBlock, (u32)jointBlock.mpJointInitData);
|
||||
mIndexTable = JSUConvertOffsetToPtr<u16>(&jointBlock, (u32)jointBlock.mpIndexTable);
|
||||
mJointInitData = JSUConvertOffsetToPtr<J3DJointInitData>(&jointBlock, (uintptr_t)jointBlock.mpJointInitData);
|
||||
mIndexTable = JSUConvertOffsetToPtr<u16>(&jointBlock, (uintptr_t)jointBlock.mpIndexTable);
|
||||
}
|
||||
|
||||
/* 802FE1FC-802FE390 .text create__15J3DJointFactoryFi */
|
||||
|
||||
@@ -16,7 +16,7 @@ J3DMaterialFactory::J3DMaterialFactory(const J3DMaterialBlock& block) {
|
||||
mpMaterialInitData = JSUConvertOffsetToPtr<J3DMaterialInitData>(&block, block.mpMaterialInitData);
|
||||
mpMaterialID = JSUConvertOffsetToPtr<u16>(&block, block.mpMaterialID);
|
||||
|
||||
if (block.mpIndInitData != NULL && ((u32)block.mpIndInitData - (u32)block.mpNameTable) > 4)
|
||||
if (block.mpIndInitData != NULL && ((uintptr_t)block.mpIndInitData - (uintptr_t)block.mpNameTable) > 4)
|
||||
mpIndInitData = JSUConvertOffsetToPtr<J3DIndInitData>(&block, block.mpIndInitData);
|
||||
else
|
||||
mpIndInitData = NULL;
|
||||
@@ -341,7 +341,7 @@ J3DMaterial* J3DMaterialFactory::createLockedMaterial(J3DMaterial* mat, int idx,
|
||||
mat->mPEBlock->setFogOffset(mpPatchingInfo[idx].mFogOffset);
|
||||
if (mat->mSharedDLObj == NULL) {
|
||||
mat->mSharedDLObj = new J3DDisplayListObj();
|
||||
mat->mSharedDLObj->setSingleDisplayList((void*)(mpDisplayListInit[idx].mOffset + (u32)&mpDisplayListInit[idx]), mpDisplayListInit[idx].mSize);
|
||||
mat->mSharedDLObj->setSingleDisplayList((void*)(mpDisplayListInit[idx].mOffset + (uintptr_t)&mpDisplayListInit[idx]), mpDisplayListInit[idx].mSize);
|
||||
}
|
||||
return mat;
|
||||
}
|
||||
|
||||
@@ -215,9 +215,9 @@ void J3DModelLoader::setupBBoardInfo() {
|
||||
J3DMaterial* mesh = mpModelData->getJointNodePointer(i)->getMesh();
|
||||
if (mesh != NULL) {
|
||||
u16 shape_index = mesh->getShape()->getIndex();
|
||||
u16* index_table = JSUConvertOffsetToPtr<u16>(mpShapeBlock, (u32)mpShapeBlock->mpIndexTable);
|
||||
u16* index_table = JSUConvertOffsetToPtr<u16>(mpShapeBlock, (uintptr_t)mpShapeBlock->mpIndexTable);
|
||||
J3DShapeInitData* shape_init_data =
|
||||
JSUConvertOffsetToPtr<J3DShapeInitData>(mpShapeBlock, (u32)mpShapeBlock->mpShapeInitData);
|
||||
JSUConvertOffsetToPtr<J3DShapeInitData>(mpShapeBlock, (uintptr_t)mpShapeBlock->mpShapeInitData);
|
||||
J3DJoint* joint;
|
||||
switch (shape_init_data[index_table[shape_index]].mShapeMtxType) {
|
||||
case 0:
|
||||
@@ -310,9 +310,9 @@ void J3DModelLoader::readVertex(const J3DVertexBlock* i_block) {
|
||||
if (vertex_data.mVtxNrmArray == NULL) {
|
||||
vertex_data.mNrmNum = 0;
|
||||
} else if (nrm_end != NULL) {
|
||||
vertex_data.mNrmNum = ((u32)nrm_end - (u32)vertex_data.mVtxNrmArray) / nrm_size + 1;
|
||||
vertex_data.mNrmNum = ((uintptr_t)nrm_end - (uintptr_t)vertex_data.mVtxNrmArray) / nrm_size + 1;
|
||||
} else {
|
||||
vertex_data.mNrmNum = (i_block->mSize - (u32)i_block->mpVtxNrmArray) / nrm_size + 1;
|
||||
vertex_data.mNrmNum = (i_block->mSize - (uintptr_t)i_block->mpVtxNrmArray) / nrm_size + 1;
|
||||
}
|
||||
|
||||
void* color0_end = NULL;
|
||||
@@ -325,15 +325,15 @@ void J3DModelLoader::readVertex(const J3DVertexBlock* i_block) {
|
||||
if (vertex_data.mVtxColorArray[0] == NULL) {
|
||||
vertex_data.mColNum = 0;
|
||||
} else if (color0_end != NULL) {
|
||||
vertex_data.mColNum = ((u32)color0_end - (u32)vertex_data.mVtxColorArray[0]) / 4 + 1;
|
||||
vertex_data.mColNum = ((uintptr_t)color0_end - (uintptr_t)vertex_data.mVtxColorArray[0]) / 4 + 1;
|
||||
} else {
|
||||
vertex_data.mColNum = (i_block->mSize - (u32)i_block->mpVtxColorArray[0]) / 4 + 1;
|
||||
vertex_data.mColNum = (i_block->mSize - (uintptr_t)i_block->mpVtxColorArray[0]) / 4 + 1;
|
||||
}
|
||||
|
||||
if (vertex_data.mVtxTexCoordArray[0] == NULL) {
|
||||
vertex_data.mTexCoordNum = 0;
|
||||
} else {
|
||||
vertex_data.mTexCoordNum = (i_block->mSize - (u32)i_block->mpVtxTexCoordArray[0]) / 8 + 1;
|
||||
vertex_data.mTexCoordNum = (i_block->mSize - (uintptr_t)i_block->mpVtxTexCoordArray[0]) / 8 + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ void J3DModelLoader_v26::readMaterial(const J3DMaterialBlock* i_block, u32 i_fla
|
||||
for (u16 i = 0; i < mpMaterialTable->mUniqueMatNum; i++) {
|
||||
factory.create(&mpMaterialTable->mMaterialBase[i],
|
||||
J3DMaterialFactory::MATERIAL_TYPE_NORMAL, i, i_flags);
|
||||
mpMaterialTable->mMaterialBase[i].mDiffFlag = (u32)&mpMaterialTable->mMaterialBase[i] >> 4;
|
||||
mpMaterialTable->mMaterialBase[i].mDiffFlag = (uintptr_t)&mpMaterialTable->mMaterialBase[i] >> 4;
|
||||
}
|
||||
}
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
@@ -413,14 +413,14 @@ void J3DModelLoader_v26::readMaterial(const J3DMaterialBlock* i_block, u32 i_fla
|
||||
if (i_flags & 0x200000) {
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
(u32)&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)] >> 4;
|
||||
(uintptr_t)&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)] >> 4;
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mpOrigMaterial =
|
||||
&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)];
|
||||
}
|
||||
} else {
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
((u32)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
((uintptr_t)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -445,7 +445,7 @@ void J3DModelLoader_v21::readMaterial_v21(const J3DMaterialBlock_v21* i_block, u
|
||||
if (i_flags & 0x200000) {
|
||||
for (u16 i = 0; i < mpMaterialTable->mUniqueMatNum; i++) {
|
||||
factory.create(&mpMaterialTable->mMaterialBase[i], i, i_flags);
|
||||
mpMaterialTable->mMaterialBase[i].mDiffFlag = (u32)&mpMaterialTable->mMaterialBase[i] >> 4;
|
||||
mpMaterialTable->mMaterialBase[i].mDiffFlag = (uintptr_t)&mpMaterialTable->mMaterialBase[i] >> 4;
|
||||
}
|
||||
}
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
@@ -454,7 +454,7 @@ void J3DModelLoader_v21::readMaterial_v21(const J3DMaterialBlock_v21* i_block, u
|
||||
if (i_flags & 0x200000) {
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
(u32)&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)] >> 4;
|
||||
(uintptr_t)&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)] >> 4;
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mpOrigMaterial =
|
||||
&mpMaterialTable->mMaterialBase[factory.getMaterialID(i)];
|
||||
}
|
||||
@@ -517,7 +517,7 @@ void J3DModelLoader_v26::readMaterialTable(const J3DMaterialBlock* i_block, u32
|
||||
}
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
(u32)mpMaterialTable->mMaterialNodePointer + factory.getMaterialID(i);
|
||||
(uintptr_t)mpMaterialTable->mMaterialNodePointer + factory.getMaterialID(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ void J3DModelLoader_v21::readMaterialTable_v21(const J3DMaterialBlock_v21* i_blo
|
||||
}
|
||||
for (u16 i = 0; i < mpMaterialTable->mMaterialNum; i++) {
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
((u32)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
((uintptr_t)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ void J3DModelLoader::readPatchedMaterial(const J3DMaterialBlock* i_block, u32 i_
|
||||
mpMaterialTable->mMaterialNodePointer[i] =
|
||||
factory.create(NULL, J3DMaterialFactory::MATERIAL_TYPE_PATCHED, i, i_flags);
|
||||
mpMaterialTable->mMaterialNodePointer[i]->mDiffFlag =
|
||||
((u32)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
((uintptr_t)mpMaterialTable->mMaterialNodePointer >> 4) + factory.getMaterialID(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
/* 802FE3A8-802FE458 .text __ct__15J3DShapeFactoryFRC13J3DShapeBlock */
|
||||
J3DShapeFactory::J3DShapeFactory(const J3DShapeBlock& block) {
|
||||
mpShapeInitData = JSUConvertOffsetToPtr<J3DShapeInitData>(&block, (u32)block.mpShapeInitData);
|
||||
mpIndexTable = JSUConvertOffsetToPtr<u16>(&block, (u32)block.mpIndexTable);
|
||||
mpVtxDescList = JSUConvertOffsetToPtr<GXVtxDescList>(&block, (u32)block.mpVtxDescList);
|
||||
mpMtxTable = JSUConvertOffsetToPtr<u16>(&block, (u32)block.mpMtxTable);
|
||||
mpDisplayListData = JSUConvertOffsetToPtr<u8>(&block, (u32)block.mpDisplayListData);
|
||||
mpMtxInitData = JSUConvertOffsetToPtr<J3DShapeMtxInitData>(&block, (u32)block.mpMtxInitData);
|
||||
mpDrawInitData = JSUConvertOffsetToPtr<J3DShapeDrawInitData>(&block, (u32)block.mpDrawInitData);
|
||||
mpShapeInitData = JSUConvertOffsetToPtr<J3DShapeInitData>(&block, (uintptr_t)block.mpShapeInitData);
|
||||
mpIndexTable = JSUConvertOffsetToPtr<u16>(&block, (uintptr_t)block.mpIndexTable);
|
||||
mpVtxDescList = JSUConvertOffsetToPtr<GXVtxDescList>(&block, (uintptr_t)block.mpVtxDescList);
|
||||
mpMtxTable = JSUConvertOffsetToPtr<u16>(&block, (uintptr_t)block.mpMtxTable);
|
||||
mpDisplayListData = JSUConvertOffsetToPtr<u8>(&block, (uintptr_t)block.mpDisplayListData);
|
||||
mpMtxInitData = JSUConvertOffsetToPtr<J3DShapeMtxInitData>(&block, (uintptr_t)block.mpMtxInitData);
|
||||
mpDrawInitData = JSUConvertOffsetToPtr<J3DShapeDrawInitData>(&block, (uintptr_t)block.mpDrawInitData);
|
||||
mpVcdVatCmdBuffer = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -301,32 +301,32 @@ f32 JAIGlobalParameter::getParamSeDolbyBehindDistanceMax() {
|
||||
}
|
||||
|
||||
/* 802923E8-802923F0 .text getParamInitDataFileName__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamInitDataFileName() {
|
||||
const char* JAIGlobalParameter::getParamInitDataFileName() {
|
||||
return initDataFileName;
|
||||
}
|
||||
|
||||
/* 802923F0-802923F8 .text getParamWavePath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamWavePath() {
|
||||
const char* JAIGlobalParameter::getParamWavePath() {
|
||||
return wavePath;
|
||||
}
|
||||
|
||||
/* 802923F8-80292400 .text getParamSequenceArchivesPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamSequenceArchivesPath() {
|
||||
const char* JAIGlobalParameter::getParamSequenceArchivesPath() {
|
||||
return sequenceArchivesPath;
|
||||
}
|
||||
|
||||
/* 80292400-80292408 .text getParamStreamPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamStreamPath() {
|
||||
const char* JAIGlobalParameter::getParamStreamPath() {
|
||||
return streamPath;
|
||||
}
|
||||
|
||||
/* 80292408-80292410 .text getParamAudioResPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamAudioResPath() {
|
||||
const char* JAIGlobalParameter::getParamAudioResPath() {
|
||||
return audioResPath;
|
||||
}
|
||||
|
||||
/* 80292410-80292418 .text getParamSequenceArchivesFileName__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamSequenceArchivesFileName() {
|
||||
const char* JAIGlobalParameter::getParamSequenceArchivesFileName() {
|
||||
return sequenceArchivesFileName;
|
||||
}
|
||||
|
||||
@@ -398,12 +398,12 @@ u32 JAIGlobalParameter::autoHeapMax = 2;
|
||||
u32 JAIGlobalParameter::stayHeapMax = 2;
|
||||
u32 JAIGlobalParameter::autoHeapRoomSize = 0xC000;
|
||||
u32 JAIGlobalParameter::stayHeapSize = 0x00010000;
|
||||
char* JAIGlobalParameter::initDataFileName = "JaiInit.aaf";
|
||||
char* JAIGlobalParameter::wavePath = "Banks/";
|
||||
char* JAIGlobalParameter::sequenceArchivesPath = "Seqs/";
|
||||
char* JAIGlobalParameter::streamPath = "Stream/";
|
||||
char* JAIGlobalParameter::audioResPath = "AudioRes/";
|
||||
char* JAIGlobalParameter::sequenceArchivesFileName = "JaiSeqs.arc";
|
||||
const char* JAIGlobalParameter::initDataFileName = "JaiInit.aaf";
|
||||
const char* JAIGlobalParameter::wavePath = "Banks/";
|
||||
const char* JAIGlobalParameter::sequenceArchivesPath = "Seqs/";
|
||||
const char* JAIGlobalParameter::streamPath = "Stream/";
|
||||
const char* JAIGlobalParameter::audioResPath = "AudioRes/";
|
||||
const char* JAIGlobalParameter::sequenceArchivesFileName = "JaiSeqs.arc";
|
||||
f32 JAIGlobalParameter::inputGainDown = 0.5f;
|
||||
f32 JAIGlobalParameter::outputGainUp = 1.2f;
|
||||
f32 JAIGlobalParameter::distanceMax = 5000.0f;
|
||||
|
||||
@@ -24,15 +24,15 @@ u32* JAInter::InitData::aafPointer;
|
||||
|
||||
/* 80292460-80292548 .text checkInitDataFile__Q27JAInter8InitDataFv */
|
||||
BOOL JAInter::InitData::checkInitDataFile() {
|
||||
if (!SystemInterface::checkFileExsistence(JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
if (!SystemInterface::checkFileExsistence((char*)JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
char* fileName = (char*)JASDram->alloc(strlen(JAIGlobalParameter::getParamAudioResPath()) + strlen(JAIGlobalParameter::getParamInitDataFileName()) + 1, 0);
|
||||
sprintf(fileName, "%s%s%c", JAIGlobalParameter::getParamAudioResPath(), JAIGlobalParameter::getParamInitDataFileName(), 0);
|
||||
JAIGlobalParameter::setParamInitDataFileName(fileName);
|
||||
if (!SystemInterface::checkFileExsistence(JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
if (!SystemInterface::checkFileExsistence((char*)JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
loadTmpDVDFile(JAIGlobalParameter::getParamInitDataFileName(), (u8**)&aafPointer);
|
||||
loadTmpDVDFile((char*)JAIGlobalParameter::getParamInitDataFileName(), (u8**)&aafPointer);
|
||||
if (aafPointer) {
|
||||
checkInitDataOnMemory();
|
||||
deleteTmpDVDFile((u8**)&aafPointer);
|
||||
|
||||
@@ -186,7 +186,7 @@ void JAInter::SequenceMgr::checkEntriedSeq() {
|
||||
}
|
||||
|
||||
} else {
|
||||
if ((u32)buffer == 0xFFFFFFFF) {
|
||||
if ((uintptr_t)buffer == 0xFFFFFFFF) {
|
||||
continue;
|
||||
}
|
||||
if (heapIdx != 255) {
|
||||
|
||||
@@ -369,7 +369,7 @@ void JAInter::StreamMgr::checkPlayingStream() {
|
||||
/* 8029C730-8029C858 .text Play_DirectPCM__Q27JAInter9StreamLibFPQ28JASystem11TDSPChannelPsUsUlsUs */
|
||||
void JAInter::StreamLib::Play_DirectPCM(JASystem::TDSPChannel* param_1, s16* param_2, u16 param_3, u32 param_4, s16 param_5, u16 param_6) {
|
||||
JASystem::DSPInterface::DSPBuffer* buffer = JASystem::DSPInterface::getDSPHandle(param_1->mNumber);
|
||||
buffer->field_0x118 = (u32)param_2;
|
||||
buffer->field_0x118 = (uintptr_t)param_2;
|
||||
buffer->field_0x102 = 0;
|
||||
buffer->field_0x100 = 33;
|
||||
if (JAInter::StreamLib::header.field_0x10 != 0) {
|
||||
@@ -377,7 +377,7 @@ void JAInter::StreamLib::Play_DirectPCM(JASystem::TDSPChannel* param_1, s16* par
|
||||
} else {
|
||||
buffer->field_0x74 = param_4;
|
||||
}
|
||||
buffer->field_0x110 = (u32)param_2;
|
||||
buffer->field_0x110 = (uintptr_t)param_2;
|
||||
buffer->field_0x114 = param_3 << 16;
|
||||
JASystem::DSPInterface::getDSPHandle(param_1->mNumber)->setMixerInitDelayMax(0);
|
||||
for (u8 i = 0; i < 6; i++) {
|
||||
|
||||
@@ -61,8 +61,8 @@ u32 JASystem::DSPInterface::DOLBY2_DELAY_BUF[600];
|
||||
|
||||
/* 8028A240-8028A28C .text setupBuffer__Q28JASystem12DSPInterfaceFv */
|
||||
void JASystem::DSPInterface::setupBuffer() {
|
||||
DsetupTable(64, (u32)CH_BUF, (u32)&DSPRES_FILTER, (u32)&DSPADPCM_FILTER, (u32)FX_BUF);
|
||||
DsetDolbyDelay((u32)&DOLBY2_DELAY_BUF, 10);
|
||||
DsetupTable(64, (uintptr_t)CH_BUF, (uintptr_t)DSPRES_FILTER, (uintptr_t)DSPADPCM_FILTER, (uintptr_t)FX_BUF);
|
||||
DsetDolbyDelay((uintptr_t)DOLBY2_DELAY_BUF, 10);
|
||||
}
|
||||
|
||||
/* 8028A28C-8028A368 .text initBuffer__Q28JASystem12DSPInterfaceFv */
|
||||
|
||||
@@ -102,12 +102,12 @@ void* JKRAram::run() {
|
||||
|
||||
/* 802B45D4-802B4664 .text checkOkAddress__7JKRAramFPUcUlP12JKRAramBlockUl */
|
||||
bool JKRAram::checkOkAddress(u8* addr, u32 size, JKRAramBlock* block, u32 param_4) {
|
||||
if (!IS_ALIGNED((u32)addr, 0x20) && !IS_ALIGNED(size, 0x20)) {
|
||||
if (!IS_ALIGNED((uintptr_t)addr, 0x20) && !IS_ALIGNED(size, 0x20)) {
|
||||
OSPanic(__FILE__, 226, ":::address not 32Byte aligned.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (block && !IS_ALIGNED((u32)block->getAddress() + param_4, 0x20)) {
|
||||
if (block && !IS_ALIGNED((uintptr_t)block->getAddress() + param_4, 0x20)) {
|
||||
OSPanic(__FILE__, 235, ":::address not 32Byte aligned.");
|
||||
return false;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ JKRAramBlock* JKRAram::mainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRE
|
||||
}
|
||||
else {
|
||||
JKRDecompress(buf, (u8 *)allocatedMem, fileSize, 0);
|
||||
JKRAramPcs(0, (u32)allocatedMem, bufSize, alignedSize, block);
|
||||
JKRAramPcs(0, (uintptr_t)allocatedMem, bufSize, alignedSize, block);
|
||||
JKRFreeToHeap(heap, allocatedMem);
|
||||
block = block == NULL ? (JKRAramBlock *)-1 : block;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ JKRAramBlock* JKRAram::mainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRE
|
||||
bufSize = allocatedBlock->getAddress();
|
||||
}
|
||||
|
||||
JKRAramPcs(0, (u32)buf, bufSize, alignedSize, block);
|
||||
JKRAramPcs(0, (uintptr_t)buf, bufSize, alignedSize, block);
|
||||
block = block == NULL ? (JKRAramBlock *)-1 : block;
|
||||
}
|
||||
return block;
|
||||
@@ -216,8 +216,8 @@ u8* JKRAram::aramToMainRam(u32 address, u8 *buf, u32 p3, JKRExpandSwitch expandS
|
||||
u32 expandSize;
|
||||
if (expandSwitch == EXPAND_SWITCH_UNKNOWN1) {
|
||||
u8 buffer[64];
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((u32)buffer, 32);
|
||||
JKRAramPcs(1, address, (u32)bufPtr, sizeof(buffer) / 2, NULL); // probably change sizeof(buffer) / 2 to 32
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((uintptr_t)buffer, 32);
|
||||
JKRAramPcs(1, address, (uintptr_t)bufPtr, sizeof(buffer) / 2, NULL); // probably change sizeof(buffer) / 2 to 32
|
||||
compression = JKRCheckCompressed(bufPtr);
|
||||
expandSize = JKRDecompExpandSize(bufPtr);
|
||||
}
|
||||
@@ -245,7 +245,7 @@ u8* JKRAram::aramToMainRam(u32 address, u8 *buf, u32 p3, JKRExpandSwitch expandS
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
JKRAramPcs(1, address, (u32)szpSpace, p3, NULL);
|
||||
JKRAramPcs(1, address, (uintptr_t)szpSpace, p3, NULL);
|
||||
if (p5 != 0 && p5 < expandSize)
|
||||
expandSize = p5;
|
||||
|
||||
@@ -279,7 +279,7 @@ u8* JKRAram::aramToMainRam(u32 address, u8 *buf, u32 p3, JKRExpandSwitch expandS
|
||||
}
|
||||
else {
|
||||
changeGroupIdIfNeed(buf, id);
|
||||
JKRAramPcs(1, address, (u32)buf, p3, NULL);
|
||||
JKRAramPcs(1, address, (uintptr_t)buf, p3, NULL);
|
||||
if (pSize != NULL) {
|
||||
*pSize = p3;
|
||||
}
|
||||
@@ -512,8 +512,8 @@ static u8* firstSrcData() {
|
||||
length = size;
|
||||
}
|
||||
|
||||
u32 src = (u32)(srcAddress + srcOffset);
|
||||
u32 dst = (u32)buffer;
|
||||
uintptr_t src = (uintptr_t)(srcAddress + srcOffset);
|
||||
uintptr_t dst = (uintptr_t)buffer;
|
||||
u32 alignedLength = ALIGN_NEXT(length, 0x20);
|
||||
JKRAramPcs(1, src, dst, alignedLength, NULL);
|
||||
|
||||
@@ -545,7 +545,7 @@ static u8* nextSrcData(u8* current) {
|
||||
}
|
||||
JUT_ASSERT(VERSION_SELECT(1321, 1376, 1361, 1361), transSize > 0);
|
||||
|
||||
JKRAramPcs(1, (u32)(srcAddress + srcOffset), ((u32)dest + left), ALIGN_NEXT(transSize, 0x20),
|
||||
JKRAramPcs(1, (uintptr_t)(srcAddress + srcOffset), ((uintptr_t)dest + left), ALIGN_NEXT(transSize, 0x20),
|
||||
NULL);
|
||||
srcOffset += transSize;
|
||||
transLeft -= transSize;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "dolphin/os/OS.h"
|
||||
|
||||
/* 802B5C14-802B5C94 .text prepareCommand__12JKRAramPieceFiUlUlUlP12JKRAramBlockPFUl_v */
|
||||
JKRAMCommand* JKRAramPiece::prepareCommand(int direction, u32 src, u32 dst, u32 length, JKRAramBlock* block, JKRAMCommand::AsyncCallback callback) {
|
||||
JKRAMCommand* JKRAramPiece::prepareCommand(int direction, uintptr_t src, uintptr_t dst, u32 length, JKRAramBlock* block, JKRAMCommand::AsyncCallback callback) {
|
||||
JKRAMCommand* command = new (JKRHeap::getSystemHeap(), -4) JKRAMCommand();
|
||||
command->mTransferDirection = direction;
|
||||
command->mSrc = src;
|
||||
@@ -32,7 +32,7 @@ JSUList<JKRAMCommand> JKRAramPiece::sAramPieceCommandList;
|
||||
OSMutex JKRAramPiece::mMutex;
|
||||
|
||||
/* 802B5CB4-802B5E0C .text orderAsync__12JKRAramPieceFiUlUlUlP12JKRAramBlockPFUl_v */
|
||||
JKRAMCommand* JKRAramPiece::orderAsync(int direction, u32 source, u32 destination, u32 length, JKRAramBlock* block, JKRAMCommand::AsyncCallback callback) {
|
||||
JKRAMCommand* JKRAramPiece::orderAsync(int direction, uintptr_t source, uintptr_t destination, u32 length, JKRAramBlock* block, JKRAMCommand::AsyncCallback callback) {
|
||||
lock();
|
||||
if ((source & 0x1f) != 0 || (destination & 0x1f) != 0) {
|
||||
OSReport("direction = %x\n", direction);
|
||||
@@ -81,7 +81,7 @@ BOOL JKRAramPiece::sync(JKRAMCommand* command, int is_non_blocking) {
|
||||
}
|
||||
|
||||
/* 802B5ED4-802B5F68 .text orderSync__12JKRAramPieceFiUlUlUlP12JKRAramBlock */
|
||||
BOOL JKRAramPiece::orderSync(int direction, u32 source, u32 destination, u32 length, JKRAramBlock* block) {
|
||||
BOOL JKRAramPiece::orderSync(int direction, uintptr_t source, uintptr_t destination, u32 length, JKRAramBlock* block) {
|
||||
lock();
|
||||
|
||||
JKRAMCommand* command =
|
||||
@@ -106,7 +106,7 @@ void JKRAramPiece::startDMA(JKRAMCommand* command) {
|
||||
}
|
||||
|
||||
/* 802B5FE0-802B6088 .text doneDMA__12JKRAramPieceFUl */
|
||||
void JKRAramPiece::doneDMA(u32 requestAddress) {
|
||||
void JKRAramPiece::doneDMA(uintptr_t requestAddress) {
|
||||
JKRAMCommand* command = (JKRAMCommand*)requestAddress;
|
||||
|
||||
if (command->mTransferDirection == 1) {
|
||||
|
||||
@@ -66,7 +66,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
|
||||
u32 dstSize = command->mSize;
|
||||
u32 offset = command->mOffset;
|
||||
u32 writtenLength = 0;
|
||||
u32 destination = command->mAddress;
|
||||
uintptr_t destination = command->mAddress;
|
||||
u8* buffer = command->mTransferBuffer;
|
||||
u32 bufferSize = command->mTransferBufferSize;
|
||||
JKRHeap* heap = command->mHeap;
|
||||
@@ -113,7 +113,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
|
||||
break;
|
||||
}
|
||||
|
||||
JKRAramPcs(0, (u32)buffer, destination, length, NULL);
|
||||
JKRAramPcs(0, (uintptr_t)buffer, destination, length, NULL);
|
||||
dstSize -= length;
|
||||
writtenLength += length;
|
||||
destination += length;
|
||||
@@ -184,7 +184,7 @@ void JKRAramStream::setTransBuffer(u8* buffer, u32 bufferSize, JKRHeap* heap) {
|
||||
transHeap = NULL;
|
||||
|
||||
if (buffer) {
|
||||
transBuffer = (u8*)ALIGN_NEXT((u32)buffer, 0x20);
|
||||
transBuffer = (u8*)ALIGN_NEXT((uintptr_t)buffer, 0x20);
|
||||
}
|
||||
|
||||
if (bufferSize) {
|
||||
|
||||
@@ -118,9 +118,9 @@ bool JKRCompArchive::open(s32 entryNum) {
|
||||
}
|
||||
else
|
||||
{
|
||||
JKRDvdToMainRam(entryNum, (u8 *)mArcInfoBlock, EXPAND_SWITCH_UNKNOWN1, (u32)arcHeader->file_data_offset + mSizeOfMemPart,
|
||||
JKRDvdToMainRam(entryNum, (u8 *)mArcInfoBlock, EXPAND_SWITCH_UNKNOWN1, (uintptr_t)arcHeader->file_data_offset + mSizeOfMemPart,
|
||||
NULL, JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0x20, NULL);
|
||||
field_0x64 = (u32)mArcInfoBlock + arcHeader->file_data_offset;
|
||||
field_0x64 = (uintptr_t)mArcInfoBlock + arcHeader->file_data_offset;
|
||||
|
||||
if (mSizeOfAramPart != 0) {
|
||||
mAramPart = (JKRAramBlock*)JKRAllocFromAram(mSizeOfAramPart, JKRAramHeap::HEAD);
|
||||
@@ -132,9 +132,9 @@ bool JKRCompArchive::open(s32 entryNum) {
|
||||
JKRDvdToAram(entryNum, mAramPart->getAddress(), EXPAND_SWITCH_UNKNOWN1, arcHeader->header_length + arcHeader->file_data_offset + mSizeOfMemPart, 0);
|
||||
}
|
||||
|
||||
mNodes = (SDIDirEntry*)((u32)mArcInfoBlock + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((u32)mArcInfoBlock + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char*)((u32)mArcInfoBlock + mArcInfoBlock->string_table_offset);
|
||||
mNodes = (SDIDirEntry*)((uintptr_t)mArcInfoBlock + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((uintptr_t)mArcInfoBlock + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char*)((uintptr_t)mArcInfoBlock + mArcInfoBlock->string_table_offset);
|
||||
field_0x6c = arcHeader->header_length + arcHeader->file_data_offset;
|
||||
}
|
||||
break;
|
||||
@@ -167,7 +167,7 @@ bool JKRCompArchive::open(s32 entryNum) {
|
||||
else {
|
||||
// arcHeader + 1 should lead to 0x20, which is the data after the header
|
||||
JKRHeap::copyMemory((u8 *)mArcInfoBlock, arcHeader + 1, (arcHeader->file_data_offset + mSizeOfMemPart));
|
||||
field_0x64 = (u32)mArcInfoBlock + arcHeader->file_data_offset;
|
||||
field_0x64 = (uintptr_t)mArcInfoBlock + arcHeader->file_data_offset;
|
||||
if (mSizeOfAramPart != 0) {
|
||||
mAramPart = (JKRAramBlock*)JKRAllocFromAram(mSizeOfAramPart, JKRAramHeap::HEAD);
|
||||
if(mAramPart == NULL) {
|
||||
@@ -181,9 +181,9 @@ bool JKRCompArchive::open(s32 entryNum) {
|
||||
}
|
||||
}
|
||||
}
|
||||
mNodes = (SDIDirEntry *)((u32)mArcInfoBlock + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((u32)mArcInfoBlock + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char *)((u32)mArcInfoBlock + mArcInfoBlock->string_table_offset);
|
||||
mNodes = (SDIDirEntry *)((uintptr_t)mArcInfoBlock + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((uintptr_t)mArcInfoBlock + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char *)((uintptr_t)mArcInfoBlock + mArcInfoBlock->string_table_offset);
|
||||
field_0x6c = arcHeader->header_length + arcHeader->file_data_offset;
|
||||
break;
|
||||
}
|
||||
@@ -374,7 +374,7 @@ u32 JKRCompArchive::getExpandedResSize(const void* resource) const {
|
||||
}
|
||||
|
||||
u8 buf[64];
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((u32)buf, 32);
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((uintptr_t)buf, 32);
|
||||
if ((flags & 0x20) != 0) {
|
||||
u32 addr = mAramPart->mAddress;
|
||||
addr = fileEntry->data_offset + addr;
|
||||
|
||||
@@ -49,7 +49,7 @@ void* JKRDecomp::run() {
|
||||
}
|
||||
|
||||
if (command->mCallback) {
|
||||
(*command->mCallback)((u32)command);
|
||||
(*command->mCallback)((uintptr_t)command);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ static int JKRDecompressFromDVDToAram(JKRDvdFile*, u32, u32, u32, u32, u32);
|
||||
static int decompSZS_subroutine(u8*, u32);
|
||||
static u8* firstSrcData();
|
||||
static u8* nextSrcData(u8*);
|
||||
static u32 dmaBufferFlush(u32);
|
||||
static u32 dmaBufferFlush(uintptr_t);
|
||||
|
||||
/* 802BDA14-802BDAB0 .text loadToAram__16JKRDvdAramRipperFlUl15JKRExpandSwitchUlUl */
|
||||
JKRAramBlock* JKRDvdAramRipper::loadToAram(s32 entryNumber, u32 address, JKRExpandSwitch expandSwitch, u32 param_3, u32 param_4) {
|
||||
@@ -59,7 +59,7 @@ JKRAramBlock* JKRDvdAramRipper::loadToAram(JKRDvdFile* dvdFile, u32 address, JKR
|
||||
bool JKRDvdAramRipper::errorRetry = true;
|
||||
|
||||
/* 802BDB50-802BDBFC .text loadToAram_Async__16JKRDvdAramRipperFP10JKRDvdFileUl15JKRExpandSwitchPFUl_vUlUl */
|
||||
JKRADCommand* JKRDvdAramRipper::loadToAram_Async(JKRDvdFile* dvdFile, u32 address, JKRExpandSwitch expandSwitch, void (*callback)(u32), u32 param_4, u32 param_5) {
|
||||
JKRADCommand* JKRDvdAramRipper::loadToAram_Async(JKRDvdFile* dvdFile, u32 address, JKRExpandSwitch expandSwitch, void (*callback)(uintptr_t), u32 param_4, u32 param_5) {
|
||||
JKRADCommand* command = new (JKRGetSystemHeap(), -4) JKRADCommand();
|
||||
command->mDvdFile = dvdFile;
|
||||
command->mAddress = address;
|
||||
@@ -101,7 +101,7 @@ JKRADCommand* JKRDvdAramRipper::callCommand_Async(JKRADCommand* command) {
|
||||
fileSize = ALIGN_NEXT(fileSize, 0x20);
|
||||
if (command->mExpandSwitch == 1) {
|
||||
u8 buffer[0x40];
|
||||
u8* bufPtr = (u8*)ALIGN_NEXT((u32)&buffer, 0x20);
|
||||
u8* bufPtr = (u8*)ALIGN_NEXT((uintptr_t)buffer, 0x20);
|
||||
while (true) {
|
||||
if (DVDReadPrio(dvdFile->getFileInfo(), bufPtr, 0x20, 0, 2) >= 0) {
|
||||
break;
|
||||
@@ -175,7 +175,7 @@ JKRADCommand* JKRDvdAramRipper::callCommand_Async(JKRADCommand* command) {
|
||||
if (!command->mCallback) {
|
||||
(*((JSUList<JKRADCommand>*)&sDvdAramAsyncList)).append(&command->mLink);
|
||||
} else {
|
||||
command->mCallback((u32)command);
|
||||
command->mCallback((uintptr_t)command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,12 +433,12 @@ static u8* nextSrcData(u8* src) {
|
||||
}
|
||||
|
||||
/* 802BE790-802BE7F8 .text dmaBufferFlush__FUl */
|
||||
static u32 dmaBufferFlush(u32 param_1) {
|
||||
static u32 dmaBufferFlush(uintptr_t param_1) {
|
||||
if (dmaCurrent == dmaBuf) {
|
||||
return 0;
|
||||
}
|
||||
u32 size = ALIGN_NEXT(dmaCurrent - dmaBuf, 0x20);
|
||||
JKRAramPiece::orderSync(0, (u32)dmaBuf, param_1, size, NULL);
|
||||
JKRAramPiece::orderSync(0, (uintptr_t)dmaBuf, param_1, size, NULL);
|
||||
dmaCurrent = dmaBuf;
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ u32 JKRDvdArchive::fetchResource_subroutine(s32 entryNum, u32 offset, u32 size,
|
||||
// The dst pointer to JKRDvdToMainRam should be aligned to 32 bytes. This will align
|
||||
// arcHeader to 32 bytes on the stack.
|
||||
char arcHeaderBuffer[64];
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((u32)arcHeaderBuffer, 0x20);
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((uintptr_t)arcHeaderBuffer, 0x20);
|
||||
JKRDvdToMainRam(entryNum, arcHeader, EXPAND_SWITCH_UNKNOWN2, sizeof(SArcHeader),
|
||||
NULL, JKRDvdRipper::ALLOC_DIRECTION_FORWARD, offset, NULL);
|
||||
#if VERSION > VERSION_DEMO
|
||||
@@ -301,7 +301,7 @@ u32 JKRDvdArchive::fetchResource_subroutine(s32 entryNum, u32 offset, u32 size,
|
||||
// The dst pointer to JKRDvdToMainRam should be aligned to 32 bytes. This will align
|
||||
// arcHeader to 32 bytes on the stack.
|
||||
char arcHeaderBuffer[64];
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((u32)arcHeaderBuffer, 0x20);
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((uintptr_t)arcHeaderBuffer, 0x20);
|
||||
JKRDvdToMainRam(entryNum, arcHeader, EXPAND_SWITCH_UNKNOWN2, sizeof(SArcHeader),
|
||||
NULL, JKRDvdRipper::ALLOC_DIRECTION_FORWARD, offset, NULL);
|
||||
#if VERSION > VERSION_DEMO
|
||||
@@ -366,7 +366,7 @@ u32 JKRDvdArchive::getExpandedResSize(const void* resource) const {
|
||||
// The dst pointer to JKRDvdToMainRam should be aligned to 32 bytes. This will align arcHeader
|
||||
// to 32 bytes on the stack.
|
||||
char buffer[64];
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((u32)buffer, 0x20);
|
||||
u8* arcHeader = (u8*)ALIGN_NEXT((uintptr_t)buffer, 0x20);
|
||||
JKRDvdToMainRam(mEntryNum, arcHeader, EXPAND_SWITCH_UNKNOWN2, sizeof(SArcHeader), NULL,
|
||||
JKRDvdRipper::ALLOC_DIRECTION_FORWARD,
|
||||
this->mDataOffset + fileEntry->data_offset, NULL);
|
||||
|
||||
@@ -50,7 +50,7 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
|
||||
fileSizeAligned = ALIGN_NEXT(dvdFile->getFileSize(), 32);
|
||||
if (expandSwitch == EXPAND_SWITCH_UNKNOWN1) {
|
||||
u8 buffer[0x40];
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((u32)buffer, 32);
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((uintptr_t)buffer, 32);
|
||||
while (true) {
|
||||
int readBytes = DVDReadPrio(dvdFile->getFileInfo(), bufPtr, 0x20, 0, 2);
|
||||
if (readBytes >= 0) {
|
||||
@@ -109,7 +109,7 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
|
||||
|
||||
if (offset != 0) {
|
||||
u8 buffer[0x40];
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((u32)buffer, 32);
|
||||
u8 *bufPtr = (u8 *)ALIGN_NEXT((uintptr_t)buffer, 32);
|
||||
while (true) {
|
||||
int readBytes = DVDReadPrio(dvdFile->getFileInfo(), bufPtr, 32, (s32)offset, 2);
|
||||
if (readBytes >= 0) {
|
||||
@@ -419,7 +419,7 @@ static u8* nextSrcData(u8* src) {
|
||||
}
|
||||
|
||||
memcpy(buf, src, limit);
|
||||
u32 transSize = (u32)(szpEnd - (buf + limit));
|
||||
u32 transSize = szpEnd - (buf + limit);
|
||||
if (transSize > transLeft) {
|
||||
transSize = transLeft;
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ void* JKRExpHeap::allocFromHead(u32 size, int align) {
|
||||
CMemBlock* newUsedBlock = NULL;
|
||||
|
||||
for (CMemBlock* block = mHeadFreeList; block; block = block->mNext) {
|
||||
u32 alignedContent = ALIGN_NEXT((u32)block->getContent(), align);
|
||||
u32 offset = alignedContent - (u32)block->getContent();
|
||||
uintptr_t alignedContent = ALIGN_NEXT((uintptr_t)block->getContent(), align);
|
||||
u32 offset = alignedContent - (uintptr_t)block->getContent();
|
||||
if (block->size < size + offset) {
|
||||
continue;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void* JKRExpHeap::allocFromHead(u32 size, int align) {
|
||||
CMemBlock* prev = foundBlock->mPrev;
|
||||
CMemBlock* next = foundBlock->mNext;
|
||||
removeFreeBlock(foundBlock);
|
||||
newUsedBlock = (CMemBlock*)((u32)foundBlock + foundOffset);
|
||||
newUsedBlock = (CMemBlock*)((uintptr_t)foundBlock + foundOffset);
|
||||
newUsedBlock->size = foundBlock->size - foundOffset;
|
||||
newFreeBlock =
|
||||
newUsedBlock->allocFore(size, mCurrentGroupId, (u8)foundOffset, 0, 0);
|
||||
@@ -273,8 +273,8 @@ void* JKRExpHeap::allocFromTail(u32 size, int align) {
|
||||
u32 start;
|
||||
|
||||
for (CMemBlock* block = mTailFreeList; block; block = block->mPrev) {
|
||||
start = ALIGN_PREV((u32)block->getContent() + block->size - size, align);
|
||||
usedSize = (u32)block->getContent() + block->size - start;
|
||||
start = ALIGN_PREV((uintptr_t)block->getContent() + block->size - size, align);
|
||||
usedSize = (uintptr_t)block->getContent() + block->size - start;
|
||||
if (block->size >= usedSize) {
|
||||
foundBlock = block;
|
||||
offset = block->size - usedSize;
|
||||
@@ -407,7 +407,7 @@ s32 JKRExpHeap::do_resize(void* ptr, u32 size) {
|
||||
if (size > block->size) {
|
||||
CMemBlock* foundBlock = NULL;
|
||||
for (CMemBlock* freeBlock = mHeadFreeList; freeBlock; freeBlock = freeBlock->mNext) {
|
||||
if (freeBlock == (CMemBlock*)((u32)(block + 1) + block->size)) {
|
||||
if (freeBlock == (CMemBlock*)((uintptr_t)(block + 1) + block->size)) {
|
||||
foundBlock = freeBlock;
|
||||
break;
|
||||
}
|
||||
@@ -666,10 +666,10 @@ void JKRExpHeap::recycleFreeBlock(CMemBlock* block) {
|
||||
|
||||
/* 802B27D0-802B291C .text joinTwoBlocks__10JKRExpHeapFPQ210JKRExpHeap9CMemBlock */
|
||||
void JKRExpHeap::joinTwoBlocks(CMemBlock* block) {
|
||||
u32 curBlock = (u32)block; // Fakematch?
|
||||
u32 endAddr = (u32)(block + 1) + block->size;
|
||||
uintptr_t curBlock = (uintptr_t)block; // Fakematch?
|
||||
uintptr_t endAddr = (uintptr_t)(block + 1) + block->size;
|
||||
CMemBlock* next = block->mNext;
|
||||
u32 nextAddr = (u32)next - (next->mFlags & 0x7f);
|
||||
uintptr_t nextAddr = (uintptr_t)next - (next->mFlags & 0x7f);
|
||||
if (endAddr > nextAddr) {
|
||||
JUTWarningConsole_f(":::Heap may be broken. (block = %x)", block);
|
||||
OSReport(":::block = %x\n", curBlock);
|
||||
@@ -731,7 +731,7 @@ bool JKRExpHeap::check() {
|
||||
block->mNext->mPrev);
|
||||
}
|
||||
|
||||
if ((u32)block + block->size + sizeof(CMemBlock) > (u32)block->mNext) {
|
||||
if ((uintptr_t)block + block->size + sizeof(CMemBlock) > (uintptr_t)block->mNext) {
|
||||
ok = false;
|
||||
JUTWarningConsole_f(":::addr %08x: bad block size (%08x)\n", block, block->size);
|
||||
}
|
||||
@@ -947,7 +947,7 @@ JKRExpHeap::CMemBlock* JKRExpHeap::CMemBlock::allocFore(u32 size, u8 groupId1, u
|
||||
mGroupId = groupId1;
|
||||
mFlags = alignment1;
|
||||
if (getSize() >= size + sizeof(CMemBlock)) {
|
||||
block = (CMemBlock*)(size + (u32)this);
|
||||
block = (CMemBlock*)(size + (uintptr_t)this);
|
||||
block[1].mGroupId = groupId2;
|
||||
block[1].mFlags = alignment2;
|
||||
block[1].size = this->size - (size + sizeof(CMemBlock));
|
||||
@@ -961,7 +961,7 @@ JKRExpHeap::CMemBlock* JKRExpHeap::CMemBlock::allocFore(u32 size, u8 groupId1, u
|
||||
JKRExpHeap::CMemBlock* JKRExpHeap::CMemBlock::allocBack(u32 size, u8 groupId1, u8 alignment1, u8 groupId2, u8 alignment2) {
|
||||
CMemBlock* newblock = NULL;
|
||||
if (getSize() >= size + sizeof(CMemBlock)) {
|
||||
newblock = (CMemBlock*)((u32)this + getSize() - size);
|
||||
newblock = (CMemBlock*)((uintptr_t)this + getSize() - size);
|
||||
newblock->mGroupId = groupId2;
|
||||
newblock->mFlags = alignment2 | 0x80;
|
||||
newblock->size = size;
|
||||
|
||||
@@ -95,7 +95,7 @@ bool JKRHeap::initArena(char** memory, u32* size, int maxHeaps) {
|
||||
OSSetArenaHi(ram_end);
|
||||
|
||||
*memory = (char*)ram_start;
|
||||
*size = (u32)ram_end - (u32)ram_start;
|
||||
*size = (uintptr_t)ram_end - (uintptr_t)ram_start;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ u8 JKRHeap::changeGroupID(u8 groupID) {
|
||||
|
||||
/* 802B0918-802B0978 .text getMaxAllocatableSize__7JKRHeapFi */
|
||||
u32 JKRHeap::getMaxAllocatableSize(int alignment) {
|
||||
u32 maxFreeBlock = (u32)getMaxFreeBlock();
|
||||
uintptr_t maxFreeBlock = (uintptr_t)getMaxFreeBlock();
|
||||
u32 ptrOffset = (alignment - 1) & alignment - (maxFreeBlock & 0xf);
|
||||
return ~(alignment - 1) & (getFreeSize() - ptrOffset);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ JKRHeap* JKRHeap::find(void* memory) const {
|
||||
}
|
||||
|
||||
/* 802B0A58-802B0AEC .text dispose_subroutine__7JKRHeapFUlUl */
|
||||
void JKRHeap::dispose_subroutine(u32 begin, u32 end) {
|
||||
void JKRHeap::dispose_subroutine(uintptr_t begin, uintptr_t end) {
|
||||
JSUListIterator<JKRDisposer> last_iterator;
|
||||
JSUListIterator<JKRDisposer> next_iterator;
|
||||
JSUListIterator<JKRDisposer> iterator;
|
||||
@@ -320,13 +320,13 @@ void JKRHeap::dispose_subroutine(u32 begin, u32 end) {
|
||||
|
||||
/* 802B0AEC-802B0B14 .text dispose__7JKRHeapFPvUl */
|
||||
bool JKRHeap::dispose(void* ptr, u32 size) {
|
||||
dispose_subroutine((u32)ptr, (u32)ptr + size);
|
||||
dispose_subroutine((uintptr_t)ptr, (uintptr_t)ptr + size);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 802B0B14-802B0B34 .text dispose__7JKRHeapFPvPv */
|
||||
void JKRHeap::dispose(void* begin, void* end) {
|
||||
dispose_subroutine((u32)begin, (u32)end);
|
||||
dispose_subroutine((uintptr_t)begin, (uintptr_t)end);
|
||||
}
|
||||
|
||||
/* 802B0B34-802B0B8C .text dispose__7JKRHeapFv */
|
||||
|
||||
@@ -120,7 +120,7 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
mStringTable = (char *)((u8 *)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset);
|
||||
|
||||
mArchiveData =
|
||||
(u8 *)((u32)mArcHeader + mArcHeader->header_length + mArcHeader->file_data_offset);
|
||||
(u8 *)((uintptr_t)mArcHeader + mArcHeader->header_length + mArcHeader->file_data_offset);
|
||||
mIsOpen = true;
|
||||
}
|
||||
if (mMountMode == 0) {
|
||||
@@ -134,11 +134,11 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
bool JKRMemArchive::open(void* buffer, u32 bufferSize, JKRMemBreakFlag flag) {
|
||||
mArcHeader = (SArcHeader *)buffer;
|
||||
JUT_ASSERT(471, mArcHeader->signature =='RARC');
|
||||
mArcInfoBlock = (SArcDataInfo *)((u8 *)mArcHeader + mArcHeader->header_length);
|
||||
mNodes = (SDIDirEntry *)((u8 *)&mArcInfoBlock->num_nodes + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((u8 *)&mArcInfoBlock->num_nodes + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char *)((u8 *)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset);
|
||||
mArchiveData = (u8 *)(((u32)mArcHeader + mArcHeader->header_length) + mArcHeader->file_data_offset);
|
||||
mArcInfoBlock = (SArcDataInfo *)((uintptr_t)mArcHeader + mArcHeader->header_length);
|
||||
mNodes = (SDIDirEntry *)((uintptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->node_offset);
|
||||
mFiles = (SDIFileEntry *)((uintptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->file_entry_offset);
|
||||
mStringTable = (char *)((uintptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset);
|
||||
mArchiveData = (u8 *)(((uintptr_t)mArcHeader + mArcHeader->header_length) + mArcHeader->file_data_offset);
|
||||
mIsOpen = (flag == JKRMEMBREAK_FLAG_UNKNOWN1) ? true : false; // mIsOpen might be u8
|
||||
mHeap = JKRHeap::findFromRoot(buffer);
|
||||
mCompression = COMPRESSION_NONE;
|
||||
|
||||
@@ -63,8 +63,8 @@ s32 JKRSolidHeap::adjustSize() {
|
||||
JKRHeap* parent = getParent();
|
||||
if (parent) {
|
||||
lock();
|
||||
u32 thisSize = (u32)mStart - (u32)this;
|
||||
u32 newSize = ALIGN_NEXT(mSolidHead - mStart, 0x20);
|
||||
ptrdiff_t thisSize = (uintptr_t)mStart - (uintptr_t)this;
|
||||
ptrdiff_t newSize = ALIGN_NEXT(mSolidHead - mStart, 0x20);
|
||||
if (parent->resize(this, thisSize + newSize) != -1) {
|
||||
mFreeSize = 0;
|
||||
mSize = newSize;
|
||||
@@ -110,8 +110,8 @@ void* JKRSolidHeap::do_alloc(u32 size, int alignment) {
|
||||
void* JKRSolidHeap::allocFromHead(u32 size, int alignment) {
|
||||
size = ALIGN_NEXT(size, 0x4);
|
||||
void* ptr = NULL;
|
||||
u32 alignedStart = (alignment - 1 + (u32)mSolidHead) & ~(alignment - 1);
|
||||
u32 offset = alignedStart - (u32)mSolidHead;
|
||||
uintptr_t alignedStart = (alignment - 1 + (uintptr_t)mSolidHead) & ~(alignment - 1);
|
||||
u32 offset = alignedStart - (uintptr_t)mSolidHead;
|
||||
u32 totalSize = size + offset;
|
||||
if (totalSize <= mFreeSize) {
|
||||
ptr = (void*)alignedStart;
|
||||
@@ -131,8 +131,8 @@ void* JKRSolidHeap::allocFromHead(u32 size, int alignment) {
|
||||
void* JKRSolidHeap::allocFromTail(u32 size, int alignment) {
|
||||
size = ALIGN_NEXT(size, 4);
|
||||
void* ptr = NULL;
|
||||
u32 alignedStart = ALIGN_PREV((u32)mSolidTail - size, alignment);
|
||||
u32 totalSize = (u32)mSolidTail - (u32)alignedStart;
|
||||
uintptr_t alignedStart = ALIGN_PREV((uintptr_t)mSolidTail - size, alignment);
|
||||
u32 totalSize = (uintptr_t)mSolidTail - alignedStart;
|
||||
if (totalSize <= mFreeSize) {
|
||||
ptr = (void*)alignedStart;
|
||||
mSolidTail -= totalSize;
|
||||
@@ -172,7 +172,7 @@ void JKRSolidHeap::do_freeTail() {
|
||||
dispose(mSolidTail, mEnd);
|
||||
}
|
||||
|
||||
this->mFreeSize = ((u32)mEnd - (u32)mSolidTail + mFreeSize);
|
||||
this->mFreeSize = (mEnd - mSolidTail + mFreeSize);
|
||||
this->mSolidTail = mEnd;
|
||||
|
||||
JKRSolidHeap::Unknown* unknown = field_0x78;
|
||||
@@ -201,8 +201,7 @@ bool JKRSolidHeap::check() {
|
||||
lock();
|
||||
|
||||
bool result = true;
|
||||
u32 calculatedSize =
|
||||
((u32)mSolidHead - (u32)mStart) + mFreeSize + ((u32)mEnd - (u32)mSolidTail);
|
||||
u32 calculatedSize = (mSolidHead - mStart) + mFreeSize + (mEnd - mSolidTail);
|
||||
u32 availableSize = mSize;
|
||||
if (calculatedSize != availableSize) {
|
||||
result = false;
|
||||
@@ -224,11 +223,11 @@ bool JKRSolidHeap::dump() {
|
||||
bool result = check();
|
||||
|
||||
lock();
|
||||
u32 headSize = ((u32)mSolidHead - (u32)mStart);
|
||||
u32 tailSize = ((u32)mEnd - (u32)mSolidTail);
|
||||
u32 headSize = (mSolidHead - mStart);
|
||||
u32 tailSize = (mEnd - mSolidTail);
|
||||
s32 htSize = headSize + tailSize;
|
||||
JUTReportConsole_f("head %08x: %08x\n", mStart, headSize);
|
||||
JUTReportConsole_f("tail %08x: %08x\n", mSolidTail, ((u32)mEnd - (u32)mSolidTail));
|
||||
JUTReportConsole_f("head %08x: %08x\n", (uintptr_t)mStart, headSize);
|
||||
JUTReportConsole_f("tail %08x: %08x\n", (uintptr_t)mSolidTail, (uintptr_t)(mEnd - mSolidTail));
|
||||
|
||||
u32 totalSize = mSize;
|
||||
float percentage = (float)htSize / (float)totalSize * 100.0f;
|
||||
@@ -246,8 +245,8 @@ void JKRSolidHeap::state_register(JKRHeap::TState* p, u32 id) const {
|
||||
getState_(p);
|
||||
setState_u32ID_(p, id);
|
||||
setState_uUsedSize_(p, getUsedSize((JKRSolidHeap*)this));
|
||||
u32 r29 = (u32)mSolidHead;
|
||||
r29 += (u32)mSolidTail * 3;
|
||||
u32 r29 = (uintptr_t)mSolidHead;
|
||||
r29 += (uintptr_t)mSolidTail * 3;
|
||||
setState_u32CheckCode_(p, r29);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadLi
|
||||
JKRThread::JKRThread(OSThread* thread, int message_count) : mThreadListLink(this) {
|
||||
mHeap = NULL;
|
||||
mThreadRecord = thread;
|
||||
mStackSize = (u32)thread->stack_end - (u32)thread->stack_base;
|
||||
mStackSize = (uintptr_t)thread->stack_end - (uintptr_t)thread->stack_base;
|
||||
mStackMemory = thread->stack_base;
|
||||
|
||||
mMessageCount = message_count;
|
||||
|
||||
@@ -235,7 +235,7 @@ void TObject::process_paragraph_reserved_(u32 arg1, const void* pContent, u32 uS
|
||||
data::TParse_TParagraph_dataID dataID(pContent);
|
||||
const void* temp = dataID.getContent();
|
||||
on_data(dataID.get_ID(), dataID.get_IDSize(), temp,
|
||||
uSize - ((u32)temp - (u32)dataID.getRaw()));
|
||||
uSize - ((uintptr_t)temp - (uintptr_t)dataID.getRaw()));
|
||||
break;
|
||||
}
|
||||
case 0x82:
|
||||
|
||||
@@ -236,7 +236,7 @@ void TAdaptor_actor::setJSG_ID_(IDFunction function, JStudio::data::TEOperationD
|
||||
void TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::operator()(f32 p1, JStudio::TAdaptor* adaptor) const {
|
||||
JStage::TActor* actor = static_cast<TAdaptor_actor*>(adaptor)->mObject;
|
||||
// not sure what this bit is
|
||||
u32 idx = *(u32*)(((u32)adaptor - 1) + _08);
|
||||
u32 idx = *(u32*)(((uintptr_t)adaptor - 1) + _08);
|
||||
|
||||
u8 idx_lowBytes = idx;
|
||||
u8 idx_highBytes = idx >> 8;
|
||||
|
||||
@@ -364,7 +364,7 @@ void JUTCacheFont::getGlyphFromAram(TGlyphCacheInfo* param_0, TCachePage* pCache
|
||||
*param_3 = iVar2;
|
||||
*param_2 -= iVar2 * iVar3;
|
||||
u8* result =
|
||||
JKRAramToMainRam((u32)param_0->mPrev + pGylphCacheInfo->field_0x10 * iVar2, (u8*)(pCachePage + 1),
|
||||
JKRAramToMainRam((uintptr_t)param_0->mPrev + pGylphCacheInfo->field_0x10 * iVar2, (u8*)(pCachePage + 1),
|
||||
pGylphCacheInfo->field_0x10, EXPAND_SWITCH_UNKNOWN0, 0, NULL, 0xffffffff, NULL);
|
||||
JUT_ASSERT(623, result);
|
||||
GXInitTexObj(&pCachePage->mTexObj, pCachePage + 1, pGylphCacheInfo->mWidth, pGylphCacheInfo->mHeight,
|
||||
|
||||
@@ -37,7 +37,7 @@ JUTDirectFile::JUTDirectFile() {
|
||||
mLength = 0;
|
||||
mPos = 0;
|
||||
mToRead = 0;
|
||||
mSectorStart = (u8*)ALIGN_NEXT((u32)mBuffer, 0x20);
|
||||
mSectorStart = (u8*)ALIGN_NEXT((uintptr_t)mBuffer, 0x20);
|
||||
mIsOpen = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -795,7 +795,7 @@ void JUTException::createFB() {
|
||||
u32 pixel_count = width * height;
|
||||
u32 size = pixel_count * 2;
|
||||
|
||||
void* begin = (void*)ALIGN_PREV((u32)end - size, 32);
|
||||
void* begin = (void*)ALIGN_PREV((uintptr_t)end - size, 32);
|
||||
void* object = (void*)ALIGN_PREV((s32)begin - sizeof(JUTExternalFB), 32);
|
||||
new (object) JUTExternalFB(renderMode, GX_GM_1_7, begin, size);
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ void JUTProcBar::drawProcessBar() {
|
||||
|
||||
/* 802C9CE4-802C9D4C .text addrToXPos__FPvi */
|
||||
int addrToXPos(void* param_0, int param_1) {
|
||||
return param_1 * (((u32)param_0 - 0x80000000) / (float)JKRHeap::mMemorySize);
|
||||
return param_1 * (((uintptr_t)param_0 - 0x80000000) / (float)JKRHeap::mMemorySize);
|
||||
}
|
||||
|
||||
/* 802C9D4C-802C9DB4 .text byteToXLen__Fii */
|
||||
|
||||
@@ -5,7 +5,7 @@ SECTION_INIT void* memcpy(void* dst, const void* src, size_t n)
|
||||
{
|
||||
const char* p;
|
||||
char* q;
|
||||
int rev = ((u32)src < (u32)dst);
|
||||
int rev = ((uintptr_t)src < (uintptr_t)dst);
|
||||
|
||||
if (!rev) {
|
||||
|
||||
@@ -24,10 +24,10 @@ SECTION_INIT void __fill_mem(void* dst, int val, u32 n)
|
||||
u32 v = (u8)val;
|
||||
u32 i;
|
||||
|
||||
((u8*)dst) = ((u8*)dst) - 1;
|
||||
dst = ((u8*)dst) - 1;
|
||||
|
||||
if (n >= 32) {
|
||||
i = (~(u32)dst) & 3;
|
||||
i = (~(uintptr_t)dst) & 3;
|
||||
|
||||
if (i) {
|
||||
n -= i;
|
||||
@@ -40,7 +40,7 @@ SECTION_INIT void __fill_mem(void* dst, int val, u32 n)
|
||||
if (v)
|
||||
v |= v << 24 | v << 16 | v << 8;
|
||||
|
||||
((u32*)dst) = ((u32*)(((u8*)dst) + 1)) - 1;
|
||||
dst = ((u32*)(((u8*)dst) + 1)) - 1;
|
||||
|
||||
i = n >> 5;
|
||||
|
||||
@@ -63,7 +63,7 @@ SECTION_INIT void __fill_mem(void* dst, int val, u32 n)
|
||||
*++(((u32*)dst)) = v;
|
||||
while (--i);
|
||||
|
||||
((u8*)dst) = ((u8*)(((u32*)dst) + 1)) - 1;
|
||||
dst = ((u8*)(((u32*)dst) + 1)) - 1;
|
||||
|
||||
n = n & 3;
|
||||
}
|
||||
|
||||
@@ -161,16 +161,16 @@ void* cBgS::ConvDzb(void* work) {
|
||||
JUT_ASSERT(0x219, ((int)pbgd->m_ti_tbl % 4) == 0);
|
||||
|
||||
if (pbgd->m_v_tbl != NULL)
|
||||
pbgd->m_v_tbl = (cBgD_Vtx_t*)((u32)pbgd->m_v_tbl + (u32)pbgd);
|
||||
pbgd->m_v_tbl = (cBgD_Vtx_t*)((u32)pbgd->m_v_tbl + (uintptr_t)pbgd);
|
||||
|
||||
pbgd->m_t_tbl = (cBgD_Tri_t*)((u32)pbgd->m_t_tbl + (u32)pbgd);
|
||||
pbgd->m_b_tbl = (cBgD_Blk_t*)((u32)pbgd->m_b_tbl + (u32)pbgd);
|
||||
pbgd->m_tree_tbl = (cBgD_Tree_t*)((u32)pbgd->m_tree_tbl + (u32)pbgd);
|
||||
pbgd->m_g_tbl = (cBgD_Grp_t*)((u32)pbgd->m_g_tbl + (u32)pbgd);
|
||||
pbgd->m_ti_tbl = (cBgD_Ti_t*)((u32)pbgd->m_ti_tbl + (u32)pbgd);
|
||||
pbgd->m_t_tbl = (cBgD_Tri_t*)((u32)pbgd->m_t_tbl + (uintptr_t)pbgd);
|
||||
pbgd->m_b_tbl = (cBgD_Blk_t*)((u32)pbgd->m_b_tbl + (uintptr_t)pbgd);
|
||||
pbgd->m_tree_tbl = (cBgD_Tree_t*)((u32)pbgd->m_tree_tbl + (uintptr_t)pbgd);
|
||||
pbgd->m_g_tbl = (cBgD_Grp_t*)((u32)pbgd->m_g_tbl + (uintptr_t)pbgd);
|
||||
pbgd->m_ti_tbl = (cBgD_Ti_t*)((u32)pbgd->m_ti_tbl + (uintptr_t)pbgd);
|
||||
|
||||
for (s32 i = 0; i < pbgd->m_g_num; i++) {
|
||||
pbgd->m_g_tbl[i].m_name = (char*)((u32)pbgd + (u32)pbgd->m_g_tbl[i].m_name);
|
||||
pbgd->m_g_tbl[i].m_name = (char*)((u32)pbgd->m_g_tbl[i].m_name + (uintptr_t)pbgd);
|
||||
}
|
||||
|
||||
return pbgd;
|
||||
|
||||
@@ -1135,7 +1135,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
a_this->mpMorf->getModel()->setUserArea((u32)a_this);
|
||||
a_this->mpMorf->getModel()->setUserArea((uintptr_t)a_this);
|
||||
for (u16 i = 0; i < a_this->mpMorf->getModel()->getModelData()->getJointNum(); i++) {
|
||||
a_this->mpMorf->getModel()->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack);
|
||||
}
|
||||
|
||||
@@ -1249,7 +1249,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_this) {
|
||||
if (!ret) { return FALSE; }
|
||||
if (!a_this->mpBrkAnm) { return FALSE; }
|
||||
|
||||
a_this->mpMorf->getModel()->setUserArea((u32)a_this);
|
||||
a_this->mpMorf->getModel()->setUserArea((uintptr_t)a_this);
|
||||
for (u16 i = 0; i < a_this->mpMorf->getModel()->getModelData()->getJointNum(); i++) {
|
||||
a_this->mpMorf->getModel()->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ BOOL daAmiProp_c::CreateHeap() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mpModel->setUserArea(reinterpret_cast<u32>(this));
|
||||
mpModel->setUserArea(reinterpret_cast<uintptr_t>(this));
|
||||
setMoveBGMtx();
|
||||
|
||||
mpBgW = new dBgW();
|
||||
|
||||
@@ -2720,7 +2720,7 @@ static cPhs_State daBb_Create(fopAc_ac_c* a_this) {
|
||||
}
|
||||
}
|
||||
|
||||
model->setUserArea(reinterpret_cast<u32>(i_this));
|
||||
model->setUserArea(reinterpret_cast<uintptr_t>(i_this));
|
||||
|
||||
if (i_this->unk_2DA != 0xFF) {
|
||||
i_this->ppd = dPath_GetRoomPath(i_this->unk_2DA, fopAcM_GetRoomNo(a_this));
|
||||
|
||||
@@ -3722,7 +3722,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_actor) {
|
||||
}
|
||||
}
|
||||
|
||||
i_this->mpMorf->getModel()->setUserArea((u32)i_this);
|
||||
i_this->mpMorf->getModel()->setUserArea((uintptr_t)i_this);
|
||||
|
||||
i_this->mp2BC = mDoExt_J3DModel__create(i_this->mpMorf->getModel()->getModelData(), 0, 0x11020203);
|
||||
if (i_this->mp2BC == NULL) {
|
||||
|
||||
@@ -5011,7 +5011,7 @@ static cPhs_State daBk_Create(fopAc_ac_c* i_actor) {
|
||||
fopAcM_SetMin(i_actor, -200.0f, -50.0f, -100.0f);
|
||||
fopAcM_SetMax(i_actor, 125.0f, 250.0f, 250.0f);
|
||||
fopAcM_SetMtx(i_actor, i_this->mpMorf->getModel()->getBaseTRMtx());
|
||||
i_this->mpMorf->getModel()->setUserArea((u32)i_this);
|
||||
i_this->mpMorf->getModel()->setUserArea((uintptr_t)i_this);
|
||||
i_this->initBt(162.5f, 125.0f);
|
||||
|
||||
i_this->dr.m70C = 1;
|
||||
|
||||
@@ -1765,7 +1765,7 @@ BOOL useHeapInit(bmd_class* i_this) {
|
||||
if (model == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
model->setUserArea((u32)i_this);
|
||||
model->setUserArea((uintptr_t)i_this);
|
||||
for (u16 uVar16 = 0; uVar16 < model->getModelData()->getJointNum(); uVar16++) {
|
||||
model->getModelData()->getJointNodePointer(uVar16)->setCallBack(core_nodeCallBack);
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ static int useHeapInit(bmdfoot_class* i_this) {
|
||||
}
|
||||
#endif
|
||||
|
||||
model->setUserArea((u32)i_this);
|
||||
model->setUserArea((uintptr_t)i_this);
|
||||
for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) {
|
||||
model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ u32 daBoko_c::m_heap_size[] = {
|
||||
/* Type_PGANON_SWORD_e */ 0x2000
|
||||
};
|
||||
|
||||
char* daBoko_c::m_arc_name[] = {
|
||||
const char* daBoko_c::m_arc_name[] = {
|
||||
/* Type_BOKO_STICK_e */ "Boko",
|
||||
/* Type_MACHETE_e */ "Nata",
|
||||
/* Type_STALFOS_MACE_e */ "Club",
|
||||
|
||||
@@ -4265,7 +4265,7 @@ static BOOL boss_useHeapInit(fopAc_ac_c* a_this) {
|
||||
if ((i_this->mpMorf == NULL) || (i_this->mpMorf->getModel() == NULL)) {
|
||||
return FALSE;
|
||||
}
|
||||
i_this->mpMorf->getModel()->setUserArea((u32)i_this);
|
||||
i_this->mpMorf->getModel()->setUserArea((uintptr_t)i_this);
|
||||
for (u16 i = 0; i < i_this->mpMorf->getModel()->getModelData()->getJointNum(); i++) {
|
||||
i_this->mpMorf->getModel()->getModelData()->getJointNodePointer(i)->setCallBack(body_nodeCallBack);
|
||||
}
|
||||
@@ -4412,7 +4412,7 @@ static BOOL kantera_useHeapInit(fopAc_ac_c* a_this) {
|
||||
if ((i_this->mpMorf == NULL) || (i_this->mpMorf->getModel() == NULL)) {
|
||||
return FALSE;
|
||||
}
|
||||
i_this->mpMorf->getModel()->setUserArea((u32)i_this);
|
||||
i_this->mpMorf->getModel()->setUserArea((uintptr_t)i_this);
|
||||
for (u16 i = 0; i < i_this->mpMorf->getModel()->getModelData()->getJointNum(); i++) {
|
||||
i_this->mpMorf->getModel()->getModelData()->getJointNodePointer(i)->setCallBack(kantera_nodeCallBack);
|
||||
}
|
||||
|
||||
@@ -2844,7 +2844,7 @@ static BOOL useHeapInit(fopAc_ac_c* a_this) {
|
||||
i_this->m02B8->getModel()->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBackHead);
|
||||
}
|
||||
}
|
||||
i_this->m02B8->getModel()->setUserArea((u32)i_this);
|
||||
i_this->m02B8->getModel()->setUserArea((uintptr_t)i_this);
|
||||
}
|
||||
i_this->m0388 = mDoExt_J3DModel__create(i_this->m02B8->getModel()->getModelData(), 0, 0x11020203);
|
||||
if (i_this->m0388 == NULL) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user