From a6117af112304b1310c203ed7b2d153c2e5b3016 Mon Sep 17 00:00:00 2001 From: Simon Holmberg Date: Thu, 27 Sep 2012 23:06:37 +0200 Subject: [PATCH] Some rephrasing --- DepthsBelow/DepthsBelow/Component/GridTransform.cs | 2 +- DepthsBelow/DepthsBelow/Component/PixelTransform.cs | 2 +- DepthsBelow/DepthsBelow/Grid.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DepthsBelow/DepthsBelow/Component/GridTransform.cs b/DepthsBelow/DepthsBelow/Component/GridTransform.cs index afd06f7..f108d64 100644 --- a/DepthsBelow/DepthsBelow/Component/GridTransform.cs +++ b/DepthsBelow/DepthsBelow/Component/GridTransform.cs @@ -39,7 +39,7 @@ namespace DepthsBelow.Component public Vector2 ToScreen() { - return Grid.GridToScreen(Position); + return Grid.GridToWorld(Position); } } } diff --git a/DepthsBelow/DepthsBelow/Component/PixelTransform.cs b/DepthsBelow/DepthsBelow/Component/PixelTransform.cs index f1c6e75..e9332d3 100644 --- a/DepthsBelow/DepthsBelow/Component/PixelTransform.cs +++ b/DepthsBelow/DepthsBelow/Component/PixelTransform.cs @@ -44,7 +44,7 @@ namespace DepthsBelow.Component public Point ToGrid() { - return Grid.ScreenToGrid(Position); + return Grid.WorldToGrid(Position); } } } diff --git a/DepthsBelow/DepthsBelow/Grid.cs b/DepthsBelow/DepthsBelow/Grid.cs index 19d08d5..92b0e1f 100644 --- a/DepthsBelow/DepthsBelow/Grid.cs +++ b/DepthsBelow/DepthsBelow/Grid.cs @@ -7,12 +7,12 @@ namespace DepthsBelow { public const int TileSize = 32; - public static Vector2 GridToScreen(Point gridPos) + public static Vector2 GridToWorld(Point gridPos) { return new Vector2(gridPos.X * TileSize, gridPos.Y * TileSize); } - public static Point ScreenToGrid(Vector2 screenPos) + public static Point WorldToGrid(Vector2 screenPos) { return new Point( (int)Math.Floor(screenPos.X / TileSize),