void drawMap(Map *map, int mode)
Draw the map according to the mode.
Definition: map.c:233
void getPlayerInitialPosition(Map *map, int *x, int *y)
Get the player initial (3x3 empty space)
Definition: map.c:292
void calculateVision(Map *map, Player *player)
Calculate the vision of the player and updates the is_visible and was_visible field in the cells.
Definition: map.c:457
void getRandomCoordinates(Map *map, int *x, int *y)
Get random coordinates for monsters.
Definition: map.c:326
void generateMap(State *st)
Generate the map based on algorithm TODO explain more.
Definition: map.c:138
void distributeItems(Map *map, Item **items, int nr_items)
Distribute the items on the map.
Definition: map.c:485
struct map Map
Structure that represents a map in the game.
void pickUpItem(State *st)
Get the item on the player position.
Definition: map.c:523
void freeMap(void *p)
Free the map structure.
Definition: map.c:83
Map * initMap(int width, int height)
Initialize a new map.
Definition: map.c:27
Monster * getCloserUnhurtMonster(State *st)
Get the closer unhurt monster to the player.
Definition: map.c:587
void calculateDistances(Map *map, int x, int y)
Calculate the distances from the player to all the cells, also updates the effect and effect_duration...
Definition: map.c:349
Structure of a cell.
Definition: cell.h:27
Item structure represents an item in the game.
Definition: item.h:28
Structure that represents a map in the game.
Definition: map.h:26
int width
Definition: map.h:27
Cell *** cells
Definition: map.h:29
Item ** items
Definition: map.h:33
int height
Definition: map.h:28
int nr_projectiles
Definition: map.h:37
Projectile ** projectiles
Definition: map.h:36
int nr_items
Definition: map.h:34
int has_menu
Definition: map.h:31
Structure of a monster.
Definition: monster.h:28
Structure of a player.
Definition: player.h:53
(private) Structure of a thrown projectile
Definition: combat.c:24
Sructure of the game state.
Definition: state.h:38