mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 04:44:44 +00:00
parent
1fe00fcce1
commit
3e764f6ed8
2 changed files with 1 additions and 1 deletions
35
src/code/z_prenmi_buff.c
Normal file
35
src/code/z_prenmi_buff.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#define COLD_RESET 0
|
||||
#define NMI 1
|
||||
|
||||
|
||||
void PreNmiBuff_Init(PreNmiBuff* this)
|
||||
{
|
||||
this->resetting = false;
|
||||
if (osResetType == COLD_RESET)
|
||||
{
|
||||
this->resetCount = 0;
|
||||
this->duration = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->resetCount++;
|
||||
this->duration += this->resetTime;
|
||||
}
|
||||
|
||||
this->resetTime = 0;
|
||||
}
|
||||
|
||||
|
||||
void PreNmiBuff_SetReset(PreNmiBuff* this)
|
||||
{
|
||||
this->resetting = true;
|
||||
this->resetTime = osGetTime();
|
||||
}
|
||||
|
||||
u32 PreNmiBuff_IsResetting(PreNmiBuff* this)
|
||||
{
|
||||
return this->resetting;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue