Banjo API 1.1.0-alpha
Low-level C99 game development API
Loading...
Searching...
No Matches
maze.h File Reference
#include <banjo/api.h>
#include <banjo/error.h>
#include <banjo/random.h>
Include dependency graph for maze.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BJ_MAZE_NO_CELL   ((uint32_t)-1)
#define BJ_MAZE_NORTH   BJ_MAZE_DIR_NORTH
#define BJ_MAZE_WEST   BJ_MAZE_DIR_WEST
#define BJ_MAZE_SOUTH   BJ_MAZE_DIR_SOUTH
#define BJ_MAZE_EAST   BJ_MAZE_DIR_EAST

Enumerations

enum  bj_maze_dir { BJ_MAZE_DIR_NORTH = 0 , BJ_MAZE_DIR_WEST = 1 , BJ_MAZE_DIR_SOUTH = 2 , BJ_MAZE_DIR_EAST = 3 }

Functions

struct bj_maze * bj_create_maze_ortho2d (size_t width, size_t height, struct bj_error **error)
void bj_destroy_maze (struct bj_maze *maze)
uint32_t bj_maze_ortho2d_cell (const struct bj_maze *maze, size_t row, size_t col)
uint32_t bj_open_maze_cell (struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)
uint32_t bj_close_maze_cell (struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)
bj_bool bj_maze_cell_is_open (const struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)
void bj_maze_close_all (struct bj_maze *maze)
void bj_maze_open_all (struct bj_maze *maze)
uint32_t bj_maze_cell_count (const struct bj_maze *maze)
uint8_t bj_maze_degree (const struct bj_maze *maze)
uint32_t bj_maze_adjacent_cell (const struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)
bj_bool bj_maze_cell_opened (const struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)
void bj_close_maze (struct bj_maze *maze)
void bj_open_maze (struct bj_maze *maze)
uint32_t bj_maze_adjacent (const struct bj_maze *maze, uint32_t cell, enum bj_maze_dir dir)

Detailed Description

Header file for Maze representation.

Definition in file maze.h.