29 return std::make_unique<editor_action_village>(hex, disp.
playing_team());
38 return std::make_unique<editor_action_village_delete>(hex);
48 SDL_Rect r {6, 6, 0, 0};
49 sdl_blit(image60,
nullptr, image, &r);
surface get_image(const image::locator &i_locator, TYPE type)
Caches and returns an image.
std::unique_ptr< editor_action > up_left(editor_display &disp, int x, int y) override
If clicked on a village hex field, assigns the ownership of it to the current side.
const map_location hex_clicked_on(int x, int y) const
given x,y co-ordinates of an onscreen pixel, will return the location of the hex that this pixel corr...
static double get_zoom_factor()
Returns the current zoom factor.
std::unique_ptr< editor_action > up_right(editor_display &disp, int x, int y) override
If clicked on a village hex field, unassigns it's ownership.
surface scale_surface(const surface &surf, int w, int h)
Scale a surface using alpha-weighted modified bilinear filtering Note: causes artifacts with alpha gr...
virtual void set_mouse_overlay(editor_display &disp) override
Set the mouse overlay for this action.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
void set_mouseover_hex_overlay(const surface &image)
mouseover_hex_overlay_ require a prerendered surface and is drawn underneath the mouse's location ...
Manage the empty-palette in the editor.
Encapsulates the map of the game.
std::size_t playing_team() const
The playing team is the team whose turn it is.
bool on_board(const map_location &loc) const
Tell if a location is on the map.
bool is_village(const map_location &loc) const
const gamemap & get_map() const
Functions to load and save images from/to disk.
void adjust_surface_alpha(surface &surf, int32_t amount)
void sdl_blit(const surface &src, SDL_Rect *src_rect, surface &dst, SDL_Rect *dst_rect)