summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h52
1 files changed, 34 insertions, 18 deletions
diff --git a/include/global.h b/include/global.h
index 82c4916bd..857ae6f07 100644
--- a/include/global.h
+++ b/include/global.h
@@ -93,6 +93,22 @@ enum LanguageId
#define GAME_LANGUAGE (LANGUAGE_GERMAN)
#endif
+// capacities of various saveblock objects
+#define DAYCARE_MON_COUNT 2
+#define POKEBLOCKS_COUNT 40
+#define MAP_OBJECTS_COUNT 16
+#define BERRY_TREES_COUNT 128
+#define FLAGS_COUNT 288
+#define VARS_COUNT 256
+#define MAIL_COUNT 16
+#define SECRET_BASES_COUNT 20
+#define PC_ITEMS_COUNT 50
+#define BAG_ITEMS_COUNT 20
+#define BAG_KEYITEMS_COUNT 20
+#define BAG_POKEBALLS_COUNT 16
+#define BAG_TMHM_COUNT 64
+#define BAG_BERRIES_COUNT 46
+
enum
{
MALE,
@@ -560,26 +576,26 @@ struct DayCareMail
};
struct DayCareStepCountersEtc {
- u32 steps[2];
+ u32 steps[DAYCARE_MON_COUNT];
u16 pendingEggPersonality;
u8 eggCycleStepsRemaining;
};
struct RecordMixingDayCareMail
{
- struct DayCareMail mail[2];
+ struct DayCareMail mail[DAYCARE_MON_COUNT];
u32 numDaycareMons;
- u16 itemsHeld[2]; // marks whether or not each daycare mon is currently holding an item.
+ u16 itemsHeld[DAYCARE_MON_COUNT]; // marks whether or not each daycare mon is currently holding an item.
};
struct DayCareMisc
{
- struct DayCareMail mail[2];
+ struct DayCareMail mail[DAYCARE_MON_COUNT];
struct DayCareStepCountersEtc countersEtc;
};
struct DayCare {
- struct BoxPokemon mons[2];
+ struct BoxPokemon mons[DAYCARE_MON_COUNT];
struct DayCareMisc misc;
};
@@ -640,25 +656,25 @@ struct SaveBlock1 /* 0x02025734 */
/*0x490*/ u32 money;
/*0x494*/ u16 coins;
/*0x496*/ u16 registeredItem; // registered for use with SELECT button
- /*0x498*/ struct ItemSlot pcItems[50];
- /*0x560*/ struct ItemSlot bagPocket_Items[20];
- /*0x5B0*/ struct ItemSlot bagPocket_KeyItems[20];
- /*0x600*/ struct ItemSlot bagPocket_PokeBalls[16];
- /*0x640*/ struct ItemSlot bagPocket_TMHM[64];
- /*0x740*/ struct ItemSlot bagPocket_Berries[46];
- /*0x7F8*/ struct Pokeblock pokeblocks[40];
+ /*0x498*/ struct ItemSlot pcItems[PC_ITEMS_COUNT];
+ /*0x560*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT];
+ /*0x5B0*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT];
+ /*0x600*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT];
+ /*0x640*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT];
+ /*0x740*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT];
+ /*0x7F8*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT];
/*0x938*/ u8 dexSeen2[DEX_FLAGS_NO];
/*0x96C*/ u16 berryBlenderRecords[3];
/*0x972*/ u8 filler_972[0x6];
/*0x978*/ u16 trainerRematchStepCounter;
/*0x97A*/ u8 trainerRematches[100];
- /*0x9E0*/ struct MapObject mapObjects[16];
+ /*0x9E0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT];
/*0xC20*/ struct MapObjectTemplate mapObjectTemplates[64];
- /*0x1220*/ u8 flags[0x120];
- /*0x1340*/ u16 vars[0x100];
+ /*0x1220*/ u8 flags[FLAGS_COUNT];
+ /*0x1340*/ u16 vars[VARS_COUNT];
/*0x1540*/ u32 gameStats[NUM_GAME_STATS];
- /*0x1608*/ struct BerryTree berryTrees[128];
- /*0x1A08*/ struct SecretBaseRecord secretBases[20];
+ /*0x1608*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
+ /*0x1A08*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT];
/*0x2688*/ u8 playerRoomDecor[12];
/*0x2694*/ u8 playerRoomDecorPos[12];
/*0x26A0*/ u8 decorDesk[10];
@@ -689,7 +705,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2B34*/ u16 unk2B34[6];
/*0x2B40*/ u16 unk2B40[6];
} easyChats;
- /*0x2B4C*/ struct MailStruct mail[16];
+ /*0x2B4C*/ struct MailStruct mail[MAIL_COUNT];
/*0x2D8C*/ u8 unk2D8C[4]; // What is this? Apparently it's supposed to be 64 bytes in size.
/*0x2D90*/ u8 filler_2D90[0x4];
/*0x2D94*/ union MauvilleMan mauvilleMan;