diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 6d5059787..02a2ffdff 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -419,7 +419,7 @@ static void sub_8064B04(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 4fee08431..9f44fcf1c 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -301,7 +301,7 @@ static void sub_814B290(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index fc19f9065..61886575c 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -31,7 +31,6 @@ extern u8 gActiveBank; extern u8 gBankTarget; extern u8 gAbsentBankFlags; extern bool8 gDoingBattleAnim; -extern u8 gUnknown_020244CC; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern u8 gBankSpriteIds[BATTLE_BANKS_COUNT]; extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; @@ -412,7 +411,7 @@ static void sub_805F994(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); if (hpValue != -1) { diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index a07aacd20..69df9f70b 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -33,7 +33,7 @@ extern u8 gMoveSelectionCursor[BATTLE_BANKS_COUNT]; extern u8 gAbsentBankFlags; extern u8 gNoOfAllBanks; extern bool8 gDoingBattleAnim; -extern u8 gUnknown_020244CC; +extern u8 gPlayerDpadHoldFrames; extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void); extern void (*gPreBattleCallback1)(void); extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; @@ -243,7 +243,7 @@ void SetControllerToPlayer(void) { gBattleBankFunc[gActiveBank] = PlayerBufferRunCommand; gDoingBattleAnim = FALSE; - gUnknown_020244CC = 0; + gPlayerDpadHoldFrames = 0; } static void PlayerBufferExecCompleted(void) @@ -287,9 +287,9 @@ static void HandleInputChooseAction(void) dp11b_obj_instanciate(gActiveBank, 0, 7, 1); if (gMain.newAndRepeatedKeys & DPAD_ANY && gSaveBlock2Ptr->optionsButtonMode == 2) - gUnknown_020244CC++; + gPlayerDpadHoldFrames++; else - gUnknown_020244CC = 0; + gPlayerDpadHoldFrames = 0; if (gMain.newKeys & A_BUTTON) { @@ -352,7 +352,7 @@ static void HandleInputChooseAction(void) ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBank], 0); } } - else if (gMain.newKeys & B_BUTTON || gUnknown_020244CC > 59) + else if (gMain.newKeys & B_BUTTON || gPlayerDpadHoldFrames > 59) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && GetBankIdentity(gActiveBank) == IDENTITY_PLAYER_MON2 @@ -406,9 +406,9 @@ static void HandleInputChooseTarget(void) } if (gMain.heldKeys & DPAD_ANY && gSaveBlock2Ptr->optionsButtonMode == 2) - gUnknown_020244CC++; + gPlayerDpadHoldFrames++; else - gUnknown_020244CC = 0; + gPlayerDpadHoldFrames = 0; if (gMain.newKeys & A_BUTTON) { @@ -418,7 +418,7 @@ static void HandleInputChooseTarget(void) dp11b_obj_free(gMultiUsePlayerCursor, 1); PlayerBufferExecCompleted(); } - else if (gMain.newKeys & B_BUTTON || gUnknown_020244CC > 59) + else if (gMain.newKeys & B_BUTTON || gPlayerDpadHoldFrames > 59) { PlaySE(SE_SELECT); gSprites[gBankSpriteIds[gMultiUsePlayerCursor]].callback = sub_8039B2C; @@ -519,9 +519,9 @@ static void HandleInputChooseMove(void) struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBank][4]); if (gMain.heldKeys & DPAD_ANY && gSaveBlock2Ptr->optionsButtonMode == 2) - gUnknown_020244CC++; + gPlayerDpadHoldFrames++; else - gUnknown_020244CC = 0; + gPlayerDpadHoldFrames = 0; if (gMain.newKeys & A_BUTTON) { @@ -585,7 +585,7 @@ static void HandleInputChooseMove(void) gSprites[gBankSpriteIds[gMultiUsePlayerCursor]].callback = sub_8039AD8; } } - else if (gMain.newKeys & B_BUTTON || gUnknown_020244CC > 59) + else if (gMain.newKeys & B_BUTTON || gPlayerDpadHoldFrames > 59) { PlaySE(SE_SELECT); EmitTwoReturnValues(1, 10, 0xFFFF); @@ -1153,7 +1153,7 @@ void c3_0802FDF4(u8 taskId) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index cc659972e..e40ba8a69 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -316,7 +316,7 @@ static void sub_81BB1D4(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 9043f84e6..69ae9e343 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -403,7 +403,7 @@ static void sub_8186C48(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 971a3e656..76ac40ef0 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -386,7 +386,7 @@ static void sub_818A064(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 3314cfe21..693008110 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -34,7 +34,6 @@ extern u8 gMoveSelectionCursor[BATTLE_BANKS_COUNT]; extern u8 gAbsentBankFlags; extern u8 gNoOfAllBanks; extern bool8 gDoingBattleAnim; -extern u8 gUnknown_020244CC; extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void); extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; @@ -377,7 +376,7 @@ static void sub_8168818(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], 0, 0); + s16 hpValue = sub_8074AA0(gActiveBank, gHealthBoxesIds[gActiveBank], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthBoxesIds[gActiveBank]); diff --git a/sym_ewram.txt b/sym_ewram.txt index f64bb98b8..ea526ec45 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -498,7 +498,7 @@ gDoingBattleAnim: @ 20244B9 gTransformedPersonalities: @ 20244BC .space 0x10 -gUnknown_020244CC: @ 20244CC +gPlayerDpadHoldFrames: @ 20244CC .space 0x4 gBattleSpritesDataPtr: @ 20244D0