22 #ifndef FIFE_MAP_MAP_H 23 #define FIFE_MAP_MAP_H 52 class TriggerController;
67 virtual void onMapChanged(
Map* map, std::vector<Layer*>& changedLayers) = 0;
96 const std::vector<RendererBase*>& renderers,
TimeProvider* tp_master=NULL);
104 const std::string&
getId()
const {
return m_id; }
108 void setId(
const std::string&
id) { m_id = id; }
112 Layer* createLayer(
const std::string& identifier,
CellGrid* grid);
116 void deleteLayer(
Layer*);
120 const std::list<Layer*>&
getLayers()
const {
return m_layers; }
124 Layer* getLayer(
const std::string& identifier);
178 Camera* addCamera(
const std::string&
id,
const Rect& viewport);
182 void removeCamera(
const std::string&
id);
186 Camera* getCamera(
const std::string&
id);
190 const std::vector<Camera*>& getCameras()
const;
194 uint32_t getActiveCameraCount()
const;
208 void removeInstanceForTransfer(
Instance* instance);
212 void initializeCellCaches();
216 void finalizeCellCaches();
230 Map& operator=(
const Map& map);
const std::string & getFilename() const
Abstract interface for all the renderbackends.
Timeprovider is an utility providing time management functionality You can have hierarchy of time pro...
bool isChanged()
Returns true, if map information was changed during previous update round.
const std::string & getId() const
Get the identifier for this map.
void setId(const std::string &id)
Sets the identifier for this map.
virtual ~MapChangeListener()
std::map< Instance *, Location > m_transferInstances
holds instances which should be transferred on the next update
const std::list< Layer * > & getLayers() const
Get the layers on this map.
Base class for all fife classes Used e.g.
Camera describes properties of a view port shown in the main screen Main screen can have multiple cam...
std::vector< MapChangeListener * > m_changeListeners
listeners for map changes
std::vector< Layer * > & getChangedLayers()
Returns layers that were changed during previous update round.
std::list< Layer * > m_layers
virtual void onMapChanged(Map *map, std::vector< Layer *> &changedLayers)=0
Called when some layer is changed on map.
std::vector< Layer * > m_changedLayers
holds changed layers after each update
void setTimeMultiplier(float multip)
Sets speed for the map.
virtual void onLayerDelete(Map *map, Layer *layer)=0
Called when some layer gets deleted on map.
std::vector< Camera * > m_cameras
holds the cameras attached to this map
TimeProvider m_timeProvider
float getTimeMultiplier() const
Gets model speed.
virtual void onLayerCreate(Map *map, Layer *layer)=0
Called when some layer gets created on the map.
bool m_changed
true, if something was changed on map during previous update (layer change, creation, deletion)
TimeProvider * getTimeProvider()
Gets timeprovider used in the map.
TriggerController * m_triggerController
This class serves as a central place to manage triggers for a Map.
std::vector< RendererBase * > m_renderers
holds handles to all created renderers
RenderBackend * m_renderBackend
pointer to renderbackend
An Instance is an "instantiation" of an Object at a Location.
void setFilename(const std::string &file)
Listener interface for changes happening on map.