summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/global.h b/include/global.h
index 7a892c5bd..4a71a8a87 100644
--- a/include/global.h
+++ b/include/global.h
@@ -25,7 +25,7 @@
#define INCBIN_S32 {0}
#endif // __APPLE__
-#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
+#define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
// useful math macros
@@ -35,6 +35,8 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
+#define PARTY_SIZE 6
+
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
@@ -297,6 +299,16 @@ struct SaveBlock2
extern struct SaveBlock2 *gSaveBlock2Ptr;
+struct SecretBaseParty
+{
+ u32 personality[PARTY_SIZE];
+ u16 moves[PARTY_SIZE * 4];
+ u16 species[PARTY_SIZE];
+ u16 heldItems[PARTY_SIZE];
+ u8 levels[PARTY_SIZE];
+ u8 EVs[PARTY_SIZE];
+};
+
struct SecretBaseRecord
{
/*0x1A9C*/ u8 secretBaseId;
@@ -312,12 +324,7 @@ struct SecretBaseRecord
/*0x1AAD*/ u8 sbr_field_11;
/*0x1AAE*/ u8 decorations[16];
/*0x1ABE*/ u8 decorationPos[16];
- /*0x1AD0*/ u32 partyPersonality[6];
- /*0x1AE8*/ u16 partyMoves[6 * 4];
- /*0x1B18*/ u16 partySpecies[6];
- /*0x1B24*/ u16 partyHeldItems[6];
- /*0x1B2E*/ u8 partyLevels[6];
- /*0x1B34*/ u8 partyEVs[6];
+ /*0x1AD0*/ struct SecretBaseParty party;
};
#include "constants/game_stat.h"