From 227f1c219e82749fdfa4200b91ac38e98edf3591 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Fri, 20 Mar 2009 01:47:56 +0000 Subject: [PATCH] Tweaked delay of moth shooting Added extra frames for moth bullet --- data/sprites/mothfire0.png | Bin 674 -> 631 bytes data/sprites/mothfire1.png | Bin 686 -> 645 bytes data/sprites/mothfire2.png | Bin 687 -> 674 bytes data/sprites/mothfire3.png | Bin 694 -> 686 bytes data/sprites/mothfire4.png | Bin 0 -> 687 bytes data/sprites/mothfire5.png | Bin 0 -> 694 bytes defs.h | 2 +- rc.c | 9 +++++++++ shared.c | 22 +++++++++++++++------- 9 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 data/sprites/mothfire4.png create mode 100644 data/sprites/mothfire5.png diff --git a/data/sprites/mothfire0.png b/data/sprites/mothfire0.png index 7ab07b03e430ae99fb29b5d22f76d6b4a408e926..86f0d31b2875e37d7d19cd61aae7d0fec36b340f 100644 GIT binary patch delta 508 zcmVUY_6kKL7vo!aqt&7R7?W+MPV*l8KWRlu~s2imD&*;9-+bUj}ine`U~%4JdC3Jp2Y9kJ z$wW>#Y=+bihUBtBxnyFdgxarw$1je!dppO%C5tO%lh>Oq41jXUWUhFQYYS<%b~-$L zd7N6h?yP29sni<5%A@-e@6wh=f5z2u9XTDlI+rh|xOFqb#`EdbgXVC1?y7%& za@_D-TO;cUc3Q(sMR~^NMAH~EG{!t3>*|#o6@ML|Fl&5`dlFF^0NuVK2o>Glh~Gy; zYK>s!&9j;1*=gh3=jz~sYs;SJ2#zg?s8g`&2l(}X-TfY0I~^iV(eY{9k^t}VRU yXr1+VqM0d!d@hRIG@~yk5{-BAQm?Q0FZ~4!pQNDvfjP4P0000le`x1=Cke#P@3m_&JCOO`EV(aByv=e}+$A z+Pz)g4;Cvf-o9T&-SW^O0suHJp-^@B*lcy4eVA`0 z0mx)RN9v3L01yChZ+bh1LLAka8+kCZBRjNB1dpCAUB2`1_iQ4ri}7PJJ-SEzb>yJF zcsQ=%Y0m22`1$27)K@$dN=`O1f2>537s^urngE#LXLKWDPVC+}aAJ!gri=hbe7xAT zDs_giDR5}aH+kw}1WV>B(R$HDO$;RK11rcMspH-g*JXV(QwTuIq!|(eLcptA9j#LJ7IH6E za)#tZMKH`gUWNjo_uOPcZP&G7#)|Nn0W{&6YE%}_yQdeUb2U>YMMkW$iYOI948%d?xje|_KS z)rurs`yBB4jYrK5iKGO;4G}Kahle-wrz6SEe~hNg_M0h8Loj@JErzS5eMC|cgp!6AEzaHeK5=)U zzT9p9+3npIOha7HXo8F;IB>|JH=Ixu`c#EJOYBb~fE@!V7eI)=!fCc8wMN9o*MQ|u z?Z=O9vQvp^SAE)9|UTRS+c~`Gp8a(s-c}`&>+b`;s zYLNS~5tiMCMAsySo`A{6otd&XwX|}@G~&K2L*OgqK_{#|qx7WR?)t3C%`UU6e%Db4kJ^26t N002ovPDHLkV1jPK0W$yq delta 565 zcmV-50?Pe`1+E2qtdJzTnpn?U#VueyDYC*x^Pt`*!!O%^O zG}<(+il`ft?3Yb49-5k@;6)$IVc&H3e^}ha zxxTLmYq>vMzCtH`oXxwQz0UacRAI146b10!%u^_yFi(ZGTpa-0BH6O&^fOg-Uh8!o zI_S5bNzCWRws*{&y?pCO|9Y>e@7OALceX3OnPgsT-E8|7iI$x2Tv>yYM;!jQqxECK z(<}A^kO4@gvbCtvrsqSR`!_DSe*!}{*Oo_ZR;}piUVeP~lliFc`uE2Ug<}910A`mt zV zc@(Qs%`$?XE+#LXU$q+mS0i)W5}_qFYPBxBBOK2Ylp2CyS@19z;lJ=3TvNsZC1$iL00000NkvXXu0mjf D&mj(* diff --git a/data/sprites/mothfire2.png b/data/sprites/mothfire2.png index e862fabee4a3399117bd4a71cbd4164b8668c466..7ab07b03e430ae99fb29b5d22f76d6b4a408e926 100644 GIT binary patch delta 552 zcmV+@0@wYo1)>FzVg?ZiKe!?jk!UA>0sTotK~yNurIJ5r6JZ#}pYQvwm%DtqSmV`L z8i@*(h*E-rL5KJUq)Qe5K!am&)v1Fd=vcLa*hNI?=AbTuflQ(zE;=}9r3fvUkVFkZ zrMafble`x1=Cke#P@3m_&JCOO`EV(aByvZriM>n z+Pz)g4;Cvf-o9T&-SW^O0suHJp-^@B*lcy4eVA`0 z0mx)RN9v3L01yChZ+bh1LLAka8+kCZBRjNB1dpCAUB2`1_iQ4ri}7PJJ-SEzb>yJF zcsQ=%Y0m22`1$27)K@$dN=`O^GOR?B7s^urngE#LXLKWDPVC+}aAJ!gri=hbe7xAT zDs_giDR5}aH+kw}1WV>B(R$HDO$;RK11rcMspH-g*JXV(QwTuIq!|(eLcptA9j#LJ7IH6E za)#tZMKH`gUWNjo_uOPcZ0t!h)K~yNuosv&TlW`cwKkq+#ZJXP4=J}s<2p-bq0wJ)2%*<-gK_m=>L_!_b z6s5iH@2`VzLnu1qeelW9*0|qL)2&DK)4dmK zA|AK0mi%a@fnNXw47D{i8JL=W=^L(d%g2B^z-hS$Xif|n4?n*NB>TdSGZnrgPrcFk zsivd_a%n16fDFj8ga*_A&2tHV|M;utjrXyNw72Lzv#D(S=Vp0DQ^^*Js;-$&=J11Onb~5Aoj)(91J1s%BXl|J=nnd{ zj%r=D2_ZzjAabke(!$szVwf=$3X%00000NkvXXu0mjf D`_>aV diff --git a/data/sprites/mothfire3.png b/data/sprites/mothfire3.png index 71786d9a874371385b747951ec357cfdcddbe219..df014424a174cb9deb0f090da6e12a2f97ec2935 100644 GIT binary patch delta 563 zcmV-30?hrk1+E2JZl0sawOWmCUSz=fa_&8iiO%!7!KWrSFN+{C%Q zuLx_oKU}^-Cw-jFyPmzy`1Mp_ut*dI@ZQW*D4sA+g|%EA0NWzjvgq_PRdinKbsakB zx1UMO=f}2p%$&V^>qq~3uc+_XDtC9bE54azUTfWK`xc3oobOy&gOf)b{a5eEO65sPFps#}0*K02lyfmpNl1 z!lG{`i~(Px*yi;tD=#++MIZgnO{!9799FZu)?LqxZN4w%X;8*r-Xp+p)P-Y&080e|p(i?Q15Jk>? zZzR>P#d5Rb?^xC6*miESd5(5D_V^mbHiyE?1R{eG5_5&{$dg|W28L6U0Ca;9gbHES z?GmP(D=kxYg}-XGF1#Ef&l8jyf?!$jFc{&#@EcrH#sVc~v?>4q002ovPDHLkV1g^} B4#)ri delta 571 zcmV-B0>u5U1-1o{Vg?Qb`&3}2k!UD?5lKWrR4C7#l21s}aTvxwzd!B&A7)!=js+qk zkOd`0SrRNURum=HL1J}Dh&*`6+YUnBMv#Xnx?~=V!cbUYVeO!8&|yT3AP?9_F=q1E(%a=y^W zzIa`nc{Wqb0Kb4O1#kifVpHCG10nlJxxAD6__^}tVtDP*r$lAJWRljst@}DdL0h=5 z*XnvXUs?gS0Xkz--pSSFj!ZP-83h7>4>%~|Fc64FJfo}29humacM|AShKHQJ10nm! z-22~8$0l+Mz$Q=xwtzn(w8f==%DS&zEuA}Mxmm65e3cUOzE|j|XRiGi2R48bPzQAW zK>}330kkFNeB(&eWw%T5CsWn9=u#1)9U;_3UKd<3nX1O!F2ye!4U%nowv-06U7ebt z3r?G!Ev1bH$tJT$$XZP=hX)-2aZgov+KvA{jp0E@K&$CxIbUdGd%DekL2*xuD3C?5 zByv@7&Yo^_Fkfh76;)3; zRgI5L(BuFB002ov JPDHLkV1gnj6sQ0I diff --git a/data/sprites/mothfire4.png b/data/sprites/mothfire4.png new file mode 100644 index 0000000000000000000000000000000000000000..e862fabee4a3399117bd4a71cbd4164b8668c466 GIT binary patch literal 687 zcmV;g0#N;lP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02U_CX>@2HM@dakSAh-}0006CNklFKYMMP+jQvgWt%(15!j+ zBqRtP(&Yjnu!GFZYS2L>41`2N9o7`3z3%U?gKtA9I{3iD1JCn(pXbZ-ec*s5S@96y z2pDSP;4M$My+!Y~AC?=05W>uf&86kSOf2eU z2WUPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L02U_CX>@2HM@dakSAh-}0006JNklOM<00Mh39>E-{*Z_2`~aypk;W- z*>&rNbI9#d{3fI9)OEd~)%0?{(8#`cU7UF~Q_KLrfGq`Z0taGK-g^Tf`$)OGll%C& z^5$ZA?a`-1Wx-^U*1fI!IzvHQxUbjhdO2TO0k#1;V^iMA)#Z*%G~yWr0)P)VDB>^> zh(oV^1f`^en;-%rOTatpvFPz1JsKO(fnrOLXmT`iqEWw}|c z?tGOJ^S)Q;sAsPI7zZ|h5>N+p{y_p%zyY)+=6vHw)Md9z@h4N&xad+5q8%aBMP3(N zF`25y-7dv18x4|edbX4Xv|XK=p$kr%o-L(~2FWI~N61=DFNX&m0dY@Nc-oEsK8@i) zM?kCTWjSAHWP7^JL2*xuD3C?5Byv@7&Yo^_Fkfh76;)3;RgI5Ld{QL_U`iSwI{%) cwAUy93kHGLF~fe)x,s->y - s->img->h/2,"mothfire" ); ss->xs = cos(ang) * getspeed(ss); ss->ys = sin(ang) * getspeed(ss); + ss->timer1 = 0; } } if (s->timer3 == 0) { @@ -5758,6 +5759,14 @@ int movesprite(sprite_t *s) { s->dead = D_FINAL; } } else if (s->id == P_MOTHFIRE) { + // timer1 = frame + // update frame + if ((timer % 5) == 0) { + s->timer1++; + if (s->timer1 >= imageset[P_MOTHFIRE].numimages) { + s->timer1 = 0; + } + } // move s->x += s->xs; s->y += s->ys; diff --git a/shared.c b/shared.c index 29f4eb8..49ebfb9 100644 --- a/shared.c +++ b/shared.c @@ -1953,9 +1953,13 @@ int loadimagesets(void) { loadspriteimage(P_MOTHFIRE,1, "sprites/mothfire1.png"); loadspriteimage(P_MOTHFIRE,2, "sprites/mothfire2.png"); loadspriteimage(P_MOTHFIRE,3, "sprites/mothfire3.png"); - loadspriteimage(P_MOTHFIRE,4, "sprites/mothfire2.png"); - loadspriteimage(P_MOTHFIRE,5, "sprites/mothfire1.png"); - imageset[P_MOTHFIRE].numimages = 6; + loadspriteimage(P_MOTHFIRE,4, "sprites/mothfire4.png"); + loadspriteimage(P_MOTHFIRE,5, "sprites/mothfire5.png"); + loadspriteimage(P_MOTHFIRE,6, "sprites/mothfire4.png"); + loadspriteimage(P_MOTHFIRE,7, "sprites/mothfire3.png"); + loadspriteimage(P_MOTHFIRE,8, "sprites/mothfire2.png"); + loadspriteimage(P_MOTHFIRE,9, "sprites/mothfire1.png"); + imageset[P_MOTHFIRE].numimages = 10; // manual angry image for black cloud @@ -2118,11 +2122,15 @@ void drawsprite(sprite_t *s) { if (isfruit(s->id)) { frame = F_WALK1; } else if (isbullet(s->id)) { - if ((timer/6) % 2 == 0) { - frame = F_WALK1; + if (s->id == P_MOTHFIRE) { + frame = s->timer1; } else { - frame = F_JUMP; - } + if ((timer/6) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } + } } else if (iseffect(s->id)) { if ((s->id == P_PUFF) || (s->id == P_SMASH) || (s->id == P_SPARKLE) || (s->id == P_FLAME) ) { if (s->timer1 >= imageset[s->id].numimages) {