15 darkness_style darkness)
16 :
freeciv::
layer(ts, LAYER_FOG), m_style(style), m_darkness(darkness)
25 for (
int i = 0; i < 81 ; i++) {
27 const QChar ids[] = {
'u',
'f',
'k'};
28 auto buf = QStringLiteral(
"t.fog");
31 for (
int vi = 0; vi < 4; vi++) {
35 buf += QStringLiteral(
"_") + ids[values[vi]];
44 std::vector<drawn_sprite>
47 const unit *punit)
const
49 std::vector<drawn_sprite> sprs;
60 for (
int i = 3; i >= 0; i--) {
61 const int unknown = 0, fogged = 1, known = 2;
64 if (!pcorner->
tile[i]) {
81 tileno = tileno * 3 + value;
void load_sprites() override
Loads all sprites that do not depend on the ruleset.
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.
layer_fog(struct tileset *ts, fog_style style, darkness_style darkness)
darkness_style m_darkness
std::vector< QPixmap * > m_darkness_sprites
A layer when drawing the map.
QPixmap * load_sprite(const QStringList &possible_names, bool required=false, bool verbose=true) const
Shortcut to load a sprite from the tileset.
struct tileset * tileset() const
enum known_type client_tile_get_known(const struct tile *ptile)
A tile's "known" field is used by the server to store whether each player knows the tile.
#define fc_assert(condition)
client_options * gui_options
const struct tile * tile[NUM_CORNER_TILES]