aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-15 16:04:26 +0900
committersyeyoung <cyong06@naver.com>2021-02-15 16:04:26 +0900
commiteb22ea41613998aecbe651e0584fc0e7958678a0 (patch)
treea26214addbefec7afdeadb72c545ce12f0855bc6 /src/main
parentac68bb00dc062b9c4f3f1fd4a2ac4ff8678275b5 (diff)
downloadSkyblock-Dungeons-Guide-eb22ea41613998aecbe651e0584fc0e7958678a0.tar.gz
Skyblock-Dungeons-Guide-eb22ea41613998aecbe651e0584fc0e7958678a0.tar.bz2
Skyblock-Dungeons-Guide-eb22ea41613998aecbe651e0584fc0e7958678a0.zip
comments, to not confuse my future self.
Diffstat (limited to 'src/main')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/VectorUtils.java3
3 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
index 284a9590..76f22f30 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
@@ -33,9 +33,9 @@ public class OffsetPoint implements Cloneable, Serializable {
for (int i = 0; i < dungeonRoom.getRoomMatcher().getRotation(); i++) {
vector2d = VectorUtils.rotateClockwise(vector2d);
if (i % 2 == 0) {
- vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1;
+ vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1; // + Z
} else {
- vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1;
+ vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1; // + X
}
}
@@ -50,9 +50,9 @@ public class OffsetPoint implements Cloneable, Serializable {
for (int i = 0; i < dungeonRoom.getRoomMatcher().getRotation(); i++) {
rot2 = VectorUtils.rotateCounterClockwise(rot2);
if (i % 2 == 0) {
- rot2.y += dungeonRoom.getMax().getZ() - dungeonRoom.getMin().getZ() + 1;
+ rot2.y += dungeonRoom.getMax().getZ() - dungeonRoom.getMin().getZ() + 1; // + Z
} else {
- rot2.y += dungeonRoom.getMax().getX() - dungeonRoom.getMin().getX() + 1;
+ rot2.y += dungeonRoom.getMax().getX() - dungeonRoom.getMin().getX() + 1; // + X
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
index d8b7c47b..bf480833 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
@@ -16,7 +16,7 @@ public class RoomMatcher {
@Getter
private DungeonRoomInfo match;
@Getter
- private int rotation; // how much the "found room" has to rotate to match the given dungeon room info. !
+ private int rotation; // how much the "found room" has to rotate clockwise to match the given dungeon room info. !
private boolean triedMatch = false;
private World w;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/VectorUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/VectorUtils.java
index 14d3b7c1..9e9244de 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/VectorUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/VectorUtils.java
@@ -3,6 +3,9 @@ package kr.syeyoung.dungeonsguide.utils;
import javax.vecmath.Vector2d;
public class VectorUtils {
+ // Ior rooms, different coordinate system is used. Y Increses as marker goes down. X is same.
+
+
public static Vector2d rotateCounterClockwise(Vector2d vector2d) {
return new Vector2d(vector2d.y, -vector2d.x);
}