summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-x[-rw-r--r--]include/asm.inc.h26
-rw-r--r--include/battle.h27
-rw-r--r--include/battle_interface.h36
-rw-r--r--include/config.h6
-rw-r--r--include/contest_painting.h8
-rw-r--r--include/data2.h46
-rw-r--r--include/decoration.h19
-rw-r--r--include/easy_chat.h1
-rw-r--r--include/field_camera.h10
-rwxr-xr-xinclude/field_effect_helpers.h11
-rw-r--r--include/field_ground_effect.h11
-rwxr-xr-x[-rw-r--r--]include/field_map_obj.h86
-rw-r--r--include/field_map_obj_helpers.h9
-rwxr-xr-x[-rw-r--r--]include/field_player_avatar.h2
-rw-r--r--include/fieldmap.h4
-rw-r--r--include/flags.h4
-rw-r--r--include/global.fieldmap.h4
-rw-r--r--include/global.h217
-rw-r--r--include/intro.h4
-rw-r--r--include/item.h19
-rw-r--r--include/main.h2
-rw-r--r--include/menu.h12
-rw-r--r--include/pokedex.h2
-rw-r--r--include/pokemon.h1
-rw-r--r--include/record_mixing.h16
-rw-r--r--include/script_pokemon_80C4.h5
-rw-r--r--include/songs.h4
-rw-r--r--include/strings2.h322
-rwxr-xr-x[-rw-r--r--]include/trainer_see.h2
-rw-r--r--include/trig.h2
-rw-r--r--include/tv.h23
-rw-r--r--include/vars.h11
32 files changed, 860 insertions, 92 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h
index 0c111a991..dbd3f0820 100644..100755
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -1,6 +1,14 @@
// src/rom3.o
void sub_800C35C(void);
+struct UnkStruct8060024 {
+ u8 outsideMovementRect:1;
+ u8 tileIsImpassable:1;
+ u8 elevationMismatch:1;
+ u8 pathBlockedByObject:1;
+ u8 pad_04:4;
+};
+
// asm/battle_2.o
void sub_800E7C4(void);
u8 b_first_side(u8, u8, u8);
@@ -31,7 +39,7 @@ void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
// src/daycare.o
-u8 daycare_count_pokemon(u8 *);
+u8 Daycare_CountPokemon(struct BoxPokemon *);
// asm/daycare.o
void sub_8041324(struct BoxPokemon *, void *);
@@ -120,7 +128,8 @@ u8 sub_80608D0(u8);
u8 GetStepInPlaceDelay32AnimId(u8 a);
u8 GetStepInPlaceDelay16AnimId(u8);
u8 GetStepInPlaceDelay8AnimId(u8 a);
-u8 FieldObjectFaceOppositeDirection(void *, u8);
+u8 GetStepInPlaceDelay4AnimId(u8 a);
+u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8);
u8 sub_80609D8(u8);
u8 sub_8060A04(u8);
u8 sub_8060A30(u8);
@@ -158,7 +167,7 @@ bool8 pokemon_has_move(struct Pokemon *, u16);
void sub_806FA18(u8 taskId);
// src/party_menu.o
-void sub_806E834();
+u8 sub_806E834(const u8 *message, u8 arg1);
// src/rom_8077ABC.o
u8 battle_side_get_owner(u8);
@@ -288,12 +297,12 @@ void sub_80BEA50(u16);
void sub_80BEA5C(u16);
bool8 GetPriceReduction(u8);
void sub_80BEE84(u16);
-u8 sub_80BF0B8(u32);
+size_t sub_80BF0B8(int);
void sub_80BF478(void);
u16 sub_80BF674(u16 species);
s8 sub_80BF720(TVShow *);
-u8 sub_80BF77C(u32);
-void sub_80BFD44(void *, u32, u8);
+bool8 sub_80BF77C(u16);
+void sub_80BFD44(u8 *, u32, u8);
void sub_80C0514(void *, u32, u8);
// src/tv.o
@@ -328,7 +337,7 @@ void sub_80C8F34(u8);
// asm/easy_chat.o
void InitEasyChatPhrases(void);
u8* sub_80EB3FC(u8 *, u16);
-u8 ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16);
+u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16);
// asm/pokenav.o
void sub_80EBA5C(void);
@@ -422,6 +431,9 @@ void sub_8134AC0(void *);
// src/player_pc.o
void NewGameInitPCItems(void);
+// asm/hall_of_fame.o
+void sub_8143648(u16 paletteTag, u8 arg1);
+
// src/diploma.o
void sub_8145D88(void);
diff --git a/include/battle.h b/include/battle.h
index f05c7369d..be474b59f 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -124,17 +124,22 @@ struct BattleStruct /* 0x2000000 */
struct UnknownStruct4
{
- u8 filler0[0x3];
- u16 unk4;
- u16 unk6;
- u8 unk8;
- u8 unk9;
- u8 fillerA[0x9];
- u8 taunt:4;
- u8 unkC:4;
- u8 fillerD[0x2];
- u8 unk16;
- u8 filler17[0x4];
+ /*0x00*/ u8 filler0[0x3];
+ /*0x04*/ u16 unk4;
+ /*0x06*/ u16 unk6;
+ /*0x08*/ u8 unk8;
+ /*0x09*/ u8 unk9;
+ /*0x0A*/ u8 unkA;
+ u8 fillerB[4];
+ u8 unkF_0:4;
+ u8 unkF_4:4;
+ u8 filler10[3];
+ /*0x13*/ u8 taunt:4;
+ /*0x13*/ u8 unkC:4;
+ /*0x14*/ u8 unk14;
+ /*0x15*/ u8 unk15;
+ /*0x16*/ u8 unk16;
+ /*0x17*/ u8 filler17[0x4];
};
extern struct UnknownStruct1 unk_2016A00;
diff --git a/include/battle_interface.h b/include/battle_interface.h
new file mode 100644
index 000000000..e85f87a30
--- /dev/null
+++ b/include/battle_interface.h
@@ -0,0 +1,36 @@
+#ifndef GUARD_BATTLE_INTERFACE_H
+#define GUARD_BATTLE_INTERFACE_H
+
+struct BattleInterfaceStruct1
+{
+ s32 unk0;
+ s32 unk4;
+ s32 unk8;
+ u32 unkC_0:5;
+ u32 unk10;
+};
+
+struct BattleInterfaceStruct2
+{
+ u16 unk0;
+ u32 unk4;
+};
+
+u8 battle_make_oam_normal_battle(u8);
+u8 battle_make_oam_safari_battle(void);
+void sub_8043D84(u8, u8, u32, u32, u32);
+void sub_8043DB0(u8);
+void sub_8043DFC(u8);
+void nullsub_11();
+void sub_8043EB4(u8);
+void sub_8043F44(u8);
+void sub_804454C(void);
+u8 sub_8044804(u8, const struct BattleInterfaceStruct2 *, u8, u8);
+void sub_8044CA0(u8);
+void sub_8045A5C(u8, struct Pokemon *, u8);
+s32 sub_8045C78(u8, u8, u8, u8);
+s16 sub_80460C8(struct BattleInterfaceStruct1 *, int *, void *, int);
+u8 GetScaledHPFraction(s16, s16, u8);
+int GetHPBarLevel(s16, s16);
+
+#endif // GUARD_BATTLE_INTERFACE_H
diff --git a/include/config.h b/include/config.h
index 205f53f16..6a77c4c74 100644
--- a/include/config.h
+++ b/include/config.h
@@ -27,6 +27,12 @@
#define BUGFIX_EVO_NAME
#endif
+#ifdef ENGLISH
+#define UNITS_IMPERIAL
+#elif GERMAN
+#define UNITS_METRIC
+#endif
+
// Fixed in Emerald.
// #define BUGFIX_SETMONIVS
diff --git a/include/contest_painting.h b/include/contest_painting.h
index 896aa299b..a67748d02 100644
--- a/include/contest_painting.h
+++ b/include/contest_painting.h
@@ -8,6 +8,14 @@
enum
{
+ NORMAL_RANK,
+ SUPER_RANK,
+ HYPER_RANK,
+ MASTER_RANK,
+};
+
+enum
+{
CONTEST_COOL,
CONTEST_BEAUTY,
CONTEST_CUTE,
diff --git a/include/data2.h b/include/data2.h
new file mode 100644
index 000000000..987c7cb2e
--- /dev/null
+++ b/include/data2.h
@@ -0,0 +1,46 @@
+#ifndef GUARD_DATA2_H
+#define GUARD_DATA2_H
+
+#include "sprite.h"
+
+struct UnknownStructD2 {
+ u32 unk0;
+ u32 unk4;
+ u32 unk8;
+};
+
+struct MonCoords
+{
+ // This would use a bitfield, but sub_8079F44
+ // uses it as a u8 and casting won't match.
+ u8 coords; // u8 x:4, y:4;
+ u8 y_offset;
+};
+
+extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E7C18;
+extern const union AnimCmd *const gSpriteAnimTable_81E7C64[];
+extern struct MonCoords gMonFrontPicCoords[];
+extern struct MonCoords gMonBackPicCoords[];
+extern struct SpriteSheet gMonFrontPicTable[];
+extern struct SpriteSheet gMonBackPicTable[];
+extern const struct SpritePalette gMonPaletteTable[];
+extern const struct SpritePalette gMonShinyPaletteTable[];
+extern const union AnimCmd *const *const gUnknown_081EC2A4[];
+extern const union AnimCmd *const *const gUnknown_081ECACC[];
+extern struct MonCoords gTrainerBackPicCoords[];
+extern struct SpriteSheet gTrainerBackPicTable[];
+extern struct SpritePalette gTrainerBackPicPaletteTable[];
+extern u8 gEnemyMonElevation[];
+extern const u8 gTrainerClassNames[][13];
+extern const struct Trainer gTrainers[];
+extern u8 gSpeciesNames[][11];
+extern u8 gMoveNames[][13];
+extern const struct UnknownStructD2 gUnknown_081F9674;
+extern const u8 gUnknown_081F96C8[];
+extern struct SpriteSheet gUnknown_081FAEA4;
+extern struct SpritePalette gUnknown_081FAEAC;
+extern const struct SpriteTemplate gSpriteTemplate_81FAF0C;
+extern void *gUnknown_081FAF4C[];
+extern struct BattleMove gBattleMoves[];
+
+#endif // GUARD_DATA2_H
diff --git a/include/decoration.h b/include/decoration.h
index 4bad93d1f..d041a8007 100644
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -3,14 +3,17 @@
struct Decoration
{
- u8 id;
- u8 name[16];
- u8 decor_field_11;
- u8 decor_field_12;
- u8 decor_field_13;
- u16 price;
- u8 *description;
- void *tiles;
+ /*0x00*/ u8 id;
+ /*0x01*/ u8 name[16];
+ /*0x11*/ u8 decor_field_11;
+ /*0x12*/ u8 decor_field_12;
+ /*0x13*/ u8 decor_field_13;
+ /*0x14*/ u16 price;
+ /*0x18*/ u8 *description;
+ /*0x1c*/ u16 *tiles;
};
+extern struct Decoration gDecorations[0x77];
+extern void sub_80FF394(u16 unkr0, u16 unkr1, u16 unkr2);
+
#endif // GUARD_DECORATION_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index ee5ac4138..dca6b80c2 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -28,5 +28,6 @@ enum {
u16 sub_80EB72C(u16 group);
+void sub_80EB6FC(u16 *, u16);
#endif // GUARD_EASYCHAT_H
diff --git a/include/field_camera.h b/include/field_camera.h
index 51c370d0a..9021b579e 100644
--- a/include/field_camera.h
+++ b/include/field_camera.h
@@ -1,6 +1,16 @@
#ifndef GUARD_FIELD_CAMERA_H
#define GUARD_FIELD_CAMERA_H
+struct CameraSomething
+{
+ void (*callback)(struct CameraSomething *);
+ u32 unk4;
+ s32 unk8;
+ s32 unkC;
+ s32 unk10;
+ s32 unk14;
+};
+
void move_tilemap_camera_to_upper_left_corner(void);
void sub_8057A58(void);
void sub_8057B14(u16 *a, u16 *b);
diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h
new file mode 100755
index 000000000..62f492bdc
--- /dev/null
+++ b/include/field_effect_helpers.h
@@ -0,0 +1,11 @@
+//
+// Created by scott on 5/25/2017.
+//
+
+#ifndef POKERUBY_FIELD_EFFECT_HELPERS_H
+#define POKERUBY_FIELD_EFFECT_HELPERS_H
+
+void sub_812869C(struct MapObject *);
+bool8 sub_81286C4(struct MapObject *);
+
+#endif //POKERUBY_FIELD_EFFECT_HELPERS_H
diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h
new file mode 100644
index 000000000..8a69426b3
--- /dev/null
+++ b/include/field_ground_effect.h
@@ -0,0 +1,11 @@
+//
+// Created by Scott Norton on 5/22/17.
+//
+
+#ifndef POKERUBY_FIELD_GROUND_EFFECT_H
+#define POKERUBY_FIELD_GROUND_EFFECT_H
+
+bool8 IsZCoordMismatchAt(u8 z, s16 x, s16 y);
+bool8 AreZCoordsCompatible(u8 z1, u8 z2);
+
+#endif //POKERUBY_FIELD_GROUND_EFFECT_H
diff --git a/include/field_map_obj.h b/include/field_map_obj.h
index dfc41d38b..0347b90d4 100644..100755
--- a/include/field_map_obj.h
+++ b/include/field_map_obj.h
@@ -3,9 +3,93 @@
#include "sprite.h"
+#define fieldmap_object_cb(setup, callback, table) \
+extern u8 (*const table[])(struct MapObject *, struct Sprite *);\
+static u8 callback(struct MapObject *, struct Sprite *);\
+void setup(struct Sprite *sprite)\
+{\
+ meta_step(&gMapObjects[sprite->data0], sprite, callback);\
+}\
+static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\
+{\
+ return table[sprite->data1](mapObject, sprite);\
+}
+
+#define fieldmap_object_null_cb(setup, callback) \
+static u8 callback(struct MapObject *, struct Sprite *);\
+void setup(struct Sprite *sprite)\
+{\
+ meta_step(&gMapObjects[sprite->data0], sprite, callback);\
+}\
+static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\
+{\
+ return 0;\
+}
+
+
void sub_805C058(struct MapObject *mapObject, s16 a, s16 b);
void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18);
void MoveCoords(u8 direction, s16 *x, s16 *y);
-void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u32 (*d8)());
+void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u8 (*d8)(struct MapObject *, struct Sprite *));
+void npc_reset(struct MapObject *mapObject, struct Sprite *sprite);
+
+extern const u8 gUnknown_08375240[4];
+extern u8 (*const gUnknown_08375244[])(s16 a0, s16 a1, s16 a2, s16 a3);
+extern bool8 (*const gUnknown_08375684[4])(u8);
+extern bool8 (*const gUnknown_08375694[4])(u8);
+
+extern const u8 gUnknown_083752A0[2];
+extern const u8 gUnknown_083752C0[2];
+extern const u8 gUnknown_08375320[2];
+extern const u8 gUnknown_08375338[2];
+extern const u8 gUnknown_08375350[2];
+extern const u8 gUnknown_08375368[2];
+extern const u8 gUnknown_08375380[2];
+extern const u8 gUnknown_08375398[2];
+extern const u8 gUnknown_083753B0[2];
+extern const u8 gUnknown_083753C8[2];
+extern const u8 gUnknown_083753DC[5];
+extern const u8 gUnknown_083753F4[5];
+extern const u8 gUnknown_08375418[4];
+extern const u8 gUnknown_08375428[4];
+extern const u8 gUnknown_08375438[4];
+extern const u8 gUnknown_08375448[4];
+extern const u8 gUnknown_08375458[4];
+extern const u8 gUnknown_08375468[4];
+extern const u8 gUnknown_08375240[4];
+extern const u8 gUnknown_08375484[4];
+extern const u8 gUnknown_08375494[4];
+extern const u8 gUnknown_083754A4[4];
+extern const u8 gUnknown_083754B4[4];
+extern const u8 gUnknown_083754C4[4];
+extern const u8 gUnknown_083754D4[4];
+extern const u8 gUnknown_083754E4[4];
+extern const u8 gUnknown_083754F4[4];
+extern const u8 gUnknown_08375504[4];
+extern const u8 gUnknown_08375514[4];
+extern const u8 gUnknown_08375524[4];
+extern const u8 gUnknown_08375534[4];
+extern const u8 gUnknown_08375544[4];
+extern const u8 gUnknown_08375554[4];
+extern const u8 gUnknown_08375564[4];
+extern const u8 gUnknown_08375574[4];
+extern const u8 gUnknown_08375584[4];
+
+extern const u8 gUnknown_0837567B[9];
+extern const u8 gUnknown_0837574F[8];
+
+extern const u8 gUnknown_08375757[4][4];
+extern const u8 gUnknown_08375767[4][4];
+
+extern const struct Coords16 gDirectionToVector[];
+
+extern u8 (**const gUnknown_08375778[])(struct MapObject *, struct Sprite *);
+
+extern struct CameraSomething gUnknown_03004880;
+extern u16 gUnknown_03004898;
+extern u16 gUnknown_0300489C;
+
+extern u32 gUnknown_0202FF84[];
+int state_to_direction(u8, u8, u8);
#endif // GUARD_FIELD_MAP_OBJ_H
diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h
index daae74ae9..5dceec595 100644
--- a/include/field_map_obj_helpers.h
+++ b/include/field_map_obj_helpers.h
@@ -8,5 +8,12 @@ void UnfreezeMapObjects(void);
void sub_806487C(struct Sprite *sprite, bool8 invisible);
void sub_8064990(u8, u8);
void UnfreezeMapObject(struct MapObject *mapObject);
-
+void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3);
+void sub_806467C(struct Sprite *sprite, u8 direction);
+bool8 sub_806468C(struct Sprite *sprite);
+void sub_80646E4(struct Sprite *sprite, u8 a2, u8 a3, u8 a4);
+void DoShadowFieldEffect(struct MapObject *mapObject);
+u8 sub_8064704(struct Sprite *);
+u8 sub_806478C(struct Sprite *);
+void obj_anim_image_set_and_seek(struct Sprite *sprite, u8 a2, u8 a3);
#endif
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index d3e4b9132..fc21c4e3c 100644..100755
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -33,7 +33,7 @@ void SetPlayerAvatarTransitionFlags(u16 a);
// PlayerAvatarTransition_Underwater
// sub_80591F4
void sub_8059204(void);
-// player_get_x22
+u8 player_get_x22(void);
void PlayerSetAnimId(u8 a, u8 b);
void PlayerGoSpeed0(u8 a);
void sub_80593C4(u8 a);
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 936d27b4a..530e15798 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -1,6 +1,10 @@
#ifndef GUARD_FIELDMAP2_H
#define GUARD_FIELDMAP2_H
+#include "field_map_obj.h"
struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection);
+int GetMapBorderIdAt(int x, int y);
+extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction);
+int CanCameraMoveInDirection(int direction);
#endif
diff --git a/include/flags.h b/include/flags.h
index 56325dea6..0e408a833 100644
--- a/include/flags.h
+++ b/include/flags.h
@@ -51,6 +51,8 @@
#define SYS_BRAILLE_WAIT 0x851
#define SYS_BRAILLE_FLY 0x852
+#define SYS_TV_LATI 0x85D
+
#define SYS_SHOAL_ITEM 0x85F
#define SYS_B_DASH 0x860 // got Running Shoes
#define SYS_CTRL_OBJ_DELETE 0x861
@@ -61,3 +63,5 @@
#define SPECIAL_FLAG_1 0x4001
#endif // GUARD_FLAGS_H
+
+bool8 FlagGet(u16 flag);
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 508d7e4ed..0b72bbec5 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -104,7 +104,7 @@ struct CoordEvent
struct BgEvent
{
- s16 x, y;
+ u16 x, y;
u8 unk4;
u8 kind;
// 0x2 padding for the union beginning.
@@ -119,7 +119,7 @@ struct BgEvent
} hiddenItem;
// secret base type
- u16 secretBaseId;
+ u32 secretBaseId;
} bgUnion;
};
diff --git a/include/global.h b/include/global.h
index 4cbbef5cc..34946c895 100644
--- a/include/global.h
+++ b/include/global.h
@@ -94,23 +94,24 @@ struct UCoords16
struct SecretBaseRecord
{
- u8 sbr_field_0; // ID?
- u8 sbr_field_1_0:4;
- u8 gender:1;
- u8 sbr_field_1_5:1;
- u8 sbr_field_2[7]; // 0xFF bytes?
- u8 trainerId[4]; // byte 0 is used for determining trainer class
- u16 sbr_field_e;
- u8 sbr_field_10;
- u8 sbr_field_11;
- u8 decorations[16];
- u8 sbr_field_22[16];
- u32 partyPersonality[6];
- u16 partyMoves[6 * 4];
- u16 partySpecies[6];
- u16 partyHeldItems[6];
- u8 partyLevels[6];
- u8 partyEVs[6];
+ /*0x1A08*/ u8 sbr_field_0; // ID?
+ /*0x1A09*/ u8 sbr_field_1_0:4;
+ /*0x1A09*/ u8 gender:1;
+ /*0x1A09*/ u8 sbr_field_1_5:1;
+ /*0x1A09*/ u8 sbr_field_1_6:2;
+ /*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes?
+ /*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class
+ /*0x1A16*/ u16 sbr_field_e;
+ /*0x1A18*/ u8 sbr_field_10;
+ /*0x1A19*/ u8 sbr_field_11;
+ /*0x1A1A*/ u8 decorations[16];
+ /*0x1A2A*/ u8 decorationPos[16];
+ /*0x1A3A*/ u32 partyPersonality[6];
+ /*0x1A54*/ u16 partyMoves[6 * 4];
+ /*0x1A84*/ u16 partySpecies[6];
+ /*0x1A90*/ u16 partyHeldItems[6];
+ /*0x1A9C*/ u8 partyLevels[6];
+ /*0x1AA2*/ u8 partyEVs[6];
};
#include "game_stat.h"
@@ -193,24 +194,60 @@ struct EasyChatPair
struct TVShowCommon {
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
+ /*0x02*/ u8 pad02[20];
+ /*0x16*/ u16 var16[3];
+ /*0x1C*/ u8 srcTrainerId3Lo;
+ /*0x1D*/ u8 srcTrainerId3Hi;
+ /*0x1E*/ u8 srcTrainerId2Lo;
+ /*0x1F*/ u8 srcTrainerId2Hi;
+ /*0x20*/ u8 srcTrainerIdLo;
+ /*0x21*/ u8 srcTrainerIdHi;
+ /*0x22*/ u8 trainerIdLo;
+ /*0x23*/ u8 trainerIdHi;
+};
+
+struct TVShowPokemonToday {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 language;
+ /*0x03*/ u8 language2;
+ /*0x04*/ u8 nickname[11];
+ /*0x0F*/ u8 ball;
+ /*0x10*/ u16 species;
+ /*0x12*/ u8 var12;
+ /*0x13*/ u8 playerName[8];
+};
+
+
+struct TVShowPokemonTodayFailed {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 language;
+ /*0x03*/ u8 pad03[9];
+ /*0x0c*/ u16 species;
+ /*0x0e*/ u16 species2;
+ /*0x10*/ u8 var10;
+ /*0x11*/ u8 var11;
+ /*0x12*/ u8 var12;
+ /*0x13*/ u8 playerName[8];
};
struct TVShowFanClubLetter {
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 species;
- u8 pad04[12];
+ /*0x04*/ u16 pad04[6];
/*0x10*/ u8 playerName[8];
- /*0x18*/ u8 var18;
+ /*0x18*/ u8 language;
};
struct TVShowRecentHappenings {
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 var02;
- u8 pad04[12];
- /*0x10*/ u8 var10[8];
- /*0x18*/ u8 var18;
+ /*0x04*/ u16 var04[6];
+ /*0x10*/ u8 playerName[8];
+ /*0x18*/ u8 language;
u8 pad19[10];
};
@@ -220,11 +257,13 @@ struct TVShowFanclubOpinions {
/*0x02*/ u16 var02;
/*0x04*/ u8 var04A:4;
u8 var04B:4;
- /*0x04*/ u8 var05[8];
- /*0x0D*/ u8 var0D;
+ /*0x05*/ u8 playerName[8];
+ /*0x0D*/ u8 language;
/*0x0E*/ u8 var0E;
/*0x0F*/ u8 var0F;
/*0x10*/ u8 var10[8];
+ /*0x18*/ u16 var18[2];
+ /*0x1C*/ u16 var1C[4];
};
struct TVShowNameRaterShow {
@@ -237,7 +276,7 @@ struct TVShowNameRaterShow {
/*0x1B*/ u8 random2;
/*0x1C*/ u16 var1C;
/*0x1E*/ u8 language;
- /*0x1F*/ u8 var1F;
+ /*0x1F*/ u8 pokemonNameLanguage;
};
struct TVShowMassOutbreak {
@@ -255,10 +294,77 @@ struct TVShowMassOutbreak {
/*0x14*/ u8 level;
/*0x15*/ u8 var15;
/*0x16*/ u16 var16;
- /*0x18*/ u8 var18;
+ /*0x18*/ u8 language;
u8 pad19[11];
};
+struct TVShowPokemonAngler {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 var02;
+ /*0x03*/ u8 var03;
+ /*0x04*/ u16 var04;
+ /*0x06*/ u8 language;
+ u8 pad07[12];
+ /*0x13*/ u8 playerName[8];
+};
+
+struct TVShowWorldOfMasters {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u16 var02;
+ /*0x04*/ u16 var04;
+ /*0x06*/ u16 var06;
+ /*0x08*/ u16 var08;
+ /*0x0a*/ u8 var0a;
+ /*0x0b*/ u8 language;
+ u8 pad0c[7];
+ /*0x13*/ u8 playerName[8];
+};
+
+struct TVShowSmartShopper {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 priceReduced;
+ /*0x03*/ u8 language;
+ /*0x04*/ u8 pad04[2];
+ /*0x06*/ u16 itemIds[3];
+ /*0x0C*/ u16 itemAmounts[3];
+ /*0x12*/ u8 shopLocation;
+ /*0x13*/ u8 playerName[8];
+};
+
+struct TVShowBravoTrainerPokemonProfiles {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u16 species;
+ /*0x04*/ u16 var04[2];
+ /*0x08*/ u8 pokemonNickname[11];
+ /*0x13*/ u8 contestCategory:3;
+ /*0x13*/ u8 contestRank:2;
+ /*0x13*/ u8 var13_5:2;
+ /*0x13*/ u8 var13_7:1;
+ /*0x14*/ u16 var14;
+ /*0x16*/ u8 playerName[8];
+ /*0x1E*/ u8 language;
+ /*0x1F*/ u8 var1f;
+};
+
+struct TVShowBravoTrainerBattleTowerSpotlight {
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 trainerName[8];
+ /*0x0A*/ u16 species;
+ /*0x0C*/ u8 pokemonName[8];
+ /*0x14*/ u16 winningMove;
+ /*0x16*/ u16 var16;
+ /*0x18*/ u16 var18[1];
+ /*0x1A*/ u8 btLevel;
+ /*0x1B*/ u8 var1b;
+ /*0x1C*/ u8 var1c;
+ /*0x1D*/ u8 language;
+};
+
typedef union TVShow {
struct TVShowCommon common;
struct TVShowFanClubLetter fanclubLetter;
@@ -266,6 +372,13 @@ typedef union TVShow {
struct TVShowFanclubOpinions fanclubOpinions;
struct TVShowNameRaterShow nameRaterShow;
struct TVShowMassOutbreak massOutbreak;
+ struct TVShowPokemonAngler pokemonAngler;
+ struct TVShowWorldOfMasters worldOfMasters;
+ struct TVShowSmartShopper smartshopperShow;
+ struct TVShowBravoTrainerPokemonProfiles bravoTrainer;
+ struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower;
+ struct TVShowPokemonToday pokemonToday;
+ struct TVShowPokemonTodayFailed pokemonTodayFailed;
} TVShow;
struct MailStruct
@@ -325,6 +438,36 @@ typedef union SB_Struct {
} SB_Struct;
// size is 0x198
+struct SaveTVStruct {
+ TVShow shows[24];
+ TVShow unknown_2A98;
+};
+
+struct UnknownSaveStruct2ABC {
+ u8 val0;
+ u8 val1;
+ u16 val2;
+};
+
+struct GabbyAndTyData {
+ u16 mon1;
+ u16 mon2;
+ u16 move1;
+ u16 move2;
+ u8 mapnum;
+ u8 val9;
+ u8 valA_0:1;
+ u8 valA_1:1;
+ u8 valA_2:1;
+ u8 valA_3:1;
+ u8 valA_4:4;
+ u8 valB;
+};
+
+struct RecordMixing_UnknownStruct {
+ u8 data[0x38];
+};
+
struct SaveBlock1 /* 0x02025734 */
{
/*0x00*/ struct Coords16 pos;
@@ -374,8 +517,8 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2704*/ u8 decorDoll[40];
/*0x272C*/ u8 decorCushion[10];
/*0x2736*/ u8 padding_2736[2];
- /*0x2738*/ TVShow tvShows[24];
- /*0x2A98*/ u8 filler_2A98[0x64];
+ /*0x2738*/ struct SaveTVStruct tvShows;
+ /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16];
/*0x2AFC*/ u16 outbreakPokemonSpecies;
/*0x2AFE*/ u8 outbreakLocationMapNum;
/*0x2AFF*/ u8 outbreakLocationMapGroup;
@@ -386,7 +529,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2B0C*/ u8 outbreakUnk4;
/*0x2B0D*/ u8 outbreakPokemonProbability;
/*0x2B0E*/ u16 outbreakUnk5;
- /*0x2B10*/ u8 filler_2B0E[0xC];
+ /*0x2B18*/ struct GabbyAndTyData gabbyAndTyData;
/*0x2B1C*/ u16 unk2B1C[6];
/*0x2B28*/ u16 unk2B28[6];
/*0x2B34*/ u16 unk2B34[6];
@@ -399,9 +542,9 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
/*0x2DFC*/ u8 filler_2DFC[0x8];
/*0x2E04*/ SB_Struct sbStruct;
- /*0x2F9C*/ u8 filler_2F9C[0xA0];
- /*0x303C*/ u8 filler_303C[0x38];
- /*0x3074*/ u8 filler_3074[0x42];
+ /*0x2F9C*/ struct BoxPokemon daycareData[2];
+ /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2];
+ /*0x30AC*/ u8 filler_30AC[0xA];
/*0x30B6*/ u8 filler_30B6;
/*0x30B7*/ u8 filler_30B7[1];
/*0x30B8*/ u8 linkBattleRecords[5][16];
@@ -440,7 +583,11 @@ struct Pokedex
struct SaveBlock2_Sub
{
- /*0x0000, 0x00A8*/ u8 filler_000[0x4AE];
+ /*0x0000, 0x00A4*/ u8 filler_000[0x3D8];
+ /*0x03D8, 0x0480*/ u16 var_480;
+ /*0x03DA, 0x0482*/ u16 var_482;
+ /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1];
+ /*0x04AD, 0x0555*/ u8 var_4AD;
/*0x04AE, 0x0556*/ u8 var_4AE;
/*0x04AF, 0x0557*/ u8 var_4AF;
/*0x04B0, 0x0558*/ u16 var_4B0;
@@ -450,7 +597,9 @@ struct SaveBlock2_Sub
/*0x04B8, 0x0560*/ u8 filler_4B8[0x10];
/*0x04C8, 0x0570*/ u16 var_4C8;
/*0x04CA, 0x0572*/ u16 var_4CA;
- /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C];
+ /*0x04CC, 0x0574*/ u8 filler_4CC[4];
+ /*0x04D0, 0x0578*/ u8 var_4D0;
+ /*0x04D1, 0x0579*/ u8 filler_4D1[0x317];
};
struct SaveBlock2 /* 0x02024EA4 */
diff --git a/include/intro.h b/include/intro.h
index 7fdbd9cb0..6d4d2daf3 100644
--- a/include/intro.h
+++ b/include/intro.h
@@ -1,8 +1,8 @@
#ifndef GUARD_INTRO_H
#define GUARD_INTRO_H
-void c2_copyright_1(void);
-void CB2_InitCopyrightScreen(void);
+void CB2_InitCopyrightScreenAfterBootup(void);
+void CB2_InitCopyrightScreenAfterTitleScreen(void);
void sub_813CE30(u16, u16, u16, u16);
#endif // GUARD_INTRO_H
diff --git a/include/item.h b/include/item.h
index cc917dbc8..47af11940 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,8 +1,27 @@
#ifndef GUARD_ITEM_H
#define GUARD_ITEM_H
+
typedef void (*ItemUseFunc)(u8);
+struct Item
+{
+ u8 name[14];
+ u16 itemId;
+ u16 price;
+ u8 holdEffect;
+ u8 holdEffectParam;
+ u8 *description;
+ u8 importance;
+ u8 unk19;
+ u8 pocket;
+ u8 type;
+ ItemUseFunc fieldUseFunc;
+ u8 battleUsage;
+ ItemUseFunc battleUseFunc;
+ u8 secondaryId;
+};
+
void CopyItemName(u16 itemId, u8 *string);
bool8 IsBagPocketNonEmpty(u8 pocket);
bool8 CheckBagHasItem(u16 itemId, u16 count);
diff --git a/include/main.h b/include/main.h
index aef55a182..e0cb09370 100644
--- a/include/main.h
+++ b/include/main.h
@@ -43,7 +43,7 @@ struct Main
/*0x43D*/ u8 inBattle:1;
};
-extern u8 gUnknown_3001764;
+extern u8 gLinkTransferringData;
extern struct Main gMain;
extern bool8 gSoftResetDisabled;
extern bool8 gLinkVSyncDisabled;
diff --git a/include/menu.h b/include/menu.h
index 8f697d136..653682864 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -5,7 +5,7 @@
struct MenuAction
{
- u8 *text;
+ const u8 *text;
u8 (*func)();
};
@@ -23,7 +23,7 @@ void MenuZeroFillWindowRect(u8, u8, u8, u8);
void MenuFillWindowRectWithBlankTile(u8, u8, u8, u8);
void MenuZeroFillScreen(void);
void MenuDrawTextWindow(u8, u8, u8, u8);
-void sub_8071F40(u8 *);
+void sub_8071F40(const u8 *);
void sub_8071F60(u8, u8, u8, u8);
u16 unref_sub_8071F98(u8, u8);
void unref_sub_8071FBC(u16, u8, u8, u8, u8);
@@ -49,17 +49,17 @@ void PrintMenuItemsReordered(u8, u8, u8, const struct MenuAction[], u8*);
void InitYesNoMenu(u8, u8, u8);
void DisplayYesNoMenu(u8, u8, u32);
s8 ProcessMenuInputNoWrap_(void);
-u8 MenuPrint_PixelCoords(u8 *, u8, u16, u8);
-u8 sub_8072A18(u8 *, u8, u16, u8, u32);
+u8 MenuPrint_PixelCoords(const u8 *, u8, u16, u8);
+u8 sub_8072A18(const u8 *, u8, u16, u8, u32);
u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32);
int sub_8072AB0(u8 *, u8, u16, u8, u8, u32);
void MenuPrint_RightAligned(u8 *, u8, u8);
void sub_8072B80(u8 *, u8, u8, u8 *);
-void sub_8072BD8(u8 *, u8, u8, u16);
+void sub_8072BD8(const u8 *, u8, u8, u16);
u8 *sub_8072C14(u8 *, s32, u8, u8);
u8 *sub_8072C44(u8 *, s32, u8, u8);
u8 *sub_8072C74(u8 *, const u8 *, u8, u8);
-u8 sub_8072CA4(u8 *s);
+u8 sub_8072CA4(const u8 *s);
u8 sub_8072CBC(void);
void sub_8072CD4(u8 *, u8 *, u8 *);
u32 MenuUpdateWindowText_OverrideLineLength(u8);
diff --git a/include/pokedex.h b/include/pokedex.h
index d67fa29a6..a243e6064 100644
--- a/include/pokedex.h
+++ b/include/pokedex.h
@@ -135,7 +135,7 @@ void sub_8090A3C(u8);
void sub_8090C68(void);
u8 *GetPokemonCategory(u16);
-bool8 GetNationalPokedexFlag(u16, u8);
+s8 GetNationalPokedexFlag(u16, u8);
u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
bool8 sub_8090FC0(void);
diff --git a/include/pokemon.h b/include/pokemon.h
index ae02de8ca..15a028d6e 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -462,4 +462,5 @@ void MonRestorePP(struct Pokemon *);
u8 *sub_803F378(u16 itemId);
+u16 NationalPokedexNumToSpecies(u16 nationalNum);
#endif // GUARD_POKEMON_H
diff --git a/include/record_mixing.h b/include/record_mixing.h
index 39cf5bd43..72a089ca1 100644
--- a/include/record_mixing.h
+++ b/include/record_mixing.h
@@ -4,16 +4,16 @@
#include <stddef.h>
void sub_80B929C(void);
-void sub_80B92AC(void);
-void sub_80B93B0(u32 a);
-void sub_80B9450(u8 taskId);
-void sub_80B9484(u8 taskId);
+void RecordMixing_PrepareExchangePacket(void);
+void RecordMixing_ReceiveExchangePacket(u32 a);
+void Task_RecordMixing_SoundEffect(u8 taskId);
+void Task_RecordMixing_Main(u8 taskId);
void sub_80B95F0(u8 taskId);
-void sub_80B97DC(u8 taskId);
-void Task_CopyRecvBuffer(u8 taskId);
+void Task_RecordMixing_SendPacket(u8 taskId);
+void Task_RecordMixing_CopyReceiveBuffer(u8 taskId);
void sub_80B99B4(u8 taskId);
-void sub_80B99E8(u8 taskId);
-void sub_80B9A1C(u8 taskId);
+void Task_RecordMixing_ReceivePacket(u8 taskId);
+void Task_RecordMixing_SendPacket_SwitchToReceive(u8 taskId);
void *LoadPtrFromTaskData(u16 *ptr);
void StorePtrInTaskData(void *ptr, u16 *data);
u8 GetMultiplayerId_(void);
diff --git a/include/script_pokemon_80C4.h b/include/script_pokemon_80C4.h
index 6d4e689b5..629980a2d 100644
--- a/include/script_pokemon_80C4.h
+++ b/include/script_pokemon_80C4.h
@@ -1,11 +1,6 @@
#ifndef GUARD_SCRIPTPOKE80C4_H
#define GUARD_SCRIPTPOKE80C4_H
-struct MonCoords
-{
- u8 x, y;
-};
-
void sub_80C5190(u8);
void sub_80C5580(void);
void SetBattleTowerPlayerParty(void);
diff --git a/include/songs.h b/include/songs.h
index 244bb9808..c465ac562 100644
--- a/include/songs.h
+++ b/include/songs.h
@@ -120,7 +120,7 @@ enum
/*0x72*/ SE_TB_START,
/*0x73*/ SE_TB_KON,
/*0x74*/ SE_TB_KARA,
- SE_BIDORO,
+ /*0x75*/ SE_BIDORO,
SE_W085,
SE_W085B,
SE_W231,
@@ -269,7 +269,7 @@ enum
BGM_GIM,
BGM_NAMINORI,
BGM_DAN01,
- BGM_FANFA1,
+ /*0x16F*/ BGM_FANFA1,
BGM_ME_ASA,
BGM_ME_BACHI,
BGM_FANFA4,
diff --git a/include/strings2.h b/include/strings2.h
new file mode 100644
index 000000000..600bb2d31
--- /dev/null
+++ b/include/strings2.h
@@ -0,0 +1,322 @@
+#ifndef GUARD_STRINGS2_H
+#define GUARD_STRINGS2_H
+
+// ???
+extern const u8 gOtherText_TopSpeed[];
+
+// berry_blender
+extern const u8 gMultiText_BerryBlenderMaxSpeedRecord[];
+extern const u8 gMultiText_2P3P4P[];
+extern const u8 gMultiText_Saving[];
+
+// link
+extern const u8 gMultiText_LinkError[];
+
+// option_menu
+extern const u8 gSystemText_OptionMenu[];
+extern const u8 gSystemText_TextSpeed[];
+extern const u8 gSystemText_BattleScene[];
+extern const u8 gSystemText_BattleStyle[];
+extern const u8 gSystemText_Sound[];
+extern const u8 gSystemText_Frame[];
+extern const u8 gSystemText_Cancel[];
+extern const u8 gSystemText_ButtonMode[];
+extern const u8 gSystemText_Slow[];
+extern const u8 gSystemText_Mid[];
+extern const u8 gSystemText_Fast[];
+extern const u8 gSystemText_On[];
+extern const u8 gSystemText_Off[];
+extern const u8 gSystemText_Shift[];
+extern const u8 gSystemText_Set[];
+extern const u8 gSystemText_Mono[];
+extern const u8 gSystemText_Stereo[];
+extern const u8 gSystemText_Type[];
+extern const u8 gSystemText_Terminator[];
+extern const u8 gSystemText_Normal[];
+extern const u8 gSystemText_LR[];
+extern const u8 gSystemText_LA[];
+
+// start_menu
+extern const u8 SystemText_Pokedex[];
+extern const u8 SystemText_Pokemon[];
+extern const u8 SystemText_BAG[];
+extern const u8 SystemText_Pokenav[];
+extern const u8 SystemText_Player[];
+extern const u8 SystemText_Save[];
+extern const u8 SystemText_Option[];
+extern const u8 SystemText_Exit[];
+extern const u8 SystemText_Retire[];
+extern const u8 gOtherText_SafariStock[];
+
+// mystery_event_menu
+extern const u8 gSystemText_LinkStandby[];
+extern const u8 gSystemText_LoadEventPressA[];
+extern const u8 gSystemText_LoadingEvent[];
+extern const u8 gSystemText_DontCutLink[];
+extern const u8 gSystemText_EventLoadSuccess[];
+extern const u8 gSystemText_LoadingError[];
+
+// field_region_map
+extern const u8 gOtherText_Hoenn[];
+
+// field_player_avatar
+extern const u8 gOtherText_OhABite[];
+extern const u8 gOtherText_PokeOnHook[];
+extern const u8 gOtherText_NotEvenANibble[];
+extern const u8 gOtherText_ItGotAway[];
+
+// trade
+extern const u8 gTradeText_WillBeSent[];
+extern const u8 gTradeText_ByeBye[];
+extern const u8 gTradeText_SentOverPoke[];
+extern const u8 gTradeText_TakeGoodCare[];
+extern const u8 TradeText_Cancel[];
+extern const u8 TradeText_ChoosePoke[];
+extern const u8 TradeText_Summary1[];
+extern const u8 TradeText_Trade1[];
+extern const u8 TradeText_CancelTradePrompt[];
+extern const u8 TradeText_PressBToExit[];
+extern const u8 TradeText_Summary2[];
+extern const u8 TradeText_Trade2[];
+extern const u8 TradeText_LinkStandby[];
+extern const u8 TradeText_TradeCancelled[];
+extern const u8 TradeText_OnlyPoke[];
+extern const u8 TradeText_NonTradablePoke[];
+extern const u8 TradeText_WaitingForFriend[];
+extern const u8 TradeText_WantToTrade[];
+extern const u8 gTradeText_TradeOkayPrompt[];
+extern const u8 gOtherText_Terminator2[];
+extern const u8 gOtherText_ControlAndMiscText[];
+extern const u8 gOtherText_FourQuestions[];
+
+// easy_chat
+extern const u8 gEasyChatGroupName_Pokemon[];
+extern const u8 gEasyChatGroupName_Trainer[];
+extern const u8 gEasyChatGroupName_Status[];
+extern const u8 gEasyChatGroupName_Battle[];
+extern const u8 gEasyChatGroupName_Greetings[];
+extern const u8 gEasyChatGroupName_People[];
+extern const u8 gEasyChatGroupName_Voices[];
+extern const u8 gEasyChatGroupName_Speech[];
+extern const u8 gEasyChatGroupName_Endings[];
+extern const u8 gEasyChatGroupName_Feelings[];
+extern const u8 gEasyChatGroupName_Conditions[];
+extern const u8 gEasyChatGroupName_Actions[];
+extern const u8 gEasyChatGroupName_Lifestyle[];
+extern const u8 gEasyChatGroupName_Hobbies[];
+extern const u8 gEasyChatGroupName_Time[];
+extern const u8 gEasyChatGroupName_Misc[];
+extern const u8 gEasyChatGroupName_Adjectives[];
+extern const u8 gEasyChatGroupName_Events[];
+extern const u8 gEasyChatGroupName_Move1[];
+extern const u8 gEasyChatGroupName_Move2[];
+extern const u8 gEasyChatGroupName_TrendySaying[];
+extern const u8 gEasyChatGroupName_Pokemon2[];
+extern const u8 gOtherText_ThreeQuestions[];
+
+// mail
+extern const u8 gOtherText_From[];
+
+// record_mixing
+extern const u8 gOtherText_MixingRecordsWithFriend[];
+extern const u8 gOtherText_MixingComplete[];
+
+// trainer_card
+extern const u8 gOtherText_TrainersTrainerCard[];
+extern const u8 gOtherText_FirstHOF[];
+extern const u8 gOtherText_LinkCableBattles[];
+extern const u8 gOtherText_BattleTowerWinRecord[];
+extern const u8 gOtherText_ContestRecord[];
+extern const u8 gOtherText_MixingRecord[];
+extern const u8 gOtherText_TradeRecord[];
+extern const u8 gOtherText_Boy[];
+extern const u8 gOtherText_Girl[];
+
+// save_menu_util
+extern const u8 gOtherText_Player[];
+extern const u8 gOtherText_Badges[];
+extern const u8 gOtherText_Pokedex[];
+extern const u8 gOtherText_PlayTime[];
+
+// naming_screen
+extern const u8 gOtherText_SentToPC[];
+extern const u8 OtherText_YourName[];
+extern const u8 OtherText_BoxName[];
+extern const u8 OtherText_PokeName[];
+
+// pokemon_size_record
+extern const u8 gOtherText_Marco[];
+
+// roulette
+extern const u8 gOtherText_Coins[];
+
+// battle_records
+extern const u8 gOtherText_BattleResults[];
+extern const u8 gOtherText_WinRecord[];
+extern const u8 gOtherText_WinLoseDraw[];
+extern const u8 gOtherText_SevenDashes[];
+extern const u8 gOtherText_FourDashes[];
+extern const u8 gOtherText_BattleTowerResults[];
+extern const u8 gOtherText_Lv50[];
+extern const u8 gOtherText_Lv100[];
+extern const u8 gOtherText_WinStreak[];
+extern const u8 gOtherText_Current[];
+extern const u8 gOtherText_Record[];
+extern const u8 gOtherText_Prev[];
+
+// slot_machine
+extern const u8 gOtherText_QuitGamePrompt[];
+extern const u8 gOtherText_MaxCoins[];
+extern const u8 gOtherText_OutOfCoins[];
+extern const u8 gOtherText_DontHaveThreeCoins[];
+extern const u8 gOtherText_ReelTime[];
+
+// daycare
+extern const u8 DaycareText_GetAlongVeryWell[];
+extern const u8 DaycareText_GetAlong[];
+extern const u8 DaycareText_DontLikeOther[];
+extern const u8 DaycareText_PlayOther[];
+extern const u8 gOtherText_NewLine2[];
+extern const u8 gOtherText_CancelAndLv[];
+
+// pokemon_2
+extern const u8 gEggNickname[];
+
+// egg_hatch
+extern const u8 gOtherText_HatchedFromEgg[];
+extern const u8 gOtherText_NickHatchPrompt[];
+
+// learn_move
+extern const u8 OtherText_Battle[];
+extern const u8 OtherText_Contest[];
+
+// ???
+extern const u8 OtherText_Type[];
+extern const u8 OtherText_PP[];
+
+// learn_move
+extern const u8 OtherText_Power[];
+extern const u8 OtherText_Accuracy[];
+extern const u8 OtherText_Appeal[];
+extern const u8 OtherText_Jam[];
+extern const u8 gOtherText_TeachWhichMove[];
+extern const u8 gOtherText_TeachSpecificMove[];
+extern const u8 gOtherText_PokeLearnedMove[];
+extern const u8 gOtherText_DeleteOlderMove[];
+extern const u8 gOtherText_StopLearningMove[];
+extern const u8 gOtherText_ForgotMove123[];
+extern const u8 gOtherText_ForgotOrDidNotLearnMove[];
+extern const u8 gOtherText_GiveUpTeachingMove[];
+extern const u8 gOtherText_WhichMoveToForget[];
+
+// clear_save_data_menu
+extern const u8 gSystemText_ClearAllSaveDataPrompt[];
+extern const u8 gSystemText_ClearingData[];
+
+// contest_link_80C2020
+extern const u8 gContestText_AnnounceResults[];
+extern const u8 gContestText_PreliminaryResults[];
+extern const u8 gContestText_Round2Results[];
+extern const u8 gContestText_PokeWon[];
+extern const u8 gOtherText_LinkStandby[];
+
+// landmark
+extern const u8 gLandmarkName_FlowerShop[];
+extern const u8 gLandmarkName_PetalburgWoods[];
+extern const u8 gLandmarkName_MrBrineysCottage[];
+extern const u8 gLandmarkName_AbandonedShip[];
+extern const u8 gLandmarkName_SeashoreHouse[];
+extern const u8 gLandmarkName_SlateportBeach[];
+extern const u8 gLandmarkName_CyclingRoad[];
+extern const u8 gLandmarkName_NewMauville[];
+extern const u8 gLandmarkName_TrickHouse[];
+extern const u8 gLandmarkName_OldLadysRestShop[];
+extern const u8 gLandmarkName_Desert[];
+extern const u8 gLandmarkName_WinstrateFamily[];
+extern const u8 gLandmarkName_CableCar[];
+extern const u8 gLandmarkName_GlassWorkshop[];
+extern const u8 gLandmarkName_WeatherInstitute[];
+extern const u8 gLandmarkName_MeteorFalls[];
+extern const u8 gLandmarkName_TunnelersRestHouse[];
+extern const u8 gLandmarkName_RusturfTunnel[];
+extern const u8 gLandmarkName_PokemonDayCare[];
+extern const u8 gLandmarkName_SafariZoneEntrance[];
+extern const u8 gLandmarkName_MtPyre[];
+extern const u8 gLandmarkName_ShoalCave[];
+extern const u8 gLandmarkName_SeafloorCavern[];
+extern const u8 gLandmarkName_GraniteCave[];
+extern const u8 gLandmarkName_OceanCurrent[];
+extern const u8 gLandmarkName_LanettesHouse[];
+extern const u8 gLandmarkName_FieryPath[];
+extern const u8 gLandmarkName_JaggedPass[];
+extern const u8 gLandmarkName_SkyPillar[];
+extern const u8 gLandmarkName_BerryMastersHouse[];
+extern const u8 gLandmarkName_IslandCave[];
+extern const u8 gLandmarkName_DesertRuins[];
+extern const u8 gLandmarkName_ScorchedSlab[];
+extern const u8 gLandmarkName_AncientTomb[];
+extern const u8 gLandmarkName_SealedChamber[];
+extern const u8 gLandmarkName_FossilManiacsHouse[];
+extern const u8 gLandmarkName_HuntersHouse[];
+
+// pokemon_summary_screen
+extern const u8 gOtherText_Terminator4[];
+extern const u8 gOtherText_Nature[];
+extern const u8 gOtherText_Comma[];
+extern const u8 gOtherText_Met[];
+extern const u8 gOtherText_Egg2[];
+extern const u8 gOtherText_ObtainedInTrade[];
+extern const u8 gOtherText_FatefulEncounter[];
+extern const u8 gOtherText_Met2[];
+extern const u8 gOtherText_EggDayCare[];
+extern const u8 gOtherText_EggNicePlace[];
+extern const u8 gOtherText_EggObtainedInTrade[];
+extern const u8 gOtherText_EggHotSprings[];
+
+// evolution_scene, trade
+extern const u8 gOtherText_LinkStandby2[];
+
+// evolution_scene
+extern const u8 gOtherText_YesNoAndPlayer[];
+
+// diploma
+extern const u8 gOtherText_HoennDex[];
+extern const u8 gOtherText_NationalDex[];
+extern const u8 gOtherText_DiplomaCertificationGameFreak[];
+
+// cable_club
+extern const u8 gOtherText_PLink[];
+
+// berry_blender
+extern const u8 gOtherText_YesNoTerminating[];
+extern const u8 gOtherText_LinkNotFound[];
+extern const u8 gOtherText_BlenderChooseBerry[];
+extern const u8 gOtherText_PokeBlockMade[];
+extern const u8 gOtherText_PressAToStart[];
+extern const u8 gOtherText_PleaseWait[];
+extern const u8 gOtherText_LinkStandby3[];
+extern const u8 gOtherText_BlendAnotherBerryPrompt[];
+extern const u8 gOtherText_OutOfBerries[];
+extern const u8 gOtherText_CaseIsFull[];
+extern const u8 gOtherText_NoBerriesForBlend[];
+extern const u8 gOtherText_OtherCaseIsFull[];
+extern const u8 gOtherText_ResultsOfBlending[];
+extern const u8 gOtherText_Berry[];
+extern const u8 gOtherText_RequiredTime[];
+extern const u8 gOtherText_Min[];
+extern const u8 gOtherText_Sec[];
+extern const u8 gOtherText_MaxSpeed[];
+extern const u8 gOtherText_RPM[];
+extern const u8 gOtherText_Ranking[];
+extern const u8 gOtherText_BlockLevelIs[];
+extern const u8 gOtherText_BlockFeelIs[];
+extern const u8 gOtherText_Period[];
+
+// reset_rtc_screen
+extern const u8 gOtherText_Day[];
+extern const u8 gOtherText_OK[];
+
+// wallclock
+extern const u8 gOtherText_CorrectTimePrompt[];
+
+#endif // GUARD_STRINGS2_H
diff --git a/include/trainer_see.h b/include/trainer_see.h
index 0113143b6..b80a41641 100644..100755
--- a/include/trainer_see.h
+++ b/include/trainer_see.h
@@ -28,7 +28,7 @@ s8 sub_80845FC(u8 taskId, struct Task *task, struct MapObject *trainerObj);
s8 sub_8084654(u8 taskId, struct Task *task, struct MapObject *trainerObj);
s8 sub_80846C8(u8 taskId, struct Task *task, struct MapObject *trainerObj);
void sub_80846E4(u8 taskId);
-void sub_8084794(u32 var);
+void sub_8084794(struct MapObject *var);
void sub_80847C8(void);
void sub_80847D8(u8);
void sub_8084894(struct Sprite *sprite, u16 a2, u8 a3);
diff --git a/include/trig.h b/include/trig.h
index 5a948e1ef..03d8c453e 100644
--- a/include/trig.h
+++ b/include/trig.h
@@ -1,6 +1,8 @@
#ifndef GUARD_TRIG_H
#define GUARD_TRIG_H
+extern s16 gSineTable[];
+
s16 Sin(s16 index, s16 amplitude);
s16 Cos(s16 index, s16 amplitude);
s16 Sin2(u16 angle);
diff --git a/include/tv.h b/include/tv.h
new file mode 100644
index 000000000..b1ed61a82
--- /dev/null
+++ b/include/tv.h
@@ -0,0 +1,23 @@
+//
+// Created by Scott Norton on 5/18/17.
+//
+
+#ifndef POKERUBY_TV_H
+#define POKERUBY_TV_H
+enum
+{
+ 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_POKEMON_TODAY_CAUGHT = 21,
+ TVSHOW_SMART_SHOPPER,
+ TVSHOW_POKEMON_TODAY_FAILED,
+ TVSHOW_FISHING_ADVICE,
+ TVSHOW_WORLD_OF_MASTERS,
+ TVSHOW_MASS_OUTBREAK = 41,
+};
+#endif //POKERUBY_TV_H
diff --git a/include/vars.h b/include/vars.h
index 55df0a5e3..cb5bb3296 100644
--- a/include/vars.h
+++ b/include/vars.h
@@ -1,6 +1,8 @@
#ifndef GUARD_VARS_H
#define GUARD_VARS_H
+#define VAR_0x4003 0x4003
+#define VAR_0x401F 0x401F
#define VAR_RECYCLE_GOODS 0x4020
#define VAR_REPEL_STEP_COUNT 0x4021
#define VAR_ICE_STEP_COUNT 0x4022
@@ -26,6 +28,13 @@
#define VAR_BARBOACH_SIZE_RECORD 0x404F
-#define VAR_PORTHOLE 0x40B4
+#define VAR_0x4054 0x4054
+
+#define VAR_0x4089 0x4089
+#define VAR_0x4097 0x4097
+
+#define VAR_PORTHOLE 0x40B4
+
+#define VAR_0x40BC 0x40BC
#endif // GUARD_VARS_H