From 2fe25da65a07edef2b1beaf895911b18a8c1dbc8 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 2 Dec 2017 21:27:00 +0100 Subject: [PATCH] move pokeball data to rom --- asm/crt0.s | 4 +- data/graphics.s | 100 ++++++- data/pokeball.s | 14 - data/trade.s | 3 + graphics/interface/ball/dive.pal | 19 ++ graphics/interface/ball/dive.png | Bin 0 -> 326 bytes graphics/interface/ball/great.pal | 19 ++ graphics/interface/ball/great.png | Bin 0 -> 257 bytes graphics/interface/ball/luxury.pal | 19 ++ graphics/interface/ball/luxury.png | Bin 0 -> 350 bytes graphics/interface/ball/master.pal | 19 ++ graphics/interface/ball/master.png | Bin 0 -> 260 bytes graphics/interface/ball/nest.pal | 19 ++ graphics/interface/ball/nest.png | Bin 0 -> 266 bytes graphics/interface/ball/net.pal | 19 ++ graphics/interface/ball/net.png | Bin 0 -> 246 bytes graphics/interface/ball/poke.pal | 19 ++ graphics/interface/ball/poke.png | Bin 0 -> 249 bytes graphics/interface/ball/premier.pal | 19 ++ graphics/interface/ball/premier.png | Bin 0 -> 289 bytes graphics/interface/ball/repeat.pal | 19 ++ graphics/interface/ball/repeat.png | Bin 0 -> 257 bytes graphics/interface/ball/safari.pal | 19 ++ graphics/interface/ball/safari.png | Bin 0 -> 259 bytes graphics/interface/ball/timer.pal | 19 ++ graphics/interface/ball/timer.png | Bin 0 -> 296 bytes include/graphics.h | 26 ++ include/pokeball.h | 6 +- ld_script.txt | 2 +- src/pokeball.c | 410 +++++++++++++++++++++++----- 30 files changed, 682 insertions(+), 92 deletions(-) delete mode 100644 data/pokeball.s create mode 100644 graphics/interface/ball/dive.pal create mode 100644 graphics/interface/ball/dive.png create mode 100644 graphics/interface/ball/great.pal create mode 100644 graphics/interface/ball/great.png create mode 100644 graphics/interface/ball/luxury.pal create mode 100644 graphics/interface/ball/luxury.png create mode 100644 graphics/interface/ball/master.pal create mode 100644 graphics/interface/ball/master.png create mode 100644 graphics/interface/ball/nest.pal create mode 100644 graphics/interface/ball/nest.png create mode 100644 graphics/interface/ball/net.pal create mode 100644 graphics/interface/ball/net.png create mode 100644 graphics/interface/ball/poke.pal create mode 100644 graphics/interface/ball/poke.png create mode 100644 graphics/interface/ball/premier.pal create mode 100644 graphics/interface/ball/premier.png create mode 100644 graphics/interface/ball/repeat.pal create mode 100644 graphics/interface/ball/repeat.png create mode 100644 graphics/interface/ball/safari.pal create mode 100644 graphics/interface/ball/safari.png create mode 100644 graphics/interface/ball/timer.pal create mode 100644 graphics/interface/ball/timer.png diff --git a/asm/crt0.s b/asm/crt0.s index d99ce9deb..9ed678968 100644 --- a/asm/crt0.s +++ b/asm/crt0.s @@ -68,8 +68,8 @@ GPIOPortReadEnable: @ 80000C8 .4byte gAbilityDescriptionPointers .4byte gItems .4byte gBattleMoves - .4byte sBallSpriteSheets - .4byte sBallSpritePalettes + .4byte gBallSpriteSheets + .4byte gBallSpritePalettes .4byte 0x000000a8, 0x00000864, 0x0000089b diff --git a/data/graphics.s b/data/graphics.s index 05e804578..06c4b9e18 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -16,10 +16,106 @@ gUnknown_08C00524:: @ 8C00524 .incbin "baserom.gba", 0xc00c10, 0xa34 gUnknown_08C01644:: @ 8C01644 - .incbin "baserom.gba", 0xc01644, 0xE0 + .incbin "baserom.gba", 0xc01644, 0xe0 gUnknown_08C01724:: @ 8C01724 - .incbin "baserom.gba", 0xc01724, 0xBDC + .incbin "baserom.gba", 0xc01724, 0x18 + + .align 2 +gInterfaceGfx_PokeBall:: + .incbin "graphics/interface/ball/poke.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_PokeBall:: + .incbin "graphics/interface/ball/poke.gbapal.lz" + + .align 2 +gInterfaceGfx_GreatBall:: + .incbin "graphics/interface/ball/great.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_GreatBall:: + .incbin "graphics/interface/ball/great.gbapal.lz" + + .align 2 +gInterfaceGfx_SafariBall:: + .incbin "graphics/interface/ball/safari.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_SafariBall:: + .incbin "graphics/interface/ball/safari.gbapal.lz" + + .align 2 +gInterfaceGfx_UltraBall:: + .incbin "baserom.gba", 0xC019E0, 0xB4 + + .align 2 +gInterfacePal_UltraBall:: + .incbin "baserom.gba", 0xC01A94, 0x20 + + .align 2 +gInterfaceGfx_MasterBall:: + .incbin "graphics/interface/ball/master.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_MasterBall:: + .incbin "graphics/interface/ball/master.gbapal.lz" + + .align 2 +gInterfaceGfx_NetBall:: + .incbin "graphics/interface/ball/net.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_NetBall:: + .incbin "graphics/interface/ball/net.gbapal.lz" + + .align 2 +gInterfaceGfx_DiveBall:: + .incbin "graphics/interface/ball/dive.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_DiveBall:: + .incbin "graphics/interface/ball/dive.gbapal.lz" + + .align 2 +gInterfaceGfx_NestBall:: + .incbin "graphics/interface/ball/nest.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_NestBall:: + .incbin "graphics/interface/ball/nest.gbapal.lz" + + .align 2 +gInterfaceGfx_RepeatBall:: + .incbin "graphics/interface/ball/repeat.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_RepeatBall:: + .incbin "graphics/interface/ball/repeat.gbapal.lz" + + .align 2 +gInterfaceGfx_TimerBall:: + .incbin "graphics/interface/ball/timer.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_TimerBall:: + .incbin "graphics/interface/ball/timer.gbapal.lz" + + .align 2 +gInterfaceGfx_LuxuryBall:: + .incbin "graphics/interface/ball/luxury.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_LuxuryBall:: + .incbin "graphics/interface/ball/luxury.gbapal.lz" + + .align 2 +gInterfaceGfx_PremierBall:: + .incbin "graphics/interface/ball/premier.4bpp.lz" @ 0xBC + + .align 2 +gInterfacePal_PremierBall:: + .incbin "graphics/interface/ball/premier.gbapal.lz" gOpenPokeballGfx:: @ 8C02300 .incbin "baserom.gba", 0xc02300, 0x7c diff --git a/data/pokeball.s b/data/pokeball.s deleted file mode 100644 index 16c77a362..000000000 --- a/data/pokeball.s +++ /dev/null @@ -1,14 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -sBallSpriteSheets:: @ 832C400 - .incbin "baserom.gba", 0x32c400, 0x60 - -sBallSpritePalettes:: @ 832C460 - .incbin "baserom.gba", 0x32c460, 0x128 - -gBallSpriteTemplates:: @ 832C588 - .incbin "baserom.gba", 0x32c588, 0x138 diff --git a/data/trade.s b/data/trade.s index 3150269b0..b392fbc24 100644 --- a/data/trade.s +++ b/data/trade.s @@ -3,6 +3,9 @@ .section .rodata .align 2, 0 + +gUnknown_0832C6A8:: @ 832C6A8 + .incbin "baserom.gba", 0x32C6A8, 0x18 gUnknown_0832C6C0:: @ 832C6C0 .incbin "baserom.gba", 0x32c6c0, 0x1fe diff --git a/graphics/interface/ball/dive.pal b/graphics/interface/ball/dive.pal new file mode 100644 index 000000000..1bd07d69d --- /dev/null +++ b/graphics/interface/ball/dive.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +90 139 222 +115 164 230 +148 197 238 +180 230 255 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +0 90 156 +24 106 172 +57 123 197 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/dive.png b/graphics/interface/ball/dive.png new file mode 100644 index 0000000000000000000000000000000000000000..5be9b1ed623018b80bc56b4ce47186c9553602b5 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7AJu)Yc*(OVN8fFE z2IT#pGG&URqoag`1VhvuiL5o2)ki_1Fz`;|;%lJZi=HlyAre!k_8IauIS9CV>TKH} z)w{4v*tw&Zt&?5gG2;Z|3q}HeI_Ee^9}?WMY4L}mcRCWuO|AQ9iqF{pSteb>!T#|~ z)u}U5*p7M1sPQu&t=n!X$MfXkH0AKJl|G)^isuAfxpe96Pc_}r*n6|j*xfMsVfQiK zE-6u8j3vzHsGL3v*Lt7G8m_XNq5--AC)abSZ8d%4n0a9P*X7^prQ8C|nH45jG6{xV zQWDNw%esuM!p~&l;x(OH_WDHye>Vzz{)R~>{>R$Hh0$zpHtiDN{k4bTxs!|fF8A|~ QfSzOUboFyt=akR{0HZsMp#T5? literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/great.pal b/graphics/interface/ball/great.pal new file mode 100644 index 000000000..f19aa5e4a --- /dev/null +++ b/graphics/interface/ball/great.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +98 139 180 +123 156 222 +148 180 222 +180 205 230 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +189 41 90 +222 65 115 +255 98 139 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/great.png b/graphics/interface/ball/great.png new file mode 100644 index 0000000000000000000000000000000000000000..0c054d7d31db6f0c9915128bc4f8d1e0cd46325f GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7pVYmjdd|HmTkdT+ z`wYmPGG&URqoag`#9qy)dyd6GX`mn+nEsUr0P5}Wba4!kn7XxZBQKL7kLzVup9!-} zu0L*KeCMWMz*yM*e##%yh~^C{8!Z(TFDe|&|D*Ez^!c6sjMpR=Pt1S(uI%N8o$@PU ztk{Vzu_YCmX$YY15fMG vBPt#N9~cET%~}0000mP)t-s|Ns9n zF)3PFQiFqgw5+86|NoSfltDp37#JA;|D6BcYX7}C|C|WsN*J_C82|tOM`Qg5Fre< zHamj7&Ka^ZF98)Br$@$(z_p2Ev3loa~-UMr1q_`qasFn~?R zZ#9{0rld&>De$0DFPWl|jGpGhG!G#^pt#P^gF;mpKeY z&Ie6Cb6{1CJHlOCuYVH+Lx5YuHiq6JGJ2YcP*pGMLA^W|Va^nG!kGaHQ)V+ntTT}& w=DZU*^-SZ;hpho~@JaKTKc5tX58|cIFT2%ix9HXb`2YX_07*qoM6N<$g2%X)i~s-t literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/master.pal b/graphics/interface/ball/master.pal new file mode 100644 index 000000000..72247849b --- /dev/null +++ b/graphics/interface/ball/master.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +115 16 156 +139 41 172 +164 65 189 +189 90 205 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +255 98 139 +255 148 172 +255 197 213 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/master.png b/graphics/interface/ball/master.png new file mode 100644 index 0000000000000000000000000000000000000000..9787a8896a7978939ebdd47c2a8df9622e1272c7 GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7Uo0@ETXW44$Gv-_ z&H}kprc7~kbd->g_@C7Mf6AKwN3Q|};b8IGN$Ehn{hlt4Are!Q6ArMQI=yhqB%v8c z_g%V~k;XXT;8v?670*}{78h;Wyzxni!eWn`dpta4mR#Fm5-Yf5*Oomxdu?QwXq)WO z;a$>gYih!KCPBmBTibnWlLAIKGkF-A9d$0bReG8LoyOql>gTe~DWM4f%(rmR literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/nest.pal b/graphics/interface/ball/nest.pal new file mode 100644 index 000000000..4bee9fa12 --- /dev/null +++ b/graphics/interface/ball/nest.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +0 98 0 +49 148 16 +98 197 32 +156 255 57 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +255 123 98 +255 172 131 +255 222 172 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/nest.png b/graphics/interface/ball/nest.png new file mode 100644 index 0000000000000000000000000000000000000000..a2fa81c1e0e11b1d1616b3473b5cff2d8a516a9e GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7&yd7mI7J}osKT88 zmO$>5DN`IB9VH|r{#PgcU(@{m-Ws4F97JpFtp)0x>gnPbA~7{N;Q-sI(~4h;RF`@Q zoL#r~W>FC1goBwvd%ZH5CIoK1c{3v0YC_dLELg%jjfU;5IiP`mVL>dU7u6=D}Y zOwCk?eY0|5W&)dYWmJ^qD$ym3Gu9P}CmVDZPu=*@YeMynaNYHDI5#bd*lV&^;K{s4 zP9L2L1)5{`?Aarr5*o(G@-ji(N%GCYr%w~Flq&WzG8nQLJek!Zei`UM22WQ%mvv4F FO#ol1b&3E0 literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/net.pal b/graphics/interface/ball/net.pal new file mode 100644 index 000000000..dc5abb94d --- /dev/null +++ b/graphics/interface/ball/net.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +0 156 106 +49 189 123 +98 222 148 +156 255 172 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +205 205 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/net.png b/graphics/interface/ball/net.png new file mode 100644 index 0000000000000000000000000000000000000000..6fef48101f2df2ce0ce89c6399a6c003c2e14334 GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7&oC#;aBp?ey(x44 zuK{wWOqt^7=qMo}arP{bhYrGW4)6l?HhQ`^hDc1^+GowjWXR)k`6)y6j^#I*cbs6| z;WSNn!j=fNnXmPe!#q4pJPdm0|Ct!?HJ?f5s*1*R*S~HD7AZLFkw{2o zwbk_3soQq!x+XT^g4DhEn(5PT?6o<1?to_8k1XwjhE^{gtEsi?tQZ5#jq literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/poke.pal b/graphics/interface/ball/poke.pal new file mode 100644 index 000000000..0e6b2fb5c --- /dev/null +++ b/graphics/interface/ball/poke.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +131 0 0 +172 0 0 +213 41 41 +255 156 123 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/poke.png b/graphics/interface/ball/poke.png new file mode 100644 index 0000000000000000000000000000000000000000..1e4aba66931e50c8a3c5866fc4e8ffbdd0d9d90e GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7-^{?UhJoR#rsn@S z)j;l)DN`IB9VH|rfNV^VRWr>SsJF$_#W6%;>efC(zGed+*Ue8kW^yuHuRFr{fWz0) z@$ptR)&IYavV}Um3hMlK)c@1=KXZPIJ(yuA^|S2F?CFQz`UNH~oS1YYVQHcvgJ|BC z*Z|2jPff1pgrA?nD^qmr=h6J19ll$-eYgCscy%Pb e-&v|bLY4%5m_+|m!!{F)a=d#Wzp$PzgHFM4Y literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/premier.pal b/graphics/interface/ball/premier.pal new file mode 100644 index 000000000..0e6b2fb5c --- /dev/null +++ b/graphics/interface/ball/premier.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +131 0 0 +172 0 0 +213 41 41 +255 156 123 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/premier.png b/graphics/interface/ball/premier.png new file mode 100644 index 0000000000000000000000000000000000000000..f5aaadbaf580572393299c0fee4d360c12bba197 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7-^{?UhJoR#rsn@S z)j;l)DN`IB9VH|rfNV^VRWr>SsCSL0i(`ny)Tw=rd`$)du7-NMOcf`Z&N<-K!d<|a z%*OAa5zVvl|F3WU+Pf4C&!xrP`gebNYBckbw{s>*E-g29bP=&hn0|qG1+WkyP$OV(2brO89&ngT?^QuF7Ii#>E&mp_5I#o UYn(qV0J@vO)78&qol`;+0MJy1!vFvP literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/repeat.pal b/graphics/interface/ball/repeat.pal new file mode 100644 index 000000000..c3689e13f --- /dev/null +++ b/graphics/interface/ball/repeat.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +222 98 0 +230 131 32 +238 164 65 +255 197 98 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +205 156 8 +255 255 8 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/repeat.png b/graphics/interface/ball/repeat.png new file mode 100644 index 0000000000000000000000000000000000000000..5abe789a2fff519091c14cab8efa3673f1379084 GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7e=mvQS+l~sC651( zCIPuqrc7~kbd->gI6H^q|9>Dt0goMfHGz72JY5_^B&H@O9AGZUcW3T_iWt_pQ~Zese?$1@1zJw}VUHUZj<gTe~DWM4fta^89 literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/safari.pal b/graphics/interface/ball/safari.pal new file mode 100644 index 000000000..bbe4d76f3 --- /dev/null +++ b/graphics/interface/ball/safari.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +148 172 16 +164 197 32 +180 222 49 +197 246 65 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +205 106 41 +230 164 98 +255 222 156 +255 255 255 +255 255 255 +255 255 255 +255 255 255 diff --git a/graphics/interface/ball/safari.png b/graphics/interface/ball/safari.png new file mode 100644 index 0000000000000000000000000000000000000000..0dd49aef9187cf8d01a0d821f70aabf2b3166d92 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7KV^-;lA{V+?in8a z<_O|Wnd0c^C?O$nHcRu_lBECl<^ToZ;PV+Fb)eopPZ!4!iK)p62iQ)XUbyAbsh0|~ zVsBPnKf@$&Smj8SSVv&$o18r!GACwiy|Kqb@QB9z&{=vMm%^jsrp3+U3zCtFo5pr+ zs?;pDG=nM2mrh+A|5aoIW}g3N**= x*|SGLB{YnWao_*| literal 0 HcmV?d00001 diff --git a/graphics/interface/ball/timer.pal b/graphics/interface/ball/timer.pal new file mode 100644 index 000000000..e0c23569e --- /dev/null +++ b/graphics/interface/ball/timer.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +172 0 0 +197 49 41 +222 98 82 +255 156 123 +255 255 255 +148 148 148 +65 65 65 +24 24 24 +180 180 180 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +0 0 0 diff --git a/graphics/interface/ball/timer.png b/graphics/interface/ball/timer.png new file mode 100644 index 0000000000000000000000000000000000000000..2b63f67953bb8246b8e8e9ee858c3b64f558e253 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT>t<7zlMR~sG;V)q@e$E zs)5`oQ>HjNI!Z`LY}v8}$VCP~O`c~O6oJ%cPZ!4!iK$cjH}V}a;Bn#hC`nzpYZF7f zzz;sD*xi@HEV4Dd{`|hN%t=91CGVrBXg3|?` zlQq&jJ|X*N%beM2_mp+TUpEgE-?ZZFvoR&zF1xmdU(U+(ExCG$MJd9X@k`-P_VZ2^ fZ^REZN6us4)9O*RC(LdZ(D@9Wu6{1-oD!Mcallback = sub_80756E0; } -void sub_80756E0(struct Sprite *sprite) +static void sub_80756E0(struct Sprite *sprite) { if (++sprite->data[5] == 10) { @@ -196,7 +464,7 @@ void sub_80756E0(struct Sprite *sprite) } } -void sub_807574C(struct Sprite *sprite) +static void sub_807574C(struct Sprite *sprite) { sprite->data[5]++; if (sprite->data[5] == 11) @@ -215,7 +483,7 @@ void sub_807574C(struct Sprite *sprite) } } -void sub_80757E4(struct Sprite *sprite) +static void sub_80757E4(struct Sprite *sprite) { if (sprite->animEnded) { @@ -232,7 +500,7 @@ void sub_80757E4(struct Sprite *sprite) } } -void sub_8075838(struct Sprite *sprite) +static void sub_8075838(struct Sprite *sprite) { bool8 r5 = FALSE; @@ -292,7 +560,7 @@ void sub_8075838(struct Sprite *sprite) } } -void sub_8075930(struct Sprite *sprite) +static void sub_8075930(struct Sprite *sprite) { sprite->data[3]++; if (sprite->data[3] == 31) @@ -305,7 +573,7 @@ void sub_8075930(struct Sprite *sprite) } } -void sub_8075970(struct Sprite *sprite) +static void sub_8075970(struct Sprite *sprite) { switch (sprite->data[3] & 0xFF) { @@ -386,7 +654,7 @@ void sub_8075970(struct Sprite *sprite) #define tCryTaskFrames data[10] #define tCryTaskState data[15] -void Task_PlayCryWhenReleasedFromBall(u8 taskId) +static void Task_PlayCryWhenReleasedFromBall(u8 taskId) { u8 wantedCry = gTasks[taskId].tCryTaskWantedCry; s8 pan = gTasks[taskId].tCryTaskPan; @@ -468,7 +736,7 @@ void Task_PlayCryWhenReleasedFromBall(u8 taskId) } } -void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) +static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) { u8 bank = sprite->sBank; u32 ballId; @@ -554,7 +822,7 @@ void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) #undef tCryTaskFrames #undef tCryTaskState -void sub_8075FB4(struct Sprite *sprite) +static void sub_8075FB4(struct Sprite *sprite) { sprite->animPaused = TRUE; sprite->callback = sub_80760F8; @@ -563,7 +831,7 @@ void sub_8075FB4(struct Sprite *sprite) sprite->data[5] = 0; } -void HandleBallAnimEnd(struct Sprite *sprite) +static void HandleBallAnimEnd(struct Sprite *sprite) { bool8 affineAnimEnded = FALSE; u8 bank = sprite->sBank; @@ -604,7 +872,7 @@ void HandleBallAnimEnd(struct Sprite *sprite) } } -void sub_80760F8(struct Sprite *sprite) +static void sub_80760F8(struct Sprite *sprite) { u8 bank = sprite->sBank; @@ -629,7 +897,7 @@ void sub_80760F8(struct Sprite *sprite) } } -void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite) +static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite) { sprite->data[0] = 25; sprite->data[2] = GetBankPosition(sprite->sBank, 2); @@ -642,7 +910,7 @@ void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite) #define HIBYTE(x) (((x) >> 8) & 0xFF) -void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite) +static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite) { u32 r6; u32 r7; @@ -698,7 +966,7 @@ void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite) } } -void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite) +static void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite) { if (sprite->data[0]++ > 24) { @@ -707,7 +975,7 @@ void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite) } } -void SpriteCB_OpponentMonSendOut(struct Sprite *sprite) +static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite) { sprite->data[0]++; if (sprite->data[0] > 15) @@ -723,22 +991,22 @@ void SpriteCB_OpponentMonSendOut(struct Sprite *sprite) #undef sBank -u8 LaunchBallStarsTaskForPokeball(u8 x, u8 y, u8 kindOfStars, u8 d) +static u8 LaunchBallStarsTaskForPokeball(u8 x, u8 y, u8 kindOfStars, u8 d) { - return LaunchBallStarsTask(x, y, kindOfStars, d, 0); + return LaunchBallStarsTask(x, y, kindOfStars, d, BALL_POKE); } -u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 bank, u32 arg2) +static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 bank, u32 arg2) { - return LaunchBallFadeMonTask(unFadeLater, bank, arg2, 0); + return LaunchBallFadeMonTask(unFadeLater, bank, arg2, BALL_POKE); } void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species) { u8 spriteId; - LoadCompressedObjectPicUsingHeap(&sBallSpriteSheets[0]); - LoadCompressedObjectPaletteUsingHeap(&sBallSpritePalettes[0]); + LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[0]); + LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[0]); spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subpriortiy); gSprites[spriteId].data[0] = monSpriteId; @@ -759,7 +1027,7 @@ void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oa gSprites[monSpriteId].invisible = TRUE; } -void sub_8076524(struct Sprite *sprite) +static void sub_8076524(struct Sprite *sprite) { if (sprite->data[1] == 0) { @@ -789,7 +1057,7 @@ void sub_8076524(struct Sprite *sprite) } } -void sub_80765E0(struct Sprite *sprite) +static void sub_80765E0(struct Sprite *sprite) { bool8 r12 = FALSE; bool8 r6 = FALSE; @@ -839,8 +1107,8 @@ u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 { u8 spriteId; - LoadCompressedObjectPicUsingHeap(&sBallSpriteSheets[0]); - LoadCompressedObjectPaletteUsingHeap(&sBallSpritePalettes[0]); + LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[0]); + LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[0]); spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subPriority); gSprites[spriteId].data[0] = a; gSprites[spriteId].data[1] = g; @@ -852,7 +1120,7 @@ u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 return spriteId; } -void sub_80767D4(struct Sprite *sprite) +static void sub_80767D4(struct Sprite *sprite) { if (sprite->data[1] == 0) { @@ -880,7 +1148,7 @@ void sub_80767D4(struct Sprite *sprite) } } -void sub_807687C(struct Sprite *sprite) +static void sub_807687C(struct Sprite *sprite) { u8 r1; @@ -902,7 +1170,7 @@ void sub_807687C(struct Sprite *sprite) } } -void sub_80768F0(struct Sprite *sprite) +static void sub_80768F0(struct Sprite *sprite) { if (sprite->animEnded) sprite->callback = SpriteCallbackDummy; @@ -934,7 +1202,7 @@ void sub_8076918(u8 bank) healthboxSprite->callback = sub_80769A8; } -void sub_80769A8(struct Sprite *sprite) +static void sub_80769A8(struct Sprite *sprite) { sprite->data[1]++; if (sprite->data[1] == 20) @@ -944,7 +1212,7 @@ void sub_80769A8(struct Sprite *sprite) } } -void sub_80769CC(struct Sprite *sprite) +static void sub_80769CC(struct Sprite *sprite) { sprite->pos2.x -= sprite->data[0]; sprite->pos2.y -= sprite->data[1]; @@ -962,7 +1230,7 @@ void DoHitAnimHealthboxEffect(u8 bank) gSprites[spriteId].callback = SpriteCB_HitAnimHealthoxEffect; } -void SpriteCB_HitAnimHealthoxEffect(struct Sprite *sprite) +static void SpriteCB_HitAnimHealthoxEffect(struct Sprite *sprite) { u8 r1 = sprite->data[1]; @@ -981,10 +1249,10 @@ void LoadBallGfx(u8 ballId) { u16 var; - if (GetSpriteTileStartByTag(sBallSpriteSheets[ballId].tag) == 0xFFFF) + if (GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag) == 0xFFFF) { - LoadCompressedObjectPicUsingHeap(&sBallSpriteSheets[ballId]); - LoadCompressedObjectPaletteUsingHeap(&sBallSpritePalettes[ballId]); + LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[ballId]); + LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[ballId]); } switch (ballId) { @@ -993,7 +1261,7 @@ void LoadBallGfx(u8 ballId) case BALL_PREMIER: break; default: - var = GetSpriteTileStartByTag(sBallSpriteSheets[ballId].tag); + var = GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag); LZDecompressVram(gOpenPokeballGfx, (void *)(VRAM + 0x10100 + var * 32)); break; } @@ -1001,11 +1269,11 @@ void LoadBallGfx(u8 ballId) void FreeBallGfx(u8 ballId) { - FreeSpriteTilesByTag(sBallSpriteSheets[ballId].tag); - FreeSpritePaletteByTag(sBallSpritePalettes[ballId].tag); + FreeSpriteTilesByTag(gBallSpriteSheets[ballId].tag); + FreeSpritePaletteByTag(gBallSpritePalettes[ballId].tag); } -u16 GetBankPokeballItemId(u8 bank) +static u16 GetBankPokeballItemId(u8 bank) { if (GetBankSide(bank) == SIDE_PLAYER) return GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_POKEBALL);