Search in sources :

Example 1 with Export

use of net.runelite.mapping.Export in project runelite by runelite.

the class WorldMapData method loadMapData.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgp;IB)V", garbageValue = "39")
@Export("loadMapData")
public void loadMapData(Buffer var1, int var2) {
    this.fileId = var2;
    this.identifier = var1.readString();
    this.name = var1.readString();
    this.field428 = new Coordinates(var1.readInt());
    this.field430 = var1.readInt();
    var1.readUnsignedByte();
    this.field437 = var1.readUnsignedByte() == 1;
    this.field439 = var1.readUnsignedByte();
    int var3 = var1.readUnsignedByte();
    this.field435 = new LinkedList();
    for (int var4 = 0; var4 < var3; ++var4) {
        this.field435.add(this.method306(var1));
    }
    this.method315();
}
Also used : LinkedList(java.util.LinkedList) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 2 with Export

use of net.runelite.mapping.Export in project runelite by runelite.

the class RenderOverview method getWorldMapDataContainingCoord.

@ObfuscatedName("a")
@ObfuscatedSignature(signature = "(IIIB)Las;", garbageValue = "29")
@Export("getWorldMapDataContainingCoord")
public WorldMapData getWorldMapDataContainingCoord(int var1, int var2, int var3) {
    Iterator var4 = this.worldMapDataByIdentifier.values().iterator();
    WorldMapData var5;
    do {
        if (!var4.hasNext()) {
            return null;
        }
        var5 = (WorldMapData) var4.next();
    } while (!var5.containsCoord(var1, var2, var3));
    return var5;
}
Also used : Iterator(java.util.Iterator) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 3 with Export

use of net.runelite.mapping.Export in project runelite by runelite.

the class RenderOverview method getWorldMapDataByFileId.

@ObfuscatedName("am")
@ObfuscatedSignature(signature = "(IB)Las;", garbageValue = "-29")
@Export("getWorldMapDataByFileId")
public WorldMapData getWorldMapDataByFileId(int var1) {
    Iterator var2 = this.worldMapDataByIdentifier.values().iterator();
    WorldMapData var3;
    do {
        if (!var2.hasNext()) {
            return null;
        }
        var3 = (WorldMapData) var2.next();
    } while (var3.getFileId() != var1);
    return var3;
}
Also used : Iterator(java.util.Iterator) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 4 with Export

use of net.runelite.mapping.Export in project runelite by runelite.

