summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h9
-rw-r--r--include/battle_controllers.h10
-rw-r--r--include/battle_tower.h4
-rw-r--r--include/constants/global.h1
-rw-r--r--include/contest.h2
-rw-r--r--include/data.h4
-rw-r--r--include/global.h8
-rw-r--r--include/global.tv.h2
-rw-r--r--include/pokemon.h8
9 files changed, 24 insertions, 24 deletions
diff --git a/include/battle.h b/include/battle.h
index 0f4087c90..32eabc6de 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -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
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
index 9449f1986..365229fda 100644
--- a/include/battle_controllers.h
+++ b/include/battle_controllers.h
@@ -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;
diff --git a/include/battle_tower.h b/include/battle_tower.h
index 12d6d2e9e..8bc6e6554 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -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;
diff --git a/include/constants/global.h b/include/constants/global.h
index a862ecad2..ba06ff721 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -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
diff --git a/include/contest.h b/include/contest.h
index 8ef208aea..2b1b95af5 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -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
diff --git a/include/data.h b/include/data.h
index f1a4caa6a..49b98663a 100644
--- a/include/data.h
+++ b/include/data.h
@@ -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
diff --git a/include/global.h b/include/global.h
index 1fbc70e23..fa8fe8eb3 100644
--- a/include/global.h
+++ b/include/global.h
@@ -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;
diff --git a/include/global.tv.h b/include/global.tv.h
index aa151a75c..abb01d471 100644
--- a/include/global.tv.h
+++ b/include/global.tv.h
@@ -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;
diff --git a/include/pokemon.h b/include/pokemon.h
index ec125573c..2931f4428 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -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;