project: Rev 182

This commit is contained in:
Owain van Brakel
2019-08-29 16:04:20 +02:00
parent 0c1dd644d8
commit 6485eb9bed
349 changed files with 51857 additions and 50740 deletions

View File

@@ -7,37 +7,37 @@ import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("ks")
@ObfuscatedName("kh")
@Implements("BufferedSource")
public class BufferedSource implements Runnable {
@ObfuscatedName("q")
@ObfuscatedName("s")
@Export("thread")
Thread thread;
@ObfuscatedName("w")
@ObfuscatedName("j")
@Export("inputStream")
InputStream inputStream;
@ObfuscatedName("e")
@ObfuscatedName("i")
@ObfuscatedGetter(
intValue = 491736021
intValue = -219567751
)
@Export("capacity")
int capacity;
@ObfuscatedName("p")
@ObfuscatedName("k")
@Export("buffer")
byte[] buffer;
@ObfuscatedName("k")
@ObfuscatedName("u")
@ObfuscatedGetter(
intValue = -570790809
intValue = 779012297
)
@Export("position")
int position;
@ObfuscatedName("l")
@ObfuscatedName("n")
@ObfuscatedGetter(
intValue = -902879681
intValue = 1500766173
)
@Export("limit")
int limit;
@ObfuscatedName("b")
@ObfuscatedName("t")
@Export("exception")
IOException exception;
@@ -52,17 +52,16 @@ public class BufferedSource implements Runnable {
this.thread.start();
}
@ObfuscatedName("q")
@ObfuscatedName("s")
@ObfuscatedSignature(
signature = "(II)Z",
garbageValue = "-1294773775"
garbageValue = "188903163"
)
@Export("isAvailable")
boolean isAvailable(int var1) throws IOException {
if (var1 == 0) {
return true;
}
if (var1 > 0 && var1 < this.capacity) {
} else if (var1 > 0 && var1 < this.capacity) {
synchronized(this) {
int var3;
if (this.position <= this.limit) {
@@ -74,20 +73,23 @@ public class BufferedSource implements Runnable {
if (var3 < var1) {
if (this.exception != null) {
throw new IOException(this.exception.toString());
} else {
this.notifyAll();
return false;
}
this.notifyAll();
return false;
} else {
return true;
}
return true;
}
} else {
throw new IOException();
}
throw new IOException();
}
@ObfuscatedName("w")
@ObfuscatedName("j")
@ObfuscatedSignature(
signature = "(I)I",
garbageValue = "-72711599"
signature = "(B)I",
garbageValue = "-85"
)
@Export("available")
int available() throws IOException {
@@ -101,16 +103,17 @@ public class BufferedSource implements Runnable {
if (var2 <= 0 && this.exception != null) {
throw new IOException(this.exception.toString());
} else {
this.notifyAll();
return var2;
}
this.notifyAll();
return var2;
}
}
@ObfuscatedName("e")
@ObfuscatedName("i")
@ObfuscatedSignature(
signature = "(I)I",
garbageValue = "797723305"
garbageValue = "1102638305"
)
@Export("readUnsignedByte")
int readUnsignedByte() throws IOException {
@@ -118,20 +121,22 @@ public class BufferedSource implements Runnable {
if (this.limit == this.position) {
if (this.exception != null) {
throw new IOException(this.exception.toString());
} else {
return -1;
}
return -1;
} else {
int var2 = this.buffer[this.position] & 255;
this.position = (this.position + 1) % this.capacity;
this.notifyAll();
return var2;
}
int var2 = this.buffer[this.position] & 255;
this.position = (this.position + 1) % this.capacity;
this.notifyAll();
return var2;
}
}
@ObfuscatedName("p")
@ObfuscatedName("k")
@ObfuscatedSignature(
signature = "([BIIS)I",
garbageValue = "28253"
garbageValue = "128"
)
@Export("read")
int read(byte[] var1, int var2, int var3) throws IOException {
@@ -150,27 +155,29 @@ public class BufferedSource implements Runnable {
if (var3 == 0 && this.exception != null) {
throw new IOException(this.exception.toString());
}
if (var3 + this.position <= this.capacity) {
System.arraycopy(this.buffer, this.position, var1, var2, var3);
} else {
int var6 = this.capacity - this.position;
System.arraycopy(this.buffer, this.position, var1, var2, var6);
System.arraycopy(this.buffer, 0, var1, var6 + var2, var3 - var6);
}
if (var3 + this.position <= this.capacity) {
System.arraycopy(this.buffer, this.position, var1, var2, var3);
} else {
int var6 = this.capacity - this.position;
System.arraycopy(this.buffer, this.position, var1, var2, var6);
System.arraycopy(this.buffer, 0, var1, var6 + var2, var3 - var6);
}
this.position = (var3 + this.position) % this.capacity;
this.notifyAll();
return var3;
this.position = (var3 + this.position) % this.capacity;
this.notifyAll();
return var3;
}
}
} else {
throw new IOException();
}
throw new IOException();
}
@ObfuscatedName("k")
@ObfuscatedName("u")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "-1361407903"
signature = "(S)V",
garbageValue = "6608"
)
@Export("close")
void close() {
@@ -236,85 +243,4 @@ public class BufferedSource implements Runnable {
}
}
}
@ObfuscatedName("w")
@ObfuscatedSignature(
signature = "(Lhp;Lhp;ZII)V",
garbageValue = "-273498913"
)
static void method5892(AbstractArchive var0, AbstractArchive var1, boolean var2, int var3) {
if (Login.field1179) {
if (var3 == 4) {
Login.loginIndex = 4;
}
return;
}
Login.loginIndex = var3;
Rasterizer2D.Rasterizer2D_clear();
byte[] var4 = var0.takeFileByNames("title.jpg", "");
GrandExchangeOfferWorldComparator.leftTitleSprite = BuddyRankComparator.convertJpgToSprite(var4);
NPC.rightTitleSprite = GrandExchangeOfferWorldComparator.leftTitleSprite.mirrorHorizontally();
if ((Client.worldProperties & 536870912) != 0) {
TileItem.logoSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "logo_deadman_mode", "");
} else {
TileItem.logoSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "logo", "");
}
Login.titleboxSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "titlebox", "");
VarpDefinition.titlebuttonSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "titlebutton", "");
int var6 = var1.getGroupId("runes");
int var7 = var1.getFileId(var6, "");
IndexedSprite[] var5 = class289.SpriteBuffer_getIndexedSpriteArray(var1, var6, var7);
Login.runesSprite = var5;
var7 = var1.getGroupId("title_mute");
int var8 = var1.getFileId(var7, "");
IndexedSprite[] var9 = class289.SpriteBuffer_getIndexedSpriteArray(var1, var7, var8);
Login.title_muteSprite = var9;
Login.options_buttons_0Sprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "options_radio_buttons,0", "");
Message.field606 = class215.SpriteBuffer_getIndexedSpriteByName(var1, "options_radio_buttons,4", "");
Decimator.options_buttons_2Sprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "options_radio_buttons,2", "");
Login.field1185 = class215.SpriteBuffer_getIndexedSpriteByName(var1, "options_radio_buttons,6", "");
class237.field3191 = Login.options_buttons_0Sprite.subWidth;
WorldMapDecoration.field212 = Login.options_buttons_0Sprite.subHeight;
Ignored.loginScreenRunesAnimation = new LoginScreenAnimation(Login.runesSprite);
if (var2) {
Login.Login_username = "";
Login.Login_password = "";
}
GrandExchangeOffer.field65 = 0;
WorldMapManager.otp = "";
Login.field1201 = true;
Login.worldSelectOpen = false;
if (!WorldMapLabelSize.clientPreferences.titleMusicDisabled) {
WorldMapRegion.playMusicTrackByName(2, WorldMapRegion.archive6, "scape main", "", 255, false);
} else {
class40.method729(2);
}
if (NetCache.NetCache_socket != null) {
try {
Buffer var10 = new Buffer(4);
var10.writeByte(3);
var10.writeMedium(0);
NetCache.NetCache_socket.write(var10.array, 0, 4);
} catch (IOException var13) {
try {
NetCache.NetCache_socket.close();
} catch (Exception var12) {
}
++NetCache.NetCache_ioExceptions;
NetCache.NetCache_socket = null;
}
}
Login.field1179 = true;
Login.xPadding = (GrandExchangeEvent.canvasWidth - 765) / 2;
Login.loginBoxX = Login.xPadding + 202;
ScriptEvent.loginBoxCenter = Login.loginBoxX + 180;
GrandExchangeOfferWorldComparator.leftTitleSprite.drawAt(Login.xPadding, 0);
NPC.rightTitleSprite.drawAt(Login.xPadding + 382, 0);
TileItem.logoSprite.drawAt(Login.xPadding + 382 - TileItem.logoSprite.subWidth / 2, 18);
}
}