OpenTTD Source: src/void_map.h Source File

OpenTTD Source 14.0-RC3

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 inline void MakeVoid(Tile t)
20 {
21 SetTileType(t, MP_VOID);
22 SetTileHeight(t, 0);
23 t.m1() = 0;
24 t.m2() = 0;
25 t.m3() = 0;
26 t.m4() = 0;
27 t.m5() = 0;
28 t.m6() = 0;
29 t.m7() = 0;
30 }
31
32 #endif /* VOID_MAP_H */
SetTileHeight
void SetTileHeight(Tile tile, uint height)
Sets the height of a tile.
Definition: tile_map.h:57
Tile::m6
debug_inline byte & m6()
General purpose.
Definition: map_func.h:173
Tile
Wrapper class to abstract away the way the tiles are stored.
Definition: map_func.h:25
Tile::m5
debug_inline byte & m5()
General purpose.
Definition: map_func.h:161
Tile::m1
debug_inline byte & m1()
Primarily used for ownership information.
Definition: map_func.h:113
Tile::m4
debug_inline byte & m4()
General purpose.
Definition: map_func.h:149
Tile::m7
debug_inline byte & m7()
Primarily used for newgrf support.
Definition: map_func.h:185
tile_map.h
Tile::m2
debug_inline uint16_t & m2()
Primarily used for indices to towns, industries and stations.
Definition: map_func.h:125
MakeVoid
void MakeVoid(Tile t)
Make a nice void tile ;)
Definition: void_map.h:19
MP_VOID
@ MP_VOID
Invisible tiles at the SW and SE border.
Definition: tile_type.h:55
SetTileType
void SetTileType(Tile tile, TileType type)
Set the type of a tile.
Definition: tile_map.h:131
Tile::m3
debug_inline byte & m3()
General purpose.
Definition: map_func.h:137