openMSX
Layer.cc
Go to the documentation of this file.
1 #include "Layer.hh"
2 #include "LayerListener.hh"
3 
4 namespace openmsx {
5 
7 {
8  z = z_;
9  if (display) display->updateZ(*this);
10 }
11 
12 
13 // class ScopedLayerHider
14 
16  : layer(layer_)
17  , originalCoverage(layer.getCoverage())
18 {
20 }
21 
23 {
24  layer.setCoverage(originalCoverage);
25 }
26 
27 } // namespace openmsx
Layer is not visible, that is completely transparent.
Definition: Layer.hh:39
void setCoverage(Coverage coverage_)
Changes the current coverage of this layer.
Definition: Layer.hh:70
Interface for display layers.
Definition: Layer.hh:11
void setZ(ZIndex z)
Changes the current Z-index of this layer.
Definition: Layer.cc:6
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Coverage getCoverage() const
Query the coverage of this layer.
Definition: Layer.hh:54
virtual void updateZ(Layer &layer)=0
ZIndex
Determines stacking order of layers: layers with higher Z-indices are closer to the viewer...
Definition: Layer.hh:17
ScopedLayerHider(Layer &layer)
Definition: Layer.cc:15