Skip to content

Commit

Permalink
Bugfix: Automap Grates not rendering correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 authored and AJenbo committed Oct 3, 2023
1 parent b82081d commit e18b37a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Source/automap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,12 @@ void DrawMapVerticalGrate(const Surface &out, Point center, uint8_t colorDim)
Point pos2 = center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None);
Point pos3 = center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None) + AmOffset(AmWidthOffset::EighthTileLeft, AmHeightOffset::EighthTileDown);

out.SetPixel(pos1 + Displacement { 0, 1 }, 0);
out.SetPixel(pos2 + Displacement { 0, 1 }, 0);
out.SetPixel(pos3 + Displacement { 0, 1 }, 0);
out.SetPixel(pos1, colorDim);
out.SetPixel(pos2, colorDim);
out.SetPixel(pos3, colorDim);
SetMapPixel(out, pos1 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos2 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos3 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos1, colorDim);
SetMapPixel(out, pos2, colorDim);
SetMapPixel(out, pos3, colorDim);
}

/**
Expand All @@ -645,12 +645,12 @@ void DrawMapHorizontalGrate(const Surface &out, Point center, uint8_t colorDim)
Point pos2 = center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None);
Point pos3 = center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None) + AmOffset(AmWidthOffset::EighthTileRight, AmHeightOffset::EighthTileDown);

out.SetPixel(pos1 + Displacement { 0, 1 }, 0);
out.SetPixel(pos2 + Displacement { 0, 1 }, 0);
out.SetPixel(pos3 + Displacement { 0, 1 }, 0);
out.SetPixel(pos1, colorDim);
out.SetPixel(pos2, colorDim);
out.SetPixel(pos3, colorDim);
SetMapPixel(out, pos1 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos2 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos3 + Displacement { 0, 1 }, 0);
SetMapPixel(out, pos1, colorDim);
SetMapPixel(out, pos2, colorDim);
SetMapPixel(out, pos3, colorDim);
}

/**
Expand Down

0 comments on commit e18b37a

Please sign in to comment.