Match several functions (#162)

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-02-13 03:12:06 -05:00
committed by GitHub
parent 5205b09751
commit af8ca42a0c
11 changed files with 136 additions and 605 deletions
+126 -240
View File
@@ -4467,28 +4467,12 @@ loop_6:
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099EC4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_8018DEE0;
extern ? D_8018E060;
void func_8009A344(void) {
? *temp_v1;
? *phi_v1;
phi_v1 = &D_8018DEE0;
do {
temp_v1 = phi_v1 + 0x60;
temp_v1->unk-3C = 0;
temp_v1->unk-24 = 0;
temp_v1->unk-C = 0;
temp_v1->unk-54 = 0;
phi_v1 = temp_v1;
} while (temp_v1 != &D_8018E060);
s32 index;
for(index = 0; index < D_8018DEE0_SIZE; index++){
D_8018DEE0[index].visible = 0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A344.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 0ca3d5f5fa5e3d957908269ac1535e7d4f12bce9
@@ -7220,28 +7204,12 @@ void func_8009E5FC(s32 arg0) {
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009E5FC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_8018D9E0;
extern ? D_8018DEE0;
void func_8009E620(void) {
? *temp_v1;
? *phi_v1;
phi_v1 = &D_8018D9E0;
do {
temp_v1 = phi_v1 + 0xA0;
temp_v1->unk-78 = 0;
temp_v1->unk-50 = 0;
temp_v1->unk-28 = 0;
temp_v1->unk-A0 = 0;
phi_v1 = temp_v1;
} while (temp_v1 != &D_8018DEE0);
s32 index;
for(index = 0; index < D_8018D9E0_SIZE; index++){
D_8018D9E0[index].type = 0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009E620.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 054f217e0ef630f2a2a76ec70a84ce37369571c0
@@ -12256,34 +12224,24 @@ void func_800A761C(struct_8018D9E0_entry *arg0) {
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A761C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 054f217e0ef630f2a2a76ec70a84ce37369571c0
void func_800A7790(struct_8018D9E0_entry *arg0) {
s32 sp38;
struct_802850C0_entry *sp2C;
f32 temp_f0;
f32 temp_f0_2;
s32 temp_t0;
s8 temp_v1;
struct_802850C0_entry *temp_v0;
f32 someScaling;
s32 creditIndex;
s8 slideDirection;
UNUSED s32 pad;
temp_t0 = arg0->type - 0x190;
temp_v0 = &D_802850C0[temp_t0];
sp2C = temp_v0;
sp38 = temp_t0;
set_text_color((s32) temp_v0->textColor);
temp_v1 = temp_v0->slideDirection;
if ((temp_v1 == 0) || (temp_v1 != 1)) {
temp_f0 = temp_v0->textScaling;
func_800936B8(arg0->column, arg0->row, D_802854B0[temp_t0], (s32) ((f32) arg0->unk1C * temp_f0), (bitwise f32) arg0->unk24 * temp_f0, temp_f0);
} else {
temp_f0_2 = temp_v0->textScaling;
func_80093324(arg0->column, arg0->row, D_802854B0[temp_t0], (s32) ((f32) arg0->unk1C * temp_f0_2), (bitwise f32) arg0->unk24 * temp_f0_2, temp_f0_2);
creditIndex = arg0->type - 0x190;
set_text_color(D_802850C0[creditIndex].textColor);
slideDirection = D_802850C0[creditIndex].slideDirection;
if ((slideDirection == SLIDE_RIGHT) || (slideDirection != SLIDE_LEFT)) {
someScaling = D_802850C0[creditIndex].textScaling;
func_800936B8(arg0->column, arg0->row, D_802854B0[creditIndex], arg0->unk1C * someScaling, arg0->unk24 * someScaling, someScaling);
}
else {
someScaling = D_802850C0[creditIndex].textScaling;
func_80093324(arg0->column, arg0->row, D_802854B0[creditIndex], arg0->unk1C * someScaling, arg0->unk24 * someScaling, someScaling);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A7790.s")
#endif
// Originally func_800A7894
// Presumes that "number" is a 2 digit number. Convert it to a string
@@ -13331,227 +13289,155 @@ void func_800A90D4(s32 arg0, struct_8018D9E0_entry *arg1) {
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A90D4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800A9208(); // extern
? func_800A9278(s32, s32); // extern
void func_800A91D8(s32 arg0, s32 arg2) {
func_800A9208();
func_800A9278(arg0, arg2);
void func_800A91D8(struct_8018D9E0_entry *arg0, s32 columnTarget, s32 rowTarget) {
func_800A9208(arg0, columnTarget);
func_800A9278(arg0, rowTarget);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A91D8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
void func_800A9208(struct_8018D9E0_entry *arg0, s32 arg1) {
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v1;
s32 phi_v0;
void func_800A9208(struct_8018D9E0_entry *arg0, s32 columnTarget) {
s32 step = columnTarget - arg0->column;
temp_v1 = arg0->column;
temp_v0 = arg1 - temp_v1;
phi_v0 = temp_v0;
if (temp_v0 != 0) {
if (temp_v0 > 0) {
temp_v0_2 = (temp_v0 / 4) + 1;
phi_v0 = temp_v0_2;
if (temp_v0_2 >= 0x11) {
phi_v0 = 0x10;
if (step != 0) {
if (step > 0) {
step = (step / 4) + 1;
if (step >= 0x11) {
step = 0x10;
}
} else {
temp_v0_3 = (temp_v0 / 4) - 1;
phi_v0 = temp_v0_3;
if (temp_v0_3 < -0x10) {
phi_v0 = -0x10;
step = (step / 4) - 1;
if (step < -0x10) {
step = -0x10;
}
}
}
arg0->column = temp_v1 + phi_v0;
arg0->column += step;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9208.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
void func_800A9278(struct_8018D9E0_entry *arg0, s32 arg1) {
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v1;
s32 phi_v0;
void func_800A9278(struct_8018D9E0_entry *arg0, s32 rowTarget) {
s32 step = rowTarget - arg0->row;
temp_v1 = arg0->row;
temp_v0 = arg1 - temp_v1;
phi_v0 = temp_v0;
if (temp_v0 != 0) {
if (temp_v0 > 0) {
temp_v0_2 = (temp_v0 / 4) + 1;
phi_v0 = temp_v0_2;
if (temp_v0_2 >= 0x11) {
phi_v0 = 0x10;
if (step != 0) {
if (step > 0) {
step = (step / 4) + 1;
if (step >= 0x11) {
step = 0x10;
}
} else {
temp_v0_3 = (temp_v0 / 4) - 1;
phi_v0 = temp_v0_3;
if (temp_v0_3 < -0x10) {
phi_v0 = -0x10;
step = (step / 4) - 1;
if (step < -0x10) {
step = -0x10;
}
}
}
arg0->row = temp_v1 + phi_v0;
arg0->row += step;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9278.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
void func_800A92E8(struct_8018D9E0_entry *arg0, s32 arg1) {
s32 temp_t0;
s32 temp_t7;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v1;
s32 phi_v0;
s32 phi_v0_2;
s32 phi_v0_3;
s32 phi_v0_4;
void func_800A92E8(struct_8018D9E0_entry *arg0, s32 columnTarget) {
s32 step = columnTarget - arg0->column;
temp_v1 = arg0->column;
temp_v0 = arg1 - temp_v1;
if (temp_v0 != 0) {
if (temp_v0 > 0) {
temp_v0_2 = (temp_v0 / 4) + 1;
phi_v0 = temp_v0_2;
if (temp_v0_2 >= 0x11) {
phi_v0 = 0x10;
if (step != 0) {
if (step > 0) {
step = (step / 4) + 1;
if (step >= 0x11) {
step = 0x10;
}
phi_v0_2 = phi_v0;
if (phi_v0 < 8) {
phi_v0_2 = 8;
if (step < 8) {
step = 8;
}
temp_t7 = temp_v1 + phi_v0_2;
arg0->column = temp_t7;
if (arg1 < temp_t7) {
arg0->column = arg1;
arg0->column += step;
if (columnTarget < arg0->column) {
arg0->column = columnTarget;
}
} else {
temp_v0_3 = (temp_v0 / 4) - 1;
phi_v0_3 = temp_v0_3;
if (temp_v0_3 < -0x10) {
phi_v0_3 = -0x10;
step = (step / 4) - 1;
if (step < -0x10) {
step = -0x10;
}
phi_v0_4 = phi_v0_3;
if (phi_v0_3 < -8) {
phi_v0_4 = -8;
if (step < -8) {
step = -8;
}
temp_t0 = temp_v1 + phi_v0_4;
arg0->column = temp_t0;
if (temp_t0 < arg1) {
arg0->column = arg1;
arg0->column += step;
if (arg0->column < columnTarget) {
arg0->column = columnTarget;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A92E8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
void func_800A940C(struct_8018D9E0_entry *arg0, s32 arg1) {
s32 temp_lo;
s32 temp_t7;
s32 temp_t9;
s32 temp_v0;
s32 temp_v1;
s32 phi_v0;
s32 phi_v0_2;
s32 phi_v0_3;
s32 phi_v0_4;
// Appears to be a copy of func_800A9278
UNUSED void func_800A939C(struct_8018D9E0_entry *arg0, s32 rowTarget) {
s32 step = rowTarget - arg0->row;
temp_v1 = arg0->column;
temp_v0 = arg1 - temp_v1;
if (temp_v0 != 0) {
temp_lo = 0xC8 / temp_v0;
phi_v0 = temp_lo;
phi_v0_3 = temp_lo;
if (temp_lo > 0) {
if (temp_lo >= 0x19) {
phi_v0 = 0x18;
}
phi_v0_2 = phi_v0;
if (phi_v0 < 0x10) {
phi_v0_2 = 0x10;
}
temp_t7 = temp_v1 + phi_v0_2;
arg0->column = temp_t7;
if (arg1 < temp_t7) {
arg0->column = arg1;
if (step != 0) {
if (step > 0) {
step = (step / 4) + 1;
if (step >= 0x11) {
step = 0x10;
}
} else {
if (temp_lo < -0x18) {
phi_v0_3 = -0x18;
step = (step / 4) - 1;
if (step < -0x10) {
step = -0x10;
}
phi_v0_4 = phi_v0_3;
if (phi_v0_3 >= -0xF) {
phi_v0_4 = -0x10;
}
}
arg0->row += step;
}
void func_800A940C(struct_8018D9E0_entry *arg0, s32 columnTarget) {
s32 step = columnTarget - arg0->column;
if (step != 0) {
step = 0xC8 / step;
if (step > 0) {
if (step >= 0x19) {
step = 0x18;
}
temp_t9 = temp_v1 + phi_v0_4;
arg0->column = temp_t9;
if (temp_t9 < arg1) {
arg0->column = arg1;
if (step < 0x10) {
step = 0x10;
}
arg0->column += step;
if (columnTarget < arg0->column) {
arg0->column = columnTarget;
}
} else {
if (step < -0x18) {
step = -0x18;
}
if (step >= -0xF) {
step = -0x10;
}
arg0->column += step;
if (arg0->column < columnTarget) {
arg0->column = columnTarget;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A940C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 054f217e0ef630f2a2a76ec70a84ce37369571c0
void func_800A94C8(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2) {
s32 temp_v0;
s32 temp_v1;
s32 temp_v1_2;
s32 temp_v1_3;
s32 phi_v1;
void func_800A94C8(struct_8018D9E0_entry *arg0, s32 columnTarget, s32 arg2) {
s32 step;
temp_v0 = arg0->column;
temp_v1 = arg1 - temp_v0;
phi_v1 = temp_v1;
if (arg1 == temp_v0) {
arg0->column = temp_v0 + arg2;
return;
}
if (temp_v1 != 0) {
if (temp_v1 > 0) {
temp_v1_2 = (temp_v1 / 4) + 1;
phi_v1 = temp_v1_2;
if (temp_v1_2 >= 0x11) {
phi_v1 = 0x10;
}
} else {
temp_v1_3 = (temp_v1 / 4) - 1;
phi_v1 = temp_v1_3;
if (temp_v1_3 < -0x10) {
phi_v1 = -0x10;
if (columnTarget == arg0->column) {
arg0->column += arg2;
} else {
step = columnTarget - arg0->column;
if (step != 0) {
if (step > 0) {
step = (step / 4) + 1;
if (step >= 0x11) {
step = 0x10;
}
} else {
step = (step / 4) - 1;
if (step < -0x10) {
step = -0x10;
}
}
}
arg0->column -= step;
}
arg0->column = temp_v0 - phi_v1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A94C8.s")
#endif
void func_800A954C(struct_8018D9E0_entry *arg0) {
// Cycle lasts 26 (0x1A) frames
+10
View File
@@ -108,6 +108,7 @@ void func_80099E54();
void func_80099E60(MkTexture *, s32, s32);
void func_80099EC4();
void func_80099A70();
void func_8009A344();
void func_8009A594(s32, s32, MkAnimation*);
void func_8009A640(s32, s32, s32, MkAnimation*);
void func_8009A76C(s32, s32, s32, s32);
@@ -122,6 +123,7 @@ void func_8009C918();
void func_8009E1C0();
void func_8009E208();
void func_8009E258();
void func_8009E620();
void add_8018D9E0_entry(s32, s32, s32, s8);
void func_800A0AD0(struct_8018D9E0_entry*);
void func_800A11D0(struct_8018D9E0_entry*, s32, s32);
@@ -142,6 +144,7 @@ void func_800A7258(struct_8018D9E0_entry*);
void func_800A72FC(struct_8018D9E0_entry*);
void func_800A7448(struct_8018D9E0_entry*);
void func_800A75A0(struct_8018D9E0_entry*);
void func_800A7790(struct_8018D9E0_entry*);
void convert_number_to_ascii(s32, char*);
void write_dashes(char*);
void get_time_record_minutes(s32, char*);
@@ -152,6 +155,13 @@ void func_800A8250();
void func_800A86E8(struct_8018D9E0_entry*);
void func_800A8E14(struct_8018D9E0_entry*);
void func_800A8EC0(struct_8018D9E0_entry*);
void func_800A91D8(struct_8018D9E0_entry*, s32, s32);
void func_800A9208(struct_8018D9E0_entry*, s32);
void func_800A9278(struct_8018D9E0_entry*, s32);
void func_800A92E8(struct_8018D9E0_entry*, s32);
void func_800A939C(struct_8018D9E0_entry*, s32);
void func_800A940C(struct_8018D9E0_entry*, s32);
void func_800A94C8(struct_8018D9E0_entry*, s32, s32);
void func_800A954C(struct_8018D9E0_entry*);
void func_800AADD4(struct_8018D9E0_entry*);
void func_800AAE18(struct_8018D9E0_entry*);