Wand ist jetzt auch rund wenn Wand auf Wasser auf Land trifft
This commit is contained in:
@@ -175,10 +175,10 @@ namespace WorldOfPeacecraft
|
||||
ITile left = GetTile(locx - 1, locy, map);
|
||||
ITile topleft = GetTile(locx - 1, locy - 1, map);
|
||||
int offset = TileSize - 12;
|
||||
DrawWallEdge(g, CountWater (left, topleft, top), x, y, 0, 0, WallEdgeTopLeft, WallCornerTopLeft);
|
||||
DrawWallEdge(g, CountWater (top, topright, right), x, y, offset, 0, WallEdgeTopRight, WallCornerTopRight);
|
||||
DrawWallEdge(g, CountWater (right, botright, bot), x, y, offset, offset, WallEdgeBotRight, WallCornerBotRight);
|
||||
DrawWallEdge(g, CountWater (bot, botleft, left), x, y, 0, offset, WallEdgeBotLeft, WallCornerBotLeft);
|
||||
DrawWallEdge(g, CountWater (left, topleft, top), x, y, 0, 0, WallEdgeTopLeft, WallCornerTopLeft, (left.IsWater() ? BeachLeft : BeachTop));
|
||||
DrawWallEdge(g, CountWater (top, topright, right), x, y, offset, 0, WallEdgeTopRight, WallCornerTopRight, (top.IsWater() ? BeachTop : BeachRight));
|
||||
DrawWallEdge(g, CountWater (right, botright, bot), x, y, offset, offset, WallEdgeBotRight, WallCornerBotRight, (right.IsWater() ? BeachRight : BeachBottom));
|
||||
DrawWallEdge(g, CountWater (bot, botleft, left), x, y, 0, offset, WallEdgeBotLeft, WallCornerBotLeft, (bot.IsWater () ? BeachBottom : BeachLeft));
|
||||
} else if (tile.IsWater ()) {
|
||||
PaintImage(g, x, y, Water);
|
||||
PaintWallInnerEdge(g, locx, locy, x, y, map);
|
||||
@@ -278,7 +278,7 @@ namespace WorldOfPeacecraft
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawWallEdge (Graphics g, int water, int x, int y, int offsetx, int offsety, Image edgeImage, Image cornerImage)
|
||||
private void DrawWallEdge (Graphics g, int water, int x, int y, int offsetx, int offsety, Image edgeImage, Image cornerImage, Image beachImage)
|
||||
{
|
||||
if (water == -1)
|
||||
PaintImage (g, x, y, edgeImage);
|
||||
@@ -289,12 +289,12 @@ namespace WorldOfPeacecraft
|
||||
g.DrawImage(Water, dst, src, GraphicsUnit.Pixel);
|
||||
PaintImage(g, x, y, cornerImage);
|
||||
}
|
||||
else if (water == 0) {
|
||||
else {
|
||||
g.DrawImage(Walkable, dst, src, GraphicsUnit.Pixel);
|
||||
if (water > 0)
|
||||
g.DrawImage(beachImage, dst, src, GraphicsUnit.Pixel);
|
||||
PaintImage(g, x, y, cornerImage);
|
||||
}
|
||||
else
|
||||
PaintImage (g, x, y, edgeImage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user