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