door.h (372B)
1 #pragma once 2 3 typedef struct Door door_t; 4 5 #include "game.h" 6 #include "util.h" 7 8 #define DOOR_COUNTDOWN 20 9 10 struct Door { 11 pos_t pos; 12 bool is_locked; 13 int countdown; 14 }; 15 16 door_t *door_create(pos_t pos); 17 void door_update(door_t *door, game_t *game); 18 void door_draw(door_t *door, game_t *game); 19 void door_free(door_t *door); 20 21 bool door_unlock(door_t *door, game_t *game);