mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-23 01:12:16 -05:00
Add destroyer
This commit is contained in:
parent
36079bed49
commit
98dc694ba3
69
assets.h
69
assets.h
@ -587,6 +587,75 @@ SFG_PROGRAM_MEMORY uint8_t SFG_monsterSprites[][SFG_TEXTURE_STORE_SIZE] =
|
||||
16,17,0,0,20,66,87,18,37,16,0,0,18,165,218,209,0,16,0,0,1,84,52,65,17,81,17,0,
|
||||
29,173,90,33,0,0,0,0,0,17,19,52,82,37,16,0,19,26,161,49,0,0,0,0,0,0,1,19,82,81,
|
||||
0,0,1,50,211,16,0,0,0,0,0,0,0,1,17,16,0,0,0,17,17,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
{ // 3, destroyer idle
|
||||
0,175,3,4,5,73,1,6,2,77,157,79,7,78,76,75,17,0,0,0,17,17,17,17,17,17,17,17,17,
|
||||
17,17,17,17,11,221,219,0,17,17,17,16,0,0,0,0,0,1,17,17,11,217,153,219,1,17,16,2,
|
||||
119,114,39,116,119,1,17,17,11,189,154,155,1,16,12,194,124,204,204,199,204,1,17,
|
||||
17,16,189,154,169,176,12,199,116,35,51,51,50,51,1,17,17,17,11,217,170,213,196,
|
||||
68,67,34,34,34,40,34,0,0,17,16,11,217,154,149,52,50,50,0,0,0,0,0,4,64,17,7,118,
|
||||
102,138,173,83,68,128,17,17,17,17,7,114,32,16,116,12,66,106,169,181,51,71,0,1,
|
||||
17,0,115,56,128,16,67,0,102,102,42,213,35,52,71,112,0,119,51,40,128,7,48,194,0,
|
||||
7,114,171,82,51,68,71,114,83,34,40,128,4,12,204,64,0,71,106,181,131,52,68,71,82,
|
||||
34,40,80,4,12,199,114,192,36,70,157,184,52,119,116,37,40,133,80,0,204,119,119,
|
||||
96,4,70,169,213,55,51,55,69,80,102,96,0,102,103,116,44,4,50,106,155,83,157,147,
|
||||
117,34,0,0,2,9,230,68,32,3,50,106,173,83,57,211,53,34,1,17,2,11,150,68,48,3,50,
|
||||
106,233,83,57,211,53,34,1,17,0,34,36,67,44,3,50,106,238,83,157,147,37,34,128,0,
|
||||
0,119,68,67,128,3,54,254,229,34,51,50,53,88,50,32,6,7,68,50,192,131,38,174,245,
|
||||
35,34,35,37,34,40,128,2,4,68,48,0,50,111,229,82,51,51,50,82,34,40,128,3,32,66,0,
|
||||
3,38,254,86,130,34,34,34,88,34,40,128,16,50,0,0,0,111,229,104,34,40,133,85,104,
|
||||
136,40,80,16,51,99,38,105,154,245,130,40,96,82,67,6,102,133,80,17,3,54,102,137,
|
||||
238,88,134,96,17,7,66,6,0,101,80,17,16,13,187,154,229,102,104,36,0,116,72,128,
|
||||
17,6,96,17,17,11,186,170,245,96,130,51,71,67,34,32,17,16,0,17,16,187,218,174,
|
||||
240,5,130,51,51,51,50,80,17,17,17,17,11,189,170,175,1,16,5,34,34,34,80,1,17,17,
|
||||
17,17,11,221,170,255,1,17,16,85,85,0,1,17,17,17,17,17,11,218,255,0,17,17,17,0,0,
|
||||
17,17,17,17,17,17,17,0,0,0,17,17,17,17,17,17,17,17,17,17,17,17
|
||||
},
|
||||
{ // 4, destroyer attacking
|
||||
175,0,3,4,73,1,5,2,183,6,77,157,79,78,7,31,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,
|
||||
17,17,17,0,0,0,0,0,136,136,128,0,0,0,0,0,28,221,220,17,0,0,0,8,136,136,128,0,0,
|
||||
0,0,0,28,218,170,220,16,1,88,136,136,255,136,128,0,0,0,0,28,218,187,172,85,94,
|
||||
238,136,136,255,136,128,0,0,0,0,28,218,187,187,215,105,255,248,136,136,136,0,0,
|
||||
0,0,0,1,221,171,187,163,102,255,255,136,136,136,0,0,1,17,0,25,17,85,87,189,38,
|
||||
99,99,56,136,0,0,17,86,97,1,150,37,230,37,186,195,51,35,56,0,0,17,255,146,33,1,
|
||||
99,37,85,85,82,211,35,54,98,17,17,249,99,55,113,25,51,94,33,17,153,44,50,51,111,
|
||||
255,243,70,50,39,113,22,53,238,230,17,22,148,195,115,54,153,159,114,34,39,113,
|
||||
19,49,238,153,46,18,102,125,151,57,51,57,100,34,39,65,19,94,233,153,149,17,102,
|
||||
90,215,51,173,163,148,68,116,65,18,21,85,153,98,225,99,37,172,67,58,211,52,39,
|
||||
69,81,19,33,163,86,98,17,51,37,189,67,58,211,52,34,17,17,18,33,202,86,99,17,51,
|
||||
37,58,67,173,163,36,34,16,0,19,18,34,102,50,225,51,37,58,66,51,50,52,34,113,17,
|
||||
18,89,150,102,55,17,51,82,52,35,34,35,36,71,50,33,19,33,150,99,46,23,50,82,36,
|
||||
35,51,50,116,34,39,113,19,37,102,99,17,19,37,36,66,51,50,39,66,34,39,113,19,34,
|
||||
22,33,17,50,82,69,114,34,36,68,71,34,39,113,1,50,81,17,85,85,36,87,34,39,66,99,
|
||||
23,119,39,65,1,51,37,50,87,171,68,21,81,119,25,98,21,85,116,65,0,19,51,85,123,
|
||||
50,65,87,38,17,150,103,113,17,84,65,0,1,92,202,171,52,81,35,51,105,99,34,33,0,
|
||||
21,81,0,1,204,219,187,36,20,114,51,51,51,50,65,0,1,17,0,28,205,219,178,65,20,
|
||||
119,34,34,34,65,16,0,0,0,0,28,205,187,36,16,1,20,68,68,65,16,0,0,0,0,0,28,219,
|
||||
187,33,0,0,1,17,17,16,0,0,0,0,0,0,28,219,177,16,0,0,0,0,0,0,0,0,0,0,0,0,17,17,
|
||||
16,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
{ // 5, destroyer walking
|
||||
175,0,3,4,1,5,2,73,6,77,79,7,78,157,75,76,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
26,204,202,17,0,0,1,17,17,17,0,0,0,0,0,0,26,201,153,202,16,1,19,136,130,33,17,
|
||||
17,0,0,0,0,26,172,157,154,16,27,179,40,187,184,133,129,16,0,0,0,1,172,157,217,
|
||||
161,184,136,50,51,59,184,102,16,0,0,0,0,26,201,221,199,85,85,50,34,35,50,102,16,
|
||||
0,0,0,1,26,201,157,151,53,35,97,17,18,38,102,16,17,16,0,24,17,68,70,220,115,54,
|
||||
16,0,1,17,97,17,85,16,1,133,36,181,36,217,167,51,81,17,16,0,17,56,34,16,1,83,36,
|
||||
68,68,119,199,35,53,88,129,17,136,51,102,16,24,51,75,33,17,136,122,114,51,85,88,
|
||||
130,115,34,102,16,21,52,187,181,17,21,135,167,99,53,85,88,114,34,102,16,19,49,
|
||||
187,136,43,18,85,76,214,53,136,133,39,34,103,16,19,75,184,136,132,17,85,73,199,
|
||||
56,51,56,87,118,119,16,18,20,68,136,82,177,83,36,154,115,156,147,135,33,68,16,
|
||||
19,33,159,69,82,17,51,36,220,115,57,195,55,34,17,16,18,33,169,69,83,17,51,36,
|
||||
249,115,57,195,55,34,97,17,19,18,34,85,50,177,51,36,255,115,156,147,39,38,50,33,
|
||||
18,72,133,85,54,17,51,78,247,34,51,50,55,114,38,97,19,33,133,83,43,22,50,78,231,
|
||||
35,34,35,39,34,38,97,19,36,85,83,17,19,36,231,114,51,51,50,114,34,38,97,19,34,
|
||||
21,33,17,50,78,116,98,34,34,38,118,34,38,113,1,50,65,17,68,68,231,70,34,38,97,
|
||||
17,22,102,103,113,1,51,36,50,70,157,119,20,38,65,16,0,1,20,71,113,0,19,51,68,
|
||||
109,254,113,70,65,23,97,16,0,1,20,65,0,1,74,169,157,247,65,35,37,136,133,33,0,0,
|
||||
1,17,0,0,26,173,221,231,65,98,51,85,134,97,0,0,0,0,0,1,170,205,223,225,23,98,34,
|
||||
51,51,33,0,0,0,0,0,26,172,221,222,16,1,17,118,34,38,97,0,0,0,0,0,26,204,221,238,
|
||||
16,0,0,17,17,17,16,0,0,0,0,0,26,205,238,17,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
};
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 8.9 KiB |
5
levels.h
5
levels.h
@ -94,6 +94,7 @@ typedef struct
|
||||
bits, as this is convenient for the code.
|
||||
*/
|
||||
#define SFG_LEVEL_ELEMENT_MONSTER_SPIDER 0x00
|
||||
#define SFG_LEVEL_ELEMENT_MONSTER_DESTROYER 0x10
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -242,8 +243,8 @@ 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_SPIDER, {15, 7}}, {SFG_LEVEL_ELEMENT_MONSTER_SPIDER, {16, 8}},
|
||||
{SFG_LEVEL_ELEMENT_MONSTER_SPIDER, {16, 7}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
{SFG_LEVEL_ELEMENT_MONSTER_DESTROYER, {15, 7}}, {SFG_LEVEL_ELEMENT_MONSTER_SPIDER, {16, 8}},
|
||||
{SFG_LEVEL_ELEMENT_MONSTER_DESTROYER, {16, 7}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
{SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
{SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
{SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
|
20
main.c
20
main.c
@ -501,6 +501,15 @@ const uint8_t *SFG_getMonsterSprite(
|
||||
}
|
||||
break;
|
||||
|
||||
case SFG_LEVEL_ELEMENT_MONSTER_DESTROYER:
|
||||
switch (state)
|
||||
{
|
||||
case SFG_MONSTER_STATE_ATTACKING: return SFG_monsterSprites[4]; break;
|
||||
case SFG_MONSTER_STATE_IDLE: return SFG_monsterSprites[3]; break;
|
||||
default: return SFG_monsterSprites[frame ? 3 : 5]; break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return SFG_monsterSprites[0];
|
||||
break;
|
||||
@ -1045,7 +1054,8 @@ void SFG_setAndInitLevel(const SFG_Level *level)
|
||||
break;
|
||||
|
||||
case SFG_LEVEL_ELEMENT_MONSTER_SPIDER:
|
||||
SFG_LOG("adding monster: spider");
|
||||
case SFG_LEVEL_ELEMENT_MONSTER_DESTROYER:
|
||||
SFG_LOG("adding monster");
|
||||
|
||||
monster =
|
||||
&(SFG_currentLevel.monsterRecords[SFG_currentLevel.monsterRecordCount]);
|
||||
@ -1942,11 +1952,15 @@ void SFG_gameStep()
|
||||
> SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE
|
||||
)
|
||||
{
|
||||
monster->stateType = SFG_MONSTER_STATE_INACTIVE;
|
||||
monster->stateType =
|
||||
(monster->stateType & SFG_MONSTER_MASK_TYPE) |
|
||||
SFG_MONSTER_STATE_INACTIVE;
|
||||
}
|
||||
else if (monster->stateType == SFG_MONSTER_STATE_INACTIVE)
|
||||
{
|
||||
monster->stateType = SFG_MONSTER_STATE_IDLE;
|
||||
monster->stateType =
|
||||
(monster->stateType & SFG_MONSTER_MASK_TYPE) |
|
||||
SFG_MONSTER_STATE_IDLE;
|
||||
}
|
||||
|
||||
SFG_currentLevel.checkedMonsterIndex++;
|
||||
|
Loading…
Reference in New Issue
Block a user