OpenTTD Source  20240917-master-g9ab0a47812
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 */
Station
Station data structure.
Definition: station_base.h:439
window_type.h
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
IncludeHeightmap::IfEnabled
@ IfEnabled
Only include the heightmap if its enabled in the gui by the player.
GetSmallMapOwnerPixels
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".
Definition: smallmap_gui.cpp:584
geometry_type.hpp
GetSmallMapStationMiddle
Point GetSmallMapStationMiddle(const Window *w, const Station *st)
Determine the middle of a station in the smallmap window.
Definition: smallmap_gui.cpp:2101
BuildLinkStatsLegend
void BuildLinkStatsLegend()
Populate legend table for the link stat view.
Definition: smallmap_gui.cpp:219
ShowSmallMap
void ShowSmallMap()
Show the smallmap window.
Definition: smallmap_gui.cpp:2067
BuildLandLegend
void BuildLandLegend()
(Re)build the colour tables for the legends.
Definition: smallmap_gui.cpp:294
BuildOwnerLegend
void BuildOwnerLegend()
Completes the array for the owned property legend.
Definition: smallmap_gui.cpp:345
BuildIndustriesLegend
void BuildIndustriesLegend()
Fills an array for the industries legends.
Definition: smallmap_gui.cpp:189
Point
Coordinates of a point in 2D.
Definition: geometry_type.hpp:21
IncludeHeightmap::Always
@ Always
Always include the heightmap.
tile_type.h
TileType
TileType
The different types of tiles.
Definition: tile_type.h:47
IncludeHeightmap
IncludeHeightmap
Enum for how to include the heightmap pixels/colours in small map related functions.
Definition: smallmap_gui.h:27
Window
Data structure for an opened window.
Definition: window_gui.h:276
IncludeHeightmap::Never
@ Never
Never include the heightmap.
station_type.h