Go to the documentation of this file.
121 const std::array<TilePtr, BLOCK_SIZE*BLOCK_SIZE>&
getTiles()
const {
return m_tiles; }
124 std::array<TilePtr, BLOCK_SIZE*BLOCK_SIZE> m_tiles;
149 bool loadOtcm(
const std::string& fileName);
150 void saveOtcm(
const std::string& fileName);
152 void loadOtbm(
const std::string& fileName);
153 void saveOtbm(
const std::string& fileName);
185 template <
typename... Items>
221 std::vector<CreaturePtr>
getSpectatorsInRangeEx(
const Position& centerPos,
bool multiFloor,
int minXRange,
int maxXRange,
int minYRange,
int maxYRange);
247 void removeUnawareThings();
250 std::unordered_map<uint, TileBlock> m_tileBlocks[
Otc::MAX_Z+1];
251 std::unordered_map<uint32, CreaturePtr> m_knownCreatures;
252 std::array<std::vector<MissilePtr>,
Otc::MAX_Z+1> m_floorMissiles;
253 std::vector<AnimatedTextPtr> m_animatedTexts;
254 std::vector<StaticTextPtr> m_staticTexts;
255 std::vector<MapViewPtr> m_mapViews;
256 std::unordered_map<Position, std::string, PositionHasher> m_waypoints;
258 uint8 m_animationFlags;
260 std::map<uint32, Color> m_zoneColors;
const TilePtr & createTileEx(const Position &pos, const Items &... items)
void setAwareRange(const AwareRange &range)
@ OTBM_ATTR_CONTAINER_ITEMS
void remove(const Position &pos)
void setDescription(const std::string &desc)
@ OTBM_ATTR_ATTRIBUTE_MAP
void loadOtbm(const std::string &fileName)
bool isShowingAnimations()
void setHouseFile(const std::string &file)
void saveOtbm(const std::string &fileName)
void setShowZone(tileflags_t zone, bool show)
std::vector< StaticTextPtr > getStaticTexts()
ThingPtr getThing(const Position &pos, int stackPos)
bool loadOtcm(const std::string &fileName)
std::string getHouseFile()
void cleanTile(const Position &pos)
bool isCompletelyCovered(const Position &pos, int firstFloor=0)
const TilePtr & getTile(const Position &pos)
void removeMapView(const MapViewPtr &mapView)
void setLight(const Light &light)
void addCreature(const CreaturePtr &creature)
std::tuple< std::vector< Otc::Direction >, Otc::PathFindResult > findPath(const Position &start, const Position &goal, int maxComplexity, int flags=0)
std::vector< CreaturePtr > getSightSpectators(const Position ¢erPos, bool multiFloor)
void addMapView(const MapViewPtr &mapView)
void setZoneColor(tileflags_t zone, const Color &color)
std::vector< AnimatedTextPtr > getAnimatedTexts()
void removeThingColor(const ThingPtr &thing)
std::map< Position, ItemPtr > findItemsById(uint16 clientId, uint32 max)
const TilePtr & create(const Position &pos)
void setShowAnimations(bool show)
const std::array< TilePtr, BLOCK_SIZE *BLOCK_SIZE > & getTiles() const
const TileList getTiles(int floor=-1)
void addThing(const ThingPtr &thing, const Position &pos, int stackPos=-1)
const TilePtr & getOrCreate(const Position &pos)
void colorizeThing(const ThingPtr &thing, const Color &color)
const TilePtr & createTile(const Position &pos)
void saveOtcm(const std::string &fileName)
void setZoneOpacity(float opacity)
void removeCreatureById(uint32 id)
uint getTileIndex(const Position &pos)
bool isAwareOfPosition(const Position &pos)
const TilePtr & getOrCreateTile(const Position &pos)
StaticTextPtr getStaticText(const Position &pos)
Color getZoneColor(tileflags_t flag)
@ OTBM_ATTR_WIDTH
just random numbers, they're not actually used by the binary reader...
std::vector< std::string > split(const std::string &str, const std::string &separators)
void notificateTileUpdate(const Position &pos)
const TilePtr & get(const Position &pos)
std::list< TilePtr > TileList
std::vector< CreaturePtr > getSpectators(const Position ¢erPos, bool multiFloor)
void setSpawnFile(const std::string &file)
const std::vector< MissilePtr > & getFloorMissiles(int z)
std::string getSpawnFile()
bool isForcingAnimations()
bool isLookPossible(const Position &pos)
std::vector< CreaturePtr > getSpectatorsInRangeEx(const Position ¢erPos, bool multiFloor, int minXRange, int maxXRange, int minYRange, int maxYRange)
bool removeThingByPos(const Position &pos, int stackPos)
std::vector< std::string > getDescriptions()
void beginGhostMode(float opacity)
void setShowZones(bool show)
stdext::shared_object_ptr< Tile > TilePtr
void set(Key id, const T &value)
tileflags_t getZoneFlags()
void setCentralPosition(const Position ¢ralPosition)
CreaturePtr getCreatureById(uint32 id)
Position getCentralPosition()
bool showZone(tileflags_t zone)
std::vector< CreaturePtr > getSpectatorsInRange(const Position ¢erPos, bool multiFloor, int xRange, int yRange)
bool removeThing(const ThingPtr &thing)
void cleanDynamicThings()
void setForceShowAnimations(bool force)
bool isCovered(const Position &pos, int firstFloor=0)
AwareRange getAwareRange()
@ OTBM_ATTR_DECAYING_STATE