mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-17 08:25:14 -06:00
Renamed Synth methods/fields
This commit is contained in:
parent
5aaf6a9ad0
commit
cd68c3d0f9
4 changed files with 247 additions and 247 deletions
|
|
@ -9,13 +9,13 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class SynthSound {
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "b", descriptor = "[Lclient!pj;")
|
||||
private final SynthInstrument[] aClass123Array1 = new SynthInstrument[10];
|
||||
private final SynthInstrument[] instruments = new SynthInstrument[10];
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "c", descriptor = "I")
|
||||
private int anInt5207;
|
||||
private int start;
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "a", descriptor = "I")
|
||||
private int anInt5206;
|
||||
private int end;
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "<init>", descriptor = "(Lclient!wa;)V")
|
||||
public SynthSound(@OriginalArg(0) Buffer arg0) {
|
||||
|
|
@ -23,12 +23,12 @@ public final class SynthSound {
|
|||
@Pc(14) int local14 = arg0.g1();
|
||||
if (local14 != 0) {
|
||||
arg0.offset--;
|
||||
this.aClass123Array1[local7] = new SynthInstrument();
|
||||
this.aClass123Array1[local7].method3506(arg0);
|
||||
this.instruments[local7] = new SynthInstrument();
|
||||
this.instruments[local7].method3506(arg0);
|
||||
}
|
||||
}
|
||||
this.anInt5207 = arg0.g2();
|
||||
this.anInt5206 = arg0.g2();
|
||||
this.start = arg0.g2();
|
||||
this.end = arg0.g2();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "a", descriptor = "(Lclient!ve;II)Lclient!sl;")
|
||||
|
|
@ -38,12 +38,12 @@ public final class SynthSound {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "a", descriptor = "()[B")
|
||||
private byte[] method3987() {
|
||||
private byte[] getSamples() {
|
||||
@Pc(1) int local1 = 0;
|
||||
@Pc(3) int local3;
|
||||
for (local3 = 0; local3 < 10; local3++) {
|
||||
if (this.aClass123Array1[local3] != null && this.aClass123Array1[local3].anInt4546 + this.aClass123Array1[local3].anInt4548 > local1) {
|
||||
local1 = this.aClass123Array1[local3].anInt4546 + this.aClass123Array1[local3].anInt4548;
|
||||
if (this.instruments[local3] != null && this.instruments[local3].length + this.instruments[local3].start > local1) {
|
||||
local1 = this.instruments[local3].length + this.instruments[local3].start;
|
||||
}
|
||||
}
|
||||
if (local1 == 0) {
|
||||
|
|
@ -52,10 +52,10 @@ public final class SynthSound {
|
|||
local3 = local1 * 22050 / 1000;
|
||||
@Pc(52) byte[] local52 = new byte[local3];
|
||||
for (@Pc(54) int local54 = 0; local54 < 10; local54++) {
|
||||
if (this.aClass123Array1[local54] != null) {
|
||||
@Pc(72) int local72 = this.aClass123Array1[local54].anInt4546 * 22050 / 1000;
|
||||
@Pc(82) int local82 = this.aClass123Array1[local54].anInt4548 * 22050 / 1000;
|
||||
@Pc(94) int[] local94 = this.aClass123Array1[local54].method3505(local72, this.aClass123Array1[local54].anInt4546);
|
||||
if (this.instruments[local54] != null) {
|
||||
@Pc(72) int local72 = this.instruments[local54].length * 22050 / 1000;
|
||||
@Pc(82) int local82 = this.instruments[local54].start * 22050 / 1000;
|
||||
@Pc(94) int[] local94 = this.instruments[local54].getSamples(local72, this.instruments[local54].length);
|
||||
for (@Pc(96) int local96 = 0; local96 < local72; local96++) {
|
||||
@Pc(111) int local111 = local52[local96 + local82] + (local94[local96] >> 8);
|
||||
if ((local111 + 128 & 0xFFFFFF00) != 0) {
|
||||
|
|
@ -70,8 +70,8 @@ public final class SynthSound {
|
|||
|
||||
@OriginalMember(owner = "client!sl", name = "b", descriptor = "()Lclient!kj;")
|
||||
public final PcmSound toPcmSound() {
|
||||
@Pc(2) byte[] local2 = this.method3987();
|
||||
return new PcmSound(22050, local2, this.anInt5207 * 22050 / 1000, this.anInt5206 * 22050 / 1000);
|
||||
@Pc(2) byte[] local2 = this.getSamples();
|
||||
return new PcmSound(22050, local2, this.start * 22050 / 1000, this.end * 22050 / 1000);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!sl", name = "c", descriptor = "()I")
|
||||
|
|
@ -79,24 +79,24 @@ public final class SynthSound {
|
|||
@Pc(1) int local1 = 9999999;
|
||||
@Pc(3) int local3;
|
||||
for (local3 = 0; local3 < 10; local3++) {
|
||||
if (this.aClass123Array1[local3] != null && this.aClass123Array1[local3].anInt4548 / 20 < local1) {
|
||||
local1 = this.aClass123Array1[local3].anInt4548 / 20;
|
||||
if (this.instruments[local3] != null && this.instruments[local3].start / 20 < local1) {
|
||||
local1 = this.instruments[local3].start / 20;
|
||||
}
|
||||
}
|
||||
if (this.anInt5207 < this.anInt5206 && this.anInt5207 / 20 < local1) {
|
||||
local1 = this.anInt5207 / 20;
|
||||
if (this.start < this.end && this.start / 20 < local1) {
|
||||
local1 = this.start / 20;
|
||||
}
|
||||
if (local1 == 9999999 || local1 == 0) {
|
||||
return 0;
|
||||
}
|
||||
for (local3 = 0; local3 < 10; local3++) {
|
||||
if (this.aClass123Array1[local3] != null) {
|
||||
this.aClass123Array1[local3].anInt4548 -= local1 * 20;
|
||||
if (this.instruments[local3] != null) {
|
||||
this.instruments[local3].start -= local1 * 20;
|
||||
}
|
||||
}
|
||||
if (this.anInt5207 < this.anInt5206) {
|
||||
this.anInt5207 -= local1 * 20;
|
||||
this.anInt5206 -= local1 * 20;
|
||||
if (this.start < this.end) {
|
||||
this.start -= local1 * 20;
|
||||
this.end -= local1 * 20;
|
||||
}
|
||||
return local1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue