OpenTTD

screenshot.h
Go to the documentation of this file.
1 /* $Id: screenshot.h 26525 2014-04-27 15:13:46Z frosch $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef SCREENSHOT_H
13 #define SCREENSHOT_H
14
15 void InitializeScreenshotFormats();
16
17 const char *GetCurrentScreenshotExtension();
18
20 enum ScreenshotType {
21 SC_VIEWPORT,
22 SC_CRASHLOG,
23 SC_ZOOMEDIN,
24 SC_DEFAULTZOOM,
25 SC_WORLD,
26 SC_HEIGHTMAP,
27 };
28
29 void SetupScreenshotViewport(ScreenshotType t, struct ViewPort *vp);
30 bool MakeHeightmapScreenshot(const char *filename);
31 bool MakeScreenshot(ScreenshotType t, const char *name);
32
33 extern char _screenshot_format_name[8];
34 extern uint _num_screenshot_formats;
35 extern uint _cur_screenshot_format;
36 extern char _full_screenshot_name[MAX_PATH];
37
38 #endif /* SCREENSHOT_H */
SC_WORLD
World screenshot.
Definition: screenshot.h:25
SC_HEIGHTMAP
Heightmap of the world.
Definition: screenshot.h:26
_full_screenshot_name
char _full_screenshot_name[MAX_PATH]
Pathname of the screenshot file.
Definition: screenshot.cpp:40
SC_VIEWPORT
Screenshot of viewport.
Definition: screenshot.h:21
GetCurrentScreenshotExtension
const char * GetCurrentScreenshotExtension()
Get filename extension of current screenshot file format.
Definition: screenshot.cpp:581
SetupScreenshotViewport
void SetupScreenshotViewport(ScreenshotType t, struct ViewPort *vp)
Configure a ViewPort for rendering (a part of) the map into a screenshot.
Definition: screenshot.cpp:720
SC_ZOOMEDIN
Fully zoomed in screenshot of the visible area.
Definition: screenshot.h:23
_cur_screenshot_format
uint _cur_screenshot_format
Index of the currently selected screenshot format in _screenshot_formats.
Definition: screenshot.cpp:38
InitializeScreenshotFormats
void InitializeScreenshotFormats()
Initialize screenshot format information on startup, with _screenshot_format_name filled from the loa...
Definition: screenshot.cpp:587
_screenshot_format_name
char _screenshot_format_name[8]
Extension of the current screenshot format (corresponds with _cur_screenshot_format).
Definition: screenshot.cpp:36
MakeScreenshot
bool MakeScreenshot(ScreenshotType t, const char *name)
Make an actual screenshot.
Definition: screenshot.cpp:819
ViewPort
Data structure for viewport, display of a part of the world.
Definition: viewport_type.h:24
SC_DEFAULTZOOM
Zoomed to default zoom level screenshot of the visible area.
Definition: screenshot.h:24
_num_screenshot_formats
uint _num_screenshot_formats
Number of available screenshot formats.
Definition: screenshot.cpp:37
MakeHeightmapScreenshot
bool MakeHeightmapScreenshot(const char *filename)
Make a heightmap of the current map.
Definition: screenshot.cpp:800
SC_CRASHLOG
Raw screenshot from blitter buffer.
Definition: screenshot.h:22
ScreenshotType
ScreenshotType
Type of requested screenshot.
Definition: screenshot.h:20