#include <stdbool.h>
#include "mob.h"
#include "item.h"
#include "list.h"
Go to the source code of this file.
The height of a level in characters.
The width of a level in characters.
A cell is an individual space in a level, they have a base symbol, may be solid, may contain at most one occupant mob, and a list of items.
A level is the current part of the game which is active, it gets rendered to the screen, has a bunch of mobs, and a single player. Levels form a doubly-linked list.
void build_level |
( |
Level * |
level | ) |
|
Initialises a level.
- Parameters
-
level | Level to initialise. |
void display_level |
( |
Level * |
level | ) |
|
Render the level to the screen. The symbol for a level is picked according to the following priorities: occupant > top item > base.
- Parameters
-
void run_turn |
( |
Level * |
level | ) |
|
A "turn" consists of all of the mobs acting once, possibly followed by some constant effect on the mob. As the player is a turn, this is (indirectly) where blocking for input happens.
- Parameters
-
level | The level grid to run the turn on. |