OpenTTD Source 20250528-master-g3aca5d62a8
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 std::string_view SCREENSHOT_NAME = "screenshot";
37static const std::string_view 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 *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(Viewport &vp, void *buf, uint y, uint pitch, uint n)
89{
90 DrawPixelInfo dpi{
91 .dst_ptr = buf,
92 .left = 0,
93 .top = static_cast<int>(y),
94 .width = vp.width,
95 .height = static_cast<int>(n),
96 .pitch = static_cast<int>(pitch),
98 };
99
100 /* We are no longer rendering to the screen */
101 AutoRestoreBackup screen_backup(_screen, {
102 .dst_ptr = buf,
103 .left = 0,
104 .top = 0,
105 .width = static_cast<int>(pitch),
106 .height = static_cast<int>(n),
107 .pitch = static_cast<int>(pitch),
108 .zoom = ZoomLevel::Min
109 });
110 AutoRestoreBackup disable_anim_backup(_screen_disable_anim, true);
111 AutoRestoreBackup dpi_backup(_cur_dpi, &dpi);
112
113 /* Render viewport in blocks of 1600 pixels width */
114 int left = 0;
115 while (vp.width - left != 0) {
116 int wx = std::min(vp.width - left, 1600);
117 left += wx;
118
119 ViewportDoDraw(vp,
120 ScaleByZoom(left - wx - vp.left, vp.zoom) + vp.virtual_left,
121 ScaleByZoom(y - vp.top, vp.zoom) + vp.virtual_top,
122 ScaleByZoom(left - vp.left, vp.zoom) + vp.virtual_left,
123 ScaleByZoom((y + n) - vp.top, vp.zoom) + vp.virtual_top
124 );
125 }
126}
127
135static std::string_view MakeScreenshotName(std::string_view default_fn, std::string_view ext, bool crashlog = false)
136{
137 bool generate = _screenshot_name.empty();
138
139 if (generate) {
140 if (_game_mode == GM_EDITOR || _game_mode == GM_MENU || _local_company == COMPANY_SPECTATOR) {
141 _screenshot_name = default_fn;
142 } else {
144 }
145 }
146
147 /* Handle user-specified filenames ending in # with automatic numbering */
148 if (_screenshot_name.ends_with("#")) {
149 generate = true;
150 _screenshot_name.pop_back();
151 }
152
153 size_t len = _screenshot_name.size();
154 /* Add extension to screenshot file */
155 format_append(_screenshot_name, ".{}", ext);
156
157 std::string_view screenshot_dir = crashlog ? _personal_dir : FiosGetScreenshotDir();
158
159 for (uint serial = 1;; serial++) {
160 _full_screenshot_path = fmt::format("{}{}", screenshot_dir, _screenshot_name);
161
162 if (!generate) break; // allow overwriting of non-automatic filenames
164 /* If file exists try another one with same name, but just with a higher index */
165 _screenshot_name.erase(len);
166 format_append(_screenshot_name, "#{}.{}", serial, ext);
167 }
168
170}
171
173static bool MakeSmallScreenshot(bool crashlog)
174{
175 auto provider = GetScreenshotProvider();
176 if (provider == nullptr) return false;
177
178 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName(), crashlog), CurrentScreenCallback, _screen.width, _screen.height,
180}
181
189static Viewport SetupScreenshotViewport(ScreenshotType t, uint32_t width = 0, uint32_t height = 0)
190{
191 Viewport vp{};
192
193 switch(t) {
194 case SC_VIEWPORT:
195 case SC_CRASHLOG: {
196 assert(width == 0 && height == 0);
197
198 Window *w = GetMainWindow();
199 vp.virtual_left = w->viewport->virtual_left;
200 vp.virtual_top = w->viewport->virtual_top;
201 vp.virtual_width = w->viewport->virtual_width;
202 vp.virtual_height = w->viewport->virtual_height;
203
204 /* Compute pixel coordinates */
205 vp.left = 0;
206 vp.top = 0;
207 vp.width = _screen.width;
208 vp.height = _screen.height;
209 vp.overlay = w->viewport->overlay;
210 break;
211 }
212 case SC_WORLD: {
213 assert(width == 0 && height == 0);
214
215 /* Determine world coordinates of screenshot */
217
219 TileIndex south_tile{Map::Size() - 1};
220
221 /* We need to account for a hill or high building at tile 0,0. */
222 int extra_height_top = TilePixelHeight(north_tile) + 150;
223 /* If there is a hill at the bottom don't create a large black area. */
224 int reclaim_height_bottom = TilePixelHeight(south_tile);
225
226 vp.virtual_left = RemapCoords(TileX(south_tile) * TILE_SIZE, TileY(north_tile) * TILE_SIZE, 0).x;
227 vp.virtual_top = RemapCoords(TileX(north_tile) * TILE_SIZE, TileY(north_tile) * TILE_SIZE, extra_height_top).y;
228 vp.virtual_width = RemapCoords(TileX(north_tile) * TILE_SIZE, TileY(south_tile) * TILE_SIZE, 0).x - vp.virtual_left + 1;
229 vp.virtual_height = RemapCoords(TileX(south_tile) * TILE_SIZE, TileY(south_tile) * TILE_SIZE, reclaim_height_bottom).y - vp.virtual_top + 1;
230
231 /* Compute pixel coordinates */
232 vp.left = 0;
233 vp.top = 0;
234 vp.width = UnScaleByZoom(vp.virtual_width, vp.zoom);
235 vp.height = UnScaleByZoom(vp.virtual_height, vp.zoom);
236 vp.overlay = nullptr;
237 break;
238 }
239 default: {
241
242 Window *w = GetMainWindow();
243 vp.virtual_left = w->viewport->virtual_left;
244 vp.virtual_top = w->viewport->virtual_top;
245
246 if (width == 0 || height == 0) {
247 vp.virtual_width = w->viewport->virtual_width;
248 vp.virtual_height = w->viewport->virtual_height;
249 } else {
250 vp.virtual_width = width << to_underlying(vp.zoom);
251 vp.virtual_height = height << to_underlying(vp.zoom);
252 }
253
254 /* Compute pixel coordinates */
255 vp.left = 0;
256 vp.top = 0;
257 vp.width = UnScaleByZoom(vp.virtual_width, vp.zoom);
258 vp.height = UnScaleByZoom(vp.virtual_height, vp.zoom);
259 vp.overlay = nullptr;
260 break;
261 }
262 }
263
264 return vp;
265}
266
274static bool MakeLargeWorldScreenshot(ScreenshotType t, uint32_t width = 0, uint32_t height = 0)
275{
276 auto provider = GetScreenshotProvider();
277 if (provider == nullptr) return false;
278
279 Viewport vp = SetupScreenshotViewport(t, width, height);
280
281 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName()),
282 [&](void *buf, uint y, uint pitch, uint n) {
283 LargeWorldCallback(vp, buf, y, pitch, n);
285}
286
294static void HeightmapCallback(void *buffer, uint y, uint, uint n)
295{
296 uint8_t *buf = (uint8_t *)buffer;
297 while (n > 0) {
298 TileIndex ti = TileXY(Map::MaxX(), y);
299 for (uint x = Map::MaxX(); true; x--) {
300 *buf = 256 * TileHeight(ti) / (1 + _heightmap_highest_peak);
301 buf++;
302 if (x == 0) break;
303 ti = TileAddXY(ti, -1, 0);
304 }
305 y++;
306 n--;
307 }
308}
309
314bool MakeHeightmapScreenshot(std::string_view filename)
315{
316 auto provider = GetScreenshotProvider();
317 if (provider == nullptr) return false;
318
319 Colour palette[256];
320 for (uint i = 0; i < lengthof(palette); i++) {
321 palette[i].a = 0xff;
322 palette[i].r = i;
323 palette[i].g = i;
324 palette[i].b = i;
325 }
326
328 for (const auto tile : Map::Iterate()) {
329 uint h = TileHeight(tile);
331 }
332
333 return provider->MakeImage(filename, HeightmapCallback, Map::SizeX(), Map::SizeY(), 8, palette);
334}
335
337
342static void ScreenshotConfirmationCallback(Window *, bool confirmed)
343{
344 if (confirmed) MakeScreenshot(_confirmed_screenshot_type, {});
345}
346
354{
356
357 bool heightmap_or_minimap = t == SC_HEIGHTMAP || t == SC_MINIMAP;
358 uint64_t width = (heightmap_or_minimap ? Map::SizeX() : vp.width);
359 uint64_t height = (heightmap_or_minimap ? Map::SizeY() : vp.height);
360
361 if (width * height > 8192 * 8192) {
362 /* Ask for confirmation */
364 ShowQuery(
365 GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_CAPTION),
366 GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_MESSAGE, width, height), nullptr, ScreenshotConfirmationCallback);
367 } else {
368 /* Less than 64M pixels, just do it */
369 MakeScreenshot(t, {});
370 }
371}
372
381static bool RealMakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
382{
383 if (t == SC_VIEWPORT) {
384 /* First draw the dirty parts of the screen and only then change the name
385 * of the screenshot. This way the screenshot will always show the name
386 * of the previous screenshot in the 'successful' message instead of the
387 * name of the new screenshot (or an empty name). */
389 UndrawMouseCursor();
392 }
393
394 _screenshot_name = name;
395
396 bool ret;
397 switch (t) {
398 case SC_VIEWPORT:
399 ret = MakeSmallScreenshot(false);
400 break;
401
402 case SC_CRASHLOG:
403 ret = MakeSmallScreenshot(true);
404 break;
405
406 case SC_ZOOMEDIN:
407 case SC_DEFAULTZOOM:
408 ret = MakeLargeWorldScreenshot(t, width, height);
409 break;
410
411 case SC_WORLD:
413 break;
414
415 case SC_HEIGHTMAP: {
416 auto provider = GetScreenshotProvider();
417 if (provider == nullptr) {
418 ret = false;
419 } else {
420 ret = MakeHeightmapScreenshot(MakeScreenshotName(HEIGHTMAP_NAME, provider->GetName()));
421 }
422 break;
423 }
424
425 case SC_MINIMAP:
427 break;
428
429 default:
430 NOT_REACHED();
431 }
432
433 if (ret) {
434 if (t == SC_HEIGHTMAP) {
435 ShowErrorMessage(GetEncodedString(STR_MESSAGE_HEIGHTMAP_SUCCESSFULLY, _screenshot_name, _heightmap_highest_peak), {}, WL_WARNING);
436 } else {
437 ShowErrorMessage(GetEncodedString(STR_MESSAGE_SCREENSHOT_SUCCESSFULLY, _screenshot_name), {}, WL_WARNING);
438 }
439 } else {
440 ShowErrorMessage(GetEncodedString(STR_ERROR_SCREENSHOT_FAILED), {}, WL_ERROR);
441 }
442
443 return ret;
444}
445
456bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
457{
458 if (t == SC_CRASHLOG) {
459 /* Video buffer might or might not be locked. */
461
462 return RealMakeScreenshot(t, name, width, height);
463 }
464
465 VideoDriver::GetInstance()->QueueOnMainThread([=] { // Capture by value to not break scope.
466 RealMakeScreenshot(t, name, width, height);
467 });
468
469 return true;
470}
471
472
473static void MinimapScreenCallback(void *buf, uint y, uint pitch, uint n)
474{
475 uint32_t *ubuf = (uint32_t *)buf;
476 uint num = (pitch * n);
477 for (uint i = 0; i < num; i++) {
478 uint row = y + (int)(i / pitch);
479 uint col = (Map::SizeX() - 1) - (i % pitch);
480
481 TileIndex tile = TileXY(col, row);
482 uint8_t val = GetSmallMapOwnerPixels(tile, GetTileType(tile), IncludeHeightmap::Never) & 0xFF;
483
484 uint32_t colour_buf = 0;
485 colour_buf = (_cur_palette.palette[val].b << 0);
486 colour_buf |= (_cur_palette.palette[val].g << 8);
487 colour_buf |= (_cur_palette.palette[val].r << 16);
488
489 *ubuf = colour_buf;
490 ubuf++; // Skip alpha
491 }
492}
493
498{
499 auto provider = GetScreenshotProvider();
500 if (provider == nullptr) return false;
501
502 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName()), MinimapScreenCallback, Map::SizeX(), Map::SizeY(), 32, _cur_palette.palette);
503}
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.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23)
Definition enum_type.hpp:17
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(std::string_view filename)
Test whether the given filename exists.
Definition fileio.cpp:132
Functions for Standard In/Out file operations.
std::string_view FiosGetScreenshotDir()
Get the directory for screenshots.
Definition fios.cpp:591
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:1438
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 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.
static const std::string_view HEIGHTMAP_NAME
Default filename of a saved heightmap.
std::string _screenshot_format_name
Extension of the current screenshot format.
static bool MakeSmallScreenshot(bool crashlog)
Make a screenshot of the current screen.
bool MakeMinimapWorldScreenshot()
Make a minimap screenshot.
static void HeightmapCallback(void *buffer, uint y, uint, uint n)
Callback for generating a heightmap.
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.
static void CurrentScreenCallback(void *buf, uint y, uint pitch, uint n)
Callback of the screenshot generator that dumps the current video buffer.
bool MakeScreenshot(ScreenshotType t, const std::string &name, uint32_t width, uint32_t height)
Schedule making a screenshot.
static void LargeWorldCallback(Viewport &vp, void *buf, uint y, uint pitch, uint n)
generate a large piece of the world
std::string _full_screenshot_path
Pathname of the screenshot file.
bool MakeHeightmapScreenshot(std::string_view filename)
Make a heightmap of the current map.
static std::string_view MakeScreenshotName(std::string_view default_fn, std::string_view ext, bool crashlog=false)
Construct a pathname for a screenshot file.
uint _heightmap_highest_peak
When saving a heightmap, this contains the highest peak on the map.
static const std::string_view SCREENSHOT_NAME
Default filename of a saved screenshot.
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.
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:61
ClientSettings _settings_client
The current settings for this game.
Definition settings.cpp:60
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:369
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:273
std::unique_ptr< ViewportData > viewport
Pointer to viewport data, if present.
Definition window_gui.h:318
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:35
Window * GetMainWindow()
Get the main window, i.e.
Definition window.cpp:1169
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 > ZoomLevel::Min) When shifting right,...
Definition zoom_func.h:22
int UnScaleByZoom(int value, ZoomLevel zoom)
Scale by zoom level, usually shift right (when zoom > ZoomLevel::Min) When shifting right,...
Definition zoom_func.h:34
@ Min
Minimum zoom level.
@ WorldScreenshot
Default zoom level for the world screen shot.
@ Viewport
Default zoom level for viewports.