Otclient
14/8/2020
|
#include <map.h>
Public Member Functions | |
void | init () |
void | terminate () |
void | addMapView (const MapViewPtr &mapView) |
void | removeMapView (const MapViewPtr &mapView) |
void | notificateTileUpdate (const Position &pos) |
bool | loadOtcm (const std::string &fileName) |
void | saveOtcm (const std::string &fileName) |
void | loadOtbm (const std::string &fileName) |
void | saveOtbm (const std::string &fileName) |
void | setHouseFile (const std::string &file) |
void | setSpawnFile (const std::string &file) |
void | setDescription (const std::string &desc) |
void | clearDescriptions () |
void | setWidth (uint16 w) |
void | setHeight (uint16 h) |
std::string | getHouseFile () |
std::string | getSpawnFile () |
Size | getSize () |
std::vector< std::string > | getDescriptions () |
void | clean () |
void | cleanDynamicThings () |
void | cleanTexts () |
void | addThing (const ThingPtr &thing, const Position &pos, int stackPos=-1) |
ThingPtr | getThing (const Position &pos, int stackPos) |
bool | removeThing (const ThingPtr &thing) |
bool | removeThingByPos (const Position &pos, int stackPos) |
void | colorizeThing (const ThingPtr &thing, const Color &color) |
void | removeThingColor (const ThingPtr &thing) |
StaticTextPtr | getStaticText (const Position &pos) |
const TilePtr & | createTile (const Position &pos) |
template<typename... Items> | |
const TilePtr & | createTileEx (const Position &pos, const Items &... items) |
const TilePtr & | getOrCreateTile (const Position &pos) |
const TilePtr & | getTile (const Position &pos) |
const TileList | getTiles (int floor=-1) |
void | cleanTile (const Position &pos) |
void | setShowZone (tileflags_t zone, bool show) |
void | setShowZones (bool show) |
void | setZoneColor (tileflags_t zone, const Color &color) |
void | setZoneOpacity (float opacity) |
float | getZoneOpacity () |
Color | getZoneColor (tileflags_t flag) |
tileflags_t | getZoneFlags () |
bool | showZones () |
bool | showZone (tileflags_t zone) |
void | setForceShowAnimations (bool force) |
bool | isForcingAnimations () |
bool | isShowingAnimations () |
void | setShowAnimations (bool show) |
void | beginGhostMode (float opacity) |
void | endGhostMode () |
std::map< Position, ItemPtr > | findItemsById (uint16 clientId, uint32 max) |
void | addCreature (const CreaturePtr &creature) |
CreaturePtr | getCreatureById (uint32 id) |
void | removeCreatureById (uint32 id) |
std::vector< CreaturePtr > | getSightSpectators (const Position ¢erPos, bool multiFloor) |
std::vector< CreaturePtr > | getSpectators (const Position ¢erPos, bool multiFloor) |
std::vector< CreaturePtr > | getSpectatorsInRange (const Position ¢erPos, bool multiFloor, int xRange, int yRange) |
std::vector< CreaturePtr > | getSpectatorsInRangeEx (const Position ¢erPos, bool multiFloor, int minXRange, int maxXRange, int minYRange, int maxYRange) |
void | setLight (const Light &light) |
void | setCentralPosition (const Position ¢ralPosition) |
bool | isLookPossible (const Position &pos) |
bool | isCovered (const Position &pos, int firstFloor=0) |
bool | isCompletelyCovered (const Position &pos, int firstFloor=0) |
bool | isAwareOfPosition (const Position &pos) |
void | setAwareRange (const AwareRange &range) |
void | resetAwareRange () |
AwareRange | getAwareRange () |
Light | getLight () |
Position | getCentralPosition () |
int | getFirstAwareFloor () |
int | getLastAwareFloor () |
const std::vector< MissilePtr > & | getFloorMissiles (int z) |
std::vector< AnimatedTextPtr > | getAnimatedTexts () |
std::vector< StaticTextPtr > | getStaticTexts () |
std::tuple< std::vector< Otc::Direction >, Otc::PathFindResult > | findPath (const Position &start, const Position &goal, int maxComplexity, int flags=0) |
void Map::addCreature | ( | const CreaturePtr & | creature | ) |
void Map::addMapView | ( | const MapViewPtr & | mapView | ) |
void Map::beginGhostMode | ( | float | opacity | ) |
void Map::clean | ( | ) |
void Map::cleanDynamicThings | ( | ) |
void Map::cleanTexts | ( | ) |
void Map::cleanTile | ( | const Position & | pos | ) |
|
inline |
void Map::endGhostMode | ( | ) |
std::tuple< std::vector< Otc::Direction >, Otc::PathFindResult > Map::findPath | ( | const Position & | start, |
const Position & | goal, | ||
int | maxComplexity, | ||
int | flags = 0 |
||
) |
|
inline |
|
inline |
|
inline |
CreaturePtr Map::getCreatureById | ( | uint32 | id | ) |
|
inline |
int Map::getFirstAwareFloor | ( | ) |
|
inline |
|
inline |
int Map::getLastAwareFloor | ( | ) |
|
inline |
std::vector< CreaturePtr > Map::getSightSpectators | ( | const Position & | centerPos, |
bool | multiFloor | ||
) |
|
inline |
|
inline |
std::vector< CreaturePtr > Map::getSpectators | ( | const Position & | centerPos, |
bool | multiFloor | ||
) |
std::vector< CreaturePtr > Map::getSpectatorsInRange | ( | const Position & | centerPos, |
bool | multiFloor, | ||
int | xRange, | ||
int | yRange | ||
) |
std::vector< CreaturePtr > Map::getSpectatorsInRangeEx | ( | const Position & | centerPos, |
bool | multiFloor, | ||
int | minXRange, | ||
int | maxXRange, | ||
int | minYRange, | ||
int | maxYRange | ||
) |
StaticTextPtr Map::getStaticText | ( | const Position & | pos | ) |
|
inline |
const TileList Map::getTiles | ( | int | floor = -1 | ) |
Color Map::getZoneColor | ( | tileflags_t | flag | ) |
|
inline |
|
inline |
void Map::init | ( | ) |
bool Map::isAwareOfPosition | ( | const Position & | pos | ) |
bool Map::isCompletelyCovered | ( | const Position & | pos, |
int | firstFloor = 0 |
||
) |
bool Map::isCovered | ( | const Position & | pos, |
int | firstFloor = 0 |
||
) |
bool Map::isForcingAnimations | ( | ) |
bool Map::isLookPossible | ( | const Position & | pos | ) |
bool Map::isShowingAnimations | ( | ) |
void Map::loadOtbm | ( | const std::string & | fileName | ) |
bool Map::loadOtcm | ( | const std::string & | fileName | ) |
void Map::notificateTileUpdate | ( | const Position & | pos | ) |
void Map::removeCreatureById | ( | uint32 | id | ) |
void Map::removeMapView | ( | const MapViewPtr & | mapView | ) |
bool Map::removeThing | ( | const ThingPtr & | thing | ) |
bool Map::removeThingByPos | ( | const Position & | pos, |
int | stackPos | ||
) |
void Map::removeThingColor | ( | const ThingPtr & | thing | ) |
void Map::resetAwareRange | ( | ) |
void Map::saveOtbm | ( | const std::string & | fileName | ) |
Usually when a map has empty house/spawn file it means the map is new. TODO: Ask the user for a map name instead of those ugly uses of substr
we only need the filename to save to, the directory should be resolved by the OTBM loader not here
OTBM_TILE_AREA
Definition at line 231 of file mapio.cpp.
void Map::saveOtcm | ( | const std::string & | fileName | ) |
void Map::setAwareRange | ( | const AwareRange & | range | ) |
void Map::setCentralPosition | ( | const Position & | centralPosition | ) |
|
inline |
void Map::setForceShowAnimations | ( | bool | force | ) |
|
inline |
|
inline |
void Map::setShowAnimations | ( | bool | show | ) |
void Map::setShowZone | ( | tileflags_t | zone, |
bool | show | ||
) |
void Map::setShowZones | ( | bool | show | ) |
|
inline |
|
inline |
void Map::setZoneColor | ( | tileflags_t | zone, |
const Color & | color | ||
) |
|
inline |
|
inline |
|
inline |
void Map::terminate | ( | ) |