Add no-peeps and no-sprites options

This commit is contained in:
Hielke Morsink 2017-12-06 16:41:04 +01:00 committed by Richard Jenkins
parent 9b874f8abe
commit 59df0a9941
3 changed files with 15 additions and 1 deletions

View File

@ -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
};

View File

@ -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;

View File

@ -29,6 +29,8 @@ extern "C"
struct ScreenshotOptions
{
sint32 weather = 0;
bool hide_guests = false;
bool hide_sprites = false;
};
void screenshot_check();