summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'src/code')
-rw-r--r--src/code/m_pause.c22
-rw-r--r--src/code/zurumode.c3
2 files changed, 24 insertions, 1 deletions
diff --git a/src/code/m_pause.c b/src/code/m_pause.c
new file mode 100644
index 0000000..0b59856
--- /dev/null
+++ b/src/code/m_pause.c
@@ -0,0 +1,22 @@
+#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;
+}
diff --git a/src/code/zurumode.c b/src/code/zurumode.c
index 8c90d93..a67ea81 100644
--- a/src/code/zurumode.c
+++ b/src/code/zurumode.c
@@ -1,6 +1,7 @@
#include "zurumode.h"
#include "m_nmi_buf.h"
#include "padmgr.h"
+#include "m_controller.h"
zuruKeycheck zuruKeyCheck;
@@ -185,7 +186,7 @@ void zurumode_callback(void* p) {
zerucheck_init(&zuruKeyCheck);
APPNMI_ZURUMODE_FLP();
zurumode_update();
- if ((mgr->pads[0].button) & 0x80) {
+ if (mgr->pads[0].button & RESET_BUTTON) {
APPNMI_ZURUMODE3_FLP();
}
}