From 3a22f95b0101555786aad584364938fa16b8ed5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Tue, 12 Nov 2019 00:56:31 +0100 Subject: [PATCH] Add ender --- assets.h | 68 ++++++++++++++++++++++++++++++++ assets/monster_ender_attack.png | Bin 0 -> 1516 bytes assets/monster_ender_idle.png | Bin 0 -> 1244 bytes assets/monster_ender_walk.png | Bin 0 -> 1283 bytes levels.h | 3 +- main.c | 10 +++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 assets/monster_ender_attack.png create mode 100644 assets/monster_ender_idle.png create mode 100644 assets/monster_ender_walk.png diff --git a/assets.h b/assets.h index 71427cd..76c1a63 100644 --- a/assets.h +++ b/assets.h @@ -780,6 +780,74 @@ SFG_PROGRAM_MEMORY uint8_t SFG_monsterSprites[][SFG_TEXTURE_STORE_SIZE] = 17,17,0,0,0,10,69,85,51,51,50,0,0,97,17,23,17,22,0,0,0,10,168,210,34,34,34,0,0, 1,65,17,21,17,0,0,0,0,0,2,82,0,0,0,0,6,52,69,31,0,0,0,0,0,0,2,34,0,0,0,0,0,102, 102,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 + }, + { // 10, ender idle +0,3,4,5,2,175,1,6,52,7,93,92,50,74,73,0,85,85,85,85,0,0,0,80,5,0,5,85,85,80,0,0, +85,85,80,0,153,153,52,1,134,17,16,80,0,9,114,32,85,80,3,151,119,119,119,104,97, +135,129,9,119,115,36,16,85,9,114,115,51,51,51,54,97,114,113,99,50,17,22,16,80, +151,113,18,4,18,34,51,97,135,129,102,33,20,70,16,9,119,20,55,114,0,65,34,16,17, +22,24,4,68,70,16,2,20,67,51,51,51,48,34,33,6,96,129,4,65,0,0,9,113,51,58,58,51, +115,3,49,65,51,0,65,96,85,85,9,49,33,34,35,34,35,49,51,18,34,38,102,102,0,0,7, +49,36,34,33,35,18,113,115,43,50,22,23,119,114,32,7,49,33,1,34,51,49,39,23,114, +51,22,18,34,36,16,7,19,34,64,66,34,51,19,35,51,50,6,102,17,22,96,80,115,35,11, +176,34,49,19,45,194,35,51,116,100,70,16,85,3,55,10,164,18,18,61,17,18,18,50,55, +97,22,16,80,1,121,10,170,65,35,18,34,34,33,34,35,96,0,0,3,68,121,64,0,1,18,34, +32,68,18,34,34,6,5,85,1,68,119,64,0,1,17,18,32,68,18,34,34,6,5,85,80,1,55,10, +170,65,34,65,34,34,33,34,33,96,0,0,85,3,51,10,164,35,34,52,17,18,17,34,36,103, +114,32,80,115,35,11,176,51,49,19,20,65,18,34,68,98,36,16,9,19,34,64,67,51,119, +19,35,50,33,70,6,17,22,96,7,49,33,1,51,51,113,35,19,52,34,16,100,68,70,16,3,49, +36,34,50,39,18,49,35,65,17,70,65,17,22,16,3,49,33,51,51,35,35,16,18,75,68,102, +102,102,0,0,3,33,35,51,51,51,49,1,17,68,70,0,98,96,85,85,1,68,18,58,58,49,208, +17,68,6,96,129,2,34,0,0,3,34,65,35,50,0,65,20,96,17,22,24,1,18,36,32,80,50,36, +29,4,18,17,70,97,135,129,0,17,17,20,16,85,2,36,34,34,33,20,230,97,114,113,100, +68,17,22,16,85,80,4,193,17,204,68,104,1,135,129,4,68,68,70,16,85,85,80,0,68,68, +70,1,128,17,16,80,0,4,70,16,85,85,85,85,0,0,0,80,5,0,5,85,85,80,0,0 + }, + { // 11, ender walking +0,3,4,5,175,2,1,6,52,93,7,92,50,74,73,0,68,68,68,68,64,0,0,4,0,64,0,68,68,0,0,4, +68,68,68,0,10,170,114,80,136,97,17,4,0,167,34,4,68,68,0,39,119,119,119,21,86,24, +120,16,119,50,81,4,68,0,167,35,51,51,51,49,102,23,39,22,33,17,97,4,64,42,114,18, +85,1,34,51,22,24,120,22,1,85,97,4,64,167,37,87,114,32,81,34,49,1,17,97,128,85, +97,4,2,21,85,51,51,51,53,18,34,16,102,8,16,81,0,4,10,119,19,51,147,147,115,1,49, +85,18,0,1,96,68,68,10,115,18,34,34,50,35,50,35,33,34,22,102,96,68,68,7,115,18, +81,34,18,49,55,19,50,178,22,23,114,0,0,7,115,18,16,18,35,50,23,23,115,35,22,18, +39,114,32,3,17,50,53,5,34,51,35,35,51,50,6,102,18,37,16,64,115,34,48,187,2,49, +19,45,194,35,51,117,101,22,96,64,50,39,112,153,177,18,49,209,17,33,35,55,97,86, +16,68,0,39,160,153,149,35,17,34,34,34,18,51,96,22,16,64,53,87,165,0,0,17,34,33, +5,82,34,35,6,0,0,64,21,87,165,0,0,17,18,33,5,82,34,34,6,4,68,68,0,39,112,153, +149,34,81,34,34,34,18,33,96,0,4,68,7,51,48,153,178,34,53,17,17,33,18,21,103,34, +4,64,115,35,48,187,3,49,19,21,81,18,17,85,98,81,4,10,17,34,37,5,51,55,19,34,51, +33,86,6,17,102,4,7,50,18,16,19,51,113,35,19,50,81,80,101,85,97,4,7,50,18,82,35, +39,18,49,83,37,21,86,81,17,97,4,3,50,18,35,51,50,35,16,18,37,181,102,102,96,0,4, +2,34,19,51,51,51,49,101,17,85,86,0,2,34,102,96,1,21,81,51,147,145,214,81,85,80, +102,1,128,18,37,32,64,50,37,19,50,37,1,21,86,1,17,104,16,17,21,16,64,51,33,93, +80,82,17,86,96,24,120,22,1,17,22,16,68,0,33,82,34,33,21,230,96,23,39,22,85,85, +86,16,68,68,0,92,17,204,85,96,16,24,120,16,85,85,86,16,68,68,68,0,5,85,86,0,136, +1,17,4,0,0,0,0,68,68,68,68,64,0,0,68,0,64,0,68,68,68,68,68 + }, + { // 12, ender attacking +0,4,5,175,3,26,28,191,6,29,2,1,30,7,105,27,51,51,51,51,48,0,0,3,0,48,112,51,51, +48,0,0,51,51,51,0,13,221,137,80,153,231,119,115,0,13,129,16,51,51,0,24,136,136, +136,101,94,119,221,119,136,130,26,64,51,0,216,18,204,204,204,198,119,125,221, +119,118,244,75,64,48,29,129,73,85,6,153,204,103,119,215,126,6,250,171,64,48,216, +26,168,137,144,86,153,198,7,119,118,144,90,171,64,1,74,170,34,34,34,37,105,153, +96,119,9,96,84,0,0,13,136,66,34,82,82,130,6,198,85,121,0,6,176,51,51,13,130,65, +17,17,33,18,41,156,150,153,110,187,187,0,0,8,130,65,164,17,65,36,40,108,201,89, +110,104,136,129,16,8,130,65,64,65,18,33,72,248,140,156,110,105,145,26,64,2,68, +33,42,170,17,34,18,18,34,41,14,235,255,75,176,48,130,17,42,85,1,36,66,26,81,18, +34,133,181,171,64,48,33,17,40,5,84,65,36,164,68,20,18,40,180,75,64,51,0,17,141, +5,90,18,68,17,17,17,65,34,176,0,0,48,42,161,141,0,0,68,17,20,10,161,17,18,11,3, +51,48,74,161,136,0,0,68,65,20,10,161,17,17,11,3,51,51,0,18,40,5,90,17,95,145,17, +17,65,20,176,0,0,51,8,34,33,5,81,17,37,255,255,31,65,74,184,129,16,48,130,18,42, +85,2,47,242,101,95,249,255,85,177,26,64,13,68,17,26,10,34,40,108,153,34,150,91, +11,244,75,176,8,33,65,64,66,34,134,156,108,201,86,80,181,170,171,64,8,33,65,161, +18,152,105,198,92,149,101,94,95,68,75,64,2,33,65,18,34,41,156,96,105,149,85,238, +235,187,0,0,1,17,66,34,34,44,198,229,102,85,126,0,9,176,51,51,4,74,164,34,82, +166,254,86,85,80,119,6,144,145,0,0,48,33,26,66,41,149,6,101,94,119,119,121,96, +97,26,16,48,34,20,95,80,89,102,94,224,119,215,126,6,111,74,64,51,0,20,89,153, +150,101,238,231,125,221,119,117,111,75,64,51,51,0,95,102,255,85,224,96,119,215, +112,85,90,171,64,51,51,51,0,5,85,94,0,153,7,119,3,0,10,171,64,51,51,51,51,48,0, +0,51,0,48,112,51,51,48,0,0 } }; diff --git a/assets/monster_ender_attack.png b/assets/monster_ender_attack.png new file mode 100644 index 0000000000000000000000000000000000000000..849e4d3d4e5dd376776753e03d4218ee6c44c414 GIT binary patch literal 1516 zcmVe zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00mS@L_t(o!J4?y_YDP}em|DXQCw z2&ir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PK*1U1 zfD4~e3QDQL2G02a5qh7o>}1fbX~8+S|Ai2i3NHYywRP^I5iZx5i%jhF8OxxQ@(`%X z$_8-ma<7!KhA06o_eLXQnKeScW3XzY?IA*h2#qAn0nWK~E|$WBF=H93va4=1PA8#K${J4ZBruyHXE};xfvT)plE$ z9TrM?=#ianCD0`=0D$}=#hNIfOcr*dbfv> z=-`}Vv3W-O)(srDZygq!=Ye=xBpu4Mv;RD%140Nd@|@-NL{dsL(3A*nK z)Q@$vWFJ1~mfEmHM`5%s)H%z&@}Z|T+JiY~xo0$IIbZu!|P=`%XIQ0pvHgp2$>X<+Wuu;a;*H=|Rb< z9ZM;_1a?pDK3$5cMS&i`ha2F>{M#Iuj3NG*qxsom^63+*vI1iaJM3&y0>H=LF0g&w z;_C7W0KganV+`BZEz-*rj4`Wv#u$rgu`C8YW>1@=5Q*tElu{7WYp>hoEJyn1{Xi?i z<N3|Wv%U&F3&Vk#}bmN<75ETwcL-CQpYQo z5YSrNz$mfYi%DpMp0bn>OYuGeuJE{J688F-1NV+d8bK724MH-8!WmB7j>Ai*l+u=& t>!5$zp7|6JE;??12aVuYjR!@&Rm002ovPDHLkV1jXGMqU5_ literal 0 HcmV?d00001 diff --git a/levels.h b/levels.h index 76a288c..6c6288e 100644 --- a/levels.h +++ b/levels.h @@ -97,6 +97,7 @@ typedef struct #define SFG_LEVEL_ELEMENT_MONSTER_DESTROYER 0x10 #define SFG_LEVEL_ELEMENT_MONSTER_WARRIOR 0x20 #define SFG_LEVEL_ELEMENT_MONSTER_PLASMABOT 0x30 +#define SFG_LEVEL_ELEMENT_MONSTER_ENDER 0x40 typedef struct { @@ -245,7 +246,7 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_level0 = {SFG_LEVEL_ELEMENT_HEALTH, {12, 4}}, {SFG_LEVEL_ELEMENT_HEALTH, {15, 4}}, {SFG_LEVEL_ELEMENT_BARREL, {24, 10}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_BARREL, {13, 4}}, {SFG_LEVEL_ELEMENT_BARREL, {12, 6}}, - {SFG_LEVEL_ELEMENT_MONSTER_DESTROYER, {15, 7}}, {SFG_LEVEL_ELEMENT_MONSTER_SPIDER, {16, 8}}, + {SFG_LEVEL_ELEMENT_MONSTER_ENDER, {23, 7}}, {SFG_LEVEL_ELEMENT_MONSTER_SPIDER, {16, 8}}, {SFG_LEVEL_ELEMENT_MONSTER_DESTROYER, {16, 7}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_MONSTER_WARRIOR, {18, 31}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_MONSTER_PLASMABOT, {19, 31}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}}, diff --git a/main.c b/main.c index 4156927..0c36596 100755 --- a/main.c +++ b/main.c @@ -539,6 +539,15 @@ const uint8_t *SFG_getMonsterSprite( break; + case SFG_LEVEL_ELEMENT_MONSTER_ENDER: + switch (state) + { + case SFG_MONSTER_STATE_ATTACKING: return SFG_monsterSprites[12]; break; + case SFG_MONSTER_STATE_IDLE: return SFG_monsterSprites[10]; break; + default: return SFG_monsterSprites[frame ? 10 : 11]; break; + } + break; + default: return SFG_monsterSprites[0]; break; @@ -1087,6 +1096,7 @@ void SFG_setAndInitLevel(const SFG_Level *level) case SFG_LEVEL_ELEMENT_MONSTER_DESTROYER: case SFG_LEVEL_ELEMENT_MONSTER_WARRIOR: case SFG_LEVEL_ELEMENT_MONSTER_PLASMABOT: + case SFG_LEVEL_ELEMENT_MONSTER_ENDER: SFG_LOG("adding monster"); monster =