OpenTTD Source: src/smallmap_gui.h Source File

OpenTTD Source 15.3

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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
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 */
19void BuildLinkStatsLegend();
20
21void BuildIndustriesLegend();
22void ShowSmallMap();
23void BuildLandLegend();
24void BuildOwnerLegend();
25
27 enum class IncludeHeightmap : uint8_t {
28 Never,
29 IfEnabled,
30 Always
31};
32
33uint32_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 */
geometry_type.hpp
All geometry types in OpenTTD.
ShowSmallMap
void ShowSmallMap()
Show the smallmap window.
Definition smallmap_gui.cpp:2065
BuildLandLegend
void BuildLandLegend()
(Re)build the colour tables for the legends.
Definition smallmap_gui.cpp:290
BuildOwnerLegend
void BuildOwnerLegend()
Completes the array for the owned property legend.
Definition smallmap_gui.cpp:341
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:580
BuildLinkStatsLegend
void BuildLinkStatsLegend()
Populate legend table for the link stat view.
Definition smallmap_gui.cpp:219
IncludeHeightmap
IncludeHeightmap
Enum for how to include the heightmap pixels/colours in small map related functions.
Definition smallmap_gui.h:27
IncludeHeightmap::Always
@ Always
Always include the heightmap.
IncludeHeightmap::Never
@ Never
Never include the heightmap.
IncludeHeightmap::IfEnabled
@ IfEnabled
Only include the heightmap if its enabled in the gui by the player.
BuildIndustriesLegend
void BuildIndustriesLegend()
Fills an array for the industries legends.
Definition smallmap_gui.cpp:189
GetSmallMapStationMiddle
Point GetSmallMapStationMiddle(const Window *w, const Station *st)
Determine the middle of a station in the smallmap window.
Definition smallmap_gui.cpp:2099
station_type.h
Types related to stations.
Coord2D< int >
Station
Station data structure.
Definition station_base.h:520
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
Window
Data structure for an opened window.
Definition window_gui.h:274
tile_type.h
Types related to tiles.
TileType
TileType
The different types of tiles.
Definition tile_type.h:47
window_type.h
Types related to windows.