mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-22 06:19:54 -04:00
c56934038a
* Add trailing comma * Run format and add some missing trailing commas * Enforce the same clang-format version for everybody * z_en_m_fire1
33 lines
535 B
C
33 lines
535 B
C
#include <ultra64.h>
|
|
#include <global.h>
|
|
|
|
s32 osStopTimer(OSTimer* t) {
|
|
register u32 savedMask;
|
|
OSTimer* timep;
|
|
|
|
if (t->next == NULL) {
|
|
return -1;
|
|
}
|
|
|
|
savedMask = __osDisableInt();
|
|
|
|
timep = t->next;
|
|
|
|
if (timep != __osTimerList) {
|
|
timep->value += t->value;
|
|
}
|
|
|
|
t->prev->next = t->next;
|
|
t->next->prev = t->prev;
|
|
t->next = NULL;
|
|
t->prev = NULL;
|
|
|
|
if (__osTimerList->next == __osTimerList) {
|
|
__osSetCompare(0);
|
|
}
|
|
|
|
__osRestoreInt(savedMask);
|
|
|
|
return 0;
|
|
}
|