OpenTTD Source 20241224-master-gf74b0cf984
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
14
16
27
28void SetupScreenshotViewport(ScreenshotType t, struct Viewport *vp, uint32_t width = 0, uint32_t height = 0);
29bool MakeHeightmapScreenshot(const char *filename);
31bool MakeScreenshot(ScreenshotType t, std::string name, uint32_t width = 0, uint32_t height = 0);
33
34extern std::string _screenshot_format_name;
35extern std::string _full_screenshot_path;
36
37#endif /* SCREENSHOT_H */
const char * GetCurrentScreenshotExtension()
Get filename extension of current screenshot file format.
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
std::string _screenshot_format_name
Extension of the current screenshot format (corresponds with _cur_screenshot_format).
bool MakeHeightmapScreenshot(const char *filename)
Make a heightmap of the current map.
void InitializeScreenshotFormats()
Initialize screenshot format information on startup, with _screenshot_format_name filled from the loa...
bool MakeMinimapWorldScreenshot()
Make a minimap screenshot.
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.
ScreenshotType
Type of requested screenshot.
Definition screenshot.h:18
@ SC_VIEWPORT
Screenshot of viewport.
Definition screenshot.h:19
@ SC_CRASHLOG
Raw screenshot from blitter buffer.
Definition screenshot.h:20
@ SC_ZOOMEDIN
Fully zoomed in screenshot of the visible area.
Definition screenshot.h:21
@ SC_HEIGHTMAP
Heightmap of the world.
Definition screenshot.h:24
@ SC_WORLD
World screenshot.
Definition screenshot.h:23
@ SC_MINIMAP
Minimap screenshot.
Definition screenshot.h:25
@ SC_DEFAULTZOOM
Zoomed to default zoom level screenshot of the visible area.
Definition screenshot.h:22
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.