OpenTTD Source 20251213-master-g1091fa6071
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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
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 t.m8() = 0;
31}
32
33#endif /* VOID_MAP_H */
Wrapper class to abstract away the way the tiles are stored.
Definition map_func.h:25
uint8_t & m5()
General purpose.
Definition map_func.h:161
uint8_t & m1()
Primarily used for ownership information.
Definition map_func.h:113
uint8_t & m4()
General purpose.
Definition map_func.h:149
uint8_t & m6()
General purpose.
Definition map_func.h:173
uint8_t & m7()
Primarily used for newgrf support.
Definition map_func.h:185
uint8_t & m3()
General purpose.
Definition map_func.h:137
uint16_t & m8()
General purpose.
Definition map_func.h:197
uint16_t & m2()
Primarily used for indices to towns, industries and stations.
Definition map_func.h:125
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