mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-02 01:59:49 -04:00
9bb978527f
* bgId * z64scene.h whitespace * SubS_ComputeTrackPointRot casts * Macros cleanup * ifs * Empty Loops * Lights_FindBufSlot void * SkelAnime_GetFrameData * }; * Struct inits * fs * @todo * Bug comments * EnPofusen and ObjUm * Trailing comma * Revert "bgId" This reverts commiteea073c5ac. * Revert "z64scene.h whitespace" This reverts commit399fd57550. * Revert "SubS_ComputeTrackPointRot casts" This reverts commitdea896c874. * FAKE * Review * Format
44 lines
868 B
C
44 lines
868 B
C
#include "global.h"
|
|
|
|
int osSetTimer(OSTimer* t, OSTime value, OSTime interval, OSMesgQueue* mq, OSMesg msg) {
|
|
OSTime tim;
|
|
OSTimer* spC;
|
|
u32 sp14;
|
|
u32 sp10;
|
|
u32 saveMask;
|
|
|
|
t->next = NULL;
|
|
t->prev = NULL;
|
|
t->interval = interval;
|
|
if (value != 0) {
|
|
t->value = value;
|
|
} else {
|
|
t->value = interval;
|
|
}
|
|
t->mq = mq;
|
|
t->msg = msg;
|
|
|
|
saveMask = __osDisableInt();
|
|
|
|
if (__osTimerList->next != __osTimerList) {
|
|
//! FAKE:
|
|
if (1) {}
|
|
|
|
spC = __osTimerList->next;
|
|
sp14 = osGetCount();
|
|
sp10 = sp14 - __osTimerCounter;
|
|
if (sp10 < spC->value) {
|
|
spC->value -= sp10;
|
|
} else {
|
|
spC->value = 1;
|
|
}
|
|
}
|
|
|
|
tim = __osInsertTimer(t);
|
|
__osSetTimerIntr(__osTimerList->next->value);
|
|
|
|
__osRestoreInt(saveMask);
|
|
|
|
return 0;
|
|
}
|