summaryrefslogtreecommitdiff
path: root/src/code/z_parameter.c
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2023-05-26 18:57:44 +0100
committerGitHub <noreply@github.com>2023-05-26 13:57:44 -0400
commit6d20839ab0f6e439d159b279acf780061d5183a5 (patch)
treef84a3f8e46234a168e551433f50df67a5a540bb4 /src/code/z_parameter.c
parent22af2bb8fe2d941d653f40c159d9e23aa94e0f20 (diff)
Decompile padmgr.c (#1246)
* Decompile padmgr.c * Format * Enum names * Update namefixer * Suggested changes Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * Suggested changes, improve motor.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Further suggested changes * Format * Fix `controller.h` comment Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'src/code/z_parameter.c')
-rw-r--r--src/code/z_parameter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index 41441f3a2..fe4ca5ef8 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -29,7 +29,7 @@ typedef struct {
/* 0x03 */ u8 flags3;
} RestrictionFlags;
-Input sPostmanTimerInput[4];
+Input sPostmanTimerInput[MAXCONTROLLERS];
#define RESTRICTIONS_TABLE_END 0xFF
@@ -887,10 +887,10 @@ void Interface_SetVertices(PlayState* play) {
s32 sPostmanTimerInputBtnAPressed = false;
-void Interface_PostmanTimerCallback(s32 arg0) {
+void Interface_PostmanTimerCallback(void* arg) {
s32 btnAPressed;
- func_80175E68(&sPostmanTimerInput[0], 0);
+ PadMgr_GetInputNoLock(sPostmanTimerInput, false);
btnAPressed = CHECK_BTN_ALL(sPostmanTimerInput[0].cur.button, BTN_A);
if ((btnAPressed != sPostmanTimerInputBtnAPressed) && btnAPressed) {
gSaveContext.postmanTimerStopOsTime = osGetTime();
@@ -5654,7 +5654,7 @@ void Interface_DrawTimers(PlayState* play) {
}
gSaveContext.timerStates[TIMER_ID_POSTMAN] = TIMER_STATE_POSTMAN_COUNTING;
sPostmanTimerInputBtnAPressed = true;
- func_80174F7C(Interface_PostmanTimerCallback, NULL);
+ PadMgr_SetInputRetraceCallback(Interface_PostmanTimerCallback, NULL);
break;
case TIMER_STATE_POSTMAN_STOP:
@@ -5663,7 +5663,7 @@ void Interface_DrawTimers(PlayState* play) {
postmanTimerStopOsTime - ((void)0, gSaveContext.timerStartOsTimes[TIMER_ID_POSTMAN]) -
((void)0, gSaveContext.timerPausedOsTimes[TIMER_ID_POSTMAN]));
gSaveContext.timerStates[TIMER_ID_POSTMAN] = TIMER_STATE_POSTMAN_END;
- func_80174F9C(Interface_PostmanTimerCallback, NULL);
+ PadMgr_UnsetInputRetraceCallback(Interface_PostmanTimerCallback, NULL);
break;
case TIMER_STATE_POSTMAN_COUNTING:
@@ -7211,7 +7211,7 @@ void Interface_Update(PlayState* play) {
void Interface_Destroy(PlayState* play) {
Map_Destroy(play);
- func_80174F9C(Interface_PostmanTimerCallback, NULL);
+ PadMgr_UnsetInputRetraceCallback(Interface_PostmanTimerCallback, NULL);
}
void Interface_Init(PlayState* play) {