mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-22 07:18:49 -05:00
Rename monster
This commit is contained in:
parent
53d4b86b0a
commit
5cacc3b438
4
assets.h
4
assets.h
@ -737,7 +737,7 @@ reused flipped (good for walk anims). */
|
||||
SFG_PROGRAM_MEMORY uint8_t
|
||||
SFG_monsterSprites[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] =
|
||||
{
|
||||
{ // 0, monster1 idle
|
||||
{ // 0, spider idle
|
||||
175,175,175,0,0,0,0,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
|
||||
175,175,175,0,0,0,0,175,175,175,175,175,0,5,4,95,5,0,175,175,175,175,175,175,
|
||||
175,175,175,175,175,175,175,175,175,175,0,6,3,5,4,0,175,175,175,0,5,0,2,2,0,5,0,
|
||||
@ -776,7 +776,7 @@ SFG_PROGRAM_MEMORY uint8_t
|
||||
4,3,0,175,175,175,175,175,0,0,0,0,175,175,175,175,175,175,175,175,175,175,175,
|
||||
175,175,175,175,175,175,175,0,0,0,0,175,175,175
|
||||
},
|
||||
{ // 1, monster1 attacking
|
||||
{ // 1, spider attacking
|
||||
175,175,183,183,183,1,1,1,183,22,102,175,175,175,175,175,175,175,175,175,175,
|
||||
175,175,175,0,0,0,0,0,175,175,175,175,175,183,183,191,183,183,183,183,191,191,
|
||||
191,175,175,175,175,175,175,175,175,175,175,175,0,6,4,4,5,4,0,0,175,175,175,175,
|
||||
|
13
levels.h
13
levels.h
@ -86,9 +86,12 @@ typedef struct
|
||||
unused because that will be used by the game engine, so the values must be
|
||||
lower than 128.
|
||||
*/
|
||||
#define SFG_LEVEL_ELEMENT_NONE 0
|
||||
#define SFG_LEVEL_ELEMENT_BARREL 1
|
||||
#define SFG_LEVEL_ELEMENT_MONSTER1 2
|
||||
#define SFG_LEVEL_ELEMENT_NONE 255
|
||||
#define SFG_LEVEL_ELEMENT_BARREL 0x01
|
||||
/* Monsters have lower 4 bits zero and are only distinguished by the 4 upper
|
||||
bits, as this is convenient for the code.
|
||||
*/
|
||||
#define SFG_LEVEL_ELEMENT_MONSTER_SPIDER 0x00
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -237,8 +240,8 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_level0 =
|
||||
{SFG_LEVEL_ELEMENT_BARREL, {12, 4}}, {SFG_LEVEL_ELEMENT_BARREL, {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_MONSTER1, {15, 7}}, {SFG_LEVEL_ELEMENT_MONSTER1, {16, 8}},
|
||||
{SFG_LEVEL_ELEMENT_MONSTER1, {16, 7}}, {SFG_LEVEL_ELEMENT_NONE, {0, 0}},
|
||||
{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_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}},
|
||||
|
8
main.c
8
main.c
@ -415,7 +415,7 @@ static inline uint8_t SFG_RCL_unitToZBuffer(RCL_Unit x)
|
||||
uint8_t okay = x < 255;
|
||||
|
||||
return okay * (x + 1) - 1;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
Says whether given key is currently pressed (down). This should be preferred
|
||||
@ -947,13 +947,13 @@ void SFG_setAndInitLevel(const SFG_Level *level)
|
||||
SFG_currentLevel.itemRecordCount++;
|
||||
break;
|
||||
|
||||
case SFG_LEVEL_ELEMENT_MONSTER1:
|
||||
SFG_LOG("adding monster1");
|
||||
case SFG_LEVEL_ELEMENT_MONSTER_SPIDER:
|
||||
SFG_LOG("adding monster: spider");
|
||||
|
||||
monster =
|
||||
&(SFG_currentLevel.monsterRecords[SFG_currentLevel.monsterRecordCount]);
|
||||
|
||||
monster->stateType = 0;
|
||||
monster->stateType = e->elementType | 0;
|
||||
monster->health = 255;
|
||||
monster->coords[0] = e->coords[0] * 4;
|
||||
monster->coords[1] = e->coords[1] * 4;
|
||||
|
Loading…
Reference in New Issue
Block a user