(svn r27707) -Fix: Make the result of NewGRF's CARGO_NAME string code reliably print...
[openttd.git] / src / table / water_land.h
blobd3cb0a3f98ac83e876223d5978414b7c0b4e31af
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 /**
28 * Constructor macro of a DrawTileSprites structure
29 * @param img Ground sprite without palette of the tile
30 * @param dtss Sequence child sprites of the tile
32 #define TILE_SPRITE_LINE(img, dtss) { {img, PAL_NONE}, dtss },
34 static const DrawTileSeqStruct _shipdepot_display_seq_1[] = {
35 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR))
36 TILE_SEQ_END()
39 static const DrawTileSeqStruct _shipdepot_display_seq_2[] = {
40 TILE_SEQ_LINE( 0, 0, 0, 16, 1, 0x14, 0xFEA)
41 TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR))
42 TILE_SEQ_END()
45 static const DrawTileSeqStruct _shipdepot_display_seq_3[] = {
46 TILE_SEQ_LINE( 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR))
47 TILE_SEQ_END()
50 static const DrawTileSeqStruct _shipdepot_display_seq_4[] = {
51 TILE_SEQ_LINE( 0, 0, 0, 1, 16, 0x14, 0xFEB)
52 TILE_SEQ_LINE( 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR))
53 TILE_SEQ_END()
56 static const DrawTileSprites _shipdepot_display_data[][DEPOT_PART_END] = {
57 { // AXIS_X
58 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_1) // DEPOT_PART_NORTH
59 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_2) // DEPOT_PART_SOUTH
61 { // AXIS_Y
62 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_3) // DEPOT_PART_NORTH
63 TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_4) // DEPOT_PART_SOUTH
67 static const DrawTileSeqStruct _lock_display_seq_0[] = {
68 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 1)
69 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1)
70 TILE_SEQ_END()
73 static const DrawTileSeqStruct _lock_display_seq_1[] = {
74 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0)
75 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4)
76 TILE_SEQ_END()
79 static const DrawTileSeqStruct _lock_display_seq_2[] = {
80 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 0 + 2)
81 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2)
82 TILE_SEQ_END()
85 static const DrawTileSeqStruct _lock_display_seq_3[] = {
86 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 0 + 3)
87 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3)
88 TILE_SEQ_END()
91 static const DrawTileSeqStruct _lock_display_seq_0b[] = {
92 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 1)
93 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1)
94 TILE_SEQ_END()
97 static const DrawTileSeqStruct _lock_display_seq_1b[] = {
98 TILE_SEQ_LINE( 0, 0, 0, 0x1, 0x10, 0x14, 8)
99 TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 12)
100 TILE_SEQ_END()
103 static const DrawTileSeqStruct _lock_display_seq_2b[] = {
104 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 8 + 2)
105 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2)
106 TILE_SEQ_END()
109 static const DrawTileSeqStruct _lock_display_seq_3b[] = {
110 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 8 + 3)
111 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3)
112 TILE_SEQ_END()
115 static const DrawTileSeqStruct _lock_display_seq_0t[] = {
116 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 1)
117 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1)
118 TILE_SEQ_END()
121 static const DrawTileSeqStruct _lock_display_seq_1t[] = {
122 TILE_SEQ_LINE( 0, 0, 0, 0x1, 0x10, 0x14, 16)
123 TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 20)
124 TILE_SEQ_END()
127 static const DrawTileSeqStruct _lock_display_seq_2t[] = {
128 TILE_SEQ_LINE( 0, 0, 0, 0x10, 1, 0x14, 16 + 2)
129 TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2)
130 TILE_SEQ_END()
133 static const DrawTileSeqStruct _lock_display_seq_3t[] = {
134 TILE_SEQ_LINE( 0, 0, 0, 1, 0x10, 0x14, 16 + 3)
135 TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3)
136 TILE_SEQ_END()
139 static const DrawTileSprites _lock_display_data[][DIAGDIR_END] = {
140 { // LOCK_PART_MIDDLE
141 TILE_SPRITE_LINE(1, _lock_display_seq_0) // NE
142 TILE_SPRITE_LINE(0, _lock_display_seq_1) // SE
143 TILE_SPRITE_LINE(2, _lock_display_seq_2) // SW
144 TILE_SPRITE_LINE(3, _lock_display_seq_3) // NW
147 { // LOCK_PART_LOWER
148 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0b) // NE
149 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1b) // SE
150 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2b) // SW
151 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3b) // NW
154 { // LOCK_PART_UPPER
155 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0t) // NE
156 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1t) // SE
157 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2t) // SW
158 TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3t) // NW
162 #undef TILE_SEQ_LINE
163 #undef TILE_SEQ_END
164 #undef TILE_SPRITE_LINE