mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
m_Do_ext retail linked + debug improvements (#3009)
This commit is contained in:
@@ -56,12 +56,9 @@ public:
|
||||
J3DIndBlock* getIndBlock() { return mIndBlock; }
|
||||
J3DJoint* getJoint() { return mJoint; }
|
||||
J3DMaterialAnm* getMaterialAnm() {
|
||||
if ((uintptr_t)mMaterialAnm < 0xC0000000) {
|
||||
return mMaterialAnm;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
return (uintptr_t)mMaterialAnm < 0xC0000000 ? mMaterialAnm : NULL;
|
||||
}
|
||||
u32 getMaterialMode() { return mMaterialMode; }
|
||||
J3DNBTScale* getNBTScale() { return mTexGenBlock->getNBTScale(); }
|
||||
u16 getTexNo(u32 idx) { return mTevBlock->getTexNo(idx); }
|
||||
J3DGXColor* getTevKColor(u32 param_0) { return mTevBlock->getTevKColor(param_0); }
|
||||
|
||||
@@ -139,7 +139,10 @@ struct J3DSys {
|
||||
|
||||
J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; }
|
||||
|
||||
void setTexture(J3DTexture* pTex) { mTexture = pTex; }
|
||||
void setTexture(J3DTexture* pTex) {
|
||||
JUT_ASSERT_MSG(220, pTex != NULL, "Error : null pointer.");
|
||||
mTexture = pTex;
|
||||
}
|
||||
J3DTexture* getTexture() { return mTexture; }
|
||||
|
||||
void setNBTScale(Vec* scale) { mNBTScale = scale; }
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
}
|
||||
|
||||
void setResTIMG(u16 index, const ResTIMG& timg) {
|
||||
JUT_ASSERT_MSG(81, (bool)(index < mNum), "Error : range over.");
|
||||
mpRes[index] = timg;
|
||||
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)));
|
||||
|
||||
@@ -116,4 +116,8 @@ inline JKRExpHeap* JKRCreateExpHeap(u32 size, JKRHeap* parent, bool errorFlag) {
|
||||
return JKRExpHeap::create(size, parent, errorFlag);
|
||||
}
|
||||
|
||||
inline void JKRDestroyExpHeap(JKRHeap* heap) {
|
||||
heap->destroy();
|
||||
}
|
||||
|
||||
#endif /* JKREXPHEAP_H */
|
||||
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
JKRHeap(u32 size, JKRHeap* parent, bool errorFlag);
|
||||
JKRHeap(void* data, u32 size, JKRHeap* parent, bool errorFlag);
|
||||
virtual ~JKRHeap();
|
||||
|
||||
@@ -112,6 +113,7 @@ public:
|
||||
void lock() { OSLockMutex(&mMutex); }
|
||||
void unlock() { OSUnlockMutex(&mMutex); }
|
||||
u32 getHeapSize() { return mSize; }
|
||||
u8 getCurrentGroupId() { return 0; }
|
||||
|
||||
protected:
|
||||
/* 0x00 */ // vtable
|
||||
@@ -151,9 +153,7 @@ public:
|
||||
static u32 getMemorySize(void) { return mMemorySize; }
|
||||
static JKRHeap* getRootHeap() { return sRootHeap; }
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
static JKRHeap* getRootHeap2() { return sRootHeap2; }
|
||||
#endif
|
||||
|
||||
static JKRHeap* getSystemHeap() { return sSystemHeap; }
|
||||
static JKRHeap* getCurrentHeap() { return sCurrentHeap; }
|
||||
@@ -176,9 +176,7 @@ public:
|
||||
|
||||
static JKRHeap* sRootHeap;
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
static JKRHeap* sRootHeap2;
|
||||
#endif
|
||||
|
||||
static JKRHeap* sSystemHeap;
|
||||
static JKRHeap* sCurrentHeap;
|
||||
@@ -241,6 +239,10 @@ inline u32 JKRGetMemBlockSize(JKRHeap* heap, void* block) {
|
||||
return JKRHeap::getSize(block, heap);
|
||||
}
|
||||
|
||||
inline u32 JKRGetFreeSize(JKRHeap* heap) {
|
||||
return heap->getFreeSize();
|
||||
}
|
||||
|
||||
inline void* JKRAlloc(u32 size, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, NULL);
|
||||
}
|
||||
@@ -261,11 +263,9 @@ inline bool JKRSetErrorFlag(JKRHeap* heap, bool flag) {
|
||||
return heap->setErrorFlag(flag);
|
||||
}
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
inline JKRHeap* JKRGetRootHeap2() {
|
||||
return JKRHeap::getRootHeap2();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
inline void JKRSetDebugFillNotuse(u8 status) { data_804508B1 = status; }
|
||||
|
||||
@@ -65,4 +65,8 @@ inline JKRSolidHeap* JKRCreateSolidHeap(u32 param_0, JKRHeap* heap, bool param_2
|
||||
return JKRSolidHeap::create(param_0, heap, param_2);
|
||||
}
|
||||
|
||||
inline void JKRDestroySolidHeap(JKRHeap* heap) {
|
||||
heap->destroy();
|
||||
}
|
||||
|
||||
#endif /* JKRSOLIDHEAP_H */
|
||||
|
||||
@@ -63,6 +63,14 @@ public:
|
||||
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; }
|
||||
GXTexObj* getTexObj(void* buffer) { return &((TCachePage*)buffer)->mTexObj; }
|
||||
|
||||
u32 getCachePage() const {
|
||||
return mCachePage;
|
||||
}
|
||||
|
||||
int getMaxSheetSize() const {
|
||||
return mMaxSheetSize;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x70 */ u32 mTotalWidSize;
|
||||
/* 0x74 */ u32 mTotalGlySize;
|
||||
|
||||
Reference in New Issue
Block a user