OpenTTD Source 20250312-master-gcdcc6b491d
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
26void SetupScreenshotViewport(ScreenshotType t, struct Viewport *vp, uint32_t width = 0, uint32_t height = 0);
27bool MakeHeightmapScreenshot(const char *filename);
29bool MakeScreenshot(ScreenshotType t, std::string name, uint32_t width = 0, uint32_t height = 0);
31
32extern std::string _screenshot_format_name;
33extern std::string _full_screenshot_path;
34
35#endif /* SCREENSHOT_H */
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
std::string _screenshot_format_name
Extension of the current screenshot format.
bool MakeHeightmapScreenshot(const char *filename)
Make a heightmap of the current map.
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
bool MakeScreenshot(ScreenshotType t, std::string name, uint32_t width=0, uint32_t height=0)
Schedule making a screenshot.
std::string _full_screenshot_path
Pathname of the screenshot file.
void SetupScreenshotViewport(ScreenshotType t, struct Viewport *vp, uint32_t width=0, uint32_t height=0)
Configure a Viewport for rendering (a part of) the map into a screenshot.
Data structure for viewport, display of a part of the world.