Otclient 1.0  14/8/2020
map.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2020 OTClient <https://github.com/edubart/otclient>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef MAP_H
24 #define MAP_H
25 
26 #include "animatedtext.h"
27 #include "creature.h"
28 #include "creatures.h"
29 #include "houses.h"
30 #include "statictext.h"
31 #include "tile.h"
32 #include "towns.h"
33 
34 #include <framework/core/clock.h>
35 
37 {
65 };
66 
68 {
73  OTBM_TILE = 5,
74  OTBM_ITEM = 6,
80  OTBM_TOWNS = 12,
81  OTBM_TOWN = 13,
85 };
86 
87 enum {
88  OTCM_SIGNATURE = 0x4D43544F,
90 };
91 
92 enum {
94 };
95 
96 enum : uint8 {
99 };
100 
101 class TileBlock {
102 public:
103  TileBlock() { m_tiles.fill(nullptr); }
104 
105  const TilePtr& create(const Position& pos)
106  {
107  TilePtr& tile = m_tiles[getTileIndex(pos)];
108  tile = TilePtr(new Tile(pos));
109  return tile;
110  }
111  const TilePtr& getOrCreate(const Position& pos)
112  {
113  TilePtr& tile = m_tiles[getTileIndex(pos)];
114  if(!tile)
115  tile = TilePtr(new Tile(pos));
116  return tile;
117  }
118  const TilePtr& get(const Position& pos) { return m_tiles[getTileIndex(pos)]; }
119  void remove(const Position& pos) { m_tiles[getTileIndex(pos)] = nullptr; }
120 
121  uint getTileIndex(const Position& pos) { return ((pos.y % BLOCK_SIZE) * BLOCK_SIZE) + (pos.x % BLOCK_SIZE); }
122 
123  const std::array<TilePtr, BLOCK_SIZE* BLOCK_SIZE>& getTiles() const { return m_tiles; }
124 
125 private:
126  std::array<TilePtr, BLOCK_SIZE* BLOCK_SIZE> m_tiles;
127 };
128 
130 {
131  int top;
132  int right;
133  int bottom;
134  int left;
135 
136  int horizontal() { return left + right + 1; }
137  int vertical() { return top + bottom + 1; }
138 };
139 
140 //@bindsingleton g_map
141 class Map
142 {
143 public:
144  void init();
145  void terminate();
146 
147  void addMapView(const MapViewPtr& mapView);
148  void removeMapView(const MapViewPtr& mapView);
149  void notificateTileUpdate(const Position& pos, const ThingPtr& thing = nullptr, const Otc::Operation operation = Otc::OPERATION_NEUTRAL);
150 
151  void requestDrawing(const Position& pos, const Otc::RequestDrawFlags reDrawFlags, const bool force = false, const bool isLocalPlayer = false);
152 
153  bool loadOtcm(const std::string& fileName);
154  void saveOtcm(const std::string& fileName);
155 
156  void loadOtbm(const std::string& fileName);
157  void saveOtbm(const std::string& fileName);
158 
159  // otbm attributes (description, size, etc.)
160  void setHouseFile(const std::string& file) { m_attribs.set(OTBM_ATTR_HOUSE_FILE, file); }
161  void setSpawnFile(const std::string& file) { m_attribs.set(OTBM_ATTR_SPAWN_FILE, file); }
162  void setDescription(const std::string& desc) { m_attribs.set(OTBM_ATTR_DESCRIPTION, desc); }
163 
165  void setWidth(uint16 w) { m_attribs.set(OTBM_ATTR_WIDTH, w); }
166  void setHeight(uint16 h) { m_attribs.set(OTBM_ATTR_HEIGHT, h); }
167 
168  std::string getHouseFile() { return m_attribs.get<std::string>(OTBM_ATTR_HOUSE_FILE); }
169  std::string getSpawnFile() { return m_attribs.get<std::string>(OTBM_ATTR_SPAWN_FILE); }
170  Size getSize() { return Size(m_attribs.get<uint16>(OTBM_ATTR_WIDTH), m_attribs.get<uint16>(OTBM_ATTR_HEIGHT)); }
171  std::vector<std::string> getDescriptions() { return stdext::split(m_attribs.get<std::string>(OTBM_ATTR_DESCRIPTION), "\n"); }
172 
173  void clean();
174  void cleanDynamicThings();
175  void cleanTexts();
176 
177  // thing related
178  void addThing(const ThingPtr& thing, const Position& pos, int stackPos = -1);
179  ThingPtr getThing(const Position& pos, int stackPos);
180  bool removeThing(const ThingPtr& thing);
181  bool removeThingByPos(const Position& pos, int stackPos);
182  void colorizeThing(const ThingPtr& thing, const Color& color);
183  void removeThingColor(const ThingPtr& thing);
184 
186 
187  // tile related
188  const TilePtr& createTile(const Position& pos);
189  template <typename... Items>
190  const TilePtr& createTileEx(const Position& pos, const Items&... items);
191  const TilePtr& getOrCreateTile(const Position& pos);
192  const TilePtr& getTile(const Position& pos);
193  const TileList getTiles(int floor = -1);
194  void cleanTile(const Position& pos);
195 
196  // tile zone related
197  void setShowZone(tileflags_t zone, bool show);
198  void setShowZones(bool show);
199  void setZoneColor(tileflags_t zone, const Color& color);
200  void setZoneOpacity(float opacity) { m_zoneOpacity = opacity; }
201 
202  float getZoneOpacity() { return m_zoneOpacity; }
204  tileflags_t getZoneFlags() { return static_cast<tileflags_t>(m_zoneFlags); }
205  bool showZones() { return m_zoneFlags != 0; }
206  bool showZone(tileflags_t zone) { return (m_zoneFlags & zone) == zone; }
207 
208  void setForceShowAnimations(bool force);
209  bool isForcingAnimations();
210  bool isShowingAnimations();
211  void setShowAnimations(bool show);
212 
213  void beginGhostMode(float opacity);
214  void endGhostMode();
215 
216  std::map<Position, ItemPtr> findItemsById(uint16 clientId, uint32 max);
217 
218  // known creature related
219  void addCreature(const CreaturePtr& creature);
221  void removeCreatureById(uint32 id);
222  std::vector<CreaturePtr> getSightSpectators(const Position& centerPos, bool multiFloor);
223  std::vector<CreaturePtr> getSpectators(const Position& centerPos, bool multiFloor);
224  std::vector<CreaturePtr> getSpectatorsInRange(const Position& centerPos, bool multiFloor, int xRange, int yRange);
225  std::vector<CreaturePtr> getSpectatorsInRangeEx(const Position& centerPos, bool multiFloor, int minXRange, int maxXRange, int minYRange, int maxYRange);
226 
227  void setLight(const Light& light) { m_light = light; requestDrawing(Position(), Otc::ReDrawLight, true); }
228  void setCentralPosition(const Position& centralPosition);
229 
230  bool isLookPossible(const Position& pos);
231  bool isCovered(const Position& pos, int firstFloor = 0);
232  bool isCompletelyCovered(const Position& pos, int firstFloor = 0);
233  bool isAwareOfPosition(const Position& pos);
234 
235  void resetLastCamera();
236 
237  void setAwareRange(const AwareRange& range);
238  void resetAwareRange();
239  AwareRange getAwareRange() { return m_awareRange; }
240 
241  Light getLight() { return m_light; }
242  Position getCentralPosition() { return m_centralPosition; }
243  int getFirstAwareFloor();
244  int getLastAwareFloor();
245  const std::vector<MissilePtr>& getFloorMissiles(int z) { return m_floorMissiles[z]; }
246 
247  std::vector<AnimatedTextPtr> getAnimatedTexts() { return m_animatedTexts; }
248  std::vector<StaticTextPtr> getStaticTexts() { return m_staticTexts; }
249 
250  std::tuple<std::vector<Otc::Direction>, Otc::PathFindResult> findPath(const Position& start, const Position& goal, int maxComplexity, int flags = 0);
251 
252 private:
253  void removeUnawareThings();
254 
255  uint getBlockIndex(const Position& pos) { return ((pos.y / BLOCK_SIZE) * (65536 / BLOCK_SIZE)) + (pos.x / BLOCK_SIZE); }
256 
257  std::array<std::vector<MissilePtr>, Otc::MAX_Z + 1> m_floorMissiles;
258 
259  std::vector<AnimatedTextPtr> m_animatedTexts;
260  std::vector<StaticTextPtr> m_staticTexts;
261  std::vector<MapViewPtr> m_mapViews;
262 
263  std::unordered_map<uint, TileBlock> m_tileBlocks[Otc::MAX_Z + 1];
264  std::unordered_map<uint32, CreaturePtr> m_knownCreatures;
265  std::unordered_map<Position, std::string, PositionHasher> m_waypoints;
266 
267  uint8 m_animationFlags;
268  uint32 m_zoneFlags;
269  std::map<uint32, Color> m_zoneColors;
270  float m_zoneOpacity;
271 
272  Light m_light;
273  Position m_centralPosition;
274  Rect m_tilesRect;
275 
277  AwareRange m_awareRange;
278  static TilePtr m_nulltile;
279 };
280 
281 extern Map g_map;
282 
283 #endif
TileBlock::getTiles
const std::array< TilePtr, BLOCK_SIZE *BLOCK_SIZE > & getTiles() const
Definition: map.h:123
Map::createTileEx
const TilePtr & createTileEx(const Position &pos, const Items &... items)
Definition: map.cpp:324
OTBM_ATTR_TEXT
@ OTBM_ATTR_TEXT
Definition: map.h:43
OTBM_TILE_SQUARE
@ OTBM_TILE_SQUARE
Definition: map.h:75
OTBM_ATTR_TELE_DEST
@ OTBM_ATTR_TELE_DEST
Definition: map.h:45
OTCM_SIGNATURE
@ OTCM_SIGNATURE
Definition: map.h:88
Map::setAwareRange
void setAwareRange(const AwareRange &range)
Definition: map.cpp:744
Map::requestDrawing
void requestDrawing(const Position &pos, const Otc::RequestDrawFlags reDrawFlags, const bool force=false, const bool isLocalPlayer=false)
Definition: map.cpp:84
stdext::packed_storage::get
T get(Key id) const
Definition: packed_storage.h:80
Map::init
void init()
Definition: map.cpp:39
OTBM_ATTR_ACTION_ID
@ OTBM_ATTR_ACTION_ID
Definition: map.h:41
OTBM_ATTR_CHARGES
@ OTBM_ATTR_CHARGES
Definition: map.h:59
OTBM_ATTR_WRITTENDATE
@ OTBM_ATTR_WRITTENDATE
Definition: map.h:55
Color
Definition: color.h:32
OTBM_ATTR_EXT_FILE
@ OTBM_ATTR_EXT_FILE
Definition: map.h:39
OTBM_ATTR_CONTAINER_ITEMS
@ OTBM_ATTR_CONTAINER_ITEMS
Definition: map.h:60
Animation_Show
@ Animation_Show
Definition: map.h:98
z
gc sort z
Definition: CMakeLists.txt:176
OTBM_ATTR_COUNT
@ OTBM_ATTR_COUNT
Definition: map.h:52
OTBM_ATTR_SPAWN_FILE
@ OTBM_ATTR_SPAWN_FILE
Definition: map.h:48
TRect< int >
OTBM_ATTR_HOUSEDOORID
@ OTBM_ATTR_HOUSEDOORID
Definition: map.h:51
Position::x
int x
Definition: position.h:265
OTBM_MAP_DATA
@ OTBM_MAP_DATA
Definition: map.h:70
BLOCK_SIZE
@ BLOCK_SIZE
Definition: map.h:93
OTBM_ROOTV2
@ OTBM_ROOTV2
Definition: map.h:69
TileBlock::remove
void remove(const Position &pos)
Definition: map.h:119
Map::cleanTexts
void cleanTexts()
Definition: map.cpp:119
Map::setDescription
void setDescription(const std::string &desc)
Definition: map.h:162
uint32
uint32_t uint32
Definition: types.h:35
OTBM_ATTR_ATTRIBUTE_MAP
@ OTBM_ATTR_ATTRIBUTE_MAP
Definition: map.h:61
Map::notificateTileUpdate
void notificateTileUpdate(const Position &pos, const ThingPtr &thing=nullptr, const Otc::Operation operation=Otc::OPERATION_NEUTRAL)
Definition: map.cpp:72
Map::loadOtbm
void loadOtbm(const std::string &fileName)
Definition: mapio.cpp:35
Map::isShowingAnimations
bool isShowingAnimations()
Definition: map.cpp:472
Map::setHouseFile
void setHouseFile(const std::string &file)
Definition: map.h:160
Map::saveOtbm
void saveOtbm(const std::string &fileName)
Definition: mapio.cpp:235
Map::setShowZone
void setShowZone(tileflags_t zone, bool show)
Definition: map.cpp:425
Map::resetLastCamera
void resetLastCamera()
Definition: map.cpp:938
Map::clean
void clean()
Definition: map.cpp:90
AwareRange::bottom
int bottom
Definition: map.h:133
Map::getStaticTexts
std::vector< StaticTextPtr > getStaticTexts()
Definition: map.h:248
Map::getThing
ThingPtr getThing(const Position &pos, int stackPos)
Definition: map.cpp:190
Map::loadOtcm
bool loadOtcm(const std::string &fileName)
Definition: mapio.cpp:401
Map::getHouseFile
std::string getHouseFile()
Definition: map.h:168
Map::cleanTile
void cleanTile(const Position &pos)
Definition: map.cpp:399
Map::isCompletelyCovered
bool isCompletelyCovered(const Position &pos, int firstFloor=0)
Definition: map.cpp:695
Map::getTile
const TilePtr & getTile(const Position &pos)
Definition: map.cpp:358
OTBM_ATTR_UNIQUE_ID
@ OTBM_ATTR_UNIQUE_ID
Definition: map.h:42
OTBM_TOWNS
@ OTBM_TOWNS
Definition: map.h:80
Map::endGhostMode
void endGhostMode()
Definition: map.cpp:491
OTBM_HOUSETILE
@ OTBM_HOUSETILE
Definition: map.h:82
Position::y
int y
Definition: position.h:266
OTBM_SPAWN_AREA
@ OTBM_SPAWN_AREA
Definition: map.h:78
Otc::ReDrawLight
@ ReDrawLight
Definition: const.h:57
Map::removeMapView
void removeMapView(const MapViewPtr &mapView)
Definition: map.cpp:55
TileBlock
Definition: map.h:101
Map::setLight
void setLight(const Light &light)
Definition: map.h:227
Map::addCreature
void addCreature(const CreaturePtr &creature)
Definition: map.cpp:520
OTBM_WAYPOINTS
@ OTBM_WAYPOINTS
Definition: map.h:83
Map::getFirstAwareFloor
int getFirstAwareFloor()
Definition: map.cpp:750
Map::resetAwareRange
void resetAwareRange()
Definition: map.cpp:62
Otc::RequestDrawFlags
RequestDrawFlags
Definition: const.h:55
OTBM_TOWN
@ OTBM_TOWN
Definition: map.h:81
OTBM_ATTR_DESC
@ OTBM_ATTR_DESC
Definition: map.h:44
OTBM_TILE_REF
@ OTBM_TILE_REF
Definition: map.h:76
OTBM_ATTR_TILE_FLAGS
@ OTBM_ATTR_TILE_FLAGS
Definition: map.h:40
Map::findPath
std::tuple< std::vector< Otc::Direction >, Otc::PathFindResult > findPath(const Position &start, const Position &goal, int maxComplexity, int flags=0)
Definition: map.cpp:766
creature.h
Map::getSightSpectators
std::vector< CreaturePtr > getSightSpectators(const Position &centerPos, bool multiFloor)
Definition: map.cpp:630
Map::addMapView
void addMapView(const MapViewPtr &mapView)
Definition: map.cpp:50
OTBM_ITEM_DEF
@ OTBM_ITEM_DEF
Definition: map.h:71
clock.h
Map::setZoneColor
void setZoneColor(tileflags_t zone, const Color &color)
Definition: map.cpp:441
Map::getAnimatedTexts
std::vector< AnimatedTextPtr > getAnimatedTexts()
Definition: map.h:247
uint16
uint16_t uint16
Definition: types.h:36
OTBM_SPAWNS
@ OTBM_SPAWNS
Definition: map.h:77
Map::removeThingColor
void removeThingColor(const ThingPtr &thing)
Definition: map.cpp:273
OTBM_WAYPOINT
@ OTBM_WAYPOINT
Definition: map.h:84
Otc::OPERATION_NEUTRAL
@ OPERATION_NEUTRAL
Definition: const.h:29
towns.h
Map::findItemsById
std::map< Position, ItemPtr > findItemsById(uint16 clientId, uint32 max)
Definition: map.cpp:496
uint
unsigned int uint
Definition: types.h:31
TileBlock::create
const TilePtr & create(const Position &pos)
Definition: map.h:105
Map::setShowAnimations
void setShowAnimations(bool show)
Definition: map.cpp:477
houses.h
OTBM_TILE_AREA
@ OTBM_TILE_AREA
Definition: map.h:72
OTBM_NodeTypes_t
OTBM_NodeTypes_t
Definition: map.h:67
Map::getTiles
const TileList getTiles(int floor=-1)
Definition: map.cpp:370
Map::addThing
void addThing(const ThingPtr &thing, const Position &pos, int stackPos=-1)
Definition: map.cpp:125
Position
Definition: position.h:33
Map::terminate
void terminate()
Definition: map.cpp:45
TileBlock::getOrCreate
const TilePtr & getOrCreate(const Position &pos)
Definition: map.h:111
OTBM_ATTR_HEIGHT
@ OTBM_ATTR_HEIGHT
Definition: map.h:64
Map::colorizeThing
void colorizeThing(const ThingPtr &thing, const Color &color)
Definition: map.cpp:255
Map::createTile
const TilePtr & createTile(const Position &pos)
Definition: map.cpp:302
Map::saveOtcm
void saveOtcm(const std::string &fileName)
Definition: mapio.cpp:479
stdext::packed_storage< uint8 >
Map::setZoneOpacity
void setZoneOpacity(float opacity)
Definition: map.h:200
OTBM_ATTR_DURATION
@ OTBM_ATTR_DURATION
Definition: map.h:53
Map::setWidth
void setWidth(uint16 w)
Definition: map.h:165
Map::getLight
Light getLight()
Definition: map.h:241
Size
TSize< int > Size
Definition: size.h:107
g_map
Map g_map
Definition: map.cpp:36
OTBM_ATTR_ITEM
@ OTBM_ATTR_ITEM
Definition: map.h:46
Map::removeCreatureById
void removeCreatureById(uint32 id)
Definition: map.cpp:533
AwareRange::vertical
int vertical()
Definition: map.h:137
Map::setHeight
void setHeight(uint16 h)
Definition: map.h:166
AwareRange::horizontal
int horizontal()
Definition: map.h:136
Otc::MAX_Z
@ MAX_Z
Definition: const.h:37
TileBlock::getTileIndex
uint getTileIndex(const Position &pos)
Definition: map.h:121
Map::isAwareOfPosition
bool isAwareOfPosition(const Position &pos)
Definition: map.cpp:720
OTBM_ATTR_SLEEPERGUID
@ OTBM_ATTR_SLEEPERGUID
Definition: map.h:57
Map::getOrCreateTile
const TilePtr & getOrCreateTile(const Position &pos)
Definition: map.cpp:337
Otc::PathFindResult
PathFindResult
Definition: const.h:446
Map::getStaticText
StaticTextPtr getStaticText(const Position &pos)
Definition: map.cpp:291
Map::getZoneColor
Color getZoneColor(tileflags_t flag)
Definition: map.cpp:447
AwareRange
Definition: map.h:129
OTBM_ATTR_WIDTH
@ OTBM_ATTR_WIDTH
just random numbers, they're not actually used by the binary reader...
Definition: map.h:63
stdext::split
std::vector< std::string > split(const std::string &str, const std::string &separators)
Definition: string.cpp:273
Map::getSize
Size getSize()
Definition: map.h:170
OTBM_ATTR_RUNE_CHARGES
@ OTBM_ATTR_RUNE_CHARGES
Definition: map.h:49
TileBlock::get
const TilePtr & get(const Position &pos)
Definition: map.h:118
TileList
std::list< TilePtr > TileList
Definition: declarations.h:86
OTBM_ATTR_WRITTENBY
@ OTBM_ATTR_WRITTENBY
Definition: map.h:56
Map::getSpectators
std::vector< CreaturePtr > getSpectators(const Position &centerPos, bool multiFloor)
Definition: map.cpp:635
Map::setSpawnFile
void setSpawnFile(const std::string &file)
Definition: map.h:161
Map::getFloorMissiles
const std::vector< MissilePtr > & getFloorMissiles(int z)
Definition: map.h:245
AwareRange::left
int left
Definition: map.h:134
Map::getSpawnFile
std::string getSpawnFile()
Definition: map.h:169
Map::showZones
bool showZones()
Definition: map.h:205
stdext::shared_object_ptr< Tile >
tileflags_t
tileflags_t
Definition: tile.h:33
OTBM_ATTR_DESCRIPTION
@ OTBM_ATTR_DESCRIPTION
Definition: map.h:38
Map::isForcingAnimations
bool isForcingAnimations()
Definition: map.cpp:467
OTBM_ITEM
@ OTBM_ITEM
Definition: map.h:74
Map::isLookPossible
bool isLookPossible(const Position &pos)
Definition: map.cpp:676
Tile
Definition: tile.h:56
OTBM_ATTR_HOUSE_FILE
@ OTBM_ATTR_HOUSE_FILE
Definition: map.h:50
Map::getSpectatorsInRangeEx
std::vector< CreaturePtr > getSpectatorsInRangeEx(const Position &centerPos, bool multiFloor, int minXRange, int maxXRange, int minYRange, int maxYRange)
Definition: map.cpp:645
Map::removeThingByPos
bool removeThingByPos(const Position &pos, int stackPos)
Definition: map.cpp:247
Map::getDescriptions
std::vector< std::string > getDescriptions()
Definition: map.h:171
OTBM_MONSTER
@ OTBM_MONSTER
Definition: map.h:79
Light
Definition: thingtype.h:120
OTBM_TILE
@ OTBM_TILE
Definition: map.h:73
Animation_Force
@ Animation_Force
Definition: map.h:97
Map::beginGhostMode
void beginGhostMode(float opacity)
Definition: map.cpp:486
Map::setShowZones
void setShowZones(bool show)
Definition: map.cpp:433
Map::getZoneOpacity
float getZoneOpacity()
Definition: map.h:202
TilePtr
stdext::shared_object_ptr< Tile > TilePtr
Definition: declarations.h:59
Otc::Operation
Operation
Definition: const.h:28
stdext::packed_storage::set
void set(Key id, const T &value)
Definition: packed_storage.h:47
Map::getZoneFlags
tileflags_t getZoneFlags()
Definition: map.h:204
Map::setCentralPosition
void setCentralPosition(const Position &centralPosition)
Definition: map.cpp:595
stdext::packed_storage::remove
bool remove(Key id)
Definition: packed_storage.h:63
statictext.h
creatures.h
TileBlock::TileBlock
TileBlock()
Definition: map.h:103
Map::getCreatureById
CreaturePtr getCreatureById(uint32 id)
Definition: map.cpp:525
tile.h
Map::getCentralPosition
Position getCentralPosition()
Definition: map.h:242
animatedtext.h
OTBM_ATTR_DEPOT_ID
@ OTBM_ATTR_DEPOT_ID
Definition: map.h:47
TSize< int >
Map::showZone
bool showZone(tileflags_t zone)
Definition: map.h:206
AwareRange::top
int top
Definition: map.h:131
Map::getSpectatorsInRange
std::vector< CreaturePtr > getSpectatorsInRange(const Position &centerPos, bool multiFloor, int xRange, int yRange)
Definition: map.cpp:640
Map::removeThing
bool removeThing(const ThingPtr &thing)
Definition: map.cpp:198
AwareRange::right
int right
Definition: map.h:132
Map::cleanDynamicThings
void cleanDynamicThings()
Definition: map.cpp:105
uint8
uint8_t uint8
Definition: types.h:37
Map
Definition: map.h:141
Map::clearDescriptions
void clearDescriptions()
Definition: map.h:164
Map::getLastAwareFloor
int getLastAwareFloor()
Definition: map.cpp:758
OTCM_VERSION
@ OTCM_VERSION
Definition: map.h:89
Map::setForceShowAnimations
void setForceShowAnimations(bool force)
Definition: map.cpp:456
Map::isCovered
bool isCovered(const Position &pos, int firstFloor=0)
Definition: map.cpp:682
OTBM_ATTR_SLEEPSTART
@ OTBM_ATTR_SLEEPSTART
Definition: map.h:58
Map::getAwareRange
AwareRange getAwareRange()
Definition: map.h:239
OTBM_ATTR_DECAYING_STATE
@ OTBM_ATTR_DECAYING_STATE
Definition: map.h:54
OTBM_ItemAttr
OTBM_ItemAttr
Definition: map.h:36