mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
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>
This commit is contained in:
co-authored by
Anghelo Carvajal
Derek Hensley
engineer124
parent
22af2bb8fe
commit
6d20839ab0
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user