OpenTTD Source 20250312-master-gcdcc6b491d
water_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 <http://www.gnu.org/licenses/>.
6 */
7
20#define TILE_SEQ_LINE(dx, dy, dz, sx, sy, sz, img) { dx, dy, dz, sx, sy, sz, {img, PAL_NONE} },
21
27#define TILE_SPRITE_LINE(img, dtss) { {img, PAL_NONE}, dtss },
28
29static const DrawTileSeqStruct _shipdepot_display_seq_1[] = {
30 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR))
31};
32
33static const DrawTileSeqStruct _shipdepot_display_seq_2[] = {
34 TILE_SEQ_LINE( 0, 0, 0, 16, 1, 0x14, 0xFEA)
35 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR))
36};
37
38static const DrawTileSeqStruct _shipdepot_display_seq_3[] = {
39 TILE_SEQ_LINE( 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR))
40};
41
42static const DrawTileSeqStruct _shipdepot_display_seq_4[] = {
43 TILE_SEQ_LINE( 0, 0, 0, 1, 16, 0x14, 0xFEB)
44 TILE_SEQ_LINE( 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR))
45};
46
47static const DrawTileSpriteSpan _shipdepot_display_data[][DEPOT_PART_END] = {
48 { // AXIS_X
49 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_1) // DEPOT_PART_NORTH
50 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_2) // DEPOT_PART_SOUTH
51 },
52 { // AXIS_Y
53 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_3) // DEPOT_PART_NORTH
54 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_4) // DEPOT_PART_SOUTH
55 },
56};
57
58static const DrawTileSeqStruct _lock_display_seq_0[] = {
59 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 1)
60 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1)
61};
62
63static const DrawTileSeqStruct _lock_display_seq_1[] = {
64 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0)
65 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4)
66};
67
68static const DrawTileSeqStruct _lock_display_seq_2[] = {
69 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 2)
70 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2)
71};
72
73static const DrawTileSeqStruct _lock_display_seq_3[] = {
74 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0 + 3)
75 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3)
76};
77
78static const DrawTileSeqStruct _lock_display_seq_0b[] = {
79 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 1)
80 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1)
81};
82
83static const DrawTileSeqStruct _lock_display_seq_1b[] = {
84 TILE_SEQ_LINE( 0, 0, 0, 0x1, 0x10, 0x14, 8)
85 TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 12)
86};
87
88static const DrawTileSeqStruct _lock_display_seq_2b[] = {
89 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 2)
90 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2)
91};
92
93static const DrawTileSeqStruct _lock_display_seq_3b[] = {
94 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8 + 3)
95 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3)
96};
97
98static const DrawTileSeqStruct _lock_display_seq_0t[] = {
99 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 1)
100 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1)
101};
102
103static const DrawTileSeqStruct _lock_display_seq_1t[] = {
104 TILE_SEQ_LINE( 0, 0, 0, 0x1, 0x10, 0x14, 16)
105 TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 20)
106};
107
108static const DrawTileSeqStruct _lock_display_seq_2t[] = {
109 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 2)
110 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2)
111};
112
113static const DrawTileSeqStruct _lock_display_seq_3t[] = {
114 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16 + 3)
115 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3)
116};
117
118static const DrawTileSpriteSpan _lock_display_data[][DIAGDIR_END] = {
119 { // LOCK_PART_MIDDLE
120 TILE_SPRITE_LINE(1, _lock_display_seq_0) // NE
121 TILE_SPRITE_LINE(0, _lock_display_seq_1) // SE
122 TILE_SPRITE_LINE(2, _lock_display_seq_2) // SW
123 TILE_SPRITE_LINE(3, _lock_display_seq_3) // NW
124 },
125
126 { // LOCK_PART_LOWER
127 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0b) // NE
128 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1b) // SE
129 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2b) // SW
130 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3b) // NW
131 },
132
133 { // LOCK_PART_UPPER
134 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0t) // NE
135 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1t) // SE
136 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2t) // SW
137 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3t) // NW
138 },
139};
140
141#undef TILE_SEQ_LINE
142#undef TILE_SPRITE_LINE
@ DIAGDIR_END
Used for iterations.
static constexpr uint8_t PALETTE_MODIFIER_COLOUR
this bit is set when a recolouring process is in action
Definition sprites.h:1552
A tile child sprite and palette to draw for stations etc, with 3D bounding box.
Definition sprite.h:25
Ground palette sprite of a tile, together with its sprite layout.
Definition sprite.h:61
#define TILE_SPRITE_LINE(img, dtss)
Constructor macro of a DrawTileSpriteSpan structure.
Definition water_land.h:27
#define TILE_SEQ_LINE(dx, dy, dz, sx, sy, sz, img)
Constructor macro for an image without a palette in a DrawTileSeqStruct array.
Definition water_land.h:20