64 editor_map_load_exception
wrap_exc(
const char*
type,
const std::string& e_msg,
const std::string&
filename);
174 void resize(
int width,
int height,
int x_offset,
int y_offset,
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
This class adds extra editor-specific functionality to a normal gamemap.
void sanity_check()
Debugging aid.
void shrink_left(int count)
bool everything_selected() const
bool add_to_selection(const map_location &loc)
Add a location to the selection.
std::set< map_location > selection_
The selected hexes.
bool set_selection(const std::set< map_location > &area)
Select the given area.
~editor_map()
editor_map destructor
void shrink_top(int count)
void expand_left(int count, const t_translation::terrain_code &filler)
std::set< map_location > set_starting_position_labels(display &disp)
Set labels for staring positions in the given display object.
void shrink_bottom(int count)
void invert_selection()
Invert the selection, i.e.
void shrink_right(int count)
void select_all()
Select all map hexes.
bool same_size_as(const gamemap &other) const
A precondition to several map operations.
gamemap mask_to(const gamemap &target) const
A sort-of diff operation returning a mask that, when applied to the current editor_map,...
void expand_right(int count, const t_translation::terrain_code &filler)
bool in_selection(const map_location &loc) const
bool remove_from_selection(const map_location &loc)
Remove a location to the selection.
void expand_top(int count, const t_translation::terrain_code &filler)
const std::set< map_location > & selection() const
Return the selection set.
static editor_map from_string(const std::string &data)
Wrapper around editor_map(cfg, data) that catches possible exceptions and wraps them in a editor_map_...
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.
void resize(int width, int height, int x_offset, int y_offset, const t_translation::terrain_code &filler=t_translation::NONE_TERRAIN)
Resize the map.
editor_map()
Empty map constructor.
void clear_selection()
Clear the selection.
void expand_bottom(int count, const t_translation::terrain_code &filler)
Encapsulates the map of the game.
Main (common) editor header.
Manage the empty-palette in the editor.
editor_map_load_exception wrap_exc(const char *type, const std::string &e_msg, const std::string &filename)
Exception wrapping utility.
EXIT_STATUS start(bool clear_id, const std::string &filename, bool take_screenshot, const std::string &screenshot_filename)
Main interface for launching the editor from the title screen.
const terrain_code NONE_TERRAIN
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
std::string filename
Filename.
editor_map_integrity_error()
~editor_map_load_exception() noexcept
editor_map_load_exception(const std::string &fn, const std::string &msg)
editor_map_operation_exception()
~editor_map_save_exception() noexcept
editor_map_save_exception(const std::string &msg)
Encapsulates the map of the game.
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...