rs-client: Cleanup (#1087)
* rs-client: name SpriteBuffer * rs-client: (re)name spritebuffer methods * rs-client/deob: Add missed @Export's, make updatemappings fix this next time * rs-client: run intellij redundant else inspection * rs-client: invert some script interpreter if's * deob: checkstyle fixes * rs-client: SpriteBuffer_loadSprite -> SpriteBuffer_bufferFile
This commit is contained in:
@@ -61,7 +61,8 @@ public class BufferedSource implements Runnable {
|
||||
boolean isAvailable(int var1) throws IOException {
|
||||
if (var1 == 0) {
|
||||
return true;
|
||||
} else if (var1 > 0 && var1 < this.capacity) {
|
||||
}
|
||||
if (var1 > 0 && var1 < this.capacity) {
|
||||
synchronized(this) {
|
||||
int var3;
|
||||
if (this.position <= this.limit) {
|
||||
@@ -73,17 +74,14 @@ public class BufferedSource implements Runnable {
|
||||
if (var3 < var1) {
|
||||
if (this.exception != null) {
|
||||
throw new IOException(this.exception.toString());
|
||||
} else {
|
||||
this.notifyAll();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
this.notifyAll();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
throw new IOException();
|
||||
}
|
||||
throw new IOException();
|
||||
}
|
||||
|
||||
@ObfuscatedName("w")
|
||||
@@ -103,10 +101,9 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,15 +118,13 @@ public class BufferedSource implements Runnable {
|
||||
if (this.limit == this.position) {
|
||||
if (this.exception != null) {
|
||||
throw new IOException(this.exception.toString());
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
int var2 = this.buffer[this.position] & 255;
|
||||
this.position = (this.position + 1) % this.capacity;
|
||||
this.notifyAll();
|
||||
return var2;
|
||||
return -1;
|
||||
}
|
||||
int var2 = this.buffer[this.position] & 255;
|
||||
this.position = (this.position + 1) % this.capacity;
|
||||
this.notifyAll();
|
||||
return var2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,23 +150,21 @@ public class BufferedSource implements Runnable {
|
||||
|
||||
if (var3 == 0 && this.exception != null) {
|
||||
throw new IOException(this.exception.toString());
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
throw new IOException();
|
||||
}
|
||||
throw new IOException();
|
||||
}
|
||||
|
||||
@ObfuscatedName("k")
|
||||
@@ -262,25 +255,25 @@ public class BufferedSource implements Runnable {
|
||||
GrandExchangeOfferWorldComparator.leftTitleSprite = BuddyRankComparator.convertJpgToSprite(var4);
|
||||
NPC.rightTitleSprite = GrandExchangeOfferWorldComparator.leftTitleSprite.mirrorHorizontally();
|
||||
if ((Client.worldProperties & 536870912) != 0) {
|
||||
GroundItem.logoSprite = class215.loadIndexedSpriteByName(var1, "logo_deadman_mode", "");
|
||||
GroundItem.logoSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "logo_deadman_mode", "");
|
||||
} else {
|
||||
GroundItem.logoSprite = class215.loadIndexedSpriteByName(var1, "logo", "");
|
||||
GroundItem.logoSprite = class215.SpriteBuffer_getIndexedSpriteByName(var1, "logo", "");
|
||||
}
|
||||
|
||||
Login.titleboxSprite = class215.loadIndexedSpriteByName(var1, "titlebox", "");
|
||||
VarpDefinition.titlebuttonSprite = class215.loadIndexedSpriteByName(var1, "titlebutton", "");
|
||||
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.method5281(var1, var6, var7);
|
||||
IndexedSprite[] var5 = class289.SpriteBuffer_getIndexedSpriteArray(var1, var6, var7);
|
||||
Login.runesSprite = var5;
|
||||
var7 = var1.getGroupId("title_mute");
|
||||
int var8 = var1.getFileId(var7, "");
|
||||
IndexedSprite[] var9 = class289.method5281(var1, var7, var8);
|
||||
IndexedSprite[] var9 = class289.SpriteBuffer_getIndexedSpriteArray(var1, var7, var8);
|
||||
Login.title_muteSprite = var9;
|
||||
Login.options_buttons_0Sprite = class215.loadIndexedSpriteByName(var1, "options_radio_buttons,0", "");
|
||||
Message.field606 = class215.loadIndexedSpriteByName(var1, "options_radio_buttons,4", "");
|
||||
Decimator.options_buttons_2Sprite = class215.loadIndexedSpriteByName(var1, "options_radio_buttons,2", "");
|
||||
Login.field1185 = class215.loadIndexedSpriteByName(var1, "options_radio_buttons,6", "");
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user