d_a_dmidna OK / f_op + misc cleanup (#276)

* some f_op / d_insect cleanup

* rename some vars according to tww

* d_a_dmidna OK

* remove asm
This commit is contained in:
TakaRikka
2023-02-10 09:07:47 -08:00
committed by GitHub
parent 68f5b6d05a
commit 67a2c83b9b
73 changed files with 5635 additions and 20433 deletions
+16 -16
View File
@@ -477,21 +477,21 @@ SECTION_SDATA2 static f64 lit_3878 = 4503601774854144.0 /* cast s32 to float */;
/* 8000D320-8000D428 007C60 0108+00 6/6 0/0 0/0 .text initPlay__14mDoExt_baseAnmFsifss */
// matches with literals
#ifdef NONMATCHING
int mDoExt_baseAnm::initPlay(s16 i_frameMax, int i_attribute, f32 i_rate, s16 i_start,
s16 param_4) {
mFrameCtrl.setStart(i_start);
int mDoExt_baseAnm::initPlay(s16 i_frameMax, int i_attribute, f32 i_rate, s16 i_startF,
s16 i_endF) {
mFrameCtrl.setStart(i_startF);
if (param_4 < 0) {
if (i_endF < 0) {
mFrameCtrl.init(i_frameMax);
} else {
mFrameCtrl.init(param_4);
mFrameCtrl.init(i_endF);
}
mFrameCtrl.setAttribute(i_attribute);
mFrameCtrl.setRate(i_rate);
if (i_rate >= 0.0f) {
mFrameCtrl.setFrame(i_start);
mFrameCtrl.setFrame(i_startF);
} else {
mFrameCtrl.setFrame(mFrameCtrl.getEnd());
}
@@ -532,7 +532,7 @@ asm int mDoExt_baseAnm::play() {
/* 8000D47C-8000D518 007DBC 009C+00 0/0 3/3 6/6 .text
* init__13mDoExt_bpkAnmFP16J3DMaterialTableP11J3DAnmColoriifss */
int mDoExt_bpkAnm::init(J3DMaterialTable* i_matTable, J3DAnmColor* i_bpk, int i_anmPlay,
int i_attribute, f32 i_rate, s16 i_start, s16 param_6) {
int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF) {
mpAnm = i_bpk;
mpAnm->searchUpdateMaterialID(i_matTable);
@@ -544,7 +544,7 @@ int mDoExt_bpkAnm::init(J3DMaterialTable* i_matTable, J3DAnmColor* i_bpk, int i_
attribute = i_attribute;
}
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_start, param_6);
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_startF, i_endF);
}
return 1;
@@ -560,7 +560,7 @@ void mDoExt_bpkAnm::entry(J3DMaterialTable* i_matTable, f32 i_frame) {
/* 8000D54C-8000D5E8 007E8C 009C+00 0/0 5/5 28/28 .text
* init__13mDoExt_btpAnmFP16J3DMaterialTableP16J3DAnmTexPatterniifss */
int mDoExt_btpAnm::init(J3DMaterialTable* i_matTable, J3DAnmTexPattern* i_btp, int i_anmPlay,
int i_attribute, f32 i_rate, s16 i_start, s16 param_6) {
int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF) {
mpAnm = i_btp;
mpAnm->searchUpdateMaterialID(i_matTable);
@@ -572,7 +572,7 @@ int mDoExt_btpAnm::init(J3DMaterialTable* i_matTable, J3DAnmTexPattern* i_btp, i
attribute = i_attribute;
}
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_start, param_6);
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_startF, i_endF);
}
return 1;
@@ -600,7 +600,7 @@ asm void mDoExt_btpAnm::entry(J3DMaterialTable* param_0, s16 param_1) {
/* 8000D63C-8000D6D8 007F7C 009C+00 0/0 6/6 137/137 .text
* init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss */
int mDoExt_btkAnm::init(J3DMaterialTable* i_matTable, J3DAnmTextureSRTKey* i_btk, int i_anmPlay,
int i_attribute, f32 i_rate, s16 i_start, s16 param_6) {
int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF) {
mpAnm = i_btk;
mpAnm->searchUpdateMaterialID(i_matTable);
@@ -612,7 +612,7 @@ int mDoExt_btkAnm::init(J3DMaterialTable* i_matTable, J3DAnmTextureSRTKey* i_btk
attribute = i_attribute;
}
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_start, param_6);
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_startF, i_endF);
}
return 1;
@@ -628,7 +628,7 @@ void mDoExt_btkAnm::entry(J3DMaterialTable* i_matTable, f32 i_frame) {
/* 8000D70C-8000D7A8 00804C 009C+00 0/0 8/8 112/112 .text
* init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss */
int mDoExt_brkAnm::init(J3DMaterialTable* i_matTable, J3DAnmTevRegKey* i_brk, int i_anmPlay,
int i_attribute, f32 i_rate, s16 i_start, s16 param_6) {
int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF) {
mpAnm = i_brk;
mpAnm->searchUpdateMaterialID(i_matTable);
@@ -640,7 +640,7 @@ int mDoExt_brkAnm::init(J3DMaterialTable* i_matTable, J3DAnmTevRegKey* i_brk, in
attribute = i_attribute;
}
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_start, param_6);
return initPlay(mpAnm->getFrameMax(), attribute, i_rate, i_startF, i_endF);
}
return 1;
@@ -2404,8 +2404,8 @@ void mDoExt_destroyExpHeap(JKRExpHeap* i_heap) {
/* 8000F1CC-8000F1EC 009B0C 0020+00 1/1 78/78 2/2 .text mDoExt_setCurrentHeap__FP7JKRHeap
*/
JKRHeap* mDoExt_setCurrentHeap(JKRHeap* i_heap) {
return i_heap->becomeCurrentHeap();
JKRHeap* mDoExt_setCurrentHeap(JKRHeap* heap) {
return heap->becomeCurrentHeap();
}
/* 8000F1EC-8000F1F4 -00001 0008+00 0/0 0/0 0/0 .text mDoExt_getCurrentHeap__Fv */
-4
View File
@@ -280,10 +280,6 @@ void mDoMch_HeapCheckAll() {
myHeapCheckRecursive(JKRHeap::sRootHeap);
}
static u8 debug_key0;
static u8 debug_key1;
static u8 debug_key2;
/* 8000B68C-8000B73C 005FCC 00B0+00 1/1 0/0 0/0 .text developKeyCheck__FUlUl */
static int developKeyCheck(u32 btnTrig, u32 btnHold) {
static u8 key_link;
+10 -10
View File
@@ -233,8 +233,8 @@ OSTime mDoMain::sHungUpTime;
/* 80450B19 0001+00 data_80450B19 None */
/* 80450B1A 0002+00 data_80450B1A None */
static bool mDisplayHeapSize;
static u8 sDisplayHeap;
static bool sCheckHeap;
static u8 mSelectHeapBar;
static bool mCheckHeap;
/* 80005AD8-80005D4C 000418 0274+00 1/1 0/0 0/0 .text debugDisplay__Fv */
void debugDisplay() {
@@ -246,8 +246,8 @@ void debugDisplay() {
"", "/ MaxFree", "/HeapSize", "Blk/Bytes", "Blk/Bytes",
};
if (sDisplayHeap >= 1 && sDisplayHeap <= 6) {
HeapCheckTable[sDisplayHeap - 1]->heapDisplay();
if (mSelectHeapBar >= 1 && mSelectHeapBar <= 6) {
HeapCheckTable[mSelectHeapBar - 1]->heapDisplay();
}
if (mDoMain::mHeapBriefType == 5) {
@@ -428,7 +428,7 @@ s32 LOAD_COPYDATE(void*) {
static void debug() {
if (mDoMain::developmentMode) {
if (sCheckHeap) {
if (mCheckHeap) {
CheckHeap(PAD_3);
}
@@ -745,15 +745,15 @@ extern u8 data_80450B90[4 + 4 /* padding */];
u8 data_80450B90[4 + 4 /* padding */];
/* 80450B98-80450B9C -00001 0004+00 0/0 6/6 0/0 .sbss None */
bool sOSReportDisabled;
bool __OSReport_disable;
bool data_80450B99;
bool __OSReport_Error_disable;
bool data_80450B9A;
bool __OSReport_Warning_disable;
bool data_80450B9B;
bool __OSReport_System_disable;
/* 80450B9C-80450BA0 00009C 0004+00 0/0 3/3 0/0 .sbss None */
bool sOSReportForceEnable;
bool __OSReport_enable;
/* 803739A0-803739A0 000000 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+8 -8
View File
@@ -72,22 +72,22 @@ void OSAttention(char* fmt, ...) {
/* 80006894-800068A0 0011D4 000C+00 0/0 1/1 0/0 .text OSReportDisable */
void OSReportDisable() {
sOSReportDisabled = true;
__OSReport_disable = true;
}
/* 800068A0-800068AC 0011E0 000C+00 0/0 1/1 0/0 .text OSReportEnable */
void OSReportEnable() {
sOSReportDisabled = false;
__OSReport_disable = false;
}
/* 800068AC-800068B8 0011EC 000C+00 4/4 0/0 0/0 .text OSReportForceEnableOn */
void OSReportForceEnableOn() {
sOSReportForceEnable = true;
__OSReport_enable = true;
}
/* 800068B8-800068C4 0011F8 000C+00 4/4 0/0 0/0 .text OSReportForceEnableOff */
void OSReportForceEnableOff() {
sOSReportForceEnable = false;
__OSReport_enable = false;
}
/* ############################################################################################## */
@@ -163,7 +163,7 @@ void mDoPrintf_VReport(const char* fmt, va_list args) {
if (!print_initialized) {
OSReportInit();
}
if (sOSReportForceEnable || !sOSReportDisabled) {
if (__OSReport_enable || !__OSReport_disable) {
OSThread* currentThread = mDoExt_GetCurrentRunningThread__Fv();
if (__OSReport_MonopolyThread == NULL || __OSReport_MonopolyThread == currentThread) {
mDoPrintf_vprintf(fmt, args);
@@ -204,7 +204,7 @@ void OSReport_FatalError(char* fmt, ...) {
/* 80006C0C-80006CEC 00154C 00E0+00 0/0 31/31 10/10 .text OSReport_Error */
void OSReport_Error(char* fmt, ...) {
print_errors++;
if (!data_80450B99) {
if (!__OSReport_Error_disable) {
va_list args;
va_start(args, fmt);
OSReportForceEnableOn();
@@ -220,7 +220,7 @@ void OSReport_Error(char* fmt, ...) {
/* 80006CEC-80006DCC 00162C 00E0+00 0/0 6/6 0/0 .text OSReport_Warning */
void OSReport_Warning(char* fmt, ...) {
print_warings++;
if (!data_80450B9A) {
if (!__OSReport_Warning_disable) {
va_list args;
va_start(args, fmt);
OSReportForceEnableOn();
@@ -236,7 +236,7 @@ void OSReport_Warning(char* fmt, ...) {
/* 80006DCC-80006E7C 00170C 00B0+00 0/0 1/1 0/0 .text OSReport_System */
void OSReport_System(char* fmt, ...) {
print_systems++;
if (!data_80450B9B) {
if (!__OSReport_System_disable) {
va_list args;
va_start(args, fmt);
OSReportForceEnableOn();