4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
10 /** @file water_land.h Sprites to use and how to display them for water tiles (depots/locks). */
13 * Constructor macro for an image without a palette in a DrawTileSeqStruct array.
14 * @param dx Offset in x direction
15 * @param dy Offset in y direction
16 * @param dz Offset in z direction
17 * @param sx Size in x direction
18 * @param sy Size in y direction
19 * @param sz Size in z direction
20 * @param img Sprite to draw
22 #define TILE_SEQ_LINE(dx, dy, dz, sx, sy, sz, img) { dx, dy, dz, sx, sy, sz, {img, PAL_NONE} },
24 /** Constructor macro for a terminating DrawTileSeqStruct entry in an array */
25 #define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
27 static const DrawTileSeqStruct _shipdepot_display_seq_ne
[] = {
28 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR
))
32 static const DrawTileSeqStruct _shipdepot_display_seq_sw
[] = {
33 TILE_SEQ_LINE( 0, 0, 0, 16, 1, 0x14, 0xFEA)
34 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR
))
38 static const DrawTileSeqStruct _shipdepot_display_seq_nw
[] = {
39 TILE_SEQ_LINE( 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR
))
43 static const DrawTileSeqStruct _shipdepot_display_seq_se
[] = {
44 TILE_SEQ_LINE( 0, 0, 0, 1, 16, 0x14, 0xFEB)
45 TILE_SEQ_LINE( 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR
))
49 static const DrawTileSeqStruct
*_shipdepot_display_data
[DIAGDIR_END
] = {
50 _shipdepot_display_seq_ne
, // DIAGDIR_NE
51 _shipdepot_display_seq_se
, // DIAGDIR_SE
52 _shipdepot_display_seq_sw
, // DIAGDIR_SW
53 _shipdepot_display_seq_nw
, // DIAGDIR_NW
57 static const DrawTileSeqStruct _lock_display_data
[3][DIAGDIR_END
][3] = {
60 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 1)
61 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1)
64 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0)
65 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4)
68 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 2)
69 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2)
72 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0 + 3)
73 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3)
80 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 1)
81 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1)
84 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8)
85 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12)
88 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 2)
89 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2)
92 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8 + 3)
93 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3)
100 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 1)
101 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1)
104 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16)
105 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20)
108 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 2)
109 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2)
112 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16 + 3)
113 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3)