mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Implement #1260: --transparent switch for screenshot command
This commit is contained in:
@@ -562,6 +562,8 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption
|
||||
dpi.bits = (uint8_t*)malloc(dpi.width * dpi.height);
|
||||
dpi.DrawingEngine = context->GetDrawingEngine();
|
||||
|
||||
std::memset(dpi.bits, PALETTE_INDEX_0, dpi.width * dpi.height);
|
||||
|
||||
if (options->hide_guests)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_INVISIBLE_PEEPS;
|
||||
@@ -597,6 +599,11 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption
|
||||
CheatsSet(CheatType::RemoveLitter);
|
||||
}
|
||||
|
||||
if (options->transparent)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
|
||||
}
|
||||
|
||||
viewport_render(&dpi, &viewport, 0, 0, viewport.width, viewport.height);
|
||||
|
||||
rct_palette renderedPalette;
|
||||
|
||||
Reference in New Issue
Block a user