ScummVM API documentation
mazegen.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef HODJNPODJ_MAZEDOOM_MAZEGEN_H
23#define HODJNPODJ_MAZEDOOM_MAZEGEN_H
24
25#include "common/scummsys.h"
26
27namespace Bagel {
28namespace HodjNPodj {
29namespace MazeDoom {
30
31#define MAX_MAZE_SIZE_X 12
32#define MAX_MAZE_SIZE_Y 9
33
34#define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y)
35
36#define WALL_TOP 0x8000
37#define WALL_RIGHT 0x4000
38#define WALL_BOTTOM 0x2000
39#define WALL_LEFT 0x1000
40
41#define DOOR_IN_TOP 0x800
42#define DOOR_IN_RIGHT 0x400
43#define DOOR_IN_BOTTOM 0x200
44#define DOOR_IN_LEFT 0x100
45#define DOOR_IN_ANY 0xF00
46
47#define DOOR_OUT_TOP 0x80
48#define DOOR_OUT_RIGHT 0x40
49#define DOOR_OUT_BOTTOM 0x20
50#define DOOR_OUT_LEFT 0x10
51
52#define START_SQUARE 0x2
53#define END_SQUARE 0x1
54
55
56static unsigned short _maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y];
57
58static struct {
59 uint8 x;
60 uint8 y;
61 uint8 dir;
62} _moveList[MOVE_LIST_SIZE];
63
64static int _mazeSizeX, _mazeSizeY;
65static int _sqNum, _curSqX, _curSqY;
66static int _startX, _startY, _endX, _endY;
67
68} // namespace MazeDoom
69} // namespace HodjNPodj
70} // namespace Bagel
71
72#endif