1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Add option to command line screenshot to draw debug segment heights

This commit is contained in:
mix
2025-10-21 20:01:01 +01:00
committed by GitHub
parent 1f75cdb275
commit e4958e7314
4 changed files with 20 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
0.4.28 (in development)
------------------------------------------------------------------------
- Feature: [#25286] Footpath area dragging tool.
- Feature: [#25379] Add an option to the command line screenshot function to draw debug segment heights.
- Improved: [#25349] Recent Messages window can now be fully themed.
- Change: [#25089] Peep actions and animations that cause them to stop moving no longer trigger when they are on a level crossing.
- Change: [#25337] Placing track designs with scenery that is obstructed no longer disables all of the scenery.

View File

@@ -17,17 +17,18 @@ namespace OpenRCT2
// clang-format off
static constexpr CommandLineOptionDefinition kScreenshotOptionsDef[]
{
{ CMDLINE_TYPE_INTEGER, &_options.weather, kNAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
{ CMDLINE_TYPE_SWITCH, &_options.hide_guests, kNAC, "no-peeps", "hide peeps" },
{ CMDLINE_TYPE_SWITCH, &_options.hide_sprites, kNAC, "no-sprites", "hide all sprites (e.g. balloons, vehicles, guests)" },
{ CMDLINE_TYPE_SWITCH, &_options.clear_grass, kNAC, "clear-grass", "set all grass to be clear of weeds" },
{ CMDLINE_TYPE_SWITCH, &_options.mowed_grass, kNAC, "mowed-grass", "set all grass to be mowed" },
{ CMDLINE_TYPE_SWITCH, &_options.water_plants, kNAC, "water-plants", "water plants for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.fix_vandalism, kNAC, "fix-vandalism", "fix vandalism for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.remove_litter, kNAC, "remove-litter", "remove litter for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.tidy_up_park, kNAC, "tidy-up-park", "clear grass, water plants, fix vandalism and remove litter" },
{ CMDLINE_TYPE_SWITCH, &_options.transparent, kNAC, "transparent", "make the background transparent" },
{ CMDLINE_TYPE_SWITCH, &_options.draw_bounding_boxes, kNAC, "draw-bounding-boxes", "draw bounding boxes" },
{ CMDLINE_TYPE_INTEGER, &_options.weather, kNAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
{ CMDLINE_TYPE_SWITCH, &_options.hide_guests, kNAC, "no-peeps", "hide peeps" },
{ CMDLINE_TYPE_SWITCH, &_options.hide_sprites, kNAC, "no-sprites", "hide all sprites (e.g. balloons, vehicles, guests)" },
{ CMDLINE_TYPE_SWITCH, &_options.clear_grass, kNAC, "clear-grass", "set all grass to be clear of weeds" },
{ CMDLINE_TYPE_SWITCH, &_options.mowed_grass, kNAC, "mowed-grass", "set all grass to be mowed" },
{ CMDLINE_TYPE_SWITCH, &_options.water_plants, kNAC, "water-plants", "water plants for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.fix_vandalism, kNAC, "fix-vandalism", "fix vandalism for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.remove_litter, kNAC, "remove-litter", "remove litter for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.tidy_up_park, kNAC, "tidy-up-park", "clear grass, water plants, fix vandalism and remove litter" },
{ CMDLINE_TYPE_SWITCH, &_options.transparent, kNAC, "transparent", "make the background transparent" },
{ CMDLINE_TYPE_SWITCH, &_options.draw_bounding_boxes, kNAC, "draw-bounding-boxes", "draw bounding boxes" },
{ CMDLINE_TYPE_SWITCH, &_options.drawSegmentHeights, kNAC, "draw-segment-heights", "draw segment heights" },
kOptionTableEnd
};

View File

@@ -28,6 +28,7 @@
#include "../drawing/X8DrawingEngine.h"
#include "../localisation/Formatter.h"
#include "../paint/Painter.h"
#include "../paint/tile_element/Paint.TileElement.h"
#include "../platform/Platform.h"
#include "../world/Climate.h"
#include "../world/Map.h"
@@ -427,6 +428,11 @@ static void ApplyOptions(const ScreenshotOptions* options, Viewport& viewport)
{
gPaintBoundingBoxes = true;
}
if (options->drawSegmentHeights)
{
gShowSupportSegmentHeights = true;
}
}
int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOptions* options)

View File

@@ -34,6 +34,7 @@ struct ScreenshotOptions
bool tidy_up_park = false;
bool transparent = false;
bool draw_bounding_boxes = false;
bool drawSegmentHeights = false;
};
struct CaptureView