OpenTTD
map_type.h
Go to the documentation of this file.
1 /* $Id: map_type.h 27037 2014-10-23 17:13:44Z rubidium $ */
2 
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  */
9 
12 #ifndef MAP_TYPE_H
13 #define MAP_TYPE_H
14 
19 struct Tile {
20  byte type;
21  byte height;
22  byte m1;
23  uint16 m2;
24  byte m3;
25  byte m4;
26  byte m5;
27 };
28 
33 struct TileExtended {
34  byte m6;
35  byte m7;
36 };
37 
48 typedef int32 TileIndexDiff;
49 
57  int16 x;
58  int16 y;
59 };
60 
62 static const uint MIN_MAP_SIZE_BITS = 6;
63 static const uint MAX_MAP_SIZE_BITS = 12;
64 static const uint MIN_MAP_SIZE = 1 << MIN_MAP_SIZE_BITS;
65 static const uint MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS;
66 
77 #define STRAIGHT_TRACK_LENGTH 7071/10000
78 
80 enum LevelMode {
84 };
85 
86 #endif /* MAP_TYPE_H */