DungeonCrawl
Loading...
Searching...
No Matches
map.h File Reference

Exposes common types and constants for the games map. More...

#include "../common.h"

Go to the source code of this file.

Macros

#define WIDTH   39
#define HEIGHT   19
#define ENEMY_COUNT   8
#define ENEMY_MIN_DISTANCE   3
#define TOP   0
#define BOTTOM   1
#define LEFT   2
#define RIGHT   3

Enumerations

enum  map_tile_t {
  WALL = 0 , FLOOR = 1 , START_DOOR = 2 , EXIT_DOOR = 3 ,
  KEY = 4 , LIFE_FOUNTAIN = 5 , MANA_FOUNTAIN = 6 , GOBLIN = 20 ,
  HIDDEN = 99
}

Variables

vector2d_t directions [4]
map_tile_t map [WIDTH][HEIGHT]
map_tile_t revealed_map [WIDTH][HEIGHT]

Detailed Description

Exposes common types and constants for the games map.

Definition in file map.h.

Macro Definition Documentation

◆ BOTTOM

#define BOTTOM   1

Definition at line 15 of file map.h.

◆ ENEMY_COUNT

#define ENEMY_COUNT   8

Definition at line 11 of file map.h.

◆ ENEMY_MIN_DISTANCE

#define ENEMY_MIN_DISTANCE   3

Definition at line 12 of file map.h.

◆ HEIGHT

#define HEIGHT   19

Definition at line 9 of file map.h.

◆ LEFT

#define LEFT   2

Definition at line 16 of file map.h.

◆ RIGHT

#define RIGHT   3

Definition at line 17 of file map.h.

◆ TOP

#define TOP   0

Definition at line 14 of file map.h.

◆ WIDTH

#define WIDTH   39

Definition at line 8 of file map.h.

Enumeration Type Documentation

◆ map_tile_t

enum map_tile_t

Definition at line 21 of file map.h.

21 {
22 WALL = 0,
23 FLOOR = 1,
24 START_DOOR = 2,
25 EXIT_DOOR = 3,
26 KEY = 4,
27 LIFE_FOUNTAIN = 5,
28 MANA_FOUNTAIN = 6,
29 GOBLIN = 20,
30 HIDDEN = 99
31} map_tile_t;

Variable Documentation

◆ directions

vector2d_t directions[4]
extern

Definition at line 11 of file map.c.

11 {
12 {0, -1},// up
13 {0, 1}, // down
14 {-1, 0},// left
15 {1, 0} // right
16};

◆ map

map_tile_t map[WIDTH][HEIGHT]
extern

Definition at line 7 of file map.c.

◆ revealed_map

map_tile_t revealed_map[WIDTH][HEIGHT]
extern

Definition at line 8 of file map.c.