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 
28 namespace Ultima {
29 namespace Ultima1 {
30 
31 class Ultima1Game;
32 
33 namespace Maps {
34 class MapBase;
35 }
36 
37 namespace Widgets {
38 
39 enum 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 
53 protected:
54  DungeonWidgetId _widgetId;
55 private:
59  static const byte *getData();
60 
64  static void getPos(const byte *&data, int bitShift, Point &pt);
65 protected:
69  Ultima1Game *getGame() const;
70 
74  Maps::MapBase *getMap() const;
75 public:
76  Common::String _name; // Name of item
77 public:
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: managed_surface.h:51
Definition: dungeon_widget.h:42
Definition: str.h:59
Definition: dungeon_surface.h:37
Definition: map_base.h:39
Definition: detection.h:27
Definition: rect.h:45
Definition: game.h:42
Definition: dungeon_widget.h:52