Mercurial > fife-parpg
changeset 549:c9113e23b004
*Removed the ExactModellCoordinate object from the camera constructor.
Attention: Little API change to the camera/map.
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 11 Jun 2010 21:29:58 +0000 |
parents | f45e3e2995e0 |
children | d0282579668c |
files | engine/core/model/structures/map.cpp engine/core/model/structures/map.h engine/core/model/structures/map.i engine/core/view/camera.cpp engine/core/view/camera.h engine/python/fife/extensions/serializers/xmlmap.py |
diffstat | 6 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/core/model/structures/map.cpp Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/core/model/structures/map.cpp Fri Jun 11 21:29:58 2010 +0000 @@ -170,8 +170,7 @@ } } - Camera* Map::addCamera(const std::string &id, Layer *layer, - const Rect& viewport, const ExactModelCoordinate& emc) { + Camera* Map::addCamera(const std::string &id, Layer *layer, const Rect& viewport) { if (layer == NULL) { throw NotSupported("Must have valid layer for camera"); } @@ -182,7 +181,7 @@ } // create new camera and add to list of cameras - Camera* camera = new Camera(id, layer, viewport, emc, m_renderbackend, m_imagepool, m_animpool); + Camera* camera = new Camera(id, layer, viewport, m_renderbackend, m_imagepool, m_animpool); m_cameras.push_back(camera); std::vector<RendererBase*>::iterator iter = m_renderers.begin();
--- a/engine/core/model/structures/map.h Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/core/model/structures/map.h Fri Jun 11 21:29:58 2010 +0000 @@ -175,8 +175,7 @@ /** Adds camera to the map. The Map takes ownership of the camera so don't delete it. */ - Camera* addCamera(const std::string& id, Layer *layer, - const Rect& viewport, const ExactModelCoordinate& emc); + Camera* addCamera(const std::string& id, Layer *layer, const Rect& viewport); /** Removes a camera from the map */
--- a/engine/core/model/structures/map.i Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/core/model/structures/map.i Fri Jun 11 21:29:58 2010 +0000 @@ -76,7 +76,7 @@ void removeChangeListener(MapChangeListener* listener); bool isChanged(); std::vector<Layer*>& getChangedLayers(); - Camera* addCamera(const std::string& id, Layer *layer, const Rect& viewport, const ExactModelCoordinate& emc); + 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();
--- a/engine/core/view/camera.cpp Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/core/view/camera.cpp Fri Jun 11 21:29:58 2010 +0000 @@ -79,7 +79,6 @@ Camera::Camera(const std::string& id, Layer *layer, const Rect& viewport, - const ExactModelCoordinate& emc, RenderBackend* renderbackend, ImagePool* ipool, AnimationPool* apool): @@ -113,7 +112,6 @@ m_map = 0; Location location; location.setLayer(layer); - location.setExactLayerCoordinates(emc); setLocation(location); }
--- a/engine/core/view/camera.h Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/core/view/camera.h Fri Jun 11 21:29:58 2010 +0000 @@ -78,7 +78,6 @@ Camera(const std::string& id, Layer* layer, const Rect& viewport, - const ExactModelCoordinate& emc, RenderBackend* renderbackend, ImagePool* ipool, AnimationPool* apool);
--- a/engine/python/fife/extensions/serializers/xmlmap.py Fri Jun 11 21:10:40 2010 +0000 +++ b/engine/python/fife/extensions/serializers/xmlmap.py Fri Jun 11 21:29:58 2010 +0000 @@ -318,11 +318,11 @@ try: if viewport: - cam = map.addCamera(str(id), map.getLayer(str(ref_layer_id)),fife.Rect(*[int(c) for c in viewport.split(',')]),fife.ExactModelCoordinate(0,0,0)) + cam = map.addCamera(str(id), map.getLayer(str(ref_layer_id)),fife.Rect(*[int(c) for c in viewport.split(',')])) else: screen = self.engine.getRenderBackend() - cam = map.addCamera(str(id), map.getLayer(str(ref_layer_id)),fife.Rect(0,0,screen.getScreenWidth(),screen.getScreenHeight()),fife.ExactModelCoordinate(0,0,0)) + cam = map.addCamera(str(id), map.getLayer(str(ref_layer_id)),fife.Rect(0,0,screen.getScreenWidth(),screen.getScreenHeight())) cam.setCellImageDimensions(int(ref_cell_width), int(ref_cell_height)) cam.setRotation(float(rotation))