OpenTTD Source 20260311-master-g511d3794ce
autorail.h File Reference

Highlight/sprite information for autorail. More...

Go to the source code of this file.

Macros

#define RED(c)
 Mark invalid tiles red.

Variables

static const int _AutorailTilehSprite [][6]
 Table maps each of the six rail directions and tileh combinations to a sprite.
static const HighLightStyle _autorail_piece [][16]
 Maps each pixel of a tile (16x16) to a selection type (0,0) is the top corner, (16,16) the bottom corner.

Detailed Description

Highlight/sprite information for autorail.

Definition in file autorail.h.

Macro Definition Documentation

◆ RED

#define RED ( c)
Value:
-c

Mark invalid tiles red.

Definition at line 19 of file autorail.h.

Variable Documentation

◆ _autorail_piece

const HighLightStyle _autorail_piece[][16]
static
Initial value:
= {
}
@ HT_DIR_HL
horizontal lower
@ HT_DIR_HU
horizontal upper
@ HT_DIR_X
X direction.
@ HT_DIR_VL
vertical left
@ HT_DIR_VR
vertical right
@ HT_DIR_Y
Y direction.

Maps each pixel of a tile (16x16) to a selection type (0,0) is the top corner, (16,16) the bottom corner.

Definition at line 63 of file autorail.h.

Referenced by GetAutorailHT().

◆ _AutorailTilehSprite

const int _AutorailTilehSprite[][6]
static

Table maps each of the six rail directions and tileh combinations to a sprite.

Invalid entries are required to make sure that this array can be quickly accessed.

Definition at line 25 of file autorail.h.

Referenced by DrawAutorailSelection().