add MAX_LEVEL_UP_MOVES macro
This commit is contained in:
parent
1e6655b298
commit
5e7b6a089c
2 changed files with 6 additions and 4 deletions
|
@ -204,6 +204,8 @@
|
||||||
#define LEVEL_UP_MOVE_LV 0xFE00
|
#define LEVEL_UP_MOVE_LV 0xFE00
|
||||||
#define LEVEL_UP_END 0xFFFF
|
#define LEVEL_UP_END 0xFFFF
|
||||||
|
|
||||||
|
#define MAX_LEVEL_UP_MOVES 20
|
||||||
|
|
||||||
#define MON_MALE 0x00
|
#define MON_MALE 0x00
|
||||||
#define MON_FEMALE 0xFE
|
#define MON_FEMALE 0xFE
|
||||||
#define MON_GENDERLESS 0xFF
|
#define MON_GENDERLESS 0xFF
|
||||||
|
|
|
@ -6138,7 +6138,7 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves)
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
||||||
|
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < MAX_LEVEL_UP_MOVES; i++)
|
||||||
{
|
{
|
||||||
u16 moveLevel;
|
u16 moveLevel;
|
||||||
|
|
||||||
|
@ -6171,7 +6171,7 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves)
|
||||||
u8 numMoves = 0;
|
u8 numMoves = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 20 && gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++)
|
for (i = 0; i < MAX_LEVEL_UP_MOVES && gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++)
|
||||||
moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID;
|
moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID;
|
||||||
|
|
||||||
return numMoves;
|
return numMoves;
|
||||||
|
@ -6180,7 +6180,7 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves)
|
||||||
u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
|
u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
u16 learnedMoves[MAX_MON_MOVES];
|
u16 learnedMoves[MAX_MON_MOVES];
|
||||||
u16 moves[20];
|
u16 moves[MAX_LEVEL_UP_MOVES];
|
||||||
u8 numMoves = 0;
|
u8 numMoves = 0;
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
|
||||||
u8 level = GetMonData(mon, MON_DATA_LEVEL, 0);
|
u8 level = GetMonData(mon, MON_DATA_LEVEL, 0);
|
||||||
|
@ -6192,7 +6192,7 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
||||||
|
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < MAX_LEVEL_UP_MOVES; i++)
|
||||||
{
|
{
|
||||||
u16 moveLevel;
|
u16 moveLevel;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue