mirror of
https://github.com/zeldaret/tp
synced 2026-06-11 05:08:39 -04:00
More JSystem borrowing (#383)
This commit is contained in:
@@ -21,7 +21,6 @@ public:
|
||||
u32 getAudioMemSize() const { return mAudioMemorySize; }
|
||||
u32 getGraphMemory() const { return mGraphMemoryPtr; }
|
||||
u32 getGraphMemSize() const { return mGraphMemorySize; }
|
||||
|
||||
//private:
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ // JKRThread
|
||||
@@ -38,8 +37,8 @@ public:
|
||||
static JKRAram* create(u32, u32, long, long, long);
|
||||
static void checkOkAddress(u8*, u32, JKRAramBlock*, u32);
|
||||
static void changeGroupIdIfNeed(u8*, int);
|
||||
static void mainRamToAram(u8*, u32, u32, JKRExpandSwitch, u32, JKRHeap*, int, u32*);
|
||||
static void aramToMainRam(u32, u8*, u32, JKRExpandSwitch, u32, JKRHeap*, int, u32*);
|
||||
static JKRAramBlock* mainRamToAram(u8*, u32, u32, JKRExpandSwitch, u32, JKRHeap*, int, u32*);
|
||||
static u8* aramToMainRam(u32, u8*, u32, JKRExpandSwitch, u32, JKRHeap*, int, u32*);
|
||||
static void dump(void);
|
||||
|
||||
static JKRAram* getManager() { return sAramObject; }
|
||||
@@ -73,11 +72,19 @@ inline void* JKRAllocFromAram(u32 size, JKRAramHeap::EAllocMode allocMode) {
|
||||
return JKRAram::getAramHeap()->alloc(size, allocMode);
|
||||
}
|
||||
|
||||
inline void JKRFreeToAram(JKRAramBlock* block) {
|
||||
JKRAram::getAramHeap()->free(block);
|
||||
}
|
||||
|
||||
inline void JKRAramToMainRam(u32 p1, u8* p2, u32 p3, JKRExpandSwitch p4, u32 p5, JKRHeap* p6,
|
||||
int p7, u32* p8) {
|
||||
JKRAram::aramToMainRam(p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
inline JKRAramBlock *JKRMainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRExpandSwitch expandSwitch, u32 fileSize, JKRHeap *heap, int id, u32 *pSize) {
|
||||
return JKRAram::mainRamToAram(buf, bufSize, alignedSize, expandSwitch, fileSize, heap, id, pSize);
|
||||
}
|
||||
|
||||
// void JKRDecompressFromAramToMainRam(u32, void*, u32, u32, u32, u32*);
|
||||
|
||||
#endif /* JKRARAM_H */
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
u32 getTotalFreeSize(void);
|
||||
// u32 getUsedSize(void);
|
||||
void dump(void);
|
||||
void free(JKRAramBlock *block) {
|
||||
delete block;
|
||||
}
|
||||
|
||||
u8 getCurrentGroupID() const { return mGroupId; }
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ public:
|
||||
private:
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ // JKRArchive
|
||||
/* 0x5C */ int field_0x5c;
|
||||
/* 0x5C */ int mCompression;
|
||||
/* 0x60 */ EMountDirection mMountDirection;
|
||||
/* 0x64 */ int field_0x64;
|
||||
/* 0x68 */ JKRAramBlock* field_0x68;
|
||||
/* 0x68 */ JKRAramBlock* mAramPart;
|
||||
/* 0x6C */ int field_0x6c;
|
||||
/* 0x70 */ JKRDvdFile* field_0x70;
|
||||
/* 0x70 */ JKRDvdFile* mDvdFile;
|
||||
/* 0x74 */ u32 mSizeOfMemPart;
|
||||
/* 0x78 */ u32 mSizeOfAramPart;
|
||||
/* 0x7C */ int field_0x7c;
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
/* vt[18] */ virtual s32 do_getTotalFreeSize(); /* override */
|
||||
/* vt[19] */ virtual s32 do_changeGroupID(u8 newGroupID); /* override */
|
||||
/* vt[20] */ virtual u8 do_getCurrentGroupId(); /* override */
|
||||
/* vt[21] */ virtual void state_register(JKRHeap::TState* p, u32 id) const; /* override */
|
||||
/* vt[21] */ virtual u32 state_register(JKRHeap::TState* p, u32 id) const; /* override */
|
||||
/* vt[22] */ virtual bool state_compare(JKRHeap::TState const& r1,
|
||||
JKRHeap::TState const& r2) const; /* override */
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
/* vt[18] */ virtual s32 do_getTotalFreeSize() = 0;
|
||||
/* vt[19] */ virtual s32 do_changeGroupID(u8 newGroupID);
|
||||
/* vt[20] */ virtual u8 do_getCurrentGroupId();
|
||||
/* vt[21] */ virtual void state_register(JKRHeap::TState* p, u32 id) const;
|
||||
/* vt[21] */ virtual u32 state_register(JKRHeap::TState* p, u32 id) const;
|
||||
/* vt[22] */ virtual bool state_compare(JKRHeap::TState const& r1, JKRHeap::TState const& r2) const;
|
||||
/* vt[23] */ virtual void state_dump(JKRHeap::TState const& p) const;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
/* vt[17] */ virtual void* do_getMaxFreeBlock(void); /* override */
|
||||
/* vt[18] */ virtual s32 do_getTotalFreeSize(void); /* override */
|
||||
|
||||
/* vt[21] */ virtual void state_register(JKRHeap::TState*, u32) const; /* override */
|
||||
/* vt[21] */ virtual u32 state_register(JKRHeap::TState*, u32) const; /* override */
|
||||
/* vt[22] */ virtual bool state_compare(JKRHeap::TState const&,
|
||||
JKRHeap::TState const&) const; /* override */
|
||||
|
||||
|
||||
@@ -3,4 +3,13 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct JPAKeyBlock {
|
||||
/* 8027D730 */ JPAKeyBlock(u8 const*);
|
||||
/* 8027D740 */ void calc(f32);
|
||||
|
||||
const u8* mDataStart;
|
||||
const f32* field_0x4;
|
||||
};
|
||||
|
||||
|
||||
#endif /* JPAKEYBLOCK_H */
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
void JPAGetXYZRotateMtx(s16 x, s16 y, s16 z, Mtx dst);
|
||||
void JPASetRMtxTVecfromMtx(f32 const (*param_0)[4], f32 (*param_1)[4],
|
||||
JGeometry::TVec3<f32>* param_2);
|
||||
void JPACalcKeyAnmValue(f32 param_0, u16 param_1, f32 const* param_2);
|
||||
|
||||
#endif /* JPAMATH_H */
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
/* 0x04 */ u32 u32Size;
|
||||
/* 0x08 */ u32 u32Type;
|
||||
/* 0x0C */ const void* pContent;
|
||||
/* 0x10 */ const void* next;
|
||||
};
|
||||
TParse_TParagraph(const void* content) : TParseData_aligned<4>(content) {}
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ public:
|
||||
|
||||
struct TParse_TParagraph_data : public TParseData_aligned<4> {
|
||||
struct TData {
|
||||
/* 0x00 */ u8 _0;
|
||||
/* 0x04 */ u32 _4;
|
||||
/* 0x00 */ u8 status;
|
||||
/* 0x04 */ u32 dataSize;
|
||||
/* 0x08 */ u32 _8;
|
||||
/* 0x0C */ const void* _c;
|
||||
/* 0x0C */ const void* fileCount;
|
||||
/* 0x10 */ const void* _10;
|
||||
};
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ extern "C" JUTConsole* JUTGetWarningConsole();
|
||||
extern "C" void JUTReportConsole_f_va(const char*, va_list);
|
||||
extern "C" void JUTReportConsole_f(const char*, ...);
|
||||
extern "C" void JUTWarningConsole(const char* message);
|
||||
extern "C" void JUTWarningConsole_f(const char* message, ...);
|
||||
extern "C" void JUTReportConsole(const char* message);
|
||||
|
||||
#endif /* JUTCONSOLE_H */
|
||||
|
||||
@@ -32,4 +32,6 @@ private:
|
||||
/* 0x10 */ u8 field_0x10[0xC];
|
||||
};
|
||||
|
||||
inline void JUTCreateFifo(u32 bufSize) { new JUTGraphFifo(bufSize); }
|
||||
|
||||
#endif /* JUTGRAPHFIFO_H */
|
||||
|
||||
Reference in New Issue
Block a user