runescape-client: fix the thing
This commit is contained in:
@@ -51,14 +51,14 @@ public class TextureProvider implements TextureLoader {
|
||||
descriptor = "(Lib;Lib;IDI)V"
|
||||
)
|
||||
public TextureProvider(AbstractArchive var1, AbstractArchive var2, int var3, double var4, int var6) {
|
||||
this.deque = new NodeDeque();
|
||||
this.remaining = 0;
|
||||
this.brightness = 1.0D;
|
||||
this.textureSize = 128;
|
||||
this.archive = var2;
|
||||
this.capacity = var3;
|
||||
this.remaining = this.capacity;
|
||||
this.brightness = var4;
|
||||
this.deque = new NodeDeque(); // L: 9
|
||||
this.remaining = 0; // L: 11
|
||||
this.brightness = 1.0D; // L: 12
|
||||
this.textureSize = 128; // L: 13
|
||||
this.archive = var2; // L: 17
|
||||
this.capacity = var3; // L: 18
|
||||
this.remaining = this.capacity; // L: 19
|
||||
this.brightness = var4; // L: 20
|
||||
this.textureSize = var6;
|
||||
int[] var7 = var1.getGroupFileIds(0);
|
||||
int var8 = var7.length;
|
||||
@@ -69,7 +69,7 @@ public class TextureProvider implements TextureLoader {
|
||||
this.textures[var7[var9]] = new Texture(var10);
|
||||
}
|
||||
|
||||
}
|
||||
} // L: 29
|
||||
|
||||
@ObfuscatedName("h")
|
||||
@ObfuscatedSignature(
|
||||
@@ -78,38 +78,38 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("getLoadedPercentage")
|
||||
public int getLoadedPercentage() {
|
||||
int var1 = 0;
|
||||
int var2 = 0;
|
||||
Texture[] var3 = this.textures;
|
||||
int var1 = 0; // L: 32
|
||||
int var2 = 0; // L: 33
|
||||
Texture[] var3 = this.textures; // L: 35
|
||||
|
||||
for (int var4 = 0; var4 < var3.length; ++var4) {
|
||||
Texture var5 = var3[var4];
|
||||
if (var5 != null && var5.fileIds != null) {
|
||||
var1 += var5.fileIds.length;
|
||||
int[] var6 = var5.fileIds;
|
||||
for (int var4 = 0; var4 < var3.length; ++var4) { // L: 36
|
||||
Texture var5 = var3[var4]; // L: 37
|
||||
if (var5 != null && var5.fileIds != null) { // L: 39
|
||||
var1 += var5.fileIds.length; // L: 40
|
||||
int[] var6 = var5.fileIds; // L: 42
|
||||
|
||||
for (int var7 = 0; var7 < var6.length; ++var7) {
|
||||
int var8 = var6[var7];
|
||||
if (this.archive.method4196(var8)) {
|
||||
++var2;
|
||||
for (int var7 = 0; var7 < var6.length; ++var7) { // L: 43
|
||||
int var8 = var6[var7]; // L: 44
|
||||
if (this.archive.method4196(var8)) { // L: 46
|
||||
++var2; // L: 47
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var1 == 0) {
|
||||
if (var1 == 0) { // L: 55
|
||||
return 0;
|
||||
} else {
|
||||
return var2 * 100 / var1;
|
||||
return var2 * 100 / var1; // L: 56
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("v")
|
||||
@Export("setBrightness")
|
||||
public void setBrightness(double var1) {
|
||||
this.brightness = var1;
|
||||
this.clear();
|
||||
}
|
||||
this.brightness = var1; // L: 60
|
||||
this.clear(); // L: 61
|
||||
} // L: 62
|
||||
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
@@ -118,30 +118,30 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("getTexturePixels")
|
||||
public int[] getTexturePixels(int var1) {
|
||||
Texture var2 = this.textures[var1];
|
||||
if (var2 != null) {
|
||||
if (var2.pixels != null) {
|
||||
this.deque.addLast(var2);
|
||||
var2.isLoaded = true;
|
||||
return var2.pixels;
|
||||
Texture var2 = this.textures[var1]; // L: 65
|
||||
if (var2 != null) { // L: 66
|
||||
if (var2.pixels != null) { // L: 67
|
||||
this.deque.addLast(var2); // L: 68
|
||||
var2.isLoaded = true; // L: 69
|
||||
return var2.pixels; // L: 70
|
||||
}
|
||||
|
||||
boolean var3 = var2.load(this.brightness, this.textureSize, this.archive);
|
||||
if (var3) {
|
||||
if (this.remaining == 0) {
|
||||
Texture var4 = (Texture)this.deque.removeFirst();
|
||||
var4.reset();
|
||||
boolean var3 = var2.load(this.brightness, this.textureSize, this.archive); // L: 72
|
||||
if (var3) { // L: 73
|
||||
if (this.remaining == 0) { // L: 74
|
||||
Texture var4 = (Texture)this.deque.removeFirst(); // L: 75
|
||||
var4.reset(); // L: 76
|
||||
} else {
|
||||
--this.remaining;
|
||||
--this.remaining; // L: 78
|
||||
}
|
||||
|
||||
this.deque.addLast(var2);
|
||||
var2.isLoaded = true;
|
||||
return var2.pixels;
|
||||
this.deque.addLast(var2); // L: 79
|
||||
var2.isLoaded = true; // L: 80
|
||||
return var2.pixels; // L: 81
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return null; // L: 84
|
||||
}
|
||||
|
||||
@ObfuscatedName("w")
|
||||
@@ -151,7 +151,7 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("getAverageTextureRGB")
|
||||
public int getAverageTextureRGB(int var1) {
|
||||
return this.textures[var1] != null ? this.textures[var1].averageRGB : 0;
|
||||
return this.textures[var1] != null ? this.textures[var1].averageRGB : 0; // L: 88 89
|
||||
}
|
||||
|
||||
@ObfuscatedName("t")
|
||||
@@ -160,7 +160,7 @@ public class TextureProvider implements TextureLoader {
|
||||
garbageValue = "-1523659518"
|
||||
)
|
||||
public boolean vmethod3359(int var1) {
|
||||
return this.textures[var1].field1640;
|
||||
return this.textures[var1].field1640; // L: 93
|
||||
}
|
||||
|
||||
@ObfuscatedName("j")
|
||||
@@ -170,7 +170,7 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("isLowDetail")
|
||||
public boolean isLowDetail(int var1) {
|
||||
return this.textureSize == 64;
|
||||
return this.textureSize == 64; // L: 97
|
||||
}
|
||||
|
||||
@ObfuscatedName("n")
|
||||
@@ -180,15 +180,15 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("clear")
|
||||
public void clear() {
|
||||
for (int var1 = 0; var1 < this.textures.length; ++var1) {
|
||||
if (this.textures[var1] != null) {
|
||||
for (int var1 = 0; var1 < this.textures.length; ++var1) { // L: 101
|
||||
if (this.textures[var1] != null) { // L: 102
|
||||
this.textures[var1].reset();
|
||||
}
|
||||
}
|
||||
|
||||
this.deque = new NodeDeque();
|
||||
this.remaining = this.capacity;
|
||||
}
|
||||
this.deque = new NodeDeque(); // L: 104
|
||||
this.remaining = this.capacity; // L: 105
|
||||
} // L: 106
|
||||
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedSignature(
|
||||
@@ -197,15 +197,15 @@ public class TextureProvider implements TextureLoader {
|
||||
)
|
||||
@Export("animate")
|
||||
public void animate(int var1) {
|
||||
for (int var2 = 0; var2 < this.textures.length; ++var2) {
|
||||
Texture var3 = this.textures[var2];
|
||||
if (var3 != null && var3.animationDirection != 0 && var3.isLoaded) {
|
||||
var3.animate(var1);
|
||||
var3.isLoaded = false;
|
||||
for (int var2 = 0; var2 < this.textures.length; ++var2) { // L: 109
|
||||
Texture var3 = this.textures[var2]; // L: 110
|
||||
if (var3 != null && var3.animationDirection != 0 && var3.isLoaded) { // L: 111
|
||||
var3.animate(var1); // L: 112
|
||||
var3.isLoaded = false; // L: 113
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // L: 116
|
||||
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedSignature(
|
||||
@@ -213,18 +213,18 @@ public class TextureProvider implements TextureLoader {
|
||||
garbageValue = "1406545495"
|
||||
)
|
||||
public static VarcInt method2843(int var0) {
|
||||
VarcInt var1 = (VarcInt)VarcInt.VarcInt_cached.get((long)var0);
|
||||
if (var1 != null) {
|
||||
VarcInt var1 = (VarcInt)VarcInt.VarcInt_cached.get((long)var0); // L: 21
|
||||
if (var1 != null) { // L: 22
|
||||
return var1;
|
||||
} else {
|
||||
byte[] var2 = VarcInt.VarcInt_archive.takeFile(19, var0);
|
||||
var1 = new VarcInt();
|
||||
if (var2 != null) {
|
||||
byte[] var2 = VarcInt.VarcInt_archive.takeFile(19, var0); // L: 23
|
||||
var1 = new VarcInt(); // L: 24
|
||||
if (var2 != null) { // L: 25
|
||||
var1.method4416(new Buffer(var2));
|
||||
}
|
||||
|
||||
VarcInt.VarcInt_cached.put(var1, (long)var0);
|
||||
return var1;
|
||||
VarcInt.VarcInt_cached.put(var1, (long)var0); // L: 26
|
||||
return var1; // L: 27
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,16 +234,16 @@ public class TextureProvider implements TextureLoader {
|
||||
garbageValue = "188919715"
|
||||
)
|
||||
static void method2848() {
|
||||
if (WorldMapIcon_0.field148 != null) {
|
||||
Client.field915 = Client.cycle;
|
||||
WorldMapIcon_0.field148.method4345();
|
||||
if (WorldMapIcon_0.field148 != null) { // L: 11210
|
||||
Client.field915 = Client.cycle; // L: 11211
|
||||
WorldMapIcon_0.field148.method4345(); // L: 11212
|
||||
|
||||
for (int var0 = 0; var0 < Client.players.length; ++var0) {
|
||||
if (Client.players[var0] != null) {
|
||||
WorldMapIcon_0.field148.method4344(NetFileRequest.baseX * 64 + (Client.players[var0].x >> 7), class41.baseY * 64 + (Client.players[var0].y >> 7));
|
||||
for (int var0 = 0; var0 < Client.players.length; ++var0) { // L: 11213
|
||||
if (Client.players[var0] != null) { // L: 11214
|
||||
WorldMapIcon_0.field148.method4344((Client.players[var0].x >> 7) + NetFileRequest.baseX, (Client.players[var0].y >> 7) + class41.baseY); // L: 11215
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // L: 11219
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user