OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef TRANSPARENCY_H
11 #define TRANSPARENCY_H
static void ResetRestoreAllTransparency()
Set or clear all non-locked transparency options.
@ TO_HOUSES
town buildings
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
@ TO_BUILDINGS
company buildings - depots, stations, HQ, ...
TransparencyOptionBits _transparency_opt
The bits that should be transparent.
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...
@ TO_LOADING
loading indicators
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
static T ClrBit(T &x, const uint8 y)
Clears a bit in a variable.
static void ToggleInvisibilityWithTransparency(TransparencyOption to)
Toggles between invisible and solid state.
byte _display_opt
What do we want to draw/do?
@ TO_INVALID
Invalid transparency option.
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...
uint TransparencyOptionBits
transparency option bits
TransparencyOptionBits _transparency_lock
Prevent these bits from flipping with X.
static void ToggleInvisibility(TransparencyOption to)
Toggle the invisibility option bit.
@ TO_INDUSTRIES
industries
TransparencyOption
Transparency option bits: which position in _transparency_opt stands for which transparency.
@ TO_STRUCTURES
other objects such as transmitters and lighthouses
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.
void MarkWholeScreenDirty()
This function mark the whole screen as dirty.
static void ToggleTransparency(TransparencyOption to)
Toggle the transparency option bit.
static void ToggleTransparencyLock(TransparencyOption to)
Toggle the transparency lock bit.
TransparencyOptionBits _invisibility_opt
The bits that should be invisible.