178 lines
4.6 KiB
Java
178 lines
4.6 KiB
Java
import java.io.File;
|
|
import java.io.RandomAccessFile;
|
|
import net.runelite.mapping.Export;
|
|
import net.runelite.mapping.Implements;
|
|
import net.runelite.mapping.ObfuscatedGetter;
|
|
import net.runelite.mapping.ObfuscatedName;
|
|
import net.runelite.mapping.ObfuscatedSignature;
|
|
|
|
@ObfuscatedName("ei")
|
|
@Implements("ViewportMouse")
|
|
public class ViewportMouse {
|
|
@ObfuscatedName("x")
|
|
@Export("ViewportMouse_isInViewport")
|
|
static boolean ViewportMouse_isInViewport;
|
|
@ObfuscatedName("m")
|
|
@ObfuscatedGetter(
|
|
intValue = -3434347
|
|
)
|
|
@Export("ViewportMouse_x")
|
|
static int ViewportMouse_x;
|
|
@ObfuscatedName("k")
|
|
@ObfuscatedGetter(
|
|
intValue = -1088872185
|
|
)
|
|
@Export("ViewportMouse_y")
|
|
static int ViewportMouse_y;
|
|
@ObfuscatedName("d")
|
|
@Export("ViewportMouse_false0")
|
|
static boolean ViewportMouse_false0;
|
|
@ObfuscatedName("w")
|
|
@ObfuscatedGetter(
|
|
intValue = 1287512303
|
|
)
|
|
static int field1756;
|
|
@ObfuscatedName("z")
|
|
@ObfuscatedGetter(
|
|
intValue = -128272745
|
|
)
|
|
static int field1753;
|
|
@ObfuscatedName("p")
|
|
@ObfuscatedGetter(
|
|
intValue = 2142328087
|
|
)
|
|
static int field1758;
|
|
@ObfuscatedName("u")
|
|
@ObfuscatedGetter(
|
|
intValue = 148493353
|
|
)
|
|
@Export("ViewportMouse_entityCount")
|
|
static int ViewportMouse_entityCount;
|
|
@ObfuscatedName("h")
|
|
@Export("ViewportMouse_entityTags")
|
|
static long[] ViewportMouse_entityTags;
|
|
|
|
static {
|
|
ViewportMouse_isInViewport = false;
|
|
ViewportMouse_x = 0;
|
|
ViewportMouse_y = 0;
|
|
ViewportMouse_false0 = false;
|
|
ViewportMouse_entityCount = 0;
|
|
ViewportMouse_entityTags = new long[1000];
|
|
}
|
|
|
|
@ObfuscatedName("x")
|
|
@ObfuscatedSignature(
|
|
signature = "(Ljava/lang/String;I)Ljava/io/File;",
|
|
garbageValue = "-880025172"
|
|
)
|
|
@Export("getFile")
|
|
public static File getFile(String var0) {
|
|
if (!FileSystem.FileSystem_hasPermissions) {
|
|
throw new RuntimeException("");
|
|
} else {
|
|
File var1 = (File)FileSystem.FileSystem_cacheFiles.get(var0);
|
|
if (var1 != null) {
|
|
return var1;
|
|
} else {
|
|
File var2 = new File(FileSystem.FileSystem_cacheDir, var0);
|
|
RandomAccessFile var3 = null;
|
|
|
|
try {
|
|
File var4 = new File(var2.getParent());
|
|
if (!var4.exists()) {
|
|
throw new RuntimeException("");
|
|
} else {
|
|
var3 = new RandomAccessFile(var2, "rw");
|
|
int var5 = var3.read();
|
|
var3.seek(0L);
|
|
var3.write(var5);
|
|
var3.seek(0L);
|
|
var3.close();
|
|
FileSystem.FileSystem_cacheFiles.put(var0, var2);
|
|
return var2;
|
|
}
|
|
} catch (Exception var8) {
|
|
try {
|
|
if (var3 != null) {
|
|
var3.close();
|
|
var3 = null;
|
|
}
|
|
} catch (Exception var7) {
|
|
}
|
|
|
|
throw new RuntimeException();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("gp")
|
|
@ObfuscatedSignature(
|
|
signature = "(S)V",
|
|
garbageValue = "-3489"
|
|
)
|
|
static final void method3091() {
|
|
Client.field794 = 0;
|
|
int var0 = (ByteArrayPool.localPlayer.x >> 7) + class69.baseX;
|
|
int var1 = (ByteArrayPool.localPlayer.y >> 7) + class89.baseY;
|
|
if (var0 >= 3053 && var0 <= 3156 && var1 >= 3056 && var1 <= 3136) {
|
|
Client.field794 = 1;
|
|
}
|
|
|
|
if (var0 >= 3072 && var0 <= 3118 && var1 >= 9492 && var1 <= 9535) {
|
|
Client.field794 = 1;
|
|
}
|
|
|
|
if (Client.field794 == 1 && var0 >= 3139 && var0 <= 3199 && var1 >= 3008 && var1 <= 3062) {
|
|
Client.field794 = 0;
|
|
}
|
|
|
|
}
|
|
|
|
@ObfuscatedName("ji")
|
|
@ObfuscatedSignature(
|
|
signature = "(Lhe;IIIIIII)V",
|
|
garbageValue = "-1829231425"
|
|
)
|
|
static final void method3092(Widget var0, int var1, int var2, int var3, int var4, int var5, int var6) {
|
|
if (Client.field746) {
|
|
Client.alternativeScrollbarWidth = 32;
|
|
} else {
|
|
Client.alternativeScrollbarWidth = 0;
|
|
}
|
|
|
|
Client.field746 = false;
|
|
int var7;
|
|
if (MouseHandler.MouseHandler_currentButton == 1 || !class217.mouseCam && MouseHandler.MouseHandler_currentButton == 4) {
|
|
if (var5 >= var1 && var5 < var1 + 16 && var6 >= var2 && var6 < var2 + 16) {
|
|
var0.scrollY -= 4;
|
|
ItemContainer.invalidateWidget(var0);
|
|
} else if (var5 >= var1 && var5 < var1 + 16 && var6 >= var3 + var2 - 16 && var6 < var3 + var2) {
|
|
var0.scrollY += 4;
|
|
ItemContainer.invalidateWidget(var0);
|
|
} else if (var5 >= var1 - Client.alternativeScrollbarWidth && var5 < Client.alternativeScrollbarWidth + var1 + 16 && var6 >= var2 + 16 && var6 < var3 + var2 - 16) {
|
|
var7 = var3 * (var3 - 32) / var4;
|
|
if (var7 < 8) {
|
|
var7 = 8;
|
|
}
|
|
|
|
int var8 = var6 - var2 - 16 - var7 / 2;
|
|
int var9 = var3 - 32 - var7;
|
|
var0.scrollY = var8 * (var4 - var3) / var9;
|
|
ItemContainer.invalidateWidget(var0);
|
|
Client.field746 = true;
|
|
}
|
|
}
|
|
|
|
if (Client.mouseWheelRotation != 0) {
|
|
var7 = var0.width;
|
|
if (var5 >= var1 - var7 && var6 >= var2 && var5 < var1 + 16 && var6 <= var3 + var2) {
|
|
var0.scrollY += Client.mouseWheelRotation * 45;
|
|
ItemContainer.invalidateWidget(var0);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|