From c8b74b05ddaec10b4c106d5226b296d7a197ac0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 13 May 2014 14:10:45 +0200 Subject: [PATCH] Wand ist jetzt auch rund wenn Wand auf Wasser auf Land trifft --- src/Gui/MapPanel.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Gui/MapPanel.cs b/src/Gui/MapPanel.cs index 5df6957..89061d1 100644 --- a/src/Gui/MapPanel.cs +++ b/src/Gui/MapPanel.cs @@ -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); } }