summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'src/code')
-rw-r--r--src/code/graph.c10
-rw-r--r--src/code/padmgr.c4
-rw-r--r--src/code/padutils.c14
3 files changed, 28 insertions, 0 deletions
diff --git a/src/code/graph.c b/src/code/graph.c
index 3e5df9145..8ebad9d4e 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -366,14 +366,22 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
PRINTF("%c", BEL);
// "Dynamic area head is destroyed"
PRINTF(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
+#if PLATFORM_N64
+ Fault_AddHungupAndCrash("../graph.c", 951);
+#else
Fault_AddHungupAndCrash("../graph.c", 1070);
+#endif
}
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
PRINTF("%c", BEL);
// "Dynamic region tail is destroyed"
PRINTF(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST);
+#if PLATFORM_N64
+ Fault_AddHungupAndCrash("../graph.c", 957);
+#else
Fault_AddHungupAndCrash("../graph.c", 1076);
+#endif
}
}
@@ -465,6 +473,8 @@ void Graph_ThreadEntry(void* arg0) {
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
+#elif PLATFORM_N64
+ Fault_AddHungupAndCrash("../graph.c", 1081);
#else
Fault_AddHungupAndCrash("../graph.c", 1200);
#endif
diff --git a/src/code/padmgr.c b/src/code/padmgr.c
index 74ca9bd4f..2d2b91eb9 100644
--- a/src/code/padmgr.c
+++ b/src/code/padmgr.c
@@ -334,7 +334,11 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
default:
// Unknown error response
LOG_HEX("padnow1->errno", pad->errno, "../padmgr.c", 396);
+#if PLATFORM_N64
+ Fault_AddHungupAndCrash("../padmgr.c", 382);
+#else
Fault_AddHungupAndCrash("../padmgr.c", 397);
+#endif
break;
}
diff --git a/src/code/padutils.c b/src/code/padutils.c
index 2f0f57162..7a0407ef9 100644
--- a/src/code/padutils.c
+++ b/src/code/padutils.c
@@ -9,6 +9,10 @@ void func_800FCB70(void) {
void PadUtils_ResetPressRel(Input* input) {
input->press.button = 0;
+#if PLATFORM_N64
+ input->press.stick_x = 0;
+ input->press.stick_y = 0;
+#endif
input->rel.button = 0;
}
@@ -65,6 +69,16 @@ s8 PadUtils_GetRelY(Input* input) {
return PadUtils_GetRelYImpl(input);
}
+#if PLATFORM_N64
+s8 PadUtils_GetPressX(Input* input) {
+ return input->press.stick_x;
+}
+
+s8 PadUtils_GetPressY(Input* input) {
+ return input->press.stick_y;
+}
+#endif
+
void PadUtils_UpdateRelXY(Input* input) {
s32 curX = PadUtils_GetCurX(input);
s32 curY = PadUtils_GetCurY(input);