From 42fa90ff7a56348706abd4072fb18713d21bec77 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sun, 30 Jan 2022 23:31:43 -0700 Subject: Match OS funcs (#152) * Matched osSyncPrintf.c * Matched contramread.c * Matched contramwrite.c * Matched osPfsInit and osPfsGetStatus --- src/code_800AF9B0.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/code_800AF9B0.c') diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c index 87fbf8617..71e3543eb 100644 --- a/src/code_800AF9B0.c +++ b/src/code_800AF9B0.c @@ -2630,7 +2630,7 @@ s32 func_800B4520(void) { #ifdef MIPS_TO_C //generated by mips_to_c commit cc33060578851a93591ed035e96ffd1f15c765f1 -? func_800CF774(? *, s32); /* extern */ +? rmonPrintf(? *, s32); /* extern */ extern ? D_800F2BE8; extern ? D_800F2BF8; extern ? D_800F2C0C; @@ -2643,9 +2643,9 @@ UNUSED void func_800B4560(s32 arg0, s32 arg1) { s32 sp18; sp18 = D_8018D9C0; - func_800CF774(&D_800F2BE8, D_80162DE0); - func_800CF774(&D_800F2BF8, (s32) *(&D_8018EE16 + (arg0 << 7))); - func_800CF774(&D_800F2C0C, (s32) ((arg1 << 7) + sp18)->unk6); + rmonPrintf(&D_800F2BE8, D_80162DE0); + rmonPrintf(&D_800F2BF8, (s32) *(&D_8018EE16 + (arg0 << 7))); + rmonPrintf(&D_800F2C0C, (s32) ((arg1 << 7) + sp18)->unk6); } #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B4560.s") @@ -3467,7 +3467,7 @@ s32 check_for_controller_pak(s32 controller) { #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 check_for_controller_pak(s32); // extern -s32 func_800CE720(? *, OSPfs *, ?); // extern +s32 osPfsInit(? *, OSPfs *, ?); // extern extern u16 D_800E86F0; extern u32 D_800E86F4; extern s8 D_800E86F8; @@ -3512,7 +3512,7 @@ block_9: if (check_for_controller_pak(0) == 0) { return 1; } - temp_v0_3 = func_800CE720(&gSIEventMesgQueue, &D_8018E868, 0); + temp_v0_3 = osPfsInit(&gSIEventMesgQueue, &D_8018E868, 0); if (temp_v0_3 != 0) { if (temp_v0_3 != 1) { if (temp_v0_3 != 4) { @@ -3560,7 +3560,7 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B5B94.s") #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 check_for_controller_pak(?); // extern -s32 func_800CE720(? *, OSPfs *, ?); // extern +s32 osPfsInit(? *, OSPfs *, ?); // extern extern u16 D_800E86F0; extern u32 D_800E86F4; extern s8 D_800E86FC; @@ -3602,7 +3602,7 @@ block_8: if (check_for_controller_pak(1) == 0) { return 1; } - temp_v0_3 = func_800CE720(&gSIEventMesgQueue, &D_8018E8D0, 1); + temp_v0_3 = osPfsInit(&gSIEventMesgQueue, &D_8018E8D0, 1); if (temp_v0_3 != 0) { if (temp_v0_3 != 1) { if (temp_v0_3 != 4) { @@ -3649,7 +3649,7 @@ s32 func_800B5F30(void) { return -4; } if (check_for_controller_pak(0) != 0) { - sp1C = func_800CE720(&gSIEventMesgQueue, &D_8018E868, 0); + sp1C = osPfsInit(&gSIEventMesgQueue, &D_8018E868, 0); if (osPfsNumFiles(&D_8018E868, &D_8018EB78, &D_8018EB7C) != 0) { D_800E86F8 = 0; return -2; @@ -3674,7 +3674,7 @@ s32 func_800B6014(void) { return -4; } if (check_for_controller_pak(1) != 0) { - temp_v0 = func_800CE720(&gSIEventMesgQueue, &D_8018E8D0, 1); + temp_v0 = osPfsInit(&gSIEventMesgQueue, &D_8018E8D0, 1); if (temp_v0 == 0) { D_800E86FC = 1; } @@ -4116,7 +4116,7 @@ s32 func_800B6A68(void) { //generated by mips_to_c commit cc33060578851a93591ed035e96ffd1f15c765f1 s32 check_for_controller_pak(?); /* extern */ ? func_800B6A68(); /* extern */ -s32 func_800CE720(? *, ? *, ?); /* extern */ +s32 osPfsInit(? *, ? *, ?); /* extern */ s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */ s32 osPfsFreeBlocks(? *, s32 *); /* extern */ s32 osPfsNumFiles(? *, s32 *, s32 *); /* extern */ @@ -4135,7 +4135,7 @@ extern ? gSIEventMesgQueue; UNUSED void func_800B6AF8(void) { s32 temp_t1; - if ((check_for_controller_pak(0) != 0) && (func_800CE720(&gSIEventMesgQueue, &D_8018E868, 0) == 0) && (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) != 0) && (osPfsNumFiles(&D_8018E868, &D_8018EB78, &D_8018EB7C) == 0) && (D_8018EB7C < D_8018EB78) && (osPfsFreeBlocks(&D_8018E868, &gControllerPakNumPagesFree) == 0)) { + if ((check_for_controller_pak(0) != 0) && (osPfsInit(&gSIEventMesgQueue, &D_8018E868, 0) == 0) && (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) != 0) && (osPfsNumFiles(&D_8018E868, &D_8018EB78, &D_8018EB7C) == 0) && (D_8018EB7C < D_8018EB78) && (osPfsFreeBlocks(&D_8018E868, &gControllerPakNumPagesFree) == 0)) { temp_t1 = (s32) gControllerPakNumPagesFree >> 8; gControllerPakNumPagesFree = temp_t1; if (temp_t1 >= 0x79) { -- cgit v1.2.3