summaryrefslogtreecommitdiffstats
path: root/src/maze.h
blob: 4482f67c21395908e886580bda18ff7c7776fe92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (C) 2021  P. J. McDermott
 *
 * This file is part of Maze Fight
 *
 * Maze Fight is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Maze Fight is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Maze Fight.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MF_MAZE_H_
#define MF_MAZE_H_

#include <SDL.h>

struct mf_maze;

void
mf_maze_rm_wall(struct mf_maze *m, int x, int y, int dx, int dy);

int
mf_maze_is_wall(struct mf_maze *m, int x, int y, int dx, int dy)
	__attribute__((__pure__));

int
mf_maze_is_wall(struct mf_maze *m, int x, int y, int dx, int dy);

void
mf_maze_reveal_wall(struct mf_maze *m, int x, int y, int dx, int dy);

struct mf_maze *
mf_maze_new(int s, int w, int h, int show_all);

int
mf_maze_render(struct mf_maze *m, SDL_Renderer *renderer, SDL_Color *color,
		int cw);

void
mf_maze_destroy(struct mf_maze **m_p);

#endif  /* MF_MAZE_H_ */