ScummVM API documentation
viewport_dungeon.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_SHARED_GFX_VIEWPORT_DUNGEON_H
23 #define ULTIMA_SHARED_GFX_VIEWPORT_DUNGEON_H
24 
25 #include "ultima/shared/gfx/visual_item.h"
26 #include "ultima/shared/gfx/dungeon_surface.h"
27 #include "ultima/shared/maps/map_tile.h"
28 
29 namespace Ultima {
30 namespace Shared {
31 
33  DECLARE_MESSAGE_MAP;
34 private:
38  uint distanceToOccupiedCell(const Point &delta);
39 
43  bool isCellOccupied(const Point &delta);
44 
48  bool isMonsterBlocking(const Point &pt);
49 
53  void drawCell(uint distance, const Point &pt);
54 
58  void drawLeftCell(uint distance, const Maps::MapTile &tile);
59 
63  void drawRightCell(uint distance, const Maps::MapTile &tile);
64 protected:
68  virtual DungeonSurface getSurface() = 0;
69 public:
70  CLASSDEF;
71  ViewportDungeon(TreeItem *parent) : Gfx::VisualItem("ViewportDungeon", Rect(8, 8, 312, 152), parent) {}
72  ~ViewportDungeon() override {}
73 
77  void draw() override;
78 };
79 
80 } // End of namespace Shared
81 } // End of namespace Ultima
82 
83 #endif
Definition: map_tile.h:36
Definition: tree_item.h:50
virtual DungeonSurface getSurface()=0
Definition: rect.h:144
Definition: visual_item.h:39
Definition: dungeon_surface.h:37
Definition: detection.h:27
Definition: viewport_dungeon.h:32
Definition: rect.h:45