![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <layer_special.h>
Inheritance diagram for freeciv::layer_special:
Collaboration diagram for freeciv::layer_special:Public Member Functions | |
| layer_special (struct tileset *ts, mapview_layer layer) | |
| virtual | ~layer_special ()=default |
| void | initialize_extra (const extra_type *extra, const QString &tag, extrastyle_id style) override |
| Loads sprites for the extra if it has ESTYLE_SINGLE1/2 or ESTYLE_3LAYER. More... | |
| void | set_sprite (const extra_type *extra, const QString &tag, const QPoint &offset=QPoint()) |
| 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. More... | |
| void | reset_ruleset () override |
| Resets cached data that depends on the ruleset. 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_terrain (const terrain *terrain) |
| Initializes terrain-specific data. More... | |
| mapview_layer | type () const |
Private Attributes | |
| std::array< std::unique_ptr< drawn_sprite >, MAX_EXTRA_TYPES > | m_sprites |
Additional Inherited Members | |
Protected Member Functions inherited from freeciv::layer | |
| struct tileset * | tileset () 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... | |
Definition at line 25 of file layer_special.h.
|
explicit |
Definition at line 22 of file layer_special.cpp.
|
virtualdefault |
|
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 66 of file layer_special.cpp.
|
overridevirtual |
Loads sprites for the extra if it has ESTYLE_SINGLE1/2 or ESTYLE_3LAYER.
Reimplemented from freeciv::layer.
Definition at line 32 of file layer_special.cpp.
|
overridevirtual |
Resets cached data that depends on the ruleset.
Reimplemented from freeciv::layer.
Definition at line 105 of file layer_special.cpp.
| void freeciv::layer_special::set_sprite | ( | const extra_type * | extra, |
| const QString & | tag, | ||
| const QPoint & | offset = QPoint() |
||
| ) |
Definition at line 54 of file layer_special.cpp.
Referenced by initialize_extra().
|
private |
Definition at line 44 of file layer_special.h.
Referenced by fill_sprite_array(), reset_ruleset(), and set_sprite().