chore: rev 190

This commit is contained in:
ThatGamerBlue
2020-06-18 12:15:38 +01:00
parent c97f7b196e
commit 655106b9df
351 changed files with 41484 additions and 41558 deletions

View File

@@ -3,30 +3,35 @@ import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.ScriptOpcodes;
@ObfuscatedName("dx")
@ObfuscatedName("dv")
@Implements("Decimator")
public class Decimator {
@ObfuscatedName("d")
@ObfuscatedName("z")
@ObfuscatedSignature(
signature = "[Llh;"
)
@Export("title_muteSprite")
static IndexedSprite[] title_muteSprite;
@ObfuscatedName("j")
@ObfuscatedGetter(
intValue = -591203607
intValue = 566194753
)
@Export("inputRate")
int inputRate;
@ObfuscatedName("w")
@ObfuscatedName("p")
@ObfuscatedGetter(
intValue = -772700621
intValue = -690101149
)
@Export("outputRate")
int outputRate;
@ObfuscatedName("v")
@ObfuscatedName("g")
@Export("table")
int[][] table;
public Decimator(int var1, int var2) {
if (var2 != var1) {
int var3 = ModeWhere.method3763(var1, var2);
int var3 = class204.method3818(var1, var2);
var1 /= var3;
var2 /= var3;
this.inputRate = var1;
@@ -35,7 +40,7 @@ public class Decimator {
for (int var4 = 0; var4 < var1; ++var4) {
int[] var5 = this.table[var4];
double var6 = 6.0D + (double)var4 / (double)var1;
double var6 = (double)var4 / (double)var1 + 6.0D;
int var8 = (int)Math.floor(1.0D + (var6 - 7.0D));
if (var8 < 0) {
var8 = 0;
@@ -47,24 +52,24 @@ public class Decimator {
}
for (double var10 = (double)var2 / (double)var1; var8 < var9; ++var8) {
double var12 = 3.141592653589793D * ((double)var8 - var6);
double var12 = ((double)var8 - var6) * 3.141592653589793D;
double var14 = var10;
if (var12 < -1.0E-4D || var12 > 1.0E-4D) {
var14 = var10 * (Math.sin(var12) / var12);
}
var14 *= 0.54D + 0.46D * Math.cos(((double)var8 - var6) * 0.2243994752564138D);
var5[var8] = (int)Math.floor(65536.0D * var14 + 0.5D);
var5[var8] = (int)Math.floor(0.5D + var14 * 65536.0D);
}
}
}
}
@ObfuscatedName("x")
@ObfuscatedName("m")
@ObfuscatedSignature(
signature = "([BI)[B",
garbageValue = "2035174504"
garbageValue = "880157357"
)
@Export("resample")
byte[] resample(byte[] var1) {
@@ -81,7 +86,7 @@ public class Decimator {
int var9;
for (var9 = 0; var9 < 14; ++var9) {
var3[var4 + var9] += var8[var9] * var7;
var3[var9 + var4] += var8[var9] * var7;
}
var5 += this.outputRate;
@@ -107,10 +112,10 @@ public class Decimator {
return var1;
}
@ObfuscatedName("m")
@ObfuscatedName("o")
@ObfuscatedSignature(
signature = "(IB)I",
garbageValue = "65"
garbageValue = "124"
)
@Export("scaleRate")
int scaleRate(int var1) {
@@ -121,199 +126,17 @@ public class Decimator {
return var1;
}
@ObfuscatedName("k")
@ObfuscatedName("q")
@ObfuscatedSignature(
signature = "(II)I",
garbageValue = "-548608122"
signature = "(IB)I",
garbageValue = "70"
)
@Export("scalePosition")
int scalePosition(int var1) {
if (this.table != null) {
var1 = (int)((long)var1 * (long)this.outputRate / (long)this.inputRate) + 6;
var1 = (int)((long)this.outputRate * (long)var1 / (long)this.inputRate) + 6;
}
return var1;
}
@ObfuscatedName("m")
public static boolean method2635(long var0) {
return var0 != 0L && !WorldMapDecorationType.method4212(var0);
}
@ObfuscatedName("z")
@ObfuscatedSignature(
signature = "(ILce;ZI)I",
garbageValue = "49819578"
)
static int method2649(int var0, Script var1, boolean var2) {
boolean var3 = true;
Widget var4;
if (var0 >= 2000) {
var0 -= 1000;
var4 = MusicPatchNode.getWidget(Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize]);
var3 = false;
} else {
var4 = var2 ? GrandExchangeOfferNameComparator.field115 : Interpreter.field1130;
}
int var11;
if (var0 == ScriptOpcodes.CC_SETOP) {
var11 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] - 1;
if (var11 >= 0 && var11 <= 9) {
var4.setAction(var11, Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]);
return 1;
} else {
--Interpreter.Interpreter_stringStackSize;
return 1;
}
} else {
int var6;
if (var0 == ScriptOpcodes.CC_SETDRAGGABLE) {
Interpreter.Interpreter_intStackSize -= 2;
var11 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
var6 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
var4.parent = GrandExchangeOfferUnitPriceComparator.getWidgetChild(var11, var6);
return 1;
} else if (var0 == ScriptOpcodes.CC_SETDRAGGABLEBEHAVIOR) {
var4.isScrollBar = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
return 1;
} else if (var0 == ScriptOpcodes.CC_SETDRAGDEADZONE) {
var4.dragZoneSize = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
return 1;
} else if (var0 == ScriptOpcodes.CC_SETDRAGDEADTIME) {
var4.dragThreshold = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
return 1;
} else if (var0 == ScriptOpcodes.CC_SETOPBASE) {
var4.dataText = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize];
return 1;
} else if (var0 == ScriptOpcodes.CC_SETTARGETVERB) {
var4.spellActionName = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize];
return 1;
} else if (var0 == ScriptOpcodes.CC_CLEAROPS) {
var4.actions = null;
return 1;
} else if (var0 == 1308) {
var4.field2658 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
return 1;
} else if (var0 == 1309) {
--Interpreter.Interpreter_intStackSize;
return 1;
} else {
int var7;
byte[] var9;
if (var0 != ScriptOpcodes.CC_SETOPKEY) {
byte var5;
if (var0 == ScriptOpcodes.CC_SETOPTKEY) {
Interpreter.Interpreter_intStackSize -= 2;
var5 = 10;
var9 = new byte[]{(byte)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize]};
byte[] var10 = new byte[]{(byte)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1]};
FontName.Widget_setKey(var4, var5, var9, var10);
return 1;
} else if (var0 == ScriptOpcodes.CC_SETOPKEYRATE) {
Interpreter.Interpreter_intStackSize -= 3;
var11 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize] - 1;
var6 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
var7 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 2];
if (var11 >= 0 && var11 <= 9) {
MouseHandler.Widget_setKeyRate(var4, var11, var6, var7);
return 1;
} else {
throw new RuntimeException();
}
} else if (var0 == ScriptOpcodes.CC_SETOPTKEYRATE) {
var5 = 10;
var6 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
var7 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
MouseHandler.Widget_setKeyRate(var4, var5, var6, var7);
return 1;
} else if (var0 == ScriptOpcodes.CC_SETOPKEYIGNOREHELD) {
--Interpreter.Interpreter_intStackSize;
var11 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize] - 1;
if (var11 >= 0 && var11 <= 9) {
class195.Widget_setKeyIgnoreHeld(var4, var11);
return 1;
} else {
throw new RuntimeException();
}
} else if (var0 == ScriptOpcodes.CC_SETOPTKEYIGNOREHELD) {
var5 = 10;
class195.Widget_setKeyIgnoreHeld(var4, var5);
return 1;
} else {
return 2;
}
} else {
byte[] var8 = null;
var9 = null;
if (var3) {
Interpreter.Interpreter_intStackSize -= 10;
for (var7 = 0; var7 < 10 && Interpreter.Interpreter_intStack[var7 + Interpreter.Interpreter_intStackSize] >= 0; var7 += 2) {
}
if (var7 > 0) {
var8 = new byte[var7 / 2];
var9 = new byte[var7 / 2];
for (var7 -= 2; var7 >= 0; var7 -= 2) {
var8[var7 / 2] = (byte)Interpreter.Interpreter_intStack[var7 + Interpreter.Interpreter_intStackSize];
var9[var7 / 2] = (byte)Interpreter.Interpreter_intStack[var7 + Interpreter.Interpreter_intStackSize + 1];
}
}
} else {
Interpreter.Interpreter_intStackSize -= 2;
var8 = new byte[]{(byte)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize]};
var9 = new byte[]{(byte)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1]};
}
var7 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] - 1;
if (var7 >= 0 && var7 <= 9) {
FontName.Widget_setKey(var4, var7, var8, var9);
return 1;
} else {
throw new RuntimeException();
}
}
}
}
}
@ObfuscatedName("e")
@ObfuscatedSignature(
signature = "(Ljava/lang/String;I)Ljava/lang/String;",
garbageValue = "458877468"
)
public static String method2636(String var0) {
int var1 = var0.length();
char[] var2 = new char[var1];
byte var3 = 2;
for (int var4 = 0; var4 < var1; ++var4) {
char var5 = var0.charAt(var4);
if (var3 == 0) {
var5 = Character.toLowerCase(var5);
} else if (var3 == 2 || Character.isUpperCase(var5)) {
var5 = StructDefinition.method4589(var5);
}
if (Character.isLetter(var5)) {
var3 = 0;
} else if (var5 != '.' && var5 != '?' && var5 != '!') {
if (Character.isSpaceChar(var5)) {
if (var3 != 2) {
var3 = 1;
}
} else {
var3 = 1;
}
} else {
var3 = 2;
}
var2[var4] = var5;
}
return new String(var2);
}
}