diff --git a/Makefile b/Makefile index fc8bf100f..ed3e24d9f 100644 --- a/Makefile +++ b/Makefile @@ -78,6 +78,7 @@ $(B_DIR)/lib/ultra/io/vi.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/io/vigetcurrframebuf.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/io/vigetnextframebuf.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/io/visetevent.o: OPT_LVL := -O1 +$(B_DIR)/lib/ultra/os/createmesgqueue.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/os/destroythread.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/os/jammesg.o: OPT_LVL := -O1 $(B_DIR)/lib/ultra/os/recvmesg.o: OPT_LVL := -O1 diff --git a/src/lib/ultra/os/createmesgqueue.c b/src/lib/ultra/os/createmesgqueue.c index 12d2111e1..175be7fdb 100644 --- a/src/lib/ultra/os/createmesgqueue.c +++ b/src/lib/ultra/os/createmesgqueue.c @@ -1,17 +1,12 @@ #include +#include "game/data/data_000000.h" -GLOBAL_ASM( -glabel osCreateMesgQueue -/* 48340: 3c0e8006 */ lui $t6,%hi(__osThreadTail) -/* 48344: 3c0f8006 */ lui $t7,%hi(__osThreadTail) -/* 48348: 25ce0930 */ addiu $t6,$t6,%lo(__osThreadTail) -/* 4834c: 25ef0930 */ addiu $t7,$t7,%lo(__osThreadTail) -/* 48350: ac8e0000 */ sw $t6,0x0($a0) -/* 48354: ac8f0004 */ sw $t7,0x4($a0) -/* 48358: ac800008 */ sw $zero,0x8($a0) -/* 4835c: ac80000c */ sw $zero,0xc($a0) -/* 48360: ac860010 */ sw $a2,0x10($a0) -/* 48364: 03e00008 */ jr $ra -/* 48368: ac850014 */ sw $a1,0x14($a0) -/* 4836c: 00000000 */ nop -); +void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msg, s32 msgCount) +{ + mq->mtqueue = (OSThread *)&__osThreadTail; + mq->fullqueue = (OSThread *)&__osThreadTail; + mq->validCount = 0; + mq->first = 0; + mq->msgCount = msgCount; + mq->msg = msg; +}