~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/editor/tools/editor_increase_resources_tool.cc

  • Committer: sigra
  • Date: 2007-01-26 16:12:13 UTC
  • Revision ID: git-v1:f983e08603f59bc6a6e99cb732d9102bfbfb3db8
* Try to optimize the set terrain tool by adding Map::set_height for areas. That means first set the height of every node in the area, then adjust the surrounding nodes ([http://sourceforge.net/tracker/index.php?func=detail&aid=1640305&group_id=40163&atid=427221], "Editor set height tool set to max produces funny mountain" is still present though).
* Use Area and Player_Area.
* Put most of the code from Event_Conquer_Area and Event_Unhide_Area into a common base.
* Initialize the names of events and triggers in their initializer lists.

git-svn-id: https://widelands.svn.sourceforge.net/svnroot/widelands/trunk@1965 37b2a8de-5219-0410-9f54-a31bc463ab9c

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        const int radius = parent.get_sel_radius();
82
82
        const World & world = map.world();
83
83
        Overlay_Manager & overlay_manager = map.overlay_manager();
84
 
        MapRegion mr(map, center.node, radius);
 
84
        MapRegion mr(map, Area(center.node, radius));
85
85
        FCoords fc;
86
86
        while (mr.next(fc)) {
87
87
                int res        = fc.field->get_resources();
115
115
                                        (PicMod_Menu,
116
116
                                         world.get_resource(m_cur_res)->get_editor_pic(amount).c_str());
117
117
                                overlay_manager.register_overlay(fc, picid, 4);
118
 
                                map.recalc_for_field_area(fc, 0);
 
118
                 map.recalc_for_field_area(Area(fc, 0));
119
119
         }
120
120
      }
121
121
   }