summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/global.h b/include/global.h
index 5cbdbb360..2b54f5fdc 100644
--- a/include/global.h
+++ b/include/global.h
@@ -28,6 +28,7 @@ char* strcpy(char *dst0, const char *src0);
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
+#define POKEMON_SLOTS_NUMBER 412
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
@@ -239,6 +240,18 @@ struct SaveBlock2
extern struct SaveBlock2 *gSaveBlock2Ptr;
+#define PARTY_SIZE 6
+
+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;
@@ -246,7 +259,7 @@ struct SecretBaseRecord
/*0x1A9D*/ u8 gender:1;
/*0x1A9D*/ u8 sbr_field_1_5:1;
/*0x1A9D*/ u8 sbr_field_1_6:2;
- /*0x1A9E*/ u8 trainerName[OT_NAME_LENGTH];
+ /*0x1A9E*/ u8 trainerName[7]; // TODO: Change PLAYER_NAME_LENGTH to 7
/*0x1AA5*/ u8 trainerId[4]; // byte 0 is used for determining trainer class
/*0x1AA9*/ u8 language;
/*0x1AAA*/ u16 sbr_field_e;
@@ -254,12 +267,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"
@@ -535,7 +543,9 @@ struct SaveBlock1
/*0x1000*/ u16 vars[VARS_COUNT];
/*0x1200*/ u8 filler1200[0x100];
/*0x1300*/ struct QuestLog questLog[4];
- /*0x2ca0*/ u8 filler2CA0[0x7c0];
+ /*0x2ca0*/ u8 filler2CA0[0x44C];
+ /*0x30EC*/ struct EnigmaBerry enigmaBerry;
+ /*0x3120*/ u8 filler3120[0x340];
/*0x3460*/ struct MysteryEventStruct unk_3460;
/*0x3464*/ u8 filler_3464[0x1b8];
/*0x361C*/ struct RamScript ramScript;