diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index b8a459e133..f7fc8e3ac1 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -892,7 +892,7 @@ STR_0886 :Quit Game STR_0887 :Quit Scenario Editor STR_0888 :Quit Roller Coaster Designer STR_0889 :Quit Track Designs Manager -STR_0890 :SCR{COMMA16}.BMP +STR_0890 : STR_0891 :Screenshot STR_0892 :Screenshot saved to disk as '{STRINGID}' STR_0893 :Screenshot failed ! diff --git a/src/config.c b/src/config.c index 12d64d1109..246e91aa37 100644 --- a/src/config.c +++ b/src/config.c @@ -90,12 +90,6 @@ typedef struct config_section_definition { #pragma region Enum definitions -config_enum_definition _screenShotFormatEnum[] = { - { "BMP", SCREENSHOT_FORMAT_BMP }, - { "PNG", SCREENSHOT_FORMAT_PNG }, - END_OF_ENUM -}; - config_enum_definition _measurementFormatEnum[] = { { "IMPERIAL", MEASUREMENT_FORMAT_IMPERIAL }, { "METRIC", MEASUREMENT_FORMAT_METRIC }, @@ -180,7 +174,6 @@ config_property_definition _generalDefinitions[] = { { offsetof(general_configuration, play_intro), "play_intro", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, { offsetof(general_configuration, save_plugin_data), "save_plugin_data", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, { offsetof(general_configuration, debugging_tools), "debugging_tools", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, - { offsetof(general_configuration, screenshot_format), "screenshot_format", CONFIG_VALUE_TYPE_UINT8, SCREENSHOT_FORMAT_PNG, _screenShotFormatEnum }, { offsetof(general_configuration, show_height_as_units), "show_height_as_units", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, { offsetof(general_configuration, temperature_format), "temperature_format", CONFIG_VALUE_TYPE_UINT8, TEMPERATURE_FORMAT_C, _temperatureFormatEnum }, { offsetof(general_configuration, window_height), "window_height", CONFIG_VALUE_TYPE_SINT32, -1, NULL }, diff --git a/src/config.h b/src/config.h index 5eb7e57827..dd742489a0 100644 --- a/src/config.h +++ b/src/config.h @@ -82,11 +82,6 @@ enum { SHORTCUT_COUNT }; -enum { - SCREENSHOT_FORMAT_BMP, - SCREENSHOT_FORMAT_PNG -}; - enum { TEMPERATURE_FORMAT_C, TEMPERATURE_FORMAT_F diff --git a/src/interface/screenshot.c b/src/interface/screenshot.c index 8562403a6c..be7d454aba 100644 --- a/src/interface/screenshot.c +++ b/src/interface/screenshot.c @@ -29,9 +29,6 @@ #include "screenshot.h" #include "viewport.h" -static const char *_screenshot_format_extension[] = { ".bmp", ".png" }; - -static int screenshot_dump_bmp(); static int screenshot_dump_png(); /** @@ -75,7 +72,7 @@ static void screenshot_get_rendered_palette(rct_palette* palette) { } } -static int screenshot_get_next_path(char *path, int format) +static int screenshot_get_next_path(char *path) { char screenshotPath[MAX_PATH]; @@ -90,7 +87,7 @@ static int screenshot_get_next_path(char *path, int format) set_format_arg(0, uint16, i); // Glue together path and filename - sprintf(path, "%sSCR%d%s", screenshotPath, i, _screenshot_format_extension[format]); + sprintf(path, "%sSCR%d.png", screenshotPath, i); if (!platform_file_exists(path)) { return i; @@ -103,39 +100,7 @@ static int screenshot_get_next_path(char *path, int format) int screenshot_dump() { - switch (gConfigGeneral.screenshot_format) { - case SCREENSHOT_FORMAT_BMP: - return screenshot_dump_bmp(); - case SCREENSHOT_FORMAT_PNG: - return screenshot_dump_png(); - default: - return -1; - } -} - -/** - * - * rct2: 0x00683D20 - */ -int screenshot_dump_bmp() -{ - // Get a free screenshot path - int index; - char path[MAX_PATH] = ""; - if ((index = screenshot_get_next_path(path, SCREENSHOT_FORMAT_BMP)) == -1) { - return -1; - } - - rct_drawpixelinfo *dpi = &gScreenDPI; - - rct_palette renderedPalette; - screenshot_get_rendered_palette(&renderedPalette); - - if (image_io_bmp_write(dpi, &renderedPalette, path)) { - return index; - } else { - return -1; - } + return screenshot_dump_png(); } int screenshot_dump_png() @@ -143,7 +108,7 @@ int screenshot_dump_png() // Get a free screenshot path int index; char path[MAX_PATH] = ""; - if ((index = screenshot_get_next_path(path, SCREENSHOT_FORMAT_PNG)) == -1) { + if ((index = screenshot_get_next_path(path)) == -1) { return -1; } @@ -233,7 +198,7 @@ void screenshot_giant() // Get a free screenshot path char path[MAX_PATH]; int index; - if ((index = screenshot_get_next_path(path, SCREENSHOT_FORMAT_PNG)) == -1) { + if ((index = screenshot_get_next_path(path)) == -1) { log_error("Giant screenshot failed, unable to find a suitable destination path."); window_error_open(STR_SCREENSHOT_FAILED, -1); return; diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 2fb66020b7..553eb68e86 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -120,7 +120,6 @@ enum { STR_QUIT_SCENARIO_EDITOR = 887, STR_QUIT_ROLLERCOASTER_DESIGNER = 888, STR_QUIT_TRACK_DESIGNS_MANAGER = 889, - STR_SCR_BMP = 890, STR_SCREENSHOT = 891, STR_SCREENSHOT_SAVED_AS = 892, STR_SCREENSHOT_FAILED = 893,