ScummVM API documentation
map_tile.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_MAPS_MAP_TILE_H
23 #define ULTIMA_ULTIMA1_MAPS_MAP_TILE_H
24 
25 #include "ultima/shared/maps/map_tile.h"
26 
27 namespace Ultima {
28 namespace Ultima1 {
29 namespace Widgets {
30 class DungeonItem;
31 }
32 
33 namespace Maps {
34 
35 enum TileId {
36  TILE_WATER = 0, TILE_GRASS = 1, TILE_WOODS = 2, TILE_MOUNTAINS = 3
37 };
38 
39 class MapBase;
40 class Ultima1Map;
41 
46 private:
47  MapBase *_map;
48 public:
49  int _locationNum;
50  Widgets::DungeonItem *_item;
51 public:
55  U1MapTile() : Shared::Maps::MapTile(), _item(0), _locationNum(-1), _map(nullptr) {}
56 
60  void setMap(MapBase *map) { _map = map; }
61 
65  void clear() override;
66 
70  bool isWater() const;
71 
75  bool isGrass() const;
76 
80  bool isWoods() const;
81 
85  bool isOriginalWater() const;
86 
90  bool isOriginalGrass() const;
91 
95  bool isOriginalWoods() const;
96 
100  bool isGround() const;
101 };
102 
103 } // End of namespace Maps
104 } // End of namespace Ultima1
105 } // End of namespace Ultima
106 
107 #endif
Definition: map_tile.h:45
Definition: map_tile.h:36
Definition: dungeon_item.h:35
Definition: map_base.h:39
Definition: detection.h:27
void setMap(MapBase *map)
Definition: map_tile.h:60
U1MapTile()
Definition: map_tile.h:55