From 62e695db24954822a66521af84b8965e08173342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Fri, 2 May 2014 09:33:38 +0200 Subject: [PATCH] =?UTF-8?q?Map=20wird=20nicht=20mehr=20gedreht=20und=20ges?= =?UTF-8?q?piegelt=20angezeigt.=20(Der=20Server=20vertauscht=20tats=C3=A4c?= =?UTF-8?q?hlich=20col=20und=20row)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Gui/Gui.cs | 14 +++++++------- src/Map.cs | 4 ++-- src/Parser.cs | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Gui/Gui.cs b/src/Gui/Gui.cs index f8786da..f8a7014 100644 --- a/src/Gui/Gui.cs +++ b/src/Gui/Gui.cs @@ -74,11 +74,11 @@ namespace WorldOfPeacecraft public void PaintMap (Graphics g) { - ITile[,] Map = Backend.GetMap (); - if (Map != null) { - for (int y = 0; y < Map.GetLength(1); y++) { - for (int x = 0; x < Map.GetLength(0); x++) { - PaintTile (g, Map [x, y], x, y); + ITile[,] map = Backend.GetMap (); + if (map != null) { + for (int y = 0; y < map.GetLength(1); y++) { + for (int x = 0; x < map.GetLength(0); x++) { + PaintTile (g, map [x, y], x, y); } } } @@ -97,12 +97,12 @@ namespace WorldOfPeacecraft } // Stupid parenthesis else if (tile.IsHuntable ()) { color = Color.BurlyWood; + } else if (tile.IsWater ()) { + color = Color.Blue; } else if (tile.IsWalkable ()) { color = Color.Yellow; } else if (tile.IsWall ()) { color = Color.DarkGray; - } else if (tile.IsWater ()) { - color = Color.Blue; } else { color = Color.Black; } diff --git a/src/Map.cs b/src/Map.cs index f61bf76..2e35487 100644 --- a/src/Map.cs +++ b/src/Map.cs @@ -6,9 +6,9 @@ namespace WorldOfPeacecraft { public Tile[,] map; - public Map (int height, int width) + public Map (int width, int height) { - map = new Tile[height, width]; + map = new Tile[width, height]; } public void SetTile (Tile t) diff --git a/src/Parser.cs b/src/Parser.cs index 0debeeb..34a8ffd 100644 --- a/src/Parser.cs +++ b/src/Parser.cs @@ -400,8 +400,8 @@ namespace WorldOfPeacecraft private Tile MapMapcell (Block cellBlock) { CheckBlocksSize (cellBlock, 1, 1); - int x = cellBlock.GetIntValue (ValueCol); - int y = cellBlock.GetIntValue (ValueRow); + int x = cellBlock.GetIntValue (ValueRow); + int y = cellBlock.GetIntValue (ValueCol); Block propsBlock = cellBlock.GetBlocks ().First.Value; bool walkable = false; bool wall = false;