OpenTTD Source 20241224-master-gf74b0cf984
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
19inline void MakeVoid(Tile t)
20{
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 */
Wrapper class to abstract away the way the tiles are stored.
Definition map_func.h:25
debug_inline uint16_t & m2()
Primarily used for indices to towns, industries and stations.
Definition map_func.h:125
debug_inline uint8_t & m7()
Primarily used for newgrf support.
Definition map_func.h:185
debug_inline uint8_t & m4()
General purpose.
Definition map_func.h:149
debug_inline uint8_t & m6()
General purpose.
Definition map_func.h:173
debug_inline uint8_t & m3()
General purpose.
Definition map_func.h:137
debug_inline uint8_t & m1()
Primarily used for ownership information.
Definition map_func.h:113
debug_inline uint8_t & m5()
General purpose.
Definition map_func.h:161
Map writing/reading functions for tiles.
void SetTileType(Tile tile, TileType type)
Set the type of a tile.
Definition tile_map.h:131
void SetTileHeight(Tile tile, uint height)
Sets the height of a tile.
Definition tile_map.h:57
@ MP_VOID
Invisible tiles at the SW and SE border.
Definition tile_type.h:55
void MakeVoid(Tile t)
Make a nice void tile ;)
Definition void_map.h:19