Search in sources :

Example 46 with ObfuscatedSignature

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

the class GameEngine method method903.

@ObfuscatedName("ay")
@ObfuscatedSignature(signature = "(I)Llg;", garbageValue = "-36406200")
Bounds method903() {
    Container var1 = this.container();
    int var2 = Math.max(var1.getWidth(), this.field672);
    int var3 = Math.max(var1.getHeight(), this.field674);
    if (this.frame != null) {
        Insets var4 = this.frame.getInsets();
        var2 -= var4.left + var4.right;
        var3 -= var4.bottom + var4.top;
    }
    return new Bounds(var2, var3);
}
Also used : Container(java.awt.Container) Insets(java.awt.Insets) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 47 with ObfuscatedSignature

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

the class GameEngine method method883.

@ObfuscatedName("h")
@ObfuscatedSignature(signature = "(I)V", garbageValue = "1359016038")
final void method883() {
    Container var1 = this.container();
    if (var1 != null) {
        Bounds var2 = this.method903();
        this.field669 = Math.max(var2.field3936, this.field672);
        this.field670 = Math.max(var2.field3937, this.field674);
        if (this.field669 <= 0) {
            this.field669 = 1;
        }
        if (this.field670 <= 0) {
            this.field670 = 1;
        }
        Sequence.canvasWidth = Math.min(this.field669, this.field675);
        class45.canvasHeight = Math.min(this.field670, this.field676);
        this.field660 = (this.field669 - Sequence.canvasWidth) / 2;
        this.field657 = 0;
        this.canvas.setSize(Sequence.canvasWidth, class45.canvasHeight);
        class324.rasterProvider = new MainBufferProvider(Sequence.canvasWidth, class45.canvasHeight, this.canvas);
        if (var1 == this.frame) {
            Insets var3 = this.frame.getInsets();
            this.canvas.setLocation(var3.left + this.field660, this.field657 + var3.top);
        } else {
            this.canvas.setLocation(this.field660, this.field657);
        }
        this.field692 = true;
        this.vmethod1266();
    }
}
Also used : Container(java.awt.Container) Insets(java.awt.Insets) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 48 with ObfuscatedSignature

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

the class VertexNormal method method2789.

@ObfuscatedName("at")
@ObfuscatedSignature(signature = "(S)I", garbageValue = "-12882")
protected static int method2789() {
    int var0 = 0;
    if (GameEngine.field688 == null || !GameEngine.field688.isValid()) {
        try {
            Iterator var1 = ManagementFactory.getGarbageCollectorMXBeans().iterator();
            while (var1.hasNext()) {
                GarbageCollectorMXBean var2 = (GarbageCollectorMXBean) var1.next();
                if (var2.isValid()) {
                    GameEngine.field688 = var2;
                    GameEngine.garbageCollectorLastCheckTimeMs = -1L;
                    GameEngine.garbageCollectorLastCollectionTime = -1L;
                }
            }
        } catch (Throwable var11) {
            ;
        }
    }
    if (GameEngine.field688 != null) {
        long var9 = ScriptVarType.method28();
        long var3 = GameEngine.field688.getCollectionTime();
        if (-1L != GameEngine.garbageCollectorLastCollectionTime) {
            long var5 = var3 - GameEngine.garbageCollectorLastCollectionTime;
            long var7 = var9 - GameEngine.garbageCollectorLastCheckTimeMs;
            if (var7 != 0L) {
                var0 = (int) (100L * var5 / var7);
            }
        }
        GameEngine.garbageCollectorLastCollectionTime = var3;
        GameEngine.garbageCollectorLastCheckTimeMs = var9;
    }
    return var0;
}
Also used : Iterator(java.util.Iterator) GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 49 with ObfuscatedSignature

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

the class WorldMapManager method method586.

@ObfuscatedName("z")
@ObfuscatedSignature(signature = "(IIIIIIIIIIB)Ljava/util/List;", garbageValue = "0")
public List method586(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10) {
    LinkedList var11 = new LinkedList();
    if (!this.loaded) {
        return var11;
    } else {
        WorldMapRectangle var12 = this.getRegionRectForViewport(var1, var2, var3, var4);
        float var13 = this.method591(var7, var3 - var1);
        int var14 = (int) (64.0F * var13);
        int var15 = this.field531 + var1;
        int var16 = var2 + this.field525;
        for (int var17 = var12.worldMapRegionX; var17 < var12.worldMapRegionX + var12.worldMapRegionWidth; ++var17) {
            for (int var18 = var12.worldMapRegionY; var18 < var12.worldMapRegionHeight + var12.worldMapRegionY; ++var18) {
                List var19 = this.mapRegions[var17][var18].method425(var5 + var14 * (this.mapRegions[var17][var18].field459 * 64 - var15) / 64, var8 + var6 - var14 * (this.mapRegions[var17][var18].field456 * 64 - var16 + 64) / 64, var14, var9, var10);
                if (!var19.isEmpty()) {
                    var11.addAll(var19);
                }
            }
        }
        return var11;
    }
}
Also used : List(java.util.List) LinkedList(java.util.LinkedList) LinkedList(java.util.LinkedList) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 50 with ObfuscatedSignature

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

the class WorldMapManager method method620.

@ObfuscatedName("x")
@ObfuscatedSignature(signature = "(IIIILjava/util/HashSet;III)V", garbageValue = "1679589986")
public void method620(int var1, int var2, int var3, int var4, HashSet var5, int var6, int var7) {
    if (this.field534 != null) {
        this.field534.method5871(var1, var2, var3, var4);
        if (var6 > 0 && var6 % var7 < var7 / 2) {
            if (this.field526 == null) {
                this.method590();
            }
            Iterator var8 = var5.iterator();
            while (true) {
                List var10;
                do {
                    if (!var8.hasNext()) {
                        return;
                    }
                    int var9 = ((Integer) var8.next()).intValue();
                    var10 = (List) this.field526.get(Integer.valueOf(var9));
                } while (var10 == null);
                Iterator var11 = var10.iterator();
                while (var11.hasNext()) {
                    MapIcon var12 = (MapIcon) var11.next();
                    int var13 = var3 * (var12.field512.worldX - this.field531) / this.field536;
                    int var14 = var4 - (var12.field512.worldY - this.field525) * var4 / this.field538;
                    Rasterizer2D.method5739(var13 + var1, var14 + var2, 2, 16776960, 256);
                }
            }
        }
    }
}
Also used : Iterator(java.util.Iterator) List(java.util.List) LinkedList(java.util.LinkedList) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Aggregations

ObfuscatedSignature (net.runelite.mapping.ObfuscatedSignature)72 ObfuscatedName (net.runelite.mapping.ObfuscatedName)71 Iterator (java.util.Iterator)30 Export (net.runelite.mapping.Export)22 IOException (java.io.IOException)10 LinkedList (java.util.LinkedList)10 List (java.util.List)6 Container (java.awt.Container)5 Insets (java.awt.Insets)5 HashSet (java.util.HashSet)5 JSObject (netscape.javascript.JSObject)5 URL (java.net.URL)4 HashMap (java.util.HashMap)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 URI (java.net.URI)3 Canvas (java.awt.Canvas)2 Graphics (java.awt.Graphics)2 BufferedImage (java.awt.image.BufferedImage)2 PixelGrabber (java.awt.image.PixelGrabber)2 File (java.io.File)2