Replace: moveId -> move, moveIdx -> moveIndex (#2134)
This commit is contained in:
@@ -70,8 +70,8 @@ struct ApprenticeQuestionData
|
||||
{
|
||||
u16 speciesId;
|
||||
u16 altSpeciesId;
|
||||
u16 moveId1;
|
||||
u16 moveId2;
|
||||
u16 move1;
|
||||
u16 move2;
|
||||
};
|
||||
|
||||
// IWRAM common
|
||||
@@ -81,7 +81,7 @@ COMMON_DATA void (*gApprenticeFunc)(void) = NULL;
|
||||
|
||||
// This file's functions.
|
||||
static u16 GetRandomAlternateMove(u8 monId);
|
||||
static bool8 TrySetMove(u8 monId, u16 moveId);
|
||||
static bool8 TrySetMove(u8 monId, u16 move);
|
||||
static void CreateChooseAnswerTask(bool8 noBButton, u8 itemsCount, u8 windowId);
|
||||
static u8 CreateAndShowWindow(u8 left, u8 top, u8 width, u8 height);
|
||||
static void RemoveAndHideWindow(u8 windowId);
|
||||
@@ -337,7 +337,7 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
u16 species;
|
||||
const u16 *learnset;
|
||||
bool32 needTMs = FALSE;
|
||||
u16 moveId = MOVE_NONE;
|
||||
u16 move = MOVE_NONE;
|
||||
bool32 shouldUseMove;
|
||||
u8 level;
|
||||
|
||||
@@ -379,7 +379,7 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
}
|
||||
while (!shouldUseMove);
|
||||
|
||||
moveId = ItemIdToBattleMoveId(ITEM_TM01 + id);
|
||||
move = ItemIdToBattleMoveId(ITEM_TM01 + id);
|
||||
shouldUseMove = TRUE;
|
||||
|
||||
if (numLearnsetMoves <= MAX_MON_MOVES)
|
||||
@@ -390,7 +390,7 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
for (; j < numLearnsetMoves; j++)
|
||||
{
|
||||
// Keep looking for TMs until one not in the level up learnset is found
|
||||
if ((learnset[j] & LEVEL_UP_MOVE_ID) == moveId)
|
||||
if ((learnset[j] & LEVEL_UP_MOVE_ID) == move)
|
||||
{
|
||||
shouldUseMove = FALSE;
|
||||
break;
|
||||
@@ -414,13 +414,13 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
{
|
||||
// Get a random move excluding the 4 it would know at max level
|
||||
u8 learnsetId = Random() % (numLearnsetMoves - MAX_MON_MOVES);
|
||||
moveId = learnset[learnsetId] & LEVEL_UP_MOVE_ID;
|
||||
move = learnset[learnsetId] & LEVEL_UP_MOVE_ID;
|
||||
shouldUseMove = TRUE;
|
||||
|
||||
for (j = numLearnsetMoves - MAX_MON_MOVES; j < numLearnsetMoves; j++)
|
||||
{
|
||||
// Keep looking for moves until one not in the last 4 is found
|
||||
if ((learnset[j] & LEVEL_UP_MOVE_ID) == moveId)
|
||||
if ((learnset[j] & LEVEL_UP_MOVE_ID) == move)
|
||||
{
|
||||
shouldUseMove = FALSE;
|
||||
break;
|
||||
@@ -430,29 +430,29 @@ static u16 GetRandomAlternateMove(u8 monId)
|
||||
}
|
||||
}
|
||||
|
||||
if (TrySetMove(monId, moveId))
|
||||
if (TrySetMove(monId, move))
|
||||
{
|
||||
if (sValidApprenticeMoves[moveId])
|
||||
if (sValidApprenticeMoves[move])
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
gApprenticePartyMovesData->moveCounter++;
|
||||
return moveId;
|
||||
return move;
|
||||
}
|
||||
|
||||
static bool8 TrySetMove(u8 monId, u16 moveId)
|
||||
static bool8 TrySetMove(u8 monId, u16 move)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < NUM_WHICH_MOVE_QUESTIONS; i++)
|
||||
{
|
||||
if (gApprenticePartyMovesData->moves[monId][i] == moveId)
|
||||
if (gApprenticePartyMovesData->moves[monId][i] == move)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gApprenticePartyMovesData->moves[monId][gApprenticePartyMovesData->moveCounter] = moveId;
|
||||
gApprenticePartyMovesData->moves[monId][gApprenticePartyMovesData->moveCounter] = move;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -605,8 +605,8 @@ static void CreateApprenticeMenu(u8 menu)
|
||||
case APPRENTICE_ASK_MOVES:
|
||||
left = 17;
|
||||
top = 8;
|
||||
strings[0] = gMoveNames[gApprenticeQuestionData->moveId1];
|
||||
strings[1] = gMoveNames[gApprenticeQuestionData->moveId2];
|
||||
strings[0] = gMoveNames[gApprenticeQuestionData->move1];
|
||||
strings[1] = gMoveNames[gApprenticeQuestionData->move2];
|
||||
break;
|
||||
case APPRENTICE_ASK_GIVE:
|
||||
left = 18;
|
||||
@@ -1006,8 +1006,8 @@ static void InitQuestionData(void)
|
||||
count = PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].monId;
|
||||
APPRENTICE_SPECIES_ID_NO_COND(id1, count);
|
||||
gApprenticeQuestionData->speciesId = gApprentices[PLAYER_APPRENTICE.id].species[id1];
|
||||
gApprenticeQuestionData->moveId1 = GetDefaultMove(count, id1, PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].moveSlot);
|
||||
gApprenticeQuestionData->moveId2 = PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].data;
|
||||
gApprenticeQuestionData->move1 = GetDefaultMove(count, id1, PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].moveSlot);
|
||||
gApprenticeQuestionData->move2 = PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].data;
|
||||
}
|
||||
}
|
||||
else if (gSpecialVar_0x8005 == APPRENTICE_QUESTION_WHAT_ITEM)
|
||||
@@ -1062,10 +1062,10 @@ static void ApprenticeBufferString(void)
|
||||
StringCopy(stringDst, gSpeciesNames[gApprenticeQuestionData->speciesId]);
|
||||
break;
|
||||
case APPRENTICE_BUFF_MOVE1:
|
||||
StringCopy(stringDst, gMoveNames[gApprenticeQuestionData->moveId1]);
|
||||
StringCopy(stringDst, gMoveNames[gApprenticeQuestionData->move1]);
|
||||
break;
|
||||
case APPRENTICE_BUFF_MOVE2:
|
||||
StringCopy(stringDst, gMoveNames[gApprenticeQuestionData->moveId2]);
|
||||
StringCopy(stringDst, gMoveNames[gApprenticeQuestionData->move2]);
|
||||
break;
|
||||
case APPRENTICE_BUFF_ITEM:
|
||||
StringCopy(stringDst, ItemId_GetName(PLAYER_APPRENTICE.questions[CURRENT_QUESTION_NUM].data));
|
||||
|
||||
Reference in New Issue
Block a user