FIFE
|
#include <maploader.h>
Public Member Functions | |
MapLoader (Model *model, VFS *vfs, ImageManager *imageManager, RenderBackend *renderBackend) | |
~MapLoader () | |
void | setObjectLoader (const FIFE::ObjectLoaderPtr &objectLoader) |
void | setAnimationLoader (const FIFE::AnimationLoaderPtr &animationLoader) |
void | setAtlasLoader (const FIFE::AtlasLoaderPtr &atlasLoader) |
bool | isLoadable (const std::string &filename) const |
Map * | load (const std::string &filename) |
void | loadImportFile (const std::string &file, const std::string &directory="") |
used to load an object file if directory is provided then file is assumed relative to directory if relativeToMap is true then the file/directory is assumed to be relative to location of map file More... | |
void | loadImportDirectory (const std::string &directory) |
used to load a directory of object files recursively if relativeToMap is true then the directory is assumed to be relative to location of map file More... | |
void | addPercentDoneListener (PercentDoneListener *listener) |
allows adding a listener to the map loader for percent completed events More... | |
const std::string & | getLoaderName () const |
returns the loader name associated with this map file loader, this will only be populated after the load function is called More... | |
![]() | |
virtual | ~IMapLoader () |
Private Attributes | |
Model * | m_model |
VFS * | m_vfs |
ImageManager * | m_imageManager |
ObjectLoaderPtr | m_objectLoader |
AtlasLoaderPtr | m_atlasLoader |
RenderBackend * | m_renderBackend |
PercentDoneCallback | m_percentDoneListener |
std::string | m_loaderName |
std::string | m_mapDirectory |
std::vector< std::string > | m_importDirectories |
Definition at line 49 of file maploader.h.
FIFE::MapLoader::MapLoader | ( | Model * | model, |
VFS * | vfs, | ||
ImageManager * | imageManager, | ||
RenderBackend * | renderBackend | ||
) |
Definition at line 68 of file maploader.cpp.
References m_atlasLoader, m_imageManager, m_model, m_objectLoader, m_vfs, and FIFE::SharedPtr< T >::reset().
FIFE::MapLoader::~MapLoader | ( | ) |
Definition at line 76 of file maploader.cpp.
void FIFE::MapLoader::addPercentDoneListener | ( | PercentDoneListener * | listener | ) |
allows adding a listener to the map loader for percent completed events
Definition at line 806 of file maploader.cpp.
References FIFE::PercentDoneCallback::addListener(), and m_percentDoneListener.
const std::string & FIFE::MapLoader::getLoaderName | ( | ) | const |
returns the loader name associated with this map file loader, this will only be populated after the load function is called
Definition at line 810 of file maploader.cpp.
References m_loaderName.
Referenced by isLoadable().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 716 of file maploader.cpp.
References FIFE::_log, FL_ERR, FIFE::RawData::getDataLength(), getLoaderName(), m_vfs, FIFE::VFS::open(), and FIFE::RawData::readString().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 80 of file maploader.cpp.
References FIFE::_log, FIFE::Instance::act(), FIFE::RendererBase::activateAllLayers(), FIFE::Map::addCamera(), FIFE::CellCache::addCellToArea(), FIFE::CellCache::addCellToCost(), FIFE::CellCache::addNarrowCell(), FIFE::CELL_EDGES_AND_DIAGONALS, FIFE::CELL_EDGES_ONLY, FIFE::CELLV_CONCEALED, FIFE::CELLV_MASKED, FIFE::CELLV_REVEALED, FIFE::InstanceVisual::create(), FIFE::CellCache::createCell(), FIFE::Layer::createInstance(), FIFE::Map::createLayer(), FIFE::Model::createMap(), FIFE::Cell::createTransition(), FIFE::CTYPE_CELL_BLOCKER, FIFE::CTYPE_CELL_NO_BLOCKER, FIFE::Map::finalizeCellCaches(), FL_ERR, FIFE::Object::getAction(), FIFE::CellCache::getCell(), FIFE::Layer::getCellCache(), FIFE::Model::getCellGrid(), FIFE::RawData::getDataLength(), FIFE::InstanceRenderer::getInstance(), FIFE::Map::getLayer(), FIFE::Model::getNamespaces(), FIFE::Model::getObject(), FIFE::Model::getObjects(), FIFE::GetParentPath(), FIFE::RenderBackend::getScreenHeight(), FIFE::RenderBackend::getScreenWidth(), FIFE::ObjectVisual::getStaticImageAngles(), FIFE::HasParentPath(), FIFE::PercentDoneCallback::incrementCount(), FIFE::Map::initializeCellCaches(), FIFE::ITYPE_CIRCLE_SHAPE, FIFE::ITYPE_NO_SHAPE, FIFE::ITYPE_QUAD_SHAPE, loadImportDirectory(), loadImportFile(), m_loaderName, m_mapDirectory, m_model, m_percentDoneListener, m_renderBackend, m_vfs, FIFE::VFS::open(), FIFE::RawData::readString(), FIFE::CellCache::registerCost(), FIFE::PercentDoneCallback::reset(), FIFE::Camera::setCellImageDimensions(), FIFE::Instance::setCellStackPosition(), FIFE::Cell::setCellType(), FIFE::Instance::setCost(), FIFE::Cell::setCostMultiplier(), FIFE::CellCache::setDefaultCostMultiplier(), FIFE::CellCache::setDefaultSpeedMultiplier(), FIFE::Map::setFilename(), FIFE::Cell::setFoWType(), FIFE::Layer::setInteract(), FIFE::Object::setMultiPart(), FIFE::Layer::setPathingStrategy(), FIFE::Camera::setRotation(), FIFE::Instance::setRotation(), FIFE::CellGrid::setRotation(), FIFE::CellCache::setSearchNarrowCells(), FIFE::Layer::setSortingStrategy(), FIFE::Cell::setSpeedMultiplier(), FIFE::InstanceVisual::setStackPosition(), FIFE::Camera::setTilt(), FIFE::PercentDoneCallback::setTotalNumberOfElements(), FIFE::Instance::setVisitor(), FIFE::Instance::setVisitorRadius(), FIFE::Instance::setVisitorShape(), FIFE::Layer::setWalkable(), FIFE::CellGrid::setXScale(), FIFE::CellGrid::setXShift(), FIFE::CellGrid::setYScale(), FIFE::CellGrid::setYShift(), FIFE::Camera::setZoom(), FIFE::CellGrid::setZScale(), FIFE::CellGrid::setZShift(), FIFE::Camera::setZToY(), FIFE::SORTING_CAMERA, FIFE::SORTING_CAMERA_AND_LOCATION, FIFE::SORTING_LOCATION, and FIFE::tokenize().
void FIFE::MapLoader::loadImportDirectory | ( | const std::string & | directory | ) |
used to load a directory of object files recursively if relativeToMap is true then the directory is assumed to be relative to location of map file
Definition at line 778 of file maploader.cpp.
References FIFE::VFS::listDirectories(), FIFE::VFS::listFiles(), loadImportFile(), and m_vfs.
Referenced by load().
void FIFE::MapLoader::loadImportFile | ( | const std::string & | file, |
const std::string & | directory = "" |
||
) |
used to load an object file if directory is provided then file is assumed relative to directory if relativeToMap is true then the file/directory is assumed to be relative to location of map file
Definition at line 763 of file maploader.cpp.
References FIFE::IAtlasLoader::isLoadable(), FIFE::IObjectLoader::isLoadable(), FIFE::IAtlasLoader::load(), FIFE::IObjectLoader::load(), m_atlasLoader, and m_objectLoader.
Referenced by load(), and loadImportDirectory().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 704 of file maploader.cpp.
References m_objectLoader, and FIFE::IObjectLoader::setAnimationLoader().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 710 of file maploader.cpp.
References m_atlasLoader.
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 697 of file maploader.cpp.
References m_objectLoader.
|
private |
Definition at line 110 of file maploader.h.
Referenced by loadImportFile(), MapLoader(), and setAtlasLoader().
|
private |
Definition at line 108 of file maploader.h.
Referenced by MapLoader().
|
private |
Definition at line 116 of file maploader.h.
|
private |
Definition at line 114 of file maploader.h.
Referenced by getLoaderName(), and load().
|
private |
Definition at line 115 of file maploader.h.
Referenced by load().
|
private |
Definition at line 106 of file maploader.h.
Referenced by load(), and MapLoader().
|
private |
Definition at line 109 of file maploader.h.
Referenced by loadImportFile(), MapLoader(), setAnimationLoader(), and setObjectLoader().
|
private |
Definition at line 112 of file maploader.h.
Referenced by addPercentDoneListener(), and load().
|
private |
Definition at line 111 of file maploader.h.
Referenced by load().
|
private |
Definition at line 107 of file maploader.h.
Referenced by isLoadable(), load(), loadImportDirectory(), and MapLoader().