misc matches

This commit is contained in:
LagoLunatic
2024-02-02 01:24:11 -05:00
parent e8506099f0
commit d5a3227301
22 changed files with 58 additions and 57 deletions
@@ -863,6 +863,8 @@ struct J3DIndTexOrder : public J3DIndTexOrderInfo {
u8 getCoord() const { return mCoord; }
u8 getMap() const { return mMap; }
void setCoord(u8 coord) { mCoord = coord; }
void setMap(u8 map) { mMap = map; }
};
class J3DIndBlock {
+1 -1
View File
@@ -80,6 +80,7 @@ public:
void onInvalid() { mInvalid = 1; }
u32 getTexGenNum() const { return mTexGenBlock->getTexGenNum(); }
u8 getTevStageNum() const { return mTevBlock->getTevStageNum(); }
J3DIndTexOrder* getIndTexOrder(u32 i) { return mIndBlock->getIndTexOrder(i); }
J3DIndTexMtx* getIndTexMtx(u32 i) { return mIndBlock->getIndTexMtx(i); }
u8 getIndTexStageNum() const { return mIndBlock->getIndTexStageNum(); }
@@ -97,7 +98,6 @@ public:
void getDither() const {}
void getIndTevStage(u32) {}
void getIndTexCoordScale(u32) {}
void getIndTexOrder(u32) {}
void getLight(u32) {}
void getMatColor(u32) {}
void getTevKAlphaSel(u32) {}
+1 -1
View File
@@ -207,7 +207,7 @@ inline void JKRFreeToSysHeap(void* ptr) {
systemHeap->free(ptr);
}
inline void i_JKRFree(void* ptr) {
inline void JKRFree(void* ptr) {
JKRHeap::free(ptr, NULL);
}
+5 -5
View File
@@ -91,7 +91,7 @@ public:
dStage_Event_dt_c* getStageEventDt();
dStage_Event_dt_c* nextStageEventDt(void*);
int getPId(void*);
void* convPId(unsigned int);
fopAc_ac_c* convPId(unsigned int);
u8 getTactFreeMStick(int);
u8 getTactFreeCStick(int);
bool giveItemCut(u8);
@@ -100,15 +100,15 @@ public:
bool chkTalkXY() { return mTalkButton == 1 || mTalkButton == 2 || mTalkButton == 3; }
void setPtI_Id(unsigned int id) { mPtItem = id; }
void setPtI(void* actor) { mPtItem = getPId(actor); }
void* getPtI() { return convPId(mPtItem); }
fopAc_ac_c* getPtI() { return convPId(mPtItem); }
void setGtItm(u8 itemNo) { mGetItemNo = itemNo; }
u8 getGtItm() { return mGetItemNo; }
void setPtT(void* i_actor) { mPtTalk = getPId(i_actor); }
void* getPtT() { return convPId(mPtTalk); }
fopAc_ac_c* getPtT() { return convPId(mPtTalk); }
void setPt1(void* i_actor) { mPt1 = getPId(i_actor); }
void* getPt1() { return convPId(mPt1); }
fopAc_ac_c* getPt1() { return convPId(mPt1); }
void setPt2(void* i_actor) { mPt2 = getPId(i_actor); }
void* getPt2() { return convPId(mPt2); }
fopAc_ac_c* getPt2() { return convPId(mPt2); }
u8 getPreItemNo() { return mItemNo; }
f32 getCullRate() { return mCullFarClipRatio; }
+1 -1
View File
@@ -147,7 +147,7 @@ inline void OSf32tou8(f32* f, u8* out) {
*out = __OSf32tou8(*f);
}
inline void i_OSInitFastCast(void) {
inline void OSInitFastCast(void) {
// clang-format off
asm {
li r3, 4
+1 -1
View File
@@ -12,7 +12,7 @@ extern "C" {
void fpcSch_JudgeForPName__FPvPv(void);
}
inline base_process_class* i_fpcM_SearchByName(s16 name) {
inline base_process_class* fpcM_SearchByName(s16 name) {
return (base_process_class*)fpcLyIt_AllJudge(fpcSch_JudgeForPName, &name);
}
+3 -3
View File
@@ -205,7 +205,7 @@ bool DynamicModuleControl::do_load() {
s32 i = 0;
while (true) {
if (mModule != NULL) {
i_JKRFree(mModule);
JKRFree(mModule);
mModule = NULL;
}
char buffer[64];
@@ -317,7 +317,7 @@ BOOL DynamicModuleControl::do_load_async() {
bool DynamicModuleControl::do_unload() {
if (mModule != NULL) {
i_JKRFree(mModule);
JKRFree(mModule);
mModule = NULL;
}
return true;
@@ -443,7 +443,7 @@ bool DynamicModuleControl::do_unlink() {
}
sAllocBytes = sAllocBytes - getModuleSize();
if (mBss != NULL) {
i_JKRFree(mBss);
JKRFree(mBss);
mBss = NULL;
}
do_unload();
+1 -1
View File
@@ -261,7 +261,7 @@ void J3DSys::drawInit() {
GXSetTevIndirect((GXTevStageID)i, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_NONE, GX_ITM_OFF,
GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
i_OSInitFastCast();
OSInitFastCast();
setTexCacheRegion(GX_TEXCACHE_32K);
}
+1 -1
View File
@@ -47,7 +47,7 @@ void JASystem::TAudioThread::syncAudio() {
/* 80288F88-80289130 .text audioproc__Q28JASystem12TAudioThreadFPv */
void* JASystem::TAudioThread::audioproc(void*) {
JKRThread thread(&sAudioThread, 0);
i_OSInitFastCast();
OSInitFastCast();
OSInitMessageQueue(&sAudioprocMQ, saAudioMsgBuf, 16);
sAudioprocMQInit = 1;
Kernel::init();
+3 -3
View File
@@ -250,7 +250,7 @@ u8* JKRAram::aramToMainRam(u32 address, u8 *buf, u32 p3, JKRExpandSwitch expandS
}
if (rv == NULL) {
i_JKRFree(szpSpace);
JKRFree(szpSpace);
return NULL;
}
else {
@@ -355,9 +355,9 @@ static int JKRDecompressFromAramToMainRam(u32 src, void* dst, u32 srcLength, u32
u8* data = firstSrcData();
u32 decompressedSize = ((u32*)data)[1];
decompSZS_subroutine(data, (u8 *)dst);
i_JKRFree(szpBuf);
JKRFree(szpBuf);
if (refBuf) {
i_JKRFree(refBuf);
JKRFree(refBuf);
}
DCStoreRangeNoSync(dst, decompressedSize);
+4 -4
View File
@@ -47,7 +47,7 @@ JKRAramArchive::~JKRAramArchive() {
}
if (mExpandedSize != NULL) {
i_JKRFree(mExpandedSize);
JKRFree(mExpandedSize);
mExpandedSize = NULL;
}
@@ -119,7 +119,7 @@ bool JKRAramArchive::open(s32 entryNum) {
if (compressedFiles != 0) {
mExpandedSize = (s32 *)JKRAllocFromHeap(mHeap, mArcInfoBlock->num_file_entries << 2, abs(alignment));
if (mExpandedSize == NULL) {
i_JKRFree(mArcInfoBlock);
JKRFree(mArcInfoBlock);
mMountMode = 0;
goto cleanup;
}
@@ -130,10 +130,10 @@ bool JKRAramArchive::open(s32 entryNum) {
mBlock = (JKRAramBlock*) JKRAllocFromAram(aramSize, mMountDirection == MOUNT_DIRECTION_HEAD ? JKRAramHeap::HEAD : JKRAramHeap::TAIL);
if(mBlock == NULL) {
if (mArcInfoBlock) {
i_JKRFree(mArcInfoBlock);
JKRFree(mArcInfoBlock);
}
if(mExpandedSize) {
i_JKRFree(mExpandedSize);
JKRFree(mExpandedSize);
}
mMountMode = 0;
}
+1 -1
View File
@@ -116,7 +116,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
}
if (command->mAllocatedTransferBuffer) {
i_JKRFree(buffer);
JKRFree(buffer);
command->mAllocatedTransferBuffer = false;
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ JKRCompArchive::~JKRCompArchive() {
}
if (mExpandedSize != NULL) {
i_JKRFree(mExpandedSize);
JKRFree(mExpandedSize);
mExpandedSize = NULL;
}
+1 -1
View File
@@ -42,7 +42,7 @@ JKRDvdArchive::~JKRDvdArchive() {
}
if (mExpandedSize) {
i_JKRFree(mExpandedSize);
JKRFree(mExpandedSize);
mExpandedSize = NULL;
}
+10 -10
View File
@@ -86,7 +86,7 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
mem = (u8 *)JKRAllocFromHeap((heap), fileSizeAligned, 32);
if (mem == NULL) {
if (hasAllocated == true) {
i_JKRFree(dst);
JKRFree(dst);
return NULL;
}
}
@@ -114,7 +114,7 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
if (readBytes == -3 || !isErrorRetry()) {
if (hasAllocated == true) {
i_JKRFree(dst);
JKRFree(dst);
}
return NULL;
}
@@ -136,7 +136,7 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
if (readBytes == -3 || !isErrorRetry()) {
if (hasAllocated == true) {
i_JKRFree(dst);
JKRFree(dst);
}
return NULL;
}
@@ -166,28 +166,28 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch
if (readBytes == -3 || !isErrorRetry()) {
if (hasAllocated == true)
i_JKRFree(dst);
JKRFree(dst);
i_JKRFree(mem);
JKRFree(mem);
return NULL;
}
VIWaitForRetrace();
}
JKRDecompress(mem, dst, expandSize, offset);
i_JKRFree(mem);
JKRFree(mem);
return dst;
} else if (compression == COMPRESSION_YAZ0) {
if (JKRDecompressFromDVD(dvdFile, dst, fileSizeAligned, expandSize, offset, 0) != 0u)
{
if (hasAllocated)
i_JKRFree(dst);
JKRFree(dst);
dst = NULL;
}
return dst;
}
else if (hasAllocated)
{
i_JKRFree(dst);
JKRFree(dst);
dst = NULL;
}
return NULL;
@@ -241,9 +241,9 @@ static int JKRDecompressFromDVD(JKRDvdFile* dvdFile, void* dst, u32 fileSize, u3
u8 *data = firstSrcData();
u32 result = (data != NULL) ? decompSZS_subroutine(data, (u8 *)dst) : -1; // figure out correct datatypes
u32 decompressedSize = ((u32*)data)[1];
i_JKRFree(szpBuf);
JKRFree(szpBuf);
if (refBuf) {
i_JKRFree(refBuf);
JKRFree(refBuf);
}
DCStoreRangeNoSync(dst, decompressedSize);
OSUnlockMutex(&decompMutex);
+1 -1
View File
@@ -53,7 +53,7 @@ JKRExpHeap* JKRExpHeap::create(u32 size, JKRHeap* parent, bool errorFlag) {
new (memory) JKRExpHeap(dataPtr, alignedSize - expHeapSize, parent, errorFlag);
if (newHeap == NULL) {
i_JKRFree(memory);
JKRFree(memory);
return NULL;
}
+1 -1
View File
@@ -67,7 +67,7 @@ JKRThread::~JKRThread() {
JKRFreeToHeap(mHeap, mStackMemory);
JKRFreeToHeap(mHeap, mThreadRecord);
}
i_JKRFree(mMessages);
JKRFree(mMessages);
}
/* 802B3FD4-802B4000 .text start__9JKRThreadFPv */
+6 -6
View File
@@ -834,13 +834,13 @@ void JPADraw::drawParticle() {
JPABaseEmitter * emtr = dc.pbe;
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = emtr->mActiveParticles.getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execPtclVisNum; i++)
mpExecPtclVis[i]->exec(&dc, ptcl);
}
} else {
for (JSULink<JPABaseParticle> * link = emtr->mActiveParticles.getLast(); link != NULL; link = link->getPrev()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execPtclVisNum; i++)
mpExecPtclVis[i]->exec(&dc, ptcl);
}
@@ -936,13 +936,13 @@ void JPADraw::zDrawParticle() {
JPABaseEmitter * emtr = dc.pbe;
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = emtr->mActiveParticles.getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execPtclVisNum; i++)
mpExecPtclVis[i]->exec(&dc, ptcl);
}
} else {
for (JSULink<JPABaseParticle> * link = emtr->mActiveParticles.getLast(); link != NULL; link = link->getPrev()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execPtclVisNum; i++)
mpExecPtclVis[i]->exec(&dc, ptcl);
}
@@ -986,13 +986,13 @@ void JPADraw::zDrawChild() {
JPABaseEmitter * emtr = dc.pbe;
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = emtr->mChildParticles.getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execChldVisNum; i++)
mpExecChldVis[i]->exec(&dc, ptcl);
}
} else {
for (JSULink<JPABaseParticle> * link = emtr->mChildParticles.getLast(); link != NULL; link = link->getPrev()) {
JPABaseParticle * ptcl = link->getObject();
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
for (s32 i = 0; i < execChldVisNum; i++)
mpExecChldVis[i]->exec(&dc, ptcl);
}
+1 -2
View File
@@ -302,10 +302,9 @@ void JPAFieldManager::deleteField(JPAFieldData* data) {
/* 8025BB20-8025BB74 .text deleteAllField__15JPAFieldManagerFv */
void JPAFieldManager::deleteAllField() {
/* Nonmatching */
for (JSULink<JPAFieldData>* link = mList.getFirst(); link != NULL;) {
JSULink<JPAFieldData>* next = link->getNext();
JPAFieldData* data = link->getObject();
JPAFieldData* data = (JPAFieldData*)link->getObject();
deleteField(data);
link = next;
}
+10 -10
View File
@@ -27,7 +27,6 @@ s32 dEvt_control_c::orderOld(u16 eventType, u16 priority, u16 flag, u16 hindFlag
/* 8006FEE8-8007002C .text order__14dEvt_control_cFUsUsUsUsPvPvsUc */
s32 dEvt_control_c::order(u16 eventType, u16 priority, u16 flag, u16 hindFlag, void* ac1, void* ac2, s16 eventIdx, u8 eventInfoIdx) {
/* Nonmatching */
if (mOrderCount >= 8)
return FALSE;
@@ -54,13 +53,14 @@ s32 dEvt_control_c::order(u16 eventType, u16 priority, u16 flag, u16 hindFlag, v
mFirstOrderIdx = mOrderCount;
pNewOrder->mNextOrderIdx = queueIdx;
} else {
while ((queueIdx = pQueue->mNextOrderIdx) >= 0) {
pQueue = &mOrder[queueIdx];
if (pNewOrder->mPriority < pQueue->mPriority)
s8 nextQueueIdx;
while ((nextQueueIdx = pQueue->mNextOrderIdx) >= 0) {
if (pNewOrder->mPriority < mOrder[pQueue->mNextOrderIdx].mPriority)
break;
pQueue = &mOrder[nextQueueIdx];
}
pNewOrder->mNextOrderIdx = queueIdx;
pNewOrder->mNextOrderIdx = nextQueueIdx;
pQueue->mNextOrderIdx = mOrderCount;
}
}
@@ -213,10 +213,10 @@ BOOL dEvt_control_c::catchCheck(dEvt_order_c* order) {
/* 800707C0-80070870 .text talkEnd__14dEvt_control_cFv */
BOOL dEvt_control_c::talkEnd() {
fopAc_ac_c* actor1 = convPId(mPt1);
fopAc_ac_c* actor1 = getPt1();
if (actor1 != NULL)
actor1->mEvtInfo.setCommand(dEvtCmd_NONE_e);
fopAc_ac_c* actor2 = convPId(mPt2);
fopAc_ac_c* actor2 = getPt2();
if (actor2 != NULL)
actor2->mEvtInfo.setCommand(dEvtCmd_NONE_e);
if (mEventId != -1) {
@@ -265,10 +265,10 @@ BOOL dEvt_control_c::demoCheck(dEvt_order_c* order) {
/* 800709C0-80070A64 .text demoEnd__14dEvt_control_cFv */
BOOL dEvt_control_c::demoEnd() {
fopAc_ac_c* actor1 = convPId(mPt1);
fopAc_ac_c* actor1 = getPt1();
if (actor1 != NULL)
actor1->mEvtInfo.setCommand(dEvtCmd_NONE_e);
fopAc_ac_c* actor2 = convPId(mPt2);
fopAc_ac_c* actor2 = getPt2();
if (actor2 != NULL)
actor2->mEvtInfo.setCommand(dEvtCmd_NONE_e);
if (mEventId != -1) {
@@ -300,7 +300,7 @@ BOOL dEvt_control_c::potentialCheck(dEvt_order_c* order) {
BOOL dEvt_control_c::doorCheck(dEvt_order_c* order) {
if (commonCheck(order, dEvtCnd_CANDOOR_e, dEvtCmd_INDOOR_e)) {
mMode = dEvtMode_DEMO_e;
fopAc_ac_c* actor2 = convPId(mPt2);
fopAc_ac_c* actor2 = getPt2();
if (mEventId == -1 && actor2 != NULL && actor2->mEvtInfo.getEventId() != -1)
mEventId = actor2->mEvtInfo.getEventId();
if (mEventId != -1 && g_dComIfG_gameInfo.play.getEvtManager().getEventData(mEventId) != NULL) {
+2 -2
View File
@@ -95,8 +95,8 @@ BOOL dScnMenu_IsDelete(menu_of_scene_class*) {
BOOL dScnMenu_Delete(menu_of_scene_class* i_this) {
JUTDbPrint::getManager()->changeFont(JFWSystem::systemFont);
delete i_this->field_0x1dc;
i_JKRFree(i_this->info);
i_JKRFree(i_this->field_0x1d8);
JKRFree(i_this->info);
JKRFree(i_this->field_0x1d8);
g_HIO.mDisplayFlag &= ~2;
g_HIO.mDisplayFlag &= ~2;
dComIfGs_setRestartOption(0);
+1 -1
View File
@@ -1014,7 +1014,7 @@ void mDoExt_MtxCalcAnmBlendTbl::calc(u16 param_0) {
if (mNum == 1) {
J3DTransformInfo info1;
mAnmRatio->getAnmTransform()->getTransform(param_0, &info1);
calcTransform(param_0, info1);
calcTransform(param_0, info1); // Doesn't match because J3DMtxCalcBasic's vtable is in the wrong order
return;
}
J3DTransformInfo info2;