From 0663c142b73f81e8464f911049205bae7f0484bb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 29 Jul 2018 19:54:23 +0200 Subject: [PATCH] Add split icons --- graphics/misc/split_icons.png | Bin 0 -> 5451 bytes ld_script.txt | 1 + src/pokemon_summary_screen.c | 98 ++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 graphics/misc/split_icons.png diff --git a/graphics/misc/split_icons.png b/graphics/misc/split_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..1c7d63c9eb775ab15aefe3456b2ac3cb8c47ede7 GIT binary patch literal 5451 zcmV-R6}0M!P)T%~}000y3dQ@0+Qek%> zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*tb|km4h5us}ZwZ)(WzBUvl1?m`cqpXUo6XV)LB`)jt28pU%en{r$y$Joxs! z2_G+bp3*Px6M4VKcb-qb-caKE{P_O7Df2x~eNXgp$@hdoSN1%3kE`#Af`6WO@9(C) z@9Xi)?Y#fDbr)~ld(iK{$3ihy;(Wmyzk>^w@AoQ!6@(f(KMUV|XkO1W9!GxbJdQut z&ZP8n@jf5@Ry*6@=fn3>7@OY%@^3YIpLgl!+T99$U6K2B+S;k^C&?@R5@S@oR# z++B~EN@erj)W@ydM;tgPWw>w4d=>srJTCXE@m0CSNyir59DGgVn)6iqxagMa?znw_ zPB&R%^xGGHdOv-*&(%dPHpXvQ-1$cIVSg8K5g7I&}P?)9dtTzNT;^p2A` z-tmVo^V5@m=j-!C=Lova+4|H8SgDPTx6-hPd}9Za{( zl^g7KJf|4R{lZqbeGVL#Y%~w(tt;z20VU$vVg?uJfXyx>mz^!%7w4#Br9YjO`w;!0 z11=@MoH_I+giLd)*R^?1araoC{PQ%_LL*Yhj7`Kad%@^K0$I!Wpo9rMxA@uCg@Xs@2x z>SFZjoO))PXDE`VYc8od%c)~@FmC75ai6{W)ww_In@RCM>YM*poil3P|Dtn7t$RE7 z$G-j0wbiepgxerZp=xTwf!I!*-Pi6%SfrKw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Qw?NJe~T;Qwk(VA_h*s2J8u0mT6cH z09>*dL1@F8D&GcalY--%EAt;Zb7#&e;%q#mHa>_B14fmKi9E+lPbjtx3ED&9eoy8WP>7s0ZO!(Sav_0$ zbluCuXo3fAw+$x&o+_w#ZbTvk?1EGdbO;6iSKaa<-dJBzoS~0NGH(uY2oPRzJx9Y$ zC(7do?{)f zt93j*v)&3eB0&G}4z|2fs;zy!5cG*2!a`JQC@sq*2}o%aX%=AgJLxlN2l2TkYes{S zbV9=A2oi+?i7%7VyB60NBOCEBZV^g`$(AbPw697@7;|khoQ*oruA^9dKSyFc3)gi& z9c)9pC`4EDFrAah$EriAM955lg%MC6rh!~Bi4}6TC)cWd769UVwlH_ek)q2$!AJ1u z^Lb2;YbhyV`aa+-^pd+n!^{3yHb^fx{xDFWlusL zUQ8eLWd>P)EEa^L;uegwP)lvQ;5H4^0XQ9bDYig<#UnC#aARb;xYUyH(`;tB@ov&F zfe9GSDPICfovc4SI7~k@_k0FQsG1*Juspnu$kz+P-ku$$Yivfoxu8?&-SfNeEu*zp zlNpS-T$Tmp;nBzA+2|bJ>93sBd_C*ele)cpS~L9BQ<|R_`tMH(Kx{tszM(=Yrl2Z8 zK1INyfO0nwlJ>_pNz8)?RPksZYd3w)eUww7LyamS67Qub72u=&Ziahp(7>BSrvC@b zB>vHF`t5!I001yhOjJdW@v-rNF~Kn@xuN+|L0004EOGiWihy@);00009a7bBm000tn000tn0p4aGcmMzZ z2XskIMF-*s9T6%H5}C=&EHf&l5a7feM{K zTei||1U))--xxx)cu@bVx^5l2S6F50i(3ih9R|*9a>8Do}jPE*cn%Me&-16 zpXerjY)j|_*n|R*0+CIO$+?*kJW;fakdp0)M4l0?bHVfSOf>QGBRc2LfB$FK&=sf| z6(E<^YGzsplitIconSpriteId == 0xFF) + gUnknown_0203CF1C->splitIconSpriteId = CreateSprite(&sSpriteTemplate_SplitIcons, 48, 129, 0); + + StartSpriteAnim(&gSprites[gUnknown_0203CF1C->splitIconSpriteId], split); + return gUnknown_0203CF1C->splitIconSpriteId; +} + +static void DestroySplitIcon(void) +{ + FreeSpritePaletteByTag(SPLIT_ICONS_TAG); + FreeSpriteTilesByTag(SPLIT_ICONS_TAG); + if (gUnknown_0203CF1C->splitIconSpriteId != 0xFF) + DestroySprite(&gSprites[gUnknown_0203CF1C->splitIconSpriteId]); + gUnknown_0203CF1C->splitIconSpriteId = 0xFF; +} + void sub_81BF8EC(u8 a, void *b, u8 c, u8 d, void *e) { u8 byte; @@ -359,6 +453,7 @@ void sub_81BF8EC(u8 a, void *b, u8 c, u8 d, void *e) gUnknown_0203CF1C->unk40BE = c; gUnknown_0203CF1C->unk40BF = d; gUnknown_0203CF1C->unk4 = e; + gUnknown_0203CF1C->splitIconSpriteId = 0xFF; if (a == 2) gUnknown_0203CF1C->unk40BD = 1; else @@ -1255,6 +1350,7 @@ void sub_81C1070(s16 *a, s8 b, u8 *c) { ClearWindowTilemap(14); ClearWindowTilemap(15); + DestroySplitIcon(); schedule_bg_copy_tilemap_to_vram(0); sub_81C1DA4(0, 3); sub_81C1EFC(0, 3, 0); @@ -1279,6 +1375,7 @@ void sub_81C11F4(u8 taskId) { ClearWindowTilemap(14); ClearWindowTilemap(15); + DestroySplitIcon(); sub_81C1DA4(0, 3); sub_81C1EFC(0, 3, 0); } @@ -3522,6 +3619,7 @@ void sub_81C3C5C(u16 move) u8 *text; if (move != 0) { + ShowSplitIcon(gBattleMoves[move].split); FillWindowPixelRect(14, 0, 0x35, 0, 0x13, 0x20); if (gBattleMoves[move].power <= 1) text = gText_ThreeDashes;