This commit is contained in:
Lucwousin
2019-09-26 14:22:19 +02:00
parent 9b020b1ea6
commit fd294114e2
341 changed files with 90594 additions and 91052 deletions

View File

@@ -1,309 +1,184 @@
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.ScriptOpcodes;
@ObfuscatedName("cb")
@Implements("HealthBar")
public class HealthBar extends Node {
@ObfuscatedName("j")
static byte[][][] field1089;
@ObfuscatedName("d")
@ObfuscatedSignature(
signature = "Llt;"
)
@Export("logoSprite")
static IndexedSprite logoSprite;
@ObfuscatedName("n")
@ObfuscatedSignature(
signature = "Lhz;"
)
@Export("Widget_spritesArchive")
static AbstractArchive Widget_spritesArchive;
@ObfuscatedName("f")
@ObfuscatedSignature(
signature = "Lco;"
)
@Export("pcmPlayerProvider")
public static PcmPlayerProvider pcmPlayerProvider;
@ObfuscatedName("fp")
@ObfuscatedSignature(
signature = "Lkf;"
)
@Export("fontBold12")
static Font fontBold12;
@ObfuscatedName("t")
@ObfuscatedSignature(
signature = "Lix;"
)
@Export("definition")
HealthBarDefinition definition;
@ObfuscatedName("g")
@ObfuscatedSignature(
signature = "Ljd;"
)
@Export("updates")
IterableNodeDeque updates;
@ObfuscatedSignature(
signature = "(Lix;)V"
)
HealthBar(HealthBarDefinition var1) {
this.updates = new IterableNodeDeque();
this.definition = var1;
}
@ObfuscatedName("c")
@ObfuscatedSignature(
signature = "(IIIII)V",
garbageValue = "-1491232381"
)
@Export("put")
void put(int var1, int var2, int var3, int var4) {
HealthBarUpdate var5 = null;
int var6 = 0;
for (HealthBarUpdate var7 = (HealthBarUpdate)this.updates.last(); var7 != null; var7 = (HealthBarUpdate)this.updates.previous()) {
++var6;
if (var7.cycle == var1) {
var7.set(var1, var2, var3, var4);
return;
}
if (var7.cycle <= var1) {
var5 = var7;
}
}
if (var5 == null) {
if (var6 < 4) {
this.updates.addLast(new HealthBarUpdate(var1, var2, var3, var4));
}
} else {
IterableNodeDeque.IterableNodeDeque_addBefore(new HealthBarUpdate(var1, var2, var3, var4), var5);
if (var6 >= 4) {
this.updates.last().remove();
}
}
}
@ObfuscatedName("x")
@ObfuscatedSignature(
signature = "(IB)Lbl;",
garbageValue = "1"
)
@Export("get")
HealthBarUpdate get(int var1) {
HealthBarUpdate var2 = (HealthBarUpdate)this.updates.last();
if (var2 != null && var2.cycle <= var1) {
for (HealthBarUpdate var3 = (HealthBarUpdate)this.updates.previous(); var3 != null && var3.cycle <= var1; var3 = (HealthBarUpdate)this.updates.previous()) {
var2.remove();
var2 = var3;
}
if (this.definition.int5 + var2.cycle + var2.cycleOffset > var1) {
return var2;
} else {
var2.remove();
return null;
}
} else {
return null;
}
}
@ObfuscatedName("t")
@ObfuscatedSignature(
signature = "(I)Z",
garbageValue = "-796562710"
)
@Export("isEmpty")
boolean isEmpty() {
return this.updates.method4874();
}
@ObfuscatedName("s")
@ObfuscatedSignature(
signature = "(CI)Z",
garbageValue = "-60300776"
)
@Export("isAlphaNumeric")
public static boolean isAlphaNumeric(char var0) {
return var0 >= '0' && var0 <= '9' || var0 >= 'A' && var0 <= 'Z' || var0 >= 'a' && var0 <= 'z';
}
@ObfuscatedName("al")
@ObfuscatedSignature(
signature = "(ILcu;ZI)I",
garbageValue = "-1113312719"
)
static int method2006(int var0, Script var1, boolean var2) {
int var3;
int var4;
if (var0 == ScriptOpcodes.ADD) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 + var4;
return 1;
} else if (var0 == ScriptOpcodes.SUB) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 - var4;
return 1;
} else if (var0 == ScriptOpcodes.MULTIPLY) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 * var4;
return 1;
} else if (var0 == ScriptOpcodes.DIV) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 / var4;
return 1;
} else if (var0 == ScriptOpcodes.RANDOM) {
var3 = Interpreter.Interpreter_intStack[--class160.Interpreter_intStackSize];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)(Math.random() * (double)var3);
return 1;
} else if (var0 == ScriptOpcodes.RANDOMINC) {
var3 = Interpreter.Interpreter_intStack[--class160.Interpreter_intStackSize];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)(Math.random() * (double)(var3 + 1));
return 1;
} else if (var0 == ScriptOpcodes.INTERPOLATE) {
class160.Interpreter_intStackSize -= 5;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
int var5 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 2];
int var6 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 3];
int var7 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 4];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 + (var7 - var5) * (var4 - var3) / (var6 - var5);
return 1;
} else if (var0 == ScriptOpcodes.ADDPERCENT) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 + var3 * var4 / 100;
return 1;
} else if (var0 == ScriptOpcodes.SETBIT) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 | 1 << var4;
return 1;
} else if (var0 == ScriptOpcodes.CLEARBIT) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 & -1 - (1 << var4);
return 1;
} else if (var0 == ScriptOpcodes.TESTBIT) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (var3 & 1 << var4) != 0 ? 1 : 0;
return 1;
} else if (var0 == ScriptOpcodes.MOD) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 % var4;
return 1;
} else if (var0 == ScriptOpcodes.POW) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
if (var3 == 0) {
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = 0;
} else {
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)Math.pow((double)var3, (double)var4);
}
return 1;
} else if (var0 == ScriptOpcodes.INVPOW) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
if (var3 == 0) {
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = 0;
return 1;
} else {
switch(var4) {
case 0:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = Integer.MAX_VALUE;
break;
case 1:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3;
break;
case 2:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)Math.sqrt((double)var3);
break;
case 3:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)Math.cbrt((double)var3);
break;
case 4:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)Math.sqrt(Math.sqrt((double)var3));
break;
default:
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)Math.pow((double)var3, 1.0D / (double)var4);
}
return 1;
}
} else if (var0 == ScriptOpcodes.AND) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 & var4;
return 1;
} else if (var0 == ScriptOpcodes.OR) {
class160.Interpreter_intStackSize -= 2;
var3 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
var4 = Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = var3 | var4;
return 1;
} else if (var0 == ScriptOpcodes.SCALE) {
class160.Interpreter_intStackSize -= 3;
long var9 = (long)Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize];
long var11 = (long)Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 1];
long var13 = (long)Interpreter.Interpreter_intStack[class160.Interpreter_intStackSize + 2];
Interpreter.Interpreter_intStack[++class160.Interpreter_intStackSize - 1] = (int)(var9 * var13 / var11);
return 1;
} else {
return 2;
}
}
@ObfuscatedName("ab")
@ObfuscatedSignature(
signature = "(ILcu;ZB)I",
garbageValue = "-65"
)
static int method1999(int var0, Script var1, boolean var2) {
if (var0 == ScriptOpcodes.LOGOUT) {
Client.logoutTimer = 250;
return 1;
} else {
return 2;
}
}
@ObfuscatedName("hy")
@ObfuscatedSignature(
signature = "(IIIII)V",
garbageValue = "-1895452388"
)
static final void method2007(int var0, int var1, int var2, int var3) {
for (int var4 = 0; var4 < Client.rootWidgetCount; ++var4) {
if (Client.rootWidgetXs[var4] + Client.rootWidgetWidths[var4] > var0 && Client.rootWidgetXs[var4] < var0 + var2 && Client.rootWidgetYs[var4] + Client.rootWidgetHeights[var4] > var1 && Client.rootWidgetYs[var4] < var3 + var1) {
Client.field827[var4] = true;
}
}
}
}
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("cz")
@Implements("HealthBar")
public class HealthBar extends Node {
@ObfuscatedName("bu")
@ObfuscatedSignature(
signature = "Llp;"
)
@Export("worldSelectRightSprite")
static IndexedSprite worldSelectRightSprite;
@ObfuscatedName("v")
@ObfuscatedSignature(
signature = "Lip;"
)
@Export("definition")
HealthBarDefinition definition;
@ObfuscatedName("u")
@ObfuscatedSignature(
signature = "Ljs;"
)
@Export("updates")
IterableNodeDeque updates;
@ObfuscatedSignature(
signature = "(Lip;)V"
)
HealthBar(HealthBarDefinition var1) {
this.updates = new IterableNodeDeque();
this.definition = var1;
}
@ObfuscatedName("z")
@ObfuscatedSignature(
signature = "(IIIIB)V",
garbageValue = "1"
)
@Export("put")
void put(int var1, int var2, int var3, int var4) {
HealthBarUpdate var5 = null;
int var6 = 0;
for (HealthBarUpdate var7 = (HealthBarUpdate)this.updates.last(); var7 != null; var7 = (HealthBarUpdate)this.updates.previous()) {
++var6;
if (var7.cycle == var1) {
var7.set(var1, var2, var3, var4);
return;
}
if (var7.cycle <= var1) {
var5 = var7;
}
}
if (var5 == null) {
if (var6 < 4) {
this.updates.addLast(new HealthBarUpdate(var1, var2, var3, var4));
}
} else {
IterableNodeDeque.IterableNodeDeque_addBefore(new HealthBarUpdate(var1, var2, var3, var4), var5);
if (var6 >= 4) {
this.updates.last().remove();
}
}
}
@ObfuscatedName("n")
@ObfuscatedSignature(
signature = "(IB)Lbq;",
garbageValue = "109"
)
@Export("get")
HealthBarUpdate get(int var1) {
HealthBarUpdate var2 = (HealthBarUpdate)this.updates.last();
if (var2 != null && var2.cycle <= var1) {
for (HealthBarUpdate var3 = (HealthBarUpdate)this.updates.previous(); var3 != null && var3.cycle <= var1; var3 = (HealthBarUpdate)this.updates.previous()) {
var2.remove();
var2 = var3;
}
if (this.definition.int5 + var2.cycleOffset + var2.cycle > var1) {
return var2;
} else {
var2.remove();
return null;
}
} else {
return null;
}
}
@ObfuscatedName("v")
@ObfuscatedSignature(
signature = "(I)Z",
garbageValue = "-783831173"
)
@Export("isEmpty")
boolean isEmpty() {
return this.updates.method4763();
}
@ObfuscatedName("n")
@ObfuscatedSignature(
signature = "(Llb;III)I",
garbageValue = "-1932083268"
)
static int method2030(IterableNodeHashTable var0, int var1, int var2) {
if (var0 == null) {
return var2;
} else {
IntegerNode var3 = (IntegerNode)var0.get((long)var1);
return var3 == null ? var2 : var3.integer;
}
}
@ObfuscatedName("q")
@ObfuscatedSignature(
signature = "(IZI)Ljava/lang/String;",
garbageValue = "878473077"
)
@Export("intToString")
public static String intToString(int var0, boolean var1) {
if (var1 && var0 >= 0) {
int var3 = var0;
String var2;
if (var1 && var0 >= 0) {
int var4 = 2;
for (int var5 = var0 / 10; var5 != 0; ++var4) {
var5 /= 10;
}
char[] var6 = new char[var4];
var6[0] = '+';
for (int var7 = var4 - 1; var7 > 0; --var7) {
int var8 = var3;
var3 /= 10;
int var9 = var8 - var3 * 10;
if (var9 >= 10) {
var6[var7] = (char)(var9 + 87);
} else {
var6[var7] = (char)(var9 + 48);
}
}
var2 = new String(var6);
} else {
var2 = Integer.toString(var0, 10);
}
return var2;
} else {
return Integer.toString(var0);
}
}
@ObfuscatedName("fr")
@ObfuscatedSignature(
signature = "(Lby;I)V",
garbageValue = "1394806934"
)
static final void method2028(Actor var0) {
if (var0.field976 == Client.cycle || var0.sequence == -1 || var0.sequenceDelay != 0 || var0.sequenceFrameCycle + 1 > GrandExchangeOfferUnitPriceComparator.SequenceDefinition_get(var0.sequence).frameLengths[var0.sequenceFrame]) {
int var1 = var0.field976 - var0.field948;
int var2 = Client.cycle - var0.field948;
int var3 = var0.field932 * -527978816 + var0.field971 * 128;
int var4 = var0.field932 * -527978816 + var0.field973 * 128;
int var5 = var0.field972 * 128 + var0.field932 * -527978816;
int var6 = var0.field932 * -527978816 + var0.field974 * 128;
var0.x = (var2 * var5 + var3 * (var1 - var2)) / var1;
var0.y = (var6 * var2 + var4 * (var1 - var2)) / var1 * -944175751;
}
var0.field949 = 0;
var0.orientation = var0.field977;
var0.rotation = var0.orientation;
}
}