summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2017-10-09 10:23:23 -0700
committerMarcus Huderle <huderlem@gmail.com>2017-10-09 10:40:04 -0700
commit72beb410f423cafd35989c0b8dd4c52860cf80f8 (patch)
tree155aa1e2c39ebd504e095bc8c1dc218aad3acdc4 /include/global.h
parenta871ce87a74421df64a9ad381d37dc32ff9bdc6d (diff)
parent3e03d362fae398fa56c4a6e45d7b999772d0803f (diff)
Merge remote-tracking branch 'upstream/master' into party_menu
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h58
1 files changed, 38 insertions, 20 deletions
diff --git a/include/global.h b/include/global.h
index 79269937f..f0eb7401f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -37,6 +37,7 @@ fndec\
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
+#define POKEMON_SLOTS_NUMBER 412
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
@@ -560,18 +561,34 @@ struct GabbyAndTyData
/*2b1b*/ u8 valB_5:3;
};
-struct RecordMixing_UnknownStructSub
+struct DayCareMail
{
- u32 unk0;
- u8 data[0x34];
- //u8 data[0x38];
+ /*0x00*/ struct MailStruct message;
+ /*0x24*/ u8 names[19];
};
-struct RecordMixing_UnknownStruct
+struct DayCareStepCountersEtc {
+ u32 steps[2];
+ u16 personalityLo;
+ u8 unk_11a;
+};
+
+struct RecordMixingDayCareMail
{
- struct RecordMixing_UnknownStructSub data[2];
+ struct DayCareMail mail[2];
u32 unk70;
- u16 unk74[0x2];
+ u16 unk74[2];
+};
+
+struct DayCareMisc
+{
+ struct DayCareMail mail[2];
+ struct DayCareStepCountersEtc countersEtc;
+};
+
+struct DayCareData {
+ struct BoxPokemon mons[2];
+ struct DayCareMisc misc;
};
struct LinkBattleRecord
@@ -597,15 +614,20 @@ struct RecordMixingGift
struct RecordMixingGiftData data;
};
+// there should be enough flags for all 412 slots
+// each slot takes up 8 flags
+// if the value is not divisible by 8, we need to account for the reminder as well
+#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0))
+
struct SaveBlock1 /* 0x02025734 */
{
/*0x00*/ struct Coords16 pos;
/*0x04*/ struct WarpData location;
/*0x0C*/ struct WarpData warp1;
/*0x14*/ struct WarpData warp2;
- /*0x1C*/ struct WarpData warp3;
+ /*0x1C*/ struct WarpData lastHealLocation;
/*0x24*/ struct WarpData warp4;
- /*0x2C*/ u16 battleMusic;
+ /*0x2C*/ u16 savedMusic;
/*0x2E*/ u8 weather;
/*0x2F*/ u8 filler_2F;
/*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest
@@ -623,7 +645,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x640*/ struct ItemSlot bagPocket_TMHM[64];
/*0x740*/ struct ItemSlot bagPocket_Berries[46];
/*0x7F8*/ struct Pokeblock pokeblocks[40];
- /*0x938*/ u8 unk938[52]; // pokedex related
+ /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO];
/*0x96C*/ u16 berryBlenderRecords[3];
/*0x972*/ u8 filler_972[0x6];
/*0x978*/ u16 trainerRematchStepCounter;
@@ -670,20 +692,16 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
/*0x2DFC*/ u8 filler_2DFC[0x8];
/*0x2E04*/ SB_Struct sbStruct;
- /*0x2F9C*/ struct BoxPokemon daycareData[2];
- /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C;
- /*0x30AC*/ u8 filler_30B4[0x2];
- /*0x30B6*/ u8 filler_30B6;
- /*0x30B7*/ u8 filler_30B7[1];
+ /*0x2F9C*/ struct DayCareData daycareData;
/*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5];
/*0x3108*/ u8 filler_3108[8];
- /*0x3110*/ u8 giftRibbons[7];
- /*0x3117*/ u8 filler_311B[0x2D];
+ /*0x3110*/ u8 giftRibbons[11];
+ /*0x3117*/ u8 filler_311B[0x29];
/*0x3144*/ struct Roamer roamer;
/*0x3160*/ struct EnigmaBerry enigmaBerry;
/*0x3690*/ struct RamScript ramScript;
/*0x3A7C*/ struct RecordMixingGift recordMixingGift;
- /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related
+ /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO];
};
extern struct SaveBlock1 gSaveBlock1;
@@ -705,8 +723,8 @@ struct Pokedex
/*0x04*/ u32 unownPersonality; // set when you first see Unown
/*0x08*/ u32 spindaPersonality; // set when you first see Spinda
/*0x0C*/ u32 unknown3;
- /*0x10*/ u8 owned[52];
- /*0x44*/ u8 seen[52];
+ /*0x10*/ u8 owned[DEX_FLAGS_NO];
+ /*0x44*/ u8 seen[DEX_FLAGS_NO];
};
struct SaveBlock2_Sub