00001 /* $Id: map_type.h 21493 2010-12-13 11:21:53Z 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 #ifndef MAP_TYPE_H 00013 #define MAP_TYPE_H 00014 00019 struct Tile { 00020 byte type_height; 00021 byte m1; 00022 uint16 m2; 00023 byte m3; 00024 byte m4; 00025 byte m5; 00026 byte m6; 00027 }; 00028 00033 struct TileExtended { 00034 byte m7; 00035 }; 00036 00047 typedef int32 TileIndexDiff; 00048 00055 struct TileIndexDiffC { 00056 int16 x; 00057 int16 y; 00058 }; 00059 00061 static const uint MIN_MAP_SIZE_BITS = 6; 00062 static const uint MAX_MAP_SIZE_BITS = 11; 00063 static const uint MIN_MAP_SIZE = 1 << MIN_MAP_SIZE_BITS; 00064 static const uint MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS; 00065 00076 #define STRAIGHT_TRACK_LENGTH 7071/10000 00077 00079 enum LevelMode { 00080 LM_LEVEL, 00081 LM_LOWER, 00082 LM_RAISE, 00083 }; 00084 00085 #endif /* MAP_TYPE_H */