runelite-api: update minimap code from 150
This commit is contained in:
@@ -298,21 +298,11 @@ public class Client
|
|||||||
return client.isMenuOpen();
|
return client.isMenuOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMapScale()
|
|
||||||
{
|
|
||||||
return client.getMapScale();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMapAngle()
|
public int getMapAngle()
|
||||||
{
|
{
|
||||||
return client.getMapAngle();
|
return client.getMapAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMapOffset()
|
|
||||||
{
|
|
||||||
return client.getMapOffset();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isResized()
|
public boolean isResized()
|
||||||
{
|
{
|
||||||
return client.isResized();
|
return client.isResized();
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public class Perspective
|
|||||||
*/
|
*/
|
||||||
public static Point worldToMiniMap(Client client, int x, int y, int distance)
|
public static Point worldToMiniMap(Client client, int x, int y, int distance)
|
||||||
{
|
{
|
||||||
int angle = client.getMapScale() + client.getMapAngle() & 0x7FF;
|
int angle = client.getMapAngle() & 0x7FF;
|
||||||
|
|
||||||
Point localLocation = client.getLocalPlayer().getLocalLocation();
|
Point localLocation = client.getLocalPlayer().getLocalLocation();
|
||||||
x = x / 32 - localLocation.getX() / 32;
|
x = x / 32 - localLocation.getX() / 32;
|
||||||
@@ -153,9 +153,6 @@ public class Perspective
|
|||||||
int sin = SINE[angle];
|
int sin = SINE[angle];
|
||||||
int cos = COSINE[angle];
|
int cos = COSINE[angle];
|
||||||
|
|
||||||
sin = sin * 256 / (client.getMapOffset() + 256);
|
|
||||||
cos = cos * 256 / (client.getMapOffset() + 256);
|
|
||||||
|
|
||||||
int xx = y * sin + cos * x >> 16;
|
int xx = y * sin + cos * x >> 16;
|
||||||
int yy = sin * x - y * cos >> 16;
|
int yy = sin * x - y * cos >> 16;
|
||||||
|
|
||||||
|
|||||||
@@ -52,15 +52,9 @@ public interface Client extends GameEngine
|
|||||||
@Import("FPS")
|
@Import("FPS")
|
||||||
int getFPS();
|
int getFPS();
|
||||||
|
|
||||||
@Import("mapScale")
|
|
||||||
int getMapScale();
|
|
||||||
|
|
||||||
@Import("mapAngle")
|
@Import("mapAngle")
|
||||||
int getMapAngle();
|
int getMapAngle();
|
||||||
|
|
||||||
@Import("mapOffset")
|
|
||||||
int getMapOffset();
|
|
||||||
|
|
||||||
@Import("tileHeights")
|
@Import("tileHeights")
|
||||||
int[][][] getTileHeights();
|
int[][][] getTileHeights();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user