Browse Source

Debug: Add DrawVision to automap (#6649)

pull/6653/head
Eric Robinson 3 years ago committed by GitHub
parent
commit
ae926c1e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      Source/automap.cpp

13
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)

Loading…
Cancel
Save