OpenTTD
void_map.h
Go to the documentation of this file.
1 /* $Id: void_map.h 26878 2014-09-21 11:23:33Z 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 VOID_MAP_H
13 #define VOID_MAP_H
14 
15 #include "tile_map.h"
16 
21 static inline void MakeVoid(TileIndex t)
22 {
23  SetTileType(t, MP_VOID);
24  SetTileHeight(t, 0);
25  _m[t].m1 = 0;
26  _m[t].m2 = 0;
27  _m[t].m3 = 0;
28  _m[t].m4 = 0;
29  _m[t].m5 = 0;
30  _me[t].m6 = 0;
31  _me[t].m7 = 0;
32 }
33 
34 #endif /* VOID_MAP_H */
static void MakeVoid(TileIndex t)
Make a nice void tile ;)
Definition: void_map.h:21
byte m7
Primarily used for newgrf support.
Definition: map_type.h:37
uint16 m2
Primarily used for indices to towns, industries and stations.
Definition: map_type.h:22
Tile * _m
Tiles of the map.
Definition: map.cpp:32
byte m6
General purpose.
Definition: map_type.h:36
byte m1
Primarily used for ownership information.
Definition: map_type.h:23
static void SetTileHeight(TileIndex tile, uint height)
Sets the height of a tile.
Definition: tile_map.h:49
TileExtended * _me
Extended Tiles of the map.
Definition: map.cpp:33
byte m5
General purpose.
Definition: map_type.h:26
Invisible tiles at the SW and SE border.
Definition: tile_type.h:50
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
Definition: tile_map.h:124
Map writing/reading functions for tiles.
byte m3
General purpose.
Definition: map_type.h:24
byte m4
General purpose.
Definition: map_type.h:25