diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-09-27 09:11:22 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-09-27 09:11:22 -0400 |
commit | 7b8b5b5c8c02156d7cdaa76212ad68f01b1600c9 (patch) | |
tree | 32b1c3ce14f272708fdc4b5b944a8dc9c14d07e3 /src/apprentice.c | |
parent | 27aae9da9a570b6787171e33fa29c43c507187c1 (diff) | |
parent | 208e1c968959c781562f0b94c03368385ce7012c (diff) |
Merge branch 'master' into gflib
Diffstat (limited to 'src/apprentice.c')
-rw-r--r-- | src/apprentice.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/apprentice.c b/src/apprentice.c index 6c4ac86aa..189647991 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -1100,7 +1100,7 @@ void ResetAllApprenticeData(void) gSaveBlock2Ptr->apprentices[i].lvlMode = 0; gSaveBlock2Ptr->apprentices[i].number = 0; gSaveBlock2Ptr->apprentices[i].field_1 = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < TRAINER_ID_LENGTH; j++) gSaveBlock2Ptr->apprentices[i].playerId[j] = 0; gSaveBlock2Ptr->apprentices[i].language = gGameLanguage; gSaveBlock2Ptr->apprentices[i].checksum = 0; @@ -1410,7 +1410,7 @@ static void GetLatestLearnedMoves(u16 species, u16 *moves) static u16 sub_81A0284(u8 arg0, u8 speciesTableId, u8 arg2) { - u16 moves[4]; + u16 moves[MAX_MON_MOVES]; u8 i, count; if (PLAYER_APPRENTICE.field_B1_1 < 3) @@ -1559,8 +1559,8 @@ static void CreateMenuWithAnswers(u8 arg0) pixelWidth = width; } - width = convert_pixel_width_to_tile_width(pixelWidth); - left = sub_80E2D5C(left, width); + width = ConvertPixelWidthToTileWidth(pixelWidth); + left = ScriptMenu_AdjustLeftCoordFromWidth(left, width); windowId = CreateAndShowWindow(left, top, width, count * 2); SetStandardWindowBorderStyle(windowId, 0); @@ -2063,7 +2063,7 @@ static void sub_81A1370(void) r10 = 0xFFFF; r9 = -1; - for (i = 1; i < 4; i++) + for (i = 1; i < TRAINER_ID_LENGTH; i++) { if (GetTrainerId(gSaveBlock2Ptr->apprentices[i].playerId) == GetTrainerId(gSaveBlock2Ptr->playerTrainerId) && gSaveBlock2Ptr->apprentices[i].number < r10) @@ -2092,7 +2092,7 @@ static void sub_81A1438(void) gSaveBlock2Ptr->apprentices[0].number++; sub_81A0390(gSaveBlock2Ptr->apprentices[0].field_1); - for (i = 0; i < 4; i++) + for (i = 0; i < TRAINER_ID_LENGTH; i++) gSaveBlock2Ptr->apprentices[0].playerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; StringCopy(gSaveBlock2Ptr->apprentices[0].playerName, gSaveBlock2Ptr->playerName); |