Skip to content

Commit

Permalink
Remove dirt tiles that aren't bordering walls
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Sep 13, 2023
1 parent cd59bde commit ed781aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/automap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ void DrawAutomapTile(const Surface &out, Point center, Point map)
AutomapTile neTile = GetAutomapTypeView(map + Displacement { 0, -1 });
AutomapTile swTile = GetAutomapTypeView(map + Displacement { 0, 1 });
AutomapTile seTile = GetAutomapTypeView(map + Displacement { 1, 0 });
AutomapTile sTile = GetAutomapTypeView(map + Displacement { 1, 1 });

uint8_t colorBright = MapColorsBright;
uint8_t colorDim = MapColorsDim;
Expand Down Expand Up @@ -953,16 +954,14 @@ void DrawAutomapTile(const Surface &out, Point center, Point map)
if (IsAnyOf(leveltype, DTYPE_CATACOMBS, DTYPE_CAVES) && (tile.HasFlag(AutomapTile::Flags::HorizontalDoor) || tile.HasFlag(AutomapTile::Flags::VerticalDoor)))
noConnect = true;

if (tile.HasFlag(AutomapTile::Flags::Dirt)) {
if ((tile.type != AutomapTile::Types::None || swTile.type != AutomapTile::Types::None || seTile.type != AutomapTile::Types::None || sTile.type != AutomapTile::Types::None)&& tile.HasFlag(AutomapTile::Flags::Dirt)) {
DrawDirt(out, center, nwTile, neTile, colorDim);
}

if (tile.HasFlag(AutomapTile::Flags::Stairs)) {
DrawStairs(out, center, colorBright);
}

AutomapTile sTile = GetAutomapTypeView(map + Displacement { 1, 1 });

if (!noConnect) {
if (IsAnyOf(leveltype, DTYPE_TOWN, DTYPE_CAVES, DTYPE_NEST)) {
DrawCaveWallConnections(out, center, sTile, swTile, seTile, colorDim);
Expand Down

0 comments on commit ed781aa

Please sign in to comment.