summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-08-14 23:39:08 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2017-08-14 23:39:08 +0200
commitbe40e2196a84f0e6c3a5fb47829f52a88bd55937 (patch)
tree8c3ca681ffa80ae1f05f5f6dd9e4312f3cf234f1
parent1e2dc716025614209e58c672afd73d4c86d7c2c7 (diff)
all data moved from asm to c
-rw-r--r--common_syms/pokeblock_feed.txt12
-rw-r--r--data/mon_pokeblock_anims.inc133
-rw-r--r--data/pokeblock_feed.s225
-rw-r--r--ld_script.txt2
-rw-r--r--src/pokeblock_feed.c566
-rw-r--r--sym_common.txt35
-rw-r--r--sym_ewram.txt7
7 files changed, 504 insertions, 476 deletions
diff --git a/common_syms/pokeblock_feed.txt b/common_syms/pokeblock_feed.txt
new file mode 100644
index 000000000..b4c1e0982
--- /dev/null
+++ b/common_syms/pokeblock_feed.txt
@@ -0,0 +1,12 @@
+gPokeblockFeedPokeSprite
+gPokeblockFeedMonSpecies
+gPokeblockMonNotFlipped
+gPokeblockFeedMonSpriteID
+gPokeblockFeedMonNature
+gUnknown_03005F34
+gPokeblockFeedUnused0
+gUnknown_03005F3C
+gUnknown_03005F40
+gPokeblockFeedPokeSpriteCopy
+gUnknown_03005F94
+gUnknown_03005FA0 \ No newline at end of file
diff --git a/data/mon_pokeblock_anims.inc b/data/mon_pokeblock_anims.inc
deleted file mode 100644
index d8df29c1d..000000000
--- a/data/mon_pokeblock_anims.inc
+++ /dev/null
@@ -1,133 +0,0 @@
-gNatureToMonPokeblockAnim:: @ 8411A10
- .byte 0, 0 @ HARDY
- .byte 3, 0 @ LONELY
- .byte 4, 1 @ BRAVE
- .byte 5, 0 @ ADAMANT
- .byte 10, 0 @ NAUGHTY
- .byte 13, 0 @ BOLD
- .byte 15, 0 @ DOCILE
- .byte 16, 2 @ RELAXED
- .byte 18, 0 @ IMPISH
- .byte 19, 0 @ LAX
- .byte 20, 0 @ TIMID
- .byte 25, 0 @ HASTY
- .byte 27, 3 @ SERIOUS
- .byte 28, 0 @ JOLLY
- .byte 29, 0 @ NAIVE
- .byte 33, 4 @ MODEST
- .byte 36, 0 @ MILD
- .byte 37, 0 @ QUIET
- .byte 39, 0 @ BASHFUL
- .byte 42, 0 @ RASH
- .byte 45, 0 @ CALM
- .byte 46, 5 @ GENTLE
- .byte 47, 6 @ SASSY
- .byte 48, 0 @ CAREFUL
- .byte 53, 0 @ QUIRKY
-
- .align 1
-gMonPokeblockAnims:: @ 8411A42
- @ HARDY
- .2byte 0, 4, 0, 8, 24, 0, 0, 0, 12, 0
- .2byte 0, 4, 0, 16, 24, 0, 0, 0, 12, 0
- .2byte 0, 4, 0, 32, 32, 0, 0, 0, 16, 1
-
- @ LONELY
- .2byte 0, 3, 6, 0, 48, 0, 0, 0, 24, 1
-
- @ BRAVE
- .2byte 64, 16, -24, 0, 32, 0, 0, 0, 0, 1
-
- @ ADAMANT
- .2byte 0, 4, 8, 0, 16, 0, -8, 0, 0, 0
- .2byte 0, 0, 0, 0, 16, 0, 0, 0, 0, 0
- .2byte 0, 4, 8, 0, 16, 0, -8, 0, 0, 0
- .2byte 0, 0, 0, 0, 16, 0, 0, 0, 0, 0
- .2byte 0, 4, -16, 0, 4, 0, 16, 0, 0, 1
-
- @ NAUGHTY
- .2byte 0, 3, 6, 0, 12, 0, 0, 0, 6, 0
- .2byte 0, 3, -6, 0, 12, 0, 0, 0, 6, 0
- .2byte 0, 16, 16, 0, 45, 1, 0, 0, 0, 1
-
- @ BOLD
- .2byte 0, 16, 0, 24, 32, 0, 0, 0, 16, 0
- .2byte 0, 16, 0, 23, 32, 0, 0, 0, 16, 1
-
- @ DOCILE
- .2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 1
-
- @ RELAXED
- .2byte 0, 2, 8, 0, 32, 0, 0, 0, 0, 0
- .2byte 0, 2, -8, 0, 32, 0, 0, 0, 0, 1
-
- @ IMPISH
- .2byte 0, 32, 2, 1, 48, 1, 0, 0, 24, 1
-
- @ LAX
- .2byte 0, 2, 16, 16, 128, 0, 0, 0, 0, 1
-
- @ TIMID
- .2byte 0, 2, -8, 0, 48, 0, -24, 0, 0, 0
- .2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
- .2byte 64, 32, 2, 0, 36, 0, 0, 0, 0, 0
- .2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
- .2byte 0, 2, 8, 0, 48, 0, 24, 0, 0, 1
-
- @ HASTY
- .2byte 64, 24, 16, 0, 32, 0, 0, 0, 0, 0
- .2byte 0, 28, 2, 1, 32, 1, 0, 0, 16, 1
-
- @ SERIOUS
- .2byte 0, 0, 0, 0, 32, 0, 0, 0, 0, 1
-
- @ JOLLY
- .2byte 64, 16, -16, 2, 48, 0, 0, 0, 32, 1
-
- @ NAIVE
- .2byte 0, 12, -8, 4, 24, 0, 8, 0, 12, 0
- .2byte 0, 12, 8, 8, 24, 0, -16, 0, 12, 0
- .2byte 0, 12, -8, 16, 24, 0, 16, 0, 12, 0
- .2byte 0, 12, 8, 28, 24, 0, -8, 0, 12, 1
-
- @ MODEST
- .2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
- .2byte 64, 16, -4, 0, 32, 0, 0, 0, 0, 0
- .2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 1
-
- @ MILD
- .2byte 128, 4, 0, 8, 64, 0, 0, 0, 0, 1
-
- @ QUIET
- .2byte 0, 2, 16, 0, 48, 0, 0, 0, 0, 0
- .2byte 128, 2, 16, 0, 48, 0, 0, 0, 0, 1
-
- @ BASHFUL
- .2byte 0, 2, -4, 0, 48, 0, -48, 0, 0, 0
- .2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 0
- .2byte 0, 2, 8, 0, 24, 0, 48, 0, 0, 1
-
- @ RASH
- .2byte 64, 4, 64, 58, 52, 0, -88, 0, 0, 0
- .2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 0
- .2byte 0, 24, 80, 0, 32, 0, 88, 0, 0, 1
-
- @ CALM
- .2byte 0, 2, 16, 4, 64, 0, 0, 0, 0, 1
-
- @ GENTLE
- .2byte 0, 0, 0, 0, 32, 0, 0, 0, 0, 1
-
- @ SASSY
- .2byte 0, 0, 0, 0, 42, 0, 0, 0, 0, 1
-
- @ CAREFUL
- .2byte 0, 4, 0, 8, 24, 0, 0, 0, 12, 0
- .2byte 0, 0, 0, 0, 12, 0, 0, 0, 0, 0
- .2byte 0, 4, 0, 12, 24, 0, 0, 0, 12, 0
- .2byte 0, 0, 0, 0, 12, 0, 0, 0, 0, 0
- .2byte 0, 4, 0, 4, 24, 0, 0, 0, 12, 1
-
- @ QUIRKY
- .2byte 0, 4, 16, 12, 64, 0, 0, 0, 0, 0
- .2byte 0, -4, 16, 12, 64, 0, 0, 0, 0, 1
diff --git a/data/pokeblock_feed.s b/data/pokeblock_feed.s
deleted file mode 100644
index ae5b17d12..000000000
--- a/data/pokeblock_feed.s
+++ /dev/null
@@ -1,225 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-@ 8411A10
- .include "data/mon_pokeblock_anims.inc"
-
- .align 2
-gSpriteAffineAnim_8411E90:: @ 8411E90
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411EA0:: @ 8411EA0
- obj_rot_scal_anim_frame 0x0, 0x0, 12, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 30
- obj_rot_scal_anim_frame 0x0, 0x0, -12, 1
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411EC0:: @ 8411EC0
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, 12, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 28
- obj_rot_scal_anim_frame 0x0, 0x0, -4, 3
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411EE8:: @ 8411EE8
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 32
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411F08:: @ 8411F08
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 32
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411F30:: @ 8411F30
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411F50:: @ 8411F50
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411F78:: @ 8411F78
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 32
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411F98:: @ 8411F98
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 32
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411FC0:: @ 8411FC0
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 4
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 24
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 4
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8411FE0:: @ 8411FE0
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, -1, 4
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 24
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 4
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8412008:: @ 8412008
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 24
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
- obj_rot_scal_anim_frame 0x0, 0x0, -12, 2
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8412028:: @ 8412028
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, 1, 24
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
- obj_rot_scal_anim_frame 0x0, 0x0, -12, 2
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnimTable_8412050:: @ 8412050
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411EA0
- .4byte gSpriteAffineAnim_8411EE8
- .4byte gSpriteAffineAnim_8411F30
- .4byte gSpriteAffineAnim_8411F78
- .4byte gSpriteAffineAnim_8411FC0
- .4byte gSpriteAffineAnim_8412008
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411EC0
- .4byte gSpriteAffineAnim_8411F08
- .4byte gSpriteAffineAnim_8411F50
- .4byte gSpriteAffineAnim_8411F98
- .4byte gSpriteAffineAnim_8411FE0
- .4byte gSpriteAffineAnim_8412028
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
- .4byte gSpriteAffineAnim_8411E90
-
- .align 2
-gUnknown_084120A4:: @ 84120A4
- .4byte gPokeblockRed_Pal
- .4byte gPokeblockBlue_Pal
- .4byte gPokeblockPink_Pal
- .4byte gPokeblockGreen_Pal
- .4byte gPokeblockYellow_Pal
- .4byte gPokeblockPurple_Pal
- .4byte gPokeblockIndigo_Pal
- .4byte gPokeblockBrown_Pal
- .4byte gPokeblockLiteBlue_Pal
- .4byte gPokeblockOlive_Pal
- .4byte gPokeblockGray_Pal
- .4byte gPokeblockBlack_Pal
- .4byte gPokeblockWhite_Pal
- .4byte gPokeblockGold_Pal
-
- .align 2
-gSpriteAffineAnim_84120DC:: @ 84120DC
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnimTable_84120EC:: @ 84120EC
- .4byte gSpriteAffineAnim_84120DC
-
- .align 2
-gSpriteAffineAnim_84120F0:: @ 84120F0
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 8
- obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnim_8412148:: @ 8412148
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
- obj_rot_scal_anim_frame 0x0, 0x0, 0, 8
- obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
- obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
- obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
- obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
- obj_rot_scal_anim_end
-
- .align 2
-gSpriteAffineAnimTable_84121A0:: @ 84121A0
- .4byte gSpriteAffineAnim_84120DC
-
- .align 2
-gSpriteAffineAnimTable_84121A4:: @ 84121A4
- .4byte gSpriteAffineAnim_84120F0
-
- .align 2
-gSpriteAffineAnimTable_84121A8:: @ 84121A8
- .4byte gSpriteAffineAnim_8412148
-
- .align 2
-gOamData_84121AC:: @ 84121AC
- .2byte 0x0300
- .2byte 0x0000
- .2byte 0x0400
-
- .align 2
-gSpriteAnim_84121B4:: @ 84121B4
- obj_image_anim_frame 0, 0
- obj_image_anim_end
-
- .align 2
-gSpriteAnimTable_84121BC:: @ 84121BC
- .4byte gSpriteAnim_84121B4
-
- .align 2
-gSpriteAffineAnim_84121C0:: @ 84121C0
- obj_rot_scal_anim_frame 0x100, 0x100, 0, 0
- obj_rot_scal_anim_frame 0xFFF8, 0xFFF8, 0, 1
- obj_rot_scal_anim_jump 1
-
- .align 2
-gSpriteAffineAnimTable_84121D8:: @ 84121D8
- .4byte gSpriteAffineAnim_84121C0
-
- .align 2
-gUnknown_084121DC:: @ 84121DC
- obj_tiles gPokeblock_Gfx, 0x20, 14818
-
- .align 2
-gSpriteTemplate_84121E4:: @ 84121E4
- spr_template 14818, 14818, gOamData_84121AC, gSpriteAnimTable_84121BC, NULL, gSpriteAffineAnimTable_84121D8, sub_81481B0
diff --git a/ld_script.txt b/ld_script.txt
index 31f9ea495..8c34b4d6f 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -472,7 +472,7 @@ SECTIONS {
src/strings.o(.rodata);
src/berry_tag_screen.o(.rodata);
src/save_failed_screen.o(.rodata);
- data/pokeblock_feed.o(.rodata);
+ src/pokeblock_feed.o(.rodata);
data/intro_credits_graphics.o(.rodata);
data/evolution_graphics.o(.rodata);
data/bard_music.o(.rodata);
diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c
index f99eca690..18808e8af 100644
--- a/src/pokeblock_feed.c
+++ b/src/pokeblock_feed.c
@@ -24,50 +24,476 @@ extern u8 ewram[];
extern struct MusicPlayerInfo gMPlay_BGM;
extern u8 gPokeblockMonID;
extern s16 gPokeblockGain;
-extern struct CompressedSpritePalette sPokeblockFeedSpritePal;
+
+extern const u8 gPokeblockRed_Pal[];
+extern const u8 gPokeblockBlue_Pal[];
+extern const u8 gPokeblockPink_Pal[];
+extern const u8 gPokeblockGreen_Pal[];
+extern const u8 gPokeblockYellow_Pal[];
+extern const u8 gPokeblockPurple_Pal[];
+extern const u8 gPokeblockIndigo_Pal[];
+extern const u8 gPokeblockBrown_Pal[];
+extern const u8 gPokeblockLiteBlue_Pal[];
+extern const u8 gPokeblockOlive_Pal[];
+extern const u8 gPokeblockGray_Pal[];
+extern const u8 gPokeblockBlack_Pal[];
+extern const u8 gPokeblockWhite_Pal[];
+extern const u8 gPokeblockGold_Pal[];
+
+extern const u8 gPokeblock_Gfx[];
void sub_8147F4C(u8 taskID);
bool8 sub_8040A3C(u16 species);
+// this file's functions
+static void sub_8147B04(void);
+static void sub_81481DC(void);
+static void sub_814825C(void);
+static u8 sub_81480B4(void);
+static u8 sub_814817C(void);
+static u8 sub_8147F84(struct Pokemon* mon);
+static bool8 sub_8147B20(struct Pokemon* mon);
+static void sub_8147DDC(u8);
+static void sub_8148044(u8);
+static void sub_8148078(struct Sprite* sprite);
+static void Task_PrintAtePokeblockText(u8 taskID);
+static void SetPokeblockFeedSpritePal(u8);
+static void sub_8148108(u8, bool8);
+static bool8 sub_8148540(void);
+static bool8 sub_81485CC(void);
+static bool8 FreePokeSpriteMatrix(void);
+void sub_8148710(void);
+static void sub_81481B0(struct Sprite* sprite);
+static void sub_814862C(void);
+
+// EWRAM
+EWRAM_DATA static struct CompressedSpritePalette sPokeblockFeedSpritePal = {0};
+
// IWRAM common
+struct Sprite* gPokeblockFeedPokeSprite;
+u16 gPokeblockFeedMonSpecies;
+bool8 gPokeblockMonNotFlipped;
+u8 gPokeblockFeedMonSpriteID;
+u8 gPokeblockFeedMonNature;
+u16 gUnknown_03005F34;
+u8 gPokeblockFeedUnused0;
+u8 gUnknown_03005F3C;
+u8 gUnknown_03005F40;
+struct Sprite gPokeblockFeedPokeSpriteCopy;
+u16 gUnknown_03005F94;
+s16 gUnknown_03005FA0[24];
+
+// rodata
+
+static const u8 sNatureToMonPokeblockAnim[][2] =
+{
+ { 0, 0 }, // HARDY
+ { 3, 0 }, // LONELY
+ { 4, 1 }, // BRAVE
+ { 5, 0 }, // ADAMANT
+ { 10, 0 }, // NAUGHTY
+ { 13, 0 }, // BOLD
+ { 15, 0 }, // DOCILE
+ { 16, 2 }, // RELAXED
+ { 18, 0 }, // IMPISH
+ { 19, 0 }, // LAX
+ { 20, 0 }, // TIMID
+ { 25, 0 }, // HASTY
+ { 27, 3 }, // SERIOUS
+ { 28, 0 }, // JOLLY
+ { 29, 0 }, // NAIVE
+ { 33, 4 }, // MODEST
+ { 36, 0 }, // MILD
+ { 37, 0 }, // QUIET
+ { 39, 0 }, // BASHFUL
+ { 42, 0 }, // RASH
+ { 45, 0 }, // CALM
+ { 46, 5 }, // GENTLE
+ { 47, 6 }, // SASSY
+ { 48, 0 }, // CAREFUL
+ { 53, 0 }, // QUIRKY
+};
+
+static const s16 sMonPokeblockAnims[][10] =
+{
+ // HARDY
+ { 0, 4, 0, 8, 24, 0, 0, 0, 12, 0},
+ { 0, 4, 0, 16, 24, 0, 0, 0, 12, 0},
+ { 0, 4, 0, 32, 32, 0, 0, 0, 16, 1},
+
+ // LONELY
+ { 0, 3, 6, 0, 48, 0, 0, 0, 24, 1},
+
+ // BRAVE
+ { 64, 16, -24, 0, 32, 0, 0, 0, 0, 1},
+
+ // ADAMANT
+ { 0, 4, 8, 0, 16, 0, -8, 0, 0, 0},
+ { 0, 0, 0, 0, 16, 0, 0, 0, 0, 0},
+ { 0, 4, 8, 0, 16, 0, -8, 0, 0, 0},
+ { 0, 0, 0, 0, 16, 0, 0, 0, 0, 0},
+ { 0, 4, -16, 0, 4, 0, 16, 0, 0, 1},
+
+ // NAUGHTY
+ { 0, 3, 6, 0, 12, 0, 0, 0, 6, 0},
+ { 0, 3, -6, 0, 12, 0, 0, 0, 6, 0},
+ { 0, 16, 16, 0, 45, 1, 0, 0, 0, 1},
+
+ // BOLD
+ { 0, 16, 0, 24, 32, 0, 0, 0, 16, 0},
+ { 0, 16, 0, 23, 32, 0, 0, 0, 16, 1},
+
+ // DOCILE
+ { 0, 0, 0, 0, 80, 0, 0, 0, 0, 1},
+
+ // RELAXED
+ { 0, 2, 8, 0, 32, 0, 0, 0, 0, 0},
+ { 0, 2, -8, 0, 32, 0, 0, 0, 0, 1},
+
+ // IMPISH
+ { 0, 32, 2, 1, 48, 1, 0, 0, 24, 1},
+
+ // LAX
+ { 0, 2, 16, 16, 128, 0, 0, 0, 0, 1},
+
+ // TIMID
+ { 0, 2, -8, 0, 48, 0, -24, 0, 0, 0},
+ { 0, 0, 0, 0, 8, 0, 0, 0, 0, 0},
+ { 64, 32, 2, 0, 36, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 8, 0, 0, 0, 0, 0},
+ { 0, 2, 8, 0, 48, 0, 24, 0, 0, 1},
+
+ // HASTY
+ { 64, 24, 16, 0, 32, 0, 0, 0, 0, 0},
+ { 0, 28, 2, 1, 32, 1, 0, 0, 16, 1},
+
+ // SERIOUS
+ { 0, 0, 0, 0, 32, 0, 0, 0, 0, 1},
+
+ // JOLLY
+ { 64, 16, -16, 2, 48, 0, 0, 0, 32, 1},
+
+ // NAIVE
+ { 0, 12, -8, 4, 24, 0, 8, 0, 12, 0},
+ { 0, 12, 8, 8, 24, 0, -16, 0, 12, 0},
+ { 0, 12, -8, 16, 24, 0, 16, 0, 12, 0},
+ { 0, 12, 8, 28, 24, 0, -8, 0, 12, 1},
+
+ // MODEST
+ { 0, 0, 0, 0, 8, 0, 0, 0, 0, 0},
+ { 64, 16, -4, 0, 32, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 8, 0, 0, 0, 0, 1},
+
+ // MILD
+ { 128, 4, 0, 8, 64, 0, 0, 0, 0, 1},
+
+ // QUIET
+ { 0, 2, 16, 0, 48, 0, 0, 0, 0, 0},
+ { 128, 2, 16, 0, 48, 0, 0, 0, 0, 1},
+
+ // BASHFUL
+ { 0, 2, -4, 0, 48, 0, -48, 0, 0, 0},
+ { 0, 0, 0, 0, 80, 0, 0, 0, 0, 0},
+ { 0, 2, 8, 0, 24, 0, 48, 0, 0, 1},
+
+ // RASH
+ { 64, 4, 64, 58, 52, 0, -88, 0, 0, 0},
+ { 0, 0, 0, 0, 80, 0, 0, 0, 0, 0},
+ { 0, 24, 80, 0, 32, 0, 88, 0, 0, 1},
+
+ // CALM
+ { 0, 2, 16, 4, 64, 0, 0, 0, 0, 1},
+
+ // GENTLE
+ { 0, 0, 0, 0, 32, 0, 0, 0, 0, 1},
+
+ // SASSY
+ { 0, 0, 0, 0, 42, 0, 0, 0, 0, 1},
+
+ // CAREFUL
+ { 0, 4, 0, 8, 24, 0, 0, 0, 12, 0},
+ { 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
+ { 0, 4, 0, 12, 24, 0, 0, 0, 12, 0},
+ { 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
+ { 0, 4, 0, 4, 24, 0, 0, 0, 12, 1},
+
+ // QUIRKY
+ { 0, 4, 16, 12, 64, 0, 0, 0, 0, 0},
+ { 0, -4, 16, 12, 64, 0, 0, 0, 0, 1},
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411E90[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411EA0[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, 12, 1),
+ AFFINEANIMCMD_FRAME(0, 0, 0, 30),
+ AFFINEANIMCMD_FRAME(0, 0, -12, 1),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411EC0[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0, 0, 12, 1),
+ AFFINEANIMCMD_FRAME(0, 0, 0, 28),
+ AFFINEANIMCMD_FRAME(0, 0, -4, 3),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411EE8[] =
+{
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 32),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 16),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411F08[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 32),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 16),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411F30[] =
+{
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 8),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411F50[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 8),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411F78[] =
+{
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 32),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 8),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411F98[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 32),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 8),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411FC0[] =
+{
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 4),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 24),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 4),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8411FE0[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -1, 4),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 24),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 4),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8412008[] =
+{
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 24),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -12, 2),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8412028[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 1, 24),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 16),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -12, 2),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_8412050[] =
+{
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411EA0,
+ gSpriteAffineAnim_8411EE8,
+ gSpriteAffineAnim_8411F30,
+ gSpriteAffineAnim_8411F78,
+ gSpriteAffineAnim_8411FC0,
+ gSpriteAffineAnim_8412008,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411EC0,
+ gSpriteAffineAnim_8411F08,
+ gSpriteAffineAnim_8411F50,
+ gSpriteAffineAnim_8411F98,
+ gSpriteAffineAnim_8411FE0,
+ gSpriteAffineAnim_8412028,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+ gSpriteAffineAnim_8411E90,
+};
+
+static const u8* const sPokeblocksPals[] =
+{
+ gPokeblockRed_Pal,
+ gPokeblockBlue_Pal,
+ gPokeblockPink_Pal,
+ gPokeblockGreen_Pal,
+ gPokeblockYellow_Pal,
+ gPokeblockPurple_Pal,
+ gPokeblockIndigo_Pal,
+ gPokeblockBrown_Pal,
+ gPokeblockLiteBlue_Pal,
+ gPokeblockOlive_Pal,
+ gPokeblockGray_Pal,
+ gPokeblockBlack_Pal,
+ gPokeblockWhite_Pal,
+ gPokeblockGold_Pal
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_84120DC[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_84120EC[] =
+{
+ gSpriteAffineAnim_84120DC
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_84120F0[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 16, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 16, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 16, 1),
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_8412148[] =
+{
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 8, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -16, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -16, 1),
+ AFFINEANIMCMD_FRAME(0x0, 0x0, -16, 1),
+ AFFINEANIMCMD_FRAME(0xFF00, 0x100, 0, 0),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_84121A0[] =
+{
+ gSpriteAffineAnim_84120DC
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_84121A4[] =
+{
+ gSpriteAffineAnim_84120F0
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_84121A8[] =
+{
+ gSpriteAffineAnim_8412148
+};
+
+static const struct OamData gOamData_84121AC =
+{
+ .y = 0,
+ .affineMode = 3,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 0,
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+ .affineParam = 0,
+};
+
+static const union AnimCmd gSpriteAnim_84121B4[] =
+{
+ ANIMCMD_FRAME(0, 0),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const gSpriteAnimTable_84121BC[] =
+{
+ gSpriteAnim_84121B4,
+};
+
+static const union AffineAnimCmd gSpriteAffineAnim_84121C0[] =
+{
+ AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 1),
+ AFFINEANIMCMD_JUMP(1)
+};
+
+static const union AffineAnimCmd *const gSpriteAffineAnimTable_84121D8[] =
+{
+ gSpriteAffineAnim_84121C0
+};
+
+static const struct CompressedSpriteSheet gUnknown_084121DC =
+{
+ gPokeblock_Gfx, 0x20, 14818
+};
+
+static const struct SpriteTemplate gSpriteTemplate_84121E4 =
+{
+ .tileTag = 14818,
+ .paletteTag = 14818,
+ .oam = &gOamData_84121AC,
+ .anims = gSpriteAnimTable_84121BC,
+ .images = NULL,
+ .affineAnims = gSpriteAffineAnimTable_84121D8,
+ .callback = sub_81481B0
+};
extern const struct CompressedSpriteSheet gUnknown_083F7F74;
-extern const struct CompressedSpriteSheet gUnknown_084121DC;
extern const struct CompressedSpritePalette gUnknown_083F7F7C;
extern const u8 gBattleTerrainTiles_Building[];
extern const u8 gUnknown_08E782FC[];
extern const u8 gBattleTerrainPalette_BattleTower[];
-extern const u8* const gUnknown_084120A4[];
-extern const union AffineAnimCmd* const gSpriteAffineAnimTable_84120EC[];
-extern const union AffineAnimCmd* const gSpriteAffineAnimTable_84121A0[];
-extern const union AffineAnimCmd* const gSpriteAffineAnimTable_84121A4[];
-extern const union AffineAnimCmd* const gSpriteAffineAnimTable_84121A8[];
-extern const union AffineAnimCmd* const gSpriteAffineAnimTable_8412050[];
-extern const struct SpriteTemplate gSpriteTemplate_84121E4;
-extern const u8 gNatureToMonPokeblockAnim[][2];
-extern const s16 gMonPokeblockAnims[][10];
-// this file's functions
-void sub_8147B04(void);
-void sub_81481DC(void);
-void sub_814825C(void);
-u8 sub_81480B4(void);
-u8 sub_814817C(void);
-u8 sub_8147F84(struct Pokemon* mon);
-bool8 sub_8147B20(struct Pokemon* mon);
-void sub_8147DDC(u8);
-void sub_8148044(u8);
-void sub_8148078(struct Sprite* sprite);
-void Task_PrintAtePokeblockText(u8 taskID);
-void SetPokeblockFeedSpritePal(u8);
-void sub_8148108(u8, bool8);
-bool8 sub_8148540(void);
-bool8 sub_81485CC(void);
-static bool8 FreePokeSpriteMatrix(void);
-void sub_8148710(void);
-void sub_814862C(void);
+// code
-void sub_8147890(void)
+static void sub_8147890(void)
{
AnimateSprites();
BuildOamBuffer();
@@ -75,14 +501,14 @@ void sub_8147890(void)
UpdatePaletteFade();
}
-void sub_81478A8(void)
+static void sub_81478A8(void)
{
LoadOam();
ProcessSpriteCopyRequests();
TransferPlttBuffer();
}
-bool8 sub_81478BC(void)
+static bool8 sub_81478BC(void)
{
switch (gMain.state)
{
@@ -177,13 +603,13 @@ void sub_8147ADC(void)
}
}
-void sub_8147B04(void)
+static void sub_8147B04(void)
{
REG_BG1CNT = 0x1D02l;
REG_DISPCNT = 0x1340;
}
-bool8 sub_8147B20(struct Pokemon* mon)
+static bool8 sub_8147B20(struct Pokemon* mon)
{
u16 species;
u32 PiD, TiD;
@@ -241,18 +667,14 @@ bool8 sub_8147B20(struct Pokemon* mon)
return 0;
}
-void SetPokeblockFeedSpritePal(u8 pkbID)
+static void SetPokeblockFeedSpritePal(u8 pkbID)
{
u8 color = GetPokeblockData(&gSaveBlock1.pokeblocks[pkbID], PBLOCK_COLOR);
- sPokeblockFeedSpritePal.data = gUnknown_084120A4[color - 1];
+ sPokeblockFeedSpritePal.data = sPokeblocksPals[color - 1];
sPokeblockFeedSpritePal.tag = 0x39E2;
}
-extern u16 gUnknown_03005F94;
-extern u16 gUnknown_03005F34;
-extern u8 gUnknown_03005F3C;
-
-void sub_8147CC8(u8 taskID)
+static void sub_8147CC8(u8 taskID)
{
if (!gPaletteFade.active)
{
@@ -286,20 +708,20 @@ void sub_8147CC8(u8 taskID)
}
}
-void sub_8147DDC(u8 a0)
+static void sub_8147DDC(u8 a0)
{
u8 taskID = CreateTask(sub_8147CC8, 0);
gTasks[taskID].data[0] = 0;
gTasks[taskID].data[1] = a0;
}
-void sub_8147E10(u8 taskID)
+static void sub_8147E10(u8 taskID)
{
if (MenuUpdateWindowText() == 1)
gTasks[taskID].func = sub_8147F4C;
}
-void Task_PrintAtePokeblockText(u8 taskID)
+static void Task_PrintAtePokeblockText(u8 taskID)
{
struct Pokemon* mon = &gPlayerParty[gPokeblockMonID];
struct Pokeblock* pokeblock = &gSaveBlock1.pokeblocks[gScriptItemId];
@@ -319,7 +741,7 @@ void Task_PrintAtePokeblockText(u8 taskID)
gTasks[taskID].func = sub_8147E10;
}
-void sub_8147F08(u8 taskID)
+static void sub_8147F08(u8 taskID)
{
if (!gPaletteFade.active)
{
@@ -335,12 +757,7 @@ void sub_8147F4C(u8 taskID)
gTasks[taskID].func = sub_8147F08;
}
-extern u16 gPokeblockFeedMonSpecies;
-extern u8 gPokeblockFeedMonSpriteID;
-extern u8 gPokeblockFeedMonNature;
-extern bool8 gPokeblockMonNotFlipped;
-
-u8 sub_8147F84(struct Pokemon* mon)
+static u8 sub_8147F84(struct Pokemon* mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2);
u8 spriteID = CreateSprite(&gUnknown_02024E8C, 48, 80, 2);
@@ -361,7 +778,7 @@ u8 sub_8147F84(struct Pokemon* mon)
return spriteID;
}
-void sub_8148044(u8 spriteID)
+static void sub_8148044(u8 spriteID)
{
gSprites[spriteID].pos1.x = 48;
gSprites[spriteID].pos1.y = 80;
@@ -370,7 +787,7 @@ void sub_8148044(u8 spriteID)
gSprites[spriteID].callback = sub_8148078;
}
-void sub_8148078(struct Sprite* sprite)
+static void sub_8148078(struct Sprite* sprite)
{
sprite->pos1.x += 4;
sprite->pos1.y += sprite->data0;
@@ -381,7 +798,7 @@ void sub_8148078(struct Sprite* sprite)
sprite->callback = SpriteCallbackDummy;
}
-u8 sub_81480B4(void)
+static u8 sub_81480B4(void)
{
u8 spriteID = sub_810BA50(188, 100, 2);
gSprites[spriteID].oam.affineMode = 1;
@@ -391,7 +808,7 @@ u8 sub_81480B4(void)
return spriteID;
}
-void sub_8148108(u8 spriteID, bool8 a1)
+static void sub_8148108(u8 spriteID, bool8 a1)
{
FreeOamMatrix(gSprites[spriteID].oam.matrixNum);
gSprites[spriteID].oam.affineMode = 3;
@@ -402,7 +819,7 @@ void sub_8148108(u8 spriteID, bool8 a1)
InitSpriteAffineAnim(&gSprites[spriteID]);
}
-u8 sub_814817C(void)
+static u8 sub_814817C(void)
{
u8 spriteID = CreateSprite(&gSpriteTemplate_84121E4, 174, 84, 1);
gSprites[spriteID].data0 = -12;
@@ -410,7 +827,7 @@ u8 sub_814817C(void)
return spriteID;
}
-void sub_81481B0(struct Sprite* sprite)
+static void sub_81481B0(struct Sprite* sprite)
{
sprite->pos1.x -= 4;
sprite->pos1.y += sprite->data0;
@@ -419,31 +836,26 @@ void sub_81481B0(struct Sprite* sprite)
DestroySprite(sprite);
}
-void sub_81481DC(void)
+static void sub_81481DC(void)
{
u8 animID, i;
gUnknown_03005F34 = 1;
- animID = gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][0];
+ animID = sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][0];
for (i = 0; i < 8; i++, animID++)
{
- gUnknown_03005F34 += gMonPokeblockAnims[animID][4];
- if (gMonPokeblockAnims[animID][9] == 1)
+ gUnknown_03005F34 += sMonPokeblockAnims[animID][4];
+ if (sMonPokeblockAnims[animID][9] == 1)
break;
}
}
-extern struct Sprite gPokeblockFeedPokeSpriteCopy;
-extern struct Sprite* gPokeblockFeedPokeSprite;
-extern u8 gUnknown_03005F40;
-extern s16 gUnknown_03005FA0[];
-
-void sub_814825C(void)
+static void sub_814825C(void)
{
switch (gUnknown_03005F3C)
{
case 0:
- gUnknown_03005F40 = gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][0];
+ gUnknown_03005F40 = sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][0];
gPokeblockFeedPokeSprite = &gSprites[gPokeblockFeedMonSpriteID];
gPokeblockFeedPokeSpriteCopy = *gPokeblockFeedPokeSprite;
gUnknown_03005F3C = 10;
@@ -452,7 +864,7 @@ void sub_814825C(void)
break;
case 10:
sub_8148540();
- if (gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] != 0)
+ if (sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] != 0)
{
gPokeblockFeedPokeSprite->oam.affineMode = 3;
gPokeblockFeedPokeSprite->oam.matrixNum = 0;
@@ -461,12 +873,12 @@ void sub_814825C(void)
}
gUnknown_03005F3C = 50;
case 50:
- if (gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] != 0)
+ if (sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] != 0)
{
if (gPokeblockMonNotFlipped == 0)
- StartSpriteAffineAnim(gPokeblockFeedPokeSprite, gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] + 10);
+ StartSpriteAffineAnim(gPokeblockFeedPokeSprite, sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1] + 10);
else
- StartSpriteAffineAnim(gPokeblockFeedPokeSprite, gNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1]);
+ StartSpriteAffineAnim(gPokeblockFeedPokeSprite, sNatureToMonPokeblockAnim[gPokeblockFeedMonNature][1]);
}
gUnknown_03005F3C = 60;
break;
@@ -496,11 +908,11 @@ void sub_814825C(void)
}
}
-bool8 sub_8148540(void)
+static bool8 sub_8148540(void)
{
u8 i;
for (i = 0; i < 10; i++)
- gUnknown_03005FA0[i] = gMonPokeblockAnims[gUnknown_03005F40][i];
+ gUnknown_03005FA0[i] = sMonPokeblockAnims[gUnknown_03005F40][i];
if (gUnknown_03005FA0[4] == 0)
return 1;
else
@@ -518,7 +930,7 @@ bool8 sub_8148540(void)
}
}
-bool8 sub_81485CC(void)
+static bool8 sub_81485CC(void)
{
u16 var = gUnknown_03005FA0[12] - gUnknown_03005FA0[4];
@@ -537,7 +949,7 @@ static bool8 FreePokeSpriteMatrix(void)
return 0;
}
-void sub_814862C(void)
+static void sub_814862C(void)
{
u16 i;
u16 r8 = gUnknown_03005FA0[8];
diff --git a/sym_common.txt b/sym_common.txt
index f4a5bfb48..3278fefcf 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -293,40 +293,7 @@ gUnknown_03005F10: @ 3005F10
gUnknown_03005F14: @ 3005F14
.space 0xC
-@ pokeblock_feed
-
-gPokeblockFeedPokeSprite: @ 3005F20
- .space 0x4
-
-gPokeblockFeedMonSpecies: @ 3005F24
- .space 0x4
-
-gPokeblockMonNotFlipped: @ 3005F28
- .space 0x4
-
-gPokeblockFeedMonSpriteID: @ 3005F2C
- .space 0x4
-
-gPokeblockFeedMonNature: @ 3005F30
- .space 0x4
-
-gUnknown_03005F34: @ 3005F34
- .space 0x8
-
-gUnknown_03005F3C: @ 3005F3C
- .space 0x4
-
-gUnknown_03005F40: @ 3005F40
- .space 0x10
-
-gPokeblockFeedPokeSpriteCopy: @ 3005F50
- .space 0x44
-
-gUnknown_03005F94: @ 3005F94
- .space 0xC
-
-gUnknown_03005FA0: @ 3005FA0
- .space 0x30
+ .include "pokeblock_feed.o"
.include "m4a_2.o"
.include "agb_flash.o"
diff --git a/sym_ewram.txt b/sym_ewram.txt
index d43a6d52d..c5aa4a906 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -674,12 +674,7 @@ gUnknown_0203931C: @ 203931C
.include "src/berry_tag_screen.o"
.include "src/mystery_event_menu.o"
.include "src/save_failed_screen.o"
-
-@ pokeblock_feed
-
- .align 2
-sPokeblockFeedSpritePal: @ 2039350
- .space 0x8
+ .include "src/pokeblock_feed.o"
@ intro_credits_graphics