43 if (_game_mode == GM_MENU)
return INVALID_TE_ID;
67 void UpdateTextEffect(TextEffectID te_id,
StringID msg)
79 void RemoveTextEffect(TextEffectID te_id)
84 void MoveAllTextEffects(uint delta_ms)
88 if (count == 0)
return;
94 if (te.duration < count) {
100 te.duration -= count;
101 te.top -= count * ZOOM_LVL_BASE;
106 void InitTextEffects()
Functions related to OTTD's strings.
uint64 params_2
second DParam parameter
Data about how and where to blit pixels.
uint CountElapsed(uint delta)
Count how many times the interval has elapsed.
Simple vector class that allows allocating an item without the need to copy this->data needlessly...
StringID string_id
String to draw for the text effect, if INVALID_STRING_ID then it's not valid.
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
void MarkDirty(ZoomLevel maxzoom=ZOOM_LVL_MAX) const
Mark the sign dirty in all viewports.
Functions related to (drawing on) viewports.
int32 top
The top of the sign.
uint64 params_1
DParam parameter.
ClientSettings _settings_client
The current settings for this game.
Types related to global configuration settings.
Definition of base types and functions in a cross-platform compatible way.
Location information about a sign as seen on the viewport.
TextEffectMode mode
Type of text effect.
A number of safeguards to prevent using unsafe methods.
static const uint MILLISECONDS_PER_TICK
The number of milliseconds per game tick.
uint16 width_normal
The width when not zoomed out (normal font)
uint32 StringID
Numeric value that represents a string, independent of the selected language.
int32 center
The center position of the sign.
GUISettings gui
settings related to the GUI
static uint64 GetDParam(uint n)
Get the current string parameter at index n from the global string parameter array.
Functions related to transparency.
void Reset()
Reset the text effect.
uint8 loading_indicators
show loading indicators
Make the text effect slowly go upwards.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
void ViewportAddString(const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2, Colours colour)
Add a string to draw in the viewport.
Functions related to text effects.
uint8 duration
How long the text effect should stay, in ticks (applies only when mode == TE_RISING) ...
TextEffectMode
Text effect modes.
Container for all information about a text effect.
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...
static std::vector< struct TextEffect > _text_effects
Text effects are stored there.