Go to the source code of this file.
|
| static void | draw_maze (bj_bitmap *target, const bj_maze *maze, const struct bj_maze_marks *marks) |
| static void | on_draw (struct bj_window *w, struct bj_render_target *target, const struct bj_rect *dirty, void *user_data) |
| static struct bj_rect | grid_rect_place (int n, int win_w, int win_h) |
| static void | on_resize (struct bj_window *w, int width, int height, void *user_data) |
| static void | regenerate (void) |
| static void | on_key (struct bj_window *w, const struct bj_key_event *event, void *user_data) |
| static void * | setup (struct bj_app *app, void *init_data) |
| static void | step (struct bj_app *app, struct bj_tick_info tick, void *user_data) |
| static void | teardown (struct bj_app *app, void *user_data) |
| int | main (int argc, char *argv[]) |
◆ ANIMATION_HZ
◆ LABEL_FONT_H
◆ LABEL_H
◆ MAZE_BMP_SIZE
◆ MAZE_CELL_PER_SIDE
| #define MAZE_CELL_PER_SIDE 15 |
◆ MAZE_MARGIN
◆ MAZE_PIXEL_PER_CELL
| #define MAZE_PIXEL_PER_CELL 5 |
◆ WINDOW_H
◆ WINDOW_W
◆ draw_maze()
| void draw_maze |
( |
bj_bitmap * | target, |
|
|
const bj_maze * | maze, |
|
|
const struct bj_maze_marks * | marks ) |
|
static |
◆ grid_rect_place()
| struct bj_rect grid_rect_place |
( |
int | n, |
|
|
int | win_w, |
|
|
int | win_h ) |
|
static |
◆ main()
| int main |
( |
int | argc, |
|
|
char * | argv[] ) |
◆ on_draw()
◆ on_key()
◆ on_resize()
| void on_resize |
( |
struct bj_window * | w, |
|
|
int | width, |
|
|
int | height, |
|
|
void * | user_data ) |
|
static |
◆ regenerate()
◆ setup()
| void * setup |
( |
struct bj_app * | app, |
|
|
void * | init_data ) |
|
static |
◆ step()
| void step |
( |
struct bj_app * | app, |
|
|
struct bj_tick_info | tick, |
|
|
void * | user_data ) |
|
static |
◆ teardown()
| void teardown |
( |
struct bj_app * | app, |
|
|
void * | user_data ) |
|
static |
◆ [struct]
Initial value:= {
}
struct bj_maze_algorithm bj_maze_algorithm_wilson(void)
Wilson's algorithm.
struct bj_maze_algorithm bj_maze_algorithm_backtracker(void)
The backtracker, known in the literature as the recursive backtracker.
struct bj_maze_algorithm bj_maze_algorithm_sidewinder(void)
The sidewinder algorithm.
struct bj_maze_algorithm bj_maze_algorithm_hunt_and_kill(void)
The hunt-and-kill algorithm.
struct bj_maze_algorithm bj_maze_algorithm_btree(void)
The binary tree algorithm.
struct bj_maze_algorithm bj_maze_algorithm_aldous_broder(void)
The Aldous-Broder algorithm.
- Examples
- maze.c.
Referenced by on_draw(), on_resize(), regenerate(), setup(), step(), and teardown().
◆ n_mazes
| const size_t n_mazes = sizeof(mazes) / sizeof(mazes[0]) |
|
static |
◆ window
◆ window_w