OpenTTD Source: src/table/track_land.h Source File

OpenTTD Source 15.3

track_land.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#define TILE_SEQ_LINE(img, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 23, {img, PAL_NONE} },
11
12
13static const DrawTileSeqStruct _depot_gfx_NE[] = {
14 TILE_SEQ_LINE(SPR_RAIL_DEPOT_NE | (1 << PALETTE_MODIFIER_COLOUR), 2, 13, 13, 1)
15};
16
17static const DrawTileSeqStruct _depot_gfx_SE[] = {
18 TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_1 | (1 << PALETTE_MODIFIER_COLOUR), 2, 2, 1, 13)
19 TILE_SEQ_LINE(SPR_RAIL_DEPOT_SE_2 | (1 << PALETTE_MODIFIER_COLOUR), 13, 2, 1, 13)
20};
21
22static const DrawTileSeqStruct _depot_gfx_SW[] = {
23 TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_1 | (1 << PALETTE_MODIFIER_COLOUR), 2, 2, 13, 1)
24 TILE_SEQ_LINE(SPR_RAIL_DEPOT_SW_2 | (1 << PALETTE_MODIFIER_COLOUR), 2, 13, 13, 1)
25};
26
27static const DrawTileSeqStruct _depot_gfx_NW[] = {
28 TILE_SEQ_LINE(SPR_RAIL_DEPOT_NW | (1 << PALETTE_MODIFIER_COLOUR), 13, 2, 1, 13)
29};
30
31static const DrawTileSpriteSpan _depot_gfx_table[] = {
32 { {SPR_FLAT_GRASS_TILE, PAL_NONE}, _depot_gfx_NE },
33 { {SPR_RAIL_TRACK_Y, PAL_NONE}, _depot_gfx_SE },
34 { {SPR_RAIL_TRACK_X, PAL_NONE}, _depot_gfx_SW },
35 { {SPR_FLAT_GRASS_TILE, PAL_NONE}, _depot_gfx_NW }
36};
37
38static const DrawTileSpriteSpan _depot_invisible_gfx_table[] = {
39 { {SPR_RAIL_TRACK_X, PAL_NONE}, _depot_gfx_NE },
40 { {SPR_RAIL_TRACK_Y, PAL_NONE}, _depot_gfx_SE },
41 { {SPR_RAIL_TRACK_X, PAL_NONE}, _depot_gfx_SW },
42 { {SPR_RAIL_TRACK_Y, PAL_NONE}, _depot_gfx_NW }
43};
44
45#undef TILE_SEQ_LINE
PALETTE_MODIFIER_COLOUR
static constexpr uint8_t PALETTE_MODIFIER_COLOUR
this bit is set when a recolouring process is in action
Definition sprites.h:1562
DrawTileSeqStruct
A tile child sprite and palette to draw for stations etc, with 3D bounding box.
Definition sprite.h:33
DrawTileSpriteSpan
Ground palette sprite of a tile, together with its sprite layout.
Definition sprite.h:67