FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
#include <maploader.h>
Public Member Functions | |
MapLoader (Model *model, VFS *vfs, ImageManager *imageManager, RenderBackend *renderBackend) | |
~MapLoader () | |
void | setObjectLoader (const FIFE::ObjectLoaderPtr &objectLoader) |
FIFE::ObjectLoaderPtr | getObjectLoader () |
void | setAnimationLoader (const FIFE::AnimationLoaderPtr &animationLoader) |
FIFE::AnimationLoaderPtr | getAnimationLoader () |
void | setAtlasLoader (const FIFE::AtlasLoaderPtr &atlasLoader) |
FIFE::AtlasLoaderPtr | getAtlasLoader () |
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 |
AnimationManager * | m_animationManager |
ObjectLoaderPtr | m_objectLoader |
RenderBackend * | m_renderBackend |
PercentDoneCallback | m_percentDoneListener |
std::string | m_loaderName |
std::string | m_mapDirectory |
std::vector< std::string > | m_importDirectories |
Definition at line 50 of file maploader.h.
FIFE::MapLoader::MapLoader | ( | Model * | model, |
VFS * | vfs, | ||
ImageManager * | imageManager, | ||
RenderBackend * | renderBackend | ||
) |
Definition at line 71 of file maploader.cpp.
References m_animationManager, m_imageManager, m_model, m_objectLoader, m_vfs, and FIFE::SharedPtr< T >::reset().
Referenced by FIFE::createDefaultMapLoader().
FIFE::MapLoader::~MapLoader | ( | ) |
Definition at line 79 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 857 of file maploader.cpp.
References FIFE::PercentDoneCallback::addListener(), and m_percentDoneListener.
FIFE::AnimationLoaderPtr FIFE::MapLoader::getAnimationLoader | ( | ) |
Definition at line 744 of file maploader.cpp.
References FIFE::IObjectLoader::getAnimationLoader(), and m_objectLoader.
FIFE::AtlasLoaderPtr FIFE::MapLoader::getAtlasLoader | ( | ) |
Definition at line 757 of file maploader.cpp.
References FIFE::IObjectLoader::getAtlasLoader(), and m_objectLoader.
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 861 of file maploader.cpp.
References m_loaderName.
Referenced by isLoadable().
FIFE::ObjectLoaderPtr FIFE::MapLoader::getObjectLoader | ( | ) |
Definition at line 734 of file maploader.cpp.
References m_objectLoader.
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 764 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 83 of file maploader.cpp.
References FIFE::_log, FIFE::RendererBase::activateAllLayers(), FIFE::Instance::actRepeat(), FIFE::Map::addCamera(), FIFE::CellCache::addCellToArea(), FIFE::CellCache::addCellToCost(), FIFE::CellCache::addNarrowCell(), FIFE::Trigger::addTriggerCondition(), FIFE::Trigger::assign(), FIFE::Trigger::attach(), FIFE::CELL_EDGES_AND_DIAGONALS, FIFE::CELL_EDGES_ONLY, FIFE::InstanceVisual::create(), FIFE::CellCache::createCell(), FIFE::Layer::createInstance(), FIFE::Map::createLayer(), FIFE::Model::createMap(), FIFE::Cell::createTransition(), FIFE::TriggerController::createTrigger(), FIFE::CTYPE_CELL_BLOCKER, FIFE::CTYPE_CELL_NO_BLOCKER, FIFE::Trigger::enableForAllInstances(), FIFE::Trigger::enableForInstance(), FIFE::Map::finalizeCellCaches(), FL_ERR, FIFE::Object::getAction(), FIFE::CellCache::getCell(), FIFE::Layer::getCellCache(), FIFE::Model::getCellGrid(), FIFE::RawData::getDataLength(), FIFE::InstanceRenderer::getInstance(), FIFE::Layer::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::Map::getTriggerController(), FIFE::HasParentPath(), FIFE::PercentDoneCallback::incrementCount(), FIFE::Map::initializeCellCaches(), 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::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::Trigger::setTriggered(), 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 829 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 811 of file maploader.cpp.
References FIFE::IObjectLoader::getAnimationLoader(), FIFE::IObjectLoader::getAtlasLoader(), FIFE::IAnimationLoader::isLoadable(), FIFE::IAtlasLoader::isLoadable(), FIFE::IObjectLoader::isLoadable(), FIFE::IObjectLoader::load(), FIFE::IAnimationLoader::loadMultiple(), FIFE::IAtlasLoader::loadMultiple(), and m_objectLoader.
Referenced by load(), and loadImportDirectory().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 738 of file maploader.cpp.
References m_objectLoader, and FIFE::IObjectLoader::setAnimationLoader().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 751 of file maploader.cpp.
References m_objectLoader, and FIFE::IObjectLoader::setAtlasLoader().
|
virtual |
Implements FIFE::IMapLoader.
Definition at line 728 of file maploader.cpp.
References m_objectLoader.
|
private |
Definition at line 125 of file maploader.h.
Referenced by MapLoader().
|
private |
Definition at line 124 of file maploader.h.
Referenced by MapLoader().
|
private |
Definition at line 132 of file maploader.h.
|
private |
Definition at line 130 of file maploader.h.
Referenced by getLoaderName(), and load().
|
private |
Definition at line 131 of file maploader.h.
Referenced by load().
|
private |
Definition at line 122 of file maploader.h.
Referenced by load(), and MapLoader().
|
private |
Definition at line 126 of file maploader.h.
Referenced by getAnimationLoader(), getAtlasLoader(), getObjectLoader(), loadImportFile(), MapLoader(), setAnimationLoader(), setAtlasLoader(), and setObjectLoader().
|
private |
Definition at line 128 of file maploader.h.
Referenced by addPercentDoneListener(), and load().
|
private |
Definition at line 127 of file maploader.h.
Referenced by load().
|
private |
Definition at line 123 of file maploader.h.
Referenced by isLoadable(), load(), loadImportDirectory(), and MapLoader().