the class WorldMapManager method load.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Ljm;Ljava/lang/String;ZI)V", garbageValue = "-263697855")
@Export("load")
public void load(IndexDataBase var1, String var2, boolean var3) {
    if (!this.loading) {
        this.loaded = false;
        this.loading = true;
        System.nanoTime();
        int var4 = var1.getFile(MapCacheArchiveNames.DETAILS.name);
        int var5 = var1.getChild(var4, var2);
        Buffer var6 = new Buffer(var1.takeRecordByNames(MapCacheArchiveNames.DETAILS.name, var2));
        Buffer var7 = new Buffer(var1.takeRecordByNames(MapCacheArchiveNames.COMPOSITE_MAP.name, var2));
        Buffer var8 = new Buffer(var1.takeRecordByNames(var2, MapCacheArchiveNames.AREA.name));
        System.nanoTime();
        System.nanoTime();
        this.field524 = new class45();
        try {
            this.field524.method663(var6, var8, var7, var5, var3);
        } catch (IllegalStateException var24) {
            return;
        }
        this.field524.method322();
        this.field524.method323();
        this.field524.method324();
        this.field531 = this.field524.getMinX() * 64;
        this.field525 = this.field524.getMinY() * 64;
        this.field536 = (this.field524.method319() - this.field524.getMinX() + 1) * 64;
        this.field538 = (this.field524.method313() - this.field524.getMinY() + 1) * 64;
        int var18 = this.field524.method319() - this.field524.getMinX() + 1;
        int var10 = this.field524.method313() - this.field524.getMinY() + 1;
        System.nanoTime();
        System.nanoTime();
        BoundingBox.method57();
        this.mapRegions = new WorldMapRegion[var18][var10];
        Iterator var11 = this.field524.field557.iterator();
        int var14;
        int var15;
        while (var11.hasNext()) {
            class22 var12 = (class22) var11.next();
            int var13 = var12.field390;
            var14 = var12.field387;
            var15 = var13 - this.field524.getMinX();
            int var16 = var14 - this.field524.getMinY();
            this.mapRegions[var15][var16] = new WorldMapRegion(var13, var14, this.field524.method316(), this.mapFonts);
            this.mapRegions[var15][var16].method508(var12, this.field524.field555);
        }
        for (int var19 = 0; var19 < var18; ++var19) {
            for (int var20 = 0; var20 < var10; ++var20) {
                if (this.mapRegions[var19][var20] == null) {
                    this.mapRegions[var19][var20] = new WorldMapRegion(this.field524.getMinX() + var19, this.field524.getMinY() + var20, this.field524.method316(), this.mapFonts);
                    this.mapRegions[var19][var20].method392(this.field524.field554, this.field524.field555);
                }
            }
        }
        System.nanoTime();
        System.nanoTime();
        if (var1.method4571(MapCacheArchiveNames.COMPOSITE_TEXTURE.name, var2)) {
            byte[] var27 = var1.takeRecordByNames(MapCacheArchiveNames.COMPOSITE_TEXTURE.name, var2);
            BufferedImage var21 = null;
            SpritePixels var28;
            label46: {
                try {
                    var21 = ImageIO.read(new ByteArrayInputStream(var27));
                    var14 = var21.getWidth();
                    var15 = var21.getHeight();
                    int[] var22 = new int[var15 * var14];
                    PixelGrabber var17 = new PixelGrabber(var21, 0, 0, var14, var15, var22, 0, var14);
                    var17.grabPixels();
                    var28 = new SpritePixels(var22, var14, var15);
                    break label46;
                } catch (IOException var25) {
                    ;
                } catch (InterruptedException var26) {
                    ;
                }
                var28 = new SpritePixels(0, 0);
            }
            this.field534 = var28;
        }
        System.nanoTime();
        var1.method4556();
        var1.reset();
        this.loaded = true;
    }
}
Also used : IOException(java.io.IOException) BufferedImage(java.awt.image.BufferedImage) ByteArrayInputStream(java.io.ByteArrayInputStream) Iterator(java.util.Iterator) PixelGrabber(java.awt.image.PixelGrabber) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 5 with Export

use of net.runelite.mapping.Export in project runelite by runelite.

the class WorldMapRegion method drawNonLinkMapIcons.

@ObfuscatedName("ab")
@ObfuscatedSignature(signature = "(IILjava/util/HashSet;IS)V", garbageValue = "256")
@Export("drawNonLinkMapIcons")
void drawNonLinkMapIcons(int var1, int var2, HashSet var3, int var4) {
    float var5 = (float) var4 / 64.0F;
    float var6 = var5 / 2.0F;
    Iterator var7 = this.field466.entrySet().iterator();
    while (var7.hasNext()) {
        Entry var8 = (Entry) var7.next();
        Coordinates var9 = (Coordinates) var8.getKey();
        int var10 = (int) ((float) var9.worldX * var5 + (float) var1 - var6);
        int var11 = (int) ((float) (var2 + var4) - (float) var9.worldY * var5 - var6);
        MapIcon var12 = (MapIcon) var8.getValue();
        if (var12 != null) {
            var12.screenX = var10;
            var12.screenY = var11;
            Area var13 = Area.mapAreaType[var12.areaId];
            if (!var3.contains(Integer.valueOf(var13.method4755()))) {
                this.method518(var12, var10, var11, var5);
            }
        }
    }
}
Also used : Entry(java.util.Map.Entry) Iterator(java.util.Iterator) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Aggregations

Export (net.runelite.mapping.Export)23 ObfuscatedName (net.runelite.mapping.ObfuscatedName)23 ObfuscatedSignature (net.runelite.mapping.ObfuscatedSignature)22 Iterator (java.util.Iterator)8 IOException (java.io.IOException)4 ByteArrayInputStream (java.io.ByteArrayInputStream)2 File (java.io.File)2 URL (java.net.URL)2 Entry (java.util.Map.Entry)2 Canvas (java.awt.Canvas)1 Color (java.awt.Color)1 Container (java.awt.Container)1 Graphics (java.awt.Graphics)1 Insets (java.awt.Insets)1 Shape (java.awt.Shape)1 BufferedImage (java.awt.image.BufferedImage)1 PixelGrabber (java.awt.image.PixelGrabber)1 BufferedReader (java.io.BufferedReader)1 DataInputStream (java.io.DataInputStream)1 InvalidClassException (java.io.InvalidClassException)1