ManaPlus
|
#include <mapreader.h>
Static Public Member Functions | |
static Map * | readMap (const std::string &filename, const std::string &realFilename) |
static Map * | readMap (xmlNode *const node, const std::string &path) |
static Map * | createEmptyMap (const std::string &filename, const std::string &realFilename) |
static void | readLayer (const xmlNodePtr node, Map *const map) |
static void | loadEmptyAtlas () |
static void | unloadEmptyAtlas () |
Static Private Member Functions | |
static void | readProperties (const xmlNode *const node, Properties *const props) |
static bool | readBase64Layer (const xmlNode *const childNode, Map *const map, MapLayer *const layer, const MapLayerTypeT &layerType, MapHeights *const heights, const std::string &compression, int &x, int &y, const int w, const int h) |
static bool | readCsvLayer (const xmlNode *const childNode, Map *const map, MapLayer *const layer, const MapLayerTypeT &layerType, MapHeights *const heights, int &x, int &y, const int w, const int h) |
static Tileset * | readTileset (xmlNodePtr node, const std::string &path, Map *const map) |
static void | updateMusic (Map *const map) |
static void | addLayerToList (const std::string &fileName, const SkipError skipError) |
static void | loadLayers (const std::string &path) |
static void | unloadTempLayers () |
Static Private Attributes | |
static Resource * | mEmptyAtlas = 0 |
Reader for XML map files (*.tmx)
Definition at line 41 of file mapreader.h.
|
staticprivate |
Definition at line 230 of file mapreader.cpp.
References fileName, for_each_xml_child_node, XML::getProperty(), Logger::log(), logger, anonymous_namespace{mapreader.cpp}::mKnownDocs, anonymous_namespace{mapreader.cpp}::mKnownLayers, XML::Document::rootNode(), Catch::toLower(), and UseVirtFs_true.
Referenced by loadLayers().
|
static |
Definition at line 1275 of file mapreader.cpp.
References Map::addLayer(), Logger::log1(), logger, mapTileSize, Map::preCacheLayers(), Map::setCustom(), Properties::setProperty(), Map::updateConditionLayers(), Map::updateDrawLayersList(), and updateMusic().
|
static |
Definition at line 1319 of file mapreader.cpp.
References MapDB::getAtlas(), Loader::getEmptyAtlas(), Configuration::getStringValue(), GraphicsManager::getUseAtlases(), graphicsManager, Actions::info(), mEmptyAtlas, and paths.
Referenced by Game::Game().
|
staticprivate |
Definition at line 307 of file mapreader.cpp.
References addLayerToList(), BLOCK_END, BLOCK_START, loadXmlDir2, and SkipError_false.
|
staticprivate |
Definition at line 664 of file mapreader.cpp.
References TileAnimation::addAffectedTile(), CAST_S32, Map::getTileAnimations(), inflateMemory(), php3_base64_decode(), reportAlways, setTile(), x, and y.
Referenced by readLayer().
|
staticprivate |
Definition at line 801 of file mapreader.cpp.
References TileAnimation::addAffectedTile(), data, Map::getTileAnimations(), setTile(), x, and y.
Referenced by readLayer().
|
static |
Reads a map layer and adds it to the given map.
Definition at line 883 of file mapreader.cpp.
References MapLayerType::ACTIONS, TileAnimation::addAffectedTile(), Map::addHeights(), Map::addLayer(), CHECK_VERSION, MapLayerType::COLLISION, for_each_xml_child_node, Map::getHeight(), XML::getProperty(), Map::getTileAnimations(), Map::getWidth(), MapLayerType::HEIGHTS, Map::indexTilesets(), Logger::log(), logger, readBase64Layer(), readCsvLayer(), setTile(), MapLayerType::TILES, Catch::toLower(), x, and y.
Referenced by loadReplaceLayer().
|
static |
Read an XML map from a file.
Referenced by Game::changeMap().
|
static |
|
staticprivate |
Reads the properties element.
node | The properties element. |
props | The Properties instance to which the properties will be assigned. |
Definition at line 522 of file mapreader.cpp.
References BLOCK_END, BLOCK_START, for_each_xml_child_node, XML::getProperty(), PoDict::getStr(), and translator.
|
staticprivate |
Reads a tile set.
Definition at line 1075 of file mapreader.cpp.
References Map::addAnimation(), Animation::addFrame(), ParticleType::Animation, BLOCK_END, BLOCK_START, config, delete2, for_each_xml_child_node, ImageSet::get(), Configuration::getBoolValue(), Loader::getImage(), Animation::getLength(), XML::getProperty(), Map::getTileHeight(), Map::getTileWidth(), GraphicsManager::getUseAtlases(), graphicsManager, Map::haveAtlas(), ImageType::Image, MapDB::isEmptyTileset(), Logger::log(), logger, reportAlways, resolveRelativePath(), XML::Document::rootNode(), Tileset::setEmpty(), Tileset::setProperties(), SkipError_false, Catch::toString(), and UseVirtFs_true.
|
static |
Definition at line 1335 of file mapreader.cpp.
References Resource::decRef(), and mEmptyAtlas.
Referenced by Game::~Game().
|
staticprivate |
Definition at line 314 of file mapreader.cpp.
References FOR_EACH, anonymous_namespace{mapreader.cpp}::mKnownDocs, and anonymous_namespace{mapreader.cpp}::mKnownLayers.
|
staticprivate |
Definition at line 1307 of file mapreader.cpp.
References VirtFs::exists(), Properties::getProperty(), Configuration::getStringValue(), pathJoin(), paths, and Properties::setProperty().
Referenced by createEmptyMap().
|
staticprivate |
Definition at line 120 of file mapreader.h.
Referenced by loadEmptyAtlas(), and unloadEmptyAtlas().