ScummVM API documentation
dungeon_map.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 ULTIMA1_VIEWS_DUNGEON_MAP_H
23#define ULTIMA1_VIEWS_DUNGEON_MAP_H
24
25#include "ultima/ultima1/views/map.h"
26#include "ultima/ultima1/data/map.h"
27#include "ultima/ultima1/data/map_dungeon.h"
28
29namespace Ultima {
30namespace Ultima1 {
31namespace Views {
32
33using namespace Graphics::Views;
34
35class DungeonMap : public Map {
36private:
41 Data::DungeonCell cellAt(int x, int y) const;
42
47 int getDirDeltaX() const;
48 int getDirDeltaY() const;
49
54 bool isMonsterBlocking(int x, int y) const;
55
60 bool isCellOccupied(int deltaX, int deltaY) const;
61
66 int distanceToOccupiedCell(int deltaX, int deltaY) const;
67
72 bool isSolidTile(int tileNum) const;
73
78 void drawFacingDirection();
79
83 void drawWall(int distance);
84
89 void drawLeftWall(int distance);
90 void drawRightWall(int distance);
91
96 void drawLeftBlank(int distance);
97 void drawRightBlank(int distance);
98
103 void drawLeftEdge(int distance);
104 void drawRightEdge(int distance);
105
110 void drawLeftDoor(int distance);
111 void drawRightDoor(int distance);
112
116 void drawDoorway(int distance);
117
122 void drawBeams(int distance);
123
130 void drawLadderUpFaceOn(int distance);
131 void drawLadderDownFaceOn(int distance);
132 void drawLadderUpSideways(int distance);
133 void drawLadderDownSideways(int distance);
134
139 void drawLeftCell(int distance, int tileNum);
140 void drawRightCell(int distance, int tileNum);
141
145 void dungeonDrawCell(int distance, int x, int y);
146
152 void dungeonDrawWidget(const uint8 *data, int distance, int color);
153
158 void dungeonDrawMonster(int monsterId, int distance);
159
165 void drawCoffin(int distance);
166 void drawChest(int distance);
167
171 void drawDungeonView();
172
173public:
174 DungeonMap() : Map("DungeonMap") {}
175 ~DungeonMap() override {}
176
177 bool msgFocus(const FocusMessage &msg) override;
178 bool msgUnfocus(const UnfocusMessage &msg) override;
179 void draw() override;
180};
181
182} // namespace Views
183} // namespace Ultima1
184} // namespace Ultima
185
186#endif
Definition: dungeon_map.h:35
Definition: map.h:37
Definition: messages.h:42
Definition: messages.h:50
Definition: map_dungeon.h:80