OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
92 WKC_NUM_DECIMAL = 143,
157 int left, top, width, height;
166 #if defined(__EMSCRIPTEN__)
168 #elif TTD_ENDIAN == TTD_BIG_ENDIAN
182 Colour(uint8 r, uint8 g, uint8 b, uint8
a = 0xFF) :
183 #if defined(__EMSCRIPTEN__)
184 r(r), g(g), b(b),
a(
a)
186 a(
a), r(r), g(g), b(b)
188 b(b), g(g), r(r),
a(
a)
202 static_assert(
sizeof(
Colour) ==
sizeof(uint32));
223 int left, top, right, bottom;
228 COLOUR_DARK_BLUE = COLOUR_BEGIN,
245 INVALID_COLOUR = 0xFF,
252 TC_FROMSTRING = 0x00,
258 TC_LIGHT_BROWN = 0x05,
262 TC_DARK_GREEN = 0x09,
266 TC_LIGHT_BLUE = 0x0D,
@ WKC_SINGLEQUOTE
' Single quote
@ TC_FORCED
Ignore colour changes from strings.
Colour(uint data=0)
Create a new colour.
@ PAL_DOS
Use the DOS palette.
int first_dirty
The first dirty element.
@ SA_HOR_MASK
Mask for horizontal alignment.
Collection of variables for cursor-display and -animation.
uint32 data
Conversion of the channel information to a 32 bit number.
const AnimCursor * animate_cur
in case of animated cursor, current frame
@ ST_FONT
A sprite used for fonts.
uint sprite_count
number of sprites to draw
bool dirty
the rect occupied by the mouse is dirty (redraw)
@ MAX_PAL
The number of palettes.
@ PALETTE_ANIM_SIZE
number of animated colours
bool vehchain
vehicle chain is dragged
bool visible
cursor is visible
@ FILLRECT_RECOLOUR
Apply a recolour sprite to the screen content.
const AnimCursor * animate_list
in case of animated cursor, list of frames
Support8bpp
Modes for 8bpp support.
@ WKC_SLASH
/ Forward slash
SpriteID sprite
The 'real' sprite.
PaletteType
Palettes OpenTTD supports.
@ WKC_BACKSLASH
\ Backslash
@ FS_LARGE
Index of the large font in the font tables.
@ WKC_L_BRACKET
[ Left square bracket
@ FILLRECT_CHECKER
Draw only every second pixel, used for greying-out.
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
ZoomLevel
All zoom levels we know.
@ SA_BOTTOM
Bottom align the text.
StringAlignment
How to align the to-be drawn text.
FillRectMode
Define the operation GfxFillRect performs.
@ ST_NORMAL
The most basic (normal) sprite.
void UpdateCursorPositionRelative(int delta_x, int delta_y)
Update cursor position on mouse movement for relative modes.
@ SA_RIGHT
Right align the text (must be a single bit).
@ SA_VERT_CENTER
Vertically center the text.
Colour(uint8 r, uint8 g, uint8 b, uint8 a=0xFF)
Create a new colour.
Point draw_size
position and size bounding-box for drawing
Used to only draw a part of the sprite.
Point sprite_pos[16]
relative position of individual sprites
#define TTD_BIG_ENDIAN
Big endian builds use this for TTD_ENDIAN.
@ ST_INVALID
Pseudosprite or other unusable sprite, used only internally.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Informative template class exposing basic enumeration properties used by several other templates belo...
@ WKC_GLOBAL_HOTKEY
Fake keycode bit to indicate global hotkeys.
uint32 CursorID
The number of the cursor (sprite)
@ FS_NORMAL
Index of the normal font in the font tables.
@ SA_TOP
Top align the text.
@ S8BPP_NONE
No support for 8bpp by OS or hardware, force 32bpp blitters.
bool UpdateCursorPosition(int x, int y, bool queued_warp)
Update cursor position on mouse movement.
@ PAL_AUTODETECT
Automatically detect the palette based on the graphics pack.
Colour palette[256]
Current palette. Entry 0 has to be always fully transparent!
@ FS_SMALL
Index of the small font in the font tables.
@ TC_IS_PALETTE_COLOUR
Colour value is already a real palette colour index, not an index of a StringColour.
@ SA_FORCE
Force the alignment, i.e. don't swap for RTL languages.
Point total_size
union of sprite properties
CursorID sprite
Must be set to LAST_ANIM when it is the last sprite of the loop.
bool fix_at
mouse is moving, but cursor is not (used for scrolling)
@ TC_NO_SHADE
Do not add shading to this text colour.
int wheel
mouse wheel movement
Coordinates of a point in 2D.
int count_dirty
The number of dirty elements.
@ SA_HOR_CENTER
Horizontally center the text.
@ PALETTE_ANIM_START
Index in the _palettes array from which all animations are taking places (table/palettes....
@ FILLRECT_OPAQUE
Fill rectangle with a single colour.
Structure to access the alpha, red, green, and blue channels from a 32 bit number.
@ WKC_R_BRACKET
] Right square bracket
@ S8BPP_HARDWARE
Full 8bpp support by OS and hardware.
uint animate_timeout
in case of animated cursor, number of ticks to show the current cursor
@ SA_VERT_MASK
Mask for vertical alignment.
uint8 a
colour channels in LE order
uint32 PaletteID
The number of the palette.
SpriteType
Types of sprites that might be loaded.
byte display_time
Amount of ticks this sprite will be shown.
Point delta
relative mouse movement in this tick
#define MAX_UVALUE(type)
The largest value that can be entered in a variable.
Combination of a palette sprite and a 'real' sprite.
A single sprite of a list of animated cursors.
@ WKC_SEMICOLON
; Semicolon
Helper template class that makes basic properties of given enumeration type visible from outsize.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
@ SA_LEFT
Left align the text.
static const uint MILLISECONDS_PER_TICK
The number of milliseconds per game tick.
@ SA_CENTER
Center both horizontally and vertically.
PalSpriteID sprite_seq[16]
current image of cursor
@ FS_MONO
Index of the monospaced font in the font tables.
PaletteID pal
The palette (use PAL_NONE) if not needed)
FontSize
Available font sizes.
@ ST_RECOLOUR
Recolour sprite.
@ PAL_WINDOWS
Use the Windows palette.
PaletteAnimationSizes
Defines a few values that are related to animations using palette changes.
Point pos
logical mouse position
Information about the currently used palette.
bool in_window
mouse inside this window, determines drawing logic
@ ST_MAPGEN
Special sprite for the map generator.
Data about how and where to blit pixels.
@ S8BPP_SYSTEM
No 8bpp support by hardware, do not try to use 8bpp video modes or hardware palettes.