Decompile `nuScWaitTaskReady`

This commit is contained in:
gijs 2023-10-20 12:25:45 +02:00
parent ad4a954aab
commit 05b93a6faa
1 changed files with 12 additions and 22 deletions

View File

@ -107,30 +107,20 @@ INCLUDE_ASM(const s32, "_ob_past_brick", nuScExecuteGraphics);
// }
// }
// extern struct {
// OSMesgQueue mq;
// u8 padding[0x549];
// u8 b;
// } D_800E8C2C;
void nuScWaitTaskReady(NUScTask* task) {
NUScClient client;
void* fb = task->framebuffer;
INCLUDE_ASM(const s32, "_ob_past_brick", nuScWaitTaskReady);
if(nusched.frameBufferNum == 1) {
return;
}
/* 1989C 8008949C */
// void nuScWaitTaskReady(void** buffers)
// {
// Stack__dma_load_loop sp10;
// void* temp_s0 = buffers[3];
// if (D_800E8C2C.b != 1)
// {
// while(osViGetNextFramebuffer() == temp_s0 || osViGetCurrentFramebuffer() == temp_s0)
// {
// nuScAddClient(&sp10, &D_800E8C2C.mq, 1);
// osRecvMesg(&D_800E8C2C.mq, NULL, 1);
// nuScRemoveClient(&sp10);
// }
// }
// }
while (osViGetNextFramebuffer() == fb || osViGetCurrentFramebuffer() == fb) {
nuScAddClient(&client, &nusched.waitMQ, NU_SC_RETRACE_MSG);
osRecvMesg(&nusched.waitMQ, NULL, OS_MESG_BLOCK);
nuScRemoveClient(&client);
}
}
INCLUDE_ASM(const s32, "_ob_past_brick", nuScSetFrameBufferNum);