Something went wrong. Try again.
Base for making Paper Mario (N64) mods, built on the decompilation docs.starhaven.dev/papermario-dx
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738#include "PR/osint.h"
int osSetTimer(OSTimer *t, OSTime countdown, OSTime interval, OSMesgQueue *mq, OSMesg msg) { OSTime time; OSTimer* next; u32 count; u32 value; u32 saveMask;
t->next = nullptr; t->prev = nullptr; t->interval = interval; t->value = (countdown != 0) ? countdown : interval; t->mq = mq; t->msg = msg;
saveMask = __osDisableInt(); if (__osTimerList->next == __osTimerList) {
} else { next = __osTimerList->next; count = osGetCount(); value = count - __osTimerCounter;
if (value < next->value) { next->value -= value; } else { next->value = 1; } }
time = __osInsertTimer(t); __osSetTimerIntr(__osTimerList->next->value); __osRestoreInt(saveMask);
return 0;}