diff --git a/client/src/main/java/Class57.java b/client/src/main/java/Class57.java index b08a7e61..ac621c8a 100644 --- a/client/src/main/java/Class57.java +++ b/client/src/main/java/Class57.java @@ -7,55 +7,80 @@ @OriginalClass("client!os") public abstract class Class57 { + @OriginalMember(owner = "client!q", name = "n", descriptor = "[I") + public static final int[] fadeCurves = new int[4096]; + + static { + for (@Pc(11) int local11 = 0; local11 < 4096; local11++) { + fadeCurves[local11] = fade(local11); + } + } + @OriginalMember(owner = "client!os", name = "j", descriptor = "[S") - private short[] aShortArray126; + private short[] powerOfTwo; @OriginalMember(owner = "client!os", name = "c", descriptor = "I") - private int anInt6714 = 4; + private int yFactor = 4; @OriginalMember(owner = "client!os", name = "e", descriptor = "I") - private int anInt6716 = 4; + private int zFactor = 4; @OriginalMember(owner = "client!os", name = "d", descriptor = "I") - private int anInt6715 = 0; + private int seed = 0; @OriginalMember(owner = "client!os", name = "g", descriptor = "I") - private int anInt6718 = 4; + private int xFactor = 4; @OriginalMember(owner = "client!os", name = "l", descriptor = "[S") - private final short[] aShortArray127 = new short[512]; + private final short[] pImp = new short[512]; @OriginalMember(owner = "client!os", name = "k", descriptor = "I") - protected int anInt6721 = 4; + protected int factorsOfTwo = 4; @OriginalMember(owner = "client!os", name = "", descriptor = "(IIIII)V") - protected Class57(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - this.anInt6718 = arg2; - this.anInt6714 = arg3; - this.anInt6715 = arg0; - this.anInt6721 = arg1; - this.anInt6716 = arg4; - this.method6012(); - this.method6014(); + protected Class57(@OriginalArg(0) int seed, @OriginalArg(1) int factorsOfTwo, @OriginalArg(2) int xFactor, @OriginalArg(3) int yFactor, @OriginalArg(4) int zFactor) { + this.xFactor = xFactor; + this.yFactor = yFactor; + this.seed = seed; + this.factorsOfTwo = factorsOfTwo; + this.zFactor = zFactor; + this.initPerlin1(); + this.initPerlin2(); + } + + @OriginalMember(owner = "client!jr", name = "a", descriptor = "(IIIII)I") + private static int grad(@OriginalArg(0) int z, @OriginalArg(2) int x, @OriginalArg(3) int y, @OriginalArg(4) int hash) { + @Pc(7) int h = hash & 0xF; + @Pc(16) int u = h < 8 ? x : y; + @Pc(40) int v = h < 4 ? y : (h == 12 || h == 14 ? x : z); + return ((h & 0x2) == 0 ? v : -v) + ((h & 0x1) == 0 ? u : -u); + } + + @OriginalMember(owner = "client!pj", name = "b", descriptor = "(IB)I") + private static int fade(@OriginalArg(0) int t) { + @Pc(13) int depth = t * (t * t >> 12) >> 12; + @Pc(19) int x = t * 6 - 61440; + @Pc(32) int y = (t * x >> 12) + 40960; + return y * depth >> 12; } @OriginalMember(owner = "client!os", name = "a", descriptor = "(III)V") - protected abstract void method6011(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1); + protected abstract void apply(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1); @OriginalMember(owner = "client!os", name = "a", descriptor = "(B)V") - private void method6012() { - this.aShortArray126 = new short[this.anInt6721]; - for (@Pc(12) int local12 = 0; local12 < this.anInt6721; local12++) { - this.aShortArray126[local12] = (short) Math.pow(2.0D, (double) local12); + private void initPerlin1() { + this.powerOfTwo = new short[this.factorsOfTwo]; + for (@Pc(12) int local12 = 0; local12 < this.factorsOfTwo; local12++) { + this.powerOfTwo[local12] = (short) Math.pow(2.0D, (double) local12); } } @OriginalMember(owner = "client!os", name = "a", descriptor = "(IIBI)V") - protected final void method6013() { - @Pc(12) int[] local12 = new int[128]; + protected final void noise() { + @Pc(12) int[] widths = new int[128]; @Pc(15) int[] local15 = new int[128]; for (@Pc(17) int local17 = 0; local17 < 128; local17++) { - local12[local17] = (local17 << 12) / 128; + widths[local17] = (local17 << 12) / 128; } @Pc(38) int[] local38 = new int[16]; for (@Pc(40) int local40 = 0; local40 < 128; local40++) { @@ -64,100 +89,100 @@ protected final void method6013() { for (@Pc(60) int local60 = 0; local60 < 16; local60++) { local38[local60] = (local60 << 12) / 16; } - this.method6015(); + this.setup(); for (@Pc(79) int local79 = 0; local79 < 16; local79++) { for (@Pc(83) int local83 = 0; local83 < 128; local83++) { - for (@Pc(87) int local87 = 0; local87 < 128; local87++) { - for (@Pc(91) int local91 = 0; local91 < this.anInt6721; local91++) { - @Pc(100) int local100 = this.aShortArray126[local91] << 12; - @Pc(107) int local107 = local100 * this.anInt6716 >> 12; - @Pc(114) int local114 = local100 * this.anInt6714 >> 12; - @Pc(121) int local121 = this.anInt6718 * local100 >> 12; - @Pc(129) int local129 = local12[local87] * local100 >> 12; - @Pc(137) int local137 = local100 * local15[local83] >> 12; - @Pc(145) int local145 = local38[local79] * local100 >> 12; - @Pc(150) int local150 = local137 * this.anInt6714; - @Pc(155) int local155 = local145 * this.anInt6716; - @Pc(160) int local160 = local129 * this.anInt6718; - @Pc(164) int local164 = local160 >> 12; - @Pc(168) int local168 = local164 + 1; - @Pc(172) int local172 = local164 & 0xFF; - @Pc(176) int local176 = local150 >> 12; - @Pc(180) int local180 = local176 + 1; - @Pc(184) int local184 = local176 & 0xFF; - @Pc(188) int local188 = local155 >> 12; - @Pc(192) int local192 = local188 + 1; - if (local168 >= local121) { - local168 = 0; + for (@Pc(87) int x = 0; x < 128; x++) { + for (@Pc(91) int index = 0; index < this.factorsOfTwo; index++) { + @Pc(100) int factorOfTwo = this.powerOfTwo[index] << 12; + @Pc(107) int maxZ = factorOfTwo * this.zFactor >> 12; + @Pc(114) int maxY = factorOfTwo * this.yFactor >> 12; + @Pc(121) int maxX = this.xFactor * factorOfTwo >> 12; + @Pc(129) int local129 = widths[x] * factorOfTwo >> 12; + @Pc(137) int local137 = factorOfTwo * local15[local83] >> 12; + @Pc(145) int local145 = local38[local79] * factorOfTwo >> 12; + @Pc(150) int local150 = local137 * this.yFactor; + @Pc(155) int local155 = local145 * this.zFactor; + @Pc(160) int xo = local129 * this.xFactor; + @Pc(164) int x0 = xo >> 12; + @Pc(168) int x1 = x0 + 1; + @Pc(172) int x0u = x0 & 0xFF; + @Pc(176) int y0 = local150 >> 12; + @Pc(180) int y1 = y0 + 1; + @Pc(184) int y0u = y0 & 0xFF; + @Pc(188) int z0 = local155 >> 12; + @Pc(192) int z1 = z0 + 1; + if (x1 >= maxX) { + x1 = 0; } else { - local168 &= 0xFF; + x1 &= 0xFF; } - if (local114 > local180) { - local180 &= 0xFF; + if (maxY > y1) { + y1 &= 0xFF; } else { - local180 = 0; + y1 = 0; } - local188 &= 0xFF; - if (local192 >= local107) { - local192 = 0; + z0 &= 0xFF; + if (z1 >= maxZ) { + z1 = 0; } else { - local192 &= 0xFF; + z1 &= 0xFF; } local145 = local155 & 0xFFF; local137 = local150 & 0xFFF; - local129 = local160 & 0xFFF; + local129 = xo & 0xFFF; @Pc(249) int local249 = local137 - 4096; @Pc(253) int local253 = local145 - 4096; - @Pc(258) short local258 = this.aShortArray127[local188]; - @Pc(262) int local262 = StockMarketOffer.anIntArray360[local145]; - @Pc(266) int local266 = StockMarketOffer.anIntArray360[local137]; - @Pc(271) short local271 = this.aShortArray127[local192]; - @Pc(275) int local275 = StockMarketOffer.anIntArray360[local129]; + @Pc(258) short local258 = this.pImp[z0]; + @Pc(262) int w = fadeCurves[local145]; + @Pc(266) int local266 = fadeCurves[local137]; + @Pc(271) short local271 = this.pImp[z1]; + @Pc(275) int local275 = fadeCurves[local129]; @Pc(279) int local279 = local129 - 4096; - @Pc(287) short local287 = this.aShortArray127[local180 + local258]; - @Pc(294) short local294 = this.aShortArray127[local271 + local180]; - @Pc(302) short local302 = this.aShortArray127[local184 + local271]; - @Pc(309) short local309 = this.aShortArray127[local184 + local258]; - @Pc(321) int local321 = Static169.method3211(local145, local129, local137, this.aShortArray127[local309 + local172]); - @Pc(333) int local333 = Static169.method3211(local145, local279, local137, this.aShortArray127[local168 + local309]); + @Pc(287) short local287 = this.pImp[y1 + local258]; + @Pc(294) short local294 = this.pImp[local271 + y1]; + @Pc(302) short local302 = this.pImp[y0u + local271]; + @Pc(309) short local309 = this.pImp[y0u + local258]; + @Pc(321) int local321 = grad(local145, local129, local137, this.pImp[local309 + x0u]); + @Pc(333) int local333 = grad(local145, local279, local137, this.pImp[x1 + local309]); @Pc(344) int local344 = local321 + (local275 * (local333 - local321) >> 12); - @Pc(356) int local356 = Static169.method3211(local145, local129, local249, this.aShortArray127[local172 + local287]); - @Pc(368) int local368 = Static169.method3211(local145, local279, local249, this.aShortArray127[local287 + local168]); + @Pc(356) int local356 = grad(local145, local129, local249, this.pImp[x0u + local287]); + @Pc(368) int local368 = grad(local145, local279, local249, this.pImp[local287 + x1]); @Pc(379) int local379 = ((local368 - local356) * local275 >> 12) + local356; @Pc(390) int local390 = (local266 * (local379 - local344) >> 12) + local344; - @Pc(402) int local402 = Static169.method3211(local253, local129, local137, this.aShortArray127[local172 + local302]); - @Pc(415) int local415 = Static169.method3211(local253, local279, local137, this.aShortArray127[local168 + local302]); + @Pc(402) int local402 = grad(local253, local129, local137, this.pImp[x0u + local302]); + @Pc(415) int local415 = grad(local253, local279, local137, this.pImp[x1 + local302]); @Pc(426) int local426 = (local275 * (local415 - local402) >> 12) + local402; - @Pc(438) int local438 = Static169.method3211(local253, local129, local249, this.aShortArray127[local294 + local172]); - @Pc(450) int local450 = Static169.method3211(local253, local279, local249, this.aShortArray127[local294 + local168]); + @Pc(438) int local438 = grad(local253, local129, local249, this.pImp[local294 + x0u]); + @Pc(450) int local450 = grad(local253, local279, local249, this.pImp[local294 + x1]); @Pc(461) int local461 = (local275 * (local450 - local438) >> 12) + local438; @Pc(473) int local473 = local426 + (local266 * (local461 - local426) >> 12); - this.method6011(local91, local390 + (local262 * (local473 - local390) >> 12)); + this.apply(index, local390 + (w * (local473 - local390) >> 12)); } - this.method6017(); + this.add(); } } } } @OriginalMember(owner = "client!os", name = "b", descriptor = "(B)V") - private void method6014() { - @Pc(12) Random local12 = new Random((long) this.anInt6715); + private void initPerlin2() { + @Pc(12) Random local12 = new Random((long) this.seed); for (@Pc(14) int local14 = 0; local14 < 255; local14++) { - this.aShortArray127[local14] = (short) local14; + this.pImp[local14] = (short) local14; } for (@Pc(39) int local39 = 0; local39 < 255; local39++) { @Pc(46) int local46 = 255 - local39; @Pc(51) int local51 = Static382.method6361(local46, local12); - @Pc(56) short local56 = this.aShortArray127[local51]; - this.aShortArray127[local51] = this.aShortArray127[local46]; - this.aShortArray127[local46] = this.aShortArray127[local46 + 256] = local56; + @Pc(56) short local56 = this.pImp[local51]; + this.pImp[local51] = this.pImp[local46]; + this.pImp[local46] = this.pImp[local46 + 256] = local56; } } @OriginalMember(owner = "client!os", name = "a", descriptor = "(I)V") - protected abstract void method6015(); + protected abstract void setup(); @OriginalMember(owner = "client!os", name = "a", descriptor = "(Z)V") - protected abstract void method6017(); + protected abstract void add(); } diff --git a/client/src/main/java/Class57_Sub1.java b/client/src/main/java/Class57_Sub1.java index 19d6ddb4..0e9c523d 100644 --- a/client/src/main/java/Class57_Sub1.java +++ b/client/src/main/java/Class57_Sub1.java @@ -7,51 +7,51 @@ public class Class57_Sub1 extends Class57 { @OriginalMember(owner = "client!eb", name = "r", descriptor = "I") - private int anInt6726; + private int elevation; @OriginalMember(owner = "client!eb", name = "t", descriptor = "[B") - private byte[] aByteArray95; + private byte[] subData; @OriginalMember(owner = "client!eb", name = "u", descriptor = "I") - private int anInt6728; + private int writerIndex; @OriginalMember(owner = "client!eb", name = "n", descriptor = "[I") - private final int[] anIntArray466 = new int[this.anInt6721]; + private final int[] pows = new int[this.factorsOfTwo]; @OriginalMember(owner = "client!eb", name = "", descriptor = "(IIIIIF)V") - protected Class57_Sub1(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5) { - super(arg0, arg1, arg2, arg3, arg4); - for (@Pc(15) int local15 = 0; local15 < super.anInt6721; local15++) { - this.anIntArray466[local15] = (short) (Math.pow((double) arg5, (double) local15) * 4096.0D); + protected Class57_Sub1(@OriginalArg(0) int seed, @OriginalArg(1) int factorsOfTwo, @OriginalArg(2) int xFactor, @OriginalArg(3) int yFactor, @OriginalArg(4) int zFactor, @OriginalArg(5) float frequency) { + super(seed, factorsOfTwo, xFactor, yFactor, zFactor); + for (@Pc(15) int index = 0; index < super.factorsOfTwo; index++) { + this.pows[index] = (short) (Math.pow((double) frequency, (double) index) * 4096.0D); } } @OriginalMember(owner = "client!eb", name = "a", descriptor = "(Z)V") @Override - protected final void method6017() { - this.anInt6726 = Math.abs(this.anInt6726); - if (this.anInt6726 >= 4096) { - this.anInt6726 = 4095; + protected final void add() { + this.elevation = Math.abs(this.elevation); + if (this.elevation >= 4096) { + this.elevation = 4095; } - this.method6020(this.anInt6728++, (byte) (this.anInt6726 >> 4)); - this.anInt6726 = 0; + this.modify(this.writerIndex++, (byte) (this.elevation >> 4)); + this.elevation = 0; } @OriginalMember(owner = "client!eb", name = "a", descriptor = "(III)V") @Override - protected final void method6011(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - this.anInt6726 += this.anIntArray466[arg0] * arg1 >> 12; + protected final void apply(@OriginalArg(1) int index, @OriginalArg(2) int noise) { + this.elevation += this.pows[index] * noise >> 12; } @OriginalMember(owner = "client!eb", name = "a", descriptor = "(IB)V") - protected void method6020(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { - this.aByteArray95[this.anInt6728++] = (byte) ((arg1 >> 1 & 0x7F) + 127); + protected void modify(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { + this.subData[this.writerIndex++] = (byte) ((arg1 >> 1 & 0x7F) + 127); } @OriginalMember(owner = "client!eb", name = "a", descriptor = "(I)V") @Override - protected final void method6015() { - this.anInt6726 = 0; - this.anInt6728 = 0; + protected final void setup() { + this.elevation = 0; + this.writerIndex = 0; } } diff --git a/client/src/main/java/Class57_Sub1_Sub1.java b/client/src/main/java/Class57_Sub1_Sub1.java index 34569900..9a3c6335 100644 --- a/client/src/main/java/Class57_Sub1_Sub1.java +++ b/client/src/main/java/Class57_Sub1_Sub1.java @@ -7,7 +7,7 @@ public final class Class57_Sub1_Sub1 extends Class57_Sub1 { @OriginalMember(owner = "client!v", name = "x", descriptor = "[B") - private byte[] aByteArray96; + private byte[] data; @OriginalMember(owner = "client!v", name = "", descriptor = "()V") public Class57_Sub1_Sub1() { @@ -16,19 +16,19 @@ public Class57_Sub1_Sub1() { @OriginalMember(owner = "client!v", name = "a", descriptor = "(IB)V") @Override - protected void method6020(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { + protected void modify(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { @Pc(3) int local3 = arg0 * 2; @Pc(12) byte local12 = (byte) ((arg1 >> 1 & 0x7F) + 127); @Pc(15) int local15 = local3; @Pc(16) int local16 = local3 + 1; - this.aByteArray96[local15] = local12; - this.aByteArray96[local16] = local12; + this.data[local15] = local12; + this.data[local16] = local12; } @OriginalMember(owner = "client!v", name = "b", descriptor = "(III)[B") - public byte[] method6022() { - this.aByteArray96 = new byte[524288]; - this.method6013(); - return this.aByteArray96; + public byte[] generate() { + this.data = new byte[524288]; + this.noise(); + return this.data; } } diff --git a/client/src/main/java/Class57_Sub2.java b/client/src/main/java/Class57_Sub2.java index d953838b..73282626 100644 --- a/client/src/main/java/Class57_Sub2.java +++ b/client/src/main/java/Class57_Sub2.java @@ -9,13 +9,13 @@ public class Class57_Sub2 extends Class57 { private int anInt3588; @OriginalMember(owner = "client!fp", name = "t", descriptor = "[B") - private byte[] aByteArray36; + private byte[] subData; @OriginalMember(owner = "client!fp", name = "v", descriptor = "I") private int anInt3593; @OriginalMember(owner = "client!fp", name = "x", descriptor = "I") - private int anInt3595; + private int writerIndex; @OriginalMember(owner = "client!fp", name = "E", descriptor = "I") private int anInt3599; @@ -33,8 +33,8 @@ public class Class57_Sub2 extends Class57 { private int anInt3587; @OriginalMember(owner = "client!fp", name = "", descriptor = "(IIIIIFFF)V") - protected Class57_Sub2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5, @OriginalArg(6) float arg6, @OriginalArg(7) float arg7) { - super(arg0, arg1, arg2, arg3, arg4); + protected Class57_Sub2(@OriginalArg(0) int seed, @OriginalArg(1) int factorsOfTwo, @OriginalArg(2) int xFactor, @OriginalArg(3) int yFactor, @OriginalArg(4) int zFactor, @OriginalArg(5) float arg5, @OriginalArg(6) float arg6, @OriginalArg(7) float arg7) { + super(seed, factorsOfTwo, xFactor, yFactor, zFactor); this.anInt3600 = (int) (arg7 * 4096.0F); this.anInt3596 = (int) (arg6 * 4096.0F); this.anInt3587 = this.anInt3589 = (int) (Math.pow(0.5D, (double) -arg5) * 4096.0D); @@ -42,7 +42,7 @@ protected Class57_Sub2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @Orig @OriginalMember(owner = "client!fp", name = "a", descriptor = "(Z)V") @Override - protected final void method6017() { + protected final void add() { this.anInt3599 >>= 0x4; this.anInt3587 = this.anInt3589; if (this.anInt3599 < 0) { @@ -50,29 +50,29 @@ protected final void method6017() { } else if (this.anInt3599 > 255) { this.anInt3599 = 255; } - this.method3537(this.anInt3595++, (byte) this.anInt3599); + this.modify(this.writerIndex++, (byte) this.anInt3599); this.anInt3599 = 0; } @OriginalMember(owner = "client!fp", name = "a", descriptor = "(I)V") @Override - protected final void method6015() { + protected final void setup() { this.anInt3599 = 0; - this.anInt3595 = 0; + this.writerIndex = 0; } @OriginalMember(owner = "client!fp", name = "a", descriptor = "(III)V") @Override - protected final void method6011(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - if (arg0 == 0) { - this.anInt3588 = this.anInt3596 - (arg1 >= 0 ? arg1 : -arg1); + protected final void apply(@OriginalArg(1) int index, @OriginalArg(2) int noise) { + if (index == 0) { + this.anInt3588 = this.anInt3596 - (noise >= 0 ? noise : -noise); this.anInt3588 = this.anInt3588 * this.anInt3588 >> 12; this.anInt3593 = 4096; this.anInt3599 = this.anInt3588; return; } this.anInt3593 = this.anInt3588 * this.anInt3600 >> 12; - this.anInt3588 = this.anInt3596 - (arg1 < 0 ? -arg1 : arg1); + this.anInt3588 = this.anInt3596 - (noise < 0 ? -noise : noise); if (this.anInt3593 < 0) { this.anInt3593 = 0; } else if (this.anInt3593 > 4096) { @@ -85,7 +85,7 @@ protected final void method6011(@OriginalArg(1) int arg0, @OriginalArg(2) int ar } @OriginalMember(owner = "client!fp", name = "a", descriptor = "(IB)V") - protected void method3537(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { - this.aByteArray36[arg0] = arg1; + protected void modify(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { + this.subData[arg0] = arg1; } } diff --git a/client/src/main/java/Class57_Sub2_Sub1.java b/client/src/main/java/Class57_Sub2_Sub1.java index 0cc0dec9..195a8863 100644 --- a/client/src/main/java/Class57_Sub2_Sub1.java +++ b/client/src/main/java/Class57_Sub2_Sub1.java @@ -7,7 +7,7 @@ public final class Class57_Sub2_Sub1 extends Class57_Sub2 { @OriginalMember(owner = "client!lc", name = "B", descriptor = "[B") - private byte[] aByteArray37; + private byte[] data; @OriginalMember(owner = "client!lc", name = "", descriptor = "()V") public Class57_Sub2_Sub1() { @@ -16,19 +16,19 @@ public Class57_Sub2_Sub1() { @OriginalMember(owner = "client!lc", name = "a", descriptor = "(IB)V") @Override - protected void method3537(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { + protected void modify(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { @Pc(3) int local3 = arg0 * 2; @Pc(7) int local7 = arg1 & 0xFF; @Pc(10) int local10 = local3; @Pc(11) int local11 = local3 + 1; - this.aByteArray37[local10] = (byte) (local7 * 3 >> 5); - this.aByteArray37[local11] = (byte) (local7 * 3 >> 5); + this.data[local10] = (byte) (local7 * 3 >> 5); + this.data[local11] = (byte) (local7 * 3 >> 5); } @OriginalMember(owner = "client!lc", name = "b", descriptor = "(III)[B") - public byte[] method3538() { - this.aByteArray37 = new byte[524288]; - this.method6013(); - return this.aByteArray37; + public byte[] generate() { + this.data = new byte[524288]; + this.noise(); + return this.data; } } diff --git a/client/src/main/java/Static104.java b/client/src/main/java/Static104.java index eadde126..e0f55ba9 100644 --- a/client/src/main/java/Static104.java +++ b/client/src/main/java/Static104.java @@ -15,7 +15,7 @@ public static void method2182() { @Pc(11) byte[] local11; if (aByteBuffer1 == null) { @Pc(5) Class57_Sub2_Sub1 local5 = new Class57_Sub2_Sub1(); - local11 = local5.method3538(); + local11 = local5.generate(); aByteBuffer1 = ByteBuffer.allocateDirect(local11.length); aByteBuffer1.position(0); aByteBuffer1.put(local11); @@ -25,7 +25,7 @@ public static void method2182() { return; } @Pc(32) Class57_Sub1_Sub1 local32 = new Class57_Sub1_Sub1(); - local11 = local32.method6022(); + local11 = local32.generate(); aByteBuffer2 = ByteBuffer.allocateDirect(local11.length); aByteBuffer2.position(0); aByteBuffer2.put(local11); diff --git a/client/src/main/java/Static169.java b/client/src/main/java/Static169.java index 9b7d8264..5f8fff00 100644 --- a/client/src/main/java/Static169.java +++ b/client/src/main/java/Static169.java @@ -7,14 +7,6 @@ public final class Static169 { @OriginalMember(owner = "client!jr", name = "o", descriptor = "[Ljava/lang/String;") public static final String[] MSG_SECONDARY = new String[100]; - @OriginalMember(owner = "client!jr", name = "a", descriptor = "(IIIII)I") - public static int method3211(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - @Pc(7) int local7 = arg3 & 0xF; - @Pc(16) int local16 = local7 < 8 ? arg1 : arg2; - @Pc(40) int local40 = local7 >= 4 ? (local7 == 12 || local7 == 14 ? arg1 : arg0) : arg2; - return ((local7 & 0x2) == 0 ? local40 : -local40) + ((local7 & 0x1) == 0 ? local16 : -local16); - } - @OriginalMember(owner = "client!jr", name = "a", descriptor = "(Lclient!wm;)V") public static void method3212(@OriginalArg(0) RasteriserBase arg0) { for (@Pc(1) int local1 = Static66.anInt1624; local1 < Scene.anInt1914; local1++) { diff --git a/client/src/main/java/Static271.java b/client/src/main/java/Static271.java deleted file mode 100644 index f56b266e..00000000 --- a/client/src/main/java/Static271.java +++ /dev/null @@ -1,14 +0,0 @@ -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static271 { - - @OriginalMember(owner = "client!pj", name = "b", descriptor = "(IB)I") - public static int method4567(@OriginalArg(0) int arg0) { - @Pc(13) int local13 = arg0 * (arg0 * arg0 >> 12) >> 12; - @Pc(19) int local19 = arg0 * 6 - 61440; - @Pc(32) int local32 = (arg0 * local19 >> 12) + 40960; - return local32 * local13 >> 12; - } -} diff --git a/client/src/main/java/StockMarketOffer.java b/client/src/main/java/StockMarketOffer.java index c8c55e4f..f233bbe8 100644 --- a/client/src/main/java/StockMarketOffer.java +++ b/client/src/main/java/StockMarketOffer.java @@ -6,9 +6,6 @@ @OriginalClass("client!q") public final class StockMarketOffer { - @OriginalMember(owner = "client!q", name = "n", descriptor = "[I") - public static final int[] anIntArray360 = new int[4096]; - @OriginalMember(owner = "client!q", name = "a", descriptor = "I") public int item; @@ -27,12 +24,6 @@ public final class StockMarketOffer { @OriginalMember(owner = "client!q", name = "m", descriptor = "I") public int completedGold; - static { - for (@Pc(11) int local11 = 0; local11 < 4096; local11++) { - anIntArray360[local11] = Static271.method4567(local11); - } - } - @OriginalMember(owner = "client!q", name = "", descriptor = "()V") public StockMarketOffer() { } diff --git a/client/src/main/java/TextureOp34.java b/client/src/main/java/TextureOp34.java index c1517abf..3a1300b3 100644 --- a/client/src/main/java/TextureOp34.java +++ b/client/src/main/java/TextureOp34.java @@ -74,7 +74,7 @@ private int method1307(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @Orig @Pc(30) int local30 = arg0 - 4096; local13 &= 0xFF; @Pc(38) int local38 = local26 - 4096; - @Pc(42) int local42 = StockMarketOffer.anIntArray360[local26]; + @Pc(42) int local42 = Class57.fadeCurves[local26]; @Pc(52) int local52 = this.aByteArray12[local17 + arg3] & 0x3; @Pc(69) int local69; if (local52 <= 1) { @@ -166,7 +166,7 @@ public void method1308(@OriginalArg(0) int[] arg0, @OriginalArg(2) int arg1) { local74 = 0; } local96 = this.aByteArray12[local70 & 0xFF] & 0xFF; - local87 = StockMarketOffer.anIntArray360[local379]; + local87 = Class57.fadeCurves[local379]; local105 = this.aByteArray12[local74 & 0xFF] & 0xFF; if (this.aBoolean85) { for (local107 = 0; local107 < Texture.width; local107++) { @@ -196,7 +196,7 @@ public void method1308(@OriginalArg(0) int[] arg0, @OriginalArg(2) int arg1) { local74 = 0; } local59 &= 0xFFF; - local87 = StockMarketOffer.anIntArray360[local59]; + local87 = Class57.fadeCurves[local59]; local96 = this.aByteArray12[local70 & 0xFF] & 0xFF; local105 = this.aByteArray12[local74 & 0xFF] & 0xFF; for (local107 = 0; local107 < Texture.width; local107++) { @@ -218,7 +218,7 @@ public void method1308(@OriginalArg(0) int[] arg0, @OriginalArg(2) int arg1) { local74 = 0; } local59 &= 0xFFF; - local87 = StockMarketOffer.anIntArray360[local59]; + local87 = Class57.fadeCurves[local59]; local96 = this.aByteArray12[local70 & 0xFF] & 0xFF; local105 = this.aByteArray12[local74 & 0xFF] & 0xFF; if (this.aBoolean85 && local148 == this.anInt1043 - 1) {