summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h42
1 files changed, 31 insertions, 11 deletions
diff --git a/include/global.h b/include/global.h
index 5ddf9a0a8..9588deae3 100644
--- a/include/global.h
+++ b/include/global.h
@@ -32,6 +32,13 @@
// GF's lingo
#define NELEMS ARRAY_COUNT
+#define SWAP(a, b, temp) \
+{ \
+ temp = a; \
+ a = b; \
+ b = temp; \
+}
+
// useful math macros
// Converts a number to Q8.8 fixed-point format
@@ -127,7 +134,7 @@ struct Pokedex
/*0x00*/ u8 order;
/*0x01*/ u8 unknown1;
/*0x02*/ u8 nationalMagic; // must equal 0xDA in order to have National mode
- /*0x03*/ u8 unknown2;
+ /*0x03*/ u8 unknown2; // set to 0xB9 when national dex is first enabled
/*0x04*/ u32 unownPersonality; // set when you first see Unown
/*0x08*/ u32 spindaPersonality; // set when you first see Spinda
/*0x0C*/ u32 unknown3;
@@ -194,6 +201,11 @@ struct LinkBattleRecords
u8 languages[LINK_B_RECORDS_COUNT];
};
+#include "constants/game_stat.h"
+#include "global.fieldmap.h"
+#include "global.berry.h"
+#include "pokemon.h"
+
struct UnknownSaveBlock2Struct
{
u8 field_0;
@@ -214,6 +226,20 @@ struct UnknownSaveBlock2Struct
u8 field_EB;
}; // sizeof = 0xEC
+struct BattleTowerEReaderTrainer
+{
+ /*0x4A0 0x3F0 0x00*/ u8 unk0;
+ /*0x4A1 0x3F1 0x01*/ u8 facilityClass;
+ /*0x4A2 0x3F2 0x02*/ u16 winStreak;
+ /*0x4A4 0x3F4 0x04*/ u8 name[8];
+ /*0x4AC 0x3FC 0x0C*/ u8 trainerId[4];
+ /*0x4B0 0x400 0x10*/ u16 greeting[6];
+ /*0x4BC 0x40C 0x1C*/ u16 farewellPlayerLost[6];
+ /*0x4C8 0x418 0x28*/ u16 farewellPlayerWon[6];
+ /*0x4D4 0x424 0x34*/ struct BattleTowerPokemon party[3];
+ /*0x558 0x4A8 0xB8*/ u32 checksum;
+};
+
struct UnkSaveBlock2Substruct_55C
{
/* 0x000:0x55C */ u8 unk_00_0:1;
@@ -232,7 +258,7 @@ struct UnkSaveBlock2Substruct_55C
struct UnkSaveBlock2Substruct_B0
{
/* 0x000:0x0B0 */ u8 field_0[0x3F0];
- /* 0x3F0:0x4A0 */ u32 field_3F0[0x2F];
+ /* 0x3F0:0x4A0 */ struct BattleTowerEReaderTrainer field_3F0;
/* 0x4AC:0x55C */ struct UnkSaveBlock2Substruct_55C field_4AC;
/* 0x4C4:0x574 */ u8 field_4C4[0x324];
}; // size: 0x7E8
@@ -261,7 +287,6 @@ struct SaveBlock2
/*0x0A8*/ u32 field_A8;
/*0x0AC*/ u8 field_AC;
/*0x0AD*/ u8 field_AD;
- /*0x0AE*/ u8 filler_AE[0x2];
/*0x0B0*/ struct UnkSaveBlock2Substruct_B0 unk_B0;
/*0x898*/ u16 mapView[0x100];
/*0xA98*/ struct LinkBattleRecords linkBattleRecords;
@@ -304,11 +329,6 @@ struct SecretBaseRecord
/*0x1AD0*/ struct SecretBaseParty party;
};
-#include "constants/game_stat.h"
-#include "global.fieldmap.h"
-#include "global.berry.h"
-#include "pokemon.h"
-
struct WarpData
{
s8 mapGroup;
@@ -493,12 +513,12 @@ struct RecordMixingDayCareMail
bool16 holdsItem[DAYCARE_MON_COUNT];
};
-struct MysteryEventStruct
+struct MENewsJisanStruct
{
u8 unk_0_0:2;
u8 unk_0_2:3;
u8 unk_0_5:3;
- u8 unk_1;
+ u8 berry;
};
struct QuestLogNPCData
@@ -674,7 +694,7 @@ struct MEventBuffers
/*0x1c0 0x32e0*/ struct MEventBuffer_32E0 buffer_1c0;
/*0x310 0x3430*/ struct MEventBuffer_3430 buffer_310;
/*0x338 0x3458*/ u16 unk_338[4];
- /*0x340 0x3460*/ struct MysteryEventStruct unk_340;
+ /*0x340 0x3460*/ struct MENewsJisanStruct unk_340;
/*0x344 0x3464*/ u32 unk_344[2][5];
}; // 0x36C 0x348C