diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2017-12-02 23:31:58 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2017-12-02 23:31:58 +0100 |
commit | e10aea9a5196f916ca6d56617b2d74a00f0a68d4 (patch) | |
tree | 239de0a05e9fffe8f320272c7dde01beb2120f78 /src | |
parent | d75e7ace1dd034273ca47473a2f543904f823f53 (diff) |
give some more labels to battle struct fields
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_2.c | 14 | ||||
-rw-r--r-- | src/battle_script_commands.c | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/battle_2.c b/src/battle_2.c index 9bb41461d..328eacd85 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -160,7 +160,7 @@ extern const u8 gStatStageRatios[][2]; extern const u8 * const gBattleScriptsForMoveEffects[]; extern const u8 * const gBattlescriptsForBallThrow[]; extern const u8 * const gBattlescriptsForRunningByItem[]; -extern const u8 * const gUnknown_082DBD3C[]; +extern const u8 * const gBattlescriptsForUsingItem[]; extern const u8 * const gBattlescriptsForSafariActions[]; // strings @@ -4692,7 +4692,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) gBattleMainFunc = RunTurnActionsFunctions; gBattleCommunication[3] = 0; gBattleCommunication[4] = 0; - gBattleScripting.field_16 = 0; + gBattleScripting.multihitMoveEffect = 0; gBattleResources->battleScriptsStack->size = 0; } @@ -4701,7 +4701,7 @@ static void RunTurnActionsFunctions(void) if (gBattleOutcome != 0) gCurrentActionFuncId = 12; - *(&gBattleStruct->field_4B) = gCurrentTurnActionNumber; + *(&gBattleStruct->savedTurnActionNumber) = gCurrentTurnActionNumber; sTurnActionsFuncsTable[gCurrentActionFuncId](); if (gCurrentTurnActionNumber >= gNoOfAllBanks) // everyone did their actions, turn finished @@ -4711,7 +4711,7 @@ static void RunTurnActionsFunctions(void) } else { - if (gBattleStruct->field_4B != gCurrentTurnActionNumber) // action turn has been done, clear hitmarker bits for another bank + if (gBattleStruct->savedTurnActionNumber != gCurrentTurnActionNumber) // action turn has been done, clear hitmarker bits for another bank { gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); @@ -5276,7 +5276,7 @@ static void HandleAction_UseItem(void) } else if (GetBankSide(gBankAttacker) == SIDE_PLAYER) { - gBattlescriptCurrInstr = gUnknown_082DBD3C[0]; + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[0]; } else { @@ -5332,7 +5332,7 @@ static void HandleAction_UseItem(void) break; } - gBattlescriptCurrInstr = gUnknown_082DBD3C[*(gBattleStruct->AI_itemType + gBankAttacker / 2)]; + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[*(gBattleStruct->AI_itemType + gBankAttacker / 2)]; } gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } @@ -5607,6 +5607,6 @@ static void HandleAction_ActionFinished(void) gBattleScripting.atk49_state = 0; gBattleCommunication[3] = 0; gBattleCommunication[4] = 0; - gBattleScripting.field_16 = 0; + gBattleScripting.multihitMoveEffect = 0; gBattleResources->battleScriptsStack->size = 0; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 54811a90d..60b08d2c2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3040,7 +3040,7 @@ static void atk15_seteffectwithchance(void) } gBattleCommunication[MOVE_EFFECT_BYTE] = 0; - gBattleScripting.field_16 = 0; + gBattleScripting.multihitMoveEffect = 0; } static void atk16_seteffectprimary(void) @@ -3064,7 +3064,7 @@ static void atk18_clearstatusfromeffect(void) gBattleCommunication[MOVE_EFFECT_BYTE] = 0; gBattlescriptCurrInstr += 2; - gBattleScripting.field_16 = 0; + gBattleScripting.multihitMoveEffect = 0; } static void atk19_tryfaintmon(void) @@ -3221,7 +3221,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(bank - 1, gLastUsedAbility); - gBattleScripting.field_15 = bank - 1; + gBattleScripting.bankWithAbility = bank - 1; } else gBattlescriptCurrInstr += 7; @@ -3234,7 +3234,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(bank - 1, gLastUsedAbility); - gBattleScripting.field_15 = bank - 1; + gBattleScripting.bankWithAbility = bank - 1; } else gBattlescriptCurrInstr += 7; @@ -3247,7 +3247,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(bank, gLastUsedAbility); - gBattleScripting.field_15 = bank; + gBattleScripting.bankWithAbility = bank; } else gBattlescriptCurrInstr += 7; |