Cytopia
0.3
A city building simulation game
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
e
g
i
m
n
p
r
s
t
u
v
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Functions
b
c
d
f
g
i
m
o
p
r
s
t
w
Variables
a
c
d
g
h
i
l
m
n
r
s
t
Typedefs
a
c
d
e
f
g
i
j
l
m
n
r
s
t
v
Enumerations
Enumerator
a
b
d
e
f
g
l
m
n
p
r
s
t
u
w
z
Macros
_
c
e
i
l
n
r
s
t
v
Examples
▼
Cytopia
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
▼
engine
►
audio
►
basics
►
common
►
GameObjects
▼
map
MapFunctions.cxx
►
MapFunctions.hxx
MapLayers.cxx
►
MapLayers.hxx
►
TerrainGenerator.cxx
►
TerrainGenerator.hxx
EventManager.cxx
►
EventManager.hxx
►
Layout.hxx
►
Map.cxx
►
Map.hxx
►
MessageQueue.hxx
MessageQueue.inl.hxx
►
ResourcesManager.cxx
►
ResourcesManager.hxx
Sprite.cxx
►
Sprite.hxx
►
TileManager.cxx
►
TileManager.hxx
►
UIManager.cxx
►
UIManager.hxx
WindowManager.cxx
►
WindowManager.hxx
►
game
►
scripting
►
services
►
util
►
windows
Game.cxx
►
Game.hxx
►
main.cxx
►
MainMenu.cxx
►
MainMenu.hxx
phc.hxx
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MapLayers.hxx
Go to the documentation of this file.
1
#ifndef MAP_LAYERS_HXX_
2
#define MAP_LAYERS_HXX_
3
4
#include "../common/enums.hxx"
5
#include <vector>
6
7
class
MapLayers
8
{
9
public
:
14
static
void
enableLayers
(std::vector<unsigned int> &&layers);
15
21
static
inline
void
disableLayer
(
unsigned
int
layer) {
m_activeLayers
&= ~(1U << layer); };
22
28
static
inline
void
toggleLayer
(
unsigned
int
layer) {
m_activeLayers
^= (1U << layer); };
29
34
static
inline
bool
isLayerActive
(
unsigned
int
layer) {
return
(
m_activeLayers
& (1U << layer)); };
35
36
static
void
setLayerEditMode
(
LayerEditMode
layerEditMode);
37
38
private
:
39
MapLayers
() =
default
;
40
~MapLayers
() =
default
;
41
42
static
unsigned
int
m_activeLayers
;
43
44
static
inline
void
deactivateAllLayers
()
45
{
46
for
(
auto
layer :
allLayersOrdered
)
47
{
48
disableLayer
(layer);
49
}
50
};
51
};
52
53
#endif
MapLayers::setLayerEditMode
static void setLayerEditMode(LayerEditMode layerEditMode)
Definition:
MapLayers.cxx:7
MapLayers::enableLayers
static void enableLayers(std::vector< unsigned int > &&layers)
Enable drawing layers.
Definition:
MapLayers.cxx:26
MapLayers
Definition:
MapLayers.hxx:7
MapLayers::m_activeLayers
static unsigned int m_activeLayers
Definition:
MapLayers.hxx:42
MapLayers::toggleLayer
static void toggleLayer(unsigned int layer)
Toggle Drawing Layer.
Definition:
MapLayers.hxx:28
MapLayers::disableLayer
static void disableLayer(unsigned int layer)
Disable Drawing Layer.
Definition:
MapLayers.hxx:21
MapLayers::~MapLayers
~MapLayers()=default
MapLayers::isLayerActive
static bool isLayerActive(unsigned int layer)
Check if given Layer is being drawn.
Definition:
MapLayers.hxx:34
LayerEditMode
LayerEditMode
This enum is for switching between layers.
Definition:
enums.hxx:45
MapLayers::deactivateAllLayers
static void deactivateAllLayers()
Definition:
MapLayers.hxx:44
allLayersOrdered
static Layer allLayersOrdered[]
This is a ordered list of all relevant layers we need to interact with.
Definition:
enums.hxx:29
MapLayers::MapLayers
MapLayers()=default
src
engine
map
MapLayers.hxx
Generated on Sun Nov 27 2022 09:50:52 for Cytopia by
1.8.17