12 #ifndef TRANSPARENCY_H 13 #define TRANSPARENCY_H company buildings - depots, stations, HQ, ...
byte _display_opt
What do we want to draw/do?
static T ToggleBit(T &x, const uint8 y)
Toggles a bit in a variable.
static T SetBit(T &x, const uint8 y)
Set a bit in a variable.
Functions related to bit mathematics.
TransparencyOptionBits _transparency_lock
Prevent these bits from flipping with X.
static void ResetRestoreAllTransparency()
Set or clear all non-locked transparency options.
static void ToggleInvisibility(TransparencyOption to)
Toggle the invisibility option bit.
Functions related to the gfx engine.
TransparencyOptionBits _transparency_opt
The bits that should be transparent.
static void ToggleTransparency(TransparencyOption to)
Toggle the transparency option bit.
static void ToggleTransparencyLock(TransparencyOption to)
Toggle the transparency lock bit.
static T ClrBit(T &x, const uint8 y)
Clears a bit in a variable.
uint TransparencyOptionBits
transparency option bits
TransparencyOptionBits _invisibility_opt
The bits that should be invisible.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
Invalid transparency option.
other objects such as transmitters and lighthouses
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
static bool IsInvisibilitySet(TransparencyOption to)
Check if the invisibility option bit is set and if we aren't in the game menu (there's never transpar...
static void ToggleInvisibilityWithTransparency(TransparencyOption to)
Toggles between invisible and solid state.
static bool IsTransparencySet(TransparencyOption to)
Check if the transparency option bit is set and if we aren't in the game menu (there's never transpar...
TransparencyOption
Transparency option bits: which position in _transparency_opt stands for which transparency.
void MarkWholeScreenDirty()
This function mark the whole screen as dirty.