mirror of
https://github.com/zeldaret/af.git
synced 2026-09-30 07:22:11 -04:00
8aa8fb893a
* m_pause OK * yeah now it's OK lol * refactor * refactor 2
23 lines
673 B
C
23 lines
673 B
C
#include "m_pause.h"
|
|
#include "m_controller.h"
|
|
#include "libc/stdbool.h"
|
|
|
|
void Pause_ct(Pause* pause) {
|
|
pause->timer = 0;
|
|
pause->enabled = 0;
|
|
}
|
|
|
|
s32 Pause_proc(Pause* pause, Input* input) {
|
|
if (CHECK_BTN_ALL(input->cur.button, R_TRIG) && CHECK_BTN_ALL(input->press.button, D_JPAD)) {
|
|
pause->enabled = !pause->enabled;
|
|
}
|
|
|
|
if ((!pause->enabled) || (CHECK_BTN_ALL(input->cur.button, Z_TRIG) &&
|
|
(CHECK_BTN_ALL(input->press.button, R_TRIG) ||
|
|
(CHECK_BTN_ALL(input->cur.button, R_TRIG) && (++pause->timer >= 9))))) {
|
|
pause->timer = 0;
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|