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

@@ -4,313 +4,316 @@ import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("dn")
@ObfuscatedName("dd")
@Implements("PcmPlayer")
public class PcmPlayer {
@ObfuscatedName("c")
@ObfuscatedName("u")
@ObfuscatedGetter(
intValue = 1278180609
intValue = -2109466943
)
@Export("PcmPlayer_count")
static int PcmPlayer_count;
@ObfuscatedName("r")
@Export("PcmPlayer_sampleRate")
public static int PcmPlayer_sampleRate;
@ObfuscatedName("n")
@Export("PcmPlayer_stereo")
protected static boolean PcmPlayer_stereo;
@ObfuscatedName("y")
@Export("samples")
protected int[] samples;
@ObfuscatedName("v")
@ObfuscatedName("p")
@ObfuscatedSignature(
signature = "Ldx;"
signature = "Ldz;"
)
@Export("stream")
PcmStream stream;
@ObfuscatedName("y")
@ObfuscatedName("b")
@ObfuscatedGetter(
intValue = 1475444063
intValue = 2121528369
)
int field1406;
int field1384;
@ObfuscatedName("g")
@ObfuscatedGetter(
longValue = -1948698164081779065L
longValue = 7651317449639431647L
)
@Export("timeMs")
long timeMs;
@ObfuscatedName("a")
@ObfuscatedName("e")
@ObfuscatedGetter(
intValue = 1789796573
intValue = 1742403687
)
@Export("capacity")
int capacity;
@ObfuscatedName("j")
@ObfuscatedName("z")
@ObfuscatedGetter(
intValue = 1737413085
intValue = -2082148367
)
int field1414;
@ObfuscatedName("t")
int field1399;
@ObfuscatedName("a")
@ObfuscatedGetter(
intValue = -1691943703
intValue = -1595984821
)
int field1413;
int field1388;
@ObfuscatedName("w")
@ObfuscatedGetter(
longValue = -7364227675697791643L
)
long field1389;
@ObfuscatedName("l")
@ObfuscatedGetter(
intValue = -772636771
)
int field1379;
@ObfuscatedName("h")
@ObfuscatedGetter(
longValue = -7968110108619228373L
intValue = -1968577703
)
long field1416;
int field1391;
@ObfuscatedName("v")
@ObfuscatedGetter(
intValue = -289661183
)
int field1393;
@ObfuscatedName("m")
@ObfuscatedGetter(
longValue = 1958141991499651821L
)
long field1386;
@ObfuscatedName("o")
boolean field1394;
@ObfuscatedName("aj")
@ObfuscatedGetter(
intValue = 2131398703
intValue = 168489489
)
int field1417;
@ObfuscatedName("n")
@ObfuscatedGetter(
intValue = 586161719
)
int field1418;
@ObfuscatedName("d")
@ObfuscatedGetter(
intValue = -1508308009
)
int field1419;
@ObfuscatedName("s")
@ObfuscatedGetter(
longValue = -2950449123303085351L
)
long field1420;
@ObfuscatedName("z")
boolean field1421;
@ObfuscatedName("ag")
@ObfuscatedGetter(
intValue = 550758429
)
int field1423;
@ObfuscatedName("ar")
int field1395;
@ObfuscatedName("an")
@ObfuscatedSignature(
signature = "[Ldx;"
signature = "[Ldz;"
)
PcmStream[] field1426;
@ObfuscatedName("ax")
PcmStream[] field1396;
@ObfuscatedName("at")
@ObfuscatedSignature(
signature = "[Ldx;"
signature = "[Ldz;"
)
PcmStream[] field1425;
PcmStream[] field1397;
protected PcmPlayer() {
this.field1406 = 32;
this.timeMs = DirectByteArrayCopier.currentTimeMs();
this.field1416 = 0L;
this.field1417 = 0;
this.field1418 = 0;
this.field1419 = 0;
this.field1420 = 0L;
this.field1421 = true;
this.field1423 = 0;
this.field1426 = new PcmStream[8];
this.field1425 = new PcmStream[8];
this.field1384 = 32;
this.timeMs = SequenceDefinition.method4686();
this.field1389 = 0L;
this.field1379 = 0;
this.field1391 = 0;
this.field1393 = 0;
this.field1386 = 0L;
this.field1394 = true;
this.field1395 = 0;
this.field1396 = new PcmStream[8];
this.field1397 = new PcmStream[8];
}
@ObfuscatedName("q")
@ObfuscatedName("s")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "-1518489339"
signature = "(B)V",
garbageValue = "1"
)
@Export("init")
protected void init() throws Exception {
}
@ObfuscatedName("w")
@ObfuscatedName("j")
@ObfuscatedSignature(
signature = "(IB)V",
garbageValue = "2"
signature = "(II)V",
garbageValue = "1939802329"
)
@Export("open")
protected void open(int var1) throws Exception {
}
@ObfuscatedName("e")
@ObfuscatedName("i")
@ObfuscatedSignature(
signature = "(B)I",
garbageValue = "97"
signature = "(I)I",
garbageValue = "428413683"
)
@Export("position")
protected int position() throws Exception {
return this.capacity;
}
@ObfuscatedName("p")
@ObfuscatedName("k")
@Export("write")
protected void write() throws Exception {
}
@ObfuscatedName("k")
@ObfuscatedName("u")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "57"
signature = "(I)V",
garbageValue = "37766209"
)
@Export("close")
protected void close() {
}
@ObfuscatedName("l")
@ObfuscatedName("n")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "-313753219"
garbageValue = "645078569"
)
@Export("discard")
protected void discard() throws Exception {
}
@ObfuscatedName("av")
@ObfuscatedName("m")
@ObfuscatedSignature(
signature = "(Ldx;I)V",
garbageValue = "750974673"
signature = "(Ldz;I)V",
garbageValue = "-414582995"
)
@Export("setStream")
public final synchronized void setStream(PcmStream var1) {
this.stream = var1;
}
@ObfuscatedName("as")
@ObfuscatedName("o")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "-1453359051"
garbageValue = "-862737237"
)
@Export("run")
public final synchronized void run() {
if (this.samples == null) {
return;
}
long var1 = DirectByteArrayCopier.currentTimeMs();
if (this.samples != null) {
long var1 = SequenceDefinition.method4686();
try {
if (this.field1389 != 0L) {
if (var1 < this.field1389) {
return;
}
try {
if (0L != this.field1416) {
if (var1 >= this.field1416) {
this.open(this.capacity);
this.field1416 = 0L;
this.field1421 = true;
} else {
return;
this.field1389 = 0L;
this.field1394 = true;
}
}
int var3 = this.position();
if (this.field1419 - var3 > this.field1417) {
this.field1417 = this.field1419 - var3;
}
int var4 = this.field1413 + this.field1414;
if (var4 + 256 > 16384) {
var4 = 16128;
}
if (var4 + 256 > this.capacity) {
this.capacity += 1024;
if (this.capacity > 16384) {
this.capacity = 16384;
int var3 = this.position();
if (this.field1393 - var3 > this.field1379) {
this.field1379 = this.field1393 - var3;
}
int var4 = this.field1388 + this.field1399;
if (var4 + 256 > 16384) {
var4 = 16128;
}
this.close();
this.open(this.capacity);
var3 = 0;
this.field1421 = true;
if (var4 + 256 > this.capacity) {
var4 = this.capacity - 256;
this.field1413 = var4 - this.field1414;
}
}
this.capacity += 1024;
if (this.capacity > 16384) {
this.capacity = 16384;
}
while (var3 < var4) {
this.fill(this.samples, 256);
this.write();
var3 += 256;
}
if (var1 > this.field1420) {
if (this.field1421) {
this.field1421 = false;
} else if (this.field1417 != 0 || this.field1418 != 0) {
this.field1413 = Math.min(this.field1418, this.field1417);
this.field1418 = this.field1417;
} else {
this.close();
this.field1416 = 2000L + var1;
return;
this.open(this.capacity);
var3 = 0;
this.field1394 = true;
if (var4 + 256 > this.capacity) {
var4 = this.capacity - 256;
this.field1388 = var4 - this.field1399;
}
}
this.field1417 = 0;
this.field1420 = 2000L + var1;
while (var3 < var4) {
this.fill(this.samples, 256);
this.write();
var3 += 256;
}
if (var1 > this.field1386) {
if (!this.field1394) {
if (this.field1379 == 0 && this.field1391 == 0) {
this.close();
this.field1389 = 2000L + var1;
return;
}
this.field1388 = Math.min(this.field1391, this.field1379);
this.field1391 = this.field1379;
} else {
this.field1394 = false;
}
this.field1379 = 0;
this.field1386 = var1 + 2000L;
}
this.field1393 = var3;
} catch (Exception var7) {
this.close();
this.field1389 = var1 + 2000L;
}
try {
if (var1 > this.timeMs + 500000L) {
var1 = this.timeMs;
}
while (var1 > this.timeMs + 5000L) {
this.skip(256);
this.timeMs += (long)(256000 / PcmPlayer_sampleRate);
}
} catch (Exception var6) {
this.timeMs = var1;
}
this.field1419 = var3;
} catch (Exception var7) {
this.close();
this.field1416 = var1 + 2000L;
}
try {
if (var1 > 500000L + this.timeMs) {
var1 = this.timeMs;
}
while (var1 > 5000L + this.timeMs) {
this.skip(256);
this.timeMs += (long)(256000 / CollisionMap.PcmPlayer_sampleRate);
}
} catch (Exception var6) {
this.timeMs = var1;
}
}
@ObfuscatedName("aw")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "-42"
)
public final void method2407() {
this.field1421 = true;
}
@ObfuscatedName("ad")
@ObfuscatedName("av")
@ObfuscatedSignature(
signature = "(I)V",
garbageValue = "1267599868"
garbageValue = "-1124222572"
)
public final void method2397() {
this.field1394 = true;
}
@ObfuscatedName("am")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "-38"
)
@Export("tryDiscard")
public final synchronized void tryDiscard() {
this.field1421 = true;
this.field1394 = true;
try {
this.discard();
} catch (Exception var2) {
this.close();
this.field1416 = DirectByteArrayCopier.currentTimeMs() + 2000L;
this.field1389 = SequenceDefinition.method4686() + 2000L;
}
}
@ObfuscatedName("ag")
@ObfuscatedName("ai")
@ObfuscatedSignature(
signature = "(B)V",
garbageValue = "2"
signature = "(I)V",
garbageValue = "58159891"
)
@Export("shutdown")
public final synchronized void shutdown() {
if (SecureRandomFuture.soundSystem != null) {
if (PacketBufferNode.soundSystem != null) {
boolean var1 = true;
for (int var2 = 0; var2 < 2; ++var2) {
if (this == SecureRandomFuture.soundSystem.players[var2]) {
SecureRandomFuture.soundSystem.players[var2] = null;
if (this == PacketBufferNode.soundSystem.players[var2]) {
PacketBufferNode.soundSystem.players[var2] = null;
}
if (SecureRandomFuture.soundSystem.players[var2] != null) {
if (PacketBufferNode.soundSystem.players[var2] != null) {
var1 = false;
}
}
if (var1) {
class14.soundSystemExecutor.shutdownNow();
class14.soundSystemExecutor = null;
SecureRandomFuture.soundSystem = null;
GrandExchangeOfferWorldComparator.soundSystemExecutor.shutdownNow();
GrandExchangeOfferWorldComparator.soundSystemExecutor = null;
PacketBufferNode.soundSystem = null;
}
}
@@ -318,16 +321,16 @@ public class PcmPlayer {
this.samples = null;
}
@ObfuscatedName("ar")
@ObfuscatedName("af")
@ObfuscatedSignature(
signature = "(II)V",
garbageValue = "1268557925"
garbageValue = "-1085561099"
)
@Export("skip")
final void skip(int var1) {
this.field1423 -= var1;
if (this.field1423 < 0) {
this.field1423 = 0;
this.field1395 -= var1;
if (this.field1395 < 0) {
this.field1395 = 0;
}
if (this.stream != null) {
@@ -336,25 +339,27 @@ public class PcmPlayer {
}
@ObfuscatedName("ax")
@ObfuscatedName("az")
@Export("fill")
final void fill(int[] var1, int var2) {
int var3 = var2;
if (FileSystem.PcmPlayer_stereo) {
if (PcmPlayer_stereo) {
var3 = var2 << 1;
}
class301.clearIntArray(var1, 0, var3);
this.field1423 -= var2;
if (this.stream != null && this.field1423 <= 0) {
this.field1423 += CollisionMap.PcmPlayer_sampleRate >> 4;
GraphicsObject.PcmStream_disable(this.stream);
this.method2456(this.stream, this.stream.vmethod2689());
class300.clearIntArray(var1, 0, var3);
this.field1395 -= var2;
if (this.stream != null && this.field1395 <= 0) {
this.field1395 += PcmPlayer_sampleRate >> 4;
WorldMapArea.PcmStream_disable(this.stream);
this.method2347(this.stream, this.stream.vmethod2644());
int var4 = 0;
int var5 = 255;
int var6;
PcmStream var10;
for (int var6 = 7; var5 != 0; --var6) {
label104:
for (var6 = 7; var5 != 0; --var6) {
int var7;
int var8;
if (var6 < 0) {
@@ -365,62 +370,70 @@ public class PcmPlayer {
var8 = 0;
}
for (int var9 = var5 >>> var7 & 0x11111111; var9 != 0; var9 >>>= 4, var7 += 4, ++var8) {
if ((var9 & 1) == 0) {
continue;
}
var5 &= ~(1 << var7);
var10 = null;
for (int var9 = var5 >>> var7 & 286331153; var9 != 0; var9 >>>= 4) {
if ((var9 & 1) != 0) {
var5 &= ~(1 << var7);
var10 = null;
PcmStream var11 = this.field1396[var7];
label98:
while (true) {
while (true) {
if (var11 == null) {
break label98;
}
for (PcmStream var11 = this.field1426[var7]; var11 != null;) {
AbstractSound var12 = var11.sound;
if (var12 != null && var12.position > var8) {
var5 |= 1 << var7;
var10 = var11;
var11 = var11.after;
continue;
}
var11.active = true;
int var13 = var11.vmethod3892();
var4 += var13;
if (var12 != null) {
var12.position += var13;
}
AbstractSound var12 = var11.sound;
if (var12 != null && var12.position > var8) {
var5 |= 1 << var7;
var10 = var11;
var11 = var11.after;
} else {
var11.active = true;
int var13 = var11.vmethod3834();
var4 += var13;
if (var12 != null) {
var12.position += var13;
}
if (var4 >= this.field1406) {
return;
}
if (var4 >= this.field1384) {
break label104;
}
PcmStream var14 = var11.firstSubStream();
if (var14 != null) {
for (int var15 = var11.field1496; var14 != null; var14 = var11.nextSubStream()) {
this.method2456(var14, var15 * var14.vmethod2689() >> 8);
PcmStream var14 = var11.firstSubStream();
if (var14 != null) {
for (int var15 = var11.field1478; var14 != null; var14 = var11.nextSubStream()) {
this.method2347(var14, var15 * var14.vmethod2644() >> 8);
}
}
PcmStream var18 = var11.after;
var11.after = null;
if (var10 == null) {
this.field1396[var7] = var18;
} else {
var10.after = var18;
}
if (var18 == null) {
this.field1397[var7] = var10;
}
var11 = var18;
}
}
}
PcmStream var18 = var11.after;
var11.after = null;
if (var10 == null) {
this.field1426[var7] = var18;
}
else {
var10.after = var18;
}
if (var18 == null) {
this.field1425[var7] = var10;
}
var11 = var18;
}
var7 += 4;
++var8;
}
}
for (int var6 = 0; var6 < 8; ++var6) {
PcmStream var16 = this.field1426[var6];
PcmStream[] var17 = this.field1426;
this.field1425[var6] = null;
for (var6 = 0; var6 < 8; ++var6) {
PcmStream var16 = this.field1396[var6];
PcmStream[] var17 = this.field1396;
this.field1397[var6] = null;
for (var17[var6] = null; var16 != null; var16 = var10) {
var10 = var16.after;
@@ -429,79 +442,53 @@ public class PcmPlayer {
}
}
if (this.field1423 < 0) {
this.field1423 = 0;
if (this.field1395 < 0) {
this.field1395 = 0;
}
if (this.stream != null) {
this.stream.fill(var1, 0, var2);
}
this.timeMs = DirectByteArrayCopier.currentTimeMs();
this.timeMs = SequenceDefinition.method4686();
}
@ObfuscatedName("ae")
@ObfuscatedName("an")
@ObfuscatedSignature(
signature = "(Ldx;II)V",
garbageValue = "2049205678"
signature = "(Ldz;II)V",
garbageValue = "-2059733660"
)
final void method2456(PcmStream var1, int var2) {
final void method2347(PcmStream var1, int var2) {
int var3 = var2 >> 5;
PcmStream var4 = this.field1425[var3];
PcmStream var4 = this.field1397[var3];
if (var4 == null) {
this.field1426[var3] = var1;
this.field1396[var3] = var1;
} else {
var4.after = var1;
}
this.field1425[var3] = var1;
var1.field1496 = var2;
this.field1397[var3] = var1;
var1.field1478 = var2;
}
@ObfuscatedName("q")
@ObfuscatedName("i")
@ObfuscatedSignature(
signature = "(B)[Lll;",
garbageValue = "69"
signature = "(IB)Z",
garbageValue = "0"
)
@Export("FillMode_values")
public static FillMode[] FillMode_values() {
return new FillMode[]{FillMode.GRADIENT, FillMode.SOLID, FillMode.GRADIENTALPHA};
public static boolean method2396(int var0) {
return (var0 >> 21 & 1) != 0;
}
@ObfuscatedName("ip")
@ObfuscatedName("t")
@ObfuscatedSignature(
signature = "(Lhj;IIB)V",
garbageValue = "-55"
signature = "(Lhz;Lhz;Ljava/lang/String;Ljava/lang/String;B)Lkb;",
garbageValue = "0"
)
@Export("alignWidgetPosition")
static void alignWidgetPosition(Widget var0, int var1, int var2) {
if (var0.xAlignment == 0) {
var0.x = var0.rawX;
} else if (var0.xAlignment == 1) {
var0.x = var0.rawX + (var1 - var0.width) / 2;
} else if (var0.xAlignment == 2) {
var0.x = var1 - var0.width - var0.rawX;
} else if (var0.xAlignment == 3) {
var0.x = var0.rawX * var1 >> 14;
} else if (var0.xAlignment == 4) {
var0.x = (var0.rawX * var1 >> 14) + (var1 - var0.width) / 2;
} else {
var0.x = var1 - var0.width - (var0.rawX * var1 >> 14);
}
if (var0.yAlignment == 0) {
var0.y = var0.rawY;
} else if (var0.yAlignment == 1) {
var0.y = (var2 - var0.height) / 2 + var0.rawY;
} else if (var0.yAlignment == 2) {
var0.y = var2 - var0.height - var0.rawY;
} else if (var0.yAlignment == 3) {
var0.y = var2 * var0.rawY >> 14;
} else if (var0.yAlignment == 4) {
var0.y = (var2 * var0.rawY >> 14) + (var2 - var0.height) / 2;
} else {
var0.y = var2 - var0.height - (var2 * var0.rawY >> 14);
}
@Export("SpriteBuffer_getFontByName")
public static Font SpriteBuffer_getFontByName(AbstractArchive var0, AbstractArchive var1, String var2, String var3) {
int var4 = var0.getGroupId(var2);
int var5 = var0.getFileId(var4, var3);
return FileSystem.SpriteBuffer_getFont(var0, var1, var4, var5);
}
}