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