summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2020-01-13 20:26:20 -0600
committerMarcus Huderle <huderlem@gmail.com>2020-01-13 20:26:20 -0600
commit5a2d676e71b720e752ca8a624a5795b3b1d7eb6c (patch)
tree6ef755064008dfae8ce2942dc2762670cdabe815 /include
parent5007d279fea5326b41b877703c74fcaa56223364 (diff)
parent22931846d680de2bc585093678db3f5721aab891 (diff)
Merge remote-tracking branch 'upstream' into tustin2121-patch-5
Diffstat (limited to 'include')
-rw-r--r--include/alloc.h22
-rw-r--r--include/apprentice.h8
-rw-r--r--include/battle.h15
-rw-r--r--include/battle_anim.h104
-rw-r--r--include/battle_bg.h4
-rw-r--r--include/battle_controllers.h14
-rw-r--r--include/battle_dome.h4
-rw-r--r--include/battle_main.h6
-rw-r--r--include/battle_message.h4
-rw-r--r--include/battle_pyramid.h2
-rw-r--r--include/battle_pyramid_bag.h12
-rw-r--r--include/battle_setup.h1
-rw-r--r--include/battle_tower.h24
-rw-r--r--include/battle_util.h2
-rw-r--r--include/battle_util2.h2
-rw-r--r--include/berry.h33
-rw-r--r--include/bg.h85
-rw-r--r--include/blit.h17
-rw-r--r--include/coins.h4
-rw-r--r--include/constants/apprentice.h102
-rw-r--r--include/constants/battle_anim.h2
-rw-r--r--include/constants/battle_arena.h20
-rw-r--r--include/constants/battle_dome.h163
-rw-r--r--include/constants/battle_factory.h37
-rw-r--r--include/constants/battle_frontier.h94
-rw-r--r--include/constants/battle_frontier_mons.h899
-rw-r--r--include/constants/battle_frontier_trainers.h309
-rw-r--r--include/constants/battle_palace.h19
-rw-r--r--include/constants/battle_pike.h72
-rw-r--r--include/constants/battle_pyramid.h61
-rw-r--r--include/constants/battle_script_commands.h79
-rw-r--r--include/constants/battle_setup.h2
-rw-r--r--include/constants/battle_tent.h32
-rw-r--r--include/constants/battle_tent_mons.h173
-rw-r--r--include/constants/battle_tent_trainers.h99
-rw-r--r--include/constants/battle_tower.h41
-rw-r--r--include/constants/berry.h28
-rw-r--r--include/constants/cable_club.h15
-rw-r--r--include/constants/coins.h6
-rw-r--r--include/constants/contest.h19
-rw-r--r--include/constants/daycare.h27
-rw-r--r--include/constants/easy_chat.h9
-rwxr-xr-xinclude/constants/event_object_movement_constants.h4
-rw-r--r--include/constants/field_poison.h12
-rw-r--r--include/constants/field_specials.h78
-rw-r--r--include/constants/field_tasks.h13
-rw-r--r--include/constants/field_weather.h24
-rw-r--r--include/constants/flags.h430
-rw-r--r--include/constants/frontier_util.h75
-rw-r--r--include/constants/global.h34
-rw-r--r--include/constants/item.h20
-rw-r--r--include/constants/item_effects.h4
-rw-r--r--include/constants/items.h23
-rwxr-xr-xinclude/constants/layouts.h30
-rwxr-xr-xinclude/constants/map_groups.h202
-rw-r--r--include/constants/mauville_man.h10
-rw-r--r--include/constants/mauville_old_man.h12
-rwxr-xr-xinclude/constants/metatile_behaviors.h2
-rw-r--r--include/constants/metatile_labels.h250
-rw-r--r--include/constants/mevent.h15
-rw-r--r--include/constants/opponents.h1716
-rw-r--r--include/constants/party_menu.h132
-rw-r--r--include/constants/pokemon.h335
-rw-r--r--include/constants/script_menu.h168
-rw-r--r--include/constants/trade.h116
-rw-r--r--include/constants/trainer_hill.h61
-rw-r--r--include/constants/trainers.h86
-rw-r--r--include/constants/tv.h137
-rw-r--r--include/constants/union_room.h28
-rw-r--r--include/constants/vars.h92
-rw-r--r--include/constants/weather.h104
-rw-r--r--include/contest.h28
-rw-r--r--include/contest_link_80F57C4.h8
-rw-r--r--include/contest_painting.h11
-rwxr-xr-xinclude/contest_painting_effects.h28
-rw-r--r--include/data.h4
-rw-r--r--include/daycare.h8
-rw-r--r--include/dma3.h55
-rw-r--r--include/dodrio_berry_picking.h4
-rw-r--r--include/easy_chat.h8
-rw-r--r--include/egg_hatch.h4
-rw-r--r--include/event_data.h4
-rw-r--r--include/event_scripts.h409
-rw-r--r--include/field_effect.h14
-rw-r--r--include/field_player_avatar.h3
-rw-r--r--include/field_poison.h8
-rw-r--r--include/field_screen_effect.h58
-rw-r--r--include/field_special_scene.h2
-rw-r--r--include/field_specials.h34
-rw-r--r--include/field_weather.h99
-rw-r--r--include/fieldmap.h2
-rw-r--r--include/fldeff.h4
-rw-r--r--include/fldeff_misc.h2
-rw-r--r--include/frontier_util.h12
-rw-r--r--include/global.fieldmap.h55
-rw-r--r--include/global.h253
-rw-r--r--include/global.tv.h50
-rw-r--r--include/gpu_regs.h19
-rw-r--r--include/graphics.h220
-rw-r--r--include/gym_leader_rematch.h14
-rw-r--r--include/hall_of_fame.h2
-rwxr-xr-xinclude/image_processing_effects.h53
-rw-r--r--include/item.h21
-rw-r--r--include/item_menu.h14
-rw-r--r--include/item_use.h30
-rw-r--r--include/librfu.h10
-rw-r--r--include/link.h71
-rw-r--r--include/link_rfu.h6
-rw-r--r--include/match_call.h2
-rw-r--r--include/mauville_old_man.h10
-rw-r--r--include/menu.h6
-rw-r--r--include/menu_helpers.h7
-rw-r--r--include/metatile_behavior.h2
-rw-r--r--include/mon_markings.h6
-rw-r--r--include/mossdeep_gym.h9
-rw-r--r--include/naming_screen.h16
-rw-r--r--include/overworld.h2
-rw-r--r--include/party_menu.h144
-rw-r--r--include/pokeball.h2
-rw-r--r--include/pokemon.h194
-rw-r--r--include/pokemon_icon.h6
-rw-r--r--include/pokemon_jump.h6
-rw-r--r--include/pokemon_storage_system.h2
-rwxr-xr-xinclude/pokemon_summary_screen.h3
-rw-r--r--include/pokenav.h156
-rw-r--r--include/region_map.h2
-rw-r--r--include/rotating_tile_puzzle.h9
-rw-r--r--include/save.h21
-rw-r--r--include/save_location.h7
-rw-r--r--include/script.h2
-rw-r--r--include/script_menu.h24
-rw-r--r--include/script_movement.h6
-rw-r--r--include/script_pokemon_81B9.h6
-rw-r--r--include/script_pokemon_util_80F87D8.h2
-rw-r--r--include/secret_base.h10
-rw-r--r--include/slot_machine.h1
-rw-r--r--include/sprite.h319
-rw-r--r--include/start_menu.h6
-rw-r--r--include/string_util.h46
-rw-r--r--include/strings.h2233
-rw-r--r--include/task.h3
-rw-r--r--include/text.h297
-rw-r--r--include/trade.h27
-rw-r--r--include/trainer_hill.h21
-rw-r--r--include/trainer_see.h8
-rw-r--r--include/tv.h30
-rw-r--r--include/union_room.h6
-rwxr-xr-xinclude/union_room_chat.h11
-rw-r--r--include/window.h78
149 files changed, 7421 insertions, 4838 deletions
diff --git a/include/alloc.h b/include/alloc.h
deleted file mode 100644
index f2dcf6d46..000000000
--- a/include/alloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef GUARD_ALLOC_H
-#define GUARD_ALLOC_H
-
-#define HEAP_SIZE 0x1C000
-#define malloc Alloc
-#define calloc(ct, sz) AllocZeroed((ct) * (sz))
-#define free Free
-
-#define FREE_AND_SET_NULL(ptr) \
-{ \
- free(ptr); \
- ptr = NULL; \
-}
-
-extern u8 gHeap[];
-
-void *Alloc(u32 size);
-void *AllocZeroed(u32 size);
-void Free(void *pointer);
-void InitHeap(void *pointer, u32 size);
-
-#endif // GUARD_ALLOC_H
diff --git a/include/apprentice.h b/include/apprentice.h
index 195106c53..27ce0371e 100644
--- a/include/apprentice.h
+++ b/include/apprentice.h
@@ -1,21 +1,21 @@
#ifndef GUARD_APPRENTICE_H
#define GUARD_APPRENTICE_H
-#define APPRENTICE_SPECIES_COUNT 10
+#include "constants/apprentice.h"
struct ApprenticeTrainer
{
- u8 name[6][PLAYER_NAME_LENGTH + 1]; // For all six languages.
+ u8 name[NUM_LANGUAGES - 1][PLAYER_NAME_LENGTH + 1]; // For all languages except the unused one.
u16 otId;
u8 facilityClass;
u16 species[APPRENTICE_SPECIES_COUNT];
u8 id;
- u16 easyChatWords[6];
+ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
};
extern const struct ApprenticeTrainer gApprentices[];
-void CopyFriendsApprenticeChallengeText(u8 saveblockApprenticeId);
+void BufferApprenticeChallengeText(u8 saveApprenticeId);
void Apprentice_EnableBothScriptContexts(void);
void ResetApprenticeStruct(struct Apprentice *apprentice);
void ResetAllApprenticeData(void);
diff --git a/include/battle.h b/include/battle.h
index 0f4087c90..f8c685fb0 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -37,7 +37,6 @@
#define B_ACTION_NONE 0xFF
#define MAX_TRAINER_ITEMS 4
-#define MAX_MON_MOVES 4
// array entries for battle communication
#define MULTIUSE_STATE 0x0
@@ -180,19 +179,19 @@ struct AI_ThinkingStruct
u8 aiState;
u8 movesetIndex;
u16 moveConsidered;
- s8 score[4];
+ s8 score[MAX_MON_MOVES];
u32 funcResult;
u32 aiFlags;
u8 aiAction;
u8 aiLogicId;
u8 filler12[6];
- u8 simulatedRNG[4];
+ u8 simulatedRNG[MAX_MON_MOVES];
};
struct UsedMoves
{
- u16 moves[MAX_BATTLERS_COUNT];
- u16 unknown[MAX_BATTLERS_COUNT];
+ u16 moves[MAX_MON_MOVES];
+ u16 unknown[MAX_MON_MOVES];
};
struct BattleHistory
@@ -479,7 +478,7 @@ struct BattleScripting
u8 animArg1;
u8 animArg2;
u16 tripleKickPower;
- u8 atk49_state;
+ u8 moveendState;
u8 battlerWithAbility;
u8 multihitMoveEffect;
u8 battler;
@@ -487,9 +486,9 @@ struct BattleScripting
u8 animTargetsHit;
u8 statChanger;
bool8 statAnimPlayed;
- u8 atk23_state;
+ u8 getexpState;
u8 battleStyle;
- u8 atk6C_state;
+ u8 drawlvlupboxState;
u8 learnMoveState;
u8 field_20;
u8 reshowMainState;
diff --git a/include/battle_anim.h b/include/battle_anim.h
index a7b71bd85..c3019a5cf 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -101,7 +101,7 @@ void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2);
s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2);
u8 GetBattlerYCoordWithElevation(u8 battlerId);
void WaitAnimForDuration(struct Sprite *sprite);
-void sub_80A7938(struct Sprite *sprite);
+void AnimSnoreZ(struct Sprite *sprite);
void InitAnimLinearTranslation(struct Sprite *sprite);
void sub_80A6F98(struct Sprite *sprite);
u8 GetBattlerSpriteBGPriority(u8 battlerId);
@@ -141,17 +141,17 @@ bool8 AnimFastTranslateLinear(struct Sprite *sprite);
void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite);
void TranslateMonSpriteLinear(struct Sprite *sprite);
void TranslateSpriteLinear(struct Sprite *sprite);
-void sub_80A77C8(struct Sprite *sprite);
+void AnimSpriteOnMonPos(struct Sprite *sprite);
void sub_80A7000(struct Sprite *sprite);
void TranslateSpriteInCircleOverDuration(struct Sprite *sprite);
void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2);
void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds);
bool8 RunAffineAnimFromTaskData(struct Task *task);
-void sub_80A78AC(struct Sprite *sprite);
+void AnimThrowProjectile(struct Sprite *sprite);
void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused);
u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10);
void sub_80A749C(struct Sprite *sprite);
-void sub_80A6DEC(struct Sprite *sprite);
+void TradeMenuBouncePartySprites(struct Sprite *sprite);
void DestroyAnimVisualTaskAndDisableBlend(u8 taskId);
void DestroySpriteAndFreeResources_(struct Sprite *sprite);
void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId);
@@ -185,7 +185,7 @@ bool8 IsBattlerSpritePresent(u8 battlerId);
void sub_80A6C68(u32 arg0);
u8 GetAnimBattlerSpriteId(u8 wantedBattler);
bool8 IsDoubleBattle(void);
-u8 sub_80A6D94(void);
+u8 GetBattleBgPaletteNum(void);
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
@@ -221,66 +221,66 @@ void sub_8116EB4(u8);
void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *arg8, const u32 *arg9, const u32 *palette);
// battle_anim_effects_1.c
-void sub_810310C(u8 battler, struct Sprite* sprite);
+void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite);
void AnimMoveTwisterParticle(struct Sprite* sprite);
// water.c
-void sub_8108C94(struct Sprite *sprite);
+void AnimWaterPulseRing(struct Sprite *sprite);
// flying.c
void sub_810E2C8(struct Sprite *sprite);
// smokescreen.c
-u8 sub_807521C(s16 x, s16 y, u8 a3);
+u8 SmokescreenImpact(s16 x, s16 y, u8 a3);
u32 UnpackSelectedBattleAnimPalettes(s16);
u8 GetBattlerSpriteFinal_Y(u8, u16, u8);
-extern const struct OamData gUnknown_08524944;
-extern const struct OamData gUnknown_08524A8C;
-extern const struct OamData gUnknown_08524904;
-extern const struct OamData gUnknown_085249C4;
-extern const struct OamData gUnknown_0852490C;
-extern const struct OamData gUnknown_08524934;
-extern const struct OamData gUnknown_08524974;
-extern const struct OamData gUnknown_0852499C;
-extern const struct OamData gUnknown_085249CC;
-extern const struct OamData gUnknown_08524914;
-extern const struct OamData gUnknown_0852496C;
-extern const struct OamData gUnknown_08524A34;
-extern const struct OamData gUnknown_08524A3C;
-extern const struct OamData gUnknown_08524A94;
-extern const struct OamData gUnknown_08524954;
-extern const struct OamData gUnknown_08524AE4;
-extern const struct OamData gUnknown_085249D4;
-extern const struct OamData gUnknown_08524A9C;
-extern const struct OamData gUnknown_08524ADC;
-extern const struct OamData gUnknown_08524B14;
-extern const struct OamData gUnknown_08524A54;
-extern const struct OamData gUnknown_08524A14;
-extern const struct OamData gUnknown_08524A1C;
-extern const struct OamData gUnknown_085249BC;
-extern const struct OamData gUnknown_08524AF4;
-extern const struct OamData gUnknown_085249DC;
-extern const struct OamData gUnknown_08524AFC;
-extern const struct OamData gUnknown_08524B1C;
-extern const struct OamData gUnknown_08524A04;
-extern const struct OamData gUnknown_08524A2C;
-extern const struct OamData gUnknown_08524AEC;
-extern const struct OamData gUnknown_08524964;
-extern const struct OamData gUnknown_08524B24;
-extern const struct OamData gUnknown_08524A24;
-extern const struct OamData gUnknown_08524AC4;
-extern const struct OamData gUnknown_08524A84;
-extern const struct OamData gUnknown_08524A64;
-extern const struct OamData gUnknown_0852491C;
-extern const struct OamData gUnknown_0852495C;
-extern const struct OamData gUnknown_0852497C;
-extern const struct OamData gUnknown_085249F4;
-extern const struct OamData gUnknown_0852493C;
-extern const struct OamData gUnknown_08524A5C;
-extern const struct OamData gUnknown_08524A74;
+extern const struct OamData gOamData_AffineOff_ObjNormal_8x16;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_16x16;
+extern const struct OamData gOamData_AffineOff_ObjNormal_8x8;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_8x8;
+extern const struct OamData gOamData_AffineOff_ObjNormal_16x16;
+extern const struct OamData gOamData_AffineOff_ObjNormal_32x16;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_32x32;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_64x32;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_16x16;
+extern const struct OamData gOamData_AffineOff_ObjNormal_32x32;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_16x16;
+extern const struct OamData gOamData_AffineOff_ObjBlend_32x32;
+extern const struct OamData gOamData_AffineOff_ObjBlend_64x64;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_32x32;
+extern const struct OamData gOamData_AffineOff_ObjNormal_16x32;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_8x8;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_32x32;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_64x64;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_32x64;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_32x16;
+extern const struct OamData gOamData_AffineOff_ObjBlend_32x16;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_16x32;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_32x64;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_32x64;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_32x32;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_64x64;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_64x64;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_64x32;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_8x16;
+extern const struct OamData gOamData_AffineOff_ObjBlend_16x16;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_16x16;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_8x8;
+extern const struct OamData gOamData_AffineDouble_ObjBlend_8x16;
+extern const struct OamData gOamData_AffineOff_ObjBlend_8x8;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_8x16;
+extern const struct OamData gOamData_AffineNormal_ObjBlend_8x8;
+extern const struct OamData gOamData_AffineOff_ObjBlend_8x16;
+extern const struct OamData gOamData_AffineOff_ObjNormal_64x64;
+extern const struct OamData gOamData_AffineOff_ObjNormal_32x64;
+extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64;
+extern const struct OamData gOamData_AffineDouble_ObjNormal_32x16;
+extern const struct OamData gOamData_AffineOff_ObjNormal_64x32;
+extern const struct OamData gOamData_AffineOff_ObjBlend_64x32;
+extern const struct OamData gOamData_AffineOff_ObjBlend_16x32;
extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
diff --git a/include/battle_bg.h b/include/battle_bg.h
index dac41c992..167ea5cf7 100644
--- a/include/battle_bg.h
+++ b/include/battle_bg.h
@@ -2,11 +2,11 @@
#define GUARD_BATTLE_BG_H
void BattleInitBgsAndWindows(void);
-void sub_80356D0(void);
+void InitBattleBgsVideo(void);
void LoadBattleMenuWindowGfx(void);
void DrawMainBattleBackground(void);
void LoadBattleTextboxAndBackground(void);
-void sub_8035D74(u8 taskId);
+void InitLinkBattleVsScreen(u8 taskId);
void DrawBattleEntryBackground(void);
bool8 LoadChosenBattleElement(u8 caseId);
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
index 9449f1986..32918fefb 100644
--- a/include/battle_controllers.h
+++ b/include/battle_controllers.h
@@ -97,16 +97,16 @@ struct HpAndStatus
struct MovePpInfo
{
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
u8 ppBonuses;
};
struct ChooseMoveStruct
{
- u16 moves[4];
- u8 currentPp[4];
- u8 maxPp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 currentPp[MAX_MON_MOVES];
+ u8 maxPp[MAX_MON_MOVES];
u16 species;
u8 monType1;
u8 monType2;
@@ -248,8 +248,8 @@ void nullsub_21(void);
void PlayerHandleGetRawMonData(void);
void sub_80587B0(void);
void sub_805CC00(struct Sprite *sprite);
-void SetCB2ToReshowScreenAfterMenu(void);
-void SetCB2ToReshowScreenAfterMenu2(void);
+void CB2_SetUpReshowBattleScreenAfterMenu(void);
+void CB2_SetUpReshowBattleScreenAfterMenu2(void);
void c3_0802FDF4(u8 taskId);
void ActionSelectionCreateCursorAt(u8 cursorPos, u8 unused);
void ActionSelectionDestroyCursorAt(u8 cursorPos);
diff --git a/include/battle_dome.h b/include/battle_dome.h
index d1dfdb100..900508c4b 100644
--- a/include/battle_dome.h
+++ b/include/battle_dome.h
@@ -1,9 +1,9 @@
#ifndef GUARD_BATTLE_DOME_H
#define GUARD_BATTLE_DOME_H
-extern u32 gUnknown_0203CD70;
+extern u32 gPlayerPartyLostHP;
-int GetDomeTrainerMonCountInBits(u16 tournamentTrainerId);
+int GetDomeTrainerSelectedMons(u16 tournamentTrainerId);
int TrainerIdToDomeTournamentId(u16 trainerId);
#endif // GUARD_BATTLE_DOME_H
diff --git a/include/battle_main.h b/include/battle_main.h
index c134f819f..e04db17bb 100644
--- a/include/battle_main.h
+++ b/include/battle_main.h
@@ -77,20 +77,20 @@ void sub_803B3AC(void); // unused
void sub_803B598(void); // unused
void BattleTurnPassed(void);
u8 IsRunningFromBattleImpossible(void);
-void sub_803BDA0(u8 battlerId);
+void SwitchPartyOrder(u8 battlerId);
void SwapTurnOrder(u8 id1, u8 id2);
u8 GetWhoStrikesFirst(u8 battlerId1, u8 battlerId2, bool8 ignoreChosenMoves);
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
bool8 TryRunFromBattle(u8 battlerId);
-extern struct UnknownPokemonStruct4 gUnknown_02022FF8[3];
+extern struct UnknownPokemonStruct4 gMultiPartnerParty[MULTI_PARTY_SIZE];
extern const struct SpriteTemplate gUnknown_0831AC88;
extern const struct OamData gOamData_831ACA8;
extern const struct OamData gOamData_831ACB0;
extern const u8 gTypeEffectiveness[336];
-extern const u8 gTypeNames[][TYPE_NAME_LENGTH + 1];
+extern const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1];
extern const struct TrainerMoney gTrainerMoneyTable[];
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
extern const u8 *const gAbilityDescriptionPointers[];
diff --git a/include/battle_message.h b/include/battle_message.h
index 88ccbb90f..a3f2636e5 100644
--- a/include/battle_message.h
+++ b/include/battle_message.h
@@ -213,7 +213,7 @@ struct BattleMsgData
void BufferStringBattle(u16 stringID);
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src);
u32 BattleStringExpandPlaceholders(const u8* src, u8* dst);
-void BattlePutTextOnWindow(const u8* text, u8 arg1);
+void BattlePutTextOnWindow(const u8* text, u8 windowId);
void SetPpNumbersPaletteInMoveSelection(void);
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp);
@@ -259,7 +259,7 @@ extern const u8 gText_Love[];
extern const u8 gText_SpaceAndSpace[];
extern const u8 gText_CommaSpace[];
extern const u8 gText_Space2[];
-extern const u8 gText_ScrollTextUp[];
+extern const u8 gText_LineBreak[];
extern const u8 gText_NewLine[];
extern const u8 gText_Are[];
extern const u8 gText_Are2[];
diff --git a/include/battle_pyramid.h b/include/battle_pyramid.h
index d77172d0b..d0681acf3 100644
--- a/include/battle_pyramid.h
+++ b/include/battle_pyramid.h
@@ -9,7 +9,7 @@ void GenerateBattlePyramidWildMon(void);
u8 GetPyramidRunMultiplier(void);
u8 InBattlePyramid(void);
bool8 InBattlePyramid_(void);
-void sub_81A9E90(void);
+void PausePyramidChallenge(void);
void SoftResetInBattlePyramid(void);
void CopyPyramidTrainerSpeechBefore(u16 trainerId);
void CopyPyramidTrainerWinSpeech(u16 trainerId);
diff --git a/include/battle_pyramid_bag.h b/include/battle_pyramid_bag.h
index c3b799a4d..df111b939 100644
--- a/include/battle_pyramid_bag.h
+++ b/include/battle_pyramid_bag.h
@@ -36,15 +36,15 @@ extern struct PyramidBagCursorData gPyramidBagCursorData;
void InitBattlePyramidBagCursorPosition(void);
void CB2_PyramidBagMenuFromStartMenu(void);
-void sub_81C4F84(void);
+void CB2_ReturnToPyramidBagMenu(void);
void sub_81C5924(void);
void sub_81C59BC(void);
void sub_81C4EFC(void);
-void sub_81C4F98(u8 a0, void (*callback)(void));
-void sub_81C6714(u8 taskId);
-void sub_81C6A94(void);
-void sub_81C4F24(void);
-void sub_81C5B14(u8 taskId);
+void GoToBattlePyramidBagMenu(u8 a0, void (*callback)(void));
+void Task_CloseBattlePyramidBagMessage(u8 taskId);
+void TryStoreHeldItemsInPyramidBag(void);
+void ChooseItemsToTossFromPyramidBag(void);
+void CloseBattlePyramidBagAndSetCallback(u8 taskId);
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId));
#endif // GUARD_BATTLE_PYRAMID_BAG_H
diff --git a/include/battle_setup.h b/include/battle_setup.h
index 984c820bb..dacd1fa71 100644
--- a/include/battle_setup.h
+++ b/include/battle_setup.h
@@ -4,7 +4,6 @@
#include "gym_leader_rematch.h"
#define REMATCHES_COUNT 5
-#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
struct RematchTrainer
{
diff --git a/include/battle_tower.h b/include/battle_tower.h
index 12d6d2e9e..3bf2f004b 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -7,9 +7,9 @@ struct RSBattleTowerRecord
/*0x01*/ u8 facilityClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
- /*0x0C*/ u8 trainerId[4];
- /*0x10*/ u16 greeting[6];
- /*0x1C*/ struct BattleTowerPokemon party[3];
+ /*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
+ /*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x1C*/ struct BattleTowerPokemon party[FRONTIER_PARTY_SIZE];
/*0xA0*/ u32 checksum;
};
@@ -18,16 +18,16 @@ struct BattleFrontierTrainer
u8 facilityClass;
u8 filler1[3];
u8 trainerName[PLAYER_NAME_LENGTH + 1];
- u16 speechBefore[6];
- u16 speechWin[6];
- u16 speechLose[6];
- const u16 *monSets;
+ u16 speechBefore[EASY_CHAT_BATTLE_WORDS_COUNT];
+ u16 speechWin[EASY_CHAT_BATTLE_WORDS_COUNT];
+ u16 speechLose[EASY_CHAT_BATTLE_WORDS_COUNT];
+ const u16 *monSet;
};
struct FacilityMon
{
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 itemTableId;
u8 evSpread;
u8 nature;
@@ -48,8 +48,8 @@ extern u16 gUnknown_03006298[];
extern const struct BattleFrontierTrainer *gFacilityTrainers;
extern const struct FacilityMon *gFacilityTrainerMons;
-void sub_8161F74(void);
-u16 sub_8162548(u8 challengeNum, u8 battleNum);
+void CallBattleTowerFunc(void);
+u16 GetRandomScaledFrontierTrainerId(u8 challengeNum, u8 battleNum);
void SetBattleFacilityTrainerGfxId(u16 trainerId, u8 tempVarId);
void SetEReaderTrainerGfxId(void);
u8 GetBattleFacilityTrainerGfxId(u16 trainerId);
@@ -59,7 +59,7 @@ u8 GetFrontierOpponentClass(u16 trainerId);
void GetFrontierTrainerName(u8 *dst, u16 trainerId);
void FillFrontierTrainerParty(u8 monsCount);
void FillFrontierTrainersParties(u8 monsCount);
-u16 RandomizeFacilityTrainerMonSet(u16 trainerId);
+u16 GetRandomFrontierMonFromSet(u16 trainerId);
void FrontierSpeechToString(const u16 *words);
void DoSpecialTrainerBattle(void);
void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *record);
@@ -71,7 +71,7 @@ void GetEreaderTrainerName(u8 *dst);
void ValidateEReaderTrainer(void);
void ClearEReaderTrainer(struct BattleTowerEReaderTrainer *ereaderTrainer);
void CopyEReaderTrainerGreeting(void);
-void sub_81653CC(void);
+void TryHideBattleTowerReporter(void);
bool32 RubyBattleTowerRecordToEmerald(struct RSBattleTowerRecord *src, struct EmeraldBattleTowerRecord *dst);
bool32 EmeraldBattleTowerRecordToRuby(struct EmeraldBattleTowerRecord *src, struct RSBattleTowerRecord *dst);
void CalcApprenticeChecksum(struct Apprentice *apprentice);
diff --git a/include/battle_util.h b/include/battle_util.h
index 0756a387a..b77fa10ad 100644
--- a/include/battle_util.h
+++ b/include/battle_util.h
@@ -12,7 +12,7 @@
#define ABILITYEFFECT_ENDTURN 0x1
#define ABILITYEFFECT_MOVES_BLOCK 0x2
#define ABILITYEFFECT_ABSORBING 0x3
-#define ABILITYEFFECT_MOVE_END 0x4
+#define ABILITYEFFECT_ON_DAMAGE 0x4
#define ABILITYEFFECT_IMMUNITY 0x5
#define ABILITYEFFECT_FORECAST 0x6
#define ABILITYEFFECT_SYNCHRONIZE 0x7
diff --git a/include/battle_util2.h b/include/battle_util2.h
index 336698ea3..fe767ea4b 100644
--- a/include/battle_util2.h
+++ b/include/battle_util2.h
@@ -4,7 +4,7 @@
void AllocateBattleResources(void);
void FreeBattleResources(void);
void AdjustFriendshipOnBattleFaint(u8 battler);
-void sub_80571DC(u8 battler, u8 arg1);
+void SwitchPartyOrderInGameMulti(u8 battler, u8 arg1);
u32 sub_805725C(u8 battler);
#endif // GUARD_BATTLE_UTIL_H
diff --git a/include/berry.h b/include/berry.h
index 9ff18e198..ebe1e9a38 100644
--- a/include/berry.h
+++ b/include/berry.h
@@ -1,39 +1,6 @@
#ifndef GUARD_BERRY_H
#define GUARD_BERRY_H
-#define BERRY_NONE 0
-
-enum
-{
- BERRY_FIRMNESS_UNKNOWN,
- BERRY_FIRMNESS_VERY_SOFT,
- BERRY_FIRMNESS_SOFT,
- BERRY_FIRMNESS_HARD,
- BERRY_FIRMNESS_VERY_HARD,
- BERRY_FIRMNESS_SUPER_HARD,
-};
-
-enum
-{
- FLAVOR_SPICY,
- FLAVOR_DRY,
- FLAVOR_SWEET,
- FLAVOR_BITTER,
- FLAVOR_SOUR,
- FLAVOR_COUNT
-};
-
-enum
-{
- BERRY_STAGE_NO_BERRY, // there is no tree planted and the soil is completely flat.
- BERRY_STAGE_PLANTED,
- BERRY_STAGE_SPROUTED,
- BERRY_STAGE_TALLER,
- BERRY_STAGE_FLOWERING,
- BERRY_STAGE_BERRIES,
- BERRY_STAGE_SPARKLING = 0xFF,
-};
-
void ClearEnigmaBerries(void);
void SetEnigmaBerry(u8 *src);
bool32 IsEnigmaBerryValid(void);
diff --git a/include/bg.h b/include/bg.h
deleted file mode 100644
index 3c7eee292..000000000
--- a/include/bg.h
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef GUARD_BG_H
-#define GUARD_BG_H
-
-struct BGCntrlBitfield // for the I/O registers
-{
- volatile u16 priority:2;
- volatile u16 charBaseBlock:2;
- volatile u16 field_0_2:4;
- volatile u16 field_1_0:5;
- volatile u16 areaOverflowMode:1;
- volatile u16 screenSize:2;
-};
-
-enum
-{
- BG_ATTR_CHARBASEINDEX = 1,
- BG_ATTR_MAPBASEINDEX,
- BG_ATTR_SCREENSIZE,
- BG_ATTR_PALETTEMODE,
- BG_ATTR_MOSAIC,
- BG_ATTR_WRAPAROUND,
- BG_ATTR_PRIORITY,
- BG_ATTR_METRIC,
- BG_ATTR_TYPE,
- BG_ATTR_BASETILE,
-};
-
-struct BgTemplate
-{
- u16 bg:2; // 0x1, 0x2 -> 0x3
- u16 charBaseIndex:2; // 0x4, 0x8 -> 0xC
- u16 mapBaseIndex:5; // 0x10, 0x20, 0x40, 0x80, 0x100 -> 0x1F0
- u16 screenSize:2; // 0x200, 0x400 -> 0x600
- u16 paletteMode:1; // 0x800
- u16 priority:2; // 0x1000, 0x2000 > 0x3000
- u16 baseTile:10;
-};
-
-void ResetBgs(void);
-u8 GetBgMode(void);
-void ResetBgControlStructs(void);
-void Unused_ResetBgControlStruct(u8 bg);
-u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode);
-void SetTextModeAndHideBgs(void);
-bool8 IsInvalidBg(u8 bg);
-int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4);
-void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable);
-void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates);
-void InitBgFromTemplate(const struct BgTemplate *template);
-void SetBgMode(u8 bgMode);
-u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset);
-u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset);
-u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset);
-bool8 IsDma3ManagerBusyWithBgCopy(void);
-void ShowBg(u8 bg);
-void HideBg(u8 bg);
-void SetBgAttribute(u8 bg, u8 attributeId, u8 value);
-u16 GetBgAttribute(u8 bg, u8 attributeId);
-s32 ChangeBgX(u8 bg, s32 value, u8 op);
-s32 GetBgX(u8 bg);
-s32 ChangeBgY(u8 bg, s32 value, u8 op);
-s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
-s32 GetBgY(u8 bg);
-void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
-u8 Unused_AdjustBgMosaic(u8 a1, u8 a2);
-void SetBgTilemapBuffer(u8 bg, void *tilemap);
-void UnsetBgTilemapBuffer(u8 bg);
-void* GetBgTilemapBuffer(u8 bg);
-void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset);
-void CopyBgTilemapBufferToVram(u8 bg);
-void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height);
-void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette);
-void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 unused, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, s16 palette1, s16 tileOffset);
-void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height);
-void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette);
-void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, s16 tileNumDelta);
-u16 GetBgMetricTextMode(u8 bg, u8 whichMetric);
-u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric);
-u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 screenHeight);
-void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2);
-u32 GetBgType(u8 bg);
-bool32 IsInvalidBg32(u8 bg);
-bool32 IsTileMapOutsideWram(u8 bg);
-
-#endif // GUARD_BG_H
diff --git a/include/blit.h b/include/blit.h
deleted file mode 100644
index 78f67766e..000000000
--- a/include/blit.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef GUARD_BLIT_H
-#define GUARD_BLIT_H
-
-struct Bitmap
-{
- u8 *pixels;
- u32 width:16;
- u32 height:16;
-};
-
-void BlitBitmapRect4BitWithoutColorKey(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height);
-void BlitBitmapRect4Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey);
-void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
-void BlitBitmapRect4BitTo8Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset);
-void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
-
-#endif // GUARD_BLIT_H
diff --git a/include/coins.h b/include/coins.h
index 996519605..6190ebbab 100644
--- a/include/coins.h
+++ b/include/coins.h
@@ -6,7 +6,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y);
void HideCoinsWindow(void);
u16 GetCoins(void);
void SetCoins(u16 coinAmount);
-bool8 GiveCoins(u16 toAdd);
-bool8 TakeCoins(u16 toSub);
+bool8 AddCoins(u16 toAdd);
+bool8 RemoveCoins(u16 toSub);
#endif // GUARD_COINS_H
diff --git a/include/constants/apprentice.h b/include/constants/apprentice.h
index 9db58bb8e..f1bea5e8c 100644
--- a/include/constants/apprentice.h
+++ b/include/constants/apprentice.h
@@ -1,22 +1,90 @@
#ifndef GUARD_CONSTANTS_APPRENTICE_H
#define GUARD_CONSTANTS_APPRENTICE_H
-#define APPRENTICE_ASK_WHICH_LEVEL 0
-#define APPRENTICE_ASK_3SPECIES 1
-#define APPRENTICE_ASK_2SPECIES 2
-#define APPRENTICE_ASK_MOVES 3
-#define APPRENTICE_ASK_GIVE 4
-#define APPRENTICE_ASK_YES_NO 6
-
-#define APPRENTICE_BUFF_SPECIES1 0
-#define APPRENTICE_BUFF_SPECIES2 1
-#define APPRENTICE_BUFF_SPECIES3 2
-#define APPRENTICE_BUFF_MOVE1 3
-#define APPRENTICE_BUFF_MOVE2 4
-#define APPRENTICE_BUFF_ITEM 5
-#define APPRENTICE_BUFF_NAME 6
-#define APPRENTICE_BUFF_EASY_CHAT 7
-#define APPRENTICE_BUFF_LEVEL 8
-#define APPRENTICE_BUFF_SPECIES4 9
+#define NUM_APPRENTICES 16
+#define APPRENTICE_SPECIES_COUNT 10
+
+#define NUM_WHICH_MON_QUESTIONS MULTI_PARTY_SIZE
+#define NUM_WHICH_MOVE_QUESTIONS 5
+// + 2 below is 1 each for the lead mon question and the win speech question
+#define MAX_APPRENTICE_QUESTIONS NUM_WHICH_MON_QUESTIONS + NUM_WHICH_MOVE_QUESTIONS + 2
+
+#define APPRENTICE_LVL_MODE_50 (FRONTIER_LVL_50 + 1)
+#define APPRENTICE_LVL_MODE_OPEN (FRONTIER_LVL_OPEN + 1)
+
+#define APPRENTICE_FUNC_GAVE_LVLMODE 0
+#define APPRENTICE_FUNC_SET_LVLMODE 1
+#define APPRENTICE_FUNC_SET_ID 2
+#define APPRENTICE_FUNC_SHUFFLE_SPECIES 3
+#define APPRENTICE_FUNC_RANDOMIZE_QUESTIONS 4
+#define APPRENTICE_FUNC_ANSWERED_QUESTION 5
+#define APPRENTICE_FUNC_IS_FINAL_QUESTION 6
+#define APPRENTICE_FUNC_MENU 7
+#define APPRENTICE_FUNC_PRINT_MSG 8
+#define APPRENTICE_FUNC_RESET 9
+#define APPRENTICE_FUNC_CHECK_GONE 10
+#define APPRENTICE_FUNC_GET_QUESTION 11
+#define APPRENTICE_FUNC_GET_NUM_PARTY_MONS 12
+#define APPRENTICE_FUNC_SET_PARTY_MON 13
+#define APPRENTICE_FUNC_INIT_QUESTION_DATA 14
+#define APPRENTICE_FUNC_FREE_QUESTION_DATA 15
+#define APPRENTICE_FUNC_BUFFER_STRING 16
+#define APPRENTICE_FUNC_SET_MOVE 17
+#define APPRENTICE_FUNC_SET_LEAD_MON 18
+#define APPRENTICE_FUNC_OPEN_BAG 19
+#define APPRENTICE_FUNC_TRY_SET_HELD_ITEM 20
+#define APPRENTICE_FUNC_SAVE 21
+#define APPRENTICE_FUNC_SET_GFX_SAVED 22
+#define APPRENTICE_FUNC_SET_GFX 23
+#define APPRENTICE_FUNC_SHOULD_LEAVE 24
+#define APPRENTICE_FUNC_SHIFT_SAVED 25
+
+#define APPRENTICE_MSG_PLEASE_TEACH 0
+#define APPRENTICE_MSG_REJECT 1
+#define APPRENTICE_MSG_WHICH_LVL_MODE 2
+#define APPRENTICE_MSG_THANKS_LVL_MODE 3
+#define APPRENTICE_MSG_WHICH_MON_FIRST 4
+#define APPRENTICE_MSG_THANKS_MON_FIRST 5
+#define APPRENTICE_MSG_WHICH_MON 6
+#define APPRENTICE_MSG_THANKS_MON 7
+#define APPRENTICE_MSG_WHICH_MOVE 8
+#define APPRENTICE_MSG_THANKS_MOVE 9
+#define APPRENTICE_MSG_WHAT_HELD_ITEM 10
+#define APPRENTICE_MSG_PICK_WIN_SPEECH 11
+#define APPRENTICE_MSG_THANKS_HELD_ITEM 12
+#define APPRENTICE_MSG_HOLD_NOTHING 13
+#define APPRENTICE_MSG_THANKS_NO_HELD_ITEM 14
+#define APPRENTICE_MSG_THANKS_WIN_SPEECH 15
+#define APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED 16
+
+#define APPRENTICE_QUESTION_WHICH_FIRST 1
+#define APPRENTICE_QUESTION_WHICH_MON 2
+#define APPRENTICE_QUESTION_WHICH_MOVE 3
+#define APPRENTICE_QUESTION_WHAT_ITEM 4
+#define APPRENTICE_QUESTION_WIN_SPEECH 5
+
+// Would be redundant with the above set if they used the same values
+#define QUESTION_ID_WIN_SPEECH 0
+#define QUESTION_ID_WHAT_ITEM 1
+#define QUESTION_ID_WHICH_MOVE 2
+#define QUESTION_ID_WHICH_FIRST 3
+
+#define APPRENTICE_ASK_WHICH_LEVEL 0
+#define APPRENTICE_ASK_3SPECIES 1
+#define APPRENTICE_ASK_2SPECIES 2
+#define APPRENTICE_ASK_MOVES 3
+#define APPRENTICE_ASK_GIVE 4
+#define APPRENTICE_ASK_YES_NO 6
+
+#define APPRENTICE_BUFF_SPECIES1 0
+#define APPRENTICE_BUFF_SPECIES2 1
+#define APPRENTICE_BUFF_SPECIES3 2
+#define APPRENTICE_BUFF_MOVE1 3
+#define APPRENTICE_BUFF_MOVE2 4
+#define APPRENTICE_BUFF_ITEM 5
+#define APPRENTICE_BUFF_NAME 6
+#define APPRENTICE_BUFF_WIN_SPEECH 7
+#define APPRENTICE_BUFF_LEVEL 8
+#define APPRENTICE_BUFF_LEAD_MON_SPECIES 9
#endif // GUARD_CONSTANTS_APPRENTICE_H
diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h
index 0a023f0c2..0fe231cdc 100644
--- a/include/constants/battle_anim.h
+++ b/include/constants/battle_anim.h
@@ -237,7 +237,7 @@
#define ANIM_TAG_SPOTLIGHT (ANIM_SPRITES_START + 227)
#define ANIM_TAG_LETTER_Z (ANIM_SPRITES_START + 228)
#define ANIM_TAG_RAPID_SPIN (ANIM_SPRITES_START + 229)
-#define ANIM_TAG_TRI_FORCE_TRIANGLE (ANIM_SPRITES_START + 230)
+#define ANIM_TAG_TRI_ATTACK_TRIANGLE (ANIM_SPRITES_START + 230)
#define ANIM_TAG_WISP_ORB (ANIM_SPRITES_START + 231)
#define ANIM_TAG_WISP_FIRE (ANIM_SPRITES_START + 232)
#define ANIM_TAG_GOLD_STARS (ANIM_SPRITES_START + 233)
diff --git a/include/constants/battle_arena.h b/include/constants/battle_arena.h
new file mode 100644
index 000000000..e04211115
--- /dev/null
+++ b/include/constants/battle_arena.h
@@ -0,0 +1,20 @@
+#ifndef GUARD_CONSTANTS_BATTLE_ARENA_H
+#define GUARD_CONSTANTS_BATTLE_ARENA_H
+
+#define BATTLE_ARENA_FUNC_INIT 0
+#define BATTLE_ARENA_FUNC_GET_DATA 1
+#define BATTLE_ARENA_FUNC_SET_DATA 2
+#define BATTLE_ARENA_FUNC_SAVE 3
+#define BATTLE_ARENA_FUNC_SET_PRIZE 4
+#define BATTLE_ARENA_FUNC_GIVE_PRIZE 5
+#define BATTLE_ARENA_FUNC_GET_TRAINER_NAME 6
+
+#define ARENA_DATA_PRIZE 0
+#define ARENA_DATA_WIN_STREAK 1
+#define ARENA_DATA_WIN_STREAK_ACTIVE 2
+
+#define ARENA_CATEGORY_MIND 0
+#define ARENA_CATEGORY_SKILL 1
+#define ARENA_CATEGORY_BODY 2
+
+#endif //GUARD_CONSTANTS_BATTLE_ARENA_H
diff --git a/include/constants/battle_dome.h b/include/constants/battle_dome.h
new file mode 100644
index 000000000..ea7310e55
--- /dev/null
+++ b/include/constants/battle_dome.h
@@ -0,0 +1,163 @@
+#ifndef GUARD_CONSTANTS_BATTLE_DOME_H
+#define GUARD_CONSTANTS_BATTLE_DOME_H
+
+#define DOME_ROUND1 0
+#define DOME_ROUND2 1
+#define DOME_SEMIFINAL 2
+#define DOME_FINAL 3
+#define DOME_ROUNDS_COUNT 4
+
+//#define DOME_TOURNAMENT_TRAINERS_COUNT 16 -- defined in global
+#define DOME_TOURNAMENT_MATCHES_COUNT DOME_TOURNAMENT_TRAINERS_COUNT - 1
+
+#define DOME_BATTLE_PARTY_SIZE 2
+
+#define DOME_PLAYER_WON_MATCH 1
+#define DOME_PLAYER_LOST_MATCH 2
+#define DOME_PLAYER_RETIRED 9
+
+#define BATTLE_DOME_FUNC_INIT 0
+#define BATTLE_DOME_FUNC_GET_DATA 1
+#define BATTLE_DOME_FUNC_SET_DATA 2
+#define BATTLE_DOME_FUNC_GET_ROUND_TEXT 3
+#define BATTLE_DOME_FUNC_GET_OPPONENT_NAME 4
+#define BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY 5
+#define BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO 6
+#define BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE 7
+#define BATTLE_DOME_FUNC_SHOW_PREV_TOURNEY_TREE 8
+#define BATTLE_DOME_FUNC_SET_OPPONENT_ID 9
+#define BATTLE_DOME_FUNC_SET_OPPONENT_GFX 10
+#define BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE 11
+#define BATTLE_DOME_FUNC_RESOLVE_WINNERS 12
+#define BATTLE_DOME_FUNC_SAVE 13
+#define BATTLE_DOME_FUNC_INCREMENT_STREAK 14
+#define BATTLE_DOME_FUNC_SET_TRAINERS 15
+#define BATTLE_DOME_FUNC_RESET_SKETCH 16
+#define BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS 17
+#define BATTLE_DOME_FUNC_REDUCE_PARTY 18
+#define BATTLE_DOME_FUNC_COMPARE_SEEDS 19
+#define BATTLE_DOME_FUNC_GET_WINNER_NAME 20
+#define BATTLE_DOME_FUNC_INIT_RESULTS_TREE 21
+#define BATTLE_DOME_FUNC_INIT_TRAINERS 22
+
+#define DOME_DATA_WIN_STREAK 0
+#define DOME_DATA_WIN_STREAK_ACTIVE 1
+#define DOME_DATA_ATTEMPTED_SINGLES_50 2
+#define DOME_DATA_ATTEMPTED_SINGLES_OPEN 3
+#define DOME_DATA_HAS_WON_SINGLES_50 4
+#define DOME_DATA_HAS_WON_SINGLES_OPEN 5
+#define DOME_DATA_ATTEMPTED_CHALLENGE 6
+#define DOME_DATA_HAS_WON_CHALLENGE 7
+#define DOME_DATA_SELECTED_MONS 8
+#define DOME_DATA_PREV_TOURNEY_TYPE 9
+
+// ID for Exit/Cancel on the tourney tree
+#define TOURNEY_TREE_CLOSE_BUTTON 31
+
+// Input IDs on the tourney tree
+#define TOURNEY_TREE_SELECTED_CLOSE 0
+#define TOURNEY_TREE_NO_SELECTION 1
+#define TOURNEY_TREE_SELECTED_TRAINER 2
+#define TOURNEY_TREE_SELECTED_MATCH 3
+
+// Modes for showing the tourney tree info card
+#define INFOCARD_NEXT_OPPONENT 0
+#define INFOCARD_TRAINER 1
+#define INFOCARD_MATCH 2
+
+// Input IDs for the info cards
+#define INFOCARD_INPUT_NONE 0
+#define TRAINERCARD_INPUT_UP 1
+#define TRAINERCARD_INPUT_DOWN 2
+#define TRAINERCARD_INPUT_LEFT 3
+#define TRAINERCARD_INPUT_RIGHT 4
+#define MATCHCARD_INPUT_UP 5
+#define MATCHCARD_INPUT_DOWN 6
+#define MATCHCARD_INPUT_LEFT 7
+#define MATCHCARD_INPUT_RIGHT 8
+#define INFOCARD_INPUT_AB 9
+
+#define CARD_ALTERNATE_SLOT (1 << 0) // When set, uses an alternate slot to store the incoming card sprites
+#define MOVE_CARD_RIGHT (1 << 1)
+#define MOVE_CARD_DOWN (1 << 2)
+#define MOVE_CARD_LEFT (1 << 3)
+#define MOVE_CARD_UP (1 << 4)
+#define MOVE_CARD (MOVE_CARD_RIGHT | MOVE_CARD_DOWN | MOVE_CARD_LEFT | MOVE_CARD_UP)
+
+// Text IDs for sBattleDomeWinTexts
+#define DOME_TEXT_NO_WINNER_YET 0
+#define DOME_TEXT_WON_USING_MOVE 1
+#define DOME_TEXT_CHAMP_USING_MOVE 2
+#define DOME_TEXT_WON_ON_FORFEIT 3
+#define DOME_TEXT_CHAMP_ON_FORFEIT 4
+#define DOME_TEXT_WON_NO_MOVES 5
+#define DOME_TEXT_CHAMP_NO_MOVES 6
+
+// Offsets/start positions within sBattleDomeOpponentStatsTexts
+#define DOME_TEXT_TWO_GOOD_STATS 0
+#define DOME_TEXT_ONE_GOOD_STAT 15
+#define DOME_TEXT_TWO_BAD_STATS 21
+#define DOME_TEXT_ONE_BAD_STAT 36
+#define DOME_TEXT_WELL_BALANCED 42
+#define DOME_TEXT_HP 0
+#define DOME_TEXT_ATK 5
+#define DOME_TEXT_DEF 9
+#define DOME_TEXT_SPEED 12
+#define DOME_TEXT_SPATK 14
+
+// Move point indexes for sBattleStyleMovePoints[][], to determine Battle Dome trainers battle styles
+#define MOVE_POINTS_COMBO 0 // Moves that work well in combination (e.g. Rain Dance + Hydro Pump)
+#define MOVE_POINTS_STAT_RAISE 1
+#define MOVE_POINTS_STAT_LOWER 2
+#define MOVE_POINTS_RARE 3 // Uncommon moves. Mostly arbitrary
+#define MOVE_POINTS_HEAL 4
+#define MOVE_POINTS_RISKY 5
+#define MOVE_POINTS_STATUS 6
+#define MOVE_POINTS_DMG 7
+#define MOVE_POINTS_DEF 8 // Defensive moves, like Amnesia, Light Screen, or accuracy-lowers
+#define MOVE_POINTS_ACCURATE 9
+#define MOVE_POINTS_POWERFUL 10 // Most of the moves that are >= 100 power
+#define MOVE_POINTS_POPULAR 11 // Group seems arbitrary. All using it are TM/HMs, but its only 11/58
+#define MOVE_POINTS_LUCK 12
+#define MOVE_POINTS_STRONG 13 // Most of the moves that are >= 90 power
+#define MOVE_POINTS_LOW_PP 14
+#define MOVE_POINTS_EFFECT 15 // Moves with additional effects
+#define NUM_MOVE_POINT_TYPES 16
+
+// Battle style IDs for sBattleDomeOpponentStyleTexts
+#define DOME_BATTLE_STYLE_RISKY 0
+#define DOME_BATTLE_STYLE_STALL 1
+#define DOME_BATTLE_STYLE_VARIED 2
+#define DOME_BATTLE_STYLE_COMBO_HIGH 3
+#define DOME_BATTLE_STYLE_RARE_MOVES 4
+#define DOME_BATTLE_STYLE_RARE_MOVE 5
+#define DOME_BATTLE_STYLE_HP 6
+#define DOME_BATTLE_STYLE_STORE_POWER 7
+#define DOME_BATTLE_STYLE_ENFEEBLE_LOW 8
+#define DOME_BATTLE_STYLE_LUCK 9
+#define DOME_BATTLE_STYLE_REGAL 10
+#define DOME_BATTLE_STYLE_LOW_PP 11
+#define DOME_BATTLE_STYLE_STATUS_ATK 12
+#define DOME_BATTLE_STYLE_ENDURE 13
+#define DOME_BATTLE_STYLE_STATUS 14
+#define DOME_BATTLE_STYLE_STRAIGHTFORWARD 15
+#define DOME_BATTLE_STYLE_AGGRESSIVE 16
+#define DOME_BATTLE_STYLE_DEF 17
+#define DOME_BATTLE_STYLE_ENFEEBLE_HIGH 18
+#define DOME_BATTLE_STYLE_POPULAR_POWER 19
+#define DOME_BATTLE_STYLE_COMBO_LOW 20
+#define DOME_BATTLE_STYLE_ACCURATE 21
+#define DOME_BATTLE_STYLE_POWERFUL 22
+#define DOME_BATTLE_STYLE_ATK_OVER_DEF 23
+#define DOME_BATTLE_STYLE_DEF_OVER_ATK 24
+#define DOME_BATTLE_STYLE_POPULAR_STRONG 25
+#define DOME_BATTLE_STYLE_EFFECTS 26
+#define DOME_BATTLE_STYLE_BALANCED 27
+#define DOME_BATTLE_STYLE_UNUSED1 28
+#define DOME_BATTLE_STYLE_UNUSED2 29
+#define DOME_BATTLE_STYLE_UNUSED3 30
+#define DOME_BATTLE_STYLE_UNUSED4 31
+#define NUM_BATTLE_STYLES 32
+
+
+#endif //GUARD_CONSTANTS_BATTLE_DOME_H
diff --git a/include/constants/battle_factory.h b/include/constants/battle_factory.h
new file mode 100644
index 000000000..b3aa57449
--- /dev/null
+++ b/include/constants/battle_factory.h
@@ -0,0 +1,37 @@
+#ifndef GUARD_CONSTANTS_BATTLE_FACTORY_H
+#define GUARD_CONSTANTS_BATTLE_FACTORY_H
+
+#define FACTORY_STYLE_NONE 0
+#define FACTORY_STYLE_PREPARATION 1
+#define FACTORY_STYLE_SLOW_STEADY 2
+#define FACTORY_STYLE_ENDURANCE 3
+#define FACTORY_STYLE_HIGH_RISK 4
+#define FACTORY_STYLE_WEAKENING 5
+#define FACTORY_STYLE_UNPREDICTABLE 6
+#define FACTORY_STYLE_WEATHER 7
+#define FACTORY_NUM_STYLES 8
+
+
+#define BATTLE_FACTORY_FUNC_INIT 0
+#define BATTLE_FACTORY_FUNC_GET_DATA 1
+#define BATTLE_FACTORY_FUNC_SET_DATA 2
+#define BATTLE_FACTORY_FUNC_SAVE 3
+#define BATTLE_FACTORY_FUNC_NULL 4
+#define BATTLE_FACTORY_FUNC_NULL2 5
+#define BATTLE_FACTORY_FUNC_SELECT_RENT_MONS 6
+#define BATTLE_FACTORY_FUNC_SWAP_RENT_MONS 7
+#define BATTLE_FACTORY_FUNC_SET_SWAPPED 8
+#define BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS 9
+#define BATTLE_FACTORY_FUNC_SET_PARTIES 10
+#define BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX 11
+#define BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS 12
+#define BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS 13
+#define BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE 14
+#define BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE 15
+#define BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS 16
+
+#define FACTORY_DATA_WIN_STREAK 1
+#define FACTORY_DATA_WIN_STREAK_ACTIVE 2
+#define FACTORY_DATA_WIN_STREAK_SWAPS 3
+
+#endif // GUARD_CONSTANTS_BATTLE_FACTORY_H
diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h
index 1224c0f31..1a60714e8 100644
--- a/include/constants/battle_frontier.h
+++ b/include/constants/battle_frontier.h
@@ -1,32 +1,39 @@
#ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_H
#define GUARD_CONSTANTS_BATTLE_FRONTIER_H
+#define FRONTIER_CHALLENGE(facility, mode) ((facility << 8) + mode)
+
// Battle Frontier facility ids.
-#define FRONTIER_FACILITY_TOWER 0
-#define FRONTIER_FACILITY_DOME 1
-#define FRONTIER_FACILITY_PALACE 2
-#define FRONTIER_FACILITY_ARENA 3
-#define FRONTIER_FACILITY_FACTORY 4
-#define FRONTIER_FACILITY_PIKE 5
-#define FRONTIER_FACILITY_PYRAMID 6
-#define NUM_FRONTIER_FACILITIES 7
-// The multiplayer battle colosseum rooms re-use VAR_FRONTIER_FACILITY.
-#define FRONTIER_FACILITY_DOUBLE_COLOSSEUM 9
-
-#define TENT_VERDANTURF 2
-#define TENT_FALLARBOR 3
-#define TENT_SLATEPORT 4
+#define FRONTIER_FACILITY_TOWER 0
+#define FRONTIER_FACILITY_DOME 1
+#define FRONTIER_FACILITY_PALACE 2 // also Verdanturf Tent
+#define FRONTIER_FACILITY_ARENA 3 // also Fallarbor Tent
+#define FRONTIER_FACILITY_FACTORY 4 // also Slateport Tent
+#define FRONTIER_FACILITY_PIKE 5
+#define FRONTIER_FACILITY_PYRAMID 6
+#define NUM_FRONTIER_FACILITIES 7
+// VAR_FRONTIER_FACILITY is re-used for the below facilities as well
+#define FACILITY_LINK_CONTEST 7
+#define FACILITY_UNION_ROOM 8
+#define FACILITY_MULTI_OR_EREADER 9 // Direct Corner multi battles, multi battle with Steven, and e-Reader battles
// Battle Frontier lvl modes.
-#define FRONTIER_LVL_50 0
+#define FRONTIER_LVL_50 0
#define FRONTIER_LVL_OPEN 1
#define FRONTIER_LVL_TENT 2
// Battle Frontier battle modes.
-#define FRONTIER_MODE_SINGLES 0
-#define FRONTIER_MODE_DOUBLES 1
-#define FRONTIER_MODE_MULTIS 2
-#define FRONTIER_MODE_LINK_MULTIS 3
+#define FRONTIER_MODE_SINGLES 0
+#define FRONTIER_MODE_DOUBLES 1
+#define FRONTIER_MODE_MULTIS 2
+#define FRONTIER_MODE_LINK_MULTIS 3
+#define FRONTIER_MODE_COUNT 4
+
+// Challenge Statuses
+#define CHALLENGE_STATUS_SAVING 1
+#define CHALLENGE_STATUS_PAUSED 2
+#define CHALLENGE_STATUS_WON 3
+#define CHALLENGE_STATUS_LOST 4
// Special trainer battles.
#define SPECIAL_BATTLE_TOWER 0
@@ -41,8 +48,53 @@
#define SPECIAL_BATTLE_PIKE_DOUBLE 9
#define SPECIAL_BATTLE_PYRAMID 10
-// For 'ShowFacilityResultsWindow' function which is a part of the 'CallFrontierUtilFunc' special.
-#define RESULTS_LINK_CONTEST 7
+#define MAX_BATTLE_FRONTIER_POINTS 9999
+#define MAX_STREAK 9999
+
+// These sets of facility ids would be redunant if the order was consistent
+// The order is important for this set so that all the non-link records can be continuous
+#define RANKING_HALL_BATTLE_TOWER_SINGLES 0
+#define RANKING_HALL_BATTLE_TOWER_DOUBLES 1
+#define RANKING_HALL_BATTLE_TOWER_MULTIS 2
+#define RANKING_HALL_BATTLE_DOME 3
+#define RANKING_HALL_BATTLE_PALACE 4
+#define RANKING_HALL_BATTLE_ARENA 5
+#define RANKING_HALL_BATTLE_FACTORY 6
+#define RANKING_HALL_BATTLE_PIKE 7
+#define RANKING_HALL_BATTLE_PYRAMID 8
+#define RANKING_HALL_BATTLE_TOWER_LINK 9
+
+#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0
+#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1
+#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2
+#define FRONTIER_MANIAC_BATTLE_TOWER_LINK 3
+#define FRONTIER_MANIAC_BATTLE_DOME 4
+#define FRONTIER_MANIAC_BATTLE_FACTORY 5
+#define FRONTIER_MANIAC_BATTLE_PALACE 6
+#define FRONTIER_MANIAC_BATTLE_ARENA 7
+#define FRONTIER_MANIAC_BATTLE_PIKE 8
+#define FRONTIER_MANIAC_BATTLE_PYRAMID 9
+#define FRONTIER_MANIAC_FACILITY_COUNT 10
+
+#define FRONTIER_MANIAC_MESSAGE_COUNT 3
+
+// Frontier Gambler
+#define FRONTIER_GAMBLER_WAITING 0
+#define FRONTIER_GAMBLER_PLACED_BET 1
+#define FRONTIER_GAMBLER_WON 2
+#define FRONTIER_GAMBLER_LOST 3
+
+#define FRONTIER_GAMBLER_BET_5 0
+#define FRONTIER_GAMBLER_BET_10 1
+#define FRONTIER_GAMBLER_BET_15 2
+#define FRONTIER_GAMBLER_BET_CANCEL 3
+
+#define FRONTIER_GAMBLER_CHALLENGE_COUNT 12
+
+#define EXCHANGE_CORNER_DECOR1_CLERK 0
+#define EXCHANGE_CORNER_DECOR2_CLERK 1
+#define EXCHANGE_CORNER_VITAMIN_CLERK 2
+#define EXCHANGE_CORNER_HOLD_ITEM_CLERK 3
#define F_EV_SPREAD_HP (1 << 0)
#define F_EV_SPREAD_ATTACK (1 << 1)
diff --git a/include/constants/battle_frontier_mons.h b/include/constants/battle_frontier_mons.h
new file mode 100644
index 000000000..10e68980a
--- /dev/null
+++ b/include/constants/battle_frontier_mons.h
@@ -0,0 +1,899 @@
+#ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_MONS_H
+#define GUARD_CONSTANTS_BATTLE_FRONTIER_MONS_H
+
+#define FRONTIER_MON_SUNKERN 0
+#define FRONTIER_MON_AZURILL 1
+#define FRONTIER_MON_CATERPIE 2
+#define FRONTIER_MON_WEEDLE 3
+#define FRONTIER_MON_WURMPLE 4
+#define FRONTIER_MON_RALTS 5
+#define FRONTIER_MON_MAGIKARP 6
+#define FRONTIER_MON_FEEBAS 7
+#define FRONTIER_MON_METAPOD 8
+#define FRONTIER_MON_KAKUNA 9
+#define FRONTIER_MON_PICHU 10
+#define FRONTIER_MON_SILCOON 11
+#define FRONTIER_MON_CASCOON 12
+#define FRONTIER_MON_IGGLYBUFF 13
+#define FRONTIER_MON_WOOPER 14
+#define FRONTIER_MON_TYROGUE 15
+#define FRONTIER_MON_SENTRET 16
+#define FRONTIER_MON_CLEFFA 17
+#define FRONTIER_MON_SEEDOT 18
+#define FRONTIER_MON_LOTAD 19
+#define FRONTIER_MON_POOCHYENA 20
+#define FRONTIER_MON_SHEDINJA 21
+#define FRONTIER_MON_MAKUHITA 22
+#define FRONTIER_MON_WHISMUR 23
+#define FRONTIER_MON_ZIGZAGOON 24
+#define FRONTIER_MON_ZUBAT 25
+#define FRONTIER_MON_TOGEPI 26
+#define FRONTIER_MON_SPINARAK 27
+#define FRONTIER_MON_MARILL 28
+#define FRONTIER_MON_HOPPIP 29
+#define FRONTIER_MON_SLUGMA 30
+#define FRONTIER_MON_SWINUB 31
+#define FRONTIER_MON_SMEARGLE 32
+#define FRONTIER_MON_PIDGEY 33
+#define FRONTIER_MON_RATTATA 34
+#define FRONTIER_MON_WYNAUT 35
+#define FRONTIER_MON_SKITTY 36
+#define FRONTIER_MON_SPEAROW 37
+#define FRONTIER_MON_HOOTHOOT 38
+#define FRONTIER_MON_DIGLETT 39
+#define FRONTIER_MON_LEDYBA 40
+#define FRONTIER_MON_NINCADA 41
+#define FRONTIER_MON_SURSKIT 42
+#define FRONTIER_MON_JIGGLYPUFF 43
+#define FRONTIER_MON_TAILLOW 44
+#define FRONTIER_MON_WINGULL 45
+#define FRONTIER_MON_NIDORAN_M 46
+#define FRONTIER_MON_NIDORAN_F 47
+#define FRONTIER_MON_KIRLIA 48
+#define FRONTIER_MON_MAREEP 49
+#define FRONTIER_MON_MEDITITE 50
+#define FRONTIER_MON_SLAKOTH 51
+#define FRONTIER_MON_PARAS 52
+#define FRONTIER_MON_EKANS 53
+#define FRONTIER_MON_DITTO 54
+#define FRONTIER_MON_BARBOACH 55
+#define FRONTIER_MON_MEOWTH 56
+#define FRONTIER_MON_PINECO 57
+#define FRONTIER_MON_TRAPINCH 58
+#define FRONTIER_MON_SPHEAL 59
+#define FRONTIER_MON_HORSEA 60
+#define FRONTIER_MON_SHROOMISH 61
+#define FRONTIER_MON_SHUPPET 62
+#define FRONTIER_MON_DUSKULL 63
+#define FRONTIER_MON_ELECTRIKE 64
+#define FRONTIER_MON_VULPIX 65
+#define FRONTIER_MON_PIKACHU 66
+#define FRONTIER_MON_SANDSHREW 67
+#define FRONTIER_MON_POLIWAG 68
+#define FRONTIER_MON_BELLSPROUT 69
+#define FRONTIER_MON_GEODUDE 70
+#define FRONTIER_MON_DRATINI 71
+#define FRONTIER_MON_SNUBBULL 72
+#define FRONTIER_MON_REMORAID 73
+#define FRONTIER_MON_LARVITAR 74
+#define FRONTIER_MON_BALTOY 75
+#define FRONTIER_MON_SNORUNT 76
+#define FRONTIER_MON_BAGON 77
+#define FRONTIER_MON_BELDUM 78
+#define FRONTIER_MON_GULPIN 79
+#define FRONTIER_MON_VENONAT 80
+#define FRONTIER_MON_MANKEY 81
+#define FRONTIER_MON_MACHOP 82
+#define FRONTIER_MON_SHELLDER 83
+#define FRONTIER_MON_SMOOCHUM 84
+#define FRONTIER_MON_NUMEL 85
+#define FRONTIER_MON_CARVANHA 86
+#define FRONTIER_MON_CORPHISH 87
+#define FRONTIER_MON_CHARMANDER 88
+#define FRONTIER_MON_CYNDAQUIL 89
+#define FRONTIER_MON_ABRA 90
+#define FRONTIER_MON_DODUO 91
+#define FRONTIER_MON_GASTLY 92
+#define FRONTIER_MON_SWABLU 93
+#define FRONTIER_MON_TREECKO 94
+#define FRONTIER_MON_TORCHIC 95
+#define FRONTIER_MON_MUDKIP 96
+#define FRONTIER_MON_SQUIRTLE 97
+#define FRONTIER_MON_TOTODILE 98
+#define FRONTIER_MON_SLOWPOKE 99
+#define FRONTIER_MON_BULBASAUR 100
+#define FRONTIER_MON_CHIKORITA 101
+#define FRONTIER_MON_ODDISH 102
+#define FRONTIER_MON_PSYDUCK 103
+#define FRONTIER_MON_CUBONE 104
+#define FRONTIER_MON_GOLDEEN 105
+#define FRONTIER_MON_NATU 106
+#define FRONTIER_MON_CLEFAIRY 107
+#define FRONTIER_MON_MAGNEMITE 108
+#define FRONTIER_MON_SEEL 109
+#define FRONTIER_MON_GRIMER 110
+#define FRONTIER_MON_KRABBY 111
+#define FRONTIER_MON_EXEGGCUTE 112
+#define FRONTIER_MON_EEVEE 113
+#define FRONTIER_MON_DROWZEE 114
+#define FRONTIER_MON_VOLTORB 115
+#define FRONTIER_MON_CHINCHOU 116
+#define FRONTIER_MON_TEDDIURSA 117
+#define FRONTIER_MON_DELIBIRD 118
+#define FRONTIER_MON_HOUNDOUR 119
+#define FRONTIER_MON_PHANPY 120
+#define FRONTIER_MON_SPOINK 121
+#define FRONTIER_MON_ARON 122
+#define FRONTIER_MON_LUVDISC 123
+#define FRONTIER_MON_TENTACOOL 124
+#define FRONTIER_MON_CACNEA 125
+#define FRONTIER_MON_UNOWN 126
+#define FRONTIER_MON_KOFFING 127
+#define FRONTIER_MON_STARYU 128
+#define FRONTIER_MON_SKIPLOOM 129
+#define FRONTIER_MON_NUZLEAF 130
+#define FRONTIER_MON_LOMBRE 131
+#define FRONTIER_MON_VIBRAVA 132
+#define FRONTIER_MON_RHYHORN 133
+#define FRONTIER_MON_CLAMPERL 134
+#define FRONTIER_MON_PIDGEOTTO 135
+#define FRONTIER_MON_GROWLITHE 136
+#define FRONTIER_MON_FARFETCHD 137
+#define FRONTIER_MON_OMANYTE 138
+#define FRONTIER_MON_KABUTO 139
+#define FRONTIER_MON_LILEEP 140
+#define FRONTIER_MON_ANORITH 141
+#define FRONTIER_MON_AIPOM 142
+#define FRONTIER_MON_ELEKID 143
+#define FRONTIER_MON_LOUDRED 144
+#define FRONTIER_MON_SPINDA 145
+#define FRONTIER_MON_NIDORINA 146
+#define FRONTIER_MON_NIDORINO 147
+#define FRONTIER_MON_FLAAFFY 148
+#define FRONTIER_MON_MAGBY 149
+#define FRONTIER_MON_NOSEPASS 150
+#define FRONTIER_MON_CORSOLA 151
+#define FRONTIER_MON_MAWILE 152
+#define FRONTIER_MON_BUTTERFREE 153
+#define FRONTIER_MON_BEEDRILL 154
+#define FRONTIER_MON_POLIWHIRL 155
+#define FRONTIER_MON_ONIX 156
+#define FRONTIER_MON_BEAUTIFLY 157
+#define FRONTIER_MON_DUSTOX 158
+#define FRONTIER_MON_LEDIAN 159
+#define FRONTIER_MON_ARIADOS 160
+#define FRONTIER_MON_YANMA 161
+
+#define FRONTIER_MON_DELCATTY_1 162
+#define FRONTIER_MON_SABLEYE_1 163
+#define FRONTIER_MON_LICKITUNG_1 164
+#define FRONTIER_MON_WEEPINBELL_1 165
+#define FRONTIER_MON_GRAVELER_1 166
+#define FRONTIER_MON_GLOOM_1 167
+#define FRONTIER_MON_PORYGON_1 168
+#define FRONTIER_MON_KADABRA_1 169
+#define FRONTIER_MON_WAILMER_1 170
+#define FRONTIER_MON_ROSELIA_1 171
+#define FRONTIER_MON_VOLBEAT_1 172
+#define FRONTIER_MON_ILLUMISE_1 173
+#define FRONTIER_MON_IVYSAUR_1 174
+#define FRONTIER_MON_CHARMELEON_1 175
+#define FRONTIER_MON_WARTORTLE_1 176
+#define FRONTIER_MON_PARASECT_1 177
+#define FRONTIER_MON_MACHOKE_1 178
+#define FRONTIER_MON_HAUNTER_1 179
+#define FRONTIER_MON_BAYLEEF_1 180
+#define FRONTIER_MON_QUILAVA_1 181
+#define FRONTIER_MON_CROCONAW_1 182
+#define FRONTIER_MON_TOGETIC_1 183
+#define FRONTIER_MON_MURKROW_1 184
+#define FRONTIER_MON_WOBBUFFET_1 185
+#define FRONTIER_MON_PLUSLE_1 186
+#define FRONTIER_MON_MINUN_1 187
+#define FRONTIER_MON_GROVYLE_1 188
+#define FRONTIER_MON_COMBUSKEN_1 189
+#define FRONTIER_MON_MARSHTOMP_1 190
+#define FRONTIER_MON_PONYTA_1 191
+#define FRONTIER_MON_AZUMARILL_1 192
+#define FRONTIER_MON_SUDOWOODO_1 193
+#define FRONTIER_MON_MAGCARGO_1 194
+#define FRONTIER_MON_PUPITAR_1 195
+#define FRONTIER_MON_SEALEO_1 196
+#define FRONTIER_MON_RATICATE_1 197
+#define FRONTIER_MON_MASQUERAIN_1 198
+#define FRONTIER_MON_FURRET_1 199
+#define FRONTIER_MON_DUNSPARCE_1 200
+#define FRONTIER_MON_DRAGONAIR_1 201
+#define FRONTIER_MON_MIGHTYENA_1 202
+#define FRONTIER_MON_LINOONE_1 203
+#define FRONTIER_MON_CASTFORM_1 204
+#define FRONTIER_MON_SHELGON_1 205
+#define FRONTIER_MON_METANG_1 206
+#define FRONTIER_MON_WIGGLYTUFF_1 207
+#define FRONTIER_MON_SUNFLORA_1 208
+#define FRONTIER_MON_CHIMECHO_1 209
+#define FRONTIER_MON_GLIGAR_1 210
+#define FRONTIER_MON_QWILFISH_1 211
+#define FRONTIER_MON_SNEASEL_1 212
+#define FRONTIER_MON_PELIPPER_1 213
+#define FRONTIER_MON_SWELLOW_1 214
+#define FRONTIER_MON_LAIRON_1 215
+#define FRONTIER_MON_TANGELA_1 216
+#define FRONTIER_MON_ARBOK_1 217
+#define FRONTIER_MON_PERSIAN_1 218
+#define FRONTIER_MON_SEADRA_1 219
+#define FRONTIER_MON_KECLEON_1 220
+#define FRONTIER_MON_VIGOROTH_1 221
+#define FRONTIER_MON_LUNATONE_1 222
+#define FRONTIER_MON_SOLROCK_1 223
+#define FRONTIER_MON_NOCTOWL_1 224
+#define FRONTIER_MON_SANDSLASH_1 225
+#define FRONTIER_MON_VENOMOTH_1 226
+#define FRONTIER_MON_CHANSEY_1 227
+#define FRONTIER_MON_SEAKING_1 228
+#define FRONTIER_MON_JUMPLUFF_1 229
+#define FRONTIER_MON_PILOSWINE_1 230
+#define FRONTIER_MON_GOLBAT_1 231
+#define FRONTIER_MON_PRIMEAPE_1 232
+#define FRONTIER_MON_HITMONLEE_1 233
+#define FRONTIER_MON_HITMONCHAN_1 234
+#define FRONTIER_MON_GIRAFARIG_1 235
+#define FRONTIER_MON_HITMONTOP_1 236
+#define FRONTIER_MON_BANETTE_1 237
+#define FRONTIER_MON_NINJASK_1 238
+#define FRONTIER_MON_SEVIPER_1 239
+#define FRONTIER_MON_ZANGOOSE_1 240
+#define FRONTIER_MON_CAMERUPT_1 241
+#define FRONTIER_MON_SHARPEDO_1 242
+#define FRONTIER_MON_TROPIUS_1 243
+#define FRONTIER_MON_MAGNETON_1 244
+#define FRONTIER_MON_MANTINE_1 245
+#define FRONTIER_MON_STANTLER_1 246
+#define FRONTIER_MON_ABSOL_1 247
+#define FRONTIER_MON_SWALOT_1 248
+#define FRONTIER_MON_CRAWDAUNT_1 249
+#define FRONTIER_MON_PIDGEOT_1 250
+#define FRONTIER_MON_GRUMPIG_1 251
+#define FRONTIER_MON_TORKOAL_1 252
+#define FRONTIER_MON_KINGLER_1 253
+#define FRONTIER_MON_CACTURNE_1 254
+#define FRONTIER_MON_BELLOSSOM_1 255
+#define FRONTIER_MON_OCTILLERY_1 256
+#define FRONTIER_MON_HUNTAIL_1 257
+#define FRONTIER_MON_GOREBYSS_1 258
+#define FRONTIER_MON_RELICANTH_1 259
+#define FRONTIER_MON_OMASTAR_1 260
+#define FRONTIER_MON_KABUTOPS_1 261
+#define FRONTIER_MON_POLIWRATH_1 262
+#define FRONTIER_MON_SCYTHER_1 263
+#define FRONTIER_MON_PINSIR_1 264
+#define FRONTIER_MON_POLITOED_1 265
+#define FRONTIER_MON_CLOYSTER_1 266
+
+#define FRONTIER_MON_DELCATTY_2 267
+#define FRONTIER_MON_SABLEYE_2 268
+#define FRONTIER_MON_LICKITUNG_2 269
+#define FRONTIER_MON_WEEPINBELL_2 270
+#define FRONTIER_MON_GRAVELER_2 271
+#define FRONTIER_MON_GLOOM_2 272
+#define FRONTIER_MON_PORYGON_2 273
+#define FRONTIER_MON_KADABRA_2 274
+#define FRONTIER_MON_WAILMER_2 275
+#define FRONTIER_MON_ROSELIA_2 276
+#define FRONTIER_MON_VOLBEAT_2 277
+#define FRONTIER_MON_ILLUMISE_2 278
+#define FRONTIER_MON_IVYSAUR_2 279
+#define FRONTIER_MON_CHARMELEON_2 280
+#define FRONTIER_MON_WARTORTLE_2 281
+#define FRONTIER_MON_PARASECT_2 282
+#define FRONTIER_MON_MACHOKE_2 283
+#define FRONTIER_MON_HAUNTER_2 284
+#define FRONTIER_MON_BAYLEEF_2 285
+#define FRONTIER_MON_QUILAVA_2 286
+#define FRONTIER_MON_CROCONAW_2 287
+#define FRONTIER_MON_TOGETIC_2 288
+#define FRONTIER_MON_MURKROW_2 289
+#define FRONTIER_MON_WOBBUFFET_2 290
+#define FRONTIER_MON_PLUSLE_2 291
+#define FRONTIER_MON_MINUN_2 292
+#define FRONTIER_MON_GROVYLE_2 293
+#define FRONTIER_MON_COMBUSKEN_2 294
+#define FRONTIER_MON_MARSHTOMP_2 295
+#define FRONTIER_MON_PONYTA_2 296
+#define FRONTIER_MON_AZUMARILL_2 297
+#define FRONTIER_MON_SUDOWOODO_2 298
+#define FRONTIER_MON_MAGCARGO_2 299
+#define FRONTIER_MON_PUPITAR_2 300
+#define FRONTIER_MON_SEALEO_2 301
+#define FRONTIER_MON_RATICATE_2 302
+#define FRONTIER_MON_MASQUERAIN_2 303
+#define FRONTIER_MON_FURRET_2 304
+#define FRONTIER_MON_DUNSPARCE_2 305
+#define FRONTIER_MON_DRAGONAIR_2 306
+#define FRONTIER_MON_MIGHTYENA_2 307
+#define FRONTIER_MON_LINOONE_2 308
+#define FRONTIER_MON_CASTFORM_2 309
+#define FRONTIER_MON_SHELGON_2 310
+#define FRONTIER_MON_METANG_2 311
+#define FRONTIER_MON_WIGGLYTUFF_2 312
+#define FRONTIER_MON_SUNFLORA_2 313
+#define FRONTIER_MON_CHIMECHO_2 314
+#define FRONTIER_MON_GLIGAR_2 315
+#define FRONTIER_MON_QWILFISH_2 316
+#define FRONTIER_MON_SNEASEL_2 317
+#define FRONTIER_MON_PELIPPER_2 318
+#define FRONTIER_MON_SWELLOW_2 319
+#define FRONTIER_MON_LAIRON_2 320
+#define FRONTIER_MON_TANGELA_2 321
+#define FRONTIER_MON_ARBOK_2 322
+#define FRONTIER_MON_PERSIAN_2 323
+#define FRONTIER_MON_SEADRA_2 324
+#define FRONTIER_MON_KECLEON_2 325
+#define FRONTIER_MON_VIGOROTH_2 326
+#define FRONTIER_MON_LUNATONE_2 327
+#define FRONTIER_MON_SOLROCK_2 328
+#define FRONTIER_MON_NOCTOWL_2 329
+#define FRONTIER_MON_SANDSLASH_2 330
+#define FRONTIER_MON_VENOMOTH_2 331
+#define FRONTIER_MON_CHANSEY_2 332
+#define FRONTIER_MON_SEAKING_2 333
+#define FRONTIER_MON_JUMPLUFF_2 334
+#define FRONTIER_MON_PILOSWINE_2 335
+#define FRONTIER_MON_GOLBAT_2 336
+#define FRONTIER_MON_PRIMEAPE_2 337
+#define FRONTIER_MON_HITMONLEE_2 338
+#define FRONTIER_MON_HITMONCHAN_2 339
+#define FRONTIER_MON_GIRAFARIG_2 340
+#define FRONTIER_MON_HITMONTOP_2 341
+#define FRONTIER_MON_BANETTE_2 342
+#define FRONTIER_MON_NINJASK_2 343
+#define FRONTIER_MON_SEVIPER_2 344
+#define FRONTIER_MON_ZANGOOSE_2 345
+#define FRONTIER_MON_CAMERUPT_2 346
+#define FRONTIER_MON_SHARPEDO_2 347
+#define FRONTIER_MON_TROPIUS_2 348
+#define FRONTIER_MON_MAGNETON_2 349
+#define FRONTIER_MON_MANTINE_2 350
+#define FRONTIER_MON_STANTLER_2 351
+#define FRONTIER_MON_ABSOL_2 352
+#define FRONTIER_MON_SWALOT_2 353
+#define FRONTIER_MON_CRAWDAUNT_2 354
+#define FRONTIER_MON_PIDGEOT_2 355
+#define FRONTIER_MON_GRUMPIG_2 356
+#define FRONTIER_MON_TORKOAL_2 357
+#define FRONTIER_MON_KINGLER_2 358
+#define FRONTIER_MON_CACTURNE_2 359
+#define FRONTIER_MON_BELLOSSOM_2 360
+#define FRONTIER_MON_OCTILLERY_2 361
+#define FRONTIER_MON_HUNTAIL_2 362
+#define FRONTIER_MON_GOREBYSS_2 363
+#define FRONTIER_MON_RELICANTH_2 364
+#define FRONTIER_MON_OMASTAR_2 365
+#define FRONTIER_MON_KABUTOPS_2 366
+#define FRONTIER_MON_POLIWRATH_2 367
+#define FRONTIER_MON_SCYTHER_2 368
+#define FRONTIER_MON_PINSIR_2 369
+#define FRONTIER_MON_POLITOED_2 370
+#define FRONTIER_MON_CLOYSTER_2 371
+
+#define FRONTIER_MON_DUGTRIO_1 372
+#define FRONTIER_MON_MEDICHAM_1 373
+#define FRONTIER_MON_MISDREAVUS_1 374
+#define FRONTIER_MON_FEAROW_1 375
+#define FRONTIER_MON_GRANBULL_1 376
+#define FRONTIER_MON_JYNX_1 377
+#define FRONTIER_MON_DUSCLOPS_1 378
+#define FRONTIER_MON_DODRIO_1 379
+#define FRONTIER_MON_MR_MIME_1 380
+#define FRONTIER_MON_LANTURN_1 381
+#define FRONTIER_MON_BRELOOM_1 382
+#define FRONTIER_MON_FORRETRESS_1 383
+#define FRONTIER_MON_WHISCASH_1 384
+#define FRONTIER_MON_XATU_1 385
+#define FRONTIER_MON_SKARMORY_1 386
+#define FRONTIER_MON_MAROWAK_1 387
+#define FRONTIER_MON_QUAGSIRE_1 388
+#define FRONTIER_MON_CLEFABLE_1 389
+#define FRONTIER_MON_HARIYAMA_1 390
+#define FRONTIER_MON_RAICHU_1 391
+#define FRONTIER_MON_DEWGONG_1 392
+#define FRONTIER_MON_MANECTRIC_1 393
+#define FRONTIER_MON_VILEPLUME_1 394
+#define FRONTIER_MON_VICTREEBEL_1 395
+#define FRONTIER_MON_ELECTRODE_1 396
+#define FRONTIER_MON_EXPLOUD_1 397
+#define FRONTIER_MON_SHIFTRY_1 398
+#define FRONTIER_MON_GLALIE_1 399
+#define FRONTIER_MON_LUDICOLO_1 400
+#define FRONTIER_MON_HYPNO_1 401
+#define FRONTIER_MON_GOLEM_1 402
+#define FRONTIER_MON_RHYDON_1 403
+#define FRONTIER_MON_ALAKAZAM_1 404
+#define FRONTIER_MON_WEEZING_1 405
+#define FRONTIER_MON_KANGASKHAN_1 406
+#define FRONTIER_MON_ELECTABUZZ_1 407
+#define FRONTIER_MON_TAUROS_1 408
+#define FRONTIER_MON_SLOWBRO_1 409
+#define FRONTIER_MON_SLOWKING_1 410
+#define FRONTIER_MON_MILTANK_1 411
+#define FRONTIER_MON_ALTARIA_1 412
+#define FRONTIER_MON_NIDOQUEEN_1 413
+#define FRONTIER_MON_NIDOKING_1 414
+#define FRONTIER_MON_MAGMAR_1 415
+#define FRONTIER_MON_CRADILY_1 416
+#define FRONTIER_MON_ARMALDO_1 417
+#define FRONTIER_MON_GOLDUCK_1 418
+#define FRONTIER_MON_RAPIDASH_1 419
+#define FRONTIER_MON_MUK_1 420
+#define FRONTIER_MON_GENGAR_1 421
+#define FRONTIER_MON_AMPHAROS_1 422
+#define FRONTIER_MON_SCIZOR_1 423
+#define FRONTIER_MON_HERACROSS_1 424
+#define FRONTIER_MON_URSARING_1 425
+#define FRONTIER_MON_HOUNDOOM_1 426
+#define FRONTIER_MON_DONPHAN_1 427
+#define FRONTIER_MON_CLAYDOL_1 428
+#define FRONTIER_MON_WAILORD_1 429
+#define FRONTIER_MON_NINETALES_1 430
+#define FRONTIER_MON_MACHAMP_1 431
+#define FRONTIER_MON_SHUCKLE_1 432
+#define FRONTIER_MON_STEELIX_1 433
+#define FRONTIER_MON_TENTACRUEL_1 434
+#define FRONTIER_MON_AERODACTYL_1 435
+#define FRONTIER_MON_PORYGON2_1 436
+#define FRONTIER_MON_GARDEVOIR_1 437
+#define FRONTIER_MON_EXEGGUTOR_1 438
+#define FRONTIER_MON_STARMIE_1 439
+#define FRONTIER_MON_FLYGON_1 440
+#define FRONTIER_MON_VENUSAUR_1 441
+#define FRONTIER_MON_VAPOREON_1 442
+#define FRONTIER_MON_JOLTEON_1 443
+#define FRONTIER_MON_FLAREON_1 444
+#define FRONTIER_MON_MEGANIUM_1 445
+#define FRONTIER_MON_ESPEON_1 446
+#define FRONTIER_MON_UMBREON_1 447
+#define FRONTIER_MON_BLASTOISE_1 448
+#define FRONTIER_MON_FERALIGATR_1 449
+#define FRONTIER_MON_AGGRON_1 450
+#define FRONTIER_MON_BLAZIKEN_1 451
+#define FRONTIER_MON_WALREIN_1 452
+#define FRONTIER_MON_SCEPTILE_1 453
+#define FRONTIER_MON_CHARIZARD_1 454
+#define FRONTIER_MON_TYPHLOSION_1 455
+#define FRONTIER_MON_LAPRAS_1 456
+#define FRONTIER_MON_CROBAT_1 457
+#define FRONTIER_MON_SWAMPERT_1 458
+#define FRONTIER_MON_GYARADOS_1 459
+#define FRONTIER_MON_SNORLAX_1 460
+#define FRONTIER_MON_KINGDRA_1 461
+#define FRONTIER_MON_BLISSEY_1 462
+#define FRONTIER_MON_MILOTIC_1 463
+#define FRONTIER_MON_ARCANINE_1 464
+#define FRONTIER_MON_SALAMENCE_1 465
+#define FRONTIER_MON_METAGROSS_1 466
+#define FRONTIER_MON_SLAKING_1 467
+
+#define FRONTIER_MON_DUGTRIO_2 468
+#define FRONTIER_MON_MEDICHAM_2 469
+#define FRONTIER_MON_MAROWAK_2 470
+#define FRONTIER_MON_QUAGSIRE_2 471
+#define FRONTIER_MON_MISDREAVUS_2 472
+#define FRONTIER_MON_FEAROW_2 473
+#define FRONTIER_MON_GRANBULL_2 474
+#define FRONTIER_MON_JYNX_2 475
+#define FRONTIER_MON_DUSCLOPS_2 476
+#define FRONTIER_MON_DODRIO_2 477
+#define FRONTIER_MON_MR_MIME_2 478
+#define FRONTIER_MON_LANTURN_2 479
+#define FRONTIER_MON_BRELOOM_2 480
+#define FRONTIER_MON_FORRETRESS_2 481
+#define FRONTIER_MON_SKARMORY_2 482
+#define FRONTIER_MON_WHISCASH_2 483
+#define FRONTIER_MON_XATU_2 484
+#define FRONTIER_MON_CLEFABLE_2 485
+#define FRONTIER_MON_HARIYAMA_2 486
+#define FRONTIER_MON_RAICHU_2 487
+#define FRONTIER_MON_DEWGONG_2 488
+#define FRONTIER_MON_MANECTRIC_2 489
+#define FRONTIER_MON_VILEPLUME_2 490
+#define FRONTIER_MON_VICTREEBEL_2 491
+#define FRONTIER_MON_ELECTRODE_2 492
+#define FRONTIER_MON_EXPLOUD_2 493
+#define FRONTIER_MON_SHIFTRY_2 494
+#define FRONTIER_MON_GLALIE_2 495
+#define FRONTIER_MON_LUDICOLO_2 496
+#define FRONTIER_MON_HYPNO_2 497
+#define FRONTIER_MON_GOLEM_2 498
+#define FRONTIER_MON_RHYDON_2 499
+#define FRONTIER_MON_ALAKAZAM_2 500
+#define FRONTIER_MON_WEEZING_2 501
+#define FRONTIER_MON_KANGASKHAN_2 502
+#define FRONTIER_MON_ELECTABUZZ_2 503
+#define FRONTIER_MON_TAUROS_2 504
+#define FRONTIER_MON_SLOWBRO_2 505
+#define FRONTIER_MON_SLOWKING_2 506
+#define FRONTIER_MON_MILTANK_2 507
+#define FRONTIER_MON_ALTARIA_2 508
+#define FRONTIER_MON_NIDOQUEEN_2 509
+#define FRONTIER_MON_NIDOKING_2 510
+#define FRONTIER_MON_MAGMAR_2 511
+#define FRONTIER_MON_CRADILY_2 512
+#define FRONTIER_MON_ARMALDO_2 513
+#define FRONTIER_MON_GOLDUCK_2 514
+#define FRONTIER_MON_RAPIDASH_2 515
+#define FRONTIER_MON_MUK_2 516
+#define FRONTIER_MON_GENGAR_2 517
+#define FRONTIER_MON_AMPHAROS_2 518
+#define FRONTIER_MON_SCIZOR_2 519
+#define FRONTIER_MON_HERACROSS_2 520
+#define FRONTIER_MON_URSARING_2 521
+#define FRONTIER_MON_HOUNDOOM_2 522
+#define FRONTIER_MON_DONPHAN_2 523
+#define FRONTIER_MON_CLAYDOL_2 524
+#define FRONTIER_MON_WAILORD_2 525
+#define FRONTIER_MON_NINETALES_2 526
+#define FRONTIER_MON_MACHAMP_2 527
+#define FRONTIER_MON_SHUCKLE_2 528
+#define FRONTIER_MON_STEELIX_2 529
+#define FRONTIER_MON_TENTACRUEL_2 530
+#define FRONTIER_MON_AERODACTYL_2 531
+#define FRONTIER_MON_PORYGON2_2 532
+#define FRONTIER_MON_GARDEVOIR_2 533
+#define FRONTIER_MON_EXEGGUTOR_2 534
+#define FRONTIER_MON_STARMIE_2 535
+#define FRONTIER_MON_FLYGON_2 536
+#define FRONTIER_MON_VENUSAUR_2 537
+#define FRONTIER_MON_VAPOREON_2 538
+#define FRONTIER_MON_JOLTEON_2 539
+#define FRONTIER_MON_FLAREON_2 540
+#define FRONTIER_MON_MEGANIUM_2 541
+#define FRONTIER_MON_ESPEON_2 542
+#define FRONTIER_MON_UMBREON_2 543
+#define FRONTIER_MON_BLASTOISE_2 544
+#define FRONTIER_MON_FERALIGATR_2 545
+#define FRONTIER_MON_AGGRON_2 546
+#define FRONTIER_MON_BLAZIKEN_2 547
+#define FRONTIER_MON_WALREIN_2 548
+#define FRONTIER_MON_SCEPTILE_2 549
+#define FRONTIER_MON_CHARIZARD_2 550
+#define FRONTIER_MON_TYPHLOSION_2 551
+#define FRONTIER_MON_LAPRAS_2 552
+#define FRONTIER_MON_CROBAT_2 553
+#define FRONTIER_MON_SWAMPERT_2 554
+#define FRONTIER_MON_GYARADOS_2 555
+#define FRONTIER_MON_SNORLAX_2 556
+#define FRONTIER_MON_KINGDRA_2 557
+#define FRONTIER_MON_BLISSEY_2 558
+#define FRONTIER_MON_MILOTIC_2 559
+#define FRONTIER_MON_ARCANINE_2 560
+#define FRONTIER_MON_SALAMENCE_2 561
+#define FRONTIER_MON_METAGROSS_2 562
+#define FRONTIER_MON_SLAKING_2 563
+
+#define FRONTIER_MON_DUGTRIO_3 564
+#define FRONTIER_MON_MEDICHAM_3 565
+#define FRONTIER_MON_MISDREAVUS_3 566
+#define FRONTIER_MON_FEAROW_3 567
+#define FRONTIER_MON_GRANBULL_3 568
+#define FRONTIER_MON_JYNX_3 569
+#define FRONTIER_MON_DUSCLOPS_3 570
+#define FRONTIER_MON_DODRIO_3 571
+#define FRONTIER_MON_MR_MIME_3 572
+#define FRONTIER_MON_LANTURN_3 573
+#define FRONTIER_MON_BRELOOM_3 574
+#define FRONTIER_MON_FORRETRESS_3 575
+#define FRONTIER_MON_WHISCASH_3 576
+#define FRONTIER_MON_XATU_3 577
+#define FRONTIER_MON_SKARMORY_3 578
+#define FRONTIER_MON_MAROWAK_3 579
+#define FRONTIER_MON_QUAGSIRE_3 580
+#define FRONTIER_MON_CLEFABLE_3 581
+#define FRONTIER_MON_HARIYAMA_3 582
+#define FRONTIER_MON_RAICHU_3 583
+#define FRONTIER_MON_DEWGONG_3 584
+#define FRONTIER_MON_MANECTRIC_3 585
+#define FRONTIER_MON_VILEPLUME_3 586
+#define FRONTIER_MON_VICTREEBEL_3 587
+#define FRONTIER_MON_ELECTRODE_3 588
+#define FRONTIER_MON_EXPLOUD_3 589
+#define FRONTIER_MON_SHIFTRY_3 590
+#define FRONTIER_MON_GLALIE_3 591
+#define FRONTIER_MON_LUDICOLO_3 592
+#define FRONTIER_MON_HYPNO_3 593
+#define FRONTIER_MON_GOLEM_3 594
+#define FRONTIER_MON_RHYDON_3 595
+#define FRONTIER_MON_ALAKAZAM_3 596
+#define FRONTIER_MON_WEEZING_3 597
+#define FRONTIER_MON_KANGASKHAN_3 598
+#define FRONTIER_MON_ELECTABUZZ_3 599
+#define FRONTIER_MON_TAUROS_3 600
+#define FRONTIER_MON_SLOWBRO_3 601
+#define FRONTIER_MON_SLOWKING_3 602
+#define FRONTIER_MON_MILTANK_3 603
+#define FRONTIER_MON_ALTARIA_3 604
+#define FRONTIER_MON_NIDOQUEEN_3 605
+#define FRONTIER_MON_NIDOKING_3 606
+#define FRONTIER_MON_MAGMAR_3 607
+#define FRONTIER_MON_CRADILY_3 608
+#define FRONTIER_MON_ARMALDO_3 609
+#define FRONTIER_MON_GOLDUCK_3 610
+#define FRONTIER_MON_RAPIDASH_3 611
+#define FRONTIER_MON_MUK_3 612
+#define FRONTIER_MON_GENGAR_3 613
+#define FRONTIER_MON_AMPHAROS_3 614
+#define FRONTIER_MON_SCIZOR_3 615
+#define FRONTIER_MON_HERACROSS_3 616
+#define FRONTIER_MON_URSARING_3 617
+#define FRONTIER_MON_HOUNDOOM_3 618
+#define FRONTIER_MON_DONPHAN_3 619
+#define FRONTIER_MON_CLAYDOL_3 620
+#define FRONTIER_MON_WAILORD_3 621
+#define FRONTIER_MON_NINETALES_3 622
+#define FRONTIER_MON_MACHAMP_3 623
+#define FRONTIER_MON_SHUCKLE_3 624
+#define FRONTIER_MON_STEELIX_3 625
+#define FRONTIER_MON_TENTACRUEL_3 626
+#define FRONTIER_MON_AERODACTYL_3 627
+#define FRONTIER_MON_PORYGON2_3 628
+#define FRONTIER_MON_GARDEVOIR_3 629
+#define FRONTIER_MON_EXEGGUTOR_3 630
+#define FRONTIER_MON_STARMIE_3 631
+#define FRONTIER_MON_FLYGON_3 632
+#define FRONTIER_MON_VENUSAUR_3 633
+#define FRONTIER_MON_VAPOREON_3 634
+#define FRONTIER_MON_JOLTEON_3 635
+#define FRONTIER_MON_FLAREON_3 636
+#define FRONTIER_MON_MEGANIUM_3 637
+#define FRONTIER_MON_ESPEON_3 638
+#define FRONTIER_MON_UMBREON_3 639
+#define FRONTIER_MON_BLASTOISE_3 640
+#define FRONTIER_MON_FERALIGATR_3 641
+#define FRONTIER_MON_AGGRON_3 642
+#define FRONTIER_MON_BLAZIKEN_3 643
+#define FRONTIER_MON_WALREIN_3 644
+#define FRONTIER_MON_SCEPTILE_3 645
+#define FRONTIER_MON_CHARIZARD_3 646
+#define FRONTIER_MON_TYPHLOSION_3 647
+#define FRONTIER_MON_LAPRAS_3 648
+#define FRONTIER_MON_CROBAT_3 649
+#define FRONTIER_MON_SWAMPERT_3 650
+#define FRONTIER_MON_GYARADOS_3 651
+#define FRONTIER_MON_SNORLAX_3 652
+#define FRONTIER_MON_KINGDRA_3 653
+#define FRONTIER_MON_BLISSEY_3 654
+#define FRONTIER_MON_MILOTIC_3 655
+#define FRONTIER_MON_ARCANINE_3 656
+#define FRONTIER_MON_SALAMENCE_3 657
+#define FRONTIER_MON_METAGROSS_3 658
+#define FRONTIER_MON_SLAKING_3 659
+
+#define FRONTIER_MON_DUGTRIO_4 660
+#define FRONTIER_MON_MEDICHAM_4 661
+#define FRONTIER_MON_MISDREAVUS_4 662
+#define FRONTIER_MON_FEAROW_4 663
+#define FRONTIER_MON_GRANBULL_4 664
+#define FRONTIER_MON_JYNX_4 665
+#define FRONTIER_MON_DUSCLOPS_4 666
+#define FRONTIER_MON_DODRIO_4 667
+#define FRONTIER_MON_MR_MIME_4 668
+#define FRONTIER_MON_LANTURN_4 669
+#define FRONTIER_MON_BRELOOM_4 670
+#define FRONTIER_MON_FORRETRESS_4 671
+#define FRONTIER_MON_WHISCASH_4 672
+#define FRONTIER_MON_XATU_4 673
+#define FRONTIER_MON_SKARMORY_4 674
+#define FRONTIER_MON_MAROWAK_4 675
+#define FRONTIER_MON_QUAGSIRE_4 676
+#define FRONTIER_MON_CLEFABLE_4 677
+#define FRONTIER_MON_HARIYAMA_4 678
+#define FRONTIER_MON_RAICHU_4 679
+#define FRONTIER_MON_DEWGONG_4 680
+#define FRONTIER_MON_MANECTRIC_4 681
+#define FRONTIER_MON_VILEPLUME_4 682
+#define FRONTIER_MON_VICTREEBEL_4 683
+#define FRONTIER_MON_ELECTRODE_4 684
+#define FRONTIER_MON_EXPLOUD_4 685
+#define FRONTIER_MON_SHIFTRY_4 686
+#define FRONTIER_MON_GLALIE_4 687
+#define FRONTIER_MON_LUDICOLO_4 688
+#define FRONTIER_MON_HYPNO_4 689
+#define FRONTIER_MON_GOLEM_4 690
+#define FRONTIER_MON_RHYDON_4 691
+#define FRONTIER_MON_ALAKAZAM_4 692
+#define FRONTIER_MON_WEEZING_4 693
+#define FRONTIER_MON_KANGASKHAN_4 694
+#define FRONTIER_MON_ELECTABUZZ_4 695
+#define FRONTIER_MON_TAUROS_4 696
+#define FRONTIER_MON_SLOWBRO_4 697
+#define FRONTIER_MON_SLOWKING_4 698
+#define FRONTIER_MON_MILTANK_4 699
+#define FRONTIER_MON_ALTARIA_4 700
+#define FRONTIER_MON_NIDOQUEEN_4 701
+#define FRONTIER_MON_NIDOKING_4 702
+#define FRONTIER_MON_MAGMAR_4 703
+#define FRONTIER_MON_CRADILY_4 704
+#define FRONTIER_MON_ARMALDO_4 705
+#define FRONTIER_MON_GOLDUCK_4 706
+#define FRONTIER_MON_RAPIDASH_4 707
+#define FRONTIER_MON_MUK_4 708
+#define FRONTIER_MON_GENGAR_4 709
+#define FRONTIER_MON_AMPHAROS_4 710
+#define FRONTIER_MON_SCIZOR_4 711
+#define FRONTIER_MON_HERACROSS_4 712
+#define FRONTIER_MON_URSARING_4 713
+#define FRONTIER_MON_HOUNDOOM_4 714
+#define FRONTIER_MON_DONPHAN_4 715
+#define FRONTIER_MON_CLAYDOL_4 716
+#define FRONTIER_MON_WAILORD_4 717
+#define FRONTIER_MON_NINETALES_4 718
+#define FRONTIER_MON_MACHAMP_4 719
+#define FRONTIER_MON_SHUCKLE_4 720
+#define FRONTIER_MON_STEELIX_4 721
+#define FRONTIER_MON_TENTACRUEL_4 722
+#define FRONTIER_MON_AERODACTYL_4 723
+#define FRONTIER_MON_PORYGON2_4 724
+#define FRONTIER_MON_GARDEVOIR_4 725
+#define FRONTIER_MON_EXEGGUTOR_4 726
+#define FRONTIER_MON_STARMIE_4 727
+#define FRONTIER_MON_FLYGON_4 728
+#define FRONTIER_MON_VENUSAUR_4 729
+#define FRONTIER_MON_VAPOREON_4 730
+#define FRONTIER_MON_JOLTEON_4 731
+#define FRONTIER_MON_FLAREON_4 732
+#define FRONTIER_MON_MEGANIUM_4 733
+#define FRONTIER_MON_ESPEON_4 734
+#define FRONTIER_MON_UMBREON_4 735
+#define FRONTIER_MON_BLASTOISE_4 736
+#define FRONTIER_MON_FERALIGATR_4 737
+#define FRONTIER_MON_AGGRON_4 738
+#define FRONTIER_MON_BLAZIKEN_4 739
+#define FRONTIER_MON_WALREIN_4 740
+#define FRONTIER_MON_SCEPTILE_4 741
+#define FRONTIER_MON_CHARIZARD_4 742
+#define FRONTIER_MON_TYPHLOSION_4 743
+#define FRONTIER_MON_LAPRAS_4 744
+#define FRONTIER_MON_CROBAT_4 745
+#define FRONTIER_MON_SWAMPERT_4 746
+#define FRONTIER_MON_GYARADOS_4 747
+#define FRONTIER_MON_SNORLAX_4 748
+#define FRONTIER_MON_KINGDRA_4 749
+#define FRONTIER_MON_BLISSEY_4 750
+#define FRONTIER_MON_MILOTIC_4 751
+#define FRONTIER_MON_ARCANINE_4 752
+#define FRONTIER_MON_SALAMENCE_4 753
+#define FRONTIER_MON_METAGROSS_4 754
+#define FRONTIER_MON_SLAKING_4 755
+
+#define FRONTIER_MON_ARTICUNO_1 756
+#define FRONTIER_MON_ZAPDOS_1 757
+#define FRONTIER_MON_MOLTRES_1 758
+#define FRONTIER_MON_RAIKOU_1 759
+#define FRONTIER_MON_ENTEI_1 760
+#define FRONTIER_MON_SUICUNE_1 761
+#define FRONTIER_MON_REGIROCK_1 762
+#define FRONTIER_MON_REGICE_1 763
+#define FRONTIER_MON_REGISTEEL_1 764
+#define FRONTIER_MON_LATIAS_1 765
+#define FRONTIER_MON_LATIOS_1 766
+#define FRONTIER_MON_ARTICUNO_2 767
+#define FRONTIER_MON_ZAPDOS_2 768
+#define FRONTIER_MON_MOLTRES_2 769
+#define FRONTIER_MON_RAIKOU_2 770
+#define FRONTIER_MON_ENTEI_2 771
+#define FRONTIER_MON_SUICUNE_2 772
+#define FRONTIER_MON_REGIROCK_2 773
+#define FRONTIER_MON_REGICE_2 774
+#define FRONTIER_MON_REGISTEEL_2 775
+#define FRONTIER_MON_LATIAS_2 776
+#define FRONTIER_MON_LATIOS_2 777
+#define FRONTIER_MON_ARTICUNO_3 778
+#define FRONTIER_MON_ZAPDOS_3 779
+#define FRONTIER_MON_MOLTRES_3 780
+#define FRONTIER_MON_RAIKOU_3 781
+#define FRONTIER_MON_ENTEI_3 782
+#define FRONTIER_MON_SUICUNE_3 783
+#define FRONTIER_MON_REGIROCK_3 784
+#define FRONTIER_MON_REGICE_3 785
+#define FRONTIER_MON_REGISTEEL_3 786
+#define FRONTIER_MON_LATIAS_3 787
+#define FRONTIER_MON_LATIOS_3 788
+#define FRONTIER_MON_ARTICUNO_4 789
+#define FRONTIER_MON_ZAPDOS_4 790
+#define FRONTIER_MON_MOLTRES_4 791
+#define FRONTIER_MON_RAIKOU_4 792
+#define FRONTIER_MON_ENTEI_4 793
+#define FRONTIER_MON_SUICUNE_4 794
+#define FRONTIER_MON_REGIROCK_4 795
+#define FRONTIER_MON_REGICE_4 796
+#define FRONTIER_MON_REGISTEEL_4 797
+#define FRONTIER_MON_LATIAS_4 798
+#define FRONTIER_MON_LATIOS_4 799
+#define FRONTIER_MON_GENGAR_5 800
+#define FRONTIER_MON_GENGAR_6 801
+#define FRONTIER_MON_GENGAR_7 802
+#define FRONTIER_MON_GENGAR_8 803
+#define FRONTIER_MON_URSARING_5 804
+#define FRONTIER_MON_URSARING_6 805
+#define FRONTIER_MON_URSARING_7 806
+#define FRONTIER_MON_URSARING_8 807
+#define FRONTIER_MON_MACHAMP_5 808
+#define FRONTIER_MON_MACHAMP_6 809
+#define FRONTIER_MON_MACHAMP_7 810
+#define FRONTIER_MON_MACHAMP_8 811
+#define FRONTIER_MON_GARDEVOIR_5 812
+#define FRONTIER_MON_GARDEVOIR_6 813
+#define FRONTIER_MON_GARDEVOIR_7 814
+#define FRONTIER_MON_GARDEVOIR_8 815
+#define FRONTIER_MON_STARMIE_5 816
+#define FRONTIER_MON_STARMIE_6 817
+#define FRONTIER_MON_STARMIE_7 818
+#define FRONTIER_MON_STARMIE_8 819
+#define FRONTIER_MON_LAPRAS_5 820
+#define FRONTIER_MON_LAPRAS_6 821
+#define FRONTIER_MON_LAPRAS_7 822
+#define FRONTIER_MON_LAPRAS_8 823
+#define FRONTIER_MON_SNORLAX_5 824
+#define FRONTIER_MON_SNORLAX_6 825
+#define FRONTIER_MON_SNORLAX_7 826
+#define FRONTIER_MON_SNORLAX_8 827
+#define FRONTIER_MON_SALAMENCE_5 828
+#define FRONTIER_MON_SALAMENCE_6 829
+#define FRONTIER_MON_SALAMENCE_7 830
+#define FRONTIER_MON_SALAMENCE_8 831
+#define FRONTIER_MON_METAGROSS_5 832
+#define FRONTIER_MON_METAGROSS_6 833
+#define FRONTIER_MON_METAGROSS_7 834
+#define FRONTIER_MON_METAGROSS_8 835
+#define FRONTIER_MON_REGIROCK_5 836
+#define FRONTIER_MON_REGIROCK_6 837
+#define FRONTIER_MON_REGICE_5 838
+#define FRONTIER_MON_REGICE_6 839
+#define FRONTIER_MON_REGISTEEL_5 840
+#define FRONTIER_MON_REGISTEEL_6 841
+#define FRONTIER_MON_LATIAS_5 842
+#define FRONTIER_MON_LATIAS_6 843
+#define FRONTIER_MON_LATIAS_7 844
+#define FRONTIER_MON_LATIAS_8 845
+#define FRONTIER_MON_LATIOS_5 846
+#define FRONTIER_MON_LATIOS_6 847
+#define FRONTIER_MON_LATIOS_7 848
+#define FRONTIER_MON_LATIOS_8 849
+
+#define FRONTIER_MONS_HIGH_TIER 849 // Mons above this point can only appear > level 50
+
+#define FRONTIER_MON_DRAGONITE_1 850
+#define FRONTIER_MON_DRAGONITE_2 851
+#define FRONTIER_MON_DRAGONITE_3 852
+#define FRONTIER_MON_DRAGONITE_4 853
+#define FRONTIER_MON_DRAGONITE_5 854
+#define FRONTIER_MON_DRAGONITE_6 855
+#define FRONTIER_MON_DRAGONITE_7 856
+#define FRONTIER_MON_DRAGONITE_8 857
+#define FRONTIER_MON_DRAGONITE_9 858
+#define FRONTIER_MON_DRAGONITE_10 859
+#define FRONTIER_MON_TYRANITAR_1 860
+#define FRONTIER_MON_TYRANITAR_2 861
+#define FRONTIER_MON_TYRANITAR_3 862
+#define FRONTIER_MON_TYRANITAR_4 863
+#define FRONTIER_MON_TYRANITAR_5 864
+#define FRONTIER_MON_TYRANITAR_6 865
+#define FRONTIER_MON_TYRANITAR_7 866
+#define FRONTIER_MON_TYRANITAR_8 867
+#define FRONTIER_MON_TYRANITAR_9 868
+#define FRONTIER_MON_TYRANITAR_10 869
+#define FRONTIER_MON_ARTICUNO_5 870
+#define FRONTIER_MON_ARTICUNO_6 871
+#define FRONTIER_MON_ZAPDOS_5 872
+#define FRONTIER_MON_ZAPDOS_6 873
+#define FRONTIER_MON_MOLTRES_5 874
+#define FRONTIER_MON_MOLTRES_6 875
+#define FRONTIER_MON_RAIKOU_5 876
+#define FRONTIER_MON_RAIKOU_6 877
+#define FRONTIER_MON_ENTEI_5 878
+#define FRONTIER_MON_ENTEI_6 879
+#define FRONTIER_MON_SUICUNE_5 880
+#define FRONTIER_MON_SUICUNE_6 881
+
+#define NUM_FRONTIER_MONS 882
+
+#endif //GUARD_CONSTANTS_BATTLE_FRONTIER_MONS_H
diff --git a/include/constants/battle_frontier_trainers.h b/include/constants/battle_frontier_trainers.h
new file mode 100644
index 000000000..2914b153f
--- /dev/null
+++ b/include/constants/battle_frontier_trainers.h
@@ -0,0 +1,309 @@
+#ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_TRAINERS_H
+#define GUARD_CONSTANTS_BATTLE_FRONTIER_TRAINERS_H
+
+#define FRONTIER_TRAINER_BRADY 0
+#define FRONTIER_TRAINER_CONNER 1
+#define FRONTIER_TRAINER_BRADLEY 2
+#define FRONTIER_TRAINER_CYBIL 3
+#define FRONTIER_TRAINER_RODETTE 4
+#define FRONTIER_TRAINER_PEGGY 5
+#define FRONTIER_TRAINER_KEITH 6
+#define FRONTIER_TRAINER_GRAYSON 7
+#define FRONTIER_TRAINER_GLENN 8
+#define FRONTIER_TRAINER_LILIANA 9
+#define FRONTIER_TRAINER_ELISE 10
+#define FRONTIER_TRAINER_ZOEY 11
+#define FRONTIER_TRAINER_MANUEL 12
+#define FRONTIER_TRAINER_RUSS 13
+#define FRONTIER_TRAINER_DUSTIN 14
+#define FRONTIER_TRAINER_TINA 15
+#define FRONTIER_TRAINER_GILLIAN1 16
+#define FRONTIER_TRAINER_ZOE 17
+#define FRONTIER_TRAINER_CHEN 18
+#define FRONTIER_TRAINER_AL 19
+#define FRONTIER_TRAINER_MITCH 20
+#define FRONTIER_TRAINER_ANNE 21
+#define FRONTIER_TRAINER_ALIZE 22
+#define FRONTIER_TRAINER_LAUREN 23
+#define FRONTIER_TRAINER_KIPP 24
+#define FRONTIER_TRAINER_JASON 25
+#define FRONTIER_TRAINER_JOHN 26
+#define FRONTIER_TRAINER_ANN 27
+#define FRONTIER_TRAINER_EILEEN 28
+#define FRONTIER_TRAINER_CARLIE 29
+#define FRONTIER_TRAINER_GORDON 30
+#define FRONTIER_TRAINER_AYDEN 31
+#define FRONTIER_TRAINER_MARCO 32
+#define FRONTIER_TRAINER_CIERRA 33
+#define FRONTIER_TRAINER_MARCY 34
+#define FRONTIER_TRAINER_KATHY 35
+#define FRONTIER_TRAINER_PEYTON 36
+#define FRONTIER_TRAINER_JULIAN 37
+#define FRONTIER_TRAINER_QUINN 38
+#define FRONTIER_TRAINER_HAYLEE 39
+#define FRONTIER_TRAINER_AMANDA 40
+#define FRONTIER_TRAINER_STACY 41
+#define FRONTIER_TRAINER_RAFAEL 42
+#define FRONTIER_TRAINER_OLIVER 43
+#define FRONTIER_TRAINER_PAYTON 44
+#define FRONTIER_TRAINER_PAMELA 45
+#define FRONTIER_TRAINER_ELIZA 46
+#define FRONTIER_TRAINER_MARISA 47
+#define FRONTIER_TRAINER_LEWIS 48
+#define FRONTIER_TRAINER_YOSHI 49
+#define FRONTIER_TRAINER_DESTIN 50
+#define FRONTIER_TRAINER_KEON 51
+#define FRONTIER_TRAINER_STUART 52
+#define FRONTIER_TRAINER_NESTOR 53
+#define FRONTIER_TRAINER_DERRICK 54
+#define FRONTIER_TRAINER_BRYSON 55
+#define FRONTIER_TRAINER_CLAYTON 56
+#define FRONTIER_TRAINER_TRENTON 57
+#define FRONTIER_TRAINER_JENSON 58
+#define FRONTIER_TRAINER_WESLEY 59
+#define FRONTIER_TRAINER_ANTON 60
+#define FRONTIER_TRAINER_LAWSON 61
+#define FRONTIER_TRAINER_SAMMY 62
+#define FRONTIER_TRAINER_ARNIE 63
+#define FRONTIER_TRAINER_ADRIAN 64
+#define FRONTIER_TRAINER_TRISTAN 65
+#define FRONTIER_TRAINER_JULIANA 66
+#define FRONTIER_TRAINER_RYLEE 67
+#define FRONTIER_TRAINER_CHELSEA 68
+#define FRONTIER_TRAINER_DANELA 69
+#define FRONTIER_TRAINER_LIZBETH 70
+#define FRONTIER_TRAINER_AMELIA 71
+#define FRONTIER_TRAINER_JILLIAN 72
+#define FRONTIER_TRAINER_ABBIE 73
+#define FRONTIER_TRAINER_BRIANA 74
+#define FRONTIER_TRAINER_ANTONIO 75
+#define FRONTIER_TRAINER_JADEN 76
+#define FRONTIER_TRAINER_DAKOTA 77
+#define FRONTIER_TRAINER_BRAYDEN 78
+#define FRONTIER_TRAINER_CORSON 79
+#define FRONTIER_TRAINER_TREVIN 80
+#define FRONTIER_TRAINER_PATRICK 81
+#define FRONTIER_TRAINER_KADEN 82
+#define FRONTIER_TRAINER_MAXWELL 83
+#define FRONTIER_TRAINER_DARYL 84
+#define FRONTIER_TRAINER_KENNETH 85
+#define FRONTIER_TRAINER_RICH 86
+#define FRONTIER_TRAINER_CADEN 87
+#define FRONTIER_TRAINER_MARLON 88
+#define FRONTIER_TRAINER_NASH 89
+#define FRONTIER_TRAINER_ROBBY 90
+#define FRONTIER_TRAINER_REECE 91
+#define FRONTIER_TRAINER_KATHRYN 92
+#define FRONTIER_TRAINER_ELLEN 93
+#define FRONTIER_TRAINER_RAMON 94
+#define FRONTIER_TRAINER_ARTHUR 95
+#define FRONTIER_TRAINER_ALONDRA 96
+#define FRONTIER_TRAINER_ADRIANA 97
+#define FRONTIER_TRAINER_MALIK 98
+#define FRONTIER_TRAINER_JILL 99
+#define FRONTIER_TRAINER_ERIK 100
+#define FRONTIER_TRAINER_YAZMIN 101
+#define FRONTIER_TRAINER_JAMAL 102
+#define FRONTIER_TRAINER_LESLIE 103
+#define FRONTIER_TRAINER_DAVE 104
+#define FRONTIER_TRAINER_CARLO 105
+#define FRONTIER_TRAINER_EMILIA 106
+#define FRONTIER_TRAINER_DALIA 107
+#define FRONTIER_TRAINER_HITOMI 108
+#define FRONTIER_TRAINER_RICARDO 109
+#define FRONTIER_TRAINER_SHIZUKA 110
+#define FRONTIER_TRAINER_JOANA 111
+#define FRONTIER_TRAINER_KELLY 112
+#define FRONTIER_TRAINER_RAYNA 113
+#define FRONTIER_TRAINER_EVAN 114
+#define FRONTIER_TRAINER_JORDAN 115
+#define FRONTIER_TRAINER_JOEL 116
+#define FRONTIER_TRAINER_KRISTEN 117
+#define FRONTIER_TRAINER_SELPHY 118
+#define FRONTIER_TRAINER_CHLOE 119
+#define FRONTIER_TRAINER_NORTON 120
+#define FRONTIER_TRAINER_LUKAS 121
+#define FRONTIER_TRAINER_ZACH 122
+#define FRONTIER_TRAINER_KAITLYN 123
+#define FRONTIER_TRAINER_BREANNA 124
+#define FRONTIER_TRAINER_KENDRA 125
+#define FRONTIER_TRAINER_MOLLY 126
+#define FRONTIER_TRAINER_JAZMIN 127
+#define FRONTIER_TRAINER_KELSEY 128
+#define FRONTIER_TRAINER_JALEN 129
+#define FRONTIER_TRAINER_GRIFFEN 130
+#define FRONTIER_TRAINER_XANDER 131
+#define FRONTIER_TRAINER_MARVIN 132
+#define FRONTIER_TRAINER_BRENNAN 133
+#define FRONTIER_TRAINER_BALEY 134
+#define FRONTIER_TRAINER_ZACKARY 135
+#define FRONTIER_TRAINER_GABRIEL 136
+#define FRONTIER_TRAINER_EMILY 137
+#define FRONTIER_TRAINER_JORDYN 138
+#define FRONTIER_TRAINER_SOFIA 139
+#define FRONTIER_TRAINER_BRADEN 140
+#define FRONTIER_TRAINER_KAYDEN 141
+#define FRONTIER_TRAINER_COOPER 142
+#define FRONTIER_TRAINER_JULIA 143
+#define FRONTIER_TRAINER_AMARA 144
+#define FRONTIER_TRAINER_LYNN 145
+#define FRONTIER_TRAINER_JOVAN 146
+#define FRONTIER_TRAINER_DOMINIC 147
+#define FRONTIER_TRAINER_NIKOLAS 148
+#define FRONTIER_TRAINER_VALERIA 149
+#define FRONTIER_TRAINER_DELANEY 150
+#define FRONTIER_TRAINER_MEGHAN 151
+#define FRONTIER_TRAINER_ROBERTO 152
+#define FRONTIER_TRAINER_DAMIAN 153
+#define FRONTIER_TRAINER_BRODY 154
+#define FRONTIER_TRAINER_GRAHAM 155
+#define FRONTIER_TRAINER_TYLOR 156
+#define FRONTIER_TRAINER_JAREN 157
+#define FRONTIER_TRAINER_CORDELL 158
+#define FRONTIER_TRAINER_JAZLYN 159
+#define FRONTIER_TRAINER_ZACHERY 160
+#define FRONTIER_TRAINER_JOHAN 161
+#define FRONTIER_TRAINER_SHEA 162
+#define FRONTIER_TRAINER_KAILA 163
+#define FRONTIER_TRAINER_ISIAH 164
+#define FRONTIER_TRAINER_GARRETT 165
+#define FRONTIER_TRAINER_HAYLIE 166
+#define FRONTIER_TRAINER_MEGAN 167
+#define FRONTIER_TRAINER_ISSAC 168
+#define FRONTIER_TRAINER_QUINTON 169
+#define FRONTIER_TRAINER_SALMA 170
+#define FRONTIER_TRAINER_ANSLEY 171
+#define FRONTIER_TRAINER_HOLDEN 172
+#define FRONTIER_TRAINER_LUCA 173
+#define FRONTIER_TRAINER_JAMISON 174
+#define FRONTIER_TRAINER_GUNNAR 175
+#define FRONTIER_TRAINER_CRAIG 176
+#define FRONTIER_TRAINER_PIERCE 177
+#define FRONTIER_TRAINER_REGINA 178
+#define FRONTIER_TRAINER_ALISON 179
+#define FRONTIER_TRAINER_HANK 180
+#define FRONTIER_TRAINER_EARL 181
+#define FRONTIER_TRAINER_RAMIRO 182
+#define FRONTIER_TRAINER_HUNTER 183
+#define FRONTIER_TRAINER_AIDEN 184
+#define FRONTIER_TRAINER_XAVIER 185
+#define FRONTIER_TRAINER_CLINTON 186
+#define FRONTIER_TRAINER_JESSE 187
+#define FRONTIER_TRAINER_EDUARDO 188
+#define FRONTIER_TRAINER_HAL 189
+#define FRONTIER_TRAINER_GAGE 190
+#define FRONTIER_TRAINER_ARNOLD 191
+#define FRONTIER_TRAINER_JARRETT 192
+#define FRONTIER_TRAINER_GARETT 193
+#define FRONTIER_TRAINER_EMANUEL 194
+#define FRONTIER_TRAINER_GUSTAVO 195
+#define FRONTIER_TRAINER_KAMERON 196
+#define FRONTIER_TRAINER_ALFREDO 197
+#define FRONTIER_TRAINER_RUBEN 198
+#define FRONTIER_TRAINER_LAMAR 199
+#define FRONTIER_TRAINER_JAXON 200
+#define FRONTIER_TRAINER_LOGAN 201
+#define FRONTIER_TRAINER_EMILEE 202
+#define FRONTIER_TRAINER_JOSIE 203
+#define FRONTIER_TRAINER_ARMANDO 204
+#define FRONTIER_TRAINER_SKYLER 205
+#define FRONTIER_TRAINER_RUTH 206
+#define FRONTIER_TRAINER_MELODY 207
+#define FRONTIER_TRAINER_PEDRO 208
+#define FRONTIER_TRAINER_ERICK 209
+#define FRONTIER_TRAINER_ELAINE 210
+#define FRONTIER_TRAINER_JOYCE 211
+#define FRONTIER_TRAINER_TODD 212
+#define FRONTIER_TRAINER_GAVIN 213
+#define FRONTIER_TRAINER_MALORY 214
+#define FRONTIER_TRAINER_ESTHER 215
+#define FRONTIER_TRAINER_OSCAR 216
+#define FRONTIER_TRAINER_WILSON 217
+#define FRONTIER_TRAINER_CLARE 218
+#define FRONTIER_TRAINER_TESS 219
+#define FRONTIER_TRAINER_LEON 220
+#define FRONTIER_TRAINER_ALONZO 221
+#define FRONTIER_TRAINER_VINCE 222
+#define FRONTIER_TRAINER_BRYON 223
+#define FRONTIER_TRAINER_AVA 224
+#define FRONTIER_TRAINER_MIRIAM 225
+#define FRONTIER_TRAINER_CARRIE 226
+#define FRONTIER_TRAINER_GILLIAN2 227
+#define FRONTIER_TRAINER_TYLER 228
+#define FRONTIER_TRAINER_CHAZ 229
+#define FRONTIER_TRAINER_NELSON 230
+#define FRONTIER_TRAINER_SHANIA 231
+#define FRONTIER_TRAINER_STELLA 232
+#define FRONTIER_TRAINER_DORINE 233
+#define FRONTIER_TRAINER_MADDOX 234
+#define FRONTIER_TRAINER_DAVIN 235
+#define FRONTIER_TRAINER_TREVON 236
+#define FRONTIER_TRAINER_MATEO 237
+#define FRONTIER_TRAINER_BRET 238
+#define FRONTIER_TRAINER_RAUL 239
+#define FRONTIER_TRAINER_KAY 240
+#define FRONTIER_TRAINER_ELENA 241
+#define FRONTIER_TRAINER_ALANA 242
+#define FRONTIER_TRAINER_ALEXAS 243
+#define FRONTIER_TRAINER_WESTON 244
+#define FRONTIER_TRAINER_JASPER 245
+#define FRONTIER_TRAINER_NADIA 246
+#define FRONTIER_TRAINER_MIRANDA 247
+#define FRONTIER_TRAINER_EMMA 248
+#define FRONTIER_TRAINER_ROLANDO 249
+#define FRONTIER_TRAINER_STANLY 250
+#define FRONTIER_TRAINER_DARIO 251
+#define FRONTIER_TRAINER_KARLEE 252
+#define FRONTIER_TRAINER_JAYLIN 253
+#define FRONTIER_TRAINER_INGRID 254
+#define FRONTIER_TRAINER_DELILAH 255
+#define FRONTIER_TRAINER_CARLY 256
+#define FRONTIER_TRAINER_LEXIE 257
+#define FRONTIER_TRAINER_MILLER 258
+#define FRONTIER_TRAINER_MARV 259
+#define FRONTIER_TRAINER_LAYTON 260
+#define FRONTIER_TRAINER_BROOKS 261
+#define FRONTIER_TRAINER_GREGORY 262
+#define FRONTIER_TRAINER_REESE 263
+#define FRONTIER_TRAINER_MASON 264
+#define FRONTIER_TRAINER_TOBY 265
+#define FRONTIER_TRAINER_DOROTHY 266
+#define FRONTIER_TRAINER_PIPER 267
+#define FRONTIER_TRAINER_FINN 268
+#define FRONTIER_TRAINER_SAMIR 269
+#define FRONTIER_TRAINER_FIONA 270
+#define FRONTIER_TRAINER_GLORIA 271
+#define FRONTIER_TRAINER_NICO 272
+#define FRONTIER_TRAINER_JEREMY 273
+#define FRONTIER_TRAINER_CAITLIN 274
+#define FRONTIER_TRAINER_REENA 275
+#define FRONTIER_TRAINER_AVERY 276
+#define FRONTIER_TRAINER_LIAM 277
+#define FRONTIER_TRAINER_THEO 278
+#define FRONTIER_TRAINER_BAILEY 279
+#define FRONTIER_TRAINER_HUGO 280
+#define FRONTIER_TRAINER_BRYCE 281
+#define FRONTIER_TRAINER_GIDEON 282
+#define FRONTIER_TRAINER_TRISTON 283
+#define FRONTIER_TRAINER_CHARLES 284
+#define FRONTIER_TRAINER_RAYMOND 285
+#define FRONTIER_TRAINER_DIRK 286
+#define FRONTIER_TRAINER_HAROLD 287
+#define FRONTIER_TRAINER_OMAR 288
+#define FRONTIER_TRAINER_PETER 289
+#define FRONTIER_TRAINER_DEV 290
+#define FRONTIER_TRAINER_COREY 291
+#define FRONTIER_TRAINER_ANDRE 292
+#define FRONTIER_TRAINER_FERRIS 293
+#define FRONTIER_TRAINER_ALIVIA 294
+#define FRONTIER_TRAINER_PAIGE 295
+#define FRONTIER_TRAINER_ANYA 296
+#define FRONTIER_TRAINER_DAWN 297
+#define FRONTIER_TRAINER_ABBY 298
+#define FRONTIER_TRAINER_GRETEL 299
+
+#define FRONTIER_TRAINERS_COUNT 300
+
+// special trainer IDs begin at 300, see constants/trainers.h
+
+#endif // GUARD_CONSTANTS_BATTLE_FRONTIER_TRAINERS_H
diff --git a/include/constants/battle_palace.h b/include/constants/battle_palace.h
new file mode 100644
index 000000000..db9855101
--- /dev/null
+++ b/include/constants/battle_palace.h
@@ -0,0 +1,19 @@
+#ifndef GUARD_CONSTANTS_BATTLE_PALACE_H
+#define GUARD_CONSTANTS_BATTLE_PALACE_H
+
+#define BATTLE_PALACE_FUNC_INIT 0
+#define BATTLE_PALACE_FUNC_GET_DATA 1
+#define BATTLE_PALACE_FUNC_SET_DATA 2
+#define BATTLE_PALACE_FUNC_GET_COMMENT_ID 3
+#define BATTLE_PALACE_FUNC_SET_OPPONENT 4
+#define BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO 5
+#define BATTLE_PALACE_FUNC_INCREMENT_STREAK 6
+#define BATTLE_PALACE_FUNC_SAVE 7
+#define BATTLE_PALACE_FUNC_SET_PRIZE 8
+#define BATTLE_PALACE_FUNC_GIVE_PRIZE 9
+
+#define PALACE_DATA_PRIZE 0
+#define PALACE_DATA_WIN_STREAK 1
+#define PALACE_DATA_WIN_STREAK_ACTIVE 2
+
+#endif //GUARD_CONSTANTS_BATTLE_PALACE_H
diff --git a/include/constants/battle_pike.h b/include/constants/battle_pike.h
new file mode 100644
index 000000000..9187ae28c
--- /dev/null
+++ b/include/constants/battle_pike.h
@@ -0,0 +1,72 @@
+#ifndef GUARD_CONSTANTS_BATTLE_PIKE_H
+#define GUARD_CONSTANTS_BATTLE_PIKE_H
+
+#define PIKE_ROOM_SINGLE_BATTLE 0
+#define PIKE_ROOM_HEAL_FULL 1
+#define PIKE_ROOM_NPC 2
+#define PIKE_ROOM_STATUS 3
+#define PIKE_ROOM_HEAL_PART 4
+#define PIKE_ROOM_WILD_MONS 5
+#define PIKE_ROOM_HARD_BATTLE 6
+#define PIKE_ROOM_DOUBLE_BATTLE 7
+#define PIKE_ROOM_BRAIN 8
+#define NUM_PIKE_ROOM_TYPES 9
+
+#define PIKE_ROOM_LEFT 0
+#define PIKE_ROOM_CENTER 1
+#define PIKE_ROOM_RIGHT 2
+
+#define PIKE_HINT_NOSTALGIA 0
+#define PIKE_HINT_WHISPERING 1
+#define PIKE_HINT_POKEMON 2
+#define PIKE_HINT_PEOPLE 3
+#define PIKE_HINT_BRAIN 4
+
+// For the room with a status effect.
+#define PIKE_STATUSMON_KIRLIA 0
+#define PIKE_STATUSMON_DUSCLOPS 1
+
+#define PIKE_STATUS_FREEZE 0
+#define PIKE_STATUS_BURN 1
+#define PIKE_STATUS_TOXIC 2
+#define PIKE_STATUS_PARALYSIS 3
+#define PIKE_STATUS_SLEEP 4
+
+// Function IDs for sBattlePikeFunctions / CallBattlePikeFunction
+#define BATTLE_PIKE_FUNC_SET_ROOM_TYPE 0
+#define BATTLE_PIKE_FUNC_GET_DATA 1
+#define BATTLE_PIKE_FUNC_SET_DATA 2
+#define BATTLE_PIKE_FUNC_IS_FINAL_ROOM 3
+#define BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS 4
+#define BATTLE_PIKE_FUNC_GET_ROOM_TYPE 5
+#define BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM 6
+#define BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM 7
+#define BATTLE_PIKE_FUNC_SAVE 8
+#define BATTLE_PIKE_FUNC_NULL_9 9
+#define BATTLE_PIKE_FUNC_NULL_10 10
+#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS 11
+#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON 12
+#define BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS 13
+#define BATTLE_PIKE_FUNC_BUFFER_NPC_MSG 14
+#define BATTLE_PIKE_FUNC_STATUS_SCREEN_FLASH 15
+#define BATTLE_PIKE_FUNC_IS_IN 16
+#define BATTLE_PIKE_FUNC_SET_HINT_ROOM 17
+#define BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID 18
+#define BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT 19
+#define BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS 20
+#define BATTLE_PIKE_FUNC_GET_TRAINER_INTRO 21
+#define BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE 22
+#define BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN 23
+#define BATTLE_PIKE_FUNC_SET_HEAL_ROOMS_DISABLED 24
+#define BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH 25
+#define BATTLE_PIKE_FUNC_SAVE_HELD_ITEMS 26
+#define BATTLE_PIKE_FUNC_RESET_HELD_ITEMS 27
+#define BATTLE_PIKE_FUNC_INIT 28
+
+#define PIKE_DATA_PRIZE 0
+#define PIKE_DATA_WIN_STREAK 1
+#define PIKE_DATA_RECORD_STREAK 2
+#define PIKE_DATA_TOTAL_STREAKS 3
+#define PIKE_DATA_WIN_STREAK_ACTIVE 4
+
+#endif // GUARD_CONSTANTS_BATTLE_PIKE_H
diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h
new file mode 100644
index 000000000..004df7155
--- /dev/null
+++ b/include/constants/battle_pyramid.h
@@ -0,0 +1,61 @@
+#ifndef GUARD_CONSTANTS_BATTLE_PYRAMID_H
+#define GUARD_CONSTANTS_BATTLE_PYRAMID_H
+
+#define TOTAL_ROUNDS 20
+#define PICKUP_ITEMS_PER_ROUND 10
+
+#define FLOOR_WALKABLE_METATILE 0x28D
+#define FLOOR_EXIT_METATILE 0x28E
+
+#define HINT_EXIT_DIRECTION 0
+#define HINT_REMAINING_ITEMS 1
+#define HINT_REMAINING_TRAINERS 2
+#define HINT_EXIT_SHORT_REMAINING_TRAINERS 3
+#define HINT_EXIT_SHORT_REMAINING_ITEMS 4
+#define HINT_EXIT_MEDIUM_REMAINING_TRAINERS 5
+#define HINT_EXIT_MEDIUM_REMAINING_ITEMS 6
+#define HINT_EXIT_FAR_REMAINING_TRAINERS 7
+#define HINT_EXIT_FAR_REMAINING_ITEMS 8
+
+#define OBJ_TRAINERS 0
+#define OBJ_ITEMS 1
+
+#define OBJ_POSITIONS_UNIFORM 0
+#define OBJ_POSITIONS_IN_AND_NEAR_ENTRANCE 1
+#define OBJ_POSITIONS_IN_AND_NEAR_EXIT 2
+#define OBJ_POSITIONS_NEAR_ENTRANCE 3
+#define OBJ_POSITIONS_NEAR_EXIT 4
+
+// Functions IDs for sBattlePyramidFunctions / CallBattlePyramidFunction
+#define BATTLE_PYRAMID_FUNC_INIT 0
+#define BATTLE_PYRAMID_FUNC_GET_DATA 1
+#define BATTLE_PYRAMID_FUNC_SET_DATA 2
+#define BATTLE_PYRAMID_FUNC_SAVE 3
+#define BATTLE_PYRAMID_FUNC_SET_PRIZE 4
+#define BATTLE_PYRAMID_FUNC_GIVE_PRIZE 5 // unused
+#define BATTLE_PYRAMID_FUNC_SEED_FLOOR 6
+#define BATTLE_PYRAMID_FUNC_SET_ITEM 7
+#define BATTLE_PYRAMID_FUNC_HIDE_ITEM 8
+#define BATTLE_PYRAMID_FUNC_SET_TRAINERS 9
+#define BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT 10
+#define BATTLE_PYRAMID_FUNC_UPDATE_STREAK 11 // unused
+#define BATTLE_PYRAMID_FUNC_IS_IN 12
+#define BATTLE_PYRAMID_FUNC_UPDATE_LIGHT 13
+#define BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS 14
+#define BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE 15
+#define BATTLE_PYRAMID_FUNC_START_MENU 16 // unused
+#define BATTLE_PYRAMID_FUNC_RESTORE_PARTY 17
+
+#define PYRAMID_DATA_PRIZE 0
+#define PYRAMID_DATA_WIN_STREAK 1
+#define PYRAMID_DATA_WIN_STREAK_ACTIVE 2
+#define PYRAMID_DATA_WIN_STREAK_50 3 // the below streak data are redundant with the above when frontier.lvlMode is correct
+#define PYRAMID_DATA_WIN_STREAK_OPEN 4
+#define PYRAMID_DATA_WIN_STREAK_ACTIVE_50 5
+#define PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN 6
+#define PYRAMID_DATA_TRAINER_FLAGS 7
+
+#define PYRAMID_LIGHT_SET_RADIUS 0
+#define PYRAMID_LIGHT_INCR_RADIUS 1
+
+#endif // GUARD_CONSTANTS_BATTLE_PYRAMID_H
diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h
index 894bd13b6..dfcf79128 100644
--- a/include/constants/battle_script_commands.h
+++ b/include/constants/battle_script_commands.h
@@ -39,16 +39,16 @@
#define BS_EFFECT_BATTLER 2
#define BS_FAINTED 3
#define BS_BATTLER_0 7
-#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update
-#define BS_ATTACKER_SIDE 8 // for atk1E_jumpifability
-#define BS_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
+#define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
+#define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
+#define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
#define BS_SCRIPTING 10
#define BS_PLAYER1 11
#define BS_OPPONENT1 12
#define BS_PLAYER2 13
#define BS_OPPONENT2 14
-// atk 01, accuracy calc
+// Cmd_accuracycheck
#define NO_ACC_CALC 0xFFFE
#define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF
#define ACC_CURR_MOVE 0
@@ -61,7 +61,7 @@
#define CMP_COMMON_BITS 0x4
#define CMP_NO_COMMON_BITS 0x5
-// atk76, various
+// Cmd_various
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
@@ -84,44 +84,25 @@
#define VARIOUS_SET_TELEPORT_OUTCOME 25
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
-// atk80, dmg manipulation
-#define ATK80_DMG_CHANGE_SIGN 0
-#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1
-#define ATK80_DMG_DOUBLED 2
+// Cmd_manipulatedmg
+#define DMG_CHANGE_SIGN 0
+#define DMG_RECOIL_FROM_MISS 1
+#define DMG_DOUBLED 2
-// atk4F, a flag used for the jumpifcantswitch command
-#define ATK4F_DONT_CHECK_STATUSES 0x80
+// Cmd_jumpifcantswitch
+#define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80
-// statchange defines
-#define STAT_CHANGE_BS_PTR 0x1
-#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20
+// Cmd_statbuffchange
+#define STAT_BUFF_ALLOW_PTR 0x1 // If set, allow use of jumpptr. Set in every use of statbuffchange
+#define STAT_BUFF_NOT_PROTECT_AFFECTED 0x20
-// atk48
-#define ATK48_STAT_NEGATIVE 0x1
-#define ATK48_STAT_BY_TWO 0x2
-#define ATK48_ONLY_MULTIPLE 0x4
-#define ATK48_DONT_CHECK_LOWER 0x8
-
-// atk49, moveend cases
-#define ATK49_RAGE 0
-#define ATK49_DEFROST 1
-#define ATK49_SYNCHRONIZE_TARGET 2
-#define ATK49_MOVE_END_ABILITIES 3
-#define ATK49_STATUS_IMMUNITY_ABILITIES 4
-#define ATK49_SYNCHRONIZE_ATTACKER 5
-#define ATK49_CHOICE_MOVE 6
-#define ATK49_CHANGED_ITEMS 7
-#define ATK49_ATTACKER_INVISIBLE 8
-#define ATK49_ATTACKER_VISIBLE 9
-#define ATK49_TARGET_VISIBLE 10
-#define ATK49_ITEM_EFFECTS_ALL 11
-#define ATK49_KINGSROCK_SHELLBELL 12
-#define ATK49_SUBSTITUTE 13
-#define ATK49_UPDATE_LAST_MOVES 14
-#define ATK49_MIRROR_MOVE 15
-#define ATK49_NEXT_TARGET 16
-#define ATK49_COUNT 17
+// stat change flags for Cmd_playstatchangeanimation
+#define STAT_CHANGE_NEGATIVE 0x1
+#define STAT_CHANGE_BY_TWO 0x2
+#define STAT_CHANGE_MULTIPLE_STATS 0x4
+#define STAT_CHANGE_CANT_PREVENT 0x8
+// stat flags for Cmd_playstatchangeanimation
#define BIT_HP 0x1
#define BIT_ATK 0x2
#define BIT_DEF 0x4
@@ -131,4 +112,24 @@
#define BIT_ACC 0x40
#define BIT_EVASION 0x80
+// cases for Cmd_moveend
+#define MOVEEND_RAGE 0
+#define MOVEEND_DEFROST 1
+#define MOVEEND_SYNCHRONIZE_TARGET 2
+#define MOVEEND_ON_DAMAGE_ABILITIES 3
+#define MOVEEND_IMMUNITY_ABILITIES 4
+#define MOVEEND_SYNCHRONIZE_ATTACKER 5
+#define MOVEEND_CHOICE_MOVE 6
+#define MOVEEND_CHANGED_ITEMS 7
+#define MOVEEND_ATTACKER_INVISIBLE 8
+#define MOVEEND_ATTACKER_VISIBLE 9
+#define MOVEEND_TARGET_VISIBLE 10
+#define MOVEEND_ITEM_EFFECTS_ALL 11
+#define MOVEEND_KINGSROCK_SHELLBELL 12
+#define MOVEEND_SUBSTITUTE 13
+#define MOVEEND_UPDATE_LAST_MOVES 14
+#define MOVEEND_MIRROR_MOVE 15
+#define MOVEEND_NEXT_TARGET 16
+#define MOVEEND_COUNT 17
+
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
diff --git a/include/constants/battle_setup.h b/include/constants/battle_setup.h
index d98e1762f..d825c88bc 100644
--- a/include/constants/battle_setup.h
+++ b/include/constants/battle_setup.h
@@ -13,6 +13,6 @@
#define TRAINER_BATTLE_PYRAMID 9
#define TRAINER_BATTLE_SET_TRAINER_A 10
#define TRAINER_BATTLE_SET_TRAINER_B 11
-#define TRAINER_BATTLE_12 12
+#define TRAINER_BATTLE_HILL 12
#endif // GUARD_CONSTANTS_BATTLE_SETUP_H
diff --git a/include/constants/battle_tent.h b/include/constants/battle_tent.h
new file mode 100644
index 000000000..666ada6bd
--- /dev/null
+++ b/include/constants/battle_tent.h
@@ -0,0 +1,32 @@
+#ifndef GUARD_CONSTANTS_BATTLE_TENT_H
+#define GUARD_CONSTANTS_BATTLE_TENT_H
+
+#define VERDANTURF_TENT_FUNC_INIT 0
+#define VERDANTURF_TENT_FUNC_GET_PRIZE 1
+#define VERDANTURF_TENT_FUNC_SET_PRIZE 2
+#define VERDANTURF_TENT_FUNC_SET_OPPONENT_GFX 3
+#define VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO 4
+#define VERDANTURF_TENT_FUNC_SAVE 5
+#define VERDANTURF_TENT_FUNC_SET_RANDOM_PRIZE 6
+#define VERDANTURF_TENT_FUNC_GIVE_PRIZE 7
+
+#define FALLARBOR_TENT_FUNC_INIT 0
+#define FALLARBOR_TENT_FUNC_GET_PRIZE 1
+#define FALLARBOR_TENT_FUNC_SET_PRIZE 2
+#define FALLARBOR_TENT_FUNC_SAVE 3
+#define FALLARBOR_TENT_FUNC_SET_RANDOM_PRIZE 4
+#define FALLARBOR_TENT_FUNC_GIVE_PRIZE 5
+#define FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME 6
+
+#define SLATEPORT_TENT_FUNC_INIT 0
+#define SLATEPORT_TENT_FUNC_GET_PRIZE 1
+#define SLATEPORT_TENT_FUNC_SET_PRIZE 2
+#define SLATEPORT_TENT_FUNC_SAVE 3
+#define SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE 4
+#define SLATEPORT_TENT_FUNC_GIVE_PRIZE 5
+#define SLATEPORT_TENT_FUNC_SELECT_RENT_MONS 6
+#define SLATEPORT_TENT_FUNC_SWAP_RENT_MONS 7
+#define SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS 8
+#define SLATEPORT_TENT_FUNC_GENERATE_RENTAL_MONS 9
+
+#endif // GUARD_CONSTANTS_BATTLE_TENT_H
diff --git a/include/constants/battle_tent_mons.h b/include/constants/battle_tent_mons.h
new file mode 100644
index 000000000..d9fc89a20
--- /dev/null
+++ b/include/constants/battle_tent_mons.h
@@ -0,0 +1,173 @@
+#ifndef GUARD_CONSTANTS_BATTLE_TENT_MONS_H
+#define GUARD_CONSTANTS_BATTLE_TENT_MONS_H
+
+#define SLATEPORT_TENT_MON_ZIGZAGOON_1 0
+#define SLATEPORT_TENT_MON_ZIGZAGOON_2 1
+#define SLATEPORT_TENT_MON_BEAUTIFLY 2
+#define SLATEPORT_TENT_MON_DUSTOX 3
+#define SLATEPORT_TENT_MON_WAILMER_1 4
+#define SLATEPORT_TENT_MON_WAILMER_2 5
+#define SLATEPORT_TENT_MON_MARILL_1 6
+#define SLATEPORT_TENT_MON_WINGULL_1 7
+#define SLATEPORT_TENT_MON_PELIPPER_1 8
+#define SLATEPORT_TENT_MON_CACNEA_1 9
+#define SLATEPORT_TENT_MON_LOMBRE_1 10
+#define SLATEPORT_TENT_MON_LOTAD 11
+#define SLATEPORT_TENT_MON_SEEDOT 12
+#define SLATEPORT_TENT_MON_NUZLEAF 13
+#define SLATEPORT_TENT_MON_NINJASK_1 14
+#define SLATEPORT_TENT_MON_NINJASK_2 15
+#define SLATEPORT_TENT_MON_GRAVELER 16
+#define SLATEPORT_TENT_MON_BALTOY 17
+#define SLATEPORT_TENT_MON_MIGHTYENA_1 18
+#define SLATEPORT_TENT_MON_MIGHTYENA_2 19
+#define SLATEPORT_TENT_MON_LINOONE 20
+#define SLATEPORT_TENT_MON_GOLDEEN 21
+#define SLATEPORT_TENT_MON_ELECTRIKE_1 22
+#define SLATEPORT_TENT_MON_VOLTORB 23
+#define SLATEPORT_TENT_MON_ARON_1 24
+#define SLATEPORT_TENT_MON_ARON_2 25
+#define SLATEPORT_TENT_MON_TRAPINCH_1 26
+#define SLATEPORT_TENT_MON_CACNEA_2 27
+#define SLATEPORT_TENT_MON_TAILLOW 28
+#define SLATEPORT_TENT_MON_SWELLOW 29
+#define SLATEPORT_TENT_MON_GOLBAT_1 30
+#define SLATEPORT_TENT_MON_LOUDRED 31
+#define SLATEPORT_TENT_MON_SPINDA 32
+#define SLATEPORT_TENT_MON_MAGNEMITE 33
+#define SLATEPORT_TENT_MON_WHISMUR 34
+#define SLATEPORT_TENT_MON_MAKUHITA 35
+#define SLATEPORT_TENT_MON_NUMEL_1 36
+#define SLATEPORT_TENT_MON_BARBOACH 37
+#define SLATEPORT_TENT_MON_TENTACOOL 38
+#define SLATEPORT_TENT_MON_VIGOROTH 39
+#define SLATEPORT_TENT_MON_MAGIKARP 40
+#define SLATEPORT_TENT_MON_SEVIPER_1 41
+#define SLATEPORT_TENT_MON_SOLROCK 42
+#define SLATEPORT_TENT_MON_KECLEON_1 43
+#define SLATEPORT_TENT_MON_KECLEON_2 44
+#define SLATEPORT_TENT_MON_SHROOMISH_1 45
+#define SLATEPORT_TENT_MON_SHROOMISH_2 46
+#define SLATEPORT_TENT_MON_LOMBRE_2 47
+#define SLATEPORT_TENT_MON_NUMEL_2 48
+#define SLATEPORT_TENT_MON_TRAPINCH_2 49
+#define SLATEPORT_TENT_MON_PELIPPER_2 50
+#define SLATEPORT_TENT_MON_WINGULL_2 51
+#define SLATEPORT_TENT_MON_MARILL_2 52
+#define SLATEPORT_TENT_MON_SKITTY 53
+#define SLATEPORT_TENT_MON_SEVIPER_2 54
+#define SLATEPORT_TENT_MON_GOLBAT_2 55
+#define SLATEPORT_TENT_MON_RALTS 56
+#define SLATEPORT_TENT_MON_SANDSHREW 57
+#define SLATEPORT_TENT_MON_SWALOT 58
+#define SLATEPORT_TENT_MON_VOLBEAT 59
+#define SLATEPORT_TENT_MON_ILLUMISE 60
+#define SLATEPORT_TENT_MON_KADABRA 61
+#define SLATEPORT_TENT_MON_KIRLIA 62
+#define SLATEPORT_TENT_MON_BRELOOM 63
+#define SLATEPORT_TENT_MON_PLUSLE_1 64
+#define SLATEPORT_TENT_MON_PLUSLE_2 65
+#define SLATEPORT_TENT_MON_ELECTRIKE_2 66
+#define SLATEPORT_TENT_MON_SWABLU 67
+#define SLATEPORT_TENT_MON_MACHOP 68
+#define SLATEPORT_TENT_MON_MACHOKE 69
+
+#define NUM_SLATEPORT_TENT_MONS 70
+
+#define VERDANTURF_TENT_MON_POOCHYENA 0
+#define VERDANTURF_TENT_MON_ZIGZAGOON 1
+#define VERDANTURF_TENT_MON_DUSTOX 2
+#define VERDANTURF_TENT_MON_TAILLOW 3
+#define VERDANTURF_TENT_MON_SHROOMISH 4
+#define VERDANTURF_TENT_MON_MACHOP 5
+#define VERDANTURF_TENT_MON_MAGIKARP 6
+#define VERDANTURF_TENT_MON_BARBOACH 7
+#define VERDANTURF_TENT_MON_WINGULL 8
+#define VERDANTURF_TENT_MON_ARON_1 9
+#define VERDANTURF_TENT_MON_NUMEL_1 10
+#define VERDANTURF_TENT_MON_SWALOT 11
+#define VERDANTURF_TENT_MON_KECLEON 12
+#define VERDANTURF_TENT_MON_BALTOY 13
+#define VERDANTURF_TENT_MON_NINJASK 14
+#define VERDANTURF_TENT_MON_MAKUHITA 15
+#define VERDANTURF_TENT_MON_SWABLU 16
+#define VERDANTURF_TENT_MON_GOLDEEN_1 17
+#define VERDANTURF_TENT_MON_LOTAD 18
+#define VERDANTURF_TENT_MON_NUMEL_2 19
+#define VERDANTURF_TENT_MON_LINOONE 20
+#define VERDANTURF_TENT_MON_SEVIPER 21
+#define VERDANTURF_TENT_MON_SKARMORY 22
+#define VERDANTURF_TENT_MON_SWELLOW 23
+#define VERDANTURF_TENT_MON_GOLDEEN_2 24
+#define VERDANTURF_TENT_MON_ELECTRIKE 25
+#define VERDANTURF_TENT_MON_NUZLEAF 26
+#define VERDANTURF_TENT_MON_ARON_2 27
+#define VERDANTURF_TENT_MON_MIGHTYENA 28
+#define VERDANTURF_TENT_MON_SOLROCK 29
+#define VERDANTURF_TENT_MON_GRAVELER 30
+#define VERDANTURF_TENT_MON_KADABRA 31
+#define VERDANTURF_TENT_MON_VOLTORB 32
+#define VERDANTURF_TENT_MON_MAGNEMITE 33
+#define VERDANTURF_TENT_MON_PELIPPER 34
+#define VERDANTURF_TENT_MON_LOUDRED 35
+#define VERDANTURF_TENT_MON_MARILL 36
+#define VERDANTURF_TENT_MON_TRAPINCH 37
+#define VERDANTURF_TENT_MON_TENTACOOL 38
+#define VERDANTURF_TENT_MON_VIGOROTH 39
+#define VERDANTURF_TENT_MON_WAILMER 40
+#define VERDANTURF_TENT_MON_ILLUMISE 41
+#define VERDANTURF_TENT_MON_MACHOKE 42
+#define VERDANTURF_TENT_MON_WHISMUR 43
+#define VERDANTURF_TENT_MON_CACNEA 44
+
+#define NUM_VERDANTURF_TENT_MONS 45
+
+#define FALLARBOR_TENT_MON_NUMEL 0
+#define FALLARBOR_TENT_MON_LINOONE_1 1
+#define FALLARBOR_TENT_MON_PLUSLE 2
+#define FALLARBOR_TENT_MON_POOCHYENA 3
+#define FALLARBOR_TENT_MON_KECLEON 4
+#define FALLARBOR_TENT_MON_MAGIKARP 5
+#define FALLARBOR_TENT_MON_SOLROCK 6
+#define FALLARBOR_TENT_MON_MAKUHITA 7
+#define FALLARBOR_TENT_MON_MACHOKE 8
+#define FALLARBOR_TENT_MON_NINCADA 9
+#define FALLARBOR_TENT_MON_BEAUTIFLY 10
+#define FALLARBOR_TENT_MON_DUSTOX 11
+#define FALLARBOR_TENT_MON_ILLUMISE 12
+#define FALLARBOR_TENT_MON_VOLBEAT 13
+#define FALLARBOR_TENT_MON_NINJASK_1 14
+#define FALLARBOR_TENT_MON_NINJASK_2 15
+#define FALLARBOR_TENT_MON_ARON_1 16
+#define FALLARBOR_TENT_MON_ARON_2 17
+#define FALLARBOR_TENT_MON_ELECTRIKE 18
+#define FALLARBOR_TENT_MON_MAGNEMITE 19
+#define FALLARBOR_TENT_MON_VOLTORB 20
+#define FALLARBOR_TENT_MON_WHISMUR 21
+#define FALLARBOR_TENT_MON_LOUDRED 22
+#define FALLARBOR_TENT_MON_LINOONE_2 23
+#define FALLARBOR_TENT_MON_MIGHTYENA 24
+#define FALLARBOR_TENT_MON_SWABLU 25
+#define FALLARBOR_TENT_MON_SKARMORY 26
+#define FALLARBOR_TENT_MON_GOLBAT 27
+#define FALLARBOR_TENT_MON_WINGULL 28
+#define FALLARBOR_TENT_MON_PELIPPER 29
+#define FALLARBOR_TENT_MON_BARBOACH 30
+#define FALLARBOR_TENT_MON_WAILMER 31
+#define FALLARBOR_TENT_MON_MARILL 32
+#define FALLARBOR_TENT_MON_GOLDEEN_1 33
+#define FALLARBOR_TENT_MON_GOLDEEN_2 34
+#define FALLARBOR_TENT_MON_TRAPINCH 35
+#define FALLARBOR_TENT_MON_BALTOY 36
+#define FALLARBOR_TENT_MON_GRAVELER 37
+#define FALLARBOR_TENT_MON_SANDSHREW 38
+#define FALLARBOR_TENT_MON_SWALOT 39
+#define FALLARBOR_TENT_MON_SHROOMISH 40
+#define FALLARBOR_TENT_MON_KIRLIA 41
+#define FALLARBOR_TENT_MON_LOMBRE 42
+#define FALLARBOR_TENT_MON_NUZLEAF 43
+#define FALLARBOR_TENT_MON_CACNEA 44
+
+#define NUM_FALLARBOR_TENT_MONS 45
+
+#endif // GUARD_CONSTANTS_BATTLE_TENT_MONS_H
diff --git a/include/constants/battle_tent_trainers.h b/include/constants/battle_tent_trainers.h
new file mode 100644
index 000000000..3629da0ca
--- /dev/null
+++ b/include/constants/battle_tent_trainers.h
@@ -0,0 +1,99 @@
+#ifndef GUARD_CONSTANTS_BATTLE_TENT_TRAINERS_H
+#define GUARD_CONSTANTS_BATTLE_TENT_TRAINERS_H
+
+#define SLATEPORT_TENT_TRAINER_JOLIE 0
+#define SLATEPORT_TENT_TRAINER_MALACHI 1
+#define SLATEPORT_TENT_TRAINER_KELSIE 2
+#define SLATEPORT_TENT_TRAINER_DAVON 3
+#define SLATEPORT_TENT_TRAINER_GLENDA 4
+#define SLATEPORT_TENT_TRAINER_HELENA 5
+#define SLATEPORT_TENT_TRAINER_RODOLFO 6
+#define SLATEPORT_TENT_TRAINER_DAVION 7
+#define SLATEPORT_TENT_TRAINER_KENDALL 8
+#define SLATEPORT_TENT_TRAINER_COLTEN 9
+#define SLATEPORT_TENT_TRAINER_IRVIN 10
+#define SLATEPORT_TENT_TRAINER_SHAUN 11
+#define SLATEPORT_TENT_TRAINER_KYLER 12
+#define SLATEPORT_TENT_TRAINER_MAGGIE 13
+#define SLATEPORT_TENT_TRAINER_STEPHON 14
+#define SLATEPORT_TENT_TRAINER_REBECCA 15
+#define SLATEPORT_TENT_TRAINER_REGGIE 16
+#define SLATEPORT_TENT_TRAINER_JANAE 17
+#define SLATEPORT_TENT_TRAINER_CAIDEN 18
+#define SLATEPORT_TENT_TRAINER_KIRSTEN 19
+#define SLATEPORT_TENT_TRAINER_KURTIS 20
+#define SLATEPORT_TENT_TRAINER_STEFAN 21
+#define SLATEPORT_TENT_TRAINER_AVERY 22
+#define SLATEPORT_TENT_TRAINER_DWANE 23
+#define SLATEPORT_TENT_TRAINER_MCKENNA 24
+#define SLATEPORT_TENT_TRAINER_CAMRYN 25
+#define SLATEPORT_TENT_TRAINER_NATASHA 26
+#define SLATEPORT_TENT_TRAINER_AUSTYN 27
+#define SLATEPORT_TENT_TRAINER_DONOVAN 28
+#define SLATEPORT_TENT_TRAINER_TAMIA 29
+
+#define VERDANTURF_TENT_TRAINER_BRENNA 0
+#define VERDANTURF_TENT_TRAINER_DILAN 1
+#define VERDANTURF_TENT_TRAINER_ELIANA 2
+#define VERDANTURF_TENT_TRAINER_MARKUS 3
+#define VERDANTURF_TENT_TRAINER_CAITLYN 4
+#define VERDANTURF_TENT_TRAINER_DESIREE 5
+#define VERDANTURF_TENT_TRAINER_RONALD 6
+#define VERDANTURF_TENT_TRAINER_ASHTEN 7
+#define VERDANTURF_TENT_TRAINER_GERARD 8
+#define VERDANTURF_TENT_TRAINER_BRADLY 9
+#define VERDANTURF_TENT_TRAINER_DENNIS 10
+#define VERDANTURF_TENT_TRAINER_PRESTIN 11
+#define VERDANTURF_TENT_TRAINER_ERNESTO 12
+#define VERDANTURF_TENT_TRAINER_NALA 13
+#define VERDANTURF_TENT_TRAINER_DARNELL 14
+#define VERDANTURF_TENT_TRAINER_ASHLYN 15
+#define VERDANTURF_TENT_TRAINER_ADDISON 16
+#define VERDANTURF_TENT_TRAINER_JUSTINE 17
+#define VERDANTURF_TENT_TRAINER_TYSON 18
+#define VERDANTURF_TENT_TRAINER_LAILA 19
+#define VERDANTURF_TENT_TRAINER_WAREN 20
+#define VERDANTURF_TENT_TRAINER_TOBIAS 21
+#define VERDANTURF_TENT_TRAINER_JOSIAH 22
+#define VERDANTURF_TENT_TRAINER_DION 23
+#define VERDANTURF_TENT_TRAINER_KENZIE 24
+#define VERDANTURF_TENT_TRAINER_LILLIAN 25
+#define VERDANTURF_TENT_TRAINER_LESLEY 26
+#define VERDANTURF_TENT_TRAINER_MARQUIS 27
+#define VERDANTURF_TENT_TRAINER_FREDDY 28
+#define VERDANTURF_TENT_TRAINER_CECILIA 29
+
+#define FALLARBOR_TENT_TRAINER_AMBER 0
+#define FALLARBOR_TENT_TRAINER_JAVIER 1
+#define FALLARBOR_TENT_TRAINER_NATALIA 2
+#define FALLARBOR_TENT_TRAINER_TREVE 3
+#define FALLARBOR_TENT_TRAINER_ARIANNA 4
+#define FALLARBOR_TENT_TRAINER_JADYN 5
+#define FALLARBOR_TENT_TRAINER_GERARDO 6
+#define FALLARBOR_TENT_TRAINER_JONN 7
+#define FALLARBOR_TENT_TRAINER_ESTEBAN 8
+#define FALLARBOR_TENT_TRAINER_JAMESON 9
+#define FALLARBOR_TENT_TRAINER_ALANZO 10
+#define FALLARBOR_TENT_TRAINER_HOWARD 11
+#define FALLARBOR_TENT_TRAINER_CONRAD 12
+#define FALLARBOR_TENT_TRAINER_MAKENNA 13
+#define FALLARBOR_TENT_TRAINER_BRAYAN 14
+#define FALLARBOR_TENT_TRAINER_MARIANA 15
+#define FALLARBOR_TENT_TRAINER_SHELDON 16
+#define FALLARBOR_TENT_TRAINER_GIANNA 17
+#define FALLARBOR_TENT_TRAINER_YAHIR 18
+#define FALLARBOR_TENT_TRAINER_BRITNEY 19
+#define FALLARBOR_TENT_TRAINER_HECTER 20
+#define FALLARBOR_TENT_TRAINER_TANNOR 21
+#define FALLARBOR_TENT_TRAINER_BENJI 22
+#define FALLARBOR_TENT_TRAINER_RORY 23
+#define FALLARBOR_TENT_TRAINER_ELEANOR 24
+#define FALLARBOR_TENT_TRAINER_EVELYN 25
+#define FALLARBOR_TENT_TRAINER_ARIELLE 26
+#define FALLARBOR_TENT_TRAINER_CONNAR 27
+#define FALLARBOR_TENT_TRAINER_MAURICE 28
+#define FALLARBOR_TENT_TRAINER_KIANNA 29
+
+#define NUM_BATTLE_TENT_TRAINERS 30
+
+#endif // GUARD_CONSTANTS_BATTLE_TENT_TRAINERS_H
diff --git a/include/constants/battle_tower.h b/include/constants/battle_tower.h
new file mode 100644
index 000000000..b372c3ad5
--- /dev/null
+++ b/include/constants/battle_tower.h
@@ -0,0 +1,41 @@
+#ifndef GUARD_CONSTANTS_BATTLE_TOWER_H
+#define GUARD_CONSTANTS_BATTLE_TOWER_H
+
+#define BATTLE_TOWER_FUNC_INIT 0
+#define BATTLE_TOWER_FUNC_GET_DATA 1
+#define BATTLE_TOWER_FUNC_SET_DATA 2
+#define BATTLE_TOWER_FUNC_SET_OPPONENT 3
+#define BATTLE_TOWER_FUNC_SET_BATTLE_WON 4
+#define BATTLE_TOWER_FUNC_GIVE_RIBBONS 5
+#define BATTLE_TOWER_FUNC_SAVE 6
+#define BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO 7
+#define BATTLE_TOWER_FUNC_NOP 8
+#define BATTLE_TOWER_FUNC_NOP2 9
+#define BATTLE_TOWER_FUNC_LOAD_PARTNERS 10
+#define BATTLE_TOWER_FUNC_PARTNER_MSG 11
+#define BATTLE_TOWER_FUNC_LOAD_LINK_OPPONENTS 12
+#define BATTLE_TOWER_FUNC_13 13
+#define BATTLE_TOWER_FUNC_SET_PARTNER_GFX 14
+#define BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA 15
+
+#define TOWER_DATA_WIN_STREAK 1
+#define TOWER_DATA_WIN_STREAK_ACTIVE 2
+#define TOWER_DATA_LVL_MODE 3
+
+// IDs for the messages printed by potential partners in the Battle Tower Multi Partner Room
+#define PARTNER_MSGID_INTRO 0
+#define PARTNER_MSGID_MON1 1
+#define PARTNER_MSGID_MON2_ASK 2
+#define PARTNER_MSGID_ACCEPT 3
+#define PARTNER_MSGID_REJECT 4
+
+// IDs for communicating with the Link Multi partner
+#define BATTLE_TOWER_LINK_CONTINUE 0
+#define BATTLE_TOWER_LINK_RETIRE 1
+
+#define BATTLE_TOWER_LINKSTAT_CONTINUE 0
+#define BATTLE_TOWER_LINKSTAT_BOTH_RETIRE 1
+#define BATTLE_TOWER_LINKSTAT_PARTNER_RETIRE 2
+#define BATTLE_TOWER_LINKSTAT_PLAYER_RETIRE 3
+
+#endif //GUARD_CONSTANTS_BATTLE_TOWER_H
diff --git a/include/constants/berry.h b/include/constants/berry.h
new file mode 100644
index 000000000..d413b9947
--- /dev/null
+++ b/include/constants/berry.h
@@ -0,0 +1,28 @@
+#ifndef GUARD_CONSTANTS_BERRY_H
+#define GUARD_CONSTANTS_BERRY_H
+
+#define BERRY_NONE 0
+
+#define BERRY_FIRMNESS_UNKNOWN 0
+#define BERRY_FIRMNESS_VERY_SOFT 1
+#define BERRY_FIRMNESS_SOFT 2
+#define BERRY_FIRMNESS_HARD 3
+#define BERRY_FIRMNESS_VERY_HARD 4
+#define BERRY_FIRMNESS_SUPER_HARD 5
+
+#define FLAVOR_SPICY 0
+#define FLAVOR_DRY 1
+#define FLAVOR_SWEET 2
+#define FLAVOR_BITTER 3
+#define FLAVOR_SOUR 4
+#define FLAVOR_COUNT 5
+
+#define BERRY_STAGE_NO_BERRY 0 // there is no tree planted and the soil is completely flat.
+#define BERRY_STAGE_PLANTED 1
+#define BERRY_STAGE_SPROUTED 2
+#define BERRY_STAGE_TALLER 3
+#define BERRY_STAGE_FLOWERING 4
+#define BERRY_STAGE_BERRIES 5
+#define BERRY_STAGE_SPARKLING 255
+
+#endif // GUARD_CONSTANTS_BERRY_H
diff --git a/include/constants/cable_club.h b/include/constants/cable_club.h
new file mode 100644
index 000000000..f2aa4120c
--- /dev/null
+++ b/include/constants/cable_club.h
@@ -0,0 +1,15 @@
+#ifndef GUARD_CONSTANTS_CABLE_CLUB_H
+#define GUARD_CONSTANTS_CABLE_CLUB_H
+
+// States for VAR_CABLE_CLUB_STATE
+#define USING_SINGLE_BATTLE 1
+#define USING_DOUBLE_BATTLE 2
+#define USING_TRADE_CENTER 3
+#define USING_RECORD_CORNER 4
+#define USING_MULTI_BATTLE 5
+#define USING_UNION_ROOM 6
+#define USING_BERRY_CRUSH 7
+#define USING_MINIGAME 8
+#define USING_BATTLE_TOWER 9
+
+#endif //GUARD_CONSTANTS_CABLE_CLUB_H
diff --git a/include/constants/coins.h b/include/constants/coins.h
new file mode 100644
index 000000000..fd68f3f9e
--- /dev/null
+++ b/include/constants/coins.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_CONSTANTS_COINS_H
+#define GUARD_CONSTANTS_COINS_H
+
+#define MAX_COINS 9999
+
+#endif // GUARD_CONSTANTS_COINS_H \ No newline at end of file
diff --git a/include/constants/contest.h b/include/constants/contest.h
index d3296222b..186c56e2b 100644
--- a/include/constants/contest.h
+++ b/include/constants/contest.h
@@ -9,6 +9,19 @@
#define LINK_CONTEST_FLAG_IS_WIRELESS (1 << 1)
#define LINK_CONTEST_FLAG_HAS_RS_PLAYER (1 << 2)
+#define CONTEST_RANK_NORMAL 0
+#define CONTEST_RANK_SUPER 1
+#define CONTEST_RANK_HYPER 2
+#define CONTEST_RANK_MASTER 3
+#define CONTEST_RANK_LINK 4
+
+// States for VAR_CONTEST_TYPE
+#define CONTEST_TYPE_NPC_NORMAL (CONTEST_RANK_NORMAL + 1)
+#define CONTEST_TYPE_NPC_SUPER (CONTEST_RANK_SUPER + 1)
+#define CONTEST_TYPE_NPC_HYPER (CONTEST_RANK_HYPER + 1)
+#define CONTEST_TYPE_NPC_MASTER (CONTEST_RANK_MASTER + 1)
+#define CONTEST_TYPE_LINK (CONTEST_RANK_LINK + 1)
+
#define CONTEST_CATEGORY_COOL 0
#define CONTEST_CATEGORY_BEAUTY 1
#define CONTEST_CATEGORY_CUTE 2
@@ -16,4 +29,10 @@
#define CONTEST_CATEGORY_TOUGH 4
#define CONTEST_CATEGORIES_COUNT 5
+#define CANT_ENTER_CONTEST 0
+#define CAN_ENTER_CONTEST_EQUAL_RANK 1
+#define CAN_ENTER_CONTEST_HIGH_RANK 2
+#define CANT_ENTER_CONTEST_EGG 3
+#define CANT_ENTER_CONTEST_FAINTED 4
+
#endif // GUARD_CONSTANTS_CONTEST_H
diff --git a/include/constants/daycare.h b/include/constants/daycare.h
new file mode 100644
index 000000000..103f920f2
--- /dev/null
+++ b/include/constants/daycare.h
@@ -0,0 +1,27 @@
+#ifndef GUARD_DAYCARE_CONSTANTS_H
+#define GUARD_DAYCARE_CONSTANTS_H
+
+// Parent compatability scores
+#define PARENTS_INCOMPATIBLE 0
+#define PARENTS_LOW_COMPATIBILITY 20
+#define PARENTS_MED_COMPATABILITY 50
+#define PARENTS_MAX_COMPATABILITY 70
+
+// Daycare state
+#define DAYCARE_NO_MONS 0
+#define DAYCARE_EGG_WAITING 1
+#define DAYCARE_ONE_MON 2
+#define DAYCARE_TWO_MONS 3
+
+#define INHERITED_IV_COUNT 3
+#define EGG_HATCH_LEVEL 5
+#define EGG_GENDER_MALE 0x8000 // used to create a male egg from a female-only parent species (e.g. Nidoran)
+
+#define DAYCARE_LEVEL_MENU_EXIT 5
+#define DAYCARE_EXITED_LEVEL_MENU 2 // would be redundant with above if GF had used the same value
+
+// Array buffers
+#define EGG_MOVES_ARRAY_COUNT 10
+#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
+
+#endif //GUARD_DAYCARE_CONSTANTS_H
diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h
index 50f5994f4..8e82cfef0 100644
--- a/include/constants/easy_chat.h
+++ b/include/constants/easy_chat.h
@@ -1095,6 +1095,15 @@
#define EC_WORD_OLD (EC_GROUP_TRENDY_SAYING << 9) | 0x1e
#define EC_WORD_YOUNG (EC_GROUP_TRENDY_SAYING << 9) | 0x1f
#define EC_WORD_UGLY (EC_GROUP_TRENDY_SAYING << 9) | 0x20
+#define NUM_ADDITIONAL_PHRASES 33
+
+// Special Berry Masters Wife phrases
+#define NOT_SPECIAL_PHRASE 0
+#define PHRASE_GREAT_BATTLE 1
+#define PHRASE_CHALLENGE_CONTEST 2
+#define PHRASE_OVERWHELMING_LATIAS 3
+#define PHRASE_COOL_LATIOS 4
+#define PHRASE_SUPER_HUSTLE 5
#define EC_POKEMON(mon) ((EC_GROUP_POKEMON << 9) | SPECIES_##mon)
#define EC_POKEMON2(mon) ((EC_GROUP_POKEMON_2 << 9) | SPECIES_##mon)
diff --git a/include/constants/event_object_movement_constants.h b/include/constants/event_object_movement_constants.h
index b1f9b4cb5..ed6f6c7fb 100755
--- a/include/constants/event_object_movement_constants.h
+++ b/include/constants/event_object_movement_constants.h
@@ -179,8 +179,8 @@
#define MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY 0x5D
#define MOVEMENT_ACTION_INIT_AFFINE_ANIM 0x5E
#define MOVEMENT_ACTION_CLEAR_AFFINE_ANIM 0x5F
-#define MOVEMENT_ACTION_UNKNOWN1 0x60
-#define MOVEMENT_ACTION_UNKNOWN2 0x61
+#define MOVEMENT_ACTION_HIDE_REFLECTION 0x60
+#define MOVEMENT_ACTION_SHOW_REFLECTION 0x61
#define MOVEMENT_ACTION_WALK_DOWN_START_AFFINE 0x62
#define MOVEMENT_ACTION_WALK_DOWN_AFFINE 0x63
#define MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN 0x64
diff --git a/include/constants/field_poison.h b/include/constants/field_poison.h
new file mode 100644
index 000000000..19b91e7c2
--- /dev/null
+++ b/include/constants/field_poison.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_CONSTANTS_FIELD_POISON_H
+#define GUARD_CONSTANTS_FIELD_POISON_H
+
+#define FLDPSN_NONE 0
+#define FLDPSN_PSN 1
+#define FLDPSN_FNT 2
+
+#define FLDPSN_NO_WHITEOUT 0
+#define FLDPSN_WHITEOUT 1
+#define FLDPSN_FRONTIER_WHITEOUT 2
+
+#endif //GUARD_CONSTANTS_FIELD_POISON_H
diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h
new file mode 100644
index 000000000..a2dc117e4
--- /dev/null
+++ b/include/constants/field_specials.h
@@ -0,0 +1,78 @@
+#ifndef GUARD_CONSTANTS_FIELD_SPECIALS_H
+#define GUARD_CONSTANTS_FIELD_SPECIALS_H
+
+// PC Locations
+#define PC_LOCATION_OTHER 0
+#define PC_LOCATION_BRENDANS_HOUSE 1
+#define PC_LOCATION_MAYS_HOUSE 2
+
+// SS Tidal Locations
+#define SS_TIDAL_LOCATION_CURRENTS 0
+#define SS_TIDAL_LOCATION_SLATEPORT 1
+#define SS_TIDAL_LOCATION_LILYCOVE 2
+#define SS_TIDAL_LOCATION_ROUTE124 3
+#define SS_TIDAL_LOCATION_ROUTE131 4
+
+#define SS_TIDAL_BOARD_SLATEPORT 1
+#define SS_TIDAL_DEPART_SLATEPORT 2
+#define SS_TIDAL_HALFWAY_LILYCOVE 3
+#define SS_TIDAL_LAND_LILYCOVE 4
+#define SS_TIDAL_BOARD_LILYCOVE 5
+#define SS_TIDAL_DEPART_LILYCOVE 6
+#define SS_TIDAL_HALFWAY_SLATEPORT 7
+#define SS_TIDAL_LAND_SLATEPORT 8
+#define SS_TIDAL_EXIT_CURRENTS_RIGHT 9
+#define SS_TIDAL_EXIT_CURRENTS_LEFT 10
+
+#define SS_TIDAL_MAX_STEPS 205
+
+// Scrollable Multichoice Menus
+#define SCROLL_MULTI_NONE 0
+#define SCROLL_MULTI_GLASS_WORKSHOP_VENDOR 1
+#define SCROLL_MULTI_POKEMON_FAN_CLUB_RATER 2
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1 3
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2 4
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR 5
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR 6
+#define SCROLL_MULTI_BERRY_POWDER_VENDOR 7
+#define SCROLL_MULTI_BF_RECEPTIONIST 8
+#define SCROLL_MULTI_BF_MOVE_TUTOR_1 9
+#define SCROLL_MULTI_BF_MOVE_TUTOR_2 10
+#define SCROLL_MULTI_SS_TIDAL_DESTINATION 11
+#define SCROLL_MULTI_BATTLE_TENT_RULES 12
+
+#define MAX_SCROLL_MULTI_ON_SCREEN 6
+#define MAX_SCROLL_MULTI_LENGTH 16
+
+// Dept Store Floor Numbers
+#define DEPT_STORE_FLOORNUM_B4F 0
+#define DEPT_STORE_FLOORNUM_B3F 1
+#define DEPT_STORE_FLOORNUM_B2F 2
+#define DEPT_STORE_FLOORNUM_B1F 3
+#define DEPT_STORE_FLOORNUM_1F 4
+#define DEPT_STORE_FLOORNUM_2F 5
+#define DEPT_STORE_FLOORNUM_3F 6
+#define DEPT_STORE_FLOORNUM_4F 7
+#define DEPT_STORE_FLOORNUM_5F 8
+#define DEPT_STORE_FLOORNUM_6F 9
+#define DEPT_STORE_FLOORNUM_7F 10
+#define DEPT_STORE_FLOORNUM_8F 11
+#define DEPT_STORE_FLOORNUM_9F 12
+#define DEPT_STORE_FLOORNUM_10F 13
+#define DEPT_STORE_FLOORNUM_11F 14
+#define DEPT_STORE_FLOORNUM_ROOFTOP 15
+
+// Lilycove Pokemon Trainer Fan Club
+#define NUM_TRAINER_FAN_CLUB_MEMBERS 8
+
+#define FANCLUB_GOT_FIRST_FANS 7
+#define FANCLUB_MEMBER1 8
+#define FANCLUB_MEMBER2 9
+#define FANCLUB_MEMBER3 10
+#define FANCLUB_MEMBER4 11
+#define FANCLUB_MEMBER5 12
+#define FANCLUB_MEMBER6 13
+#define FANCLUB_MEMBER7 14
+#define FANCLUB_MEMBER8 15
+
+#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H
diff --git a/include/constants/field_tasks.h b/include/constants/field_tasks.h
new file mode 100644
index 000000000..7f773855d
--- /dev/null
+++ b/include/constants/field_tasks.h
@@ -0,0 +1,13 @@
+#ifndef GUARD_CONSTANTS_FIELD_TASKS_H
+#define GUARD_CONSTANTS_FIELD_TASKS_H
+
+#define STEP_CB_DUMMY 0
+#define STEP_CB_ASH 1
+#define STEP_CB_FORTREE_BRIDGE 2
+#define STEP_CB_PACIFIDLOG_BRIDGE 3
+#define STEP_CB_SOOTOPOLIS_ICE 4
+#define STEP_CB_TRUCK 5
+#define STEP_CB_SECRET_BASE 6
+#define STEP_CB_CRACKED_FLOOR 7
+
+#endif // GUARD_CONSTANTS_FIELD_TASKS_H
diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h
new file mode 100644
index 000000000..e84dbc48c
--- /dev/null
+++ b/include/constants/field_weather.h
@@ -0,0 +1,24 @@
+#ifndef GUARD_CONSTANTS_FIELD_WEATHER_H
+#define GUARD_CONSTANTS_FIELD_WEATHER_H
+
+#define MAX_RAIN_SPRITES 24
+#define NUM_CLOUD_SPRITES 3
+#define NUM_FOG_HORIZONTAL_SPRITES 20
+#define NUM_ASH_SPRITES 20
+#define NUM_FOG_DIAGONAL_SPRITES 20
+#define NUM_SANDSTORM_SPRITES 20
+#define NUM_SWIRL_SANDSTORM_SPRITES 5
+
+// Controls how the weather should be changing the screen palettes.
+#define WEATHER_PAL_STATE_CHANGING_WEATHER 0
+#define WEATHER_PAL_STATE_SCREEN_FADING_IN 1
+#define WEATHER_PAL_STATE_SCREEN_FADING_OUT 2
+#define WEATHER_PAL_STATE_IDLE 3
+
+// Modes for FadeScreen
+#define FADE_FROM_BLACK 0
+#define FADE_TO_BLACK 1
+#define FADE_FROM_WHITE 2
+#define FADE_TO_WHITE 3
+
+#endif // GUARD_CONSTANTS_FIELD_WEATHER_H
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 7aa5c3ed3..1163e394f 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -1,41 +1,45 @@
#ifndef GUARD_CONSTANTS_FLAGS_H
#define GUARD_CONSTANTS_FLAGS_H
+#include "constants/opponents.h"
+
// Temporary Flags
// These temporary flags are are cleared every time a map is loaded. They are used
// for things like shortening an NPCs introduction text if the player already spoke
// to them once.
-#define FLAG_TEMP_1 0x1
-#define FLAG_TEMP_2 0x2
-#define FLAG_TEMP_3 0x3
-#define FLAG_TEMP_4 0x4
-#define FLAG_TEMP_5 0x5 // Unused Flag
-#define FLAG_TEMP_6 0x6 // Unused Flag
-#define FLAG_TEMP_7 0x7 // Unused Flag
-#define FLAG_TEMP_8 0x8 // Unused Flag
-#define FLAG_TEMP_9 0x9 // Unused Flag
-#define FLAG_TEMP_A 0xA // Unused Flag
-#define FLAG_TEMP_B 0xB // Unused Flag
-#define FLAG_TEMP_C 0xC // Unused Flag
-#define FLAG_TEMP_D 0xD // Unused Flag
-#define FLAG_TEMP_E 0xE // Unused Flag
-#define FLAG_TEMP_F 0xF // Unused Flag
-#define FLAG_TEMP_10 0x10 // Unused Flag
-#define FLAG_TEMP_11 0x11
-#define FLAG_TEMP_12 0x12
-#define FLAG_TEMP_13 0x13
-#define FLAG_TEMP_14 0x14
-#define FLAG_TEMP_15 0x15
-#define FLAG_TEMP_16 0x16
-#define FLAG_TEMP_17 0x17
-#define FLAG_TEMP_18 0x18
-#define FLAG_TEMP_19 0x19
-#define FLAG_TEMP_1A 0x1A
-#define FLAG_TEMP_1B 0x1B
-#define FLAG_TEMP_1C 0x1C
-#define FLAG_TEMP_1D 0x1D
-#define FLAG_TEMP_1E 0x1E
-#define FLAG_TEMP_1F 0x1F
+#define TEMP_FLAGS_START 0x0
+#define FLAG_TEMP_1 (TEMP_FLAGS_START + 0x1)
+#define FLAG_TEMP_2 (TEMP_FLAGS_START + 0x2)
+#define FLAG_TEMP_3 (TEMP_FLAGS_START + 0x3)
+#define FLAG_TEMP_4 (TEMP_FLAGS_START + 0x4)
+#define FLAG_TEMP_5 (TEMP_FLAGS_START + 0x5) // Unused Flag
+#define FLAG_TEMP_6 (TEMP_FLAGS_START + 0x6) // Unused Flag
+#define FLAG_TEMP_7 (TEMP_FLAGS_START + 0x7) // Unused Flag
+#define FLAG_TEMP_8 (TEMP_FLAGS_START + 0x8) // Unused Flag
+#define FLAG_TEMP_9 (TEMP_FLAGS_START + 0x9) // Unused Flag
+#define FLAG_TEMP_A (TEMP_FLAGS_START + 0xA) // Unused Flag
+#define FLAG_TEMP_B (TEMP_FLAGS_START + 0xB) // Unused Flag
+#define FLAG_TEMP_C (TEMP_FLAGS_START + 0xC) // Unused Flag
+#define FLAG_TEMP_D (TEMP_FLAGS_START + 0xD) // Unused Flag
+#define FLAG_TEMP_E (TEMP_FLAGS_START + 0xE) // Unused Flag
+#define FLAG_TEMP_F (TEMP_FLAGS_START + 0xF) // Unused Flag
+#define FLAG_TEMP_10 (TEMP_FLAGS_START + 0x10) // Unused Flag
+#define FLAG_TEMP_11 (TEMP_FLAGS_START + 0x11)
+#define FLAG_TEMP_12 (TEMP_FLAGS_START + 0x12)
+#define FLAG_TEMP_13 (TEMP_FLAGS_START + 0x13)
+#define FLAG_TEMP_14 (TEMP_FLAGS_START + 0x14)
+#define FLAG_TEMP_15 (TEMP_FLAGS_START + 0x15)
+#define FLAG_TEMP_16 (TEMP_FLAGS_START + 0x16)
+#define FLAG_TEMP_17 (TEMP_FLAGS_START + 0x17)
+#define FLAG_TEMP_18 (TEMP_FLAGS_START + 0x18)
+#define FLAG_TEMP_19 (TEMP_FLAGS_START + 0x19)
+#define FLAG_TEMP_1A (TEMP_FLAGS_START + 0x1A)
+#define FLAG_TEMP_1B (TEMP_FLAGS_START + 0x1B)
+#define FLAG_TEMP_1C (TEMP_FLAGS_START + 0x1C)
+#define FLAG_TEMP_1D (TEMP_FLAGS_START + 0x1D)
+#define FLAG_TEMP_1E (TEMP_FLAGS_START + 0x1E)
+#define FLAG_TEMP_1F (TEMP_FLAGS_START + 0x1F)
+#define TEMP_FLAGS_END FLAG_TEMP_1F
#define FLAG_UNUSED_0x020 0x20 // Unused Flag
#define FLAG_UNUSED_0x021 0x21 // Unused Flag
@@ -87,7 +91,7 @@
#define FLAG_UNUSED_0x04F 0x4F // Unused Flag
// Scripts
-#define FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT 0x50
+#define FLAG_HIDE_RAYQUAZA_SKY_TOWER_SUMMIT 0x50
#define FLAG_SET_WALL_CLOCK 0x51
#define FLAG_RESCUED_BIRCH 0x52
#define FLAG_LEGENDARIES_IN_SOOTOPOLIS 0x53
@@ -95,7 +99,7 @@
#define FLAG_UNUSED_0x054 0x54 // Unused Flag
#define FLAG_UNUSED_0x055 0x55 // Unused Flag
-#define FLAG_LINK_CONTEST_POKE_BALL 0x56
+#define FLAG_HIDE_CONTEST_POKE_BALL 0x56 // Always set after new game, object it hides is added directly
#define FLAG_MET_RIVAL_MOM 0x57
#define FLAG_BIRCH_AIDE_MET 0x58
#define FLAG_DECLINED_BIKE 0x59
@@ -109,23 +113,23 @@
#define FLAG_MET_TEAM_AQUA_HARBOR 0x61
#define FLAG_TV_EXPLAINED 0x62
#define FLAG_MAUVILLE_GYM_BARRIERS_STATE 0x63
-#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64
-#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65
-#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66
-#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67
+#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64 // Leftover from the RS version of Mossdeep Gym, functionally unused
+#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65 //
+#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66 //
+#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67 //
#define FLAG_UNUSED_0x068 0x68 // Unused Flag
#define FLAG_OCEANIC_MUSEUM_MET_REPORTER 0x69
#define FLAG_RECEIVED_HM04 0x6A
#define FLAG_RECEIVED_HM06 0x6B
-#define FLAG_FLANNERY_GIVES_BADGE_INFO 0x6C
+#define FLAG_WHITEOUT_TO_LAVARIDGE 0x6C // Set after defeating Flannery, so the player cant white out from poison before receiving Go Goggles
#define FLAG_RECEIVED_HM05 0x6D
#define FLAG_RECEIVED_HM02 0x6E
#define FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT 0x6F
#define FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE 0x70
#define FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE 0x71 // Unused Flag. Used in R/S to indicate whether player defeated or caught Groudon/Kyogre in Cave of Origin.
-#define FLAG_SCOTT_CALL_NATIONAL_DEX 0x72 // Used in order to activate a phone call from Scott, inviting the player to the SS Tidal.
+#define FLAG_SCOTT_CALL_BATTLE_FRONTIER 0x72 // Used in order to activate a phone call from Scott, inviting the player to the SS Tidal.
#define FLAG_RECEIVED_METEORITE 0x73
#define FLAG_ADVENTURE_STARTED 0x74 // RECEIVED Pokédex.
#define FLAG_DEFEATED_MAGMA_SPACE_CENTER 0x75 // Set when Team Magma is defeated at Mossdeep's Space Center.
@@ -146,12 +150,12 @@
#define FLAG_DEFEATED_RIVAL_ROUTE103 0x82
#define FLAG_RECEIVED_DOLL_LANETTE 0x83
#define FLAG_RECEIVED_POTION_OLDALE 0x84
-#define FLAG_MOM_SAYS_GOODBYE 0x85
+#define FLAG_RECEIVED_AMULET_COIN 0x85
#define FLAG_PENDING_DAYCARE_EGG 0x86
#define FLAG_THANKED_FOR_PLAYING_WITH_WALLY 0x87
#define FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL 0x88 // Set after defeating Wally outside Mauville Gym. Will activate a call later to register Wally.
#define FLAG_RECEIVED_HM01 0x89
-#define FLAG_REGISTER_WINONA_POKENAV 0x8A // Set after obtaining registering Winona, and cleared after Scott's call.
+#define FLAG_SCOTT_CALL_FORTREE_GYM 0x8A // Triggers call from Scott after defeating Winona
#define FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY 0x8B
#define FLAG_RECEIVED_6_SODA_POP 0x8C
#define FLAG_DEFEATED_SEASHORE_HOUSE 0x8D
@@ -163,9 +167,7 @@
#define FLAG_MR_BRINEY_SAILING_INTRO 0x93
#define FLAG_DOCK_REJECTED_DEVON_GOODS 0x94
#define FLAG_DELIVERED_DEVON_GOODS 0x95
-
-#define FLAG_UNUSED_0x096 0x96 // Unused Flag
-
+#define FLAG_RECEIVED_CONTEST_PASS 0x96 // Unused, leftover from R/S
#define FLAG_RECEIVED_CASTFORM 0x97
#define FLAG_RECEIVED_SUPER_ROD 0x98
#define FLAG_RUSTBORO_NPC_TRADE_COMPLETED 0x99
@@ -209,11 +211,11 @@
#define FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F 0xBF
#define FLAG_RECEIVED_SUN_STONE_MOSSDEEP 0xC0
#define FLAG_WALLY_SPEECH 0xC1
-#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1 0xC2
-#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2 0xC3
-#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3 0xC4
-#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4 0xC5
-#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5 0xC6
+#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1 0xC2 // Leftover from the RS version of Puzzle Room 7, functionally unused
+#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2 0xC3 //
+#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3 0xC4 //
+#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4 0xC5 //
+#define FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5 0xC6 //
#define FLAG_RUSTURF_TUNNEL_OPENED 0xC7
#define FLAG_RECEIVED_RED_SCARF 0xC8
#define FLAG_RECEIVED_BLUE_SCARF 0xC9
@@ -263,7 +265,7 @@
#define FLAG_USED_ROOM_2_KEY 0xF1
#define FLAG_USED_ROOM_4_KEY 0xF2
#define FLAG_USED_ROOM_6_KEY 0xF3
-#define FLAG_MET_PROF_COSMO 0xF4
+#define FLAG_MET_PROF_COZMO 0xF4
#define FLAG_RECEIVED_WAILMER_DOLL 0xF5
#define FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104 0xF6
#define FLAG_DEFEATED_SS_TIDAL_TRAINERS 0xF7
@@ -289,7 +291,7 @@
#define FLAG_RECEIVED_REVIVED_FOSSIL_MON 0x10B
#define FLAG_SECRET_BASE_REGISTRY_ENABLED 0x10C
#define FLAG_RECEIVED_TM46 0x10D
-#define FLAG_CONTEST_SKETCH_CREATED 0x10E
+#define FLAG_CONTEST_SKETCH_CREATED 0x10E // Set but never read
#define FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE 0x10F
#define FLAG_RECEIVED_EXP_SHARE 0x110
#define FLAG_POKERUS_EXPLAINED 0x111
@@ -332,10 +334,10 @@
#define FLAG_MET_SCOTT_RUSTBORO 0x136
#define FLAG_WALLACE_GOES_TO_SKY_PILLAR 0x137 // Set after speaking to Wallace within the Cave of Origin.
#define FLAG_RECEIVED_HM07 0x138
-#define FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS 0x139 // Beat Magma Grunt blocking Magma Hideout entrance.
-#define FLAG_RECEIVED_AURORA_TICKET 0x13A // RECEIVED Aurora Ticket in Mystery Gift
-#define FLAG_RECEIVED_MYSTIC_TICKET 0x13B // RECEIVED Mystic Ticket in Mystery Gift
-#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C // RECEIVED Old Sea Map in Mystery Gift
+#define FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS 0x139
+#define FLAG_RECEIVED_AURORA_TICKET 0x13A
+#define FLAG_RECEIVED_MYSTIC_TICKET 0x13B
+#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C
#define FLAG_UNUSED_MYSTERY_GIFT_0x13D 0x13D
#define FLAG_UNUSED_MYSTERY_GIFT_0x13E 0x13E
#define FLAG_UNUSED_MYSTERY_GIFT_0x13F 0x13F
@@ -355,19 +357,19 @@
#define FLAG_UNUSED_MYSTERY_GIFT_0x14D 0x14D
#define FLAG_MIRAGE_TOWER_VISIBLE 0x14E
-#define FLAG_CHOSE_CLAW_FOSSIL 0x14F // Player chose Claw Fossil
-#define FLAG_CHOSE_ROOT_FOSSIL 0x150 // Player chose Root Fossil
+#define FLAG_CHOSE_ROOT_FOSSIL 0x14F
+#define FLAG_CHOSE_CLAW_FOSSIL 0x150
#define FLAG_RECEIVED_POWDER_JAR 0x151
#define FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER 0x152
#define FLAG_MET_BATTLE_FRONTIER_BREEDER 0x153
#define FLAG_MET_BATTLE_FRONTIER_MANIAC 0x154
-#define FLAG_ENTERED_LINK_CONTEST 0x155
+#define FLAG_ENTERED_CONTEST 0x155
#define FLAG_MET_SLATEPORT_FANCLUB_CHAIRMAN 0x156
-#define FLAG_MET_BATTLE_FRONTIER_BETTOR 0x157
+#define FLAG_MET_BATTLE_FRONTIER_GAMBLER 0x157
#define FLAG_ENABLE_MR_STONE_POKENAV 0x158
-#define FLAG_OLDALE_NURSE_MENTIONS_GOLD_CARD 0x159
+#define FLAG_NURSE_MENTIONS_GOLD_CARD 0x159
#define FLAG_MET_FRONTIER_BEAUTY_MOVE_TUTOR 0x15A
#define FLAG_MET_FRONTIER_SWIMMER_MOVE_TUTOR 0x15B
@@ -493,7 +495,7 @@
#define FLAG_MET_SCOTT_IN_EVERGRANDE 0x1CF
#define FLAG_MET_SCOTT_ON_SS_TIDAL 0x1D0
#define FLAG_SCOTT_GIVES_BATTLE_POINTS 0x1D1
-#define FLAG_RECEIVED_STARF_BERRY_FROM_SCOTT 0x1D2
+#define FLAG_COLLECTED_ALL_GOLD_SYMBOLS 0x1D2
#define FLAG_ENABLE_ROXANNE_MATCH_CALL 0x1D3
#define FLAG_ENABLE_BRAWLY_MATCH_CALL 0x1D4
#define FLAG_ENABLE_WATTSON_MATCH_CALL 0x1D5
@@ -533,8 +535,6 @@
#define FLAG_MYSTERY_EVENT_14 0x1F2
#define FLAG_MYSTERY_EVENT_15 0x1F3
-#define FLAG_TRICK_HOUSE_END_ROOM 0x1F5 // Trick House End Room Flag
-
// Hidden Items -- sorted by location
#define FLAG_HIDDEN_ITEMS_START 0x1F4
#define FLAG_HIDDEN_ITEM_TRICK_HOUSE_NUGGET (FLAG_HIDDEN_ITEMS_START + 0x01)
@@ -650,6 +650,95 @@
#define FLAG_HIDDEN_ITEM_ROUTE_128_HEART_SCALE_2 (FLAG_HIDDEN_ITEMS_START + 0x5D)
#define FLAG_HIDDEN_ITEM_ROUTE_128_HEART_SCALE_3 (FLAG_HIDDEN_ITEMS_START + 0x5E)
+#define FLAG_UNUSED_0x264 0x264 // Unused Flag
+#define FLAG_UNUSED_0x265 0x265 // Unused Flag
+#define FLAG_UNUSED_0x266 0x266 // Unused Flag
+#define FLAG_UNUSED_0x267 0x267 // Unused Flag
+#define FLAG_UNUSED_0x268 0x268 // Unused Flag
+#define FLAG_UNUSED_0x269 0x269 // Unused Flag
+#define FLAG_UNUSED_0x26A 0x26A // Unused Flag
+#define FLAG_UNUSED_0x26B 0x26B // Unused Flag
+#define FLAG_UNUSED_0x26C 0x26C // Unused Flag
+#define FLAG_UNUSED_0x26D 0x26D // Unused Flag
+#define FLAG_UNUSED_0x26E 0x26E // Unused Flag
+#define FLAG_UNUSED_0x26F 0x26F // Unused Flag
+#define FLAG_UNUSED_0x270 0x270 // Unused Flag
+#define FLAG_UNUSED_0x271 0x271 // Unused Flag
+#define FLAG_UNUSED_0x272 0x272 // Unused Flag
+#define FLAG_UNUSED_0x273 0x273 // Unused Flag
+#define FLAG_UNUSED_0x274 0x274 // Unused Flag
+#define FLAG_UNUSED_0x275 0x275 // Unused Flag
+#define FLAG_UNUSED_0x276 0x276 // Unused Flag
+#define FLAG_UNUSED_0x277 0x277 // Unused Flag
+#define FLAG_UNUSED_0x278 0x278 // Unused Flag
+#define FLAG_UNUSED_0x279 0x279 // Unused Flag
+#define FLAG_UNUSED_0x27A 0x27A // Unused Flag
+#define FLAG_UNUSED_0x27B 0x27B // Unused Flag
+#define FLAG_UNUSED_0x27C 0x27C // Unused Flag
+#define FLAG_UNUSED_0x27D 0x27D // Unused Flag
+#define FLAG_UNUSED_0x27E 0x27E // Unused Flag
+#define FLAG_UNUSED_0x27F 0x27F // Unused Flag
+#define FLAG_UNUSED_0x280 0x280 // Unused Flag
+#define FLAG_UNUSED_0x281 0x281 // Unused Flag
+#define FLAG_UNUSED_0x282 0x282 // Unused Flag
+#define FLAG_UNUSED_0x283 0x283 // Unused Flag
+#define FLAG_UNUSED_0x284 0x284 // Unused Flag
+#define FLAG_UNUSED_0x285 0x285 // Unused Flag
+#define FLAG_UNUSED_0x286 0x286 // Unused Flag
+#define FLAG_UNUSED_0x287 0x287 // Unused Flag
+#define FLAG_UNUSED_0x288 0x288 // Unused Flag
+#define FLAG_UNUSED_0x289 0x289 // Unused Flag
+#define FLAG_UNUSED_0x28A 0x28A // Unused Flag
+#define FLAG_UNUSED_0x28B 0x28B // Unused Flag
+#define FLAG_UNUSED_0x28C 0x28C // Unused Flag
+#define FLAG_UNUSED_0x28D 0x28D // Unused Flag
+#define FLAG_UNUSED_0x28E 0x28E // Unused Flag
+#define FLAG_UNUSED_0x28F 0x28F // Unused Flag
+#define FLAG_UNUSED_0x290 0x290 // Unused Flag
+#define FLAG_UNUSED_0x291 0x291 // Unused Flag
+#define FLAG_UNUSED_0x292 0x292 // Unused Flag
+#define FLAG_UNUSED_0x293 0x293 // Unused Flag
+#define FLAG_UNUSED_0x294 0x294 // Unused Flag
+#define FLAG_UNUSED_0x295 0x295 // Unused Flag
+#define FLAG_UNUSED_0x296 0x296 // Unused Flag
+#define FLAG_UNUSED_0x297 0x297 // Unused Flag
+#define FLAG_UNUSED_0x298 0x298 // Unused Flag
+#define FLAG_UNUSED_0x299 0x299 // Unused Flag
+#define FLAG_UNUSED_0x29A 0x29A // Unused Flag
+#define FLAG_UNUSED_0x29B 0x29B // Unused Flag
+#define FLAG_UNUSED_0x29C 0x29C // Unused Flag
+#define FLAG_UNUSED_0x29D 0x29D // Unused Flag
+#define FLAG_UNUSED_0x29E 0x29E // Unused Flag
+#define FLAG_UNUSED_0x29F 0x29F // Unused Flag
+#define FLAG_UNUSED_0x2A0 0x2A0 // Unused Flag
+#define FLAG_UNUSED_0x2A1 0x2A1 // Unused Flag
+#define FLAG_UNUSED_0x2A2 0x2A2 // Unused Flag
+#define FLAG_UNUSED_0x2A3 0x2A3 // Unused Flag
+#define FLAG_UNUSED_0x2A4 0x2A4 // Unused Flag
+#define FLAG_UNUSED_0x2A5 0x2A5 // Unused Flag
+#define FLAG_UNUSED_0x2A6 0x2A6 // Unused Flag
+#define FLAG_UNUSED_0x2A7 0x2A7 // Unused Flag
+#define FLAG_UNUSED_0x2A8 0x2A8 // Unused Flag
+#define FLAG_UNUSED_0x2A9 0x2A9 // Unused Flag
+#define FLAG_UNUSED_0x2AA 0x2AA // Unused Flag
+#define FLAG_UNUSED_0x2AB 0x2AB // Unused Flag
+#define FLAG_UNUSED_0x2AC 0x2AC // Unused Flag
+#define FLAG_UNUSED_0x2AD 0x2AD // Unused Flag
+#define FLAG_UNUSED_0x2AE 0x2AE // Unused Flag
+#define FLAG_UNUSED_0x2AF 0x2AF // Unused Flag
+#define FLAG_UNUSED_0x2B0 0x2B0 // Unused Flag
+#define FLAG_UNUSED_0x2B1 0x2B1 // Unused Flag
+#define FLAG_UNUSED_0x2B2 0x2B2 // Unused Flag
+#define FLAG_UNUSED_0x2B3 0x2B3 // Unused Flag
+#define FLAG_UNUSED_0x2B4 0x2B4 // Unused Flag
+#define FLAG_UNUSED_0x2B5 0x2B5 // Unused Flag
+#define FLAG_UNUSED_0x2B6 0x2B6 // Unused Flag
+#define FLAG_UNUSED_0x2B7 0x2B7 // Unused Flag
+#define FLAG_UNUSED_0x2B8 0x2B8 // Unused Flag
+#define FLAG_UNUSED_0x2B9 0x2B9 // Unused Flag
+#define FLAG_UNUSED_0x2BA 0x2BA // Unused Flag
+#define FLAG_UNUSED_0x2BB 0x2BB // Unused Flag
+
// Event Flags
#define FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG 0x2BC
#define FLAG_HIDE_APPRENTICE 0x2BD
@@ -690,18 +779,18 @@
#define FLAG_HIDE_PLAYERS_HOUSE_DAD 0x2DE
#define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING 0x2DF
#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING 0x2E0
-#define FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_INVISIBLE_NINJA_BOY 0x2E1
+#define FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_MAGMA_NOTE 0x2E1
#define FLAG_HIDE_ROUTE_104_MR_BRINEY 0x2E2
#define FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY 0x2E3
#define FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN 0x2E4
-#define FLAG_HIDE_ROUTE_108_MR_BRINEY 0x2E5
+#define FLAG_HIDE_ROUTE_109_MR_BRINEY 0x2E5
#define FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT 0x2E6
#define FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN 0x2E7
#define FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT 0x2E8
#define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN 0x2E9
-#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN 0x2EA
+#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY 0x2EA
#define FLAG_HIDE_SAFARI_ZONE_SOUTH_EAST_EXPANSION 0x2EB
-#define FLAG_HIDE_LILYCOVE_HARBOR_EON_TICKET_TAKER 0x2EC
+#define FLAG_HIDE_LILYCOVE_HARBOR_EVENT_TICKET_TAKER 0x2EC
#define FLAG_HIDE_SLATEPORT_CITY_SCOTT 0x2ED
#define FLAG_HIDE_ROUTE_101_ZIGZAGOON 0x2EE
#define FLAG_HIDE_VICTORY_ROAD_EXIT_WALLY 0x2EF
@@ -720,7 +809,7 @@
#define FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE 0x2FC
#define FLAG_HIDE_MAUVILLE_CITY_SCOTT 0x2FD
#define FLAG_HIDE_VERDANTURF_TOWN_SCOTT 0x2FE
-#define FLAG_HIDE_FALLORBOR_TOWN_BATTLE_TENT_SCOTT 0x2FF
+#define FLAG_HIDE_FALLARBOR_TOWN_BATTLE_TENT_SCOTT 0x2FF
#define FLAG_HIDE_ROUTE_111_VICTOR_WINSTRATE 0x300
#define FLAG_HIDE_ROUTE_111_VICTORIA_WINSTRATE 0x301
#define FLAG_HIDE_ROUTE_111_VIVI_WINSTRATE 0x302
@@ -760,14 +849,14 @@
#define FLAG_HIDE_MAUVILLE_CITY_WALLY 0x324
#define FLAG_HIDE_MAUVILLE_CITY_WALLYS_UNCLE 0x325
#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY 0x326
-#define FLAG_HIDE_RUSTURF_TUNNEL_LOVER_MAN 0x327
-#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_LOVER_MAN 0x328
+#define FLAG_HIDE_RUSTURF_TUNNEL_WANDAS_BOYFRIEND 0x327
+#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WANDAS_BOYFRIEND 0x328
#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLYS_UNCLE 0x329
#define FLAG_HIDE_SS_TIDAL_CORRIDOR_SCOTT 0x32A
#define FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_POKEBALL_CYNDAQUIL 0x32B
#define FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_POKEBALL_TOTODILE 0x32C
#define FLAG_HIDE_ROUTE_116_DROPPED_GLASSES_MAN 0x32D
-#define FLAG_HIDE_RUSBORO_CITY_RIVAL 0x32E
+#define FLAG_HIDE_RUSTBORO_CITY_RIVAL 0x32E
#define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_SWABLU_DOLL 0x32F
#define FLAG_HIDE_SOOTOPOLIS_CITY_WALLACE 0x330
#define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL 0x331
@@ -778,16 +867,14 @@
#define FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE 0x336
#define FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA 0x337
#define FLAG_HIDE_PETALBURG_GYM_WALLYS_UNCLE 0x338
-
-#define FLAG_UNUSED_0x339 0x339 // Unused Flag
-
+#define FLAG_HIDE_LEGEND_MON_CAVE_OF_ORIGIN 0x339 // Unused, leftover from R/S
#define FLAG_HIDE_SOOTOPOLIS_CITY_ARCHIE 0x33A
#define FLAG_HIDE_SOOTOPOLIS_CITY_MAXIE 0x33B
#define FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_ARCHIE 0x33C
#define FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAXIE 0x33D
#define FLAG_HIDE_PETALBURG_CITY_WALLYS_UNCLE 0x33E
#define FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAGMA_GRUNTS 0x33F
-#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_ONLOOKERS 0x340
+#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER 0x340
#define FLAG_HIDE_GRANITE_CAVE_STEVEN 0x341
#define FLAG_HIDE_ROUTE_128_STEVEN 0x342
#define FLAG_HIDE_SLATEPORT_CITY_GABBY_AND_TY 0x343
@@ -828,13 +915,13 @@
#define FLAG_HIDE_LANETTES_HOUSE_LANETTE 0x366
#define FLAG_HIDE_FALLORBOR_POKEMON_CENTER_LANETTE 0x367
#define FLAG_HIDE_TRICK_HOUSE_ENTRANCE_MAN 0x368
-#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_POKEBLOCK_EXPERT 0x369
+#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT 0x369
#define FLAG_HIDE_DESERT_UNDERPASS_FOSSIL 0x36A
#define FLAG_HIDE_ROUTE_111_PLAYER_DESCENT 0x36B
#define FLAG_HIDE_ROUTE_111_DESERT_FOSSIL 0x36C
#define FLAG_HIDE_MT_CHIMNEY_TRAINERS 0x36D
#define FLAG_HIDE_RUSTURF_TUNNEL_AQUA_GRUNT 0x36E
-#define FLAG_HIDE_RUSTURF_TUNNEL_OLD_MAN 0x36F
+#define FLAG_HIDE_RUSTURF_TUNNEL_BRINEY 0x36F
#define FLAG_HIDE_RUSTURF_TUNNEL_PEEKO 0x370
#define FLAG_HIDE_BRINEYS_HOUSE_PEEKO 0x371
#define FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA 0x372
@@ -849,7 +936,7 @@
#define FLAG_HIDE_ROUTE_116_MR_BRINEY 0x37B
#define FLAG_HIDE_WEATHER_INSTITUTE_1F_WORKERS 0x37C
#define FLAG_HIDE_WEATHER_INSTITUTE_2F_WORKERS 0x37D
-#define FLAG_HIDE_ROUTE_116_TUNNELER 0x37E
+#define FLAG_HIDE_ROUTE_116_WANDAS_BOYFRIEND 0x37E
#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_CONTEST_ATTENDANT_2 0x37F
#define FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380 0x380
#define FLAG_HIDE_ROUTE_101_BIRCH 0x381
@@ -883,9 +970,9 @@
#define FLAG_HIDE_LILCOVE_MOTEL_GAME_DESIGNERS 0x39D
#define FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA 0x39E
#define FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA 0x39F
-#define FLAG_HIDE_FALLARBOR_HOUSE_1_PROF_COZMO 0x3A0
-#define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_1 0x3A1
-#define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_2 0x3A2
+#define FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO 0x3A0
+#define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL 0x3A1
+#define FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_ON_BIKE 0x3A2
#define FLAG_HIDE_RUSTURF_TUNNEL_ROCK_1 0x3A3
#define FLAG_HIDE_RUSTURF_TUNNEL_ROCK_2 0x3A4
#define FLAG_HIDE_FORTREE_CITY_HOUSE_4_WINGULL 0x3A5
@@ -925,7 +1012,7 @@
#define FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN 0x3C7
#define FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_BELDUM_POKEBALL 0x3C8
#define FLAG_HIDE_FORTREE_CITY_KECLEON 0x3C9
-#define FLAG_HIDE_ROUTE_120_KECLEON_1 0x3CA
+#define FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_INVISIBLE 0x3CA
#define FLAG_HIDE_LILYCOVE_CITY_RIVAL 0x3CB
#define FLAG_HIDE_ROUTE_120_STEVEN 0x3CC
#define FLAG_HIDE_SOOTOPOLIS_CITY_STEVEN 0x3CD
@@ -936,19 +1023,19 @@
#define FLAG_HIDE_AQUA_HIDEOUT_B1F_ELECTRODE_2 0x3D2
#define FLAG_HIDE_OLDALE_TOWN_RIVAL 0x3D3
#define FLAG_HIDE_UNDERWATER_SEA_FLOOR_CAVERN_STOLEN_SUBMARINE 0x3D4
-#define FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE 0x3D5
-#define FLAG_HIDE_ROUTE_120_KECLEON_2 0x3D6
-#define FLAG_HIDE_RUSTURF_TUNNEL_LOVER_WOMAN 0x3D7
-#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_LOVER_WOMAN 0x3D8
-#define FLAG_HIDE_ROUTE_120_KECLEON_3 0x3D9
-#define FLAG_HIDE_ROUTE_120_KECLEON_4 0x3DA
-#define FLAG_HIDE_ROUTE_120_KECLEON_5 0x3DB
-#define FLAG_HIDE_ROUTE_120_KECLEON_6 0x3DC
+#define FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_VISIBLE 0x3D5
+#define FLAG_HIDE_ROUTE_120_KECLEON_1 0x3D6
+#define FLAG_HIDE_RUSTURF_TUNNEL_WANDA 0x3D7
+#define FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WANDA 0x3D8
+#define FLAG_HIDE_ROUTE_120_KECLEON_2 0x3D9
+#define FLAG_HIDE_ROUTE_120_KECLEON_3 0x3DA
+#define FLAG_HIDE_ROUTE_120_KECLEON_4 0x3DB
+#define FLAG_HIDE_ROUTE_120_KECLEON_5 0x3DC
#define FLAG_HIDE_ROUTE_119_KECLEON_1 0x3DD
#define FLAG_HIDE_ROUTE_119_KECLEON_2 0x3DE
#define FLAG_HIDE_ROUTE_101_BOY 0x3DF
#define FLAG_HIDE_WEATHER_INSTITUTE_2F_AQUA_GRUNT_M 0x3E0
-#define FLAG_HIDE_LILYCOVE_POKEMON_CENTER_LADY 0x3E1
+#define FLAG_HIDE_LILYCOVE_POKEMON_CENTER_CONTEST_LADY_MON 0x3E1
#define FLAG_HIDE_MT_CHIMNEY_LAVA_COOKIE_LADY 0x3E2
#define FLAG_HIDE_PETALBURG_CITY_SCOTT 0x3E3
#define FLAG_HIDE_SOOTOPOLIS_CITY_RAYQUAZA 0x3E4
@@ -1255,13 +1342,17 @@
#define FLAG_UNUSED_0x4FF 0x4FF // Unused Flag
-#define FLAG_TRAINER_FLAG_START 0x500
-#define TRAINERS_FLAG_NO 0x356
+// Trainer Flags
+// Trainer flags occupy 0x500 - 0x85F, the last 9 of which are unused
+// See constants/opponents.h. The values there + FLAG_TRAINER_FLAG_START are the flag IDs
-#define SYSTEM_FLAGS (FLAG_TRAINER_FLAG_START + TRAINERS_FLAG_NO + 0xA) // 0x860
+#define TRAINER_FLAGS_START 0x500
+#define TRAINER_FLAGS_END (TRAINER_FLAGS_START + MAX_TRAINERS_COUNT - 1) // 0x85F
// System Flags
+#define SYSTEM_FLAGS (TRAINER_FLAGS_END + 1) // 0x860
+
#define FLAG_SYS_POKEMON_GET (SYSTEM_FLAGS + 0) // FLAG_0x860
#define FLAG_SYS_POKEDEX_GET (SYSTEM_FLAGS + 1)
#define FLAG_SYS_POKENAV_GET (SYSTEM_FLAGS + 2)
@@ -1400,7 +1491,7 @@
#define FLAG_ENABLE_SHIP_BIRTH_ISLAND (SYSTEM_FLAGS + 0x75)
#define FLAG_ENABLE_SHIP_FARAWAY_ISLAND (SYSTEM_FLAGS + 0x76)
-#define FLAG_SYS_STORAGE_UNKNOWN_FLAG (SYSTEM_FLAGS + 0x77)
+#define FLAG_SHOWN_BOX_WAS_FULL_MESSAGE (SYSTEM_FLAGS + 0x77)
#define FLAG_ARRIVED_ON_FARAWAY_ISLAND (SYSTEM_FLAGS + 0x78)
#define FLAG_ARRIVED_AT_MARINE_CAVE_EMERGE_SPOT (SYSTEM_FLAGS + 0x79)
@@ -1481,77 +1572,82 @@
#define FLAG_UNUSED_0x91F (SYSTEM_FLAGS + 0xBF) // Unused Flag
// Daily Flags
-#define FLAG_DAILY_0x920 (SYSTEM_FLAGS + 0xC0)
-#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (SYSTEM_FLAGS + 0xC1)
-#define FLAG_DAILY_SECRET_BASE (SYSTEM_FLAGS + 0xC2)
-#define FLAG_DAILY_0x923 (SYSTEM_FLAGS + 0xC3)
-#define FLAG_DAILY_0x924 (SYSTEM_FLAGS + 0xC4)
-#define FLAG_DAILY_0x925 (SYSTEM_FLAGS + 0xC5)
-#define FLAG_DAILY_0x926 (SYSTEM_FLAGS + 0xC6)
-#define FLAG_DAILY_0x927 (SYSTEM_FLAGS + 0xC7)
-#define FLAG_DAILY_0x928 (SYSTEM_FLAGS + 0xC8)
-#define FLAG_DAILY_0x929 (SYSTEM_FLAGS + 0xC9)
-#define FLAG_DAILY_PICKED_LOTO_TICKET (SYSTEM_FLAGS + 0xCA)
-#define FLAG_DAILY_ROUTE_114_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCB)
-#define FLAG_DAILY_ROUTE_111_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCC)
-#define FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCD)
-#define FLAG_DAILY_ROUTE_120_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCE)
-#define FLAG_DAILY_LILYCOVE_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCF)
-#define FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY (SYSTEM_FLAGS + 0xD0)
-#define FLAG_DAILY_BERRY_MASTERS_WIFE (SYSTEM_FLAGS + 0xD1)
-#define FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY (SYSTEM_FLAGS + 0xD2)
-#define FLAG_DAILY_0x933 (SYSTEM_FLAGS + 0xD3)
-#define FLAG_DAILY_APPRENTICE_LEAVES (SYSTEM_FLAGS + 0xD4)
-#define FLAG_0x935 (SYSTEM_FLAGS + 0xD5)
-#define FLAG_0x936 (SYSTEM_FLAGS + 0xD6)
-#define FLAG_0x937 (SYSTEM_FLAGS + 0xD7)
-#define FLAG_0x938 (SYSTEM_FLAGS + 0xD8)
-#define FLAG_0x939 (SYSTEM_FLAGS + 0xD9)
-#define FLAG_0x93A (SYSTEM_FLAGS + 0xDA)
-#define FLAG_0x93B (SYSTEM_FLAGS + 0xDB)
-#define FLAG_0x93C (SYSTEM_FLAGS + 0xDC)
-#define FLAG_0x93D (SYSTEM_FLAGS + 0xDD)
-#define FLAG_0x93E (SYSTEM_FLAGS + 0xDE)
-#define FLAG_0x93F (SYSTEM_FLAGS + 0xDF)
-#define FLAG_0x940 (SYSTEM_FLAGS + 0xE0)
-#define FLAG_0x941 (SYSTEM_FLAGS + 0xE1)
-#define FLAG_0x942 (SYSTEM_FLAGS + 0xE2)
-#define FLAG_0x943 (SYSTEM_FLAGS + 0xE3)
-#define FLAG_0x944 (SYSTEM_FLAGS + 0xE4)
-#define FLAG_0x945 (SYSTEM_FLAGS + 0xE5)
-#define FLAG_0x946 (SYSTEM_FLAGS + 0xE6)
-#define FLAG_0x947 (SYSTEM_FLAGS + 0xE7)
-#define FLAG_0x948 (SYSTEM_FLAGS + 0xE8)
-#define FLAG_0x949 (SYSTEM_FLAGS + 0xE9)
-#define FLAG_0x94A (SYSTEM_FLAGS + 0xEA)
-#define FLAG_0x94B (SYSTEM_FLAGS + 0xEB)
-#define FLAG_0x94C (SYSTEM_FLAGS + 0xEC)
-#define FLAG_0x94D (SYSTEM_FLAGS + 0xED)
-#define FLAG_0x94E (SYSTEM_FLAGS + 0xEE)
-#define FLAG_0x94F (SYSTEM_FLAGS + 0xEF)
-#define FLAG_0x950 (SYSTEM_FLAGS + 0xF0)
-#define FLAG_0x951 (SYSTEM_FLAGS + 0xF1)
-#define FLAG_0x952 (SYSTEM_FLAGS + 0xF2)
-#define FLAG_0x953 (SYSTEM_FLAGS + 0xF3)
-#define FLAG_0x954 (SYSTEM_FLAGS + 0xF4)
-#define FLAG_0x955 (SYSTEM_FLAGS + 0xF5)
-#define FLAG_0x956 (SYSTEM_FLAGS + 0xF6)
-#define FLAG_0x957 (SYSTEM_FLAGS + 0xF7)
-#define FLAG_0x958 (SYSTEM_FLAGS + 0xF8)
-#define FLAG_0x959 (SYSTEM_FLAGS + 0xF9)
-#define FLAG_0x95A (SYSTEM_FLAGS + 0xFA)
-#define FLAG_0x95B (SYSTEM_FLAGS + 0xFB)
-#define FLAG_0x95C (SYSTEM_FLAGS + 0xFC)
-#define FLAG_0x95D (SYSTEM_FLAGS + 0xFD)
-#define FLAG_0x95E (SYSTEM_FLAGS + 0xFE)
-#define FLAG_0x95F (SYSTEM_FLAGS + 0xFF)
-
-// Special Flags (Unknown)
-#define SPECIAL_FLAGS_START 0x4000
-#define FLAG_HIDE_MAP_NAME_POPUP 0x4000
-#define FLAG_SPECIAL_FLAG_0x4001 0x4001
-#define FLAG_SPECIAL_FLAG_0x4002 0x4002
-#define FLAG_SPECIAL_FLAG_0x4003 0x4003
-#define FLAG_SPECIAL_FLAG_0x4004 0x4004
+#define DAILY_FLAGS_START 0x920
+#define FLAG_UNUSED_0x920 (DAILY_FLAGS_START + 0x0) // Unused Flag
+#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (DAILY_FLAGS_START + 0x1)
+#define FLAG_DAILY_SECRET_BASE (DAILY_FLAGS_START + 0x2)
+#define FLAG_UNUSED_0x923 (DAILY_FLAGS_START + 0x3) // Unused Flag
+#define FLAG_UNUSED_0x924 (DAILY_FLAGS_START + 0x4) // Unused Flag
+#define FLAG_UNUSED_0x925 (DAILY_FLAGS_START + 0x5) // Unused Flag
+#define FLAG_UNUSED_0x926 (DAILY_FLAGS_START + 0x6) // Unused Flag
+#define FLAG_UNUSED_0x927 (DAILY_FLAGS_START + 0x7) // Unused Flag
+#define FLAG_UNUSED_0x928 (DAILY_FLAGS_START + 0x8) // Unused Flag
+#define FLAG_UNUSED_0x929 (DAILY_FLAGS_START + 0x9) // Unused Flag
+#define FLAG_DAILY_PICKED_LOTO_TICKET (DAILY_FLAGS_START + 0xA)
+#define FLAG_DAILY_ROUTE_114_RECEIVED_BERRY (DAILY_FLAGS_START + 0xB)
+#define FLAG_DAILY_ROUTE_111_RECEIVED_BERRY (DAILY_FLAGS_START + 0xC)
+#define FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY (DAILY_FLAGS_START + 0xD)
+#define FLAG_DAILY_ROUTE_120_RECEIVED_BERRY (DAILY_FLAGS_START + 0xE)
+#define FLAG_DAILY_LILYCOVE_RECEIVED_BERRY (DAILY_FLAGS_START + 0xF)
+#define FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY (DAILY_FLAGS_START + 0x10)
+#define FLAG_DAILY_BERRY_MASTERS_WIFE (DAILY_FLAGS_START + 0x11)
+#define FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY (DAILY_FLAGS_START + 0x12)
+#define FLAG_UNUSED_0x933 (DAILY_FLAGS_START + 0x13) // Unused Flag
+#define FLAG_DAILY_APPRENTICE_LEAVES (DAILY_FLAGS_START + 0x14)
+
+#define FLAG_UNUSED_0x935 (DAILY_FLAGS_START + 0x15) // Unused Flag
+#define FLAG_UNUSED_0x936 (DAILY_FLAGS_START + 0x16) // Unused Flag
+#define FLAG_UNUSED_0x937 (DAILY_FLAGS_START + 0x17) // Unused Flag
+#define FLAG_UNUSED_0x938 (DAILY_FLAGS_START + 0x18) // Unused Flag
+#define FLAG_UNUSED_0x939 (DAILY_FLAGS_START + 0x19) // Unused Flag
+#define FLAG_UNUSED_0x93A (DAILY_FLAGS_START + 0x1A) // Unused Flag
+#define FLAG_UNUSED_0x93B (DAILY_FLAGS_START + 0x1B) // Unused Flag
+#define FLAG_UNUSED_0x93C (DAILY_FLAGS_START + 0x1C) // Unused Flag
+#define FLAG_UNUSED_0x93D (DAILY_FLAGS_START + 0x1D) // Unused Flag
+#define FLAG_UNUSED_0x93E (DAILY_FLAGS_START + 0x1E) // Unused Flag
+#define FLAG_UNUSED_0x93F (DAILY_FLAGS_START + 0x1F) // Unused Flag
+#define FLAG_UNUSED_0x940 (DAILY_FLAGS_START + 0x20) // Unused Flag
+#define FLAG_UNUSED_0x941 (DAILY_FLAGS_START + 0x21) // Unused Flag
+#define FLAG_UNUSED_0x942 (DAILY_FLAGS_START + 0x22) // Unused Flag
+#define FLAG_UNUSED_0x943 (DAILY_FLAGS_START + 0x23) // Unused Flag
+#define FLAG_UNUSED_0x944 (DAILY_FLAGS_START + 0x24) // Unused Flag
+#define FLAG_UNUSED_0x945 (DAILY_FLAGS_START + 0x25) // Unused Flag
+#define FLAG_UNUSED_0x946 (DAILY_FLAGS_START + 0x26) // Unused Flag
+#define FLAG_UNUSED_0x947 (DAILY_FLAGS_START + 0x27) // Unused Flag
+#define FLAG_UNUSED_0x948 (DAILY_FLAGS_START + 0x28) // Unused Flag
+#define FLAG_UNUSED_0x949 (DAILY_FLAGS_START + 0x29) // Unused Flag
+#define FLAG_UNUSED_0x94A (DAILY_FLAGS_START + 0x2A) // Unused Flag
+#define FLAG_UNUSED_0x94B (DAILY_FLAGS_START + 0x2B) // Unused Flag
+#define FLAG_UNUSED_0x94C (DAILY_FLAGS_START + 0x2C) // Unused Flag
+#define FLAG_UNUSED_0x94D (DAILY_FLAGS_START + 0x2D) // Unused Flag
+#define FLAG_UNUSED_0x94E (DAILY_FLAGS_START + 0x2E) // Unused Flag
+#define FLAG_UNUSED_0x94F (DAILY_FLAGS_START + 0x2F) // Unused Flag
+#define FLAG_UNUSED_0x950 (DAILY_FLAGS_START + 0x30) // Unused Flag
+#define FLAG_UNUSED_0x951 (DAILY_FLAGS_START + 0x31) // Unused Flag
+#define FLAG_UNUSED_0x952 (DAILY_FLAGS_START + 0x32) // Unused Flag
+#define FLAG_UNUSED_0x953 (DAILY_FLAGS_START + 0x33) // Unused Flag
+#define FLAG_UNUSED_0x954 (DAILY_FLAGS_START + 0x34) // Unused Flag
+#define FLAG_UNUSED_0x955 (DAILY_FLAGS_START + 0x35) // Unused Flag
+#define FLAG_UNUSED_0x956 (DAILY_FLAGS_START + 0x36) // Unused Flag
+#define FLAG_UNUSED_0x957 (DAILY_FLAGS_START + 0x37) // Unused Flag
+#define FLAG_UNUSED_0x958 (DAILY_FLAGS_START + 0x38) // Unused Flag
+#define FLAG_UNUSED_0x959 (DAILY_FLAGS_START + 0x39) // Unused Flag
+#define FLAG_UNUSED_0x95A (DAILY_FLAGS_START + 0x3A) // Unused Flag
+#define FLAG_UNUSED_0x95B (DAILY_FLAGS_START + 0x3B) // Unused Flag
+#define FLAG_UNUSED_0x95C (DAILY_FLAGS_START + 0x3C) // Unused Flag
+#define FLAG_UNUSED_0x95D (DAILY_FLAGS_START + 0x3D) // Unused Flag
+#define FLAG_UNUSED_0x95E (DAILY_FLAGS_START + 0x3E) // Unused Flag
+#define FLAG_UNUSED_0x95F (DAILY_FLAGS_START + 0x3F) // Unused Flag
+#define DAILY_FLAGS_END FLAG_UNUSED_0x95F
+
+// Special Flags (Stored in EWRAM (gSpecialFlags), not in the SaveBlock)
+#define SPECIAL_FLAGS_START 0x4000
+#define FLAG_HIDE_MAP_NAME_POPUP (SPECIAL_FLAGS_START + 0x0)
+#define FLAG_DONT_TRANSITION_MUSIC (SPECIAL_FLAGS_START + 0x1)
+#define FLAG_ENABLE_MULTI_CORRIDOR_DOOR (SPECIAL_FLAGS_START + 0x2)
+#define FLAG_SPECIAL_FLAG_UNUSED_0x4003 (SPECIAL_FLAGS_START + 0x3) // Unused Flag
+#define FLAG_STORING_ITEMS_IN_PYRAMID_BAG (SPECIAL_FLAGS_START + 0x4)
+// FLAG_SPECIAL_FLAG_0x4005 - 0x407F also exist and are unused
+#define SPECIAL_FLAGS_END (SPECIAL_FLAGS_START + 0x7F)
#endif // GUARD_CONSTANTS_FLAGS_H
diff --git a/include/constants/frontier_util.h b/include/constants/frontier_util.h
new file mode 100644
index 000000000..a310dbb2d
--- /dev/null
+++ b/include/constants/frontier_util.h
@@ -0,0 +1,75 @@
+#ifndef GUARD_CONSTANTS_FRONTIER_UTIL_H
+#define GUARD_CONSTANTS_FRONTIER_UTIL_H
+
+#define FRONTIER_BEFORE_TEXT 0
+#define FRONTIER_PLAYER_LOST_TEXT 1
+#define FRONTIER_PLAYER_WON_TEXT 2
+
+// return values for GetFrontierBrainStatus
+#define FRONTIER_BRAIN_NOT_READY 0
+#define FRONTIER_BRAIN_SILVER 1
+#define FRONTIER_BRAIN_GOLD 2
+#define FRONTIER_BRAIN_STREAK 3 // for encountering the brain after getting both symbols
+#define FRONTIER_BRAIN_STREAK_LONG 4 //
+
+#define FRONTIER_UTIL_FUNC_GET_STATUS 0
+#define FRONTIER_UTIL_FUNC_GET_DATA 1
+#define FRONTIER_UTIL_FUNC_SET_DATA 2
+#define FRONTIER_UTIL_FUNC_SET_PARTY_ORDER 3
+#define FRONTIER_UTIL_FUNC_SOFT_RESET 4
+#define FRONTIER_UTIL_FUNC_SET_TRAINERS 5
+#define FRONTIER_UTIL_FUNC_SAVE_PARTY 6
+#define FRONTIER_UTIL_FUNC_RESULTS_WINDOW 7
+#define FRONTIER_UTIL_FUNC_CHECK_AIR_TV_SHOW 8
+#define FRONTIER_UTIL_FUNC_GET_BRAIN_STATUS 9
+#define FRONTIER_UTIL_FUNC_IS_BRAIN 10
+#define FRONTIER_UTIL_FUNC_GIVE_BATTLE_POINTS 11
+#define FRONTIER_UTIL_FUNC_GET_FACILITY_SYMBOLS 12
+#define FRONTIER_UTIL_FUNC_GIVE_FACILITY_SYMBOL 13
+#define FRONTIER_UTIL_FUNC_CHECK_BATTLE_TYPE 14
+#define FRONTIER_UTIL_FUNC_CHECK_INELIGIBLE 15
+#define FRONTIER_UTIL_FUNC_CHECK_VISIT_TRAINER 16
+#define FRONTIER_UTIL_FUNC_INCREMENT_STREAK 17
+#define FRONTIER_UTIL_FUNC_RESTORE_HELD_ITEMS 18
+#define FRONTIER_UTIL_FUNC_SAVE_BATTLE 19
+#define FRONTIER_UTIL_FUNC_BUFFER_TRAINER_NAME 20
+#define FRONTIER_UTIL_FUNC_RESET_SKETCH_MOVES 21
+#define FRONTIER_UTIL_FUNC_SET_BRAIN_OBJECT 22
+
+#define FRONTIER_DATA_CHALLENGE_STATUS 0
+#define FRONTIER_DATA_LVL_MODE 1
+#define FRONTIER_DATA_BATTLE_NUM 2
+#define FRONTIER_DATA_PAUSED 3
+#define FRONTIER_DATA_SELECTED_MON_ORDER 4
+#define FRONTIER_DATA_BATTLE_OUTCOME 5
+#define FRONTIER_DATA_RECORD_DISABLED 6
+#define FRONTIER_DATA_HEARD_BRAIN_SPEECH 7
+
+#define STREAK_TOWER_SINGLES_50 (1 << 0)
+#define STREAK_TOWER_SINGLES_OPEN (1 << 1)
+#define STREAK_DOME_SINGLES_50 (1 << 2)
+#define STREAK_DOME_SINGLES_OPEN (1 << 3)
+#define STREAK_PALACE_SINGLES_50 (1 << 4)
+#define STREAK_PALACE_SINGLES_OPEN (1 << 5)
+#define STREAK_ARENA_50 (1 << 6)
+#define STREAK_ARENA_OPEN (1 << 7)
+#define STREAK_FACTORY_SINGLES_50 (1 << 8)
+#define STREAK_FACTORY_SINGLES_OPEN (1 << 9)
+#define STREAK_PIKE_50 (1 << 10)
+#define STREAK_PIKE_OPEN (1 << 11)
+#define STREAK_PYRAMID_50 (1 << 12)
+#define STREAK_PYRAMID_OPEN (1 << 13)
+#define STREAK_TOWER_DOUBLES_50 (1 << 14)
+#define STREAK_TOWER_DOUBLES_OPEN (1 << 15)
+#define STREAK_TOWER_MULTIS_50 (1 << 16)
+#define STREAK_TOWER_MULTIS_OPEN (1 << 17)
+#define STREAK_TOWER_LINK_MULTIS_50 (1 << 18)
+#define STREAK_TOWER_LINK_MULTIS_OPEN (1 << 19)
+#define STREAK_DOME_DOUBLES_50 (1 << 20)
+#define STREAK_DOME_DOUBLES_OPEN (1 << 21)
+#define STREAK_PALACE_DOUBLES_50 (1 << 22)
+#define STREAK_PALACE_DOUBLES_OPEN (1 << 23)
+#define STREAK_FACTORY_DOUBLES_50 (1 << 24)
+#define STREAK_FACTORY_DOUBLES_OPEN (1 << 25)
+
+#endif // GUARD_CONSTANTS_FRONTIER_UTIL_H
diff --git a/include/constants/global.h b/include/constants/global.h
index a862ecad2..d57307d9c 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -18,12 +18,13 @@
#define VERSION_GAMECUBE 15
#define LANGUAGE_JAPANESE 1
-#define LANGUAGE_ENGLISH 2
-#define LANGUAGE_FRENCH 3
-#define LANGUAGE_ITALIAN 4
-#define LANGUAGE_GERMAN 5
-#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean
-#define LANGUAGE_SPANISH 7
+#define LANGUAGE_ENGLISH 2
+#define LANGUAGE_FRENCH 3
+#define LANGUAGE_ITALIAN 4
+#define LANGUAGE_GERMAN 5
+#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean
+#define LANGUAGE_SPANISH 7
+#define NUM_LANGUAGES 7
#define GAME_VERSION (VERSION_EMERALD)
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
@@ -46,21 +47,42 @@
#define BAG_TMHM_COUNT 64
#define BAG_BERRIES_COUNT 46
#define EVENT_OBJECT_TEMPLATES_COUNT 64
+#define DECOR_MAX_SECRET_BASE 16
+#define DECOR_MAX_PLAYERS_HOUSE 12
+#define APPRENTICE_COUNT 4
+#define APPRENTICE_MAX_QUESTIONS 9
+#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used
#define PYRAMID_BAG_ITEMS_COUNT 10
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
#define TRAINER_ID_LENGTH 4
+#define MAX_MON_MOVES 4
+#define NUM_STATS 6
+
+// party sizes
+#define PARTY_SIZE 6
+#define MULTI_PARTY_SIZE PARTY_SIZE / 2
+#define FRONTIER_PARTY_SIZE 3
+#define FRONTIER_DOUBLES_PARTY_SIZE 4
+#define FRONTIER_MULTI_PARTY_SIZE 2
+#define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE
// string lengths
#define ITEM_NAME_LENGTH 14
#define POKEMON_NAME_LENGTH 10
#define PLAYER_NAME_LENGTH 7
#define MAIL_WORDS_COUNT 9
+#define EASY_CHAT_BATTLE_WORDS_COUNT 6
#define MOVE_NAME_LENGTH 12
#define MALE 0
#define FEMALE 1
+#define GENDER_COUNT 2
+
+#define BARD_SONG_LENGTH 6
+#define NUM_STORYTELLER_TALES 4
+#define NUM_TRADER_ITEMS 4
#define OPTIONS_BUTTON_MODE_NORMAL 0
#define OPTIONS_BUTTON_MODE_LR 1
diff --git a/include/constants/item.h b/include/constants/item.h
new file mode 100644
index 000000000..a5c34418d
--- /dev/null
+++ b/include/constants/item.h
@@ -0,0 +1,20 @@
+#ifndef GUARD_ITEM_CONSTANTS_H
+#define GUARD_ITEM_CONSTANTS_H
+
+// These constants are used in gItems
+#define POCKET_NONE 0
+#define POCKET_ITEMS 1
+#define POCKET_POKE_BALLS 2
+#define POCKET_TM_HM 3
+#define POCKET_BERRIES 4
+#define POCKET_KEY_ITEMS 5
+
+#define ITEMS_POCKET 0
+#define BALLS_POCKET 1
+#define TMHM_POCKET 2
+#define BERRIES_POCKET 3
+#define KEYITEMS_POCKET 4
+#define POCKETS_COUNT 5
+
+
+#endif // GUARD_ITEM_CONSTANTS_H
diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h
index a5bb77035..49fcedc61 100644
--- a/include/constants/item_effects.h
+++ b/include/constants/item_effects.h
@@ -3,7 +3,7 @@
// field 0 masks
#define ITEM0_X_ATTACK 0x0F
-#define ITEM0_HIGH_CRIT 0x30 // For Dire Hit, works the same way as move Focus Energy.
+#define ITEM0_DIRE_HIT 0x30 // Works the same way as the move Focus Energy.
#define ITEM0_SACRED_ASH 0x40
#define ITEM0_INFATUATION 0x80
@@ -23,7 +23,7 @@
#define ITEM3_POISON 0x10
#define ITEM3_SLEEP 0x20
#define ITEM3_LEVEL_UP 0x40
-#define ITEM3_MIST 0x80 // For Guard Specs, works the same way as move Mist.
+#define ITEM3_GUARD_SPEC 0x80 // Works the same way as the move Mist.
#define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP)
diff --git a/include/constants/items.h b/include/constants/items.h
index 3a894f8ff..db3474a72 100644
--- a/include/constants/items.h
+++ b/include/constants/items.h
@@ -465,8 +465,27 @@
#define ITEMS_COUNT 377
#define ITEM_FIELD_ARROW ITEMS_COUNT
-#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
-#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
+#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
+#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
+
+// Range of berries given out by various NPCS
+#define FIRST_BERRY_MASTER_BERRY ITEM_POMEG_BERRY
+#define LAST_BERRY_MASTER_BERRY ITEM_NOMEL_BERRY
+#define FIRST_BERRY_MASTER_WIFE_BERRY ITEM_CHERI_BERRY
+#define LAST_BERRY_MASTER_WIFE_BERRY ITEM_SITRUS_BERRY
+#define FIRST_KIRI_BERRY ITEM_POMEG_BERRY
+#define LAST_KIRI_BERRY ITEM_NOMEL_BERRY
+#define FIRST_ROUTE_114_MAN_BERRY ITEM_RAZZ_BERRY
+#define LAST_ROUTE_114_MAN_BERRY ITEM_PINAP_BERRY
+
+#define NUM_BERRY_MASTER_BERRIES LAST_BERRY_MASTER_BERRY - FIRST_BERRY_MASTER_BERRY + 1
+#define NUM_BERRY_MASTER_BERRIES_SKIPPED FIRST_BERRY_MASTER_BERRY - FIRST_BERRY_INDEX
+#define NUM_BERRY_MASTER_WIFE_BERRIES LAST_BERRY_MASTER_WIFE_BERRY - FIRST_BERRY_MASTER_WIFE_BERRY + 1
+#define NUM_KIRI_BERRIES LAST_KIRI_BERRY - FIRST_KIRI_BERRY + 1
+#define NUM_KIRI_BERRIES_SKIPPED FIRST_KIRI_BERRY - FIRST_BERRY_INDEX
+#define NUM_ROUTE_114_MAN_BERRIES LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1
+#define NUM_ROUTE_114_MAN_BERRIES_SKIPPED FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX
+
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))
#define NUM_TECHNICAL_MACHINES 50
diff --git a/include/constants/layouts.h b/include/constants/layouts.h
index d4819c46a..3e876f499 100755
--- a/include/constants/layouts.h
+++ b/include/constants/layouts.h
@@ -221,22 +221,22 @@
#define LAYOUT_SECRET_BASE_YELLOW_CAVE4 218
#define LAYOUT_SECRET_BASE_TREE4 219
#define LAYOUT_SECRET_BASE_SHRUB4 220
-#define LAYOUT_SINGLE_BATTLE_COLOSSEUM 221
+#define LAYOUT_BATTLE_COLOSSEUM_2P 221
#define LAYOUT_TRADE_CENTER 222
#define LAYOUT_RECORD_CORNER 223
-#define LAYOUT_DOUBLE_BATTLE_COLOSSEUM 224
-#define LAYOUT_LINK_CONTEST_ROOM1 225
+#define LAYOUT_BATTLE_COLOSSEUM_4P 224
+#define LAYOUT_CONTEST_HALL 225
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_29 226
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_30 227
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_31 228
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_32 229
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_33 230
#define LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_34 231
-#define LAYOUT_LINK_CONTEST_ROOM2 232
-#define LAYOUT_LINK_CONTEST_ROOM3 233
-#define LAYOUT_LINK_CONTEST_ROOM4 234
-#define LAYOUT_LINK_CONTEST_ROOM5 235
-#define LAYOUT_LINK_CONTEST_ROOM6 236
+#define LAYOUT_CONTEST_HALL_BEAUTY 232
+#define LAYOUT_CONTEST_HALL_TOUGH 233
+#define LAYOUT_CONTEST_HALL_COOL 234
+#define LAYOUT_CONTEST_HALL_SMART 235
+#define LAYOUT_CONTEST_HALL_CUTE 236
#define LAYOUT_INSIDE_OF_TRUCK 237
#define LAYOUT_SAFARI_ZONE_NORTHWEST 238
#define LAYOUT_SAFARI_ZONE_NORTH 239
@@ -352,16 +352,16 @@
#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY 349
#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR 350
#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM 351
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1 352
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM2 353
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL 352
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL 353
#define LAYOUT_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY 354
#define LAYOUT_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR 355
#define LAYOUT_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM 356
#define LAYOUT_SOOTOPOLIS_CITY_LEGENDS_BATTLE 357
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM3 358
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS 358
#define LAYOUT_UNKNOWN_084693AC 359
#define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY 360
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE 361
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR 361
#define LAYOUT_BATTLE_PYRAMID_SQUARE01 362
#define LAYOUT_BATTLE_PYRAMID_SQUARE02 363
#define LAYOUT_BATTLE_PYRAMID_SQUARE03 364
@@ -390,15 +390,15 @@
#define LAYOUT_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM 387
#define LAYOUT_MIRAGE_TOWER_4F 388
#define LAYOUT_DESERT_UNDERPASS 389
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM 390
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 391
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM 390
+#define LAYOUT_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR 391
#define LAYOUT_ROUTE111_NO_MIRAGE_TOWER 392
#define LAYOUT_UNION_ROOM 393
#define LAYOUT_SAFARI_ZONE_NORTHEAST 394
#define LAYOUT_SAFARI_ZONE_SOUTHEAST 395
#define LAYOUT_BATTLE_FRONTIER_RANKING_HALL 396
#define LAYOUT_BATTLE_FRONTIER_LOUNGE1 397
-#define LAYOUT_BATTLE_FRONTIER_BATTLE_POINT_EXCHANGE_SERVICE_CORNER 398
+#define LAYOUT_BATTLE_FRONTIER_EXCHANGE_SERVICE_CORNER 398
#define LAYOUT_BATTLE_FRONTIER_RECEPTION_GATE 399
#define LAYOUT_ARTISAN_CAVE_B1F 400
#define LAYOUT_ARTISAN_CAVE_1F 401
diff --git a/include/constants/map_groups.h b/include/constants/map_groups.h
index 6a3276b44..17fe7ab53 100755
--- a/include/constants/map_groups.h
+++ b/include/constants/map_groups.h
@@ -98,8 +98,8 @@
#define MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM (3 | (5 << 8))
#define MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F (4 | (5 << 8))
#define MAP_FALLARBOR_TOWN_POKEMON_CENTER_2F (5 | (5 << 8))
-#define MAP_FALLARBOR_TOWN_HOUSE1 (6 | (5 << 8))
-#define MAP_FALLARBOR_TOWN_HOUSE2 (7 | (5 << 8))
+#define MAP_FALLARBOR_TOWN_COZMOS_HOUSE (6 | (5 << 8))
+#define MAP_FALLARBOR_TOWN_MOVE_RELEARNERS_HOUSE (7 | (5 << 8))
// Map Group 6
#define MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY (0 | (6 << 8))
@@ -136,12 +136,12 @@
#define MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY (2 | (9 << 8))
#define MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR (3 | (9 << 8))
#define MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM (4 | (9 << 8))
-#define MAP_SLATEPORT_CITY_HOUSE1 (5 | (9 << 8))
+#define MAP_SLATEPORT_CITY_NAME_RATERS_HOUSE (5 | (9 << 8))
#define MAP_SLATEPORT_CITY_POKEMON_FAN_CLUB (6 | (9 << 8))
#define MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_1F (7 | (9 << 8))
#define MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_2F (8 | (9 << 8))
#define MAP_SLATEPORT_CITY_HARBOR (9 | (9 << 8))
-#define MAP_SLATEPORT_CITY_HOUSE2 (10 | (9 << 8))
+#define MAP_SLATEPORT_CITY_HOUSE (10 | (9 << 8))
#define MAP_SLATEPORT_CITY_POKEMON_CENTER_1F (11 | (9 << 8))
#define MAP_SLATEPORT_CITY_POKEMON_CENTER_2F (12 | (9 << 8))
#define MAP_SLATEPORT_CITY_MART (13 | (9 << 8))
@@ -422,22 +422,22 @@
#define MAP_SECRET_BASE_YELLOW_CAVE4 (21 | (25 << 8))
#define MAP_SECRET_BASE_TREE4 (22 | (25 << 8))
#define MAP_SECRET_BASE_SHRUB4 (23 | (25 << 8))
-#define MAP_SINGLE_BATTLE_COLOSSEUM (24 | (25 << 8))
+#define MAP_BATTLE_COLOSSEUM_2P (24 | (25 << 8))
#define MAP_TRADE_CENTER (25 | (25 << 8))
#define MAP_RECORD_CORNER (26 | (25 << 8))
-#define MAP_DOUBLE_BATTLE_COLOSSEUM (27 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM1 (28 | (25 << 8))
+#define MAP_BATTLE_COLOSSEUM_4P (27 | (25 << 8))
+#define MAP_CONTEST_HALL (28 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_29 (29 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_30 (30 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_31 (31 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_32 (32 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_33 (33 | (25 << 8))
#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_34 (34 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM2 (35 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM3 (36 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM4 (37 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM5 (38 | (25 << 8))
-#define MAP_LINK_CONTEST_ROOM6 (39 | (25 << 8))
+#define MAP_CONTEST_HALL_BEAUTY (35 | (25 << 8))
+#define MAP_CONTEST_HALL_TOUGH (36 | (25 << 8))
+#define MAP_CONTEST_HALL_COOL (37 | (25 << 8))
+#define MAP_CONTEST_HALL_SMART (38 | (25 << 8))
+#define MAP_CONTEST_HALL_CUTE (39 | (25 << 8))
#define MAP_INSIDE_OF_TRUCK (40 | (25 << 8))
#define MAP_SS_TIDAL_CORRIDOR (41 | (25 << 8))
#define MAP_SS_TIDAL_LOWER_DECK (42 | (25 << 8))
@@ -461,95 +461,95 @@
#define MAP_UNION_ROOM (60 | (25 << 8))
// Map Group 26
-#define MAP_SAFARI_ZONE_NORTHWEST (0 | (26 << 8))
-#define MAP_SAFARI_ZONE_NORTH (1 | (26 << 8))
-#define MAP_SAFARI_ZONE_SOUTHWEST (2 | (26 << 8))
-#define MAP_SAFARI_ZONE_SOUTH (3 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_OUTSIDE_WEST (4 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY (5 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR (6 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR (7 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM (8 | (26 << 8))
-#define MAP_SOUTHERN_ISLAND_EXTERIOR (9 | (26 << 8))
-#define MAP_SOUTHERN_ISLAND_INTERIOR (10 | (26 << 8))
-#define MAP_SAFARI_ZONE_REST_HOUSE (11 | (26 << 8))
-#define MAP_SAFARI_ZONE_NORTHEAST (12 | (26 << 8))
-#define MAP_SAFARI_ZONE_SOUTHEAST (13 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_OUTSIDE_EAST (14 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM (15 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 (16 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM2 (17 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY (18 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR (19 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM (20 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM (21 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY (22 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR (23 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM (24 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY (25 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE (26 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP (27 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY (28 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR (29 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM (30 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY (31 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM (32 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM (33 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY (34 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR (35 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM (36 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1 (37 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM2 (38 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM3 (39 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_RANKING_HALL (40 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE1 (41 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_BATTLE_POINT_EXCHANGE_SERVICE_CORNER (42 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE2 (43 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE3 (44 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE4 (45 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_SCOTTS_HOUSE (46 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE5 (47 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE6 (48 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE7 (49 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_RECEPTION_GATE (50 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE8 (51 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_LOUNGE9 (52 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F (53 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_2F (54 | (26 << 8))
-#define MAP_BATTLE_FRONTIER_MART (55 | (26 << 8))
-#define MAP_FARAWAY_ISLAND_ENTRANCE (56 | (26 << 8))
-#define MAP_FARAWAY_ISLAND_INTERIOR (57 | (26 << 8))
-#define MAP_BIRTH_ISLAND_EXTERIOR (58 | (26 << 8))
-#define MAP_BIRTH_ISLAND_HARBOR (59 | (26 << 8))
-#define MAP_TRAINER_HILL_ENTRANCE (60 | (26 << 8))
-#define MAP_TRAINER_HILL_1F (61 | (26 << 8))
-#define MAP_TRAINER_HILL_2F (62 | (26 << 8))
-#define MAP_TRAINER_HILL_3F (63 | (26 << 8))
-#define MAP_TRAINER_HILL_4F (64 | (26 << 8))
-#define MAP_TRAINER_HILL_ROOF (65 | (26 << 8))
-#define MAP_NAVEL_ROCK_EXTERIOR (66 | (26 << 8))
-#define MAP_NAVEL_ROCK_HARBOR (67 | (26 << 8))
-#define MAP_NAVEL_ROCK_ENTRANCE (68 | (26 << 8))
-#define MAP_NAVEL_ROCK_B1F (69 | (26 << 8))
-#define MAP_NAVEL_ROCK_FORK (70 | (26 << 8))
-#define MAP_NAVEL_ROCK_UP1 (71 | (26 << 8))
-#define MAP_NAVEL_ROCK_UP2 (72 | (26 << 8))
-#define MAP_NAVEL_ROCK_UP3 (73 | (26 << 8))
-#define MAP_NAVEL_ROCK_UP4 (74 | (26 << 8))
-#define MAP_NAVEL_ROCK_TOP (75 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN01 (76 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN02 (77 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN03 (78 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN04 (79 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN05 (80 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN06 (81 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN07 (82 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN08 (83 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN09 (84 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN10 (85 | (26 << 8))
-#define MAP_NAVEL_ROCK_DOWN11 (86 | (26 << 8))
-#define MAP_NAVEL_ROCK_BOTTOM (87 | (26 << 8))
-#define MAP_TRAINER_HILL_ELEVATOR (88 | (26 << 8))
+#define MAP_SAFARI_ZONE_NORTHWEST (0 | (26 << 8))
+#define MAP_SAFARI_ZONE_NORTH (1 | (26 << 8))
+#define MAP_SAFARI_ZONE_SOUTHWEST (2 | (26 << 8))
+#define MAP_SAFARI_ZONE_SOUTH (3 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_OUTSIDE_WEST (4 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY (5 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR (6 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR (7 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM (8 | (26 << 8))
+#define MAP_SOUTHERN_ISLAND_EXTERIOR (9 | (26 << 8))
+#define MAP_SOUTHERN_ISLAND_INTERIOR (10 | (26 << 8))
+#define MAP_SAFARI_ZONE_REST_HOUSE (11 | (26 << 8))
+#define MAP_SAFARI_ZONE_NORTHEAST (12 | (26 << 8))
+#define MAP_SAFARI_ZONE_SOUTHEAST (13 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_OUTSIDE_EAST (14 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM (15 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR (16 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM (17 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY (18 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR (19 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM (20 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM (21 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY (22 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR (23 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM (24 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY (25 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR (26 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP (27 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY (28 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR (29 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM (30 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY (31 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM (32 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM (33 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY (34 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR (35 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM (36 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL (37 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL (38 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS (39 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_RANKING_HALL (40 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE1 (41 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_EXCHANGE_SERVICE_CORNER (42 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE2 (43 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE3 (44 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE4 (45 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_SCOTTS_HOUSE (46 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE5 (47 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE6 (48 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE7 (49 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_RECEPTION_GATE (50 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE8 (51 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_LOUNGE9 (52 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F (53 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_2F (54 | (26 << 8))
+#define MAP_BATTLE_FRONTIER_MART (55 | (26 << 8))
+#define MAP_FARAWAY_ISLAND_ENTRANCE (56 | (26 << 8))
+#define MAP_FARAWAY_ISLAND_INTERIOR (57 | (26 << 8))
+#define MAP_BIRTH_ISLAND_EXTERIOR (58 | (26 << 8))
+#define MAP_BIRTH_ISLAND_HARBOR (59 | (26 << 8))
+#define MAP_TRAINER_HILL_ENTRANCE (60 | (26 << 8))
+#define MAP_TRAINER_HILL_1F (61 | (26 << 8))
+#define MAP_TRAINER_HILL_2F (62 | (26 << 8))
+#define MAP_TRAINER_HILL_3F (63 | (26 << 8))
+#define MAP_TRAINER_HILL_4F (64 | (26 << 8))
+#define MAP_TRAINER_HILL_ROOF (65 | (26 << 8))
+#define MAP_NAVEL_ROCK_EXTERIOR (66 | (26 << 8))
+#define MAP_NAVEL_ROCK_HARBOR (67 | (26 << 8))
+#define MAP_NAVEL_ROCK_ENTRANCE (68 | (26 << 8))
+#define MAP_NAVEL_ROCK_B1F (69 | (26 << 8))
+#define MAP_NAVEL_ROCK_FORK (70 | (26 << 8))
+#define MAP_NAVEL_ROCK_UP1 (71 | (26 << 8))
+#define MAP_NAVEL_ROCK_UP2 (72 | (26 << 8))
+#define MAP_NAVEL_ROCK_UP3 (73 | (26 << 8))
+#define MAP_NAVEL_ROCK_UP4 (74 | (26 << 8))
+#define MAP_NAVEL_ROCK_TOP (75 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN01 (76 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN02 (77 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN03 (78 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN04 (79 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN05 (80 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN06 (81 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN07 (82 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN08 (83 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN09 (84 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN10 (85 | (26 << 8))
+#define MAP_NAVEL_ROCK_DOWN11 (86 | (26 << 8))
+#define MAP_NAVEL_ROCK_BOTTOM (87 | (26 << 8))
+#define MAP_TRAINER_HILL_ELEVATOR (88 | (26 << 8))
// Map Group 27
#define MAP_ROUTE104_PROTOTYPE (0 | (27 << 8))
diff --git a/include/constants/mauville_man.h b/include/constants/mauville_man.h
deleted file mode 100644
index b00e3a291..000000000
--- a/include/constants/mauville_man.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef GUARD_CONSTANTS_MAUVILLE_MAN_H
-#define GUARD_CONSTANTS_MAUVILLE_MAN_H
-
-#define MAUVILLE_MAN_BARD 0
-#define MAUVILLE_MAN_HIPSTER 1
-#define MAUVILLE_MAN_TRADER 2
-#define MAUVILLE_MAN_STORYTELLER 3
-#define MAUVILLE_MAN_GIDDY 4
-
-#endif // GUARD_CONSTANTS_MAUVILLE_MAN_H
diff --git a/include/constants/mauville_old_man.h b/include/constants/mauville_old_man.h
new file mode 100644
index 000000000..c1fb0bf24
--- /dev/null
+++ b/include/constants/mauville_old_man.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H
+#define GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H
+
+#define MAUVILLE_MAN_BARD 0
+#define MAUVILLE_MAN_HIPSTER 1
+#define MAUVILLE_MAN_TRADER 2
+#define MAUVILLE_MAN_STORYTELLER 3
+#define MAUVILLE_MAN_GIDDY 4
+#define MAUVILLE_MAN_UNUSED1 5
+#define MAUVILLE_MAN_UNUSED2 6
+
+#endif // GUARD_CONSTANTS_MAUVILLE_OLD_MAN_H
diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h
index 44bbd9729..94cb0ffca 100755
--- a/include/constants/metatile_behaviors.h
+++ b/include/constants/metatile_behaviors.h
@@ -235,7 +235,7 @@
#define MB_CABLE_BOX_RESULTS_2 0xE7
#define MB_WIRELESS_BOX_RESULTS 0xE8
#define MB_TRAINER_HILL_TIMER 0xE9
-#define MB_UNKNOWN_CLOSED_DOOR 0xEA
+#define MB_SKY_PILLAR_CLOSED_DOOR 0xEA
#define MB_UNUSED_EB 0xEB
#define MB_UNUSED_EC 0xEC
#define MB_UNUSED_ED 0xED
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index 8fe95b464..a0ea6855b 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -2,29 +2,39 @@
#define GUARD_METATILE_LABELS_H
// gTileset_General
-#define METATILE_General_Grass 0x001
-#define METATILE_General_TallGrass 0x00D
-#define METATILE_General_LongGrass 0x015
-#define METATILE_General_TallGrass_TreeUp 0x025
-#define METATILE_General_Grass_TreeUp 0x00E
-#define METATILE_General_TallGrass_TreeLeft 0x1C6
-#define METATILE_General_TallGrass_TreeRight 0x1C7
-#define METATILE_General_Grass_TreeLeft 0x1CE
-#define METATILE_General_Grass_TreeRight 0x1CF
-#define METATILE_General_MuddySlope_Frame0 0x0E8
-#define METATILE_General_MuddySlope_Frame1 0x0E9
-#define METATILE_General_MuddySlope_Frame2 0x0EA
-#define METATILE_General_MuddySlope_Frame3 0x0EB
-#define METATILE_General_SandPit_Center 0x121
-#define METATILE_General_CaveEntrance_Top 0x09F
-#define METATILE_General_CaveEntrance_Bottom 0x0A7
-#define METATILE_General_RockWall_GrassBase 0x079
-#define METATILE_General_RockWall_RockBase 0x07C
-#define METATILE_General_RockWall_SandBase 0x091
-#define METATILE_General_CalmWater 0x170
-#define METATILE_General_RoughWater 0x14E
-#define METATILE_General_RoughDeepWater 0x14F
-#define METATILE_General_ReflectiveWater 0x0A1
+#define METATILE_General_Grass 0x001
+#define METATILE_General_TallGrass 0x00D
+#define METATILE_General_LongGrass 0x015
+#define METATILE_General_TallGrass_TreeUp 0x025
+#define METATILE_General_Grass_TreeUp 0x00E
+#define METATILE_General_TallGrass_TreeLeft 0x1C6
+#define METATILE_General_TallGrass_TreeRight 0x1C7
+#define METATILE_General_Grass_TreeLeft 0x1CE
+#define METATILE_General_Grass_TreeRight 0x1CF
+#define METATILE_General_MuddySlope_Frame0 0x0E8
+#define METATILE_General_MuddySlope_Frame1 0x0E9
+#define METATILE_General_MuddySlope_Frame2 0x0EA
+#define METATILE_General_MuddySlope_Frame3 0x0EB
+#define METATILE_General_SandPit_Center 0x121
+#define METATILE_General_CaveEntrance_Top 0x09F
+#define METATILE_General_CaveEntrance_Bottom 0x0A7
+#define METATILE_General_RockWall_GrassBase 0x079
+#define METATILE_General_RockWall_RockBase 0x07C
+#define METATILE_General_RockWall_SandBase 0x091
+#define METATILE_General_CalmWater 0x170
+#define METATILE_General_RoughWater 0x14E
+#define METATILE_General_RoughDeepWater 0x14F
+#define METATILE_General_ReflectiveWater 0x0A1
+#define METATILE_General_SecretBase_TreeLeft 0x026
+#define METATILE_General_SecretBase_TreeRight 0x027
+#define METATILE_General_SecretBase_VineLeft 0x036
+#define METATILE_General_SecretBase_VineRight 0x037
+#define METATILE_General_RedCaveIndent 0x1A0
+#define METATILE_General_RedCaveOpen 0x1A1
+#define METATILE_General_YellowCaveIndent 0x1A8
+#define METATILE_General_YellowCaveOpen 0x1A9
+#define METATILE_General_BlueCaveIndent 0x1B0
+#define METATILE_General_BlueCaveOpen 0x1B1
// gTileset_Building
#define METATILE_Building_PC_Off 0x004
@@ -68,13 +78,16 @@
#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B
#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C
-// gTileset_MossdeepGym
-#define METATILE_MossdeepGym_Obelisk_Top 0x204
-#define METATILE_MossdeepGym_Obelisk_Base 0x20C
-#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D
-#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205
-#define METATILE_MossdeepGym_Empty0 0x238
-#define METATILE_MossdeepGym_Empty1 0x239
+// gTileset_MossdeepGym from R/S
+#define METATILE_RS_MossdeepGym_RedArrow_Right 0x204
+#define METATILE_RS_MossdeepGym_RedArrow_Left 0x20C
+#define METATILE_RS_MossdeepGym_RedArrow_Up 0x20D
+#define METATILE_RS_MossdeepGym_RedArrow_Down 0x205
+#define METATILE_RS_MossdeepGym_Switch_Up 0x238
+#define METATILE_RS_MossdeepGym_Switch_Down 0x239
+
+// gTileset_MossdeepGym from Emerald
+#define METATILE_MossdeepGym_YellowArrow_Right 0x250
// gTileset_BrendansMaysHouse
#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A
@@ -140,14 +153,16 @@
#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
+#define METATILE_Fortree_SecretBase_Shrub 0x271
+#define METATILE_Fortree_SecretBase_ShrubOpen 0x278
#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279
#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A
#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B
#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281
#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282
#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283
-#define METATILE_Fortree_WoodBridge_Kecleon0 0x297
-#define METATILE_Fortree_WoodBridge_Kecleon1 0x29F
+#define METATILE_Fortree_WoodBridge1_Top 0x297
+#define METATILE_Fortree_WoodBridge1_Bottom 0x29F
// gTileset_Sootopolis
#define METATILE_Sootopolis_Door_Closed 0x248
@@ -161,6 +176,8 @@
// gTileset_Fallarbor
#define METATILE_Fallarbor_AshGrass 0x20A
+#define METATILE_Fallarbor_BrownCaveIndent 0x208
+#define METATILE_Fallarbor_BrownCaveOpen 0x210
#define METATILE_Fallarbor_NormalGrass 0x212
#define METATILE_Fallarbor_AshField 0x218
#define METATILE_Fallarbor_BrownCaveEntrance_Top 0x259
@@ -252,10 +269,10 @@
#define METATILE_EliteFour_EntryDoor_ClosedBottom 0x20E
// gTileset_InsideShip
-#define METATILE_InsideShip_InTactDoor0_Bottom 0x233
-#define METATILE_InsideShip_InTactDoor1_Bottom 0x22B
-#define METATILE_InsideShip_DoorIndent1 0x21A
-#define METATILE_InsideShip_DoorIndent0 0x234
+#define METATILE_InsideShip_IntactDoor_Bottom_Unlocked 0x22B
+#define METATILE_InsideShip_IntactDoor_Bottom_Locked 0x233
+#define METATILE_InsideShip_DoorIndent_Unlocked 0x21A
+#define METATILE_InsideShip_DoorIndent_Locked 0x234
// gTileset_BattlePike
#define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A
@@ -376,8 +393,9 @@
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C
+#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298
-// gTileset_BikeShop
+// gTileset_BikeShop (also used by New Mauville)
#define METATILE_BikeShop_Barrier_Hidden_Top 0x269
#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271
#define METATILE_BikeShop_Floor_Shadow_Top 0x26D
@@ -410,4 +428,162 @@
#define METATILE_Underwater_RockWall 0x21E
#define METATILE_Underwater_FloorShadow 0x228
+// gTileset_SecretBase
+#define METATILE_SecretBase_Wall_TopMid 0x202
+#define METATILE_SecretBase_Ground 0x20A
+#define METATILE_SecretBase_PC 0x220
+#define METATILE_SecretBase_RegisterPC 0x221
+#define METATILE_SecretBase_PC_On 0x224
+#define METATILE_SecretBase_RedBrick_Top 0x225
+#define METATILE_SecretBase_RedBrick_Bottom 0x22D
+#define METATILE_SecretBase_YellowBrick_Top 0x226
+#define METATILE_SecretBase_YellowBrick_Bottom 0x22E
+#define METATILE_SecretBase_BlueBrick_Top 0x227
+#define METATILE_SecretBase_BlueBrick_Bottom 0x22F
+#define METATILE_SecretBase_MudBall 0x228
+#define METATILE_SecretBase_Fence_Horizontal 0x22C
+#define METATILE_SecretBase_Fence_Vertical 0x233
+#define METATILE_SecretBase_Board_Top 0x234
+#define METATILE_SecretBase_Board_Bottom 0x23C
+#define METATILE_SecretBase_RedTent_DoorTop 0x239
+#define METATILE_SecretBase_RedTent_Door 0x241
+#define METATILE_SecretBase_BlueTent_DoorTop 0x251
+#define METATILE_SecretBase_BlueTent_Door 0x259
+#define METATILE_SecretBase_Slide_Stairs 0x23D
+#define METATILE_SecretBase_Slide 0x23E
+#define METATILE_SecretBase_Stand_LeftCorner 0x26A
+#define METATILE_SecretBase_Stand_RightCorner 0x26D
+#define METATILE_SecretBase_BreakableDoor_TopClosed 0x237
+#define METATILE_SecretBase_BreakableDoor_BottomClosed 0x23F
+#define METATILE_SecretBase_BreakableDoor_TopOpen 0x26E
+#define METATILE_SecretBase_BreakableDoor_BottomOpen 0x276
+#define METATILE_SecretBase_NoteMat_C 0x278
+#define METATILE_SecretBase_NoteMat_D 0x279
+#define METATILE_SecretBase_NoteMat_E 0x27A
+#define METATILE_SecretBase_NoteMat_F 0x27B
+#define METATILE_SecretBase_NoteMat_G 0x27C
+#define METATILE_SecretBase_NoteMat_A 0x27D
+#define METATILE_SecretBase_NoteMat_B 0x27E
+#define METATILE_SecretBase_NoteMat_C_Sharp 0x2B3
+#define METATILE_SecretBase_Tire_TopLeft 0x280
+#define METATILE_SecretBase_Tire_TopRight 0x281
+#define METATILE_SecretBase_Tire_BottomLeft 0x288
+#define METATILE_SecretBase_Tire_BottomRight 0x289
+#define METATILE_SecretBase_GlassOrnament_Base1 0x28A
+#define METATILE_SecretBase_GlassOrnament_Base2 0x28B
+#define METATILE_SecretBase_SandOrnament_BrokenTop 0x284
+#define METATILE_SecretBase_SandOrnament_BrokenBase 0x28C
+#define METATILE_SecretBase_SandOrnament_Top 0x285
+#define METATILE_SecretBase_SandOrnament_Base1 0x28D
+#define METATILE_SecretBase_SandOrnament_TopWall 0x286
+#define METATILE_SecretBase_SandOrnament_Base2 0x28E
+#define METATILE_SecretBase_SmallDesk 0x287
+#define METATILE_SecretBase_PokemonDesk 0x28F
+#define METATILE_SecretBase_HeavyDesk_TopLeft 0x290
+#define METATILE_SecretBase_HeavyDesk_TopMid 0x291
+#define METATILE_SecretBase_HeavyDesk_TopRight 0x292
+#define METATILE_SecretBase_HeavyDesk_BottomLeft 0x298
+#define METATILE_SecretBase_HeavyDesk_BottomMid 0x299
+#define METATILE_SecretBase_HeavyDesk_BottomRight 0x29A
+#define METATILE_SecretBase_RaggedDesk_TopLeft 0x293
+#define METATILE_SecretBase_RaggedDesk_TopMid 0x294
+#define METATILE_SecretBase_RaggedDesk_TopRight 0x295
+#define METATILE_SecretBase_RaggedDesk_BottomLeft 0x29B
+#define METATILE_SecretBase_RaggedDesk_BottomMid 0x29C
+#define METATILE_SecretBase_RaggedDesk_BottomRight 0x29D
+#define METATILE_SecretBase_ComfortDesk_TopLeft 0x296
+#define METATILE_SecretBase_ComfortDesk_TopMid 0x297
+#define METATILE_SecretBase_ComfortDesk_TopRight 0x2A3
+#define METATILE_SecretBase_ComfortDesk_BottomLeft 0x29E
+#define METATILE_SecretBase_ComfortDesk_BottomMid 0x29F
+#define METATILE_SecretBase_ComfortDesk_BottomRight 0x2AB
+#define METATILE_SecretBase_BrickDesk_TopLeft 0x2A0
+#define METATILE_SecretBase_BrickDesk_TopMid 0x2A1
+#define METATILE_SecretBase_BrickDesk_TopRight 0x2A2
+#define METATILE_SecretBase_BrickDesk_MidLeft 0x2A8
+#define METATILE_SecretBase_BrickDesk_Center 0x2A9
+#define METATILE_SecretBase_BrickDesk_MidRight 0x2AA
+#define METATILE_SecretBase_BrickDesk_BottomLeft 0x2B0
+#define METATILE_SecretBase_BrickDesk_BottomMid 0x2B1
+#define METATILE_SecretBase_BrickDesk_BottomRight 0x2B2
+#define METATILE_SecretBase_CampDesk_TopLeft 0x2A4
+#define METATILE_SecretBase_CampDesk_TopMid 0x2A5
+#define METATILE_SecretBase_CampDesk_TopRight 0x2A6
+#define METATILE_SecretBase_CampDesk_MidLeft 0x2AC
+#define METATILE_SecretBase_CampDesk_Center 0x2AD
+#define METATILE_SecretBase_CampDesk_MidRight 0x2AE
+#define METATILE_SecretBase_CampDesk_BottomLeft 0x2B4
+#define METATILE_SecretBase_CampDesk_BottomMid 0x2B5
+#define METATILE_SecretBase_CampDesk_BottomRight 0x2B6
+#define METATILE_SecretBase_HardDesk_TopLeft 0x2A7
+#define METATILE_SecretBase_HardDesk_TopMid 0x2BB
+#define METATILE_SecretBase_HardDesk_TopRight 0x2BC
+#define METATILE_SecretBase_HardDesk_MidLeft 0x2AF
+#define METATILE_SecretBase_HardDesk_Center 0x2C3
+#define METATILE_SecretBase_HardDesk_MidRight 0x2C4
+#define METATILE_SecretBase_HardDesk_BottomLeft 0x2B7
+#define METATILE_SecretBase_HardDesk_BottomMid 0x2CB
+#define METATILE_SecretBase_HardDesk_BottomRight 0x2CC
+#define METATILE_SecretBase_PrettyDesk_TopLeft 0x2BD
+#define METATILE_SecretBase_PrettyDesk_TopMid 0x2BE
+#define METATILE_SecretBase_PrettyDesk_TopRight 0x2BF
+#define METATILE_SecretBase_PrettyDesk_MidLeft 0x2C5
+#define METATILE_SecretBase_PrettyDesk_Center 0x2C6
+#define METATILE_SecretBase_PrettyDesk_MidRight 0x2C7
+#define METATILE_SecretBase_PrettyDesk_BottomLeft 0x2CD
+#define METATILE_SecretBase_PrettyDesk_BottomMid 0x2CE
+#define METATILE_SecretBase_PrettyDesk_BottomRight 0x2CF
+#define METATILE_SecretBase_SmallChair 0x2B8
+#define METATILE_SecretBase_PokemonChair 0x2B9
+#define METATILE_SecretBase_HeavyChair 0x2BA
+#define METATILE_SecretBase_PrettyChair 0x2C0
+#define METATILE_SecretBase_ComfortChair 0x2C1
+#define METATILE_SecretBase_RaggedChair 0x2C2
+#define METATILE_SecretBase_BrickChair 0x2C8
+#define METATILE_SecretBase_CampChair 0x2C9
+#define METATILE_SecretBase_HardChair 0x2Ca
+#define METATILE_SecretBase_RedPlant_Base1 0x2D8
+#define METATILE_SecretBase_RedPlant_Base2 0x2D9
+#define METATILE_SecretBase_TropicalPlant_Base1 0x2DA
+#define METATILE_SecretBase_TropicalPlant_Base2 0x2DB
+#define METATILE_SecretBase_PrettyFlower_Base1 0x2DC
+#define METATILE_SecretBase_PrettyFlower_Base2 0x2DD
+#define METATILE_SecretBase_ColorfulFlowers_BaseLeft1 0x2E8
+#define METATILE_SecretBase_ColorfulFlowers_BaseRight1 0x2E9
+#define METATILE_SecretBase_ColorfulFlowers_BaseLeft2 0x2EA
+#define METATILE_SecretBase_ColorfulFlowers_BaseRight2 0x2EB
+#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC
+#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED
+#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE
+#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF
+#define METATILE_SecretBase_GorgeousPlant_BaseLeft1 0x2F8
+#define METATILE_SecretBase_GorgeousPlant_BaseRight1 0x2F9
+#define METATILE_SecretBase_GorgeousPlant_BaseLeft2 0x2FA
+#define METATILE_SecretBase_GorgeousPlant_BaseRight2 0x2FB
+#define METATILE_SecretBase_TV 0x2F4
+#define METATILE_SecretBase_RoundTV 0x2F5
+#define METATILE_SecretBase_CuteTV 0x2F6
+#define METATILE_SecretBase_PikaPoster_Left 0x31C
+#define METATILE_SecretBase_PikaPoster_Right 0x31D
+#define METATILE_SecretBase_LongPoster_Left 0x31E
+#define METATILE_SecretBase_LongPoster_Right 0x31F
+#define METATILE_SecretBase_SeaPoster_Left 0x324
+#define METATILE_SecretBase_SeaPoster_Right 0x325
+#define METATILE_SecretBase_SkyPoster_Left 0x326
+#define METATILE_SecretBase_SkyPoster_Right 0x327
+#define METATILE_SecretBase_KissPoster_Left 0x32C
+#define METATILE_SecretBase_KissPoster_Right 0x32D
+#define METATILE_SecretBase_BallPoster 0x330
+#define METATILE_SecretBase_GreenPoster 0x331
+#define METATILE_SecretBase_RedPoster 0x332
+#define METATILE_SecretBase_BluePoster 0x333
+#define METATILE_SecretBase_CutePoster 0x334
+#define METATILE_SecretBase_SilverShield_Base1 0x2DE
+#define METATILE_SecretBase_SilverShield_Base2 0x2DF
+#define METATILE_SecretBase_GoldShield_Base1 0x336
+#define METATILE_SecretBase_GoldShield_Base2 0x337
+#define METATILE_SecretBase_RedBalloon 0x338
+#define METATILE_SecretBase_BlueBalloon 0x33c
+#define METATILE_SecretBase_YellowBalloon 0x340
+
#endif // GUARD_METATILE_LABELS_H
diff --git a/include/constants/mevent.h b/include/constants/mevent.h
new file mode 100644
index 000000000..25bbcdf36
--- /dev/null
+++ b/include/constants/mevent.h
@@ -0,0 +1,15 @@
+#ifndef GUARD_CONSTANTS_MEVENT_H
+#define GUARD_CONSTANTS_MEVENT_H
+
+// mevent2.c
+#define GET_NUM_STAMPS 0
+#define GET_MAX_STAMPS 1
+#define GET_CARD_BATTLES_WON 2
+
+#define GET_NUM_STAMPS_INTERNAL 3
+#define GET_MAX_STAMPS_INTERNAL 4
+#define GET_CARD_BATTLES_WON_INTERNAL 0
+
+#define REQUIRED_CARD_BATTLES 3
+
+#endif //GUARD_MEVENT_H
diff --git a/include/constants/opponents.h b/include/constants/opponents.h
index 9f74baf67..cd35cf6b7 100644
--- a/include/constants/opponents.h
+++ b/include/constants/opponents.h
@@ -1,862 +1,866 @@
#ifndef GUARD_CONSTANTS_OPPONENTS_H
#define GUARD_CONSTANTS_OPPONENTS_H
-#define TRAINER_NONE 0
-#define TRAINER_SAWYER_1 1
-#define TRAINER_GRUNT_1 2
-#define TRAINER_GRUNT_2 3
-#define TRAINER_GRUNT_3 4
-#define TRAINER_GRUNT_4 5
-#define TRAINER_GRUNT_5 6
-#define TRAINER_GRUNT_6 7
-#define TRAINER_GRUNT_7 8
-#define TRAINER_GABRIELLE_1 9
-#define TRAINER_GRUNT_8 10
-#define TRAINER_MARCEL 11
-#define TRAINER_ALBERTO 12
-#define TRAINER_ED 13
-#define TRAINER_GRUNT_9 14
-#define TRAINER_DECLAN 15
-#define TRAINER_GRUNT_10 16
-#define TRAINER_GRUNT_11 17
-#define TRAINER_GRUNT_12 18
-#define TRAINER_GRUNT_13 19
-#define TRAINER_GRUNT_14 20
-#define TRAINER_GRUNT_15 21
-#define TRAINER_GRUNT_16 22
-#define TRAINER_GRUNT_17 23
-#define TRAINER_GRUNT_18 24
-#define TRAINER_GRUNT_19 25
-#define TRAINER_GRUNT_20 26
-#define TRAINER_GRUNT_21 27
-#define TRAINER_GRUNT_22 28
-#define TRAINER_FREDRICK 29
-#define TRAINER_MATT 30
-#define TRAINER_ZANDER 31
-#define TRAINER_SHELLY_1 32
-#define TRAINER_SHELLY_2 33
-#define TRAINER_ARCHIE 34
-#define TRAINER_LEAH 35
-#define TRAINER_DAISY 36
-#define TRAINER_ROSE_1 37
-#define TRAINER_FELIX 38
-#define TRAINER_VIOLET 39
-#define TRAINER_ROSE_2 40
-#define TRAINER_ROSE_3 41
-#define TRAINER_ROSE_4 42
-#define TRAINER_ROSE_5 43
-#define TRAINER_DUSTY_1 44
-#define TRAINER_CHIP 45
-#define TRAINER_FOSTER 46
-#define TRAINER_DUSTY_2 47
-#define TRAINER_DUSTY_3 48
-#define TRAINER_DUSTY_4 49
-#define TRAINER_DUSTY_5 50
-#define TRAINER_GABBY_AND_TY_1 51
-#define TRAINER_GABBY_AND_TY_2 52
-#define TRAINER_GABBY_AND_TY_3 53
-#define TRAINER_GABBY_AND_TY_4 54
-#define TRAINER_GABBY_AND_TY_5 55
-#define TRAINER_GABBY_AND_TY_6 56
-#define TRAINER_LOLA_1 57
-#define TRAINER_AUSTINA 58
-#define TRAINER_GWEN 59
-#define TRAINER_LOLA_2 60
-#define TRAINER_LOLA_3 61
-#define TRAINER_LOLA_4 62
-#define TRAINER_LOLA_5 63
-#define TRAINER_RICKY_1 64
-#define TRAINER_SIMON 65
-#define TRAINER_CHARLIE 66
-#define TRAINER_RICKY_2 67
-#define TRAINER_RICKY_3 68
-#define TRAINER_RICKY_4 69
-#define TRAINER_RICKY_5 70
-#define TRAINER_RANDALL 71
-#define TRAINER_PARKER 72
-#define TRAINER_GEORGE 73
-#define TRAINER_BERKE 74
-#define TRAINER_BRAXTON 75
-#define TRAINER_VINCENT 76
-#define TRAINER_LEROY 77
-#define TRAINER_WILTON_1 78
-#define TRAINER_EDGAR 79
-#define TRAINER_ALBERT 80
-#define TRAINER_SAMUEL 81
-#define TRAINER_VITO 82
-#define TRAINER_OWEN 83
-#define TRAINER_WILTON_2 84
-#define TRAINER_WILTON_3 85
-#define TRAINER_WILTON_4 86
-#define TRAINER_WILTON_5 87
-#define TRAINER_WARREN 88
-#define TRAINER_MARY 89
-#define TRAINER_ALEXIA 90
-#define TRAINER_JODY 91
-#define TRAINER_WENDY 92
-#define TRAINER_KEIRA 93
-#define TRAINER_BROOKE_1 94
-#define TRAINER_JENNIFER 95
-#define TRAINER_HOPE 96
-#define TRAINER_SHANNON 97
-#define TRAINER_MICHELLE 98
-#define TRAINER_CAROLINE 99
-#define TRAINER_JULIE 100
-#define TRAINER_BROOKE_2 101
-#define TRAINER_BROOKE_3 102
-#define TRAINER_BROOKE_4 103
-#define TRAINER_BROOKE_5 104
-#define TRAINER_PATRICIA 105
-#define TRAINER_KINDRA 106
-#define TRAINER_TAMMY 107
-#define TRAINER_VALERIE_1 108
-#define TRAINER_TASHA 109
-#define TRAINER_VALERIE_2 110
-#define TRAINER_VALERIE_3 111
-#define TRAINER_VALERIE_4 112
-#define TRAINER_VALERIE_5 113
-#define TRAINER_CINDY_1 114
-#define TRAINER_DAPHNE 115
-#define TRAINER_GRUNT_23 116
-#define TRAINER_CINDY_2 117
-#define TRAINER_BRIANNA 118
-#define TRAINER_NAOMI 119
-#define TRAINER_CINDY_3 120
-#define TRAINER_CINDY_4 121
-#define TRAINER_CINDY_5 122
-#define TRAINER_CINDY_6 123
-#define TRAINER_MELISSA 124
-#define TRAINER_SHEILA 125
-#define TRAINER_SHIRLEY 126
-#define TRAINER_JESSICA_1 127
-#define TRAINER_CONNIE 128
-#define TRAINER_BRIDGET 129
-#define TRAINER_OLIVIA 130
-#define TRAINER_TIFFANY 131
-#define TRAINER_JESSICA_2 132
-#define TRAINER_JESSICA_3 133
-#define TRAINER_JESSICA_4 134
-#define TRAINER_JESSICA_5 135
-#define TRAINER_WINSTON_1 136
-#define TRAINER_MOLLIE 137
-#define TRAINER_GARRET 138
-#define TRAINER_WINSTON_2 139
-#define TRAINER_WINSTON_3 140
-#define TRAINER_WINSTON_4 141
-#define TRAINER_WINSTON_5 142
-#define TRAINER_STEVE_1 143
-#define TRAINER_THALIA_1 144
-#define TRAINER_MARK 145
-#define TRAINER_GRUNT_24 146
-#define TRAINER_STEVE_2 147
-#define TRAINER_STEVE_3 148
-#define TRAINER_STEVE_4 149
-#define TRAINER_STEVE_5 150
-#define TRAINER_LUIS 151
-#define TRAINER_DOMINIK 152
-#define TRAINER_DOUGLAS 153
-#define TRAINER_DARRIN 154
-#define TRAINER_TONY_1 155
-#define TRAINER_JEROME 156
-#define TRAINER_MATTHEW 157
-#define TRAINER_DAVID 158
-#define TRAINER_SPENCER 159
-#define TRAINER_ROLAND 160
-#define TRAINER_NOLEN 161
-#define TRAINER_STAN 162
-#define TRAINER_BARRY 163
-#define TRAINER_DEAN 164
-#define TRAINER_RODNEY 165
-#define TRAINER_RICHARD 166
-#define TRAINER_HERMAN 167
-#define TRAINER_SANTIAGO 168
-#define TRAINER_GILBERT 169
-#define TRAINER_FRANKLIN 170
-#define TRAINER_KEVIN 171
-#define TRAINER_JACK 172
-#define TRAINER_DUDLEY 173
-#define TRAINER_CHAD 174
-#define TRAINER_TONY_2 175
-#define TRAINER_TONY_3 176
-#define TRAINER_TONY_4 177
-#define TRAINER_TONY_5 178
-#define TRAINER_TAKAO 179
-#define TRAINER_HITOSHI 180
-#define TRAINER_KIYO 181
-#define TRAINER_KOICHI 182
-#define TRAINER_NOB_1 183
-#define TRAINER_NOB_2 184
-#define TRAINER_NOB_3 185
-#define TRAINER_NOB_4 186
-#define TRAINER_NOB_5 187
-#define TRAINER_YUJI 188
-#define TRAINER_DAISUKE 189
-#define TRAINER_ATSUSHI 190
-#define TRAINER_KIRK 191
-#define TRAINER_GRUNT_25 192
-#define TRAINER_GRUNT_26 193
-#define TRAINER_SHAWN 194
-#define TRAINER_FERNANDO_1 195
-#define TRAINER_DALTON_1 196
-#define TRAINER_DALTON_2 197
-#define TRAINER_DALTON_3 198
-#define TRAINER_DALTON_4 199
-#define TRAINER_DALTON_5 200
-#define TRAINER_COLE 201
-#define TRAINER_JEFF 202
-#define TRAINER_AXLE 203
-#define TRAINER_JACE 204
-#define TRAINER_KEEGAN 205
-#define TRAINER_BERNIE_1 206
-#define TRAINER_BERNIE_2 207
-#define TRAINER_BERNIE_3 208
-#define TRAINER_BERNIE_4 209
-#define TRAINER_BERNIE_5 210
-#define TRAINER_DREW 211
-#define TRAINER_BEAU 212
-#define TRAINER_LARRY 213
-#define TRAINER_SHANE 214
-#define TRAINER_JUSTIN 215
-#define TRAINER_ETHAN_1 216
-#define TRAINER_AUTUMN 217
-#define TRAINER_TRAVIS 218
-#define TRAINER_ETHAN_2 219
-#define TRAINER_ETHAN_3 220
-#define TRAINER_ETHAN_4 221
-#define TRAINER_ETHAN_5 222
-#define TRAINER_BRENT 223
-#define TRAINER_DONALD 224
-#define TRAINER_TAYLOR 225
-#define TRAINER_JEFFREY_1 226
-#define TRAINER_DEREK 227
-#define TRAINER_JEFFREY_2 228
-#define TRAINER_JEFFREY_3 229
-#define TRAINER_JEFFREY_4 230
-#define TRAINER_JEFFREY_5 231
-#define TRAINER_EDWARD 232
-#define TRAINER_PRESTON 233
-#define TRAINER_VIRGIL 234
-#define TRAINER_BLAKE 235
-#define TRAINER_WILLIAM 236
-#define TRAINER_JOSHUA 237
-#define TRAINER_CAMERON_1 238
-#define TRAINER_CAMERON_2 239
-#define TRAINER_CAMERON_3 240
-#define TRAINER_CAMERON_4 241
-#define TRAINER_CAMERON_5 242
-#define TRAINER_JACLYN 243
-#define TRAINER_HANNAH 244
-#define TRAINER_SAMANTHA 245
-#define TRAINER_MAURA 246
-#define TRAINER_KAYLA 247
-#define TRAINER_ALEXIS 248
-#define TRAINER_JACKI_1 249
-#define TRAINER_JACKI_2 250
-#define TRAINER_JACKI_3 251
-#define TRAINER_JACKI_4 252
-#define TRAINER_JACKI_5 253
-#define TRAINER_WALTER_1 254
-#define TRAINER_MICAH 255
-#define TRAINER_THOMAS 256
-#define TRAINER_WALTER_2 257
-#define TRAINER_WALTER_3 258
-#define TRAINER_WALTER_4 259
-#define TRAINER_WALTER_5 260
-#define TRAINER_SIDNEY 261
-#define TRAINER_PHOEBE 262
-#define TRAINER_GLACIA 263
-#define TRAINER_DRAKE 264
-#define TRAINER_ROXANNE_1 265
-#define TRAINER_BRAWLY_1 266
-#define TRAINER_WATTSON_1 267
-#define TRAINER_FLANNERY_1 268
-#define TRAINER_NORMAN_1 269
-#define TRAINER_WINONA_1 270
-#define TRAINER_TATE_AND_LIZA_1 271
-#define TRAINER_JUAN_1 272
-#define TRAINER_JERRY_1 273
-#define TRAINER_TED 274
-#define TRAINER_PAUL 275
-#define TRAINER_JERRY_2 276
-#define TRAINER_JERRY_3 277
-#define TRAINER_JERRY_4 278
-#define TRAINER_JERRY_5 279
-#define TRAINER_KAREN_1 280
-#define TRAINER_GEORGIA 281
-#define TRAINER_KAREN_2 282
-#define TRAINER_KAREN_3 283
-#define TRAINER_KAREN_4 284
-#define TRAINER_KAREN_5 285
-#define TRAINER_KATE_AND_JOY 286
-#define TRAINER_ANNA_AND_MEG_1 287
-#define TRAINER_ANNA_AND_MEG_2 288
-#define TRAINER_ANNA_AND_MEG_3 289
-#define TRAINER_ANNA_AND_MEG_4 290
-#define TRAINER_ANNA_AND_MEG_5 291
-#define TRAINER_VICTOR 292
-#define TRAINER_MIGUEL_1 293
-#define TRAINER_COLTON 294
-#define TRAINER_MIGUEL_2 295
-#define TRAINER_MIGUEL_3 296
-#define TRAINER_MIGUEL_4 297
-#define TRAINER_MIGUEL_5 298
-#define TRAINER_VICTORIA 299
-#define TRAINER_VANESSA 300
-#define TRAINER_BETHANY 301
-#define TRAINER_ISABEL_1 302
-#define TRAINER_ISABEL_2 303
-#define TRAINER_ISABEL_3 304
-#define TRAINER_ISABEL_4 305
-#define TRAINER_ISABEL_5 306
-#define TRAINER_TIMOTHY_1 307
-#define TRAINER_TIMOTHY_2 308
-#define TRAINER_TIMOTHY_3 309
-#define TRAINER_TIMOTHY_4 310
-#define TRAINER_TIMOTHY_5 311
-#define TRAINER_VICKY 312
-#define TRAINER_SHELBY_1 313
-#define TRAINER_SHELBY_2 314
-#define TRAINER_SHELBY_3 315
-#define TRAINER_SHELBY_4 316
-#define TRAINER_SHELBY_5 317
-#define TRAINER_CALVIN_1 318
-#define TRAINER_BILLY 319
-#define TRAINER_JOSH 320
-#define TRAINER_TOMMY 321
-#define TRAINER_JOEY 322
-#define TRAINER_BEN 323
-#define TRAINER_QUINCY 324
-#define TRAINER_KATELYNN 325
-#define TRAINER_JAYLEN 326
-#define TRAINER_DILLON 327
-#define TRAINER_CALVIN_2 328
-#define TRAINER_CALVIN_3 329
-#define TRAINER_CALVIN_4 330
-#define TRAINER_CALVIN_5 331
-#define TRAINER_EDDIE 332
-#define TRAINER_ALLEN 333
-#define TRAINER_TIMMY 334
-#define TRAINER_WALLACE 335
-#define TRAINER_ANDREW 336
-#define TRAINER_IVAN 337
-#define TRAINER_CLAUDE 338
-#define TRAINER_ELLIOT_1 339
-#define TRAINER_NED 340
-#define TRAINER_DALE 341
-#define TRAINER_NOLAN 342
-#define TRAINER_BARNY 343
-#define TRAINER_WADE 344
-#define TRAINER_CARTER 345
-#define TRAINER_ELLIOT_2 346
-#define TRAINER_ELLIOT_3 347
-#define TRAINER_ELLIOT_4 348
-#define TRAINER_ELLIOT_5 349
-#define TRAINER_RONALD 350
-#define TRAINER_JACOB 351
-#define TRAINER_ANTHONY 352
-#define TRAINER_BENJAMIN_1 353
-#define TRAINER_BENJAMIN_2 354
-#define TRAINER_BENJAMIN_3 355
-#define TRAINER_BENJAMIN_4 356
-#define TRAINER_BENJAMIN_5 357
-#define TRAINER_ABIGAIL_1 358
-#define TRAINER_JASMINE 359
-#define TRAINER_ABIGAIL_2 360
-#define TRAINER_ABIGAIL_3 361
-#define TRAINER_ABIGAIL_4 362
-#define TRAINER_ABIGAIL_5 363
-#define TRAINER_DYLAN_1 364
-#define TRAINER_DYLAN_2 365
-#define TRAINER_DYLAN_3 366
-#define TRAINER_DYLAN_4 367
-#define TRAINER_DYLAN_5 368
-#define TRAINER_MARIA_1 369
-#define TRAINER_MARIA_2 370
-#define TRAINER_MARIA_3 371
-#define TRAINER_MARIA_4 372
-#define TRAINER_MARIA_5 373
-#define TRAINER_CAMDEN 374
-#define TRAINER_DEMETRIUS 375
-#define TRAINER_ISAIAH_1 376
-#define TRAINER_PABLO_1 377
-#define TRAINER_CHASE 378
-#define TRAINER_ISAIAH_2 379
-#define TRAINER_ISAIAH_3 380
-#define TRAINER_ISAIAH_4 381
-#define TRAINER_ISAIAH_5 382
-#define TRAINER_ISOBEL 383
-#define TRAINER_DONNY 384
-#define TRAINER_TALIA 385
-#define TRAINER_KATELYN_1 386
-#define TRAINER_ALLISON 387
-#define TRAINER_KATELYN_2 388
-#define TRAINER_KATELYN_3 389
-#define TRAINER_KATELYN_4 390
-#define TRAINER_KATELYN_5 391
-#define TRAINER_NICOLAS_1 392
-#define TRAINER_NICOLAS_2 393
-#define TRAINER_NICOLAS_3 394
-#define TRAINER_NICOLAS_4 395
-#define TRAINER_NICOLAS_5 396
-#define TRAINER_AARON 397
-#define TRAINER_PERRY 398
-#define TRAINER_HUGH 399
-#define TRAINER_PHIL 400
-#define TRAINER_JARED 401
-#define TRAINER_HUMBERTO 402
-#define TRAINER_PRESLEY 403
-#define TRAINER_EDWARDO 404
-#define TRAINER_COLIN 405
-#define TRAINER_ROBERT_1 406
-#define TRAINER_BENNY 407
-#define TRAINER_CHESTER 408
-#define TRAINER_ROBERT_2 409
-#define TRAINER_ROBERT_3 410
-#define TRAINER_ROBERT_4 411
-#define TRAINER_ROBERT_5 412
-#define TRAINER_ALEX 413
-#define TRAINER_BECK 414
-#define TRAINER_YASU 415
-#define TRAINER_TAKASHI 416
-#define TRAINER_DIANNE 417
-#define TRAINER_JANI 418
-#define TRAINER_LAO_1 419
-#define TRAINER_LUNG 420
-#define TRAINER_LAO_2 421
-#define TRAINER_LAO_3 422
-#define TRAINER_LAO_4 423
-#define TRAINER_LAO_5 424
-#define TRAINER_JOCELYN 425
-#define TRAINER_LAURA 426
-#define TRAINER_CYNDY_1 427
-#define TRAINER_CORA 428
-#define TRAINER_PAULA 429
-#define TRAINER_CYNDY_2 430
-#define TRAINER_CYNDY_3 431
-#define TRAINER_CYNDY_4 432
-#define TRAINER_CYNDY_5 433
-#define TRAINER_MADELINE_1 434
-#define TRAINER_CLARISSA 435
-#define TRAINER_ANGELICA 436
-#define TRAINER_MADELINE_2 437
-#define TRAINER_MADELINE_3 438
-#define TRAINER_MADELINE_4 439
-#define TRAINER_MADELINE_5 440
-#define TRAINER_BEVERLY 441
-#define TRAINER_IMANI 442
-#define TRAINER_KYLA 443
-#define TRAINER_DENISE 444
-#define TRAINER_BETH 445
-#define TRAINER_TARA 446
-#define TRAINER_MISSY 447
-#define TRAINER_ALICE 448
-#define TRAINER_JENNY_1 449
-#define TRAINER_GRACE 450
-#define TRAINER_TANYA 451
-#define TRAINER_SHARON 452
-#define TRAINER_NIKKI 453
-#define TRAINER_BRENDA 454
-#define TRAINER_KATIE 455
-#define TRAINER_SUSIE 456
-#define TRAINER_KARA 457
-#define TRAINER_DANA 458
-#define TRAINER_SIENNA 459
-#define TRAINER_DEBRA 460
-#define TRAINER_LINDA 461
-#define TRAINER_KAYLEE 462
-#define TRAINER_LAUREL 463
-#define TRAINER_CARLEE 464
-#define TRAINER_JENNY_2 465
-#define TRAINER_JENNY_3 466
-#define TRAINER_JENNY_4 467
-#define TRAINER_JENNY_5 468
-#define TRAINER_HEIDI 469
-#define TRAINER_BECKY 470
-#define TRAINER_CAROL 471
-#define TRAINER_NANCY 472
-#define TRAINER_MARTHA 473
-#define TRAINER_DIANA_1 474
-#define TRAINER_CEDRIC 475
-#define TRAINER_IRENE 476
-#define TRAINER_DIANA_2 477
-#define TRAINER_DIANA_3 478
-#define TRAINER_DIANA_4 479
-#define TRAINER_DIANA_5 480
-#define TRAINER_AMY_AND_LIV_1 481
-#define TRAINER_AMY_AND_LIV_2 482
-#define TRAINER_GINA_AND_MIA_1 483
-#define TRAINER_MIU_AND_YUKI 484
-#define TRAINER_AMY_AND_LIV_3 485
-#define TRAINER_GINA_AND_MIA_2 486
-#define TRAINER_AMY_AND_LIV_4 487
-#define TRAINER_AMY_AND_LIV_5 488
-#define TRAINER_AMY_AND_LIV_6 489
-#define TRAINER_HUEY 490
-#define TRAINER_EDMOND 491
-#define TRAINER_ERNEST_1 492
-#define TRAINER_DWAYNE 493
-#define TRAINER_PHILLIP 494
-#define TRAINER_LEONARD 495
-#define TRAINER_DUNCAN 496
-#define TRAINER_ERNEST_2 497
-#define TRAINER_ERNEST_3 498
-#define TRAINER_ERNEST_4 499
-#define TRAINER_ERNEST_5 500
-#define TRAINER_ELI 501
-#define TRAINER_ANNIKA 502
-#define TRAINER_JAZMYN 503
-#define TRAINER_JONAS 504
-#define TRAINER_KAYLEY 505
-#define TRAINER_AURON 506
-#define TRAINER_KELVIN 507
-#define TRAINER_MARLEY 508
-#define TRAINER_REYNA 509
-#define TRAINER_HUDSON 510
-#define TRAINER_CONOR 511
-#define TRAINER_EDWIN_1 512
-#define TRAINER_HECTOR 513
-#define TRAINER_TABITHA_1 514
-#define TRAINER_EDWIN_2 515
-#define TRAINER_EDWIN_3 516
-#define TRAINER_EDWIN_4 517
-#define TRAINER_EDWIN_5 518
-#define TRAINER_WALLY_1 519
-#define TRAINER_BRENDAN_1 520
-#define TRAINER_BRENDAN_2 521
-#define TRAINER_BRENDAN_3 522
-#define TRAINER_BRENDAN_4 523
-#define TRAINER_BRENDAN_5 524
-#define TRAINER_BRENDAN_6 525
-#define TRAINER_BRENDAN_7 526
-#define TRAINER_BRENDAN_8 527
-#define TRAINER_BRENDAN_9 528
-#define TRAINER_MAY_1 529
-#define TRAINER_MAY_2 530
-#define TRAINER_MAY_3 531
-#define TRAINER_MAY_4 532
-#define TRAINER_MAY_5 533
-#define TRAINER_MAY_6 534
-#define TRAINER_MAY_7 535
-#define TRAINER_MAY_8 536
-#define TRAINER_MAY_9 537
-#define TRAINER_ISAAC_1 538
-#define TRAINER_DAVIS 539
-#define TRAINER_MITCHELL 540
-#define TRAINER_ISAAC_2 541
-#define TRAINER_ISAAC_3 542
-#define TRAINER_ISAAC_4 543
-#define TRAINER_ISAAC_5 544
-#define TRAINER_LYDIA_1 545
-#define TRAINER_HALLE 546
-#define TRAINER_GARRISON 547
-#define TRAINER_LYDIA_2 548
-#define TRAINER_LYDIA_3 549
-#define TRAINER_LYDIA_4 550
-#define TRAINER_LYDIA_5 551
-#define TRAINER_JACKSON_1 552
-#define TRAINER_LORENZO 553
-#define TRAINER_SEBASTIAN 554
-#define TRAINER_JACKSON_2 555
-#define TRAINER_JACKSON_3 556
-#define TRAINER_JACKSON_4 557
-#define TRAINER_JACKSON_5 558
-#define TRAINER_CATHERINE_1 559
-#define TRAINER_JENNA 560
-#define TRAINER_SOPHIA 561
-#define TRAINER_CATHERINE_2 562
-#define TRAINER_CATHERINE_3 563
-#define TRAINER_CATHERINE_4 564
-#define TRAINER_CATHERINE_5 565
-#define TRAINER_JULIO 566
-#define TRAINER_GRUNT_27 567
-#define TRAINER_GRUNT_28 568
-#define TRAINER_GRUNT_29 569
-#define TRAINER_GRUNT_30 570
-#define TRAINER_MARC 571
-#define TRAINER_BRENDEN 572
-#define TRAINER_LILITH 573
-#define TRAINER_CRISTIAN 574
-#define TRAINER_SYLVIA 575
-#define TRAINER_LEONARDO 576
-#define TRAINER_ATHENA 577
-#define TRAINER_HARRISON 578
-#define TRAINER_GRUNT_31 579
-#define TRAINER_CLARENCE 580
-#define TRAINER_TERRY 581
-#define TRAINER_NATE 582
-#define TRAINER_KATHLEEN 583
-#define TRAINER_CLIFFORD 584
-#define TRAINER_NICHOLAS 585
-#define TRAINER_GRUNT_32 586
-#define TRAINER_GRUNT_33 587
-#define TRAINER_GRUNT_34 588
-#define TRAINER_GRUNT_35 589
-#define TRAINER_GRUNT_36 590
-#define TRAINER_MACEY 591
-#define TRAINER_BRENDAN_10 592
-#define TRAINER_BRENDAN_11 593
-#define TRAINER_PAXTON 594
-#define TRAINER_ISABELLA 595
-#define TRAINER_GRUNT_37 596
-#define TRAINER_TABITHA_2 597
-#define TRAINER_JONATHAN 598
-#define TRAINER_BRENDAN_12 599
-#define TRAINER_MAY_10 600
-#define TRAINER_MAXIE_1 601
-#define TRAINER_MAXIE_2 602
-#define TRAINER_TIANA 603
-#define TRAINER_HALEY_1 604
-#define TRAINER_JANICE 605
-#define TRAINER_VIVI 606
-#define TRAINER_HALEY_2 607
-#define TRAINER_HALEY_3 608
-#define TRAINER_HALEY_4 609
-#define TRAINER_HALEY_5 610
-#define TRAINER_SALLY 611
-#define TRAINER_ROBIN 612
-#define TRAINER_ANDREA 613
-#define TRAINER_CRISSY 614
-#define TRAINER_RICK 615
-#define TRAINER_LYLE 616
-#define TRAINER_JOSE 617
-#define TRAINER_DOUG 618
-#define TRAINER_GREG 619
-#define TRAINER_KENT 620
-#define TRAINER_JAMES_1 621
-#define TRAINER_JAMES_2 622
-#define TRAINER_JAMES_3 623
-#define TRAINER_JAMES_4 624
-#define TRAINER_JAMES_5 625
-#define TRAINER_BRICE 626
-#define TRAINER_TRENT_1 627
-#define TRAINER_LENNY 628
-#define TRAINER_LUCAS_1 629
-#define TRAINER_ALAN 630
-#define TRAINER_CLARK 631
-#define TRAINER_ERIC 632
-#define TRAINER_LUCAS_2 633
-#define TRAINER_MIKE_1 634
-#define TRAINER_MIKE_2 635
-#define TRAINER_TRENT_2 636
-#define TRAINER_TRENT_3 637
-#define TRAINER_TRENT_4 638
-#define TRAINER_TRENT_5 639
-#define TRAINER_DEZ_AND_LUKE 640
-#define TRAINER_LEA_AND_JED 641
-#define TRAINER_KIRA_AND_DAN_1 642
-#define TRAINER_KIRA_AND_DAN_2 643
-#define TRAINER_KIRA_AND_DAN_3 644
-#define TRAINER_KIRA_AND_DAN_4 645
-#define TRAINER_KIRA_AND_DAN_5 646
-#define TRAINER_JOHANNA 647
-#define TRAINER_GERALD 648
-#define TRAINER_VIVIAN 649
-#define TRAINER_DANIELLE 650
-#define TRAINER_HIDEO 651
-#define TRAINER_KEIGO 652
-#define TRAINER_RILEY 653
-#define TRAINER_FLINT 654
-#define TRAINER_ASHLEY 655
-#define TRAINER_WALLY_2 656
-#define TRAINER_WALLY_3 657
-#define TRAINER_WALLY_4 658
-#define TRAINER_WALLY_5 659
-#define TRAINER_WALLY_6 660
-#define TRAINER_BRENDAN_13 661
-#define TRAINER_BRENDAN_14 662
-#define TRAINER_BRENDAN_15 663
-#define TRAINER_MAY_11 664
-#define TRAINER_MAY_12 665
-#define TRAINER_MAY_13 666
-#define TRAINER_JONAH 667
-#define TRAINER_HENRY 668
-#define TRAINER_ROGER 669
-#define TRAINER_ALEXA 670
-#define TRAINER_RUBEN 671
-#define TRAINER_KOJI_1 672
-#define TRAINER_WAYNE 673
-#define TRAINER_AIDAN 674
-#define TRAINER_REED 675
-#define TRAINER_TISHA 676
-#define TRAINER_TORI_AND_TIA 677
-#define TRAINER_KIM_AND_IRIS 678
-#define TRAINER_TYRA_AND_IVY 679
-#define TRAINER_MEL_AND_PAUL 680
-#define TRAINER_JOHN_AND_JAY_1 681
-#define TRAINER_JOHN_AND_JAY_2 682
-#define TRAINER_JOHN_AND_JAY_3 683
-#define TRAINER_JOHN_AND_JAY_4 684
-#define TRAINER_JOHN_AND_JAY_5 685
-#define TRAINER_RELI_AND_IAN 686
-#define TRAINER_LILA_AND_ROY_1 687
-#define TRAINER_LILA_AND_ROY_2 688
-#define TRAINER_LILA_AND_ROY_3 689
-#define TRAINER_LILA_AND_ROY_4 690
-#define TRAINER_LILA_AND_ROY_5 691
-#define TRAINER_LISA_AND_RAY 692
-#define TRAINER_CHRIS 693
-#define TRAINER_DAWSON 694
-#define TRAINER_SARAH 695
-#define TRAINER_DARIAN 696
-#define TRAINER_HAILEY 697
-#define TRAINER_CHANDLER 698
-#define TRAINER_KALEB 699
-#define TRAINER_JOSEPH 700
-#define TRAINER_ALYSSA 701
-#define TRAINER_MARCOS 702
-#define TRAINER_RHETT 703
-#define TRAINER_TYRON 704
-#define TRAINER_CELINA 705
-#define TRAINER_BIANCA 706
-#define TRAINER_HAYDEN 707
-#define TRAINER_SOPHIE 708
-#define TRAINER_COBY 709
-#define TRAINER_LAWRENCE 710
-#define TRAINER_WYATT 711
-#define TRAINER_ANGELINA 712
-#define TRAINER_KAI 713
-#define TRAINER_CHARLOTTE 714
-#define TRAINER_DEANDRE 715
-#define TRAINER_GRUNT_38 716
-#define TRAINER_GRUNT_39 717
-#define TRAINER_GRUNT_40 718
-#define TRAINER_GRUNT_41 719
-#define TRAINER_GRUNT_42 720
-#define TRAINER_GRUNT_43 721
-#define TRAINER_GRUNT_44 722
-#define TRAINER_GRUNT_45 723
-#define TRAINER_GRUNT_46 724
-#define TRAINER_GRUNT_47 725
-#define TRAINER_GRUNT_48 726
-#define TRAINER_GRUNT_49 727
-#define TRAINER_GRUNT_50 728
-#define TRAINER_GRUNT_51 729
-#define TRAINER_GRUNT_52 730
-#define TRAINER_GRUNT_53 731
-#define TRAINER_TABITHA_3 732
-#define TRAINER_DARCY 733
-#define TRAINER_MAXIE_3 734
-#define TRAINER_PETE 735
-#define TRAINER_ISABELLE 736
-#define TRAINER_ANDRES_1 737
-#define TRAINER_JOSUE 738
-#define TRAINER_CAMRON 739
-#define TRAINER_CORY_1 740
-#define TRAINER_CAROLINA 741
-#define TRAINER_ELIJAH 742
-#define TRAINER_CELIA 743
-#define TRAINER_BRYAN 744
-#define TRAINER_BRANDEN 745
-#define TRAINER_BRYANT 746
-#define TRAINER_SHAYLA 747
-#define TRAINER_KYRA 748
-#define TRAINER_JAIDEN 749
-#define TRAINER_ALIX 750
-#define TRAINER_HELENE 751
-#define TRAINER_MARLENE 752
-#define TRAINER_DEVAN 753
-#define TRAINER_JOHNSON 754
-#define TRAINER_MELINA 755
-#define TRAINER_BRANDI 756
-#define TRAINER_AISHA 757
-#define TRAINER_MAKAYLA 758
-#define TRAINER_FABIAN 759
-#define TRAINER_DAYTON 760
-#define TRAINER_RACHEL 761
-#define TRAINER_LEONEL 762
-#define TRAINER_CALLIE 763
-#define TRAINER_CALE 764
-#define TRAINER_MYLES 765
-#define TRAINER_PAT 766
-#define TRAINER_CRISTIN_1 767
-#define TRAINER_MAY_14 768
-#define TRAINER_MAY_15 769
-#define TRAINER_ROXANNE_2 770
-#define TRAINER_ROXANNE_3 771
-#define TRAINER_ROXANNE_4 772
-#define TRAINER_ROXANNE_5 773
-#define TRAINER_BRAWLY_2 774
-#define TRAINER_BRAWLY_3 775
-#define TRAINER_BRAWLY_4 776
-#define TRAINER_BRAWLY_5 777
-#define TRAINER_WATTSON_2 778
-#define TRAINER_WATTSON_3 779
-#define TRAINER_WATTSON_4 780
-#define TRAINER_WATTSON_5 781
-#define TRAINER_FLANNERY_2 782
-#define TRAINER_FLANNERY_3 783
-#define TRAINER_FLANNERY_4 784
-#define TRAINER_FLANNERY_5 785
-#define TRAINER_NORMAN_2 786
-#define TRAINER_NORMAN_3 787
-#define TRAINER_NORMAN_4 788
-#define TRAINER_NORMAN_5 789
-#define TRAINER_WINONA_2 790
-#define TRAINER_WINONA_3 791
-#define TRAINER_WINONA_4 792
-#define TRAINER_WINONA_5 793
-#define TRAINER_TATE_AND_LIZA_2 794
-#define TRAINER_TATE_AND_LIZA_3 795
-#define TRAINER_TATE_AND_LIZA_4 796
-#define TRAINER_TATE_AND_LIZA_5 797
-#define TRAINER_JUAN_2 798
-#define TRAINER_JUAN_3 799
-#define TRAINER_JUAN_4 800
-#define TRAINER_JUAN_5 801
-#define TRAINER_ANGELO 802
-#define TRAINER_DARIUS 803
-#define TRAINER_STEVEN 804
-#define TRAINER_ANABEL 805
-#define TRAINER_TUCKER 806
-#define TRAINER_SPENSER 807
-#define TRAINER_GRETA 808
-#define TRAINER_NOLAND 809
-#define TRAINER_LUCY 810
-#define TRAINER_BRANDON 811
-#define TRAINER_ANDRES_2 812
-#define TRAINER_ANDRES_3 813
-#define TRAINER_ANDRES_4 814
-#define TRAINER_ANDRES_5 815
-#define TRAINER_CORY_2 816
-#define TRAINER_CORY_3 817
-#define TRAINER_CORY_4 818
-#define TRAINER_CORY_5 819
-#define TRAINER_PABLO_2 820
-#define TRAINER_PABLO_3 821
-#define TRAINER_PABLO_4 822
-#define TRAINER_PABLO_5 823
-#define TRAINER_KOJI_2 824
-#define TRAINER_KOJI_3 825
-#define TRAINER_KOJI_4 826
-#define TRAINER_KOJI_5 827
-#define TRAINER_CRISTIN_2 828
-#define TRAINER_CRISTIN_3 829
-#define TRAINER_CRISTIN_4 830
-#define TRAINER_CRISTIN_5 831
-#define TRAINER_FERNANDO_2 832
-#define TRAINER_FERNANDO_3 833
-#define TRAINER_FERNANDO_4 834
-#define TRAINER_FERNANDO_5 835
-#define TRAINER_SAWYER_2 836
-#define TRAINER_SAWYER_3 837
-#define TRAINER_SAWYER_4 838
-#define TRAINER_SAWYER_5 839
-#define TRAINER_GABRIELLE_2 840
-#define TRAINER_GABRIELLE_3 841
-#define TRAINER_GABRIELLE_4 842
-#define TRAINER_GABRIELLE_5 843
-#define TRAINER_THALIA_2 844
-#define TRAINER_THALIA_3 845
-#define TRAINER_THALIA_4 846
-#define TRAINER_THALIA_5 847
-#define TRAINER_MARIELA 848
-#define TRAINER_ALVARO 849
-#define TRAINER_EVERETT 850
-#define TRAINER_RED 851
-#define TRAINER_LEAF 852
-#define TRAINER_BRENDAN_16 853
-#define TRAINER_MAY_16 854
+#define TRAINER_NONE 0
+#define TRAINER_SAWYER_1 1
+#define TRAINER_GRUNT_AQUA_HIDEOUT_1 2
+#define TRAINER_GRUNT_AQUA_HIDEOUT_2 3
+#define TRAINER_GRUNT_AQUA_HIDEOUT_3 4
+#define TRAINER_GRUNT_AQUA_HIDEOUT_4 5
+#define TRAINER_GRUNT_SEAFLOOR_CAVERN_1 6
+#define TRAINER_GRUNT_SEAFLOOR_CAVERN_2 7
+#define TRAINER_GRUNT_SEAFLOOR_CAVERN_3 8
+#define TRAINER_GABRIELLE_1 9
+#define TRAINER_GRUNT_PETALBURG_WOODS 10
+#define TRAINER_MARCEL 11
+#define TRAINER_ALBERTO 12
+#define TRAINER_ED 13
+#define TRAINER_GRUNT_SEAFLOOR_CAVERN_4 14
+#define TRAINER_DECLAN 15
+#define TRAINER_GRUNT_RUSTURF_TUNNEL 16
+#define TRAINER_GRUNT_WEATHER_INST_1 17
+#define TRAINER_GRUNT_WEATHER_INST_2 18
+#define TRAINER_GRUNT_WEATHER_INST_3 19
+#define TRAINER_GRUNT_MUSEUM_1 20
+#define TRAINER_GRUNT_MUSEUM_2 21
+#define TRAINER_GRUNT_SPACE_CENTER_1 22
+#define TRAINER_GRUNT_MT_PYRE_1 23
+#define TRAINER_GRUNT_MT_PYRE_2 24
+#define TRAINER_GRUNT_MT_PYRE_3 25
+#define TRAINER_GRUNT_WEATHER_INST_4 26
+#define TRAINER_GRUNT_AQUA_HIDEOUT_5 27
+#define TRAINER_GRUNT_AQUA_HIDEOUT_6 28
+#define TRAINER_FREDRICK 29
+#define TRAINER_MATT 30
+#define TRAINER_ZANDER 31
+#define TRAINER_SHELLY_WEATHER_INSTITUTE 32
+#define TRAINER_SHELLY_SEAFLOOR_CAVERN 33
+#define TRAINER_ARCHIE 34
+#define TRAINER_LEAH 35
+#define TRAINER_DAISY 36
+#define TRAINER_ROSE_1 37
+#define TRAINER_FELIX 38
+#define TRAINER_VIOLET 39
+#define TRAINER_ROSE_2 40
+#define TRAINER_ROSE_3 41
+#define TRAINER_ROSE_4 42
+#define TRAINER_ROSE_5 43
+#define TRAINER_DUSTY_1 44
+#define TRAINER_CHIP 45
+#define TRAINER_FOSTER 46
+#define TRAINER_DUSTY_2 47
+#define TRAINER_DUSTY_3 48
+#define TRAINER_DUSTY_4 49
+#define TRAINER_DUSTY_5 50
+#define TRAINER_GABBY_AND_TY_1 51
+#define TRAINER_GABBY_AND_TY_2 52
+#define TRAINER_GABBY_AND_TY_3 53
+#define TRAINER_GABBY_AND_TY_4 54
+#define TRAINER_GABBY_AND_TY_5 55
+#define TRAINER_GABBY_AND_TY_6 56
+#define TRAINER_LOLA_1 57
+#define TRAINER_AUSTINA 58
+#define TRAINER_GWEN 59
+#define TRAINER_LOLA_2 60
+#define TRAINER_LOLA_3 61
+#define TRAINER_LOLA_4 62
+#define TRAINER_LOLA_5 63
+#define TRAINER_RICKY_1 64
+#define TRAINER_SIMON 65
+#define TRAINER_CHARLIE 66
+#define TRAINER_RICKY_2 67
+#define TRAINER_RICKY_3 68
+#define TRAINER_RICKY_4 69
+#define TRAINER_RICKY_5 70
+#define TRAINER_RANDALL 71
+#define TRAINER_PARKER 72
+#define TRAINER_GEORGE 73
+#define TRAINER_BERKE 74
+#define TRAINER_BRAXTON 75
+#define TRAINER_VINCENT 76
+#define TRAINER_LEROY 77
+#define TRAINER_WILTON_1 78
+#define TRAINER_EDGAR 79
+#define TRAINER_ALBERT 80
+#define TRAINER_SAMUEL 81
+#define TRAINER_VITO 82
+#define TRAINER_OWEN 83
+#define TRAINER_WILTON_2 84
+#define TRAINER_WILTON_3 85
+#define TRAINER_WILTON_4 86
+#define TRAINER_WILTON_5 87
+#define TRAINER_WARREN 88
+#define TRAINER_MARY 89
+#define TRAINER_ALEXIA 90
+#define TRAINER_JODY 91
+#define TRAINER_WENDY 92
+#define TRAINER_KEIRA 93
+#define TRAINER_BROOKE_1 94
+#define TRAINER_JENNIFER 95
+#define TRAINER_HOPE 96
+#define TRAINER_SHANNON 97
+#define TRAINER_MICHELLE 98
+#define TRAINER_CAROLINE 99
+#define TRAINER_JULIE 100
+#define TRAINER_BROOKE_2 101
+#define TRAINER_BROOKE_3 102
+#define TRAINER_BROOKE_4 103
+#define TRAINER_BROOKE_5 104
+#define TRAINER_PATRICIA 105
+#define TRAINER_KINDRA 106
+#define TRAINER_TAMMY 107
+#define TRAINER_VALERIE_1 108
+#define TRAINER_TASHA 109
+#define TRAINER_VALERIE_2 110
+#define TRAINER_VALERIE_3 111
+#define TRAINER_VALERIE_4 112
+#define TRAINER_VALERIE_5 113
+#define TRAINER_CINDY_1 114
+#define TRAINER_DAPHNE 115
+#define TRAINER_GRUNT_SPACE_CENTER_2 116
+#define TRAINER_CINDY_2 117
+#define TRAINER_BRIANNA 118
+#define TRAINER_NAOMI 119
+#define TRAINER_CINDY_3 120
+#define TRAINER_CINDY_4 121
+#define TRAINER_CINDY_5 122
+#define TRAINER_CINDY_6 123
+#define TRAINER_MELISSA 124
+#define TRAINER_SHEILA 125
+#define TRAINER_SHIRLEY 126
+#define TRAINER_JESSICA_1 127
+#define TRAINER_CONNIE 128
+#define TRAINER_BRIDGET 129
+#define TRAINER_OLIVIA 130
+#define TRAINER_TIFFANY 131
+#define TRAINER_JESSICA_2 132
+#define TRAINER_JESSICA_3 133
+#define TRAINER_JESSICA_4 134
+#define TRAINER_JESSICA_5 135
+#define TRAINER_WINSTON_1 136
+#define TRAINER_MOLLIE 137
+#define TRAINER_GARRET 138
+#define TRAINER_WINSTON_2 139
+#define TRAINER_WINSTON_3 140
+#define TRAINER_WINSTON_4 141
+#define TRAINER_WINSTON_5 142
+#define TRAINER_STEVE_1 143
+#define TRAINER_THALIA_1 144
+#define TRAINER_MARK 145
+#define TRAINER_GRUNT_MT_CHIMNEY_1 146
+#define TRAINER_STEVE_2 147
+#define TRAINER_STEVE_3 148
+#define TRAINER_STEVE_4 149
+#define TRAINER_STEVE_5 150
+#define TRAINER_LUIS 151
+#define TRAINER_DOMINIK 152
+#define TRAINER_DOUGLAS 153
+#define TRAINER_DARRIN 154
+#define TRAINER_TONY_1 155
+#define TRAINER_JEROME 156
+#define TRAINER_MATTHEW 157
+#define TRAINER_DAVID 158
+#define TRAINER_SPENCER 159
+#define TRAINER_ROLAND 160
+#define TRAINER_NOLEN 161
+#define TRAINER_STAN 162
+#define TRAINER_BARRY 163
+#define TRAINER_DEAN 164
+#define TRAINER_RODNEY 165
+#define TRAINER_RICHARD 166
+#define TRAINER_HERMAN 167
+#define TRAINER_SANTIAGO 168
+#define TRAINER_GILBERT 169
+#define TRAINER_FRANKLIN 170
+#define TRAINER_KEVIN 171
+#define TRAINER_JACK 172
+#define TRAINER_DUDLEY 173
+#define TRAINER_CHAD 174
+#define TRAINER_TONY_2 175
+#define TRAINER_TONY_3 176
+#define TRAINER_TONY_4 177
+#define TRAINER_TONY_5 178
+#define TRAINER_TAKAO 179
+#define TRAINER_HITOSHI 180
+#define TRAINER_KIYO 181
+#define TRAINER_KOICHI 182
+#define TRAINER_NOB_1 183
+#define TRAINER_NOB_2 184
+#define TRAINER_NOB_3 185
+#define TRAINER_NOB_4 186
+#define TRAINER_NOB_5 187
+#define TRAINER_YUJI 188
+#define TRAINER_DAISUKE 189
+#define TRAINER_ATSUSHI 190
+#define TRAINER_KIRK 191
+#define TRAINER_GRUNT_AQUA_HIDEOUT_7 192
+#define TRAINER_GRUNT_AQUA_HIDEOUT_8 193
+#define TRAINER_SHAWN 194
+#define TRAINER_FERNANDO_1 195
+#define TRAINER_DALTON_1 196
+#define TRAINER_DALTON_2 197
+#define TRAINER_DALTON_3 198
+#define TRAINER_DALTON_4 199
+#define TRAINER_DALTON_5 200
+#define TRAINER_COLE 201
+#define TRAINER_JEFF 202
+#define TRAINER_AXLE 203
+#define TRAINER_JACE 204
+#define TRAINER_KEEGAN 205
+#define TRAINER_BERNIE_1 206
+#define TRAINER_BERNIE_2 207
+#define TRAINER_BERNIE_3 208
+#define TRAINER_BERNIE_4 209
+#define TRAINER_BERNIE_5 210
+#define TRAINER_DREW 211
+#define TRAINER_BEAU 212
+#define TRAINER_LARRY 213
+#define TRAINER_SHANE 214
+#define TRAINER_JUSTIN 215
+#define TRAINER_ETHAN_1 216
+#define TRAINER_AUTUMN 217
+#define TRAINER_TRAVIS 218
+#define TRAINER_ETHAN_2 219
+#define TRAINER_ETHAN_3 220
+#define TRAINER_ETHAN_4 221
+#define TRAINER_ETHAN_5 222
+#define TRAINER_BRENT 223
+#define TRAINER_DONALD 224
+#define TRAINER_TAYLOR 225
+#define TRAINER_JEFFREY_1 226
+#define TRAINER_DEREK 227
+#define TRAINER_JEFFREY_2 228
+#define TRAINER_JEFFREY_3 229
+#define TRAINER_JEFFREY_4 230
+#define TRAINER_JEFFREY_5 231
+#define TRAINER_EDWARD 232
+#define TRAINER_PRESTON 233
+#define TRAINER_VIRGIL 234
+#define TRAINER_BLAKE 235
+#define TRAINER_WILLIAM 236
+#define TRAINER_JOSHUA 237
+#define TRAINER_CAMERON_1 238
+#define TRAINER_CAMERON_2 239
+#define TRAINER_CAMERON_3 240
+#define TRAINER_CAMERON_4 241
+#define TRAINER_CAMERON_5 242
+#define TRAINER_JACLYN 243
+#define TRAINER_HANNAH 244
+#define TRAINER_SAMANTHA 245
+#define TRAINER_MAURA 246
+#define TRAINER_KAYLA 247
+#define TRAINER_ALEXIS 248
+#define TRAINER_JACKI_1 249
+#define TRAINER_JACKI_2 250
+#define TRAINER_JACKI_3 251
+#define TRAINER_JACKI_4 252
+#define TRAINER_JACKI_5 253
+#define TRAINER_WALTER_1 254
+#define TRAINER_MICAH 255
+#define TRAINER_THOMAS 256
+#define TRAINER_WALTER_2 257
+#define TRAINER_WALTER_3 258
+#define TRAINER_WALTER_4 259
+#define TRAINER_WALTER_5 260
+#define TRAINER_SIDNEY 261
+#define TRAINER_PHOEBE 262
+#define TRAINER_GLACIA 263
+#define TRAINER_DRAKE 264
+#define TRAINER_ROXANNE_1 265
+#define TRAINER_BRAWLY_1 266
+#define TRAINER_WATTSON_1 267
+#define TRAINER_FLANNERY_1 268
+#define TRAINER_NORMAN_1 269
+#define TRAINER_WINONA_1 270
+#define TRAINER_TATE_AND_LIZA_1 271
+#define TRAINER_JUAN_1 272
+#define TRAINER_JERRY_1 273
+#define TRAINER_TED 274
+#define TRAINER_PAUL 275
+#define TRAINER_JERRY_2 276
+#define TRAINER_JERRY_3 277
+#define TRAINER_JERRY_4 278
+#define TRAINER_JERRY_5 279
+#define TRAINER_KAREN_1 280
+#define TRAINER_GEORGIA 281
+#define TRAINER_KAREN_2 282
+#define TRAINER_KAREN_3 283
+#define TRAINER_KAREN_4 284
+#define TRAINER_KAREN_5 285
+#define TRAINER_KATE_AND_JOY 286
+#define TRAINER_ANNA_AND_MEG_1 287
+#define TRAINER_ANNA_AND_MEG_2 288
+#define TRAINER_ANNA_AND_MEG_3 289
+#define TRAINER_ANNA_AND_MEG_4 290
+#define TRAINER_ANNA_AND_MEG_5 291
+#define TRAINER_VICTOR 292
+#define TRAINER_MIGUEL_1 293
+#define TRAINER_COLTON 294
+#define TRAINER_MIGUEL_2 295
+#define TRAINER_MIGUEL_3 296
+#define TRAINER_MIGUEL_4 297
+#define TRAINER_MIGUEL_5 298
+#define TRAINER_VICTORIA 299
+#define TRAINER_VANESSA 300
+#define TRAINER_BETHANY 301
+#define TRAINER_ISABEL_1 302
+#define TRAINER_ISABEL_2 303
+#define TRAINER_ISABEL_3 304
+#define TRAINER_ISABEL_4 305
+#define TRAINER_ISABEL_5 306
+#define TRAINER_TIMOTHY_1 307
+#define TRAINER_TIMOTHY_2 308
+#define TRAINER_TIMOTHY_3 309
+#define TRAINER_TIMOTHY_4 310
+#define TRAINER_TIMOTHY_5 311
+#define TRAINER_VICKY 312
+#define TRAINER_SHELBY_1 313
+#define TRAINER_SHELBY_2 314
+#define TRAINER_SHELBY_3 315
+#define TRAINER_SHELBY_4 316
+#define TRAINER_SHELBY_5 317
+#define TRAINER_CALVIN_1 318
+#define TRAINER_BILLY 319
+#define TRAINER_JOSH 320
+#define TRAINER_TOMMY 321
+#define TRAINER_JOEY 322
+#define TRAINER_BEN 323
+#define TRAINER_QUINCY 324
+#define TRAINER_KATELYNN 325
+#define TRAINER_JAYLEN 326
+#define TRAINER_DILLON 327
+#define TRAINER_CALVIN_2 328
+#define TRAINER_CALVIN_3 329
+#define TRAINER_CALVIN_4 330
+#define TRAINER_CALVIN_5 331
+#define TRAINER_EDDIE 332
+#define TRAINER_ALLEN 333
+#define TRAINER_TIMMY 334
+#define TRAINER_WALLACE 335
+#define TRAINER_ANDREW 336
+#define TRAINER_IVAN 337
+#define TRAINER_CLAUDE 338
+#define TRAINER_ELLIOT_1 339
+#define TRAINER_NED 340
+#define TRAINER_DALE 341
+#define TRAINER_NOLAN 342
+#define TRAINER_BARNY 343
+#define TRAINER_WADE 344
+#define TRAINER_CARTER 345
+#define TRAINER_ELLIOT_2 346
+#define TRAINER_ELLIOT_3 347
+#define TRAINER_ELLIOT_4 348
+#define TRAINER_ELLIOT_5 349
+#define TRAINER_RONALD 350
+#define TRAINER_JACOB 351
+#define TRAINER_ANTHONY 352
+#define TRAINER_BENJAMIN_1 353
+#define TRAINER_BENJAMIN_2 354
+#define TRAINER_BENJAMIN_3 355
+#define TRAINER_BENJAMIN_4 356
+#define TRAINER_BENJAMIN_5 357
+#define TRAINER_ABIGAIL_1 358
+#define TRAINER_JASMINE 359
+#define TRAINER_ABIGAIL_2 360
+#define TRAINER_ABIGAIL_3 361
+#define TRAINER_ABIGAIL_4 362
+#define TRAINER_ABIGAIL_5 363
+#define TRAINER_DYLAN_1 364
+#define TRAINER_DYLAN_2 365
+#define TRAINER_DYLAN_3 366
+#define TRAINER_DYLAN_4 367
+#define TRAINER_DYLAN_5 368
+#define TRAINER_MARIA_1 369
+#define TRAINER_MARIA_2 370
+#define TRAINER_MARIA_3 371
+#define TRAINER_MARIA_4 372
+#define TRAINER_MARIA_5 373
+#define TRAINER_CAMDEN 374
+#define TRAINER_DEMETRIUS 375
+#define TRAINER_ISAIAH_1 376
+#define TRAINER_PABLO_1 377
+#define TRAINER_CHASE 378
+#define TRAINER_ISAIAH_2 379
+#define TRAINER_ISAIAH_3 380
+#define TRAINER_ISAIAH_4 381
+#define TRAINER_ISAIAH_5 382
+#define TRAINER_ISOBEL 383
+#define TRAINER_DONNY 384
+#define TRAINER_TALIA 385
+#define TRAINER_KATELYN_1 386
+#define TRAINER_ALLISON 387
+#define TRAINER_KATELYN_2 388
+#define TRAINER_KATELYN_3 389
+#define TRAINER_KATELYN_4 390
+#define TRAINER_KATELYN_5 391
+#define TRAINER_NICOLAS_1 392
+#define TRAINER_NICOLAS_2 393
+#define TRAINER_NICOLAS_3 394
+#define TRAINER_NICOLAS_4 395
+#define TRAINER_NICOLAS_5 396
+#define TRAINER_AARON 397
+#define TRAINER_PERRY 398
+#define TRAINER_HUGH 399
+#define TRAINER_PHIL 400
+#define TRAINER_JARED 401
+#define TRAINER_HUMBERTO 402
+#define TRAINER_PRESLEY 403
+#define TRAINER_EDWARDO 404
+#define TRAINER_COLIN 405
+#define TRAINER_ROBERT_1 406
+#define TRAINER_BENNY 407
+#define TRAINER_CHESTER 408
+#define TRAINER_ROBERT_2 409
+#define TRAINER_ROBERT_3 410
+#define TRAINER_ROBERT_4 411
+#define TRAINER_ROBERT_5 412
+#define TRAINER_ALEX 413
+#define TRAINER_BECK 414
+#define TRAINER_YASU 415
+#define TRAINER_TAKASHI 416
+#define TRAINER_DIANNE 417
+#define TRAINER_JANI 418
+#define TRAINER_LAO_1 419
+#define TRAINER_LUNG 420
+#define TRAINER_LAO_2 421
+#define TRAINER_LAO_3 422
+#define TRAINER_LAO_4 423
+#define TRAINER_LAO_5 424
+#define TRAINER_JOCELYN 425
+#define TRAINER_LAURA 426
+#define TRAINER_CYNDY_1 427
+#define TRAINER_CORA 428
+#define TRAINER_PAULA 429
+#define TRAINER_CYNDY_2 430
+#define TRAINER_CYNDY_3 431
+#define TRAINER_CYNDY_4 432
+#define TRAINER_CYNDY_5 433
+#define TRAINER_MADELINE_1 434
+#define TRAINER_CLARISSA 435
+#define TRAINER_ANGELICA 436
+#define TRAINER_MADELINE_2 437
+#define TRAINER_MADELINE_3 438
+#define TRAINER_MADELINE_4 439
+#define TRAINER_MADELINE_5 440
+#define TRAINER_BEVERLY 441
+#define TRAINER_IMANI 442
+#define TRAINER_KYLA 443
+#define TRAINER_DENISE 444
+#define TRAINER_BETH 445
+#define TRAINER_TARA 446
+#define TRAINER_MISSY 447
+#define TRAINER_ALICE 448
+#define TRAINER_JENNY_1 449
+#define TRAINER_GRACE 450
+#define TRAINER_TANYA 451
+#define TRAINER_SHARON 452
+#define TRAINER_NIKKI 453
+#define TRAINER_BRENDA 454
+#define TRAINER_KATIE 455
+#define TRAINER_SUSIE 456
+#define TRAINER_KARA 457
+#define TRAINER_DANA 458
+#define TRAINER_SIENNA 459
+#define TRAINER_DEBRA 460
+#define TRAINER_LINDA 461
+#define TRAINER_KAYLEE 462
+#define TRAINER_LAUREL 463
+#define TRAINER_CARLEE 464
+#define TRAINER_JENNY_2 465
+#define TRAINER_JENNY_3 466
+#define TRAINER_JENNY_4 467
+#define TRAINER_JENNY_5 468
+#define TRAINER_HEIDI 469
+#define TRAINER_BECKY 470
+#define TRAINER_CAROL 471
+#define TRAINER_NANCY 472
+#define TRAINER_MARTHA 473
+#define TRAINER_DIANA_1 474
+#define TRAINER_CEDRIC 475
+#define TRAINER_IRENE 476
+#define TRAINER_DIANA_2 477
+#define TRAINER_DIANA_3 478
+#define TRAINER_DIANA_4 479
+#define TRAINER_DIANA_5 480
+#define TRAINER_AMY_AND_LIV_1 481
+#define TRAINER_AMY_AND_LIV_2 482
+#define TRAINER_GINA_AND_MIA_1 483
+#define TRAINER_MIU_AND_YUKI 484
+#define TRAINER_AMY_AND_LIV_3 485
+#define TRAINER_GINA_AND_MIA_2 486
+#define TRAINER_AMY_AND_LIV_4 487
+#define TRAINER_AMY_AND_LIV_5 488
+#define TRAINER_AMY_AND_LIV_6 489
+#define TRAINER_HUEY 490
+#define TRAINER_EDMOND 491
+#define TRAINER_ERNEST_1 492
+#define TRAINER_DWAYNE 493
+#define TRAINER_PHILLIP 494
+#define TRAINER_LEONARD 495
+#define TRAINER_DUNCAN 496
+#define TRAINER_ERNEST_2 497
+#define TRAINER_ERNEST_3 498
+#define TRAINER_ERNEST_4 499
+#define TRAINER_ERNEST_5 500
+#define TRAINER_ELI 501
+#define TRAINER_ANNIKA 502
+#define TRAINER_JAZMYN 503
+#define TRAINER_JONAS 504
+#define TRAINER_KAYLEY 505
+#define TRAINER_AURON 506
+#define TRAINER_KELVIN 507
+#define TRAINER_MARLEY 508
+#define TRAINER_REYNA 509
+#define TRAINER_HUDSON 510
+#define TRAINER_CONOR 511
+#define TRAINER_EDWIN_1 512
+#define TRAINER_HECTOR 513
+#define TRAINER_TABITHA_MOSSDEEP 514
+#define TRAINER_EDWIN_2 515
+#define TRAINER_EDWIN_3 516
+#define TRAINER_EDWIN_4 517
+#define TRAINER_EDWIN_5 518
+#define TRAINER_WALLY_VR_1 519
+#define TRAINER_BRENDAN_ROUTE_103_MUDKIP 520
+#define TRAINER_BRENDAN_ROUTE_110_MUDKIP 521
+#define TRAINER_BRENDAN_ROUTE_119_MUDKIP 522
+#define TRAINER_BRENDAN_ROUTE_103_TREECKO 523
+#define TRAINER_BRENDAN_ROUTE_110_TREECKO 524
+#define TRAINER_BRENDAN_ROUTE_119_TREECKO 525
+#define TRAINER_BRENDAN_ROUTE_103_TORCHIC 526
+#define TRAINER_BRENDAN_ROUTE_110_TORCHIC 527
+#define TRAINER_BRENDAN_ROUTE_119_TORCHIC 528
+#define TRAINER_MAY_ROUTE_103_MUDKIP 529
+#define TRAINER_MAY_ROUTE_110_MUDKIP 530
+#define TRAINER_MAY_ROUTE_119_MUDKIP 531
+#define TRAINER_MAY_ROUTE_103_TREECKO 532
+#define TRAINER_MAY_ROUTE_110_TREECKO 533
+#define TRAINER_MAY_ROUTE_119_TREECKO 534
+#define TRAINER_MAY_ROUTE_103_TORCHIC 535
+#define TRAINER_MAY_ROUTE_110_TORCHIC 536
+#define TRAINER_MAY_ROUTE_119_TORCHIC 537
+#define TRAINER_ISAAC_1 538
+#define TRAINER_DAVIS 539
+#define TRAINER_MITCHELL 540
+#define TRAINER_ISAAC_2 541
+#define TRAINER_ISAAC_3 542
+#define TRAINER_ISAAC_4 543
+#define TRAINER_ISAAC_5 544
+#define TRAINER_LYDIA_1 545
+#define TRAINER_HALLE 546
+#define TRAINER_GARRISON 547
+#define TRAINER_LYDIA_2 548
+#define TRAINER_LYDIA_3 549
+#define TRAINER_LYDIA_4 550
+#define TRAINER_LYDIA_5 551
+#define TRAINER_JACKSON_1 552
+#define TRAINER_LORENZO 553
+#define TRAINER_SEBASTIAN 554
+#define TRAINER_JACKSON_2 555
+#define TRAINER_JACKSON_3 556
+#define TRAINER_JACKSON_4 557
+#define TRAINER_JACKSON_5 558
+#define TRAINER_CATHERINE_1 559
+#define TRAINER_JENNA 560
+#define TRAINER_SOPHIA 561
+#define TRAINER_CATHERINE_2 562
+#define TRAINER_CATHERINE_3 563
+#define TRAINER_CATHERINE_4 564
+#define TRAINER_CATHERINE_5 565
+#define TRAINER_JULIO 566
+#define TRAINER_GRUNT_SEAFLOOR_CAVERN_5 567
+#define TRAINER_GRUNT_UNUSED 568
+#define TRAINER_GRUNT_MT_PYRE_4 569
+#define TRAINER_GRUNT_JAGGED_PASS 570
+#define TRAINER_MARC 571
+#define TRAINER_BRENDEN 572
+#define TRAINER_LILITH 573
+#define TRAINER_CRISTIAN 574
+#define TRAINER_SYLVIA 575
+#define TRAINER_LEONARDO 576
+#define TRAINER_ATHENA 577
+#define TRAINER_HARRISON 578
+#define TRAINER_GRUNT_MT_CHIMNEY_2 579
+#define TRAINER_CLARENCE 580
+#define TRAINER_TERRY 581
+#define TRAINER_NATE 582
+#define TRAINER_KATHLEEN 583
+#define TRAINER_CLIFFORD 584
+#define TRAINER_NICHOLAS 585
+#define TRAINER_GRUNT_SPACE_CENTER_3 586
+#define TRAINER_GRUNT_SPACE_CENTER_4 587
+#define TRAINER_GRUNT_SPACE_CENTER_5 588
+#define TRAINER_GRUNT_SPACE_CENTER_6 589
+#define TRAINER_GRUNT_SPACE_CENTER_7 590
+#define TRAINER_MACEY 591
+#define TRAINER_BRENDAN_RUSTBORO_TREECKO 592
+#define TRAINER_BRENDAN_RUSTBORO_MUDKIP 593
+#define TRAINER_PAXTON 594
+#define TRAINER_ISABELLA 595
+#define TRAINER_GRUNT_WEATHER_INST_5 596
+#define TRAINER_TABITHA_MT_CHIMNEY 597
+#define TRAINER_JONATHAN 598
+#define TRAINER_BRENDAN_RUSTBORO_TORCHIC 599
+#define TRAINER_MAY_RUSTBORO_MUDKIP 600
+#define TRAINER_MAXIE_MAGMA_HIDEOUT 601
+#define TRAINER_MAXIE_MT_CHIMNEY 602
+#define TRAINER_TIANA 603
+#define TRAINER_HALEY_1 604
+#define TRAINER_JANICE 605
+#define TRAINER_VIVI 606
+#define TRAINER_HALEY_2 607
+#define TRAINER_HALEY_3 608
+#define TRAINER_HALEY_4 609
+#define TRAINER_HALEY_5 610
+#define TRAINER_SALLY 611
+#define TRAINER_ROBIN 612
+#define TRAINER_ANDREA 613
+#define TRAINER_CRISSY 614
+#define TRAINER_RICK 615
+#define TRAINER_LYLE 616
+#define TRAINER_JOSE 617
+#define TRAINER_DOUG 618
+#define TRAINER_GREG 619
+#define TRAINER_KENT 620
+#define TRAINER_JAMES_1 621
+#define TRAINER_JAMES_2 622
+#define TRAINER_JAMES_3 623
+#define TRAINER_JAMES_4 624
+#define TRAINER_JAMES_5 625
+#define TRAINER_BRICE 626
+#define TRAINER_TRENT_1 627
+#define TRAINER_LENNY 628
+#define TRAINER_LUCAS_1 629
+#define TRAINER_ALAN 630
+#define TRAINER_CLARK 631
+#define TRAINER_ERIC 632
+#define TRAINER_LUCAS_2 633
+#define TRAINER_MIKE_1 634
+#define TRAINER_MIKE_2 635
+#define TRAINER_TRENT_2 636
+#define TRAINER_TRENT_3 637
+#define TRAINER_TRENT_4 638
+#define TRAINER_TRENT_5 639
+#define TRAINER_DEZ_AND_LUKE 640
+#define TRAINER_LEA_AND_JED 641
+#define TRAINER_KIRA_AND_DAN_1 642
+#define TRAINER_KIRA_AND_DAN_2 643
+#define TRAINER_KIRA_AND_DAN_3 644
+#define TRAINER_KIRA_AND_DAN_4 645
+#define TRAINER_KIRA_AND_DAN_5 646
+#define TRAINER_JOHANNA 647
+#define TRAINER_GERALD 648
+#define TRAINER_VIVIAN 649
+#define TRAINER_DANIELLE 650
+#define TRAINER_HIDEO 651
+#define TRAINER_KEIGO 652
+#define TRAINER_RILEY 653
+#define TRAINER_FLINT 654
+#define TRAINER_ASHLEY 655
+#define TRAINER_WALLY_MAUVILLE 656
+#define TRAINER_WALLY_VR_2 657
+#define TRAINER_WALLY_VR_3 658
+#define TRAINER_WALLY_VR_4 659
+#define TRAINER_WALLY_VR_5 660
+#define TRAINER_BRENDAN_LILYCOVE_MUDKIP 661
+#define TRAINER_BRENDAN_LILYCOVE_TREECKO 662
+#define TRAINER_BRENDAN_LILYCOVE_TORCHIC 663
+#define TRAINER_MAY_LILYCOVE_MUDKIP 664
+#define TRAINER_MAY_LILYCOVE_TREECKO 665
+#define TRAINER_MAY_LILYCOVE_TORCHIC 666
+#define TRAINER_JONAH 667
+#define TRAINER_HENRY 668
+#define TRAINER_ROGER 669
+#define TRAINER_ALEXA 670
+#define TRAINER_RUBEN 671
+#define TRAINER_KOJI_1 672
+#define TRAINER_WAYNE 673
+#define TRAINER_AIDAN 674
+#define TRAINER_REED 675
+#define TRAINER_TISHA 676
+#define TRAINER_TORI_AND_TIA 677
+#define TRAINER_KIM_AND_IRIS 678
+#define TRAINER_TYRA_AND_IVY 679
+#define TRAINER_MEL_AND_PAUL 680
+#define TRAINER_JOHN_AND_JAY_1 681
+#define TRAINER_JOHN_AND_JAY_2 682
+#define TRAINER_JOHN_AND_JAY_3 683
+#define TRAINER_JOHN_AND_JAY_4 684
+#define TRAINER_JOHN_AND_JAY_5 685
+#define TRAINER_RELI_AND_IAN 686
+#define TRAINER_LILA_AND_ROY_1 687
+#define TRAINER_LILA_AND_ROY_2 688
+#define TRAINER_LILA_AND_ROY_3 689
+#define TRAINER_LILA_AND_ROY_4 690
+#define TRAINER_LILA_AND_ROY_5 691
+#define TRAINER_LISA_AND_RAY 692
+#define TRAINER_CHRIS 693
+#define TRAINER_DAWSON 694
+#define TRAINER_SARAH 695
+#define TRAINER_DARIAN 696
+#define TRAINER_HAILEY 697
+#define TRAINER_CHANDLER 698
+#define TRAINER_KALEB 699
+#define TRAINER_JOSEPH 700
+#define TRAINER_ALYSSA 701
+#define TRAINER_MARCOS 702
+#define TRAINER_RHETT 703
+#define TRAINER_TYRON 704
+#define TRAINER_CELINA 705
+#define TRAINER_BIANCA 706
+#define TRAINER_HAYDEN 707
+#define TRAINER_SOPHIE 708
+#define TRAINER_COBY 709
+#define TRAINER_LAWRENCE 710
+#define TRAINER_WYATT 711
+#define TRAINER_ANGELINA 712
+#define TRAINER_KAI 713
+#define TRAINER_CHARLOTTE 714
+#define TRAINER_DEANDRE 715
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_1 716
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_2 717
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_3 718
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_4 719
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_5 720
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_6 721
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_7 722
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_8 723
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_9 724
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_10 725
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_11 726
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_12 727
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_13 728
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_14 729
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_15 730
+#define TRAINER_GRUNT_MAGMA_HIDEOUT_16 731
+#define TRAINER_TABITHA_MAGMA_HIDEOUT 732
+#define TRAINER_DARCY 733
+#define TRAINER_MAXIE_MOSSDEEP 734
+#define TRAINER_PETE 735
+#define TRAINER_ISABELLE 736
+#define TRAINER_ANDRES_1 737
+#define TRAINER_JOSUE 738
+#define TRAINER_CAMRON 739
+#define TRAINER_CORY_1 740
+#define TRAINER_CAROLINA 741
+#define TRAINER_ELIJAH 742
+#define TRAINER_CELIA 743
+#define TRAINER_BRYAN 744
+#define TRAINER_BRANDEN 745
+#define TRAINER_BRYANT 746
+#define TRAINER_SHAYLA 747
+#define TRAINER_KYRA 748
+#define TRAINER_JAIDEN 749
+#define TRAINER_ALIX 750
+#define TRAINER_HELENE 751
+#define TRAINER_MARLENE 752
+#define TRAINER_DEVAN 753
+#define TRAINER_JOHNSON 754
+#define TRAINER_MELINA 755
+#define TRAINER_BRANDI 756
+#define TRAINER_AISHA 757
+#define TRAINER_MAKAYLA 758
+#define TRAINER_FABIAN 759
+#define TRAINER_DAYTON 760
+#define TRAINER_RACHEL 761
+#define TRAINER_LEONEL 762
+#define TRAINER_CALLIE 763
+#define TRAINER_CALE 764
+#define TRAINER_MYLES 765
+#define TRAINER_PAT 766
+#define TRAINER_CRISTIN_1 767
+#define TRAINER_MAY_RUSTBORO_TREECKO 768
+#define TRAINER_MAY_RUSTBORO_TORCHIC 769
+#define TRAINER_ROXANNE_2 770
+#define TRAINER_ROXANNE_3 771
+#define TRAINER_ROXANNE_4 772
+#define TRAINER_ROXANNE_5 773
+#define TRAINER_BRAWLY_2 774
+#define TRAINER_BRAWLY_3 775
+#define TRAINER_BRAWLY_4 776
+#define TRAINER_BRAWLY_5 777
+#define TRAINER_WATTSON_2 778
+#define TRAINER_WATTSON_3 779
+#define TRAINER_WATTSON_4 780
+#define TRAINER_WATTSON_5 781
+#define TRAINER_FLANNERY_2 782
+#define TRAINER_FLANNERY_3 783
+#define TRAINER_FLANNERY_4 784
+#define TRAINER_FLANNERY_5 785
+#define TRAINER_NORMAN_2 786
+#define TRAINER_NORMAN_3 787
+#define TRAINER_NORMAN_4 788
+#define TRAINER_NORMAN_5 789
+#define TRAINER_WINONA_2 790
+#define TRAINER_WINONA_3 791
+#define TRAINER_WINONA_4 792
+#define TRAINER_WINONA_5 793
+#define TRAINER_TATE_AND_LIZA_2 794
+#define TRAINER_TATE_AND_LIZA_3 795
+#define TRAINER_TATE_AND_LIZA_4 796
+#define TRAINER_TATE_AND_LIZA_5 797
+#define TRAINER_JUAN_2 798
+#define TRAINER_JUAN_3 799
+#define TRAINER_JUAN_4 800
+#define TRAINER_JUAN_5 801
+#define TRAINER_ANGELO 802
+#define TRAINER_DARIUS 803
+#define TRAINER_STEVEN 804
+#define TRAINER_ANABEL 805
+#define TRAINER_TUCKER 806
+#define TRAINER_SPENSER 807
+#define TRAINER_GRETA 808
+#define TRAINER_NOLAND 809
+#define TRAINER_LUCY 810
+#define TRAINER_BRANDON 811
+#define TRAINER_ANDRES_2 812
+#define TRAINER_ANDRES_3 813
+#define TRAINER_ANDRES_4 814
+#define TRAINER_ANDRES_5 815
+#define TRAINER_CORY_2 816
+#define TRAINER_CORY_3 817
+#define TRAINER_CORY_4 818
+#define TRAINER_CORY_5 819
+#define TRAINER_PABLO_2 820
+#define TRAINER_PABLO_3 821
+#define TRAINER_PABLO_4 822
+#define TRAINER_PABLO_5 823
+#define TRAINER_KOJI_2 824
+#define TRAINER_KOJI_3 825
+#define TRAINER_KOJI_4 826
+#define TRAINER_KOJI_5 827
+#define TRAINER_CRISTIN_2 828
+#define TRAINER_CRISTIN_3 829
+#define TRAINER_CRISTIN_4 830
+#define TRAINER_CRISTIN_5 831
+#define TRAINER_FERNANDO_2 832
+#define TRAINER_FERNANDO_3 833
+#define TRAINER_FERNANDO_4 834
+#define TRAINER_FERNANDO_5 835
+#define TRAINER_SAWYER_2 836
+#define TRAINER_SAWYER_3 837
+#define TRAINER_SAWYER_4 838
+#define TRAINER_SAWYER_5 839
+#define TRAINER_GABRIELLE_2 840
+#define TRAINER_GABRIELLE_3 841
+#define TRAINER_GABRIELLE_4 842
+#define TRAINER_GABRIELLE_5 843
+#define TRAINER_THALIA_2 844
+#define TRAINER_THALIA_3 845
+#define TRAINER_THALIA_4 846
+#define TRAINER_THALIA_5 847
+#define TRAINER_MARIELA 848
+#define TRAINER_ALVARO 849
+#define TRAINER_EVERETT 850
+#define TRAINER_RED 851
+#define TRAINER_LEAF 852
+#define TRAINER_BRENDAN_PLACEHOLDER 853
+#define TRAINER_MAY_PLACEHOLDER 854
-#define TRAINERS_COUNT 855
+// NOTE: Because each Trainer uses a flag to determine when they are defeated, there is only space for 9 additional trainers before trainer flag space overflows
+// More space can be made by shifting flags around in constants/flags.h or changing how trainer flags are handled
+
+#define TRAINERS_COUNT 855
+#define MAX_TRAINERS_COUNT 864
#endif // GUARD_CONSTANTS_OPPONENTS_H
diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h
new file mode 100644
index 000000000..7953967ed
--- /dev/null
+++ b/include/constants/party_menu.h
@@ -0,0 +1,132 @@
+#ifndef GUARD_CONSTANTS_PARTY_MENU_H
+#define GUARD_CONSTANTS_PARTY_MENU_H
+
+#define AILMENT_NONE 0
+#define AILMENT_PSN 1
+#define AILMENT_PRZ 2
+#define AILMENT_SLP 3
+#define AILMENT_FRZ 4
+#define AILMENT_BRN 5
+#define AILMENT_PKRS 6
+#define AILMENT_FNT 7
+
+#define TUTOR_MOVE_MEGA_PUNCH 0
+#define TUTOR_MOVE_SWORDS_DANCE 1
+#define TUTOR_MOVE_MEGA_KICK 2
+#define TUTOR_MOVE_BODY_SLAM 3
+#define TUTOR_MOVE_DOUBLE_EDGE 4
+#define TUTOR_MOVE_COUNTER 5
+#define TUTOR_MOVE_SEISMIC_TOSS 6
+#define TUTOR_MOVE_MIMIC 7
+#define TUTOR_MOVE_METRONOME 8
+#define TUTOR_MOVE_SOFT_BOILED 9
+#define TUTOR_MOVE_DREAM_EATER 10
+#define TUTOR_MOVE_THUNDER_WAVE 11
+#define TUTOR_MOVE_EXPLOSION 12
+#define TUTOR_MOVE_ROCK_SLIDE 13
+#define TUTOR_MOVE_SUBSTITUTE 14
+#define TUTOR_MOVE_DYNAMIC_PUNCH 15
+#define TUTOR_MOVE_ROLLOUT 16
+#define TUTOR_MOVE_PSYCH_UP 17
+#define TUTOR_MOVE_SNORE 18
+#define TUTOR_MOVE_ICY_WIND 19
+#define TUTOR_MOVE_ENDURE 20
+#define TUTOR_MOVE_MUD_SLAP 21
+#define TUTOR_MOVE_ICE_PUNCH 22
+#define TUTOR_MOVE_SWAGGER 23
+#define TUTOR_MOVE_SLEEP_TALK 24
+#define TUTOR_MOVE_SWIFT 25
+#define TUTOR_MOVE_DEFENSE_CURL 26
+#define TUTOR_MOVE_THUNDER_PUNCH 27
+#define TUTOR_MOVE_FIRE_PUNCH 28
+#define TUTOR_MOVE_FURY_CUTTER 29
+#define TUTOR_MOVE_COUNT 30
+
+#define PARTY_LAYOUT_SINGLE 0
+#define PARTY_LAYOUT_DOUBLE 1
+#define PARTY_LAYOUT_MULTI 2
+#define PARTY_LAYOUT_MULTI_SHOWCASE 3 // The layout during the screen that appears just before a multi battle
+#define PARTY_LAYOUT_COUNT 4
+#define KEEP_PARTY_LAYOUT 0xFF
+
+#define PARTY_MENU_TYPE_FIELD 0
+#define PARTY_MENU_TYPE_IN_BATTLE 1
+#define PARTY_MENU_TYPE_CONTEST 2
+#define PARTY_MENU_TYPE_CHOOSE_MON 3
+#define PARTY_MENU_TYPE_CHOOSE_HALF 4 // multi battles, eReader battles, and some battle facilities
+#define PARTY_MENU_TYPE_MULTI_SHOWCASE 5
+#define PARTY_MENU_TYPE_DAYCARE 6
+#define PARTY_MENU_TYPE_MOVE_RELEARNER 7
+#define PARTY_MENU_TYPE_UNION_ROOM_REGISTER 8 // trading board
+#define PARTY_MENU_TYPE_UNION_ROOM_TRADE 9 // trading board
+#define PARTY_MENU_TYPE_SPIN_TRADE 10 // Unused beta for Gen IV's Spin Trade
+#define PARTY_MENU_TYPE_MINIGAME 11
+#define PARTY_MENU_TYPE_STORE_PYRAMID_HELD_ITEMS 12
+
+#define PARTY_ACTION_CHOOSE_MON 0
+#define PARTY_ACTION_SEND_OUT 1
+#define PARTY_ACTION_CANT_SWITCH 2
+#define PARTY_ACTION_USE_ITEM 3
+#define PARTY_ACTION_ABILITY_PREVENTS 4
+#define PARTY_ACTION_GIVE_ITEM 5
+#define PARTY_ACTION_GIVE_PC_ITEM 6 // Unused. Not possible to give non-mail items directly from PC
+#define PARTY_ACTION_GIVE_MAILBOX_MAIL 7
+#define PARTY_ACTION_SWITCH 8
+#define PARTY_ACTION_SWITCHING 9
+#define PARTY_ACTION_SOFTBOILED 10
+#define PARTY_ACTION_CHOOSE_AND_CLOSE 11
+#define PARTY_ACTION_MOVE_TUTOR 12
+#define PARTY_ACTION_MINIGAME 13
+#define PARTY_ACTION_REUSABLE_ITEM 14 // Unused. The only reusable items are handled separately
+
+// IDs for DisplayPartyMenuStdMessage, to display the message at the bottom of the party menu
+#define PARTY_MSG_CHOOSE_MON 0
+#define PARTY_MSG_CHOOSE_MON_OR_CANCEL 1
+#define PARTY_MSG_CHOOSE_MON_AND_CONFIRM 2
+#define PARTY_MSG_MOVE_TO_WHERE 3
+#define PARTY_MSG_TEACH_WHICH_MON 4
+#define PARTY_MSG_USE_ON_WHICH_MON 5
+#define PARTY_MSG_GIVE_TO_WHICH_MON 6
+#define PARTY_MSG_NOTHING_TO_CUT 7
+#define PARTY_MSG_CANT_SURF_HERE 8
+#define PARTY_MSG_ALREADY_SURFING 9
+#define PARTY_MSG_CURRENT_TOO_FAST 10
+#define PARTY_MSG_ENJOY_CYCLING 11
+#define PARTY_MSG_ALREADY_IN_USE 12
+#define PARTY_MSG_CANT_USE_HERE 13
+#define PARTY_MSG_NO_MON_FOR_BATTLE 14
+#define PARTY_MSG_CHOOSE_MON_2 15
+#define PARTY_MSG_NOT_ENOUGH_HP 16
+#define PARTY_MSG_X_MONS_ARE_NEEDED 17
+#define PARTY_MSG_MONS_CANT_BE_SAME 18
+#define PARTY_MSG_NO_SAME_HOLD_ITEMS 19
+#define PARTY_MSG_UNUSED 20
+#define PARTY_MSG_DO_WHAT_WITH_MON 21
+#define PARTY_MSG_RESTORE_WHICH_MOVE 22
+#define PARTY_MSG_BOOST_PP_WHICH_MOVE 23
+#define PARTY_MSG_DO_WHAT_WITH_ITEM 24
+#define PARTY_MSG_DO_WHAT_WITH_MAIL 25
+#define PARTY_MSG_ALREADY_HOLDING_ONE 26
+#define PARTY_MSG_NONE 127
+
+// IDs for DisplayPartyPokemonDescriptionText, to display a message in the party pokemon's box
+#define PARTYBOX_DESC_NO_USE 0
+#define PARTYBOX_DESC_ABLE_3 1
+#define PARTYBOX_DESC_FIRST 2
+#define PARTYBOX_DESC_SECOND 3
+#define PARTYBOX_DESC_THIRD 4
+#define PARTYBOX_DESC_FOURTH 5
+#define PARTYBOX_DESC_ABLE 6
+#define PARTYBOX_DESC_NOT_ABLE 7
+#define PARTYBOX_DESC_ABLE_2 8
+#define PARTYBOX_DESC_NOT_ABLE_2 9
+#define PARTYBOX_DESC_LEARNED 10
+#define PARTYBOX_DESC_HAVE 11
+#define PARTYBOX_DESC_DONT_HAVE 12
+
+#define SELECTWINDOW_ACTIONS 0
+#define SELECTWINDOW_ITEM 1
+#define SELECTWINDOW_MAIL 2
+#define SELECTWINDOW_MOVES 3
+
+#endif // GUARD_CONSTANTS_PARTY_MENU_H
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 5d0e562bc..97e3f0686 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -2,87 +2,280 @@
#define GUARD_CONSTANTS_POKEMON_H
// Pokemon types
-#define TYPE_NONE 0xFF
-#define TYPE_NORMAL 0x00
-#define TYPE_FIGHTING 0x01
-#define TYPE_FLYING 0x02
-#define TYPE_POISON 0x03
-#define TYPE_GROUND 0x04
-#define TYPE_ROCK 0x05
-#define TYPE_BUG 0x06
-#define TYPE_GHOST 0x07
-#define TYPE_STEEL 0x08
-#define TYPE_MYSTERY 0x09
-#define TYPE_FIRE 0x0a
-#define TYPE_WATER 0x0b
-#define TYPE_GRASS 0x0c
-#define TYPE_ELECTRIC 0x0d
-#define TYPE_PSYCHIC 0x0e
-#define TYPE_ICE 0x0f
-#define TYPE_DRAGON 0x10
-#define TYPE_DARK 0x11
-#define NUMBER_OF_MON_TYPES 0x12
-
+#define TYPE_NONE 255
+#define TYPE_NORMAL 0
+#define TYPE_FIGHTING 1
+#define TYPE_FLYING 2
+#define TYPE_POISON 3
+#define TYPE_GROUND 4
+#define TYPE_ROCK 5
+#define TYPE_BUG 6
+#define TYPE_GHOST 7
+#define TYPE_STEEL 8
+#define TYPE_MYSTERY 9
+#define TYPE_FIRE 10
+#define TYPE_WATER 11
+#define TYPE_GRASS 12
+#define TYPE_ELECTRIC 13
+#define TYPE_PSYCHIC 14
+#define TYPE_ICE 15
+#define TYPE_DRAGON 16
+#define TYPE_DARK 17
+#define NUMBER_OF_MON_TYPES 18
// Pokemon egg groups
-#define EGG_GROUP_NONE 0
-#define EGG_GROUP_MONSTER 1
-#define EGG_GROUP_WATER_1 2
-#define EGG_GROUP_BUG 3
-#define EGG_GROUP_FLYING 4
-#define EGG_GROUP_FIELD 5
-#define EGG_GROUP_FAIRY 6
-#define EGG_GROUP_GRASS 7
-#define EGG_GROUP_HUMAN_LIKE 8
-#define EGG_GROUP_WATER_3 9
-#define EGG_GROUP_MINERAL 10
-#define EGG_GROUP_AMORPHOUS 11
-#define EGG_GROUP_WATER_2 12
-#define EGG_GROUP_DITTO 13
-#define EGG_GROUP_DRAGON 14
-#define EGG_GROUP_UNDISCOVERED 15
+#define EGG_GROUP_NONE 0
+#define EGG_GROUP_MONSTER 1
+#define EGG_GROUP_WATER_1 2
+#define EGG_GROUP_BUG 3
+#define EGG_GROUP_FLYING 4
+#define EGG_GROUP_FIELD 5
+#define EGG_GROUP_FAIRY 6
+#define EGG_GROUP_GRASS 7
+#define EGG_GROUP_HUMAN_LIKE 8
+#define EGG_GROUP_WATER_3 9
+#define EGG_GROUP_MINERAL 10
+#define EGG_GROUP_AMORPHOUS 11
+#define EGG_GROUP_WATER_2 12
+#define EGG_GROUP_DITTO 13
+#define EGG_GROUP_DRAGON 14
+#define EGG_GROUP_UNDISCOVERED 15
+
+#define EGG_GROUPS_PER_MON 2
// Pokemon natures
-#define NATURE_HARDY 0
-#define NATURE_LONELY 1
-#define NATURE_BRAVE 2
-#define NATURE_ADAMANT 3
-#define NATURE_NAUGHTY 4
-#define NATURE_BOLD 5
-#define NATURE_DOCILE 6
-#define NATURE_RELAXED 7
-#define NATURE_IMPISH 8
-#define NATURE_LAX 9
-#define NATURE_TIMID 10
-#define NATURE_HASTY 11
-#define NATURE_SERIOUS 12
-#define NATURE_JOLLY 13
-#define NATURE_NAIVE 14
-#define NATURE_MODEST 15
-#define NATURE_MILD 16
-#define NATURE_QUIET 17
-#define NATURE_BASHFUL 18
-#define NATURE_RASH 19
-#define NATURE_CALM 20
-#define NATURE_GENTLE 21
-#define NATURE_SASSY 22
-#define NATURE_CAREFUL 23
-#define NATURE_QUIRKY 24
+#define NATURE_HARDY 0
+#define NATURE_LONELY 1
+#define NATURE_BRAVE 2
+#define NATURE_ADAMANT 3
+#define NATURE_NAUGHTY 4
+#define NATURE_BOLD 5
+#define NATURE_DOCILE 6
+#define NATURE_RELAXED 7
+#define NATURE_IMPISH 8
+#define NATURE_LAX 9
+#define NATURE_TIMID 10
+#define NATURE_HASTY 11
+#define NATURE_SERIOUS 12
+#define NATURE_JOLLY 13
+#define NATURE_NAIVE 14
+#define NATURE_MODEST 15
+#define NATURE_MILD 16
+#define NATURE_QUIET 17
+#define NATURE_BASHFUL 18
+#define NATURE_RASH 19
+#define NATURE_CALM 20
+#define NATURE_GENTLE 21
+#define NATURE_SASSY 22
+#define NATURE_CAREFUL 23
+#define NATURE_QUIRKY 24
// Pokemon Stats
-#define STAT_HP 0
-#define STAT_ATK 1
-#define STAT_DEF 2
-#define STAT_SPEED 3
-#define STAT_SPATK 4
-#define STAT_SPDEF 5
-#define STAT_ACC 6 // Only in battles.
+#define STAT_HP 0
+#define STAT_ATK 1
+#define STAT_DEF 2
+#define STAT_SPEED 3
+#define STAT_SPATK 4
+#define STAT_SPDEF 5
+#define STAT_ACC 6 // Only in battles.
#define STAT_EVASION 7 // Only in battles.
-#define NUM_STATS 6
-#define NUM_BATTLE_STATS 8
+#define NUM_EV_STATS NUM_STATS - 1 // excludes HP
+#define NUM_BATTLE_STATS NUM_STATS + 2 // includes Accuracy and Evasion
// Shiny odds
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
+// Flags for Get(Box)MonData / Set(Box)MonData
+#define MON_DATA_PERSONALITY 0
+#define MON_DATA_OT_ID 1
+#define MON_DATA_NICKNAME 2
+#define MON_DATA_LANGUAGE 3
+#define MON_DATA_SANITY_IS_BAD_EGG 4
+#define MON_DATA_SANITY_HAS_SPECIES 5
+#define MON_DATA_SANITY_IS_EGG 6
+#define MON_DATA_OT_NAME 7
+#define MON_DATA_MARKINGS 8
+#define MON_DATA_CHECKSUM 9
+#define MON_DATA_ENCRYPT_SEPARATOR 10
+#define MON_DATA_SPECIES 11
+#define MON_DATA_HELD_ITEM 12
+#define MON_DATA_MOVE1 13
+#define MON_DATA_MOVE2 14
+#define MON_DATA_MOVE3 15
+#define MON_DATA_MOVE4 16
+#define MON_DATA_PP1 17
+#define MON_DATA_PP2 18
+#define MON_DATA_PP3 19
+#define MON_DATA_PP4 20
+#define MON_DATA_PP_BONUSES 21
+#define MON_DATA_COOL 22
+#define MON_DATA_BEAUTY 23
+#define MON_DATA_CUTE 24
+#define MON_DATA_EXP 25
+#define MON_DATA_HP_EV 26
+#define MON_DATA_ATK_EV 27
+#define MON_DATA_DEF_EV 28
+#define MON_DATA_SPEED_EV 29
+#define MON_DATA_SPATK_EV 30
+#define MON_DATA_SPDEF_EV 31
+#define MON_DATA_FRIENDSHIP 32
+#define MON_DATA_SMART 33
+#define MON_DATA_POKERUS 34
+#define MON_DATA_MET_LOCATION 35
+#define MON_DATA_MET_LEVEL 36
+#define MON_DATA_MET_GAME 37
+#define MON_DATA_POKEBALL 38
+#define MON_DATA_HP_IV 39
+#define MON_DATA_ATK_IV 40
+#define MON_DATA_DEF_IV 41
+#define MON_DATA_SPEED_IV 42
+#define MON_DATA_SPATK_IV 43
+#define MON_DATA_SPDEF_IV 44
+#define MON_DATA_IS_EGG 45
+#define MON_DATA_ABILITY_NUM 46
+#define MON_DATA_TOUGH 47
+#define MON_DATA_SHEEN 48
+#define MON_DATA_OT_GENDER 49
+#define MON_DATA_COOL_RIBBON 50
+#define MON_DATA_BEAUTY_RIBBON 51
+#define MON_DATA_CUTE_RIBBON 52
+#define MON_DATA_SMART_RIBBON 53
+#define MON_DATA_TOUGH_RIBBON 54
+#define MON_DATA_STATUS 55
+#define MON_DATA_LEVEL 56
+#define MON_DATA_HP 57
+#define MON_DATA_MAX_HP 58
+#define MON_DATA_ATK 59
+#define MON_DATA_DEF 60
+#define MON_DATA_SPEED 61
+#define MON_DATA_SPATK 62
+#define MON_DATA_SPDEF 63
+#define MON_DATA_MAIL 64
+#define MON_DATA_SPECIES2 65
+#define MON_DATA_IVS 66
+#define MON_DATA_CHAMPION_RIBBON 67
+#define MON_DATA_WINNING_RIBBON 68
+#define MON_DATA_VICTORY_RIBBON 69
+#define MON_DATA_ARTIST_RIBBON 70
+#define MON_DATA_EFFORT_RIBBON 71
+#define MON_DATA_GIFT_RIBBON_1 72
+#define MON_DATA_GIFT_RIBBON_2 73
+#define MON_DATA_GIFT_RIBBON_3 74
+#define MON_DATA_GIFT_RIBBON_4 75
+#define MON_DATA_GIFT_RIBBON_5 76
+#define MON_DATA_GIFT_RIBBON_6 77
+#define MON_DATA_GIFT_RIBBON_7 78
+#define MON_DATA_FATEFUL_ENCOUNTER 79
+#define MON_DATA_OBEDIENCE 80
+#define MON_DATA_KNOWN_MOVES 81
+#define MON_DATA_RIBBON_COUNT 82
+#define MON_DATA_RIBBONS 83
+#define MON_DATA_ATK2 84
+#define MON_DATA_DEF2 85
+#define MON_DATA_SPEED2 86
+#define MON_DATA_SPATK2 87
+#define MON_DATA_SPDEF2 88
+
+#define MIN_LEVEL 1
+#define MAX_LEVEL 100
+
+#define OT_ID_PLAYER_ID 0
+#define OT_ID_PRESET 1
+#define OT_ID_RANDOM_NO_SHINY 2
+
+#define MON_GIVEN_TO_PARTY 0
+#define MON_GIVEN_TO_PC 1
+#define MON_CANT_GIVE 2
+
+#define PLAYER_HAS_TWO_USABLE_MONS 0
+#define PLAYER_HAS_ONE_MON 1
+#define PLAYER_HAS_ONE_USABLE_MON 2
+
+#define MON_ALREADY_KNOWS_MOVE 0xFFFE
+#define MON_HAS_MAX_MOVES 0xFFFF
+
+#define LEVEL_UP_MOVE_ID 0x01FF
+#define LEVEL_UP_MOVE_LV 0xFE00
+#define LEVEL_UP_END 0xFFFF
+
+#define MON_MALE 0x00
+#define MON_FEMALE 0xFE
+#define MON_GENDERLESS 0xFF
+
+#define FRIENDSHIP_EVENT_GROW_LEVEL 0
+#define FRIENDSHIP_EVENT_VITAMIN 1 // unused
+#define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused
+#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 3
+#define FRIENDSHIP_EVENT_LEARN_TMHM 4
+#define FRIENDSHIP_EVENT_WALKING 5
+#define FRIENDSHIP_EVENT_FAINT_SMALL 6
+#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 7
+#define FRIENDSHIP_EVENT_FAINT_LARGE 8
+
+#define MAX_FRIENDSHIP 0xFF
+
+#define STATUS_PRIMARY_NONE 0
+#define STATUS_PRIMARY_POISON 1
+#define STATUS_PRIMARY_PARALYSIS 2
+#define STATUS_PRIMARY_SLEEP 3
+#define STATUS_PRIMARY_FREEZE 4
+#define STATUS_PRIMARY_BURN 5
+#define STATUS_PRIMARY_POKERUS 6
+#define STATUS_PRIMARY_FAINTED 7
+
+#define MAX_TOTAL_EVS 510
+#define EV_ITEM_RAISE_LIMIT 100
+
+#define UNOWN_FORM_COUNT 28
+
+// Battle move flags
+#define FLAG_MAKES_CONTACT 0x1
+#define FLAG_PROTECT_AFFECTED 0x2
+#define FLAG_MAGICCOAT_AFFECTED 0x4
+#define FLAG_SNATCH_AFFECTED 0x8
+#define FLAG_MIRROR_MOVE_AFFECTED 0x10
+#define FLAG_KINGSROCK_AFFECTED 0x20
+
+// Growth rates
+#define GROWTH_MEDIUM_FAST 0
+#define GROWTH_ERRATIC 1
+#define GROWTH_FLUCTUATING 2
+#define GROWTH_MEDIUM_SLOW 3
+#define GROWTH_FAST 4
+#define GROWTH_SLOW 5
+
+// Body colors for pokedex search
+#define BODY_COLOR_RED 0
+#define BODY_COLOR_BLUE 1
+#define BODY_COLOR_YELLOW 2
+#define BODY_COLOR_GREEN 3
+#define BODY_COLOR_BLACK 4
+#define BODY_COLOR_BROWN 5
+#define BODY_COLOR_PURPLE 6
+#define BODY_COLOR_GRAY 7
+#define BODY_COLOR_WHITE 8
+#define BODY_COLOR_PINK 9
+
+#define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80
+
+// Evolution type flags
+#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
+#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
+#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
+#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
+#define EVO_TRADE 0x0005 // Pokémon is traded
+#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
+#define EVO_ITEM 0x0007 // specified item is used on Pokémon
+#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
+#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
+#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
+#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
+#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
+#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
+#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
+#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
+
+#define EVOS_PER_MON 5
+
#endif // GUARD_CONSTANTS_POKEMON_H
diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h
new file mode 100644
index 000000000..928ca00e0
--- /dev/null
+++ b/include/constants/script_menu.h
@@ -0,0 +1,168 @@
+#ifndef GUARD_SCRIPT_MENU_CONSTANTS_H
+#define GUARD_SCRIPT_MENU_CONSTANTS_H
+
+#define MULTICHOICE(name) {name, ARRAY_COUNT(name)}
+
+#define MAX_MULTICHOICE_WIDTH 28
+
+#define MULTI_B_PRESSED 127
+
+// Multichoice Ids
+#define MULTI_BRINEY_ON_DEWFORD 0
+#define MULTI_PC 1 // Exit only, populated by CreatePCMultichoice
+#define MULTI_ENTERINFO 2
+#define MULTI_CONTEST_INFO 3
+#define MULTI_CONTEST_TYPE 4
+#define MULTI_BASE_PC_NO_REGISTRY 5
+#define MULTI_BASE_PC_WITH_REGISTRY 6
+#define MULTI_REGISTER_MENU 7
+#define MULTI_SSTIDAL_LILYCOVE 8 // Exit only, populated by CreateLilycoveSSTidalMultichoice
+#define MULTI_UNUSED_9 9
+#define MULTI_UNUSED_10 10
+#define MULTI_FRONTIER_PASS_INFO 11
+#define MULTI_BIKE 12
+#define MULTI_STATUS_INFO 13
+#define MULTI_BRINEY_OFF_DEWFORD 14
+#define MULTI_UNUSED_15 15
+#define MULTI_VIEWED_PAINTINGS 16
+#define MULTI_YESNOINFO 17
+#define MULTI_BATTLE_MODE 18
+#define MULTI_UNUSED_19 19
+#define MULTI_YESNOINFO_2 20
+#define MULTI_UNUSED_21 21
+#define MULTI_UNUSED_22 22
+#define MULTI_CHALLENGEINFO 23
+#define MULTI_LEVEL_MODE 24
+#define MULTI_MECHADOLL1_Q1 25
+#define MULTI_MECHADOLL1_Q2 26
+#define MULTI_MECHADOLL1_Q3 27
+#define MULTI_MECHADOLL2_Q1 28
+#define MULTI_MECHADOLL2_Q2 29
+#define MULTI_MECHADOLL2_Q3 30
+#define MULTI_MECHADOLL3_Q1 31
+#define MULTI_MECHADOLL3_Q2 32
+#define MULTI_MECHADOLL3_Q3 33
+#define MULTI_MECHADOLL4_Q1 34
+#define MULTI_MECHADOLL4_Q2 35
+#define MULTI_MECHADOLL4_Q3 36
+#define MULTI_MECHADOLL5_Q1 37
+#define MULTI_MECHADOLL5_Q2 38
+#define MULTI_MECHADOLL5_Q3 39
+#define MULTI_UNUSED_40 40
+#define MULTI_UNUSED_41 41
+#define MULTI_VENDING_MACHINE 42
+#define MULTI_MACH_BIKE_INFO 43
+#define MULTI_ACRO_BIKE_INFO 44
+#define MULTI_SATISFACTION 45
+#define MULTI_STERN_DEEPSEA 46
+#define MULTI_UNUSED_ASH_VENDOR 47 // Replaced by scrollable multichoice
+#define MULTI_GAME_CORNER_DOLLS 48
+#define MULTI_GAME_CORNER_COINS 49
+#define MULTI_HOWS_FISHING 50
+#define MULTI_UNUSED_51 51
+#define MULTI_SSTIDAL_SLATEPORT_WITH_BF 52
+#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
+#define MULTI_RIGHTLEFT 54
+#define MULTI_GAME_CORNER_TMS 55
+#define MULTI_SSTIDAL_SLATEPORT_NO_BF 56
+#define MULTI_FLOORS 57
+#define MULTI_SHARDS_R 58
+#define MULTI_SHARDS_Y 59
+#define MULTI_SHARDS_RY 60
+#define MULTI_SHARDS_B 61
+#define MULTI_SHARDS_RB 62
+#define MULTI_SHARDS_YB 63
+#define MULTI_SHARDS_RYB 64
+#define MULTI_SHARDS_G 65
+#define MULTI_SHARDS_RG 66
+#define MULTI_SHARDS_YG 67
+#define MULTI_SHARDS_RYG 68
+#define MULTI_SHARDS_BG 69
+#define MULTI_SHARDS_RBG 70
+#define MULTI_SHARDS_YBG 71
+#define MULTI_SHARDS_RYBG 72
+#define MULTI_TOURNEY_WITH_RECORD 73
+#define MULTI_CABLE_CLUB_NO_RECORD_MIX 74
+#define MULTI_WIRELESS_NO_RECORD_BERRY 75
+#define MULTI_CABLE_CLUB_WITH_RECORD_MIX 76
+#define MULTI_WIRELESS_NO_BERRY 77
+#define MULTI_WIRELESS_NO_RECORD 78
+#define MULTI_WIRELESS_ALL_SERVICES 79
+#define MULTI_WIRELESS_MINIGAME 80
+#define MULTI_LINK_LEADER 81
+#define MULTI_CONTEST_RANK 82
+#define MULTI_FRONTIER_ITEM_CHOOSE 83
+#define MULTI_LINK_CONTEST_INFO 84
+#define MULTI_LINK_CONTEST_MODE 85
+#define MULTI_FORCED_START_MENU 86
+#define MULTI_FRONTIER_GAMBLER_BET 87
+#define MULTI_TENT 88
+#define MULTI_UNUSED_SSTIDAL_1 89 // These 4 were replaced by CreateLilycoveSSTidalMultichoice
+#define MULTI_UNUSED_SSTIDAL_2 90 //
+#define MULTI_UNUSED_SSTIDAL_3 91 //
+#define MULTI_UNUSED_SSTIDAL_4 92 //
+#define MULTI_FOSSIL 93
+#define MULTI_YESNO 94
+#define MULTI_FRONTIER_RULES 95
+#define MULTI_BATTLE_ARENA_RULES 96
+#define MULTI_BATTLE_TOWER_RULES 97
+#define MULTI_BATTLE_DOME_RULES 98
+#define MULTI_BATTLE_FACTORY_RULES 99
+#define MULTI_BATTLE_PALACE_RULES 100
+#define MULTI_BATTLE_PYRAMID_RULES 101
+#define MULTI_BATTLE_PIKE_RULES 102
+#define MULTI_GO_ON_RECORD_REST_RETIRE 103
+#define MULTI_GO_ON_REST_RETIRE 104
+#define MULTI_GO_ON_RECORD_RETIRE 105
+#define MULTI_GO_ON_RETIRE 106
+#define MULTI_TOURNEY_NO_RECORD 107
+#define MULTI_TV_LATI 108
+#define MULTI_BATTLE_TOWER_FEELINGS 109
+#define MULTI_WHERES_RAYQUAZA 110
+#define MULTI_SLATEPORT_TENT_RULES 111
+#define MULTI_FALLARBOR_TENT_RULES 112
+#define MULTI_TAG_MATCH_TYPE 113
+
+// Lilycove SS Tidal Multichoice Selections
+#define SSTIDAL_SELECTION_SLATEPORT 0
+#define SSTIDAL_SELECTION_BATTLE_FRONTIER 1
+#define SSTIDAL_SELECTION_SOUTHERN_ISLAND 2
+#define SSTIDAL_SELECTION_NAVEL_ROCK 3
+#define SSTIDAL_SELECTION_BIRTH_ISLAND 4
+#define SSTIDAL_SELECTION_FARAWAY_ISLAND 5
+#define SSTIDAL_SELECTION_EXIT 6
+#define SSTIDAL_SELECTION_COUNT 7
+
+// Std String Ids
+#define STDSTRING_COOL 0
+#define STDSTRING_BEAUTY 1
+#define STDSTRING_CUTE 2
+#define STDSTRING_SMART 3
+#define STDSTRING_TOUGH 4
+#define STDSTRING_NORMAL 5
+#define STDSTRING_SUPER 6
+#define STDSTRING_HYPER 7
+#define STDSTRING_MASTER 8
+#define STDSTRING_COOL2 9
+#define STDSTRING_BEAUTY2 10
+#define STDSTRING_CUTE2 11
+#define STDSTRING_SMART2 12
+#define STDSTRING_TOUGH2 13
+#define STDSTRING_ITEMS 14
+#define STDSTRING_KEYITEMS 15
+#define STDSTRING_POKEBALLS 16
+#define STDSTRING_TMHMS 17
+#define STDSTRING_BERRIES 18
+#define STDSTRING_SINGLE 19
+#define STDSTRING_DOUBLE 20
+#define STDSTRING_MULTI 21
+#define STDSTRING_MULTI_LINK 22
+#define STDSTRING_BATTLE_TOWER 23
+#define STDSTRING_BATTLE_DOME 24
+#define STDSTRING_BATTLE_FACTORY 25
+#define STDSTRING_BATTLE_PALACE 26
+#define STDSTRING_BATTLE_ARENA 27
+#define STDSTRING_BATTLE_PIKE 28
+#define STDSTRING_BATTLE_PYRAMID 29
+
+#endif //GUARD_SCRIPT_MENU_CONSTANTS_H
diff --git a/include/constants/trade.h b/include/constants/trade.h
new file mode 100644
index 000000000..fa42e6b43
--- /dev/null
+++ b/include/constants/trade.h
@@ -0,0 +1,116 @@
+#ifndef GUARD_CONSTANTS_TRADE_H
+#define GUARD_CONSTANTS_TRADE_H
+
+#define TRADE_PLAYER 0
+#define TRADE_PARTNER 1
+
+#define LINK_TRADE_TIMEOUT 300
+
+// In-game Trade IDs
+#define INGAME_TRADE_SEEDOT 0
+#define INGAME_TRADE_PLUSLE 1
+#define INGAME_TRADE_HORSEA 2
+#define INGAME_TRADE_MEOWTH 3
+
+// Flag IDs for sending link data
+#define INITIATE_TRADE 1
+#define CANCEL_TRADE 2
+#define WANTS_TO_TRADE 1
+#define WANTS_TO_CANCEL 2
+#define READY_FINISH_TRADE 1
+#define FINISH_TRADE 2
+
+// Return values for CanTradeSelectedMon and CanSpinTradeMon
+#define CAN_TRADE_MON 0
+#define CANT_TRADE_LAST_MON 1
+#define CANT_TRADE_NATIONAL 2
+#define CANT_TRADE_EGG_YET 3
+#define CANT_TRADE_INVALID_MON 4
+#define CANT_TRADE_EGG_YET2 5
+
+// Return values for CheckValidityOfTradeMons
+#define PLAYER_MON_INVALID 0
+#define BOTH_MONS_VALID 1
+#define PARTNER_MON_INVALID 2
+
+// Return values for GetGameProgressForLinkTrade
+#define TRADE_BOTH_PLAYERS_READY 0
+#define TRADE_PLAYER_NOT_READY 1
+#define TRADE_PARTNER_NOT_READY 2
+
+// Indexes for sTradeActionTexts
+#define TRADE_TEXT_CANCEL 0
+#define TRADE_TEXT_CHOOSE_MON 1
+#define TRADE_TEXT_SUMMARY 2
+#define TRADE_TEXT_TRADE 3
+#define TRADE_TEXT_CANCEL_TRADE 4
+#define TRADE_TEXT_JP_QUIT 5
+
+// Checked to confirm DrawTradeMenuParty has reached final state
+#define DRAW_PARTY_FINISH 5
+
+// Message indexes for sTradeMessages
+#define TRADE_MSG_STANDBY 0
+#define TRADE_MSG_CANCELED 1
+#define TRADE_MSG_ONLY_MON1 2
+#define TRADE_MSG_ONLY_MON2 3
+#define TRADE_MSG_WAITING_FOR_FRIEND 4
+#define TRADE_MSG_FRIEND_WANTS_TO_TRADE 5
+#define TRADE_MSG_MON_CANT_BE_TRADED 6
+#define TRADE_MSG_EGG_CANT_BE_TRADED 7
+#define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8
+
+// IDs for QueueAction
+#define QUEUE_SEND_DATA 0
+#define QUEUE_STANDBY 1
+#define QUEUE_ONLY_MON1 2
+#define QUEUE_ONLY_MON2 3
+#define QUEUE_UNUSED1 4
+#define QUEUE_UNUSED2 5
+#define QUEUE_MON_CANT_BE_TRADED 6
+#define QUEUE_EGG_CANT_BE_TRADED 7
+#define QUEUE_FRIENDS_MON_CANT_BE_TRADED 8
+
+#define QUEUE_DELAY_MSG 3
+#define QUEUE_DELAY_DATA 5
+
+// IDs for CallTradeMenuFunc
+#define TRADEMENUFUNC_MAIN_MENU 0
+#define TRADEMENUFUNC_SELECTED_MON 1
+#define TRADEMENUFUNC_SHOW_MON_SUMMARY 2
+#define TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE 3
+#define TRADEMENUFUNC_CANCEL_TRADE_PROMPT 4
+#define TRADEMENUFUNC_UNUSED_5 5
+#define TRADEMENUFUNC_BOTH_MONS_SELECTED 6
+#define TRADEMENUFUNC_CONFIRM_TRADE_PROMPT 7
+#define TRADEMENUFUNC_REDRAW_MAIN_MENU 8
+#define TRADEMENUFUNC_LINK_TRADE_FADE_OUT 9
+#define TRADEMENUFUNC_LINK_TRADE_WAIT_FADE 10
+#define TRADEMENUFUNC_CANCEL_TRADE_1 11
+#define TRADEMENUFUNC_CANCEL_TRADE_2 12
+#define TRADEMENUFUNC_START_LINK_TRADE 13
+#define TRADEMENUFUNC_DELAY_TRADE_CONFIRM 14
+#define TRADEMENUFUNC_UNUSED_15 15
+#define TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE 16
+#define TRADEMENUFUNC_PARTNER_MON_INVALID 17
+#define TRADEMENUFUNC_STANDBY 100
+
+// Message indexes for sUnionRoomTradeMessages
+#define UR_TRADE_MSG_NONE 0
+#define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1
+#define UR_TRADE_MSG_NOT_EGG 2
+#define UR_TRADE_MSG_MON_CANT_BE_TRADED_1 3
+#define UR_TRADE_MSG_MON_CANT_BE_TRADED_2 4
+#define UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED 5
+#define UR_TRADE_MSG_EGG_CANT_BE_TRADED 6
+#define UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON 7
+#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 8
+#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 9
+
+// Return values for CanRegisterMonForTradingBoard
+#define CAN_REGISTER_MON 0
+#define CANT_REGISTER_MON 1
+#define CANT_REGISTER_EGG 2
+
+
+#endif //GUARD_CONSTANTS_TRADE_H
diff --git a/include/constants/trainer_hill.h b/include/constants/trainer_hill.h
index 4aae1dbbc..afbcd4ace 100644
--- a/include/constants/trainer_hill.h
+++ b/include/constants/trainer_hill.h
@@ -1,27 +1,46 @@
#ifndef GUARD_CONSTANTS_TRAINER_HILL_H
#define GUARD_CONSTANTS_TRAINER_HILL_H
-#define TRAINER_HILL_FUNC_START 0
-#define TRAINER_HILL_FUNC_1 1
-#define TRAINER_HILL_FUNC_2 2
-#define TRAINER_HILL_FUNC_3 3
-#define TRAINER_HILL_FUNC_RESUME_TIMER 4
-#define TRAINER_HILL_FUNC_SET_LOST 5
-#define TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS 6
-#define TRAINER_HILL_FUNC_7 7
-#define TRAINER_HILL_FUNC_8 8
-#define TRAINER_HILL_FUNC_9 9
-#define TRAINER_HILL_FUNC_10 10
-#define TRAINER_HILL_FUNC_11 11
-#define TRAINER_HILL_FUNC_12 12
-#define TRAINER_HILL_FUNC_13 13
-#define TRAINER_HILL_FUNC_14 14
-#define TRAINER_HILL_FUNC_15 15
-#define TRAINER_HILL_FUNC_16 16
-#define TRAINER_HILL_FUNC_SET_TAG 17
-
-// Values returned by the TrainerHillGetChallengeStatus
-// function.
+#define TRAINER_HILL_1F 1
+#define TRAINER_HILL_2F 2
+#define TRAINER_HILL_3F 3
+#define TRAINER_HILL_4F 4
+#define TRAINER_HILL_ROOF 5
+#define TRAINER_HILL_ENTRANCE 6
+
+#define NUM_TRAINER_HILL_FLOORS 4
+#define NUM_TRAINER_HILL_FLOORS_JP 2
+
+#define NUM_TRAINER_HILL_PRIZE_LISTS 10
+
+#define TRAINER_HILL_FUNC_START 0
+#define TRAINER_HILL_FUNC_GET_OWNER_STATE 1
+#define TRAINER_HILL_FUNC_GIVE_PRIZE 2
+#define TRAINER_HILL_FUNC_CHECK_FINAL_TIME 3
+#define TRAINER_HILL_FUNC_RESUME_TIMER 4
+#define TRAINER_HILL_FUNC_SET_LOST 5
+#define TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS 6
+#define TRAINER_HILL_FUNC_GET_CHALLENGE_TIME 7
+#define TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED 8
+#define TRAINER_HILL_FUNC_CLEAR_RESULT 9
+#define TRAINER_HILL_FUNC_IN_CHALLENGE 10
+#define TRAINER_HILL_FUNC_POST_BATTLE_TEXT 11
+#define TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS 12
+#define TRAINER_HILL_FUNC_GET_GAME_SAVED 13
+#define TRAINER_HILL_FUNC_SET_GAME_SAVED 14
+#define TRAINER_HILL_FUNC_CLEAR_GAME_SAVED 15
+#define TRAINER_HILL_FUNC_GET_WON 16
+#define TRAINER_HILL_FUNC_SET_TAG 17
+
+#define TRAINER_HILL_TEXT_INTRO 2
+#define TRAINER_HILL_TEXT_PLAYER_LOST 3
+#define TRAINER_HILL_TEXT_PLAYER_WON 4
+#define TRAINER_HILL_TEXT_AFTER 5
+
+#define NUM_TRAINER_HILL_TRAINERS (NUM_TRAINER_HILL_FLOORS * 2)
+#define NUM_TRAINER_HILL_TRAINERS_JP (NUM_TRAINER_HILL_FLOORS_JP * 2)
+
+// Values returned by TrainerHillGetChallengeStatus
#define TRAINER_HILL_PLAYER_STATUS_LOST 0
#define TRAINER_HILL_PLAYER_STATUS_ECARD_SCANNED 1
#define TRAINER_HILL_PLAYER_STATUS_NORMAL 2
diff --git a/include/constants/trainers.h b/include/constants/trainers.h
index c0abfe6b6..541b131ca 100644
--- a/include/constants/trainers.h
+++ b/include/constants/trainers.h
@@ -2,9 +2,11 @@
#define GUARD_TRAINERS_H
#include "constants/opponents.h"
+#include "constants/battle_frontier_trainers.h"
// Special Trainer Ids.
-#define TRAINER_RECORD_MIXING_FRIEND 300
+// 0-299 are frontier trainers
+#define TRAINER_RECORD_MIXING_FRIEND FRONTIER_TRAINERS_COUNT
#define TRAINER_RECORD_MIXING_APPRENTICE 400
#define TRAINER_EREADER 500
#define TRAINER_FRONTIER_BRAIN 1022
@@ -119,7 +121,7 @@
#define FACILITY_CLASS_HIKER 0x0
#define FACILITY_CLASS_AQUA_GRUNT_M 0x1
-#define FACILITY_CLASS_POKEMON_BREEDER_F 0x2
+#define FACILITY_CLASS_PKMN_BREEDER_F 0x2
#define FACILITY_CLASS_COOLTRAINER_M 0x3
#define FACILITY_CLASS_BIRD_KEEPER 0x4
#define FACILITY_CLASS_COLLECTOR 0x5
@@ -202,6 +204,86 @@
#define FACILITY_CLASSES_COUNT 0x52
+#define RS_FACILITY_CLASS_AQUA_LEADER_ARCHIE 0x0
+#define RS_FACILITY_CLASS_AQUA_GRUNT_M 0x1
+#define RS_FACILITY_CLASS_AQUA_GRUNT_F 0x2
+#define RS_FACILITY_CLASS_AROMA_LADY 0x3
+#define RS_FACILITY_CLASS_RUIN_MANIAC 0x4
+#define RS_FACILITY_CLASS_INTERVIEWER 0x5
+#define RS_FACILITY_CLASS_TUBER_F 0x6
+#define RS_FACILITY_CLASS_TUBER_M 0x7
+#define RS_FACILITY_CLASS_COOLTRAINER_M 0x8
+#define RS_FACILITY_CLASS_COOLTRAINER_F 0x9
+#define RS_FACILITY_CLASS_HEX_MANIAC 0xA
+#define RS_FACILITY_CLASS_LADY 0xB
+#define RS_FACILITY_CLASS_BEAUTY 0xC
+#define RS_FACILITY_CLASS_RICH_BOY 0xD
+#define RS_FACILITY_CLASS_POKEMANIAC 0xE
+#define RS_FACILITY_CLASS_SWIMMER_M 0xF
+#define RS_FACILITY_CLASS_BLACK_BELT 0x10
+#define RS_FACILITY_CLASS_GUITARIST 0x11
+#define RS_FACILITY_CLASS_KINDLER 0x12
+#define RS_FACILITY_CLASS_CAMPER 0x13
+#define RS_FACILITY_CLASS_BUG_MANIAC 0x14
+#define RS_FACILITY_CLASS_PSYCHIC_M 0x15
+#define RS_FACILITY_CLASS_PSYCHIC_F 0x16
+#define RS_FACILITY_CLASS_GENTLEMAN 0x17
+#define RS_FACILITY_CLASS_ELITE_FOUR_M 0x18
+#define RS_FACILITY_CLASS_ELITE_FOUR_F 0x19
+#define RS_FACILITY_CLASS_LEADER_F 0x1A
+#define RS_FACILITY_CLASS_LEADER_M 0x1B
+#define RS_FACILITY_CLASS_LEADER_MF 0x1C
+#define RS_FACILITY_CLASS_SCHOOL_KID_M 0x1D
+#define RS_FACILITY_CLASS_SCHOOL_KID_F 0x1E
+#define RS_FACILITY_CLASS_SR_AND_JR 0x1F
+#define RS_FACILITY_CLASS_POKEFAN_M 0x20
+#define RS_FACILITY_CLASS_POKEFAN_F 0x21
+#define RS_FACILITY_CLASS_EXPERT_M 0x22
+#define RS_FACILITY_CLASS_EXPERT_F 0x23
+#define RS_FACILITY_CLASS_YOUNGSTER 0x24
+#define RS_FACILITY_CLASS_CHAMPION 0x25
+#define RS_FACILITY_CLASS_FISHERMAN 0x26
+#define RS_FACILITY_CLASS_CYCLING_TRIATHLETE_M 0x27
+#define RS_FACILITY_CLASS_CYCLING_TRIATHLETE_F 0x28
+#define RS_FACILITY_CLASS_RUNNING_TRIATHLETE_M 0x29
+#define RS_FACILITY_CLASS_RUNNING_TRIATHLETE_F 0x2A
+#define RS_FACILITY_CLASS_SWIMMING_TRIATHLETE_M 0x2B
+#define RS_FACILITY_CLASS_SWIMMING_TRIATHLETE_F 0x2C
+#define RS_FACILITY_CLASS_DRAGON_TAMER 0x2D
+#define RS_FACILITY_CLASS_BIRD_KEEPER 0x2E
+#define RS_FACILITY_CLASS_NINJA_BOY 0x2F
+#define RS_FACILITY_CLASS_BATTLE_GIRL 0x30
+#define RS_FACILITY_CLASS_PARASOL_LADY 0x31
+#define RS_FACILITY_CLASS_SWIMMER_F 0x32
+#define RS_FACILITY_CLASS_PICNICKER 0x33
+#define RS_FACILITY_CLASS_TWINS 0x34
+#define RS_FACILITY_CLASS_SAILOR 0x35
+#define RS_FACILITY_CLASS_BOARDER_1 0x36
+#define RS_FACILITY_CLASS_BOARDER_2 0x37
+#define RS_FACILITY_CLASS_COLLECTOR 0x38
+#define RS_FACILITY_CLASS_WALLY 0x39
+#define RS_FACILITY_CLASS_BRENDAN_1 0x3A
+#define RS_FACILITY_CLASS_BRENDAN_2 0x3B
+#define RS_FACILITY_CLASS_BRENDAN_3 0x3C
+#define RS_FACILITY_CLASS_MAY_1 0x3D
+#define RS_FACILITY_CLASS_MAY_2 0x3E
+#define RS_FACILITY_CLASS_MAY_3 0x3F
+#define RS_FACILITY_CLASS_PKMN_BREEDER_M 0x40
+#define RS_FACILITY_CLASS_PKMN_BREEDER_F 0x41
+#define RS_FACILITY_CLASS_PKMN_RANGER_M 0x42
+#define RS_FACILITY_CLASS_PKMN_RANGER_F 0x43
+#define RS_FACILITY_CLASS_MAGMA_LEADER 0x44
+#define RS_FACILITY_CLASS_MAGMA_GRUNT_M 0x45
+#define RS_FACILITY_CLASS_MAGMA_GRUNT_F 0x46
+#define RS_FACILITY_CLASS_LASS 0x47
+#define RS_FACILITY_CLASS_BUG_CATCHER 0x48
+#define RS_FACILITY_CLASS_HIKER 0x49
+#define RS_FACILITY_CLASS_YOUNG_COUPLE 0x4A
+#define RS_FACILITY_CLASS_OLD_COUPLE 0x4B
+#define RS_FACILITY_CLASS_SIS_AND_BRO 0x4C
+
+#define RS_FACILITY_CLASSES_COUNT 0x4D
+
#define TRAINER_CLASS_PKMN_TRAINER_1 0x0 // Unused
#define TRAINER_CLASS_PKMN_TRAINER_2 0x1 // Unused
#define TRAINER_CLASS_HIKER 0x2
diff --git a/include/constants/tv.h b/include/constants/tv.h
new file mode 100644
index 000000000..6f686f727
--- /dev/null
+++ b/include/constants/tv.h
@@ -0,0 +1,137 @@
+#ifndef GUARD_CONSTANTS_TV_H
+#define GUARD_CONSTANTS_TV_H
+
+#define POKENEWS_NONE 0
+#define POKENEWS_SLATEPORT 1
+#define POKENEWS_GAME_CORNER 2
+#define POKENEWS_LILYCOVE 3
+#define POKENEWS_BLENDMASTER 4
+
+#define TVSHOW_OFF_AIR 0
+#define TVSHOW_FAN_CLUB_LETTER 1
+#define TVSHOW_RECENT_HAPPENINGS 2
+#define TVSHOW_PKMN_FAN_CLUB_OPINIONS 3
+#define TVSHOW_UNKN_SHOWTYPE_04 4
+#define TVSHOW_NAME_RATER_SHOW 5
+#define TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE 6
+#define TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE 7
+#define TVSHOW_CONTEST_LIVE_UPDATES 8
+#define TVSHOW_3_CHEERS_FOR_POKEBLOCKS 9
+#define TVSHOW_BATTLE_UPDATE 10
+#define TVSHOW_FAN_CLUB_SPECIAL 11
+#define TVSHOW_CONTEST_LIVE_UPDATES_2 12
+// //
+#define TVSHOW_POKEMON_TODAY_CAUGHT 21
+#define TVSHOW_SMART_SHOPPER 22
+#define TVSHOW_POKEMON_TODAY_FAILED 23
+#define TVSHOW_FISHING_ADVICE 24
+#define TVSHOW_WORLD_OF_MASTERS 25
+#define TVSHOW_TODAYS_RIVAL_TRAINER 26
+#define TVSHOW_TREND_WATCHER 27
+#define TVSHOW_TREASURE_INVESTIGATORS 28
+#define TVSHOW_FIND_THAT_GAMER 29
+#define TVSHOW_BREAKING_NEWS 30
+#define TVSHOW_SECRET_BASE_VISIT 31
+#define TVSHOW_LOTTO_WINNER 32
+#define TVSHOW_BATTLE_SEMINAR 33
+#define TVSHOW_TRAINER_FAN_CLUB 34
+#define TVSHOW_CUTIES 35
+#define TVSHOW_FRONTIER 36
+#define TVSHOW_NUMBER_ONE 37
+#define TVSHOW_SECRET_BASE_SECRETS 38
+#define TVSHOW_SAFARI_FAN_CLUB 39
+// //
+#define TVSHOW_MASS_OUTBREAK 41
+
+// Number of ribbons to put Spot the Cuties on air
+#define NUM_CUTIES_RIBBONS 4
+
+// TV Show states for Secret Base Secrets
+#define SBSECRETS_STATE_INTRO 0
+#define SBSECRETS_STATE_DO_NEXT1 1
+#define SBSECRETS_STATE_DO_NEXT2 2
+#define SBSECRETS_STATE_TOOK_X_STEPS 3
+#define SBSECRETS_STATE_BASE_INTEREST_LOW 4
+#define SBSECRETS_STATE_BASE_INTEREST_MED 5
+#define SBSECRETS_STATE_BASE_INTEREST_HIGH 6
+#define SBSECRETS_STATE_OUTRO 7
+#define SBSECRETS_STATE_NOTHING_USED1 8
+#define SBSECRETS_STATE_NOTHING_USED2 9
+#define SBSECRETS_STATE_USED_CHAIR 10
+#define SBSECRETS_STATE_USED_BALLOON 11
+#define SBSECRETS_STATE_USED_TENT 12
+#define SBSECRETS_STATE_USED_PLANT 13
+#define SBSECRETS_STATE_USED_GOLD_SHIELD 14
+#define SBSECRETS_STATE_USED_SILVER_SHIELD 15
+#define SBSECRETS_STATE_USED_GLASS_ORNAMENT 16
+#define SBSECRETS_STATE_USED_TV 17
+#define SBSECRETS_STATE_USED_MUD_BALL 18
+#define SBSECRETS_STATE_USED_BAG 19
+#define SBSECRETS_STATE_USED_CUSHION 20
+#define SBSECRETS_STATE_HIT_CUSHION 21
+#define SBSECRETS_STATE_HUGGED_CUSHION 22
+#define SBSECRETS_STATE_BATTLED_WON 23
+#define SBSECRETS_STATE_BATTLED_LOST 24
+#define SBSECRETS_STATE_DECLINED_BATTLE 25
+#define SBSECRETS_STATE_USED_POSTER 26
+#define SBSECRETS_STATE_USED_NOTE_MAT 27
+#define SBSECRETS_STATE_BATTLED_DRAW 28
+#define SBSECRETS_STATE_USED_SPIN_MAT 29
+#define SBSECRETS_STATE_USED_SAND_ORNAMENT 30
+#define SBSECRETS_STATE_USED_DESK 31
+#define SBSECRETS_STATE_USED_BRICK 32
+#define SBSECRETS_STATE_USED_SOLID_BOARD 33
+#define SBSECRETS_STATE_USED_FENCE 34
+#define SBSECRETS_STATE_USED_GLITTER_MAT 35
+#define SBSECRETS_STATE_USED_TIRE 36
+#define SBSECRETS_STATE_USED_STAND 37
+#define SBSECRETS_STATE_USED_BREAKABLE_DOOR 38
+#define SBSECRETS_STATE_USED_DOLL 39
+#define SBSECRETS_STATE_USED_SLIDE 40
+#define SBSECRETS_STATE_DECLINED_SLIDE 41
+#define SBSECRETS_STATE_USED_JUMP_MAT 42
+#define SBSECRETS_NUM_STATES 43
+
+// The below flags are set when interacting with objects in a friends secret base
+// Theyre set as bits in a var, and with 32 flags they're spread across 2 vars
+
+// VAR_SECRET_BASE_LOW_TV_FLAGS
+#define SECRET_BASE_USED_CHAIR (1 << 0)
+#define SECRET_BASE_USED_BALLOON (1 << 1)
+#define SECRET_BASE_USED_TENT (1 << 2)
+#define SECRET_BASE_USED_PLANT (1 << 3)
+#define SECRET_BASE_USED_GOLD_SHIELD (1 << 4)
+#define SECRET_BASE_USED_SILVER_SHIELD (1 << 5)
+#define SECRET_BASE_USED_GLASS_ORNAMENT (1 << 6)
+#define SECRET_BASE_USED_TV (1 << 7)
+#define SECRET_BASE_USED_MUD_BALL (1 << 8)
+#define SECRET_BASE_USED_BAG (1 << 9)
+#define SECRET_BASE_USED_CUSHION (1 << 10)
+#define SECRET_BASE_BATTLED_WON (1 << 11)
+#define SECRET_BASE_BATTLED_LOST (1 << 12)
+#define SECRET_BASE_DECLINED_BATTLE (1 << 13)
+#define SECRET_BASE_USED_POSTER (1 << 14)
+#define SECRET_BASE_USED_NOTE_MAT (1 << 15)
+
+// VAR_SECRET_BASE_HIGH_TV_FLAGS
+#define SECRET_BASE_BATTLED_DRAW (1 << 0)
+#define SECRET_BASE_USED_SPIN_MAT (1 << 1)
+#define SECRET_BASE_USED_SAND_ORNAMENT (1 << 2)
+#define SECRET_BASE_USED_DESK (1 << 3)
+#define SECRET_BASE_USED_BRICK (1 << 4)
+#define SECRET_BASE_USED_SOLID_BOARD (1 << 5)
+#define SECRET_BASE_USED_FENCE (1 << 6)
+#define SECRET_BASE_USED_GLITTER_MAT (1 << 7)
+#define SECRET_BASE_USED_TIRE (1 << 8)
+#define SECRET_BASE_USED_STAND (1 << 9)
+#define SECRET_BASE_USED_BREAKABLE_DOOR (1 << 10)
+#define SECRET_BASE_USED_DOLL (1 << 11)
+#define SECRET_BASE_USED_SLIDE (1 << 12)
+#define SECRET_BASE_DECLINED_SLIDE (1 << 13)
+#define SECRET_BASE_USED_JUMP_MAT (1 << 14)
+#define SECRET_BASE_UNUSED_FLAG (1 << 15)
+
+#define NUM_SECRET_BASE_FLAGS 32 // by definition, bitfield of 2 u16s
+
+
+#endif //GUARD_CONSTANTS_TV_H
diff --git a/include/constants/union_room.h b/include/constants/union_room.h
new file mode 100644
index 000000000..2314f85a0
--- /dev/null
+++ b/include/constants/union_room.h
@@ -0,0 +1,28 @@
+#ifndef GUARD_CONSTANTS_UNION_ROOM_H
+#define GUARD_CONSTANTS_UNION_ROOM_H
+
+#define LINK_GROUP_SINGLE_BATTLE 0
+#define LINK_GROUP_DOUBLE_BATTLE 1
+#define LINK_GROUP_MULTI_BATTLE 2
+#define LINK_GROUP_TRADE 3
+#define LINK_GROUP_POKEMON_JUMP 4
+#define LINK_GROUP_BERRY_CRUSH 5
+#define LINK_GROUP_BERRY_PICKING 6
+#define LINK_GROUP_WONDER_CARD 7
+#define LINK_GROUP_WONDER_NEWS 8
+#define LINK_GROUP_UNK_9 9
+#define LINK_GROUP_UNK_10 10
+#define LINK_GROUP_UNK_11 11
+#define LINK_GROUP_RECORD_CORNER 12
+#define LINK_GROUP_BERRY_BLENDER 13
+#define LINK_GROUP_UNK_14 14
+#define LINK_GROUP_COOL_CONTEST 15
+#define LINK_GROUP_BEAUTY_CONTEST 16
+#define LINK_GROUP_CUTE_CONTEST 17
+#define LINK_GROUP_SMART_CONTEST 18
+#define LINK_GROUP_TOUGH_CONTEST 19
+#define LINK_GROUP_BATTLE_TOWER 20
+#define LINK_GROUP_BATTLE_TOWER_OPEN 21
+#define NUM_LINK_GROUP_TYPES 22
+
+#endif //GUARD_CONSTANTS_UNION_ROOM_H
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 6b213c8cc..7f622b6e3 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -5,22 +5,24 @@
// temporary vars
// The first 0x10 vars are are temporary--they are cleared every time a map is loaded.
-#define VAR_TEMP_0 0x4000
-#define VAR_TEMP_1 0x4001
-#define VAR_TEMP_2 0x4002
-#define VAR_TEMP_3 0x4003
-#define VAR_TEMP_4 0x4004
-#define VAR_TEMP_5 0x4005
-#define VAR_TEMP_6 0x4006
-#define VAR_TEMP_7 0x4007
-#define VAR_TEMP_8 0x4008
-#define VAR_TEMP_9 0x4009
-#define VAR_TEMP_A 0x400A
-#define VAR_TEMP_B 0x400B
-#define VAR_TEMP_C 0x400C
-#define VAR_TEMP_D 0x400D
-#define VAR_TEMP_E 0x400E
-#define VAR_TEMP_F 0x400F
+#define TEMP_VARS_START 0x4000
+#define VAR_TEMP_0 (TEMP_VARS_START + 0x0)
+#define VAR_TEMP_1 (TEMP_VARS_START + 0x1)
+#define VAR_TEMP_2 (TEMP_VARS_START + 0x2)
+#define VAR_TEMP_3 (TEMP_VARS_START + 0x3)
+#define VAR_TEMP_4 (TEMP_VARS_START + 0x4)
+#define VAR_TEMP_5 (TEMP_VARS_START + 0x5)
+#define VAR_TEMP_6 (TEMP_VARS_START + 0x6)
+#define VAR_TEMP_7 (TEMP_VARS_START + 0x7)
+#define VAR_TEMP_8 (TEMP_VARS_START + 0x8)
+#define VAR_TEMP_9 (TEMP_VARS_START + 0x9)
+#define VAR_TEMP_A (TEMP_VARS_START + 0xA)
+#define VAR_TEMP_B (TEMP_VARS_START + 0xB)
+#define VAR_TEMP_C (TEMP_VARS_START + 0xC)
+#define VAR_TEMP_D (TEMP_VARS_START + 0xD)
+#define VAR_TEMP_E (TEMP_VARS_START + 0xE)
+#define VAR_TEMP_F (TEMP_VARS_START + 0xF)
+#define TEMP_VARS_END VAR_TEMP_F
// object gfx id vars
// These 0x10 vars are used to dynamically control a map object's sprite.
@@ -61,26 +63,26 @@
#define VAR_0x402E 0x402E
#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
-#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030
-#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031
+#define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030
+#define VAR_FRONTIER_GAMBLER_SET_CHALLENGE 0x4031
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
-#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033
+#define VAR_FRONTIER_GAMBLER_STATE 0x4033
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
-#define VAR_STORAGE_UNKNOWN 0x4036
-#define VAR_UNUSUAL_WEATHER_LOCATION 0x4037
-#define VAR_UNUSUAL_WEATHER_STEP_COUNTER 0x4038
-#define VAR_SHOULD_END_UNUSUAL_WEATHER 0x4039
+#define VAR_PC_BOX_TO_SEND_MON 0x4036
+#define VAR_ABNORMAL_WEATHER_LOCATION 0x4037
+#define VAR_ABNORMAL_WEATHER_STEP_COUNTER 0x4038
+#define VAR_SHOULD_END_ABNORMAL_WEATHER 0x4039
#define VAR_FARAWAY_ISLAND_STEP_COUNTER 0x403A
#define VAR_REGICE_STEPS_1 0x403B
#define VAR_REGICE_STEPS_2 0x403C
#define VAR_REGICE_STEPS_3 0x403D
#define VAR_ALTERING_CAVE_WILD_SET 0x403E
-#define VAR_ALWAYS_ZERO_0x403F 0x403F // This var is read and written, but is always zero.
+#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. The only way to obtain the Eon Ticket in Emerald is via Record Mixing
#define VAR_DAYS 0x4040
-#define VAR_FANCLUB_UNKNOWN_1 0x4041
-#define VAR_FANCLUB_UNKNOWN_2 0x4042
+#define VAR_FANCLUB_FAN_COUNTER 0x4041
+#define VAR_FANCLUB_LOSE_FAN_TIMER 0x4042
#define VAR_DEPT_STORE_FLOOR 0x4043
#define VAR_TRICK_HOUSE_LEVEL 0x4044
#define VAR_POKELOT_PRIZE_ITEM 0x4045
@@ -144,17 +146,17 @@
#define VAR_ROUTE132_STATE 0x407F // Unused Var
#define VAR_ROUTE133_STATE 0x4080 // Unused Var
#define VAR_ROUTE134_STATE 0x4081 // Unused Var
-#define VAR_LITTLEROOT_HOUSES_STATE 0x4082
+#define VAR_LITTLEROOT_HOUSES_STATE_MAY 0x4082
#define VAR_UNUSED_0x4083 0x4083 // Unused Var
#define VAR_BIRCH_LAB_STATE 0x4084
-#define VAR_PETALBURG_GYM_STATE 0x4085
-#define VAR_LINK_CONTEST_ROOM_STATE 0x4086
+#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman
+#define VAR_CONTEST_HALL_STATE 0x4086
#define VAR_CABLE_CLUB_STATE 0x4087
-#define VAR_CONTEST_LOCATION 0x4088
+#define VAR_CONTEST_TYPE 0x4088
#define VAR_SECRET_BASE_INITIALIZED 0x4089
#define VAR_CONTEST_PRIZE_PICKUP 0x408A
#define VAR_UNUSED_0x408B 0x408B // Unused Var
-#define VAR_LITTLEROOT_HOUSES_STATE_2 0x408C
+#define VAR_LITTLEROOT_HOUSES_STATE_BRENDAN 0x408C
#define VAR_LITTLEROOT_RIVAL_STATE 0x408D
#define VAR_BOARD_BRINEY_BOAT_STATE 0x408E
#define VAR_DEVON_CORP_3F_STATE 0x408F
@@ -172,16 +174,16 @@
#define VAR_UNUSED_0x409B 0x409B // Unused Var
#define VAR_ELITE_4_STATE 0x409C
#define VAR_UNUSED_0x409D 0x409D // Unused Var
-#define VAR_MOSSDEEP_SPACE_CENTER_STATE_1 0x409E
-#define VAR_MOSSDEEP_SPACE_CENTER_STATE_2 0x409F
+#define VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE 0x409E
+#define VAR_MOSSDEEP_SPACE_CENTER_STATE 0x409F
#define VAR_SLATEPORT_HARBOR_STATE 0x40A0
#define VAR_UNUSED_0x40A1 0x40A1 // Unused var
#define VAR_SEAFLOOR_CAVERN_STATE 0x40A2
#define VAR_CABLE_CAR_STATION_STATE 0x40A3
-#define VAR_SAFARI_ZONE_STATE 0x40A4
-#define VAR_TRICK_HOUSE_ENTRANCE_STATE_1 0x40A5
-#define VAR_TRICK_HOUSE_ENTRANCE_STATE_2 0x40A6
-#define VAR_TRICK_HOUSE_ENTRANCE_STATE_3 0x40A7
+#define VAR_SAFARI_ZONE_STATE 0x40A4 // 0: In or out of SZ, 1: Player exiting SZ, 2: Player entering SZ
+#define VAR_TRICK_HOUSE_BEING_WATCHED_STATE 0x40A5
+#define VAR_TRICK_HOUSE_FOUND_TRICK_MASTER 0x40A6
+#define VAR_TRICK_HOUSE_ENTRANCE_STATE 0x40A7
#define VAR_UNUSED_0x40A8 0x40A8 // Unused Var
#define VAR_CYCLING_CHALLENGE_STATE 0x40A9
#define VAR_SLATEPORT_MUSEUM_1F_STATE 0x40AA
@@ -194,9 +196,9 @@
#define VAR_TRICK_HOUSE_PUZZLE_7_STATE 0x40B1
#define VAR_TRICK_HOUSE_PUZZLE_8_STATE 0x40B2
#define VAR_WEATHER_INSTITUTE_STATE 0x40B3
-#define VAR_PORTHOLE_STATE 0x40B4
-#define VAR_TRICK_HOUSE_STATE 0x40B5 // TODO: needs some further investigation
-#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6
+#define VAR_SS_TIDAL_STATE 0x40B4
+#define VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR 0x40B5
+#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6 // Leftover from RS, never set
#define VAR_SLATEPORT_FAN_CLUB_STATE 0x40B7
#define VAR_UNUSED_0x40B8 0x40B8 // Unused Var
#define VAR_MT_PYRE_STATE 0x40B9
@@ -257,9 +259,9 @@
#define VAR_SECRET_BASE_IS_NOT_LOCAL 0x40F0 // Set to TRUE while in another player's secret base.
#define VAR_DAILY_BP 0x40F1
#define VAR_WALLY_CALL_STEP_COUNTER 0x40F2
-#define VAR_WINONA_CALL_STEP_COUNTER 0x40F3
+#define VAR_SCOTT_FORTREE_CALL_STEP_COUNTER 0x40F3
#define VAR_ROXANNE_CALL_STEP_COUNTER 0x40F4
-#define VAR_SCOTT_CALL_STEP_COUNTER 0x40F5
+#define VAR_SCOTT_BF_CALL_STEP_COUNTER 0x40F5
#define VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER 0x40F6
#define VAR_UNUSED_0x40F7 0x40F7 // Unused Var
#define VAR_UNUSED_0x40F8 0x40F8 // Unused Var
@@ -271,7 +273,9 @@
#define VAR_UNUSED_0x40FE 0x40FE // Unused Var
#define VAR_UNUSED_0x40FF 0x40FF // Unused Var
-#define SPECIAL_VARS_START 0x8000
+#define VARS_END 0x40FF
+
+#define SPECIAL_VARS_START 0x8000
// special vars
// They are commonly used as parameters to commands, or return values from commands.
#define VAR_0x8000 0x8000
@@ -297,4 +301,6 @@
#define VAR_UNUSED_0x8014 0x8014
#define VAR_TRAINER_BATTLE_OPPONENT_A 0x8015 // Alias of gTrainerBattleOpponent_A
+#define SPECIAL_VARS_END 0x8015
+
#endif // GUARD_CONSTANTS_VARS_H
diff --git a/include/constants/weather.h b/include/constants/weather.h
index b01cfb390..98a0a2e1e 100644
--- a/include/constants/weather.h
+++ b/include/constants/weather.h
@@ -1,66 +1,66 @@
#ifndef GUARD_CONSTANTS_WEATHER_H
#define GUARD_CONSTANTS_WEATHER_H
-#define WEATHER_NONE 0
-#define WEATHER_CLOUDS 1
-#define WEATHER_SUNNY 2
-#define WEATHER_RAIN_LIGHT 3
-#define WEATHER_SNOW 4
-#define WEATHER_RAIN_MED 5
-#define WEATHER_FOG_1 6
-#define WEATHER_ASH 7
-#define WEATHER_SANDSTORM 8
-#define WEATHER_FOG_2 9
-#define WEATHER_FOG_3 10
-#define WEATHER_SHADE 11
-#define WEATHER_DROUGHT 12
-#define WEATHER_RAIN_HEAVY 13
-#define WEATHER_BUBBLES 14
-#define WEATHER_ALTERNATING 15
-#define WEATHER_ROUTE119_CYCLE 20
-#define WEATHER_ROUTE123_CYCLE 21
+#define WEATHER_NONE 0
+#define WEATHER_SUNNY_CLOUDS 1
+#define WEATHER_SUNNY 2
+#define WEATHER_RAIN 3
+#define WEATHER_SNOW 4 // Unused
+#define WEATHER_RAIN_THUNDERSTORM 5
+#define WEATHER_FOG_HORIZONTAL 6
+#define WEATHER_VOLCANIC_ASH 7
+#define WEATHER_SANDSTORM 8
+#define WEATHER_FOG_DIAGONAL 9 // Unused
+#define WEATHER_UNDERWATER 10 // Unused
+#define WEATHER_SHADE 11 // Original name was closer to WEATHER_CLOUDY/OVERCAST
+#define WEATHER_DROUGHT 12
+#define WEATHER_DOWNPOUR 13
+#define WEATHER_UNDERWATER_BUBBLES 14
+#define WEATHER_ABNORMAL 15 // The alternating weather during Groudon/Kyogre conflict
+#define WEATHER_ROUTE119_CYCLE 20
+#define WEATHER_ROUTE123_CYCLE 21
// These are used in maps' coord_weather_event entries.
// They are not a one-to-one mapping with the engine's
// internal weather constants above.
-#define COORD_EVENT_WEATHER_CLOUDS 1
-#define COORD_EVENT_WEATHER_SUNNY 2
-#define COORD_EVENT_WEATHER_RAIN_LIGHT 3
-#define COORD_EVENT_WEATHER_SNOW 4
-#define COORD_EVENT_WEATHER_RAIN_MED 5
-#define COORD_EVENT_WEATHER_FOG_1 6
-#define COORD_EVENT_WEATHER_FOG_2 7
-#define COORD_EVENT_WEATHER_ASH 8
-#define COORD_EVENT_WEATHER_SANDSTORM 9
-#define COORD_EVENT_WEATHER_SHADE 10
-#define COORD_EVENT_WEATHER_DROUGHT 11
-#define COORD_EVENT_WEATHER_ROUTE119_CYCLE 20
-#define COORD_EVENT_WEATHER_ROUTE123_CYCLE 21
+#define COORD_EVENT_WEATHER_SUNNY_CLOUDS 1
+#define COORD_EVENT_WEATHER_SUNNY 2
+#define COORD_EVENT_WEATHER_RAIN 3
+#define COORD_EVENT_WEATHER_SNOW 4
+#define COORD_EVENT_WEATHER_RAIN_THUNDERSTORM 5
+#define COORD_EVENT_WEATHER_FOG_HORIZONTAL 6
+#define COORD_EVENT_WEATHER_FOG_DIAGONAL 7
+#define COORD_EVENT_WEATHER_VOLCANIC_ASH 8
+#define COORD_EVENT_WEATHER_SANDSTORM 9
+#define COORD_EVENT_WEATHER_SHADE 10
+#define COORD_EVENT_WEATHER_DROUGHT 11
+#define COORD_EVENT_WEATHER_ROUTE119_CYCLE 20
+#define COORD_EVENT_WEATHER_ROUTE123_CYCLE 21
-// These are the "unusual weather events" that are used
+// These are the "abnormal weather events" that are used
// to find Kyogre and Groudon.
-#define UNUSUAL_WEATHER_COUNT_PER_LEGENDARY 8
-#define UNUSUAL_WEATHER_GROUDON_LOCATIONS_START 1
-#define UNUSUAL_WEATHER_KYOGRE_LOCATIONS_START 1 + UNUSUAL_WEATHER_COUNT_PER_LEGENDARY
+#define ABNORMAL_WEATHER_COUNT_PER_LEGENDARY 8
+#define ABNORMAL_WEATHER_GROUDON_LOCATIONS_START 1
+#define ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START 1 + ABNORMAL_WEATHER_COUNT_PER_LEGENDARY
-#define UNUSUAL_WEATHER_NONE 0
+#define ABNORMAL_WEATHER_NONE 0
// Groudon locations
-#define UNUSUAL_WEATHER_ROUTE_114_NORTH 1
-#define UNUSUAL_WEATHER_ROUTE_114_SOUTH 2
-#define UNUSUAL_WEATHER_ROUTE_115_WEST 3
-#define UNUSUAL_WEATHER_ROUTE_115_EAST 4
-#define UNUSUAL_WEATHER_ROUTE_116_NORTH 5
-#define UNUSUAL_WEATHER_ROUTE_116_SOUTH 6
-#define UNUSUAL_WEATHER_ROUTE_118_EAST 7
-#define UNUSUAL_WEATHER_ROUTE_118_WEST 8
+#define ABNORMAL_WEATHER_ROUTE_114_NORTH 1
+#define ABNORMAL_WEATHER_ROUTE_114_SOUTH 2
+#define ABNORMAL_WEATHER_ROUTE_115_WEST 3
+#define ABNORMAL_WEATHER_ROUTE_115_EAST 4
+#define ABNORMAL_WEATHER_ROUTE_116_NORTH 5
+#define ABNORMAL_WEATHER_ROUTE_116_SOUTH 6
+#define ABNORMAL_WEATHER_ROUTE_118_EAST 7
+#define ABNORMAL_WEATHER_ROUTE_118_WEST 8
// Kyogre locations
-#define UNUSUAL_WEATHER_ROUTE_105_NORTH 9
-#define UNUSUAL_WEATHER_ROUTE_105_SOUTH 10
-#define UNUSUAL_WEATHER_ROUTE_125_WEST 11
-#define UNUSUAL_WEATHER_ROUTE_125_EAST 12
-#define UNUSUAL_WEATHER_ROUTE_127_NORTH 13
-#define UNUSUAL_WEATHER_ROUTE_127_SOUTH 14
-#define UNUSUAL_WEATHER_ROUTE_129_WEST 15
-#define UNUSUAL_WEATHER_ROUTE_129_EAST 16
+#define ABNORMAL_WEATHER_ROUTE_105_NORTH 9
+#define ABNORMAL_WEATHER_ROUTE_105_SOUTH 10
+#define ABNORMAL_WEATHER_ROUTE_125_WEST 11
+#define ABNORMAL_WEATHER_ROUTE_125_EAST 12
+#define ABNORMAL_WEATHER_ROUTE_127_NORTH 13
+#define ABNORMAL_WEATHER_ROUTE_127_SOUTH 14
+#define ABNORMAL_WEATHER_ROUTE_129_WEST 15
+#define ABNORMAL_WEATHER_ROUTE_129_EAST 16
#endif // GUARD_CONSTANTS_WEATHER_H
diff --git a/include/contest.h b/include/contest.h
index 8ef208aea..00c3191eb 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -201,14 +201,6 @@ enum
};
enum {
- CONTEST_RANK_NORMAL,
- CONTEST_RANK_SUPER,
- CONTEST_RANK_HYPER,
- CONTEST_RANK_MASTER,
- CONTEST_RANK_LINK
-};
-
-enum {
CONTEST_FILTER_NONE,
CONTEST_FILTER_NO_POSTGAME,
CONTEST_FILTER_ONLY_POSTGAME
@@ -227,7 +219,7 @@ struct ContestPokemon
u8 aiPool_Cute:1; // 0x10
u8 aiPool_Smart:1; // 0x20
u8 aiPool_Tough:1; // 0x40
- /*0x1E*/ u16 moves[4]; // moves
+ /*0x1E*/ u16 moves[MAX_MON_MOVES]; // moves
/*0x26*/ u8 cool; // cool
/*0x27*/ u8 beauty; // beauty
/*0x28*/ u8 cute; // cute
@@ -436,15 +428,15 @@ struct ContestResources
#define eContestDebugMode (gHeap[0x1a000])
#define eUnknownHeap1A004 (*(struct Shared1A004 *)(gHeap + 0x1a004))
-extern struct ContestPokemon gContestMons[4];
-extern s16 gContestMonConditions[4];
-extern s16 gUnknown_02039F08[4];
-extern s16 gUnknown_02039F10[4];
-extern s16 gUnknown_02039F18[4];
-extern u8 gContestFinalStandings[4];
+extern struct ContestPokemon gContestMons[CONTESTANT_COUNT];
+extern s16 gContestMonConditions[CONTESTANT_COUNT];
+extern s16 gUnknown_02039F08[CONTESTANT_COUNT];
+extern s16 gUnknown_02039F10[CONTESTANT_COUNT];
+extern s16 gUnknown_02039F18[CONTESTANT_COUNT];
+extern u8 gContestFinalStandings[CONTESTANT_COUNT];
extern u8 gContestMonPartyIndex;
extern u8 gContestPlayerMonIndex;
-extern u8 gContestantTurnOrder[4];
+extern u8 gContestantTurnOrder[CONTESTANT_COUNT];
extern u8 gLinkContestFlags;
extern u8 gUnknown_02039F2B;
extern u16 gSpecialVar_ContestCategory;
@@ -453,7 +445,7 @@ extern u8 gNumLinkContestPlayers;
extern u8 gHighestRibbonRank;
extern struct ContestResources *gContestResources;
extern u8 sContestBgCopyFlags;
-extern struct ContestWinner gUnknown_02039F3C;
+extern struct ContestWinner gCurContestWinner;
extern u8 gUnknown_02039F5C;
extern u8 gUnknown_02039F5D;
@@ -466,7 +458,7 @@ void CB2_StartContest(void);
void sub_80DA8C8(u8 partyIndex);
void sub_80DAB8C(u8 contestType, u8 rank);
void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame);
-u8 sub_80DAE0C(struct Pokemon *pkmn);
+u8 GetContestEntryEligibility(struct Pokemon *pkmn);
void sub_80DB09C(u8 contestCategory);
bool8 IsSpeciesNotUnown(u16 species);
bool8 Contest_IsMonsTurnDisabled(u8 a);
diff --git a/include/contest_link_80F57C4.h b/include/contest_link_80F57C4.h
index b4ccf2803..add3ae62f 100644
--- a/include/contest_link_80F57C4.h
+++ b/include/contest_link_80F57C4.h
@@ -1,10 +1,10 @@
#ifndef GUARD_CONTEST_LINK_80F57C4_H
#define GUARD_CONTEST_LINK_80F57C4_H
-void sub_80F8264(void);
-void sub_80F8290(void);
-void sub_80F840C(void);
-void sub_80F8438(void);
+void BufferContestantTrainerName(void);
+void BufferContestantMonNickname(void);
+void StartContest(void);
+void BufferContestantMonSpecies(void);
void sub_80F8484(void);
void sub_80F84C4(u8);
void sub_80FC998(u8 taskId);
diff --git a/include/contest_painting.h b/include/contest_painting.h
index c633c50cc..f16a0d2f3 100644
--- a/include/contest_painting.h
+++ b/include/contest_painting.h
@@ -1,16 +1,7 @@
#ifndef GUARD_CONTESTPAINTING_H
#define GUARD_CONTESTPAINTING_H
-enum
-{
- CONTESTRESULT_COOL = 9,
- CONTESTRESULT_BEAUTY = 13,
- CONTESTRESULT_CUTE = 2,
- CONTESTRESULT_SMART = 36,
- CONTESTRESULT_TOUGH = 6,
-};
-
-void sub_812FDA8(int);
+void SetContestWinnerForPainting(int);
void CB2_ContestPainting(void);
#endif
diff --git a/include/contest_painting_effects.h b/include/contest_painting_effects.h
deleted file mode 100755
index 3b6964666..000000000
--- a/include/contest_painting_effects.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef GUARD_CONTEST_PAINTING_EFFECTS_H
-#define GUARD_CONTEST_PAINTING_EFFECTS_H
-
-struct Unk030061A0
-{
- u8 var_0;
- u8 pad1[3];
- u16 (*var_4)[][32];
- u16 *var_8;
- u8 pad0C[4];
- u32 var_10;
- u16 var_14;
- u16 var_16;
- u8 var_18;
- u8 var_19;
- u8 var_1A;
- u8 var_1B;
- u8 var_1C;
- u8 var_1D;
- u8 var_1E;
- u8 var_1F;
-};
-
-void sub_8124F2C(struct Unk030061A0 *);
-void sub_81261A4(struct Unk030061A0 *);
-void sub_8126058(struct Unk030061A0 *);
-
-#endif
diff --git a/include/data.h b/include/data.h
index f1a4caa6a..49b98663a 100644
--- a/include/data.h
+++ b/include/data.h
@@ -34,7 +34,7 @@ struct TrainerMonNoItemCustomMoves
u16 iv;
u8 lvl;
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
struct TrainerMonItemCustomMoves
@@ -43,7 +43,7 @@ struct TrainerMonItemCustomMoves
u8 lvl;
u16 species;
u16 heldItem;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
union TrainerMonPtr
diff --git a/include/daycare.h b/include/daycare.h
index ecd875865..7d6f2fb19 100644
--- a/include/daycare.h
+++ b/include/daycare.h
@@ -1,10 +1,10 @@
#ifndef GUARD_DAYCARE_H
#define GUARD_DAYCARE_H
-#define EGG_HATCH_LEVEL 5
+#include "constants/daycare.h"
-u8 *GetMonNick(struct Pokemon *mon, u8 *dest);
-u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest);
+u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest);
+u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest);
u8 CountPokemonInDaycare(struct DayCare *daycare);
void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDayCareMail *daycareMail);
void StoreSelectedPokemonInDaycare(void);
@@ -16,7 +16,7 @@ void RejectEggFromDayCare(void);
void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation);
void GiveEggFromDaycare(void);
bool8 ShouldEggHatch(void);
-u16 GetSelectedMonNickAndSpecies(void);
+u16 GetSelectedMonNicknameAndSpecies(void);
void GetDaycareMonNicknames(void);
u8 GetDaycareState(void);
void SetDaycareCompatibilityString(void);
diff --git a/include/dma3.h b/include/dma3.h
deleted file mode 100644
index 8eff34f55..000000000
--- a/include/dma3.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef GUARD_DMA3_H
-#define GUARD_DMA3_H
-
-// Maximum amount of data we will transfer in one operation
-#define MAX_DMA_BLOCK_SIZE 0x1000
-
-#define Dma3CopyLarge_(src, dest, size, bit) \
-{ \
- const void *_src = src; \
- void *_dest = dest; \
- u32 _size = size; \
- while (1) \
- { \
- if (_size <= MAX_DMA_BLOCK_SIZE) \
- { \
- DmaCopy##bit(3, _src, _dest, _size); \
- break; \
- } \
- DmaCopy##bit(3, _src, _dest, MAX_DMA_BLOCK_SIZE); \
- _src += MAX_DMA_BLOCK_SIZE; \
- _dest += MAX_DMA_BLOCK_SIZE; \
- _size -= MAX_DMA_BLOCK_SIZE; \
- } \
-}
-
-#define Dma3CopyLarge16_(src, dest, size) Dma3CopyLarge_(src, dest, size, 16)
-#define Dma3CopyLarge32_(src, dest, size) Dma3CopyLarge_(src, dest, size, 32)
-
-#define Dma3FillLarge_(value, dest, size, bit) \
-{ \
- void *_dest = dest; \
- u32 _size = size; \
- while (1) \
- { \
- if (_size <= MAX_DMA_BLOCK_SIZE) \
- { \
- DmaFill##bit(3, value, _dest, _size); \
- break; \
- } \
- DmaFill##bit(3, value, _dest, MAX_DMA_BLOCK_SIZE); \
- _dest += MAX_DMA_BLOCK_SIZE; \
- _size -= MAX_DMA_BLOCK_SIZE; \
- } \
-}
-
-#define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16)
-#define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32)
-
-void ClearDma3Requests(void);
-void ProcessDma3Requests(void);
-s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
-s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
-s16 CheckForSpaceForDma3Request(s16 index);
-
-#endif // GUARD_DMA3_H
diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h
index 55e8fa880..9995decc2 100644
--- a/include/dodrio_berry_picking.h
+++ b/include/dodrio_berry_picking.h
@@ -2,7 +2,7 @@
#define GUARD_DODRIO_BERRY_PICKING_H
void sub_802493C(u16 a0, void (*callback)(void));
-void sub_8027A5C(void);
-void sub_8027AAC(void);
+void IsDodrioInParty(void);
+void ShowDodrioBerryPickingRecords(void);
#endif // GUARD_DODRIO_BERRY_PICKING_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index 84ac15422..f2ef066d4 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -128,12 +128,12 @@ bool32 sub_811F8D8(int word);
void InitializeEasyChatWordArray(u16 *words, u16 length);
u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows);
bool8 ECWord_CheckIfOutsideOfValidRange(u16 word);
-u16 sub_811EE38(u16 group);
-u16 sub_811F01C(void);
+u16 GetRandomEasyChatWordFromGroup(u16 group);
+u16 GetNewHipsterPhraseToTeach(void);
u16 EasyChat_GetNumWordsInGroup(u8);
-u16 sub_811EE90(u16);
+u16 GetRandomEasyChatWordFromUnlockedGroup(u16);
void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType);
void sub_811F8BC(void);
-void sub_811EFC0(u8 additionalPhraseId);
+void UnlockAdditionalPhrase(u8 additionalPhraseId);
#endif // GUARD_EASYCHAT_H
diff --git a/include/egg_hatch.h b/include/egg_hatch.h
index 862d33947..64d07c813 100644
--- a/include/egg_hatch.h
+++ b/include/egg_hatch.h
@@ -2,9 +2,9 @@
#define GUARD_EGG_HATCH_H
void ScriptHatchMon(void);
-bool8 sub_8071614(void);
+bool8 CheckDaycareMonReceivedMail(void);
void EggHatch(void);
u8 GetEggStepsToSubtract(void);
-u16 sub_80722E0(void);
+u16 CountPartyAliveNonEggMons(void);
#endif // GUARD_EGG_HATCH_H
diff --git a/include/event_data.h b/include/event_data.h
index 11289c1ab..36d52561f 100644
--- a/include/event_data.h
+++ b/include/event_data.h
@@ -16,8 +16,8 @@ bool32 IsMysteryEventEnabled(void);
void DisableMysteryGift(void);
void EnableMysteryGift(void);
bool32 IsMysteryGiftEnabled(void);
-void sub_809D4D8(void);
-void sub_809D570(void);
+void ClearMysteryEventFlags(void);
+void ClearMysteryEventVars(void);
void DisableResetRTC(void);
void EnableResetRTC(void);
bool32 CanResetRTC(void);
diff --git a/include/event_scripts.h b/include/event_scripts.h
index fc0b3cde0..a56ab89e0 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -1,22 +1,14 @@
#ifndef GUARD_EVENT_SCRIPTS_H
#define GUARD_EVENT_SCRIPTS_H
-extern const u8 gUnknown_0823B4E8[];
-extern const u8 gUnknown_0823B5E9[];
extern const u8 EventScript_TestSignpostMsg[];
extern const u8 EventScript_TryGetTrainerScript[];
-extern const u8 EventScript_275BB7[];
-extern const u8 EventScript_275D0C[];
-extern const u8 EventScript_275D1F[];
-extern const u8 EventScript_275D2E[];
extern const u8 EventScript_271354[];
extern const u8 EventScript_DoTainerBattle[];
extern const u8 EventScript_TryDoDoubleTrainerBattle[];
extern const u8 EventScript_TryDoNormalTrainerBattle[];
extern const u8 EventScript_TryDoDoubleRematchBattle[];
extern const u8 EventScript_TryDoRematchBattle[];
-extern const u8 SecretBase_EventScript_DollInteract[];
-extern const u8 SecretBase_EventScript_CushionInteract[];
extern const u8 BerryTreeScript[];
@@ -248,49 +240,49 @@ extern const u8 gTVWhatsNo1InHoennTodayText05[];
extern const u8 gTVWhatsNo1InHoennTodayText06[];
extern const u8 gTVWhatsNo1InHoennTodayText07[];
extern const u8 gTVWhatsNo1InHoennTodayText08[];
-extern const u8 gTVSecretBaseSecretsText00[];
-extern const u8 gTVSecretBaseSecretsText01[];
-extern const u8 gTVSecretBaseSecretsText02[];
-extern const u8 gTVSecretBaseSecretsText03[];
-extern const u8 gTVSecretBaseSecretsText04[];
-extern const u8 gTVSecretBaseSecretsText05[];
-extern const u8 gTVSecretBaseSecretsText06[];
-extern const u8 gTVSecretBaseSecretsText07[];
-extern const u8 gTVSecretBaseSecretsText08[];
-extern const u8 gTVSecretBaseSecretsText09[];
-extern const u8 gTVSecretBaseSecretsText10[];
-extern const u8 gTVSecretBaseSecretsText11[];
-extern const u8 gTVSecretBaseSecretsText12[];
-extern const u8 gTVSecretBaseSecretsText13[];
-extern const u8 gTVSecretBaseSecretsText14[];
-extern const u8 gTVSecretBaseSecretsText15[];
-extern const u8 gTVSecretBaseSecretsText16[];
-extern const u8 gTVSecretBaseSecretsText17[];
-extern const u8 gTVSecretBaseSecretsText18[];
-extern const u8 gTVSecretBaseSecretsText19[];
-extern const u8 gTVSecretBaseSecretsText20[];
-extern const u8 gTVSecretBaseSecretsText21[];
-extern const u8 gTVSecretBaseSecretsText22[];
-extern const u8 gTVSecretBaseSecretsText23[];
-extern const u8 gTVSecretBaseSecretsText24[];
-extern const u8 gTVSecretBaseSecretsText25[];
-extern const u8 gTVSecretBaseSecretsText26[];
-extern const u8 gTVSecretBaseSecretsText27[];
-extern const u8 gTVSecretBaseSecretsText28[];
-extern const u8 gTVSecretBaseSecretsText29[];
-extern const u8 gTVSecretBaseSecretsText30[];
-extern const u8 gTVSecretBaseSecretsText31[];
-extern const u8 gTVSecretBaseSecretsText32[];
-extern const u8 gTVSecretBaseSecretsText33[];
-extern const u8 gTVSecretBaseSecretsText34[];
-extern const u8 gTVSecretBaseSecretsText35[];
-extern const u8 gTVSecretBaseSecretsText36[];
-extern const u8 gTVSecretBaseSecretsText37[];
-extern const u8 gTVSecretBaseSecretsText38[];
-extern const u8 gTVSecretBaseSecretsText39[];
-extern const u8 gTVSecretBaseSecretsText40[];
-extern const u8 gTVSecretBaseSecretsText41[];
-extern const u8 gTVSecretBaseSecretsText42[];
+extern const u8 TVSecretBaseSecrets_Text_Intro[];
+extern const u8 TVSecretBaseSecrets_Text_WhatWillPlayerDoNext1[];
+extern const u8 TVSecretBaseSecrets_Text_WhatWillPlayerDoNext2[];
+extern const u8 TVSecretBaseSecrets_Text_TookXStepsBeforeLeaving[];
+extern const u8 TVSecretBaseSecrets_Text_BaseFailedToInterestPlayer[];
+extern const u8 TVSecretBaseSecrets_Text_PlayerEnjoyedBase[];
+extern const u8 TVSecretBaseSecrets_Text_PlayerHugeFanOfBase[];
+extern const u8 TVSecretBaseSecrets_Text_Outro[];
+extern const u8 TVSecretBaseSecrets_Text_StoppedMoving1[];
+extern const u8 TVSecretBaseSecrets_Text_StoppedMoving2[];
+extern const u8 TVSecretBaseSecrets_Text_UsedChair[];
+extern const u8 TVSecretBaseSecrets_Text_UsedBalloon[];
+extern const u8 TVSecretBaseSecrets_Text_UsedTent[];
+extern const u8 TVSecretBaseSecrets_Text_UsedPlant[];
+extern const u8 TVSecretBaseSecrets_Text_UsedGoldShield[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSilverShield[];
+extern const u8 TVSecretBaseSecrets_Text_UsedGlassOrnament[];
+extern const u8 TVSecretBaseSecrets_Text_UsedTV[];
+extern const u8 TVSecretBaseSecrets_Text_UsedMudBall[];
+extern const u8 TVSecretBaseSecrets_Text_UsedBag[];
+extern const u8 TVSecretBaseSecrets_Text_UsedCushion[];
+extern const u8 TVSecretBaseSecrets_Text_HitCushion[];
+extern const u8 TVSecretBaseSecrets_Text_HuggedCushion[];
+extern const u8 TVSecretBaseSecrets_Text_BattledWon[];
+extern const u8 TVSecretBaseSecrets_Text_BattledLost[];
+extern const u8 TVSecretBaseSecrets_Text_DeclinedBattle[];
+extern const u8 TVSecretBaseSecrets_Text_UsedPoster[];
+extern const u8 TVSecretBaseSecrets_Text_UsedNoteMat[];
+extern const u8 TVSecretBaseSecrets_Text_BattledDraw[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSpinMat[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSandOrnament[];
+extern const u8 TVSecretBaseSecrets_Text_UsedDesk[];
+extern const u8 TVSecretBaseSecrets_Text_UsedBrick[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSolidBoard[];
+extern const u8 TVSecretBaseSecrets_Text_UsedFence[];
+extern const u8 TVSecretBaseSecrets_Text_UsedGlitterMat[];
+extern const u8 TVSecretBaseSecrets_Text_UsedTire[];
+extern const u8 TVSecretBaseSecrets_Text_UsedStand[];
+extern const u8 TVSecretBaseSecrets_Text_BrokeDoor[];
+extern const u8 TVSecretBaseSecrets_Text_UsedDoll[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSlide[];
+extern const u8 TVSecretBaseSecrets_Text_UsedSlideButDidntGoDown[];
+extern const u8 TVSecretBaseSecrets_Text_UsedJumpMat[];
extern const u8 gTVSafariFanClubText00[];
extern const u8 gTVSafariFanClubText01[];
extern const u8 gTVSafariFanClubText02[];
@@ -368,32 +360,26 @@ extern const u8 gPokeNewsTextLilycove_Ending[];
extern const u8 gPokeNewsTextBlendMaster_Upcoming[];
extern const u8 gPokeNewsTextBlendMaster_Ongoing[];
extern const u8 gPokeNewsTextBlendMaster_Ending[];
-extern const u8 SecretBase_RedCave1_Text_274966[];
-extern const u8 SecretBase_RedCave1_Text_274D13[];
-extern const u8 SecretBase_RedCave1_Text_274FFE[];
-extern const u8 SecretBase_RedCave1_Text_275367[];
-extern const u8 SecretBase_RedCave1_Text_2756C7[];
-extern const u8 SecretBase_RedCave1_Text_274B24[];
-extern const u8 SecretBase_RedCave1_Text_274E75[];
-extern const u8 SecretBase_RedCave1_Text_2751E1[];
-extern const u8 SecretBase_RedCave1_Text_2754F6[];
-extern const u8 SecretBase_RedCave1_Text_2758CC[];
-
-extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[];
+extern const u8 SecretBase_Text_Trainer0Defeated[];
+extern const u8 SecretBase_Text_Trainer1Defeated[];
+extern const u8 SecretBase_Text_Trainer2Defeated[];
+extern const u8 SecretBase_Text_Trainer3Defeated[];
+extern const u8 SecretBase_Text_Trainer4Defeated[];
+extern const u8 SecretBase_Text_Trainer5Defeated[];
+extern const u8 SecretBase_Text_Trainer6Defeated[];
+extern const u8 SecretBase_Text_Trainer7Defeated[];
+extern const u8 SecretBase_Text_Trainer8Defeated[];
+extern const u8 SecretBase_Text_Trainer9Defeated[];
//field effects
extern const u8 EventScript_FldEffStrength[];
extern const u8 EventScript_FailSweetScent[];
-extern const u8 EventScript_2926F8[];
+extern const u8 EventScript_FldEffFlash[];
extern const u8 EventScript_FldEffRockSmash[];
//player pc
-extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_1F863F[];
-extern const u8 LittlerootTown_MaysHouse_2F_EventScript_1F958F[];
-
-//contest_strings
-extern const u8 gText_0827D507[];
-extern const u8 gText_0827D531[];
+extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];
+extern const u8 LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC[];
//mauville_old_man
extern const u8 gOtherText_Is[];
@@ -415,130 +401,127 @@ extern const u8 gMauvilleManText_WhenYouSeeTheSettingSunDoesIt[];
extern const u8 gMauvilleManText_LyingBackInTheGreenGrass[];
extern const u8 gMauvilleManText_SecretBasesAreSoWonderful[];
+// mauville old man storyteller
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrendsStartedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BikeTradesStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_InterviewsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EggsHatchedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SafariGamesStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedCutStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MovedBasesStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedSplashStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedStruggleStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RouletteWinsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_EnteredContestsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonContestsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesShoppedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TimesRainedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_TVWatchedStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_CheckedClockStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_WonLotteryStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_UsedDaycareStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_RodeCableCarStory[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E930[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E947[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E956[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9D7[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9EF[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9FE[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA7D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA98[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EAA8[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB19[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB31[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB3E[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBB5[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBCD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBDD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC60[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC79[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC81[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED04[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED21[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED30[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDA1[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDB5[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDCF[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE45[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE5D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE6A[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEDD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEF1[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF01[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF73[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF95[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EFAA[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F045[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F05A[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F071[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F0F3[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F10D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F125[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1BE[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1D5[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1DE[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F24F[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F269[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F277[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F2FC[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F314[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F32A[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3AD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3C6[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3D2[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F44B[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F461[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F47C[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F50C[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F51B[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F538[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5BE[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5D1[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5F2[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F678[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F694[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F6B4[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F751[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F76A[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F776[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F7F6[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F811[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F822[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F89C[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8AF[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8BC[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F92F[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F941[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F949[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9D1[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9EA[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9FD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA81[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA99[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FAA7[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB1D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB35[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB47[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBC4[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBD9[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBEA[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC6B[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC85[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC98[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD1D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD35[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD40[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDA2[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDBD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDCE[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE57[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE72[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE88[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF0C[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF27[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF44[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFDD[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFFA[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_29000D[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_290097[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900B5[];
-extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900CB[];
-
-extern const u8 EventScript_PlayerPCMale[];
-extern const u8 EventScript_PlayerPCFemale[];
-extern const u8 EventScript_SecretBasePC[];
-extern const u8 EventScript_RecordMixingSecretBasePC[];
+extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_PC[];
+extern const u8 LittlerootTown_MaysHouse_2F_EventScript_PC[];
extern const u8 EventScript_PC[];
extern const u8 EventScript_TestSignpostMsg[];
extern const u8 EventScript_HiddenItemScript[];
-extern const u8 EventScript_2759F1[];
extern const u8 EventScript_TV[];
extern const u8 EventScript_ClosedSootopolisDoor[];
-extern const u8 SkyPillar_Outside_EventScript_2393F9[];
+extern const u8 SkyPillar_Outside_EventScript_ClosedDoor[];
extern const u8 EventScript_CableBoxResults[];
extern const u8 EventScript_PokeBlockFeeder[];
-extern const u8 Route110_TrickHouseEntrance_EventScript_26A22A[];
+extern const u8 Route110_TrickHousePuzzle_EventScript_Door[];
extern const u8 EventScript_RegionMap[];
extern const u8 EventScript_RunningShoesManual[];
extern const u8 EventScript_PictureBookShelf[];
@@ -552,38 +535,56 @@ extern const u8 EventScript_WirelessBoxResults[];
extern const u8 EventScript_CableBoxResults[];
extern const u8 EventScript_Questionnaire[];
extern const u8 EventScript_TrainerHillTimer[];
-extern const u8 EventScript_SecretBaseSandOrnament[];
-extern const u8 EventScript_SecretBaseShieldOrToyTV[];
extern const u8 EventScript_UseSurf[];
extern const u8 EventScript_UseWaterfall[];
extern const u8 EventScript_CannotUseWaterfall[];
extern const u8 EventScript_UseDive[];
extern const u8 EventScript_UseDiveUnderwater[];
extern const u8 EventScript_FallDownHole[];
-extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8[];
-extern const u8 EventScript_Poison[];
+extern const u8 EventScript_FieldPoison[];
extern const u8 EventScript_EggHatch[];
-extern const u8 UnusualWeather_EventScript_EndEventAndCleanup_1[];
-extern const u8 IslandCave_EventScript_238EAF[];
-extern const u8 MauvilleCity_EventScript_1DF7BA[];
-extern const u8 Route119_EventScript_1F49EC[];
-extern const u8 LittlerootTown_ProfessorBirchsLab_EventScript_1FA4D6[];
-extern const u8 RustboroCity_Gym_EventScript_21307B[];
-extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224175[];
-extern const u8 SSTidalCorridor_EventScript_23C050[];
-extern const u8 gUnknown_082A8350[];
+extern const u8 AbnormalWeather_EventScript_EndEventAndCleanup_1[];
+extern const u8 IslandCave_EventScript_OpenRegiEntrance[];
+extern const u8 MauvilleCity_EventScript_RegisterWallyCall[];
+extern const u8 Route119_EventScript_ScottWonAtFortreeGymCall[];
+extern const u8 LittlerootTown_ProfessorBirchsLab_EventScript_ScottAboardSSTidalCall[];
+extern const u8 RustboroCity_Gym_EventScript_RegisterRoxanne[];
+extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall[];
+extern const u8 SSTidalCorridor_EventScript_ReachedStepCount[];
+extern const u8 EventScript_FallDownHoleMtPyre[];
+
+// Secret Base
+extern const u8 SecretBase_EventScript_PC[];
+extern const u8 SecretBase_EventScript_RecordMixingPC[];
+extern const u8 SecretBase_EventScript_PCCancel[];
+extern const u8 SecretBase_EventScript_ShowRegisterMenu[];
+extern const u8 SecretBase_EventScript_SandOrnament[];
+extern const u8 SecretBase_EventScript_ShieldOrToyTV[];
+extern const u8 SecretBase_EventScript_DollInteract[];
+extern const u8 SecretBase_EventScript_CushionInteract[];
+extern const u8 SecretBase_EventScript_CheckEntrance[];
+extern const u8 SecretBase_EventScript_Enter[];
+extern const u8 SecretBase_EventScript_InitDecorations[];
+extern const u8 SecretBase_EventScript_PutAwayDecoration[];
+extern const u8 SecretBase_EventScript_SetDecoration[];
// Battle Pyramid.
-extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[];
+extern const u8 BattlePyramid_Retire[];
+extern const u8 BattlePyramid_WarpToNextFloor[];
extern const u8 BattlePyramid_TrainerBattle[];
extern const u8 BattlePyramid_FindItemBall[];
// fldeff misc
-extern const u8 EventScript_275A86[];
-extern const u8 EventScript_275ADF[];
-extern const u8 EventScript_275B38[];
+extern const u8 SecretBase_EventScript_CaveUseSecretPower[];
+extern const u8 SecretBase_EventScript_TreeUseSecretPower[];
+extern const u8 SecretBase_EventScript_ShrubUseSecretPower[];
// trainer hill
-extern const u8 EventScript_2C83F0[];
+extern const u8 TrainerHill_EventScript_TrainerBattle[];
+
+// Item Use
+extern u8 BerryTree_EventScript_ItemUsePlantBerry[];
+extern u8 BerryTree_EventScript_ItemUseWailmerPail[];
+extern u8 BattleFrontier_OutsideEast_EventScript_WaterSudowoodo[];
#endif // GUARD_EVENT_SCRIPTS_H
diff --git a/include/field_effect.h b/include/field_effect.h
index 0dbe600d3..59f99ad93 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -12,7 +12,7 @@ extern bool8 (*gFieldCallback2)(void);
u32 FieldEffectStart(u8);
bool8 FieldEffectActiveListContains(u8 id);
void FieldEffectActiveListClear(void);
-void sub_80B69DC(void);
+void ReturnToFieldFromFlyMapSelect(void);
u8 AddNewGameBirchObject(s16, s16, u8);
void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
@@ -34,17 +34,17 @@ bool8 FieldEffectCmd_end(u8 **script, u32 *val);
bool8 FieldEffectCmd_loadgfx_callnative(u8 **script, u32 *val);
bool8 FieldEffectCmd_loadtiles_callnative(u8 **script, u32 *val);
bool8 FieldEffectCmd_loadfadedpal_callnative(u8 **script, u32 *val);
-void sub_80B6B68(void);
-void sub_80B6E4C(u8 a0, u8 priority);
-void sub_80B75D8(u8 priority);
-void sub_80B7A74(u8 priority);
+void FieldCB_FallWarpExit(void);
+void StartEscalatorWarp(u8 metatileBehavior, u8 priority);
+void StartLavaridgeGymB1FWarp(u8 priority);
+void StartLavaridgeGym1FWarp(u8 priority);
void sub_80B9C28(s16*, u8);
void sub_80B9C54(s16*, u8);
void sub_80B9CDC(s16*, u8);
-void sub_80B7CAC(struct Sprite*);
-void sub_80B7A58(struct Sprite*);
+void SpriteCB_PopOutOfAsh(struct Sprite*);
+void SpriteCB_LavaridgeGymWarp(struct Sprite*);
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index 8d87779e6..f521737b7 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -61,7 +61,8 @@ void sub_808D194(void);
void sub_808D1C8(void);
bool32 sub_808D1B4(void);
bool32 sub_808D1E8(void);
-void sub_808C0A8(u8 a);
+void SetPlayerInvisibility(bool8 invisible);
u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y);
+void StartFishing(u8 taskId);
#endif // GUARD_FIELD_PLAYER_AVATAR_H
diff --git a/include/field_poison.h b/include/field_poison.h
index a23a93ca5..e9de7878e 100644
--- a/include/field_poison.h
+++ b/include/field_poison.h
@@ -7,13 +7,7 @@
// Exported ROM declarations
-enum {
- FLDPSN_NONE,
- FLDPSN_PSN,
- FLDPSN_FNT
-};
-
-void ExecuteWhiteOut(void);
+void TryFieldPoisonWhiteOut(void);
s32 DoPoisonFieldEffect(void);
#endif //GUARD_FIELD_POISON_H
diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h
index a62a76b2a..e05e30378 100644
--- a/include/field_screen_effect.h
+++ b/include/field_screen_effect.h
@@ -1,46 +1,44 @@
#ifndef GUARD_FIELD_SCREEN_EFFECT_H
#define GUARD_FIELD_SCREEN_EFFECT_H
-void pal_fill_for_maplights(void);
-void pal_fill_black(void);
-void WarpFadeScreen(void);
-void sub_80AF128(void);
-void FieldCallback_ReturnToEventScript2(void);
-void sub_80AF188(void);
-void sub_80AF214(void);
-void sub_80AF2B4(u8 taskId);
-void sub_80AF314(void);
-void mapldr_default(void);
-void sub_80AF3B0(void);
-void sub_80AF3C8(void);
-void sub_80AF3E8(void);
-void sub_80AF40C(void);
-void sub_80AF688(void);
-bool8 sub_80AF6A4(void);
+void WarpFadeInScreen(void);
+void WarpFadeOutScreen(void);
+void FadeInFromBlack(void);
+void FadeInFromWhite(void);
+void FieldCB_ContinueScriptUnionRoom(void);
+void FieldCB_ContinueScriptHandleMusic(void);
+void FieldCB_ContinueScript(void);
+void Task_ReturnToFieldRecordMixing(u8 taskId);
+void FieldCB_ReturnToFieldCableLink(void);
+void FieldCB_ReturnToFieldWirelessLink(void);
+void FieldCB_DefaultWarpExit(void);
+void FieldCB_WarpExitFadeFromBlack(void);
+void FieldCB_WarpExitFadeFromWhite(void);
+bool8 FieldCB_ReturnToFieldOpenStartMenu(void);
+void ReturnToFieldOpenStartMenu(void);
void sub_80AF6D4(void);
void sub_80AF6F0(void);
void DoWarp(void);
void DoDiveWarp(void);
-void sub_80AF79C(void);
+void DoSootopolisLegendWarp(void);
void DoDoorWarp(void);
void DoFallWarp(void);
-void sub_80AF80C(u8 metatileBehavior);
-void sub_80AF828(void);
-void sub_80AF838(void);
-void sub_80AF848(void);
-void sub_80AF87C(void);
-void sub_80AF8B8(void);
-void sub_80AF948(void);
-void sub_80AF9F8(void);
-void sub_80AFC60(void);
-void sub_80B009C(u8 flashLevel);
+void DoEscalatorWarp(u8 metatileBehavior);
+void DoLavaridgeGymB1FWarp(void);
+void DoLavaridgeGym1FWarp(void);
+void DoTeleportWarp(void);
+void DoMossdeepGymWarp(void);
+void DoPortholeWarp(void);
+void DoCableClubWarp(void);
+void DoContestHallWarp(void);
+void AnimateFlash(u8 flashLevel);
void WriteBattlePyramidViewScanlineEffectBuffer(void);
void sub_80B0244(void);
void sub_80B0268(void);
-void sub_80B0534(void);
-void sub_80B058C(void);
+void DoOrbEffect(void);
+void FadeOutOrbEffect(void);
void sub_80B05B4(void);
void WriteFlashScanlineEffectBuffer(u8 flashLevel);
-bool8 walkrun_is_standing_still(void);
+bool8 IsPlayerStandingStill(void);
#endif // GUARD_FIELD_SCREEN_EFFECT_H
diff --git a/include/field_special_scene.h b/include/field_special_scene.h
index 2219c9433..a54b344d9 100644
--- a/include/field_special_scene.h
+++ b/include/field_special_scene.h
@@ -10,6 +10,6 @@ void Task_HandleTruckSequence(u8 taskId);
void ExecuteTruckSequence(void);
void EndTruckSequence(u8);
void sub_80C791C(void);
-void sub_80FB768(void);
+void FieldCB_ShowPortholeView(void);
#endif // GUARD_FIELD_SPECIAL_SCENE_H
diff --git a/include/field_specials.h b/include/field_specials.h
index b1a50c811..faf71e9c0 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -5,31 +5,31 @@ extern bool8 gBikeCyclingChallenge;
extern u8 gBikeCollisions;
u8 GetLeadMonIndex(void);
-u8 sub_813B260(void);
-u16 get_unknown_box_id(void);
-bool8 InMultiBattleRoom(void);
-void sub_813BF10(void);
+u8 IsDestinationBoxFull(void);
+u16 GetPCBoxToSendMon(void);
+bool8 InMultiPartnerRoom(void);
+void UpdateTrainerFansAfterLinkBattle(void);
void IncrementBirthIslandRockStepCount(void);
-bool8 UnusualWeatherHasExpired(void);
+bool8 AbnormalWeatherHasExpired(void);
bool8 ShouldDoBrailleRegicePuzzle(void);
bool32 ShouldDoWallyCall(void);
-bool32 ShouldDoWinonaCall(void);
-bool32 ShouldDoScottCall(void);
+bool32 ShouldDoScottFortreeCall(void);
+bool32 ShouldDoScottBattleFrontierCall(void);
bool32 ShouldDoRoxanneCall(void);
bool32 ShouldDoRivalRayquazaCall(void);
bool32 CountSSTidalStep(u16 delta);
u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y);
-void sub_813A128(void);
-void sub_813A878(u8 a0);
-u8 sub_813BADC(u8 a0);
-bool8 sub_813B9C0(void);
-void SetShoalItemFlag(u16 v0);
-void UpdateFrontierManiac(u16 a0);
-void UpdateFrontierGambler(u16 a0);
+void ShowScrollableMultichoice(void);
+void FrontierGamblerSetWonOrLost(bool8 won);
+u8 TryGainNewFanFromCounter(u8 incrementId);
+bool8 InPokemonCenter(void);
+void SetShoalItemFlag(u16 unused);
+void UpdateFrontierManiac(u16 daysSince);
+void UpdateFrontierGambler(u16 daysSince);
void ResetCyclingRoadChallengeData(void);
-bool8 warp0_in_pokecenter(void);
+bool8 UsedPokemonCenterWarp(void);
void ResetFanClub(void);
-bool8 sub_813B21C(void);
-void set_unknown_box_id(u8 id);
+bool8 ShouldShowBoxWasFullMessage(void);
+void SetPCBoxToSendMon(u8 boxId);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/field_weather.h b/include/field_weather.h
index 3a84a8a73..1af320151 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -2,32 +2,7 @@
#define GUARD_WEATHER_H
#include "sprite.h"
-
-#define MAX_RAIN_SPRITES 24
-#define NUM_CLOUD_SPRITES 3
-#define NUM_FOG1_SPRITES 20
-#define NUM_ASH_SPRITES 20
-#define NUM_FOG2_SPRITES 20
-#define NUM_SANDSTORM_SPRITES 20
-#define NUM_SWIRL_SANDSTORM_SPRITES 5
-
-// Controls how the weather should be changing the screen palettes.
-enum
-{
- WEATHER_PAL_STATE_CHANGING_WEATHER,
- WEATHER_PAL_STATE_SCREEN_FADING_IN,
- WEATHER_PAL_STATE_SCREEN_FADING_OUT,
- WEATHER_PAL_STATE_IDLE,
-};
-
-// For the FadeScreen function.
-enum
-{
- FADE_FROM_BLACK,
- FADE_TO_BLACK,
- FADE_FROM_WHITE,
- FADE_TO_WHITE,
-};
+#include "constants/field_weather.h"
struct Weather
{
@@ -42,9 +17,9 @@ struct Weather
struct
{
u8 filler0[0xA0];
- struct Sprite *fog1Sprites[NUM_FOG1_SPRITES];
+ struct Sprite *fogHSprites[NUM_FOG_HORIZONTAL_SPRITES];
struct Sprite *ashSprites[NUM_ASH_SPRITES];
- struct Sprite *fog2Sprites[NUM_FOG2_SPRITES];
+ struct Sprite *fogDSprites[NUM_FOG_DIAGONAL_SPRITES];
struct Sprite *sandstormSprites1[NUM_SANDSTORM_SPRITES];
struct Sprite *sandstormSprites2[NUM_SWIRL_SANDSTORM_SPRITES];
} s2;
@@ -75,7 +50,7 @@ struct Weather
u8 targetRainSpriteCount;
u8 rainSpriteCount;
u8 rainSpriteVisibleDelay;
- u8 isHeavyRain;
+ u8 isDownpour;
u8 rainStrength;
/*0x6DE*/ u8 cloudSpritesCreated;
u8 filler_6DF[1];
@@ -89,12 +64,12 @@ struct Weather
u8 unknown_6EB;
u8 unknown_6EC;
u8 thunderTriggered;
- u16 fog1ScrollPosX;
- u16 fog1ScrollCounter;
- u16 fog1ScrollOffset;
+ u16 fogHScrollPosX;
+ u16 fogHScrollCounter;
+ u16 fogHScrollOffset;
u8 lightenedFogSpritePals[6];
u8 lightenedFogSpritePalsCount;
- u8 fog1SpritesCreated;
+ u8 fogHSpritesCreated;
u16 ashBaseSpritesX;
u16 unknown_6FE;
u8 ashSpritesCreated;
@@ -108,13 +83,13 @@ struct Weather
u16 sandstormWaveCounter;
u8 sandstormSpritesCreated;
u8 sandstormSwirlSpritesCreated;
- u16 fog2BaseSpritesX;
- u16 fog2PosY;
- u16 fog2ScrollXCounter;
- u16 fog2ScrollYCounter;
- u16 fog2XOffset;
- u16 fog2YOffset;
- u8 fog2SpritesCreated;
+ u16 fogDBaseSpritesX;
+ u16 fogDPosY;
+ u16 fogDScrollXCounter;
+ u16 fogDScrollYCounter;
+ u16 fogDXOffset;
+ u16 fogDYOffset;
+ u8 fogDSpritesCreated;
u8 filler_725[1];
u16 bubblesDelayCounter;
u16 bubblesDelayIndex;
@@ -145,7 +120,7 @@ extern struct Weather *const gWeatherPtr;
extern const u16 gUnknown_083970E8[];
// field_weather_effect.c
-extern const u8 gWeatherFog1Tiles[];
+extern const u8 gWeatherFogHorizontalTiles[];
void StartWeather(void);
void SetNextWeather(u8 weather);
@@ -186,22 +161,22 @@ void Sunny_InitVars(void);
void Sunny_Main(void);
void Sunny_InitAll(void);
bool8 Sunny_Finish(void);
-void LightRain_InitVars(void);
-void LightRain_Main(void);
-void LightRain_InitAll(void);
-bool8 LightRain_Finish(void);
+void Rain_InitVars(void);
+void Rain_Main(void);
+void Rain_InitAll(void);
+bool8 Rain_Finish(void);
void Snow_InitVars(void);
void Snow_Main(void);
void Snow_InitAll(void);
bool8 Snow_Finish(void);
-void MedRain_InitVars(void);
-void Rain_Main(void);
-void MedRain_InitAll(void);
-bool8 Rain_Finish(void);
-void Fog1_InitVars(void);
-void Fog1_Main(void);
-void Fog1_InitAll(void);
-bool8 Fog1_Finish(void);
+void Thunderstorm_InitVars(void);
+void Thunderstorm_Main(void);
+void Thunderstorm_InitAll(void);
+bool8 Thunderstorm_Finish(void);
+void FogHorizontal_InitVars(void);
+void FogHorizontal_Main(void);
+void FogHorizontal_InitAll(void);
+bool8 FogHorizontal_Finish(void);
void Ash_InitVars(void);
void Ash_Main(void);
void Ash_InitAll(void);
@@ -210,14 +185,10 @@ void Sandstorm_InitVars(void);
void Sandstorm_Main(void);
void Sandstorm_InitAll(void);
bool8 Sandstorm_Finish(void);
-void Fog2_InitVars(void);
-void Fog2_Main(void);
-void Fog2_InitAll(void);
-bool8 Fog2_Finish(void);
-void Fog1_InitVars(void);
-void Fog1_Main(void);
-void Fog1_InitAll(void);
-bool8 Fog1_Finish(void);
+void FogDiagonal_InitVars(void);
+void FogDiagonal_Main(void);
+void FogDiagonal_InitAll(void);
+bool8 FogDiagonal_Finish(void);
void Shade_InitVars(void);
void Shade_Main(void);
void Shade_InitAll(void);
@@ -226,10 +197,8 @@ void Drought_InitVars(void);
void Drought_Main(void);
void Drought_InitAll(void);
bool8 Drought_Finish(void);
-void HeavyRain_InitVars(void);
-void Rain_Main(void);
-void HeavyRain_InitAll(void);
-bool8 Rain_Finish(void);
+void Downpour_InitVars(void);
+void Downpour_InitAll(void);
void Bubbles_InitVars(void);
void Bubbles_Main(void);
void Bubbles_InitAll(void);
diff --git a/include/fieldmap.h b/include/fieldmap.h
index be5610a46..dc81d1766 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -42,7 +42,7 @@ void copy_map_tileset2_to_vram_2(struct MapLayout const *mapLayout);
void copy_map_tileset1_to_vram(const struct MapLayout *);
void copy_map_tileset2_to_vram(const struct MapLayout *);
struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection);
-struct MapConnection *sub_8088A8C(s16 x, s16 y);
+struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
void SpriteCB_PokeballGlow(struct Sprite *);
void SpriteCB_PokecenterMonitor(struct Sprite *);
diff --git a/include/fldeff.h b/include/fldeff.h
index 0a2bad629..deb54372c 100644
--- a/include/fldeff.h
+++ b/include/fldeff.h
@@ -28,8 +28,8 @@ bool8 sub_80E1584(void);
// soft-boiled
bool8 SetUpFieldMove_SoftBoiled(void);
-void sub_81615A8(u8 taskId);
-void sub_8161560(u8 taskId);
+void Task_TryUseSoftboiledOnPartyMon(u8 taskId);
+void ChooseMonForSoftboiled(u8 taskId);
// flash
bool8 SetUpFieldMove_Flash(void);
diff --git a/include/fldeff_misc.h b/include/fldeff_misc.h
index fd96f5646..6fd15c1ea 100644
--- a/include/fldeff_misc.h
+++ b/include/fldeff_misc.h
@@ -21,7 +21,7 @@ void ShatterSecretBaseBreakableDoor(s16 x, s16 y);
void PlaySecretBaseMusicNoteMatSound(s16 metatileId);
void DoSecretBaseGlitterMatSparkle(void);
bool8 FldEff_SandPillar(void);
-void GetShieldToyTVDecorationInfo(void);
+void InteractWithShieldOrTVDecoration(void);
bool8 sub_80FADE4(u16 arg0, u8 arg1);
void FldEffPoison_Start(void);
bool32 FldEffPoison_IsActive(void);
diff --git a/include/frontier_util.h b/include/frontier_util.h
index 9464ba91c..d6cdb3a62 100644
--- a/include/frontier_util.h
+++ b/include/frontier_util.h
@@ -1,21 +1,17 @@
#ifndef GUARD_FRONTIER_UTIL_H
#define GUARD_FRONTIER_UTIL_H
-#define FRONTIER_BEFORE_TEXT 0
-#define FRONTIER_PLAYER_LOST_TEXT 1
-#define FRONTIER_PLAYER_WON_TEXT 2
-
void CallFrontierUtilFunc(void);
-u8 sub_81A3610(void);
+u8 GetFrontierBrainStatus(void);
void CopyFrontierTrainerText(u8 whichText, u16 trainerId);
-void sub_81A3908(void);
+void ResetWinStreaks(void);
u32 GetCurrentFacilityWinStreak(void);
-void sub_81A3ACC(void);
+void ResetFrontierTrainerIds(void);
u8 GetPlayerSymbolCountForFacility(u8 facility);
void ShowRankingHallRecordsWindow(void);
void ScrollRankingHallRecordsWindow(void);
void ClearRankingHallRecords(void);
-void sub_81A4C30(void);
+void SaveGameFrontier(void);
u8 GetFrontierBrainTrainerPicIndex(void);
u8 GetFrontierBrainTrainerClass(void);
void CopyFrontierBrainTrainerName(u8 *dst);
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index a17180589..3913b96d8 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -59,13 +59,13 @@ struct EventObjectTemplate
/*0x06*/ s16 y;
/*0x08*/ u8 elevation;
/*0x09*/ u8 movementType;
- /*0x0A*/ u8 movementRangeX:4;
- u8 movementRangeY:4;
+ /*0x0A*/ u16 movementRangeX:4;
+ u16 movementRangeY:4;
/*0x0C*/ u16 trainerType;
/*0x0E*/ u16 trainerRange_berryTreeId;
/*0x10*/ const u8 *script;
/*0x14*/ u16 flagId;
-}; /*size = 0x18*/
+};
struct WarpEvent
{
@@ -82,7 +82,6 @@ struct CoordEvent
u8 elevation;
u16 trigger;
u16 index;
- u8 filler_A[0x2];
u8 *script;
};
@@ -90,20 +89,14 @@ struct BgEvent
{
u16 x, y;
u8 elevation;
- u8 kind;
- union { // carried over from diego's FR/LG work, seems to be the same struct
- // in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union.
+ u8 kind; // The "kind" field determines how to access bgUnion union below.
+ union {
u8 *script;
-
- // hidden item type
struct {
u16 item;
- u16 hiddenItemId; // flag offset to determine flag lookup
+ u16 hiddenItemId;
} hiddenItem;
-
- // secret base type
u32 secretBaseId;
-
} bgUnion;
};
@@ -113,7 +106,6 @@ struct MapEvents
u8 warpCount;
u8 coordEventCount;
u8 bgEventCount;
-
struct EventObjectTemplate *eventObjects;
struct WarpEvent *warps;
struct CoordEvent *coordEvents;
@@ -122,10 +114,10 @@ struct MapEvents
struct MapConnection
{
- /*0x00*/ u8 direction;
- /*0x01*/ u32 offset;
- /*0x05*/ u8 mapGroup;
- /*0x06*/ u8 mapNum;
+ u8 direction;
+ u32 offset;
+ u8 mapGroup;
+ u8 mapNum;
};
struct MapConnections
@@ -151,6 +143,16 @@ struct MapHeader
/* 0x1B */ u8 battleType;
};
+// Flags for gMapHeader.flags, as defined in the map_header_flags macro
+#define MAP_ALLOW_BIKE (1 << 0)
+#define MAP_ALLOW_ESCAPE_ROPE (1 << 1)
+#define MAP_ALLOW_RUN (1 << 2)
+#define MAP_SHOW_MAP_NAME (1 << 3)
+#define UNUSED_MAP_FLAGS (1 << 4 | 1 << 5 | 1 << 6 | 1 << 7)
+
+#define SHOW_MAP_NAME_ENABLED ((gMapHeader.flags & (MAP_SHOW_MAP_NAME | UNUSED_MAP_FLAGS)) == MAP_SHOW_MAP_NAME)
+
+
struct EventObject
{
/*0x00*/ u32 active:1;
@@ -180,7 +182,7 @@ struct EventObject
/*0x03*/ u32 spriteAffineAnimPausedBackup:1;
u32 disableJumpLandingGroundEffect:1;
u32 fixedPriority:1;
- u32 unk3_3:1;
+ u32 hideReflection:1;
/*0x04*/ u8 spriteId;
/*0x05*/ u8 graphicsId;
/*0x06*/ u8 movementType;
@@ -267,7 +269,20 @@ enum
enum
{
- COLLISION_LEDGE_JUMP = 6
+ COLLISION_NONE,
+ COLLISION_OUTSIDE_RANGE,
+ COLLISION_IMPASSABLE,
+ COLLISION_ELEVATION_MISMATCH,
+ COLLISION_EVENT_OBJECT,
+ COLLISION_STOP_SURFING,
+ COLLISION_LEDGE_JUMP,
+ COLLISION_PUSHED_BOULDER,
+ COLLISION_ROTATING_GATE,
+ COLLISION_WHEELIE_HOP,
+ COLLISION_ISOLATED_VERTICAL_RAIL,
+ COLLISION_ISOLATED_HORIZONTAL_RAIL,
+ COLLISION_VERTICAL_RAIL,
+ COLLISION_HORIZONTAL_RAIL,
};
// player running states
diff --git a/include/global.h b/include/global.h
index 1fbc70e23..fa28b16cf 100644
--- a/include/global.h
+++ b/include/global.h
@@ -63,8 +63,6 @@
// Converts a Q24.8 fixed-point format number to a regular integer
#define Q_24_8_TO_INT(n) ((int)((n) >> 8))
-#define PARTY_SIZE 6
-
#define POKEMON_SLOTS_NUMBER 412
#define min(a, b) ((a) < (b) ? (a) : (b))
@@ -212,18 +210,20 @@ struct BerryCrush
struct ApprenticeMon
{
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u16 item;
};
+// This is for past players Apprentices or Apprentices received via Record Mix.
+// For the current Apprentice, see struct PlayersApprentice
struct Apprentice
{
u8 id:5;
u8 lvlMode:2; // + 1
- u8 field_1;
+ u8 numQuestions;
u8 number;
- struct ApprenticeMon party[3];
- u16 easyChatWords[6];
+ struct ApprenticeMon party[MULTI_PARTY_SIZE];
+ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
u8 playerId[TRAINER_ID_LENGTH];
u8 playerName[PLAYER_NAME_LENGTH];
u8 language;
@@ -234,7 +234,7 @@ struct BattleTowerPokemon
{
u16 species;
u16 heldItem;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 level;
u8 ppBonuses;
u8 hpEV;
@@ -266,14 +266,23 @@ struct EmeraldBattleTowerRecord
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
- /*0x10*/ u16 greeting[6];
- /*0x1C*/ u16 speechWon[6];
- /*0x28*/ u16 speechLost[6];
- /*0x34*/ struct BattleTowerPokemon party[4];
+ /*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x1C*/ u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x34*/ struct BattleTowerPokemon party[MAX_FRONTIER_PARTY_SIZE];
/*0xE4*/ u8 language;
/*0xE8*/ u32 checksum;
};
+struct BattleTowerInterview
+{
+ u16 playerSpecies;
+ u16 opponentSpecies;
+ u8 opponentName[PLAYER_NAME_LENGTH + 1];
+ u8 opponentMonNickname[POKEMON_NAME_LENGTH + 1];
+ u8 opponentLanguage;
+};
+
struct BattleTowerEReaderTrainer
{
/*0x00*/ u8 unk0;
@@ -281,17 +290,18 @@ struct BattleTowerEReaderTrainer
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
- /*0x10*/ u16 greeting[6];
- /*0x1C*/ u16 farewellPlayerLost[6];
- /*0x28*/ u16 farewellPlayerWon[6];
- /*0x34*/ struct BattleTowerPokemon party[3];
+ /*0x10*/ u16 greeting[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x1C*/ u16 farewellPlayerLost[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x28*/ u16 farewellPlayerWon[EASY_CHAT_BATTLE_WORDS_COUNT];
+ /*0x34*/ struct BattleTowerPokemon party[FRONTIER_PARTY_SIZE];
/*0xB8*/ u32 checksum;
};
-struct FrontierMonData
+// For displaying party information on the player's Battle Dome tourney page
+struct DomeMonData
{
- u16 moves[4];
- u8 evs[6];
+ u16 moves[MAX_MON_MOVES];
+ u8 evs[NUM_STATS];
u8 nature;
};
@@ -308,7 +318,7 @@ struct BattleDomeTrainer
u16 trainerId:10;
u16 isEliminated:1;
u16 eliminatedAt:2;
- u16 unk3:3;
+ u16 forfeited:3;
};
#define DOME_TOURNAMENT_TRAINERS_COUNT 16
@@ -317,112 +327,103 @@ struct BattleFrontier
{
/*0x64C*/ struct EmeraldBattleTowerRecord towerPlayer;
/*0x738*/ struct EmeraldBattleTowerRecord towerRecords[5]; // From record mixing.
- /*0xBD4*/ u16 field_BD4;
- /*0xBD6*/ u16 field_BD6;
- /*0xBD8*/ u8 field_BD8[PLAYER_NAME_LENGTH + 1];
- /*0xBE3*/ u8 field_BE0[POKEMON_NAME_LENGTH + 1];
- /*0xBEB*/ u8 field_BEB;
+ /*0xBEB*/ struct BattleTowerInterview towerInterview;
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
- /*0xCA8*/ u8 field_CA8;
- /*0xCA9*/ u8 lvlMode:2; // 0x1, 0x2 -> 0x3
- /*0xCA9*/ u8 field_CA9_a:1; // 0x4
- /*0xCA9*/ u8 field_CA9_b:1; // 0x8
- /*0xCA9*/ u8 field_CA9_c:1; // 0x10
- /*0xCA9*/ u8 field_CA9_d:1; // 0x20
- /*0xCA9*/ u8 field_CA9_e:1; // 0x40
- /*0xCA9*/ u8 field_CA9_f:1; // 0x80
- /*0xCAA*/ u16 selectedPartyMons[3];
- /*0xCB0*/ u16 field_CB0;
- /*0xCB2*/ u16 curChallengeBattleNum; // In case of battle pyramid, the floor.
+ /*0xCA8*/ u8 challengeStatus;
+ /*0xCA9*/ u8 lvlMode:2;
+ /*0xCA9*/ u8 challengePaused:1;
+ /*0xCA9*/ u8 disableRecordBattle:1;
+ /*0xCAA*/ u16 selectedPartyMons[MAX_FRONTIER_PARTY_SIZE];
+ /*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
/*0xCB4*/ u16 trainerIds[20];
- /*0xCDC*/ u32 field_CDC;
+ /*0xCDC*/ u32 winStreakActiveFlags;
/*0xCE0*/ u16 towerWinStreaks[4][2];
/*0xCF0*/ u16 towerRecordWinStreaks[4][2];
- /*0xD00*/ u16 field_D00;
- /*0xD02*/ u16 field_D02;
- /*0xD04*/ u16 field_D04;
- /*0xD06*/ u8 field_D06;
- /*0xD07*/ u8 field_D07;
- /*0xD08*/ u8 field_D08_0:1;
- /*0xD08*/ u8 field_D08_1:1;
- /*0xD08*/ u8 field_D08_2:1;
- /*0xD08*/ u8 field_D08_3:1;
- /*0xD08*/ u8 field_D08_4:1;
- /*0xD08*/ u8 field_D08_5:1;
- /*0xD08*/ u8 field_D08_6:1;
- /*0xD08*/ u8 field_D08_7:1;
- /*0xD09*/ u8 filler_D09;
- /*0xD0A*/ u8 field_D0A;
- /*0xD0B*/ u8 field_D0B;
+ /*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;
+ /*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;
/*0xD0C*/ u16 domeWinStreaks[2][2];
/*0xD14*/ u16 domeRecordWinStreaks[2][2];
/*0xD1C*/ u16 domeTotalChampionships[2][2];
/*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT];
- /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][3];
- /*0xDC4*/ u16 field_DC4;
- /*0xDC6*/ u16 field_DC6;
+ /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE];
+ /*0xDC4*/ u16 unused_DC4;
+ /*0xDC6*/ u16 palacePrize;
/*0xDC8*/ u16 palaceWinStreaks[2][2];
/*0xDD0*/ u16 palaceRecordWinStreaks[2][2];
- /*0xDD8*/ u16 arenaRewardItem;
+ /*0xDD8*/ u16 arenaPrize;
/*0xDDA*/ u16 arenaWinStreaks[2];
/*0xDDE*/ u16 arenaRecordStreaks[2];
/*0xDE2*/ u16 factoryWinStreaks[2][2];
/*0xDEA*/ u16 factoryRecordWinStreaks[2][2];
/*0xDF6*/ u16 factoryRentsCount[2][2];
/*0xDFA*/ u16 factoryRecordRentsCount[2][2];
- /*0xE02*/ u16 field_E02;
+ /*0xE02*/ u16 pikePrize;
/*0xE04*/ u16 pikeWinStreaks[2];
/*0xE08*/ u16 pikeRecordStreaks[2];
/*0xE0C*/ u16 pikeTotalStreaks[2];
/*0xE10*/ u8 pikeHintedRoomIndex:3;
/*0xE10*/ u8 pikeHintedRoomType:4;
/*0xE10*/ u8 pikeHealingRoomsDisabled:1;
- /*0xE12*/ u16 pikeHeldItemsBackup[3];
- /*0xE18*/ u16 pyramidRewardItem;
+ /*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
+ /*0xE18*/ u16 pyramidPrize;
/*0xE1A*/ u16 pyramidWinStreaks[2];
/*0xE1E*/ u16 pyramidRecordStreaks[2];
/*0xE22*/ u16 pyramidRandoms[4];
/*0xE2A*/ u8 pyramidTrainerFlags;
/*0xE2C*/ struct PyramidBag pyramidBag;
/*0xE68*/ u8 pyramidLightRadius;
- /*0xE6A*/ u16 field_E6A;
- /*0xE6C*/ u16 field_E6C;
- /*0xE6E*/ u16 field_E6E;
- /*0xE70*/ struct RentalMon rentalMons[6];
+ /*0xE6A*/ u16 verdanturfTentPrize;
+ /*0xE6C*/ u16 fallarborTentPrize;
+ /*0xE6E*/ u16 slateportTentPrize;
+ /*0xE70*/ struct RentalMon rentalMons[FRONTIER_PARTY_SIZE * 2];
/*0xEB8*/ u16 battlePoints;
- /*0xEBA*/ u16 field_EBA;
+ /*0xEBA*/ u16 cardBattlePoints;
/*0xEBC*/ u32 battlesCount;
- /*0xEC0*/ u16 field_EC0[16];
- /*0xEE0*/ u8 field_EE0;
- /*0xEE1*/ u8 opponentName[2][PLAYER_NAME_LENGTH + 1];
- /*0xEF1*/ u8 field_EF1[2][4];
- /*0xEF9*/ u8 field_EF9_0:7;
- /*0xEF9*/ u8 field_EF9_1:1;
- /*0xEFA*/ u8 field_EFA;
- /*0xEFB*/ u8 field_EFB;
- /*0xEFC*/ struct FrontierMonData field_EFC[3];
-};
-
-struct Sav2_B8
-{
- u8 unk0_0:2;
- u8 unk0_1:2;
- u8 unk0_2:2;
- u8 unk0_3:2;
- u16 unk2;
+ /*0xEC0*/ u16 domeWinningMoves[DOME_TOURNAMENT_TRAINERS_COUNT];
+ /*0xEE0*/ u8 trainerFlags;
+ /*0xEE1*/ u8 opponentNames[2][PLAYER_NAME_LENGTH + 1];
+ /*0xEF1*/ u8 opponentTrainerIds[2][TRAINER_ID_LENGTH];
+ /*0xEF9*/ u8 unk_EF9:7; // Never read
+ /*0xEF9*/ u8 savedGame:1;
+ /*0xEFA*/ u8 unused_EFA;
+ /*0xEFB*/ u8 unused_EFB;
+ /*0xEFC*/ struct DomeMonData domePlayerPartyData[FRONTIER_PARTY_SIZE];
+};
+
+struct ApprenticeQuestion
+{
+ 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
+ u16 data; // used both as an itemId and a moveId
};
struct PlayersApprentice
{
/*0xB0*/ u8 id;
- /*0xB1*/ u8 activeLvlMode:2; // +1, 0 means not active
- /*0xB1*/ u8 field_B1_1:4;
- /*0xB1*/ u8 field_B1_2:2;
- /*0xB2*/ u8 field_B2_0:3;
- /*0xB2*/ u8 field_B2_1:2;
- /*0xB3*/ u8 field_B3;
- /*0xB4*/ u8 monIds[3];
- /*0xB8*/ struct Sav2_B8 field_B8[9];
+ /*0xB1*/ u8 lvlMode:2; //0: Unassigned, 1: Lv 50, 2: Open Lv
+ /*0xB1*/ u8 questionsAnswered:4;
+ /*0xB1*/ u8 leadMonId:2;
+ /*0xB2*/ u8 party:3;
+ /*0xB2*/ u8 saveId:2;
+ /*0xB3*/ u8 unused;
+ /*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
+ /*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
};
struct RankingHall1P
@@ -467,7 +468,7 @@ struct SaveBlock2
/*0xA8*/ u32 field_A8; // Written to, but never read.
/*0xAC*/ u32 encryptionKey;
/*0xB0*/ struct PlayersApprentice playerApprentice;
- /*0xDC*/ struct Apprentice apprentices[4]; // From record mixing.
+ /*0xDC*/ struct Apprentice apprentices[APPRENTICE_COUNT];
/*0x1EC*/ struct BerryCrush berryCrush;
/*0x1FC*/ struct PokemonJumpResults pokeJump;
/*0x20C*/ struct BerryPickingResults berryPick;
@@ -502,8 +503,8 @@ struct SecretBase
/*0x1AAA*/ u16 numSecretBasesReceived;
/*0x1AAC*/ u8 numTimesEntered;
/*0x1AAD*/ u8 sbr_field_11;
- /*0x1AAE*/ u8 decorations[16];
- /*0x1ABE*/ u8 decorationPositions[16];
+ /*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE];
+ /*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE];
/*0x1AD0*/ struct SecretBaseParty party;
};
@@ -596,9 +597,9 @@ struct MauvilleManCommon
struct MauvilleManBard
{
/*0x00*/ u8 id;
- /*0x02*/ u16 songLyrics[6];
- /*0x0E*/ u16 temporaryLyrics[6];
- /*0x1A*/ u8 playerName[8];
+ /*0x02*/ u16 songLyrics[BARD_SONG_LENGTH];
+ /*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH];
+ /*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x22*/ u8 filler_2DB6[0x3];
/*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
/*0x29*/ bool8 hasChangedSong;
@@ -610,10 +611,10 @@ struct MauvilleManStoryteller
u8 id;
bool8 alreadyRecorded;
u8 filler2[2];
- u8 gameStatIDs[4];
- u8 trainerNames[4][7];
- u8 statValues[4][4];
- u8 language[4];
+ u8 gameStatIDs[NUM_STORYTELLER_TALES];
+ u8 trainerNames[NUM_STORYTELLER_TALES][PLAYER_NAME_LENGTH];
+ u8 statValues[NUM_STORYTELLER_TALES][4];
+ u8 language[NUM_STORYTELLER_TALES];
};
struct MauvilleManGiddy
@@ -636,10 +637,10 @@ struct MauvilleManHipster
struct MauvilleOldManTrader
{
u8 id;
- u8 decorIds[4];
- u8 playerNames[4][11];
+ u8 decorIds[NUM_TRADER_ITEMS];
+ u8 playerNames[NUM_TRADER_ITEMS][11];
u8 alreadyTraded;
- u8 language[4];
+ u8 language[NUM_TRADER_ITEMS];
};
typedef union OldMan
@@ -808,15 +809,15 @@ struct SaveTrainerHill
{
/*0x3D64*/ u32 timer;
/*0x3D68*/ u32 bestTime;
- /*0x3D6C*/ u8 field_3D6C;
+ /*0x3D6C*/ u8 unk_3D6C;
/*0x3D6D*/ u8 unused;
- /*0x3D6E*/ u16 field_3D6E_0a:1; // 1
- /*0x3D6E*/ u16 field_3D6E_0b:1; // 2
- /*0x3D6E*/ u16 field_3D6E_0c:1; // 4
- /*0x3D6E*/ u16 hasLost:1; // 8
- /*0x3D6E*/ u16 maybeECardScanDuringChallenge:1; // x10
- /*0x3D6E*/ u16 field_3D6E_0f:1; // x20
- /*0x3D6E*/ u16 tag:2; // x40, x80 = xC0
+ /*0x3D6E*/ u16 receivedPrize:1;
+ /*0x3D6E*/ u16 checkedFinalTime:1;
+ /*0x3D6E*/ u16 spokeToOwner:1;
+ /*0x3D6E*/ u16 hasLost:1;
+ /*0x3D6E*/ u16 maybeECardScanDuringChallenge:1;
+ /*0x3D6E*/ u16 field_3D6E_0f:1;
+ /*0x3D6E*/ u16 tag:2;
};
struct MysteryEventStruct
@@ -919,7 +920,7 @@ struct SaveBlock1
/*0x9BC*/ u16 berryBlenderRecords[3];
/*0x9C2*/ u8 field_9C2[6];
/*0x9C8*/ u16 trainerRematchStepCounter;
- /*0x9CA*/ u8 trainerRematches[100];
+ /*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
/*0xA30*/ struct EventObject eventObjects[EVENT_OBJECTS_COUNT];
/*0xC70*/ struct EventObjectTemplate eventObjectTemplates[EVENT_OBJECT_TEMPLATES_COUNT];
/*0x1270*/ u8 flags[FLAGS_COUNT];
@@ -927,16 +928,16 @@ struct SaveBlock1
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
/*0x1A9C*/ struct SecretBase secretBases[SECRET_BASES_COUNT];
- /*0x271C*/ u8 playerRoomDecor[12];
- /*0x2728*/ u8 playerRoomDecorPos[12];
+ /*0x271C*/ u8 playerRoomDecor[DECOR_MAX_PLAYERS_HOUSE];
+ /*0x2728*/ u8 playerRoomDecorPos[DECOR_MAX_PLAYERS_HOUSE];
/*0x2734*/ u8 decorDesk[10];
- /*0x????*/ u8 decorChair[10];
- /*0x????*/ u8 decorPlant[10];
- /*0x????*/ u8 decorOrnament[30];
- /*0x????*/ u8 decorMat[30];
- /*0x????*/ u8 decorPoster[10];
- /*0x????*/ u8 decorDoll[40];
- /*0x????*/ u8 decorCushion[10];
+ /*0x273E*/ u8 decorChair[10];
+ /*0x2748*/ u8 decorPlant[10];
+ /*0x2752*/ u8 decorOrnament[30];
+ /*0x2770*/ u8 decorMat[30];
+ /*0x278E*/ u8 decorPoster[10];
+ /*0x2798*/ u8 decorDoll[40];
+ /*0x27C0*/ u8 decorCushion[10];
/*0x27CA*/ u8 padding_27CA[2];
/*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT];
/*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT];
@@ -946,15 +947,15 @@ struct SaveBlock1
/*0x2B94*/ u8 outbreakPokemonLevel;
/*0x2B95*/ u8 outbreakUnk1;
/*0x2B96*/ u16 outbreakUnk2;
- /*0x2B98*/ u16 outbreakPokemonMoves[4];
+ /*0x2B98*/ u16 outbreakPokemonMoves[MAX_MON_MOVES];
/*0x2BA0*/ u8 outbreakUnk4;
/*0x2BA1*/ u8 outbreakPokemonProbability;
/*0x2BA2*/ u16 outbreakDaysLeft;
/*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData;
- /*0x2BB0*/ u16 easyChatProfile[6];
- /*0x2BBC*/ u16 easyChatBattleStart[6];
- /*0x2BC8*/ u16 easyChatBattleWon[6];
- /*0x2BD4*/ u16 easyChatBattleLost[6];
+ /*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];
/*0x2BE0*/ struct MailStruct mail[MAIL_COUNT];
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
/*0x2E28*/ OldMan oldMan;
diff --git a/include/global.tv.h b/include/global.tv.h
index aa151a75c..34791d43c 100644
--- a/include/global.tv.h
+++ b/include/global.tv.h
@@ -1,46 +1,6 @@
#ifndef GUARD_GLOBAL_TV_H
#define GUARD_GLOBAL_TV_H
-enum
-{
- TVSHOW_OFF_AIR,
-
- TVSHOW_FAN_CLUB_LETTER = 1,
- TVSHOW_RECENT_HAPPENINGS,
- TVSHOW_PKMN_FAN_CLUB_OPINIONS,
- TVSHOW_UNKN_SHOWTYPE_04,
- TVSHOW_NAME_RATER_SHOW,
- TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE,
- TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE,
- TVSHOW_CONTEST_LIVE_UPDATES,
- TVSHOW_3_CHEERS_FOR_POKEBLOCKS,
- TVSHOW_BATTLE_UPDATE,
- TVSHOW_FAN_CLUB_SPECIAL,
- TVSHOW_CONTEST_LIVE_UPDATES_2,
-
- TVSHOW_POKEMON_TODAY_CAUGHT = 21,
- TVSHOW_SMART_SHOPPER,
- TVSHOW_POKEMON_TODAY_FAILED,
- TVSHOW_FISHING_ADVICE,
- TVSHOW_WORLD_OF_MASTERS,
- TVSHOW_TODAYS_RIVAL_TRAINER,
- TVSHOW_TREND_WATCHER,
- TVSHOW_TREASURE_INVESTIGATORS,
- TVSHOW_FIND_THAT_GAMER,
- TVSHOW_BREAKING_NEWS,
- TVSHOW_SECRET_BASE_VISIT,
- TVSHOW_LOTTO_WINNER,
- TVSHOW_BATTLE_SEMINAR,
- TVSHOW_TRAINER_FAN_CLUB,
- TVSHOW_CUTIES,
- TVSHOW_FRONTIER,
- TVSHOW_NUMBER_ONE,
- TVSHOW_SECRET_BASE_SECRETS,
- TVSHOW_SAFARI_FAN_CLUB,
-
- TVSHOW_MASS_OUTBREAK = 41,
-};
-
typedef union // size = 0x24
{
// Common
@@ -482,7 +442,7 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u8 var02;
/*0x03*/ u8 var03;
- /*0x04*/ u16 moves[4];
+ /*0x04*/ u16 moves[MAX_MON_MOVES];
/*0x0C*/ u16 species;
/*0x0E*/ u16 var0E;
/*0x10*/ u8 locationMapNum;
@@ -496,14 +456,6 @@ typedef union // size = 0x24
} massOutbreak;
} TVShow;
-enum {
- POKENEWS_NONE,
- POKENEWS_SLATEPORT,
- POKENEWS_GAME_CORNER,
- POKENEWS_LILYCOVE,
- POKENEWS_BLENDMASTER
-};
-
typedef struct // 2b50
{
u8 kind;
diff --git a/include/gpu_regs.h b/include/gpu_regs.h
deleted file mode 100644
index 89e0cb64b..000000000
--- a/include/gpu_regs.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef GUARD_GPU_REGS_H
-#define GUARD_GPU_REGS_H
-
-// Exported type declarations
-
-// Exported RAM declarations
-
-// Exported ROM declarations
-void InitGpuRegManager(void);
-void CopyBufferedValuesToGpuRegs(void);
-void SetGpuReg(u8 regOffset, u16 value);
-void SetGpuReg_ForcedBlank(u8 regOffset, u16 value);
-u16 GetGpuReg(u8 regOffset);
-void SetGpuRegBits(u8 regOffset, u16 mask);
-void ClearGpuRegBits(u8 regOffset, u16 mask);
-void EnableInterrupts(u16 mask);
-void DisableInterrupts(u16 mask);
-
-#endif //GUARD_GPU_REGS_H
diff --git a/include/graphics.h b/include/graphics.h
index d1d99cc8f..a8d4453b0 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -3093,90 +3093,93 @@ extern const u32 gPokeblock_Gfx[];
extern const u32 gItemIcon_QuestionMark[];
extern const u32 gItemIconPalette_QuestionMark[];
-extern const u32 gUnknown_08DB7AA0[];
-extern const u32 gUnknown_08DB7B34[];
-extern const u32 gUnknown_08DB7B5C[];
-extern const u32 gUnknown_08DB7BEC[];
-extern const u32 gUnknown_08DB7C08[];
-extern const u32 gUnknown_08DB7CE8[];
-extern const u32 gUnknown_08DB7D08[];
-extern const u32 gUnknown_08DB7DCC[];
-extern const u32 gUnknown_08DB7DF4[];
-extern const u32 gUnknown_08DB7EA0[];
-extern const u32 gUnknown_08DB7EC4[];
-extern const u32 gUnknown_08DB7F60[];
-extern const u32 gUnknown_08DB7F7C[];
-extern const u32 gUnknown_08DB8070[];
-extern const u32 gUnknown_08DB808C[];
-extern const u32 gUnknown_08DB8138[];
-extern const u32 gUnknown_08DB8160[];
-extern const u32 gUnknown_08DB8218[];
-extern const u32 gUnknown_08DB823C[];
-extern const u32 gUnknown_08DB8300[];
-extern const u32 gUnknown_08DB8328[];
-extern const u32 gUnknown_08DB8430[];
-extern const u32 gUnknown_08DB8458[];
-extern const u32 gUnknown_08DB8528[];
-extern const u32 gUnknown_08DB854C[];
-extern const u32 gUnknown_08DB862C[];
-extern const u32 gUnknown_08DB8654[];
-extern const u32 gUnknown_08DB86C4[];
-extern const u32 gUnknown_08DB86E0[];
-extern const u32 gUnknown_08DB8750[];
-extern const u32 gUnknown_08DB876C[];
-extern const u32 gUnknown_08DB87DC[];
-extern const u32 gUnknown_08DB87F8[];
-extern const u32 gUnknown_08DB88D8[];
-extern const u32 gUnknown_08DB8900[];
-extern const u32 gUnknown_08DB89E0[];
-extern const u32 gUnknown_08DB8A08[];
-extern const u32 gUnknown_08DB8A68[];
-extern const u32 gUnknown_08DB8A84[];
-extern const u32 gUnknown_08DB8B40[];
-extern const u32 gUnknown_08DB8B68[];
-extern const u32 gUnknown_08DB8C40[];
-extern const u32 gUnknown_08DB8C5C[];
-extern const u32 gUnknown_08DB8CF4[];
-extern const u32 gUnknown_08DB8D18[];
-extern const u32 gUnknown_08DB8DB0[];
-extern const u32 gUnknown_08DB8DD4[];
-extern const u32 gUnknown_08DB8E80[];
-extern const u32 gUnknown_08DB8EA0[];
-extern const u32 gUnknown_08DB8F58[];
-extern const u32 gUnknown_08DB8F7C[];
-extern const u32 gUnknown_08DB9038[];
-extern const u32 gUnknown_08DB9058[];
-extern const u32 gUnknown_08DB9130[];
-extern const u32 gUnknown_08DB9154[];
-extern const u32 gUnknown_08DB9218[];
-extern const u32 gUnknown_08DB9234[];
-extern const u32 gUnknown_08DB92FC[];
-extern const u32 gUnknown_08DB931C[];
-extern const u32 gUnknown_08DB93E8[];
-extern const u32 gUnknown_08DB940C[];
-extern const u32 gUnknown_08DB94CC[];
-extern const u32 gUnknown_08DB94E8[];
-extern const u32 gUnknown_08DB95AC[];
-extern const u32 gUnknown_08DB95D0[];
-extern const u32 gUnknown_08DB96C4[];
-extern const u32 gUnknown_08DB96EC[];
-extern const u32 gUnknown_08DB97F4[];
-extern const u32 gUnknown_08DB981C[];
-extern const u32 gUnknown_08DB9908[];
-extern const u32 gUnknown_08DB9930[];
-extern const u32 gUnknown_08DB9A54[];
-extern const u32 gUnknown_08DB9A7C[];
-extern const u32 gUnknown_08DB9B7C[];
-extern const u32 gUnknown_08DB9BA4[];
-extern const u32 gUnknown_08DB9CB0[];
-extern const u32 gUnknown_08DB9CD8[];
-extern const u32 gUnknown_08DB9DAC[];
-extern const u32 gUnknown_08DB9DD4[];
-extern const u32 gUnknown_08DB9EE4[];
-extern const u32 gUnknown_08DB9F08[];
-extern const u32 gUnknown_08DB9FFC[];
-extern const u32 gUnknown_08DBA020[];
-extern const u32 gUnknown_08DBA12C[];
+
+// Decorations
+extern const u32 gDecorIcon_HeavyDesk[];
+extern const u32 gDecorIconPalette_HeavyDesk[];
+extern const u32 gDecorIcon_RaggedDesk[];
+extern const u32 gDecorIconPalette_RaggedDesk[];
+extern const u32 gDecorIcon_ComfortDesk[];
+extern const u32 gDecorIconPalette_ComfortDesk[];
+extern const u32 gDecorIcon_PrettyDesk[];
+extern const u32 gDecorIconPalette_PrettyDesk[];
+extern const u32 gDecorIcon_BrickDesk[];
+extern const u32 gDecorIconPalette_BrickDesk[];
+extern const u32 gDecorIcon_CampDesk[];
+extern const u32 gDecorIconPalette_CampDesk[];
+extern const u32 gDecorIcon_HardDesk[];
+extern const u32 gDecorIconPalette_HardDesk[];
+extern const u32 gDecorIcon_RedPlant[];
+extern const u32 gDecorIconPalette_RedPlant[];
+extern const u32 gDecorIcon_TropicalPlant[];
+extern const u32 gDecorIconPalette_TropicalPlant[];
+extern const u32 gDecorIcon_PrettyFlowers[];
+extern const u32 gDecorIconPalette_PrettyFlowers[];
+extern const u32 gDecorIcon_ColorfulPlant[];
+extern const u32 gDecorIconPalette_ColorfulPlant[];
+extern const u32 gDecorIcon_BigPlant[];
+extern const u32 gDecorIconPalette_BigPlant[];
+extern const u32 gDecorIcon_GorgeousPlant[];
+extern const u32 gDecorIconPalette_GorgeousPlant[];
+extern const u32 gDecorIcon_RedBrick[];
+extern const u32 gDecorIconPalette_RedBrick[];
+extern const u32 gDecorIcon_YellowBrick[];
+extern const u32 gDecorIconPalette_YellowBrick[];
+extern const u32 gDecorIcon_BlueBrick[];
+extern const u32 gDecorIconPalette_BlueBrick[];
+extern const u32 gDecorIcon_RedTent[];
+extern const u32 gDecorIconPalette_RedTent[];
+extern const u32 gDecorIcon_BlueTent[];
+extern const u32 gDecorIconPalette_BlueTent[];
+extern const u32 gDecorIcon_SolidBoard[];
+extern const u32 gDecorIconPalette_SolidBoard[];
+extern const u32 gDecorIcon_Slide[];
+extern const u32 gDecorIconPalette_Slide[];
+extern const u32 gDecorIcon_Tire[];
+extern const u32 gDecorIconPalette_Tire[];
+extern const u32 gDecorIcon_Stand[];
+extern const u32 gDecorIconPalette_Stand[];
+extern const u32 gDecorIcon_BreakableDoor[];
+extern const u32 gDecorIconPalette_BreakableDoor[];
+extern const u32 gDecorIcon_SandOrnament[];
+extern const u32 gDecorIconPalette_SandOrnament[];
+extern const u32 gDecorIcon_GlassOrnament[];
+extern const u32 gDecorIconPalette_GlassOrnament[];
+extern const u32 gDecorIcon_SurfMat[];
+extern const u32 gDecorIconPalette_SurfMat[];
+extern const u32 gDecorIcon_ThunderMat[];
+extern const u32 gDecorIconPalette_ThunderMat[];
+extern const u32 gDecorIcon_FireBlastMat[];
+extern const u32 gDecorIconPalette_FireBlastMat[];
+extern const u32 gDecorIcon_PowderSnowMat[];
+extern const u32 gDecorIconPalette_PowderSnowMat[];
+extern const u32 gDecorIcon_AttractMat[];
+extern const u32 gDecorIconPalette_AttractMat[];
+extern const u32 gDecorIcon_FissureMat[];
+extern const u32 gDecorIconPalette_FissureMat[];
+extern const u32 gDecorIcon_SpikesMat[];
+extern const u32 gDecorIconPalette_SpikesMat[];
+extern const u32 gDecorIcon_SnorlaxDoll[];
+extern const u32 gDecorIconPalette_SnorlaxDoll[];
+extern const u32 gDecorIcon_RhydonDoll[];
+extern const u32 gDecorIconPalette_RhydonDoll[];
+extern const u32 gDecorIcon_LaprasDoll[];
+extern const u32 gDecorIconPalette_LaprasDoll[];
+extern const u32 gDecorIcon_VenusaurDoll[];
+extern const u32 gDecorIconPalette_VenusaurDoll[];
+extern const u32 gDecorIcon_CharizardDoll[];
+extern const u32 gDecorIconPalette_CharizardDoll[];
+extern const u32 gDecorIcon_BlastoiseDoll[];
+extern const u32 gDecorIconPalette_BlastoiseDoll[];
+extern const u32 gDecorIcon_WailmerDoll[];
+extern const u32 gDecorIconPalette_WailmerDoll[];
+extern const u32 gDecorIcon_RegirockDoll[];
+extern const u32 gDecorIconPalette_RegirockDoll[];
+extern const u32 gDecorIcon_RegiceDoll[];
+extern const u32 gDecorIconPalette_RegiceDoll[];
+extern const u32 gDecorIcon_RegisteelDoll[];
+extern const u32 gDecorIconPalette_RegisteelDoll[];
+
extern const u32 gWallclock_Gfx[];
extern const u16 gWallclockMale_Pal[];
extern const u16 gWallclockFemale_Pal[];
@@ -3205,7 +3208,7 @@ extern const u32 gBattleTextboxTiles[];
extern const u32 gBattleTextboxTilemap[];
extern const u32 gBattleTextboxPalette[];
extern const u32 gUnknown_08D778F0[];
-extern const u32 gUnknown_08D77B0C[];
+extern const u32 gVsLettersGfx[];
extern const u32 gUnknown_08D77AE4[];
extern const u32 gUnknown_08D779D8[];
extern const u32 gUnknown_08D857A8[];
@@ -3913,9 +3916,9 @@ extern const u16 gIntro2FlygonPal[];
extern const u32 gIntro2FlygonGfx[];
// party menu graphics
-extern const u32 gPartyMenuMisc_Gfx[];
-extern const u32 gPartyMenuMisc_Tilemap[];
-extern const u32 gPartyMenuMisc_Pal[];
+extern const u32 gPartyMenuBg_Gfx[];
+extern const u32 gPartyMenuBg_Tilemap[];
+extern const u32 gPartyMenuBg_Pal[];
// berry pics
extern const u32 gBerryPic_Cheri[];
@@ -4114,19 +4117,19 @@ extern const u16 gTitleScreenBgPalettes[];
extern const u16 gTitleScreenPressStartPal[];
extern const u16 gTitleScreenEmeraldVersionPal[];
-extern const u32 gUnknown_08D83D50[];
-extern const u32 gUnknown_08D84970[];
-extern const u32 gUnknown_08D84F00[];
-extern const u32 gUnknown_08D85444[];
-extern const u32 gUnknown_08D85358[];
-extern const u32 gUnknown_08D85600[];
-extern const u32 gUnknown_08D854C8[];
-extern const u32 gUnknown_08D82F10[];
-extern const u32 gUnknown_08D834FC[];
-extern const u32 gUnknown_08D83B2C[];
-extern const u32 gUnknown_08D83C3C[];
-extern const u32 gUnknown_08D83900[];
-extern const u32 gBattleFrontierGfx_DomeOptions[];
+// Battle Dome
+extern const u32 gDomeTourneyInfoCard_Gfx[];
+extern const u32 gDomeTourneyInfoCard_Tilemap[];
+extern const u32 gDomeTourneyInfoCardBg_Tilemap[];
+extern const u32 gDomeTourneyTree_Pal[];
+extern const u32 gDomeTourneyTreeButtons_Pal[];
+extern const u32 gDomeTourneyMatchCardBg_Pal[];
+extern const u32 gDomeTourneyBg_Gfx[];
+extern const u32 gDomeTourneyLine_Gfx[];
+extern const u32 gDomeTourneyLineDown_Tilemap[];
+extern const u32 gDomeTourneyLineUp_Tilemap[];
+extern const u32 gDomeTourneyLineMask_Tilemap[];
+extern const u32 gDomeTourneyTreeButtons_Gfx[];
extern const u16 gTilesetAnims_BattleDomePals0_0[];
extern const u16 gTilesetAnims_BattleDomePals0_1[];
extern const u16 gTilesetAnims_BattleDomePals0_2[];
@@ -4134,6 +4137,9 @@ extern const u16 gTilesetAnims_BattleDomePals0_3[];
extern const u32 gBattleArenaJudgementSymbolsGfx[];
extern const u32 gBattleArenaJudgementSymbolsPalette[];
+
+extern const u32 gBattleWindowTextPalette[];
+
extern const u32 gContest2Pal[];
extern const u32 gBattleAnimSpriteGfx_Bone[];
@@ -4360,7 +4366,7 @@ extern const u32 gBattleAnimSpriteGfx_Pokeball[];
extern const u32 gBattleAnimSpriteGfx_Spotlight[];
extern const u32 gBattleAnimSpriteGfx_LetterZ[];
extern const u32 gBattleAnimSpriteGfx_RapidSpin[];
-extern const u32 gBattleAnimSpriteGfx_TriForceTriangle[];
+extern const u32 gBattleAnimSpriteGfx_TriAttackTriangle[];
extern const u32 gBattleAnimSpriteGfx_WispOrb[];
extern const u32 gBattleAnimSpriteGfx_WispFire[];
extern const u32 gBattleAnimSpriteGfx_GoldStars[];
@@ -4643,7 +4649,7 @@ extern const u32 gBattleAnimSpritePal_JaggedMusicNote[];
extern const u32 gBattleAnimSpritePal_Pokeball[];
extern const u32 gBattleAnimSpritePal_LetterZ[];
extern const u32 gBattleAnimSpritePal_RapidSpin[];
-extern const u32 gBattleAnimSpritePal_TriForceTriangle[];
+extern const u32 gBattleAnimSpritePal_TriAttackTriangle[];
extern const u32 gBattleAnimSpritePal_WispOrb[];
extern const u32 gBattleAnimSpritePal_GoldStars[];
extern const u32 gBattleAnimSpritePal_EclipsingOrb[];
@@ -4845,13 +4851,13 @@ extern const u32 gCableCarCord_Gfx[];
extern const u16 gCableCar_Pal[];
// Trade
-extern const u16 gUnknown_08DDB3E4[];
-extern const u8 gUnknown_08DDB464[];
+extern const u16 gTradeMenu_Pal[];
+extern const u8 gTradeMenu_Gfx[];
extern const u16 gUnknown_08DDCF04[];
extern const u16 gTradeGba2_Pal[];
extern const u8 gTradeGba_Gfx[];
-extern const u16 gUnknown_08DDD704[];
-extern const u8 gUnknown_08DDC6E4[];
+extern const u16 gTradeMenuMonBox_Tilemap[];
+extern const u8 gTradeButtons_Gfx[];
extern const u16 gUnknown_08DDB444[];
// Party menu
diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h
index 778d7a1e8..dd9ead8b7 100644
--- a/include/gym_leader_rematch.h
+++ b/include/gym_leader_rematch.h
@@ -66,7 +66,7 @@ enum {
REMATCH_TRENT,
REMATCH_SAWYER,
REMATCH_KIRA_AND_DAN,
- REMATCH_WALLY_3,
+ REMATCH_WALLY_3, // Entries above WALLY are considered normal trainers, from Wally below are special trainers
REMATCH_ROXANNE,
REMATCH_BRAWLY,
REMATCH_WATTSON,
@@ -75,19 +75,17 @@ enum {
REMATCH_WINONA,
REMATCH_TATE_AND_LIZA,
REMATCH_JUAN,
-
- // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES.
- REMATCH_SIDNEY,
+ REMATCH_SIDNEY, // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES.
REMATCH_PHOEBE,
REMATCH_GLACIA,
REMATCH_DRAKE,
REMATCH_WALLACE,
-
- // The total number of rematch entries. This must be the last element
- // in the enum.
- REMATCH_TABLE_ENTRIES
+ REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum
};
+#define REMATCH_SPECIAL_TRAINER_START REMATCH_WALLY_3
+#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
+
void UpdateGymLeaderRematch(void);
#endif //GUARD_TRAINER_REMATCH_H
diff --git a/include/hall_of_fame.h b/include/hall_of_fame.h
index 5c8a01bcb..a83fad2fc 100644
--- a/include/hall_of_fame.h
+++ b/include/hall_of_fame.h
@@ -4,7 +4,7 @@
void CB2_DoHallOfFameScreen(void);
void CB2_DoHallOfFameScreenDontSaveData(void);
void CB2_DoHallOfFamePC(void);
-void sub_8175280(void);
+void DoConfettiEffect(void);
// hof_pc.c
void ReturnFromHallOfFamePC(void);
diff --git a/include/image_processing_effects.h b/include/image_processing_effects.h
new file mode 100755
index 000000000..7f726707c
--- /dev/null
+++ b/include/image_processing_effects.h
@@ -0,0 +1,53 @@
+#ifndef GUARD_IMAGE_PROCESSING_EFFECTS_H
+#define GUARD_IMAGE_PROCESSING_EFFECTS_H
+
+enum
+{
+ IMAGE_EFFECT_POINTILLISM = 2,
+ IMAGE_EFFECT_GRAYSCALE_LIGHT = 6,
+ IMAGE_EFFECT_BLUR = 8,
+ IMAGE_EFFECT_OUTLINE_COLORED = 9,
+ IMAGE_EFFECT_INVERT_BLACK_WHITE = 10,
+ IMAGE_EFFECT_THICK_BLACK_WHITE = 11,
+ IMAGE_EFFECT_SHIMMER = 13,
+ IMAGE_EFFECT_OUTLINE = 30,
+ IMAGE_EFFECT_INVERT = 31,
+ IMAGE_EFFECT_BLUR_RIGHT = 32,
+ IMAGE_EFFECT_BLUR_DOWN = 33,
+ IMAGE_EFFECT_CHARCOAL = 36,
+};
+
+enum
+{
+ QUANTIZE_EFFECT_STANDARD,
+ QUANTIZE_EFFECT_STANDARD_LIMITED_COLORS,
+ QUANTIZE_EFFECT_PRIMARY_COLORS,
+ QUANTIZE_EFFECT_GRAYSCALE,
+ QUANTIZE_EFFECT_GRAYSCALE_SMALL,
+ QUANTIZE_EFFECT_BLACK_WHITE,
+};
+
+struct ImageProcessingContext
+{
+ u8 effect;
+ void *canvasPixels;
+ u16 *canvasPalette;
+ u8 fillerC[0x4];
+ void *dest;
+ u16 quantizeEffect;
+ u16 var_16;
+ u8 paletteStart;
+ u8 columnStart;
+ u8 rowStart;
+ u8 columnEnd;
+ u8 rowEnd;
+ u8 canvasWidth;
+ u8 canvasHeight;
+ u8 personality;
+};
+
+void ApplyImageProcessingEffects(struct ImageProcessingContext *);
+void ApplyImageProcessingQuantization(struct ImageProcessingContext *);
+void ConvertImageProcessingToGBA(struct ImageProcessingContext *);
+
+#endif
diff --git a/include/item.h b/include/item.h
index 881d3a3d4..87ff57bc7 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,26 +1,7 @@
#ifndef GUARD_ITEM_H
#define GUARD_ITEM_H
-// These constants are used in gItems
-enum
-{
- POCKET_NONE,
- POCKET_ITEMS,
- POCKET_POKE_BALLS,
- POCKET_TM_HM,
- POCKET_BERRIES,
- POCKET_KEY_ITEMS,
-};
-
-enum
-{
- ITEMS_POCKET,
- BALLS_POCKET,
- TMHM_POCKET,
- BERRIES_POCKET,
- KEYITEMS_POCKET,
- POCKETS_COUNT
-};
+#include "constants/item.h"
typedef void (*ItemUseFunc)(u8);
diff --git a/include/item_menu.h b/include/item_menu.h
index b1275549d..089bff6cf 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -71,10 +71,10 @@ extern u16 gSpecialVar_ItemId;
void sub_81AAC14(void);
void FavorLadyOpenBagMenu(void);
void QuizLadyOpenBagMenu(void);
-void sub_81AAC28(void);
+void ApprenticeOpenBagMenu(void);
void sub_81AABB0(void);
void SetInitialScrollAndCursorPositions(u8 pocketId);
-void bag_menu_mail_related(void);
+void CB2_ReturnToBagMenuPocket(void);
void CB2_BagMenuFromStartMenu(void);
u8 GetItemListPosition(u8 pocketId);
bool8 UseRegisteredKeyItemOnField(void);
@@ -82,11 +82,15 @@ void CB2_GoToSellMenu(void);
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
void DoWallyTutorialBagMenu(void);
void ResetBagScrollPositions(void);
-void sub_81AABF0(void (*callback)(void));
+void ChooseBerrySetCallback(void (*callback)(void));
void CB2_ChooseBerry(void);
-void unknown_ItemMenu_Confirm(u8 taskId);
+void Task_FadeAndCloseBagMenu(u8 taskId);
void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*);
-void sub_81AB9A8(u8 pocketId);
+void BagMenu_InitListsMenu(u8 taskId);
+void UpdatePocketItemList(u8 pocketId);
+void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId));
+void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
+
#endif //GUARD_item_menu_H
diff --git a/include/item_use.h b/include/item_use.h
index 37343f6e7..0cb76e7d4 100644
--- a/include/item_use.h
+++ b/include/item_use.h
@@ -3,27 +3,13 @@
void ItemUseOutOfBattle_Mail(u8);
void ItemUseOutOfBattle_Bike(u8);
-void ItemUseOnFieldCB_Bike(u8);
void ItemUseOutOfBattle_Rod(u8);
-void ItemUseOnFieldCB_Rod(u8);
void ItemUseOutOfBattle_Itemfinder(u8);
-void ItemUseOnFieldCB_Itemfinder(u8);
-void RunItemfinderResults(u8);
-void ExitItemfinder(u8);
-bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8);
-void sub_80C9720(u8);
-void sub_80C9838(u8, s16, s16);
-u8 GetPlayerDirectionTowardsHiddenItem(s16, s16);
-void SetPlayerDirectionTowardsItem(u8);
-void DisplayItemRespondingMessageAndExitItemfinder(u8);
-void RotatePlayerAndExitItemfinder(u8);
void ItemUseOutOfBattle_PokeblockCase(u8);
void ItemUseOutOfBattle_CoinCase(u8);
void ItemUseOutOfBattle_PowderJar(u8);
void ItemUseOutOfBattle_SSTicket(u8);
-void sub_80C9D00(u8);
void ItemUseOutOfBattle_WailmerPail(u8);
-void sub_80C9D74(u8);
void ItemUseOutOfBattle_Medicine(u8);
void ItemUseOutOfBattle_ReduceEV(u8);
void ItemUseOutOfBattle_SacredAsh(u8);
@@ -31,25 +17,21 @@ void ItemUseOutOfBattle_PPRecovery(u8);
void ItemUseOutOfBattle_PPUp(u8);
void ItemUseOutOfBattle_RareCandy(u8);
void ItemUseOutOfBattle_TMHM(u8);
-void sub_80C9EE4(u8);
-void sub_80C9F10(u8);
-void sub_80C9F80(u8);
-void sub_80C9FC0(u8);
void ItemUseOutOfBattle_Repel(u8);
-void ItemUseOutOfBattle_BlackWhiteFlute(u8);
-void task08_080A1C44(u8);
-u8 CanUseEscapeRopeOnCurrMap(void);
void ItemUseOutOfBattle_EscapeRope(u8);
+void ItemUseOutOfBattle_BlackWhiteFlute(u8);
void ItemUseOutOfBattle_EvolutionStone(u8);
+void ItemUseOutOfBattle_Berry(u8);
+void ItemUseOutOfBattle_EnigmaBerry(u8);
+void ItemUseOutOfBattle_CannotUse(u8);
void ItemUseInBattle_PokeBall(u8);
void ItemUseInBattle_StatIncrease(u8);
void ItemUseInBattle_Medicine(u8);
void ItemUseInBattle_PPRecovery(u8);
void ItemUseInBattle_Escape(u8);
-void ItemUseOutOfBattle_EnigmaBerry(u8);
void ItemUseInBattle_EnigmaBerry(u8);
-void ItemUseOutOfBattle_CannotUse(u8);
+void Task_UseDigEscapeRopeOnField(u8 taskId);
+u8 CanUseEscapeRopeOnCurrMap(void);
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId);
-void sub_80FDD10(u8);
#endif // GUARD_ITEM_USE_H
diff --git a/include/librfu.h b/include/librfu.h
index 38c819835..55b5d264c 100644
--- a/include/librfu.h
+++ b/include/librfu.h
@@ -76,10 +76,10 @@ struct UnkLinkRfuStruct_02022B14Substruct
u16 unk_00_4:1;
u16 unk_00_5:1;
u16 unk_00_6:1;
- u16 unk_00_7:1;
- u16 unk_01_0:1;
- u16 unk_01_1:1;
- u16 unk_01_2:4;
+ u16 isChampion:1;
+ u16 hasNationalDex:1;
+ u16 gameClear:1; // never read, redundant with isChampion
+ u16 unk_01_2:4; // always 3?
u16 unk_01_6:2;
u8 playerTrainerId[2];
};
@@ -93,7 +93,7 @@ struct __attribute__((packed, aligned(2))) UnkLinkRfuStruct_02022B14
u8 unk_0a_0:7;
u8 unk_0a_7:1;
u8 playerGender:1;
- u8 unk_0b_1:7;
+ u8 level:7;
u8 unk_0c;
};
diff --git a/include/link.h b/include/link.h
index c14084066..f41161d23 100644
--- a/include/link.h
+++ b/include/link.h
@@ -48,20 +48,52 @@
#define EXTRACT_LINK_ERRORS(status) \
(((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT)
-#define LINKCMD_SEND_LINK_TYPE 0x2222
-#define LINKCMD_0x2FFE 0x2FFE
-#define LINKCMD_SEND_HELD_KEYS 0x4444
-#define LINKCMD_0x5555 0x5555
-#define LINKCMD_0x5566 0x5566
-#define LINKCMD_0x5FFF 0x5FFF
-#define LINKCMD_0x6666 0x6666
-#define LINKCMD_0x7777 0x7777
-#define LINKCMD_CONT_BLOCK 0x8888
-#define LINKCMD_0xAAAA 0xAAAA
-#define LINKCMD_0xAAAB 0xAAAB
-#define LINKCMD_INIT_BLOCK 0xBBBB
-#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE
-#define LINKCMD_0xCCCC 0xCCCC
+#define LINKCMD_SEND_LINK_TYPE 0x2222
+#define LINKCMD_0x2FFE 0x2FFE
+#define LINKCMD_SEND_HELD_KEYS 0x4444
+#define LINKCMD_0x5555 0x5555
+#define LINKCMD_0x5566 0x5566
+#define LINKCMD_0x5FFF 0x5FFF
+#define LINKCMD_0x6666 0x6666
+#define LINKCMD_0x7777 0x7777
+#define LINKCMD_CONT_BLOCK 0x8888
+#define LINKCMD_0xAAAA 0xAAAA
+#define LINKCMD_0xAAAB 0xAAAB
+#define LINKCMD_READY_TO_TRADE 0xAABB
+#define LINKCMD_READY_FINISH_TRADE 0xABCD
+#define LINKCMD_INIT_BLOCK 0xBBBB
+#define LINKCMD_READY_CANCEL_TRADE 0xBBCC
+#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE
+#define LINKCMD_0xCCCC 0xCCCC
+#define LINKCMD_START_TRADE 0xCCDD
+#define LINKCMD_CONFIRM_FINISH_TRADE 0xDCBA
+#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD
+#define LINKCMD_0xDDEE 0xDDEE
+#define LINKCMD_REQUEST_CANCEL 0xEEAA
+#define LINKCMD_CANCEL_TRADE 0xEEBB
+#define LINKCMD_0xEECC 0xEECC
+
+#define LINKTYPE_0x1111 0x1111 // trade
+#define LINKTYPE_0x1122 0x1122 // trade
+#define LINKTYPE_0x1133 0x1133 // trade
+#define LINKTYPE_0x1144 0x1144 // trade
+#define LINKTYPE_BATTLE 0x2211
+#define LINKTYPE_0x2222 0x2222 // unused battle?
+#define LINKTYPE_SINGLE_BATTLE 0x2233
+#define LINKTYPE_DOUBLE_BATTLE 0x2244
+#define LINKTYPE_MULTI_BATTLE 0x2255
+#define LINKTYPE_BATTLE_TOWER_50 0x2266
+#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277
+#define LINKTYPE_BATTLE_TOWER 0x2288
+#define LINKTYPE_0x3311 0x3311
+#define LINKTYPE_0x3322 0x3322
+#define LINKTYPE_BERRY_BLENDER_SETUP 0x4411
+#define LINKTYPE_BERRY_BLENDER 0x4422
+#define LINKTYPE_0x5501 0x5501 // mystery event
+#define LINKTYPE_0x5502 0x5502 // unused?
+#define LINKTYPE_0x5503 0x5503 // eReader
+#define LINKTYPE_CONTEST_GMODE 0x6601
+#define LINKTYPE_CONTEST_EMODE 0x6602
struct LinkStatus
{
@@ -95,8 +127,8 @@ enum
EXCHANGE_COMPLETE,
EXCHANGE_TIMED_OUT,
EXCHANGE_IN_PROGRESS,
- EXCHANGE_STAT_4,
- EXCHANGE_STAT_5,
+ EXCHANGE_PLAYER_NOT_READY,
+ EXCHANGE_PARTNER_NOT_READY,
EXCHANGE_STAT_6,
EXCHANGE_STAT_7
};
@@ -120,7 +152,10 @@ struct LinkPlayer
/* 0x00 */ u16 version;
/* 0x02 */ u16 lp_field_2;
/* 0x04 */ u32 trainerId;
- /* 0x08 */ u8 name[11];
+ /* 0x08 */ u8 name[PLAYER_NAME_LENGTH + 1];
+ /* 0x10 */ u8 progressFlags; // (& 0x0F) is hasNationalDex, (& 0xF0) is hasClearedGame
+ /* 0x11 */ u8 neverRead;
+ /* 0x12 */ u8 progressFlagsCopy;
/* 0x13 */ u8 gender;
/* 0x14 */ u32 linkType;
/* 0x18 */ u16 id; // battler id in battles
@@ -255,7 +290,7 @@ void sub_800AF18(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 un
void sub_800B348(void);
void sub_800B3A4(u32 who);
bool32 sub_800A07C(void);
-void sub_800AB98(void);
+void ResetLinkPlayerCount(void);
void sub_800AA04(u8 a0);
void sub_800B4C0(void);
bool32 sub_800B504(void);
diff --git a/include/link_rfu.h b/include/link_rfu.h
index d6e1009e1..533e515c5 100644
--- a/include/link_rfu.h
+++ b/include/link_rfu.h
@@ -128,7 +128,7 @@ struct UnkRfuStruct_Sub_Unused
struct UnkRfuStruct_2
{
- /* 0x000 */ void (*unk_00)(void);
+ /* 0x000 */ void (*linkRfuCallback)(void);
/* 0x004 */ u16 unk_04;
/* 0x006 */ u8 filler_06[4];
/* 0x00a */ u16 unk_0a;
@@ -224,11 +224,11 @@ void sub_800F804(void);
void sub_800F850(void);
u8 sub_800FCD8(void);
bool32 sub_800FE84(const u8 *src, size_t size);
-void Rfu_set_zero(void);
+void ClearLinkRfuCallback(void);
u8 sub_80104F4(void);
u8 rfu_get_multiplayer_id(void);
bool8 sub_8010100(u8 a0);
-bool8 sub_8010500(void);
+bool8 IsLinkRfuTaskFinished(void);
bool8 Rfu_IsMaster(void);
void task_add_05_task_del_08FA224_when_no_RfuFunc(void);
void sub_8010434(void);
diff --git a/include/match_call.h b/include/match_call.h
index 52eab63ec..8214e03b7 100644
--- a/include/match_call.h
+++ b/include/match_call.h
@@ -15,7 +15,7 @@ void InitMatchCallCounters(void);
bool32 TryStartMatchCall(void);
bool32 IsMatchCallTaskActive(void);
void StartMatchCallFromScript(u8 *message);
-void sub_8197080(u8 *destStr);
+void BufferPokedexRatingForMatchCall(u8 *destStr);
bool32 SelectMatchCallMessage(int, u8 *);
void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId);
void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId);
diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h
index 9d71e81aa..3845ac290 100644
--- a/include/mauville_old_man.h
+++ b/include/mauville_old_man.h
@@ -1,16 +1,6 @@
-
#ifndef GUARD_MAUVILLE_OLD_MAN_H
#define GUARD_MAUVILLE_OLD_MAN_H
-enum MauvilleOldManType
-{
- MAUVILLE_MAN_BARD,
- MAUVILLE_MAN_HIPSTER,
- MAUVILLE_MAN_TRADER,
- MAUVILLE_MAN_STORYTELLER,
- MAUVILLE_MAN_GIDDY
-};
-
extern struct BardSong gBardSong;
void SetMauvilleOldMan(void);
diff --git a/include/menu.h b/include/menu.h
index 62e2558dc..56865bcd9 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -1,4 +1,3 @@
-
#ifndef GUARD_MENU_H
#define GUARD_MENU_H
@@ -29,7 +28,6 @@ void DrawDialogueFrame(u8 windowId, bool8 copyToVram);
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
-void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
void DisplayYesNoMenuDefaultYes(void);
@@ -87,7 +85,7 @@ void RemoveMapNamePopUpWindow(void);
u8 GetMapNamePopUpWindowId(void);
u8 AddMapNamePopUpWindow(void);
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing);
-void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette);
+void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette);
void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP);
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
void sub_8197AE8(bool8 copyToVram);
@@ -95,7 +93,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const
s8 Menu_ProcessInputGridLayout(void);
u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted);
s8 Menu_ProcessInputNoWrapAround_other(void);
-void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height);
+void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height);
u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile);
void sub_8198314(void);
void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram);
diff --git a/include/menu_helpers.h b/include/menu_helpers.h
index 3b6c13172..442f4a063 100644
--- a/include/menu_helpers.h
+++ b/include/menu_helpers.h
@@ -4,6 +4,9 @@
#include "task.h"
#include "window.h"
+#define MENU_L_PRESSED 1
+#define MENU_R_PRESSED 2
+
// Exported type declarations
struct YesNoFuncTable
@@ -23,8 +26,8 @@ bool16 RunTextPrintersRetIsActive(u8 textPrinterId);
void DoYesNoFuncWithChoice(u8 taskId, const struct YesNoFuncTable *data);
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1);
-u8 GetLRKeysState(void);
-u8 sub_812210C(void);
+u8 GetLRKeysPressed(void);
+u8 GetLRKeysPressedAndHeld(void);
bool8 sub_8122148(u16 itemId);
bool8 itemid_80BF6D8_mail_related(u16 itemId);
bool8 sub_81221AC(void);
diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h
index 7fd1d1301..b5dae6de0 100644
--- a/include/metatile_behavior.h
+++ b/include/metatile_behavior.h
@@ -107,7 +107,7 @@ bool8 MetatileBehavior_IsPacifidlogLog(u8);
bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8);
bool8 MetatileBehavior_IsRegionMap(u8);
bool8 MetatileBehavior_IsClosedSootopolisDoor(u8);
-bool8 MetatileBehavior_IsUnknownClosedDoor(u8);
+bool8 MetatileBehavior_IsSkyPillarClosedDoor(u8);
bool8 MetatileBehavior_IsRoulette(u8);
bool8 MetatileBehavior_IsPokeblockFeeder(u8);
bool8 MetatileBehavior_IsSecretBaseJumpMat(u8);
diff --git a/include/mon_markings.h b/include/mon_markings.h
index 8e4ec58bd..241b31e01 100644
--- a/include/mon_markings.h
+++ b/include/mon_markings.h
@@ -1,17 +1,19 @@
#ifndef POKEEMERALD_MON_MARKINGS_H
#define POKEEMERALD_MON_MARKINGS_H
+#define NUM_MON_MARKINGS 4
+
struct PokemonMarkMenu
{
/*0x0000*/ u16 baseTileTag;
/*0x0002*/ u16 basePaletteTag;
/*0x0004*/ u8 markings; // bit flags
/*0x0005*/ s8 cursorPos;
- /*0x0006*/ bool8 markingsArray[4];
+ /*0x0006*/ bool8 markingsArray[NUM_MON_MARKINGS];
/*0x000A*/ u8 cursorBaseY;
/*0x000B*/ bool8 spriteSheetLoadRequired;
/*0x000C*/ struct Sprite *menuWindowSprites[2]; // upper and lower halves of menu window
- /*0x0014*/ struct Sprite *menuMarkingSprites[4];
+ /*0x0014*/ struct Sprite *menuMarkingSprites[NUM_MON_MARKINGS];
/*0x0024*/ struct Sprite *unkSprite;
/*0x0028*/ struct Sprite *menuTextSprite;
/*0x002C*/ const u8 *frameTiles;
diff --git a/include/mossdeep_gym.h b/include/mossdeep_gym.h
deleted file mode 100644
index c16730094..000000000
--- a/include/mossdeep_gym.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef GUARD_MOSSDEEP_GYM_H
-#define GUARD_MOSSDEEP_GYM_H
-
-void InitMossdeepGymTiles(bool8 arg0);
-void FinishMossdeepGymTiles(void);
-u16 MossdeepGym_MoveEvents(u8 arg0);
-void MossdeepGym_TurnEvents(void);
-
-#endif // GUARD_MOSSDEEP_GYM_H
diff --git a/include/naming_screen.h b/include/naming_screen.h
index 611f53ef2..7d32abcd3 100644
--- a/include/naming_screen.h
+++ b/include/naming_screen.h
@@ -9,6 +9,16 @@
#define KBEVENT_PRESSED_SELECT 8
#define KBEVENT_PRESSED_START 9
+#define KBROW_COUNT 4
+
+enum
+{
+ KBPAGE_LETTERS_LOWER,
+ KBPAGE_LETTERS_UPPER,
+ KBPAGE_SYMBOLS,
+ KBPAGE_COUNT,
+};
+
enum
{
NAMING_SCREEN_PLAYER,
@@ -57,12 +67,6 @@ struct NamingScreenData {
/*0x1E3C*/ MainCallback returnCallback;
};
-enum
-{
- PAGE_OTHERS,
- PAGE_UPPER,
- PAGE_LOWER,
-};
enum
{
diff --git a/include/overworld.h b/include/overworld.h
index b86067701..ac916feb1 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -136,7 +136,7 @@ void CB2_NewGame(void);
void CB2_WhiteOut(void);
void CB2_LoadMap(void);
void sub_8086024(void);
-void sub_8086074(void);
+void CB2_ReturnToFieldCableClub(void);
void CB2_ReturnToField(void);
void CB2_ReturnToFieldLocal(void);
void CB2_ReturnToFieldLink(void);
diff --git a/include/party_menu.h b/include/party_menu.h
index c9843e484..126931762 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -4,112 +4,90 @@
#include "main.h"
#include "task.h"
-enum
-{
- AILMENT_NONE,
- AILMENT_PSN,
- AILMENT_PRZ,
- AILMENT_SLP,
- AILMENT_FRZ,
- AILMENT_BRN,
- AILMENT_PKRS,
- AILMENT_FNT
-};
-
-enum
-{
- PARTY_CHOOSE_MON,
- PARTY_MUST_CHOOSE_MON,
- PARTY_CANT_SWITCH,
- PARTY_USE_ITEM_ON,
- PARTY_ABILITY_PREVENTS,
- PARTY_GIVE_ITEM,
-};
-
-struct Struct203CEC8
+// seems like the last two fields may have been left as all-purpose vars
+// and the second of the two just happens to only be used in one case
+struct PartyMenu
{
MainCallback exitCallback;
- TaskFunc unk4;
- u8 unk8_0:4;
- u8 mode:2;
- u8 unk8_2:2;
+ TaskFunc task;
+ u8 menuType:4;
+ u8 layout:2;
s8 slotId;
- s8 unkA;
- u8 unkB;
- u16 unkC;
- s16 unkE;
- s16 unk10;
+ s8 slotId2;
+ u8 action;
+ u16 bagItem;
+ s16 data1; // used variously as a moveId, counter, moveSlotId, or cursorPos
+ s16 learnMoveState; // data2, used only as a learn move state
};
-extern struct Struct203CEC8 gUnknown_0203CEC8;
-extern u8 gUnknown_0203CEE8;
-extern u8 gUnknown_0203CEE9;
+extern struct PartyMenu gPartyMenu;
+extern bool8 gPartyMenuUseExitCallback;
+extern u8 gSelectedMonPartyId;
extern MainCallback gPostMenuFieldCallback;
extern u8 gSelectedOrderFromParty[4];
-extern u8 gUnknown_0203CF00[3];
+extern u8 gBattlePartyCurrentOrder[3];
-extern void (*gUnknown_03006328)(u8, TaskFunc);
+extern void (*gItemUseCB)(u8, TaskFunc);
extern const u16 gTutorMoves[];
-void sub_81B0FCC(u8 slot, u8 b);
+void AnimatePartySlot(u8 slot, u8 animNum);
bool8 IsMultiBattle(void);
u8 GetCursorSelectionMonId(void);
-u8 sub_81B1360(void);
-void sub_81B1370(u8 taskId);
+u8 GetPartyMenuType(void);
+void Task_HandleChooseMonInput(u8 taskId);
u8* GetMonNickname(struct Pokemon *mon, u8 *dest);
-u8 sub_81B1B5C(const u8* str, u8 b);
-bool8 sub_81B1BD4(void);
-void sub_81B1F18(u8 taskId, u8 slot, s8 c, s16 HPDifference, TaskFunc func);
-u8 pokemon_ailments_get_primary(u32 status);
+u8 DisplayPartyMenuMessage(const u8* str, bool8 keepOpen);
+bool8 IsPartyMenuTextPrinterActive(void);
+void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 HPDifference, TaskFunc task);
+u8 GetAilmentFromStatus(u32 status);
u8 GetMonAilment(struct Pokemon *mon);
-void display_pokemon_menu_message(u32 stringID);
-void sub_81B47E0(u8 taskId);
+void DisplayPartyMenuStdMessage(u32 stringId);
bool8 FieldCallback_PrepareFadeInFromMenu(void);
-void sub_81B58A8(void);
+void CB2_ReturnToPartyMenuFromFlyMap(void);
void LoadHeldItemIcons(void);
-void sub_81B5D4C(u8 *a, u8 *b, u8 c);
-void sub_81B617C(void);
+void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty);
+void CB2_ShowPartyMenuForItemUse(void);
void ItemUseCB_Medicine(u8 taskId, TaskFunc task);
-void sub_81B67C8(u8 taskId, TaskFunc task);
-void dp05_ether(u8 taskId, TaskFunc task);
-void dp05_pp_up(u8 taskId, TaskFunc task);
+void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task);
+void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task);
+void ItemUseCB_PPUp(u8 taskId, TaskFunc task);
u16 ItemIdToBattleMoveId(u16 item);
bool8 IsMoveHm(u16 move);
bool8 MonKnowsMove(struct Pokemon *mon, u16 move);
-void sub_81B6DC4(u8 taskId, TaskFunc task);
-void dp05_rare_candy(u8 taskId, TaskFunc task);
-void sub_81B79E8(u8 taskId, TaskFunc task);
-void sub_81B7C74(u8 taskId, TaskFunc task);
+void ItemUseCB_TMHM(u8 taskId, TaskFunc task);
+void ItemUseCB_RareCandy(u8 taskId, TaskFunc task);
+void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task);
+void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task);
u8 GetItemEffectType(u16 item);
void CB2_PartyMenuFromStartMenu(void);
-void sub_81B7F60(void);
-void sub_81B8448(void);
+void CB2_ChooseMonToGiveItem(void);
+void ChooseMonToGiveMailFromMailbox(void);
void InitChooseHalfPartyForBattle(u8 unused);
-void sub_81B8558(void);
-void sub_81B8904(u8 initArg, MainCallback callback);
-void sub_81B892C(void);
-void sub_81B8958(void);
-void OpenPartyMenuInBattle(u8 arg);
-void sub_81B89F0(void);
-void sub_81B8C68(void);
-void sub_81B8D64(u8 battlerId, u8 multiplayerFlag);
-void sub_81B8E80(u8 battlerId, u8 unk, u8 arrayIndex);
-void sub_81B8FB0(u8 slot, u8 slot2);
-u8 pokemon_order_func(u8 slot);
-void sub_81B9150(void);
-void sub_81B9328(void);
-bool8 hm_add_c3_without_phase_2(void);
-void sub_81B9404(void);
-void sub_81B94B0(void);
-void sub_81B951C(void);
-void sub_81B9620(void);
-void sub_81B95E0(void);
-void sub_81B98DC(void);
-void sub_81B9918(void);
-void sub_81B9770(void);
-void sub_81B9718(void);
-void sub_81B96D0(void);
-void sub_81B968C(void);
+void ClearSelectedPartyOrder(void);
+void ChooseMonForTradingBoard(u8 menuType, MainCallback callback);
+void ChooseMonForMoveTutor(void);
+void ChooseMonForWirelessMinigame(void);
+void OpenPartyMenuInBattle(u8 partyAction);
+void ChooseMonForInBattleItem(void);
+void BufferBattlePartyCurrentOrder(void);
+void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId);
+void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex);
+void SwitchPartyMonSlots(u8 slot, u8 slot2);
+u8 GetPartyIdFromBattlePartyId(u8 slot);
+void ShowPartyMenuToShowcaseMultiBattleParty(void);
+void ChooseMonForDaycare(void);
+bool8 CB2_FadeFromPartyMenu(void);
+void ChooseContestMon(void);
+void ChoosePartyMon(void);
+void ChooseMonForMoveRelearner(void);
+void BattlePyramidChooseMonHeldItems(void);
+void DoBattlePyramidMonsHaveHeldItem(void);
+void IsSelectedMonEgg(void);
+void IsLastMonThatKnowsSurf(void);
+void MoveDeleterForgetMove(void);
+void BufferMoveDeleterNicknameAndMove(void);
+void GetNumMovesSelectedMonHas(void);
+void MoveDeleterChooseMoveToForget(void);
#endif // GUARD_PARTY_MENU_H
diff --git a/include/pokeball.h b/include/pokeball.h
index 8e1d8b8ec..12b9b1eff 100644
--- a/include/pokeball.h
+++ b/include/pokeball.h
@@ -25,7 +25,7 @@ extern const struct SpriteTemplate gBallSpriteTemplates[];
u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow);
void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 battler, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species);
-u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h);
+u8 CreateTradePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h);
void sub_8076918(u8 battler);
void DoHitAnimHealthboxEffect(u8 battler);
void LoadBallGfx(u8 ballId);
diff --git a/include/pokemon.h b/include/pokemon.h
index ec125573c..2e28ae0f5 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -4,136 +4,6 @@
#include "constants/pokemon.h"
#include "sprite.h"
-#define MON_DATA_PERSONALITY 0
-#define MON_DATA_OT_ID 1
-#define MON_DATA_NICKNAME 2
-#define MON_DATA_LANGUAGE 3
-#define MON_DATA_SANITY_IS_BAD_EGG 4
-#define MON_DATA_SANITY_HAS_SPECIES 5
-#define MON_DATA_SANITY_IS_EGG 6
-#define MON_DATA_OT_NAME 7
-#define MON_DATA_MARKINGS 8
-#define MON_DATA_CHECKSUM 9
-#define MON_DATA_ENCRYPT_SEPARATOR 10
-#define MON_DATA_SPECIES 11
-#define MON_DATA_HELD_ITEM 12
-#define MON_DATA_MOVE1 13
-#define MON_DATA_MOVE2 14
-#define MON_DATA_MOVE3 15
-#define MON_DATA_MOVE4 16
-#define MON_DATA_PP1 17
-#define MON_DATA_PP2 18
-#define MON_DATA_PP3 19
-#define MON_DATA_PP4 20
-#define MON_DATA_PP_BONUSES 21
-#define MON_DATA_COOL 22
-#define MON_DATA_BEAUTY 23
-#define MON_DATA_CUTE 24
-#define MON_DATA_EXP 25
-#define MON_DATA_HP_EV 26
-#define MON_DATA_ATK_EV 27
-#define MON_DATA_DEF_EV 28
-#define MON_DATA_SPEED_EV 29
-#define MON_DATA_SPATK_EV 30
-#define MON_DATA_SPDEF_EV 31
-#define MON_DATA_FRIENDSHIP 32
-#define MON_DATA_SMART 33
-#define MON_DATA_POKERUS 34
-#define MON_DATA_MET_LOCATION 35
-#define MON_DATA_MET_LEVEL 36
-#define MON_DATA_MET_GAME 37
-#define MON_DATA_POKEBALL 38
-#define MON_DATA_HP_IV 39
-#define MON_DATA_ATK_IV 40
-#define MON_DATA_DEF_IV 41
-#define MON_DATA_SPEED_IV 42
-#define MON_DATA_SPATK_IV 43
-#define MON_DATA_SPDEF_IV 44
-#define MON_DATA_IS_EGG 45
-#define MON_DATA_ABILITY_NUM 46
-#define MON_DATA_TOUGH 47
-#define MON_DATA_SHEEN 48
-#define MON_DATA_OT_GENDER 49
-#define MON_DATA_COOL_RIBBON 50
-#define MON_DATA_BEAUTY_RIBBON 51
-#define MON_DATA_CUTE_RIBBON 52
-#define MON_DATA_SMART_RIBBON 53
-#define MON_DATA_TOUGH_RIBBON 54
-#define MON_DATA_STATUS 55
-#define MON_DATA_LEVEL 56
-#define MON_DATA_HP 57
-#define MON_DATA_MAX_HP 58
-#define MON_DATA_ATK 59
-#define MON_DATA_DEF 60
-#define MON_DATA_SPEED 61
-#define MON_DATA_SPATK 62
-#define MON_DATA_SPDEF 63
-#define MON_DATA_MAIL 64
-#define MON_DATA_SPECIES2 65
-#define MON_DATA_IVS 66
-#define MON_DATA_CHAMPION_RIBBON 67
-#define MON_DATA_WINNING_RIBBON 68
-#define MON_DATA_VICTORY_RIBBON 69
-#define MON_DATA_ARTIST_RIBBON 70
-#define MON_DATA_EFFORT_RIBBON 71
-#define MON_DATA_GIFT_RIBBON_1 72
-#define MON_DATA_GIFT_RIBBON_2 73
-#define MON_DATA_GIFT_RIBBON_3 74
-#define MON_DATA_GIFT_RIBBON_4 75
-#define MON_DATA_GIFT_RIBBON_5 76
-#define MON_DATA_GIFT_RIBBON_6 77
-#define MON_DATA_GIFT_RIBBON_7 78
-#define MON_DATA_FATEFUL_ENCOUNTER 79
-#define MON_DATA_OBEDIENCE 80
-#define MON_DATA_KNOWN_MOVES 81
-#define MON_DATA_RIBBON_COUNT 82
-#define MON_DATA_RIBBONS 83
-#define MON_DATA_ATK2 84
-#define MON_DATA_DEF2 85
-#define MON_DATA_SPEED2 86
-#define MON_DATA_SPATK2 87
-#define MON_DATA_SPDEF2 88
-
-#define MAX_LEVEL 100
-
-#define OT_ID_RANDOM_NO_SHINY 2
-#define OT_ID_PRESET 1
-#define OT_ID_PLAYER_ID 0
-
-#define MON_GIVEN_TO_PARTY 0x0
-#define MON_GIVEN_TO_PC 0x1
-#define MON_CANT_GIVE 0x2
-
-#define PLAYER_HAS_TWO_USABLE_MONS 0x0
-#define PLAYER_HAS_ONE_MON 0x1
-#define PLAYER_HAS_ONE_USABLE_MON 0x2
-
-#define MON_MALE 0x00
-#define MON_FEMALE 0xFE
-#define MON_GENDERLESS 0xFF
-
-#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
-#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
-#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
-#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
-#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
-#define FRIENDSHIP_EVENT_WALKING 0x5
-#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
-#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
-#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
-
-#define STATUS_PRIMARY_NONE 0x0
-#define STATUS_PRIMARY_POISON 0x1
-#define STATUS_PRIMARY_PARALYSIS 0x2
-#define STATUS_PRIMARY_SLEEP 0x3
-#define STATUS_PRIMARY_FREEZE 0x4
-#define STATUS_PRIMARY_BURN 0x5
-#define STATUS_PRIMARY_POKERUS 0x6
-#define STATUS_PRIMARY_FAINTED 0x7
-
-#define MAX_TOTAL_EVS 510
-#define UNOWN_FORM_COUNT 28
-
struct PokemonSubstruct0
{
u16 species;
@@ -145,8 +15,8 @@ struct PokemonSubstruct0
struct PokemonSubstruct1
{
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
};
struct PokemonSubstruct2
@@ -273,7 +143,7 @@ struct BattlePokemon
/*0x06*/ u16 speed;
/*0x08*/ u16 spAttack;
/*0x0A*/ u16 spDefense;
- /*0x0C*/ u16 moves[4];
+ /*0x0C*/ u16 moves[MAX_MON_MOVES];
/*0x14*/ u32 hpIV:5;
/*0x14*/ u32 attackIV:5;
/*0x15*/ u32 defenseIV:5;
@@ -287,7 +157,7 @@ struct BattlePokemon
/*0x21*/ u8 type1;
/*0x22*/ u8 type2;
/*0x23*/ u8 unknown;
- /*0x24*/ u8 pp[4];
+ /*0x24*/ u8 pp[MAX_MON_MOVES];
/*0x28*/ u16 hp;
/*0x2A*/ u8 level;
/*0x2B*/ u8 friendship;
@@ -348,13 +218,6 @@ struct BattleMove
u8 flags;
};
-#define FLAG_MAKES_CONTACT 0x1
-#define FLAG_PROTECT_AFFECTED 0x2
-#define FLAG_MAGICCOAT_AFFECTED 0x4
-#define FLAG_SNATCH_AFFECTED 0x8
-#define FLAG_MIRROR_MOVE_AFFECTED 0x10
-#define FLAG_KINGSROCK_AFFECTED 0x20
-
struct SpindaSpot
{
u8 x, y;
@@ -367,46 +230,6 @@ struct __attribute__((packed)) LevelUpMove
u16 level:7;
};
-enum
-{
- GROWTH_MEDIUM_FAST,
- GROWTH_ERRATIC,
- GROWTH_FLUCTUATING,
- GROWTH_MEDIUM_SLOW,
- GROWTH_FAST,
- GROWTH_SLOW
-};
-
-enum
-{
- BODY_COLOR_RED,
- BODY_COLOR_BLUE,
- BODY_COLOR_YELLOW,
- BODY_COLOR_GREEN,
- BODY_COLOR_BLACK,
- BODY_COLOR_BROWN,
- BODY_COLOR_PURPLE,
- BODY_COLOR_GRAY,
- BODY_COLOR_WHITE,
- BODY_COLOR_PINK
-};
-
-#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
-#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
-#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
-#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
-#define EVO_TRADE 0x0005 // Pokémon is traded
-#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
-#define EVO_ITEM 0x0007 // specified item is used on Pokémon
-#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
-#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
-#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
-#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
-#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
-#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
-#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
-#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
-
struct Evolution
{
u16 method;
@@ -414,8 +237,6 @@ struct Evolution
u16 targetSpecies;
};
-#define EVOS_PER_MON 5
-
extern u8 gPlayerPartyCount;
extern struct Pokemon gPlayerParty[PARTY_SIZE];
extern u8 gEnemyPartyCount;
@@ -466,7 +287,6 @@ void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest);
u8 GetLevelFromMonExp(struct Pokemon *mon);
u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon);
u16 GiveMoveToMon(struct Pokemon *mon, u16 move);
-u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move);
void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot);
void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot);
@@ -522,7 +342,7 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex,
bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, u8 e);
bool8 HealStatusConditions(struct Pokemon *mon, u32 battlePartyId, u32 healMask, u8 battlerId);
u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit);
-u8 *sub_806CF78(u16 itemId);
+u8 *UseStatIncreaseItem(u16 itemId);
u8 GetNature(struct Pokemon *mon);
u8 GetNatureFromPersonality(u32 personality);
u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem);
@@ -536,8 +356,8 @@ u16 SpeciesToCryId(u16 species);
void sub_806D544(u16 species, u32 personality, u8 *dest);
void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4);
void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies);
-bool8 sub_806D7EC(void);
-bool16 GetLinkTrainerFlankId(u8 id);
+u8 GetPlayerFlankId(void);
+u16 GetLinkTrainerFlankId(u8 id);
s32 GetBattlerMultiplayerId(u16 a1);
u8 GetTrainerEncounterMusicId(u16 trainerOpponentId);
u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex);
diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h
index 8af43c753..dbd7f2895 100644
--- a/include/pokemon_icon.h
+++ b/include/pokemon_icon.h
@@ -16,13 +16,13 @@ void LoadMonIconPalette(u16 species);
void FreeMonIconPalettes(void);
u8 sub_80D2D78(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, bool32 extra);
void FreeMonIconPalette(u16 species);
-void sub_80D2EF8(struct Sprite *sprite);
+void FreeAndDestroyMonIconSprite(struct Sprite *sprite);
u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool32 extra);
u8 UpdateMonIconFrame(struct Sprite *sprite);
void LoadMonIconPalette(u16 species);
void sub_80D328C(struct Sprite *sprite);
-void sub_80D3014(struct Sprite *sprite);
-void sub_80D32C8(struct Sprite *sprite, u8 animNum);
+void SpriteCB_MonIcon(struct Sprite *sprite);
+void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum);
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
#endif // GUARD_POKEMON_ICON_H
diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h
index 28b19f9b1..dde59aac5 100644
--- a/include/pokemon_jump.h
+++ b/include/pokemon_jump.h
@@ -4,10 +4,10 @@
#include "main.h"
void sub_802A9A8(u16 monId, MainCallback callback);
-bool32 sub_802C908(u16 species);
-void sub_802C920(void);
+bool32 IsSpeciesAllowedInPokemonJump(u16 species);
+void IsPokemonJumpSpeciesInParty(void);
void ResetPokeJumpResults(void);
-void sub_802E3C4(void);
+void ShowPokemonJumpRecords(void);
void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority);
bool32 sub_802EB84(void);
diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h
index 4c319e59d..7b6a38678 100644
--- a/include/pokemon_storage_system.h
+++ b/include/pokemon_storage_system.h
@@ -25,7 +25,7 @@ struct PokemonStorage
extern struct PokemonStorage *gPokemonStoragePtr;
-void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4);
+void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 bytesToBuffer);
u8 CountMonsInBox(u8 boxId);
s16 GetFirstFreeBoxSpot(u8 boxId);
u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore);
diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h
index 20d881702..07d541cac 100755
--- a/include/pokemon_summary_screen.h
+++ b/include/pokemon_summary_screen.h
@@ -9,10 +9,9 @@ extern const u8 *const gMoveDescriptionPointers[];
extern const u8 *const gNatureNamePointers[];
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
-void sub_81C4F98(u8, void(*)(void));
void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16);
void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
-u8 sub_81C1B94(void);
+u8 GetMoveSlotToReplace(void);
void SummaryScreen_SetUnknownTaskId(u8 a0);
void SummaryScreen_DestroyUnknownTask(void);
diff --git a/include/pokenav.h b/include/pokenav.h
index b1c3287f1..f12469e71 100644
--- a/include/pokenav.h
+++ b/include/pokenav.h
@@ -11,7 +11,36 @@ struct PokenavMonList
{
u8 boxId;
u8 monId;
+ u16 data;
+};
+
+struct PokenavMatchCallEntries
+{
+ bool8 isSpecialTrainer;
+ u8 mapSec;
+ u16 headerId;
+};
+
+struct PokenavListTemplate
+{
+ union {
+ struct PokenavMonList *monList;
+ struct PokenavMatchCallEntries *matchCallEntries;
+ } list;
+ u16 unk4;
u16 unk6;
+ u8 unk8;
+ u8 unk9;
+ u8 unkA;
+ u8 unkB;
+ u8 unkC;
+ u8 unkD;
+ u8 unkE;
+ union {
+ void (*unk10_1)(struct PokenavMonList *, u8 *a1);
+ void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1);
+ } listFunc;
+ void (*unk14)(u16 a0, u32 a1, u32 a2);
};
struct PokenavSub18
@@ -31,9 +60,9 @@ struct PokenavSub18
enum
{
- POKENAV_MODE_NORMAL, // Chosen from Start menu.
- POKENAV_MODE_FORCE_CALL_1, // Used for the script's special. Has to choose Match Call and make a call.
- POKENAV_MODE_FORCE_CALL_2, // Set after making a call, has to exit Pokenav.
+ POKENAV_MODE_NORMAL, // Chosen from Start menu.
+ POKENAV_MODE_FORCE_CALL_READY, // Pokenav tutorial before calling Mr. Stone
+ POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone
};
#define POKENAV_MENU_IDS_START 100000
@@ -58,6 +87,23 @@ enum
enum
{
+ HELPBAR_NONE,
+ HELPBAR_MAP_ZOOMED_OUT,
+ HELPBAR_MAP_ZOOMED_IN,
+ HELPBAR_CONDITION_MON_LIST,
+ HELPBAR_CONDITION_MON_STATUS,
+ HELPBAR_CONDITION_MARKINGS,
+ HELPBAR_MC_TRAINER_LIST,
+ HELPBAR_MC_CALL_MENU,
+ HELPBAR_MC_CHECK_PAGE,
+ HELPBAR_RIBBONS_MON_LIST,
+ HELPBAR_RIBBONS_LIST,
+ HELPBAR_RIBBONS_CHECK,
+ HELPBAR_COUNT
+};
+
+enum
+{
MC_HEADER_MR_STONE,
MC_HEADER_PROF_BIRCH,
MC_HEADER_BRENDAN,
@@ -82,6 +128,48 @@ enum
MC_HEADER_COUNT
};
+enum
+{
+ MATCH_CALL_OPTION_CALL,
+ MATCH_CALL_OPTION_CHECK,
+ MATCH_CALL_OPTION_CANCEL,
+ MATCH_CALL_OPTION_COUNT
+};
+
+enum
+{
+ CHECK_PAGE_STRATEGY,
+ CHECK_PAGE_POKEMON,
+ CHECK_PAGE_INTRO_1,
+ CHECK_PAGE_INTRO_2,
+ CHECK_PAGE_ENTRY_COUNT
+};
+
+#define MCFLAVOR(name) {[CHECK_PAGE_STRATEGY] = gText_MatchCall##name##_Strategy, \
+ [CHECK_PAGE_POKEMON] = gText_MatchCall##name##_Pokemon, \
+ [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \
+ [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2}
+
+enum
+{
+ POKENAV_MC_FUNC_NONE,
+ POKENAV_MC_FUNC_DOWN,
+ POKENAV_MC_FUNC_UP,
+ POKENAV_MC_FUNC_PG_DOWN,
+ POKENAV_MC_FUNC_PG_UP,
+ POKENAV_MC_FUNC_SELECT,
+ POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR,
+ POKENAV_MC_FUNC_CANCEL,
+ POKENAV_MC_FUNC_CALL_MSG,
+ POKENAV_MC_FUNC_NEARBY_MSG,
+ POKENAV_MC_FUNC_10,
+ POKENAV_MC_FUNC_SHOW_CHECK_PAGE,
+ POKENAV_MC_FUNC_CHECK_PAGE_UP,
+ POKENAV_MC_FUNC_CHECK_PAGE_DOWN,
+ POKENAV_MC_FUNC_EXIT_CHECK_PAGE,
+ POKENAV_MC_FUNC_EXIT
+};
+
// pokenav.c
void sub_81C7694(u32);
u32 sub_81C76AC(void);
@@ -101,22 +189,6 @@ void SetPokenavVBlankCallback(void);
void SetVBlankCallback_(IntrCallback callback);
// pokenav_match_call_ui.c
-struct MatchCallListTemplate
-{
- struct PokenavMonList * unk0;
- u16 unk4;
- u16 unk6;
- u8 unk8;
- u8 unk9;
- u8 unkA;
- u8 unkB;
- u8 unkC;
- u8 unkD;
- u8 unkE;
- void (*unk10)(struct PokenavMonList *, u8 *a1);
- void (*unk14)(u16 a0, u32 a1, u32 a2);
-};
-
u32 GetSelectedMatchCall(void);
bool32 sub_81C8224(void);
int MatchCall_MoveCursorUp(void);
@@ -128,23 +200,23 @@ void ToggleMatchCallVerticalArrows(bool32 shouldHide);
void sub_81C8838(void);
void sub_81C877C(void);
bool32 sub_81C8820(void);
-void sub_81C87AC(s16 a0);
+void PrintCheckPageInfo(s16 a0);
u32 GetMatchCallListTopIndex(void);
void sub_81C87F0(void);
-bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2);
+bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2);
void sub_81C8234(void);
// pokenav_match_call_data.c
bool32 MatchCall_HasCheckPage(u32 idx);
-u8 MatchCallMapSecGetByIndex(u32 idx);
-bool32 sub_81D1BF8(u32 idx);
-bool32 MatchCallFlagGetByIndex(u32 idx);
+u8 MatchCall_GetMapSec(u32 idx);
+bool32 MatchCall_HasRematchId(u32 idx);
+bool32 MatchCall_GetEnabled(u32 idx);
u32 MatchCall_GetRematchTableIdx(u32 idx);
u32 GetTrainerIdxByRematchIdx(u32 rematchIdx);
int MatchCall_GetOverrideFacilityClass(u32 idx);
void MatchCall_GetMessage(u32 idx, u8 *dest);
const u8 *MatchCall_GetOverrideFlavorText(u32 idx, u32 offset);
-void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name);
+void MatchCall_GetNameAndDesc(u32 idx, const u8 **desc, const u8 **name);
// pokenav_main_menu.c
bool32 InitPokenavMainMenu(void);
@@ -157,8 +229,8 @@ void sub_81C7AC0(s32 a0);
bool32 sub_81C8010(void);
void InitBgTemplates(const struct BgTemplate *templates, int count);
bool32 IsPaletteFadeActive(void);
-void sub_81C7BA4(u32 helpBarIndex);
-bool32 IsDma3ManagerBusyWithBgCopy_(void);
+void PrintHelpBarText(u32 textId);
+bool32 WaitForHelpBar(void);
void sub_81C78A0(void);
bool32 MainMenuLoopedTaskIsBusy(void);
void sub_81C7FDC(void);
@@ -184,10 +256,9 @@ bool32 PokenavCallback_Init_3(void);
u32 sub_81C941C(void);
void sub_81C9430(void);
int sub_81C9894(void);
-const u8 *sub_81CAF78(int index, u8 *arg1);
int sub_81C98A4(void);
int sub_81C98B4(void);
-u16 sub_81C98C4(void);
+u16 GetHelpBarTextId(void);
// pokenav_unk_2.c
bool32 sub_81C9924(void);
@@ -202,27 +273,28 @@ bool32 PokenavCallback_Init_11(void);
u32 sub_81CAB24(void);
void sub_81CAB38(void);
int sub_81CAE28(void);
-int sub_81CAE38(void);
+int GetNumberRegistered(void);
int sub_81CAE48(void);
-struct PokenavMonList *sub_81CAE94(void);
-u16 sub_81CAEA4(int);
-bool32 sub_81CAEBC(int index);
-int sub_81CAF04(int index);
-const u8 *sub_81CAFD8(int index, int textType);
-u16 sub_81CB01C(void);
-u16 sub_81CB02C(int arg0);
-void sub_81CB050(struct PokenavMonList * arg0, u8 *str);
+struct PokenavMatchCallEntries *sub_81CAE94(void);
+u16 GetMatchCallMapSec(int);
+bool32 ShouldDrawRematchPokeballIcon(int index);
+void ClearRematchPokeballIcon(u16 windowId, u32 a1);
+int GetMatchCallTrainerPic(int index);
+const u8 *GetMatchCallFlavorText(int index, int textType);
+const u8 *GetMatchCallMessageText(int index, u8 *arg1);
+u16 GetMatchCallOptionCursorPos(void);
+u16 GetMatchCallOptionId(int arg0);
+void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str);
u8 sub_81CB0C8(int rematchIndex);
-int sub_81CB0E4(int index);
-bool32 sub_81CAE08(int);
-int sub_81CB128(int index);
+int GetIndexDeltaOfNextCheckPageDown(int index);
+int GetIndexDeltaOfNextCheckPageUp(int index);
+bool32 IsRematchEntryRegistered(int index);
// pokenav_unk_4.c
bool32 sub_81CB260(void);
void sub_81CB29C(s32 index);
u32 sub_81CB2CC(void);
void sub_81CB2E0(void);
-void sub_81CBD48(u16 windowId, u32 a1);
// pokenav_unk_5.c
u32 PokenavCallback_Init_6(void);
diff --git a/include/region_map.h b/include/region_map.h
index 798e6f56d..0d219643d 100644
--- a/include/region_map.h
+++ b/include/region_map.h
@@ -102,7 +102,7 @@ void CreateRegionMapPlayerIcon(u16 x, u16 y);
void CreateRegionMapCursor(u16 tileTag, u16 paletteTag);
u8 *GetMapName(u8 *, u16, u16);
bool32 sub_8124668(u8 mapSecId);
-u8 *sub_81245DC(u8 *dest, u16 mapSecId);
+u8 *GetMapNameGeneric(u8 *dest, u16 mapSecId);
u8 *sub_8124610(u8 *dest, u16 mapSecId);
u16 CorrectSpecialMapSecId(u16 mapSecId);
void sub_8122D88(struct RegionMap *regionMap);
diff --git a/include/rotating_tile_puzzle.h b/include/rotating_tile_puzzle.h
new file mode 100644
index 000000000..8c6ab7944
--- /dev/null
+++ b/include/rotating_tile_puzzle.h
@@ -0,0 +1,9 @@
+#ifndef GUARD_ROTATING_TILE_PUZZLE_H
+#define GUARD_ROTATING_TILE_PUZZLE_H
+
+void InitRotatingTilePuzzle(bool8 isTrickHouse);
+void FreeRotatingTilePuzzle(void);
+u16 MoveRotatingTileObjects(u8 puzzleNumber);
+void TurnRotatingTileObjects(void);
+
+#endif // GUARD_ROTATING_TILE_PUZZLE_H
diff --git a/include/save.h b/include/save.h
index 5e2cf7267..225b2b62c 100644
--- a/include/save.h
+++ b/include/save.h
@@ -55,13 +55,25 @@ enum
SAVE_HALL_OF_FAME_ERASE_BEFORE // unused
};
+#define SECTOR_ID_SAVEBLOCK2 0
+#define SECTOR_ID_SAVEBLOCK1_START 1
+#define SECTOR_ID_SAVEBLOCK1_END 4
+#define SECTOR_ID_PKMN_STORAGE_START 5
+#define SECTOR_ID_PKMN_STORAGE_END 13
#define SECTOR_SAVE_SLOT_LENGTH 14
+// Save Slot 1: 0-13; Save Slot 2: 14-27
#define SECTOR_ID_HOF_1 28
#define SECTOR_ID_HOF_2 29
#define SECTOR_ID_TRAINER_HILL 30
#define SECTOR_ID_RECORDED_BATTLE 31
#define SECTORS_COUNT 32
+#define SAVE_STATUS_EMPTY 0
+#define SAVE_STATUS_OK 1
+#define SAVE_STATUS_CORRUPT 2
+#define SAVE_STATUS_NO_FLASH 4
+#define SAVE_STATUS_ERROR 0xFF
+
extern u16 gLastWrittenSector;
extern u32 gLastSaveCounter;
extern u16 gLastKnownGoodSector;
@@ -82,13 +94,12 @@ u8 HandleSavingData(u8 saveType);
u8 TrySavingData(u8 saveType);
bool8 sub_8153380(void);
bool8 sub_81533AC(void);
-u8 sub_81533E0(void);
-u8 sub_8153408(void);
-u8 FullSaveGame(void);
+bool8 sub_81533E0(void);
+bool8 sub_8153408(void);
+bool8 FullSaveGame(void);
bool8 CheckSaveFile(void);
-u8 Save_LoadGameData(u8 a1);
+u8 Save_LoadGameData(u8 saveType);
u16 sub_815355C(void);
-u8 sub_81534D0(u8);
u32 TryReadSpecialSaveSection(u8 sector, u8* dst);
u32 TryWriteSpecialSaveSection(u8 sector, u8* src);
void sub_8153688(u8 taskId);
diff --git a/include/save_location.h b/include/save_location.h
index c330124ad..6c2ae0e6b 100644
--- a/include/save_location.h
+++ b/include/save_location.h
@@ -6,9 +6,14 @@
#define POKECENTER_SAVEWARP (1 << 1)
#define LOBBY_SAVEWARP (1 << 2)
#define UNK_SPECIAL_SAVE_WARP_FLAG_3 (1 << 3)
+//
+//
+//
+//
+#define CHAMPION_SAVEWARP (1 << 7)
void TrySetMapSaveWarpStatus(void);
void sub_81AFDA0(void);
-void sub_81AFDD0(void);
+void SetChampionSaveWarp(void);
#endif // GUARD_SAVE_LOCATION_H
diff --git a/include/script.h b/include/script.h
index cfe493479..3f92964ac 100644
--- a/include/script.h
+++ b/include/script.h
@@ -62,6 +62,6 @@ u8 *GetSavedRamScriptIfValid(void);
void InitRamScript_NoEventObject(u8 *script, u16 scriptSize);
// srccmd.h
-void sub_809BE48(u16 npcId);
+void SetMovingNpcId(u16 npcId);
#endif // GUARD_SCRIPT_H
diff --git a/include/script_menu.h b/include/script_menu.h
index efb51870b..086ad147f 100644
--- a/include/script_menu.h
+++ b/include/script_menu.h
@@ -1,20 +1,20 @@
#ifndef GUARD_SCRIPT_MENU_H
#define GUARD_SCRIPT_MENU_H
-extern const u8 *const gUnknown_0858BAF0[];
+extern const u8 *const gStdStrings[];
-bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4);
-bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5);
-bool8 ScriptMenu_YesNo(u8 var1, u8 var2);
-bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount);
-bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
+bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress);
+bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 defaultChoice);
+bool8 ScriptMenu_YesNo(u8 left, u8 top);
+bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount);
+bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
-int convert_pixel_width_to_tile_width(int);
-u8 CreateWindowFromRect(u8, u8, u8, u8);
-void ClearToTransparentAndRemoveWindow(u8);
-int display_text_and_get_width(const u8*, int);
-int sub_80E2D5C(int arg0, int tileWidth);
-bool16 ScrSpecial_CreatePCMenu(void);
+int ConvertPixelWidthToTileWidth(int width);
+u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
+void ClearToTransparentAndRemoveWindow(u8 windowId);
+int DisplayTextAndGetWidth(const u8* str, int width);
+int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width);
+bool16 ScriptMenu_CreatePCMultichoice(void);
void ScriptMenu_DisplayPCStartupPrompt(void);
#endif //GUARD_SCRIPT_MENU_H
diff --git a/include/script_movement.h b/include/script_movement.h
index 4c3fa6002..f9a97cf46 100644
--- a/include/script_movement.h
+++ b/include/script_movement.h
@@ -1,8 +1,8 @@
#ifndef GUARD_SCRIPT_MOVEMENT_H
#define GUARD_SCRIPT_MOVEMENT_H
-bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, const u8 *);
-bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8);
-void sub_80D338C(void);
+bool8 ScriptMovement_StartObjectMovementScript(u8 localId, u8 mapNum, u8 mapGroup, const u8 *movementScript);
+bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapGroup);
+void ScriptMovement_UnfreezeEventObjects(void);
#endif // GUARD_SCRIPT_MOVEMENT_H
diff --git a/include/script_pokemon_81B9.h b/include/script_pokemon_81B9.h
deleted file mode 100644
index 1b8563ee6..000000000
--- a/include/script_pokemon_81B9.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef GUARD_SCRIPTPOKE81B9_H
-#define GUARD_SCRIPTPOKE81B9_H
-
-void sub_81B9404(void);
-
-#endif
diff --git a/include/script_pokemon_util_80F87D8.h b/include/script_pokemon_util_80F87D8.h
index 7d8d99628..7c246b745 100644
--- a/include/script_pokemon_util_80F87D8.h
+++ b/include/script_pokemon_util_80F87D8.h
@@ -1,7 +1,7 @@
#ifndef GUARD_SCRIPT_POKEMON_UTIL_80F87D8_H
#define GUARD_SCRIPT_POKEMON_UTIL_80F87D8_H
-u16 sub_80F903C(void);
+u16 GetContestRand(void);
void ReducePlayerPartyToSelectedMons(void);
void HealPlayerParty(void);
u8 CountPlayerContestPaintings(void);
diff --git a/include/secret_base.h b/include/secret_base.h
index 4e323b0c6..b7d36a8ee 100644
--- a/include/secret_base.h
+++ b/include/secret_base.h
@@ -12,13 +12,13 @@ void InitSecretBaseAppearance(bool8 hidePC);
bool8 CurMapIsSecretBase(void);
void SecretBasePerStepCallback(u8 taskId);
bool8 TrySetCurSecretBase(void);
-void SetSecretBaseSecretsTvFlags_Poster(void);
-void SetSecretBaseSecretsTvFlags_MiscFurnature(void);
-void SetSecretBaseSecretsTvFlags_LargeDecorationSpot(void);
-void SetSecretBaseSecretsTvFlags_SmallDecorationSpot(void);
+void CheckInteractedWithFriendsPosterDecor(void);
+void CheckInteractedWithFriendsFurnitureBottom(void);
+void CheckInteractedWithFriendsFurnitureMiddle(void);
+void CheckInteractedWithFriendsFurnitureTop(void);
void WarpIntoSecretBase(const struct MapPosition *position, const struct MapEvents *events);
bool8 SecretBaseMapPopupEnabled(void);
-void sub_80EB218(void);
+void CheckLeftFriendsSecretBase(void);
void ClearSecretBases(void);
void SetCurSecretBaseIdFromPosition(const struct MapPosition *position, const struct MapEvents *events);
void TrySetCurSecretBaseIndex(void);
diff --git a/include/slot_machine.h b/include/slot_machine.h
index d441b7411..1b22e165f 100644
--- a/include/slot_machine.h
+++ b/include/slot_machine.h
@@ -4,6 +4,7 @@
#define NUM_REELS 3
#define REEL_NUM_TAGS 21
#define REEL_TAG_HEIGHT 24
+#define SLOT_MACHINE_COUNT 12
// Lucky Flags
#define LUCKY_BIAS_REPLAY (1 << 0)
diff --git a/include/sprite.h b/include/sprite.h
deleted file mode 100644
index 9753837fd..000000000
--- a/include/sprite.h
+++ /dev/null
@@ -1,319 +0,0 @@
-#ifndef GUARD_SPRITE_H
-#define GUARD_SPRITE_H
-
-#define MAX_SPRITES 64
-#define SPRITE_INVALID_TAG 0xFFFF
-
-struct SpriteSheet
-{
- const void *data; // Raw uncompressed pixel data
- u16 size;
- u16 tag;
-};
-
-struct CompressedSpriteSheet
-{
- const u32 *data; // LZ77 compressed pixel data
- u16 size; // Uncompressed size of pixel data
- u16 tag;
-};
-
-struct SpriteFrameImage
-{
- const void *data;
- u16 size;
-};
-
-#define obj_frame_tiles(ptr) {.data = (u8 *)ptr, .size = sizeof ptr}
-
-#define overworld_frame(ptr, width, height, frame) {.data = (u8 *)ptr + (width * height * frame * 64)/2, .size = (width * height * 64)/2}
-
-struct SpritePalette
-{
- const u16 *data; // Raw uncompressed palette data
- u16 tag;
-};
-
-struct CompressedSpritePalette
-{
- const u32 *data; // LZ77 compressed palette data
- u16 tag;
-};
-
-struct AnimFrameCmd
-{
- // If the sprite has an array of images, this is the array index.
- // If the sprite has a sheet, this is the tile offset.
- u32 imageValue:16;
-
- u32 duration:6;
- u32 hFlip:1;
- u32 vFlip:1;
-};
-
-struct AnimLoopCmd
-{
- u32 type:16;
- u32 count:6;
-};
-
-struct AnimJumpCmd
-{
- u32 type:16;
- u32 target:6;
-};
-
-// The first halfword of this union specifies the type of command.
-// If it -2, then it is a jump command. If it is -1, then it is the end of the script.
-// Otherwise, it is the imageValue for a frame command.
-union AnimCmd
-{
- s16 type;
- struct AnimFrameCmd frame;
- struct AnimLoopCmd loop;
- struct AnimJumpCmd jump;
-};
-
-#define ANIMCMD_FRAME(...) \
- {.frame = {__VA_ARGS__}}
-#define ANIMCMD_LOOP(_count) \
- {.loop = {.type = -3, .count = _count}}
-#define ANIMCMD_JUMP(_target) \
- {.jump = {.type = -2, .target = _target}}
-#define ANIMCMD_END \
- {.type = -1}
-
-struct AffineAnimFrameCmd
-{
- s16 xScale;
- s16 yScale;
- u8 rotation;
- u8 duration;
-};
-
-struct AffineAnimLoopCmd
-{
- s16 type;
- s16 count;
-};
-
-struct AffineAnimJumpCmd
-{
- s16 type;
- u16 target;
-};
-
-struct AffineAnimEndCmdAlt
-{
- s16 type;
- u16 val;
-};
-
-union AffineAnimCmd
-{
- s16 type;
- struct AffineAnimFrameCmd frame;
- struct AffineAnimLoopCmd loop;
- struct AffineAnimJumpCmd jump;
- struct AffineAnimEndCmdAlt end; // unused in code
-};
-
-#define AFFINEANIMCMDTYPE_LOOP 0x7FFD
-#define AFFINEANIMCMDTYPE_JUMP 0x7FFE
-#define AFFINEANIMCMDTYPE_END 0x7FFF
-
-#define AFFINEANIMCMD_FRAME(_xScale, _yScale, _rotation, _duration) \
- {.frame = {.xScale = _xScale, .yScale = _yScale, .rotation = _rotation, .duration = _duration}}
-#define AFFINEANIMCMD_LOOP(_count) \
- {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}}
-#define AFFINEANIMCMD_JUMP(_target) \
- {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
-#define AFFINEANIMCMD_END \
- {.type = AFFINEANIMCMDTYPE_END}
-#define AFFINEANIMCMD_END_ALT(_val) \
- {.end = {.type = AFFINEANIMCMDTYPE_END, .val = _val}}
-
-struct AffineAnimState
-{
- u8 animNum;
- u8 animCmdIndex;
- u8 delayCounter;
- u8 loopCounter;
- s16 xScale;
- s16 yScale;
- u16 rotation;
-};
-
-enum
-{
- SUBSPRITES_OFF,
- SUBSPRITES_ON,
- SUBSPRITES_IGNORE_PRIORITY, // on but priority is ignored
-};
-
-struct Subsprite
-{
- s8 x; // was u16 in R/S
- s8 y; // was u16 in R/S
- u16 shape:2;
- u16 size:2;
- u16 tileOffset:10;
- u16 priority:2;
-};
-
-struct SubspriteTable
-{
- u8 subspriteCount;
- const struct Subsprite *subsprites;
-};
-
-struct Sprite;
-
-typedef void (*SpriteCallback)(struct Sprite *);
-
-struct SpriteTemplate
-{
- u16 tileTag;
- u16 paletteTag;
- const struct OamData *oam;
- const union AnimCmd *const *anims;
- const struct SpriteFrameImage *images;
- const union AffineAnimCmd *const *affineAnims;
- SpriteCallback callback;
-};
-
-struct Sprite
-{
- /*0x00*/ struct OamData oam;
- /*0x08*/ const union AnimCmd *const *anims;
- /*0x0C*/ const struct SpriteFrameImage *images;
- /*0x10*/ const union AffineAnimCmd *const *affineAnims;
- /*0x14*/ const struct SpriteTemplate *template;
- /*0x18*/ const struct SubspriteTable *subspriteTables;
- /*0x1C*/ SpriteCallback callback;
-
- /*0x20*/ struct Coords16 pos1;
- /*0x24*/ struct Coords16 pos2;
- /*0x28*/ s8 centerToCornerVecX;
- /*0x29*/ s8 centerToCornerVecY;
-
- /*0x2A*/ u8 animNum;
- /*0x2B*/ u8 animCmdIndex;
- /*0x2C*/ u8 animDelayCounter:6;
- bool8 animPaused:1;
- bool8 affineAnimPaused:1;
- /*0x2D*/ u8 animLoopCounter;
-
- // general purpose data fields
- /*0x2E*/ s16 data[8];
-
- /*0x3E*/ bool16 inUse:1; //1
- bool16 coordOffsetEnabled:1; //2
- bool16 invisible:1; //4
- bool16 flags_3:1; //8
- bool16 flags_4:1; //0x10
- bool16 flags_5:1; //0x20
- bool16 flags_6:1; //0x40
- bool16 flags_7:1; //0x80
- /*0x3F*/ bool16 hFlip:1; //1
- bool16 vFlip:1; //2
- bool16 animBeginning:1; //4
- bool16 affineAnimBeginning:1; //8
- bool16 animEnded:1; //0x10
- bool16 affineAnimEnded:1; //0x20
- bool16 usingSheet:1; //0x40
- bool16 flags_f:1; //0x80
-
- /*0x40*/ u16 sheetTileStart;
-
- /*0x42*/ u8 subspriteTableNum:6;
- u8 subspriteMode:2;
-
- /*0x43*/ u8 subpriority;
-};
-
-struct OamMatrix
-{
- s16 a;
- s16 b;
- s16 c;
- s16 d;
-};
-
-extern const struct OamData gDummyOamData;
-extern const union AnimCmd *const gDummySpriteAnimTable[];
-extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[];
-extern const struct SpriteTemplate gDummySpriteTemplate;
-
-extern u8 gReservedSpritePaletteCount;
-extern struct Sprite gSprites[];
-extern u8 gOamLimit;
-extern u16 gReservedSpriteTileCount;
-extern s16 gSpriteCoordOffsetX;
-extern s16 gSpriteCoordOffsetY;
-extern struct OamMatrix gOamMatrices[];
-extern bool8 gAffineAnimsDisabled;
-
-void ResetSpriteData(void);
-void AnimateSprites(void);
-void BuildOamBuffer(void);
-u8 CreateSprite(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
-u8 CreateSpriteAtEnd(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
-u8 CreateInvisibleSprite(void (*callback)(struct Sprite *));
-u8 CreateSpriteAndAnimate(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
-void DestroySprite(struct Sprite *sprite);
-void ResetOamRange(u8 a, u8 b);
-void LoadOam(void);
-void SetOamMatrix(u8 matrixNum, u16 a, u16 b, u16 c, u16 d);
-void CalcCenterToCornerVec(struct Sprite *sprite, u8 shape, u8 size, u8 affineMode);
-void SpriteCallbackDummy(struct Sprite *sprite);
-void ProcessSpriteCopyRequests(void);
-void RequestSpriteCopy(const u8 *src, u8 *dest, u16 size);
-void FreeSpriteTiles(struct Sprite *sprite);
-void FreeSpritePalette(struct Sprite *sprite);
-void FreeSpriteOamMatrix(struct Sprite *sprite);
-void DestroySpriteAndFreeResources(struct Sprite *sprite);
-void sub_800142C(u32 a1, u32 a2, u16 *a3, u16 a4, u32 a5);
-void AnimateSprite(struct Sprite *sprite);
-void sub_8007E18(struct Sprite* sprite, s16 a2, s16 a3);
-void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
-void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum);
-void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex);
-void StartSpriteAffineAnim(struct Sprite *sprite, u8 animNum);
-void StartSpriteAffineAnimIfDifferent(struct Sprite *sprite, u8 animNum);
-void ChangeSpriteAffineAnim(struct Sprite *sprite, u8 animNum);
-void ChangeSpriteAffineAnimIfDifferent(struct Sprite *sprite, u8 animNum);
-void SetSpriteSheetFrameTileNum(struct Sprite *sprite);
-u8 AllocOamMatrix(void);
-void FreeOamMatrix(u8 matrixNum);
-void InitSpriteAffineAnim(struct Sprite *sprite);
-void SetOamMatrixRotationScaling(u8 matrixNum, s16 xScale, s16 yScale, u16 rotation);
-u16 LoadSpriteSheet(const struct SpriteSheet *sheet);
-void LoadSpriteSheets(const struct SpriteSheet *sheets);
-u16 AllocTilesForSpriteSheet(struct SpriteSheet *sheet);
-void AllocTilesForSpriteSheets(struct SpriteSheet *sheets);
-void LoadTilesForSpriteSheet(const struct SpriteSheet *sheet);
-void LoadTilesForSpriteSheets(struct SpriteSheet *sheets);
-void FreeSpriteTilesByTag(u16 tag);
-void FreeSpriteTileRanges(void);
-u16 GetSpriteTileStartByTag(u16 tag);
-u16 GetSpriteTileTagByTileStart(u16 start);
-void RequestSpriteSheetCopy(const struct SpriteSheet *sheet);
-u16 LoadSpriteSheetDeferred(const struct SpriteSheet *sheet);
-void FreeAllSpritePalettes(void);
-u8 LoadSpritePalette(const struct SpritePalette *palette);
-void LoadSpritePalettes(const struct SpritePalette *palettes);
-u8 AllocSpritePalette(u16 tag);
-u8 IndexOfSpritePaletteTag(u16 tag);
-u16 GetSpritePaletteTagByPaletteNum(u8 paletteNum);
-void FreeSpritePaletteByTag(u16 tag);
-void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables);
-bool8 AddSpriteToOamBuffer(struct Sprite *object, u8 *oamIndex);
-bool8 AddSubspritesToOamBuffer(struct Sprite *sprite, struct OamData *destOam, u8 *oamIndex);
-void CopyToSprites(u8 *src);
-void CopyFromSprites(u8 *dest);
-u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
-void ClearSpriteCopyRequests(void);
-void ResetAffineAnimData(void);
-
-#endif //GUARD_SPRITE_H
diff --git a/include/start_menu.h b/include/start_menu.h
index 2fdb3e652..df2a290a2 100644
--- a/include/start_menu.h
+++ b/include/start_menu.h
@@ -3,10 +3,10 @@
extern bool8 (*gMenuCallback)(void);
-void sub_809FA18(void);
-void sub_809FA34(u8 taskId);
+void ShowReturnToFieldStartMenu(void);
+void Task_ShowStartMenu(u8 taskId);
void ShowStartMenu(void);
-void sub_809FDD4(void);
+void ShowBattlePyramidStartMenu(void);
void SaveGame(void);
void sub_80A0514(void);
void sub_80A08CC(void);
diff --git a/include/string_util.h b/include/string_util.h
deleted file mode 100644
index b921d2391..000000000
--- a/include/string_util.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef GUARD_STRING_UTIL_H
-#define GUARD_STRING_UTIL_H
-
-extern u8 gStringVar1[];
-extern u8 gStringVar2[];
-extern u8 gStringVar3[];
-extern u8 gStringVar4[];
-
-enum StringConvertMode
-{
- STR_CONV_MODE_LEFT_ALIGN,
- STR_CONV_MODE_RIGHT_ALIGN,
- STR_CONV_MODE_LEADING_ZEROS
-};
-
-u8 *StringCopy10(u8 *dest, const u8 *src);
-u8 *StringGetEnd10(u8 *str);
-u8 *StringCopy7(u8 *dest, const u8 *src);
-u8 *StringCopy(u8 *dest, const u8 *src);
-u8 *StringAppend(u8 *dest, const u8 *src);
-u8 *StringCopyN(u8 *dest, const u8 *src, u8 n);
-u8 *StringAppendN(u8 *dest, const u8 *src, u8 n);
-u16 StringLength(const u8 *str);
-s32 StringCompare(const u8 *str1, const u8 *str2);
-s32 StringCompareN(const u8 *str1, const u8 *str2, u32 n);
-bool8 IsStringLengthAtLeast(const u8 *str, s32 n);
-u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
-u8 *ConvertUIntToDecimalStringN(u8 *dest, u32 value, enum StringConvertMode mode, u8 n);
-u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
-u8 *StringExpandPlaceholders(u8 *dest, const u8 *src);
-u8 *StringBraille(u8 *dest, const u8 *src);
-const u8 *GetExpandedPlaceholder(u32 id);
-u8 *StringFill(u8 *dest, u8 c, u16 n);
-u8 *StringCopyPadded(u8 *dest, const u8 *src, u8 c, u16 n);
-u8 *StringFillWithTerminator(u8 *dest, u16 n);
-u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n);
-u32 StringLength_Multibyte(const u8 *str);
-u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color);
-bool32 IsStringJapanese(u8 *str);
-bool32 sub_800924C(u8 *str, s32 n);
-u8 GetExtCtrlCodeLength(u8 code);
-s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2);
-void ConvertInternationalString(u8 *s, u8 language);
-void StripExtCtrlCodes(u8 *str);
-
-#endif // GUARD_STRING_UTIL_H
diff --git a/include/strings.h b/include/strings.h
index e31a97761..eda1c55e4 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -1,6 +1,22 @@
#ifndef GUARD_STRINGS_H
#define GUARD_STRINGS_H
+// Placeholders
+extern const u8 gText_ExpandedPlaceholder_Empty[];
+extern const u8 gText_ExpandedPlaceholder_Kun[];
+extern const u8 gText_ExpandedPlaceholder_Chan[];
+extern const u8 gText_ExpandedPlaceholder_Sapphire[];
+extern const u8 gText_ExpandedPlaceholder_Ruby[];
+extern const u8 gText_ExpandedPlaceholder_Emerald[];
+extern const u8 gText_ExpandedPlaceholder_Aqua[];
+extern const u8 gText_ExpandedPlaceholder_Magma[];
+extern const u8 gText_ExpandedPlaceholder_Archie[];
+extern const u8 gText_ExpandedPlaceholder_Maxie[];
+extern const u8 gText_ExpandedPlaceholder_Kyogre[];
+extern const u8 gText_ExpandedPlaceholder_Groudon[];
+extern const u8 gText_ExpandedPlaceholder_Brendan[];
+extern const u8 gText_ExpandedPlaceholder_May[];
+
extern const u8 gText_FromSpace[];
extern const u8 gText_Lv50[];
@@ -373,7 +389,7 @@ extern const u8 gBerryFirmnessString_Hard[];
extern const u8 gBerryFirmnessString_VeryHard[];
extern const u8 gBerryFirmnessString_SuperHard[];
extern const u8 gText_BerryTag[];
-extern const u8 gText_UnkF908Var1Var2[];
+extern const u8 gText_NumberVar1Var2[];
extern const u8 gText_SizeSlash[];
extern const u8 gText_Var1DotVar2[];
extern const u8 gText_ThreeMarks[];
@@ -382,7 +398,7 @@ extern const u8 gText_FirmSlash[];
// item menu screen text
extern const u8 gText_CloseBag[];
extern const u8 gText_ClearTo11Var1Clear5Var2[];
-extern const u8 gText_UnkF908Var1Clear7Var2[];
+extern const u8 gText_NumberVar1Clear7Var2[];
extern const u8 gText_xVar1[];
extern const u8 gText_ReturnToVar1[];
extern const u8 gText_SelectorArrow2[];
@@ -411,7 +427,7 @@ extern const u8 gText_CantBeUsedOnPkmn[];
extern const u8 gText_CancelParticipation[];
extern const u8 gText_PkmnWasGivenItem[];
extern const u8 gText_ReceivedItemFromPkmn[];
-extern const u8 gText_SwitchPkmnItem[];
+extern const u8 gText_PkmnAlreadyHoldingItemSwitch[];
extern const u8 gText_SwitchedPkmnItem[];
extern const u8 gText_BagFullCouldNotRemoveItem[];
extern const u8 gText_PkmnCantParticipate[];
@@ -427,7 +443,7 @@ extern const u8 gText_NoMoreThanVar1Pkmn[];
extern const u8 gText_PkmnCantBeTradedNow[];
extern const u8 gText_EggCantBeTradedNow[];
extern const u8 gText_OnlyPkmnForBattle[];
-extern const u8 gJPText_PutVar1IntoSpinner[];
+extern const u8 gJPText_AreYouSureYouWantToSpinTradeMon[];
extern const u8 gText_PauseUntilPress[];
extern const u8 gText_CantUseUntilNewBadge[];
extern const u8 gText_ReturnToHealingSpot[];
@@ -471,20 +487,20 @@ extern const u8 gText_EggCantBattle[];
extern const u8 gText_PkmnAlreadySelected[];
extern const u8 gText_PkmnAlreadyInBattle[];
extern const u8 gText_PkmnCantSwitchOut[];
-extern const u8 gUnknown_085EEA46[];
-extern const u8 gUnknown_085EEA4E[];
-extern const u8 gUnknown_085EEA55[];
-extern const u8 gUnknown_085EEA63[];
-extern const u8 gUnknown_085EEA6B[];
-extern const u8 gUnknown_085EEA5D[];
+extern const u8 gText_MaxHP[];
+extern const u8 gText_Attack[];
+extern const u8 gText_Defense[];
+extern const u8 gText_SpAtk[];
+extern const u8 gText_SpDef[];
+extern const u8 gText_Speed[];
extern const u8 gText_Dash[];
-extern const u8 gText_UnkCtrlF904[];
+extern const u8 gText_Plus[];
//pokedex text
extern const u8 gText_CryOf[];
extern const u8 gText_SizeComparedTo[];
extern const u8 gText_PokedexRegistration[];
-extern const u8 gText_UnkCtrlF908Clear01[];
+extern const u8 gText_NumberClear01[];
extern const u8 gText_5MarksPokemon[];
extern const u8 gText_UnkHeight[];
extern const u8 gText_UnkWeight[];
@@ -492,7 +508,7 @@ extern const u8 gText_HTHeight[];
extern const u8 gText_WTWeight[];
extern const u8 gText_SearchingPleaseWait[];
extern const u8 gText_SearchCompleted[];
-extern const u8 gUnknown_085E8785[];
+extern const u8 gText_NoMatchingPkmnWereFound[];
extern const u8 gText_SelectorArrow[];
// birch dex rating text
@@ -583,6 +599,8 @@ extern const u8 gText_BigGirl[];
extern const u8 gText_Son[];
extern const u8 gText_Daughter[];
+// Multichoice strings
+extern const u8 gText_Exit[];
extern const u8 gText_1F[];
extern const u8 gText_2F[];
extern const u8 gText_3F[];
@@ -601,8 +619,6 @@ extern const u8 gText_B4F[];
extern const u8 gText_Rooftop[];
extern const u8 gText_ElevatorNowOn[];
-extern const u8 gText_Exit[];
-
extern const u8 gText_BlueFlute[];
extern const u8 gText_YellowFlute[];
extern const u8 gText_RedFlute[];
@@ -610,7 +626,6 @@ extern const u8 gText_WhiteFlute[];
extern const u8 gText_BlackFlute[];
extern const u8 gText_PrettyChair[];
extern const u8 gText_PrettyDesk[];
-extern const u8 gText_Exit[];
extern const u8 gText_0Pts[];
extern const u8 gText_10Pts[];
@@ -635,14 +650,12 @@ extern const u8 gText_DittoDoll48BP[];
extern const u8 gText_CyndaquilDoll80BP[];
extern const u8 gText_ChikoritaDoll80BP[];
extern const u8 gText_TotodileDoll80BP[];
-extern const u8 gText_Exit[];
extern const u8 gText_LaprasDoll128BP[];
extern const u8 gText_SnorlaxDoll128BP[];
extern const u8 gText_VenusaurDoll256BP[];
extern const u8 gText_CharizardDoll256BP[];
extern const u8 gText_BlastoiseDoll256BP[];
-extern const u8 gText_Exit[];
extern const u8 gText_Protein1BP[];
extern const u8 gText_Calcium1BP[];
@@ -650,7 +663,6 @@ extern const u8 gText_Iron1BP[];
extern const u8 gText_Zinc1BP[];
extern const u8 gText_Carbos1BP[];
extern const u8 gText_HpUp1BP[];
-extern const u8 gText_Exit[];
extern const u8 gText_Leftovers48BP[];
extern const u8 gText_WhiteHerb48BP[];
@@ -661,7 +673,6 @@ extern const u8 gText_ChoiceBand64BP[];
extern const u8 gText_KingsRock64BP[];
extern const u8 gText_FocusBand64BP[];
extern const u8 gText_ScopeLens64BP[];
-extern const u8 gText_Exit[];
extern const u8 gText_EnergyPowder50[];
extern const u8 gText_EnergyRoot80[];
@@ -674,7 +685,6 @@ extern const u8 gText_Calcium1000[];
extern const u8 gText_Zinc1000[];
extern const u8 gText_HPUp1000[];
extern const u8 gText_PPUp3000[];
-extern const u8 gText_Exit[];
extern const u8 gText_BattleTower2[];
extern const u8 gText_BattleDome[];
@@ -685,8 +695,8 @@ extern const u8 gText_BattlePike[];
extern const u8 gText_BattlePyramid[];
extern const u8 gText_RankingHall[];
extern const u8 gText_ExchangeService[];
-extern const u8 gText_Exit[];
+// Battle Frontier Move Tutors
extern const u8 gText_Softboiled16BP[];
extern const u8 gText_SeismicToss24BP[];
extern const u8 gText_DreamEater24BP[];
@@ -697,8 +707,6 @@ extern const u8 gText_RockSlide48BP[];
extern const u8 gText_Counter48BP[];
extern const u8 gText_ThunderWave48BP[];
extern const u8 gText_SwordsDance48BP[];
-extern const u8 gText_Exit[];
-
extern const u8 gText_DefenseCurl16BP[];
extern const u8 gText_Snore24BP[];
extern const u8 gText_MudSlap24BP[];
@@ -709,7 +717,6 @@ extern const u8 gText_PsychUp48BP[];
extern const u8 gText_IcePunch48BP[];
extern const u8 gText_ThunderPunch48BP[];
extern const u8 gText_FirePunch48BP[];
-extern const u8 gText_Exit[];
extern const u8 gText_SlateportCity[];
extern const u8 gText_BattleFrontier[];
@@ -717,7 +724,6 @@ extern const u8 gText_SouthernIsland[];
extern const u8 gText_NavelRock[];
extern const u8 gText_BirthIsland[];
extern const u8 gText_FarawayIsland[];
-extern const u8 gText_Exit[];
extern const u8 gText_BattleTrainers[];
extern const u8 gText_BattleBasics[];
@@ -725,144 +731,136 @@ extern const u8 gText_PokemonNature[];
extern const u8 gText_PokemonMoves[];
extern const u8 gText_Underpowered[];
extern const u8 gText_WhenInDanger[];
-extern const u8 gText_Exit[];
-extern const u8 BattleFrontier_Lounge2_Text_260971[];
-extern const u8 BattleFrontier_Lounge2_Text_260A1E[];
-extern const u8 BattleFrontier_Lounge2_Text_260AE7[];
-extern const u8 BattleFrontier_Lounge2_Text_2619AC[];
-extern const u8 BattleFrontier_Lounge2_Text_261A91[];
-extern const u8 BattleFrontier_Lounge2_Text_261B0C[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_260BC4[];
-extern const u8 BattleFrontier_Lounge2_Text_260C6D[];
-extern const u8 BattleFrontier_Lounge2_Text_260D3A[];
-extern const u8 BattleFrontier_Lounge2_Text_260E1E[];
-extern const u8 BattleFrontier_Lounge2_Text_260EC7[];
-extern const u8 BattleFrontier_Lounge2_Text_260F74[];
-extern const u8 BattleFrontier_Lounge2_Text_2614E6[];
-extern const u8 BattleFrontier_Lounge2_Text_261591[];
-extern const u8 BattleFrontier_Lounge2_Text_26166F[];
-extern const u8 BattleFrontier_Lounge2_Text_261282[];
-extern const u8 BattleFrontier_Lounge2_Text_261329[];
-extern const u8 BattleFrontier_Lounge2_Text_261403[];
-extern const u8 BattleFrontier_Lounge2_Text_261026[];
-extern const u8 BattleFrontier_Lounge2_Text_2610CC[];
-extern const u8 BattleFrontier_Lounge2_Text_261194[];
-extern const u8 BattleFrontier_Lounge2_Text_26174D[];
-extern const u8 BattleFrontier_Lounge2_Text_2617F9[];
-extern const u8 BattleFrontier_Lounge2_Text_2618C4[];
-
-extern const u8 BattleFrontier_Lounge5_Text_26468D[];
-extern const u8 BattleFrontier_Lounge5_Text_2646E5[];
-extern const u8 BattleFrontier_Lounge5_Text_264741[];
-extern const u8 BattleFrontier_Lounge5_Text_2647A4[];
-extern const u8 BattleFrontier_Lounge5_Text_2647FC[];
-extern const u8 BattleFrontier_Lounge5_Text_264858[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264916[];
-extern const u8 BattleFrontier_Lounge5_Text_264972[];
-extern const u8 BattleFrontier_Lounge5_Text_2649D5[];
-extern const u8 BattleFrontier_Lounge5_Text_264A3F[];
-extern const u8 BattleFrontier_Lounge5_Text_264A9B[];
-extern const u8 BattleFrontier_Lounge5_Text_264AF3[];
-extern const u8 BattleFrontier_Lounge5_Text_264B5D[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264BC3[];
-extern const u8 BattleFrontier_Lounge5_Text_264C36[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264C95[];
-extern const u8 BattleFrontier_Lounge5_Text_264D01[];
-extern const u8 BattleFrontier_Lounge5_Text_264D6B[];
-extern const u8 BattleFrontier_Lounge5_Text_264DD7[];
-extern const u8 BattleFrontier_Lounge5_Text_264E33[];
-extern const u8 BattleFrontier_Lounge5_Text_264E8F[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-
-extern const u8 BattleFrontier_Lounge3_Text_262261[];
-extern const u8 BattleFrontier_Lounge3_Text_26230D[];
-extern const u8 BattleFrontier_Lounge3_Text_2623B9[];
-extern const u8 BattleFrontier_Lounge3_Text_262464[];
-extern const u8 BattleFrontier_Lounge3_Text_26250E[];
-extern const u8 BattleFrontier_Lounge3_Text_2625B8[];
-extern const u8 BattleFrontier_Lounge3_Text_26266A[];
-extern const u8 BattleFrontier_Lounge3_Text_26271C[];
-extern const u8 BattleFrontier_Lounge3_Text_2627C9[];
-extern const u8 BattleFrontier_Lounge3_Text_262876[];
-extern const u8 BattleFrontier_Lounge3_Text_26291A[];
-extern const u8 BattleFrontier_Lounge3_Text_2629BC[];
-
-extern const u8 BattleFrontier_Lounge3_Text_262C04[];
-extern const u8 BattleFrontier_Lounge3_Text_262C90[];
-extern const u8 BattleFrontier_Lounge3_Text_262D1C[];
-extern const u8 BattleFrontier_Lounge3_Text_262DA7[];
-extern const u8 BattleFrontier_Lounge3_Text_262E34[];
-extern const u8 BattleFrontier_Lounge3_Text_262EC1[];
-extern const u8 BattleFrontier_Lounge3_Text_262F56[];
-extern const u8 BattleFrontier_Lounge3_Text_262FEB[];
-extern const u8 BattleFrontier_Lounge3_Text_263078[];
-extern const u8 BattleFrontier_Lounge3_Text_263105[];
-extern const u8 BattleFrontier_Lounge3_Text_26318C[];
-extern const u8 BattleFrontier_Lounge3_Text_263211[];
+// Battle Frontier Maniac
+extern const u8 BattleFrontier_Lounge2_Text_SalonMaidenIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_SalonMaidenSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_SalonMaidenGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_DoubleBattleAdvice1[];
+extern const u8 BattleFrontier_Lounge2_Text_DoubleBattleAdvice2[];
+extern const u8 BattleFrontier_Lounge2_Text_DoubleBattleAdvice3[];
+extern const u8 BattleFrontier_Lounge2_Text_MultiBattleAdvice[];
+extern const u8 BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice[];
+extern const u8 BattleFrontier_Lounge2_Text_DomeAceIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_DomeAceSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_DomeAceGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_FactoryHeadIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_FactoryHeadSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_FactoryHeadGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PalaceMavenIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_PalaceMavenSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PalaceMavenGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_ArenaTycoonIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PikeQueenIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_PikeQueenSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PikeQueenGoldMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PyramidKingIsThere[];
+extern const u8 BattleFrontier_Lounge2_Text_PyramidKingSilverMons[];
+extern const u8 BattleFrontier_Lounge2_Text_PyramidKingGoldMons[];
+
+// Battle Frontier Nature Girl
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlHardy[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlLonely[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBrave[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlAdamant[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlNaughty[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBold[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlRelaxed[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlImpish[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlLax[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlTimid[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlHasty[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlSerious[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlJolly[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlModest[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlMild[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBashful[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlRash[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlCalm[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlGentle[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlSassy[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlCareful[];
+
+// Battle Frontier Gambler
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleTowerSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleTowerDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleTowerMulti[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleDomeSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleDomeDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleFactorySingle[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleFactoryDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattlePalaceSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattlePalaceDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattleArena[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattlePike[];
+extern const u8 BattleFrontier_Lounge3_Text_ChallengeBattlePyramid[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleTowerSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleTowerDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleTowerMulti[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleDomeSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleDomeDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleFactorySingle[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleFactoryDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattlePalaceSingle[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattlePalaceDouble[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattleArena[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattlePike[];
+extern const u8 BattleFrontier_Lounge3_Text_GetToBattlePyramid[];
extern const u8 gText_BP[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260201[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260287[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E[];
-
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C[];
-
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260397[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260436[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C[];
-
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260542[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260575[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2[];
-extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260613[];
-
-extern const u8 BattleFrontier_Lounge7_Text_265E30[];
-extern const u8 BattleFrontier_Lounge7_Text_265E5B[];
-extern const u8 BattleFrontier_Lounge7_Text_265E8A[];
-extern const u8 BattleFrontier_Lounge7_Text_265EC0[];
-extern const u8 BattleFrontier_Lounge7_Text_265EED[];
-extern const u8 BattleFrontier_Lounge7_Text_265F1C[];
-extern const u8 BattleFrontier_Lounge7_Text_265F47[];
-extern const u8 BattleFrontier_Lounge7_Text_265F77[];
-extern const u8 BattleFrontier_Lounge7_Text_265FAA[];
-extern const u8 BattleFrontier_Lounge7_Text_265FDD[];
-
-extern const u8 BattleFrontier_Lounge7_Text_26600A[];
-extern const u8 BattleFrontier_Lounge7_Text_26603E[];
-extern const u8 BattleFrontier_Lounge7_Text_266070[];
-extern const u8 BattleFrontier_Lounge7_Text_2660A6[];
-extern const u8 BattleFrontier_Lounge7_Text_2660D0[];
-extern const u8 BattleFrontier_Lounge7_Text_2660FF[];
-extern const u8 BattleFrontier_Lounge7_Text_26612D[];
-extern const u8 BattleFrontier_Lounge7_Text_26615F[];
-extern const u8 BattleFrontier_Lounge7_Text_266185[];
-extern const u8 BattleFrontier_Lounge7_Text_2661B5[];
+// Battle Frontier Exchange Corner
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_KissPosterDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_KissCushionDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_SmoochumDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_TogepiDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_MeowthDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ClefairyDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_DittoDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_CyndaquilDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ChikoritaDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_TotodileDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ProteinDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_CalciumDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_IronDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ZincDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_CarbosDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_HPUpDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_LeftoversDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_WhiteHerbDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_QuickClawDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_MentalHerbDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_BrightpowderDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ChoiceBandDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_KingsRockDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_FocusBandDesc[];
+extern const u8 BattleFrontier_ExchangeServiceCorner_Text_ScopeLensDesc[];
+
+// Battle Frontier Move Tutors
+extern const u8 BattleFrontier_Lounge7_Text_SoftboiledDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_SeismicTossDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_DreamEaterDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_MegaPunchDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_MegaKickDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_BodySlamDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_RockSlideDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_CounterDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_ThunderWaveDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_SwordsDanceDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_DefenseCurlDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_SnoreDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_MudSlapDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_SwiftDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_IcyWindDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_EndureDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_PsychUpDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_IcePunchDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_ThunderPunchDesc[];
+extern const u8 BattleFrontier_Lounge7_Text_FirePunchDesc[];
extern const u8 gText_YourPartnerHasRetired[];
@@ -938,7 +936,7 @@ extern const u8 gText_Accuracy2[];
extern const u8 gText_Appeal[];
extern const u8 gText_Jam[];
extern const u8 gText_OTSlash[];
-extern const u8 gText_UnkCtrlF907F908[];
+extern const u8 gText_IDNumber2[];
extern const u8 gText_XNature[];
extern const u8 gText_XNatureHatchedAtYZ[];
extern const u8 gText_XNatureHatchedSomewhereAt[];
@@ -1024,36 +1022,31 @@ extern const u8 gText_PokenavRibbons_RibbonListButtons[];
extern const u8 gText_PokenavRibbons_RibbonCheckButtons[];
extern const u8 gText_Number2[];
-extern const u8 gUnknown_085EAD37[];
-extern const u8 gUnknown_085EAD41[];
-extern const u8 gUnknown_085EAD67[];
-extern const u8 gUnknown_085EAD6D[];
-extern const u8 gUnknown_085EAD72[];
-extern const u8 gUnknown_085EAD84[];
-extern const u8 gUnknown_085EAD96[];
-extern const u8 gUnknown_085EADA4[];
-extern const u8 gUnknown_085EADB5[];
-extern const u8 gUnknown_085EADC4[];
-extern const u8 gUnknown_085EADD5[];
-extern const u8 gUnknown_085EADE7[];
-extern const u8 gUnknown_085EADF9[];
-extern const u8 gUnknown_085EAE04[];
-extern const u8 gUnknown_085EAE12[];
-extern const u8 gUnknown_085EAE1B[];
-extern const u8 gUnknown_085EAE27[];
-extern const u8 gUnknown_085EAE2C[];
-extern const u8 gUnknown_085EAE31[];
-extern const u8 gUnknown_085EAE35[];
-extern const u8 gUnknown_085EAE39[];
-extern const u8 gUnknown_085EAE3D[];
-extern const u8 gUnknown_085EAE41[];
-extern const u8 gUnknown_085EAD5F[];
-extern const u8 gUnknown_085EAE53[];
-extern const u8 gUnknown_085EAE5A[];
+extern const u8 gText_Petalburg[];
+extern const u8 gText_Slateport[];
+extern const u8 gText_Enter2[];
+extern const u8 gText_Info2[];
+extern const u8 gText_WhatsAContest[];
+extern const u8 gText_TypesOfContests[];
+extern const u8 gText_Ranks[];
+extern const u8 gText_Decoration2[];
+extern const u8 gText_PackUp[];
+extern const u8 gText_Registry[];
+extern const u8 gText_Information[];
+extern const u8 gText_Mach[];
+extern const u8 gText_Acro[];
+extern const u8 gText_Psn[];
+extern const u8 gText_Par[];
+extern const u8 gText_Slp[];
+extern const u8 gText_Brn[];
+extern const u8 gText_Frz[];
+extern const u8 gText_Dewford[];
+extern const u8 gText_SawIt[];
+extern const u8 gText_NotYet[];
extern const u8 gText_Yes[];
extern const u8 gText_No[];
-extern const u8 gUnknown_085EAEA2[];
-extern const u8 gUnknown_085EAEAC[];
+extern const u8 gText_Challenge[];
+extern const u8 gText_Info3[];
extern const u8 gTrickHouse_Mechadoll_Oddish[];
extern const u8 gTrickHouse_Mechadoll_Poochyena[];
extern const u8 gTrickHouse_Mechadoll_Taillow[];
@@ -1101,15 +1094,15 @@ extern const u8 gTrickHouse_Mechadoll_Seven2[];
extern const u8 gTrickHouse_Mechadoll_Eight2[];
// Pokedex strings
-extern const u8 gUnknown_085E87A5[];
-extern const u8 gUnknown_085E87D6[];
-extern const u8 gUnknown_085E87EF[];
-extern const u8 gUnknown_085E8806[];
-extern const u8 gUnknown_085E881F[];
-extern const u8 gUnknown_085E8840[];
-extern const u8 gUnknown_085E887C[];
-extern const u8 gUnknown_085E88A6[];
-extern const u8 gUnknown_085E88C8[];
+extern const u8 gText_SearchForPkmnBasedOnParameters[];
+extern const u8 gText_SwitchPokedexListings[];
+extern const u8 gText_ReturnToPokedex[];
+extern const u8 gText_SelectPokedexMode[];
+extern const u8 gText_SelectPokedexListingMode[];
+extern const u8 gText_ListByFirstLetter[];
+extern const u8 gText_ListByBodyColor[];
+extern const u8 gText_ListByType[];
+extern const u8 gText_ExecuteSearchSwitch[];
extern const u8 gText_DexHoennTitle[];
extern const u8 gText_DexNatTitle[];
extern const u8 gText_DexSortNumericalTitle[];
@@ -1149,65 +1142,64 @@ extern const u8 gText_DexEmptyString[];
extern const u8 gText_DexSearchDontSpecify[];
extern const u8 gText_DexSearchTypeNone[];
-extern const u8 gUnknown_085EAEC3[];
-extern const u8 gUnknown_085EAED6[];
-extern const u8 gUnknown_085EAEE6[];
-extern const u8 gUnknown_085EAEF6[];
-extern const u8 gUnknown_085EAF02[];
-extern const u8 gUnknown_085EAF0E[];
-extern const u8 gUnknown_085EAF1B[];
-extern const u8 gUnknown_085EAF24[];
-extern const u8 gUnknown_085EAF2F[];
-extern const u8 gUnknown_085EAF34[];
-extern const u8 gUnknown_085EAF3E[];
-extern const u8 gUnknown_085EAF4B[];
-extern const u8 gUnknown_085EAF58[];
-extern const u8 gUnknown_085EAF65[];
-extern const u8 gUnknown_085EAF70[];
-extern const u8 gUnknown_085EAF7D[];
-extern const u8 gUnknown_085EAF87[];
-extern const u8 gUnknown_085EAF93[];
-extern const u8 gUnknown_085EAF9F[];
-extern const u8 gUnknown_085EAFAB[];
-extern const u8 gUnknown_085EAFB6[];
-extern const u8 gUnknown_085EAFCF[];
-extern const u8 gUnknown_085EAFE8[];
-extern const u8 gUnknown_085EB089[];
-extern const u8 gUnknown_085EB09C[];
-extern const u8 gUnknown_085EB0AF[];
-extern const u8 gUnknown_085EB0C2[];
-extern const u8 gUnknown_085EB0D5[];
-extern const u8 gUnknown_085EB002[];
-extern const u8 gUnknown_085EB017[];
-extern const u8 gUnknown_085EB02A[];
-extern const u8 gUnknown_085EB034[];
+extern const u8 gText_FreshWaterAndPrice[];
+extern const u8 gText_SodaPopAndPrice[];
+extern const u8 gText_LemonadeAndPrice[];
+extern const u8 gText_HowToRide[];
+extern const u8 gText_HowToTurn[];
+extern const u8 gText_SandySlopes[];
+extern const u8 gText_Wheelies[];
+extern const u8 gText_BunnyHops[];
+extern const u8 gText_Jump[];
+extern const u8 gText_Satisfied[];
+extern const u8 gText_Dissatisfied[];
+extern const u8 gText_DeepSeaTooth[];
+extern const u8 gText_DeepSeaScale[];
+extern const u8 gText_BlueFlute2[];
+extern const u8 gText_YellowFlute2[];
+extern const u8 gText_RedFlute2[];
+extern const u8 gText_WhiteFlute2[];
+extern const u8 gText_BlackFlute2[];
+extern const u8 gText_GlassChair[];
+extern const u8 gText_GlassDesk[];
+extern const u8 gText_TreeckoDollAndPrice[];
+extern const u8 gText_TorchicDollAndPrice[];
+extern const u8 gText_MudkipDollAndPrice[];
+extern const u8 gText_TM32AndPrice[];
+extern const u8 gText_TM29AndPrice[];
+extern const u8 gText_TM35AndPrice[];
+extern const u8 gText_TM24AndPrice[];
+extern const u8 gText_TM13AndPrice[];
+extern const u8 gText_50CoinsAndPrice[];
+extern const u8 gText_500CoinsAndPrice[];
+extern const u8 gText_Excellent2[];
+extern const u8 gText_NotSoGood[];
extern const u8 gText_LilycoveCity[];
-extern const u8 gUnknown_085EB07E[];
-extern const u8 gUnknown_085EB084[];
-extern const u8 gUnknown_085EB040[];
-extern const u8 gUnknown_085EB04A[];
-extern const u8 gUnknown_085EB057[];
-extern const u8 gUnknown_085EB062[];
+extern const u8 gText_Right[];
+extern const u8 gText_Left[];
+extern const u8 gText_RedShard[];
+extern const u8 gText_YellowShard[];
+extern const u8 gText_BlueShard[];
+extern const u8 gText_GreenShard[];
extern const u8 gText_Opponent[];
extern const u8 gText_Tourney_Tree[];
extern const u8 gText_ReadyToStart[];
-extern const u8 gUnknown_085EB5BC[];
-extern const u8 gUnknown_085EB5C3[];
-extern const u8 gUnknown_085EB5C8[];
-extern const u8 gUnknown_085EB29A[];
-extern const u8 gUnknown_085EB2A3[];
-extern const u8 gUnknown_085EB372[];
-extern const u8 gUnknown_085EB37F[];
-extern const u8 gUnknown_085EB389[];
-extern const u8 gUnknown_085EAE6E[];
-extern const u8 gUnknown_085EAE7C[];
-extern const u8 gUnknown_085EAE8A[];
-extern const u8 gUnknown_085EAD6D[];
-extern const u8 gUnknown_085EB397[];
-extern const u8 gUnknown_085EB3A4[];
-extern const u8 gUnknown_085EB3B1[];
-extern const u8 gUnknown_085EB3D4[];
-extern const u8 gUnknown_085EB3C6[];
+extern const u8 gText_Record2[];
+extern const u8 gText_Rest[];
+extern const u8 gText_Retire[];
+extern const u8 gText_RedTent[];
+extern const u8 gText_BlueTent[];
+extern const u8 gText_TradeCenter[];
+extern const u8 gText_Colosseum[];
+extern const u8 gText_RecordCorner[];
+extern const u8 gText_SingleBattle[];
+extern const u8 gText_DoubleBattle[];
+extern const u8 gText_MultiBattle[];
+extern const u8 gText_BerryCrush3[];
+extern const u8 gText_PokemonJump[];
+extern const u8 gText_DodrioBerryPicking[];
+extern const u8 gText_JoinGroup[];
+extern const u8 gText_BecomeLeader[];
extern const u8 gText_NormalRank[];
extern const u8 gText_SuperRank[];
extern const u8 gText_HyperRank[];
@@ -1219,56 +1211,56 @@ extern const u8 gText_AboutE_Mode[];
extern const u8 gText_AboutG_Mode[];
extern const u8 gText_E_Mode[];
extern const u8 gText_G_Mode[];
-extern const u8 gUnknown_085EB278[];
-extern const u8 gUnknown_085EB28A[];
-extern const u8 gUnknown_085EB290[];
-extern const u8 gUnknown_085EB295[];
-extern const u8 gUnknown_085EB2E4[];
-extern const u8 gUnknown_085EB2F0[];
-extern const u8 gUnknown_085EB2FC[];
-extern const u8 gUnknown_085EB3DF[];
-extern const u8 gUnknown_085EB3EA[];
-extern const u8 gUnknown_085EB3F1[];
-extern const u8 gUnknown_085EB3FC[];
-extern const u8 gUnknown_085EB40A[];
-extern const u8 gUnknown_085EB415[];
-extern const u8 gUnknown_085EB41D[];
-extern const u8 gUnknown_085EB424[];
-extern const u8 gUnknown_085EB45C[];
-extern const u8 gUnknown_085EB469[];
-extern const u8 gUnknown_085EB475[];
-extern const u8 gUnknown_085EB482[];
-extern const u8 gUnknown_085EB42F[];
-extern const u8 gUnknown_085EB43A[];
-extern const u8 gUnknown_085EB444[];
-extern const u8 gUnknown_085EB451[];
-extern const u8 gUnknown_085EB48E[];
-extern const u8 gUnknown_085EB496[];
-extern const u8 gUnknown_085EB4A3[];
-extern const u8 gUnknown_085EB4AD[];
-extern const u8 gUnknown_085EB4B9[];
-extern const u8 gUnknown_085EB4C7[];
-extern const u8 gUnknown_085EB4D4[];
-extern const u8 gUnknown_085EB4E0[];
-extern const u8 gUnknown_085EB532[];
-extern const u8 gUnknown_085EB543[];
-extern const u8 gUnknown_085EB555[];
-extern const u8 gUnknown_085EB563[];
-extern const u8 gUnknown_085EB56E[];
-extern const u8 gUnknown_085EB57E[];
-extern const u8 gUnknown_085EB589[];
-extern const u8 gUnknown_085EB5B6[];
-extern const u8 gUnknown_085EE14B[];
-extern const u8 gUnknown_085EE14F[];
-extern const u8 gUnknown_085EB2FF[];
-extern const u8 gUnknown_085EB310[];
-extern const u8 gUnknown_085EB317[];
-extern const u8 gUnknown_085EB31F[];
+extern const u8 gText_Blank[];
+extern const u8 gText_5BP[];
+extern const u8 gText_10BP[];
+extern const u8 gText_15BP[];
+extern const u8 gText_ClawFossil[];
+extern const u8 gText_RootFossil[];
+extern const u8 gText_No4[];
+extern const u8 gText_TwoStyles[];
+extern const u8 gText_Lv50_3[];
+extern const u8 gText_OpenLevel2[];
+extern const u8 gText_MonTypeAndNo[];
+extern const u8 gText_HoldItems[];
+extern const u8 gText_Symbols2[];
+extern const u8 gText_Record3[];
+extern const u8 gText_BattlePts[];
+extern const u8 gText_BattleRules[];
+extern const u8 gText_JudgeMind[];
+extern const u8 gText_JudgeSkill[];
+extern const u8 gText_JudgeBody[];
+extern const u8 gText_TowerInfo[];
+extern const u8 gText_BattleMon[];
+extern const u8 gText_BattleSalon[];
+extern const u8 gText_MultiLink2[];
+extern const u8 gText_Matchup[];
+extern const u8 gText_TourneyTree[];
+extern const u8 gText_DoubleKO[];
+extern const u8 gText_BasicRules[];
+extern const u8 gText_SwapPartners[];
+extern const u8 gText_SwapNumber[];
+extern const u8 gText_SwapNotes[];
+extern const u8 gText_OpenLevel3[];
+extern const u8 gText_PyramidPokemon[];
+extern const u8 gText_PyramidTrainers[];
+extern const u8 gText_PyramidMaze[];
+extern const u8 gText_BattleBag2[];
+extern const u8 gText_PokenavAndBag[];
+extern const u8 gText_HeldItems[];
+extern const u8 gText_PokemonOrder[];
+extern const u8 gText_GoOn[];
+extern const u8 gText_Red[];
+extern const u8 gText_Blue[];
+extern const u8 gText_IllBattleNow[];
+extern const u8 gText_IWon[];
+extern const u8 gText_ILost[];
+extern const u8 gText_IWontTell[];
extern const u8 gText_CaveOfOrigin[];
extern const u8 gText_MtPyre[];
extern const u8 gText_SkyPillar[];
extern const u8 gText_DontRemember[];
-extern const u8 gUnknown_085EB597[];
+extern const u8 gText_BattlePokemon[];
extern const u8 gText_NormalTagMatch[];
extern const u8 gText_VarietyTagMatch[];
extern const u8 gText_UniqueTagMatch[];
@@ -1281,29 +1273,15 @@ extern const u8 gText_TrainerHill2F[];
extern const u8 gText_TrainerHill3F[];
extern const u8 gText_TrainerHill4F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F1B[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F5A[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F96[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_278831[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787FC[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_278831[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787FC[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F1B[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F5A[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
+// Cable Club multichoice text
+extern const u8 CableClub_Text_TradeUsingLinkCable[];
+extern const u8 CableClub_Text_BattleUsingLinkCable[];
+extern const u8 CableClub_Text_RecordCornerUsingLinkCable[];
+extern const u8 CableClub_Text_CancelSelectedItem[];
+extern const u8 CableClub_Text_YouMayTradeHere[];
+extern const u8 CableClub_Text_YouMayBattleHere[];
+extern const u8 CableClub_Text_CanMixRecords[];
+extern const u8 CableClub_Text_CanMakeBerryPowder[];
// Frontier records.
extern const u8 gText_WinStreak[];
@@ -1342,7 +1320,7 @@ extern const u8 gText_1st[];
extern const u8 gText_SpaceAndSpace[];
extern const u8 gText_CommaSpace[];
extern const u8 gText_NewLine[];
-extern const u8 gText_ScrollTextUp[];
+extern const u8 gText_LineBreak[];
extern const u8 gText_Space[];
extern const u8 gText_Space2[];
extern const u8 gText_Are[];
@@ -1350,11 +1328,11 @@ extern const u8 gText_Are2[];
extern const u8 gText_123Dot[][3];
// Frontier util.
-extern const u8 gUnknown_085ED164[];
-extern const u8 gUnknown_085ED170[];
-extern const u8 gUnknown_085ED17C[];
-extern const u8 gUnknown_085ED188[];
-extern const u8 gUnknown_085ED190[];
+extern const u8 gText_FacilitySingle[];
+extern const u8 gText_FacilityDouble[];
+extern const u8 gText_FacilityMulti[];
+extern const u8 gText_FacilityLink[];
+extern const u8 gText_Facility[];
extern const u8 gText_RecordsLv50[];
extern const u8 gText_RecordsOpenLevel[];
@@ -1364,612 +1342,611 @@ extern const u8 gText_FrontierFacilityRoomsCleared[];
extern const u8 gText_FrontierFacilityKOsStreak[];
extern const u8 gText_FrontierFacilityFloorsCleared[];
-extern const u8 gText_082C843F[];
-extern const u8 gText_082C848B[];
-extern const u8 gText_082C8628[];
-extern const u8 gText_082C85B4[];
-extern const u8 gText_082C8512[];
-extern const u8 gText_082C859D[];
-extern const u8 gText_082C86C3[];
-extern const u8 gText_082C8458[];
-extern const u8 gText_082C84C1[];
-extern const u8 gText_082C8662[];
-extern const u8 gText_082C85E3[];
-extern const u8 gText_082C853B[];
-extern const u8 gText_082C85A4[];
-extern const u8 gText_082C86FE[];
-extern const u8 gText_082C846C[];
-extern const u8 gText_082C84D0[];
-extern const u8 gText_082C8682[];
-extern const u8 gText_082C85F5[];
-extern const u8 gText_082C8561[];
-extern const u8 gText_082C85A9[];
-extern const u8 gText_082C8739[];
-extern const u8 gText_082C8480[];
-extern const u8 gText_082C84F7[];
-extern const u8 gText_082C86B3[];
-extern const u8 gText_082C8611[];
-extern const u8 gText_082C8589[];
-extern const u8 gText_082C85AE[];
-extern const u8 gText_082C877B[];
+// Frontier Brain
+extern const u8 gText_AnabelWonSilver[];
+extern const u8 gText_TuckerWonSilver[];
+extern const u8 gText_SpenserWonSilver[];
+extern const u8 gText_GretaWonSilver[];
+extern const u8 gText_NolandWonSilver[];
+extern const u8 gText_LucyWonSilver[];
+extern const u8 gText_BrandonWonSilver[];
+extern const u8 gText_AnabelDefeatSilver[];
+extern const u8 gText_TuckerDefeatSilver[];
+extern const u8 gText_SpenserDefeatSilver[];
+extern const u8 gText_GretaDefeatSilver[];
+extern const u8 gText_NolandDefeatSilver[];
+extern const u8 gText_LucyDefeatSilver[];
+extern const u8 gText_BrandonDefeatSilver[];
+extern const u8 gText_AnabelWonGold[];
+extern const u8 gText_TuckerWonGold[];
+extern const u8 gText_SpenserWonGold[];
+extern const u8 gText_GretaWonGold[];
+extern const u8 gText_NolandWonGold[];
+extern const u8 gText_LucyWonGold[];
+extern const u8 gText_BrandonWonGold[];
+extern const u8 gText_AnabelDefeatGold[];
+extern const u8 gText_TuckerDefeatGold[];
+extern const u8 gText_SpenserDefeatGold[];
+extern const u8 gText_GretaDefeatGold[];
+extern const u8 gText_NolandDefeatGold[];
+extern const u8 gText_LucyDefeatGold[];
+extern const u8 gText_BrandonDefeatGold[];
// Battle Tower.
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2479CE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248297[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2444D6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24459B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2448CD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24529A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245CAC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245E20[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245FC6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247749[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2453B4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2476ED[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246864[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247F3F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2484AC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248661[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2486FF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2469B4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246D9E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244A23[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246662[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248321[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244F4F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247B16[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2465B5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2481E1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247E7E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244549[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246244[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2468A7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2468FE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245A5F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24626E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244383[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246BE9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2462E4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246F7B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247268[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244643[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247EE9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246D3F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247AA1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246D6A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245D4B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247348[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24522F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24617D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244989[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2470FD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247C4E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24754A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247C8C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248467[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2474AF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245BBD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24503D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248AC0[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24614A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244E5B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245F2B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248553[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246741[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245656[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2480AB[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248725[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244939[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2471FB[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247291[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24589C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247B3E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248614[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2448F5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2445C5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247B62[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24777A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2455EC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248031[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244AA9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245464[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2484E7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247313[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247470[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244D82[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246529[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247238[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247A18[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24597F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247DFE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247FB7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246E64[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247655[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244E7E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245535[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246FCC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2482DC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24808D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246AF7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24864E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247991[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246605[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248B4C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2448A7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245C05[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2456F5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246020[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24670A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24694B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2471C7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248C5B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246449[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2452EF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245B91[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245F87[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246831[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247854[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244D07[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246051[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2486C6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248401[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2450E6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248671[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2454D6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24662A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246EB6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244FD3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247484[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2460D5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24622A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244DC6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2485E5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248BB4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246DD3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244B52[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24896F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247629[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2454A3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2459BE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244413[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248C90[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2446B4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244C18[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24610D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24838D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24633C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24758B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2458CE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246E1A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247EA1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248369[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245DC7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247D97[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2483C1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248892[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2488D8[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247889[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24895F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2449E6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248781[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246F21[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24707D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24818E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24568A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248A10[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246791[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246571[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246A4E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248431[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2462AA[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246B3F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2473C6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2473FB[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245CE6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2445E8[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2487C9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245D60[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24795F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245B79[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247B9B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246B2B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24451E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247807[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24636B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247DC7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246002[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247838[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248151[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24718D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2481A9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247942[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244D36[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246D2D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248751[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247D07[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246B6B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244F98[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246BB2[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24705B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248BEE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24716C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2489BD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245D07[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247724[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248908[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244618[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24468F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244C6E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246E39[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24856A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24894B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24824F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245C66[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246C22[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2467C4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245406[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24737A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2474EC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247FE9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247C23[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2480DC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24857D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248B39[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245E41[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245E78[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247D4E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24615D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248517[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245087[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2463C5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247AE3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245EEC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24885B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2470B2[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248B22[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2467E6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24833D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248C2E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248221[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245196[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245740[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24480C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246A22[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24555F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24712A[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247A76[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247CB2[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2457D9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248128[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24631F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246CE9[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2482B1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244DFE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247013[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24790D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24581F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247A51[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24479E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2461C7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244ECA[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2466E6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2477CE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245C2D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2487F7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2489E7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2478DD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248477[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244CD6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2466B4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24805E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247E3E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245923[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248829[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2461F5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24751D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2475BC[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245013[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2475D5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246C35[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246686[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247438[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245D8D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247EB5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246F4C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2450C0[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245DF0[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24755C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24474D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2444EF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246082[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2464EE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2467FF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244EF4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247BE7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245EBD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24697C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246A85[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245F58[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245851[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248A72[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2459F7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2443E7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245B3E[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248CCF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24444B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245C7F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246C6C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2472C7[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_245AB4[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24769B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248A40[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244BD2[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246760[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246CB3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247FA3[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_247F6D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248D04[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2463FF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246EEE[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244B93[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2446E5[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2469F1[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_2451BD[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_244AD6[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24738F[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_248AEB[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246478[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24760D[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24658C[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24692B[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_246ACF[];
-extern const u8 BattleFrontier_BattleTowerMultiBattleRoom_Text_24649D[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice1Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice1Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice1Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice1Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice1Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice2Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice2Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice2Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice2Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice2Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice3Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice3Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice3Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice3Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice3Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice4Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice4Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice4Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice4Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice4Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice5Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice5Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice5Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice5Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice5Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice6Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice6Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice6Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice6Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice6Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice7Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice7Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice7Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice7Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice7Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice8Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice8Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice8Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice8Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice8Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice9Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice9Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice9Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice9Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice9Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice10Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice10Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice10Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice10Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice10Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice11Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice11Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice11Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice11Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice11Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice12Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice12Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice12Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice12Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice12Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice13Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice13Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice13Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice13Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice13Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice14Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice14Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice14Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice14Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice14Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice15Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice15Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice15Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice15Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice15Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice16Intro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice16Mon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice16Mon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice16Accept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_Apprentice16Reject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LassIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LassMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LassMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LassAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LassReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_YoungsterIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_YoungsterMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_YoungsterMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_YoungsterAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_YoungsterReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HikerIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HikerMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HikerMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HikerAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HikerReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BeautyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BeautyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BeautyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BeautyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BeautyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_FishermanIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_FishermanMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_FishermanMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_FishermanAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_FishermanReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LadyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LadyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LadyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LadyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_LadyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugCatcherIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugCatcherMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugCatcherMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugCatcherAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugCatcherReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RichBoyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RichBoyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RichBoyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RichBoyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RichBoyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BlackBeltIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BlackBeltMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BlackBeltMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BlackBeltAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BlackBeltReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HexManiacIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HexManiacMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HexManiacMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HexManiacAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_HexManiacReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RunningTriathleteMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BattleGirlIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BattleGirlMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BattleGirlMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BattleGirlAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BattleGirlReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CyclingTriathleteMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_TuberMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GuitaristIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GuitaristMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GuitaristMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GuitaristAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GuitaristReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GentlemanIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GentlemanMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GentlemanMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GentlemanAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_GentlemanReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ExpertFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_DragonTamerIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_DragonTamerMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_DragonTamerMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_DragonTamerAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_DragonTamerReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFReject[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMIntro[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMMon1[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMMon2Ask[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMAccept[];
+extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMReject[];
// Battle Dome.
-extern const u8 gBattleDomeOpponentPotentialText1[];
-extern const u8 gBattleDomeOpponentPotentialText2[];
-extern const u8 gBattleDomeOpponentPotentialText3[];
-extern const u8 gBattleDomeOpponentPotentialText4[];
-extern const u8 gBattleDomeOpponentPotentialText5[];
-extern const u8 gBattleDomeOpponentPotentialText6[];
-extern const u8 gBattleDomeOpponentPotentialText7[];
-extern const u8 gBattleDomeOpponentPotentialText8[];
-extern const u8 gBattleDomeOpponentPotentialText9[];
-extern const u8 gBattleDomeOpponentPotentialText10[];
-extern const u8 gBattleDomeOpponentPotentialText11[];
-extern const u8 gBattleDomeOpponentPotentialText12[];
-extern const u8 gBattleDomeOpponentPotentialText13[];
-extern const u8 gBattleDomeOpponentPotentialText14[];
-extern const u8 gBattleDomeOpponentPotentialText15[];
-extern const u8 gBattleDomeOpponentPotentialText16[];
-extern const u8 gBattleDomeOpponentPotentialText17[];
-extern const u8 gBattleDomeOpponentStyleText1[];
-extern const u8 gBattleDomeOpponentStyleText2[];
-extern const u8 gBattleDomeOpponentStyleText3[];
-extern const u8 gBattleDomeOpponentStyleText4[];
-extern const u8 gBattleDomeOpponentStyleText5[];
-extern const u8 gBattleDomeOpponentStyleText6[];
-extern const u8 gBattleDomeOpponentStyleText7[];
-extern const u8 gBattleDomeOpponentStyleText8[];
-extern const u8 gBattleDomeOpponentStyleText9[];
-extern const u8 gBattleDomeOpponentStyleText10[];
-extern const u8 gBattleDomeOpponentStyleText11[];
-extern const u8 gBattleDomeOpponentStyleText12[];
-extern const u8 gBattleDomeOpponentStyleText13[];
-extern const u8 gBattleDomeOpponentStyleText14[];
-extern const u8 gBattleDomeOpponentStyleText15[];
-extern const u8 gBattleDomeOpponentStyleText16[];
-extern const u8 gBattleDomeOpponentStyleText17[];
-extern const u8 gBattleDomeOpponentStyleText18[];
-extern const u8 gBattleDomeOpponentStyleText19[];
-extern const u8 gBattleDomeOpponentStyleText20[];
-extern const u8 gBattleDomeOpponentStyleText21[];
-extern const u8 gBattleDomeOpponentStyleText22[];
-extern const u8 gBattleDomeOpponentStyleText23[];
-extern const u8 gBattleDomeOpponentStyleText24[];
-extern const u8 gBattleDomeOpponentStyleText25[];
-extern const u8 gBattleDomeOpponentStyleText26[];
-extern const u8 gBattleDomeOpponentStyleText27[];
-extern const u8 gBattleDomeOpponentStyleText28[];
-extern const u8 gBattleDomeOpponentStyleTextUnused1[];
-extern const u8 gBattleDomeOpponentStyleTextUnused2[];
-extern const u8 gBattleDomeOpponentStyleTextUnused3[];
-extern const u8 gBattleDomeOpponentStyleTextUnused4[];
-extern const u8 gBattleDomeOpponentStatsText1[];
-extern const u8 gBattleDomeOpponentStatsText2[];
-extern const u8 gBattleDomeOpponentStatsText3[];
-extern const u8 gBattleDomeOpponentStatsText4[];
-extern const u8 gBattleDomeOpponentStatsText5[];
-extern const u8 gBattleDomeOpponentStatsText6[];
-extern const u8 gBattleDomeOpponentStatsText7[];
-extern const u8 gBattleDomeOpponentStatsText8[];
-extern const u8 gBattleDomeOpponentStatsText9[];
-extern const u8 gBattleDomeOpponentStatsText10[];
-extern const u8 gBattleDomeOpponentStatsText11[];
-extern const u8 gBattleDomeOpponentStatsText12[];
-extern const u8 gBattleDomeOpponentStatsText13[];
-extern const u8 gBattleDomeOpponentStatsText14[];
-extern const u8 gBattleDomeOpponentStatsText15[];
-extern const u8 gBattleDomeOpponentStatsText16[];
-extern const u8 gBattleDomeOpponentStatsText17[];
-extern const u8 gBattleDomeOpponentStatsText18[];
-extern const u8 gBattleDomeOpponentStatsText19[];
-extern const u8 gBattleDomeOpponentStatsText20[];
-extern const u8 gBattleDomeOpponentStatsText21[];
-extern const u8 gBattleDomeOpponentStatsText22[];
-extern const u8 gBattleDomeOpponentStatsText23[];
-extern const u8 gBattleDomeOpponentStatsText24[];
-extern const u8 gBattleDomeOpponentStatsText25[];
-extern const u8 gBattleDomeOpponentStatsText26[];
-extern const u8 gBattleDomeOpponentStatsText27[];
-extern const u8 gBattleDomeOpponentStatsText28[];
-extern const u8 gBattleDomeOpponentStatsText29[];
-extern const u8 gBattleDomeOpponentStatsText30[];
-extern const u8 gBattleDomeOpponentStatsText31[];
-extern const u8 gBattleDomeOpponentStatsText32[];
-extern const u8 gBattleDomeOpponentStatsText33[];
-extern const u8 gBattleDomeOpponentStatsText34[];
-extern const u8 gBattleDomeOpponentStatsText35[];
-extern const u8 gBattleDomeOpponentStatsText36[];
-extern const u8 gBattleDomeOpponentStatsText37[];
-extern const u8 gBattleDomeOpponentStatsText38[];
-extern const u8 gBattleDomeOpponentStatsText39[];
-extern const u8 gBattleDomeOpponentStatsText40[];
-extern const u8 gBattleDomeOpponentStatsText41[];
-extern const u8 gBattleDomeOpponentStatsText42[];
-extern const u8 gBattleDomeOpponentStatsText43[];
-extern const u8 gBattleDomeMatchNumberText1[];
-extern const u8 gBattleDomeMatchNumberText2[];
-extern const u8 gBattleDomeMatchNumberText3[];
-extern const u8 gBattleDomeMatchNumberText4[];
-extern const u8 gBattleDomeMatchNumberText5[];
-extern const u8 gBattleDomeMatchNumberText6[];
-extern const u8 gBattleDomeMatchNumberText7[];
-extern const u8 gBattleDomeMatchNumberText8[];
-extern const u8 gBattleDomeMatchNumberText9[];
-extern const u8 gBattleDomeMatchNumberText10[];
-extern const u8 gBattleDomeMatchNumberText11[];
-extern const u8 gBattleDomeMatchNumberText12[];
-extern const u8 gBattleDomeMatchNumberText13[];
-extern const u8 gBattleDomeMatchNumberText14[];
-extern const u8 gBattleDomeMatchNumberText15[];
-extern const u8 gBattleDomeWinText1[];
-extern const u8 gBattleDomeWinText2[];
-extern const u8 gBattleDomeWinText3[];
-extern const u8 gBattleDomeWinText4[];
-extern const u8 gBattleDomeWinText5[];
-extern const u8 gBattleDomeWinText6[];
-extern const u8 gBattleDomeWinText7[];
+extern const u8 BattleDome_Text_Potential1[];
+extern const u8 BattleDome_Text_Potential2[];
+extern const u8 BattleDome_Text_Potential3[];
+extern const u8 BattleDome_Text_Potential4[];
+extern const u8 BattleDome_Text_Potential5[];
+extern const u8 BattleDome_Text_Potential6[];
+extern const u8 BattleDome_Text_Potential7[];
+extern const u8 BattleDome_Text_Potential8[];
+extern const u8 BattleDome_Text_Potential9[];
+extern const u8 BattleDome_Text_Potential10[];
+extern const u8 BattleDome_Text_Potential11[];
+extern const u8 BattleDome_Text_Potential12[];
+extern const u8 BattleDome_Text_Potential13[];
+extern const u8 BattleDome_Text_Potential14[];
+extern const u8 BattleDome_Text_Potential15[];
+extern const u8 BattleDome_Text_Potential16[];
+extern const u8 BattleDome_Text_PotentialDomeAceTucker[];
+extern const u8 BattleDome_Text_StyleRiskDisaster[];
+extern const u8 BattleDome_Text_StyleEndureLongBattles[];
+extern const u8 BattleDome_Text_StyleVariesTactics[];
+extern const u8 BattleDome_Text_StyleToughWinningPattern[];
+extern const u8 BattleDome_Text_StyleUsesVeryRareMove[];
+extern const u8 BattleDome_Text_StyleUsesStartlingMoves[];
+extern const u8 BattleDome_Text_StyleConstantlyWatchesHP[];
+extern const u8 BattleDome_Text_StyleStoresAndLoosesPower[];
+extern const u8 BattleDome_Text_StyleEnfeeblesFoes[];
+extern const u8 BattleDome_Text_StylePrefersLuckTactics[];
+extern const u8 BattleDome_Text_StyleRegalAtmosphere[];
+extern const u8 BattleDome_Text_StylePowerfulLowPPMoves[];
+extern const u8 BattleDome_Text_StyleEnfeebleThenAttack[];
+extern const u8 BattleDome_Text_StyleBattlesWhileEnduring[];
+extern const u8 BattleDome_Text_StyleUpsetsFoesEmotionally[];
+extern const u8 BattleDome_Text_StyleStrongAndStraightforward[];
+extern const u8 BattleDome_Text_StyleAggressivelyStrongMoves[];
+extern const u8 BattleDome_Text_StyleCleverlyDodgesAttacks[];
+extern const u8 BattleDome_Text_StyleUsesUpsettingMoves[];
+extern const u8 BattleDome_Text_StyleUsesPopularMoves[];
+extern const u8 BattleDome_Text_StyleHasPowerfulComboMoves[];
+extern const u8 BattleDome_Text_StyleUsesHighProbabilityMoves[];
+extern const u8 BattleDome_Text_StyleAggressivelySpectacularMoves[];
+extern const u8 BattleDome_Text_StyleEmphasizesOffenseOverDefense[];
+extern const u8 BattleDome_Text_StyleEmphasizesDefenseOverOffense[];
+extern const u8 BattleDome_Text_StyleAttacksQuicklyStrongMoves[];
+extern const u8 BattleDome_Text_StyleUsesAddedEffectMoves[];
+extern const u8 BattleDome_Text_StyleUsesBalancedMixOfMoves[];
+extern const u8 BattleDome_Text_StyleSampleMessage1[];
+extern const u8 BattleDome_Text_StyleSampleMessage2[];
+extern const u8 BattleDome_Text_StyleSampleMessage3[];
+extern const u8 BattleDome_Text_StyleSampleMessage4[];
+extern const u8 BattleDome_Text_EmphasizesHPAndAtk[];
+extern const u8 BattleDome_Text_EmphasizesHPAndDef[];
+extern const u8 BattleDome_Text_EmphasizesHPAndSpeed[];
+extern const u8 BattleDome_Text_EmphasizesHPAndSpAtk[];
+extern const u8 BattleDome_Text_EmphasizesHPAndSpDef[];
+extern const u8 BattleDome_Text_EmphasizesAtkAndDef[];
+extern const u8 BattleDome_Text_EmphasizesAtkAndSpeed[];
+extern const u8 BattleDome_Text_EmphasizesAtkAndSpAtk[];
+extern const u8 BattleDome_Text_EmphasizesAtkAndSpDef[];
+extern const u8 BattleDome_Text_EmphasizesDefAndSpeed[];
+extern const u8 BattleDome_Text_EmphasizesDefAndSpAtk[];
+extern const u8 BattleDome_Text_EmphasizesDefAndSpDef[];
+extern const u8 BattleDome_Text_EmphasizesSpeedAndSpAtk[];
+extern const u8 BattleDome_Text_EmphasizesSpeedAndSpDef[];
+extern const u8 BattleDome_Text_EmphasizesSpAtkAndSpDef[];
+extern const u8 BattleDome_Text_EmphasizesHP[];
+extern const u8 BattleDome_Text_EmphasizesAtk[];
+extern const u8 BattleDome_Text_EmphasizesDef[];
+extern const u8 BattleDome_Text_EmphasizesSpeed[];
+extern const u8 BattleDome_Text_EmphasizesSpAtk[];
+extern const u8 BattleDome_Text_EmphasizesSpDef[];
+extern const u8 BattleDome_Text_NeglectsHPAndAtk[];
+extern const u8 BattleDome_Text_NeglectsHPAndDef[];
+extern const u8 BattleDome_Text_NeglectsHPAndSpeed[];
+extern const u8 BattleDome_Text_NeglectsHPAndSpAtk[];
+extern const u8 BattleDome_Text_NeglectsHPAndSpDef[];
+extern const u8 BattleDome_Text_NeglectsAtkAndDef[];
+extern const u8 BattleDome_Text_NeglectsAtkAndSpeed[];
+extern const u8 BattleDome_Text_NeglectsAtkAndSpAtk[];
+extern const u8 BattleDome_Text_NeglectsAtkAndSpDef[];
+extern const u8 BattleDome_Text_NeglectsDefAndSpeed[];
+extern const u8 BattleDome_Text_NeglectsDefAndSpAtk[];
+extern const u8 BattleDome_Text_NeglectsDefAndSpDef[];
+extern const u8 BattleDome_Text_NeglectsSpeedAndSpAtk[];
+extern const u8 BattleDome_Text_NeglectsSpeedAndSpDef[];
+extern const u8 BattleDome_Text_NeglectsSpAtkAndSpDef[];
+extern const u8 BattleDome_Text_NeglectsHP[];
+extern const u8 BattleDome_Text_NeglectsAtk[];
+extern const u8 BattleDome_Text_NeglectsDef[];
+extern const u8 BattleDome_Text_NeglectsSpeed[];
+extern const u8 BattleDome_Text_NeglectsSpAtk[];
+extern const u8 BattleDome_Text_NeglectsSpDef[];
+extern const u8 BattleDome_Text_RaisesMonsWellBalanced[];
+extern const u8 BattleDome_Text_Round1Match1[];
+extern const u8 BattleDome_Text_Round1Match2[];
+extern const u8 BattleDome_Text_Round1Match3[];
+extern const u8 BattleDome_Text_Round1Match4[];
+extern const u8 BattleDome_Text_Round1Match5[];
+extern const u8 BattleDome_Text_Round1Match6[];
+extern const u8 BattleDome_Text_Round1Match7[];
+extern const u8 BattleDome_Text_Round1Match8[];
+extern const u8 BattleDome_Text_Round2Match1[];
+extern const u8 BattleDome_Text_Round2Match2[];
+extern const u8 BattleDome_Text_Round2Match3[];
+extern const u8 BattleDome_Text_Round2Match4[];
+extern const u8 BattleDome_Text_SemifinalMatch1[];
+extern const u8 BattleDome_Text_SemifinalMatch2[];
+extern const u8 BattleDome_Text_FinalMatch[];
+extern const u8 BattleDome_Text_LetTheBattleBegin[];
+extern const u8 BattleDome_Text_TrainerWonUsingMove[];
+extern const u8 BattleDome_Text_TrainerBecameChamp[];
+extern const u8 BattleDome_Text_TrainerWonByDefault[];
+extern const u8 BattleDome_Text_TrainerWonOutrightByDefault[];
+extern const u8 BattleDome_Text_TrainerWonNoMoves[];
+extern const u8 BattleDome_Text_TrainerWonOutrightNoMoves[];
// Battle Pyramid.
-extern const u8 BattlePyramid_ExitHintUp_Text1[];
-extern const u8 BattlePyramid_ExitHintLeft_Text1[];
-extern const u8 BattlePyramid_ExitHintRight_Text1[];
-extern const u8 BattlePyramid_ExitHintDown_Text1[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text1[];
-extern const u8 BattlePyramid_OneItemRemaining_Text1[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text1[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text1[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text1[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text1[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text1[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text1[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text1[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text1[];
-extern const u8 BattlePyramid_ExitHintUp_Text2[];
-extern const u8 BattlePyramid_ExitHintLeft_Text2[];
-extern const u8 BattlePyramid_ExitHintRight_Text2[];
-extern const u8 BattlePyramid_ExitHintDown_Text2[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text2[];
-extern const u8 BattlePyramid_OneItemRemaining_Text2[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text2[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text2[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text2[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text2[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text2[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text2[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text2[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text2[];
-extern const u8 BattlePyramid_ExitHintUp_Text3[];
-extern const u8 BattlePyramid_ExitHintLeft_Text3[];
-extern const u8 BattlePyramid_ExitHintRight_Text3[];
-extern const u8 BattlePyramid_ExitHintDown_Text3[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text3[];
-extern const u8 BattlePyramid_OneItemRemaining_Text3[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text3[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text3[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text3[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text3[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text3[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text3[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text3[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text3[];
-extern const u8 BattlePyramid_ExitHintUp_Text4[];
-extern const u8 BattlePyramid_ExitHintLeft_Text4[];
-extern const u8 BattlePyramid_ExitHintRight_Text4[];
-extern const u8 BattlePyramid_ExitHintDown_Text4[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text4[];
-extern const u8 BattlePyramid_OneItemRemaining_Text4[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text4[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text4[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text4[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text4[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text4[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text4[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text4[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text4[];
-extern const u8 BattlePyramid_ExitHintUp_Text5[];
-extern const u8 BattlePyramid_ExitHintLeft_Text5[];
-extern const u8 BattlePyramid_ExitHintRight_Text5[];
-extern const u8 BattlePyramid_ExitHintDown_Text5[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text5[];
-extern const u8 BattlePyramid_OneItemRemaining_Text5[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text5[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text5[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text5[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text5[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text5[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text5[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text5[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text5[];
-extern const u8 BattlePyramid_ExitHintUp_Text6[];
-extern const u8 BattlePyramid_ExitHintLeft_Text6[];
-extern const u8 BattlePyramid_ExitHintRight_Text6[];
-extern const u8 BattlePyramid_ExitHintDown_Text6[];
-extern const u8 BattlePyramid_ZeroItemsRemaining_Text6[];
-extern const u8 BattlePyramid_OneItemRemaining_Text6[];
-extern const u8 BattlePyramid_TwoItemsRemaining_Text6[];
-extern const u8 BattlePyramid_ThreeItemsRemaining_Text6[];
-extern const u8 BattlePyramid_FourItemsRemaining_Text6[];
-extern const u8 BattlePyramid_FiveItemsRemaining_Text6[];
-extern const u8 BattlePyramid_SixItemsRemaining_Text6[];
-extern const u8 BattlePyramid_SevenItemsRemaining_Text6[];
-extern const u8 BattlePyramid_EightItemsRemaining_Text6[];
-extern const u8 BattlePyramid_ZeroTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_OneTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_TwoTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_ThreeTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_FourTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_FiveTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_SixTrainersRemaining_Text6[];
-extern const u8 BattlePyramid_SevenTrainersRemaining_Text6[];
-
-
+extern const u8 BattlePyramid_Text_ExitHintUp1[];
+extern const u8 BattlePyramid_Text_ExitHintLeft1[];
+extern const u8 BattlePyramid_Text_ExitHintRight1[];
+extern const u8 BattlePyramid_Text_ExitHintDown1[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining1[];
+extern const u8 BattlePyramid_Text_OneItemRemaining1[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining1[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining1[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining1[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining1[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining1[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining1[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining1[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining1[];
+extern const u8 BattlePyramid_Text_ExitHintUp2[];
+extern const u8 BattlePyramid_Text_ExitHintLeft2[];
+extern const u8 BattlePyramid_Text_ExitHintRight2[];
+extern const u8 BattlePyramid_Text_ExitHintDown2[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining2[];
+extern const u8 BattlePyramid_Text_OneItemRemaining2[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining2[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining2[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining2[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining2[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining2[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining2[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining2[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining2[];
+extern const u8 BattlePyramid_Text_ExitHintUp3[];
+extern const u8 BattlePyramid_Text_ExitHintLeft3[];
+extern const u8 BattlePyramid_Text_ExitHintRight3[];
+extern const u8 BattlePyramid_Text_ExitHintDown3[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining3[];
+extern const u8 BattlePyramid_Text_OneItemRemaining3[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining3[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining3[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining3[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining3[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining3[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining3[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining3[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining3[];
+extern const u8 BattlePyramid_Text_ExitHintUp4[];
+extern const u8 BattlePyramid_Text_ExitHintLeft4[];
+extern const u8 BattlePyramid_Text_ExitHintRight4[];
+extern const u8 BattlePyramid_Text_ExitHintDown4[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining4[];
+extern const u8 BattlePyramid_Text_OneItemRemaining4[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining4[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining4[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining4[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining4[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining4[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining4[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining4[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining4[];
+extern const u8 BattlePyramid_Text_ExitHintUp5[];
+extern const u8 BattlePyramid_Text_ExitHintLeft5[];
+extern const u8 BattlePyramid_Text_ExitHintRight5[];
+extern const u8 BattlePyramid_Text_ExitHintDown5[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining5[];
+extern const u8 BattlePyramid_Text_OneItemRemaining5[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining5[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining5[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining5[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining5[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining5[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining5[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining5[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining5[];
+extern const u8 BattlePyramid_Text_ExitHintUp6[];
+extern const u8 BattlePyramid_Text_ExitHintLeft6[];
+extern const u8 BattlePyramid_Text_ExitHintRight6[];
+extern const u8 BattlePyramid_Text_ExitHintDown6[];
+extern const u8 BattlePyramid_Text_ZeroItemsRemaining6[];
+extern const u8 BattlePyramid_Text_OneItemRemaining6[];
+extern const u8 BattlePyramid_Text_TwoItemsRemaining6[];
+extern const u8 BattlePyramid_Text_ThreeItemsRemaining6[];
+extern const u8 BattlePyramid_Text_FourItemsRemaining6[];
+extern const u8 BattlePyramid_Text_FiveItemsRemaining6[];
+extern const u8 BattlePyramid_Text_SixItemsRemaining6[];
+extern const u8 BattlePyramid_Text_SevenItemsRemaining6[];
+extern const u8 BattlePyramid_Text_EightItemsRemaining6[];
+extern const u8 BattlePyramid_Text_ZeroTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_OneTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_TwoTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_ThreeTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_FourTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_FiveTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_SixTrainersRemaining6[];
+extern const u8 BattlePyramid_Text_SevenTrainersRemaining6[];
// PC strings
extern const u8 gText_ExitFromBox[];
@@ -2047,7 +2024,7 @@ extern const u8 gText_JustOnePkmn[];
// battle main
extern const u8 gText_LinkStandby3[];
-extern const u8 gText_BattleRecordCouldntBeSaved[];
+extern const u8 BattleFrontier_BattleTowerBattleRoom_Text_RecordCouldntBeSaved[];
extern const u8 gText_Poison[];
extern const u8 gText_Sleep[];
extern const u8 gText_Paralysis[];
@@ -2057,8 +2034,8 @@ extern const u8 gText_Confusion[];
extern const u8 gText_Love[];
// battle message
-extern const u8 gText_PkmnBoxSomeonesPCFull[];
-extern const u8 gText_PkmnBoxLanettesPCFull[];
+extern const u8 gText_PkmnTransferredSomeonesPCBoxFull[];
+extern const u8 gText_PkmnTransferredLanettesPCBoxFull[];
extern const u8 gText_PkmnTransferredSomeonesPC[];
extern const u8 gText_PkmnTransferredLanettesPC[];
@@ -2067,14 +2044,14 @@ extern const u8 gText_LeagueChamp[];
extern const u8 gText_HOFNumber[];
extern const u8 gText_PickNextCancel[];
extern const u8 gText_PickCancel[];
-extern const u8 gText_UnkCtrlF800Exit[];
+extern const u8 gText_AButtonExit[];
extern const u8 gText_HOFCorrupted[];
extern const u8 gText_WelcomeToHOF[];
extern const u8 gText_Number[];
extern const u8 gText_Level[];
extern const u8 gText_IDNumber[];
extern const u8 gText_Name[];
-extern const u8 gText_MainMenuTime[];
+extern const u8 gText_Time[];
// daycare
extern const u8 gText_MaleSymbol4[];
@@ -2160,9 +2137,6 @@ extern const u8 gText_XSentOverY[];
extern const u8 gText_TakeGoodCareOfX[];
extern const u8 gText_CommunicationStandby5[];
-// roulette
-extern const u8 gUnknown_082A5B89[];
-
// match call
extern const u8 MatchCall_WildBattleText1[];
extern const u8 MatchCall_WildBattleText2[];
@@ -2369,6 +2343,150 @@ extern const u8 MatchCall_BattlePyramidText11[];
extern const u8 MatchCall_BattlePyramidText12[];
extern const u8 MatchCall_BattlePyramidText13[];
extern const u8 MatchCall_BattlePyramidText14[];
+extern const u8 MatchCall_Text_MrStone1[];
+extern const u8 MatchCall_Text_MrStone2[];
+extern const u8 MatchCall_Text_MrStone3[];
+extern const u8 MatchCall_Text_MrStone4[];
+extern const u8 MatchCall_Text_MrStone5[];
+extern const u8 MatchCall_Text_MrStone6[];
+extern const u8 MatchCall_Text_MrStone7[];
+extern const u8 MatchCall_Text_MrStone8[];
+extern const u8 MatchCall_Text_MrStone9[];
+extern const u8 MatchCall_Text_MrStone10[];
+extern const u8 MatchCall_Text_MrStone11[];
+extern const u8 MatchCall_Text_Norman1[];
+extern const u8 MatchCall_Text_Norman2[];
+extern const u8 MatchCall_Text_Norman3[];
+extern const u8 MatchCall_Text_Norman4[];
+extern const u8 MatchCall_Text_Norman5[];
+extern const u8 MatchCall_Text_Norman6[];
+extern const u8 MatchCall_Text_Norman7[];
+extern const u8 MatchCall_Text_Norman8[];
+extern const u8 MatchCall_Text_Norman9[];
+extern const u8 MatchCall_Text_Mom1[];
+extern const u8 MatchCall_Text_Mom2[];
+extern const u8 MatchCall_Text_Mom3[];
+extern const u8 MatchCall_Text_Steven1[];
+extern const u8 MatchCall_Text_Steven2[];
+extern const u8 MatchCall_Text_Steven3[];
+extern const u8 MatchCall_Text_Steven4[];
+extern const u8 MatchCall_Text_Steven5[];
+extern const u8 MatchCall_Text_Steven6[];
+extern const u8 MatchCall_Text_Steven7[];
+extern const u8 MatchCall_Text_May1[];
+extern const u8 MatchCall_Text_May2[];
+extern const u8 MatchCall_Text_May3[];
+extern const u8 MatchCall_Text_May4[];
+extern const u8 MatchCall_Text_May5[];
+extern const u8 MatchCall_Text_May6[];
+extern const u8 MatchCall_Text_May7[];
+extern const u8 MatchCall_Text_May8[];
+extern const u8 MatchCall_Text_May9[];
+extern const u8 MatchCall_Text_May10[];
+extern const u8 MatchCall_Text_May11[];
+extern const u8 MatchCall_Text_May12[];
+extern const u8 MatchCall_Text_May13[];
+extern const u8 MatchCall_Text_May14[];
+extern const u8 MatchCall_Text_May15[];
+extern const u8 MatchCall_Text_Brendan1[];
+extern const u8 MatchCall_Text_Brendan2[];
+extern const u8 MatchCall_Text_Brendan3[];
+extern const u8 MatchCall_Text_Brendan4[];
+extern const u8 MatchCall_Text_Brendan5[];
+extern const u8 MatchCall_Text_Brendan6[];
+extern const u8 MatchCall_Text_Brendan7[];
+extern const u8 MatchCall_Text_Brendan8[];
+extern const u8 MatchCall_Text_Brendan9[];
+extern const u8 MatchCall_Text_Brendan10[];
+extern const u8 MatchCall_Text_Brendan11[];
+extern const u8 MatchCall_Text_Brendan12[];
+extern const u8 MatchCall_Text_Brendan13[];
+extern const u8 MatchCall_Text_Brendan14[];
+extern const u8 MatchCall_Text_Brendan15[];
+extern const u8 MatchCall_Text_Wally1[];
+extern const u8 MatchCall_Text_Wally2[];
+extern const u8 MatchCall_Text_Wally3[];
+extern const u8 MatchCall_Text_Wally4[];
+extern const u8 MatchCall_Text_Wally5[];
+extern const u8 MatchCall_Text_Wally6[];
+extern const u8 MatchCall_Text_Wally7[];
+extern const u8 MatchCall_Text_Scott1[];
+extern const u8 MatchCall_Text_Scott2[];
+extern const u8 MatchCall_Text_Scott3[];
+extern const u8 MatchCall_Text_Scott4[];
+extern const u8 MatchCall_Text_Scott5[];
+extern const u8 MatchCall_Text_Scott6[];
+extern const u8 MatchCall_Text_Scott7[];
+extern const u8 MatchCall_Text_Roxanne1[];
+extern const u8 MatchCall_Text_Roxanne2[];
+extern const u8 MatchCall_Text_Roxanne3[];
+extern const u8 MatchCall_Text_Roxanne4[];
+extern const u8 MatchCall_Text_Brawly1[];
+extern const u8 MatchCall_Text_Brawly2[];
+extern const u8 MatchCall_Text_Brawly3[];
+extern const u8 MatchCall_Text_Brawly4[];
+extern const u8 MatchCall_Text_Wattson1[];
+extern const u8 MatchCall_Text_Wattson2[];
+extern const u8 MatchCall_Text_Wattson3[];
+extern const u8 MatchCall_Text_Wattson4[];
+extern const u8 MatchCall_Text_Flannery1[];
+extern const u8 MatchCall_Text_Flannery2[];
+extern const u8 MatchCall_Text_Flannery3[];
+extern const u8 MatchCall_Text_Flannery4[];
+extern const u8 MatchCall_Text_Winona1[];
+extern const u8 MatchCall_Text_Winona2[];
+extern const u8 MatchCall_Text_Winona3[];
+extern const u8 MatchCall_Text_Winona4[];
+extern const u8 MatchCall_Text_TateLiza1[];
+extern const u8 MatchCall_Text_TateLiza2[];
+extern const u8 MatchCall_Text_TateLiza3[];
+extern const u8 MatchCall_Text_TateLiza4[];
+extern const u8 MatchCall_Text_Juan1[];
+extern const u8 MatchCall_Text_Juan2[];
+extern const u8 MatchCall_Text_Juan3[];
+extern const u8 MatchCall_Text_Juan4[];
+extern const u8 MatchCall_Text_Sidney[];
+extern const u8 MatchCall_Text_Phoebe[];
+extern const u8 MatchCall_Text_Glacia[];
+extern const u8 MatchCall_Text_Drake[];
+extern const u8 MatchCall_Text_Wallace[];
+extern const u8 gText_MrStoneMatchCallDesc[];
+extern const u8 gText_MrStoneMatchCallName[];
+extern const u8 gText_StevenMatchCallDesc[];
+extern const u8 gText_StevenMatchCallName[];
+extern const u8 gText_MayBrendanMatchCallDesc[];
+extern const u8 gText_WallyMatchCallDesc[];
+extern const u8 gText_NormanMatchCallDesc[];
+extern const u8 gText_NormanMatchCallName[];
+extern const u8 gText_MomMatchCallDesc[];
+extern const u8 gText_MomMatchCallName[];
+extern const u8 gText_ScottMatchCallDesc[];
+extern const u8 gText_ScottMatchCallName[];
+extern const u8 gText_RoxanneMatchCallDesc[];
+extern const u8 gText_BrawlyMatchCallDesc[];
+extern const u8 gText_WattsonMatchCallDesc[];
+extern const u8 gText_FlanneryMatchCallDesc[];
+extern const u8 gText_WinonaMatchCallDesc[];
+extern const u8 gText_TateLizaMatchCallDesc[];
+extern const u8 gText_JuanMatchCallDesc[];
+extern const u8 gText_EliteFourMatchCallDesc[];
+extern const u8 gText_ChampionMatchCallDesc[];
+extern const u8 gText_ProfBirchMatchCallDesc[];
+extern const u8 gText_ProfBirchMatchCallName[];
+extern const u8 gText_MatchCallSteven_Strategy[];
+extern const u8 gText_MatchCallSteven_Pokemon[];
+extern const u8 gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle[];
+extern const u8 gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle[];
+extern const u8 gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle[];
+extern const u8 gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle[];
+extern const u8 gText_MatchCallBrendan_Strategy[];
+extern const u8 gText_MatchCallBrendan_Pokemon[];
+extern const u8 gText_MatchCallBrendan_Intro1[];
+extern const u8 gText_MatchCallBrendan_Intro2[];
+extern const u8 gText_MatchCallMay_Strategy[];
+extern const u8 gText_MatchCallMay_Pokemon[];
+extern const u8 gText_MatchCallMay_Intro1[];
+extern const u8 gText_MatchCallMay_Intro2[];
// Contest Link
extern const u8 gText_ColorDarkGrey[];
@@ -2408,35 +2526,39 @@ extern const u8 gText_BattlePtsWon[];
extern const u8 gText_SymbolsEarned[];
extern const u8 gText_BattleRecord[];
extern const u8 gText_BattlePoints[];
-extern const u8 gUnknown_085EDA96[];
-extern const u8 gUnknown_085ED932[];
-extern const u8 gUnknown_085ED94D[];
-extern const u8 gUnknown_085ED961[];
-extern const u8 gUnknown_085ED977[];
-extern const u8 gUnknown_085ED993[];
-extern const u8 gUnknown_085ED9AF[];
-extern const u8 gUnknown_085ED9C7[];
-extern const u8 gUnknown_085ED9E5[];
-extern const u8 gUnknown_085EDA02[];
-extern const u8 gUnknown_085EDA21[];
-extern const u8 gUnknown_085EDA3C[];
-extern const u8 gUnknown_085EDA5E[];
-extern const u8 gUnknown_085EDA78[];
-extern const u8 gUnknown_085ED931[];
-extern const u8 gUnknown_085EDAB1[];
-extern const u8 gUnknown_085EDB0F[];
-extern const u8 gUnknown_085EDABE[];
-extern const u8 gUnknown_085EDB4E[];
-extern const u8 gUnknown_085EDACA[];
-extern const u8 gUnknown_085EDB8B[];
-extern const u8 gUnknown_085EDAD8[];
-extern const u8 gUnknown_085EDBC2[];
-extern const u8 gUnknown_085EDAE5[];
-extern const u8 gUnknown_085EDC00[];
-extern const u8 gUnknown_085EDAF4[];
-extern const u8 gUnknown_085EDC45[];
-extern const u8 gUnknown_085EDB00[];
-extern const u8 gUnknown_085EDC84[];
+extern const u8 gText_ThereIsNoBattleRecord[];
+extern const u8 gText_CheckFrontierMap[];
+extern const u8 gText_CheckTrainerCard[];
+extern const u8 gText_ViewRecordedBattle[];
+extern const u8 gText_PutAwayFrontierPass[];
+extern const u8 gText_CurrentBattlePoints[];
+extern const u8 gText_CollectedSymbols[];
+extern const u8 gText_BattleTowerAbilitySymbol[];
+extern const u8 gText_BattleDomeTacticsSymbol[];
+extern const u8 gText_BattlePalaceSpiritsSymbol[];
+extern const u8 gText_BattleArenaGutsSymbol[];
+extern const u8 gText_BattleFactoryKnowledgeSymbol[];
+extern const u8 gText_BattlePikeLuckSymbol[];
+extern const u8 gText_BattlePyramidBraveSymbol[];
+extern const u8 gText_EmptyString7[];
+extern const u8 gText_BattleTower3[];
+extern const u8 gText_BattleDome2[];
+extern const u8 gText_BattlePalace2[];
+extern const u8 gText_BattleArena2[];
+extern const u8 gText_BattleFactory2[];
+extern const u8 gText_BattlePike2[];
+extern const u8 gText_BattlePyramid2[];
+extern const u8 gText_BattleTowerDesc[];
+extern const u8 gText_BattleDomeDesc[];
+extern const u8 gText_BattlePalaceDesc[];
+extern const u8 gText_BattleArenaDesc[];
+extern const u8 gText_BattleFactoryDesc[];
+extern const u8 gText_BattlePikeDesc[];
+extern const u8 gText_BattlePyramidDesc[];
+
+// Apprentice
+extern const u8 gText_Give[];
+extern const u8 gText_NoNeed[];
// Easy Chat Entry
extern const u8 gText_StopGivingPkmnMail[];
@@ -2534,72 +2656,68 @@ extern const u8 gEasyChatGroupName_Move2[];
extern const u8 gEasyChatGroupName_TrendySaying[];
extern const u8 gEasyChatGroupName_Pokemon2[];
-extern const u8 gUnknown_862B810[];
-extern const u8 gUnknown_862B832[];
-extern const u8 gUnknown_862B84B[];
-extern const u8 gUnknown_862B86C[];
-extern const u8 gUnknown_0862B88D[];
-extern const u8 gUnknown_0862B8AE[];
-extern const u8 gUnknown_0862B8CF[];
-extern const u8 gUnknown_0862B8F0[];
-extern const u8 gUnknown_0862B911[];
-extern const u8 gUnknown_0862B932[];
-extern const u8 gUnknown_0862B953[];
-extern const u8 gUnknown_0862B974[];
-extern const u8 gUnknown_0862B995[];
-extern const u8 gUnknown_0862B9AE[];
-extern const u8 gUnknown_0862B9C7[];
-extern const u8 gUnknown_0862B9E0[];
-extern const u8 gUnknown_0862B9F9[];
-extern const u8 gUnknown_0862B9FF[];
-extern const u8 gUnknown_0862BA05[];
-extern const u8 gUnknown_0862BA0B[];
-extern const u8 gUnknown_0862BA11[];
-extern const u8 gUnknown_0862BA17[];
-extern const u8 gUnknown_0862BA1D[];
-extern const u8 gUnknown_0862BA23[];
-extern const u8 gUnknown_0862BA29[];
-extern const u8 gUnknown_0862BA2F[];
-extern const u8 gUnknown_0862BA35[];
-extern const u8 gUnknown_0862BA3B[];
-extern const u8 gUnknown_0862BA41[];
-extern const u8 gUnknown_0862BA47[];
-extern const u8 gUnknown_0862BA4D[];
-extern const u8 gUnknown_0862BA53[];
-extern const u8 gUnknown_0862BA59[];
-extern const u8 gUnknown_0862BA5F[];
-extern const u8 gUnknown_0862BA65[];
-extern const u8 gUnknown_0862BA6B[];
-extern const u8 gUnknown_0862BA79[];
-extern const u8 gUnknown_0862BA84[];
-extern const u8 gUnknown_0862BA8F[];
-extern const u8 gUnknown_0862BA9A[];
-extern const u8 gUnknown_0862BAA3[];
-extern const u8 gUnknown_0862BAAE[];
-extern const u8 gUnknown_0862BAB9[];
-extern const u8 gUnknown_0862BAC4[];
-extern const u8 gUnknown_0862BACF[];
-extern const u8 gUnknown_0862BADA[];
+// Text Input Strings
+extern const u8 gText_EasyChatKeyboard_ABCDEFothers[];
+extern const u8 gText_EasyChatKeyboard_GHIJKL[];
+extern const u8 gText_EasyChatKeyboard_MNOPQRS[];
+extern const u8 gText_EasyChatKeyboard_TUVWXYZ[];
+extern const u8 gText_NamingScreenKeyboard_abcdef[];
+extern const u8 gText_NamingScreenKeyboard_ghijkl[];
+extern const u8 gText_NamingScreenKeyboard_mnopqrs[];
+extern const u8 gText_NamingScreenKeyboard_tuvwxyz[];
+extern const u8 gText_NamingScreenKeyboard_ABCDEF[];
+extern const u8 gText_NamingScreenKeyboard_GHIJKL[];
+extern const u8 gText_NamingScreenKeyboard_MNOPQRS[];
+extern const u8 gText_NamingScreenKeyboard_TUVWXYZ[];
+extern const u8 gText_NamingScreenKeyboard_01234[];
+extern const u8 gText_NamingScreenKeyboard_56789[];
+extern const u8 gText_NamingScreenKeyboard_Symbols1[];
+extern const u8 gText_NamingScreenKeyboard_Symbols2[];
+extern const u8 gText_UnionRoomChatKeyboard_ABCDE[];
+extern const u8 gText_UnionRoomChatKeyboard_FGHIJ[];
+extern const u8 gText_UnionRoomChatKeyboard_KLMNO[];
+extern const u8 gText_UnionRoomChatKeyboard_PQRST[];
+extern const u8 gText_UnionRoomChatKeyboard_UVWXY[];
+extern const u8 gText_UnionRoomChatKeyboard_Z[];
+extern const u8 gText_UnionRoomChatKeyboard_01234Upper[];
+extern const u8 gText_UnionRoomChatKeyboard_56789Upper[];
+extern const u8 gText_UnionRoomChatKeyboard_PunctuationUpper[];
+extern const u8 gText_UnionRoomChatKeyboard_SymbolsUpper[];
+extern const u8 gText_UnionRoomChatKeyboard_abcde[];
+extern const u8 gText_UnionRoomChatKeyboard_fghij[];
+extern const u8 gText_UnionRoomChatKeyboard_klmno[];
+extern const u8 gText_UnionRoomChatKeyboard_pqrst[];
+extern const u8 gText_UnionRoomChatKeyboard_uvwxy[];
+extern const u8 gText_UnionRoomChatKeyboard_z[];
+extern const u8 gText_UnionRoomChatKeyboard_01234Lower[];
+extern const u8 gText_UnionRoomChatKeyboard_56789Lower[];
+extern const u8 gText_UnionRoomChatKeyboard_PunctuationLower[];
+extern const u8 gText_UnionRoomChatKeyboard_SymbolsLower[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji1[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji2[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji3[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji4[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji5[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji6[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji7[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji8[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji9[];
+extern const u8 gText_UnionRoomChatKeyboard_Emoji10[];
// E-Reader
-extern const u8 gUnknown_085EDFD6[];
-extern const u8 gUnknown_085EDFF5[];
-extern const u8 gUnknown_085EE014[];
-extern const u8 gUnknown_085EE035[];
-extern const u8 gUnknown_085EE05C[];
-extern const u8 gUnknown_085EE06B[];
-extern const u8 gUnknown_085EE080[];
-extern const u8 gUnknown_085EE097[];
-extern const u8 gUnknown_085EE0A3[];
-extern const u8 gUnknown_085EE0BF[];
-extern const u8 gUnknown_085EE0DC[];
-extern const u8 gUnknown_085EE0FA[];
-extern const u8 gUnknown_085EE107[];
-extern const u8 gUnknown_085EE120[];
-extern const u8 gUnknown_085EE12D[];
-extern const u8 gUnknown_085EE14B[];
-extern const u8 gUnknown_085EE14F[];
-extern const u8 gUnknown_085EE154[];
+extern const u8 gJPText_ReceiveMysteryGiftWithEReader[];
+extern const u8 gJPText_SelectConnectFromEReaderMenu[];
+extern const u8 gJPText_SelectConnectWithGBA[];
+extern const u8 gJPText_LinkIsIncorrect[];
+extern const u8 gJPText_CardReadingHasBeenHalted[];
+extern const u8 gJPText_Connecting[];
+extern const u8 gJPText_ConnectionErrorCheckLink[];
+extern const u8 gJPText_ConnectionErrorTryAgain[];
+extern const u8 gJPText_AllowEReaderToLoadCard[];
+extern const u8 gJPText_ConnectionComplete[];
+extern const u8 gJPText_NewTrainerHasComeToHoenn[];
+extern const u8 gJPText_PleaseWaitAMoment[];
+extern const u8 gJPText_WriteErrorUnableToSaveData[];
// Berry Powder Menu
extern const u8 gText_Powder[];
@@ -2614,7 +2732,7 @@ extern const u8 gText_Battle[];
extern const u8 gText_Lets[];
extern const u8 gText_Ok[];
extern const u8 gText_Sorry[];
-extern const u8 gText_YayUnkF9F9[];
+extern const u8 gText_YaySmileEmoji[];
extern const u8 gText_ThankYou[];
extern const u8 gText_ByeBye[];
@@ -2744,6 +2862,27 @@ extern const u8 gText_JumpsInARow[];
extern const u8 gText_BestScore2[];
extern const u8 gText_ExcellentsInARow[];
+// Berry crush
+extern const u8 gText_Var1Berry[];
+extern const u8 gText_XDotY[];
+extern const u8 gText_1DotBlueF700[];
+extern const u8 gText_1DotF700[];
+extern const u8 gText_TimeColon[];
+extern const u8 gText_SpaceSec[];
+extern const u8 gText_XDotY2[];
+extern const u8 gText_SpaceMin[];
+extern const u8 gText_StrVar1[];
+extern const u8 gText_PressingSpeed[];
+extern const u8 gText_TimesPerSec[];
+extern const u8 gText_XDotY3[];
+extern const u8 gText_Silkiness[];
+extern const u8 gText_Var1Percent[];
+extern const u8 gText_PressesRankings[];
+extern const u8 gText_CrushingResults[];
+extern const u8 gText_BerryCrush2[];
+extern const u8 gText_PressingSpeedRankings[];
+extern const u8 gText_Var1Players[];
+
// Lilycove Lady
extern const u8 gText_ContestLady_Handsome[];
extern const u8 gText_ContestLady_Vinny[];
@@ -2777,26 +2916,26 @@ extern const u8 gText_Unknown[];
extern const u8 gText_TrainerCloseBy[];
// pokenav_unk_2
-extern const u8 gUnknown_085EBCC5[];
-extern const u8 gUnknown_085EBCE8[];
-extern const u8 gUnknown_085EBD01[];
-extern const u8 gUnknown_085EBD1C[];
-extern const u8 gUnknown_085EBD34[];
-extern const u8 gUnknown_085EBD83[];
-extern const u8 gUnknown_085EBDA2[];
-extern const u8 gUnknown_085EBDBF[];
-extern const u8 gUnknown_085EBDDB[];
-extern const u8 gUnknown_085EBDEE[];
-extern const u8 gUnknown_085EBE06[];
-extern const u8 gUnknown_085EBE19[];
-extern const u8 gUnknown_085EBE2D[];
-extern const u8 gUnknown_085EBE41[];
+extern const u8 gText_CheckMapOfHoenn[];
+extern const u8 gText_CheckPokemonInDetail[];
+extern const u8 gText_CallRegisteredTrainer[];
+extern const u8 gText_CheckObtainedRibbons[];
+extern const u8 gText_PutAwayPokenav[];
+extern const u8 gText_CheckPartyPokemonInDetail[];
+extern const u8 gText_CheckAllPokemonInDetail[];
+extern const u8 gText_ReturnToPokenavMenu[];
+extern const u8 gText_FindCoolPokemon[];
+extern const u8 gText_FindBeautifulPokemon[];
+extern const u8 gText_FindCutePokemon[];
+extern const u8 gText_FindSmartPokemon[];
+extern const u8 gText_FindToughPokemon[];
+extern const u8 gText_ReturnToConditionMenu[];
extern const u8 gText_NoRibbonWinners[];
// pokenav_unk_4
-extern const u8 gUnknown_085EC017[];
-extern const u8 gUnknown_085EC01C[];
-extern const u8 gUnknown_085EC022[];
+extern const u8 gText_Call[];
+extern const u8 gText_Check[];
+extern const u8 gText_Cancel6[];
// pokenav_unk_8
extern const u8 gText_NumberF700[];
diff --git a/include/task.h b/include/task.h
index 4852571b4..d0ca34f7f 100644
--- a/include/task.h
+++ b/include/task.h
@@ -5,6 +5,7 @@
#define TAIL_SENTINEL 0xFF
#define NUM_TASKS 16
+#define NUM_TASK_DATA 16
typedef void (*TaskFunc)(u8 taskId);
@@ -15,7 +16,7 @@ struct Task
u8 prev;
u8 next;
u8 priority;
- s16 data[16];
+ s16 data[NUM_TASK_DATA];
};
extern struct Task gTasks[];
diff --git a/include/text.h b/include/text.h
deleted file mode 100644
index d3ff663bb..000000000
--- a/include/text.h
+++ /dev/null
@@ -1,297 +0,0 @@
-#ifndef GUARD_TEXT_H
-#define GUARD_TEXT_H
-
-#define CHAR_SPACE 0x00
-#define CHAR_PLUS 0x2E
-#define CHAR_0 0xA1
-#define CHAR_1 0xA2
-#define CHAR_2 0xA3
-#define CHAR_3 0xA4
-#define CHAR_4 0xA5
-#define CHAR_5 0xA6
-#define CHAR_6 0xA7
-#define CHAR_7 0xA8
-#define CHAR_8 0xA9
-#define CHAR_9 0xAA
-#define CHAR_EXCL_MARK 0xAB
-#define CHAR_QUESTION_MARK 0xAC
-#define CHAR_PERIOD 0xAD
-#define CHAR_HYPHEN 0xAE
-#define CHAR_ELLIPSIS 0xB0
-#define CHAR_DBL_QUOT_LEFT 0xB1
-#define CHAR_DBL_QUOT_RIGHT 0xB2
-#define CHAR_SGL_QUOT_LEFT 0xB3
-#define CHAR_SGL_QUOT_RIGHT 0xB4
-#define CHAR_MALE 0xB5
-#define CHAR_FEMALE 0xB6
-#define CHAR_CURRENCY 0xB7
-#define CHAR_COMMA 0xB8
-#define CHAR_MULT_SIGN 0xB9
-#define CHAR_SLASH 0xBA
-#define CHAR_A 0xBB
-#define CHAR_B 0xBC
-#define CHAR_C 0xBD
-#define CHAR_D 0xBE
-#define CHAR_E 0xBF
-#define CHAR_F 0xC0
-#define CHAR_G 0xC1
-#define CHAR_H 0xC2
-#define CHAR_I 0xC3
-#define CHAR_J 0xC4
-#define CHAR_K 0xC5
-#define CHAR_L 0xC6
-#define CHAR_M 0xC7
-#define CHAR_N 0xC8
-#define CHAR_O 0xC9
-#define CHAR_P 0xCA
-#define CHAR_Q 0xCB
-#define CHAR_R 0xCC
-#define CHAR_S 0xCD
-#define CHAR_T 0xCE
-#define CHAR_U 0xCF
-#define CHAR_V 0xD0
-#define CHAR_W 0xD1
-#define CHAR_X 0xD2
-#define CHAR_Y 0xD3
-#define CHAR_Z 0xD4
-#define CHAR_a 0xD5
-#define CHAR_b 0xD6
-#define CHAR_c 0xD7
-#define CHAR_d 0xD8
-#define CHAR_e 0xD9
-#define CHAR_f 0xDA
-#define CHAR_g 0xDB
-#define CHAR_h 0xDC
-#define CHAR_i 0xDD
-#define CHAR_j 0xDE
-#define CHAR_k 0xDF
-#define CHAR_l 0xE0
-#define CHAR_m 0xE1
-#define CHAR_n 0xE2
-#define CHAR_o 0xE3
-#define CHAR_p 0xE4
-#define CHAR_q 0xE5
-#define CHAR_r 0xE6
-#define CHAR_s 0xE7
-#define CHAR_t 0xE8
-#define CHAR_u 0xE9
-#define CHAR_v 0xEA
-#define CHAR_w 0xEB
-#define CHAR_x 0xEC
-#define CHAR_y 0xED
-#define CHAR_z 0xEE
-#define CHAR_SPECIAL_F7 0xF7
-#define CHAR_SPECIAL_F8 0xF8
-#define CHAR_SPECIAL_F9 0xF9
-#define CHAR_COLON 0xF0
-#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
-#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
-#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
-#define PLACEHOLDER_BEGIN 0xFD // string placeholder
-#define CHAR_NEWLINE 0xFE
-#define EOS 0xFF // end of string
-
-#define EXT_CTRL_CODE_COLOR 0x1
-#define EXT_CTRL_CODE_HIGHLIGHT 0x2
-#define EXT_CTRL_CODE_SHADOW 0x3
-//
-#define EXT_CTRL_CODE_UNKNOWN_7 0x7
-//
-#define EXT_CTRL_CODE_CLEAR 0x11
-//
-#define EXT_CTRL_CODE_CLEAR_TO 0x13
-#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14
-#define EXT_CTRL_CODE_JPN 0x15
-#define EXT_CTRL_CODE_ENG 0x16
-
-#define TEXT_COLOR_TRANSPARENT 0x0
-#define TEXT_COLOR_WHITE 0x1
-#define TEXT_COLOR_DARK_GREY 0x2
-// 0x3
-#define TEXT_COLOR_RED 0x4
-// 0x5
-#define TEXT_COLOR_GREEN 0x6
-// 0x7
-#define TEXT_COLOR_BLUE 0x8
-
-// battle placeholders are located in battle_message.h
-
-#define NUM_TEXT_PRINTERS 32
-
-#define TEXT_SPEED_FF 0xFF
-
-enum
-{
- FONTATTR_MAX_LETTER_WIDTH,
- FONTATTR_MAX_LETTER_HEIGHT,
- FONTATTR_LETTER_SPACING,
- FONTATTR_LINE_SPACING,
- FONTATTR_UNKNOWN, // dunno what this is yet
- FONTATTR_COLOR_FOREGROUND,
- FONTATTR_COLOR_BACKGROUND,
- FONTATTR_COLOR_SHADOW
-};
-
-struct TextPrinterSubStruct
-{
- u8 glyphId:4; // 0x14
- bool8 hasPrintBeenSpedUp:1;
- u8 unk:3;
- u8 downArrowDelay:5;
- u8 downArrowYPosIdx:2;
- bool8 hasGlyphIdBeenSet:1;
- u8 autoScrollDelay;
-};
-
-struct TextPrinterTemplate
-{
- const u8* currentChar;
- u8 windowId;
- u8 fontId;
- u8 x;
- u8 y;
- u8 currentX; // 0x8
- u8 currentY;
- u8 letterSpacing;
- u8 lineSpacing;
- u8 unk:4; // 0xC
- u8 fgColor:4;
- u8 bgColor:4;
- u8 shadowColor:4;
-};
-
-struct TextPrinter
-{
- struct TextPrinterTemplate printerTemplate;
-
- void (*callback)(struct TextPrinterTemplate *, u16); // 0x10
-
- union
-#if !MODERN
- __attribute__((packed))
-#endif
- {
- struct TextPrinterSubStruct sub;
- u8 fields[7];
- } subUnion;
-
- u8 active;
- u8 state; // 0x1C
- u8 textSpeed;
- u8 delayCounter;
- u8 scrollDistance;
- u8 minLetterSpacing; // 0x20
- u8 japanese;
-};
-
-struct FontInfo
-{
- u16 (*fontFunction)(struct TextPrinter *x);
- u8 maxLetterWidth;
- u8 maxLetterHeight;
- u8 letterSpacing;
- u8 lineSpacing;
- u8 unk:4;
- u8 fgColor:4;
- u8 bgColor:4;
- u8 shadowColor:4;
-};
-
-extern const struct FontInfo *gFonts;
-
-struct GlyphWidthFunc
-{
- u32 fontId;
- u32 (*func)(u16 glyphId, bool32 isJapanese);
-};
-
-struct KeypadIcon
-{
- u16 tileOffset;
- u8 width;
- u8 height;
-};
-
-typedef struct {
- bool8 canABSpeedUpPrint:1;
- bool8 useAlternateDownArrow:1;
- bool8 autoScroll:1;
- bool8 forceMidTextSpeed:1;
-} TextFlags;
-
-struct Struct_03002F90
-{
- u32 unk0[8];
- u32 unk20[8];
- u32 unk40[8];
- u32 unk60[8];
- u8 unk80;
- u8 unk81;
-};
-
-extern TextFlags gTextFlags;
-
-extern u8 gUnknown_03002F84;
-extern struct Struct_03002F90 gUnknown_03002F90;
-
-void SetFontsPointer(const struct FontInfo *fonts);
-void DeactivateAllTextPrinters(void);
-u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
-bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
-void RunTextPrinters(void);
-bool16 IsTextPrinterActive(u8 id);
-u32 RenderFont(struct TextPrinter *textPrinter);
-void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor);
-void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
-void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
-void DecompressGlyphTile(const void *src_, void *dest_);
-u8 GetLastTextColor(u8 colorType);
-void CopyGlyphToWindow(struct TextPrinter *x);
-void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
-u8 GetMenuCursorDimensionByFont(u8, u8);
-
-u16 Font0Func(struct TextPrinter *textPrinter);
-u16 Font1Func(struct TextPrinter *textPrinter);
-u16 Font2Func(struct TextPrinter *textPrinter);
-u16 Font3Func(struct TextPrinter *textPrinter);
-u16 Font4Func(struct TextPrinter *textPrinter);
-u16 Font5Func(struct TextPrinter *textPrinter);
-u16 Font7Func(struct TextPrinter *textPrinter);
-u16 Font8Func(struct TextPrinter *textPrinter);
-
-void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter);
-void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter);
-void TextPrinterClearDownArrow(struct TextPrinter *textPrinter);
-bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter);
-bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
-bool16 TextPrinterWait(struct TextPrinter *textPrinter);
-void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
-u16 RenderText(struct TextPrinter *textPrinter);
-u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
-u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
-s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
-u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
-u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
-u8 GetKeypadIconTileOffset(u8 keypadIconId);
-u8 GetKeypadIconWidth(u8 keypadIconId);
-u8 GetKeypadIconHeight(u8 keypadIconId);
-void SetDefaultFontsPointer(void);
-u8 GetFontAttribute(u8 fontId, u8 attributeId);
-u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension);
-void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese);
-void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese);
-void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese);
-void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese);
-void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese);
-void DecompressGlyphFont9(u16 glyphId);
-
-// unk_text_util_2.c
-u16 Font6Func(struct TextPrinter *textPrinter);
-u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
-
-#endif // GUARD_TEXT_H
diff --git a/include/trade.h b/include/trade.h
index 0c95e1e81..72a04ed21 100644
--- a/include/trade.h
+++ b/include/trade.h
@@ -2,25 +2,26 @@
#define GUARD_TRADE_H
#include "link_rfu.h"
+#include "constants/trade.h"
// Exported type declarations
// Exported RAM declarations
-extern struct MailStruct gUnknown_020321C0[PARTY_SIZE];
-extern u8 gUnknown_02032298[2];
+extern struct MailStruct gTradeMail[PARTY_SIZE];
+extern u8 gSelectedTradeMonPositions[2];
// Exported ROM declarations
-extern const struct WindowTemplate gUnknown_0833900C;
+extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate;
-s32 sub_807A728(void);
-void sub_80773AC(void);
-void sub_807AE50(void);
-int sub_807A8D0(struct UnkLinkRfuStruct_02022B14Substruct a0, u16, u16, u8);
-int sub_807A7E0(struct UnkLinkRfuStruct_02022B14Substruct a0, struct UnkLinkRfuStruct_02022B14Substruct a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6);
-int sub_807A918(struct Pokemon*, u16);
-void sub_807B140(void);
-void sub_807B154(void);
-void sub_807F19C(void);
-void sub_807F1A8(u8, const u8 *, u8);
+s32 GetGameProgressForLinkTrade(void);
+void CB2_StartCreateTradeMenu(void);
+void CB2_LinkTrade(void);
+int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct a0, u16, u16, u8);
+int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct a0, struct UnkLinkRfuStruct_02022B14Substruct a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6);
+int CanSpinTradeMon(struct Pokemon*, u16);
+void InitTradeSequenceBgGpuRegs(void);
+void LinkTradeDrawWindow(void);
+void InitTradeBg(void);
+void DrawTextOnTradeWindow(u8, const u8 *, u8);
#endif //GUARD_TRADE_H
diff --git a/include/trainer_hill.h b/include/trainer_hill.h
index 31480287a..c07aeb6d7 100644
--- a/include/trainer_hill.h
+++ b/include/trainer_hill.h
@@ -32,15 +32,15 @@ struct TrHillDisplay
struct TrHillFloor
{
- u8 unk0;
- u8 unk1;
+ u8 trainerNum1;
+ u8 trainerNum2;
struct TrainerHillTrainer trainers[2];
struct TrHillDisplay display;
};
struct TrHillTag
{
- u8 unkField_0;
+ u8 numTrainers;
u8 unused1;
u8 numFloors;
u32 checksum;
@@ -57,25 +57,24 @@ u8 GetTrainerHillTrainerFrontSpriteId(u16 trainerId);
void InitTrainerHillBattleStruct(void);
void FreeTrainerHillBattleStruct(void);
void CopyTrainerHillTrainerText(u8 which, u16 trainerId);
-bool8 sub_81D5C18(void);
+bool8 InTrainerHillChallenge(void);
void nullsub_129(void);
void PrintOnTrainerHillRecordsWindow(void);
-void sub_81D5DF8(void);
-bool32 sub_81D5F48(void);
-void sub_81D5FB4(u16 *mapArg);
+void LoadTrainerHillEventObjectTemplates(void);
+bool32 LoadTrainerHillFloorEventObjectScripts(void);
+void GenerateTrainerHillFloorLayout(u16 *mapArg);
bool32 InTrainerHill(void);
u8 GetCurrentTrainerHillMapId(void);
-const struct WarpEvent* sub_81D6120(void);
-const struct WarpEvent* sub_81D6134(u8 warpEventId);
+const struct WarpEvent* SetWarpDestinationTrainerHill4F(void);
+const struct WarpEvent* SetWarpDestinationTrainerHillFinalFloor(u8 warpEventId);
u16 LocalIdToHillTrainerId(u8 localId);
bool8 GetHillTrainerFlag(u8 eventObjectId);
void SetHillTrainerFlag(void);
const u8 *GetTrainerHillTrainerScript(void);
void FillHillTrainerParty(void);
void FillHillTrainersParties(void);
-u32 sub_81D63C4(void);
u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId);
-u8 sub_81D6490(void);
+u8 GetNumFloorsInTrainerHillChallenge(void);
void sub_81D64C0(void);
bool32 sub_81D6534(void);
diff --git a/include/trainer_see.h b/include/trainer_see.h
index a9b92d71b..daf9d0298 100644
--- a/include/trainer_see.h
+++ b/include/trainer_see.h
@@ -9,11 +9,11 @@ struct ApproachingTrainer
u8 taskId;
};
-extern u16 gUnknown_03006080;
-extern u8 gUnknown_03006084[4];
+extern u16 gWhichTrainerToFaceAfterBattle;
+extern u8 gPostBattleMovementScript[4];
extern struct ApproachingTrainer gApproachingTrainers[2];
extern u8 gNoOfApproachingTrainers;
-extern u8 gUnknown_030060AC;
+extern bool8 gTrainerApproachedPlayer;
extern u8 gApproachingTrainerId;
bool8 CheckForTrainersWantingBattle(void);
@@ -25,6 +25,6 @@ u8 FldEff_QuestionMarkIcon(void);
u8 FldEff_HeartIcon(void);
u8 GetCurrentApproachingTrainerEventObjectId(void);
u8 GetChosenApproachingTrainerEventObjectId(u8 arrayId);
-void sub_80B4808(void);
+void PlayerFaceTrainerAfterBattle(void);
#endif // GUARD_TRAINER_SEE_H
diff --git a/include/tv.h b/include/tv.h
index ec7ac1e89..8e9233c2b 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -9,18 +9,18 @@ extern u8 *const gTVStringVarPtrs[3];
void ClearTVShowData(void);
void sub_80EE184(void);
void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u16 betterMove);
-void sub_80EE8C8(u16 winStreak, u8 facility);
+void TryPutFrontierTVShowOnAir(u16 winStreak, u8 facility);
void DoTVShow(void);
void DoTVShowInSearchOfTrainers(void);
-void sub_80EDCE8(void);
-void sub_80EE2CC(void);
-void sub_80EE72C(void);
-void sub_80EED10(void);
-void sub_80EED34(void);
-void sub_80EED60(u16 delta);
-void sub_80F01B8(void);
+void TryPutTreasureInvestigatorsOnAir(void);
+void TryPutLotteryWinnerReportOnAir(void);
+void TryPutTrainerFanClubOnAir(void);
+void IncrementDailyPlantedBerries(void);
+void IncrementDailyPickedBerries(void);
+void IncrementDailyBattlePoints(u16 delta);
+void HideBattleTowerReporter(void);
void ReceiveTvShowsData(void *src, u32 size, u8 masterIdx);
-void sub_80EE4DC(struct Pokemon *pokemon, u8 ribbonMonDataIdx);
+void TryPutSpotTheCutiesOnAir(struct Pokemon *pokemon, u8 ribbonMonDataIdx);
u32 GetPlayerIDAsU32(void);
bool8 GetPriceReduction(u8 newsKind);
void sub_80F14F8(TVShow *shows);
@@ -29,17 +29,17 @@ u8 GetRibbonCount(struct Pokemon *pokemon);
void AlertTVThatPlayerPlayedSlotMachine(u16 nCoinsSpent);
void AlertTVThatPlayerPlayedRoulette(u16 nCoinsSpent);
void AlertTVOfNewCoinTotal(u16 nCoinsPaidOut);
-void sub_80EEA70(void);
+void TryPutSecretBaseSecretsOnAir(void);
void sub_80EDB44(void);
void sub_80EDC60(const u16 *words);
void sub_80EDA80(void);
void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx);
void sub_80F0BB8(void);
void sub_80ED950(bool8 flag);
-void sub_80EEC80(void);
-void sub_80EECA4(void);
-void sub_80EECC8(void);
-void sub_80EECEC(void);
+void IncrementDailySlotsUses(void);
+void IncrementDailyRouletteUses(void);
+void IncrementDailyWildBattles(void);
+void IncrementDailyBerryBlender(void);
void sub_80F1208(TVShow *shows);
void sub_80EE44C(u8 nMonsCaught, u8 nPkblkUsed);
void sub_80F14F8(TVShow *shows);
@@ -56,7 +56,7 @@ void InterviewAfter(void);
void UpdateTVScreensOnMap(int, int);
void TV_PrintIntToStringVar(u8 varIdx, int value);
void SaveRecordedItemPurchasesForTVShow(void);
-bool8 sub_80EE818(void);
+bool8 ShouldAirFrontierTVShow(void);
void sub_80EE8C8(u16 winStreak, u8 facilityAndMode);
void BravoTrainerPokemonProfile_BeforeInterview2(u8 contestStandingPlace);
void ContestLiveUpdates_BeforeInterview_1(u8 a0);
diff --git a/include/union_room.h b/include/union_room.h
index facc63986..54f09cbeb 100644
--- a/include/union_room.h
+++ b/include/union_room.h
@@ -135,7 +135,7 @@ union UnkUnion_Main
struct UnkStruct_URoom *uRoom;
};
-struct TradeUnkStruct
+struct UnionRoomTrade
{
u16 field_0;
u16 type;
@@ -156,8 +156,8 @@ extern u8 gUnknown_02022C2C;
extern union UnkUnion_Main gUnknown_02022C30;
extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38;
-extern u16 gUnknown_02022C3C;
-extern u8 gUnknown_02022C3E;
+extern u16 gUnionRoomOfferedSpecies;
+extern u8 gUnionRoomRequestedMonType;
// Exported ROM declarations
diff --git a/include/union_room_chat.h b/include/union_room_chat.h
index 17e482525..e7ca9d46e 100755
--- a/include/union_room_chat.h
+++ b/include/union_room_chat.h
@@ -1,6 +1,17 @@
#ifndef GUARD_UNION_ROOM_CHAT_H
#define GUARD_UNION_ROOM_CHAT_H
+enum
+{
+ UNION_ROOM_KB_PAGE_UPPER,
+ UNION_ROOM_KB_PAGE_LOWER,
+ UNION_ROOM_KB_PAGE_EMOJI,
+ UNION_ROOM_KB_PAGE_COUNT
+};
+
+#define UNION_ROOM_KB_ROW_COUNT 10
+
+
void sub_801DD98(void);
void copy_strings_to_sav1(void);
diff --git a/include/window.h b/include/window.h
deleted file mode 100644
index 10e447789..000000000
--- a/include/window.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef GUARD_WINDOW_H
-#define GUARD_WINDOW_H
-
-#define PIXEL_FILL(num) ((num) | ((num) << 4))
-
-enum
-{
- WINDOW_BG,
- WINDOW_TILEMAP_LEFT,
- WINDOW_TILEMAP_TOP,
- WINDOW_WIDTH,
- WINDOW_HEIGHT,
- WINDOW_PALETTE_NUM,
- WINDOW_BASE_BLOCK,
- WINDOW_TILE_DATA
-};
-
-struct WindowTemplate
-{
- u8 bg;
- u8 tilemapLeft;
- u8 tilemapTop;
- u8 width;
- u8 height;
- u8 paletteNum;
- u16 baseBlock;
-};
-
-#define DUMMY_WIN_TEMPLATE \
-{ \
- 0xFF, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
-}
-
-struct Window
-{
- struct WindowTemplate window;
- u8 *tileData;
-};
-
-bool16 InitWindows(const struct WindowTemplate *templates);
-u16 AddWindow(const struct WindowTemplate *template);
-int AddWindowWithoutTileMap(const struct WindowTemplate *template);
-void RemoveWindow(u8 windowId);
-void FreeAllWindowBuffers(void);
-void CopyWindowToVram(u8 windowId, u8 mode);
-void CopyWindowRectToVram(u32 windowId, u32 mode, u32 x, u32 y, u32 w, u32 h);
-void PutWindowTilemap(u8 windowId);
-void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 palette);
-void ClearWindowTilemap(u8 windowId);
-void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height);
-void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height);
-void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
-void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
-void CopyToWindowPixelBuffer(u8 windowId, const void *src, u16 size, u16 tileOffset);
-void FillWindowPixelBuffer(u8 windowId, u8 fillValue);
-void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue);
-void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8));
-bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value);
-u32 GetWindowAttribute(u8 windowId, u8 attributeId);
-u16 AddWindow8Bit(const struct WindowTemplate *template);
-void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue);
-void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
-void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum);
-void CopyWindowToVram8Bit(u8 windowId, u8 mode);
-
-extern struct Window gWindows[];
-extern void* gUnknown_03002F70[];
-extern u32 filler_03002F58;
-extern u32 filler_03002F5C;
-extern u32 filler_03002F64;
-
-#endif // GUARD_WINDOW_H