OpenTTD Source 15.0-beta2
screenshot.cpp
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#include "stdafx.h"
11#include "core/backup_type.hpp"
12#include "fileio_func.h"
13#include "viewport_func.h"
14#include "gfx_func.h"
15#include "screenshot.h"
16#include "screenshot_gui.h"
17#include "blitter/factory.hpp"
18#include "zoom_func.h"
19#include "saveload/saveload.h"
20#include "company_func.h"
21#include "strings_func.h"
22#include "error.h"
23#include "textbuf_gui.h"
24#include "window_gui.h"
25#include "window_func.h"
26#include "tile_map.h"
27#include "landscape.h"
29#include "smallmap_gui.h"
30#include "screenshot_type.h"
31
32#include "table/strings.h"
33
34#include "safeguards.h"
35
36static const char * const SCREENSHOT_NAME = "screenshot";
37static const char * const HEIGHTMAP_NAME = "heightmap";
38
40static std::string _screenshot_name;
43
50{
52 if (providers.empty()) return nullptr;
53
54 auto it = std::ranges::find_if(providers, [](const auto &p) { return p->GetName() == _screenshot_format_name; });
55 if (it != std::end(providers)) return *it;
56
57 return providers.front();
58}
59
62{
63 auto provider = GetScreenshotProvider();
64 if (provider == nullptr) return {};
65
66 return provider->GetName();
67}
68
73static void CurrentScreenCallback(void *, void *buf, uint y, uint pitch, uint n)
74{
76 void *src = blitter->MoveTo(_screen.dst_ptr, 0, y);
77 blitter->CopyImageToBuffer(src, buf, _screen.width, n, pitch);
78}
79
88static void LargeWorldCallback(void *userdata, void *buf, uint y, uint pitch, uint n)
89{
90 Viewport *vp = (Viewport *)userdata;
91 DrawPixelInfo dpi;
92 int wx, left;
93
94 /* We are no longer rendering to the screen */
95 DrawPixelInfo old_screen = _screen;
96 bool old_disable_anim = _screen_disable_anim;
97
98 _screen.dst_ptr = buf;
99 _screen.width = pitch;
100 _screen.height = n;
101 _screen.pitch = pitch;
103
104 AutoRestoreBackup dpi_backup(_cur_dpi, &dpi);
105
106 dpi.dst_ptr = buf;
107 dpi.height = n;
108 dpi.width = vp->width;
109 dpi.pitch = pitch;
110 dpi.zoom = ZOOM_LVL_WORLD_SCREENSHOT;
111 dpi.left = 0;
112 dpi.top = y;
113
114 /* Render viewport in blocks of 1600 pixels width */
115 left = 0;
116 while (vp->width - left != 0) {
117 wx = std::min(vp->width - left, 1600);
118 left += wx;
119
120 ViewportDoDraw(*vp,
121 ScaleByZoom(left - wx - vp->left, vp->zoom) + vp->virtual_left,
122 ScaleByZoom(y - vp->top, vp->zoom) + vp->virtual_top,
123 ScaleByZoom(left - vp->left, vp->zoom) + vp->virtual_left,
124 ScaleByZoom((y + n) - vp->top, vp->zoom) + vp->virtual_top
125 );
126 }
127
128 /* Switch back to rendering to the screen */
129 _screen = old_screen;
130 _screen_disable_anim = old_disable_anim;
131}
132
140static const char *MakeScreenshotName(std::string_view default_fn, std::string_view ext, bool crashlog = false)
141{
142 bool generate = _screenshot_name.empty();
143
144 if (generate) {
145 if (_game_mode == GM_EDITOR || _game_mode == GM_MENU || _local_company == COMPANY_SPECTATOR) {
146 _screenshot_name = default_fn;
147 } else {
149 }
150 }
151
152 /* Handle user-specified filenames ending in # with automatic numbering */
153 if (_screenshot_name.ends_with("#")) {
154 generate = true;
155 _screenshot_name.pop_back();
156 }
157
158 size_t len = _screenshot_name.size();
159 /* Add extension to screenshot file */
160 _screenshot_name += fmt::format(".{}", ext);
161
162 const char *screenshot_dir = crashlog ? _personal_dir.c_str() : FiosGetScreenshotDir();
163
164 for (uint serial = 1;; serial++) {
165 _full_screenshot_path = fmt::format("{}{}", screenshot_dir, _screenshot_name);
166
167 if (!generate) break; // allow overwriting of non-automatic filenames
169 /* If file exists try another one with same name, but just with a higher index */
170 _screenshot_name.erase(len);
171 _screenshot_name += fmt::format("#{}.{}", serial, ext);
172 }
173
174 return _full_screenshot_path.c_str();
175}
176
178static bool MakeSmallScreenshot(bool crashlog)
179{
180 auto provider = GetScreenshotProvider();
181 if (provider == nullptr) return false;
182
183 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName(), crashlog), CurrentScreenCallback, nullptr, _screen.width, _screen.height,
185}
186
194static Viewport SetupScreenshotViewport(ScreenshotType t, uint32_t width = 0, uint32_t height = 0)
195{
196 Viewport vp{};
197
198 switch(t) {
199 case SC_VIEWPORT:
200 case SC_CRASHLOG: {
201 assert(width == 0 && height == 0);
202
203 Window *w = GetMainWindow();
204 vp.virtual_left = w->viewport->virtual_left;
205 vp.virtual_top = w->viewport->virtual_top;
206 vp.virtual_width = w->viewport->virtual_width;
207 vp.virtual_height = w->viewport->virtual_height;
208
209 /* Compute pixel coordinates */
210 vp.left = 0;
211 vp.top = 0;
212 vp.width = _screen.width;
213 vp.height = _screen.height;
214 vp.overlay = w->viewport->overlay;
215 break;
216 }
217 case SC_WORLD: {
218 assert(width == 0 && height == 0);
219
220 /* Determine world coordinates of screenshot */
222
224 TileIndex south_tile{Map::Size() - 1};
225
226 /* We need to account for a hill or high building at tile 0,0. */
227 int extra_height_top = TilePixelHeight(north_tile) + 150;
228 /* If there is a hill at the bottom don't create a large black area. */
229 int reclaim_height_bottom = TilePixelHeight(south_tile);
230
231 vp.virtual_left = RemapCoords(TileX(south_tile) * TILE_SIZE, TileY(north_tile) * TILE_SIZE, 0).x;
232 vp.virtual_top = RemapCoords(TileX(north_tile) * TILE_SIZE, TileY(north_tile) * TILE_SIZE, extra_height_top).y;
233 vp.virtual_width = RemapCoords(TileX(north_tile) * TILE_SIZE, TileY(south_tile) * TILE_SIZE, 0).x - vp.virtual_left + 1;
234 vp.virtual_height = RemapCoords(TileX(south_tile) * TILE_SIZE, TileY(south_tile) * TILE_SIZE, reclaim_height_bottom).y - vp.virtual_top + 1;
235
236 /* Compute pixel coordinates */
237 vp.left = 0;
238 vp.top = 0;
239 vp.width = UnScaleByZoom(vp.virtual_width, vp.zoom);
240 vp.height = UnScaleByZoom(vp.virtual_height, vp.zoom);
241 vp.overlay = nullptr;
242 break;
243 }
244 default: {
246
247 Window *w = GetMainWindow();
248 vp.virtual_left = w->viewport->virtual_left;
249 vp.virtual_top = w->viewport->virtual_top;
250
251 if (width == 0 || height == 0) {
252 vp.virtual_width = w->viewport->virtual_width;
253 vp.virtual_height = w->viewport->virtual_height;
254 } else {
255 vp.virtual_width = width << vp.zoom;
256 vp.virtual_height = height << vp.zoom;
257 }
258
259 /* Compute pixel coordinates */
260 vp.left = 0;
261 vp.top = 0;
262 vp.width = UnScaleByZoom(vp.virtual_width, vp.zoom);
263 vp.height = UnScaleByZoom(vp.virtual_height, vp.zoom);
264 vp.overlay = nullptr;
265 break;
266 }
267 }
268
269 return vp;
270}
271
279static bool MakeLargeWorldScreenshot(ScreenshotType t, uint32_t width = 0, uint32_t height = 0)
280{
281 auto provider = GetScreenshotProvider();
282 if (provider == nullptr) return false;
283
284 Viewport vp = SetupScreenshotViewport(t, width, height);
285
286 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName()), LargeWorldCallback, &vp, vp.width, vp.height,
288}
289
297static void HeightmapCallback(void *, void *buffer, uint y, uint, uint n)
298{
299 uint8_t *buf = (uint8_t *)buffer;
300 while (n > 0) {
301 TileIndex ti = TileXY(Map::MaxX(), y);
302 for (uint x = Map::MaxX(); true; x--) {
303 *buf = 256 * TileHeight(ti) / (1 + _heightmap_highest_peak);
304 buf++;
305 if (x == 0) break;
306 ti = TileAddXY(ti, -1, 0);
307 }
308 y++;
309 n--;
310 }
311}
312
317bool MakeHeightmapScreenshot(const char *filename)
318{
319 auto provider = GetScreenshotProvider();
320 if (provider == nullptr) return false;
321
322 Colour palette[256];
323 for (uint i = 0; i < lengthof(palette); i++) {
324 palette[i].a = 0xff;
325 palette[i].r = i;
326 palette[i].g = i;
327 palette[i].b = i;
328 }
329
331 for (const auto tile : Map::Iterate()) {
332 uint h = TileHeight(tile);
334 }
335
336 return provider->MakeImage(filename, HeightmapCallback, nullptr, Map::SizeX(), Map::SizeY(), 8, palette);
337}
338
340
345static void ScreenshotConfirmationCallback(Window *, bool confirmed)
346{
347 if (confirmed) MakeScreenshot(_confirmed_screenshot_type, {});
348}
349
357{
359
360 bool heightmap_or_minimap = t == SC_HEIGHTMAP || t == SC_MINIMAP;
361 uint64_t width = (heightmap_or_minimap ? Map::SizeX() : vp.width);
362 uint64_t height = (heightmap_or_minimap ? Map::SizeY() : vp.height);
363
364 if (width * height > 8192 * 8192) {
365 /* Ask for confirmation */
367 ShowQuery(
368 GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_CAPTION),
369 GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_MESSAGE, width, height), nullptr, ScreenshotConfirmationCallback);
370 } else {
371 /* Less than 64M pixels, just do it */
372 MakeScreenshot(t, {});
373 }
374}
375
384static bool RealMakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
385{
386 if (t == SC_VIEWPORT) {
387 /* First draw the dirty parts of the screen and only then change the name
388 * of the screenshot. This way the screenshot will always show the name
389 * of the previous screenshot in the 'successful' message instead of the
390 * name of the new screenshot (or an empty name). */
392 UndrawMouseCursor();
395 }
396
397 _screenshot_name = name;
398
399 bool ret;
400 switch (t) {
401 case SC_VIEWPORT:
402 ret = MakeSmallScreenshot(false);
403 break;
404
405 case SC_CRASHLOG:
406 ret = MakeSmallScreenshot(true);
407 break;
408
409 case SC_ZOOMEDIN:
410 case SC_DEFAULTZOOM:
411 ret = MakeLargeWorldScreenshot(t, width, height);
412 break;
413
414 case SC_WORLD:
416 break;
417
418 case SC_HEIGHTMAP: {
419 auto provider = GetScreenshotProvider();
420 if (provider == nullptr) {
421 ret = false;
422 } else {
423 ret = MakeHeightmapScreenshot(MakeScreenshotName(HEIGHTMAP_NAME, provider->GetName()));
424 }
425 break;
426 }
427
428 case SC_MINIMAP:
430 break;
431
432 default:
433 NOT_REACHED();
434 }
435
436 if (ret) {
437 if (t == SC_HEIGHTMAP) {
438 ShowErrorMessage(GetEncodedString(STR_MESSAGE_HEIGHTMAP_SUCCESSFULLY, _screenshot_name, _heightmap_highest_peak), {}, WL_WARNING);
439 } else {
440 ShowErrorMessage(GetEncodedString(STR_MESSAGE_SCREENSHOT_SUCCESSFULLY, _screenshot_name), {}, WL_WARNING);
441 }
442 } else {
443 ShowErrorMessage(GetEncodedString(STR_ERROR_SCREENSHOT_FAILED), {}, WL_ERROR);
444 }
445
446 return ret;
447}
448
459bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
460{
461 if (t == SC_CRASHLOG) {
462 /* Video buffer might or might not be locked. */
464
465 return RealMakeScreenshot(t, name, width, height);
466 }
467
468 VideoDriver::GetInstance()->QueueOnMainThread([=] { // Capture by value to not break scope.
469 RealMakeScreenshot(t, name, width, height);
470 });
471
472 return true;
473}
474
475
476static void MinimapScreenCallback(void *, void *buf, uint y, uint pitch, uint n)
477{
478 uint32_t *ubuf = (uint32_t *)buf;
479 uint num = (pitch * n);
480 for (uint i = 0; i < num; i++) {
481 uint row = y + (int)(i / pitch);
482 uint col = (Map::SizeX() - 1) - (i % pitch);
483
484 TileIndex tile = TileXY(col, row);
485 uint8_t val = GetSmallMapOwnerPixels(tile, GetTileType(tile), IncludeHeightmap::Never) & 0xFF;
486
487 uint32_t colour_buf = 0;
488 colour_buf = (_cur_palette.palette[val].b << 0);
489 colour_buf |= (_cur_palette.palette[val].g << 8);
490 colour_buf |= (_cur_palette.palette[val].r << 16);
491
492 *ubuf = colour_buf;
493 ubuf++; // Skip alpha
494 }
495}
496
501{
502 auto provider = GetScreenshotProvider();
503 if (provider == nullptr) return false;
504
505 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName()), MinimapScreenCallback, nullptr, Map::SizeX(), Map::SizeY(), 32, _cur_palette.palette);
506}
Class for backupping variables and making sure they are restored later.
static Blitter * GetCurrentBlitter()
Get the current active blitter (always set by calling SelectBlitter).
Definition factory.hpp:136
How all blitters should look like.
Definition base.hpp:29
virtual void * MoveTo(void *video, int x, int y)=0
Move the destination pointer the requested amount x and y, keeping in mind any pitch and bpp of the r...
virtual uint8_t GetScreenDepth()=0
Get the screen depth this blitter works for.
virtual void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch)=0
Copy from the screen to a buffer in a palette format for 8bpp and RGBA format for 32bpp.
static std::vector< TProviderType * > & GetProviders()
Get the currently known sound loaders.
Base interface for a SoundLoader implementation.
void QueueOnMainThread(std::function< void()> &&func)
Queue a function to be called on the main thread with game state lock held and video buffer locked.
static VideoDriver * GetInstance()
Get the currently active instance of the video driver.
CompanyID _local_company
Company controlled by the human player at this client. Can also be COMPANY_SPECTATOR.
Functions related to companies.
static constexpr CompanyID COMPANY_SPECTATOR
The client is spectating.
Functions related to errors.
@ WL_WARNING
Other information.
Definition error.h:25
@ WL_ERROR
Errors (eg. saving/loading failed)
Definition error.h:26
void ShowErrorMessage(EncodedString &&summary_msg, int x, int y, CommandCost &cc)
Display an error message in a window.
Factory to 'query' all available blitters.
std::string _personal_dir
custom directory for personal settings, saves, newgrf, etc.
Definition fileio.cpp:868
bool FileExists(const std::string &filename)
Test whether the given filename exists.
Definition fileio.cpp:132
Functions for Standard In/Out file operations.
const char * FiosGetScreenshotDir()
Get the directory for screenshots.
Definition fios.cpp:600
bool _screen_disable_anim
Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
Definition gfx.cpp:46
Functions related to the gfx engine.
Palette _cur_palette
Current palette.
Definition palette.cpp:24
void DrawDirtyBlocks()
Repaints the rectangle blocks which are marked as 'dirty'.
Definition gfx.cpp:1403
Functions related to OTTD's landscape.
Point RemapCoords(int x, int y, int z)
Map 3D world or tile coordinate to equivalent 2D coordinate as used in the viewports and smallmap.
Definition landscape.h:79
TileIndex TileAddXY(TileIndex tile, int x, int y)
Adds a given offset to a tile.
Definition map_func.h:469
static debug_inline TileIndex TileXY(uint x, uint y)
Returns the TileIndex of a coordinate.
Definition map_func.h:372
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
Definition map_func.h:424
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.
Definition map_func.h:414
void ShowQuery(EncodedString &&caption, EncodedString &&message, Window *parent, QueryCallbackProc *callback, bool focus)
Show a confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre o...
A number of safeguards to prevent using unsafe methods.
std::string GenerateDefaultSaveName()
Get the default name for a savegame or screenshot.
Functions/types related to saving and loading games.
static void CurrentScreenCallback(void *, void *buf, uint y, uint pitch, uint n)
Callback of the screenshot generator that dumps the current video buffer.
static void ScreenshotConfirmationCallback(Window *, bool confirmed)
Callback on the confirmation window for huge screenshots.
static bool RealMakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
Make a screenshot.
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
static ScreenshotType _confirmed_screenshot_type
Screenshot type the current query is about to confirm.
std::string _screenshot_format_name
Extension of the current screenshot format.
static bool MakeSmallScreenshot(bool crashlog)
Make a screenshot of the current screen.
static void HeightmapCallback(void *, void *buffer, uint y, uint, uint n)
Callback for generating a heightmap.
bool MakeHeightmapScreenshot(const char *filename)
Make a heightmap of the current map.
static const char *const SCREENSHOT_NAME
Default filename of a saved screenshot.
bool MakeMinimapWorldScreenshot()
Make a minimap screenshot.
static bool MakeLargeWorldScreenshot(ScreenshotType t, uint32_t width=0, uint32_t height=0)
Make a screenshot of the map.
std::string_view GetCurrentScreenshotExtension()
Get filename extension of current screenshot file format.
static std::string _screenshot_name
Filename of the screenshot file.
static ScreenshotProvider * GetScreenshotProvider()
Get the screenshot provider for the selected format.
bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
Schedule making a screenshot.
std::string _full_screenshot_path
Pathname of the screenshot file.
static void LargeWorldCallback(void *userdata, void *buf, uint y, uint pitch, uint n)
generate a large piece of the world
static const char *const HEIGHTMAP_NAME
Default filename of a saved heightmap.
uint _heightmap_highest_peak
When saving a heightmap, this contains the highest peak on the map.
static Viewport SetupScreenshotViewport(ScreenshotType t, uint32_t width=0, uint32_t height=0)
Configure a Viewport for rendering (a part of) the map into a screenshot.
static const char * MakeScreenshotName(std::string_view default_fn, std::string_view ext, bool crashlog=false)
Construct a pathname for a screenshot file.
Functions to make screenshots.
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
void SetScreenshotWindowVisibility(bool hide)
Set the visibility of the screenshot window when taking a screenshot.
GUI functions related to screenshots.
Types related to screenshot providers.
GameSettings _settings_game
Game settings of a running game or the scenario editor.
Definition settings.cpp:59
ClientSettings _settings_client
The current settings for this game.
Definition settings.cpp:58
uint32_t GetSmallMapOwnerPixels(TileIndex tile, TileType t, IncludeHeightmap include_heightmap)
Return the colour a tile would be displayed with in the small map in mode "Owner".
Smallmap GUI functions.
@ Never
Never include the heightmap.
Definition of base types and functions in a cross-platform compatible way.
#define lengthof(array)
Return the length of an fixed size array.
Definition stdafx.h:271
EncodedString GetEncodedString(StringID str)
Encode a string with no parameters into an encoded string.
Definition strings.cpp:91
Functions related to OTTD's strings.
Class to backup a specific variable and restore it upon destruction of this object to prevent stack v...
GUISettings gui
settings related to the GUI
bool freeform_edges
allow terraforming the tiles at the map edges
Data about how and where to blit pixels.
Definition gfx_type.h:158
ZoomLevel zoom_min
minimum zoom out level
ConstructionSettings construction
construction of things in-game
static uint SizeY()
Get the size of the map along the Y.
Definition map_func.h:278
static IterateWrapper Iterate()
Returns an iterable ensemble of all Tiles.
Definition map_func.h:362
static debug_inline uint SizeX()
Get the size of the map along the X.
Definition map_func.h:269
static debug_inline uint Size()
Get the size of the map.
Definition map_func.h:287
static debug_inline uint MaxX()
Gets the maximum X coordinate within the map, including MP_VOID.
Definition map_func.h:296
Colour palette[256]
Current palette. Entry 0 has to be always fully transparent!
Definition gfx_type.h:363
Helper struct to ensure the video buffer is locked and ready for drawing.
Data structure for viewport, display of a part of the world.
int top
Screen coordinate top edge of the viewport.
int width
Screen width of the viewport.
ZoomLevel zoom
The zoom level of the viewport.
int virtual_top
Virtual top coordinate.
int virtual_left
Virtual left coordinate.
int left
Screen coordinate left edge of the viewport.
int height
Screen height of the viewport.
Data structure for an opened window.
Definition window_gui.h:274
std::unique_ptr< ViewportData > viewport
Pointer to viewport data, if present.
Definition window_gui.h:319
Stuff related to the text buffer GUI.
Map writing/reading functions for tiles.
static debug_inline TileType GetTileType(Tile tile)
Get the tiletype of a given tile.
Definition tile_map.h:96
uint TilePixelHeight(Tile tile)
Returns the height of a tile in pixels.
Definition tile_map.h:72
static debug_inline uint TileHeight(Tile tile)
Returns the height of a tile.
Definition tile_map.h:29
static const uint TILE_SIZE
Tile size in world coordinates.
Definition tile_type.h:15
Base of all video drivers.
Functions related to (drawing on) viewports.
std::mutex lock
synchronization for playback status fields
Definition win32_m.cpp:36
Window * GetMainWindow()
Get the main window, i.e.
Definition window.cpp:1130
Window functions not directly related to making/drawing windows.
Functions, definitions and such used only by the GUI.
Functions related to zooming.
int ScaleByZoom(int value, ZoomLevel zoom)
Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_MIN) When shifting right,...
Definition zoom_func.h:22
int UnScaleByZoom(int value, ZoomLevel zoom)
Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_MIN) When shifting right,...
Definition zoom_func.h:34
@ ZOOM_LVL_WORLD_SCREENSHOT
Default zoom level for the world screen shot.
Definition zoom_type.h:36
@ ZOOM_LVL_VIEWPORT
Default zoom level for viewports.
Definition zoom_type.h:28