Merge pull request #4819 from Abextm/spritepixels-external
Make the second argument of SpriteManager::getSprite work
This commit is contained in:
@@ -318,14 +318,14 @@ public interface Client extends GameEngine
|
||||
SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
|
||||
|
||||
/**
|
||||
* Loads and creates the sprite image of the passed archive and file IDs.
|
||||
* Loads and creates the sprite images of the passed archive and file IDs.
|
||||
*
|
||||
* @param source the sprite database
|
||||
* @param archiveId the sprites archive ID
|
||||
* @param fileId the sprites file ID
|
||||
* @return the sprite image of the file
|
||||
*/
|
||||
SpritePixels getSprite(IndexDataBase source, int archiveId, int fileId);
|
||||
SpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId);
|
||||
|
||||
/**
|
||||
* Gets the sprite index database.
|
||||
|
||||
@@ -71,8 +71,8 @@ public class SpriteManager
|
||||
return cached;
|
||||
}
|
||||
|
||||
SpritePixels sp = client.getSprite(client.getIndexSprites(), archive, file);
|
||||
BufferedImage img = sp.toBufferedImage();
|
||||
SpritePixels[] sp = client.getSprites(client.getIndexSprites(), archive, 0);
|
||||
BufferedImage img = sp[file].toBufferedImage();
|
||||
|
||||
cache.put(key, img);
|
||||
return img;
|
||||
|
||||
@@ -319,9 +319,9 @@ public interface RSClient extends RSGameEngine, Client
|
||||
@Import("createSprite")
|
||||
RSSpritePixels createItemSprite(int itemId, int quantity, int thickness, int borderColor, int stackable, boolean noted);
|
||||
|
||||
@Import("getSpriteAsSpritePixels")
|
||||
@Import("getSpritesAsSpritePixels")
|
||||
@Override
|
||||
RSSpritePixels getSprite(IndexDataBase source, int archiveId, int fileId);
|
||||
RSSpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId);
|
||||
|
||||
@Import("indexSprites")
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user