From e0bdc7cfc5e9aa12452b4aae53e12e6674d96920 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 29 Sep 2024 16:27:47 -0400 Subject: [PATCH] misc small cleanup --- include/f_op/f_op_msg_mng.h | 1 + src/d/d_meter.cpp | 2 +- src/d/d_s_title.cpp | 2 +- src/f_op/f_op_msg_mng.cpp | 8 ++++---- src/m_Do/m_Do_gba_com.cpp | 12 ++++++------ 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h index f614d5f5..0a75dfe3 100644 --- a/include/f_op/f_op_msg_mng.h +++ b/include/f_op/f_op_msg_mng.h @@ -158,6 +158,7 @@ JKRExpHeap* fopMsgM_createExpHeap(u32); fpc_ProcID fopMsgM_Create(s16, fopMsgCreateFunc, void*); fpc_ProcID fopMsgM_create(s16 i_procName, fopAc_ac_c* param_1 = NULL, cXyz* param_2 = NULL, u32* param_3 = NULL, u32* param_4 = NULL, fopMsgCreateFunc createFunc = NULL); +void fop_MGameTerm_create(s16, s16, s16, int, int, fopMsgCreateFunc); void fopMsgM_Delete(void* process); fopMsg_prm_class* fopMsgM_GetAppend(void* msg); void fopMsgM_destroyExpHeap(JKRExpHeap*); diff --git a/src/d/d_meter.cpp b/src/d/d_meter.cpp index 24d883de..229fb8a4 100644 --- a/src/d/d_meter.cpp +++ b/src/d/d_meter.cpp @@ -1654,7 +1654,7 @@ void dMeter_swimLightAnime(sub_meter_class* i_this, s16) { void dMeter_placeNameMove() { if (!dMeter_place_name) { if (dComIfGp_checkStageName() == 2) { - fopMsgM_create(PROC_PLACE_NAME, NULL, NULL, NULL, NULL, NULL); + fopMsgM_create(PROC_PLACE_NAME); dMeter_place_name = true; } } else { diff --git a/src/d/d_s_title.cpp b/src/d/d_s_title.cpp index 321b27aa..8f6264af 100644 --- a/src/d/d_s_title.cpp +++ b/src/d/d_s_title.cpp @@ -118,7 +118,7 @@ static s32 dScnTitle_Create(scene_class* i_scn) { #if VERSION == VERSION_PAL dScnTitle_c::mMp = NULL; if (fpcM_GetName(i_this) == PROC_ENDING_SCENE) { - fopMsgM_Create(PROC_MESG, 0, 0); + fopMsgM_Create(PROC_MESG, NULL, NULL); } #endif diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 08bc656f..285f64a2 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -200,17 +200,17 @@ void createTimerAppend(int, u16, u8, u8, f32, f32, f32, f32, uint) { } /* 8002B1C8-8002B23C .text fopMsgM_create__FsP10fopAc_ac_cP4cXyzPUlPUlPFPv_i */ -fpc_ProcID fopMsgM_create(s16, fopAc_ac_c*, cXyz*, u32*, u32*, int (*)(void*)) { +fpc_ProcID fopMsgM_create(s16, fopAc_ac_c*, cXyz*, u32*, u32*, fopMsgCreateFunc) { /* Nonmatching */ } /* 8002B23C-8002B2B0 .text fop_MGameTerm_create__FsssiiPFPv_i */ -void fop_MGameTerm_create(s16, s16, s16, int, int, int (*)(void*)) { +void fop_MGameTerm_create(s16, s16, s16, int, int, fopMsgCreateFunc) { /* Nonmatching */ } /* 8002B2B0-8002B324 .text fop_Timer_create__FsUcUsUcUcffffPFPv_i */ -fpc_ProcID fop_Timer_create(s16, u8, u16, u8, u8, f32, f32, f32, f32, int (*)(void*)) { +fpc_ProcID fop_Timer_create(s16, u8, u16, u8, u8, f32, f32, f32, f32, fopMsgCreateFunc) { /* Nonmatching */ } @@ -490,7 +490,7 @@ void fopMsgM_outFontDraw2(J2DPicture*, J2DPicture*, int, int, int, int, s16*, u8 } /* 8002E204-8002E254 .text fopMsgM_Create__FsPFPv_iPv */ -fpc_ProcID fopMsgM_Create(s16, int (*)(void*), void*) { +fpc_ProcID fopMsgM_Create(s16, fopMsgCreateFunc, void*) { /* Nonmatching */ } diff --git a/src/m_Do/m_Do_gba_com.cpp b/src/m_Do/m_Do_gba_com.cpp index 57b28331..f295ff7f 100644 --- a/src/m_Do/m_Do_gba_com.cpp +++ b/src/m_Do/m_Do_gba_com.cpp @@ -108,7 +108,7 @@ void mDoGaC_agbCom_c::mDoGaC_Initial(mDoGaC_DataManag_c* param_0, u8 param_1) { param_0[i].field_0x5 = 0; } - field_0x114 = -1; + field_0x114 = 0xFFFFFFFF; field_0x118 = 0; field_0x12c.U16._12e_1 = (u32)cM_rndF(32767.0f); @@ -529,15 +529,15 @@ void mDoGaC_agbCom_c::mDoGaC_GbaWrite() { if (field_0xa == field_0x9) { if (field_0x5 == 1) { mDoGaC_ComStop(); - field_0x114 = -0x10101011; + field_0x114 = 0xEFEFEFEF; } else { - field_0x114 = -1; + field_0x114 = 0xFFFFFFFF; } } else { mDoGaC_unk_data* temp_r31 = &field_0xc[field_0xa]; switch (field_0x8) { case 0: - field_0x114 = BigLittleChange(-0x01010102); + field_0x114 = BigLittleChange(0xFEFEFEFE); field_0x8 = 1; break; case 1: @@ -592,7 +592,7 @@ void mDoGaC_agbCom_c::mDoGaC_GbaWrite() { } break; default: - field_0x114 = -1; + field_0x114 = 0xFFFFFFFF; break; } } @@ -628,7 +628,7 @@ void mDoGaC_agbCom_c::mDoGaC_ReadResult() { switch (field_0x7) { case 0: u32 temp_r0 = BigLittleChange(field_0x118); - if (temp_r0 == -0x1010102) { + if (temp_r0 == 0xFEFEFEFE) { field_0x7 = 1; } break;