1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 10:52:41 +01:00

Add: Make smallmap clear to water instead of black if infinite water enabled. (#15041)

This commit is contained in:
J
2026-01-05 19:12:31 +00:00
committed by GitHub
parent 50e890eeb5
commit 710c78a0bb

View File

@@ -1059,8 +1059,9 @@ protected:
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
AutoRestoreBackup dpi_backup(_cur_dpi, dpi);
/* Clear it */
GfxFillRect(dpi->left, dpi->top, dpi->left + dpi->width - 1, dpi->top + dpi->height - 1, PC_BLACK);
/* If freeform edges are off, draw infinite water off the edges of the map. */
const PixelColour map_clear_color = (_settings_game.construction.freeform_edges ? PC_BLACK : PC_WATER);
GfxFillRect(dpi->left, dpi->top, dpi->left + dpi->width - 1, dpi->top + dpi->height - 1, map_clear_color);
/* Which tile is displayed at (dpi->left, dpi->top)? */
int dx;