Search in sources :

Example 6 with OverlayDefinition

use of net.runelite.cache.definitions.OverlayDefinition in project runelite by runelite.

the class MapImageDumper method loadOverlays.

private void loadOverlays(Store store) throws IOException {
    Storage storage = store.getStorage();
    Index index = store.getIndex(IndexType.CONFIGS);
    Archive archive = index.getArchive(ConfigType.OVERLAY.getId());
    byte[] archiveData = storage.loadArchive(archive);
    ArchiveFiles files = archive.getFiles(archiveData);
    for (FSFile file : files.getFiles()) {
        OverlayLoader loader = new OverlayLoader();
        OverlayDefinition overlay = loader.load(file.getFileId(), file.getContents());
        overlays.put(overlay.getId(), overlay);
    }
}
Also used : Storage(net.runelite.cache.fs.Storage) Archive(net.runelite.cache.fs.Archive) ArchiveFiles(net.runelite.cache.fs.ArchiveFiles) OverlayDefinition(net.runelite.cache.definitions.OverlayDefinition) Index(net.runelite.cache.fs.Index) OverlayLoader(net.runelite.cache.definitions.loaders.OverlayLoader) FSFile(net.runelite.cache.fs.FSFile)

Aggregations

OverlayDefinition (net.runelite.cache.definitions.OverlayDefinition)6 UnderlayDefinition (net.runelite.cache.definitions.UnderlayDefinition)2 OverlayLoader (net.runelite.cache.definitions.loaders.OverlayLoader)2 Archive (net.runelite.cache.fs.Archive)2 ArchiveFiles (net.runelite.cache.fs.ArchiveFiles)2 FSFile (net.runelite.cache.fs.FSFile)2 Index (net.runelite.cache.fs.Index)2 Storage (net.runelite.cache.fs.Storage)2 Gson (com.google.gson.Gson)1 Color (java.awt.Color)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 InputStreamReader (java.io.InputStreamReader)1 Store (net.runelite.cache.fs.Store)1 InputStream (net.runelite.cache.io.InputStream)1 Region (net.runelite.cache.region.Region)1 Test (org.junit.Test)1