openrune: Sprite -> SpritePixels
This commit is contained in:
@@ -205,11 +205,11 @@ public interface Actor extends Entity, Locatable
|
||||
* Gets the point at which a sprite should be drawn, relative to the
|
||||
* current location with the given z-axis offset.
|
||||
*
|
||||
* @param sprite the sprite to draw
|
||||
* @param spritePixels the sprite to draw
|
||||
* @param zOffset the z-axis offset
|
||||
* @return the sprite drawing location
|
||||
*/
|
||||
Point getCanvasSpriteLocation(Sprite sprite, int zOffset);
|
||||
Point getCanvasSpriteLocation(SpritePixels spritePixels, int zOffset);
|
||||
|
||||
/**
|
||||
* Gets a point on the canvas of where this actors mini-map indicator
|
||||
|
||||
@@ -401,7 +401,7 @@ public interface Client extends GameShell
|
||||
* @return the created sprite
|
||||
*/
|
||||
@Nullable
|
||||
Sprite createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
|
||||
SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
|
||||
|
||||
/**
|
||||
* Loads and creates the sprite images of the passed archive and file IDs.
|
||||
@@ -412,7 +412,7 @@ public interface Client extends GameShell
|
||||
* @return the sprite image of the file
|
||||
*/
|
||||
@Nullable
|
||||
Sprite[] getSprites(IndexDataBase source, int archiveId, int fileId);
|
||||
SpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId);
|
||||
|
||||
/**
|
||||
* Gets the sprite index.
|
||||
@@ -962,7 +962,7 @@ public interface Client extends GameShell
|
||||
*
|
||||
* @return all mini-map dots
|
||||
*/
|
||||
Sprite[] getMapDots();
|
||||
SpritePixels[] getMapDots();
|
||||
|
||||
/**
|
||||
* Gets the local clients game cycle.
|
||||
@@ -978,7 +978,7 @@ public interface Client extends GameShell
|
||||
*
|
||||
* @return the map icons
|
||||
*/
|
||||
Sprite[] getMapIcons();
|
||||
SpritePixels[] getMapIcons();
|
||||
|
||||
/**
|
||||
* Gets an array of mod icon sprites.
|
||||
@@ -1010,7 +1010,7 @@ public interface Client extends GameShell
|
||||
* @param height the height
|
||||
* @return the sprite image
|
||||
*/
|
||||
Sprite createSprite(int[] pixels, int width, int height);
|
||||
SpritePixels createSprite(int[] pixels, int width, int height);
|
||||
|
||||
/**
|
||||
* Gets the location of the local player.
|
||||
@@ -1339,7 +1339,7 @@ public interface Client extends GameShell
|
||||
* @param z the plane
|
||||
* @return the map sprite
|
||||
*/
|
||||
Sprite drawInstanceMap(int z);
|
||||
SpritePixels drawInstanceMap(int z);
|
||||
|
||||
/**
|
||||
* Executes a client script from the cache
|
||||
@@ -1662,7 +1662,7 @@ public interface Client extends GameShell
|
||||
* The key value in the map corresponds to the ID of the sprite,
|
||||
* and the value the sprite to replace it with.
|
||||
*/
|
||||
Map<Integer, Sprite> getSpriteOverrides();
|
||||
Map<Integer, SpritePixels> getSpriteOverrides();
|
||||
|
||||
/**
|
||||
* Gets a mapping of widget sprites to override.
|
||||
@@ -1670,14 +1670,14 @@ public interface Client extends GameShell
|
||||
* The key value in the map corresponds to the packed widget ID,
|
||||
* and the value the sprite to replace the widgets sprite with.
|
||||
*/
|
||||
Map<Integer, Sprite> getWidgetSpriteOverrides();
|
||||
Map<Integer, SpritePixels> getWidgetSpriteOverrides();
|
||||
|
||||
/**
|
||||
* Sets the compass sprite.
|
||||
*
|
||||
* @param Sprite the new sprite
|
||||
* @param SpritePixels the new sprite
|
||||
*/
|
||||
void setCompass(Sprite Sprite);
|
||||
void setCompass(SpritePixels SpritePixels);
|
||||
|
||||
/**
|
||||
* Sets whether inventory quantity is verbose.
|
||||
@@ -1829,7 +1829,7 @@ public interface Client extends GameShell
|
||||
/**
|
||||
* Returns the array of cross sprites that appear and animate when left-clicking
|
||||
*/
|
||||
Sprite[] getCrossSprites();
|
||||
SpritePixels[] getCrossSprites();
|
||||
|
||||
EnumDefinition getEnum(int id);
|
||||
|
||||
@@ -1954,7 +1954,7 @@ public interface Client extends GameShell
|
||||
* @param pixelWidth pretty much horizontal scale
|
||||
* @param pixelHeight pretty much vertical scale
|
||||
* @param oldWidth old width
|
||||
* @see net.runelite.client.util.ImageUtil#resizeSprite(Client, Sprite, int, int)
|
||||
* @see net.runelite.client.util.ImageUtil#resizeSprite(Client, SpritePixels, int, int)
|
||||
*/
|
||||
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);
|
||||
|
||||
@@ -2048,7 +2048,7 @@ public interface Client extends GameShell
|
||||
* If the image is larger than half the width of fixed mode,
|
||||
* it won't get mirrored to the other side of the screen
|
||||
*/
|
||||
void setLoginScreen(Sprite pixels);
|
||||
void setLoginScreen(SpritePixels pixels);
|
||||
|
||||
/**
|
||||
* Sets whether the flames on the login screen should be rendered
|
||||
|
||||
@@ -26,9 +26,9 @@ package net.runelite.api;
|
||||
|
||||
public interface HealthBar
|
||||
{
|
||||
Sprite getHealthBarFrontSprite();
|
||||
SpritePixels getHealthBarFrontSprite();
|
||||
|
||||
Sprite getHealthBarBackSprite();
|
||||
SpritePixels getHealthBarBackSprite();
|
||||
|
||||
int getHealthBarFrontSpriteId();
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ public interface MapElementConfig
|
||||
* @param unused unused value
|
||||
* @return the sprite icon to display on the world map
|
||||
*/
|
||||
Sprite getMapIcon(boolean unused);
|
||||
SpritePixels getMapIcon(boolean unused);
|
||||
}
|
||||
|
||||
@@ -557,14 +557,14 @@ public class Perspective
|
||||
*
|
||||
* @param client the game client
|
||||
* @param localLocation local location of the tile
|
||||
* @param sprite SpritePixel for size measurement
|
||||
* @param spritePixels SpritePixel for size measurement
|
||||
* @param zOffset offset from ground plane
|
||||
* @return a {@link Point} on screen corresponding to the given localLocation.
|
||||
*/
|
||||
public static Point getCanvasSpriteLocation(
|
||||
@Nonnull Client client,
|
||||
@Nonnull LocalPoint localLocation,
|
||||
@Nonnull Sprite sprite,
|
||||
@Nonnull SpritePixels spritePixels,
|
||||
int zOffset)
|
||||
{
|
||||
int plane = client.getPlane();
|
||||
@@ -576,8 +576,8 @@ public class Perspective
|
||||
return null;
|
||||
}
|
||||
|
||||
int xOffset = p.getX() - sprite.getWidth() / 2;
|
||||
int yOffset = p.getY() - sprite.getHeight() / 2;
|
||||
int xOffset = p.getX() - spritePixels.getWidth() / 2;
|
||||
int yOffset = p.getY() - spritePixels.getHeight() / 2;
|
||||
|
||||
return new Point(xOffset, yOffset);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.awt.image.BufferedImage;
|
||||
/**
|
||||
* Represents data about the pixels of a sprite image.
|
||||
*/
|
||||
public interface Sprite
|
||||
public interface SpritePixels
|
||||
{
|
||||
int DEFAULT_SHADOW_COLOR = 3153952;
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.awt.Rectangle;
|
||||
import java.util.Collection;
|
||||
import net.runelite.api.FontTypeFace;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.Sprite;
|
||||
import net.runelite.api.SpritePixels;
|
||||
|
||||
/**
|
||||
* Represents an on-screen UI element that is drawn on the canvas.
|
||||
@@ -988,7 +988,7 @@ public interface Widget
|
||||
/**
|
||||
* Gets the image which is (or should be) drawn on this widget
|
||||
*/
|
||||
Sprite getSprite();
|
||||
SpritePixels getSprite();
|
||||
|
||||
/**
|
||||
* {@link net.runelite.api.VarPlayer}s that triggers this widgets varTransmitListener
|
||||
|
||||
Reference in New Issue
Block a user