OpenTTD Source 20250524-master-gc366e6a48e
screenshot.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 SCREENSHOT_H
11#define SCREENSHOT_H
12
13std::string_view GetCurrentScreenshotExtension();
14
25
26bool MakeHeightmapScreenshot(std::string_view filename);
28bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width = 0, uint32_t height = 0);
30
31extern std::string _screenshot_format_name;
32extern std::string _full_screenshot_path;
33
34#endif /* SCREENSHOT_H */
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
std::string _screenshot_format_name
Extension of the current screenshot format.
bool MakeMinimapWorldScreenshot()
Make a minimap screenshot.
std::string_view GetCurrentScreenshotExtension()
Get filename extension of current screenshot file format.
ScreenshotType
Type of requested screenshot.
Definition screenshot.h:16
@ SC_VIEWPORT
Screenshot of viewport.
Definition screenshot.h:17
@ SC_CRASHLOG
Raw screenshot from blitter buffer.
Definition screenshot.h:18
@ SC_ZOOMEDIN
Fully zoomed in screenshot of the visible area.
Definition screenshot.h:19
@ SC_HEIGHTMAP
Heightmap of the world.
Definition screenshot.h:22
@ SC_WORLD
World screenshot.
Definition screenshot.h:21
@ SC_MINIMAP
Minimap screenshot.
Definition screenshot.h:23
@ SC_DEFAULTZOOM
Zoomed to default zoom level screenshot of the visible area.
Definition screenshot.h:20
std::string _full_screenshot_path
Pathname of the screenshot file.
bool MakeHeightmapScreenshot(std::string_view filename)
Make a heightmap of the current map.
bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width=0, uint32_t height=0)
Schedule making a screenshot.