project: Revvvvvvvvvvvvv

This commit is contained in:
Owain van Brakel
2022-02-09 13:21:03 +01:00
parent e91fc1a16a
commit e505012bff
474 changed files with 69930 additions and 69430 deletions

View File

@@ -1,207 +1,139 @@
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.io.SyncFailedException;
import java.net.URL;
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("oa")
@ObfuscatedName("oo")
@Implements("AccessFile")
public final class AccessFile {
@ObfuscatedName("c")
@Export("file")
RandomAccessFile file;
@ObfuscatedName("b")
@ObfuscatedName("l")
@ObfuscatedGetter(
longValue = 6458662844052359411L
longValue = -3832987767694103853L
)
@Export("maxSize")
final long maxSize;
@ObfuscatedName("p")
@ObfuscatedName("s")
@ObfuscatedGetter(
longValue = -4202787537300384147L
longValue = 897367112768993339L
)
@Export("offset")
long offset;
public AccessFile(File var1, String var2, long var3) throws IOException {
if (-1L == var3) {
if (-1L == var3) { // L: 11
var3 = Long.MAX_VALUE;
}
if (var1.length() > var3) {
var1.delete();
if (var1.length() > var3) { // L: 12
var1.delete(); // L: 13
}
this.file = new RandomAccessFile(var1, var2);
this.maxSize = var3;
this.offset = 0L;
int var5 = this.file.read();
if (var5 != -1 && !var2.equals("r")) {
this.file.seek(0L);
this.file.write(var5);
this.file = new RandomAccessFile(var1, var2); // L: 15
this.maxSize = var3; // L: 16
this.offset = 0L; // L: 17
int var5 = this.file.read(); // L: 18
if (var5 != -1 && !var2.equals("r")) { // L: 19
this.file.seek(0L); // L: 20
this.file.write(var5); // L: 21
}
this.file.seek(0L);
}
this.file.seek(0L); // L: 23
} // L: 24
@ObfuscatedName("c")
@Export("seek")
final void seek(long var1) throws IOException {
this.file.seek(var1);
this.offset = var1;
}
this.file.seek(var1); // L: 27
this.offset = var1; // L: 28
} // L: 29
@ObfuscatedName("b")
@ObfuscatedName("l")
@ObfuscatedSignature(
descriptor = "([BIIS)V",
garbageValue = "-13111"
descriptor = "([BIII)V",
garbageValue = "-43751608"
)
@Export("write")
public final void write(byte[] var1, int var2, int var3) throws IOException {
if (this.offset + (long)var3 > this.maxSize) {
this.file.seek(this.maxSize);
this.file.write(1);
throw new EOFException();
if ((long)var3 + this.offset > this.maxSize) { // L: 32
this.file.seek(this.maxSize); // L: 33
this.file.write(1); // L: 34
throw new EOFException(); // L: 35
} else {
this.file.write(var1, var2, var3);
this.offset += (long)var3;
this.file.write(var1, var2, var3); // L: 37
this.offset += (long)var3; // L: 38
}
}
@ObfuscatedName("p")
@ObfuscatedSignature(
descriptor = "(I)V",
garbageValue = "1700348985"
)
@Export("close")
public final void close() throws IOException {
this.closeSync(false);
}
@ObfuscatedName("m")
@ObfuscatedSignature(
descriptor = "(ZI)V",
garbageValue = "-824076886"
)
@Export("closeSync")
public final void closeSync(boolean var1) throws IOException {
if (this.file != null) {
if (var1) {
try {
this.file.getFD().sync();
} catch (SyncFailedException var3) {
}
}
this.file.close();
this.file = null;
}
}
@ObfuscatedName("t")
@ObfuscatedSignature(
descriptor = "(B)J",
garbageValue = "-117"
)
@Export("length")
public final long length() throws IOException {
return this.file.length();
}
} // L: 39
@ObfuscatedName("s")
@ObfuscatedSignature(
descriptor = "([BIIB)I",
garbageValue = "66"
descriptor = "(I)V",
garbageValue = "-1421008856"
)
@Export("close")
public final void close() throws IOException {
this.closeSync(false); // L: 42
} // L: 43
@ObfuscatedName("e")
@ObfuscatedSignature(
descriptor = "(ZI)V",
garbageValue = "-2119255691"
)
@Export("closeSync")
public final void closeSync(boolean var1) throws IOException {
if (this.file != null) { // L: 46
if (var1) { // L: 47
try {
this.file.getFD().sync(); // L: 49
} catch (SyncFailedException var3) { // L: 51
}
}
this.file.close(); // L: 53
this.file = null; // L: 54
}
} // L: 56
@ObfuscatedName("r")
@ObfuscatedSignature(
descriptor = "(B)J",
garbageValue = "90"
)
@Export("length")
public final long length() throws IOException {
return this.file.length(); // L: 59
}
@ObfuscatedName("o")
@ObfuscatedSignature(
descriptor = "([BIII)I",
garbageValue = "929552222"
)
@Export("read")
public final int read(byte[] var1, int var2, int var3) throws IOException {
int var4 = this.file.read(var1, var2, var3);
int var4 = this.file.read(var1, var2, var3); // L: 63
if (var4 > 0) {
this.offset += (long)var4;
this.offset += (long)var4; // L: 64
}
return var4;
return var4; // L: 65
}
protected void finalize() throws Throwable {
if (this.file != null) {
System.out.println("");
this.close();
if (this.file != null) { // L: 69
System.out.println(""); // L: 70
this.close(); // L: 71
}
}
@ObfuscatedName("c")
@ObfuscatedSignature(
descriptor = "(Ljava/lang/String;Ljava/lang/Throwable;I)V",
garbageValue = "-2057333088"
)
@Export("RunException_sendStackTrace")
public static void RunException_sendStackTrace(String var0, Throwable var1) {
if (var1 != null) {
var1.printStackTrace();
} else {
try {
String var2 = "";
if (var1 != null) {
var2 = IgnoreList.method6267(var1);
}
if (var0 != null) {
if (var1 != null) {
var2 = var2 + " | ";
}
var2 = var2 + var0;
}
System.out.println("Error: " + var2);
var2 = var2.replace(':', '.');
var2 = var2.replace('@', '_');
var2 = var2.replace('&', '_');
var2 = var2.replace('#', '_');
if (RunException.RunException_applet == null) {
return;
}
URL var3 = new URL(RunException.RunException_applet.getCodeBase(), "clienterror.ws?c=" + RunException.RunException_revision + "&u=" + RunException.localPlayerName + "&v1=" + TaskHandler.javaVendor + "&v2=" + NPC.javaVersion + "&ct=" + class398.clientType + "&e=" + var2);
DataInputStream var4 = new DataInputStream(var3.openStream());
var4.read();
var4.close();
} catch (Exception var5) {
}
}
}
@ObfuscatedName("b")
@ObfuscatedSignature(
descriptor = "(II)Lfo;",
garbageValue = "2133446029"
)
@Export("SpotAnimationDefinition_get")
public static SpotAnimationDefinition SpotAnimationDefinition_get(int var0) {
SpotAnimationDefinition var1 = (SpotAnimationDefinition)SpotAnimationDefinition.SpotAnimationDefinition_cached.get((long)var0);
if (var1 != null) {
return var1;
} else {
byte[] var2 = SpotAnimationDefinition.SpotAnimationDefinition_archive.takeFile(13, var0);
var1 = new SpotAnimationDefinition();
var1.id = var0;
if (var2 != null) {
var1.decode(new Buffer(var2));
}
SpotAnimationDefinition.SpotAnimationDefinition_cached.put(var1, (long)var0);
return var1;
}
}
} // L: 73
}