OpenTTD Source: src/heightmap.h Source File

OpenTTD Source 14.0-beta3

heightmap.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 HEIGHTMAP_H
11 #define HEIGHTMAP_H
12
13 #include "fileio_type.h"
14
19 enum HeightmapRotation {
20 HM_COUNTER_CLOCKWISE,
21 HM_CLOCKWISE,
22 };
23
24 bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y);
25 bool LoadHeightmap(DetailedFileType dft, const char *filename);
26 void FlatEmptyWorld(byte tile_height);
27 void FixSlopes();
28
29 #endif /* HEIGHTMAP_H */
HM_CLOCKWISE
@ HM_CLOCKWISE
Rotate the map clockwise 45 degrees.
Definition: heightmap.h:21
FixSlopes
void FixSlopes()
This function takes care of the fact that land in OpenTTD can never differ more than 1 in height.
Definition: heightmap.cpp:422
LoadHeightmap
bool LoadHeightmap(DetailedFileType dft, const char *filename)
Load a heightmap from file and change the map in its current dimensions to a landscape representing t...
Definition: heightmap.cpp:523
HM_COUNTER_CLOCKWISE
@ HM_COUNTER_CLOCKWISE
Rotate the map counter clockwise 45 degrees.
Definition: heightmap.h:20
DetailedFileType
DetailedFileType
Kinds of files in each AbstractFileType.
Definition: fileio_type.h:28
GetHeightmapDimensions
bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y)
Get the dimensions of a heightmap.
Definition: heightmap.cpp:511
fileio_type.h
HeightmapRotation
HeightmapRotation
Order of these enums has to be the same as in lang/english.txt Otherwise you will get inconsistent be...
Definition: heightmap.h:19
FlatEmptyWorld
void FlatEmptyWorld(byte tile_height)
Make an empty world where all tiles are of height 'tile_height'.
Definition: heightmap.cpp:546