Update code_802A3730.c (#58)

Match func_802A7728 and func_802A7940
This commit is contained in:
CoderStig 2021-11-16 05:10:39 -07:00 committed by GitHub
parent f959f03184
commit 3bfc8fbd88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 42 deletions

View File

@ -1575,9 +1575,6 @@ block_7:
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A7658.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
//? func_802A7658(s32, s32, ?, ?, s32, s32); // extern
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
extern uintptr_t gSegmentTable[];
@ -1585,7 +1582,6 @@ extern u16 sRenderedFramebuffer;
void func_802A7728(void) {
s16 temp_v0;
//uintptr_t temp_s1;
if (D_800DC52C == 3) {
D_800DC5DC = 0;
@ -1594,59 +1590,38 @@ void func_802A7728(void) {
}
D_800DC5E0 = 0;
temp_v0 = (s16) sRenderedFramebuffer - 1;
//temp_s1 = gSegmentTable;
if (temp_v0 < 0) {
temp_v0 = 2;
} else if (temp_v0 > 2) {
temp_v0 = 0;
}
//temp_s1 = VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]);
func_802A7658(D_800DC5DC, D_800DC5E0, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable+0x8800));
func_802A7658(D_800DC5DC + 64, D_800DC5E0, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[0x9800]));
func_802A7658(D_800DC5DC, D_800DC5E0 + 32, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[0xA800]));
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 32, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[0xB800]));
func_802A7658(D_800DC5DC, D_800DC5E0 + 64, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[0xC800]));
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 64, 64, 32, VIRTUAL_TO_PHYSICAL2(gPhysicalFramebuffers[temp_v0]), (u16 *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[0xD800]));
func_802A7658(D_800DC5DC, D_800DC5E0, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0x8800));
func_802A7658(D_800DC5DC + 64, D_800DC5E0, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0x9800));
func_802A7658(D_800DC5DC, D_800DC5E0 + 32, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0xA800));
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 32, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0xB800));
func_802A7658(D_800DC5DC, D_800DC5E0 + 64, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0xC800));
func_802A7658(D_800DC5DC + 64, D_800DC5E0 + 64, 64, 32, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5]+0xD800));
}
#else
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A7728.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_802A7658(s32, s32, ?, ?, s32, s32); // extern
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
extern ? gPhysicalFramebuffers;
extern ? gSegmentTable;
extern s16 sRenderedFramebuffer;
void func_802A7940(void) {
s16 temp_v0;
s32 *temp_s1;
s16 phi_v0;
if (D_800DC52C == 3) {
D_800DC5DC = 0;
} else {
D_800DC5DC = 0x80;
D_800DC5DC = 128;
}
D_800DC5E0 = 0;
temp_v0 = sRenderedFramebuffer - 1;
phi_v0 = temp_v0;
temp_v0 = (s16) sRenderedFramebuffer - 1;
if (temp_v0 < 0) {
phi_v0 = 2;
} else if (temp_v0 >= 3) {
phi_v0 = 0;
temp_v0 = 2;
} else if (temp_v0 > 2) {
temp_v0 = 0;
}
temp_s1 = (phi_v0 * 4) + &gPhysicalFramebuffers;
func_802A7658(D_800DC5DC, D_800DC5E0, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0xF800) | 0x80000000);
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0x10800) | 0x80000000);
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x20, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0x11800) | 0x80000000);
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x20, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0x12800) | 0x80000000);
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x40, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0x13800) | 0x80000000);
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x40, 0x40, 0x20, *temp_s1 | 0x80000000, (gSegmentTable.unk14 + 0x14800) | 0x80000000);
func_802A7658(D_800DC5DC, D_800DC5E0, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0xF800));
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0x10800));
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x20, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0x11800));
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x20, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0x12800));
func_802A7658(D_800DC5DC, D_800DC5E0 + 0x40, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0x13800));
func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x40, 0x40, 0x20, PHYSICAL_TO_VIRTUAL(gPhysicalFramebuffers[temp_v0]), PHYSICAL_TO_VIRTUAL(gSegmentTable[5] + 0x14800));
}
#else
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A7940.s")
#endif