summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common_syms/contest_painting.txt4
-rw-r--r--common_syms/contest_painting_effects.txt10
-rw-r--r--common_syms/evolution_scene.txt1
-rw-r--r--common_syms/party_menu.txt1
-rw-r--r--common_syms/pokedex_cry_screen.txt1
-rw-r--r--data/battle_anim_80A9C70.s89
-rw-r--r--include/battle.h7
-rw-r--r--include/battle_anim.h4
-rw-r--r--include/contest.h2
-rw-r--r--include/contest_painting.h3
-rw-r--r--include/party_menu.h2
-rwxr-xr-xinclude/pokedex_cry_screen.h2
-rw-r--r--include/trade.h3
-rw-r--r--ld_script.txt1
-rw-r--r--src/battle_anim_80A9C70.c176
-rw-r--r--src/battle_main.c6
-rw-r--r--src/battle_script_commands.c4
-rw-r--r--src/cable_club.c4
-rw-r--r--src/contest.c2
-rw-r--r--src/contest_link_80F57C4.c16
-rw-r--r--src/contest_painting.c13
-rw-r--r--src/contest_painting_effects.c19
-rw-r--r--src/dragon.c4
-rw-r--r--src/evolution_scene.c15
-rwxr-xr-xsrc/item_use.c5
-rwxr-xr-xsrc/party_menu.c4
-rw-r--r--src/pokedex.c2
-rwxr-xr-xsrc/pokedex_cry_screen.c5
-rw-r--r--src/rom_8011DC0.c2
-rwxr-xr-xsrc/trainer_card.c1
-rw-r--r--sym_common.txt61
-rw-r--r--sym_ewram.txt36
32 files changed, 275 insertions, 230 deletions
diff --git a/common_syms/contest_painting.txt b/common_syms/contest_painting.txt
new file mode 100644
index 000000000..1fba37a59
--- /dev/null
+++ b/common_syms/contest_painting.txt
@@ -0,0 +1,4 @@
+gUnknown_03006190
+gUnknown_030061A0
+gUnknown_030061C0
+gContestPaintingMonPalette
diff --git a/common_syms/contest_painting_effects.txt b/common_syms/contest_painting_effects.txt
new file mode 100644
index 000000000..2f3d79219
--- /dev/null
+++ b/common_syms/contest_painting_effects.txt
@@ -0,0 +1,10 @@
+gUnknown_03006164
+gUnknown_03006168
+gUnknown_0300616C
+gUnknown_03006170
+gUnknown_03006174
+gUnknown_03006178
+gUnknown_0300617C
+gUnknown_03006180
+gUnknown_03006184
+gUnknown_03006188
diff --git a/common_syms/evolution_scene.txt b/common_syms/evolution_scene.txt
new file mode 100644
index 000000000..137cd3e05
--- /dev/null
+++ b/common_syms/evolution_scene.txt
@@ -0,0 +1 @@
+gCB2_AfterEvolution
diff --git a/common_syms/party_menu.txt b/common_syms/party_menu.txt
new file mode 100644
index 000000000..53e72fa53
--- /dev/null
+++ b/common_syms/party_menu.txt
@@ -0,0 +1 @@
+gUnknown_03006328
diff --git a/common_syms/pokedex_cry_screen.txt b/common_syms/pokedex_cry_screen.txt
new file mode 100644
index 000000000..d16ec36d6
--- /dev/null
+++ b/common_syms/pokedex_cry_screen.txt
@@ -0,0 +1 @@
+gDexCryScreenState
diff --git a/data/battle_anim_80A9C70.s b/data/battle_anim_80A9C70.s
deleted file mode 100644
index f82a657b9..000000000
--- a/data/battle_anim_80A9C70.s
+++ /dev/null
@@ -1,89 +0,0 @@
-#include "constants/battle_anim.h"
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 2
-gUnknown_0853EDE4:: @ 853EDE4
- .2byte 0x0000, 0x0003, 0x0004, 0x0003, 0x0008, 0x0003, 0x000c, 0x0003, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EDF8:: @ 853EDF8
- .4byte gUnknown_0853EDE4
-
- .align 2
-gUnknown_0853EDFC:: @ 853EDFC
- spr_template ANIM_TAG_UNUSED_ORB, ANIM_TAG_UNUSED_ORB, gUnknown_0852490C, gUnknown_0853EDF8, NULL, gDummySpriteAffineAnimTable, sub_80A8AEC
- spr_template ANIM_TAG_UNUSED_ORB, ANIM_TAG_UNUSED_ORB, gUnknown_0852490C, gUnknown_0853EDF8, NULL, gDummySpriteAffineAnimTable, sub_80A8A6C
-
- .align 2
-gUnknown_0853EE2C:: @ 853EE2C
- .2byte 0x0000, 0x0003, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EE34:: @ 853EE34
- .4byte gUnknown_0853EE2C
-
- .align 2
-gUnknown_0853EE38:: @ 853EE38
- spr_template ANIM_TAG_WEATHER_BALL, ANIM_TAG_WEATHER_BALL, gUnknown_08524914, gUnknown_0853EE34, NULL, gDummySpriteAffineAnimTable, sub_80A8E30
-
- .align 2
-gUnknown_0853EE50:: @ 853EE50
- spr_template ANIM_TAG_WEATHER_BALL, ANIM_TAG_WEATHER_BALL, gUnknown_08524914, gUnknown_0853EE34, NULL, gDummySpriteAffineAnimTable, sub_80A8EE4
-
- .align 2
-gUnknown_0853EE68:: @ 853EE68
- .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003, 0x0040, 0x0003, 0xffff, 0x0000
-
- .align 2
-gUnknown_0853EE80:: @ 853EE80
- .4byte gUnknown_0853EE68
-
- .align 2
-gUnknown_0853EE84:: @ 853EE84
- spr_template ANIM_TAG_SPARKLE_4, ANIM_TAG_SPARKLE_4, gUnknown_08524914, gUnknown_0853EE80, NULL, gDummySpriteAffineAnimTable, sub_80A8B64
- spr_template ANIM_TAG_UNUSED_MONSTER_FOOT, ANIM_TAG_UNUSED_MONSTER_FOOT, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A8AEC
-
- .align 2
-gUnknown_0853EEB4:: @ 853EEB4
- .2byte 0x0000, 0x0005, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EEBC:: @ 853EEBC
- .2byte 0x0000, 0x0005, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EEC4:: @ 853EEC4
- .2byte 0x0000, 0x0005, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EECC:: @ 853EECC
- .4byte gUnknown_0853EEB4
- .4byte gUnknown_0853EEBC
- .4byte gUnknown_0853EEC4
-
- .align 2
-gUnknown_0853EED8:: @ 853EED8
- spr_template ANIM_TAG_IMPACT, ANIM_TAG_IMPACT, gUnknown_08524914, gUnknown_0853EECC, NULL, gDummySpriteAffineAnimTable, sub_80A8AEC
-
- .align 2
-gUnknown_0853EEF0:: @ 853EEF0
- .2byte 0x0000, 0x000f, 0xfffe, 0x0000
-
- .align 2
-gUnknown_0853EEF8:: @ 853EEF8
- .4byte gUnknown_0853EEF0
-
- .align 2
-gUnknown_0853EEFC:: @ 853EEFC
- .2byte 0x0060, 0x0060, 0x0000, 0x0000, 0x0002, 0x0002, 0x0100, 0x0000, 0x7ffe, 0x0001, 0x0000, 0x0000
-
- .align 2
-gUnknown_0853EF14:: @ 853EF14
- .4byte gUnknown_0853EEFC
-
- .align 2
-gUnknown_0853EF18:: @ 853EF18
- spr_template ANIM_TAG_UNUSED_ORB, ANIM_TAG_UNUSED_ORB, gUnknown_085249CC, gUnknown_0853EEF8, NULL, gUnknown_0853EF14, sub_80A8A6C
diff --git a/include/battle.h b/include/battle.h
index 9295a3548..94596c75e 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -28,10 +28,11 @@
#define B_ACTION_SAFARI_GO_NEAR 7
#define B_ACTION_SAFARI_RUN 8
#define B_ACTION_WALLY_THROW 9
-// The exact purposes of these are unclear
-#define B_ACTION_EXEC_SCRIPT 10 // when executing an action
+#define B_ACTION_EXEC_SCRIPT 10
+#define B_ACTION_TRY_FINISH 11
+#define B_ACTION_FINISHED 12
+
#define B_ACTION_CANCEL_PARTNER 12 // when choosing an action
-#define B_ACTION_FINISHED 12 // when executing an action
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
#define B_ACTION_NONE 0xFF
diff --git a/include/battle_anim.h b/include/battle_anim.h
index fc0f603eb..8e8a17675 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -75,6 +75,10 @@ int GetAnimBgAttribute(u8 bgId, u8 attributeId);
// battle_anim_80A5C6C.s
void sub_80A6450(struct Sprite *sprite);
+void sub_80A8AEC(struct Sprite *sprite);
+void sub_80A8A6C(struct Sprite *sprite);
+void sub_80A8E30(struct Sprite *sprite);
+void sub_80A8B64(struct Sprite *sprite);
void SetAverageBattlerPositions(u8 battlerId, bool8 respectMonPicOffsets, s16 *x, s16 *y);
void DestroySpriteAndMatrix(struct Sprite *sprite);
void AnimTranslateLinearSimple(struct Sprite *sprite);
diff --git a/include/contest.h b/include/contest.h
index 35b88698e..e4391a327 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -437,6 +437,8 @@ extern u8 gHighestRibbonRank;
extern struct ContestResources *gContestResources;
extern u8 sContestBgCopyFlags;
extern struct ContestWinner gUnknown_02039F3C;
+extern u8 gUnknown_02039F5C;
+extern u8 gUnknown_02039F5D;
extern u32 gContestRngValue;
diff --git a/include/contest_painting.h b/include/contest_painting.h
index ca03a72b5..c633c50cc 100644
--- a/include/contest_painting.h
+++ b/include/contest_painting.h
@@ -13,7 +13,4 @@ enum
void sub_812FDA8(int);
void CB2_ContestPainting(void);
-extern u8 gUnknown_02039F5C;
-extern u8 gUnknown_02039F5D;
-
#endif
diff --git a/include/party_menu.h b/include/party_menu.h
index ae7c414a8..702b4fde1 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -48,6 +48,8 @@ extern MainCallback gPostMenuFieldCallback;
extern u8 gSelectedOrderFromParty[4];
extern u8 gUnknown_0203CF00[3];
+extern void (*gUnknown_03006328)(u8, TaskFunc);
+
extern const u16 gTutorMoves[];
void sub_81B0FCC(u8 slot, u8 b);
diff --git a/include/pokedex_cry_screen.h b/include/pokedex_cry_screen.h
index 392e80a6d..93f1b02a5 100755
--- a/include/pokedex_cry_screen.h
+++ b/include/pokedex_cry_screen.h
@@ -10,6 +10,8 @@ struct CryRelatedStruct
u8 yPos;
};
+extern u8 gDexCryScreenState;
+
bool8 sub_8145354(struct CryRelatedStruct*, u8);
void sub_814545C(u8);
void sub_8145534(u16);
diff --git a/include/trade.h b/include/trade.h
index 95a10cacf..0c95e1e81 100644
--- a/include/trade.h
+++ b/include/trade.h
@@ -6,8 +6,11 @@
// Exported type declarations
// Exported RAM declarations
+extern struct MailStruct gUnknown_020321C0[PARTY_SIZE];
+extern u8 gUnknown_02032298[2];
// Exported ROM declarations
+extern const struct WindowTemplate gUnknown_0833900C;
s32 sub_807A728(void);
void sub_80773AC(void);
diff --git a/ld_script.txt b/ld_script.txt
index bf8d4bde9..306a1f4b0 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -441,7 +441,6 @@ SECTIONS {
src/battle_anim.o(.rodata);
src/battle_anim_80A5C6C.o(.rodata);
data/map_events.o(.rodata);
- data/battle_anim_80A9C70.o(.rodata);
src/battle_anim_80A9C70.o(.rodata);
src/title_screen.o(.rodata);
src/field_weather.o(.rodata);
diff --git a/src/battle_anim_80A9C70.c b/src/battle_anim_80A9C70.c
index 001f99d7f..1271680e0 100644
--- a/src/battle_anim_80A9C70.c
+++ b/src/battle_anim_80A9C70.c
@@ -28,6 +28,182 @@ static void sub_80A9E44(struct Sprite *sprite);
static void sub_80A9E78(struct Sprite *sprite);
// const rom data
+static const union AnimCmd sSpriteAnim_853EDE4[] =
+{
+ ANIMCMD_FRAME(0, 3),
+ ANIMCMD_FRAME(4, 3),
+ ANIMCMD_FRAME(8, 3),
+ ANIMCMD_FRAME(12, 3),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_853EDF8[] =
+{
+ sSpriteAnim_853EDE4
+};
+
+const struct SpriteTemplate gUnknown_0853EDFC =
+{
+ .tileTag = ANIM_TAG_UNUSED_ORB,
+ .paletteTag = ANIM_TAG_UNUSED_ORB,
+ .oam = &gUnknown_0852490C,
+ .anims = sSpriteAnimTable_853EDF8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8AEC,
+};
+
+const struct SpriteTemplate gUnknown_0853EE14 =
+{
+ .tileTag = ANIM_TAG_UNUSED_ORB,
+ .paletteTag = ANIM_TAG_UNUSED_ORB,
+ .oam = &gUnknown_0852490C,
+ .anims = sSpriteAnimTable_853EDF8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8A6C,
+};
+
+static const union AnimCmd sSpriteAnim_853EE2C[] =
+{
+ ANIMCMD_FRAME(0, 3),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_853EE34[] =
+{
+ sSpriteAnim_853EE2C
+};
+
+const struct SpriteTemplate gUnknown_0853EE38 =
+{
+ .tileTag = ANIM_TAG_WEATHER_BALL,
+ .paletteTag = ANIM_TAG_WEATHER_BALL,
+ .oam = &gUnknown_08524914,
+ .anims = sSpriteAnimTable_853EE34,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8E30,
+};
+
+const struct SpriteTemplate gUnknown_0853EE50 =
+{
+ .tileTag = ANIM_TAG_WEATHER_BALL,
+ .paletteTag = ANIM_TAG_WEATHER_BALL,
+ .oam = &gUnknown_08524914,
+ .anims = sSpriteAnimTable_853EE34,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8EE4,
+};
+
+static const union AnimCmd sSpriteAnim_853EE68[] =
+{
+ ANIMCMD_FRAME(0, 3),
+ ANIMCMD_FRAME(16, 3),
+ ANIMCMD_FRAME(32, 3),
+ ANIMCMD_FRAME(48, 3),
+ ANIMCMD_FRAME(64, 3),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_853EE80[] =
+{
+ sSpriteAnim_853EE68
+};
+
+const struct SpriteTemplate gUnknown_0853EE84 =
+{
+ .tileTag = ANIM_TAG_SPARKLE_4,
+ .paletteTag = ANIM_TAG_SPARKLE_4,
+ .oam = &gUnknown_08524914,
+ .anims = sSpriteAnimTable_853EE80,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8B64,
+};
+
+const struct SpriteTemplate gUnknown_0853EE9C =
+{
+ .tileTag = ANIM_TAG_UNUSED_MONSTER_FOOT,
+ .paletteTag = ANIM_TAG_UNUSED_MONSTER_FOOT,
+ .oam = &gUnknown_08524914,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8AEC,
+};
+
+static const union AnimCmd sSpriteAnim_853EEB4[] =
+{
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd sSpriteAnim_853EEBC[] =
+{
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd sSpriteAnim_853EEC4[] =
+{
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_853EECC[] =
+{
+ sSpriteAnim_853EEB4,
+ sSpriteAnim_853EEBC,
+ sSpriteAnim_853EEC4
+};
+
+const struct SpriteTemplate gUnknown_0853EED8 =
+{
+ .tileTag = ANIM_TAG_IMPACT,
+ .paletteTag = ANIM_TAG_IMPACT,
+ .oam = &gUnknown_08524914,
+ .anims = sSpriteAnimTable_853EECC,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80A8AEC,
+};
+
+static const union AnimCmd sSpriteAnim_853EEF0[] =
+{
+ ANIMCMD_FRAME(0, 15),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_853EEF8[] =
+{
+ sSpriteAnim_853EEF0
+};
+
+static const union AffineAnimCmd sSpriteAffineAnim_853EEFC[] =
+{
+ AFFINEANIMCMD_FRAME(96, 96, 0, 0),
+ AFFINEANIMCMD_FRAME(2, 2, 0, 1),
+ AFFINEANIMCMD_JUMP(1)
+};
+
+static const union AffineAnimCmd *const sSpriteAffineAnimTable_853EEF8[] =
+{
+ sSpriteAffineAnim_853EEFC
+};
+
+const struct SpriteTemplate gUnknown_0853EF18 =
+{
+ .tileTag = ANIM_TAG_UNUSED_ORB,
+ .paletteTag = ANIM_TAG_UNUSED_ORB,
+ .oam = &gUnknown_085249CC,
+ .anims = sSpriteAnimTable_853EEF8,
+ .images = NULL,
+ .affineAnims = sSpriteAffineAnimTable_853EEF8,
+ .callback = sub_80A8A6C,
+};
+
static const struct Subsprite gUnknown_0853EF30[] =
{
{.x = -16, .y = -16, .shape = ST_OAM_SQUARE, .size = 3, .tileOffset = 0, .priority = 2},
diff --git a/src/battle_main.c b/src/battle_main.c
index 09ea3dfc9..043e75808 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -139,7 +139,7 @@ static void HandleAction_ThrowPokeblock(void);
static void HandleAction_GoNear(void);
static void HandleAction_SafariZoneRun(void);
static void HandleAction_WallyBallThrow(void);
-static void HandleAction_Action11(void);
+static void HandleAction_TryFinish(void);
static void HandleAction_NothingIsFainted(void);
static void HandleAction_ActionFinished(void);
@@ -553,7 +553,7 @@ static void (* const sTurnActionsFuncsTable[])(void) =
[B_ACTION_SAFARI_RUN] = HandleAction_SafariZoneRun,
[B_ACTION_WALLY_THROW] = HandleAction_WallyBallThrow,
[B_ACTION_EXEC_SCRIPT] = HandleAction_RunBattleScript,
- [11] = HandleAction_Action11, // not sure about this one
+ [B_ACTION_TRY_FINISH] = HandleAction_TryFinish,
[B_ACTION_FINISHED] = HandleAction_ActionFinished,
[B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted,
};
@@ -5845,7 +5845,7 @@ static void HandleAction_WallyBallThrow(void)
gActionsByTurnOrder[1] = B_ACTION_FINISHED;
}
-static void HandleAction_Action11(void)
+static void HandleAction_TryFinish(void)
{
if (!HandleFaintedMonActions())
{
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 6bbee842e..6023b2c1b 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -4233,13 +4233,13 @@ static void atk3D_end(void)
gMoveResultFlags = 0;
gActiveBattler = 0;
- gCurrentActionFuncId = 0xB;
+ gCurrentActionFuncId = B_ACTION_TRY_FINISH;
}
static void atk3E_end2(void)
{
gActiveBattler = 0;
- gCurrentActionFuncId = 0xB;
+ gCurrentActionFuncId = B_ACTION_TRY_FINISH;
}
static void atk3F_end3(void) // pops the main function stack
diff --git a/src/cable_club.c b/src/cable_club.c
index ce9b9db05..303b0d016 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -27,12 +27,10 @@
#include "task.h"
#include "trade.h"
#include "trainer_card.h"
+#include "party_menu.h"
#include "window.h"
#include "constants/songs.h"
-extern u8 gUnknown_02032298[2];
-extern u8 gSelectedOrderFromParty[];
-
static const struct WindowTemplate gUnknown_08550594 = {
.bg = 0,
.tilemapLeft = 16,
diff --git a/src/contest.c b/src/contest.c
index b24036f39..cf084e35e 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -214,6 +214,8 @@ EWRAM_DATA u8 gHighestRibbonRank = 0;
EWRAM_DATA struct ContestResources *gContestResources = NULL;
EWRAM_DATA u8 sContestBgCopyFlags = 0;
EWRAM_DATA struct ContestWinner gUnknown_02039F3C = {0};
+EWRAM_DATA u8 gUnknown_02039F5C = 0;
+EWRAM_DATA u8 gUnknown_02039F5D = 0;
// IWRAM common vars.
u32 gContestRngValue;
diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c
index 721a4f870..381fb34fa 100644
--- a/src/contest_link_80F57C4.c
+++ b/src/contest_link_80F57C4.c
@@ -3,7 +3,6 @@
#include "bg.h"
#include "contest.h"
#include "contest_link_80F57C4.h"
-#include "contest_painting.h"
#include "decompress.h"
#include "dma3.h"
#include "event_data.h"
@@ -67,10 +66,9 @@ struct ContestLink80F57C4
u8 *unkC[4];
};
-extern const struct CompressedSpriteSheet gMonFrontPicTable[];
-
-extern struct ContestLink80F57C4 *gUnknown_0203A034;
+EWRAM_DATA struct ContestLink80F57C4 *gUnknown_0203A034 = NULL;
+extern const struct CompressedSpriteSheet gMonFrontPicTable[];
extern const struct BgTemplate gUnknown_0858D888[4];
extern const struct WindowTemplate gUnknown_0858D898[];
extern const struct CompressedSpriteSheet gUnknown_0858D878[];
@@ -138,7 +136,7 @@ void sub_80F57C4(void)
InitBgsFromTemplates(0, gUnknown_0858D888, ARRAY_COUNT(gUnknown_0858D888));
for (i = 0; i < 4; i++)
SetBgTilemapBuffer(i, gUnknown_0203A034->unkC[i]);
-
+
InitWindows(gUnknown_0858D898);
DeactivateAllTextPrinters();
SetGpuReg(REG_OFFSET_MOSAIC, 0);
@@ -720,7 +718,7 @@ static void sub_80F66B4(u8 taskId)
{
nationalDexNum = SpeciesToNationalPokedexNum(gContestMons[i].species);
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
- }
+ }
}
gTasks[taskId].data[10] = 0;
@@ -761,7 +759,7 @@ static void sub_80F67C4(u8 taskId)
{
if (!(gIsLinkContest & 0x1))
BravoTrainerPokemonProfile_BeforeInterview2(gContestFinalStandings[gContestPlayerMonIndex]);
-
+
BeginHardwarePaletteFade(0xFF, 0, 0, 16, 0);
gTasks[taskId].func = sub_80F6820;
}
@@ -1282,7 +1280,7 @@ static void sub_80F6F68(struct Sprite *sprite)
struct Sprite *sprite2 = &gSprites[sprite->data[i]];
sprite2->pos1.x = sprite->pos1.x + sprite->pos2.x + (i + 1) * 64;
}
-
+
if (sprite->pos1.x == sprite->data[4])
sprite->callback = sub_80F6FDC;
}
@@ -1348,7 +1346,7 @@ static void sub_80F7144(void)
sprite->invisible = 1;
for (i = 0; i < 3; i++)
gSprites[sprite->data[i]].invisible = 1;
-
+
gBattle_WIN0H = 0;
gBattle_WIN0V = 0;
SetGpuReg(REG_OFFSET_WIN0H, gBattle_WIN0H);
diff --git a/src/contest_painting.c b/src/contest_painting.c
index 0ed169a77..71a110aa8 100644
--- a/src/contest_painting.c
+++ b/src/contest_painting.c
@@ -20,10 +20,11 @@
#include "window.h"
#include "constants/rgb.h"
-extern u16 (*gUnknown_03006190)[][32];
-extern struct ContestWinner *gUnknown_030061C0;
-extern u16 *gContestPaintingMonPalette;
-extern struct Unk030061A0 gUnknown_030061A0;
+// IWRAM common
+u16 (*gUnknown_03006190)[][32];
+struct Unk030061A0 gUnknown_030061A0;
+struct ContestWinner *gUnknown_030061C0;
+u16 *gContestPaintingMonPalette;
// IWRAM bss
IWRAM_DATA u8 gContestPaintingState;
@@ -103,7 +104,7 @@ const u8 *const gContestRankTextPointers[] =
gContestLink,
};
-const struct BgTemplate gUnknown_085B07E8[] =
+const struct BgTemplate gUnknown_085B07E8[] =
{
{
.bg = 1,
@@ -116,7 +117,7 @@ const struct BgTemplate gUnknown_085B07E8[] =
},
};
-const struct WindowTemplate gUnknown_085B07EC =
+const struct WindowTemplate gUnknown_085B07EC =
{
.bg = 1,
.tilemapLeft = 2,
diff --git a/src/contest_painting_effects.c b/src/contest_painting_effects.c
index 187a0f196..142ad7bc9 100644
--- a/src/contest_painting_effects.c
+++ b/src/contest_painting_effects.c
@@ -3,14 +3,17 @@
#include "contest_painting.h"
#include "constants/rgb.h"
-extern u8 gUnknown_03006164;
-extern u16 (*gUnknown_03006168)[][32];
-extern u8 gUnknown_0300616C;
-extern u8 gUnknown_03006170;
-extern u8 gUnknown_03006174;
-extern u8 gUnknown_03006178;
-extern u8 gUnknown_0300617C;
-extern u8 gUnknown_03006180;
+// IWRAM common
+u8 gUnknown_03006164;
+u16 (*gUnknown_03006168)[][32];
+u8 gUnknown_0300616C;
+u8 gUnknown_03006170;
+u8 gUnknown_03006174;
+u8 gUnknown_03006178;
+u8 gUnknown_0300617C;
+u8 gUnknown_03006180;
+u16 gUnknown_03006184;
+u16 gUnknown_03006188;
// this file's functions
void sub_8125230(void);
diff --git a/src/dragon.c b/src/dragon.c
index 4a2ac1c51..9b39a8a30 100644
--- a/src/dragon.c
+++ b/src/dragon.c
@@ -5,8 +5,6 @@
#include "trig.h"
#include "constants/rgb.h"
-extern u16 gUnknown_0203A100[];
-
void sub_8113064(struct Sprite *);
void sub_81131B4(struct Sprite *);
void sub_8113224(struct Sprite *);
@@ -17,6 +15,8 @@ static void sub_81134B8(u8);
static void sub_8113574(struct Task *);
static void sub_811369C(struct Sprite *);
+EWRAM_DATA static u16 gUnknown_0203A100[7] = {0};
+
const union AnimCmd gUnknown_08596E60[] =
{
ANIMCMD_FRAME(0, 4),
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index c97e2d10f..4bf7701be 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -9,6 +9,7 @@
#include "evolution_graphics.h"
#include "gpu_regs.h"
#include "link.h"
+#include "link_rfu.h"
#include "m4a.h"
#include "main.h"
#include "menu.h"
@@ -16,10 +17,12 @@
#include "palette.h"
#include "pokedex.h"
#include "pokemon.h"
+#include "pokemon_summary_screen.h"
#include "scanline_effect.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
#include "text_window.h"
@@ -39,22 +42,18 @@ struct EvoInfo
u16 savedPalette[48];
};
+// EWRAM vars
static EWRAM_DATA struct EvoInfo *sEvoStructPtr = NULL;
static EWRAM_DATA u16 *sEvoMovingBgPtr = NULL;
+// IWRAM common
+void (*gCB2_AfterEvolution)(void);
+
#define sEvoCursorPos gBattleCommunication[1] // when learning a new move
#define sEvoGraphicsTaskID gBattleCommunication[2]
-extern const struct WindowTemplate gUnknown_0833900C;
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
-// strings
-extern const u8 gText_CommunicationStandby5[];
-
-extern void ShowSelectMovePokemonSummaryScreen(struct Pokemon *party, u8 monId, u8 partyCount, void *CB2_ptr, u16 move);
-extern u8 sub_81C1B94(void);
-extern void sub_800E084(void);
-
// this file's functions
static void Task_EvolutionScene(u8 taskID);
static void Task_TradeEvolutionScene(u8 taskID);
diff --git a/src/item_use.c b/src/item_use.c
index 6a7f6cec0..0ea5f6acf 100755
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -38,8 +38,6 @@
#include "constants/songs.h"
#include "constants/vars.h"
-extern void(*gUnknown_0203A0F4)(u8 taskId);
-extern void (*gUnknown_03006328)(u8, TaskFunc);
extern void unknown_ItemMenu_Confirm(u8 taskId);
extern void sub_81C5B14(u8 taskId);
extern void ScriptUnfreezeEventObjects(void);
@@ -100,6 +98,9 @@ void sub_80FDBEC(void);
bool8 sub_80FDE2C(void);
void ItemUseOutOfBattle_CannotUse(u8 taskId);
+// EWRAM variables
+EWRAM_DATA static void(*gUnknown_0203A0F4)(u8 taskId) = NULL;
+
// .rodata
static const MainCallback gUnknown_085920D8[] =
diff --git a/src/party_menu.c b/src/party_menu.c
index 8193fcf31..15b5d24d8 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -119,6 +119,7 @@ struct Struct203CEDC
u8 unkC;
};
+// EWRAM vars
static EWRAM_DATA struct Struct203CEC4 *gUnknown_0203CEC4 = NULL;
EWRAM_DATA struct Struct203CEC8 gUnknown_0203CEC8 = {0};
static EWRAM_DATA struct Struct203CEDC *gUnknown_0203CEDC = NULL;
@@ -134,7 +135,8 @@ static EWRAM_DATA u16 gUnknown_0203CEFC = 0;
static EWRAM_DATA u16 gUnknown_0203CEFE = 0; // unused
EWRAM_DATA u8 gUnknown_0203CF00[3] = {0};
-extern void (*gUnknown_03006328)(u8, TaskFunc);
+// IWRAM common
+void (*gUnknown_03006328)(u8, TaskFunc);
static void reset_brm(void);
static void PartyMenuInitCallback(void);
diff --git a/src/pokedex.c b/src/pokedex.c
index f99a8226a..c47ada5b8 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -30,8 +30,6 @@
#include "constants/songs.h"
#include "constants/species.h"
-extern u8 gDexCryScreenState;
-
// EWRAM
static EWRAM_DATA struct PokedexView *sPokedexView = NULL;
static EWRAM_DATA u16 gUnknown_02039B50 = 0;
diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c
index 4a9227b99..c385141d5 100755
--- a/src/pokedex_cry_screen.c
+++ b/src/pokedex_cry_screen.c
@@ -39,7 +39,10 @@ static void sub_8145824(u8, s16, u8);
static void sub_814596C(struct Sprite *);
static void sub_8145B24(s8);
-extern u8 gDexCryScreenState;
+// IWRAM common
+u8 gDexCryScreenState;
+
+// EWRAM vars
static EWRAM_DATA struct PokedexCryScreen *sDexCryScreen = NULL;
static EWRAM_DATA u8 *sCryWaveformWindowTiledata = NULL;
static EWRAM_DATA struct PokedexCryVolumeMeter *sCryVolumeMeter = NULL;
diff --git a/src/rom_8011DC0.c b/src/rom_8011DC0.c
index c5ad67fbc..9bdd86167 100644
--- a/src/rom_8011DC0.c
+++ b/src/rom_8011DC0.c
@@ -189,8 +189,6 @@ extern u16 gUnknown_02022C3C;
extern u8 gUnknown_02022C20[];
extern u8 gFieldLinkPlayerCount;
extern u8 gUnknown_03005DB4;
-extern struct MailStruct gUnknown_020321C0[PARTY_SIZE];
-extern u8 gUnknown_02032298[2];
// IWRAM vars
IWRAM_DATA struct UnkStruct_Leader *gUnknown_03000DA0;
diff --git a/src/trainer_card.c b/src/trainer_card.c
index b7bd5cc1d..49a62284f 100755
--- a/src/trainer_card.c
+++ b/src/trainer_card.c
@@ -93,6 +93,7 @@ struct TrainerCardData
extern u8 sub_80D30A0(u16);
// EWRAM
+EWRAM_DATA struct TrainerCard gTrainerCards[4] = {0};
EWRAM_DATA static struct TrainerCardData *sData = NULL;
//this file's functions
diff --git a/sym_common.txt b/sym_common.txt
index 7ec936a93..414d223e9 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -23,57 +23,14 @@
.include "contest.o"
.include "tv.o"
.include "mauville_old_man.o"
-
-gUnknown_03006164: @ 3006164
- .space 0x4
-
-gUnknown_03006168: @ 3006168
- .space 0x4
-
-gUnknown_0300616C: @ 300616C
- .space 0x4
-
-gUnknown_03006170: @ 3006170
- .space 0x4
-
-gUnknown_03006174: @ 3006174
- .space 0x4
-
-gUnknown_03006178: @ 3006178
- .space 0x4
-
-gUnknown_0300617C: @ 300617C
- .space 0x4
-
-gUnknown_03006180: @ 3006180
- .space 0x4
-
-gUnknown_03006184: @ 3006184
- .space 0x4
-
-gUnknown_03006188: @ 3006188
- .space 0x8
-
-gUnknown_03006190: @ 3006190
- .space 0x10
-
-gUnknown_030061A0: @ 30061A0
- .space 0x20
-
-gUnknown_030061C0: @ 30061C0
+ .include "contest_painting_effects.o"
+
.space 0x4
-
-gContestPaintingMonPalette: @ 30061C4
- .space 0xC
-
+
+ .include "contest_painting.o"
.include "field_specials.o"
-
-gCB2_AfterEvolution: @ 30061E8
- .space 0x4
-
-gDexCryScreenState: @ 30061EC
- .space 0x4
-
+ .include "evolution_scene.o"
+ .include "pokedex_cry_screen.o"
.include "save.o"
.include "battle_tower.o"
.include "intro.o"
@@ -84,9 +41,9 @@ gDexCryScreenState: @ 30061EC
.space 0x8
.include "list_menu.o"
-
-gUnknown_03006328: @ 3006328
- .space 0x48
+ .include "party_menu.o"
+
+ .space 0x44
gUnknown_03006370: @ 3006370
.space 0x10
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 9e836d0fe..361c0921f 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -140,19 +140,6 @@ gUnknown_02022D00: @ 2022D00
.include "src/scanline_effect.o"
.include "src/option_menu.o"
.include "src/pokedex.o"
-
-gTrainerCards: @ 2039B58
- .space 0x14
-
-gUnknown_02039B6C: @ 2039B6C
- .space 0x2
-
-gUnknown_02039B6E: @ 2039B6E
- .space 0x1A
-
-gUnknown_02039B88: @ 2039B88
- .space 0x160
-
.include "src/trainer_card.o"
.include "src/frontier_pass.o"
.include "src/pokemon_storage_system.o"
@@ -161,14 +148,6 @@ gUnknown_02039B88: @ 2039B88
.include "src/map_name_popup.o"
.include "src/item.o"
.include "src/contest.o"
-
- .align 2
-gUnknown_02039F5C: @ 2039F5C
- .space 0x1
-
-gUnknown_02039F5D: @ 2039F5D
- .space 0x3
-
.include "src/shop.o"
.include "src/fldeff_escalator.o"
.include "src/script_menu.o"
@@ -177,21 +156,12 @@ gUnknown_02039F5D: @ 2039F5D
.include "src/record_mixing.o"
.include "src/secret_base.o"
.include "src/tv.o"
-
-gUnknown_0203A034: @ 203A034
- .space 0x4
-
+ .include "src/contest_link_80F57C4.o"
.include "src/rotating_gate.o"
.include "src/safari_zone.o"
-
-gUnknown_0203A0F4: @ 203A0F4
- .space 0x4
-
+ .include "src/item_use.o"
.include "src/battle_anim_effects_1.o"
-
-gUnknown_0203A100: @ 203A100
- .space 0x10
-
+ .include "src/dragon.o"
.include "src/battle_anim_utility_funcs.o"
.include "src/battle_intro.o"
.include "src/easy_chat.o"