api: ImageUtil sprite additions and random bits and bobs
This commit is contained in:
@@ -1819,4 +1819,24 @@ public interface Client extends GameShell
|
|||||||
void setSelectedSpellWidget(int widgetID);
|
void setSelectedSpellWidget(int widgetID);
|
||||||
|
|
||||||
void setSelectedSpellChildIndex(int index);
|
void setSelectedSpellChildIndex(int index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scales values from pixels onto canvas
|
||||||
|
*
|
||||||
|
* @see net.runelite.client.util.ImageUtil#resizeSprite(Client, Sprite, int, int)
|
||||||
|
*
|
||||||
|
* @param canvas the array we're writing to
|
||||||
|
* @param pixels pixels to draw
|
||||||
|
* @param color should be 0
|
||||||
|
* @param pixelX x index
|
||||||
|
* @param pixelY y index
|
||||||
|
* @param canvasIdx index in canvas (canvas[canvasIdx])
|
||||||
|
* @param canvasOffset x offset
|
||||||
|
* @param newWidth new width
|
||||||
|
* @param newHeight new height
|
||||||
|
* @param pixelWidth pretty much horizontal scale
|
||||||
|
* @param pixelHeight pretty much vertical scale
|
||||||
|
* @param oldWidth old width
|
||||||
|
*/
|
||||||
|
void scaleSprite(int[] canvas, int[] pixels, int color, int pixelX, int pixelY, int canvasIdx, int canvasOffset, int newWidth, int newHeight, int pixelWidth, int pixelHeight, int oldWidth);
|
||||||
}
|
}
|
||||||
@@ -92,4 +92,20 @@ public interface Sprite
|
|||||||
* @param color target color
|
* @param color target color
|
||||||
*/
|
*/
|
||||||
void toBufferedOutline(BufferedImage img, int color);
|
void toBufferedOutline(BufferedImage img, int color);
|
||||||
|
|
||||||
|
int getMaxWidth();
|
||||||
|
|
||||||
|
void setMaxWidth(int maxWidth);
|
||||||
|
|
||||||
|
int getMaxHeight();
|
||||||
|
|
||||||
|
void setMaxHeight(int maxHeight);
|
||||||
|
|
||||||
|
int getOffsetX();
|
||||||
|
|
||||||
|
void setOffsetX(int offsetX);
|
||||||
|
|
||||||
|
int getOffsetY();
|
||||||
|
|
||||||
|
void setOffsetY(int offsetY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1573,6 +1573,8 @@ public final class SpriteID
|
|||||||
/* Unmapped: 1709, 1710 */
|
/* Unmapped: 1709, 1710 */
|
||||||
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS = 1711;
|
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS = 1711;
|
||||||
public static final int BIG_ASS_GUTHIX_SPELL = 1774;
|
public static final int BIG_ASS_GUTHIX_SPELL = 1774;
|
||||||
|
public static final int BIG_ASS_GREY_ENTANGLE = 1788;
|
||||||
|
public static final int BIG_ASS_WHITE_ENTANGLE = 1789;
|
||||||
public static final int BIG_SUPERHEAT = 1800;
|
public static final int BIG_SUPERHEAT = 1800;
|
||||||
public static final int BIG_SPEC_TRANSFER = 1959;
|
public static final int BIG_SPEC_TRANSFER = 1959;
|
||||||
/* Unmapped: 1712~2175 */
|
/* Unmapped: 1712~2175 */
|
||||||
|
|||||||
@@ -53,7 +53,13 @@ public enum VarPlayer
|
|||||||
IN_RAID_PARTY(1427),
|
IN_RAID_PARTY(1427),
|
||||||
|
|
||||||
NMZ_REWARD_POINTS(1060),
|
NMZ_REWARD_POINTS(1060),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The 11 least significant bits of this var correspond to the player
|
||||||
|
* you're currently fighting. Value is -1 when not fighting any player.
|
||||||
|
*
|
||||||
|
* Client.getVar(ATTACKING_PLAYER) & 2047 == Client.getLocalInteractingIndex();
|
||||||
|
*/
|
||||||
ATTACKING_PLAYER(1075),
|
ATTACKING_PLAYER(1075),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -688,7 +688,9 @@ public enum Varbits
|
|||||||
*/
|
*/
|
||||||
GAUNTLET_ENTERED(9178),
|
GAUNTLET_ENTERED(9178),
|
||||||
|
|
||||||
WITHDRAW_X_AMOUNT(3960);
|
WITHDRAW_X_AMOUNT(3960),
|
||||||
|
|
||||||
|
IN_PVP_AREA(8121);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The raw varbit ID.
|
* The raw varbit ID.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1086,4 +1086,8 @@ public interface RSClient extends RSGameShell, Client
|
|||||||
@Import("selectedSpellChildIndex")
|
@Import("selectedSpellChildIndex")
|
||||||
@Override
|
@Override
|
||||||
void setSelectedSpellChildIndex(int index);
|
void setSelectedSpellChildIndex(int index);
|
||||||
|
|
||||||
|
@Import("Sprite_drawScaled")
|
||||||
|
@Override
|
||||||
|
void scaleSprite(int[] canvas, int[] pixels, int color, int pixelX, int pixelY, int canvasIdx, int canvasOffset, int newWidth, int newHeight, int pixelWidth, int pixelHeight, int oldWidth);
|
||||||
}
|
}
|
||||||
@@ -25,14 +25,34 @@ public interface RSSprite extends Sprite
|
|||||||
void setRaster();
|
void setRaster();
|
||||||
|
|
||||||
@Import("width")
|
@Import("width")
|
||||||
|
@Override
|
||||||
|
int getMaxWidth();
|
||||||
|
|
||||||
|
@Import("width")
|
||||||
|
@Override
|
||||||
void setMaxWidth(int maxWidth);
|
void setMaxWidth(int maxWidth);
|
||||||
|
|
||||||
@Import("height")
|
@Import("height")
|
||||||
|
@Override
|
||||||
|
int getMaxHeight();
|
||||||
|
|
||||||
|
@Import("height")
|
||||||
|
@Override
|
||||||
void setMaxHeight(int maxHeight);
|
void setMaxHeight(int maxHeight);
|
||||||
|
|
||||||
@Import("xOffset")
|
@Import("xOffset")
|
||||||
|
@Override
|
||||||
|
int getOffsetX(); ;
|
||||||
|
|
||||||
|
@Import("xOffset")
|
||||||
|
@Override
|
||||||
void setOffsetX(int offsetX);
|
void setOffsetX(int offsetX);
|
||||||
|
|
||||||
@Import("yOffset")
|
@Import("yOffset")
|
||||||
|
@Override
|
||||||
|
int getOffsetY(); ;
|
||||||
|
|
||||||
|
@Import("yOffset")
|
||||||
|
@Override
|
||||||
void setOffsetY(int offsetY);
|
void setOffsetY(int offsetY);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user