ogrebattle64/src/_ob_past_brick.c

138 lines
3.5 KiB
C

#include "common.h"
#include "nu/nusys.h"
INCLUDE_ASM(const s32, "_ob_past_brick", nuScCreateScheduler);
/* 192F0 80088EF0*/
OSMesgQueue* nuScGetAudioMQ() {
return &nusched.audioRequestMQ;
}
OSMesgQueue* nuScGetGfxMQ() {
return &nusched.graphicsRequestMQ;
}
INCLUDE_ASM(const s32, "_ob_past_brick", nuScEventHandler);
INCLUDE_ASM(const s32, "_ob_past_brick", nuScAddClient);
/* 19454 80089054 */
// void nuScAddClient(Stack__dma_load_loop* arg0, OSMesgQueue* mq, s16 flags)
// {
// s32 mask = osSetIntMask(OS_IM_NONE);
// arg0->mq = mq;
// arg0->next = D_800E9178[0];
// arg0->flags = flags;
// D_800E9178[0] = arg0;
// if ((flags & 2) && (nuScPreNMIFlag != 0)) {
// osSendMesg(mq, (u8*)(&D_800E9178) - 0x666, OS_MESG_NOBLOCK);
// }
// osSetIntMask(mask);
// }
INCLUDE_ASM(const s32, "_ob_past_brick", func_800890E4);
INCLUDE_ASM(const s32, "_ob_past_brick", nuScRemoveClient);
INCLUDE_ASM(const s32, "_ob_past_brick", nuScEventBroadcast);
INCLUDE_ASM(const s32, "_ob_past_brick", nuScExecuteAudio);
INCLUDE_ASM(const s32, "_ob_past_brick", __thread_80089358);
INCLUDE_ASM(const s32, "_ob_past_brick", nuScExecuteGraphics);
// void nuScExecuteGraphics(void) {
// typedef struct {
// /* 0x00 */ s32 field_0x0;
// /* 0x04 */ s32 field_0x4;
// /* 0x08 */ s32 field_0x8;
// /* 0x1C */ u8 field_0x1c[0x42];
// /* 0x50 */ OSMesgQueue* field_0x50;
// } Stack0;
// Stack0* sp10;
// void* sp14;
// while(1) {
// osRecvMesg(&MQ_800E8B4C.field_0x0, &sp10, 1);
// if (!(nuScPreNMIFlag & 2)) {
// func_8008949C(sp10);
// osWritebackDCacheAll();
// osSendMesg(&MQ_800B9C40, sp10, OS_MESG_BLOCK);
// osRecvMesg(&MQ_800E8B4C.field_0x70, &sp14, OS_MESG_BLOCK);
// osSendMesg(&MQ_800B9C40, NULL, OS_MESG_BLOCK);
// if (!(sp10->field_0x8 & 2)) {
// osRecvMesg(&MQ_800E8B4C.field_0xa8, &sp14, OS_MESG_BLOCK);
// }
// }
// osSendMesg(sp10->field_0x50, sp10, OS_MESG_BLOCK);
// }
// }
// extern struct {
// OSMesgQueue mq;
// u8 padding[0x549];
// u8 b;
// } D_800E8C2C;
INCLUDE_ASM(const s32, "_ob_past_brick", func_8008949C);
/* 1989C 8008949C */
// void func_8008949C(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);
// }
// }
// }
INCLUDE_ASM(const s32, "_ob_past_brick", nuScSetFrameBufferNum);
// void func_80089528(s8 arg0) {
// D_800E918D = arg0;
// }
// extern u8 D_800E918C;
INCLUDE_ASM(const s32, "_ob_past_brick", func_80089534);
/* 19934 80089534 */
// u8 func_80089534(void) {
// return D_800E918C;
// }
INCLUDE_ASM(const s32, "_ob_past_brick", __thread_80089540);
INCLUDE_ASM(const s32, "_ob_past_brick", __start_thread_800B9C88);
INCLUDE_ASM(const s32, "_ob_past_brick", __something_display_list);
INCLUDE_ASM(const s32, "_ob_past_brick", func_80089990);
/* 19D90 80089990 */
// void func_80089990(void (*arg0)(s32)) {
// s32 mask;
// func_80089A10();
// mask = osSetIntMask(OS_IM_NONE);
// D_800AA090 = arg0;
// osSetIntMask(mask);
// }