water_land.h

Go to the documentation of this file.
00001 /* $Id: water_land.h 22646 2011-07-10 13:04:04Z frosch $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * 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.
00006  * 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.
00007  * 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/>.
00008  */
00009 
00022 #define TILE_SEQ_LINE(dx, dy, dz, sx, sy, sz, img) { dx, dy, dz, sx, sy, sz, {img, PAL_NONE} },
00023 
00025 #define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
00026 
00032 #define TILE_SPRITE_LINE(img, dtss) { {img, PAL_NONE}, dtss },
00033 
00034 static const DrawTileSeqStruct _shipdepot_display_seq_1[] = {
00035   TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR))
00036   TILE_SEQ_END()
00037 };
00038 
00039 static const DrawTileSeqStruct _shipdepot_display_seq_2[] = {
00040   TILE_SEQ_LINE( 0,  0, 0, 16, 1, 0x14, 0xFEA)
00041   TILE_SEQ_LINE( 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR))
00042   TILE_SEQ_END()
00043 };
00044 
00045 static const DrawTileSeqStruct _shipdepot_display_seq_3[] = {
00046   TILE_SEQ_LINE( 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR))
00047   TILE_SEQ_END()
00048 };
00049 
00050 static const DrawTileSeqStruct _shipdepot_display_seq_4[] = {
00051   TILE_SEQ_LINE(  0, 0, 0, 1, 16, 0x14, 0xFEB)
00052   TILE_SEQ_LINE( 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR))
00053   TILE_SEQ_END()
00054 };
00055 
00056 static const DrawTileSprites _shipdepot_display_data[][DEPOT_PART_END] = {
00057   { // AXIS_X
00058     TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_1) // DEPOT_PART_NORTH
00059     TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_2) // DEPOT_PART_SOUTH
00060   },
00061   { // AXIS_Y
00062     TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_3) // DEPOT_PART_NORTH
00063     TILE_SPRITE_LINE(0xFDD, _shipdepot_display_seq_4) // DEPOT_PART_SOUTH
00064   },
00065 };
00066 
00067 static const DrawTileSeqStruct _lock_display_seq_0[] = {
00068   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 0 + 1)
00069   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1)
00070   TILE_SEQ_END()
00071 };
00072 
00073 static const DrawTileSeqStruct _lock_display_seq_1[] = {
00074   TILE_SEQ_LINE(   0, 0, 0, 1, 0x10, 0x14, 0)
00075   TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4)
00076   TILE_SEQ_END()
00077 };
00078 
00079 static const DrawTileSeqStruct _lock_display_seq_2[] = {
00080   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 0 + 2)
00081   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2)
00082   TILE_SEQ_END()
00083 };
00084 
00085 static const DrawTileSeqStruct _lock_display_seq_3[] = {
00086   TILE_SEQ_LINE(   0, 0, 0, 1, 0x10, 0x14, 0 + 3)
00087   TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3)
00088   TILE_SEQ_END()
00089 };
00090 
00091 static const DrawTileSeqStruct _lock_display_seq_0b[] = {
00092   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 8 + 1)
00093   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1)
00094   TILE_SEQ_END()
00095 };
00096 
00097 static const DrawTileSeqStruct _lock_display_seq_1b[] = {
00098   TILE_SEQ_LINE(   0, 0, 0, 0x1, 0x10, 0x14, 8)
00099   TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 12)
00100   TILE_SEQ_END()
00101 };
00102 
00103 static const DrawTileSeqStruct _lock_display_seq_2b[] = {
00104   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 8 + 2)
00105   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2)
00106   TILE_SEQ_END()
00107 };
00108 
00109 static const DrawTileSeqStruct _lock_display_seq_3b[] = {
00110   TILE_SEQ_LINE(   0, 0, 0, 1, 0x10, 0x14, 8 + 3)
00111   TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3)
00112   TILE_SEQ_END()
00113 };
00114 
00115 static const DrawTileSeqStruct _lock_display_seq_0t[] = {
00116   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 16 + 1)
00117   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1)
00118   TILE_SEQ_END()
00119 };
00120 
00121 static const DrawTileSeqStruct _lock_display_seq_1t[] = {
00122   TILE_SEQ_LINE(   0, 0, 0, 0x1, 0x10, 0x14, 16)
00123   TILE_SEQ_LINE( 0xF, 0, 0, 0x1, 0x10, 0x14, 20)
00124   TILE_SEQ_END()
00125 };
00126 
00127 static const DrawTileSeqStruct _lock_display_seq_2t[] = {
00128   TILE_SEQ_LINE( 0,   0, 0, 0x10, 1, 0x14, 16 + 2)
00129   TILE_SEQ_LINE( 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2)
00130   TILE_SEQ_END()
00131 };
00132 
00133 static const DrawTileSeqStruct _lock_display_seq_3t[] = {
00134   TILE_SEQ_LINE(   0, 0, 0, 1, 0x10, 0x14, 16 + 3)
00135   TILE_SEQ_LINE( 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3)
00136   TILE_SEQ_END()
00137 };
00138 
00139 static const DrawTileSprites _lock_display_data[][DIAGDIR_END] = {
00140   { // LOCK_PART_MIDDLE
00141     TILE_SPRITE_LINE(1, _lock_display_seq_0) // NE
00142     TILE_SPRITE_LINE(0, _lock_display_seq_1) // SE
00143     TILE_SPRITE_LINE(2, _lock_display_seq_2) // SW
00144     TILE_SPRITE_LINE(3, _lock_display_seq_3) // NW
00145   },
00146 
00147   { // LOCK_PART_LOWER
00148     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0b) // NE
00149     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1b) // SE
00150     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2b) // SW
00151     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3b) // NW
00152   },
00153 
00154   { // LOCK_PART_UPPER
00155     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_0t) // NE
00156     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_1t) // SE
00157     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_2t) // SW
00158     TILE_SPRITE_LINE(0xFDD, _lock_display_seq_3t) // NW
00159   },
00160 };
00161 
00162 #undef TILE_SEQ_LINE
00163 #undef TILE_SEQ_END
00164 #undef TILE_SPRITE_LINE