Search in sources :

Example 41 with Archive

use of net.runelite.cache.fs.Archive in project runelite by runelite.

the class SpriteManager method load.

public void load() throws IOException {
    Storage storage = store.getStorage();
    Index index = store.getIndex(IndexType.SPRITES);
    for (Archive a : index.getArchives()) {
        byte[] contents = a.decompress(storage.loadArchive(a));
        SpriteLoader loader = new SpriteLoader();
        SpriteDefinition[] defs = loader.load(a.getArchiveId(), contents);
        for (SpriteDefinition sprite : defs) {
            sprites.put(sprite.getId(), sprite);
        }
    }
}
Also used : Storage(net.runelite.cache.fs.Storage) Archive(net.runelite.cache.fs.Archive) SpriteDefinition(net.runelite.cache.definitions.SpriteDefinition) Index(net.runelite.cache.fs.Index) SpriteLoader(net.runelite.cache.definitions.loaders.SpriteLoader)

Aggregations

Archive (net.runelite.cache.fs.Archive)41 Index (net.runelite.cache.fs.Index)38 Storage (net.runelite.cache.fs.Storage)34 Store (net.runelite.cache.fs.Store)21 File (java.io.File)19 Test (org.junit.Test)19 ArchiveFiles (net.runelite.cache.fs.ArchiveFiles)18 FSFile (net.runelite.cache.fs.FSFile)18 IOException (java.io.IOException)6 FileData (net.runelite.cache.index.FileData)4 Container (net.runelite.cache.fs.Container)3 BufferedImage (java.awt.image.BufferedImage)2 CacheClient (net.runelite.cache.client.CacheClient)2 FramemapDefinition (net.runelite.cache.definitions.FramemapDefinition)2 InterfaceDefinition (net.runelite.cache.definitions.InterfaceDefinition)2 InventoryDefinition (net.runelite.cache.definitions.InventoryDefinition)2 ItemDefinition (net.runelite.cache.definitions.ItemDefinition)2 LocationsDefinition (net.runelite.cache.definitions.LocationsDefinition)2 MapDefinition (net.runelite.cache.definitions.MapDefinition)2 OverlayDefinition (net.runelite.cache.definitions.OverlayDefinition)2