mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add no-peeps and no-sprites options
This commit is contained in:
parent
9b874f8abe
commit
59df0a9941
|
@ -21,7 +21,9 @@ static ScreenshotOptions options;
|
|||
|
||||
static const CommandLineOptionDefinition ScreenshotOptionsDef[]
|
||||
{
|
||||
{ CMDLINE_TYPE_INTEGER, &options.weather, NAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
|
||||
{ CMDLINE_TYPE_INTEGER, &options.weather, NAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
|
||||
{ CMDLINE_TYPE_SWITCH, &options.hide_guests, NAC, "no-peeps", "hide peeps" },
|
||||
{ CMDLINE_TYPE_SWITCH, &options.hide_sprites, NAC, "no-sprites", "hide all sprites (e.g. balloons, vehicles, guests)" },
|
||||
OptionTableEnd
|
||||
};
|
||||
|
||||
|
|
|
@ -522,6 +522,16 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption
|
|||
dpi.zoom_level = 0;
|
||||
dpi.bits = (uint8 *)malloc(dpi.width * dpi.height);
|
||||
|
||||
if (options->hide_guests)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_INVISIBLE_PEEPS;
|
||||
}
|
||||
|
||||
if (options->hide_sprites)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_INVISIBLE_SPRITES;
|
||||
}
|
||||
|
||||
viewport_render(&dpi, &viewport, 0, 0, viewport.width, viewport.height);
|
||||
|
||||
rct_palette renderedPalette;
|
||||
|
|
|
@ -29,6 +29,8 @@ extern "C"
|
|||
struct ScreenshotOptions
|
||||
{
|
||||
sint32 weather = 0;
|
||||
bool hide_guests = false;
|
||||
bool hide_sprites = false;
|
||||
};
|
||||
|
||||
void screenshot_check();
|
||||
|
|
Loading…
Reference in New Issue