diff --git a/data/starter_choose.s b/data/starter_choose.s index 160046d4c..92b95d80c 100644 --- a/data/starter_choose.s +++ b/data/starter_choose.s @@ -4,68 +4,156 @@ .section .rodata + .align 2 gBirchBagGrassPal:: @ 85B0A00 - .incbin "baserom.gba", 0x5b0a00, 0x80 + .incbin "graphics/misc/birch_bag.gbapal" + .incbin "graphics/misc/birch_grass.gbapal" + .align 2 +gBirchBallarrow_Pal:: @ 85B0A40 + .incbin "graphics/misc/birch_ballarrow.gbapal" + + .align 2 +gBirchCircle_Pal:: @ 85B0A60 + .incbin "graphics/misc/birch_circle.gbapal" + + .align 2 gBirchBagTilemap:: @ 85B0A80 - .incbin "baserom.gba", 0x5b0a80, 0x18c + .incbin "graphics/misc/birch_bag_map.bin.lz" + .align 2 gBirchGrassTilemap:: @ 85B0C0C - .incbin "baserom.gba", 0x5b0c0c, 0x1f8 + .incbin "graphics/misc/birch_grass_map.bin.lz" + .align 2 gBirchHelpGfx:: @ 85B0E04 - .incbin "baserom.gba", 0x5b0e04, 0xaa8 + .incbin "graphics/misc/birch_help.4bpp.lz" + .align 2 gUnknown_085B18AC:: @ 85B18AC - .incbin "baserom.gba", 0x5b18AC, 0x520 + .incbin "graphics/misc/birch_ballarrow.4bpp.lz" + .align 2 +gUnknown_085B1BCC:: @ 85B1BCC + .incbin "graphics/misc/birch_circle.4bpp.lz" + + .align 2 gUnknown_085B1DCC:: @ 85B1DCC - .incbin "baserom.gba", 0x5b1dcc, 0x10 + window_template 0x00, 0x03, 0x0f, 0x18, 0x04, 0x0e, 0x0200 + null_window_template + .align 2 gUnknown_085B1DDC:: @ 85B1DDC - .incbin "baserom.gba", 0x5b1ddc, 0x8 + window_template 0x00, 0x18, 0x09, 0x05, 0x04, 0x0e, 0x0260 + .align 2 gUnknown_085B1DE4:: @ 85B1DE4 - .incbin "baserom.gba", 0x5b1de4, 0x8 + window_template 0x00, 0x00, 0x00, 0x0d, 0x04, 0x0e, 0x0274 sPokeballCoords:: @ 85B1DEC - .incbin "baserom.gba", 0x5b1dec, 0x6 + .byte 0x3c, 0x40, 0x78, 0x58, 0xb4, 0x40 gStarterChoose_LabelCoords:: @ 85B1DF2 - .incbin "baserom.gba", 0x5b1df2, 0x6 + .byte 0x00, 0x09, 0x10, 0x0a, 0x08, 0x04 sStarterMon:: @ 85B1DF8 .2byte SPECIES_TREECKO .2byte SPECIES_TORCHIC .2byte SPECIES_MUDKIP -.align 2 + .align 2 gUnknown_085B1E00:: @ 85B1E00 - .incbin "baserom.gba", 0x5b1e00, 0xc + .4byte 0x000001f8, 0x00003072, 0x00001063 gUnknown_085B1E0C:: @ 85B1E0C - .incbin "baserom.gba", 0x5b1e0c, 0x1c + .byte 0x00, 0x01, 0x03 + + .align 2 +gOamData_85B1E10:: @ 85B1E10 + .2byte 0x00a0, 0x8000, 0x0400, 0x0000 + + .align 2 +gOamData_85B1E18:: @ 85B1E18 + .2byte 0x00a0, 0x8000, 0x0400, 0x0000 + + .align 2 +gOamData_85B1E20:: @ 85B1E20 + .2byte 0x03a0, 0xc000, 0x0400, 0x0000 gUnknown_085B1E28:: @ 85B1E28 - .incbin "baserom.gba", 0x5b1e28, 0xa8 + .byte 0x3c, 0x20, 0x78, 0x38, 0xb4, 0x20, 0x00, 0x00 + .align 2 +gSpriteAnim_85B1E30:: @ 85B1E30 + .2byte 0x0030, 0x001e, 0xffff, 0x0000 + + .align 2 +gSpriteAnim_85B1E38:: @ 85B1E38 + .2byte 0x0000, 0x001e, 0xffff, 0x0000 + + .align 2 +gSpriteAnim_85B1E40:: @ 85B1E40 + .2byte 0x0010, 0x0004, 0x0000, 0x0004, 0x0020, 0x0004, 0x0000, 0x0004, 0x0010, 0x0004, 0x0000, 0x0004, 0x0020, 0x0004, 0x0000, 0x0004 + .2byte 0x0000, 0x0020, 0x0010, 0x0008, 0x0000, 0x0008, 0x0020, 0x0008, 0x0000, 0x0008, 0x0010, 0x0008, 0x0000, 0x0008, 0x0020, 0x0008 + .2byte 0x0000, 0x0008, 0xfffe, 0x0000 + + .align 2 +gSpriteAnim_85B1E88:: @ 85B1E88 + .2byte 0x0000, 0x0008, 0xffff, 0x0000 + + .align 2 +gSpriteAnimTable_85B1E90:: @ 85B1E90 + .4byte gSpriteAnim_85B1E30 + + .align 2 +gSpriteAnimTable_85B1E94:: @ 85B1E94 + .4byte gSpriteAnim_85B1E38 + .4byte gSpriteAnim_85B1E40 + + .align 2 +gSpriteAnimTable_85B1E9C:: @ 85B1E9C + .4byte gSpriteAnim_85B1E88 + + .align 2 +gSpriteAffineAnim_85B1EA0:: @ 85B1EA0 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0010, 0x0f00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gSpriteAffineAnim_85B1EB8:: @ 85B1EB8 + .2byte 0x0014, 0x0014, 0x0000, 0x0000, 0x0014, 0x0014, 0x0f00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 gUnknown_085B1ED0:: @ 85B1ED0 - .incbin "baserom.gba", 0x5b1ed0, 0x8 + .4byte gSpriteAffineAnim_85B1EA0 + .align 2 +gSpriteAffineAnimTable_85B1ED4:: @ 85B1ED4 + .4byte gSpriteAffineAnim_85B1EB8 + + .align 2 gUnknown_085B1ED8:: @ 85B1ED8 - .incbin "baserom.gba", 0x5b1ed8, 0x10 + obj_tiles gUnknown_085B18AC, 0x0800, 0x1000 + null_obj_tiles + .align 2 gUnknown_085B1EE8:: @ 85B1EE8 - .incbin "baserom.gba", 0x5b1ee8, 0x10 + obj_tiles gUnknown_085B1BCC, 0x0800, 0x1001 + null_obj_tiles + .align 2 gUnknown_085B1EF8:: @ 85B1EF8 - .incbin "baserom.gba", 0x5b1ef8, 0x18 + obj_pal gBirchBallarrow_Pal, 0x1000 + obj_pal gBirchCircle_Pal, 0x1001 + null_obj_pal + .align 2 sSpriteTemplate_Hand:: @ 85B1F10 - .incbin "baserom.gba", 0x5b1f10, 0x18 + spr_template 0x1000, 0x1000, gOamData_85B1E10, gSpriteAnimTable_85B1E90, NULL, gDummySpriteAffineAnimTable, sub_81346DC + .align 2 sSpriteTemplate_PokeBall:: @ 85B1F28 - .incbin "baserom.gba", 0x5b1f28, 0x18 + spr_template 0x1000, 0x1000, gOamData_85B1E18, gSpriteAnimTable_85B1E94, NULL, gDummySpriteAffineAnimTable, sub_813473C + .align 2 gUnknown_085B1F40:: @ 85B1F40 - .incbin "baserom.gba", 0x5b1f40, 0x18 + spr_template 0x1001, 0x1001, gOamData_85B1E20, gSpriteAnimTable_85B1E9C, NULL, gSpriteAffineAnimTable_85B1ED4, StarterPokemonSpriteCallback diff --git a/graphics/misc/birch_bag.png b/graphics/misc/birch_bag.png new file mode 100644 index 000000000..86bfbbbc0 Binary files /dev/null and b/graphics/misc/birch_bag.png differ diff --git a/graphics/misc/birch_bag_map.bin b/graphics/misc/birch_bag_map.bin new file mode 100644 index 000000000..ddfad5ec9 Binary files /dev/null and b/graphics/misc/birch_bag_map.bin differ diff --git a/graphics/misc/birch_ballarrow.png b/graphics/misc/birch_ballarrow.png new file mode 100644 index 000000000..d2f0a3d97 Binary files /dev/null and b/graphics/misc/birch_ballarrow.png differ diff --git a/graphics/misc/birch_circle.png b/graphics/misc/birch_circle.png new file mode 100644 index 000000000..3501dfec4 Binary files /dev/null and b/graphics/misc/birch_circle.png differ diff --git a/graphics/misc/birch_grass.png b/graphics/misc/birch_grass.png new file mode 100644 index 000000000..838fa5f4c Binary files /dev/null and b/graphics/misc/birch_grass.png differ diff --git a/graphics/misc/birch_grass_map.bin b/graphics/misc/birch_grass_map.bin new file mode 100644 index 000000000..b7332940c Binary files /dev/null and b/graphics/misc/birch_grass_map.bin differ diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 9711b5195..47cc5ad7f 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -18,6 +18,7 @@ SLOTMACHINEGFXDIR := graphics/slot_machine PKNAVGFXDIR := graphics/pokenav PKNAVOPTIONSGFXDIR := graphics/pokenav/options PSSGFXDIR := graphics/pokemon_storage +MISCGFXDIR := graphics/misc types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -307,7 +308,7 @@ graphics/link_games/pkmnjump_bg.4bpp: %.4bpp: %.png graphics/pokenav/region_map.8bpp: %.8bpp: %.png $(GFX) $< $@ -num_tiles 233 -graphics/misc/japanese_hof.4bpp: %.4bpp: %.png +$(MISCGFXDIR)/japanese_hof.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 29 $(INTERFACEGFXDIR)/menu.gbapal: $(INTERFACEGFXDIR)/menu_0.gbapal \ @@ -658,3 +659,6 @@ $(INTERFACEGFXDIR)/region_map.8bpp: %.8bpp: %.png $(INTERFACEGFXDIR)/region_map_affine.8bpp: %.8bpp: %.png $(GFX) $< $@ -num_tiles 233 + +$(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp + @cat $^ >$@ diff --git a/src/starter_choose.c b/src/starter_choose.c index 2d78af8fb..c2c553d46 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -74,7 +74,7 @@ static void Task_MoveStarterChooseCursor(u8 taskId); static void sub_8134668(u8 taskId); static void CreateStarterPokemonLabel(u8 selection); static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y); -static void StarterPokemonSpriteCallback(struct Sprite *sprite); +void StarterPokemonSpriteCallback(struct Sprite *sprite); static IWRAM_DATA u16 sStarterChooseWindowId; @@ -361,7 +361,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) return spriteId; } -static void sub_81346DC(struct Sprite *sprite) +void sub_81346DC(struct Sprite *sprite) { sprite->pos1.x = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][0]; sprite->pos1.y = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][1]; @@ -369,7 +369,7 @@ static void sub_81346DC(struct Sprite *sprite) sprite->data[1] = (u8)(sprite->data[1]) + 4; } -static void sub_813473C(struct Sprite *sprite) +void sub_813473C(struct Sprite *sprite) { if (gTasks[sprite->data[0]].tStarterSelection == sprite->data[1]) StartSpriteAnimIfDifferent(sprite, 1); @@ -377,7 +377,7 @@ static void sub_813473C(struct Sprite *sprite) StartSpriteAnimIfDifferent(sprite, 0); } -static void StarterPokemonSpriteCallback(struct Sprite *sprite) +void StarterPokemonSpriteCallback(struct Sprite *sprite) { //Move sprite to upper center of screen if (sprite->pos1.x > STARTER_PKMN_POS_X)