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 */
MakeVoid
static void MakeVoid(TileIndex t)
Make a nice void tile ;)
Definition: void_map.h:21
TileExtended::m7
byte m7
Primarily used for newgrf support.
Definition: map_type.h:37
Tile::m2
uint16 m2
Primarily used for indices to towns, industries and stations.
Definition: map_type.h:22
_m
Tile * _m
Tiles of the map.
Definition: map.cpp:32
TileExtended::m6
byte m6
General purpose.
Definition: map_type.h:36
Tile::m1
byte m1
Primarily used for ownership information.
Definition: map_type.h:23
SetTileHeight
static void SetTileHeight(TileIndex tile, uint height)
Sets the height of a tile.
Definition: tile_map.h:49
_me
TileExtended * _me
Extended Tiles of the map.
Definition: map.cpp:33
Tile::m5
byte m5
General purpose.
Definition: map_type.h:26
MP_VOID
Invisible tiles at the SW and SE border.
Definition: tile_type.h:50
TileIndex
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
SetTileType
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
Definition: tile_map.h:124
tile_map.h
Map writing/reading functions for tiles.
Tile::m3
byte m3
General purpose.
Definition: map_type.h:24
Tile::m4
byte m4
General purpose.
Definition: map_type.h:25