OpenTTD
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 
15 const char *GetCurrentScreenshotExtension();
16 
25 };
26 
28 bool MakeHeightmapScreenshot(const char *filename);
29 bool MakeScreenshot(ScreenshotType t, const char *name);
30 
31 extern char _screenshot_format_name[8];
32 extern uint _num_screenshot_formats;
33 extern uint _cur_screenshot_format;
34 extern char _full_screenshot_name[MAX_PATH];
35 
36 #endif /* SCREENSHOT_H */
World screenshot.
Definition: screenshot.h:23
Heightmap of the world.
Definition: screenshot.h:24
char _full_screenshot_name[MAX_PATH]
Pathname of the screenshot file.
Definition: screenshot.cpp:38
Screenshot of viewport.
Definition: screenshot.h:19
const char * GetCurrentScreenshotExtension()
Get filename extension of current screenshot file format.
Definition: screenshot.cpp:571
void SetupScreenshotViewport(ScreenshotType t, struct ViewPort *vp)
Configure a ViewPort for rendering (a part of) the map into a screenshot.
Definition: screenshot.cpp:710
Fully zoomed in screenshot of the visible area.
Definition: screenshot.h:21
uint _cur_screenshot_format
Index of the currently selected screenshot format in _screenshot_formats.
Definition: screenshot.cpp:36
void InitializeScreenshotFormats()
Initialize screenshot format information on startup, with _screenshot_format_name filled from the loa...
Definition: screenshot.cpp:577
char _screenshot_format_name[8]
Extension of the current screenshot format (corresponds with _cur_screenshot_format).
Definition: screenshot.cpp:34
bool MakeScreenshot(ScreenshotType t, const char *name)
Make an actual screenshot.
Definition: screenshot.cpp:809
Data structure for viewport, display of a part of the world.
Definition: viewport_type.h:22
Zoomed to default zoom level screenshot of the visible area.
Definition: screenshot.h:22
uint _num_screenshot_formats
Number of available screenshot formats.
Definition: screenshot.cpp:35
bool MakeHeightmapScreenshot(const char *filename)
Make a heightmap of the current map.
Definition: screenshot.cpp:790
Raw screenshot from blitter buffer.
Definition: screenshot.h:20
ScreenshotType
Type of requested screenshot.
Definition: screenshot.h:18