Add column

This commit is contained in:
Miloslav Číž 2020-02-24 12:53:49 +01:00
parent dbe912d70e
commit d4aeb97aff
4 changed files with 31 additions and 9 deletions

BIN
assets/item_column.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

View File

@ -580,7 +580,26 @@ SFG_PROGRAM_MEMORY uint8_t SFG_itemSprites[][SFG_TEXTURE_STORE_SIZE] =
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
},
{ // 9, access card
{ // 9, column
175,2,4,3,5,48,6,63,51,7,81,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,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,65,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,20,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,73,16,0,0,0,0,0,0,0,
0,0,0,0,0,1,148,38,145,16,0,0,16,0,0,0,1,0,0,0,1,22,146,36,105,145,17,17,33,17,
17,17,23,17,17,17,25,150,98,36,102,67,119,119,41,121,150,102,103,119,118,121,54,
150,98,36,70,67,68,71,36,68,68,68,71,66,119,119,57,70,66,50,68,67,36,68,40,68,
68,67,34,66,36,68,52,36,66,34,34,35,51,51,40,34,50,40,34,35,50,34,52,36,66,50,
34,33,49,129,40,35,131,49,50,35,50,50,20,36,66,35,34,33,17,17,40,129,51,49,18,
51,50,131,18,36,34,51,51,49,17,24,33,19,51,17,50,56,51,131,18,34,66,50,51,49,26,
161,33,51,17,19,50,17,51,19,19,50,51,51,19,49,170,161,35,17,17,17,18,51,19,19,
19,50,35,49,19,17,161,168,34,130,35,56,34,34,33,131,17,34,33,49,50,53,85,85,37,
85,85,85,82,85,85,85,82,67,49,17,42,160,0,0,16,0,0,0,1,0,0,0,10,162,33,19,160,0,
0,0,0,0,0,0,0,0,0,0,0,10,33,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,17,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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
},
{ // 10, access card
175,0,21,45,44,23,46,2,19,34,69,22,68,60,131,8,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,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,1,
68,17,24,102,101,86,97,0,0,0,0,0,0,0,0,1,68,17,24,102,85,86,101,16,0,0,0,0,0,0,

View File

@ -96,16 +96,17 @@ typedef struct
#define SFG_LEVEL_ELEMENT_FINISH 0x07
#define SFG_LEVEL_ELEMENT_TELEPORT 0x08
#define SFG_LEVEL_ELEMENT_TERMINAL 0x09
#define SFG_LEVEL_ELEMENT_CARD0 0x0a ///< Access card, unlocks doors with lock.
#define SFG_LEVEL_ELEMENT_CARD1 0x0b
#define SFG_LEVEL_ELEMENT_CARD2 0x0c
#define SFG_LEVEL_ELEMENT_LOCK0 0x0d /**< Special level element that must be
#define SFG_LEVEL_ELEMENT_COLUMN 0x0a
#define SFG_LEVEL_ELEMENT_CARD0 0x0b ///< Access card, unlocks doors with lock.
#define SFG_LEVEL_ELEMENT_CARD1 0x0c
#define SFG_LEVEL_ELEMENT_CARD2 0x0d
#define SFG_LEVEL_ELEMENT_LOCK0 0x0e /**< Special level element that must be
placed on a tile with door. This door is
then unlocked by taking the corresponding
access card. */
#define SFG_LEVEL_ELEMENT_LOCK1 0x0e
#define SFG_LEVEL_ELEMENT_LOCK2 0x0f
#define SFG_LEVEL_ELEMENT_BLOCKER 0x10 ///< Invisible wall.
#define SFG_LEVEL_ELEMENT_LOCK1 0x0f
#define SFG_LEVEL_ELEMENT_LOCK2 0x10
#define SFG_LEVEL_ELEMENT_BLOCKER 0x11 ///< Invisible wall.
/*
Monsters have lower 4 bits zero and are only distinguished by the 4 upper
@ -306,7 +307,7 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_levels[SFG_NUMBER_OF_LEVELS] =
{SFG_LEVEL_ELEMENT_TERMINAL, {11, 25}}, {SFG_LEVEL_ELEMENT_TERMINAL, {11, 26}},
{SFG_LEVEL_ELEMENT_MONSTER_WARRIOR, {10, 45}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
{SFG_LEVEL_ELEMENT_BLOCKER, {14, 26}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
{SFG_LEVEL_ELEMENT_NONE, {0, 0}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
{SFG_LEVEL_ELEMENT_COLUMN, {21, 15}}, {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}},

2
main.c
View File

@ -1122,6 +1122,7 @@ void SFG_getItemSprite(
switch (elementType)
{
case SFG_LEVEL_ELEMENT_TREE:
case SFG_LEVEL_ELEMENT_COLUMN:
*spriteSize = 2;
break;
@ -1159,6 +1160,7 @@ uint8_t SFG_itemCollides(uint8_t elementType)
elementType == SFG_LEVEL_ELEMENT_BARREL ||
elementType == SFG_LEVEL_ELEMENT_TREE ||
elementType == SFG_LEVEL_ELEMENT_TERMINAL ||
elementType == SFG_LEVEL_ELEMENT_COLUMN ||
elementType == SFG_LEVEL_ELEMENT_BLOCKER;
}