1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

Match/Improve a bunch of non matchings (#342)

This commit is contained in:
Roman971 2020-08-23 23:50:30 +02:00 committed by GitHub
parent 281aaa0cb6
commit 49609dd78b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 137 additions and 2673 deletions

View file

@ -179,8 +179,6 @@ OSScTask* func_800C89D4(SchedContext* sc, OSScTask* task) {
return task;
}
#ifdef NON_MATCHING
// regalloc
s32 Sched_Schedule(SchedContext* sc, OSScTask** sp, OSScTask** dp, s32 state) {
s32 ret = state;
OSScTask* gfxTask = sc->gfxListHead;
@ -195,7 +193,7 @@ s32 Sched_Schedule(SchedContext* sc, OSScTask** sp, OSScTask** dp, s32 state) {
sc->audioListTail = NULL;
}
} else if (gfxTask != NULL) {
if (gfxTask->state & OS_SC_YIELDED || !(sc->gfxListHead->flags & OS_SC_NEEDS_RDP)) {
if (gfxTask->state & OS_SC_YIELDED || !(gfxTask->flags & OS_SC_NEEDS_RDP)) {
if (ret & OS_SC_SP) {
*sp = gfxTask;
ret &= ~OS_SC_SP;
@ -205,7 +203,7 @@ s32 Sched_Schedule(SchedContext* sc, OSScTask** sp, OSScTask** dp, s32 state) {
}
}
} else if (ret == (OS_SC_SP | OS_SC_DP)) {
if (sc->gfxListHead->framebuffer == NULL || func_800C89D4(sc, gfxTask) != NULL) {
if (gfxTask->framebuffer == NULL || func_800C89D4(sc, gfxTask) != NULL) {
*sp = *dp = gfxTask;
ret &= ~(OS_SC_SP | OS_SC_DP);
sc->gfxListHead = sc->gfxListHead->next;
@ -217,9 +215,6 @@ s32 Sched_Schedule(SchedContext* sc, OSScTask** sp, OSScTask** dp, s32 state) {
}
return ret;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/sched/Sched_Schedule.s")
#endif
void func_800C8BC4(SchedContext* sc, OSScTask* task) {
if (sc->pendingSwapBuf1 == NULL) {