FIFE 2008.0
|
#include <map.h>
Public Member Functions | |
Map (const std::string &identifier, RenderBackend *renderbackend, const std::vector< RendererBase * > &renderers, ImagePool *imagepool, AnimationPool *animpool, TimeProvider *tp_master=NULL) | |
~Map () | |
const std::string & | getId () const |
void | setId (const std::string &id) |
Layer * | createLayer (const std::string &identifier, CellGrid *grid) |
void | deleteLayer (Layer *) |
const std::list< Layer * > & | getLayers () const |
Layer * | getLayer (const std::string &identifier) |
uint32_t | getNumLayers () const |
void | deleteLayers () |
void | getMatchingCoordinates (const ModelCoordinate &coord_to_map, const Layer *from_layer, const Layer *to_layer, std::vector< ModelCoordinate > &matching_coords) const |
bool | update () |
void | setTimeMultiplier (float multip) |
float | getTimeMultiplier () const |
TimeProvider * | getTimeProvider () |
void | addChangeListener (MapChangeListener *listener) |
void | removeChangeListener (MapChangeListener *listener) |
bool | isChanged () |
std::vector< Layer * > & | getChangedLayers () |
Camera * | addCamera (const std::string &id, Layer *layer, const Rect &viewport) |
void | removeCamera (const std::string &id) |
Camera * | getCamera (const std::string &id) |
std::vector< Camera * > & | getCameras () |
FIFE::Map::Map | ( | const std::string & | identifier, |
RenderBackend * | renderbackend, | ||
const std::vector< RendererBase * > & | renderers, | ||
ImagePool * | imagepool, | ||
AnimationPool * | animpool, | ||
TimeProvider * | tp_master = NULL |
||
) |
FIFE::Map::~Map | ( | ) |
Adds camera to the map. The Map takes ownership of the camera so don't delete it.
Definition at line 179 of file map.cpp.
References FIFE::Camera::addRenderer(), and getCamera().
void FIFE::Map::addChangeListener | ( | MapChangeListener * | listener | ) |
Layer * FIFE::Map::createLayer | ( | const std::string & | identifier, |
CellGrid * | grid | ||
) |
void FIFE::Map::deleteLayer | ( | Layer * | layer | ) |
void FIFE::Map::deleteLayers | ( | ) |
Camera * FIFE::Map::getCamera | ( | const std::string & | id | ) |
Get a camera by its identifier.
Definition at line 218 of file map.cpp.
Referenced by addCamera().
std::vector< Camera * > & FIFE::Map::getCameras | ( | ) |
std::vector<Layer*>& FIFE::Map::getChangedLayers | ( | ) | [inline] |
const std::string& FIFE::Map::getId | ( | ) | const [inline] |
Layer * FIFE::Map::getLayer | ( | const std::string & | identifier | ) |
const std::list<Layer*>& FIFE::Map::getLayers | ( | ) | const [inline] |
Get the layers on this map.
Definition at line 121 of file map.h.
Referenced by FIFE::RendererBase::activateAllLayers(), FIFE::Camera::render(), and FIFE::Camera::testRenderedViewPort().
void FIFE::Map::getMatchingCoordinates | ( | const ModelCoordinate & | coord_to_map, |
const Layer * | from_layer, | ||
const Layer * | to_layer, | ||
std::vector< ModelCoordinate > & | matching_coords | ||
) | const |
Maps coordinate from one layer to another
uint32_t FIFE::Map::getNumLayers | ( | ) | const |
float FIFE::Map::getTimeMultiplier | ( | ) | const [inline] |
Gets model speed.
Definition at line 151 of file map.h.
References FIFE::TimeProvider::getMultiplier().
TimeProvider* FIFE::Map::getTimeProvider | ( | ) | [inline] |
Gets timeprovider used in the map
Definition at line 155 of file map.h.
Referenced by FIFE::Instance::getRuntime(), and FIFE::Instance::getTotalTimeMultiplier().
bool FIFE::Map::isChanged | ( | ) | [inline] |
void FIFE::Map::removeCamera | ( | const std::string & | id | ) |
void FIFE::Map::removeChangeListener | ( | MapChangeListener * | listener | ) |
void FIFE::Map::setId | ( | const std::string & | id | ) | [inline] |
void FIFE::Map::setTimeMultiplier | ( | float | multip | ) | [inline] |
Sets speed for the map. See Model::setTimeMultiplier.
Definition at line 147 of file map.h.
References FIFE::TimeProvider::setMultiplier().
bool FIFE::Map::update | ( | ) |