OpenTTD Source  20241121-master-g67a0fccfad
smallmap_gui.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 SMALLMAP_GUI_H
11 #define SMALLMAP_GUI_H
12 
13 #include "core/geometry_type.hpp"
14 #include "station_type.h"
15 #include "tile_type.h"
16 #include "window_type.h"
17 
18 /* set up the cargos to be displayed in the smallmap's route legend */
20 
22 void ShowSmallMap();
23 void BuildLandLegend();
24 void BuildOwnerLegend();
25 
27 enum class IncludeHeightmap {
28  Never,
29  IfEnabled,
30  Always
31 };
32 
33 uint32_t GetSmallMapOwnerPixels(TileIndex tile, TileType t, IncludeHeightmap include_heightmap);
34 
35 Point GetSmallMapStationMiddle(const Window *w, const Station *st);
36 
37 #endif /* SMALLMAP_GUI_H */
All geometry types in OpenTTD.
void ShowSmallMap()
Show the smallmap window.
void BuildLandLegend()
(Re)build the colour tables for the legends.
IncludeHeightmap
Enum for how to include the heightmap pixels/colours in small map related functions.
Definition: smallmap_gui.h:27
@ Always
Always include the heightmap.
@ Never
Never include the heightmap.
@ IfEnabled
Only include the heightmap if its enabled in the gui by the player.
void BuildOwnerLegend()
Completes the array for the owned property legend.
uint32_t GetSmallMapOwnerPixels(TileIndex tile, TileType t, IncludeHeightmap include_heightmap)
Return the colour a tile would be displayed with in the small map in mode "Owner".
void BuildLinkStatsLegend()
Populate legend table for the link stat view.
void BuildIndustriesLegend()
Fills an array for the industries legends.
Point GetSmallMapStationMiddle(const Window *w, const Station *st)
Determine the middle of a station in the smallmap window.
Types related to stations.
Coordinates of a point in 2D.
Station data structure.
Definition: station_base.h:439
Data structure for an opened window.
Definition: window_gui.h:273
Types related to tiles.
TileType
The different types of tiles.
Definition: tile_type.h:47
Types related to windows.