Search in sources :

Example 16 with Export

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

the class GZipDecompressor method decompress.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgp;[BI)V", garbageValue = "271625445")
@Export("decompress")
public void decompress(Buffer var1, byte[] var2) {
    if (var1.payload[var1.offset] == 31 && var1.payload[var1.offset + 1] == -117) {
        if (this.inflator == null) {
            this.inflator = new Inflater(true);
        }
        try {
            this.inflator.setInput(var1.payload, var1.offset + 10, var1.payload.length - (var1.offset + 8 + 10));
            this.inflator.inflate(var2);
        } catch (Exception var4) {
            this.inflator.reset();
            throw new RuntimeException("");
        }
        this.inflator.reset();
    } else {
        throw new RuntimeException("");
    }
}
Also used : Inflater(java.util.zip.Inflater) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 17 with Export

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

the class Buffer method encryptRsa.

@ObfuscatedName("aj")
@ObfuscatedSignature(signature = "(Ljava/math/BigInteger;Ljava/math/BigInteger;B)V", garbageValue = "-23")
@Export("encryptRsa")
public void encryptRsa(BigInteger var1, BigInteger var2) {
    int var3 = this.offset;
    this.offset = 0;
    byte[] var4 = new byte[var3];
    this.readBytes(var4, 0, var3);
    BigInteger var5 = new BigInteger(var4);
    BigInteger var6 = var5.modPow(var1, var2);
    byte[] var7 = var6.toByteArray();
    this.offset = 0;
    this.putShort(var7.length);
    this.putBytes(var7, 0, var7.length);
}
Also used : BigInteger(java.math.BigInteger) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 18 with Export

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

the class Player method decodeApperance.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgp;I)V", garbageValue = "-2010554176")
@Export("decodeApperance")
final void decodeApperance(Buffer var1) {
    var1.offset = 0;
    int var2 = var1.readUnsignedByte();
    this.skullIcon = var1.readByte();
    this.overheadIcon = var1.readByte();
    int var3 = -1;
    this.team = 0;
    int[] var4 = new int[12];
    int var6;
    int var7;
    for (int var5 = 0; var5 < 12; ++var5) {
        var6 = var1.readUnsignedByte();
        if (var6 == 0) {
            var4[var5] = 0;
        } else {
            var7 = var1.readUnsignedByte();
            var4[var5] = var7 + (var6 << 8);
            if (var5 == 0 && var4[0] == 65535) {
                var3 = var1.readUnsignedShort();
                break;
            }
            if (var4[var5] >= 512) {
                int var8 = GameObject.getItemDefinition(var4[var5] - 512).int1;
                if (var8 != 0) {
                    this.team = var8;
                }
            }
        }
    }
    int[] var9 = new int[5];
    for (var6 = 0; var6 < 5; ++var6) {
        var7 = var1.readUnsignedByte();
        if (var7 < 0 || var7 >= GameCanvas.colorsToReplace[var6].length) {
            var7 = 0;
        }
        var9[var6] = var7;
    }
    super.idlePoseAnimation = var1.readUnsignedShort();
    if (super.idlePoseAnimation == 65535) {
        super.idlePoseAnimation = -1;
    }
    super.field1195 = var1.readUnsignedShort();
    if (super.field1195 == 65535) {
        super.field1195 = -1;
    }
    super.field1157 = super.field1195;
    super.field1158 = var1.readUnsignedShort();
    if (super.field1158 == 65535) {
        super.field1158 = -1;
    }
    super.field1172 = var1.readUnsignedShort();
    if (super.field1172 == 65535) {
        super.field1172 = -1;
    }
    super.field1160 = var1.readUnsignedShort();
    if (super.field1160 == 65535) {
        super.field1160 = -1;
    }
    super.field1161 = var1.readUnsignedShort();
    if (super.field1161 == 65535) {
        super.field1161 = -1;
    }
    super.field1162 = var1.readUnsignedShort();
    if (super.field1162 == 65535) {
        super.field1162 = -1;
    }
    this.name = new Name(var1.readString(), Client.loginType);
    this.method1166();
    this.method1145();
    if (this == WorldComparator.localPlayer) {
        RunException.field2176 = this.name.getName();
    }
    this.combatLevel = var1.readUnsignedByte();
    this.totalLevel = var1.readUnsignedShort();
    this.hidden = var1.readUnsignedByte() == 1;
    if (Client.socketType == 0 && Client.rights >= 2) {
        this.hidden = false;
    }
    if (this.composition == null) {
        this.composition = new PlayerComposition();
    }
    this.composition.method4408(var4, var9, var2 == 1, var3);
}
Also used : ObfuscatedName(net.runelite.mapping.ObfuscatedName) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 19 with Export

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

the class Fonts method createMap.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "([Lkd;I)Ljava/util/HashMap;", garbageValue = "80099990")
@Export("createMap")
public HashMap createMap(FontName[] var1) {
    HashMap var2 = new HashMap();
    FontName[] var3 = var1;
    for (int var4 = 0; var4 < var3.length; ++var4) {
        FontName var5 = var3[var4];
        if (this.map.containsKey(var5)) {
            var2.put(var5, this.map.get(var5));
        } else {
            IndexDataBase var7 = this.field3882;
            IndexDataBase var8 = this.field3883;
            String var9 = var5.field3876;
            int var10 = var7.getFile(var9);
            int var11 = var7.getChild(var10, "");
            Font var12;
            if (!class288.method5204(var7, var10, var11)) {
                var12 = null;
            } else {
                var12 = Area.method4772(var8.getConfigData(var10, var11));
            }
            if (var12 != null) {
                this.map.put(var5, var12);
                var2.put(var5, var12);
            }
        }
    }
    return var2;
}
Also used : HashMap(java.util.HashMap) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 20 with Export

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

the class SourceDataSoundSystem method create.

@ObfuscatedName("i")
@ObfuscatedSignature(signature = "(II)V", garbageValue = "1217716284")
@Export("create")
protected void create(int var1) throws LineUnavailableException {
    try {
        Info var2 = new Info(SourceDataLine.class, this.audioFormat, var1 << (UnitPriceComparator.audioHighMemory ? 2 : 1));
        this.source = (SourceDataLine) AudioSystem.getLine(var2);
        this.source.open();
        this.source.start();
        this.size = var1;
    } catch (LineUnavailableException var5) {
        int var4 = (var1 >>> 1 & 1431655765) + (var1 & 1431655765);
        var4 = (var4 >>> 2 & 858993459) + (var4 & 858993459);
        var4 = (var4 >>> 4) + var4 & 252645135;
        var4 += var4 >>> 8;
        var4 += var4 >>> 16;
        int var3 = var4 & 255;
        if (var3 != 1) {
            this.create(WallObject.nextPowerOfTwo(var1));
        } else {
            this.source = null;
            throw var5;
        }
    }
}
Also used : LineUnavailableException(javax.sound.sampled.LineUnavailableException) Info(javax.sound.sampled.DataLine.Info) 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