summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-04 10:38:25 +0100
committerPatric Stout <github@truebrain.nl>2021-03-04 22:23:05 +0100
commit8c6b5e52fdf0c638315a6768ba4ac047b13a082d (patch)
tree5586ac770a2c5c6b522a57da6c4bc6dfbaf6cd53
parentac5e77ea3b3e8e769d2198b0e8f4b6e56bb8fc91 (diff)
downloadopenttd-8c6b5e52fdf0c638315a6768ba4ac047b13a082d.tar.xz
Add: allow making heightmap screenshot via console
-rw-r--r--src/console_cmds.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 3f454b1aa..621c1758c 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1409,11 +1409,12 @@ DEF_CONSOLE_CMD(ConAlias)
DEF_CONSOLE_CMD(ConScreenShot)
{
if (argc == 0) {
- IConsoleHelp("Create a screenshot of the game. Usage: 'screenshot [viewport | normal | big | giant | minimap] [no_con] [size <width> <height>] [<filename>]'");
+ IConsoleHelp("Create a screenshot of the game. Usage: 'screenshot [viewport | normal | big | giant | heightmap | minimap] [no_con] [size <width> <height>] [<filename>]'");
IConsoleHelp("'viewport' (default) makes a screenshot of the current viewport (including menus, windows, ..), "
"'normal' makes a screenshot of the visible area, "
"'big' makes a zoomed-in screenshot of the visible area, "
"'giant' makes a screenshot of the whole map, "
+ "'heightmap' makes a heightmap screenshot of the map that can be loaded in as heightmap, "
"'minimap' makes a top-viewed minimap screenshot of the whole world which represents one tile by one pixel. "
"'no_con' hides the console to create the screenshot (only useful in combination with 'viewport'). "
"'size' sets the width and height of the viewport to make a screenshot of (only useful in combination with 'normal' or 'big').");
@@ -1441,6 +1442,9 @@ DEF_CONSOLE_CMD(ConScreenShot)
} else if (strcmp(argv[arg_index], "giant") == 0) {
type = SC_WORLD;
arg_index += 1;
+ } else if (strcmp(argv[arg_index], "heightmap") == 0) {
+ type = SC_HEIGHTMAP;
+ arg_index += 1;
} else if (strcmp(argv[arg_index], "minimap") == 0) {
type = SC_MINIMAP;
arg_index += 1;