ScummVM API documentation
dungeon_widget.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 ULTIMA_ULTIMA1_WIDGETS_DUNGEON_WIDGET_H
23#define ULTIMA_ULTIMA1_WIDGETS_DUNGEON_WIDGET_H
24
25#include "ultima/shared/maps/map.h"
26#include "ultima/shared/maps/dungeon_widget.h"
27
28namespace Ultima {
29namespace Ultima1 {
30
31class Ultima1Game;
32
33namespace Maps {
34class MapBase;
35}
36
37namespace Widgets {
38
39enum DungeonWidgetId {
40 MONSTER_NONE = -1, MONSTER_RANGER = 0, MONSTER_SKELETON = 1, MONSTER_THIEF = 2, MONSTER_GIANT_RAT = 3,
41 MONSTER_RAT = 4, MONSTER_SPIDER = 5, MONSTER_VIPER = 6, MONSTER_ORC = 7, MONSTER_CYCLOPS = 8,
42 MONSTER_GELATINOUS_CUBE = 9, MONSTER_ETTIN = 10, MONSTER_MIMIC = 11, MONSTER_LIZARD_MAN = 12,
43 MONSTER_MINOTAUR = 13, MONSTER_CARRION_CREEPER = 14, MONSTER_TANGLER = 15, MONSTER_GREMLIN = 16,
44 MONSTER_WANDERING_EYES = 17, MONSTER_WRAITH = 18, MONSTER_LICH = 19, MONSTER_INVISIBLE_SEEKER = 20,
45 MONSTER_MIND_WHIPPER = 21, MONSTER_ZORN = 22, MONSTER_DAEMON = 23, MONSTER_BALRON = 24, UITEM_COFFIN = 25,
46 UITEM_HOLE_UP = 26, UITEM_HOLE_DOWN = 27, UITEM_LADDER_UP = 28, UITEM_LADDER_DOWN = 29
47};
48
53protected:
54 DungeonWidgetId _widgetId;
55private:
59 static const byte *getData();
60
64 static void getPos(const byte *&data, int bitShift, Point &pt);
65protected:
70
75public:
76 Common::String _name; // Name of item
77public:
81 DungeonWidget(Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId widgetId, const Point &pt);
82
87
91 static void drawWidget(Graphics::ManagedSurface &s, DungeonWidgetId widgetId, uint distance, byte color);
92
96 void draw(Shared::DungeonSurface &s, uint distance) override;
97};
98
99} // End of namespace Widgets
100} // End of namespace Ultima1
101} // End of namespace Ultima
102
103#endif
Definition: str.h:59
Definition: managed_surface.h:51
Definition: dungeon_surface.h:37
Definition: dungeon_widget.h:42
Definition: map_base.h:39
Definition: game.h:42
Definition: dungeon_widget.h:52
DungeonWidget(Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId widgetId, const Point &pt)
DungeonWidget(Ultima1Game *game, Maps::MapBase *map)
void draw(Shared::DungeonSurface &s, uint distance) override
static void drawWidget(Graphics::ManagedSurface &s, DungeonWidgetId widgetId, uint distance, byte color)
Definition: rect.h:144