Use MAX_MON_MOVES constants
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
#define B_ACTION_NONE 0xFF
|
||||
|
||||
#define MAX_TRAINER_ITEMS 4
|
||||
#define MAX_MON_MOVES 4
|
||||
|
||||
// array entries for battle communication
|
||||
#define MULTIUSE_STATE 0x0
|
||||
@@ -180,19 +179,19 @@ struct AI_ThinkingStruct
|
||||
u8 aiState;
|
||||
u8 movesetIndex;
|
||||
u16 moveConsidered;
|
||||
s8 score[4];
|
||||
s8 score[MAX_MON_MOVES];
|
||||
u32 funcResult;
|
||||
u32 aiFlags;
|
||||
u8 aiAction;
|
||||
u8 aiLogicId;
|
||||
u8 filler12[6];
|
||||
u8 simulatedRNG[4];
|
||||
u8 simulatedRNG[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
struct UsedMoves
|
||||
{
|
||||
u16 moves[MAX_BATTLERS_COUNT];
|
||||
u16 unknown[MAX_BATTLERS_COUNT];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u16 unknown[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
struct BattleHistory
|
||||
|
||||
@@ -97,16 +97,16 @@ struct HpAndStatus
|
||||
|
||||
struct MovePpInfo
|
||||
{
|
||||
u16 moves[4];
|
||||
u8 pp[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 pp[MAX_MON_MOVES];
|
||||
u8 ppBonuses;
|
||||
};
|
||||
|
||||
struct ChooseMoveStruct
|
||||
{
|
||||
u16 moves[4];
|
||||
u8 currentPp[4];
|
||||
u8 maxPp[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 currentPp[MAX_MON_MOVES];
|
||||
u8 maxPp[MAX_MON_MOVES];
|
||||
u16 species;
|
||||
u8 monType1;
|
||||
u8 monType2;
|
||||
|
||||
@@ -7,7 +7,7 @@ struct RSBattleTowerRecord
|
||||
/*0x01*/ u8 facilityClass;
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[4];
|
||||
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ struct BattleTowerPokemon party[3];
|
||||
/*0xA0*/ u32 checksum;
|
||||
@@ -27,7 +27,7 @@ struct BattleFrontierTrainer
|
||||
struct FacilityMon
|
||||
{
|
||||
u16 species;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 itemTableId;
|
||||
u8 evSpread;
|
||||
u8 nature;
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
|
||||
#define TRAINER_ID_LENGTH 4
|
||||
#define MAX_MON_MOVES 4
|
||||
|
||||
// string lengths
|
||||
#define ITEM_NAME_LENGTH 14
|
||||
|
||||
@@ -227,7 +227,7 @@ struct ContestPokemon
|
||||
u8 aiPool_Cute:1; // 0x10
|
||||
u8 aiPool_Smart:1; // 0x20
|
||||
u8 aiPool_Tough:1; // 0x40
|
||||
/*0x1E*/ u16 moves[4]; // moves
|
||||
/*0x1E*/ u16 moves[MAX_MON_MOVES]; // moves
|
||||
/*0x26*/ u8 cool; // cool
|
||||
/*0x27*/ u8 beauty; // beauty
|
||||
/*0x28*/ u8 cute; // cute
|
||||
|
||||
@@ -34,7 +34,7 @@ struct TrainerMonNoItemCustomMoves
|
||||
u16 iv;
|
||||
u8 lvl;
|
||||
u16 species;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
struct TrainerMonItemCustomMoves
|
||||
@@ -43,7 +43,7 @@ struct TrainerMonItemCustomMoves
|
||||
u8 lvl;
|
||||
u16 species;
|
||||
u16 heldItem;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
union TrainerMonPtr
|
||||
|
||||
@@ -212,7 +212,7 @@ struct BerryCrush
|
||||
struct ApprenticeMon
|
||||
{
|
||||
u16 species;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u16 item;
|
||||
};
|
||||
|
||||
@@ -234,7 +234,7 @@ struct BattleTowerPokemon
|
||||
{
|
||||
u16 species;
|
||||
u16 heldItem;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 level;
|
||||
u8 ppBonuses;
|
||||
u8 hpEV;
|
||||
@@ -290,7 +290,7 @@ struct BattleTowerEReaderTrainer
|
||||
|
||||
struct FrontierMonData
|
||||
{
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 evs[6];
|
||||
u8 nature;
|
||||
};
|
||||
@@ -946,7 +946,7 @@ struct SaveBlock1
|
||||
/*0x2B94*/ u8 outbreakPokemonLevel;
|
||||
/*0x2B95*/ u8 outbreakUnk1;
|
||||
/*0x2B96*/ u16 outbreakUnk2;
|
||||
/*0x2B98*/ u16 outbreakPokemonMoves[4];
|
||||
/*0x2B98*/ u16 outbreakPokemonMoves[MAX_MON_MOVES];
|
||||
/*0x2BA0*/ u8 outbreakUnk4;
|
||||
/*0x2BA1*/ u8 outbreakPokemonProbability;
|
||||
/*0x2BA2*/ u16 outbreakDaysLeft;
|
||||
|
||||
@@ -482,7 +482,7 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 var02;
|
||||
/*0x03*/ u8 var03;
|
||||
/*0x04*/ u16 moves[4];
|
||||
/*0x04*/ u16 moves[MAX_MON_MOVES];
|
||||
/*0x0C*/ u16 species;
|
||||
/*0x0E*/ u16 var0E;
|
||||
/*0x10*/ u8 locationMapNum;
|
||||
|
||||
@@ -145,8 +145,8 @@ struct PokemonSubstruct0
|
||||
|
||||
struct PokemonSubstruct1
|
||||
{
|
||||
u16 moves[4];
|
||||
u8 pp[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 pp[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
struct PokemonSubstruct2
|
||||
@@ -273,7 +273,7 @@ struct BattlePokemon
|
||||
/*0x06*/ u16 speed;
|
||||
/*0x08*/ u16 spAttack;
|
||||
/*0x0A*/ u16 spDefense;
|
||||
/*0x0C*/ u16 moves[4];
|
||||
/*0x0C*/ u16 moves[MAX_MON_MOVES];
|
||||
/*0x14*/ u32 hpIV:5;
|
||||
/*0x14*/ u32 attackIV:5;
|
||||
/*0x15*/ u32 defenseIV:5;
|
||||
@@ -287,7 +287,7 @@ struct BattlePokemon
|
||||
/*0x21*/ u8 type1;
|
||||
/*0x22*/ u8 type2;
|
||||
/*0x23*/ u8 unknown;
|
||||
/*0x24*/ u8 pp[4];
|
||||
/*0x24*/ u8 pp[MAX_MON_MOVES];
|
||||
/*0x28*/ u16 hp;
|
||||
/*0x2A*/ u8 level;
|
||||
/*0x2B*/ u8 friendship;
|
||||
|
||||
Reference in New Issue
Block a user