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 ULTIMA3_VIEWS_DUNGEON_MAP_H
23#define ULTIMA3_VIEWS_DUNGEON_MAP_H
24
25#include "ultima/ultima3/gfx/dungeon_view.h"
26#include "ultima/ultima3/logic/dungeon_logic.h"
27#include "ultima/ultima3/views/game.h"
28
29namespace Ultima {
30namespace Ultima3 {
31namespace Views {
32
37class DungeonMap : public Game {
38private:
39 DungeonLogic _logic;
40 Gfx::DungeonView _view;
41
42 // Whether the picture of the view is up to date, and where it was taken from
43 bool _viewValid = false;
44 uint32 _viewKey = 0;
45
46 // Set while the effects of a special square are being dealt with, which
47 // don't count as a turn, and when a fight has ended and the turn is to be completed
48 bool _special = false;
49 bool _turnPending = false;
50
54 void beginCommand();
55
56 void doMove(bool forward);
57 void doTurn(bool right);
58 void doClimb();
59 void doDescend();
60
61protected:
62 void drawViewport(GfxSurface &s) override;
63 void drawLabels(GfxSurface &s) override;
64 void idleTimeout() override;
65 void endTurn() override;
66 void processFrame() override;
67 bool handleCommand(const KeypressMessage &msg) override;
68
69public:
70 DungeonMap() : Game("DungeonMap") {}
71 ~DungeonMap() override {}
72
73 bool msgFocus(const FocusMessage &msg) override;
74};
75
76} // namespace Views
77} // namespace Ultima3
78} // namespace Ultima
79
80#endif
Definition: gfx_surface.h:34
Definition: dungeon_logic.h:33
Definition: dungeon_view.h:39
Definition: dungeon_map.h:37
bool handleCommand(const KeypressMessage &msg) override
void drawLabels(GfxSurface &s) override
void drawViewport(GfxSurface &s) override
Definition: game.h:43
Definition: messages.h:54