15 #ifndef EDITOR_EDITOR_MAP_HPP_INCLUDED
16 #define EDITOR_EDITOR_MAP_HPP_INCLUDED
176 void resize(
int width,
int height,
int x_offset,
int y_offset,
editor_map_save_exception(const std::string &msg)
editor_map_load_exception(const std::string &fn, const std::string &msg)
editor_map_operation_exception()
void resize(int width, int height, int x_offset, int y_offset, const t_translation::t_terrain &filler=t_translation::NONE_TERRAIN)
Resize the map.
std::set< map_location > selection_
The selected hexes.
std::set< map_location > set_starting_position_labels(display &disp)
Set labels for staring positions in the given display object.
void shrink_top(int count)
GLuint GLuint GLsizei GLenum type
const t_terrain NONE_TERRAIN
~editor_map_load_exception()
void sanity_check()
Debugging aid.
void expand_top(int count, const t_translation::t_terrain &filler)
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
void expand_left(int count, const t_translation::t_terrain &filler)
t_translation::t_list clone_column(int x, const t_translation::t_terrain &filler)
std::set< map_location > get_contiguous_terrain_tiles(const map_location &start) const
Get a contiguous set of tiles having the same terrain as the starting location.
~editor_map()
editor_map destructor
editor_map_load_exception wrap_exc(const char *type, const std::string &e_msg, const std::string &filename)
Exception wrapping utility.
bool everything_selected() const
gamemap mask_to(const gamemap &target) const
A sort-of diff operation returning a mask that, when applied to the current editor_map, will transform it into the target map.
bool in_selection(const map_location &loc) const
void invert_selection()
Invert the selection, i.e.
bool same_size_as(const gamemap &other) const
A precondition to several map operations.
Encapsulates the map of the game.
Manage the empty-palette in the editor.
void shrink_left(int count)
GLuint GLuint GLsizei count
void expand_bottom(int count, const t_translation::t_terrain &filler)
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
bool add_to_selection(const map_location &loc)
Add a location to the selection.
Encapsulates the map of the game.
static editor_map from_string(const config &terrain_cfg, const std::string &data)
Wrapper around editor_map(cfg, data) that catches possible exceptions and wraps them in a editor_map_...
void expand_right(int count, const t_translation::t_terrain &filler)
This class adds extra editor-specific functionality to a normal gamemap.
Main (common) editor header.
editor_map(const config &terrain_cfg)
Empty map constructor.
void clear_selection()
Clear the selection.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
GLint GLint GLint GLint GLint x
const std::set< map_location > & selection() const
Return the selection set.
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
void select_all()
Select all map hexes.
editor_map_integrity_error()
~editor_map_save_exception()
GLint GLint GLint GLint GLint GLint GLsizei width
A config object defines a single node in a WML file, with access to child nodes.
void shrink_right(int count)
GLsizei const GLcharARB ** string
bool set_selection(const std::set< map_location > &area)
Select the given area.
bool remove_from_selection(const map_location &loc)
Remove a location to the selection.
std::vector< t_terrain > t_list
void shrink_bottom(int count)