Skip to content
Permalink
Browse files

Simplified implementation

  • Loading branch information...
collinsmith committed May 10, 2019
1 parent 709642b commit f7bdf363dc74a6d5c28f968d6d4c739127d0b7ae
Showing with 2 additions and 8 deletions.
  1. +2 −8 core/src/com/riiablo/util/EngineUtils.java
@@ -8,10 +8,7 @@
private EngineUtils() {}

public static Vector2 worldToScreenCoords(Vector2 world, Vector2 dst) {
assert world != dst;
dst.x = +(world.x - world.y) * Tile.SUBTILE_WIDTH50;
dst.y = -(world.x + world.y) * Tile.SUBTILE_HEIGHT50;
return dst;
return worldToScreenCoords(world.x, world.y, dst);
}

public static Vector2 worldToScreenCoords(float x, float y, Vector2 dst) {
@@ -21,10 +18,7 @@ public static Vector2 worldToScreenCoords(float x, float y, Vector2 dst) {
}

public static GridPoint2 worldToScreenCoords(GridPoint2 world, GridPoint2 dst) {
assert world != dst;
dst.x = +(world.x - world.y) * Tile.SUBTILE_WIDTH50;
dst.y = -(world.x + world.y) * Tile.SUBTILE_HEIGHT50;
return dst;
return worldToScreenCoords(world.x, world.y, dst);
}

public static GridPoint2 worldToScreenCoords(int x, int y, GridPoint2 dst) {

0 comments on commit f7bdf36

Please sign in to comment.
You can’t perform that action at this time.