2016-01-08 09:08:16 +00:00
# ifndef GUARD_GLOBAL_H
# define GUARD_GLOBAL_H
2018-01-21 19:40:19 +00:00
# include <string.h>
2019-06-29 03:26:11 +01:00
# include <limits.h>
2024-06-19 12:42:01 +01:00
# include "config/general.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
2016-10-31 08:14:22 +00:00
# include "gba/gba.h"
2023-07-07 13:11:49 +01:00
# include "fpmath.h"
2024-02-04 19:28:27 +00:00
# include "metaprogram.h"
2018-12-25 02:22:56 +00:00
# include "constants/global.h"
2020-06-24 22:00:19 +01:00
# include "constants/flags.h"
# include "constants/vars.h"
2020-10-01 22:20:38 +01:00
# include "constants/species.h"
2022-04-02 22:09:51 +01:00
# include "constants/pokedex.h"
2021-02-05 20:25:12 +00:00
# include "constants/berry.h"
2021-11-15 17:04:54 +00:00
# include "constants/maps.h"
2022-04-02 22:09:51 +01:00
# include "constants/pokemon.h"
# include "constants/easy_chat.h"
2022-03-04 16:02:19 +00:00
# include "constants/trainer_hill.h"
2024-01-14 19:32:38 +00:00
# include "constants/items.h"
2024-02-02 11:43:31 +00:00
# include "config/save.h"
2016-01-08 09:08:16 +00:00
2017-01-14 23:17:51 +00:00
// Prevent cross-jump optimization.
# define BLOCK_CROSS_JUMP asm("");
// to help in decompiling
2017-09-06 19:25:17 +01:00
# define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")
2018-05-11 23:24:32 +01:00
# define NAKED __attribute__((naked))
2017-01-14 23:17:51 +00:00
2021-10-23 10:10:00 +01:00
/// IDE support
# if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__)
// We define these when using certain IDEs to fool preproc
2023-03-14 18:38:18 +00:00
# define _(x) {x}
# define __(x) {x}
2021-10-23 10:10:00 +01:00
# define INCBIN(...) {0}
# define INCBIN_U8 INCBIN
# define INCBIN_U16 INCBIN
# define INCBIN_U32 INCBIN
# define INCBIN_S8 INCBIN
# define INCBIN_S16 INCBIN
# define INCBIN_S32 INCBIN
2023-12-25 00:10:33 +00:00
# define INCBIN_COMP INCBIN
2018-05-11 23:24:32 +01:00
# endif // IDE support
2017-01-14 23:17:51 +00:00
2018-01-29 23:26:36 +00:00
# define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
2017-01-14 23:17:51 +00:00
2019-08-05 13:46:52 +01:00
// GameFreak used a macro called "NELEMS", as evidenced by
// AgbAssert calls.
# define NELEMS(arr) (sizeof(arr) / sizeof(*(arr)))
2018-08-30 14:01:07 +01:00
# define SWAP(a, b, temp) \
{ \
temp = a ; \
a = b ; \
b = temp ; \
}
2018-01-31 20:26:57 +00:00
# define min(a, b) ((a) < (b) ? (a) : (b))
# define max(a, b) ((a) >= (b) ? (a) : (b))
2019-06-26 13:13:38 +01:00
# if MODERN
# define abs(x) (((x) < 0) ? -(x) : (x))
# endif
2021-03-19 22:17:43 +00:00
// Used in cases where division by 0 can occur in the retail version.
// Avoids invalid opcodes on some emulators, and the otherwise UB.
# ifdef UBFIX
2024-02-03 15:56:50 +00:00
# define SAFE_DIV(a, b) (((b) != 0) ? (a) / (b) : 0)
2021-03-19 22:17:43 +00:00
# else
# define SAFE_DIV(a, b) ((a) / (b))
# endif
2023-09-17 20:37:33 +01:00
# define IS_POW_OF_TWO(n) (((n) & ((n)-1)) == 0)
2023-08-16 21:44:45 +01:00
// The below macro does a%n, but (to match) will switch to a&(n-1) if n is a power of 2.
// There are cases where GF does a&(n-1) where we would really like to have a%n, because
// if n is changed to a value that isn't a power of 2 then a&(n-1) is unlikely to work as
// intended, and a%n for powers of 2 isn't always optimized to use &.
2024-08-15 18:34:56 +01:00
# define MOD(a, n) (((n) & ((n)-1)) ? ((a) % (n)) : ((a) & ((n)-1)))
2023-08-16 21:44:45 +01:00
2018-12-14 03:33:54 +00:00
// Extracts the upper 16 bits of a 32-bit number
# define HIHALF(n) (((n) & 0xFFFF0000) >> 16)
// Extracts the lower 16 bits of a 32-bit number
# define LOHALF(n) ((n) & 0xFFFF)
2017-11-29 18:54:15 +00:00
// There are many quirks in the source code which have overarching behavioral differences from
// a number of other files. For example, diploma.c seems to declare rodata before each use while
// other files declare out of order and must be at the beginning. There are also a number of
// macros which differ from one file to the next due to the method of obtaining the result, such
// as these below. Because of this, there is a theory (Two Team Theory) that states that these
// programming projects had more than 1 "programming team" which utilized different macros for
// each of the files that were worked on.
# define T1_READ_8(ptr) ((ptr)[0])
# define T1_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
# define T1_READ_32(ptr) ((ptr)[0] | ((ptr)[1] << 8) | ((ptr)[2] << 16) | ((ptr)[3] << 24))
2022-07-29 15:17:58 +01:00
# define T1_READ_PTR(ptr) (u8 *) T1_READ_32(ptr)
2017-11-29 18:54:15 +00:00
// T2_READ_8 is a duplicate to remain consistent with each group.
# define T2_READ_8(ptr) ((ptr)[0])
# define T2_READ_16(ptr) ((ptr)[0] + ((ptr)[1] << 8))
# define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
2022-07-29 15:52:35 +01:00
# define T2_READ_PTR(ptr) (void *) T2_READ_32(ptr)
2017-11-29 18:54:15 +00:00
2019-03-25 02:56:16 +00:00
// Macros for checking the joypad
2021-04-13 07:50:50 +01:00
# define TEST_BUTTON(field, button) ((field) & (button))
2019-03-25 02:56:16 +00:00
# define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
# define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
2020-08-24 19:52:33 +01:00
# define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button)
2020-08-07 07:00:41 +01:00
# define JOY_REPEAT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button)
2019-03-25 02:56:16 +00:00
2018-12-09 19:41:52 +00:00
# define S16TOPOSFLOAT(val) \
( { \
s16 v = ( val ) ; \
float f = ( float ) v ; \
if ( v < 0 ) f + = 65536.0f ; \
f ; \
} )
2024-08-15 18:34:56 +01:00
# define DIV_ROUND_UP(val, roundBy) (((val) / (roundBy)) + (((val) % (roundBy)) ? 1 : 0))
2020-06-24 22:00:19 +01:00
2021-11-01 16:02:08 +00:00
# define ROUND_BITS_TO_BYTES(numBits) DIV_ROUND_UP(numBits, 8)
2022-03-01 07:37:41 +00:00
# define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(POKEMON_SLOTS_NUMBER)
2021-11-01 16:02:08 +00:00
# define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT)
2023-03-13 19:37:46 +00:00
# define NUM_TRENDY_SAYING_BYTES ROUND_BITS_TO_BYTES(NUM_TRENDY_SAYINGS)
2020-06-24 22:00:19 +01:00
2022-05-25 17:46:48 +01:00
// This produces an error at compile-time if expr is zero.
// It looks like file.c:line: size of array `id' is negative
# define STATIC_ASSERT(expr, id) typedef char id[(expr) ? 1 : -1];
2023-09-08 03:18:18 +01:00
# define FEATURE_FLAG_ASSERT(flag, id) STATIC_ASSERT(flag > TEMP_FLAGS_END || flag == 0, id)
2024-08-29 14:36:05 +01:00
# ifndef NDEBUG
static inline void CycleCountStart ( )
{
REG_TM2CNT_H = 0 ;
REG_TM3CNT_H = 0 ;
REG_TM2CNT_L = 0 ;
REG_TM3CNT_L = 0 ;
// init timers (tim3 count up mode, tim2 every clock cycle)
REG_TM3CNT_H = TIMER_ENABLE | TIMER_COUNTUP ;
REG_TM2CNT_H = TIMER_1CLK | TIMER_ENABLE ;
}
static inline u32 CycleCountEnd ( )
{
// stop timers
REG_TM2CNT_H = 0 ;
REG_TM3CNT_H = 0 ;
// return result
return REG_TM2CNT_L | ( REG_TM3CNT_L < < 16u ) ;
}
# endif
2018-10-14 15:27:48 +01:00
struct Coords8
{
2018-08-11 22:51:54 +01:00
s8 x ;
s8 y ;
} ;
2018-10-14 15:27:48 +01:00
struct UCoords8
{
2018-08-11 22:51:54 +01:00
u8 x ;
u8 y ;
} ;
2017-09-01 22:40:13 +01:00
struct Coords16
{
s16 x ;
s16 y ;
} ;
struct UCoords16
{
u16 x ;
u16 y ;
} ;
2018-02-13 23:58:22 +00:00
struct Coords32
{
s32 x ;
s32 y ;
} ;
struct UCoords32
{
u32 x ;
u32 y ;
} ;
2017-09-02 22:28:44 +01:00
struct Time
{
/*0x00*/ s16 days ;
/*0x02*/ s8 hours ;
/*0x03*/ s8 minutes ;
/*0x04*/ s8 seconds ;
} ;
2024-09-03 19:22:01 +01:00
# include "constants/items.h"
# define ITEM_FLAGS_COUNT ((ITEMS_COUNT / 8) + ((ITEMS_COUNT % 8) ? 1 : 0))
2024-07-10 19:58:01 +01:00
struct SaveBlock3
{
# if OW_USE_FAKE_RTC
struct Time fakeRTC ;
# endif
2024-09-03 19:22:01 +01:00
# if OW_SHOW_ITEM_DESCRIPTIONS == OW_ITEM_DESCRIPTIONS_FIRST_TIME
u8 itemFlags [ ITEM_FLAGS_COUNT ] ;
# endif
2024-07-10 19:58:01 +01:00
} ;
extern struct SaveBlock3 * gSaveBlock3Ptr ;
2017-09-02 21:31:37 +01:00
struct Pokedex
{
/*0x00*/ u8 order ;
2018-12-15 20:12:28 +00:00
/*0x01*/ u8 mode ;
2017-09-02 21:31:37 +01:00
/*0x02*/ u8 nationalMagic ; // must equal 0xDA in order to have National mode
/*0x03*/ u8 unknown2 ;
/*0x04*/ u32 unownPersonality ; // set when you first see Unown
/*0x08*/ u32 spindaPersonality ; // set when you first see Spinda
/*0x0C*/ u32 unknown3 ;
2024-02-19 17:42:56 +00:00
# if FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 == FALSE
2019-05-14 10:54:58 +01:00
/*0x10*/ u8 filler [ 0x68 ] ; // Previously Dex Flags, feel free to remove.
2024-02-19 17:42:56 +00:00
# endif //FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2
2017-09-02 21:31:37 +01:00
} ;
2021-02-25 09:37:25 +00:00
struct PokemonJumpRecords
2017-09-03 21:50:17 +01:00
{
u16 jumpsInRow ;
2021-02-25 09:37:25 +00:00
u16 unused1 ; // Set to 0, never read
2017-09-03 21:50:17 +01:00
u16 excellentsInRow ;
2021-02-25 09:37:25 +00:00
u16 gamesWithMaxPlayers ;
u32 unused2 ; // Set to 0, never read
2017-09-03 21:50:17 +01:00
u32 bestJumpScore ;
} ;
2019-07-29 11:35:57 +01:00
struct BerryPickingResults
2017-09-03 21:50:17 +01:00
{
u32 bestScore ;
u16 berriesPicked ;
u16 berriesPickedInRow ;
2017-09-08 15:46:37 +01:00
u8 field_8 ;
u8 field_9 ;
u8 field_A ;
u8 field_B ;
u8 field_C ;
u8 field_D ;
u8 field_E ;
u8 field_F ;
2017-09-03 21:50:17 +01:00
} ;
struct PyramidBag
{
2021-10-23 15:55:46 +01:00
u16 itemId [ FRONTIER_LVL_MODE_COUNT ] [ PYRAMID_BAG_ITEMS_COUNT ] ;
2024-01-14 19:32:38 +00:00
# if MAX_PYRAMID_BAG_ITEM_CAPACITY > 255
u16 quantity [ FRONTIER_LVL_MODE_COUNT ] [ PYRAMID_BAG_ITEMS_COUNT ] ;
# else
2021-10-23 15:55:46 +01:00
u8 quantity [ FRONTIER_LVL_MODE_COUNT ] [ PYRAMID_BAG_ITEMS_COUNT ] ;
2024-01-14 19:32:38 +00:00
# endif
2017-09-03 21:50:17 +01:00
} ;
2017-09-08 15:46:37 +01:00
struct BerryCrush
{
2021-03-16 09:40:42 +00:00
u16 pressingSpeeds [ 4 ] ; // For the record with each possible group size, 2-5 players
2017-09-08 15:46:37 +01:00
u32 berryPowderAmount ;
u32 unk ;
} ;
2018-10-13 19:38:46 +01:00
struct ApprenticeMon
{
u16 species ;
2019-09-08 16:53:48 +01:00
u16 moves [ MAX_MON_MOVES ] ;
2018-10-13 19:38:46 +01:00
u16 item ;
} ;
2019-11-14 23:56:18 +00:00
// This is for past players Apprentices or Apprentices received via Record Mix.
// For the current Apprentice, see struct PlayersApprentice
2018-10-13 19:38:46 +01:00
struct Apprentice
2018-05-25 20:00:41 +01:00
{
2018-10-14 13:35:51 +01:00
u8 id : 5 ;
2022-12-18 01:55:43 +00:00
u8 lvlMode : 2 ;
//u8 padding1:1;
2019-11-20 22:36:52 +00:00
u8 numQuestions ;
2018-10-14 13:35:51 +01:00
u8 number ;
2022-12-18 01:55:43 +00:00
//u8 padding2;
2019-11-01 01:33:01 +00:00
struct ApprenticeMon party [ MULTI_PARTY_SIZE ] ;
2019-11-19 16:36:38 +00:00
u16 speechWon [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
2019-08-06 18:52:10 +01:00
u8 playerId [ TRAINER_ID_LENGTH ] ;
2018-10-12 23:48:26 +01:00
u8 playerName [ PLAYER_NAME_LENGTH ] ;
u8 language ;
2018-10-24 22:14:45 +01:00
u32 checksum ;
2018-05-25 20:00:41 +01:00
} ;
2018-12-10 20:49:33 +00:00
struct BattleTowerPokemon
2018-05-25 23:25:36 +01:00
{
u16 species ;
u16 heldItem ;
2019-09-08 16:53:48 +01:00
u16 moves [ MAX_MON_MOVES ] ;
2018-05-25 23:25:36 +01:00
u8 level ;
u8 ppBonuses ;
u8 hpEV ;
u8 attackEV ;
u8 defenseEV ;
u8 speedEV ;
u8 spAttackEV ;
u8 spDefenseEV ;
u32 otId ;
u32 hpIV : 5 ;
u32 attackIV : 5 ;
u32 defenseIV : 5 ;
u32 speedIV : 5 ;
u32 spAttackIV : 5 ;
u32 spDefenseIV : 5 ;
u32 gap : 1 ;
2019-05-14 14:22:16 +01:00
u32 abilityNum : 1 ;
2018-05-25 23:25:36 +01:00
u32 personality ;
2024-03-29 17:43:17 +00:00
u8 nickname [ VANILLA_POKEMON_NAME_LENGTH + 1 ] ;
2018-05-25 23:25:36 +01:00
u8 friendship ;
} ;
struct EmeraldBattleTowerRecord
{
2018-10-19 23:33:51 +01:00
/*0x00*/ u8 lvlMode ; // 0 = level 50, 1 = level 100
2018-10-20 23:06:42 +01:00
/*0x01*/ u8 facilityClass ;
2018-05-25 23:25:36 +01:00
/*0x02*/ u16 winStreak ;
2018-09-01 21:03:21 +01:00
/*0x04*/ u8 name [ PLAYER_NAME_LENGTH + 1 ] ;
2019-08-06 18:52:10 +01:00
/*0x0C*/ u8 trainerId [ TRAINER_ID_LENGTH ] ;
2019-11-14 23:56:18 +00:00
/*0x10*/ u16 greeting [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x1C*/ u16 speechWon [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x28*/ u16 speechLost [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
2019-11-24 21:58:40 +00:00
/*0x34*/ struct BattleTowerPokemon party [ MAX_FRONTIER_PARTY_SIZE ] ;
2018-05-25 23:25:36 +01:00
/*0xE4*/ u8 language ;
2022-12-18 01:55:43 +00:00
/*0xE7*/ //u8 padding[3];
2018-05-25 23:25:36 +01:00
/*0xE8*/ u32 checksum ;
} ;
2019-11-24 21:58:40 +00:00
struct BattleTowerInterview
{
u16 playerSpecies ;
u16 opponentSpecies ;
u8 opponentName [ PLAYER_NAME_LENGTH + 1 ] ;
2024-03-29 17:43:17 +00:00
u8 opponentMonNickname [ VANILLA_POKEMON_NAME_LENGTH + 1 ] ;
2019-11-24 21:58:40 +00:00
u8 opponentLanguage ;
} ;
2018-10-20 23:06:42 +01:00
struct BattleTowerEReaderTrainer
{
/*0x00*/ u8 unk0 ;
/*0x01*/ u8 facilityClass ;
/*0x02*/ u16 winStreak ;
/*0x04*/ u8 name [ PLAYER_NAME_LENGTH + 1 ] ;
2019-08-06 18:52:10 +01:00
/*0x0C*/ u8 trainerId [ TRAINER_ID_LENGTH ] ;
2019-11-14 23:56:18 +00:00
/*0x10*/ u16 greeting [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x1C*/ u16 farewellPlayerLost [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x28*/ u16 farewellPlayerWon [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
2019-11-01 01:33:01 +00:00
/*0x34*/ struct BattleTowerPokemon party [ FRONTIER_PARTY_SIZE ] ;
2018-10-20 23:06:42 +01:00
/*0xB8*/ u32 checksum ;
} ;
2020-07-11 13:07:10 +01:00
// For displaying party information on the player's Battle Dome tourney page
2019-12-21 09:27:12 +00:00
struct DomeMonData
2018-08-15 14:49:50 +01:00
{
2019-09-08 16:53:48 +01:00
u16 moves [ MAX_MON_MOVES ] ;
2019-12-18 07:32:52 +00:00
u8 evs [ NUM_STATS ] ;
2018-08-15 14:49:50 +01:00
u8 nature ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2018-08-15 14:49:50 +01:00
} ;
2019-02-07 18:58:09 +00:00
struct RentalMon
2018-08-26 14:27:06 +01:00
{
u16 monId ;
2022-12-18 01:55:43 +00:00
//u8 padding1[2];
2018-09-03 21:55:55 +01:00
u32 personality ;
u8 ivs ;
2019-05-14 14:22:16 +01:00
u8 abilityNum ;
2022-12-18 01:55:43 +00:00
//u8 padding2[2];
2018-08-26 14:27:06 +01:00
} ;
2018-08-15 22:04:46 +01:00
struct BattleDomeTrainer
2018-08-15 14:49:50 +01:00
{
2018-08-15 22:04:46 +01:00
u16 trainerId : 10 ;
2018-08-25 17:46:15 +01:00
u16 isEliminated : 1 ;
u16 eliminatedAt : 2 ;
2019-12-18 07:32:52 +00:00
u16 forfeited : 3 ;
2018-08-15 14:49:50 +01:00
} ;
2018-08-15 22:04:46 +01:00
# define DOME_TOURNAMENT_TRAINERS_COUNT 16
2020-11-17 16:21:34 +00:00
# define BATTLE_TOWER_RECORD_COUNT 5
2018-08-15 22:04:46 +01:00
2018-06-17 11:30:09 +01:00
struct BattleFrontier
2017-01-14 19:53:20 +00:00
{
2018-10-21 19:13:12 +01:00
/*0x64C*/ struct EmeraldBattleTowerRecord towerPlayer ;
2020-11-17 16:21:34 +00:00
/*0x738*/ struct EmeraldBattleTowerRecord towerRecords [ BATTLE_TOWER_RECORD_COUNT ] ; // From record mixing.
2019-11-24 21:58:40 +00:00
/*0xBEB*/ struct BattleTowerInterview towerInterview ;
2024-02-02 11:43:31 +00:00
# if FREE_BATTLE_TOWER_E_READER == FALSE
2020-06-10 05:07:46 +01:00
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer ; //188 bytes
2024-02-02 11:43:31 +00:00
# endif //FREE_BATTLE_TOWER_E_READER
2019-11-24 21:58:40 +00:00
/*0xCA8*/ u8 challengeStatus ;
/*0xCA9*/ u8 lvlMode : 2 ;
2022-12-18 01:55:43 +00:00
u8 challengePaused : 1 ;
u8 disableRecordBattle : 1 ;
//u8 padding1:4;
2019-11-25 21:43:43 +00:00
/*0xCAA*/ u16 selectedPartyMons [ MAX_FRONTIER_PARTY_SIZE ] ;
2019-11-24 21:58:40 +00:00
/*0xCB2*/ u16 curChallengeBattleNum ; // Battle number / room number (Pike) / floor number (Pyramid)
2019-02-07 17:37:28 +00:00
/*0xCB4*/ u16 trainerIds [ 20 ] ;
2019-11-24 21:58:40 +00:00
/*0xCDC*/ u32 winStreakActiveFlags ;
2021-10-23 15:55:46 +01:00
/*0xCE0*/ u16 towerWinStreaks [ 4 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xCF0*/ u16 towerRecordWinStreaks [ 4 ] [ FRONTIER_LVL_MODE_COUNT ] ;
2019-11-24 21:58:40 +00:00
/*0xD00*/ u16 battledBrainFlags ;
/*0xD02*/ u16 towerSinglesStreak ; // Never read
/*0xD04*/ u16 towerNumWins ; // Increments to MAX_STREAK but never read otherwise
/*0xD06*/ u8 towerBattleOutcome ;
/*0xD07*/ u8 towerLvlMode ;
2019-12-18 07:32:52 +00:00
/*0xD08*/ u8 domeAttemptedSingles50 : 1 ;
/*0xD08*/ u8 domeAttemptedSinglesOpen : 1 ;
/*0xD08*/ u8 domeHasWonSingles50 : 1 ;
/*0xD08*/ u8 domeHasWonSinglesOpen : 1 ;
/*0xD08*/ u8 domeAttemptedDoubles50 : 1 ;
/*0xD08*/ u8 domeAttemptedDoublesOpen : 1 ;
/*0xD08*/ u8 domeHasWonDoubles50 : 1 ;
/*0xD08*/ u8 domeHasWonDoublesOpen : 1 ;
/*0xD09*/ u8 domeUnused ;
/*0xD0A*/ u8 domeLvlMode ;
/*0xD0B*/ u8 domeBattleMode ;
2021-10-23 15:55:46 +01:00
/*0xD0C*/ u16 domeWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xD14*/ u16 domeRecordWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xD1C*/ u16 domeTotalChampionships [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
2018-08-15 22:04:46 +01:00
/*0xD24*/ struct BattleDomeTrainer domeTrainers [ DOME_TOURNAMENT_TRAINERS_COUNT ] ;
2019-11-01 01:33:01 +00:00
/*0xD64*/ u16 domeMonIds [ DOME_TOURNAMENT_TRAINERS_COUNT ] [ FRONTIER_PARTY_SIZE ] ;
2019-11-29 02:09:35 +00:00
/*0xDC4*/ u16 unused_DC4 ;
/*0xDC6*/ u16 palacePrize ;
2021-10-23 15:55:46 +01:00
/*0xDC8*/ u16 palaceWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDD0*/ u16 palaceRecordWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
2019-11-29 02:09:35 +00:00
/*0xDD8*/ u16 arenaPrize ;
2021-10-23 15:55:46 +01:00
/*0xDDA*/ u16 arenaWinStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDDE*/ u16 arenaRecordStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDE2*/ u16 factoryWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDEA*/ u16 factoryRecordWinStreaks [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDF6*/ u16 factoryRentsCount [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xDFA*/ u16 factoryRecordRentsCount [ 2 ] [ FRONTIER_LVL_MODE_COUNT ] ;
2019-11-29 02:09:35 +00:00
/*0xE02*/ u16 pikePrize ;
2021-10-23 15:55:46 +01:00
/*0xE04*/ u16 pikeWinStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xE08*/ u16 pikeRecordStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xE0C*/ u16 pikeTotalStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
2019-02-07 23:37:41 +00:00
/*0xE10*/ u8 pikeHintedRoomIndex : 3 ;
2022-12-18 01:55:43 +00:00
u8 pikeHintedRoomType : 4 ;
u8 pikeHealingRoomsDisabled : 1 ;
/*0xE11*/ //u8 padding2;
2019-11-01 01:33:01 +00:00
/*0xE12*/ u16 pikeHeldItemsBackup [ FRONTIER_PARTY_SIZE ] ;
2019-11-29 02:09:35 +00:00
/*0xE18*/ u16 pyramidPrize ;
2021-10-23 15:55:46 +01:00
/*0xE1A*/ u16 pyramidWinStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
/*0xE1E*/ u16 pyramidRecordStreaks [ FRONTIER_LVL_MODE_COUNT ] ;
2019-02-07 02:01:29 +00:00
/*0xE22*/ u16 pyramidRandoms [ 4 ] ;
2022-06-06 20:15:46 +01:00
/*0xE2A*/ u8 pyramidTrainerFlags ; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
2022-12-18 01:55:43 +00:00
/*0xE2B*/ //u8 padding3;
2017-09-03 21:50:17 +01:00
/*0xE2C*/ struct PyramidBag pyramidBag ;
2019-02-07 02:01:29 +00:00
/*0xE68*/ u8 pyramidLightRadius ;
2022-12-18 01:55:43 +00:00
/*0xE69*/ //u8 padding4;
2019-11-29 02:09:35 +00:00
/*0xE6A*/ u16 verdanturfTentPrize ;
/*0xE6C*/ u16 fallarborTentPrize ;
/*0xE6E*/ u16 slateportTentPrize ;
2019-12-21 09:27:12 +00:00
/*0xE70*/ struct RentalMon rentalMons [ FRONTIER_PARTY_SIZE * 2 ] ;
2018-10-27 23:50:06 +01:00
/*0xEB8*/ u16 battlePoints ;
2019-11-24 21:58:40 +00:00
/*0xEBA*/ u16 cardBattlePoints ;
2018-10-21 19:13:12 +01:00
/*0xEBC*/ u32 battlesCount ;
2019-12-18 07:32:52 +00:00
/*0xEC0*/ u16 domeWinningMoves [ DOME_TOURNAMENT_TRAINERS_COUNT ] ;
2019-11-13 21:10:05 +00:00
/*0xEE0*/ u8 trainerFlags ;
2021-10-23 15:55:46 +01:00
/*0xEE1*/ u8 opponentNames [ FRONTIER_LVL_MODE_COUNT ] [ PLAYER_NAME_LENGTH + 1 ] ;
/*0xEF1*/ u8 opponentTrainerIds [ FRONTIER_LVL_MODE_COUNT ] [ TRAINER_ID_LENGTH ] ;
2019-11-24 21:58:40 +00:00
/*0xEF9*/ u8 unk_EF9 : 7 ; // Never read
2019-11-13 21:10:05 +00:00
/*0xEF9*/ u8 savedGame : 1 ;
2019-11-24 21:58:40 +00:00
/*0xEFA*/ u8 unused_EFA ;
/*0xEFB*/ u8 unused_EFB ;
2019-12-21 09:27:12 +00:00
/*0xEFC*/ struct DomeMonData domePlayerPartyData [ FRONTIER_PARTY_SIZE ] ;
2017-01-14 19:53:20 +00:00
} ;
2019-11-20 22:36:52 +00:00
struct ApprenticeQuestion
2018-10-13 19:38:46 +01:00
{
2019-11-20 22:36:52 +00:00
u8 questionId : 2 ;
u8 monId : 2 ;
u8 moveSlot : 2 ;
u8 suggestedChange : 2 ; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
2022-12-18 01:55:43 +00:00
//u8 padding;
2019-11-20 22:36:52 +00:00
u16 data ; // used both as an itemId and a moveId
2018-10-13 19:38:46 +01:00
} ;
2018-10-14 15:27:48 +01:00
struct PlayersApprentice
{
/*0xB0*/ u8 id ;
2019-11-19 16:36:38 +00:00
/*0xB1*/ u8 lvlMode : 2 ; //0: Unassigned, 1: Lv 50, 2: Open Lv
/*0xB1*/ u8 questionsAnswered : 4 ;
2019-11-20 22:36:52 +00:00
/*0xB1*/ u8 leadMonId : 2 ;
/*0xB2*/ u8 party : 3 ;
2022-12-18 01:55:43 +00:00
u8 saveId : 2 ;
//u8 padding1:3;
2019-11-20 22:36:52 +00:00
/*0xB3*/ u8 unused ;
/*0xB4*/ u8 speciesIds [ MULTI_PARTY_SIZE ] ;
2022-12-18 01:55:43 +00:00
/*0xB7*/ //u8 padding2;
2019-11-20 22:36:52 +00:00
/*0xB8*/ struct ApprenticeQuestion questions [ APPRENTICE_MAX_QUESTIONS ] ;
2018-10-14 15:27:48 +01:00
} ;
2018-10-28 20:11:53 +00:00
struct RankingHall1P
{
2019-08-06 18:52:10 +01:00
u8 id [ TRAINER_ID_LENGTH ] ;
2018-10-28 20:11:53 +00:00
u16 winStreak ;
u8 name [ PLAYER_NAME_LENGTH + 1 ] ;
u8 language ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2018-10-28 20:11:53 +00:00
} ;
struct RankingHall2P
{
2019-08-06 18:52:10 +01:00
u8 id1 [ TRAINER_ID_LENGTH ] ;
u8 id2 [ TRAINER_ID_LENGTH ] ;
2018-10-28 20:11:53 +00:00
u16 winStreak ;
u8 name1 [ PLAYER_NAME_LENGTH + 1 ] ;
u8 name2 [ PLAYER_NAME_LENGTH + 1 ] ;
u8 language ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2018-10-28 20:11:53 +00:00
} ;
2018-06-17 11:30:09 +01:00
struct SaveBlock2
{
2018-09-01 21:03:21 +01:00
/*0x00*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
2018-06-17 11:30:09 +01:00
/*0x08*/ u8 playerGender ; // MALE, FEMALE
2018-12-27 22:30:47 +00:00
/*0x09*/ u8 specialSaveWarpFlags ;
2019-08-06 18:52:10 +01:00
/*0x0A*/ u8 playerTrainerId [ TRAINER_ID_LENGTH ] ;
2018-06-17 11:30:09 +01:00
/*0x0E*/ u16 playTimeHours ;
/*0x10*/ u8 playTimeMinutes ;
/*0x11*/ u8 playTimeSeconds ;
/*0x12*/ u8 playTimeVBlanks ;
/*0x13*/ u8 optionsButtonMode ; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
/*0x14*/ u16 optionsTextSpeed : 3 ; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
u16 optionsWindowFrameType : 5 ; // Specifies one of the 20 decorative borders for text boxes
u16 optionsSound : 1 ; // OPTIONS_SOUND_[MONO/STEREO]
u16 optionsBattleStyle : 1 ; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
u16 optionsBattleSceneOff : 1 ; // whether battle animations are disabled
u16 regionMapZoom : 1 ; // whether the map is zoomed in
2022-12-18 01:55:43 +00:00
//u16 padding1:4;
//u16 padding2;
2018-06-17 11:30:09 +01:00
/*0x18*/ struct Pokedex pokedex ;
/*0x90*/ u8 filler_90 [ 0x8 ] ;
/*0x98*/ struct Time localTimeOffset ;
/*0xA0*/ struct Time lastBerryTreeUpdate ;
2023-12-12 18:02:36 +00:00
/*0xA8*/ u32 gcnLinkFlags ; // Read by Pokémon Colosseum/XD
2018-06-17 11:30:09 +01:00
/*0xAC*/ u32 encryptionKey ;
2018-10-14 15:27:48 +01:00
/*0xB0*/ struct PlayersApprentice playerApprentice ;
2019-11-14 23:56:18 +00:00
/*0xDC*/ struct Apprentice apprentices [ APPRENTICE_COUNT ] ;
2018-06-17 11:30:09 +01:00
/*0x1EC*/ struct BerryCrush berryCrush ;
2024-02-02 11:43:31 +00:00
# if FREE_POKEMON_JUMP == FALSE
2021-02-25 09:37:25 +00:00
/*0x1FC*/ struct PokemonJumpRecords pokeJump ;
2024-02-02 11:43:31 +00:00
# endif //FREE_POKEMON_JUMP
2018-06-17 11:30:09 +01:00
/*0x20C*/ struct BerryPickingResults berryPick ;
2024-02-02 11:43:31 +00:00
# if FREE_RECORD_MIXING_HALL_RECORDS == FALSE
2021-10-23 15:55:46 +01:00
/*0x21C*/ struct RankingHall1P hallRecords1P [ HALL_FACILITIES_COUNT ] [ FRONTIER_LVL_MODE_COUNT ] [ HALL_RECORDS_COUNT ] ; // From record mixing.
/*0x57C*/ struct RankingHall2P hallRecords2P [ FRONTIER_LVL_MODE_COUNT ] [ HALL_RECORDS_COUNT ] ; // From record mixing.
2024-02-02 11:43:31 +00:00
# endif //FREE_RECORD_MIXING_HALL_RECORDS
2020-07-12 01:25:56 +01:00
/*0x624*/ u16 contestLinkResults [ CONTEST_CATEGORIES_COUNT ] [ CONTESTANT_COUNT ] ;
2018-06-17 11:30:09 +01:00
/*0x64C*/ struct BattleFrontier frontier ;
} ; // sizeof=0xF2C
2017-01-14 19:53:20 +00:00
extern struct SaveBlock2 * gSaveBlock2Ptr ;
2018-02-07 12:49:33 +00:00
struct SecretBaseParty
{
u32 personality [ PARTY_SIZE ] ;
2020-07-12 01:25:56 +01:00
u16 moves [ PARTY_SIZE * MAX_MON_MOVES ] ;
2018-02-07 12:49:33 +00:00
u16 species [ PARTY_SIZE ] ;
u16 heldItems [ PARTY_SIZE ] ;
u8 levels [ PARTY_SIZE ] ;
u8 EVs [ PARTY_SIZE ] ;
} ;
2019-04-05 22:11:24 +01:00
struct SecretBase
2017-09-02 20:43:53 +01:00
{
2017-10-24 00:21:08 +01:00
/*0x1A9C*/ u8 secretBaseId ;
2021-02-05 17:08:25 +00:00
/*0x1A9D*/ bool8 toRegister : 4 ;
2017-10-13 16:09:36 +01:00
/*0x1A9D*/ u8 gender : 1 ;
2019-04-05 22:11:24 +01:00
/*0x1A9D*/ u8 battledOwnerToday : 1 ;
/*0x1A9D*/ u8 registryStatus : 2 ;
2018-09-01 21:03:21 +01:00
/*0x1A9E*/ u8 trainerName [ PLAYER_NAME_LENGTH ] ;
2019-08-06 18:52:10 +01:00
/*0x1AA5*/ u8 trainerId [ TRAINER_ID_LENGTH ] ; // byte 0 is used for determining trainer class
2017-10-13 16:09:36 +01:00
/*0x1AA9*/ u8 language ;
2019-04-05 22:11:24 +01:00
/*0x1AAA*/ u16 numSecretBasesReceived ;
/*0x1AAC*/ u8 numTimesEntered ;
2021-02-05 17:08:25 +00:00
/*0x1AAD*/ u8 unused ;
2019-09-06 07:12:00 +01:00
/*0x1AAE*/ u8 decorations [ DECOR_MAX_SECRET_BASE ] ;
/*0x1ABE*/ u8 decorationPositions [ DECOR_MAX_SECRET_BASE ] ;
2022-12-18 01:55:43 +00:00
/*0x1ACE*/ //u8 padding[2];
2018-02-07 12:49:33 +00:00
/*0x1AD0*/ struct SecretBaseParty party ;
2017-09-02 20:43:53 +01:00
} ;
2017-12-05 17:55:48 +00:00
# include "constants/game_stat.h"
2017-09-02 20:43:53 +01:00
# include "global.fieldmap.h"
# include "global.berry.h"
2017-10-13 16:09:36 +01:00
# include "global.tv.h"
2017-09-02 20:43:53 +01:00
# include "pokemon.h"
struct WarpData
{
s8 mapGroup ;
s8 mapNum ;
s8 warpId ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2017-09-02 20:43:53 +01:00
s16 x , y ;
} ;
struct ItemSlot
{
u16 itemId ;
u16 quantity ;
} ;
struct Pokeblock
{
u8 color ;
u8 spicy ;
u8 dry ;
u8 sweet ;
u8 bitter ;
u8 sour ;
u8 feel ;
} ;
struct Roamer
{
/*0x00*/ u32 ivs ;
/*0x04*/ u32 personality ;
/*0x08*/ u16 species ;
/*0x0A*/ u16 hp ;
/*0x0C*/ u8 level ;
2024-06-17 10:44:47 +01:00
/*0x0D*/ u8 statusA ;
2017-09-02 20:43:53 +01:00
/*0x0E*/ u8 cool ;
/*0x0F*/ u8 beauty ;
/*0x10*/ u8 cute ;
/*0x11*/ u8 smart ;
/*0x12*/ u8 tough ;
/*0x13*/ bool8 active ;
2024-06-17 10:44:47 +01:00
/*0x14*/ u8 statusB ; // Stores frostbite
/*0x14*/ u8 filler [ 0x7 ] ;
2017-09-02 20:43:53 +01:00
} ;
struct RamScriptData
{
u8 magic ;
u8 mapGroup ;
u8 mapNum ;
u8 objectId ;
u8 script [ 995 ] ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2017-09-02 20:43:53 +01:00
} ;
struct RamScript
{
u32 checksum ;
struct RamScriptData data ;
} ;
2021-03-31 20:53:01 +01:00
// See dewford_trend.c
struct DewfordTrend
2017-09-02 20:43:53 +01:00
{
2021-03-31 20:53:01 +01:00
u16 trendiness : 7 ;
u16 maxTrendiness : 7 ;
u16 gainingTrendiness : 1 ;
2022-12-18 01:55:43 +00:00
//u16 padding:1;
2021-03-31 20:53:01 +01:00
u16 rand ;
2017-09-02 20:43:53 +01:00
u16 words [ 2 ] ;
} ; /*size = 0x8*/
2018-05-02 16:31:58 +01:00
struct MauvilleManCommon
{
u8 id ;
} ;
struct MauvilleManBard
{
/*0x00*/ u8 id ;
2022-12-18 01:55:43 +00:00
/*0x01*/ //u8 padding1;
2019-10-20 21:11:07 +01:00
/*0x02*/ u16 songLyrics [ BARD_SONG_LENGTH ] ;
/*0x0E*/ u16 temporaryLyrics [ BARD_SONG_LENGTH ] ;
/*0x1A*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
2018-05-02 16:31:58 +01:00
/*0x22*/ u8 filler_2DB6 [ 0x3 ] ;
2019-08-06 18:52:10 +01:00
/*0x25*/ u8 playerTrainerId [ TRAINER_ID_LENGTH ] ;
2018-05-02 16:31:58 +01:00
/*0x29*/ bool8 hasChangedSong ;
/*0x2A*/ u8 language ;
2022-12-18 01:55:43 +00:00
/*0x2B*/ //u8 padding2;
2017-09-02 20:43:53 +01:00
} ; /*size = 0x2C*/
2018-05-02 16:31:58 +01:00
struct MauvilleManStoryteller
{
u8 id ;
bool8 alreadyRecorded ;
u8 filler2 [ 2 ] ;
2019-10-20 21:11:07 +01:00
u8 gameStatIDs [ NUM_STORYTELLER_TALES ] ;
u8 trainerNames [ NUM_STORYTELLER_TALES ] [ PLAYER_NAME_LENGTH ] ;
u8 statValues [ NUM_STORYTELLER_TALES ] [ 4 ] ;
u8 language [ NUM_STORYTELLER_TALES ] ;
2018-05-02 16:31:58 +01:00
} ;
struct MauvilleManGiddy
2017-09-02 20:43:53 +01:00
{
2018-05-02 16:31:58 +01:00
/*0x00*/ u8 id ;
/*0x01*/ u8 taleCounter ;
/*0x02*/ u8 questionNum ;
2022-12-18 01:55:43 +00:00
/*0x03*/ //u8 padding1;
2021-10-18 05:08:36 +01:00
/*0x04*/ u16 randomWords [ GIDDY_MAX_TALES ] ;
2021-10-18 19:40:04 +01:00
/*0x18*/ u8 questionList [ GIDDY_MAX_QUESTIONS ] ;
2018-05-02 16:31:58 +01:00
/*0x20*/ u8 language ;
2022-12-18 01:55:43 +00:00
/*0x21*/ //u8 padding2;
2017-09-02 20:43:53 +01:00
} ; /*size = 0x2C*/
2018-05-02 16:31:58 +01:00
struct MauvilleManHipster
{
u8 id ;
2023-03-13 19:37:46 +00:00
bool8 taughtWord ;
2018-05-02 16:31:58 +01:00
u8 language ;
} ;
2017-09-02 20:43:53 +01:00
struct MauvilleOldManTrader
{
2018-05-07 23:18:00 +01:00
u8 id ;
2020-02-23 15:46:22 +00:00
u8 decorations [ NUM_TRADER_ITEMS ] ;
2019-10-20 21:11:07 +01:00
u8 playerNames [ NUM_TRADER_ITEMS ] [ 11 ] ;
2018-05-07 23:18:00 +01:00
u8 alreadyTraded ;
2019-10-20 21:11:07 +01:00
u8 language [ NUM_TRADER_ITEMS ] ;
2017-09-02 20:43:53 +01:00
} ;
typedef union OldMan
{
2018-05-02 16:31:58 +01:00
struct MauvilleManCommon common ;
struct MauvilleManBard bard ;
struct MauvilleManGiddy giddy ;
struct MauvilleManHipster hipster ;
2017-09-02 20:43:53 +01:00
struct MauvilleOldManTrader trader ;
2018-05-03 22:03:52 +01:00
struct MauvilleManStoryteller storyteller ;
2017-09-02 20:43:53 +01:00
u8 filler [ 0x40 ] ;
} OldMan ;
2018-05-01 13:01:54 +01:00
# define LINK_B_RECORDS_COUNT 5
2017-09-02 20:43:53 +01:00
struct LinkBattleRecord
{
2018-09-01 21:03:21 +01:00
u8 name [ PLAYER_NAME_LENGTH + 1 ] ;
2017-09-02 20:43:53 +01:00
u16 trainerId ;
u16 wins ;
u16 losses ;
u16 draws ;
} ;
2018-05-01 13:01:54 +01:00
struct LinkBattleRecords
{
struct LinkBattleRecord entries [ LINK_B_RECORDS_COUNT ] ;
u8 languages [ LINK_B_RECORDS_COUNT ] ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2018-05-01 13:01:54 +01:00
} ;
2017-09-02 20:43:53 +01:00
struct RecordMixingGiftData
{
u8 unk0 ;
u8 quantity ;
u16 itemId ;
u8 filler4 [ 8 ] ;
} ;
struct RecordMixingGift
{
int checksum ;
struct RecordMixingGiftData data ;
} ;
2017-09-03 21:50:17 +01:00
struct ContestWinner
{
u32 personality ;
u32 trainerId ;
u16 species ;
u8 contestCategory ;
2024-03-29 17:43:17 +00:00
u8 monName [ VANILLA_POKEMON_NAME_LENGTH + 1 ] ;
2018-09-01 21:03:21 +01:00
u8 trainerName [ PLAYER_NAME_LENGTH + 1 ] ;
2023-12-27 16:48:17 +00:00
u8 contestRank : 7 ;
bool8 isShiny : 1 ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2017-09-03 21:50:17 +01:00
} ;
2021-10-23 15:55:46 +01:00
struct Mail
{
/*0x00*/ u16 words [ MAIL_WORDS_COUNT ] ;
/*0x12*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
/*0x1A*/ u8 trainerId [ TRAINER_ID_LENGTH ] ;
/*0x1E*/ u16 species ;
/*0x20*/ u16 itemId ;
} ;
2021-04-25 22:22:45 +01:00
struct DaycareMail
2017-09-04 17:26:39 +01:00
{
2021-10-23 15:55:46 +01:00
struct Mail message ;
u8 otName [ PLAYER_NAME_LENGTH + 1 ] ;
2024-03-29 17:43:17 +00:00
u8 monName [ VANILLA_POKEMON_NAME_LENGTH + 1 ] ;
2017-11-14 19:23:25 +00:00
u8 gameLanguage : 4 ;
u8 monLanguage : 4 ;
2017-09-04 17:26:39 +01:00
} ;
2017-11-14 19:23:25 +00:00
struct DaycareMon
{
struct BoxPokemon mon ;
2021-04-25 22:22:45 +01:00
struct DaycareMail mail ;
2017-11-14 19:23:25 +00:00
u32 steps ;
2017-09-04 17:26:39 +01:00
} ;
2017-11-14 19:23:25 +00:00
struct DayCare
2017-09-04 17:26:39 +01:00
{
2017-11-14 19:23:25 +00:00
struct DaycareMon mons [ DAYCARE_MON_COUNT ] ;
2017-09-04 17:26:39 +01:00
u32 offspringPersonality ;
2024-12-20 10:23:51 +00:00
u32 stepCounter ;
2017-09-04 17:26:39 +01:00
} ;
2017-09-20 03:25:31 +01:00
struct LilycoveLadyQuiz
2017-09-19 21:17:23 +01:00
{
2017-09-20 03:25:31 +01:00
/*0x000*/ u8 id ;
2019-08-05 04:12:49 +01:00
/*0x001*/ u8 state ;
2021-09-09 20:24:34 +01:00
/*0x002*/ u16 question [ QUIZ_QUESTION_LEN ] ;
2019-08-06 01:37:09 +01:00
/*0x014*/ u16 correctAnswer ;
/*0x016*/ u16 playerAnswer ;
2018-09-01 21:03:21 +01:00
/*0x018*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
2019-08-06 18:52:10 +01:00
/*0x020*/ u16 playerTrainerId [ TRAINER_ID_LENGTH ] ;
2019-08-06 01:37:09 +01:00
/*0x028*/ u16 prize ;
2022-12-18 01:55:43 +00:00
/*0x02A*/ bool8 waitingForChallenger ;
/*0x02B*/ u8 questionId ;
/*0x02C*/ u8 prevQuestionId ;
/*0x02D*/ u8 language ;
2017-09-20 03:25:31 +01:00
} ;
2017-09-19 21:17:23 +01:00
2019-08-04 09:22:19 +01:00
struct LilycoveLadyFavor
2017-09-20 03:25:31 +01:00
{
/*0x000*/ u8 id ;
2019-08-05 04:12:49 +01:00
/*0x001*/ u8 state ;
/*0x002*/ bool8 likedItem ;
/*0x003*/ u8 numItemsGiven ;
2018-09-01 21:03:21 +01:00
/*0x004*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
2022-12-18 01:55:43 +00:00
/*0x00C*/ u8 favorId ;
/*0x00D*/ //u8 padding1;
/*0x00E*/ u16 itemId ;
2019-08-05 04:12:49 +01:00
/*0x010*/ u16 bestItem ;
2017-09-20 03:25:31 +01:00
/*0x012*/ u8 language ;
2022-12-18 01:55:43 +00:00
/*0x013*/ //u8 padding2;
2017-09-20 03:25:31 +01:00
} ;
2017-09-19 21:17:23 +01:00
2017-09-20 03:25:31 +01:00
struct LilycoveLadyContest
{
/*0x000*/ u8 id ;
2019-08-04 17:00:42 +01:00
/*0x001*/ bool8 givenPokeblock ;
2019-08-06 01:37:09 +01:00
/*0x002*/ u8 numGoodPokeblocksGiven ;
/*0x003*/ u8 numOtherPokeblocksGiven ;
2018-09-01 21:03:21 +01:00
/*0x004*/ u8 playerName [ PLAYER_NAME_LENGTH + 1 ] ;
2022-12-18 01:55:43 +00:00
/*0x00C*/ u8 maxSheen ;
/*0x00D*/ u8 category ;
/*0x00E*/ u8 language ;
2017-09-20 03:25:31 +01:00
} ;
2017-11-02 23:26:14 +00:00
typedef union // 3b58
2017-09-20 03:25:31 +01:00
{
struct LilycoveLadyQuiz quiz ;
2019-08-04 09:38:59 +01:00
struct LilycoveLadyFavor favor ;
2017-09-20 03:25:31 +01:00
struct LilycoveLadyContest contest ;
2017-09-20 21:49:22 +01:00
u8 id ;
2022-12-18 01:55:43 +00:00
u8 filler [ 0x40 ] ;
2017-09-19 21:17:23 +01:00
} LilycoveLady ;
2017-10-20 17:52:01 +01:00
struct WaldaPhrase
{
2018-12-15 22:58:47 +00:00
u16 colors [ 2 ] ; // Background, foreground.
2017-10-20 17:52:01 +01:00
u8 text [ 16 ] ;
u8 iconId ;
u8 patternId ;
bool8 patternUnlocked ;
2022-12-18 01:55:43 +00:00
//u8 padding;
2017-10-20 17:52:01 +01:00
} ;
2019-02-15 08:40:57 +00:00
struct TrainerNameRecord
2018-12-15 22:58:47 +00:00
{
2017-12-05 00:10:37 +00:00
u32 trainerId ;
2023-07-24 19:04:23 +01:00
u8 ALIGNED ( 2 ) trainerName [ PLAYER_NAME_LENGTH + 1 ] ;
2017-12-05 00:10:37 +00:00
} ;
2022-03-04 16:02:19 +00:00
struct TrainerHillSave
2019-01-13 11:12:27 +00:00
{
2019-02-28 02:28:34 +00:00
/*0x3D64*/ u32 timer ;
2019-02-28 03:16:01 +00:00
/*0x3D68*/ u32 bestTime ;
2019-11-16 18:45:21 +00:00
/*0x3D6C*/ u8 unk_3D6C ;
2019-01-13 11:12:27 +00:00
/*0x3D6D*/ u8 unused ;
2019-11-13 21:10:05 +00:00
/*0x3D6E*/ u16 receivedPrize : 1 ;
2022-12-18 01:55:43 +00:00
u16 checkedFinalTime : 1 ;
u16 spokeToOwner : 1 ;
u16 hasLost : 1 ;
u16 maybeECardScanDuringChallenge : 1 ;
u16 field_3D6E_0f : 1 ;
u16 mode : 2 ; // HILL_MODE_*
//u16 padding:8;
2019-01-13 11:12:27 +00:00
} ;
2021-10-15 17:56:14 +01:00
struct WonderNewsMetadata
2019-03-24 22:20:35 +00:00
{
2021-10-17 07:09:31 +01:00
u8 newsType : 2 ;
2022-11-22 07:17:03 +00:00
u8 sentRewardCounter : 3 ;
u8 rewardCounter : 3 ;
u8 berry ;
2022-12-18 01:55:43 +00:00
//u8 padding[2];
2019-03-24 22:20:35 +00:00
} ;
2021-10-15 17:56:14 +01:00
struct WonderNews
2019-03-24 22:20:35 +00:00
{
2021-10-17 06:35:26 +01:00
u16 id ;
2021-10-15 17:56:14 +01:00
u8 sendType ; // SEND_TYPE_*
2021-10-14 17:12:16 +01:00
u8 bgType ;
2021-10-17 06:15:16 +01:00
u8 titleText [ WONDER_NEWS_TEXT_LENGTH ] ;
u8 bodyText [ WONDER_NEWS_BODY_TEXT_LINES ] [ WONDER_NEWS_TEXT_LENGTH ] ;
2019-03-24 22:20:35 +00:00
} ;
2021-10-15 17:56:14 +01:00
struct WonderCard
2019-03-24 22:20:35 +00:00
{
2021-10-17 06:15:16 +01:00
u16 flagId ; // Event flag (sReceivedGiftFlags) + WONDER_CARD_FLAG_OFFSET
2021-10-15 17:56:14 +01:00
u16 iconSpecies ;
2021-10-17 06:15:16 +01:00
u32 idNumber ;
2021-10-15 17:56:14 +01:00
u8 type : 2 ; // CARD_TYPE_*
2021-10-14 17:12:16 +01:00
u8 bgType : 4 ;
2021-10-15 17:56:14 +01:00
u8 sendType : 2 ; // SEND_TYPE_*
u8 maxStamps ;
2021-10-17 06:15:16 +01:00
u8 titleText [ WONDER_CARD_TEXT_LENGTH ] ;
u8 subtitleText [ WONDER_CARD_TEXT_LENGTH ] ;
u8 bodyText [ WONDER_CARD_BODY_TEXT_LINES ] [ WONDER_CARD_TEXT_LENGTH ] ;
u8 footerLine1Text [ WONDER_CARD_TEXT_LENGTH ] ;
u8 footerLine2Text [ WONDER_CARD_TEXT_LENGTH ] ;
2022-12-18 01:55:43 +00:00
//u8 padding[2];
2019-03-24 22:20:35 +00:00
} ;
2021-10-15 17:56:14 +01:00
struct WonderCardMetadata
2019-03-24 22:20:35 +00:00
{
2021-10-15 17:56:14 +01:00
u16 battlesWon ;
u16 battlesLost ;
u16 numTrades ;
u16 iconSpecies ;
2021-10-17 06:35:26 +01:00
u16 stampData [ 2 ] [ MAX_STAMP_CARD_STAMPS ] ; // First element is STAMP_SPECIES, second is STAMP_ID
2019-03-24 22:20:35 +00:00
} ;
2021-10-15 17:56:14 +01:00
struct MysteryGiftSave
2019-03-24 22:20:35 +00:00
{
2021-10-14 20:36:51 +01:00
u32 newsCrc ;
struct WonderNews news ;
u32 cardCrc ;
struct WonderCard card ;
2021-10-15 17:56:14 +01:00
u32 cardMetadataCrc ;
struct WonderCardMetadata cardMetadata ;
2021-10-14 20:36:51 +01:00
u16 questionnaireWords [ NUM_QUESTIONNAIRE_WORDS ] ;
2021-10-15 17:56:14 +01:00
struct WonderNewsMetadata newsMetadata ;
2022-09-11 19:14:49 +01:00
u32 trainerIds [ 2 ] [ 5 ] ; // Saved ids for 10 trainers, 5 each for battles and trades
2019-03-24 22:20:35 +00:00
} ; // 0x36C 0x3598
2021-02-15 16:40:16 +00:00
// For external event data storage. The majority of these may have never been used.
2021-02-16 20:37:58 +00:00
// In Emerald, the only known used fields are the PokeCoupon and BoxRS ones, but hacking the distribution discs allows Emerald to receive events and set the others
2021-02-15 16:40:16 +00:00
struct ExternalEventData
{
u8 unknownExternalDataFields1 [ 7 ] ; // if actually used, may be broken up into different fields.
2021-02-16 14:41:07 +00:00
u32 unknownExternalDataFields2 : 8 ;
u32 currentPokeCoupons : 24 ; // PokéCoupons stored by Pokémon Colosseum and XD from Mt. Battle runs. Earned PokéCoupons are also added to totalEarnedPokeCoupons. Colosseum/XD caps this at 9,999,999, but will read up to 16,777,215.
2021-02-17 19:11:45 +00:00
u32 gotGoldPokeCouponTitleReward : 1 ; // Master Ball from JP Colosseum Bonus Disc; for reaching 30,000 totalEarnedPokeCoupons
2021-02-16 14:41:07 +00:00
u32 gotSilverPokeCouponTitleReward : 1 ; // Light Ball Pikachu from JP Colosseum Bonus Disc; for reaching 5000 totalEarnedPokeCoupons
2021-02-16 21:08:58 +00:00
u32 gotBronzePokeCouponTitleReward : 1 ; // PP Max from JP Colosseum Bonus Disc; for reaching 2500 totalEarnedPokeCoupons
2021-02-16 14:41:07 +00:00
u32 receivedAgetoCelebi : 1 ; // from JP Colosseum Bonus Disc
u32 unknownExternalDataFields3 : 4 ;
u32 totalEarnedPokeCoupons : 24 ; // Used by the JP Colosseum bonus disc. Determines PokéCoupon rank to distribute rewards. Unread in International games. Colosseum/XD caps this at 9,999,999.
u8 unknownExternalDataFields4 [ 5 ] ; // if actually used, may be broken up into different fields.
2021-02-16 21:01:18 +00:00
} __attribute__ ( ( packed ) ) ; /*size = 0x14*/
2021-02-15 16:40:16 +00:00
// For external event flags. The majority of these may have never been used.
2021-02-16 14:41:07 +00:00
// In Emerald, Jirachi cannot normally be received, but hacking the distribution discs allows Emerald to receive Jirachi and set the flag
2021-02-15 16:40:16 +00:00
struct ExternalEventFlags
{
2021-02-16 21:01:18 +00:00
u8 usedBoxRS : 1 ; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
2021-02-17 19:11:45 +00:00
u8 boxRSEggsUnlocked : 2 ; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1499 deposited)
2022-12-18 01:55:43 +00:00
//u8 padding:5;
2021-02-15 16:40:16 +00:00
u8 unknownFlag1 ;
2021-02-16 14:41:07 +00:00
u8 receivedGCNJirachi ; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
2021-02-15 16:40:16 +00:00
u8 unknownFlag3 ;
u8 unknownFlag4 ;
u8 unknownFlag5 ;
u8 unknownFlag6 ;
u8 unknownFlag7 ;
u8 unknownFlag8 ;
u8 unknownFlag9 ;
u8 unknownFlag10 ;
u8 unknownFlag11 ;
u8 unknownFlag12 ;
u8 unknownFlag13 ;
u8 unknownFlag14 ;
u8 unknownFlag15 ;
u8 unknownFlag16 ;
u8 unknownFlag17 ;
u8 unknownFlag18 ;
u8 unknownFlag19 ;
u8 unknownFlag20 ;
2021-02-16 21:01:18 +00:00
} __attribute__ ( ( packed ) ) ; /*size = 0x15*/
2021-02-15 16:40:16 +00:00
2017-09-02 20:43:53 +01:00
struct SaveBlock1
{
/*0x00*/ struct Coords16 pos ;
/*0x04*/ struct WarpData location ;
2018-12-27 22:30:47 +00:00
/*0x0C*/ struct WarpData continueGameWarp ;
/*0x14*/ struct WarpData dynamicWarp ;
/*0x1C*/ struct WarpData lastHealLocation ; // used by white-out and teleport
/*0x24*/ struct WarpData escapeWarp ; // used by Dig and Escape Rope
2018-02-12 17:26:26 +00:00
/*0x2C*/ u16 savedMusic ;
2017-09-02 20:43:53 +01:00
/*0x2E*/ u8 weather ;
2018-12-08 18:05:03 +00:00
/*0x2F*/ u8 weatherCycleStage ;
2018-02-12 17:26:26 +00:00
/*0x30*/ u8 flashLevel ;
2022-12-18 01:55:43 +00:00
/*0x31*/ //u8 padding1;
2018-06-20 23:41:51 +01:00
/*0x32*/ u16 mapLayoutId ;
2017-09-02 20:43:53 +01:00
/*0x34*/ u16 mapView [ 0x100 ] ;
/*0x234*/ u8 playerPartyCount ;
2022-12-18 01:55:43 +00:00
/*0x235*/ //u8 padding2[3];
2018-04-29 12:36:26 +01:00
/*0x238*/ struct Pokemon playerParty [ PARTY_SIZE ] ;
2017-09-02 20:43:53 +01:00
/*0x490*/ u32 money ;
/*0x494*/ u16 coins ;
/*0x496*/ u16 registeredItem ; // registered for use with SELECT button
2018-04-29 12:36:26 +01:00
/*0x498*/ struct ItemSlot pcItems [ PC_ITEMS_COUNT ] ;
/*0x560*/ struct ItemSlot bagPocket_Items [ BAG_ITEMS_COUNT ] ;
/*0x5D8*/ struct ItemSlot bagPocket_KeyItems [ BAG_KEYITEMS_COUNT ] ;
/*0x650*/ struct ItemSlot bagPocket_PokeBalls [ BAG_POKEBALLS_COUNT ] ;
/*0x690*/ struct ItemSlot bagPocket_TMHM [ BAG_TMHM_COUNT ] ;
/*0x790*/ struct ItemSlot bagPocket_Berries [ BAG_BERRIES_COUNT ] ;
2017-12-15 23:08:23 +00:00
/*0x848*/ struct Pokeblock pokeblocks [ POKEBLOCKS_COUNT ] ;
2024-02-19 17:42:56 +00:00
# if FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1 == FALSE
2019-05-14 10:54:58 +01:00
/*0x988*/ u8 filler1 [ 0x34 ] ; // Previously Dex Flags, feel free to remove.
2024-02-19 17:42:56 +00:00
# endif //FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1
2017-09-02 20:43:53 +01:00
/*0x9BC*/ u16 berryBlenderRecords [ 3 ] ;
2021-10-15 17:56:14 +01:00
/*0x9C2*/ u8 unused_9C2 [ 6 ] ;
2024-02-02 11:43:31 +00:00
# if FREE_MATCH_CALL == FALSE
2017-09-02 20:43:53 +01:00
/*0x9C8*/ u16 trainerRematchStepCounter ;
2019-12-05 20:33:36 +00:00
/*0x9CA*/ u8 trainerRematches [ MAX_REMATCH_ENTRIES ] ;
2024-02-02 11:43:31 +00:00
# endif //FREE_MATCH_CALL
2022-12-18 01:55:43 +00:00
/*0xA2E*/ //u8 padding3[2];
2019-11-21 04:12:51 +00:00
/*0xA30*/ struct ObjectEvent objectEvents [ OBJECT_EVENTS_COUNT ] ;
/*0xC70*/ struct ObjectEventTemplate objectEventTemplates [ OBJECT_EVENT_TEMPLATES_COUNT ] ;
2020-06-24 22:00:19 +01:00
/*0x1270*/ u8 flags [ NUM_FLAG_BYTES ] ;
2017-09-13 18:30:05 +01:00
/*0x139C*/ u16 vars [ VARS_COUNT ] ;
2017-09-03 21:50:17 +01:00
/*0x159C*/ u32 gameStats [ NUM_GAME_STATS ] ;
2017-09-13 18:30:05 +01:00
/*0x169C*/ struct BerryTree berryTrees [ BERRY_TREES_COUNT ] ;
2019-04-05 22:11:24 +01:00
/*0x1A9C*/ struct SecretBase secretBases [ SECRET_BASES_COUNT ] ;
2020-02-23 15:46:22 +00:00
/*0x271C*/ u8 playerRoomDecorations [ DECOR_MAX_PLAYERS_HOUSE ] ;
/*0x2728*/ u8 playerRoomDecorationPositions [ DECOR_MAX_PLAYERS_HOUSE ] ;
/*0x2734*/ u8 decorationDesks [ 10 ] ;
/*0x273E*/ u8 decorationChairs [ 10 ] ;
/*0x2748*/ u8 decorationPlants [ 10 ] ;
/*0x2752*/ u8 decorationOrnaments [ 30 ] ;
/*0x2770*/ u8 decorationMats [ 30 ] ;
/*0x278E*/ u8 decorationPosters [ 10 ] ;
/*0x2798*/ u8 decorationDolls [ 40 ] ;
/*0x27C0*/ u8 decorationCushions [ 10 ] ;
2018-05-25 23:25:36 +01:00
/*0x27CC*/ TVShow tvShows [ TV_SHOWS_COUNT ] ;
2022-12-18 01:55:43 +00:00
/*0x27CA*/ //u8 padding4[2];
2018-05-25 23:25:36 +01:00
/*0x2B50*/ PokeNews pokeNews [ POKE_NEWS_COUNT ] ;
2017-09-03 21:50:17 +01:00
/*0x2B90*/ u16 outbreakPokemonSpecies ;
2017-10-13 16:09:36 +01:00
/*0x2B92*/ u8 outbreakLocationMapNum ;
/*0x2B93*/ u8 outbreakLocationMapGroup ;
/*0x2B94*/ u8 outbreakPokemonLevel ;
2021-11-16 21:13:52 +00:00
/*0x2B95*/ u8 outbreakUnused1 ;
/*0x2B96*/ u16 outbreakUnused2 ;
2019-09-08 16:53:48 +01:00
/*0x2B98*/ u16 outbreakPokemonMoves [ MAX_MON_MOVES ] ;
2021-11-16 21:13:52 +00:00
/*0x2BA0*/ u8 outbreakUnused3 ;
2017-10-13 16:09:36 +01:00
/*0x2BA1*/ u8 outbreakPokemonProbability ;
/*0x2BA2*/ u16 outbreakDaysLeft ;
2017-09-03 21:50:17 +01:00
/*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData ;
2019-11-14 23:56:18 +00:00
/*0x2BB0*/ u16 easyChatProfile [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x2BBC*/ u16 easyChatBattleStart [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x2BC8*/ u16 easyChatBattleWon [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
/*0x2BD4*/ u16 easyChatBattleLost [ EASY_CHAT_BATTLE_WORDS_COUNT ] ;
2021-10-23 15:55:46 +01:00
/*0x2BE0*/ struct Mail mail [ MAIL_COUNT ] ;
2023-03-13 19:37:46 +00:00
/*0x2E20*/ u8 unlockedTrendySayings [ NUM_TRENDY_SAYING_BYTES ] ; // Bitfield for unlockable Easy Chat words in EC_GROUP_TRENDY_SAYING
2022-12-18 01:55:43 +00:00
/*0x2E25*/ //u8 padding5[3];
2017-09-03 21:50:17 +01:00
/*0x2E28*/ OldMan oldMan ;
2021-03-31 20:53:01 +01:00
/*0x2e64*/ struct DewfordTrend dewfordTrends [ SAVED_TRENDS_COUNT ] ;
2020-06-17 22:48:20 +01:00
/*0x2e90*/ struct ContestWinner contestWinners [ NUM_CONTEST_WINNERS ] ; // see CONTEST_WINNER_*
2017-11-14 19:23:25 +00:00
/*0x3030*/ struct DayCare daycare ;
2024-02-02 11:43:31 +00:00
# if FREE_LINK_BATTLE_RECORDS == FALSE
2018-05-01 13:01:54 +01:00
/*0x3150*/ struct LinkBattleRecords linkBattleRecords ;
2024-02-02 11:43:31 +00:00
# endif //FREE_LINK_BATTLE_RECORDS
2021-02-17 19:11:45 +00:00
/*0x31A8*/ u8 giftRibbons [ GIFT_RIBBONS_COUNT ] ;
2021-02-15 16:40:16 +00:00
/*0x31B3*/ struct ExternalEventData externalEventData ;
/*0x31C7*/ struct ExternalEventFlags externalEventFlags ;
2024-06-15 10:17:32 +01:00
/*0x31DC*/ struct Roamer roamer [ ROAMER_COUNT ] ;
2024-02-02 11:43:31 +00:00
# if FREE_ENIGMA_BERRY == FALSE
2017-09-03 21:50:17 +01:00
/*0x31F8*/ struct EnigmaBerry enigmaBerry ;
2024-02-02 11:43:31 +00:00
# endif //FREE_ENIGMA_BERRY
2024-02-02 15:31:19 +00:00
# if FREE_MYSTERY_GIFT == FALSE
2021-10-14 20:36:51 +01:00
/*0x322C*/ struct MysteryGiftSave mysteryGift ;
2024-02-02 15:31:19 +00:00
# endif //FREE_MYSTERY_GIFT
2022-04-02 22:09:51 +01:00
/*0x3???*/ u8 dexSeen [ NUM_DEX_FLAG_BYTES ] ;
/*0x3???*/ u8 dexCaught [ NUM_DEX_FLAG_BYTES ] ;
2024-02-02 11:43:31 +00:00
# if FREE_TRAINER_HILL == FALSE
2022-07-23 03:57:02 +01:00
/*0x3???*/ u32 trainerHillTimes [ NUM_TRAINER_HILL_MODES ] ;
2024-02-02 11:43:31 +00:00
# endif //FREE_TRAINER_HILL
# if FREE_MYSTERY_EVENT_BUFFERS == FALSE
2019-05-14 10:54:58 +01:00
/*0x3???*/ struct RamScript ramScript ;
2024-02-02 11:43:31 +00:00
# endif //FREE_MYSTERY_EVENT_BUFFERS
2019-05-14 10:54:58 +01:00
/*0x3???*/ struct RecordMixingGift recordMixingGift ;
/*0x3???*/ LilycoveLady lilycoveLady ;
/*0x3???*/ struct TrainerNameRecord trainerNameRecords [ 20 ] ;
2024-02-02 11:43:31 +00:00
# if FREE_UNION_ROOM_CHAT == FALSE
2020-07-11 13:07:10 +01:00
/*0x3???*/ u8 registeredTexts [ UNION_ROOM_KB_ROW_COUNT ] [ 21 ] ;
2024-02-02 11:43:31 +00:00
# endif //FREE_UNION_ROOM_CHAT
# if FREE_TRAINER_HILL == FALSE
2022-07-23 03:57:02 +01:00
/*0x3???*/ struct TrainerHillSave trainerHill ;
2024-02-02 11:43:31 +00:00
# endif //FREE_TRAINER_HILL
2019-05-14 10:54:58 +01:00
/*0x3???*/ struct WaldaPhrase waldaPhrase ;
// sizeof: 0x3???
2017-09-02 20:43:53 +01:00
} ;
extern struct SaveBlock1 * gSaveBlock1Ptr ;
2018-02-12 14:01:43 +00:00
struct MapPosition
{
s16 x ;
s16 y ;
2022-04-02 22:09:51 +01:00
s8 elevation ;
2018-02-12 14:01:43 +00:00
} ;
2016-01-08 09:08:16 +00:00
# endif // GUARD_GLOBAL_H