22 using styles = std::vector<std::unique_ptr<freeciv::colorizer>>;
27 const QPoint &city_flag_offset,
28 const QPoint &occupied_offset);
35 std::vector<drawn_sprite>
38 const unit *punit)
const override;
40 std::vector<drawn_sprite>
62 std::array<city_sprite, NUM_WALL_TYPES>
m_walls;
layer_city::styles load_city_size_sprites(const QString &tag, const citystyle &style)
Loads a set of size-dependent city sprites, with tags of the form graphic_tag_size.
constexpr static int NUM_WALL_TYPES
std::vector< std::unique_ptr< freeciv::colorizer > > styles
void initialize_city_style(const citystyle &style, int index) override
Loads all sprites for a city style.
std::array< city_sprite, NUM_WALL_TYPES > m_walls
QPixmap sample_sprite(int style_index=0) const
Returns an example of what a city might look like.
std::vector< styles > city_sprite
QPoint m_city_flag_offset
layer_city(struct tileset *ts, const QPoint &city_offset, const QPoint &city_flag_offset, const QPoint &occupied_offset)
void reset_ruleset() override
All sprites depend on the ruleset-defined city styles and need to be reset.
city_sprite m_single_wall
virtual ~layer_city()=default
void load_sprites() override
Loads the disorder and happy sprites.
std::vector< drawn_sprite > fill_sprite_array_no_flag(const city *pcity, bool show_occupied) const
Fill in the given sprite array with any city sprites.
std::vector< drawn_sprite > fill_sprite_array(const tile *ptile, const tile_edge *pedge, const tile_corner *pcorner, const unit *punit) const override
Fill in the given sprite array with any needed city sprites.
A layer when drawing the map.
int style_index(const struct nation_style *pstyle)
Return the style index.