Freeciv21
Develop your civilization from humble roots to a global empire
layer_base_flags.h
Go to the documentation of this file.
1 /*__ ___ ***************************************
2 / \ / \ Copyright (c) 2021-2023 Freeciv21 contributors.
3 \_ \ / __/ This file is part of Freeciv21.
4  _\ \ / /__ Freeciv21 is free software: you can redistribute it
5  \___ \____/ __/ and/or modify it under the terms of the GNU General
6  \_ _/ Public License as published by the Free Software
7  | @ @ \_ Foundation, either version 3 of the License,
8  | or (at your option) any later version.
9  _/ /\ You should have received a copy of the GNU
10  /o) (o/\ \_ General Public License along with Freeciv21.
11  \_____/ / If not, see https://www.gnu.org/licenses/.
12  \____/ ********************************************************/
13 #pragma once
14 
15 #include "fc_types.h"
16 #include "layer.h"
17 
18 #include <QPoint>
19 
20 namespace freeciv {
21 
22 class layer_base_flags : public layer {
23 public:
24  explicit layer_base_flags(struct tileset *ts, const QPoint &offset);
25  virtual ~layer_base_flags() = default;
26 
27  std::vector<drawn_sprite>
28  fill_sprite_array(const tile *ptile, const tile_edge *pedge,
29  const tile_corner *pcorner,
30  const unit *punit) const override;
31 
32 private:
33  QPoint m_offset;
34 };
35 
36 } // namespace freeciv
Map layer that draws flags for bases that have EF_SHOW_FLAG set.
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_base_flags(struct tileset *ts, const QPoint &offset)
virtual ~layer_base_flags()=default
A layer when drawing the map.
Definition: layer.h:153
Definition: path.cpp:10
Definition: tile.h:42
Definition: unit.h:134