Add knife

This commit is contained in:
Miloslav Číž 2019-10-20 23:04:28 +02:00
parent 11afa2ae4b
commit 40fcef2cb7
3 changed files with 27 additions and 17 deletions

View File

@ -379,24 +379,24 @@ uint8_t SFG_backgrounds[][SFG_TEXTURE_STORE_SIZE] =
SFG_PROGRAM_MEMORY SFG_PROGRAM_MEMORY
uint8_t SFG_weaponImages[][SFG_TEXTURE_STORE_SIZE] = uint8_t SFG_weaponImages[][SFG_TEXTURE_STORE_SIZE] =
{ {
{ // 0, axe { // 0, knife
175,93,0,172,1,6,94,2,4,170,3,173,5,48,171,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 175,0,5,2,6,4,3,83,1,77,85,61,60,62,63,75,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,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,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,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,68, 0,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0,0,1,170,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,71,0,0,0,0,0,0,0,0,34,0,0,0,0,0,68,122,0,0,0,0,0, 167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0,0,0,0,0,0,26,119,16,
0,0,34,82,0,0,0,0,4,215,167,0,0,0,0,0,0,34,85,82,0,0,0,0,77,122,119,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,1,17,17,58,119,16,0,0,0,0,0,0,0,0,1,17,20,78,219,57,115,16,
34,85,85,82,0,0,0,4,215,167,125,0,0,0,0,34,85,85,85,18,0,0,0,68,122,119,212,0,0, 0,0,0,0,0,0,0,17,29,68,68,68,219,57,49,17,17,0,0,0,0,0,17,34,68,238,68,68,219,
0,2,85,85,85,17,18,0,0,4,133,71,212,64,0,0,2,44,85,85,17,17,18,0,4,74,92,164,68, 57,131,102,102,0,0,0,0,17,85,34,68,68,68,68,43,63,134,102,102,0,0,0,17,34,85,36,
0,0,0,44,204,85,81,17,17,18,0,71,133,138,116,64,0,0,2,136,204,197,17,17,17,98,4, 68,78,66,34,37,63,54,102,102,0,0,17,34,36,34,34,36,68,213,188,86,63,54,51,51,0,
122,200,167,64,0,0,0,40,136,136,187,17,17,22,102,71,168,170,116,0,0,0,2,136,136, 1,34,36,43,181,82,34,34,43,44,86,63,51,51,51,0,18,36,69,204,205,34,68,66,34,85,
131,59,177,17,102,17,247,138,119,64,0,0,0,37,204,136,51,51,187,22,97,17,247,167, 86,63,51,51,51,1,34,75,204,85,180,68,68,68,37,82,86,63,51,51,51,1,36,188,181,91,
68,0,0,0,0,2,37,81,51,51,59,102,17,17,100,116,0,0,0,0,0,0,2,38,99,51,49,97,17, 45,222,238,210,85,34,86,63,131,51,136,22,102,102,101,101,82,46,66,34,85,85,86,
17,111,64,0,0,0,0,0,0,0,2,102,97,17,59,17,17,20,0,0,0,0,0,0,0,0,0,34,102,17,51, 57,136,136,136,17,17,17,129,17,17,18,82,38,85,101,86,57,56,136,136,0,0,0,0,0,0,
177,19,50,0,0,0,0,0,0,0,0,0,0,38,102,51,51,51,49,32,0,0,0,0,0,0,0,0,0,2,153,99, 1,18,83,92,133,83,57,120,17,17,0,0,0,0,0,0,0,8,136,83,22,83,58,119,128,0,0,0,0,
62,227,17,32,0,0,0,0,0,0,0,0,0,2,131,150,227,59,187,18,0,0,0,0,0,0,0,0,0,2,164, 0,0,0,0,0,0,17,1,104,57,119,128,0,0,0,0,0,0,0,0,0,0,0,0,17,58,119,128,0,0,0,0,0,
150,105,51,51,238,32,0,0,0,0,0,0,0,0,0,34,38,97,147,57,153,32,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,26,119,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0,
0,2,102,25,153,146,0,0,0,0,0,0,0,0,0,0,0,0,38,105,153,32,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,1,170,167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0,
0,2,105,146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,32,0,0,0,0,0,0 0,0,17,17,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
}, },
{ // 1, shotgun { // 1, shotgun
175,1,3,4,6,101,5,17,7,100,2,99,19,21,25,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0, 175,1,3,4,6,101,5,17,7,100,2,99,19,21,25,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0,

BIN
assets/weapon_knife.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

10
main.c
View File

@ -291,6 +291,16 @@ typedef struct
#define SFG_AI_UPDATE_FRAME_INTERVAL 1 #define SFG_AI_UPDATE_FRAME_INTERVAL 1
#endif #endif
typedef struct
{
uint8_t type;
int8_t framesToLive;
uint16_t position[3]; /**< Current position, stored as u16 to save space, as
that is exactly enough to store position on 64x64
map. */
int16_t direction[3]; /**< Added to position each game step. */
} SFG_projectileRecord;
/* /*
GLOBAL VARIABLES GLOBAL VARIABLES
=============================================================================== ===============================================================================