Go to the documentation of this file.
1 /* $Id: tile_type.h 27987 2018-03-11 13:25:26Z frosch $ */
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 <>.
8  */
12 #ifndef TILE_TYPE_H
13 #define TILE_TYPE_H
15 static const uint TILE_SIZE = 16;
16 static const uint TILE_UNIT_MASK = TILE_SIZE - 1;
17 static const uint TILE_PIXELS = 32;
18 static const uint TILE_HEIGHT = 8;
20 static const uint MAX_BUILDING_PIXELS = 200;
21 static const int MAX_VEHICLE_PIXEL_X = 192;
22 static const int MAX_VEHICLE_PIXEL_Y = 96;
24 static const uint MAX_TILE_HEIGHT = 255;
26 static const uint MIN_MAX_HEIGHTLEVEL = 15;
27 static const uint DEF_MAX_HEIGHTLEVEL = 30;
30 static const uint MIN_SNOWLINE_HEIGHT = 2;
31 static const uint DEF_SNOWLINE_HEIGHT = 15;
32 static const uint MAX_SNOWLINE_HEIGHT = (MAX_TILE_HEIGHT - 2);
42 enum TileType {
54 };
71 enum TropicZone {
75 };
80 typedef uint32 TileIndex;
85 static const TileIndex INVALID_TILE = (TileIndex)-1;
87 #endif /* TILE_TYPE_H */
static const uint TILE_PIXELS
Pixel distance between tile columns/rows in #ZOOM_LVL_BASE.
Definition: tile_type.h:17
Rainforest tile.
Definition: tile_type.h:74
Normal tropiczone.
Definition: tile_type.h:72
Tile is desert.
Definition: tile_type.h:73
static const uint MAX_TILE_HEIGHT
Maximum allowed tile height.
Definition: tile_type.h:24
Additional infos of a tile on a tropic game.
Definition: tile_type.h:71
Part of an industry.
Definition: tile_type.h:51
static const uint MAX_MAX_HEIGHTLEVEL
Upper bound of maximum allowed heightlevel (in the construction settings)
Definition: tile_type.h:28
The different types of tiles.
Definition: tile_type.h:42
A tile with road (or tram tracks)
Definition: tile_type.h:45
A railway.
Definition: tile_type.h:44
Contains objects such as transmitters and owned land.
Definition: tile_type.h:53
static const uint TILE_SIZE
Tile size in world coordinates.
Definition: tile_type.h:15
static const uint DEF_MAX_HEIGHTLEVEL
Default maximum allowed heightlevel (in the construction settings)
Definition: tile_type.h:27
Water tile.
Definition: tile_type.h:49
static const uint TILE_HEIGHT
Height of a height level in world coordinate AND in pixels in #ZOOM_LVL_BASE.
Definition: tile_type.h:18
static const uint MIN_SNOWLINE_HEIGHT
Minimum snowline height.
Definition: tile_type.h:30
Tile got trees.
Definition: tile_type.h:47
static const uint MIN_MAX_HEIGHTLEVEL
Lower bound of maximum allowed heightlevel (in the construction settings)
Definition: tile_type.h:26
Tunnel entry/exit and bridge heads.
Definition: tile_type.h:52
Invisible tiles at the SW and SE border.
Definition: tile_type.h:50
static const int MAX_VEHICLE_PIXEL_X
Maximum width of a vehicle in pixels in #ZOOM_LVL_BASE.
Definition: tile_type.h:21
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
static const int MAX_VEHICLE_PIXEL_Y
Maximum height of a vehicle in pixels in #ZOOM_LVL_BASE.
Definition: tile_type.h:22
A tile of a station.
Definition: tile_type.h:48
static const uint MAX_BUILDING_PIXELS
Maximum height of a building in pixels in #ZOOM_LVL_BASE. (Also applies to "bridge buildings" on the ...
Definition: tile_type.h:20
static const uint TILE_UNIT_MASK
For masking in/out the inner-tile world coordinate units.
Definition: tile_type.h:16
static const uint DEF_SNOWLINE_HEIGHT
Default snowline height.
Definition: tile_type.h:31
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
Definition: tile_type.h:85
A tile without any structures, i.e. grass, rocks, farm fields etc.
Definition: tile_type.h:43
A house by a town.
Definition: tile_type.h:46
static const uint MAX_SNOWLINE_HEIGHT
Maximum allowed snowline height.
Definition: tile_type.h:32