Author: boucman
Date: Sat Mar 31 10:29:26 2012
New Revision: 53711
URL: http://svn.gna.org/viewcvs/wesnoth?rev=53711&view=rev
Log:
remove MAX_MAP_AREA patch 3195 by jamit
Modified:
trunk/src/game_events.cpp
trunk/src/map.hpp
trunk/src/map_location.hpp
trunk/src/scripting/lua.cpp
trunk/src/terrain_filter.hpp
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=53711&r1=53710&r2=53711&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sat Mar 31 10:29:26 2012
@@ -2962,8 +2962,7 @@
id = ids;
}
std::set<map_location> locs;
- terrain_filter filter(cfg, *resources::units);
- filter.restrict_size(game_config::max_loop);
+ const terrain_filter filter(cfg, *resources::units);
filter.get_locations(locs, true);
config parsed_cfg = cfg.get_parsed_config();
resources::tod_manager->add_time_area(id, locs, parsed_cfg);
Modified: trunk/src/map.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.hpp?rev=53711&r1=53710&r2=53711&view=diff
==============================================================================
--- trunk/src/map.hpp (original)
+++ trunk/src/map.hpp Sat Mar 31 10:29:26 2012
@@ -22,8 +22,6 @@
#include "terrain.hpp"
#include "map_location.hpp"
-
-#define MAX_MAP_AREA 65536
/**
* Encapsulates the map of the game.
Modified: trunk/src/map_location.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map_location.hpp?rev=53711&r1=53710&r2=53711&view=diff
==============================================================================
--- trunk/src/map_location.hpp (original)
+++ trunk/src/map_location.hpp Sat Mar 31 10:29:26 2012
@@ -25,8 +25,6 @@
#include <vector>
#include <set>
#include <boost/unordered_map.hpp>
-
-#define MAX_MAP_AREA 65536
/**
* Encapsulates the map of the game.
Modified: trunk/src/scripting/lua.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/scripting/lua.cpp?rev=53711&r1=53710&r2=53711&view=diff
==============================================================================
--- trunk/src/scripting/lua.cpp (original)
+++ trunk/src/scripting/lua.cpp Sat Mar 31 10:29:26 2012
@@ -3123,8 +3123,7 @@
vconfig filter = luaW_checkvconfig(L, 1);
std::set<map_location> res;
- terrain_filter t_filter(filter, *resources::units);
- t_filter.restrict_size(game_config::max_loop);
+ const terrain_filter t_filter(filter, *resources::units);
t_filter.get_locations(res, true);
lua_createtable(L, res.size(), 0);
@@ -3159,8 +3158,7 @@
return 1;
}
- terrain_filter t_filter(filter, *resources::units);
- t_filter.restrict_size(game_config::max_loop);
+ const terrain_filter t_filter(filter, *resources::units);
lua_pushboolean(L, t_filter.match(map_location(x, y)));
return 1;
}
Modified: trunk/src/terrain_filter.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/terrain_filter.hpp?rev=53711&r1=53710&r2=53711&view=diff
==============================================================================
--- trunk/src/terrain_filter.hpp (original)
+++ trunk/src/terrain_filter.hpp Sat Mar 31 10:29:26 2012
@@ -16,6 +16,7 @@
#ifndef TERRAIN_FILTER_H_INCLUDED
#define TERRAIN_FILTER_H_INCLUDED
+#include "game_config.hpp"
#include "pathutils.hpp"
#include "terrain_translation.hpp"
#include "variable.hpp"
@@ -37,7 +38,7 @@
#endif
terrain_filter(const vconfig& cfg,
- const unit_map& units, const bool flat_tod=false, const size_t
max_loop=MAX_MAP_AREA);
+ const unit_map& units, const bool flat_tod=false, const size_t
max_loop=game_config::max_loop);
terrain_filter(const vconfig& cfg, const terrain_filter& original);
/** Default implementation, but defined out-of-line for efficiency
reasons. */
~terrain_filter();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits