31 const unit *punit)
const
81 std::unique_ptr<QPixmap>
QPixmap crop_sprite(const QPixmap *sprite)
Helper function to crop a sprite.
struct player * city_owner(const struct city *pcity)
Return the owner of the city.
layer_background(struct tileset *ts)
std::vector< drawn_sprite > fill_sprite_array(const tile *ptile, const tile_edge *pedge, const tile_corner *pcorner, const unit *punit) const override
Returns the list of sprites drawn by this layer somewhere on the map.
void free_player(int player_id) override
Frees data initialized by initialize_player.
std::unique_ptr< QPixmap > create_player_sprite(const QColor &pcolor) const
Create a sprite with the given color.
std::array< std::unique_ptr< QPixmap >, MAX_NUM_PLAYER_SLOTS > m_player_background
void initialize_player(const player *player) override
Initializes data specific to one player.
A layer when drawing the map.
bool do_draw_unit(const tile *ptile, const unit *punit) const
Whether a unit should be drawn.
struct tileset * tileset() const
bool player_has_color(const struct tileset *t, const struct player *pplayer)
Return whether the player has a color assigned yet.
QColor get_player_color(const struct tileset *t, const struct player *pplayer)
Return the color of the player.
bool unit_is_in_focus(const struct unit *punit)
Return TRUE iff this unit is in focus.
client_options * gui_options
int player_index(const struct player *pplayer)
Return the player index.
bool solid_color_behind_units
Local Options:
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
int tileset_full_tile_height(const struct tileset *t)
Return the full tile height of the current tileset.
const QPixmap * get_mask_sprite(const struct tileset *t)
Return tile mask sprite.
int tileset_tile_height(const struct tileset *t)
Return the tile height of the current tileset.
int tileset_full_tile_width(const struct tileset *t)
Return the full tile width of the current tileset.
int tileset_tile_width(const struct tileset *t)
Return the tile width of the current tileset.