OpenTTD Source 20241224-master-gee860a5c8e
map_type.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 MAP_TYPE_H
11#define MAP_TYPE_H
12
23typedef int32_t TileIndexDiff;
24
32 int16_t x;
33 int16_t y;
34};
35
37static const uint MIN_MAP_SIZE_BITS = 6;
38static const uint MAX_MAP_SIZE_BITS = 12;
39static const uint MIN_MAP_SIZE = 1U << MIN_MAP_SIZE_BITS;
40static const uint MAX_MAP_SIZE = 1U << MAX_MAP_SIZE_BITS;
41
48
49#endif /* MAP_TYPE_H */
static const uint MIN_MAP_SIZE_BITS
Minimal and maximal map width and height.
Definition map_type.h:37
static const uint MAX_MAP_SIZE
Maximal map size = 4096.
Definition map_type.h:40
static const uint MIN_MAP_SIZE
Minimal map size = 64.
Definition map_type.h:39
int32_t TileIndexDiff
An offset value between two tiles.
Definition map_type.h:23
static const uint MAX_MAP_SIZE_BITS
Maximal size of map is equal to 2 ^ MAX_MAP_SIZE_BITS.
Definition map_type.h:38
LevelMode
Argument for CmdLevelLand describing what to do.
Definition map_type.h:43
@ LM_LEVEL
Level the land.
Definition map_type.h:44
@ LM_LOWER
Lower the land.
Definition map_type.h:45
@ LM_RAISE
Raise the land.
Definition map_type.h:46
A pair-construct of a TileIndexDiff.
Definition map_type.h:31
int16_t x
The x value of the coordinate.
Definition map_type.h:32
int16_t y
The y value of the coordinate.
Definition map_type.h:33