summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm.inc.h101
-rw-r--r--include/battle.h7
-rw-r--r--include/battle_ai.h31
-rw-r--r--include/battle_anim.h58
-rw-r--r--include/battle_party_menu.h15
-rw-r--r--include/battle_setup.h152
-rw-r--r--include/bike.h56
-rw-r--r--include/braille_puzzles.h14
-rw-r--r--include/clock.h8
-rw-r--r--include/contest.h26
-rw-r--r--include/contest_painting.h77
-rw-r--r--include/dewford_trend.h10
-rw-r--r--include/field_control_avatar.h13
-rw-r--r--include/field_door.h25
-rw-r--r--include/field_map_obj_helpers.h11
-rw-r--r--include/field_player_avatar.h2
-rw-r--r--include/fieldmap.h6
-rw-r--r--include/gba/flash_internal.h7
-rw-r--r--include/global.fieldmap.h25
-rw-r--r--include/global.h31
-rw-r--r--include/intro.h1
-rw-r--r--include/matsuda_debug_menu.h11
-rw-r--r--include/metatile_behavior.h4
-rw-r--r--include/metatile_behaviors.h2
-rw-r--r--include/name_string_util.h7
-rw-r--r--include/naming_screen.h83
-rw-r--r--include/rom4.h2
-rw-r--r--include/rom6.h7
-rw-r--r--include/save.h69
-rw-r--r--include/script_menu.h31
-rw-r--r--include/script_pokemon_80C4.h22
-rw-r--r--include/script_pokemon_80F9.h17
-rw-r--r--include/strings.h905
-rw-r--r--include/trainer_see.h2
-rw-r--r--include/vars.h2
35 files changed, 1651 insertions, 189 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h
index 8189914fa..9ee10aa58 100644
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -38,14 +38,6 @@ void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u16 s
// asm/berry_blender.o
void sub_80516C4(u8, u16);
-// src/field_door.o
-void FieldSetDoorOpened(u32, u32);
-void FieldSetDoorClosed(u32, u32);
-s8 FieldAnimateDoorClose(u32, u32);
-s8 FieldAnimateDoorOpen(u32, u32);
-bool8 FieldIsDoorAnimationRunning(void);
-u32 sub_8058790(u32 x, u32 y);
-
// asm/field_map_obj.o
void sub_805AA98();
u8 sub_805AB54(void);
@@ -137,32 +129,11 @@ u8 ZCoordToPriority(u8);
void FieldObjectUpdateZCoord(struct MapObject *pObject);
void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8);
-// src/field_map_obj_helpers.o
-bool8 FreezeMapObject(struct MapObject *);
-void FreezeMapObjects(void);
-void FreezeMapObjectsExceptOne(u8);
-void UnfreezeMapObjects(void);
-void sub_806487C(struct Sprite *sprite, bool8 invisible);
-void sub_8064990(u8, u8);
-
-// asm/field_control_avatar.o
-void FieldClearPlayerInput(struct FieldInput *pStruct);
-void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys);
-int sub_8068024(struct FieldInput *pStruct);
-u8 *sub_80682A8(struct MapPosition *, u8, u8);
-void overworld_poison_timer_set(void);
-void prev_quest_postbuffer_cursor_backup_reset(void);
-u8 *sub_8068E24(struct MapPosition *);
-u8 *GetFieldObjectScriptPointerForComparison();
-
// asm/field_tasks.o
void SetUpFieldTasks();
void ActivatePerStepCallback(u8);
void ResetFieldTasksArgs(void);
-// asm/clock.o
-void DoTimeBasedEvents(void);
-
// asm/reset_rtc_screen.o
void CB2_InitResetRtcScreen(void);
@@ -203,10 +174,6 @@ u8 sub_8083664(void);
void sub_8083A84(TaskFunc);
s32 sub_8083BF4(u8 id);
-// src/fldeff_emotion.o
-void sub_8084894(struct Sprite *sprite, u16 a2, u8 a3);
-void objc_exclamation_mark_probably(struct Sprite *sprite);
-
// asm/rom_80859BC.o
u8 CreateTrainerSprite_BirchSpeech(u8, u16, u16, u8, void *);
void LoadTrainerGfx_TrainerCard(u8 gender, int, void *);
@@ -259,11 +226,6 @@ u8 sub_80A7D8C(u8 berry, int i, int i1);
void sub_80A7DD4(void);
u8 sub_80A7E5C(u8);
-// src/matsuda_debug_menu.o
-void sub_80AA280(u8);
-void sub_80AA5E8(u8);
-void sub_80AA658(u8);
-
// asm/contest.o
void sub_80AB1B0(void);
void sub_80AE098(u8);
@@ -279,18 +241,6 @@ void CreatePokemartMenu(void *);
void CreateDecorationShop1Menu(void *);
void CreateDecorationShop2Menu(void *);
-// src/script_menu.o
-bool8 sub_80B5054(u8, u8, u8, u8);
-bool8 sub_80B50B0(u8, u8, u8, u8, u8);
-bool8 Multichoice(u8, u8, u8, u8);
-bool8 yes_no_box(u8, u8);
-bool8 sub_80B5578(u8, u8, u8, u8, u8);
-bool8 sub_80B58C4(u16, u8, u8);
-void *picbox_close(void);
-
-// asm/naming_screen.o
-void DoNamingScreen(u8 r0, u8 *r1, u16 r2, u16 r3, u32 s0, MainCallback s4);
-
// asm/secret_base.o
void sub_80BB5B4(void);
u8 sub_80BBB24(void);
@@ -330,15 +280,6 @@ void sub_80C4940(void);
void sub_80C4980(u8);
u8 sub_80C4B34(u8 *);
-// asm/script_pokemon_util_80C4BF0.o
-u8 sub_80C4D50(void);
-void ShowContestWinner(void);
-void HealPlayerParty();
-u8 ScriptGiveMon(u16, u8, u16, u32, u32, u8);
-u8 ScriptGiveEgg(u16);
-void ScriptWildBattle(u16, u8, u16);
-void ScriptSetMonMoveSlot(u8, u16, u8);
-
// asm/fldeff_80C5CD4.o
void DoFieldPoisonEffect(void);
bool32 FieldPoisonEffectIsRunning(void);
@@ -357,16 +298,6 @@ void sub_80C8E1C(u8);
void sub_80C8EBC(u8);
void sub_80C8F34(u8);
-// asm/bike.o
-void MovePlayerOnBike(u8, u16, u16);
-void sub_80E5B38(u16 i, u16 c);
-u8 IsRunningDisallowed(u8);
-bool8 player_should_look_direction_be_enforced_upon_movement(void);
-void BikeClearState(int i, int i1);
-void sub_80E6010(u8 i);
-s16 GetPlayerSpeed(void);
-void sub_80E6084();
-
// asm/easy_chat.o
void sub_80E6764(void);
void sub_80EB3FC(u8 *, u16);
@@ -385,13 +316,6 @@ bool8 sub_80F9344(void);
void sub_80F9368(void);
void sub_80F9438(void);
-// asm/script_pokemon_util_80F99CC.o
-void sub_80F99CC(void);
-
-// src/dewford_trend.o
-void sub_80FA17C(void);
-void sub_80FA4E4(void *, u32, u8);
-
// asm/region_map.o
void sub_80FBFB4(u8 *str, u8 region, u8);
void CopyMapName();
@@ -400,13 +324,6 @@ u8 *CopyLocationName(u8 *dest, u8 location);
// asm/slot_machine.o
void PlaySlotMachine(u8, void *);
-// asm/contest_painting.o
-void sub_8106630(u32);
-
-// asm/rom6.o
-bool8 npc_before_player_of_type(u8);
-u8 oei_task_add(void);
-
// asm/pokeblock.o
void sub_810C994(void);
void sub_810CA6C(s32);
@@ -464,13 +381,6 @@ void sub_8134AC0(void *);
// src/player_pc.o
void NewGameInitPCItems(void);
-// src/intro.o
-void sub_813CE30(u16, u16, u16, u16);
-
-// asm/braille_puzzles.o
-bool8 ShouldDoBrailleStrengthEffect(void);
-void DoBrailleStrengthEffect(void);
-
// asm/intro_credits_graphics.o
void load_intro_part2_graphics(/*TODO: arg types*/);
void sub_8148C78(/*TODO: arg types*/);
@@ -482,14 +392,3 @@ u8 intro_create_brendan_sprite(/*TODO: arg types*/);
u8 intro_create_may_sprite(/*TODO: arg types*/);
u8 intro_create_latios_sprite(/*TODO: arg types*/);
u8 intro_create_latias_sprite(/*TODO: arg types*/);
-
-// asm/name_string_util.o
-void SanitizeNameString(u8*);
-
-// src/agb_flash.o
-u16 ReadFlashId(void);
-u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void));
-void ReadFlash(u16 sectorNum, u32 offset, u8 *dest, u32 size);
-u32 ProgramFlashSectorAndVerify();
-u32 ProgramFlashSectorAndVerifyNBytes(u16 sectorNum, u8 *src, u32 n);
-u16 IdentifyFlash(void);
diff --git a/include/battle.h b/include/battle.h
index daaa78cd3..4b9144721 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -107,9 +107,12 @@ struct SmallItemStruct
struct BattleStruct /* 0x2000000 */
{
- u8 filler0[0x1601C];
+ u8 filler0[0x15DDE];
+ /*0x15DDE*/ u8 unk15DDE;
+ /*0x15DDF*/ u8 unk15DDF;
+ /*0x15DE0*/ u8 filler15DE0[0x23C]; // 0xAF off?
struct SmallBattleStruct1 unk;
- u8 filler1[0x68]; // 0x2016020
+ u8 filler1[0x68];
/* 0x16089 */ u8 safariFleeRate;
u8 filler1_2[0x42];
/* 0x160CB */ u8 linkPlayerIndex;
diff --git a/include/battle_ai.h b/include/battle_ai.h
new file mode 100644
index 000000000..a5fea3480
--- /dev/null
+++ b/include/battle_ai.h
@@ -0,0 +1,31 @@
+#ifndef GUARD_BATTLEAI_H
+#define GUARD_BATTLEAI_H
+
+#define AIScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24)
+#define AIScriptRead16(ptr) ((ptr)[0] | (ptr)[1] << 8)
+#define AIScriptRead8(ptr) ((ptr)[0])
+#define AIScriptReadPtr(ptr) (u8*) AIScriptRead32(ptr)
+
+enum
+{
+ TARGET,
+ USER
+};
+
+// AI states
+enum
+{
+ AIState_SettingUp,
+ AIState_Processing,
+ AIState_FinishedProcessing,
+ AIState_DoNotProcess
+};
+
+// battle_ai
+void BattleAI_SetupAIData(void);
+void BattleAI_DoAIProcessing(void);
+void sub_810745C(void);
+void AIStackPushVar(u8 *);
+u8 AIStackPop(void);
+
+#endif
diff --git a/include/battle_anim.h b/include/battle_anim.h
new file mode 100644
index 000000000..eb98ebf09
--- /dev/null
+++ b/include/battle_anim.h
@@ -0,0 +1,58 @@
+#ifndef GUARD_BATTLEANIM_H
+#define GUARD_BATTLEANIM_H
+
+#define SCRIPT_READ_8(ptr) ((ptr)[0])
+#define SCRIPT_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
+#define SCRIPT_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
+
+#define REG_BGnCNT_BITFIELD(n) (*(struct BGCntrlBitfield *)REG_ADDR_BG##n##CNT)
+#define REG_BG1CNT_BITFIELD REG_BGnCNT_BITFIELD(1)
+#define REG_BG2CNT_BITFIELD REG_BGnCNT_BITFIELD(2)
+
+#define EWRAM_14800 ((u16 *)(unk_2000000 + 0x14800))
+#define EWRAM_17800 ((struct UnknownStruct1 *)(unk_2000000 + 0x17800))
+#define EWRAM_17810 ((struct UnknownStruct3 *)(unk_2000000 + 0x17810))
+#define EWRAM_18000 ((u16 *)(unk_2000000 + 0x18000))
+#define EWRAM_19348 (*(u16 *)(unk_2000000 + 0x19348))
+
+struct BGCntrlBitfield
+{
+ 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;
+};
+
+struct BattleAnimBackground
+{
+ void *image;
+ void *palette;
+ void *tilemap;
+};
+
+struct UnknownStruct1
+{
+ u8 unk0;
+};
+
+struct UnknownStruct2
+{
+ void *unk0;
+ u16 *unk4;
+ u8 unk8;
+};
+
+struct UnknownStruct3
+{
+ u8 unk0;
+ u8 filler1[0xB];
+};
+
+void move_something(const u8 *const moveAnims[], u16 b, u8 c);
+bool8 b_side_obj__get_some_boolean(u8 a);
+void sub_8076034(u8, u8);
+bool8 sub_8076BE0(void);
+
+#endif
diff --git a/include/battle_party_menu.h b/include/battle_party_menu.h
index c808cdcd7..d0ae8da35 100644
--- a/include/battle_party_menu.h
+++ b/include/battle_party_menu.h
@@ -13,8 +13,23 @@ struct UnknownStruct1
s16 unk266;
};
+struct PartyMenuItem
+{
+ const u8 *text;
+ TaskFunc func;
+};
+
+struct PartyPopupMenu
+{
+ u8 unk0;
+ u8 unk1;
+ const u8 *unk4;
+};
+
extern u8 unk_2000000[];
+void SetUpBattlePokemonMenu(u8);
+
#define EWRAM_1609D unk_2000000[0x1609D]
#define EWRAM_1B000 (*(struct UnknownStruct1 *)(unk_2000000 + 0x1B000))
diff --git a/include/battle_setup.h b/include/battle_setup.h
index 2a1a2e717..e88aefe6d 100644
--- a/include/battle_setup.h
+++ b/include/battle_setup.h
@@ -1,84 +1,136 @@
#ifndef GUARD_BATTLE_SETUP_H
#define GUARD_BATTLE_SETUP_H
-// task01_battle_start
-// task_add_01_battle_start
+#define NUM_TRAINER_EYE_TRAINERS 56
+#define TRAINER_REMATCH_STEPS 255
+
+// IV + LEVEL + SPECIES
+struct TrainerPartyMember0
+{
+ u16 iv;
+ u8 level;
+ u16 species;
+};
+
+// IV + LEVEL + SPECIES + MOVES
+struct TrainerPartyMember1
+{
+ u16 iv;
+ u8 level;
+ u16 species;
+ u16 moves[4];
+};
+
+// IV + LEVEL + SPECIES + ITEMS
+struct TrainerPartyMember2
+{
+ u16 iv;
+ u8 level;
+ u16 species;
+ u16 heldItem;
+};
+
+// IV + LEVEL + SPECIES + ITEMS + MOVES
+struct TrainerPartyMember3
+{
+ u16 iv;
+ u8 level;
+ u16 species;
+ u16 heldItem;
+ u16 moves[4];
+};
+
+struct TrainerBattleSpec
+{
+ void *ptr;
+ u8 ptrType;
+};
+
+struct TrainerEyeTrainer
+{
+ u16 trainerNums[5];
+ u16 mapGroup;
+ u16 mapNum;
+};
+
+//void task01_battle_start(u8 taskId);
+//void task_add_01_battle_start(u8 transition, u16 song);
void CheckForSafariZoneAndProceed(void);
void StartBattle_StandardWild(void);
void StartBattle_Roamer(void);
void StartBattle_Safari(void);
-// task_add_01_battle_start_with_music_and_stats
-// StartBattle_WallyTutorial
+//void task_add_01_battle_start_with_music_and_stats(void);
+//void StartBattle_WallyTutorial(void);
void StartBattle_ScriptedWild(void);
-// StartBattle_SouthernIsland
-// StartBattle_Rayquaza
-// StartBattle_GroudonKyogre
-// StartBattle_Regi
+//void StartBattle_SouthernIsland(void);
+//void StartBattle_Rayquaza(void);
+//void StartBattle_GroudonKyogre(void);
+//void StartBattle_Regi(void);
void HandleWildBattleEnd(void);
void HandleScriptedWildBattleEnd(void);
-// GetBattleTerrain
-// GetBattleTransitionTypeByMap
-// GetSumOfPartyMonLevel
-// GetSumOfEnemyPartyLevel
+s8 GetBattleTerrain(void);
+//s8 GetBattleTransitionTypeByMap(void);
+//u16 GetSumOfPartyMonLevel(u8 numMons);
+//u8 GetSumOfEnemyPartyLevel(u16 trainerNum, u8 numMons);
u8 GetWildBattleTransition(void);
u8 GetTrainerBattleTransition(void);
-// GetBattleTowerBattleTransition
-// ChooseStarter
+u8 GetBattleTowerBattleTransition(void);
+//void ChooseStarter(void);
void CB2_GiveStarter(void);
void CB2_StartFirstBattle(void);
void HandleFirstBattleEnd(void);
-// TrainerBattleLoadArg32
-// TrainerBattleLoadArg16
-// TrainerBattleLoadArg8
-// trainerflag_opponent
+//u32 TrainerBattleLoadArg32(u8 *ptr);
+//u16 TrainerBattleLoadArg16(u8 *ptr);
+//u8 TrainerBattleLoadArg8(u8 *ptr);
+//u16 trainerflag_opponent(void);
bool32 battle_exit_is_player_defeat(u32 a1);
-// sub_80822BC
-// TrainerBattleLoadArgs
-// battle_80801F0
+//void sub_80822BC(void);
+//void TrainerBattleLoadArgs(const struct TrainerBattleSpec *specs, u8 *data);
+//void battle_80801F0(void);
u8 *TrainerBattleConfigure(u8 *data);
void TrainerWantsBattle(u8, u8 *);
bool32 GetTrainerFlagFromScriptPointer(u8 *data);
-// sub_8082524
-// sub_8082558
-// sub_8082564
-// sub_808257C
-// unref_sub_8082590
+//void sub_8082524(void);
+//u8 sub_8082558(void);
+//u8 sub_8082564(void);
+//void sub_808257C(void);
+//void unref_sub_8082590(void); // unused
u8 trainer_flag_check(u16);
void trainer_flag_set(u16);
void trainer_flag_clear(u16);
void sub_80825E4(void);
void sub_808260C(void);
-// do_choose_name_or_words_screen
-// sub_80826B0
-// sub_80826D8
+void do_choose_name_or_words_screen(void);
+//void sub_80826B0(void);
+//void sub_80826D8(void);
u8 *sub_80826E8(void);
u8 *sub_8082700(void);
-// sub_8082718
-// PlayTrainerEncounterMusic
-// SanitizeString
+//void sub_8082718(void);
+//void PlayTrainerEncounterMusic(void);
+//u8 *SanitizeString(u8 *str);
u8 *sub_808281C(void);
-// sub_8082830
-// unref_sub_808286C
+u8 *sub_8082830(void);
+//u8 *unref_sub_808286C(void);
u8 *sub_8082880(void);
-// sub_8082894
-// sub_80828B8
-// sub_80828FC
-// sub_80829A8
-// sub_80829E8
-// sub_8082A18
-// sub_8082A54
-// sub_8082A90
-// sub_8082AE4
-// sub_8082B10
-// sub_8082B44
+//s32 sub_8082894(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//s32 sub_80828B8(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//bool32 sub_80828FC(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum);
+//s32 sub_80829A8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum);
+//s32 sub_80829E8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum);
+//bool8 sub_8082A18(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//bool8 sub_8082A54(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//u16 sub_8082A90(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//void sub_8082AE4(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 trainerNum);
+//bool32 sub_8082B44(void);
void sub_8082B78(void);
-// sub_8082BA4
+//bool32 sub_8082BA4(void);
void sub_8082BD0(u16, u16);
-// sub_8082C0C
-// unref_sub_8082C2C
+s32 sub_8082C0C(u16 mapGroup, u16 mapNum);
+s32 unref_sub_8082C2C(u16 mapGroup, u16 mapNum);
u16 sub_8082C4C(u16 a1);
-// sub_8082C68
-// sub_8082C9C
+//s32 sub_8082C68(void);
+//u8 sub_8082C9C(void);
void sub_8082CB8(void);
#endif // GUARD_BATTLE_SETUP_H
diff --git a/include/bike.h b/include/bike.h
new file mode 100644
index 000000000..decbd1d49
--- /dev/null
+++ b/include/bike.h
@@ -0,0 +1,56 @@
+#ifndef GUARD_BIKE_H
+#define GUARD_BIKE_H
+
+struct UnknownStruct1
+{
+ u32 unk0;
+ u32 unk4;
+ u32 unk8;
+ u32 unkC;
+ const u8 *unk10;
+ const u8 *unk14;
+ u32 unk18;
+};
+
+// Player speeds
+enum
+{
+ SPEED_STANDING,
+ SPEED_NORMAL,
+ SPEED_FAST,
+ SPEED_FASTER,
+ SPEED_FASTEST,
+};
+
+//Acro bike states
+enum
+{
+ ACRO_STATE_NORMAL,
+ ACRO_STATE_TURNING,
+ ACRO_STATE_WHEELIE_STANDING,
+ ACRO_STATE_BUNNY_HOP,
+ ACRO_STATE_WHEELIE_MOVING,
+ ACRO_STATE_5,
+ ACRO_STATE_6,
+};
+
+//Acro bike transitions
+enum
+{
+ ACRO_TRANS_FACE_DIRECTION,
+ ACRO_TRANS_NORMAL_TO_WHEELIE = 3,
+ ACRO_TRANS_WHEELIE_TO_NORMAL,
+};
+
+void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys);
+void sub_80E5B38(u16 a, u16 b);
+bool8 IsRunningDisallowed(u8 tile);
+bool8 IsBikingDisallowedByPlayer(void);
+bool8 player_should_look_direction_be_enforced_upon_movement(void);
+void GetOnOffBike(u8 var);
+void BikeClearState(int var1, int var2);
+void sub_80E6010(u8 var);
+s16 GetPlayerSpeed(void);
+void sub_80E6084(void);
+
+#endif
diff --git a/include/braille_puzzles.h b/include/braille_puzzles.h
new file mode 100644
index 000000000..2b0e2bb96
--- /dev/null
+++ b/include/braille_puzzles.h
@@ -0,0 +1,14 @@
+#ifndef GUARD_BRAILLEPUZZLES_H
+#define GUARD_BRAILLEPUZZLES_H
+
+bool8 ShouldDoBrailleStrengthEffect(void);
+void DoBrailleStrengthEffect(void);
+void UseFlyAncientTomb_Callback(void);
+void UseFlyAncientTomb_Finish(void);
+void Task_BrailleWait(u8 taskId);
+bool32 BrailleWait_CheckButtonPress(void);
+void SealedChamberShakingEffect(u8 taskId);
+bool8 ShouldDoBrailleDigEffect(void);
+void DoBrailleDigEffect(void);
+
+#endif
diff --git a/include/clock.h b/include/clock.h
new file mode 100644
index 000000000..4e6560c91
--- /dev/null
+++ b/include/clock.h
@@ -0,0 +1,8 @@
+#ifndef GUARD_CLOCK_H
+#define GUARD_CLOCK_H
+
+// TODO: time of day and seconds in a day defines
+
+void DoTimeBasedEvents(void);
+
+#endif
diff --git a/include/contest.h b/include/contest.h
new file mode 100644
index 000000000..82520717f
--- /dev/null
+++ b/include/contest.h
@@ -0,0 +1,26 @@
+#ifndef GUARD_CONTEST_H
+#define GUARD_CONTEST_H
+
+struct ContestPokemon
+{
+ /* 0x00 */ u16 species;
+ /* 0x02 */ u8 nickname[POKEMON_NAME_LENGTH];
+ /* 0x0D */ u8 trainerName[8];
+ /* 0x15 */ u8 unk15;
+ /* 0x16 */ u8 unk16;
+ /* 0x17 */ u8 filler17[7];
+ /* 0x1E */ u16 moves[4]; // moves
+ /* 0x26 */ u8 cool; // cool
+ /* 0x27 */ u8 beauty; // beauty
+ /* 0x28 */ u8 cute; // cute
+ /* 0x29 */ u8 smart; // smart
+ /* 0x2A */ u8 tough; // tough
+ /* 0x2B */ u8 sheen; // sheen
+ /* 0x2C */ u8 filler2C[12];
+ /* 0x38 */ u32 unk38;
+ /* 0x3C */ u32 unk3C;
+}; // wow
+
+extern struct ContestPokemon gContestMons[];
+
+#endif // GUARD_CONTEST_H
diff --git a/include/contest_painting.h b/include/contest_painting.h
new file mode 100644
index 000000000..896aa299b
--- /dev/null
+++ b/include/contest_painting.h
@@ -0,0 +1,77 @@
+#ifndef GUARD_CONTESTPAINTING_H
+#define GUARD_CONTESTPAINTING_H
+
+#define MOSAIC_BIT_BG_HSIZE (0)
+#define MOSAIC_BIT_BG_VSIZE (4)
+#define MOSAIC_BIT_OBJ_HSIZE (8)
+#define MOSAIC_BIT_OBJ_VSIZE (12)
+
+enum
+{
+ CONTEST_COOL,
+ CONTEST_BEAUTY,
+ CONTEST_CUTE,
+ CONTEST_SMART,
+ CONTEST_TOUGH,
+};
+
+enum
+{
+ CONTESTRESULT_COOL = 9,
+ CONTESTRESULT_BEAUTY = 13,
+ CONTESTRESULT_CUTE = 2,
+ CONTESTRESULT_SMART = 36,
+ CONTESTRESULT_TOUGH = 6,
+};
+
+struct Unk2015E00
+{
+ u16 unk2015e00[128][32];
+ u16 unk2017e00[0];
+};
+
+struct ContestEntry
+{
+ /*0x00*/ u8 var0;
+ /*0x04*/ u32 var4;
+ /*0x08*/ u16 var8;
+ /*0x0A*/ u8 contestType;
+ /*0x0B*/ u8 pokemon_name[POKEMON_NAME_LENGTH];
+ /*0x15*/ u8 pad15;
+ /*0x16*/ u8 trainer_name[OT_NAME_LENGTH];
+};
+
+struct Unk3000756
+{
+ /*0x00*/ u8 var_0;
+};
+
+struct LabelPair
+{
+ const u8 *prefix;
+ const u8 *suffix;
+};
+
+struct Unk03005E20
+{
+ 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_8106630(u32);
+
+#endif
diff --git a/include/dewford_trend.h b/include/dewford_trend.h
new file mode 100644
index 000000000..713d491b6
--- /dev/null
+++ b/include/dewford_trend.h
@@ -0,0 +1,10 @@
+#ifndef GUARD_DEWFORDTREND_H
+#define GUARD_DEWFORDTREND_H
+
+#define ARRAY_2007800 ((struct EasyChatPair *)(unk_2000000 + 0x7800))
+#define ARRAY_2007900 ((struct EasyChatPair *)(unk_2000000 + 0x7900))
+
+void sub_80FA17C(void);
+void sub_80FA4E4(void *, u32, u8);
+
+#endif
diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h
new file mode 100644
index 000000000..3f17ebee9
--- /dev/null
+++ b/include/field_control_avatar.h
@@ -0,0 +1,13 @@
+#ifndef GUARD_FIELDCONTROLAVATAR_H
+#define GUARD_FIELDCONTROLAVATAR_H
+
+void FieldClearPlayerInput(struct FieldInput *pStruct);
+void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys);
+int sub_8068024(struct FieldInput *pStruct);
+u8 *sub_80682A8(struct MapPosition *, u8, u8);
+void overworld_poison_timer_set(void);
+void prev_quest_postbuffer_cursor_backup_reset(void);
+u8 *sub_8068E24(struct MapPosition *);
+u8 *GetFieldObjectScriptPointerForComparison();
+
+#endif
diff --git a/include/field_door.h b/include/field_door.h
new file mode 100644
index 000000000..1759e0dc1
--- /dev/null
+++ b/include/field_door.h
@@ -0,0 +1,25 @@
+#ifndef GUARD_FIELDDOOR_H
+#define GUARD_FIELDDOOR_H
+
+struct DoorGraphics
+{
+ u16 metatileNum;
+ u8 unk2;
+ void *tiles;
+ void *palette;
+};
+
+struct DoorAnimFrame
+{
+ u8 time;
+ u16 offset;
+};
+
+void FieldSetDoorOpened(u32, u32);
+void FieldSetDoorClosed(u32, u32);
+s8 FieldAnimateDoorClose(u32, u32);
+s8 FieldAnimateDoorOpen(u32, u32);
+bool8 FieldIsDoorAnimationRunning(void);
+u32 sub_8058790(u32 x, u32 y);
+
+#endif
diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h
new file mode 100644
index 000000000..5498bde12
--- /dev/null
+++ b/include/field_map_obj_helpers.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_FIELDMAPOBJHELP_H
+#define GUARD_FIELDMAPOBJHELP_H
+
+bool8 FreezeMapObject(struct MapObject *);
+void FreezeMapObjects(void);
+void FreezeMapObjectsExceptOne(u8);
+void UnfreezeMapObjects(void);
+void sub_806487C(struct Sprite *sprite, bool8 invisible);
+void sub_8064990(u8, u8);
+
+#endif
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index 3efca3af7..a4f77a172 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -78,7 +78,7 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
void SetPlayerAvatarExtraStateTransition(u8 a, u8 b);
void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d);
// sub_8059B88
-// sub_8059BF4
+void sub_8059BF4(void);
// sub_8059C3C
void sub_8059C94(u8);
// sub_8059D08
diff --git a/include/fieldmap.h b/include/fieldmap.h
new file mode 100644
index 000000000..936d27b4a
--- /dev/null
+++ b/include/fieldmap.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_FIELDMAP2_H
+#define GUARD_FIELDMAP2_H
+
+struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection);
+
+#endif
diff --git a/include/gba/flash_internal.h b/include/gba/flash_internal.h
index 6156b6c14..cbcfb5466 100644
--- a/include/gba/flash_internal.h
+++ b/include/gba/flash_internal.h
@@ -65,6 +65,10 @@ u16 ReadFlashId(void);
void StartFlashTimer(u8 phase);
void SetReadFlash1(u16 *dest);
void StopFlashTimer(void);
+u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void));
+u32 ProgramFlashSectorAndVerify(u16 sectorNum, u8 *src);
+void ReadFlash(u16 sectorNum, u32 offset, u8 *dest, u32 size);
+u32 ProgramFlashSectorAndVerifyNBytes(u16 sectorNum, u8 *src, u32 n);
u16 WaitForFlashWrite_Common(u8 phase, u8 *addr, u8 lastData);
@@ -73,4 +77,7 @@ u16 EraseFlashSector_MX(u16 sectorNum);
u16 ProgramFlashByte_MX(u16 sectorNum, u32 offset, u8 data);
u16 ProgramFlashSector_MX(u16 sectorNum, u8 *src);
+// agb_flash_1m
+u16 IdentifyFlash(void);
+
#endif // GUARD_GBA_FLASH_INTERNAL_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 3c6f4cf4e..508d7e4ed 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -107,8 +107,21 @@ struct BgEvent
s16 x, y;
u8 unk4;
u8 kind;
- s16 filler_6;
- u8 *script;
+ // 0x2 padding for the union beginning.
+ 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 *script;
+
+ // hidden item type probably
+ struct {
+ u8 filler6[0x2];
+ u16 hiddenItemId; // flag offset to determine flag lookup
+ } hiddenItem;
+
+ // secret base type
+ u16 secretBaseId;
+
+ } bgUnion;
};
struct MapEvents
@@ -126,10 +139,10 @@ struct MapEvents
struct MapConnection
{
- u8 direction;
- u32 offset;
- u8 mapGroup;
- u8 mapNum;
+ /*0x00*/ u8 direction;
+ /*0x01*/ u32 offset;
+ /*0x05*/ u8 mapGroup;
+ /*0x06*/ u8 mapNum;
};
struct MapConnections
diff --git a/include/global.h b/include/global.h
index 56338a9e8..ad08af84f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -71,6 +71,11 @@ enum
BAG_KEYITEMS
};
+struct TextStruct
+{
+ const u8 *text;
+};
+
struct Coords16
{
s16 x;
@@ -167,7 +172,8 @@ struct RamScript
struct SB1_2EFC_Struct
{
- u8 unknown[0x20];
+ u16 var;
+ u8 unknown[0x1E];
};
struct EasyChatPair
@@ -295,6 +301,25 @@ typedef union OldMan {
struct UnkMauvilleOldManStruct2 oldMan2;
} OldMan;
+struct Unk_SB_Access_Struct1
+{
+ u8 filler0[0xF8];
+ struct SB1_2EFC_Struct sb1_2EFC_struct[5];
+};
+
+struct Unk_SB_Access_Struct2
+{
+ struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20
+ /*0x2F84*/ u8 filler[0x18];
+};
+
+/*0x2E04*/
+typedef union SB_Struct {
+ struct Unk_SB_Access_Struct1 unkSB1;
+ struct Unk_SB_Access_Struct2 unkSB2;
+} SB_Struct;
+// size is 0x198
+
struct SaveBlock1 /* 0x02025734 */
{
/*0x00*/ struct Coords16 pos;
@@ -364,8 +389,8 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2D94*/ OldMan oldMan;
/*0x2DC0*/ u8 unk_2DC0[0x14];
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
- /*0x2DFC*/ u8 filler_2DFC[0x100];
- /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5];
+ /*0x2DFC*/ u8 filler_2DFC[0x8];
+ /*0x2E04*/ SB_Struct sbStruct;
/*0x2F9C*/ u8 filler_2F9C[0xA0];
/*0x303C*/ u8 filler_303C[0x38];
/*0x3074*/ u8 filler_3074[0x42];
diff --git a/include/intro.h b/include/intro.h
index a859a9ce4..7fdbd9cb0 100644
--- a/include/intro.h
+++ b/include/intro.h
@@ -3,5 +3,6 @@
void c2_copyright_1(void);
void CB2_InitCopyrightScreen(void);
+void sub_813CE30(u16, u16, u16, u16);
#endif // GUARD_INTRO_H
diff --git a/include/matsuda_debug_menu.h b/include/matsuda_debug_menu.h
new file mode 100644
index 000000000..5df53d688
--- /dev/null
+++ b/include/matsuda_debug_menu.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_MATSUDADEBUG_H
+#define GUARD_MATSUDADEBUG_H
+
+#define BIT(n) (1 << (n))
+
+void sub_80AB184(void);
+void sub_80AA280(u8);
+void sub_80AA5E8(u8);
+void sub_80AA658(u8);
+
+#endif
diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h
index 2960a1b6f..f4250f07b 100644
--- a/include/metatile_behavior.h
+++ b/include/metatile_behavior.h
@@ -72,7 +72,7 @@ bool8 MetatileBehavior_IsPuddle(u8);
bool8 MetatileBehavior_IsTallGrass(u8);
bool8 MetatileBehavior_IsLongGrass(u8);
bool8 MetatileBehavior_IsBerryTreeSoil(u8);
-bool8 MetatileBehavior_IsAsh(u8);
+bool8 MetatileBehavior_IsAshGrass(u8);
bool8 MetatileBehavior_IsUnusedFootprintMetatile(u8);
bool8 MetatileBehavior_IsBridge(u8);
u8 sub_8057450(u8);
@@ -123,7 +123,7 @@ bool8 MetatileBehavior_IsVerticalRail(u8);
bool8 MetatileBehavior_IsHorizontalRail(u8);
bool8 MetatileBehavior_IsSeaweed(u8);
bool8 MetatileBehavior_IsRunningDisallowed(u8);
-bool8 sub_80578F8(u8);
+bool8 MetatileBehavior_IsCuttableGrass(u8);
bool8 sub_805791C(u8);
bool8 MetatileBehavior_IsPictureBookShelf(u8);
bool8 MetatileBehavior_IsBookShelf(u8);
diff --git a/include/metatile_behaviors.h b/include/metatile_behaviors.h
index ea705054e..1241fbb81 100644
--- a/include/metatile_behaviors.h
+++ b/include/metatile_behaviors.h
@@ -32,7 +32,7 @@
#define MB_ICE 0x20
#define MB_SAND 0x21
#define MB_SEAWEED 0x22
-#define MB_ASH 0x24
+#define MB_ASHGRASS 0x24
#define MB_25 0x25
#define MB_THIN_ICE 0x26
#define MB_CRACKED_ICE 0x27
diff --git a/include/name_string_util.h b/include/name_string_util.h
new file mode 100644
index 000000000..110f8cc22
--- /dev/null
+++ b/include/name_string_util.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_NAMESTRINGUTIL_H
+#define GUARD_NAMESTRINGUTIL_H
+
+void PadNameString(u8 *a1, u8 a2);
+void SanitizeNameString(u8 *a1);
+
+#endif
diff --git a/include/naming_screen.h b/include/naming_screen.h
new file mode 100644
index 000000000..b6b464538
--- /dev/null
+++ b/include/naming_screen.h
@@ -0,0 +1,83 @@
+#ifndef GUARD_NAMINGSCREEN_H
+#define GUARD_NAMINGSCREEN_H
+
+#define KBEVENT_NONE 0
+#define KBEVENT_PRESSED_A 5
+#define KBEVENT_PRESSED_B 6
+#define KBEVENT_PRESSED_SELECT 8
+#define KBEVENT_PRESSED_START 9
+
+enum
+{
+ NAMING_SCREEN_TEMPLATE_PLAYER_NAME,
+ NAMING_SCREEN_TEMPLATE_BOX_NAME,
+ NAMING_SCREEN_TEMPLATE_MON_NAME,
+};
+
+struct NamingScreenTemplate
+{
+ u8 unk0;
+ u8 maxChars;
+ u8 unk2;
+ u8 unk3;
+ u8 unk4; //mode?
+ u8 unk5;
+ u8 unk6;
+ u8 unk7;
+ const u8 *title;
+};
+
+struct NamingScreenData
+{
+ /*0x00*/ u8 state;
+ /*0x01*/ u8 templateNum;
+ /*0x02*/ u16 unk2;
+ /*0x04*/ u16 bg1vOffset;
+ /*0x06*/ u16 bg2vOffset;
+ /*0x08*/ u16 unk8;
+ /*0x0A*/ u16 unkA;
+ /*0x0C*/ u8 unkC;
+ /*0x0D*/ u8 unkD;
+ /*0x0E*/ u8 currentPage;
+ /*0x0F*/ u8 cursorSpriteId;
+ /*0x10*/ u8 unk10;
+ /*0x11*/ u8 textBuffer[0x10];
+ /*0x21*/ u8 filler21[0x13];
+ const struct NamingScreenTemplate *template;
+ /*0x38*/ u8 *destBuffer;
+ /*0x3C*/ u16 unk3C; //savedKeyRepeatStartDelay
+ /*0x3E*/ u16 unk3E;
+ /*0x40*/ u16 unk40;
+ /*0x42*/ u32 unk42;
+ /*0x46*/ MainCallback returnCallback;
+};
+
+enum
+{
+ PAGE_UPPER,
+ PAGE_LOWER,
+ PAGE_OTHERS,
+};
+
+enum
+{
+ MAIN_STATE_BEGIN_FADE_IN,
+ MAIN_STATE_WAIT_FADE_IN,
+ MAIN_STATE_HANDLE_INPUT,
+ MAIN_STATE_MOVE_TO_OK_BUTTON,
+ MAIN_STATE_START_PAGE_SWAP,
+ MAIN_STATE_WAIT_PAGE_SWAP,
+ MAIN_STATE_6,
+ MAIN_STATE_UPDATE_SENT_TO_PC_MESSAGE,
+ MAIN_STATE_BEGIN_FADE_OUT,
+};
+
+enum
+{
+ INPUT_STATE_DISABLED,
+ INPUT_STATE_ENABLED,
+};
+
+void DoNamingScreen(u8 r0, u8 *r1, u16 r2, u16 r3, u32 s0, MainCallback s4);
+
+#endif
diff --git a/include/rom4.h b/include/rom4.h
index bb3486c38..5aae277a6 100644
--- a/include/rom4.h
+++ b/include/rom4.h
@@ -20,7 +20,7 @@ struct LinkPlayerMapObject
// sub_8052F5C
// flag_var_implications_of_teleport_
void new_game(void);
-// sub_8053014
+void sub_8053014(void);
void sub_8053050(void);
// sub_805308C
void ResetGameStats(void);
diff --git a/include/rom6.h b/include/rom6.h
new file mode 100644
index 000000000..e7a3ba48e
--- /dev/null
+++ b/include/rom6.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_ROM6_H
+#define GUARD_ROM6_H
+
+bool8 npc_before_player_of_type(u8);
+u8 oei_task_add(void);
+
+#endif
diff --git a/include/save.h b/include/save.h
index fe22e4ad7..b9d4121ec 100644
--- a/include/save.h
+++ b/include/save.h
@@ -12,38 +12,63 @@ struct SaveSection
u8 data[0xFF4];
u16 id;
u16 checksum;
- u32 unknown;
+ u32 security;
u32 counter;
-};
+}; // size is 0x1000
+// headless save section?
struct UnkSaveSection
{
u8 data[0xFF4];
- u32 unknown;
+ u32 security;
+}; // size is 0xFF8
+
+// Ruby/Sapphire's save data is Flash 128K, which is 32 save sectors.
+#define NUM_SECTORS 32 // defined in agb_flash but not in a header
+
+#define UNKNOWN_CHECK_VALUE 0x8012025
+
+// SetDamagedSectorBits states
+enum
+{
+ ENABLE,
+ DISABLE,
+ CHECK // unused
+};
+
+// Do save types
+enum
+{
+ NORMAL_SAVE,
+ LINK_SAVE,
+ EREADER_SAVE, // mossdeep event
+ HOF_SAVE,
+ DIFFERENT_FILE_SAVE,
+ HOF_DELETE_SAVE // unused
};
void ClearSaveData(void);
-void sub_81251B8(void);
-bool32 sub_81251D4(u8 op, u8 bit);
-u8 save_write_to_flash(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_81252D8(u16, struct SaveSectionLocation *);
-u8 sub_81253C8(u8 sector, u8 *data, u16 size);
-u8 sub_8125440(u8, u8 *);
-u32 sub_812546C(struct SaveSectionLocation *a1);
-u32 sub_81254C8(struct SaveSectionLocation *a1);
-u8 sub_812550C(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_812556C(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_81255B8(u16, struct SaveSectionLocation *);
-u8 sub_8125758(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_81257F0(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_812587C(u16 a1, struct SaveSectionLocation *a2);
-u8 sub_81258BC(u16, struct SaveSectionLocation *);
-u8 sub_8125974(struct SaveSectionLocation *);
+void ResetSaveCounters(void);
+bool32 ManipulateSectorBits(u8 op, u8 bit);
+u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *a2);
+u8 HandleWriteSector(u16, const struct SaveSectionLocation *);
+u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size);
+u8 TryWriteSector(u8, u8 *);
+u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location);
+u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location);
+u8 sub_812550C(u16 a1, const struct SaveSectionLocation *location);
+u8 sub_812556C(u16 a1, const struct SaveSectionLocation *location);
+u8 sub_81255B8(u16, const struct SaveSectionLocation *location);
+u8 sub_8125758(u16 a1, const struct SaveSectionLocation *location);
+u8 sub_81257F0(u16 a1, const struct SaveSectionLocation *location);
+u8 sub_812587C(u16 a1, const struct SaveSectionLocation *location);
+u8 sub_81258BC(u16, const struct SaveSectionLocation *location);
+u8 sub_8125974(const struct SaveSectionLocation *location);
u8 sub_8125B88(u8 a1, u8 *data, u16 size);
u8 sub_8125BF8(u8, struct SaveSection *);
-u16 sub_8125C10(void *, u16);
-u8 sub_8125C3C(u8 a1);
-u8 sub_8125D44(u8 a1);
+u16 CalculateChecksum(void *, u16);
+u8 HandleSavingData(u8 saveType);
+u8 TrySavingData(u8 saveType);
u8 sub_8125D80(void);
bool8 sub_8125DA8(void);
u8 sub_8125DDC(void);
diff --git a/include/script_menu.h b/include/script_menu.h
new file mode 100644
index 000000000..7a504556e
--- /dev/null
+++ b/include/script_menu.h
@@ -0,0 +1,31 @@
+#ifndef GUARD_SCRIPTMENU_H
+#define GUARD_SCRIPTMENU_H
+
+struct MultichoiceListStruct
+{
+ struct MenuAction *list;
+ u8 count;
+};
+
+bool8 sub_80B5054(u8 left, u8 top, u8 var3, u8 var4);
+bool8 sub_80B50B0(u8 left, u8 top, u8 var3, u8 var4, u8 var5);
+u16 GetStringWidthInTilesForScriptMenu(const u8 *str);
+void DrawMultichoiceMenu(u8, u8, u8, struct MenuAction *list, u8, u8);
+void sub_80B5230(u8, u8, u8, u8, u8, u8);
+void sub_80B52B4(u8);
+bool8 Multichoice(u8 var1, u8 var2, u8 var3, u8 var4);
+void sub_80B53B4(u8, u8, u8, struct MenuAction *list, u8);
+bool8 yes_no_box(u8 var1, u8 var2);
+bool8 IsScriptActive(void); // unused
+void task_yes_no_maybe(u8);
+bool8 sub_80B5578(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount);
+void sub_80B5684(u8);
+bool8 TryCreatePCMenu(void);
+void CreatePCMenu(void);
+void sub_80B5838(void);
+void task_picbox(u8 taskId);
+bool8 sub_80B58C4(u16 var1, u8 var2, u8 var3);
+void *picbox_close(void);
+bool8 sub_80B59AC(void);
+
+#endif
diff --git a/include/script_pokemon_80C4.h b/include/script_pokemon_80C4.h
new file mode 100644
index 000000000..6d4e689b5
--- /dev/null
+++ b/include/script_pokemon_80C4.h
@@ -0,0 +1,22 @@
+#ifndef GUARD_SCRIPTPOKE80C4_H
+#define GUARD_SCRIPTPOKE80C4_H
+
+struct MonCoords
+{
+ u8 x, y;
+};
+
+void sub_80C5190(u8);
+void sub_80C5580(void);
+void SetBattleTowerPlayerParty(void);
+void ReducePlayerPartyToThree(void);
+
+u8 sub_80C4D50(void);
+void ShowContestWinner(void);
+void HealPlayerParty();
+u8 ScriptGiveMon(u16, u8, u16, u32, u32, u8);
+u8 ScriptGiveEgg(u16);
+void ScriptWildBattle(u16, u8, u16);
+void ScriptSetMonMoveSlot(u8, u16, u8);
+
+#endif
diff --git a/include/script_pokemon_80F9.h b/include/script_pokemon_80F9.h
new file mode 100644
index 000000000..d65c99c15
--- /dev/null
+++ b/include/script_pokemon_80F9.h
@@ -0,0 +1,17 @@
+#ifndef GUARD_SCRIPTPOKE80F9_H
+#define GUARD_SCRIPTPOKE80F9_H
+
+struct UnknownStruct2018000
+{
+ u8 filler0[0x8];
+ u8 unk8;
+};
+
+extern struct UnknownStruct2018000 unk_2018000;
+
+void sub_80F9A8C(u8);
+void sub_80F9C00(void);
+void sub_80F9E1C(void);
+void sub_80F99CC(void);
+
+#endif
diff --git a/include/strings.h b/include/strings.h
new file mode 100644
index 000000000..89a78e478
--- /dev/null
+++ b/include/strings.h
@@ -0,0 +1,905 @@
+#ifndef GUARD_STRINGS_H
+#define GUARD_STRINGS_H
+
+// placeholder strings
+extern const u8 gExpandedPlaceholder_Empty[];
+extern const u8 gExpandedPlaceholder_Kun[];
+extern const u8 gExpandedPlaceholder_Chan[];
+extern const u8 gExpandedPlaceholder_Sapphire[];
+extern const u8 gExpandedPlaceholder_Ruby[];
+extern const u8 gExpandedPlaceholder_Aqua[];
+extern const u8 gExpandedPlaceholder_Magma[];
+extern const u8 gExpandedPlaceholder_Archie[];
+extern const u8 gExpandedPlaceholder_Maxie[];
+extern const u8 gExpandedPlaceholder_Kyogre[];
+extern const u8 gExpandedPlaceholder_Groudon[];
+extern const u8 gExpandedPlaceholder_Brendan[];
+extern const u8 gExpandedPlaceholder_May[];
+
+// system text
+extern const u8 gSystemText_Egg[];
+extern const u8 gSystemText_Pokemon2[];
+
+// main menu text
+extern const u8 gMainMenuString_NewGame[];
+extern const u8 gMainMenuString_Continue[];
+extern const u8 gMainMenuString_Option[];
+extern const u8 gMainMenuString_MysteryEvents[];
+
+// system text 2
+extern const u8 SystemText_UpdatingSaveExternal[];
+extern const u8 SystemText_SaveUpdated[];
+extern const u8 SystemText_SaveUpdatedExchangeBackup[];
+extern const u8 SystemText_SaveNotUpdated[];
+
+// save file text
+extern const u8 gSaveFileCorruptMessage[];
+extern const u8 gSaveFileDeletedMessage[];
+
+// system text 3
+extern const u8 gBoardNotInstalledMessage[];
+extern const u8 gBatteryDryMessage[];
+
+// main menu text 2
+extern const u8 gMainMenuString_Player[];
+extern const u8 gMainMenuString_Pokedex[];
+extern const u8 gMainMenuString_Time[];
+extern const u8 gMainMenuString_Badges[];
+
+// birch text
+extern const u8 gBirchText_Boy[];
+extern const u8 gBirchText_Girl[];
+extern const u8 gBirchText_NewName[];
+
+extern const u8 gDefaultBoyName1[];
+extern const u8 gDefaultBoyName2[];
+extern const u8 gDefaultBoyName3[];
+extern const u8 gDefaultBoyName4[];
+
+extern const u8 gDefaultGirlName1[];
+extern const u8 gDefaultGirlName2[];
+extern const u8 gDefaultGirlName3[];
+extern const u8 gDefaultGirlName4[];
+
+extern const u8 gSystemText_IntroWeCall[];
+extern const u8 gSystemText_NewPara[];
+
+extern const u8 gDexText_UnknownPoke[];
+extern const u8 gDexText_UnknownHeight[];
+extern const u8 gDexText_UnknownWeight[];
+extern const u8 gDexText_CryOf[];
+extern const u8 gDexText_SizeComparedTo[];
+extern const u8 gDexText_RegisterComplete[];
+extern const u8 gDexText_Searching[];
+extern const u8 gDexText_SearchComplete[];
+extern const u8 gDexText_NoMatching[];
+
+extern const u8 DexText_SearchForPoke[];
+extern const u8 DexText_SwitchDex[];
+extern const u8 DexText_ReturnToDex[];
+extern const u8 DexText_SelectDexMode[];
+extern const u8 DexText_SelectDexList[];
+extern const u8 DexText_ListByABC[];
+extern const u8 DexText_ListByColor[];
+extern const u8 DexText_ListByType[];
+extern const u8 DexText_ExecuteSearchSwitch[];
+extern const u8 DexText_HoennDex[];
+extern const u8 DexText_NationalDex[];
+extern const u8 DexText_NumericalMode[];
+extern const u8 DexText_ABCMode[];
+extern const u8 DexText_HeaviestMode[];
+extern const u8 DexText_LightestMode[];
+extern const u8 DexText_TallestMode[];
+extern const u8 DexText_SmallestMode[];
+extern const u8 DexText_ABC[];
+extern const u8 DexText_DEF[];
+extern const u8 DexText_GHI[];
+extern const u8 DexText_JKL[];
+extern const u8 DexText_MNO[];
+extern const u8 DexText_PQR[];
+extern const u8 DexText_STU[];
+extern const u8 DexText_VWX[];
+extern const u8 DexText_YZ[];
+extern const u8 DexText_Red[];
+extern const u8 DexText_Blue[];
+extern const u8 DexText_Yellow[];
+extern const u8 DexText_Green[];
+extern const u8 DexText_Black[];
+extern const u8 DexText_Brown[];
+extern const u8 DexText_Purple[];
+extern const u8 DexText_Gray[];
+extern const u8 DexText_White[];
+extern const u8 DexText_Pink[];
+extern const u8 DexText_HoennDex2[];
+extern const u8 DexText_NationalDex2[];
+extern const u8 DexText_ListByNumber[];
+extern const u8 DexText_ListByABC2[];
+extern const u8 DexText_ListByHeavyToLightest[];
+extern const u8 DexText_ListByLightToHeaviest[];
+extern const u8 DexText_ListByTallToSmallest[];
+extern const u8 DexText_ListBySmallToTallest[];
+extern const u8 DexText_Terminator5[];
+extern const u8 DexText_DontSpecify[];
+extern const u8 DexText_None[];
+extern const u8 DexText_RightPointingTriangle[];
+extern const u8 DexText_Terminator6[];
+
+extern const u8 gMenuText_WelcomeToHOFAndDexRating[];
+extern const u8 gMenuText_HOFSaving[];
+extern const u8 gMenuText_HOFCorrupt[];
+extern const u8 gMenuText_HOFNumber[];
+extern const u8 gMenuText_HOFCongratulations[];
+
+extern const u8 gOtherText_Number2[];
+extern const u8 gOtherText_Level3[];
+extern const u8 gOtherText_IDNumber[];
+extern const u8 gOtherText_Name[];
+extern const u8 gOtherText_IDNumber2[];
+extern const u8 gOtherText_BirchInTrouble[];
+extern const u8 gOtherText_DoYouChoosePoke[];
+extern const u8 gOtherText_Poke[];
+
+extern const u8 gSystemText_SaveErrorExchangeBackup[];
+extern const u8 gOtherText_FlyToWhere[];
+
+extern const u8 OtherText_Use[];
+extern const u8 OtherText_Toss[];
+extern const u8 OtherText_Register[];
+extern const u8 OtherText_Give2[];
+extern const u8 OtherText_CheckTag[];
+extern const u8 OtherText_Confirm[];
+extern const u8 gOtherText_Walk[];
+
+extern const u8 gUnknownText_Exit[];
+extern const u8 gOtherText_CancelNoTerminator[];
+extern const u8 gOtherText_CancelWithTerminator[];
+
+extern const u8 OtherText_Item[];
+extern const u8 OtherText_Mail[];
+extern const u8 OtherText_Take2[];
+extern const u8 OtherText_Store[];
+
+extern const u8 gOtherText_Check[];
+extern const u8 gOtherText_None[];
+
+extern const u8 gOtherText_ThreeQuestions2[];
+
+extern const u8 gOtherText_FiveQuestionsAndSlash[];
+
+extern const u8 gOtherText_OneDash[];
+extern const u8 gOtherText_TwoDashes[];
+extern const u8 gOtherText_ThreeDashes2[];
+extern const u8 gOtherText_MaleSymbol2[];
+extern const u8 gOtherText_FemaleSymbolAndLv[];
+extern const u8 gOtherText_TallPlusAndRightArrow[];
+extern const u8 gMenuText_GoBackToPrev[];
+extern const u8 gOtherText_WhatWillYouDo[];
+
+extern const u8 gOtherText_xString1[];
+extern const u8 gOtherText_Berry2[];
+extern const u8 gOtherText_Coins2[];
+extern const u8 gOtherText_CloseBag[];
+
+extern const u8 OtherText_TheField3[];
+extern const u8 OtherText_TheBattle[];
+extern const u8 OtherText_ThePokeList[];
+extern const u8 OtherText_TheShop[];
+extern const u8 OtherText_TheField[];
+extern const u8 OtherText_TheField2[];
+extern const u8 OtherText_ThePC[];
+
+extern const struct TextStruct gUnknown_0840E740[];
+
+extern const u8 gOtherText_ReturnTo[];
+extern const u8 gOtherText_WhatWillYouDo2[];
+extern const u8 gOtherText_CantWriteMail[];
+extern const u8 gOtherText_NoPokemon[];
+extern const u8 gOtherText_SwitchWhichItem[];
+extern const u8 gOtherText_CantBeHeld[];
+extern const u8 gOtherText_CantBeHeldHere[];
+extern const u8 gOtherText_HowManyToDeposit[];
+extern const u8 gOtherText_DepositedItems[];
+extern const u8 gOtherText_NoRoomForItems[];
+extern const u8 gOtherText_CantStoreSomeoneItem[];
+extern const u8 gOtherText_TooImportant[];
+extern const u8 gOtherText_HowManyToToss[];
+extern const u8 gOtherText_ThrewAwayItem[];
+extern const u8 gOtherText_OkayToThrowAwayPrompt[];
+extern const u8 gOtherText_DadsAdvice[];
+extern const u8 gOtherText_CantGetOffBike[];
+extern const u8 gOtherText_ItemfinderResponding[];
+extern const u8 gOtherText_ItemfinderItemUnderfoot[];
+extern const u8 gOtherText_NoResponse[];
+extern const u8 gOtherText_Coins3[];
+extern const u8 gOtherText_BootedTM[];
+extern const u8 gOtherText_BootedHM[];
+extern const u8 gOtherText_ContainsMove[];
+extern const u8 gOtherText_UsedItem[];
+extern const u8 gOtherText_RepelLingers[];
+extern const u8 gOtherText_UsedFlute[];
+extern const u8 gOtherText_UsedRepel[];
+extern const u8 gOtherText_BoxIsFull[];
+extern const u8 gOtherText_Size[];
+extern const u8 gOtherText_Firm[];
+
+extern const u8 gContestStatsText_Unknown1[];
+
+extern const u8 ContestStatsText_VerySoft[];
+extern const u8 ContestStatsText_Soft[];
+extern const u8 ContestStatsText_Hard[];
+extern const u8 ContestStatsText_VeryHard[];
+extern const u8 ContestStatsText_SuperHard[];
+
+extern const u8 ContestStatsText_RedPokeBlock[];
+extern const u8 ContestStatsText_BluePokeBlock[];
+extern const u8 ContestStatsText_PinkPokeBlock[];
+extern const u8 ContestStatsText_GreenPokeBlock[];
+extern const u8 ContestStatsText_YellowPokeBlock[];
+extern const u8 ContestStatsText_PurplePokeBlock[];
+extern const u8 ContestStatsText_IndigoPokeBlock[];
+extern const u8 ContestStatsText_BrownPokeBlock[];
+extern const u8 ContestStatsText_LiteBluePokeBlock[];
+extern const u8 ContestStatsText_OlivePokeBlock[];
+extern const u8 ContestStatsText_GrayPokeBlock[];
+extern const u8 ContestStatsText_BlackPokeBlock[];
+extern const u8 ContestStatsText_WhitePokeBlock[];
+extern const u8 ContestStatsText_GoldPokeBlock[];
+
+extern const u8 gContestStatsText_Spicy[];
+extern const u8 gContestStatsText_Dry[];
+extern const u8 gContestStatsText_Sweet[];
+extern const u8 gContestStatsText_Bitter[];
+extern const u8 gContestStatsText_Sour[];
+
+extern const u8 gContestStatsText_StowCase[];
+extern const u8 gContestStatsText_ThrowAwayPrompt[];
+extern const u8 gContestStatsText_WasThrownAway[];
+extern const u8 gContestStatsText_NormallyAte[];
+extern const u8 gContestStatsText_HappilyAte[];
+extern const u8 gContestStatsText_DisdainfullyAte[];
+
+extern const u8 MartText_Buy[];
+extern const u8 MartText_Sell[];
+extern const u8 MartText_Quit2[];
+
+extern const u8 gOtherText_QuitShopping[];
+
+extern const u8 gOtherText_HowManyYouWant[];
+extern const u8 gOtherText_ThatWillBe[];
+extern const u8 gOtherText_ThatWillBe2[];
+extern const u8 gOtherText_ThatWillBe3[];
+extern const u8 gOtherText_HereYouGo[];
+extern const u8 gOtherText_HereYouGo2[];
+extern const u8 gOtherText_HereYouGo3[];
+extern const u8 gOtherText_NotEnoughMoney[];
+extern const u8 gOtherText_NoRoomFor[];
+extern const u8 gOtherText_SpaceForIsFull[];
+extern const u8 gOtherText_AnythingElse[];
+extern const u8 gOtherText_CanIHelpYou[];
+extern const u8 gOtherText_FreePremierBall[];
+extern const u8 gOtherText_CantBuyThat[];
+extern const u8 gOtherText_HowManyToSell[];
+extern const u8 gOtherText_CanPay[];
+extern const u8 gOtherText_SoldItem[];
+
+extern const u8 OtherText_Money[];
+extern const u8 OtherText_Shift[];
+extern const u8 OtherText_SendOut[];
+extern const u8 OtherText_Switch2[];
+extern const u8 OtherText_Summary[];
+extern const u8 OtherText_Moves[];
+extern const u8 OtherText_Enter2[];
+extern const u8 OtherText_NoEntry[];
+extern const u8 OtherText_Take[];
+extern const u8 OtherText_Read2[];
+
+extern const u8 gOtherText_Hp2[];
+extern const u8 gOtherText_SpAtk2[];
+extern const u8 gOtherText_SpDef2[];
+extern const u8 gOtherText_WontHaveAnyEffect[];
+
+extern const u8 gOtherText_CantUseOnPoke[];
+
+extern const u8 gOtherText_CantBeSwitched[];
+extern const u8 gOtherText_AlreadyBattle[];
+extern const u8 gOtherText_AlreadySelected[];
+extern const u8 gOtherText_NoEnergyLeft[];
+extern const u8 gOtherText_CantSwitchPokeWithYours[];
+extern const u8 gOtherText_EGGCantBattle[];
+extern const u8 gOtherText_CantBeUsedBadge[];
+extern const u8 gOtherText_NoMoreThreePoke[];
+extern const u8 gOtherText_SendRemovedMailPrompt[];
+extern const u8 gOtherText_MailWasSent[];
+extern const u8 gOtherText_MailboxIsFull[];
+extern const u8 gOtherText_MailRemovedMessageLost[];
+extern const u8 gOtherText_MailMustBeRemoved[];
+extern const u8 gOtherText_WasGivenToHold[];
+extern const u8 gOtherText_AlreadyHolding[];
+extern const u8 gOtherText_NotHoldingAnything[];
+extern const u8 gOtherText_ReceivedTheThingFrom[];
+extern const u8 gOtherText_MailTaken[];
+extern const u8 gOtherText_TakenAndReplaced[];
+extern const u8 gOtherText_PokeHoldingItemCantMail[];
+extern const u8 gOtherText_MailTransferredMailbox[];
+extern const u8 gOtherText_BagFullCannotRemoveItem[];
+extern const u8 gOtherText_LearnedMove[];
+extern const u8 gOtherText_NotCompatible[];
+extern const u8 gOtherText_WantsToLearn[];
+extern const u8 gOtherText_StopTryingTo[];
+extern const u8 gOtherText_DidNotLearnMove2[];
+extern const u8 gOtherText_WhichMoveToForget2[];
+extern const u8 gOtherText_ForgetMove123_2[];
+extern const u8 gOtherText_AlreadyKnows[];
+extern const u8 gOtherText_HPRestoredBy[];
+extern const u8 gOtherText_CuredPoisoning[];
+extern const u8 gOtherText_CuredParalysis[];
+extern const u8 gOtherText_WokeUp[];
+extern const u8 gOtherText_BurnHealed[];
+extern const u8 gOtherText_ThawedOut[];
+extern const u8 gOtherText_PPRestored[];
+extern const u8 gOtherText_RegainedHealth[];
+extern const u8 gOtherText_BecameHealthy[];
+extern const u8 gOtherText_PPIncreased[];
+extern const u8 gOtherText_ElevatedTo[];
+extern const u8 gOtherText_WasRaised[];
+extern const u8 gOtherText_SnapConfusion[];
+extern const u8 gOtherText_GotOverLove[];
+extern const u8 OtherText_ChoosePoke[];
+extern const u8 OtherText_MovePokeTo[];
+extern const u8 OtherText_TeachWhat[];
+extern const u8 OtherText_UseWhat[];
+extern const u8 OtherText_GiveWhat[];
+extern const u8 OtherText_DoWhat[];
+extern const u8 OtherText_NothingToCut[];
+extern const u8 OtherText_CantSurf[];
+extern const u8 OtherText_AlreadySurfing[];
+extern const u8 OtherText_CantUseThatHere[];
+extern const u8 OtherText_RestoreWhatMove[];
+extern const u8 OtherText_BoostPP[];
+extern const u8 OtherText_DoWhatWithItem[];
+extern const u8 OtherText_NoPokeForBattle[];
+extern const u8 OtherText_ChoosePoke2[];
+extern const u8 OtherText_NotEnoughHP[];
+extern const u8 OtherText_ThreePokeNeeded[];
+extern const u8 OtherText_PokeCantBeSame[];
+extern const u8 OtherText_NoIdenticalHoldItems[];
+extern const u8 OtherText_TeachWhichPoke[];
+extern const u8 gOtherText_Attack[];
+extern const u8 gOtherText_Defense[];
+extern const u8 gOtherText_SpAtk[];
+extern const u8 gOtherText_SpDef[];
+extern const u8 gOtherText_Speed[];
+extern const u8 gOtherText_HP[];
+extern const u8 gOtherText_Terminator18[];
+extern const u8 gOtherText_OriginalTrainer[];
+extern const u8 gOtherText_Type2[];
+extern const u8 gOtherText_Power2[];
+extern const u8 gOtherText_Accuracy2[];
+extern const u8 gOtherText_Appeal2[];
+extern const u8 gOtherText_Jam2[];
+extern const u8 gOtherText_Status[];
+extern const u8 gOtherText_ExpPoints[];
+extern const u8 gOtherText_NextLv[];
+extern const u8 gOtherText_Ribbons00[];
+
+extern const u8 OtherText_Event[];
+extern const u8 OtherText_Switch[];
+extern const u8 OtherText_PokeInfo[];
+extern const u8 OtherText_PokeSkills[];
+extern const u8 OtherText_BattleMoves[];
+extern const u8 OtherText_ContestMoves[];
+extern const u8 OtherText_Info[];
+
+extern const u8 gOtherText_EggLongTime[];
+extern const u8 gOtherText_EggSomeTime[];
+extern const u8 gOtherText_EggSoon[];
+extern const u8 gOtherText_EggAbout[];
+extern const u8 gOtherText_CantForgetHMs[];
+extern const u8 gOtherText_PlayersBase[];
+extern const u8 gOtherText_OkayToDeleteFromRegistry[];
+extern const u8 gOtherText_RegisteredDataDeleted[];
+
+extern const u8 gSecretBaseText_NoRegistry[];
+extern const u8 SecretBaseText_DelRegist[];
+extern const u8 SecretBaseText_Decorate[];
+extern const u8 SecretBaseText_PutAway[];
+extern const u8 SecretBaseText_Toss[];
+extern const u8 SecretBaseText_PutOutDecor[];
+extern const u8 SecretBaseText_StoreChosenDecor[];
+extern const u8 SecretBaseText_ThrowAwayDecor[];
+extern const u8 gSecretBaseText_NoDecors[];
+extern const u8 SecretBaseText_Desk[];
+extern const u8 SecretBaseText_Chair[];
+extern const u8 SecretBaseText_Plant[];
+extern const u8 SecretBaseText_Ornament[];
+extern const u8 SecretBaseText_Mat[];
+extern const u8 SecretBaseText_Poster[];
+extern const u8 SecretBaseText_Doll[];
+extern const u8 SecretBaseText_Cushion[];
+extern const u8 gSecretBaseText_GoldRank[];
+extern const u8 gSecretBaseText_SilverRank[];
+extern const u8 gSecretBaseText_PlaceItHere[];
+extern const u8 gSecretBaseText_CantBePlacedHere[];
+extern const u8 gSecretBaseText_CancelDecorating[];
+extern const u8 gSecretBaseText_InUseAlready[];
+extern const u8 gSecretBaseText_NoMoreDecor[];
+extern const u8 gSecretBaseText_NoMoreDecor2[];
+extern const u8 gSecretBaseText_DecorCantPlace[];
+extern const u8 gSecretBaseText_DecorInUse[];
+extern const u8 gSecretBaseText_WillBeDiscarded[];
+extern const u8 gSecretBaseText_DecorThrownAway[];
+extern const u8 gSecretBaseText_StopPuttingAwayDecor[];
+extern const u8 gSecretBaseText_NoDecor[];
+extern const u8 gSecretBaseText_ReturnDecor[];
+extern const u8 gSecretBaseText_DecorReturned[];
+extern const u8 gSecretBaseText_NoDecorInUse[];
+extern const u8 SecretBaseText_Tristan[];
+extern const u8 SecretBaseText_Philip[];
+extern const u8 SecretBaseText_Dennis[];
+extern const u8 SecretBaseText_Roberto[];
+extern const u8 SecretBaseText_TurnOff[];
+extern const u8 SecretBaseText_Decoration[];
+extern const u8 SecretBaseText_ItemStorage[];
+
+extern const u8 gPCText_Mailbox[];
+extern const u8 PCText_DepositItem[];
+extern const u8 PCText_WithdrawItem[];
+extern const u8 PCText_TossItem[];
+extern const u8 PCText_StoreItems[];
+extern const u8 PCText_TakeOutItems[];
+extern const u8 PCText_ThrowAwayItems[];
+
+extern const u8 gOtherText_NoItems[];
+extern const u8 gOtherText_NoMoreRoom[];
+extern const u8 gOtherText_HowManyToWithdraw[];
+extern const u8 gOtherText_WithdrewThing[];
+extern const u8 OtherText_Read[];
+extern const u8 gOtherText_MoveToBag[];
+extern const u8 OtherText_Give[];
+extern const u8 gOtherText_NoMailHere[];
+extern const u8 gOtherText_WhatWillYouDoMail[];
+extern const u8 gOtherText_MessageWillBeLost[];
+extern const u8 gOtherText_BagIsFull[];
+extern const u8 gOtherText_MailWasReturned[];
+extern const u8 gOtherText_Dad[];
+extern const u8 gOtherText_Mom[];
+extern const u8 gOtherText_Wallace[];
+extern const u8 gOtherText_Steven[];
+extern const u8 gOtherText_Brawly[];
+extern const u8 gOtherText_Winona[];
+extern const u8 gOtherText_Phoebe[];
+extern const u8 gOtherText_Glacia[];
+extern const u8 gContestText_ContestWinner[];
+extern const u8 gOtherText_Unknown1[];
+extern const u8 OtherText_Cool[];
+extern const u8 OtherText_Beauty2[];
+extern const u8 OtherText_Cute[];
+extern const u8 OtherText_Smart[];
+extern const u8 OtherText_Tough[];
+extern const u8 OtherText_NonstopSuperCool[];
+extern const u8 OtherText_Terminator6[];
+extern const u8 OtherText_GoodLookingPoke[];
+extern const u8 OtherText_Terminator7[];
+extern const u8 OtherText_MarvelousGreat[];
+extern const u8 OtherText_Terminator8[];
+extern const u8 OtherText_CenturyLastVenus[];
+extern const u8 OtherText_Terminator9[];
+extern const u8 OtherText_Terminator10[];
+extern const u8 OtherText_DazzlingSmile[];
+extern const u8 OtherText_PokeCenterIdol[];
+extern const u8 OtherText_Terminator11[];
+extern const u8 OtherText_LovelyAndSweet[];
+extern const u8 OtherText_Terminator12[];
+extern const u8 OtherText_ThePretty[];
+extern const u8 OtherText_WinningPortrait[];
+extern const u8 OtherText_GiveUsWink[];
+extern const u8 OtherText_Terminator13[];
+extern const u8 OtherText_SmartnessMaestro[];
+extern const u8 OtherText_Terminator14[];
+extern const u8 OtherText_ChosenPokeAmong[];
+extern const u8 OtherText_Terminator15[];
+extern const u8 OtherText_TheExcellent[];
+extern const u8 OtherText_ItsMomentOfElegance[];
+extern const u8 OtherText_PowerfullyMuscular[];
+extern const u8 OtherText_Terminator16[];
+extern const u8 OtherText_StrongErEst[];
+extern const u8 OtherText_Terminator17[];
+extern const u8 OtherText_MightyTough[];
+extern const u8 OtherText_Exclamation[];
+extern const u8 OtherText_Petalburg[];
+extern const u8 OtherText_Slateport[];
+extern const u8 OtherText_Littleroot[];
+extern const u8 OtherText_Lilycove[];
+extern const u8 OtherText_Dewford[];
+extern const u8 OtherText_Enter[];
+extern const u8 OtherText_Info3[];
+extern const u8 OtherText_WhatsAContest[];
+extern const u8 OtherText_TypesOfContest[];
+extern const u8 OtherText_Ranks[];
+extern const u8 OtherText_Judging[];
+extern const u8 OtherText_CoolContest[];
+extern const u8 OtherText_BeautyContest[];
+extern const u8 OtherText_CuteContest[];
+extern const u8 OtherText_SmartContest[];
+extern const u8 OtherText_ToughContest[];
+extern const u8 OtherText_Decoration[];
+extern const u8 OtherText_PackUp[];
+extern const u8 OtherText_Count[];
+extern const u8 OtherText_Registry[];
+extern const u8 OtherText_Information[];
+extern const u8 OtherText_Mach[];
+extern const u8 OtherText_Acro[];
+extern const u8 OtherText_Poison[];
+extern const u8 OtherText_Paralysis[];
+extern const u8 OtherText_Sleep[];
+extern const u8 OtherText_Burn[];
+extern const u8 OtherText_Frozen[];
+extern const u8 OtherText_Quit[];
+extern const u8 OtherText_SawIt[];
+extern const u8 OtherText_NotYet[];
+extern const u8 OtherText_Yes[];
+extern const u8 OtherText_No[];
+extern const u8 OtherText_Info2[];
+extern const u8 OtherText_SingleBattle[];
+extern const u8 OtherText_DoubleBattle[];
+extern const u8 OtherText_MultiBattle[];
+extern const u8 OtherText_MrBriney[];
+extern const u8 OtherText_MakeAChallenge[];
+extern const u8 OtherText_ObtainInformation[];
+extern const u8 OtherText_Lv50_2[];
+extern const u8 OtherText_Lv100_2[];
+extern const u8 OtherText_Zigzagoon[];
+extern const u8 OtherText_Nincada[];
+extern const u8 OtherText_Poochyena[];
+extern const u8 OtherText_Nincada2[];
+extern const u8 OtherText_Lotad[];
+extern const u8 OtherText_Roselia[];
+extern const u8 OtherText_Shroomish[];
+extern const u8 OtherText_Nincada3[];
+extern const u8 OtherText_Surskit[];
+extern const u8 OtherText_Treecko[];
+extern const u8 OtherText_Torchic[];
+extern const u8 OtherText_Mudkip[];
+extern const u8 OtherText_Seedot[];
+extern const u8 OtherText_Shroomish2[];
+extern const u8 OtherText_Spinda[];
+extern const u8 OtherText_Shroomish3[];
+extern const u8 OtherText_Zigzagoon2[];
+extern const u8 OtherText_Wurmple[];
+extern const u8 OtherText_PokeBall[];
+extern const u8 OtherText_SuperPotion[];
+extern const u8 OtherText_SamePrice[];
+extern const u8 OtherText_Yen135[];
+extern const u8 OtherText_Yen155[];
+extern const u8 OtherText_Yen175[];
+extern const u8 OtherText_CostMore[];
+extern const u8 OtherText_CostLess[];
+extern const u8 OtherText_SamePrice2[];
+extern const u8 OtherText_MaleSymbol[];
+extern const u8 OtherText_FemaleSymbol[];
+extern const u8 OtherText_Neither[];
+extern const u8 OtherText_Males[];
+extern const u8 OtherText_Females[];
+extern const u8 OtherText_SameNumber[];
+extern const u8 OtherText_Male[];
+extern const u8 OtherText_Female[];
+extern const u8 OtherText_ItDepends[];
+extern const u8 OtherText_Six2[];
+extern const u8 OtherText_Eight2[];
+extern const u8 OtherText_Ten[];
+extern const u8 OtherText_One[];
+extern const u8 OtherText_Two[];
+extern const u8 OtherText_Three[];
+extern const u8 OtherText_Six[];
+extern const u8 OtherText_Seven[];
+extern const u8 OtherText_Eight[];
+extern const u8 OtherText_FreshWater[];
+extern const u8 OtherText_SodaPop[];
+extern const u8 OtherText_Lemonade[];
+extern const u8 OtherText_HowToRide[];
+extern const u8 OtherText_HowToTurn[];
+extern const u8 OtherText_SandySlopes[];
+extern const u8 OtherText_Wheelies[];
+extern const u8 OtherText_BunnyHops[];
+extern const u8 OtherText_Jumping[];
+extern const u8 OtherText_Satisfied[];
+extern const u8 OtherText_Dissatisfied[];
+extern const u8 OtherText_Deepseatooth[];
+extern const u8 OtherText_Deepseascale[];
+extern const u8 OtherText_BlueFlute2[];
+extern const u8 OtherText_YellowFlute2[];
+extern const u8 OtherText_RedFlute2[];
+extern const u8 OtherText_WhiteFlute2[];
+extern const u8 OtherText_BlackFlute2[];
+extern const u8 OtherText_GlassChair[];
+extern const u8 OtherText_GlassDesk[];
+extern const u8 OtherText_TreeckoDoll[];
+extern const u8 OtherText_TorchicDoll[];
+extern const u8 OtherText_MudkipDoll[];
+extern const u8 OtherText_50Coins[];
+extern const u8 OtherText_500Coins[];
+extern const u8 OtherText_Excellent[];
+extern const u8 OtherText_NotSoHot[];
+extern const u8 OtherText_RedShard[];
+extern const u8 OtherText_YellowShard[];
+extern const u8 OtherText_BlueShard[];
+extern const u8 OtherText_GreenShard[];
+extern const u8 OtherText_BattleTower[];
+extern const u8 OtherText_Right[];
+extern const u8 OtherText_Left[];
+extern const u8 OtherText_TM32[];
+extern const u8 OtherText_TM29[];
+extern const u8 OtherText_TM35[];
+extern const u8 OtherText_TM24[];
+extern const u8 OtherText_TM13[];
+extern const u8 OtherText_1F_2[];
+extern const u8 OtherText_2F_2[];
+extern const u8 OtherText_3F_2[];
+extern const u8 OtherText_4F_2[];
+extern const u8 OtherText_5F_2[];
+extern const u8 OtherText_Cool2[];
+extern const u8 OtherText_Beauty3[];
+extern const u8 OtherText_Cute2[];
+extern const u8 OtherText_Smart2[];
+extern const u8 OtherText_Tough2[];
+extern const u8 OtherText_Normal[];
+extern const u8 OtherText_Super[];
+extern const u8 OtherText_Hyper[];
+extern const u8 OtherText_Master[];
+extern const u8 OtherText_Cool3[];
+extern const u8 OtherText_Beauty4[];
+extern const u8 OtherText_Cute3[];
+extern const u8 OtherText_Smart3[];
+extern const u8 OtherText_Tough3[];
+extern const u8 OtherText_Items[];
+extern const u8 OtherText_KeyItems[];
+extern const u8 OtherText_Balls[];
+extern const u8 OtherText_TMsHMs[];
+extern const u8 OtherText_Berries[];
+
+extern const u8 gPCText_SomeonesPC[];
+extern const u8 gPCText_LanettesPC[];
+extern const u8 gPCText_PlayersPC[];
+extern const u8 gPCText_HallOfFame[];
+extern const u8 gPCText_LogOff[];
+
+extern const u8 gOtherText_99Times[];
+extern const u8 gOtherText_1Minute[];
+extern const u8 gOtherText_Seconds[];
+extern const u8 gOtherText_Times[];
+extern const u8 gOtherText_BigGuy[];
+extern const u8 gOtherText_BigGirl[];
+extern const u8 gOtherText_Son[];
+extern const u8 gOtherText_Daughter[];
+extern const u8 OtherText_BlueFlute[];
+extern const u8 OtherText_YellowFlute[];
+extern const u8 OtherText_RedFlute[];
+extern const u8 OtherText_WhiteFlute[];
+extern const u8 OtherText_BlackFlute[];
+extern const u8 OtherText_PrettyChair[];
+extern const u8 OtherText_PrettyDesk[];
+extern const u8 OtherText_1F[];
+extern const u8 OtherText_2F[];
+extern const u8 OtherText_3F[];
+extern const u8 OtherText_4F[];
+extern const u8 OtherText_5F[];
+extern const u8 OtherText_6F[];
+extern const u8 OtherText_7F[];
+extern const u8 OtherText_8F[];
+extern const u8 OtherText_9F[];
+extern const u8 OtherText_10F[];
+extern const u8 OtherText_11F[];
+extern const u8 OtherText_B1F[];
+extern const u8 OtherText_B2F[];
+extern const u8 OtherText_B3F[];
+extern const u8 OtherText_B4F[];
+extern const u8 OtherText_Rooftop[];
+
+extern const u8 gOtherText_NowOn[];
+
+extern const u8 gPCText_Cancel[];
+
+extern const u8 PCText_ExitBox[];
+extern const u8 PCText_WhatYouDo[];
+extern const u8 PCText_PickATheme[];
+extern const u8 PCText_PickAWallpaper[];
+extern const u8 PCText_IsSelected[];
+extern const u8 PCText_JumpToWhichBox[];
+extern const u8 PCText_DepositInWhichBox[];
+extern const u8 PCText_WasDeposited[];
+extern const u8 PCText_BoxIsFull[];
+extern const u8 PCText_ReleasePoke[];
+extern const u8 PCText_WasReleased[];
+extern const u8 PCText_ByeBye[];
+extern const u8 PCText_MarkPoke[];
+extern const u8 PCText_LastPoke[];
+extern const u8 PCText_PartyFull[];
+extern const u8 PCText_HoldingPoke[];
+extern const u8 PCText_WhichOneWillTake[];
+extern const u8 PCText_CantReleaseEgg[];
+extern const u8 PCText_ContinueBox[];
+extern const u8 PCText_CameBack[];
+extern const u8 PCText_Worried[];
+extern const u8 PCText_Surprise[];
+extern const u8 PCText_PleaseRemoveMail[];
+extern const u8 PCText_Cancel2[];
+extern const u8 PCText_Deposit[];
+extern const u8 PCText_Withdraw[];
+extern const u8 PCText_Switch[];
+extern const u8 PCText_Move[];
+extern const u8 PCText_Place[];
+extern const u8 PCText_Summary[];
+extern const u8 PCText_Release[];
+extern const u8 PCText_Mark[];
+extern const u8 PCText_Name[];
+extern const u8 PCText_Jump[];
+extern const u8 PCText_Wallpaper[];
+extern const u8 PCText_Scenery1[];
+extern const u8 PCText_Scenery2[];
+extern const u8 PCText_Scenery3[];
+extern const u8 PCText_Etc[];
+extern const u8 PCText_Forest[];
+extern const u8 PCText_City[];
+extern const u8 PCText_Desert[];
+extern const u8 PCText_Savanna[];
+extern const u8 PCText_Crag[];
+extern const u8 PCText_Volcano[];
+extern const u8 PCText_Snow[];
+extern const u8 PCText_Cave[];
+extern const u8 PCText_Beach[];
+extern const u8 PCText_Seafloor[];
+extern const u8 PCText_River[];
+extern const u8 PCText_Sky[];
+extern const u8 PCText_Polka[];
+extern const u8 PCText_PokeCenter[];
+extern const u8 PCText_Machine[];
+extern const u8 PCText_Plain[];
+extern const u8 PCText_WhatDoYouWant[];
+extern const u8 PCText_WithdrawPoke[];
+extern const u8 PCText_DepositPoke[];
+extern const u8 PCText_MovePoke[];
+extern const u8 PCText_SeeYa[];
+extern const u8 PCText_MovePokeToParty[];
+extern const u8 PCText_StorePokeInBox[];
+extern const u8 PCText_OrganizeBoxesParty[];
+extern const u8 PCText_ReturnToPrevMenu[];
+
+extern const u8 gPCText_OnlyOne[];
+extern const u8 gPCText_PartyFull2[];
+extern const u8 gPCText_BOX[];
+
+// pokenav
+extern const u8 PCText_CheckMap[];
+extern const u8 PCText_CheckPoke[];
+extern const u8 PCText_CheckTrainer[];
+extern const u8 PCText_CheckRibbons[];
+extern const u8 PCText_PutAwayNav[];
+extern const u8 PCText_NoRibbonWin[];
+extern const u8 PCText_NoTrainers[];
+extern const u8 PCText_CheckParty[];
+extern const u8 PCText_CheckPokeAll[];
+extern const u8 PCText_ReturnToNav[];
+extern const u8 PCText_FindCool[];
+extern const u8 PCText_FindBeauty[];
+extern const u8 PCText_FindCute[];
+extern const u8 PCText_FindSmart[];
+extern const u8 PCText_FindTough[];
+extern const u8 PCText_ReturnToCondition[];
+
+extern const u8 gOtherText_NumberRegistered[];
+extern const u8 gOtherText_NumberBattles[];
+extern const u8 gOtherText_Strategy[];
+extern const u8 gOtherText_TrainersPokemon[];
+extern const u8 gOtherText_SelfIntroduction[];
+extern const u8 gOtherText_Nature2[];
+extern const u8 gOtherText_InParty[];
+extern const u8 gOtherText_Number[];
+extern const u8 gOtherText_Ribbons[];
+extern const u8 OtherText_MakeProfilePage1[];
+extern const u8 OtherText_MakeProfilePage2[];
+extern const u8 OtherText_MakeMessagePage1[];
+extern const u8 OtherText_MakeMessagePage2[];
+extern const u8 OtherText_DescribeFeelingsPage1[];
+extern const u8 OtherText_DescribeFeelingsPage2[];
+extern const u8 OtherText_WithFourPhrases[];
+extern const u8 OtherText_CombineNinePhrasesPage1[];
+extern const u8 OtherText_CombineNinePhrasesPage2[];
+extern const u8 OtherText_ImproveBardSongPage1[];
+extern const u8 OtherText_ImproveBardSongPage2[];
+extern const u8 OtherText_YourProfile[];
+extern const u8 OtherText_YourFeelingBattle[];
+extern const u8 OtherText_SetWinMessage[];
+extern const u8 OtherText_SetLossMessage[];
+extern const u8 OtherText_TheAnswer[];
+extern const u8 OtherText_MailMessage[];
+extern const u8 OtherText_MailSalutation[];
+extern const u8 OtherText_NewSong[];
+extern const u8 OtherText_CombineTwoPhrasesPage1[];
+extern const u8 OtherText_CombineTwoPhrasesPage2[];
+extern const u8 OtherText_ConfirmTrendyPage1[];
+extern const u8 OtherText_ConfirmTrendyPage2[];
+extern const u8 OtherText_HipsterPage1[];
+extern const u8 OtherText_HipsterPage2[];
+
+extern const u8 gOtherText_TextDeletedConfirmPage1[];
+extern const u8 gOtherText_TextDeletedConfirmPage2[];
+extern const u8 gOtherText_QuitEditing[];
+extern const u8 gOtherText_EditedTextNoSavePage1[];
+extern const u8 gOtherText_EditedTextNoSavePage2[];
+extern const u8 gOtherText_EnterAPhraseOrWord[];
+extern const u8 gOtherText_TextNoDelete[];
+extern const u8 gOtherText_OnlyOnePhrase[];
+extern const u8 gOtherText_OriginalSongRestored[];
+extern const u8 gOtherText_TrendyAlready[];
+extern const u8 gOtherText_CombineTwoPhrases[];
+extern const u8 gOtherText_QuitGivingInfo[];
+extern const u8 gOtherText_StopGivingMail[];
+extern const u8 gOtherText_Profile[];
+extern const u8 gOtherText_AtBattleStart[];
+extern const u8 gOtherText_UponWinningBattle[];
+extern const u8 gOtherText_UponLosingBattle[];
+
+// mauville_old_man?
+extern const u8 gOtherText_TheBardsSong[];
+extern const u8 gOtherText_WhatsHipHappening[];
+extern const u8 gOtherText_Interview[];
+extern const u8 gOtherText_GoodSaying[];
+extern const u8 OtherText_SoPretty[];
+extern const u8 OtherText_SoDarling[];
+extern const u8 OtherText_SoRelaxed[];
+extern const u8 OtherText_SoSunny[];
+extern const u8 OtherText_SoDesirable[];
+extern const u8 OtherText_SoExciting[];
+extern const u8 OtherText_SoAmusing[];
+extern const u8 OtherText_SoMagical[];
+
+extern const u8 gOtherText_Is[];
+extern const u8 gOtherText_DontYouAgree[];
+
+extern const u8 OtherText_WantVacationNicePlace[];
+extern const u8 OtherText_BoughtCrayonsIsNice[];
+extern const u8 OtherText_IfWeCouldFloat[];
+extern const u8 OtherText_SandWashesAwayMakeSad[];
+extern const u8 OtherText_WhatsBottomSeaLike[];
+extern const u8 OtherText_SeeSettingSun[];
+extern const u8 OtherText_LyingInGreenGrass[];
+extern const u8 OtherText_SecretBasesWonderful[];
+
+extern const u8 OtherText_PokeLeague[];
+extern const u8 OtherText_PokeCenter[];
+
+extern const u8 gOtherText_GetsAPokeBlock[];
+
+extern const u8 OtherText_Coolness[];
+extern const u8 OtherText_Beauty[];
+extern const u8 OtherText_Cuteness[];
+extern const u8 OtherText_Smartness[];
+extern const u8 OtherText_Toughness[];
+
+extern const u8 gOtherText_WasEnhanced[];
+extern const u8 gOtherText_NothingChanged[];
+extern const u8 gOtherText_WontEat[];
+
+extern const u8 gSystemText_SaveFailedBackupCheck[];
+extern const u8 gSystemText_BackupDamagedGameContinue[];
+extern const u8 gSystemText_GameplayEnded[];
+extern const u8 gSystemText_CheckCompleteSaveAttempt[];
+extern const u8 gSystemText_SaveCompletedGameEnd[];
+extern const u8 gSystemText_SaveCompletedPressA[];
+
+extern const u8 gOtherText_Ferry[];
+extern const u8 gOtherText_SecretBase[];
+extern const u8 gOtherText_Hideout[];
+
+extern const u8 gSystemText_ResetRTCPrompt[];
+extern const u8 gSystemText_PresentTime[];
+extern const u8 gSystemText_PreviousTime[];
+extern const u8 gSystemText_PleaseResetTime[];
+extern const u8 gSystemText_ClockResetDataSave[];
+extern const u8 gSystemText_SaveCompleted[];
+extern const u8 gSystemText_SaveFailed[];
+extern const u8 gSystemText_NoSaveFileNoTime[];
+extern const u8 gSystemText_ClockAdjustmentUsable[];
+extern const u8 gSystemText_Saving[];
+
+#endif
diff --git a/include/trainer_see.h b/include/trainer_see.h
index e4d1fe270..dd04912e7 100644
--- a/include/trainer_see.h
+++ b/include/trainer_see.h
@@ -30,5 +30,7 @@ void sub_80846E4(u8 taskId);
void sub_8084794(u32 var);
void sub_80847C8(void);
void sub_80847D8(u8);
+void sub_8084894(struct Sprite *sprite, u16 a2, u8 a3);
+void objc_exclamation_mark_probably(struct Sprite *sprite);
#endif // GUARD_TRAINER_SEE_H
diff --git a/include/vars.h b/include/vars.h
index e041e33bb..3fc71dc15 100644
--- a/include/vars.h
+++ b/include/vars.h
@@ -23,4 +23,6 @@
#define VAR_BARBOACH_SIZE_RECORD 0x404F
+#define VAR_PORTHOLE 0x40B4
+
#endif // GUARD_VARS_H