Let HandleWindowDragging return a boolean status
[openttd/fttd.git] / src / table / water_land.h
blob63a2d031a46136607c82ef2c3438c71dec2b7e45
1 /* $Id$ */
3 /*
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/>.
8 */
10 /** @file water_land.h Sprites to use and how to display them for water tiles (depots/locks). */
12 /**
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))
29 TILE_SEQ_END()
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))
35 TILE_SEQ_END()
38 static const DrawTileSeqStruct _shipdepot_display_seq_nw[] = {
39 TILE_SEQ_LINE( 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR))
40 TILE_SEQ_END()
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))
46 TILE_SEQ_END()
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] = {
58 { // LOCK_PART_MIDDLE
59 { // NE
60 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 1)
61 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1)
62 TILE_SEQ_END()
63 }, { // SE
64 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0)
65 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4)
66 TILE_SEQ_END()
67 }, { // SW
68 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 2)
69 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2)
70 TILE_SEQ_END()
71 }, { // NW
72 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0 + 3)
73 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3)
74 TILE_SEQ_END()
78 { // LOCK_PART_LOWER
79 { // NE
80 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 1)
81 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1)
82 TILE_SEQ_END()
83 }, { // SE
84 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8)
85 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12)
86 TILE_SEQ_END()
87 }, { // SW
88 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 2)
89 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2)
90 TILE_SEQ_END()
91 }, { // NW
92 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8 + 3)
93 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3)
94 TILE_SEQ_END()
98 { // LOCK_PART_UPPER
99 { // NE
100 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 1)
101 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1)
102 TILE_SEQ_END()
103 }, { // SE
104 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16)
105 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20)
106 TILE_SEQ_END()
107 }, { // SW
108 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 2)
109 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2)
110 TILE_SEQ_END()
111 }, { // NW
112 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16 + 3)
113 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3)
114 TILE_SEQ_END()
119 #undef TILE_SEQ_LINE
120 #undef TILE_SEQ_END