# HG changeset patch # User helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1276291798 0 # Node ID c9113e23b0041a2530a05b95d95d665850c6ff21 # Parent f45e3e2995e0afb7fe7f98d07b016780337ecf47 *Removed the ExactModellCoordinate object from the camera constructor. Attention: Little API change to the camera/map. diff -r f45e3e2995e0 -r c9113e23b004 engine/core/model/structures/map.cpp --- 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::iterator iter = m_renderers.begin(); diff -r f45e3e2995e0 -r c9113e23b004 engine/core/model/structures/map.h --- 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 */ diff -r f45e3e2995e0 -r c9113e23b004 engine/core/model/structures/map.i --- 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& 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& getCameras(); diff -r f45e3e2995e0 -r c9113e23b004 engine/core/view/camera.cpp --- 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); } diff -r f45e3e2995e0 -r c9113e23b004 engine/core/view/camera.h --- 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); diff -r f45e3e2995e0 -r c9113e23b004 engine/python/fife/extensions/serializers/xmlmap.py --- 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))