Fixes door logic
This commit is contained in:
parent
e42e0243af
commit
184b42ff5a
|
@ -83,6 +83,8 @@ map_create_tile(void)
|
|||
tile->lethal = false;
|
||||
tile->lightsource = false;
|
||||
tile->levelExit = false;
|
||||
tile->door = false;
|
||||
tile->lockType = LOCK_NONE;
|
||||
return tile;
|
||||
}
|
||||
|
||||
|
@ -147,7 +149,7 @@ map_add_door(Map *map, Position *tile_pos, MapTile *tile)
|
|||
Room *room = map->rooms[cr->x][cr->y];
|
||||
switch_tile(map, tile_pos, tile, &room->doors[tile_pos->x][tile_pos->y]);
|
||||
tile->door = true;
|
||||
tile->animate = false;
|
||||
tile->sprite->animate = false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
typedef struct UpdateData UpdateData;
|
||||
typedef struct Trap Trap;
|
||||
|
||||
typedef enum DoorLockType {
|
||||
LOCK_NONE,
|
||||
LOCK_SILVER,
|
||||
LOCK_GOLD
|
||||
} DoorLockType;
|
||||
|
||||
typedef struct MapTile_t {
|
||||
Sprite *sprite;
|
||||
bool collider;
|
||||
|
@ -43,6 +49,7 @@ typedef struct MapTile_t {
|
|||
bool lightsource;
|
||||
bool levelExit;
|
||||
bool door;
|
||||
DoorLockType lockType;
|
||||
} MapTile;
|
||||
|
||||
typedef struct Room_t {
|
||||
|
|
Loading…
Reference in New Issue