From 7450436bf4f837a8370ef8d788178f90d92562dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 31 Jul 2020 11:32:15 +0200 Subject: [PATCH] Add monster dead sprite --- assets/levelB.gif | Bin 4198 -> 4226 bytes assets/levelC.gif | Bin 4502 -> 4538 bytes assets/monster_dead.png | Bin 449 -> 636 bytes images.h | 18 ++++++++++++++++++ main.c | 38 ++++++++++++++++++++++---------------- 5 files changed, 40 insertions(+), 16 deletions(-) diff --git a/assets/levelB.gif b/assets/levelB.gif index 08934ce708484f45be088c415694d05eba950ce0..f25cc02a13bba8e1ed4c45ebb87ca2d1baf43628 100644 GIT binary patch delta 1042 zcmV+t1nv9gAc7&V4g(ba5kqoiVRU6=Aa`kWXdp*PO;7-{4Fh)xeb3lMuUcMC>?Cre}?DhBJ`Jsnh}G0*lzvzeNxzN{^hcG9Vmk@xP@5Ag%t67!8d%x zcYMjWe9bo>MmUIk2!uSPg+#c7j2MZ)Cw#Zp<@j#j$R*a8i)x60@Ft7cH*amwZuuy0 zwMcLFxPa8ijGB>u?FfDQxR26TkO0Y3@Yswe=zR(31@C5r`I0dCeZnwra~N+o`F%4_I_Xuy?XnsoxZx-o|E_sw&k&->PlM>jIQmGYG$#_9&henx|T(On! zMv>_72lYml-iMW7SrJ2NermavTltTRCzrPPm1{{8e_~m0&^Ur`36@*wAnx`KJ13ZK z8I^;A6t4)9I|rE2$C&jNlHnJM;Yfs!n1d|n0hJXE9ZSo0UQvT9$*Bd=>hWN z0l$M0^0t9pxp)sUZ;t7Y(??IZ=z@;uh2rRdm|0ny*_odinjA2irFojEnV4-UeJj|C zxwwV9fB1#EnVG%02%hO6pedT9X#}R3J*fWaJE}Q?dwG?Hd4fk_oW}`$kqL=6sD9}A zlWWkP9!QVnX`Z(@is?Co%NdsKxd!hUg7Jx*x4535h@SOX5&5~Fdf1;L8J_J2Ff_u3 zzVMXtCIXBH2O&9|pBSJ5ii?y95(RpgJ@*YPe;I+Q)^q1+pOe{y7FeGi(4h~Rg6r6l zpQxVB8IDLOitD$c?&+ca$C*6pZk&k@t(lez+Mo=IfBkumeHf#MZu}2DiIa25~+%ps|u<>QL3jJs}A9(i0Tt0p{gb! MtGc?YC=n0V*mgE delta 1014 zcmVgp*eB^19Afx@WN3!a$ABhiAW>Kf{&xfM*MV_JBW>t^hKmP)c_M<|GV_;Vw%g+<7OGpG@e zD15|ce8{JK%y$MecqrHBb8xVM@%If0$ca4Fgf>WoSm=PGD2b+6iK&Q*4ycK~V0iuq zKZwXvf9M*4sDi^Hec4cdh4eHiN9c%gq=|OuZYr>e@CJumqJ%qGjq;{=@pg?nM-lN> zh&(5b@5YTsGL5&mh8PHMu!w#0)&}inkMcH)^fr$R7>&vJ8u_P=(1(xsD18FikI2}L znE{W|p^5O8fL>s45$SIFc#P51j(F03=68^N&6KFHAnx`KI|rENx0iZ&6luwQ_U4z-r-dKc< zsDmx&0hJXE9ZSo0UYp|9$*Bb=>hWN0l$M0^0t9nxp)sUZ;ZK*(??IX_=1f1 zh2I#AmzkNH*_ofo0iijXrFoi%sg@xro2z(>T$qbsh?|vvrJIYunGWKapedS0K$_WO zn!baYBmS6|RmqmsXqb0NoR8^62@ao*o#F#95rR7>dX_gzt!+>NzOksg~mj zhDjKTp9q6knVxH~o*~$tX6c>w2{3xtbG}fK{s#vj8Jo4}iA+e16Y8HA0iXifkUjSe zDH(yP)^quPS)1?Zgcewy7h0bu2!!aUlJCi%73ziLS%V&cq4ueOnt7w{rkUulngv>v z*JM`-N}%L;ew`?v${B*hlA*zIpF)|RlKG7dnWQyJpzaw>%6X+xIxI>Gkn_f%FX^R( ziGK)+eXK= kL8@43s+$TFpem}Y>JXikr#?XvrD_tbTC28-5&;1KJC8H;`~Uy| diff --git a/assets/levelC.gif b/assets/levelC.gif index 586b9e08a47e368037c029552673e20c806e9ec4..25d5f759d00aa521200420e94ea262e36c1a9609 100644 GIT binary patch delta 3090 zcmV+t4DIulBf2B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nWYh`q+BYcNNS~5DyBn9raN*JrFjNk8iXSOop3st0}7|oc@gaf z8adYQ%* zmo)L4YzZD|5UioOqO(e?Z`zo9si+MKtit-5#p;u9x~qXHo{;&gAQ7x-FszOCtkC+T z9+_7x#jO+>t>fvd(CL`Gc@cx^tW8R#ZrW4(d6|_dnaiqwuA9oPO1S~(ps)OjpYU3e z(psL>I<2s(t>0pr`nrP&tD|6ARp6SGxT%;L8J_f7uiwHJ2KyNZ%YzG>pztcKjTxgD zi?7_OtBWeHjW)6!+Ofr2fvYk4usb5Ii}|s78J*GzvQg;)441JKDzoSio^v{{6|1Nq zv9l!mtR`z&v&$-~4XU#X$FsoUvp?IgXi_@% diff --git a/assets/monster_dead.png b/assets/monster_dead.png index ea5d0dfd312637a367429d6ccb552b221377e4b0..3b830109c41109bf86e5fe8e02723c2e93973339 100644 GIT binary patch delta 529 zcmV+s0`C361N;P#Q3~V-9|$-Jn+rV(ky|K#6JSsf7!V*J zAdmwD1T1_Y2MAm!VDOI60|Y!^;3EVYED$sZC@csNFc8QA3YWD&mLl8TrZe3%lNrAm zk3AaO?|a{m?6U*#6CYR`d~mG*Rsbu26~GE$1+W76JOHZkm|wp;fYhwpcX`d$79w(g z5)fy9`X#FXc<%uKe(-S40RW6P@Izd0n-+)nmLN4V+T^u#ZEO2aOl;noJ~ambrPZqp zPyPS#fYD|$IT1zbZ?_8xxVEPSAdO@OlKyiBlvXeWGbaOJ$7!5%3lM(r;LA&dA>{kh z^z(?m71_-({ZrjM-%qG#W`rRi3}NDbk0h6fEF#+NyQ3h^|AwX?4;K*(?g5IrE3GmE zC0hxsh@fJIh%Dqg3Lt4|$7uoJ+x25+;p@u|p%3uh!x)p#01$=%TU&%7Od2Y!z|2SY ziu1BL*PJ(;^ukoTKDs_{Ok+ev1k8+X-(^O+FI7%S2`0&Kn0vrz1tOX>7ZJ34O$+B7 zcKsIK$7Xa#*@(#pr5t5Mi6{f83aQGtE_h& delta 341 zcmV-b0jmD|1i=H4Q3~S<5egY1z2=7fky|K#DM>^@R9M69mo0L`Fc3yxG6g<{fq_Af zP!MPkP|!md1mq|S3 zhhJ;J9CH;|L}<3n1t2Ix7|@`!yEX*}aBrLB!vG4P-L=a_X!rKL$eL|~22EM@eb0Ws z$90ansxJY%%em9hb2|F8pBTKZYT8{u`$L7*_4mBEQotMzVW2dSronYC9X7iuP*x?I n*RPlH>5nP60lChlLIpSj{$-}=t8UWk00000NkvXXu0mjfHnEwM diff --git a/images.h b/images.h index 7147dae..91c26f4 100644 --- a/images.h +++ b/images.h @@ -1327,6 +1327,24 @@ SFG_PROGRAM_MEMORY uint8_t SFG_monsterSprites[][SFG_TEXTURE_STORE_SIZE] = 0,0,0,34,42,153,145,1,195,16,23,119,115,65,0,0,0,0,0,32,2,170,34,31,236,49,23, 116,17,17,0,0,0,0,0,0,0,34,2,24,238,193,1,17,0,0,0,0,0,0,0,0,0,32,0,24,254,193, 0,35,48,0,0,0,0,0,0,0,0,0,0,1,17,16,2,32,48,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0 + }, + { // 18 universal dead/corpse sprite +175,0,3,4,1,5,6,2,157,18,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,4,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,34,0,0,0,0,0,0,0,0,0,0,0, +0,0,4,50,34,0,0,0,0,0,0,0,0,0,0,0,0,0,4,36,17,0,0,0,0,0,0,0,0,0,0,0,0,1,18,65, +49,0,0,0,0,0,0,0,0,0,0,1,17,34,34,19,51,0,0,0,0,0,0,0,0,0,1,22,98,34,34,33,20,0, +0,0,0,0,0,0,0,0,22,101,101,40,130,36,68,0,0,0,0,0,0,0,0,0,22,85,102,85,136,129, +17,0,0,0,0,0,0,0,0,1,85,85,82,37,136,22,68,0,0,0,0,0,0,0,0,1,18,53,85,34,132,19, +36,0,0,0,0,0,0,0,0,0,2,34,85,84,33,100,66,0,0,0,0,0,0,0,0,1,35,51,51,39,22,102, +49,0,0,0,0,0,0,0,0,1,50,58,58,39,65,101,33,0,0,0,0,0,0,0,0,0,18,34,34,116,22,83, +17,0,0,0,0,0,0,0,0,0,1,34,20,68,17,50,20,0,0,0,0,0,0,0,0,0,0,17,4,68,34,20,52,0, +0,0,0,0,0,0,0,0,0,0,0,34,39,83,49,0,0,0,0,0,0,0,0,0,0,0,34,35,117,51,65,0,0,0,0, +0,0,0,0,0,0,0,0,19,115,51,52,0,0,0,0,0,0,0,0,0,0,0,0,19,55,163,153,0,0,0,0,0,0, +0,0,0,0,0,0,1,55,51,153,0,0,0,0,0,0,0,0,0,0,0,0,0,17,115,41,0,0,0,0,0,0,0,0,0,0, +0,0,17,53,36,65,0,0,0,0,0,0,0,0,0,0,0,0,21,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,1, +16,1,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,34,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,2,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0 } }; diff --git a/main.c b/main.c index 41179bd..abaf78a 100755 --- a/main.c +++ b/main.c @@ -221,6 +221,7 @@ typedef struct #define SFG_MONSTER_STATE_GOING_SW 10 #define SFG_MONSTER_STATE_GOING_W 11 #define SFG_MONSTER_STATE_GOING_NW 12 +#define SFG_MONSTER_STATE_DEAD 13 typedef struct { @@ -532,9 +533,11 @@ static inline uint8_t SFG_RCLUnitToZBuffer(RCL_Unit x) const uint8_t *SFG_getMonsterSprite( uint8_t monsterType, uint8_t state, uint8_t frame) { - uint8_t index = 17; // makes the code smaller compared to returning pointers + uint8_t index = + state == SFG_MONSTER_STATE_DEAD ? 18 : 17; + // ^ makes the code smaller compared to returning pointers - if (state != SFG_MONSTER_STATE_DYING) + if ((state != SFG_MONSTER_STATE_DYING) && (state != SFG_MONSTER_STATE_DEAD)) switch (monsterType) { case SFG_LEVEL_ELEMENT_MONSTER_SPIDER: @@ -586,7 +589,7 @@ const uint8_t *SFG_getMonsterSprite( index = 16; break; } - + return SFG_monsterSprites[index]; } @@ -2286,7 +2289,10 @@ void SFG_updateLevel() { SFG_MonsterRecord *m = &(SFG_currentLevel.monsterRecords[j]); - if (SFG_MR_STATE(*m) != SFG_MONSTER_STATE_INACTIVE) + uint8_t state = SFG_MR_STATE(*m); + + if ((state != SFG_MONSTER_STATE_INACTIVE) && + (state != SFG_MONSTER_STATE_DEAD)) { if (SFG_projectileCollides(p, SFG_MONSTER_COORD_TO_RCL_UNITS(m->coords[0]), @@ -2499,7 +2505,8 @@ void SFG_updateLevel() { monster->stateType = (monster->stateType & SFG_MONSTER_MASK_TYPE) | - SFG_MONSTER_STATE_IDLE; + (monster->health != 0 ? + SFG_MONSTER_STATE_IDLE : SFG_MONSTER_STATE_DEAD); } SFG_currentLevel.checkedMonsterIndex++; @@ -2519,6 +2526,10 @@ void SFG_updateLevel() SFG_MonsterRecord *monster = &(SFG_currentLevel.monsterRecords[i]); uint8_t state = SFG_MR_STATE(*monster); + if ((state == SFG_MONSTER_STATE_INACTIVE) || + (state == SFG_MONSTER_STATE_DEAD)) + continue; + if (state == SFG_MONSTER_STATE_DYING) { if (SFG_MR_TYPE(*monster) == SFG_LEVEL_ELEMENT_MONSTER_ENDER) @@ -2534,22 +2545,15 @@ void SFG_updateLevel() } } - // remove dead - - for (uint16_t j = i; j < SFG_currentLevel.monsterRecordCount - 1; ++j) - SFG_currentLevel.monsterRecords[j] = - SFG_currentLevel.monsterRecords[j + 1]; - - SFG_currentLevel.monsterRecordCount -= 1; - - i--; + monster->stateType = + (monster->stateType & 0xf0) | SFG_MONSTER_STATE_DEAD; } else if (monster->health == 0) { monster->stateType = (monster->stateType & SFG_MONSTER_MASK_TYPE) | SFG_MONSTER_STATE_DYING; } - else if (state != SFG_MONSTER_STATE_INACTIVE) + else { #if SFG_PREVIEW_MODE == 0 SFG_monsterPerformAI(monster); @@ -2916,7 +2920,9 @@ void SFG_gameStepPlaying() { SFG_MonsterRecord *m = &(SFG_currentLevel.monsterRecords[i]); - if (SFG_MR_STATE(*m) == SFG_MONSTER_STATE_INACTIVE) + uint8_t state = SFG_MR_STATE(*m); + + if (state == SFG_MONSTER_STATE_INACTIVE || state == SFG_MONSTER_STATE_DEAD) continue; RCL_Vector2D mPos;