From ae926c1e9942ea927bbe84387ce225031120ada7 Mon Sep 17 00:00:00 2001 From: Eric Robinson <68359262+kphoenix137@users.noreply.github.com> Date: Fri, 22 Sep 2023 22:10:16 -0400 Subject: [PATCH] Debug: Add DrawVision to automap (#6649) --- Source/automap.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/automap.cpp b/Source/automap.cpp index 1c4bd68a1..8849aaa98 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -1000,6 +1000,19 @@ void DrawAutomapTile(const Surface &out, Point center, Point map) AutomapTile nwTile = GetAutomapTypeView(map + Direction::NorthWest); AutomapTile neTile = GetAutomapTypeView(map + Direction::NorthEast); +#ifdef _DEBUG + if (DebugVision) { + if (IsTileLit(map.megaToWorld())) + DrawDiamond(out, center, PAL8_ORANGE + 1); + if (IsTileLit(map.megaToWorld() + Direction::South)) + DrawDiamond(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), PAL8_ORANGE + 1); + if (IsTileLit(map.megaToWorld() + Direction::SouthWest)) + DrawDiamond(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), PAL8_ORANGE + 1); + if (IsTileLit(map.megaToWorld() + Direction::SouthEast)) + DrawDiamond(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), PAL8_ORANGE + 1); + } +#endif + // If the tile is an arch, grate, or diamond, we draw a diamond and therefore don't want connection lines if (tile.hasAnyFlag(AutomapTile::Flags::HorizontalArch, AutomapTile::Flags::VerticalArch, AutomapTile::Flags::HorizontalGrate, AutomapTile::Flags::VerticalGrate) || nwTile.hasAnyFlag(AutomapTile::Flags::HorizontalArch, AutomapTile::Flags::HorizontalGrate)