summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-10-11 11:56:24 -0500
committerGitHub <noreply@github.com>2018-10-11 11:56:24 -0500
commitbd88c803793a6e5c8f5d2ac1a852c912e980ef1d (patch)
treed45390654cd3f80ffccd4af95760133ef77366bd /include/global.h
parent10fff9c6f2d29899952d1751d3de827e7e98bb60 (diff)
parent05d03f7f3256b143a01506421c19964bcceaea5c (diff)
Merge pull request #18 from ProjectRevoTPP/pokemon
almost finish decompiling pokemon.c
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 11a79ebe8..ba681d570 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"
@@ -494,7 +502,9 @@ struct SaveBlock1
/*0x63a*/ u8 trainerRematches[100];
/*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT];
/*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64];
- /*0x0EE0*/ u8 fillerEE0[0x2580];
+ /*0x0EE0*/ u8 fillerEE0[0x220A];
+ /*0x30EA*/ struct EnigmaBerry enigmaBerry;
+ /*0x3120*/ u8 filler3120[0x340];
/*0x3460*/ struct MysteryEventStruct unk_3460;
/*0x3464*/ u8 filler_3464[0x1b8];
/*0x361C*/ struct RamScript ramScript;