|
|
|
|
@ -271,203 +271,203 @@ void DrawMapHorizontalDoor(const Surface &out, Point center, AutomapTile nwTile,
|
|
|
|
|
*/ |
|
|
|
|
void DrawDirt(const Surface &out, Point center, AutomapTile nwTile, AutomapTile neTile, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
// Prevent the top dirt pixel from appearing inside arch diamonds
|
|
|
|
|
if (!nwTile.hasAnyFlag(AutomapTile::Flags::HorizontalArch, AutomapTile::Flags::HorizontalGrate) |
|
|
|
|
&& !neTile.hasAnyFlag(AutomapTile::Flags::VerticalArch, AutomapTile::Flags::VerticalGrate)) |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawBridge(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverRightIn(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverCornerSouth(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverCornerNorth(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverLeftOut(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverLeftIn(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverCornerWest(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverCornerEast(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverRightOut(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiver(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverForkIn(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
out.SetPixel(center, color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); |
|
|
|
|
SetMapPixel(out, center, color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawRiverForkOut(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); |
|
|
|
|
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <Direction TDir1, Direction TDir2> |
|
|
|
|
@ -476,15 +476,15 @@ void DrawLavaRiver(const Surface &out, Point center, uint8_t color, bool hasBrid
|
|
|
|
|
// First row (y = 0)
|
|
|
|
|
if constexpr (IsAnyOf(Direction::NorthWest, TDir1, TDir2)) { |
|
|
|
|
if (!(hasBridge && IsAnyOf(TDir1, Direction::NorthWest))) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Second row (y = 1)
|
|
|
|
|
if constexpr (IsAnyOf(Direction::NorthEast, TDir1, TDir2)) { |
|
|
|
|
if (!(hasBridge && IsAnyOf(Direction::NorthEast, TDir1, TDir2))) |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); |
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(Direction::NorthWest, TDir1, TDir2) || IsAnyOf(Direction::NorthEast, TDir1, TDir2)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::None), color); |
|
|
|
|
@ -493,13 +493,13 @@ void DrawLavaRiver(const Surface &out, Point center, uint8_t color, bool hasBrid
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(Direction::SouthWest, TDir1, TDir2)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Third row (y = 2)
|
|
|
|
|
if constexpr (IsAnyOf(Direction::NorthEast, TDir1, TDir2)) { |
|
|
|
|
if (!(hasBridge && IsAnyOf(Direction::NorthEast, TDir1, TDir2))) |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); |
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(Direction::NorthEast, TDir1, TDir2) || IsAnyOf(Direction::SouthEast, TDir1, TDir2)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); |
|
|
|
|
@ -508,13 +508,13 @@ void DrawLavaRiver(const Surface &out, Point center, uint8_t color, bool hasBrid
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(Direction::SouthWest, TDir1, TDir2)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Fourth row (y = 3)
|
|
|
|
|
if constexpr (IsAnyOf(Direction::SouthEast, TDir1, TDir2)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -522,44 +522,44 @@ template <Direction TDir>
|
|
|
|
|
void DrawLava(const Surface &out, Point center, uint8_t color) |
|
|
|
|
{ |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::NorthWest, Direction::North, Direction::NorthEast, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); // north corner
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileUp), color); // north corner
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsNoneOf(TDir, Direction::South, Direction::SouthEast, Direction::East)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); // northwest edge
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); // northwest edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileUp), color); // northwest edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), color); // northwest edge
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::SouthWest, Direction::West, Direction::NorthWest, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); // west corner
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), color); // west corner
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::South, Direction::SouthWest, Direction::West, Direction::NorthWest, Direction::SouthEast, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); // southwest edge
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); // southwest edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), color); // southwest edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), color); // southwest edge
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::South, Direction::SouthWest, Direction::SouthEast, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); // south corner
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), color); // south corner
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::South, Direction::SouthWest, Direction::NorthEast, Direction::East, Direction::SouthEast, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); // southeast edge
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); // southeast edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), color); // southeast edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), color); // southeast edge
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsAnyOf(TDir, Direction::NorthEast, Direction::East, Direction::SouthEast, Direction::NoDirection)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); // east corner
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), color); // east corner
|
|
|
|
|
} |
|
|
|
|
if constexpr (IsNoneOf(TDir, Direction::South, Direction::SouthWest, Direction::West)) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); // northeast edge
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); // northeast edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileUp), color); // northeast edge
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None), color); // northeast edge
|
|
|
|
|
} |
|
|
|
|
if constexpr (TDir != Direction::South) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::None), color); // north center
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::None), color); // north center
|
|
|
|
|
} |
|
|
|
|
if constexpr (TDir != Direction::East) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); // west center
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::QuarterTileDown), color); // west center
|
|
|
|
|
} |
|
|
|
|
if constexpr (TDir != Direction::West) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); // east center
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::QuarterTileDown), color); // east center
|
|
|
|
|
} |
|
|
|
|
if constexpr (TDir != Direction::North) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); // south center
|
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::HalfTileDown), color); // south center
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -755,10 +755,10 @@ void DrawCaveWallConnections(const Surface &out, Point center, AutomapTile sTile
|
|
|
|
|
void DrawCaveHorizontalDirt(const Surface &out, Point center, AutomapTile tile, AutomapTile swTile, uint8_t colorDim) |
|
|
|
|
{ |
|
|
|
|
if (swTile.hasFlag(AutomapTile::Flags::Dirt) || (leveltype != DTYPE_TOWN && IsNoneOf(tile.type, AutomapTile::Types::CaveHorizontalWood, AutomapTile::Types::CaveHorizontalWoodCross, AutomapTile::Types::CaveWoodCross, AutomapTile::Types::CaveLeftWoodCross))) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileLeft, AmHeightOffset::QuarterTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::ThreeQuartersTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -791,10 +791,10 @@ void DrawCaveHorizontal(const Surface &out, Point center, AutomapTile tile, Auto
|
|
|
|
|
void DrawCaveVerticalDirt(const Surface &out, Point center, AutomapTile tile, AutomapTile seTile, uint8_t colorDim) |
|
|
|
|
{ |
|
|
|
|
if (seTile.hasFlag(AutomapTile::Flags::Dirt) || (leveltype != DTYPE_TOWN && IsNoneOf(tile.type, AutomapTile::Types::CaveVerticalWood, AutomapTile::Types::CaveVerticalWoodCross, AutomapTile::Types::CaveWoodCross, AutomapTile::Types::CaveRightWoodCross))) { |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), colorDim); |
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::QuarterTileRight, AmHeightOffset::ThreeQuartersTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::ThreeQuartersTileRight, AmHeightOffset::QuarterTileDown), colorDim); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1106,7 +1106,7 @@ void DrawAutomapTile(const Surface &out, Point center, Point map)
|
|
|
|
|
break; |
|
|
|
|
case AutomapTile::Types::CaveCross: |
|
|
|
|
// Add the missing dirt pixel
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
[[fallthrough]]; |
|
|
|
|
case AutomapTile::Types::CaveWoodCross: |
|
|
|
|
case AutomapTile::Types::CaveRightWoodCross: |
|
|
|
|
@ -1126,7 +1126,7 @@ void DrawAutomapTile(const Surface &out, Point center, Point map)
|
|
|
|
|
case AutomapTile::Types::CaveBottomCorner: |
|
|
|
|
// Add the missing dirt pixel
|
|
|
|
|
// BUGFIX: A tile in poisoned water supply isn't drawing this pixel
|
|
|
|
|
out.SetPixel(center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
SetMapPixel(out, center + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown), colorDim); |
|
|
|
|
break; |
|
|
|
|
case AutomapTile::Types::None: |
|
|
|
|
break; |
|
|
|
|
@ -1329,31 +1329,31 @@ void DrawAutomapPlr(const Surface &out, const Displacement &myPlayerOffset, int
|
|
|
|
|
switch (player._pdir) { |
|
|
|
|
case Direction::North: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileUp); |
|
|
|
|
DrawVerticalLine(out, point, AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineNS(out, point, AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineSteepNE(out, point + AmOffset(AmWidthOffset::EighthTileLeft, AmHeightOffset::HalfTileDown), AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawMapLineSteepNW(out, point + AmOffset(AmWidthOffset::EighthTileRight, AmHeightOffset::HalfTileDown), AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::NorthEast: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileUp); |
|
|
|
|
DrawHorizontalLine(out, point + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::None), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawMapLineWE(out, point + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::None), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawMapLineNE(out, point + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawMapLineSteepSW(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::East: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::None); |
|
|
|
|
DrawMapLineNW(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawHorizontalLine(out, point + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineWE(out, point + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None), AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineSW(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::SouthEast: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown); |
|
|
|
|
DrawMapLineSteepNW(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawMapLineSE(out, point + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileUp), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawHorizontalLine(out, point + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::None) + Displacement { -1, 0 }, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
DrawMapLineWE(out, point + AmOffset(AmWidthOffset::QuarterTileLeft, AmHeightOffset::None) + Displacement { -1, 0 }, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::South: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileDown); |
|
|
|
|
DrawVerticalLine(out, point + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileUp), AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineNS(out, point + AmOffset(AmWidthOffset::None, AmHeightOffset::FullTileUp), AmLine(AmLineLength::DoubleTile), playerColor); |
|
|
|
|
DrawMapLineSteepSW(out, point + AmOffset(AmWidthOffset::EighthTileRight, AmHeightOffset::HalfTileUp), AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawMapLineSteepSE(out, point + AmOffset(AmWidthOffset::EighthTileLeft, AmHeightOffset::HalfTileUp), AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
@ -1361,18 +1361,18 @@ void DrawAutomapPlr(const Surface &out, const Displacement &myPlayerOffset, int
|
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileDown); |
|
|
|
|
DrawMapLineSteepNE(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawMapLineSW(out, point + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileUp), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawHorizontalLine(out, point, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
DrawMapLineWE(out, point, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::West: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::None); |
|
|
|
|
DrawMapLineNE(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
DrawHorizontalLine(out, point, AmLine(AmLineLength::DoubleTile) + 1, playerColor); |
|
|
|
|
DrawMapLineWE(out, point, AmLine(AmLineLength::DoubleTile) + 1, playerColor); |
|
|
|
|
DrawMapLineSE(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::NorthWest: { |
|
|
|
|
const Point point = base + AmOffset(AmWidthOffset::HalfTileLeft, AmHeightOffset::HalfTileUp); |
|
|
|
|
DrawMapLineNW(out, point + AmOffset(AmWidthOffset::HalfTileRight, AmHeightOffset::HalfTileDown), AmLine(AmLineLength::FullTile), playerColor); |
|
|
|
|
DrawHorizontalLine(out, point, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
DrawMapLineWE(out, point, AmLine(AmLineLength::FullTile) + 1, playerColor); |
|
|
|
|
DrawMapLineSteepSE(out, point, AmLine(AmLineLength::HalfTile), playerColor); |
|
|
|
|
} break; |
|
|
|
|
case Direction::NoDirection: |
|
|
|
|
@ -1511,6 +1511,7 @@ void InitAutomapOnce()
|
|
|
|
|
{ |
|
|
|
|
AutomapActive = false; |
|
|
|
|
AutoMapScale = 50; |
|
|
|
|
SetAutomapType(AutomapType::Opaque); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void InitAutomap() |
|
|
|
|
|