75 std::set<map_location>
get_area()
const;
130 std::string
dump()
const;
A map fragment – a collection of locations and information abut them.
void flip_vertical()
Flip the map fragment vertically.
std::set< map_location > get_offset_area(const map_location &offset) const
Get the area covered by this map fragment, shifted by an offset.
std::set< map_location > get_area() const
Get the area covered by this map fragment.
map_location center_of_mass() const
Get the center of the map fragment, mass-wise.
std::string dump() const
Debug dump to a string.
std::vector< tile_info > items_
The data of this map_fragment.
void flip_horizontal()
Flip the map fragment horizontally.
void paste_into(gamemap &map, const map_location &loc) const
Paste the map fragment into the map, treating loc as the (0,0) point (offset).
void shift(const map_location &offset)
Shift all tiles in the map fragment by the specified offset.
std::set< map_location > area_
void rotate_60_ccw()
Rotate the map fragment 60 degrees counter-clockwise around (0,0)
void center_by_mass()
Shift the map fragment so it is roughly centered around the (0,0) point, mass-wise.
map_fragment()
Create an empty map fragment.
void add_tile(const gamemap &map, const map_location &loc)
Add a single location and pull its info from the map.
void add_tiles(const gamemap &map, const std::set< map_location > &loc)
Add many locations and pull their info from the map.
const std::vector< tile_info > & get_items() const
Get the tile_info vector.
void rotate_60_cw()
Rotate the map fragment 60 degrees clockwise around (0,0)
Encapsulates the map of the game.
Manage the empty-palette in the editor.
This represents a tile along with information about it, namely the terrain, possibly other informatio...
t_translation::terrain_code terrain
tile_info(const gamemap &map, const map_location &offset)
Create a tile info – the constructor grabs required data from the map.
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...