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:
Lucwousin
2019-07-23 19:43:31 +02:00
committed by GitHub
parent 61b4531a0d
commit 596689a4f7
175 changed files with 9825 additions and 9776 deletions

View File

@@ -60,22 +60,21 @@ public class SoundCache {
RawSound var7 = (RawSound)this.rawSounds.get(var5);
if (var7 != null) {
return var7;
} else if (var3 != null && var3[0] <= 0) {
return null;
} else {
SoundEffect var8 = SoundEffect.readSoundEffect(this.soundEffectIndex, var1, var2);
if (var8 == null) {
return null;
} else {
var7 = var8.toRawSound();
this.rawSounds.put(var7, var5);
if (var3 != null) {
var3[0] -= var7.samples.length;
}
return var7;
}
}
if (var3 != null && var3[0] <= 0) {
return null;
}
SoundEffect var8 = SoundEffect.readSoundEffect(this.soundEffectIndex, var1, var2);
if (var8 == null) {
return null;
}
var7 = var8.toRawSound();
this.rawSounds.put(var7, var5);
if (var3 != null) {
var3[0] -= var7.samples.length;
}
return var7;
}
@ObfuscatedName("w")
@@ -91,28 +90,27 @@ public class SoundCache {
RawSound var7 = (RawSound)this.rawSounds.get(var5);
if (var7 != null) {
return var7;
} else if (var3 != null && var3[0] <= 0) {
return null;
} else {
VorbisSample var8 = (VorbisSample)this.musicSamples.get(var5);
if (var8 == null) {
var8 = VorbisSample.readMusicSample(this.musicSampleIndex, var1, var2);
if (var8 == null) {
return null;
}
this.musicSamples.put(var8, var5);
}
var7 = var8.toRawSound(var3);
if (var7 == null) {
return null;
} else {
var8.remove();
this.rawSounds.put(var7, var5);
return var7;
}
}
if (var3 != null && var3[0] <= 0) {
return null;
}
VorbisSample var8 = (VorbisSample)this.musicSamples.get(var5);
if (var8 == null) {
var8 = VorbisSample.readMusicSample(this.musicSampleIndex, var1, var2);
if (var8 == null) {
return null;
}
this.musicSamples.put(var8, var5);
}
var7 = var8.toRawSound(var3);
if (var7 == null) {
return null;
}
var8.remove();
this.rawSounds.put(var7, var5);
return var7;
}
@ObfuscatedName("e")
@@ -124,11 +122,11 @@ public class SoundCache {
public RawSound getSoundEffect(int var1, int[] var2) {
if (this.soundEffectIndex.getGroupCount() == 1) {
return this.getSoundEffect0(0, var1, var2);
} else if (this.soundEffectIndex.getGroupFileCount(var1) == 1) {
return this.getSoundEffect0(var1, 0, var2);
} else {
throw new RuntimeException();
}
if (this.soundEffectIndex.getGroupFileCount(var1) == 1) {
return this.getSoundEffect0(var1, 0, var2);
}
throw new RuntimeException();
}
@ObfuscatedName("p")
@@ -140,11 +138,11 @@ public class SoundCache {
public RawSound getMusicSample(int var1, int[] var2) {
if (this.musicSampleIndex.getGroupCount() == 1) {
return this.getMusicSample0(0, var1, var2);
} else if (this.musicSampleIndex.getGroupFileCount(var1) == 1) {
return this.getMusicSample0(var1, 0, var2);
} else {
throw new RuntimeException();
}
if (this.musicSampleIndex.getGroupFileCount(var1) == 1) {
return this.getMusicSample0(var1, 0, var2);
}
throw new RuntimeException();
}
@ObfuscatedName("eb")