OpenTTD Source: src/void_map.h Source File

OpenTTD Source 12.0-beta1

void_map.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10 #ifndef VOID_MAP_H
11 #define VOID_MAP_H
12
13 #include "tile_map.h"
14
19 static inline void MakeVoid(TileIndex t)
20 {
21 SetTileType(t, MP_VOID);
22 SetTileHeight(t, 0);
23 _m[t].m1 = 0;
24 _m[t].m2 = 0;
25 _m[t].m3 = 0;
26 _m[t].m4 = 0;
27 _m[t].m5 = 0;
28 _me[t].m6 = 0;
29 _me[t].m7 = 0;
30 }
31
32 #endif /* VOID_MAP_H */
TileIndex
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:83
SetTileType
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
Definition: tile_map.h:131
_me
TileExtended * _me
Extended Tiles of the map.
Definition: map.cpp:31
Tile::m2
uint16 m2
Primarily used for indices to towns, industries and stations.
Definition: map_type.h:20
Tile::m1
byte m1
Primarily used for ownership information.
Definition: map_type.h:21
TileExtended::m6
byte m6
General purpose.
Definition: map_type.h:34
tile_map.h
MakeVoid
static void MakeVoid(TileIndex t)
Make a nice void tile ;)
Definition: void_map.h:19
SetTileHeight
static void SetTileHeight(TileIndex tile, uint height)
Sets the height of a tile.
Definition: tile_map.h:57
Tile::m5
byte m5
General purpose.
Definition: map_type.h:24
MP_VOID
@ MP_VOID
Invisible tiles at the SW and SE border.
Definition: tile_type.h:53
TileExtended::m7
byte m7
Primarily used for newgrf support.
Definition: map_type.h:35
Tile::m3
byte m3
General purpose.
Definition: map_type.h:22
Tile::m4
byte m4
General purpose.
Definition: map_type.h:23
_m
Tile * _m
Tiles of the map.
Definition: map.cpp:30