Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
level.h
Go to the documentation of this file.
1 #ifndef LEVEL_H
2 #define LEVEL_H
3 
4 #include <stdbool.h>
5 
6 #include "mob.h"
7 #include "item.h"
8 #include "list.h"
9 
11 #define LEVELWIDTH 80
12 
14 #define LEVELHEIGHT 20
15 
21 typedef struct Cell {
22  char baseSymbol;
23  int colour;
25  bool solid;
26  bool illuminated;
27  unsigned int luminosity;
29  struct Mob * occupant;
30  struct List * items;
31 } Cell;
32 
38 typedef struct Level {
41  List * mobs;
42  struct Mob * player;
44  int depth;
46  int startx, starty;
47  int endx, endy;
50 } Level;
51 
52 void build_level(Level * level);
53 void run_turn(Level * level);
54 void display_level(Level * level);
55 
56 #endif /* LEVEL_H */
List * mobs
Definition: level.h:41
int endy
Definition: level.h:47
Definition: mob.h:18
struct Mob * player
Definition: level.h:42
List levels
Definition: level.h:39
struct List * items
Definition: level.h:30
Definition: level.h:38
struct Mob * occupant
Definition: level.h:29
unsigned int luminosity
Definition: level.h:27
#define LEVELHEIGHT
Definition: level.h:14
int endx
Definition: level.h:47
int colour
Definition: level.h:23
char baseSymbol
Definition: level.h:22
int depth
Definition: level.h:44
Definition: level.h:21
struct Level Level
bool illuminated
Definition: level.h:26
struct Cell * cells[LEVELWIDTH][LEVELHEIGHT]
Definition: level.h:49
struct Cell Cell
void display_level(Level *level)
Definition: level.c:366
int startx
Definition: level.h:46
#define LEVELWIDTH
Definition: level.h:11
Definition: list.h:7
bool solid
Definition: level.h:25
int starty
Definition: level.h:46
void run_turn(Level *level)
Definition: level.c:297
void build_level(Level *level)
Definition: level.c:185