water_land.h

Go to the documentation of this file.
00001 /* $Id: water_land.h 22991 2011-10-04 20:06:23Z rubidium $ */
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 
00012 struct WaterDrawTileStruct {
00013   byte delta_x;
00014   byte delta_y;
00015   byte delta_z;
00016   byte size_x;
00017   byte size_y;
00018   byte size_z;
00019   SpriteID image;
00020 };
00021 
00022 #define BEGIN(image) { 0, 0, 0, 0, 0, 0, image }
00023 
00025 #define TILE_SEQ_END() { 0x80, 0, 0, 0, 0, 0, 0 }
00026 
00027 static const WaterDrawTileStruct _shipdepot_display_seq_1[] = {
00028   BEGIN(0xFDD),
00029   { 0, 15, 0, 16, 1, 0x14, 0xFE8 | (1 << PALETTE_MODIFIER_COLOUR) },
00030   TILE_SEQ_END()
00031 };
00032 
00033 static const WaterDrawTileStruct _shipdepot_display_seq_2[] = {
00034   BEGIN(0xFDD),
00035   { 0,  0, 0, 16, 1, 0x14, 0xFEA },
00036   { 0, 15, 0, 16, 1, 0x14, 0xFE6 | (1 << PALETTE_MODIFIER_COLOUR) },
00037   TILE_SEQ_END()
00038 };
00039 
00040 static const WaterDrawTileStruct _shipdepot_display_seq_3[] = {
00041   BEGIN(0xFDD),
00042   { 15, 0, 0, 1, 0x10, 0x14, 0xFE9 | (1 << PALETTE_MODIFIER_COLOUR) },
00043   TILE_SEQ_END()
00044 };
00045 
00046 static const WaterDrawTileStruct _shipdepot_display_seq_4[] = {
00047   BEGIN(0xFDD),
00048   {  0, 0, 0, 1, 16, 0x14, 0xFEB },
00049   { 15, 0, 0, 1, 16, 0x14, 0xFE7 | (1 << PALETTE_MODIFIER_COLOUR) },
00050   TILE_SEQ_END()
00051 };
00052 
00053 static const WaterDrawTileStruct * const _shipdepot_display_seq[] = {
00054   _shipdepot_display_seq_1,
00055   _shipdepot_display_seq_2,
00056   _shipdepot_display_seq_3,
00057   _shipdepot_display_seq_4,
00058 };
00059 
00060 static const WaterDrawTileStruct _lock_display_seq_0[] = {
00061   BEGIN(1),
00062   { 0,   0, 0, 0x10, 1, 0x14, 0 + 1 },
00063   { 0, 0xF, 0, 0x10, 1, 0x14, 4 + 1 },
00064   TILE_SEQ_END()
00065 };
00066 
00067 static const WaterDrawTileStruct _lock_display_seq_1[] = {
00068   BEGIN(0),
00069   {   0, 0, 0, 1, 0x10, 0x14, 0 },
00070   { 0xF, 0, 0, 1, 0x10, 0x14, 4 },
00071   TILE_SEQ_END()
00072 };
00073 
00074 static const WaterDrawTileStruct _lock_display_seq_2[] = {
00075   BEGIN(2),
00076   { 0,   0, 0, 0x10, 1, 0x14, 0 + 2 },
00077   { 0, 0xF, 0, 0x10, 1, 0x14, 4 + 2 },
00078   TILE_SEQ_END()
00079 };
00080 
00081 static const WaterDrawTileStruct _lock_display_seq_3[] = {
00082   BEGIN(3),
00083   {   0, 0, 0, 1, 0x10, 0x14, 0 + 3 },
00084   { 0xF, 0, 0, 1, 0x10, 0x14, 4 + 3 },
00085   TILE_SEQ_END()
00086 };
00087 
00088 static const WaterDrawTileStruct _lock_display_seq_0b[] = {
00089   BEGIN(0xFDD),
00090   { 0,   0, 0, 0x10, 1, 0x14, 8 + 1 },
00091   { 0, 0xF, 0, 0x10, 1, 0x14, 12 + 1 },
00092   TILE_SEQ_END()
00093 };
00094 
00095 static const WaterDrawTileStruct _lock_display_seq_1b[] = {
00096   BEGIN(0xFDD),
00097   {   0, 0, 0, 0x1, 0x10, 0x14, 8 },
00098   { 0xF, 0, 0, 0x1, 0x10, 0x14, 12 },
00099   TILE_SEQ_END()
00100 };
00101 
00102 static const WaterDrawTileStruct _lock_display_seq_2b[] = {
00103   BEGIN(0xFDD),
00104   { 0,   0, 0, 0x10, 1, 0x14, 8 + 2 },
00105   { 0, 0xF, 0, 0x10, 1, 0x14, 12 + 2 },
00106   TILE_SEQ_END()
00107 };
00108 
00109 static const WaterDrawTileStruct _lock_display_seq_3b[] = {
00110   BEGIN(0xFDD),
00111   {   0, 0, 0, 1, 0x10, 0x14, 8 + 3 },
00112   { 0xF, 0, 0, 1, 0x10, 0x14, 12 + 3 },
00113   TILE_SEQ_END()
00114 };
00115 
00116 static const WaterDrawTileStruct _lock_display_seq_0t[] = {
00117   BEGIN(0xFDD),
00118   { 0,   0, 0, 0x10, 1, 0x14, 16 + 1 },
00119   { 0, 0xF, 0, 0x10, 1, 0x14, 20 + 1 },
00120   TILE_SEQ_END()
00121 };
00122 
00123 static const WaterDrawTileStruct _lock_display_seq_1t[] = {
00124   BEGIN(0xFDD),
00125   {   0, 0, 0, 0x1, 0x10, 0x14, 16 },
00126   { 0xF, 0, 0, 0x1, 0x10, 0x14, 20 },
00127   TILE_SEQ_END()
00128 };
00129 
00130 static const WaterDrawTileStruct _lock_display_seq_2t[] = {
00131   BEGIN(0xFDD),
00132   { 0,   0, 0, 0x10, 1, 0x14, 16 + 2 },
00133   { 0, 0xF, 0, 0x10, 1, 0x14, 20 + 2 },
00134   TILE_SEQ_END()
00135 };
00136 
00137 static const WaterDrawTileStruct _lock_display_seq_3t[] = {
00138   BEGIN(0xFDD),
00139   {   0, 0, 0, 1, 0x10, 0x14, 16 + 3 },
00140   { 0xF, 0, 0, 1, 0x10, 0x14, 20 + 3 },
00141   TILE_SEQ_END()
00142 };
00143 
00144 static const WaterDrawTileStruct * const _lock_display_seq[] = {
00145   _lock_display_seq_0,
00146   _lock_display_seq_1,
00147   _lock_display_seq_2,
00148   _lock_display_seq_3,
00149 
00150   _lock_display_seq_0b,
00151   _lock_display_seq_1b,
00152   _lock_display_seq_2b,
00153   _lock_display_seq_3b,
00154 
00155   _lock_display_seq_0t,
00156   _lock_display_seq_1t,
00157   _lock_display_seq_2t,
00158   _lock_display_seq_3t,
00159 };
00160 
00161 #undef BEGIN
00162 #undef TILE_SEQ_END