diff options
author | melthelesbian <44884535+melthelesbian@users.noreply.github.com> | 2018-12-25 12:50:15 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-12-25 11:50:15 -0600 |
commit | 2dd706ca5410d98ad214ceff7026d6db276f4d5a (patch) | |
tree | 20d184fb4f7e48d965c6c88b39dfd7fc11d3dd86 /src/pokemon_summary_screen.c | |
parent | dcbc8db6a32e70651163a132950d486d93a58254 (diff) |
use max mon moves constant where able (#480)
* use max mon moves constant where able
* fix errors in script commands file
* fix more errors
Diffstat (limited to 'src/pokemon_summary_screen.c')
-rw-r--r-- | src/pokemon_summary_screen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 7d44463dd..eedb9417b 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1315,7 +1315,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a) break; case 1: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { sum->moves[i] = GetMonData(a, MON_DATA_MOVE1+i); sum->pp[i] = GetMonData(a, MON_DATA_PP1+i); @@ -1851,7 +1851,7 @@ static void sub_81C0F44(u8 taskId) static bool8 sub_81C1040(void) { u8 i; - for (i = 1; i < 4; i++) + for (i = 1; i < MAX_MON_MOVES; i++) { if (pssData->summary.moves[i] != 0) return TRUE; @@ -1867,14 +1867,14 @@ static void sub_81C1070(s16 *a, s8 b, u8 *c) PlaySE(SE_SELECT); moveIndex = *c; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { moveIndex += b; if (moveIndex > a[0]) moveIndex = 0; else if (moveIndex < 0) moveIndex = a[0]; - if (moveIndex == 4) + if (moveIndex == MAX_MON_MOVES) { move = pssData->newMove; break; @@ -3548,7 +3548,7 @@ static void PrintContestMoveDescription(u8 moveSlot) { u16 move; - if (moveSlot == 4) + if (moveSlot == MAX_MON_MOVES) move = pssData->newMove; else move = pssData->summary.moves[moveSlot]; @@ -3744,7 +3744,7 @@ static void sub_81C4420(void) { u8 i; struct PokeSummary *summary = &pssData->summary; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (summary->moves[i] != MOVE_NONE) SetMoveTypeSpritePosAndType(gBattleMoves[summary->moves[i]].type, 0x55, 0x20 + (i * 0x10), i + 3); @@ -3757,7 +3757,7 @@ static void sub_81C4484(void) { u8 i; struct PokeSummary *summary = &pssData->summary; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (summary->moves[i] != MOVE_NONE) SetMoveTypeSpritePosAndType(NUMBER_OF_MON_TYPES + gContestMoves[summary->moves[i]].contestCategory, 0x55, 0x20 + (i * 0x10), i + 3); |