Scene
This commit is contained in:
1 parent
fd8c6757cd
commit
a1500a7cb1
10 files changed
+995
-868
No files matched your search
@@ -0,0 +1,67 @@
|
||||
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3)
|
||||
|
||||
public class MapUtil {
|
||||
|
||||
public static int rotateX(int x, int z, int rotation) {
|
||||
rotation &= 3;
|
||||
if (rotation == 0) {
|
||||
return x;
|
||||
}
|
||||
if (rotation == 1) {
|
||||
return z;
|
||||
}
|
||||
if (rotation == 2) {
|
||||
return 7 - x;
|
||||
} else {
|
||||
return 7 - z;
|
||||
}
|
||||
}
|
||||
|
||||
public static int rotateZ(int x, int z, int rotation) {
|
||||
rotation &= 3;
|
||||
if (rotation == 0) {
|
||||
return z;
|
||||
}
|
||||
if (rotation == 1) {
|
||||
return 7 - x;
|
||||
}
|
||||
if (rotation == 2) {
|
||||
return 7 - z;
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
public static int rotateLocX(int x, int z, int sizeX, int sizeZ, int rotation) {
|
||||
rotation &= 3;
|
||||
if (rotation == 0) {
|
||||
return x;
|
||||
}
|
||||
if (rotation == 1) {
|
||||
return z;
|
||||
}
|
||||
if (rotation == 2) {
|
||||
return 7 - x - (sizeX - 1);
|
||||
} else {
|
||||
return 7 - z - (sizeZ - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static int rotateLocZ(int x, int z, int sizeX, int sizeZ, int rotation) {
|
||||
rotation &= 3;
|
||||
if (rotation == 0) {
|
||||
return z;
|
||||
}
|
||||
if (rotation == 1) {
|
||||
return 7 - x - (sizeX - 1);
|
||||
}
|
||||
if (rotation == 2) {
|
||||
return 7 - z - (sizeZ - 1);
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user