From b47b9e57589cbe0334a5a370d35bd44592c806e3 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sat, 20 Jan 2018 16:22:16 -0600 Subject: [PATCH] Extract data from starter_choose --- data/starter_choose.s | 130 +++++++++++++++++++++++++----- graphics/misc/birch_bag.png | Bin 0 -> 1304 bytes graphics/misc/birch_bag_map.bin | Bin 0 -> 1280 bytes graphics/misc/birch_ballarrow.png | Bin 0 -> 635 bytes graphics/misc/birch_circle.png | Bin 0 -> 349 bytes graphics/misc/birch_grass.png | Bin 0 -> 691 bytes graphics/misc/birch_grass_map.bin | Bin 0 -> 2048 bytes graphics_file_rules.mk | 6 +- src/starter_choose.c | 8 +- 9 files changed, 118 insertions(+), 26 deletions(-) create mode 100644 graphics/misc/birch_bag.png create mode 100644 graphics/misc/birch_bag_map.bin create mode 100644 graphics/misc/birch_ballarrow.png create mode 100644 graphics/misc/birch_circle.png create mode 100644 graphics/misc/birch_grass.png create mode 100644 graphics/misc/birch_grass_map.bin 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 0000000000000000000000000000000000000000..86bfbbbc0a3aae8d4bf4b8ba8f716030c82606fe GIT binary patch literal 1304 zcmV+z1?T#SP)3j1-8jW1bWru}qWPLyLd2gPSq|>oimo_f_ zuhl(v!`GjaKXP5S{}~d;u2>C;9_N4UlaE}rED64%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S634y( O0000CJLBbPy_)LDN>DsAk`?SfP#@~p+u3YKuDx1Nc`9J$jd$4ft*Jl z*z+=3S-+hk?H=jS>9H=|di3hk?}<+d_-6(T zdhUgnh723=%4?&>ys@2tA2(srlxZ{GdGCXdX3d$m;CBN4vqfJlS+-);nsr}&vtiTL z-)!P(MFGZ@lT5$cv1`x113&z9=*Ta}L2o)A^*gW9z0p0Y)7pue*(KBWzw)6;!&>w5hNb?e7nhur|*C literal 0 HcmV?d00001 diff --git a/graphics/misc/birch_ballarrow.png b/graphics/misc/birch_ballarrow.png new file mode 100644 index 0000000000000000000000000000000000000000..d2f0a3d972292e27ebe1cf8c54d3b6f3aa697697 GIT binary patch literal 635 zcmV->0)+jEP)0Q=@SO5EKfW zR}j=i1o7R2>SJ7mllR+rfB3FaW(B6VSbr)tI7`y~;x@Z8ptnzoI$MTYWjid zrSYHy;o8j@oB-1BPJwe^>;faQgx*i&vv^qrnCe-Qd3LSS6P;LTIarw7L$I8UZny8b}K^40p|pBQAL45H5*Z>Wz4J^sxp*eZhZgj}a*xl6I;3p$jXp8HOKwvjPaBfU7w7KLHa9!T@HdU5QO{g&;5_#0Z8!OL_Gm`0L23!tSJphX*=Ju`#O`%Y}wtxxph@d z*S#*TR8?bBl_*zR>Irz35#bre22U9KEpB#>@OMfW*NjA9Ba#t_MQ(Y*M>&XG9P_x@ zLn|yA1&cqMMTJ?Ts4#03dhj)ZgkXy$Nt+24aNM_e|i(B)MF00000NkvXXu0mjfQA(GG literal 0 HcmV?d00001 diff --git a/graphics/misc/birch_grass.png b/graphics/misc/birch_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..838fa5f4c792c496fee5439a410bf0ab70660622 GIT binary patch literal 691 zcmV;k0!;mhP)3>oKi}AK{;A6AUPoa{{a900RR60|Nj90{{a9008(>7qZZ)T0006$ zNklPzh`p7x#jll-CY4tT=+^YL1v@9 z?E<2_`^Yr`4pYD>_iwoX`me46V2rCT$pN@hh7AB6l6#h?Vpqa`0LEUjFOLHr%`w3J zRHl!BPZP3{%_f7NsvZOnYHFt2T*n0<1$gz9R+WVA^>Xj4c5 z-M${8McP_vnZd65XTa!O+2s{r9LP({VkiJyzpsw~LJIJNfHd2=0{qtfUjU3mibopQ zv`fDLD1LLKp8!mNjGC=p0Z@o|V89#DDyA2El<`TT8h%N~>u>>(QypN46-S$G&<(rC zgC5;~1B^~Ndl*x9D}e4k-VgON0PQOQ0(i(NPzR4={R|KvFx5j@h&Dukf%`ImWR3E{ zDqy3&AWbQl`_&A@7(e(H(CV+sQ~+)RpqN=tn( zTS;}mcB3!{d3(9aLngZc!j6G4<_Gx=pahX?1Xz_%k2=770%nM0VlarA`UD_vdyk|A zP%UAM`6sUc5G#;1J2{2T4ghulAsRvQ@cWYhO2-)bXHe$=69t3(->L$xxZ;W{uDD_q Z{{ZqzPeUcM&X@oI002ovPDHLkV1hGXF^~WN literal 0 HcmV?d00001 diff --git a/graphics/misc/birch_grass_map.bin b/graphics/misc/birch_grass_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..b7332940c441ab0334b651b4b249898f70e056ec GIT binary patch literal 2048 zcmeH{M~=ck5Jl$*fAJ4$Za_{3L|TyqEXg^o$l+GgZDY5vriY+ejqH-#web5@UH#n# z3=zSP;!8Y|{u};B6$U+FQ1$AqA3_)rL=i(A2_%t1ib*CIXN*xs7-mSQseT{%JPIhH zgfapu7`R87B^Fs=UduPpLR*n`=JHaf%@&(leuOd1UwM;bjOpFMWj(elz46HGC~91AS5!WwI?xa5L!&N$`7_LA%M$Mcu`9tRw8!WkD_al?&Q rUU=q-M;^F;$}4ZalBxRkU-a(V=biiK-O1VC`}6bX_nCA4kAJ=aQZxg* literal 0 HcmV?d00001 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)