chore: revision 189
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import java.lang.management.GarbageCollectorMXBean;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -7,18 +6,26 @@ 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("cm")
|
||||
@ObfuscatedName("ca")
|
||||
@Implements("SecureRandomFuture")
|
||||
public class SecureRandomFuture {
|
||||
@ObfuscatedName("an")
|
||||
@Export("garbageCollector")
|
||||
static GarbageCollectorMXBean garbageCollector;
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedName("ol")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lfq;"
|
||||
)
|
||||
@Export("mouseWheel")
|
||||
static MouseWheel mouseWheel;
|
||||
@ObfuscatedName("ds")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lih;"
|
||||
)
|
||||
@Export("archive9")
|
||||
static Archive archive9;
|
||||
@ObfuscatedName("x")
|
||||
@Export("executor")
|
||||
ExecutorService executor;
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedName("m")
|
||||
@Export("future")
|
||||
Future future;
|
||||
|
||||
@@ -27,10 +34,10 @@ public class SecureRandomFuture {
|
||||
this.future = this.executor.submit(new SecureRandomCallable());
|
||||
}
|
||||
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "-884286176"
|
||||
signature = "(B)V",
|
||||
garbageValue = "-128"
|
||||
)
|
||||
@Export("shutdown")
|
||||
void shutdown() {
|
||||
@@ -38,182 +45,173 @@ public class SecureRandomFuture {
|
||||
this.executor = null;
|
||||
}
|
||||
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)Z",
|
||||
garbageValue = "-1065937119"
|
||||
signature = "(B)Z",
|
||||
garbageValue = "-126"
|
||||
)
|
||||
@Export("isDone")
|
||||
boolean isDone() {
|
||||
return this.future.isDone();
|
||||
}
|
||||
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)Ljava/security/SecureRandom;",
|
||||
garbageValue = "519596197"
|
||||
garbageValue = "876677352"
|
||||
)
|
||||
@Export("get")
|
||||
SecureRandom get() {
|
||||
try {
|
||||
return (SecureRandom)this.future.get();
|
||||
} catch (Exception var2) {
|
||||
return class51.method896();
|
||||
} catch (Exception var4) {
|
||||
SecureRandom var3 = new SecureRandom();
|
||||
var3.nextInt();
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)[Lhu;",
|
||||
garbageValue = "44"
|
||||
signature = "(III)I",
|
||||
garbageValue = "1233974315"
|
||||
)
|
||||
@Export("PlayerType_values")
|
||||
public static PlayerType[] PlayerType_values() {
|
||||
return new PlayerType[]{PlayerType.PlayerType_normal, PlayerType.PlayerType_ultimateIronman, PlayerType.PlayerType_playerModerator, PlayerType.PlayerType_hardcoreIronman, PlayerType.PlayerType_jagexModerator, PlayerType.PlayerType_ironman};
|
||||
}
|
||||
public static int method2226(int var0, int var1) {
|
||||
int var2;
|
||||
for (var2 = 1; var1 > 1; var1 >>= 1) {
|
||||
if ((var1 & 1) != 0) {
|
||||
var2 = var0 * var2;
|
||||
}
|
||||
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ZZI)Lli;",
|
||||
garbageValue = "-1201437930"
|
||||
)
|
||||
static IndexedSprite method2171(boolean var0, boolean var1) {
|
||||
return var0 ? (var1 ? VertexNormal.field1753 : DirectByteArrayCopier.options_buttons_2Sprite) : (var1 ? ItemContainer.field547 : WorldMapSprite.options_buttons_0Sprite);
|
||||
}
|
||||
var0 *= var0;
|
||||
}
|
||||
|
||||
@ObfuscatedName("af")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ILce;ZI)I",
|
||||
garbageValue = "1704416266"
|
||||
)
|
||||
static int method2169(int var0, Script var1, boolean var2) {
|
||||
if (var0 == ScriptOpcodes.CLIENTCLOCK) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.cycle;
|
||||
return 1;
|
||||
if (var1 == 1) {
|
||||
return var0 * var2;
|
||||
} else {
|
||||
int var3;
|
||||
int var4;
|
||||
if (var0 == ScriptOpcodes.INV_GETOBJ) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize];
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Varps.method4043(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INV_GETNUM) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize];
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = UserComparator3.ItemContainer_getCount(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INV_TOTAL) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize];
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = WorldMapSection2.method340(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INV_SIZE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = SpotAnimationDefinition.getInvDefinition(var3).size;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STAT) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.currentLevels[var3];
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STAT_BASE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.levels[var3];
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STAT_XP) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.experience[var3];
|
||||
return 1;
|
||||
} else {
|
||||
int var5;
|
||||
if (var0 == ScriptOpcodes.COORD) {
|
||||
var3 = Clock.Client_plane;
|
||||
var4 = Messages.baseX * 64 + (class192.localPlayer.x >> 7);
|
||||
var5 = Language.baseY * 64 + (class192.localPlayer.y >> 7);
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = (var4 << 14) + var5 + (var3 << 28);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.COORDX) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = var3 >> 14 & 16383;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.COORDZ) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = var3 >> 28;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.COORDY) {
|
||||
var3 = Interpreter.Interpreter_intStack[--class320.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = var3 & 16383;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.MAP_MEMBERS) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.isMembersWorld ? 1 : 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INVOTHER_GETOBJ) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize] + 32768;
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Varps.method4043(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INVOTHER_GETNUM) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize] + 32768;
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = UserComparator3.ItemContainer_getCount(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.INVOTHER_TOTAL) {
|
||||
class320.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize] + 32768;
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = WorldMapSection2.method340(var3, var4);
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STAFFMODLEVEL) {
|
||||
if (Client.staffModLevel >= 2) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.staffModLevel;
|
||||
} else {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = 0;
|
||||
}
|
||||
return var2;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.REBOOTTIMER) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.rebootTimer;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.MAP_WORLD) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.worldId;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.RUNENERGY_VISIBLE) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.runEnergy;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.RUNWEIGHT_VISIBLE) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.weight;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.PLAYERMOD) {
|
||||
if (Client.playerMod) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = 1;
|
||||
} else {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = 0;
|
||||
}
|
||||
@ObfuscatedName("s")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(IIIIIZI)Lla;",
|
||||
garbageValue = "-2006803252"
|
||||
)
|
||||
@Export("getItemSprite")
|
||||
public static final Sprite getItemSprite(int var0, int var1, int var2, int var3, int var4, boolean var5) {
|
||||
if (var1 == -1) {
|
||||
var4 = 0;
|
||||
} else if (var4 == 2 && var1 != 1) {
|
||||
var4 = 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.WORLDFLAGS) {
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = Client.worldProperties;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.MOVECOORD) {
|
||||
class320.Interpreter_intStackSize -= 4;
|
||||
var3 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize];
|
||||
var4 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 1];
|
||||
var5 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 2];
|
||||
int var6 = Interpreter.Interpreter_intStack[class320.Interpreter_intStackSize + 3];
|
||||
var3 += var4 << 14;
|
||||
var3 += var5 << 28;
|
||||
var3 += var6;
|
||||
Interpreter.Interpreter_intStack[++class320.Interpreter_intStackSize - 1] = var3;
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
long var6 = ((long)var3 << 42) + ((long)var1 << 16) + (long)var0 + ((long)var2 << 38) + ((long)var4 << 40);
|
||||
Sprite var8;
|
||||
if (!var5) {
|
||||
var8 = (Sprite)ItemDefinition.ItemDefinition_cachedSprites.get(var6);
|
||||
if (var8 != null) {
|
||||
return var8;
|
||||
}
|
||||
}
|
||||
|
||||
ItemDefinition var9 = AbstractWorldMapData.ItemDefinition_get(var0);
|
||||
if (var1 > 1 && var9.countobj != null) {
|
||||
int var10 = -1;
|
||||
|
||||
for (int var11 = 0; var11 < 10; ++var11) {
|
||||
if (var1 >= var9.countco[var11] && var9.countco[var11] != 0) {
|
||||
var10 = var9.countobj[var11];
|
||||
}
|
||||
}
|
||||
|
||||
if (var10 != -1) {
|
||||
var9 = AbstractWorldMapData.ItemDefinition_get(var10);
|
||||
}
|
||||
}
|
||||
|
||||
Model var19 = var9.getModel(1);
|
||||
if (var19 == null) {
|
||||
return null;
|
||||
} else {
|
||||
Sprite var20 = null;
|
||||
if (var9.noteTemplate != -1) {
|
||||
var20 = getItemSprite(var9.note, 10, 1, 0, 0, true);
|
||||
if (var20 == null) {
|
||||
return null;
|
||||
}
|
||||
} else if (var9.notedId != -1) {
|
||||
var20 = getItemSprite(var9.unnotedId, var1, var2, var3, 0, false);
|
||||
if (var20 == null) {
|
||||
return null;
|
||||
}
|
||||
} else if (var9.placeholderTemplate != -1) {
|
||||
var20 = getItemSprite(var9.placeholder, var1, 0, 0, 0, false);
|
||||
if (var20 == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
int[] var12 = Rasterizer2D.Rasterizer2D_pixels;
|
||||
int var13 = Rasterizer2D.Rasterizer2D_width;
|
||||
int var14 = Rasterizer2D.Rasterizer2D_height;
|
||||
int[] var15 = new int[4];
|
||||
Rasterizer2D.Rasterizer2D_getClipArray(var15);
|
||||
var8 = new Sprite(36, 32);
|
||||
Rasterizer2D.Rasterizer2D_replace(var8.pixels, 36, 32);
|
||||
Rasterizer2D.Rasterizer2D_clear();
|
||||
Rasterizer3D.Rasterizer3D_setClipFromRasterizer2D();
|
||||
Rasterizer3D.method3099(16, 16);
|
||||
Rasterizer3D.field1772 = false;
|
||||
if (var9.placeholderTemplate != -1) {
|
||||
var20.drawTransBgAt(0, 0);
|
||||
}
|
||||
|
||||
int var16 = var9.zoom2d;
|
||||
if (var5) {
|
||||
var16 = (int)(1.5D * (double)var16);
|
||||
} else if (var2 == 2) {
|
||||
var16 = (int)((double)var16 * 1.04D);
|
||||
}
|
||||
|
||||
int var17 = var16 * Rasterizer3D.Rasterizer3D_sine[var9.xan2d] >> 16;
|
||||
int var18 = var16 * Rasterizer3D.Rasterizer3D_cosine[var9.xan2d] >> 16;
|
||||
var19.calculateBoundsCylinder();
|
||||
var19.method2982(0, var9.yan2d, var9.zan2d, var9.xan2d, var9.offsetX2d, var19.height / 2 + var17 + var9.offsetY2d, var18 + var9.offsetY2d);
|
||||
if (var9.notedId != -1) {
|
||||
var20.drawTransBgAt(0, 0);
|
||||
}
|
||||
|
||||
if (var2 >= 1) {
|
||||
var8.outline(1);
|
||||
}
|
||||
|
||||
if (var2 >= 2) {
|
||||
var8.outline(16777215);
|
||||
}
|
||||
|
||||
if (var3 != 0) {
|
||||
var8.shadow(var3);
|
||||
}
|
||||
|
||||
Rasterizer2D.Rasterizer2D_replace(var8.pixels, 36, 32);
|
||||
if (var9.noteTemplate != -1) {
|
||||
var20.drawTransBgAt(0, 0);
|
||||
}
|
||||
|
||||
if (var4 == 1 || var4 == 2 && var9.isStackable == 1) {
|
||||
class51.ItemDefinition_fontPlain11.draw(GrandExchangeOfferOwnWorldComparator.method1385(var1), 0, 9, 16776960, 1);
|
||||
}
|
||||
|
||||
if (!var5) {
|
||||
ItemDefinition.ItemDefinition_cachedSprites.put(var8, var6);
|
||||
}
|
||||
|
||||
Rasterizer2D.Rasterizer2D_replace(var12, var13, var14);
|
||||
Rasterizer2D.Rasterizer2D_setClipArray(var15);
|
||||
Rasterizer3D.Rasterizer3D_setClipFromRasterizer2D();
|
||||
Rasterizer3D.field1772 = true;
|
||||
return var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user