From fe52258fb167bd0f9cc2a38fa3ebbb5950ecf6d8 Mon Sep 17 00:00:00 2001 From: qndel Date: Sat, 21 Oct 2023 20:51:59 +0200 Subject: [PATCH] fix line between doors in lazarus' level --- Source/automap.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index 6eea32c48..e3d3355ed 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -607,8 +607,12 @@ void FixVerticalDoor(const Surface &out, Point center, AutomapTile neTile, uint8 /** * @brief Draw half-tile length lines to connect walls to any walls to the north-west and/or north-east */ -void DrawWallConnections(const Surface &out, Point center, AutomapTile nwTile, AutomapTile neTile, uint8_t colorBright, uint8_t colorDim) +void DrawWallConnections(const Surface &out, Point center, AutomapTile tile, AutomapTile nwTile, AutomapTile neTile, uint8_t colorBright, uint8_t colorDim) { + if (tile.hasFlag(AutomapTile::Flags::HorizontalDoor) && nwTile.hasFlag(AutomapTile::Flags::HorizontalDoor)) { + // fix missing lower half of the line connecting door pairs in Lazarus' level + DrawMapLineSE(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), AmLine(AmLineLength::HalfTile), colorDim); + } if (IsAnyOf(nwTile.type, AutomapTile::Types::HorizontalWallLava, AutomapTile::Types::Horizontal, AutomapTile::Types::HorizontalDiamond, AutomapTile::Types::FenceHorizontal, AutomapTile::Types::Cross, AutomapTile::Types::CaveVerticalWoodCross, AutomapTile::Types::CaveRightCorner)) { DrawMapLineSE(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileUp), AmLine(AmLineLength::HalfTile), colorDim); FixHorizontalDoor(out, center, nwTile, colorBright); @@ -1048,7 +1052,7 @@ void DrawAutomapTile(const Surface &out, Point center, Point map) if (IsAnyOf(leveltype, DTYPE_TOWN, DTYPE_CAVES, DTYPE_NEST)) { DrawCaveWallConnections(out, center, sTile, swTile, seTile, colorDim); } - DrawWallConnections(out, center, nwTile, neTile, colorBright, colorDim); + DrawWallConnections(out, center, tile, nwTile, neTile, colorBright, colorDim); } uint8_t lavaColor = MapColorsLava;