mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-21 16:47:07 -04:00
5c23113592
* libultra from sm64 integrated; 3 libultra functions matched * All of libultra done! authored-by: farisawan-2000 <farisawan.2000@gmail.com>
18 lines
257 B
C
18 lines
257 B
C
#include "libultra_internal.h"
|
|
|
|
s32 __osAtomicDec(u32 *a0) {
|
|
s32 sp1c;
|
|
s32 sp18;
|
|
sp1c = __osDisableInt();
|
|
|
|
if (*a0 != 0) {
|
|
(*a0)--;
|
|
sp18 = 1;
|
|
} else {
|
|
sp18 = 0;
|
|
}
|
|
|
|
__osRestoreInt(sp1c);
|
|
return sp18;
|
|
}
|