Author: mordante
Date: Fri May  1 19:25:43 2009
New Revision: 35387

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35387&view=rev
Log:
Some minimap improvements.

Draw on the background again and integrate the drawing with the helper
routine.

Modified:
    trunk/src/gui/widgets/minimap.cpp
    trunk/src/gui/widgets/minimap.hpp

Modified: trunk/src/gui/widgets/minimap.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/minimap.cpp?rev=35387&r1=35386&r2=35387&view=diff
==============================================================================
--- trunk/src/gui/widgets/minimap.cpp (original)
+++ trunk/src/gui/widgets/minimap.cpp Fri May  1 19:25:43 2009
@@ -37,19 +37,7 @@
        set_dirty();
 }
 
-void tminimap::impl_draw_foreground(surface& surface)
-{
-       draw_map(surface);
-}
-
 void tminimap::impl_draw_background(surface& frame_buffer)
-{
-       canvas(0).draw();
-       SDL_Rect rect = get_rect();
-       SDL_BlitSurface(canvas(0).surf(), NULL, frame_buffer, &rect);
-}
-
-void tminimap::draw_map(surface& surface)
 {
        assert(terrain_);
 
@@ -69,7 +57,7 @@
 
                const ::surface surf = image::getMinimap(rect.w, rect.h, map, 
NULL);
 
-               blit_surface(surf, NULL, surface, &rect);
+               blit_surface(surf, NULL, frame_buffer, &rect);
 
        } catch (incorrect_map_format_exception& e) {
                ERR_CF << "Error while loading the map: " << e.msg_ << '\n';

Modified: trunk/src/gui/widgets/minimap.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/minimap.hpp?rev=35387&r1=35386&r2=35387&view=diff
==============================================================================
--- trunk/src/gui/widgets/minimap.hpp (original)
+++ trunk/src/gui/widgets/minimap.hpp Fri May  1 19:25:43 2009
@@ -92,15 +92,9 @@
        unsigned top_border_;
        unsigned bottom_border_;
 
-       /** Draws the minimap itself. */
-       virtual void draw_map(surface& surface);
-
        /** Inherited from tcontrol. */
        void impl_draw_background(surface& frame_buffer);
 
-       /** Inherited from tcontrol. */
-       void impl_draw_foreground(surface& surface);
-       
        /** Inherited from tcontrol. */
        const std::string& get_control_type() const
                { static const std::string type = "minimap"; return type; }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to