Freeciv21
Develop your civilization from humble roots to a global empire
freeciv::layer_base_flags Class Reference

Map layer that draws flags for bases that have EF_SHOW_FLAG set. More...

#include <layer_base_flags.h>

+ Inheritance diagram for freeciv::layer_base_flags:
+ Collaboration diagram for freeciv::layer_base_flags:

Public Member Functions

 layer_base_flags (struct tileset *ts, const QPoint &offset)
 
virtual ~layer_base_flags ()=default
 
std::vector< drawn_spritefill_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. More...
 
- Public Member Functions inherited from freeciv::layer
 layer (struct tileset *ts, mapview_layer layer)
 Constructor. More...
 
virtual ~layer ()=default
 Destructor. More...
 
virtual void load_sprites ()
 Loads all sprites that do not depend on the ruleset. More...
 
virtual void initialize_player (const player *player)
 Initializes data specific to one player. More...
 
virtual void free_player (int player_id)
 Frees data initialized by initialize_player. More...
 
virtual void initialize_city_style (const citystyle &style, int index)
 Initializes data for a city style. More...
 
virtual void initialize_extra (const extra_type *extra, const QString &tag, extrastyle_id style)
 Initializes extra-specific data. More...
 
virtual void initialize_terrain (const terrain *terrain)
 Initializes terrain-specific data. More...
 
virtual void reset_ruleset ()
 Resets cached data that depends on the ruleset. More...
 
mapview_layer type () const
 

Private Attributes

QPoint m_offset
 

Additional Inherited Members

- Protected Member Functions inherited from freeciv::layer
struct tilesettileset () const
 
bool do_draw_unit (const tile *ptile, const unit *punit) const
 Whether a unit should be drawn. More...
 
bool solid_background (const tile *ptile, const unit *punit, const city *pcity) const
 Whether a solid background should be drawn on a tile instead of its terrain. More...
 
QPixmap * load_sprite (const QStringList &possible_names, bool required=false, bool verbose=true) const
 Shortcut to load a sprite from the tileset. More...
 

Detailed Description

Map layer that draws flags for bases that have EF_SHOW_FLAG set.

Definition at line 22 of file layer_base_flags.h.

Constructor & Destructor Documentation

◆ layer_base_flags()

freeciv::layer_base_flags::layer_base_flags ( struct tileset ts,
const QPoint &  offset 
)
explicit

Definition at line 29 of file layer_base_flags.cpp.

◆ ~layer_base_flags()

virtual freeciv::layer_base_flags::~layer_base_flags ( )
virtualdefault

Member Function Documentation

◆ fill_sprite_array()

std::vector< drawn_sprite > freeciv::layer_base_flags::fill_sprite_array ( const tile ptile,
const tile_edge pedge,
const tile_corner pcorner,
const unit punit 
) const
overridevirtual

Returns the list of sprites drawn by this layer somewhere on the map.

Only one of ptile, pedge, or pcorner should be non-null.

Reimplemented from freeciv::layer.

Definition at line 34 of file layer_base_flags.cpp.

Member Data Documentation

◆ m_offset

QPoint freeciv::layer_base_flags::m_offset
private

Definition at line 33 of file layer_base_flags.h.

Referenced by fill_sprite_array().