diff --git a/client/src/main/java/rt4/ArrayUtils.java b/client/src/main/java/rt4/ArrayUtils.java index a2fdb17..c15ffe8 100644 --- a/client/src/main/java/rt4/ArrayUtils.java +++ b/client/src/main/java/rt4/ArrayUtils.java @@ -250,4 +250,105 @@ public final class ArrayUtils { arg0[arg1++] = 0; } } + + @OriginalMember(owner = "client!nk", name = "a", descriptor = "(Z[J[I)V") + public static void sort(@OriginalArg(1) long[] arg0, @OriginalArg(2) int[] arg1) { + method436(arg0, 0, arg0.length - 1, arg1); + } + + @OriginalMember(owner = "client!gj", name = "a", descriptor = "([JII[II)V") + public static void method436(@OriginalArg(0) long[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int[] arg3) { + if (arg1 >= arg2) { + return; + } + @Pc(20) int local20 = arg1; + @Pc(26) int local26 = (arg2 + arg1) / 2; + @Pc(30) long local30 = arg0[local26]; + arg0[local26] = arg0[arg2]; + arg0[arg2] = local30; + @Pc(44) int local44 = arg3[local26]; + arg3[local26] = arg3[arg2]; + arg3[arg2] = local44; + for (@Pc(56) int local56 = arg1; local56 < arg2; local56++) { + if (arg0[local56] < local30 + (long) (local56 & 0x1)) { + @Pc(76) long local76 = arg0[local56]; + arg0[local56] = arg0[local20]; + arg0[local20] = local76; + @Pc(90) int local90 = arg3[local56]; + arg3[local56] = arg3[local20]; + arg3[local20++] = local90; + } + } + arg0[arg2] = arg0[local20]; + arg0[local20] = local30; + arg3[arg2] = arg3[local20]; + arg3[local20] = local44; + method436(arg0, arg1, local20 - 1, arg3); + method436(arg0, local20 + 1, arg2, arg3); + } + + @OriginalMember(owner = "client!ja", name = "a", descriptor = "([II)[I") + public static int[] copyOfNullable(@OriginalArg(0) int[] arg0) { + if (arg0 == null) { + return null; + } else { + @Pc(18) int[] local18 = new int[arg0.length]; + copy(arg0, 0, local18, 0, arg0.length); + return local18; + } + } + + @OriginalMember(owner = "client!vg", name = "a", descriptor = "(I[S)[S") + public static short[] copyOfNullable(@OriginalArg(1) short[] arg0) { + if (arg0 == null) { + return null; + } else { + @Pc(19) short[] local19 = new short[arg0.length]; + copy(arg0, 0, local19, 0, arg0.length); + return local19; + } + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "([SI)[S") + public static short[] copyOf(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1) { + @Pc(2) short[] local2 = new short[arg1]; + copy(arg0, 0, local2, 0, arg1); + return local2; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "([FI)[F") + public static float[] copyOf(@OriginalArg(0) float[] arg0, @OriginalArg(1) int arg1) { + @Pc(2) float[] local2 = new float[arg1]; + copy(arg0, 0, local2, 0, arg1); + return local2; + } + + @OriginalMember(owner = "client!kd", name = "a", descriptor = "([IIIII)V") + public static void fillRange(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + arg1--; + @Pc(14) int local14 = arg2 - 1; + @Pc(17) int local17 = local14 - 7; + while (local17 > arg1) { + @Pc(22) int local22 = arg1 + 1; + arg0[local22] = arg3; + @Pc(27) int local27 = local22 + 1; + arg0[local27] = arg3; + @Pc(32) int local32 = local27 + 1; + arg0[local32] = arg3; + @Pc(37) int local37 = local32 + 1; + arg0[local37] = arg3; + @Pc(42) int local42 = local37 + 1; + arg0[local42] = arg3; + @Pc(47) int local47 = local42 + 1; + arg0[local47] = arg3; + @Pc(52) int local52 = local47 + 1; + arg0[local52] = arg3; + arg1 = local52 + 1; + arg0[arg1] = arg3; + } + while (local14 > arg1) { + arg1++; + arg0[arg1] = arg3; + } + } } diff --git a/client/src/main/java/rt4/Camera.java b/client/src/main/java/rt4/Camera.java index ccf9f35..4d1fa8d 100644 --- a/client/src/main/java/rt4/Camera.java +++ b/client/src/main/java/rt4/Camera.java @@ -13,6 +13,8 @@ public class Camera { public static final int[] cameraAmplitude = new int[5]; @OriginalMember(owner = "client!qg", name = "Y", descriptor = "[I") public static final int[] cameraFrequency = new int[5]; + @OriginalMember(owner = "client!ob", name = "a", descriptor = "[Z") + public static final boolean[] customCameraActive = new boolean[5]; @OriginalMember(owner = "client!fl", name = "s", descriptor = "I") public static double pitchTarget = 128; @@ -87,6 +89,10 @@ public class Camera { public static int anInt5161 = 0; @OriginalMember(owner = "client!af", name = "d", descriptor = "I") public static int anInt40; + @OriginalMember(owner = "client!lg", name = "d", descriptor = "F") + public static float aFloat15; + @OriginalMember(owner = "client!sk", name = "jb", descriptor = "I") + public static int anInt5203; public static double mod(double a, double b) { return ((a % b) + b) % b; @@ -138,11 +144,11 @@ public class Camera { public static void updateLockedCamera() { @Pc(9) int local9 = anInt4232 * 128 + 64; @Pc(15) int local15 = anInt5375 * 128 + 64; - @Pc(23) int local23 = SceneGraph.getTileHeight(Player.level, local15, local9) - Static231.anInt5203; + @Pc(23) int local23 = SceneGraph.getTileHeight(Player.level, local15, local9) - anInt5203; if (anInt4612 >= 100) { renderX = anInt5375 * 128 + 64; renderZ = anInt4232 * 128 + 64; - anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - Static231.anInt5203; + anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - anInt5203; } else { if (renderX < local15) { renderX += Static233.anInt5225 + anInt4612 * (local15 - renderX) / 1000; @@ -289,9 +295,9 @@ public class Camera { @Pc(371) float local371 = local226[2] - renderCoordinates[2]; @Pc(382) float local382 = (local226[1] - renderCoordinates[1]) * -1.0F; @Pc(392) double local392 = Math.sqrt(local371 * local371 + local363 * local363); - Static146.aFloat15 = (float) Math.atan2(local382, local392); + aFloat15 = (float) Math.atan2(local382, local392); aFloat10 = -((float) Math.atan2(local363, local371)); - cameraPitch = (int) ((double) Static146.aFloat15 * 325.949D) & 0x7FF; + cameraPitch = (int) ((double) aFloat15 * 325.949D) & 0x7FF; cameraYaw = (int) ((double) aFloat10 * 325.949D) & 0x7FF; } @@ -325,14 +331,14 @@ public class Camera { @OriginalMember(owner = "client!lb", name = "a", descriptor = "(ZIIIBII)V") public static void method2722(@OriginalArg(0) boolean arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { anInt4612 = arg3; - Static231.anInt5203 = arg2; + anInt5203 = arg2; anInt5375 = arg5; Static233.anInt5225 = arg1; anInt4232 = arg4; if (arg0 && anInt4612 >= 100) { renderX = anInt5375 * 128 + 64; renderZ = anInt4232 * 128 + 64; - anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - Static231.anInt5203; + anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - anInt5203; } cameraType = 2; } @@ -340,7 +346,7 @@ public class Camera { @OriginalMember(owner = "client!cl", name = "e", descriptor = "(I)V") public static void resetCameraEffects() { for (@Pc(3) int local3 = 0; local3 < 5; local3++) { - Static176.customCameraActive[local3] = false; + customCameraActive[local3] = false; } anInt5230 = 0; Static233.anInt5217 = 0; diff --git a/client/src/main/java/rt4/ChangeLocRequest.java b/client/src/main/java/rt4/ChangeLocRequest.java index 5fb4568..0fd5671 100644 --- a/client/src/main/java/rt4/ChangeLocRequest.java +++ b/client/src/main/java/rt4/ChangeLocRequest.java @@ -58,7 +58,7 @@ public final class ChangeLocRequest extends Node { local10.setLoops--; } if (local10.setLoops == 0 && local10.x >= 1 && local10.z >= 1 && local10.x <= 102 && local10.z <= 102 && (local10.anInt929 < 0 || method3557(local10.anInt929, local10.anInt926))) { - Static79.method1698(local10.anInt929, local10.x, local10.level, local10.anInt922, local10.z, local10.anInt926, local10.layer); + SceneGraph.method1698(local10.anInt929, local10.x, local10.level, local10.anInt922, local10.z, local10.anInt926, local10.layer); local10.setLoops = -1; if (local10.originalId == local10.anInt929 && local10.originalId == -1) { local10.unlink(); @@ -67,7 +67,7 @@ public final class ChangeLocRequest extends Node { } } } else if (local10.originalId < 0 || method3557(local10.originalId, local10.originalShape)) { - Static79.method1698(local10.originalId, local10.x, local10.level, local10.originalAngle, local10.z, local10.originalShape, local10.layer); + SceneGraph.method1698(local10.originalId, local10.x, local10.level, local10.originalAngle, local10.z, local10.originalShape, local10.layer); local10.unlink(); } } diff --git a/client/src/main/java/rt4/Cheat.java b/client/src/main/java/rt4/Cheat.java index 1cd3f1b..abeee7d 100644 --- a/client/src/main/java/rt4/Cheat.java +++ b/client/src/main/java/rt4/Cheat.java @@ -95,6 +95,8 @@ public class Cheat { public static boolean shiftClick = GlobalConfig.USE_SHIFT_CLICK; @OriginalMember(owner = "client!qc", name = "U", descriptor = "I") public static int rectDebug = 0; + @OriginalMember(owner = "client!jg", name = "e", descriptor = "Z") + public static boolean qaOpTest = false; @OriginalMember(owner = "client!en", name = "a", descriptor = "(IIIB)V") public static void teleport(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { @@ -206,7 +208,7 @@ public class Cheat { Chat.add(null, 0, JagString.concatenate(new JagString[]{RECT_DEBUG_EQUALS, JagString.parseInt(rectDebug)})); } if (arg0.equalsIgnoreCase(QA_OP_TEST)) { - Static121.qaOpTest = true; + qaOpTest = true; } if (arg0.equalsIgnoreCase(TWEENING)) { if (SeqType.applyTweening) { diff --git a/client/src/main/java/rt4/ClientProt.java b/client/src/main/java/rt4/ClientProt.java index d9532ad..0165cdd 100644 --- a/client/src/main/java/rt4/ClientProt.java +++ b/client/src/main/java/rt4/ClientProt.java @@ -203,7 +203,7 @@ public class ClientProt { public static void method28() { InterfaceList.redraw(Static40.aClass13_14); Static40.anInt4851++; - if (Static44.aBoolean83 && Static146.aBoolean174) { + if (Static44.aBoolean83 && InterfaceList.aBoolean174) { @Pc(30) int local30 = Mouse.lastMouseX; local30 -= Static40.anInt5388; if (Static81.anInt2225 > local30) { diff --git a/client/src/main/java/rt4/Component.java b/client/src/main/java/rt4/Component.java index bf6c580..5a07b32 100644 --- a/client/src/main/java/rt4/Component.java +++ b/client/src/main/java/rt4/Component.java @@ -256,8 +256,10 @@ public final class Component { @OriginalMember(owner = "client!be", name = "J", descriptor = "Z") public boolean aBoolean24 = false; + @OriginalMember(owner = "client!ob", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_800 = JagString.parse(""); @OriginalMember(owner = "client!be", name = "Sb", descriptor = "Lclient!na;") - public JagString aClass100_85 = Static176.aClass100_800; + public JagString aClass100_85 = aClass100_800; @OriginalMember(owner = "client!be", name = "i", descriptor = "Z") public boolean aBoolean19 = false; @@ -308,7 +310,7 @@ public final class Component { public int anInt492 = 0; @OriginalMember(owner = "client!be", name = "Gb", descriptor = "Lclient!na;") - public JagString text = Static176.aClass100_800; + public JagString text = aClass100_800; @OriginalMember(owner = "client!be", name = "n", descriptor = "I") public int width = 0; @@ -338,7 +340,7 @@ public final class Component { public int modelZOffset = 0; @OriginalMember(owner = "client!be", name = "Dc", descriptor = "Lclient!na;") - public JagString optionBase = Static176.aClass100_800; + public JagString optionBase = aClass100_800; @OriginalMember(owner = "client!be", name = "Lc", descriptor = "I") public int updatedVarcsReaderIndex = 0; @@ -365,13 +367,13 @@ public final class Component { public int modelXOffset = 0; @OriginalMember(owner = "client!be", name = "Ub", descriptor = "Lclient!na;") - public JagString targetVerb = Static176.aClass100_800; + public JagString targetVerb = aClass100_800; @OriginalMember(owner = "client!be", name = "Lb", descriptor = "I") public int modelRotationSpeed = 0; @OriginalMember(owner = "client!be", name = "r", descriptor = "Lclient!na;") - public JagString aClass100_82 = Static176.aClass100_800; + public JagString aClass100_82 = aClass100_800; @OriginalMember(owner = "client!be", name = "Pc", descriptor = "I") public int outlineThickness = 0; diff --git a/client/src/main/java/rt4/DateUtil.java b/client/src/main/java/rt4/DateUtil.java index 0df8e14..8933053 100644 --- a/client/src/main/java/rt4/DateUtil.java +++ b/client/src/main/java/rt4/DateUtil.java @@ -25,42 +25,31 @@ public final class DateUtil { @OriginalMember(owner = "client!km", name = "tc", descriptor = "Lclient!na;") private static final JagString DEC = JagString.parse("Dec"); - @OriginalMember(owner = "client!km", name = "vc", descriptor = "Lclient!na;") private static final JagString JUL = JagString.parse("Jul"); - @OriginalMember(owner = "client!km", name = "xc", descriptor = "Lclient!na;") private static final JagString MAY = JagString.parse("May"); - @OriginalMember(owner = "client!km", name = "yc", descriptor = "Lclient!na;") private static final JagString NOV = JagString.parse("Nov"); - @OriginalMember(owner = "client!km", name = "zc", descriptor = "Lclient!na;") private static final JagString MAR = JagString.parse("Mar"); - @OriginalMember(owner = "client!km", name = "Gc", descriptor = "Lclient!na;") private static final JagString JAN = JagString.parse("Jan"); - @OriginalMember(owner = "client!km", name = "Hc", descriptor = "Lclient!na;") private static final JagString FEB = JagString.parse("Feb"); - @OriginalMember(owner = "client!km", name = "Tc", descriptor = "Lclient!na;") private static final JagString APR = JagString.parse("Apr"); - @OriginalMember(owner = "client!km", name = "Wc", descriptor = "Lclient!na;") private static final JagString JUN = JagString.parse("Jun"); - @OriginalMember(owner = "client!km", name = "Qc", descriptor = "Lclient!na;") private static final JagString AUG = JagString.parse("Aug"); - @OriginalMember(owner = "client!km", name = "cd", descriptor = "Lclient!na;") private static final JagString SEP = JagString.parse("Sep"); - @OriginalMember(owner = "client!km", name = "dd", descriptor = "Lclient!na;") private static final JagString OCT = JagString.parse("Oct"); - @OriginalMember(owner = "client!km", name = "Ac", descriptor = "[Lclient!na;") public static final JagString[] MONTHS = new JagString[]{JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC}; + @OriginalMember(owner = "client!rl", name = "T", descriptor = "Lclient!na;") private static final JagString SAT = JagString.parse("Sat"); @OriginalMember(owner = "client!rl", name = "U", descriptor = "Lclient!na;") @@ -78,6 +67,33 @@ public final class DateUtil { @OriginalMember(owner = "client!rl", name = "Y", descriptor = "[Lclient!na;") public static final JagString[] DAYS = new JagString[]{SUN, MON, TUE, WED, THU, FRI, SAT}; + @OriginalMember(owner = "client!ck", name = "T", descriptor = "Lclient!na;") + private static final JagString aClass100_207 = JagString.parse("Jan"); + @OriginalMember(owner = "client!ck", name = "hb", descriptor = "Lclient!na;") + private static final JagString aClass100_212 = JagString.parse("Feb"); + @OriginalMember(owner = "client!ck", name = "gb", descriptor = "Lclient!na;") + private static final JagString aClass100_211 = JagString.parse("Mar"); + @OriginalMember(owner = "client!ck", name = "db", descriptor = "Lclient!na;") + private static final JagString aClass100_210 = JagString.parse("Apr"); + @OriginalMember(owner = "client!ck", name = "n", descriptor = "Lclient!na;") + private static final JagString aClass100_199 = JagString.parse("May"); + @OriginalMember(owner = "client!ck", name = "L", descriptor = "Lclient!na;") + private static final JagString aClass100_204 = JagString.parse("Jun"); + @OriginalMember(owner = "client!ck", name = "B", descriptor = "Lclient!na;") + private static final JagString aClass100_202 = JagString.parse("Jul"); + @OriginalMember(owner = "client!ck", name = "l", descriptor = "Lclient!na;") + private static final JagString aClass100_198 = JagString.parse("Aug"); + @OriginalMember(owner = "client!ck", name = "V", descriptor = "Lclient!na;") + private static final JagString aClass100_208 = JagString.parse("Sep"); + @OriginalMember(owner = "client!ck", name = "S", descriptor = "Lclient!na;") + private static final JagString aClass100_206 = JagString.parse("Oct"); + @OriginalMember(owner = "client!ck", name = "Y", descriptor = "Lclient!na;") + private static final JagString aClass100_209 = JagString.parse("Nov"); + @OriginalMember(owner = "client!ck", name = "O", descriptor = "Lclient!na;") + private static final JagString aClass100_205 = JagString.parse("Dec"); + @OriginalMember(owner = "client!ck", name = "f", descriptor = "[Lclient!na;") + public static final JagString[] aClass100Array40 = new JagString[]{aClass100_207, aClass100_212, aClass100_211, aClass100_210, aClass100_199, aClass100_204, aClass100_202, aClass100_198, aClass100_208, aClass100_206, aClass100_209, aClass100_205}; + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(JB)Lclient!na;") public static JagString getDateString(@OriginalArg(0) long date) { calendar.setTime(new Date(date)); diff --git a/client/src/main/java/rt4/DeadClass.java b/client/src/main/java/rt4/DeadClass.java index 3c850e0..dbb9071 100644 --- a/client/src/main/java/rt4/DeadClass.java +++ b/client/src/main/java/rt4/DeadClass.java @@ -11,6 +11,8 @@ public final class DeadClass { @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") private static final JagString aClass100_195 = JagString.parse("Discard"); + @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") + private static final JagString aClass100_200 = JagString.parse("Loaded world list data"); @OriginalMember(owner = "client!rc", name = "R", descriptor = "Z") private static boolean aBoolean74; diff --git a/client/src/main/java/rt4/Flames.java b/client/src/main/java/rt4/Flames.java index 219893e..1ab546c 100644 --- a/client/src/main/java/rt4/Flames.java +++ b/client/src/main/java/rt4/Flames.java @@ -6,43 +6,43 @@ import org.openrs2.deob.annotation.Pc; public class Flames { @OriginalMember(owner = "client!se", name = "t", descriptor = "[I") - public static final int[] anIntArray445 = new int[]{12543016, 15504954, 15914854, 16773818}; + public static final int[] flameGradientSource = new int[]{0xbf6428, 0xec963a, 0xf2d766, 0xfff2ba}; @OriginalMember(owner = "client!bb", name = "m", descriptor = "Lclient!na;") public static final JagString RUNES = JagString.parse("runes"); @OriginalMember(owner = "client!cl", name = "ab", descriptor = "[I") - public static final int[] anIntArray83 = new int[256]; + public static final int[] flameShiftX = new int[256]; @OriginalMember(owner = "client!km", name = "Yc", descriptor = "I") public static int runesId; @OriginalMember(owner = "client!uf", name = "e", descriptor = "I") - public static int anInt5434 = 0; + public static int flameCycle = 0; @OriginalMember(owner = "client!wb", name = "b", descriptor = "[I") - public static int[] anIntArray562; + public static int[] flameBuffer1; @OriginalMember(owner = "client!t", name = "G", descriptor = "[Lclient!ek;") public static SoftwareIndexedSprite[] runes; @OriginalMember(owner = "client!hh", name = "r", descriptor = "[I") - public static int[] anIntArray235; + public static int[] flameGradient; @OriginalMember(owner = "client!vg", name = "e", descriptor = "[I") - public static int[] anIntArray516; + public static int[] flameBuffer2; @OriginalMember(owner = "client!ri", name = "d", descriptor = "[I") - public static int[] anIntArray188; + public static int[] flameIntensityBuffer; @OriginalMember(owner = "client!nd", name = "y", descriptor = "Lclient!mm;") - public static SoftwareSprite aClass3_Sub2_Sub1_Sub1_3; + public static SoftwareSprite imageFlames; @OriginalMember(owner = "client!i", name = "ec", descriptor = "[I") - public static int[] anIntArray254; + public static int[] flameIntensity; @OriginalMember(owner = "client!jj", name = "e", descriptor = "I") - public static int anInt3058 = 0; + public static int flameOffset = 0; @OriginalMember(owner = "client!a", name = "i", descriptor = "I") public static int anInt6 = 0; @@ -62,40 +62,40 @@ public class Flames { @OriginalMember(owner = "client!wa", name = "a", descriptor = "(Z)V") public static void update() { - anInt5434++; + flameCycle++; } @OriginalMember(owner = "client!lf", name = "a", descriptor = "(ILclient!ve;)V") - public static void method2743(@OriginalArg(1) Js5 archive) { + public static void load(@OriginalArg(1) Js5 archive) { runes = SpriteLoader.loadSoftwareIndexedSpritesAutoDetect(runesId, archive); - anIntArray235 = new int[256]; + flameGradient = new int[256]; @Pc(15) int local15; for (local15 = 0; local15 < 3; local15++) { - @Pc(30) int local30 = anIntArray445[local15 + 1] >> 16 & 0xFF; - @Pc(39) float local39 = (float) (anIntArray445[local15] >> 16 & 0xFF); - @Pc(48) float local48 = (float) (anIntArray445[local15] >> 8 & 0xFF); - @Pc(55) float local55 = (float) (anIntArray445[local15] & 0xFF); + @Pc(30) int local30 = flameGradientSource[local15 + 1] >> 16 & 0xFF; + @Pc(39) float local39 = (float) (flameGradientSource[local15] >> 16 & 0xFF); + @Pc(48) float local48 = (float) (flameGradientSource[local15] >> 8 & 0xFF); + @Pc(55) float local55 = (float) (flameGradientSource[local15] & 0xFF); @Pc(62) float local62 = ((float) local30 - local39) / 64.0F; - @Pc(72) int local72 = anIntArray445[local15 + 1] >> 8 & 0xFF; + @Pc(72) int local72 = flameGradientSource[local15 + 1] >> 8 & 0xFF; @Pc(80) float local80 = ((float) local72 - local48) / 64.0F; - @Pc(88) int local88 = anIntArray445[local15 + 1] & 0xFF; + @Pc(88) int local88 = flameGradientSource[local15 + 1] & 0xFF; @Pc(95) float local95 = ((float) local88 - local55) / 64.0F; for (@Pc(97) int local97 = 0; local97 < 64; local97++) { - anIntArray235[local97 + local15 * 64] = (int) local55 | (int) local48 << 8 | (int) local39 << 16; + flameGradient[local97 + local15 * 64] = (int) local55 | (int) local48 << 8 | (int) local39 << 16; local48 += local80; local55 += local95; local39 += local62; } } for (local15 = 192; local15 < 255; local15++) { - anIntArray235[local15] = anIntArray445[3]; + flameGradient[local15] = flameGradientSource[3]; } - anIntArray562 = new int[32768]; - anIntArray516 = new int[32768]; + flameBuffer1 = new int[32768]; + flameBuffer2 = new int[32768]; setRune(null); - anIntArray254 = new int[32768]; - anIntArray188 = new int[32768]; - aClass3_Sub2_Sub1_Sub1_3 = new SoftwareSprite(128, 254); + flameIntensity = new int[32768]; + flameIntensityBuffer = new int[32768]; + imageFlames = new SoftwareSprite(128, 254); } @OriginalMember(owner = "client!vl", name = "a", descriptor = "(II)V") @@ -106,10 +106,10 @@ public class Flames { if (arg0 > 10) { arg0 = 10; } - anInt3058 += arg0 * 128; + flameOffset += arg0 * 128; @Pc(40) int local40; - if (anIntArray562.length < anInt3058) { - anInt3058 -= anIntArray562.length; + if (flameBuffer1.length < flameOffset) { + flameOffset -= flameBuffer1.length; local40 = (int) (Math.random() * 12.0D); setRune(runes[local40]); } @@ -119,11 +119,11 @@ public class Flames { @Pc(60) int local60; @Pc(89) int local89; for (local60 = 0; local60 < local54; local60++) { - local89 = anIntArray188[local40 + local58] - arg0 * anIntArray562[anIntArray562.length - 1 & anInt3058 + local40] / 6; + local89 = flameIntensityBuffer[local40 + local58] - arg0 * flameBuffer1[flameBuffer1.length - 1 & flameOffset + local40] / 6; if (local89 < 0) { local89 = 0; } - anIntArray188[local40++] = local89; + flameIntensityBuffer[local40++] = local89; } @Pc(117) int local117; @Pc(125) int local125; @@ -132,17 +132,17 @@ public class Flames { for (local117 = 0; local117 < 128; local117++) { local125 = (int) (Math.random() * 100.0D); if (local125 < 50 && local117 > 10 && local117 < 118) { - anIntArray188[local117 + local89] = 255; + flameIntensityBuffer[local117 + local89] = 255; } else { - anIntArray188[local117 + local89] = 0; + flameIntensityBuffer[local117 + local89] = 0; } } } for (local60 = 0; local60 < 256 - arg0; local60++) { - anIntArray83[local60] = anIntArray83[local60 + arg0]; + flameShiftX[local60] = flameShiftX[local60 + arg0]; } for (local60 = 256 - arg0; local60 < 256; local60++) { - anIntArray83[local60] = (int) (Math.sin((double) anInt6 / 14.0D) * 16.0D + Math.sin((double) anInt6 / 15.0D) * 14.0D + Math.sin((double) anInt6 / 16.0D) * 12.0D); + flameShiftX[local60] = (int) (Math.sin((double) anInt6 / 14.0D) * 16.0D + Math.sin((double) anInt6 / 15.0D) * 14.0D + Math.sin((double) anInt6 / 16.0D) * 12.0D); anInt6++; } anInt5084 += arg0; @@ -153,7 +153,7 @@ public class Flames { for (local89 = 0; local89 < anInt5084; local89++) { local117 = (int) (Math.random() * 124.0D) + 2; local125 = (int) (Math.random() * 128.0D) + 128; - anIntArray188[local117 + (local125 << 7)] = 192; + flameIntensityBuffer[local117 + (local125 << 7)] = 192; } anInt5084 = 0; @Pc(290) int local290; @@ -162,13 +162,13 @@ public class Flames { local117 = 0; for (local290 = -local60; local290 < 128; local290++) { if (local60 + local290 < 128) { - local117 += anIntArray188[local125 + local290 + local60]; + local117 += flameIntensityBuffer[local125 + local290 + local60]; } if (local290 - local60 - 1 >= 0) { - local117 -= anIntArray188[local290 + local125 - local60 - 1]; + local117 -= flameIntensityBuffer[local290 + local125 - local60 - 1]; } if (local290 >= 0) { - anIntArray254[local290 + local125] = local117 / (local60 * 2 + 1); + flameIntensity[local290 + local125] = local117 / (local60 * 2 + 1); } } } @@ -177,13 +177,13 @@ public class Flames { for (local125 = -local60; local125 < 256; local125++) { local290 = local125 * 128; if (local125 + local60 < 256) { - local117 += anIntArray254[local60 * 128 + local89 + local290]; + local117 += flameIntensity[local60 * 128 + local89 + local290]; } if (local125 - local60 - 1 >= 0) { - local117 -= anIntArray254[local89 + local290 - (local60 + 1) * 128]; + local117 -= flameIntensity[local89 + local290 - (local60 + 1) * 128]; } if (local125 >= 0) { - anIntArray188[local290 + local89] = local117 / (local60 * 2 + 1); + flameIntensityBuffer[local290 + local89] = local117 / (local60 * 2 + 1); } } } @@ -192,13 +192,13 @@ public class Flames { @OriginalMember(owner = "client!fh", name = "a", descriptor = "(BLclient!ek;)V") public static void setRune(@OriginalArg(1) SoftwareIndexedSprite sprite) { @Pc(5) int local5; - for (local5 = 0; local5 < anIntArray562.length; local5++) { - anIntArray562[local5] = 0; + for (local5 = 0; local5 < flameBuffer1.length; local5++) { + flameBuffer1[local5] = 0; } @Pc(36) int local36; for (local5 = 0; local5 < 5000; local5++) { local36 = (int) ((double) 256 * Math.random() * 128.0D); - anIntArray562[local36] = (int) (Math.random() * 284.0D); + flameBuffer1[local36] = (int) (Math.random() * 284.0D); } @Pc(66) int local66; @Pc(76) int local76; @@ -206,12 +206,12 @@ public class Flames { for (local36 = 1; local36 < 255; local36++) { for (local66 = 1; local66 < 127; local66++) { local76 = local66 + (local36 << 7); - anIntArray516[local76] = (anIntArray562[local76 + 128] + anIntArray562[local76 - 1] + anIntArray562[local76 + 1] + anIntArray562[local76 + -128]) / 4; + flameBuffer2[local76] = (flameBuffer1[local76 + 128] + flameBuffer1[local76 - 1] + flameBuffer1[local76 + 1] + flameBuffer1[local76 + -128]) / 4; } } - @Pc(113) int[] local113 = anIntArray562; - anIntArray562 = anIntArray516; - anIntArray516 = local113; + @Pc(113) int[] local113 = flameBuffer1; + flameBuffer1 = flameBuffer2; + flameBuffer2 = local113; } if (sprite == null) { return; @@ -223,7 +223,7 @@ public class Flames { local76 = sprite.xOffset + local66 + 16; @Pc(162) int local162 = sprite.yOffset + local36 + 16; @Pc(169) int local169 = local76 + (local162 << 7); - anIntArray562[local169] = 0; + flameBuffer1[local169] = 0; } } } @@ -231,15 +231,15 @@ public class Flames { @OriginalMember(owner = "client!s", name = "b", descriptor = "(III)V") public static void render(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - if (anInt5434 > 0) { - method4528(anInt5434); - anInt5434 = 0; + if (flameCycle > 0) { + method4528(flameCycle); + flameCycle = 0; } @Pc(20) int local20 = 0; @Pc(24) int local24 = SoftwareRaster.width * arg1; @Pc(26) int local26 = 0; for (@Pc(28) int local28 = 1; local28 < 255; local28++) { - @Pc(43) int local43 = (256 - local28) * anIntArray83[local28] / 256; + @Pc(43) int local43 = (256 - local28) * flameShiftX[local28] / 256; if (local43 < 0) { local43 = 0; } @@ -247,9 +247,9 @@ public class Flames { @Pc(55) int local55; for (local55 = local43; local55 < 128; local55++) { @Pc(65) int local65 = SoftwareRaster.pixels[local24++ + arg0]; - @Pc(70) int local70 = anIntArray188[local20++]; + @Pc(70) int local70 = flameIntensityBuffer[local20++]; if (local70 == 0) { - aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = local65; + imageFlames.pixels[local26++] = local65; } else { @Pc(76) int local76 = local70 + 18; if (local76 > 255) { @@ -259,19 +259,19 @@ public class Flames { if (local89 > 255) { local89 = 255; } - local70 = anIntArray235[local70]; - aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = (local89 * (local65 & 0xFF00FF) + (local70 & 0xFF00FF) * local76 & 0xFF00FF00) + ((local70 & 0xFF00) * local76 + ((local65 & 0xFF00) * local89) & 0xFF0000) >> 8; + local70 = flameGradient[local70]; + imageFlames.pixels[local26++] = (local89 * (local65 & 0xFF00FF) + (local70 & 0xFF00FF) * local76 & 0xFF00FF00) + ((local70 & 0xFF00) * local76 + ((local65 & 0xFF00) * local89) & 0xFF0000) >> 8; } } for (local55 = 0; local55 < local43; local55++) { - aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = SoftwareRaster.pixels[arg0 + local24++]; + imageFlames.pixels[local26++] = SoftwareRaster.pixels[arg0 + local24++]; } local24 += SoftwareRaster.width - 128; } if (GlRenderer.enabled) { - GlRaster.drawPixels(aClass3_Sub2_Sub1_Sub1_3.pixels, arg0, arg1, aClass3_Sub2_Sub1_Sub1_3.width, aClass3_Sub2_Sub1_Sub1_3.height); + GlRaster.drawPixels(imageFlames.pixels, arg0, arg1, imageFlames.width, imageFlames.height); } else { - aClass3_Sub2_Sub1_Sub1_3.drawPixels(arg0, arg1); + imageFlames.drawPixels(arg0, arg1); } } } diff --git a/client/src/main/java/rt4/Font.java b/client/src/main/java/rt4/Font.java index 240a4f9..584496a 100644 --- a/client/src/main/java/rt4/Font.java +++ b/client/src/main/java/rt4/Font.java @@ -69,7 +69,7 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "ub", descriptor = "I") public static int underlineColor = -1; @OriginalMember(owner = "client!rk", name = "vb", descriptor = "I") - public static int anInt3629 = 0; + public static int extraSpaceWidth = 0; @OriginalMember(owner = "client!rk", name = "wb", descriptor = "I") public static int color = 0; @OriginalMember(owner = "client!rk", name = "xb", descriptor = "I") @@ -285,9 +285,9 @@ public abstract class Font extends SecondaryNode { local120 = this.spriteInnerHeights[local22]; if (local22 == 32) { if (spaceWidth > 0) { - anInt3629 += spaceWidth; - arg1 += anInt3629 >> 8; - anInt3629 &= 0xFF; + extraSpaceWidth += spaceWidth; + arg1 += extraSpaceWidth >> 8; + extraSpaceWidth &= 0xFF; } } else if (alphaOverride == 256) { if (shadowColorOverride != -1) { @@ -764,7 +764,7 @@ public abstract class Font extends SecondaryNode { alpha = 256; alphaOverride = 256; spaceWidth = 0; - anInt3629 = 0; + extraSpaceWidth = 0; } @OriginalMember(owner = "client!rk", name = "c", descriptor = "(Lclient!na;IIII)V") @@ -843,7 +843,7 @@ public abstract class Font extends SecondaryNode { alpha = arg2; alphaOverride = arg2; spaceWidth = 0; - anInt3629 = 0; + extraSpaceWidth = 0; } @OriginalMember(owner = "client!rk", name = "a", descriptor = "(Lclient!na;IIIIIIIILjava/util/Random;I[I)I") @@ -977,9 +977,9 @@ public abstract class Font extends SecondaryNode { local10++; if (local24 == 32) { if (spaceWidth > 0) { - anInt3629 += spaceWidth; - arg1 += anInt3629 >> 8; - anInt3629 &= 0xFF; + extraSpaceWidth += spaceWidth; + arg1 += extraSpaceWidth >> 8; + extraSpaceWidth &= 0xFF; } } else if (alphaOverride == 256) { if (shadowColorOverride != -1) { diff --git a/client/src/main/java/rt4/Fonts.java b/client/src/main/java/rt4/Fonts.java index 48726e4..d4297ed 100644 --- a/client/src/main/java/rt4/Fonts.java +++ b/client/src/main/java/rt4/Fonts.java @@ -71,7 +71,7 @@ public class Fonts { p12Full.drawInterfaceText(arg1, 10, 10, local24, local31, 16777215, -1, 1, 1, 0); InterfaceList.redrawScreen(6, local24 + 8, 6, local31 + 4 + 4); if (!arg0) { - Static121.redrawScreen(10, 10, local31, local24); + InterfaceList.forceRedrawScreen(10, 10, local31, local24); } else if (GlRenderer.enabled) { GlRenderer.swapBuffers(); } else { diff --git a/client/src/main/java/rt4/FriendsList.java b/client/src/main/java/rt4/FriendsList.java index a687f9c..5174f6f 100644 --- a/client/src/main/java/rt4/FriendsList.java +++ b/client/src/main/java/rt4/FriendsList.java @@ -16,7 +16,7 @@ public class FriendsList { @OriginalMember(owner = "client!jh", name = "b", descriptor = "[Lclient!na;") public static final JagString[] usernames = new JagString[200]; @OriginalMember(owner = "client!ab", name = "c", descriptor = "[Z") - public static final boolean[] aBooleanArray135 = new boolean[200]; + public static final boolean[] sameGame = new boolean[200]; @OriginalMember(owner = "client!p", name = "d", descriptor = "I") public static int transmitAt = 0; @OriginalMember(owner = "client!nc", name = "m", descriptor = "I") @@ -69,7 +69,7 @@ public class FriendsList { worlds[size] = 0; worldNames[size] = JagString.EMPTY; ranks[size] = 0; - aBooleanArray135[size] = false; + sameGame[size] = false; size++; transmitAt = InterfaceList.transmitTimer; Protocol.outboundBuffer.p1isaac(120); @@ -90,7 +90,7 @@ public class FriendsList { worldNames[local41] = worldNames[local41 + 1]; encodedUsernames[local41] = encodedUsernames[local41 + 1]; ranks[local41] = ranks[local41 + 1]; - aBooleanArray135[local41] = aBooleanArray135[local41 + 1]; + sameGame[local41] = sameGame[local41 + 1]; } transmitAt = InterfaceList.transmitTimer; Protocol.outboundBuffer.p1isaac(57); @@ -108,7 +108,7 @@ public class FriendsList { } @OriginalMember(owner = "client!ac", name = "a", descriptor = "(Lclient!na;I)I") - public static int method25(@OriginalArg(0) JagString arg0) { + public static int indexOf(@OriginalArg(0) JagString arg0) { if (arg0 == null) { return -1; } diff --git a/client/src/main/java/rt4/GlVertexBuffer.java b/client/src/main/java/rt4/GlBoundingBox.java similarity index 78% rename from client/src/main/java/rt4/GlVertexBuffer.java rename to client/src/main/java/rt4/GlBoundingBox.java index 2ef7d2d..5c84753 100644 --- a/client/src/main/java/rt4/GlVertexBuffer.java +++ b/client/src/main/java/rt4/GlBoundingBox.java @@ -4,28 +4,28 @@ import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; @OriginalClass("client!ae") -public final class GlVertexBuffer { +public final class GlBoundingBox { @OriginalMember(owner = "client!ae", name = "a", descriptor = "S") - public short aShort2; + public short minY; @OriginalMember(owner = "client!ae", name = "b", descriptor = "S") - public short aShort3; + public short maxY; @OriginalMember(owner = "client!ae", name = "c", descriptor = "S") - public short aShort4; + public short cylinderRadius; @OriginalMember(owner = "client!ae", name = "d", descriptor = "S") - public short aShort5; + public short maxX; @OriginalMember(owner = "client!ae", name = "e", descriptor = "S") - public short aShort6; + public short minX; @OriginalMember(owner = "client!ae", name = "f", descriptor = "S") - public short aShort7; + public short maxZ; @OriginalMember(owner = "client!ae", name = "g", descriptor = "S") - public short aShort8; + public short minZ; @OriginalMember(owner = "client!ae", name = "h", descriptor = "Z") public boolean valid = false; diff --git a/client/src/main/java/rt4/GlBuffer.java b/client/src/main/java/rt4/GlBuffer.java index 930d91b..ffb5e2c 100644 --- a/client/src/main/java/rt4/GlBuffer.java +++ b/client/src/main/java/rt4/GlBuffer.java @@ -9,17 +9,17 @@ import java.nio.ByteBuffer; public final class GlBuffer { @OriginalMember(owner = "client!ql", name = "e", descriptor = "Lclient!vi;") - public GlVertexBufferObject aClass155_4; + public GlVertexBufferObject vbo; @OriginalMember(owner = "client!ql", name = "f", descriptor = "Ljava/nio/ByteBuffer;") - public ByteBuffer aByteBuffer8; + public ByteBuffer buffer; @OriginalMember(owner = "client!ql", name = "b", descriptor = "Z") public boolean valid = false; @OriginalMember(owner = "client!ql", name = "a", descriptor = "I") - public int anInt4777 = 0; + public int pointer = 0; @OriginalMember(owner = "client!ql", name = "m", descriptor = "I") - public int anInt4782 = 0; + public int stride = 0; } diff --git a/client/src/main/java/rt4/GlCleaner.java b/client/src/main/java/rt4/GlCleaner.java index bce7df4..a001a59 100644 --- a/client/src/main/java/rt4/GlCleaner.java +++ b/client/src/main/java/rt4/GlCleaner.java @@ -38,7 +38,7 @@ public final class GlCleaner { private static final int[] anIntArray151 = new int[1000]; @OriginalMember(owner = "client!fa", name = "a", descriptor = "(III)V") - public static synchronized void method1485(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + public static synchronized void deleteTexture(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { if (arg2 == contextId) { @Pc(8) IntNode local8 = new IntNode(arg1); local8.key = arg0; @@ -68,7 +68,7 @@ public final class GlCleaner { } @OriginalMember(owner = "client!fa", name = "b", descriptor = "(III)V") - public static synchronized void method1489(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + public static synchronized void deleteBuffer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { if (arg2 == contextId) { @Pc(8) IntNode local8 = new IntNode(arg1); local8.key = arg0; diff --git a/client/src/main/java/rt4/GlModel.java b/client/src/main/java/rt4/GlModel.java index 3f34186..d39e5ab 100644 --- a/client/src/main/java/rt4/GlModel.java +++ b/client/src/main/java/rt4/GlModel.java @@ -14,7 +14,7 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!tf", name = "G", descriptor = "Z") public static boolean arbVboSupported; @OriginalMember(owner = "client!td", name = "D", descriptor = "Lclient!wa;") - public static Buffer aClass3_Sub15_8 = new Buffer(10000); + public static Buffer tempBuffer = new Buffer(10000); @OriginalMember(owner = "client!td", name = "bb", descriptor = "Lclient!td;") public static GlModel aClass8_Sub1_Sub1_1 = new GlModel(); @OriginalMember(owner = "client!td", name = "jb", descriptor = "Lclient!td;") @@ -59,7 +59,7 @@ public final class GlModel extends Model { public static int anInt3582 = 0; @OriginalMember(owner = "client!td", name = "t", descriptor = "[S") - private short[] aShortArray75; + private short[] triangleColors; @OriginalMember(owner = "client!td", name = "v", descriptor = "[S") private short[] aShortArray76; @@ -71,46 +71,46 @@ public final class GlModel extends Model { private GlVertexBufferObject aClass155_5; @OriginalMember(owner = "client!td", name = "y", descriptor = "[S") - private short[] aShortArray78; + private short[] triangleSources; @OriginalMember(owner = "client!td", name = "z", descriptor = "Lclient!ql;") - private GlBuffer aClass127_1; + private GlBuffer colorBuffer; @OriginalMember(owner = "client!td", name = "A", descriptor = "Lclient!ql;") - private GlBuffer aClass127_2; + private GlBuffer normalsBuffer; @OriginalMember(owner = "client!td", name = "B", descriptor = "[B") - private byte[] aByteArray71; + private byte[] triangleAlpha; @OriginalMember(owner = "client!td", name = "C", descriptor = "Lclient!ql;") - private GlBuffer aClass127_3; + private GlBuffer texCoordBuffer; @OriginalMember(owner = "client!td", name = "E", descriptor = "S") private short aShort28; @OriginalMember(owner = "client!td", name = "F", descriptor = "[B") - private byte[] aByteArray72; + private byte[] triangleBones; @OriginalMember(owner = "client!td", name = "H", descriptor = "[I") public int[] vertexX; @OriginalMember(owner = "client!td", name = "J", descriptor = "[F") - private float[] aFloatArray25; + private float[] vertexS; @OriginalMember(owner = "client!td", name = "K", descriptor = "[[I") - private int[][] anIntArrayArray36; + private int[][] boneVertices; @OriginalMember(owner = "client!td", name = "L", descriptor = "[S") private short[] aShortArray79; @OriginalMember(owner = "client!td", name = "M", descriptor = "[S") - private short[] aShortArray80; + private short[] triangleTextures; @OriginalMember(owner = "client!td", name = "N", descriptor = "[S") private short[] aShortArray81; @OriginalMember(owner = "client!td", name = "O", descriptor = "[[I") - private int[][] anIntArrayArray37; + private int[][] boneTriangles; @OriginalMember(owner = "client!td", name = "P", descriptor = "[S") private short[] aShortArray82; @@ -119,10 +119,10 @@ public final class GlModel extends Model { private short[] aShortArray83; @OriginalMember(owner = "client!td", name = "R", descriptor = "[S") - private short[] aShortArray84; + private short[] vertexSources; @OriginalMember(owner = "client!td", name = "U", descriptor = "Lclient!ae;") - public GlVertexBuffer vertexBuffer; + public GlBoundingBox bounds; @OriginalMember(owner = "client!td", name = "W", descriptor = "[S") private short[] aShortArray85; @@ -131,7 +131,7 @@ public final class GlModel extends Model { private int[] anIntArray462; @OriginalMember(owner = "client!td", name = "Y", descriptor = "Lclient!ql;") - public GlBuffer bounds; + public GlBuffer vertexBuffer; @OriginalMember(owner = "client!td", name = "Z", descriptor = "[I") private int[] anIntArray463; @@ -143,16 +143,16 @@ public final class GlModel extends Model { private GlModel_Class23 aClass23_1; @OriginalMember(owner = "client!td", name = "db", descriptor = "[I") - private int[] anIntArray464; + private int[] vertexBones; @OriginalMember(owner = "client!td", name = "eb", descriptor = "[I") public int[] vertexY; @OriginalMember(owner = "client!td", name = "fb", descriptor = "Lclient!ql;") - private GlBuffer aClass127_5; + private GlBuffer indexBuffer; @OriginalMember(owner = "client!td", name = "gb", descriptor = "[F") - private float[] aFloatArray26; + private float[] vertexT; @OriginalMember(owner = "client!td", name = "hb", descriptor = "[I") public int[] vertexZ; @@ -176,7 +176,7 @@ public final class GlModel extends Model { private byte aByte19 = 0; @OriginalMember(owner = "client!td", name = "lb", descriptor = "I") - private int anInt5297 = 0; + private int triangleCount = 0; @OriginalMember(owner = "client!td", name = "", descriptor = "()V") public GlModel() { @@ -188,18 +188,18 @@ public final class GlModel extends Model { this.anIntArray462 = new int[arg0.vertexCount + 1]; for (@Pc(32) int local32 = 0; local32 < arg0.triangleCount; local32++) { if ((arg0.triangleInfo == null || arg0.triangleInfo[local32] != 2) && (arg0.triangleTextures == null || arg0.triangleTextures[local32] == -1 || !Rasteriser.textureProvider.method3231(arg0.triangleTextures[local32] & 0xFFFF))) { - local23[this.anInt5297++] = local32; + local23[this.triangleCount++] = local32; this.anIntArray462[arg0.triangleVertexA[local32]]++; this.anIntArray462[arg0.triangleVertexB[local32]]++; this.anIntArray462[arg0.triangleVertexC[local32]]++; } } - @Pc(115) long[] local115 = new long[this.anInt5297]; + @Pc(115) long[] local115 = new long[this.triangleCount]; @Pc(117) int local117; @Pc(125) int local125; @Pc(127) int local127; @Pc(226) int local226; - for (local117 = 0; local117 < this.anInt5297; local117++) { + for (local117 = 0; local117 < this.triangleCount; local117++) { local125 = local23[local117]; local127 = 0; @Pc(129) byte local129 = 0; @@ -226,40 +226,40 @@ public final class GlModel extends Model { @Pc(232) int local232 = local226 + (local117 & 0xFFFF); local115[local117] = ((long) local127 << 32) + (long) local232; } - Static173.method3243(local115, local23); + ArrayUtils.sort(local115, local23); this.vertexCount = arg0.vertexCount; this.vertexX = arg0.vertexX; this.vertexY = arg0.vertexY; this.vertexZ = arg0.vertexZ; - this.anIntArray464 = arg0.vertexBones; - this.aShortArray84 = arg0.vertexSources; - local117 = this.anInt5297 * 3; + this.vertexBones = arg0.vertexBones; + this.vertexSources = arg0.vertexSources; + local117 = this.triangleCount * 3; this.aShortArray76 = new short[local117]; this.aShortArray79 = new short[local117]; this.aShortArray85 = new short[local117]; this.aShortArray86 = new short[local117]; - this.aFloatArray25 = new float[local117]; - this.aFloatArray26 = new float[local117]; - this.aShortArray75 = new short[this.anInt5297]; - this.aByteArray71 = new byte[this.anInt5297]; - this.aShortArray77 = new short[this.anInt5297]; - this.aShortArray82 = new short[this.anInt5297]; - this.aShortArray83 = new short[this.anInt5297]; - this.aShortArray80 = new short[this.anInt5297]; + this.vertexS = new float[local117]; + this.vertexT = new float[local117]; + this.triangleColors = new short[this.triangleCount]; + this.triangleAlpha = new byte[this.triangleCount]; + this.aShortArray77 = new short[this.triangleCount]; + this.aShortArray82 = new short[this.triangleCount]; + this.aShortArray83 = new short[this.triangleCount]; + this.triangleTextures = new short[this.triangleCount]; if (arg0.triangleBones != null) { - this.aByteArray72 = new byte[this.anInt5297]; + this.triangleBones = new byte[this.triangleCount]; } - if (arg0.aShortArray22 != null) { - this.aShortArray78 = new short[this.anInt5297]; + if (arg0.triangleSources != null) { + this.triangleSources = new short[this.triangleCount]; } - this.vertexBuffer = new GlVertexBuffer(); - this.bounds = new GlBuffer(); - this.aClass127_1 = new GlBuffer(); + this.bounds = new GlBoundingBox(); + this.vertexBuffer = new GlBuffer(); + this.colorBuffer = new GlBuffer(); if (Preferences.highDetailLighting) { - this.aClass127_2 = new GlBuffer(); + this.normalsBuffer = new GlBuffer(); } - this.aClass127_3 = new GlBuffer(); - this.aClass127_5 = new GlBuffer(); + this.texCoordBuffer = new GlBuffer(); + this.indexBuffer = new GlBuffer(); this.aShort29 = (short) arg1; this.aShort28 = (short) arg2; this.aShortArray81 = new short[local117]; @@ -297,7 +297,7 @@ public final class GlModel extends Model { local454[local459] = Integer.MAX_VALUE; local457[local459] = -2147483647; } - for (local459 = 0; local459 < this.anInt5297; local459++) { + for (local459 = 0; local459 < this.triangleCount; local459++) { @Pc(498) int local498 = local23[local459]; if (arg0.triangleTextureIndex[local498] != -1) { @Pc(511) int local511 = arg0.triangleTextureIndex[local498] & 0xFF; @@ -372,7 +372,7 @@ public final class GlModel extends Model { } @Pc(817) int local817; @Pc(822) short local822; - for (local439 = 0; local439 < this.anInt5297; local439++) { + for (local439 = 0; local439 < this.triangleCount; local439++) { @Pc(810) int local810 = local23[local439]; local817 = arg0.triangleColors[local810] & 0xFFFF; if (arg0.triangleTextures == null) { @@ -621,25 +621,25 @@ public final class GlModel extends Model { this.aShortArray83[local439] = this.method4098(arg0, arg0.triangleVertexC[local810], local2137 + (long) local868, local2096.anInt4769, local2096.anInt4770, local2096.anInt4767, 0, local714, local685); } if (arg0.triangleTextures == null) { - this.aShortArray80[local439] = -1; + this.triangleTextures[local439] = -1; } else { - this.aShortArray80[local439] = arg0.triangleTextures[local810]; + this.triangleTextures[local439] = arg0.triangleTextures[local810]; } - if (this.aByteArray72 != null) { - this.aByteArray72[local439] = (byte) arg0.triangleBones[local810]; + if (this.triangleBones != null) { + this.triangleBones[local439] = (byte) arg0.triangleBones[local810]; } - this.aShortArray75[local439] = arg0.triangleColors[local810]; + this.triangleColors[local439] = arg0.triangleColors[local810]; if (arg0.triangleAlpha != null) { - this.aByteArray71[local439] = arg0.triangleAlpha[local810]; + this.triangleAlpha[local439] = arg0.triangleAlpha[local810]; } - if (arg0.aShortArray22 != null) { - this.aShortArray78[local439] = arg0.aShortArray22[local810]; + if (arg0.triangleSources != null) { + this.triangleSources[local439] = arg0.triangleSources[local810]; } } local439 = 0; @Pc(2271) short local2271 = -10000; - for (local817 = 0; local817 < this.anInt5297; local817++) { - local822 = this.aShortArray80[local817]; + for (local817 = 0; local817 < this.triangleCount; local817++) { + local822 = this.triangleTextures[local817]; if (local822 != local2271) { local439++; local2271 = local822; @@ -648,21 +648,21 @@ public final class GlModel extends Model { this.anIntArray463 = new int[local439 + 1]; local439 = 0; local2271 = -10000; - for (local817 = 0; local817 < this.anInt5297; local817++) { - local822 = this.aShortArray80[local817]; + for (local817 = 0; local817 < this.triangleCount; local817++) { + local822 = this.triangleTextures[local817]; if (local822 != local2271) { this.anIntArray463[local439++] = local817; local2271 = local822; } } - this.anIntArray463[local439] = this.anInt5297; + this.anIntArray463[local439] = this.triangleCount; aLongArray10 = null; - this.aShortArray76 = method4119(this.aShortArray76, this.anInt5296); - this.aShortArray79 = method4119(this.aShortArray79, this.anInt5296); - this.aShortArray85 = method4119(this.aShortArray85, this.anInt5296); - this.aShortArray86 = method4119(this.aShortArray86, this.anInt5296); - this.aFloatArray25 = method4112(this.aFloatArray25, this.anInt5296); - this.aFloatArray26 = method4112(this.aFloatArray26, this.anInt5296); + this.aShortArray76 = ArrayUtils.copyOf(this.aShortArray76, this.anInt5296); + this.aShortArray79 = ArrayUtils.copyOf(this.aShortArray79, this.anInt5296); + this.aShortArray85 = ArrayUtils.copyOf(this.aShortArray85, this.anInt5296); + this.aShortArray86 = ArrayUtils.copyOf(this.aShortArray86, this.anInt5296); + this.vertexS = ArrayUtils.copyOf(this.vertexS, this.anInt5296); + this.vertexT = ArrayUtils.copyOf(this.vertexT, this.anInt5296); } @OriginalMember(owner = "client!td", name = "a", descriptor = "(FFF)I") @@ -888,20 +888,6 @@ public final class GlModel extends Model { aFloat24 = local89; } - @OriginalMember(owner = "client!td", name = "a", descriptor = "([FI)[F") - public static float[] method4112(@OriginalArg(0) float[] arg0, @OriginalArg(1) int arg1) { - @Pc(2) float[] local2 = new float[arg1]; - ArrayUtils.copy(arg0, 0, local2, 0, arg1); - return local2; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "([SI)[S") - public static short[] method4119(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1) { - @Pc(2) short[] local2 = new short[arg1]; - ArrayUtils.copy(arg0, 0, local2, 0, arg1); - return local2; - } - @OriginalMember(owner = "client!td", name = "v", descriptor = "()V") public static void method4120() { aClass8_Sub1_Sub1_1 = new GlModel(); @@ -912,17 +898,6 @@ public final class GlModel extends Model { aClass8_Sub1_Sub1_6 = new GlModel(); } - @OriginalMember(owner = "client!vg", name = "a", descriptor = "(I[S)[S") - public static short[] method4511(@OriginalArg(1) short[] arg0) { - if (arg0 == null) { - return null; - } else { - @Pc(19) short[] local19 = new short[arg0.length]; - ArrayUtils.copy(arg0, 0, local19, 0, arg0.length); - return local19; - } - } - @OriginalMember(owner = "client!td", name = "a", descriptor = "(ZZZ)Lclient!ak;") @Override public final Model method4560(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2) { @@ -935,12 +910,12 @@ public final class GlModel extends Model { if (this.anInt5296 == 0) { return; } - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - @Pc(13) short local13 = this.vertexBuffer.aShort4; - @Pc(17) short local17 = this.vertexBuffer.aShort2; - @Pc(21) short local21 = this.vertexBuffer.aShort3; + @Pc(13) short local13 = this.bounds.cylinderRadius; + @Pc(17) short local17 = this.bounds.minY; + @Pc(21) short local21 = this.bounds.maxY; @Pc(31) int local31 = arg7 * arg4 - arg5 * arg3 >> 16; @Pc(41) int local41 = arg6 * arg1 + local31 * arg2 >> 16; @Pc(53) int local53 = local41 + (local13 * arg2 + local21 * arg1 >> 16); @@ -994,15 +969,15 @@ public final class GlModel extends Model { local206 = local153 / local70; local210 = local132 / local53; } - if (anInt3582 >= local187 && anInt3582 <= local191 && Static34.anInt1053 >= local206 && Static34.anInt1053 <= local210) { + if (anInt3582 >= local187 && anInt3582 <= local191 && RawModel.anInt1053 >= local206 && RawModel.anInt1053 <= local210) { local187 = 999999; local191 = -999999; local206 = 999999; local210 = -999999; - @Pc(243) short local243 = this.vertexBuffer.aShort6; - @Pc(247) short local247 = this.vertexBuffer.aShort5; - @Pc(251) short local251 = this.vertexBuffer.aShort8; - @Pc(255) short local255 = this.vertexBuffer.aShort7; + @Pc(243) short local243 = this.bounds.minX; + @Pc(247) short local247 = this.bounds.maxX; + @Pc(251) short local251 = this.bounds.minZ; + @Pc(255) short local255 = this.bounds.maxZ; @Pc(290) int[] local290 = new int[]{local243, local247, local243, local247, local243, local247, local243, local247}; @Pc(325) int[] local325 = new int[]{local251, local251, local255, local255, local251, local251, local255, local255}; @Pc(360) int[] local360 = new int[]{local17, local17, local17, local17, local21, local21, local21, local21}; @@ -1047,7 +1022,7 @@ public final class GlModel extends Model { } } } - if (anInt3582 >= local187 && anInt3582 <= local191 && Static34.anInt1053 >= local206 && Static34.anInt1053 <= local210) { + if (anInt3582 >= local187 && anInt3582 <= local191 && RawModel.anInt1053 >= local206 && RawModel.anInt1053 <= local210) { if (this.aBoolean303) { Model.aLongArray11[MiniMenu.anInt7++] = arg8; } else { @@ -1061,13 +1036,13 @@ public final class GlModel extends Model { if (local362 >= this.vertexCount) { local362 = 0; while (true) { - if (local362 >= this.anInt5297) { + if (local362 >= this.triangleCount) { break label118; } @Pc(698) short local698 = this.aShortArray77[local362]; @Pc(703) short local703 = this.aShortArray82[local362]; @Pc(708) short local708 = this.aShortArray83[local362]; - if (this.method4118(anInt3582, Static34.anInt1053, anIntArray467[local698], anIntArray467[local703], anIntArray467[local708], anIntArray468[local698], anIntArray468[local703], anIntArray468[local708])) { + if (this.method4118(anInt3582, RawModel.anInt1053, anIntArray467[local698], anIntArray467[local703], anIntArray467[local708], anIntArray468[local698], anIntArray468[local703], anIntArray468[local708])) { Model.aLongArray11[MiniMenu.anInt7++] = arg8; break label118; } @@ -1138,10 +1113,10 @@ public final class GlModel extends Model { this.aShortArray85[local7] = this.aShortArray76[local7]; this.aShortArray76[local7] = (short) -local43; } - this.vertexBuffer.valid = false; this.bounds.valid = false; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + this.vertexBuffer.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } @@ -1160,26 +1135,26 @@ public final class GlModel extends Model { this.vertexY[local9] = this.vertexY[local9] * local7 - this.vertexX[local9] * local3 >> 16; this.vertexX[local9] = local29; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "g", descriptor = "()I") @Override public final int getMaxX() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort5; + return this.bounds.maxX; } @OriginalMember(owner = "client!td", name = "c", descriptor = "()I") @Override public final int getMaxZ() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort7; + return this.bounds.maxZ; } @OriginalMember(owner = "client!td", name = "a", descriptor = "()Z") @@ -1191,10 +1166,10 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "k", descriptor = "()I") @Override public final int getMinZ() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort8; + return this.bounds.minZ; } @OriginalMember(owner = "client!td", name = "c", descriptor = "(III)V") @@ -1205,8 +1180,8 @@ public final class GlModel extends Model { this.vertexY[local1] += arg1; this.vertexZ[local1] += arg2; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "b", descriptor = "(ZZZ)Lclient!ak;") @@ -1219,7 +1194,7 @@ public final class GlModel extends Model { @Override public final void method4544(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) boolean arg4) { @Pc(2) GlModel local2 = (GlModel) arg0; - if (this.anInt5297 == 0 || local2.anInt5297 == 0) { + if (this.triangleCount == 0 || local2.triangleCount == 0) { return; } @Pc(12) int local12 = local2.vertexCount; @@ -1262,15 +1237,15 @@ public final class GlModel extends Model { } @Pc(92) int[] local92 = local2.anIntArray462; @Pc(95) short[] local95 = local2.aShortArray81; - if (!local2.vertexBuffer.valid) { - local2.method4108(); + if (!local2.bounds.valid) { + local2.calculateBounds(); } - @Pc(105) short local105 = local2.vertexBuffer.aShort2; - @Pc(109) short local109 = local2.vertexBuffer.aShort3; - @Pc(113) short local113 = local2.vertexBuffer.aShort6; - @Pc(117) short local117 = local2.vertexBuffer.aShort5; - @Pc(121) short local121 = local2.vertexBuffer.aShort8; - @Pc(125) short local125 = local2.vertexBuffer.aShort7; + @Pc(105) short local105 = local2.bounds.minY; + @Pc(109) short local109 = local2.bounds.maxY; + @Pc(113) short local113 = local2.bounds.minX; + @Pc(117) short local117 = local2.bounds.maxX; + @Pc(121) short local121 = local2.bounds.minZ; + @Pc(125) short local125 = local2.bounds.maxZ; for (@Pc(127) int local127 = 0; local127 < this.vertexCount; local127++) { @Pc(138) int local138 = this.vertexY[local127] - arg2; if (local138 >= local105 && local138 <= local109) { @@ -1303,17 +1278,17 @@ public final class GlModel extends Model { if (local237 != -1) { if (local40 == null) { this.aClass23_1 = new GlModel_Class23(); - local40 = this.aClass23_1.aShortArray8 = method4511(this.aShortArray76); - local44 = this.aClass23_1.aShortArray10 = method4511(this.aShortArray79); - local48 = this.aClass23_1.aShortArray9 = method4511(this.aShortArray85); - local52 = this.aClass23_1.aShortArray7 = method4511(this.aShortArray86); + local40 = this.aClass23_1.aShortArray8 = ArrayUtils.copyOfNullable(this.aShortArray76); + local44 = this.aClass23_1.aShortArray10 = ArrayUtils.copyOfNullable(this.aShortArray79); + local48 = this.aClass23_1.aShortArray9 = ArrayUtils.copyOfNullable(this.aShortArray85); + local52 = this.aClass23_1.aShortArray7 = ArrayUtils.copyOfNullable(this.aShortArray86); } if (local68 == null) { @Pc(325) GlModel_Class23 local325 = local2.aClass23_1 = new GlModel_Class23(); - local68 = local325.aShortArray8 = method4511(local24); - local72 = local325.aShortArray10 = method4511(local27); - local76 = local325.aShortArray9 = method4511(local30); - local80 = local325.aShortArray7 = method4511(local33); + local68 = local325.aShortArray8 = ArrayUtils.copyOfNullable(local24); + local72 = local325.aShortArray10 = ArrayUtils.copyOfNullable(local27); + local76 = local325.aShortArray9 = ArrayUtils.copyOfNullable(local30); + local80 = local325.aShortArray7 = ArrayUtils.copyOfNullable(local33); } @Pc(358) short local358 = this.aShortArray76[local175]; @Pc(363) short local363 = this.aShortArray79[local175]; @@ -1406,8 +1381,8 @@ public final class GlModel extends Model { this.aShortArray79[this.anInt5296] = (short) arg4; this.aShortArray85[this.anInt5296] = (short) arg5; this.aShortArray86[this.anInt5296] = (short) arg6; - this.aFloatArray25[this.anInt5296] = arg7; - this.aFloatArray26[this.anInt5296] = arg8; + this.vertexS[this.anInt5296] = arg7; + this.vertexT[this.anInt5296] = arg8; return (short) this.anInt5296++; } @@ -1421,8 +1396,8 @@ public final class GlModel extends Model { this.vertexZ[local9] = this.vertexZ[local9] * local7 - this.vertexX[local9] * local3 >> 16; this.vertexX[local9] = local29; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "a", descriptor = "(I[IIIIZI[I)V") @@ -1444,11 +1419,11 @@ public final class GlModel extends Model { anInt5299 = 0; for (local26 = 0; local26 < local2; local26++) { local33 = arg1[local26]; - if (local33 < this.anIntArrayArray36.length) { - @Pc(43) int[] local43 = this.anIntArrayArray36[local33]; + if (local33 < this.boneVertices.length) { + @Pc(43) int[] local43 = this.boneVertices[local33]; for (local45 = 0; local45 < local43.length; local45++) { local53 = local43[local45]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local53]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local53]) != 0) { anInt5298 += this.vertexX[local53]; anInt5300 += this.vertexY[local53]; anInt5299 += this.vertexZ[local53]; @@ -1485,11 +1460,11 @@ public final class GlModel extends Model { arg4 <<= 0x4; for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local228 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local228 = this.boneVertices[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local45]) != 0) { this.vertexX[local45] += arg2; this.vertexY[local45] += arg3; this.vertexZ[local45] += arg4; @@ -1525,11 +1500,11 @@ public final class GlModel extends Model { if (arg7 == null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local228 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local228 = this.boneVertices[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local45]) != 0) { this.vertexX[local45] -= anInt5298; this.vertexY[local45] -= anInt5300; this.vertexZ[local45] -= anInt5299; @@ -1564,11 +1539,11 @@ public final class GlModel extends Model { if (arg5 && this.aShortArray76 != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local228 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local228 = this.boneVertices[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local45]) != 0) { local53 = this.anIntArray462[local45]; local343 = this.anIntArray462[local45 + 1]; for (local365 = local53; local365 < local343; local365++) { @@ -1602,8 +1577,8 @@ public final class GlModel extends Model { } } } - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } } else { @@ -1683,11 +1658,11 @@ public final class GlModel extends Model { local801 += local33; for (local803 = 0; local803 < local2; local803++) { local929 = arg1[local803]; - if (local929 < this.anIntArrayArray36.length) { - @Pc(939) int[] local939 = this.anIntArrayArray36[local929]; + if (local929 < this.boneVertices.length) { + @Pc(939) int[] local939 = this.boneVertices[local929]; for (@Pc(941) int local941 = 0; local941 < local939.length; local941++) { @Pc(949) int local949 = local939[local941]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local949]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local949]) != 0) { @Pc(991) int local991 = local789[0] * this.vertexX[local949] + local789[1] * this.vertexY[local949] + local789[2] * this.vertexZ[local949] + 16384 >> 15; @Pc(1022) int local1022 = local789[3] * this.vertexX[local949] + local789[4] * this.vertexY[local949] + local789[5] * this.vertexZ[local949] + 16384 >> 15; @Pc(1053) int local1053 = local789[6] * this.vertexX[local949] + local789[7] * this.vertexY[local949] + local789[8] * this.vertexZ[local949] + 16384 >> 15; @@ -1706,11 +1681,11 @@ public final class GlModel extends Model { if (arg7 == null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local228 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local228 = this.boneVertices[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local45]) != 0) { this.vertexX[local45] -= anInt5298; this.vertexY[local45] -= anInt5300; this.vertexZ[local45] -= anInt5299; @@ -1778,11 +1753,11 @@ public final class GlModel extends Model { local657 += local33; for (local662 = 0; local662 < local2; local662++) { local667 = arg1[local662]; - if (local667 < this.anIntArrayArray36.length) { - local789 = this.anIntArrayArray36[local667]; + if (local667 < this.boneVertices.length) { + local789 = this.boneVertices[local667]; for (local791 = 0; local791 < local789.length; local791++) { local796 = local789[local791]; - if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local796]) != 0) { + if (this.vertexSources == null || (arg6 & this.vertexSources[local796]) != 0) { local801 = local1930[0] * this.vertexX[local796] + local1930[1] * this.vertexY[local796] + local1930[2] * this.vertexZ[local796] + 16384 >> 15; local803 = local1930[3] * this.vertexX[local796] + local1930[4] * this.vertexY[local796] + local1930[5] * this.vertexZ[local796] + 16384 >> 15; local929 = local1930[6] * this.vertexX[local796] + local1930[7] * this.vertexY[local796] + local1930[8] * this.vertexZ[local796] + 16384 >> 15; @@ -1798,38 +1773,38 @@ public final class GlModel extends Model { } } } else if (arg0 == 5) { - if (this.anIntArrayArray37 != null && this.aByteArray71 != null) { + if (this.boneTriangles != null && this.triangleAlpha != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray37.length) { - local228 = this.anIntArrayArray37[local26]; + if (local26 < this.boneTriangles.length) { + local228 = this.boneTriangles[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray78 == null || (arg6 & this.aShortArray78[local45]) != 0) { - local53 = (this.aByteArray71[local45] & 0xFF) + arg2 * 8; + if (this.triangleSources == null || (arg6 & this.triangleSources[local45]) != 0) { + local53 = (this.triangleAlpha[local45] & 0xFF) + arg2 * 8; if (local53 < 0) { local53 = 0; } else if (local53 > 255) { local53 = 255; } - this.aByteArray71[local45] = (byte) local53; + this.triangleAlpha[local45] = (byte) local53; } } if (local228.length > 0) { - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } } } - } else if (arg0 == 7 && this.anIntArrayArray37 != null) { + } else if (arg0 == 7 && this.boneTriangles != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray37.length) { - local228 = this.anIntArrayArray37[local26]; + if (local26 < this.boneTriangles.length) { + local228 = this.boneTriangles[local26]; for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; - if (this.aShortArray78 == null || (arg6 & this.aShortArray78[local45]) != 0) { - local53 = this.aShortArray75[local45] & 0xFFFF; + if (this.triangleSources == null || (arg6 & this.triangleSources[local45]) != 0) { + local53 = this.triangleColors[local45] & 0xFFFF; local343 = local53 >> 10 & 0x3F; local365 = local53 >> 7 & 0x7; local387 = local53 & 0x7F; @@ -1846,11 +1821,11 @@ public final class GlModel extends Model { } else if (local387 > 127) { local387 = 127; } - this.aShortArray75[local45] = (short) (local2518 << 10 | local365 << 7 | local387); + this.triangleColors[local45] = (short) (local2518 << 10 | local365 << 7 | local387); } } if (local228.length > 0) { - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } } @@ -1860,10 +1835,10 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "b", descriptor = "()I") @Override public final int getMinY() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort2; + return this.bounds.minY; } @OriginalMember(owner = "client!td", name = "o", descriptor = "()V") @@ -1873,58 +1848,58 @@ public final class GlModel extends Model { @Pc(24) int local24; @Pc(9) int local9; @Pc(20) int local20; - if (this.anIntArray464 != null) { + if (this.vertexBones != null) { local5 = new int[256]; local7 = 0; for (local9 = 0; local9 < this.vertexCount; local9++) { - local20 = this.anIntArray464[local9] & 0xFF; + local20 = this.vertexBones[local9] & 0xFF; local24 = local5[local20]++; if (local20 > local7) { local7 = local20; } } - this.anIntArrayArray36 = new int[local7 + 1][]; + this.boneVertices = new int[local7 + 1][]; for (local9 = 0; local9 <= local7; local9++) { - this.anIntArrayArray36[local9] = new int[local5[local9]]; + this.boneVertices[local9] = new int[local5[local9]]; local5[local9] = 0; } local9 = 0; while (local9 < this.vertexCount) { - local20 = this.anIntArray464[local9] & 0xFF; - this.anIntArrayArray36[local20][local5[local20]++] = local9++; + local20 = this.vertexBones[local9] & 0xFF; + this.boneVertices[local20][local5[local20]++] = local9++; } - this.anIntArray464 = null; + this.vertexBones = null; } - if (this.aByteArray72 == null) { + if (this.triangleBones == null) { return; } local5 = new int[256]; local7 = 0; - for (local9 = 0; local9 < this.anInt5297; local9++) { - local20 = this.aByteArray72[local9] & 0xFF; + for (local9 = 0; local9 < this.triangleCount; local9++) { + local20 = this.triangleBones[local9] & 0xFF; local24 = local5[local20]++; if (local20 > local7) { local7 = local20; } } - this.anIntArrayArray37 = new int[local7 + 1][]; + this.boneTriangles = new int[local7 + 1][]; for (local9 = 0; local9 <= local7; local9++) { - this.anIntArrayArray37[local9] = new int[local5[local9]]; + this.boneTriangles[local9] = new int[local5[local9]]; local5[local9] = 0; } local9 = 0; - while (local9 < this.anInt5297) { - local20 = this.aByteArray72[local9] & 0xFF; - this.anIntArrayArray37[local20][local5[local20]++] = local9++; + while (local9 < this.triangleCount) { + local20 = this.triangleBones[local9] & 0xFF; + this.boneTriangles[local20][local5[local20]++] = local9++; } - this.aByteArray72 = null; + this.triangleBones = null; } @OriginalMember(owner = "client!td", name = "e", descriptor = "(I)V") public final void method4100(@OriginalArg(0) int arg0) { this.aShort28 = (short) arg0; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } @@ -1943,10 +1918,10 @@ public final class GlModel extends Model { this.aShortArray76[local7] = (short) -this.aShortArray76[local7]; this.aShortArray85[local7] = (short) -this.aShortArray85[local7]; } - this.vertexBuffer.valid = false; this.bounds.valid = false; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + this.vertexBuffer.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } @@ -1958,8 +1933,8 @@ public final class GlModel extends Model { this.vertexY[local1] = this.vertexY[local1] * arg1 >> 7; this.vertexZ[local1] = this.vertexZ[local1] * arg2 >> 7; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "c", descriptor = "(ZZZ)Lclient!ak;") @@ -1975,58 +1950,58 @@ public final class GlModel extends Model { this.vertexX[local1] = -this.vertexX[local1]; this.vertexZ[local1] = -this.vertexZ[local1]; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "q", descriptor = "()V") private void method4103() { - if (aClass3_Sub15_8.data.length < this.anInt5296 * 12) { - aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * 12); + if (tempBuffer.data.length < this.anInt5296 * 12) { + tempBuffer = new Buffer((this.anInt5296 + 100) * 12); } else { - aClass3_Sub15_8.offset = 0; + tempBuffer.offset = 0; } @Pc(25) int local25; if (GlRenderer.bigEndian) { - for (local25 = 0; local25 < this.anInt5297; local25++) { - aClass3_Sub15_8.p4(this.aShortArray77[local25]); - aClass3_Sub15_8.p4(this.aShortArray82[local25]); - aClass3_Sub15_8.p4(this.aShortArray83[local25]); + for (local25 = 0; local25 < this.triangleCount; local25++) { + tempBuffer.p4(this.aShortArray77[local25]); + tempBuffer.p4(this.aShortArray82[local25]); + tempBuffer.p4(this.aShortArray83[local25]); } } else { - for (local25 = 0; local25 < this.anInt5297; local25++) { - aClass3_Sub15_8.ip4(this.aShortArray77[local25]); - aClass3_Sub15_8.ip4(this.aShortArray82[local25]); - aClass3_Sub15_8.ip4(this.aShortArray83[local25]); + for (local25 = 0; local25 < this.triangleCount; local25++) { + tempBuffer.ip4(this.aShortArray77[local25]); + tempBuffer.ip4(this.aShortArray82[local25]); + tempBuffer.ip4(this.aShortArray83[local25]); } } if (!GlRenderer.arbVboSupported) { - @Pc(115) ByteBuffer local115 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset); - local115.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); + @Pc(115) ByteBuffer local115 = ByteBuffer.allocateDirect(tempBuffer.offset); + local115.put(tempBuffer.data, 0, tempBuffer.offset); local115.flip(); - this.aClass127_5.valid = true; - this.aClass127_5.aByteBuffer8 = local115; - this.aClass127_5.aClass155_4 = null; + this.indexBuffer.valid = true; + this.indexBuffer.buffer = local115; + this.indexBuffer.vbo = null; return; } - @Pc(88) GlVertexBufferObject local88 = new GlVertexBufferObject(); - @Pc(95) ByteBuffer local95 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); - local88.method4519(local95); - this.aClass127_5.valid = true; - this.aClass127_5.aByteBuffer8 = null; - this.aClass127_5.aClass155_4 = local88; + @Pc(88) GlVertexBufferObject vbo = new GlVertexBufferObject(); + @Pc(95) ByteBuffer buffer = ByteBuffer.wrap(tempBuffer.data, 0, tempBuffer.offset); + vbo.setArrayBuffer(buffer); + this.indexBuffer.valid = true; + this.indexBuffer.buffer = null; + this.indexBuffer.vbo = vbo; } @OriginalMember(owner = "client!td", name = "f", descriptor = "(I)V") public final void method4105(@OriginalArg(0) int arg0) { this.aShort29 = (short) arg0; - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "d", descriptor = "()Z") @Override protected final boolean method4551() { - if (this.anIntArrayArray36 == null) { + if (this.boneVertices == null) { return false; } for (@Pc(6) int local6 = 0; local6 < this.vertexCount; local6++) { @@ -2043,9 +2018,9 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "a", descriptor = "(SS)V") public final void method4107(@OriginalArg(0) short arg0, @OriginalArg(1) short arg1) { @Pc(1) int local1; - for (local1 = 0; local1 < this.anInt5297; local1++) { - if (this.aShortArray80[local1] == arg0) { - this.aShortArray80[local1] = arg1; + for (local1 = 0; local1 < this.triangleCount; local1++) { + if (this.triangleTextures[local1] == arg0) { + this.triangleTextures[local1] = arg1; } } local1 = 0; @@ -2061,81 +2036,81 @@ public final class GlModel extends Model { local43 = Rasteriser.textureProvider.method3229(arg1 & 0xFFFF); } if (local1 != local41 || local22 != local43) { - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } @OriginalMember(owner = "client!td", name = "s", descriptor = "()V") - private void method4108() { - @Pc(1) int local1 = 32767; - @Pc(3) int local3 = 32767; - @Pc(5) int local5 = 32767; - @Pc(7) int local7 = -32768; - @Pc(9) int local9 = -32768; - @Pc(11) int local11 = -32768; - @Pc(13) int local13 = 0; - @Pc(15) int local15 = 0; - for (@Pc(17) int local17 = 0; local17 < this.vertexCount; local17++) { - @Pc(26) int local26 = this.vertexX[local17]; - @Pc(31) int local31 = this.vertexY[local17]; - @Pc(36) int local36 = this.vertexZ[local17]; - if (local26 < local1) { - local1 = local26; + private void calculateBounds() { + @Pc(1) int minX = 32767; + @Pc(3) int minY = 32767; + @Pc(5) int minZ = 32767; + @Pc(7) int maxX = -32768; + @Pc(9) int maxY = -32768; + @Pc(11) int maxZ = -32768; + @Pc(13) int maxCylinderRadiusSquared = 0; + @Pc(15) int maxSphereRadiusSquared = 0; + for (@Pc(17) int i = 0; i < this.vertexCount; i++) { + @Pc(26) int x = this.vertexX[i]; + @Pc(31) int y = this.vertexY[i]; + @Pc(36) int z = this.vertexZ[i]; + if (x < minX) { + minX = x; } - if (local26 > local7) { - local7 = local26; + if (x > maxX) { + maxX = x; } - if (local31 < local3) { - local3 = local31; + if (y < minY) { + minY = y; } - if (local31 > local9) { - local9 = local31; + if (y > maxY) { + maxY = y; } - if (local36 < local5) { - local5 = local36; + if (z < minZ) { + minZ = z; } - if (local36 > local11) { - local11 = local36; + if (z > maxZ) { + maxZ = z; } - @Pc(74) int local74 = local26 * local26 + local36 * local36; - if (local74 > local13) { - local13 = local74; + @Pc(74) int cylinderRadiusSquared = x * x + z * z; + if (cylinderRadiusSquared > maxCylinderRadiusSquared) { + maxCylinderRadiusSquared = cylinderRadiusSquared; } - local74 = local26 * local26 + local36 * local36 + local31 * local31; - if (local74 > local15) { - local15 = local74; + int sphereRadiusSquared = x * x + z * z + y * y; + if (sphereRadiusSquared > maxSphereRadiusSquared) { + maxSphereRadiusSquared = sphereRadiusSquared; } } - this.vertexBuffer.aShort6 = (short) local1; - this.vertexBuffer.aShort5 = (short) local7; - this.vertexBuffer.aShort2 = (short) local3; - this.vertexBuffer.aShort3 = (short) local9; - this.vertexBuffer.aShort8 = (short) local5; - this.vertexBuffer.aShort7 = (short) local11; - this.vertexBuffer.aShort4 = (short) (Math.sqrt(local13) + 0.99D); - Math.sqrt(local15); - this.vertexBuffer.valid = true; + this.bounds.minX = (short) minX; + this.bounds.maxX = (short) maxX; + this.bounds.minY = (short) minY; + this.bounds.maxY = (short) maxY; + this.bounds.minZ = (short) minZ; + this.bounds.maxZ = (short) maxZ; + this.bounds.cylinderRadius = (short) (Math.sqrt(maxCylinderRadiusSquared) + 0.99D); + Math.sqrt(maxSphereRadiusSquared); + this.bounds.valid = true; } @OriginalMember(owner = "client!td", name = "b", descriptor = "(SS)V") public final void method4109(@OriginalArg(0) short arg0, @OriginalArg(1) short arg1) { - for (@Pc(1) int local1 = 0; local1 < this.anInt5297; local1++) { - if (this.aShortArray75[local1] == arg0) { - this.aShortArray75[local1] = arg1; + for (@Pc(1) int local1 = 0; local1 < this.triangleCount; local1++) { + if (this.triangleColors[local1] == arg0) { + this.triangleColors[local1] = arg1; } } - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "a", descriptor = "(IILclient!td;[[I[[IIII)V") public final void method4110(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) GlModel arg2, @OriginalArg(3) int[][] arg3, @OriginalArg(4) int[][] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7) { - if (!arg2.vertexBuffer.valid) { - arg2.method4108(); + if (!arg2.bounds.valid) { + arg2.calculateBounds(); } - @Pc(11) int local11 = arg5 + arg2.vertexBuffer.aShort6; - @Pc(17) int local17 = arg5 + arg2.vertexBuffer.aShort5; - @Pc(23) int local23 = arg7 + arg2.vertexBuffer.aShort8; - @Pc(29) int local29 = arg7 + arg2.vertexBuffer.aShort7; + @Pc(11) int local11 = arg5 + arg2.bounds.minX; + @Pc(17) int local17 = arg5 + arg2.bounds.maxX; + @Pc(23) int local23 = arg7 + arg2.bounds.minZ; + @Pc(29) int local29 = arg7 + arg2.bounds.maxZ; if ((arg0 == 1 || arg0 == 2 || arg0 == 3 || arg0 == 5) && (local11 < 0 || local17 + 128 >> 7 >= arg3.length || local23 < 0 || local29 + 128 >> 7 >= arg3[0].length)) { return; } @@ -2182,7 +2157,7 @@ public final class GlModel extends Model { @Pc(362) int local362; @Pc(374) int local374; if (arg0 == 2) { - @Pc(266) short local266 = arg2.vertexBuffer.aShort2; + @Pc(266) short local266 = arg2.bounds.minY; for (local161 = 0; local161 < this.vertexCount; local161++) { local168 = (this.vertexY[local161] << 16) / local266; if (local168 < arg1) { @@ -2203,7 +2178,7 @@ public final class GlModel extends Model { local161 = (arg1 >> 8 & 0xFF) * 4; this.method4573(arg3, arg5, arg6, arg7, local150, local161); } else if (arg0 == 4) { - local150 = arg2.vertexBuffer.aShort3 - arg2.vertexBuffer.aShort2; + local150 = arg2.bounds.maxY - arg2.bounds.minY; for (local161 = 0; local161 < this.vertexCount; local161++) { local168 = this.vertexX[local161] + arg5; local172 = this.vertexZ[local161] + arg7; @@ -2217,7 +2192,7 @@ public final class GlModel extends Model { this.vertexY[local161] = this.vertexY[local161] + local362 + local150 - arg6; } } else if (arg0 == 5) { - local150 = arg2.vertexBuffer.aShort3 - arg2.vertexBuffer.aShort2; + local150 = arg2.bounds.maxY - arg2.bounds.minY; for (local161 = 0; local161 < this.vertexCount; local161++) { local168 = this.vertexX[local161] + arg5; local172 = this.vertexZ[local161] + arg7; @@ -2236,8 +2211,8 @@ public final class GlModel extends Model { } } } - this.bounds.valid = false; this.vertexBuffer.valid = false; + this.bounds.valid = false; } @OriginalMember(owner = "client!td", name = "a", descriptor = "(ZZZZZZZ)V") @@ -2246,16 +2221,16 @@ public final class GlModel extends Model { throw new IllegalArgumentException(); } else if (this.anInt5296 != 0) { if (arg5) { - @Pc(26) boolean local26 = !this.aClass127_1.valid && (arg1 || arg2 && !Preferences.highDetailLighting); - this.method4113(false, !this.bounds.valid && arg0, local26, this.aClass127_2 != null && !this.aClass127_2.valid && arg2, !this.aClass127_3.valid); - if (!this.aClass127_5.valid && arg3 && arg1) { + @Pc(26) boolean local26 = !this.colorBuffer.valid && (arg1 || arg2 && !Preferences.highDetailLighting); + this.method4113(false, !this.vertexBuffer.valid && arg0, local26, this.normalsBuffer != null && !this.normalsBuffer.valid && arg2, !this.texCoordBuffer.valid); + if (!this.indexBuffer.valid && arg3 && arg1) { this.method4103(); } } if (arg0) { - if (this.bounds.valid) { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (this.vertexBuffer.valid) { + if (!this.bounds.valid) { + this.calculateBounds(); } this.vertexX = null; this.vertexY = null; @@ -2267,15 +2242,15 @@ public final class GlModel extends Model { } } if (arg1) { - if (this.aClass127_1.valid) { - this.aShortArray75 = null; - this.aByteArray71 = null; + if (this.colorBuffer.valid) { + this.triangleColors = null; + this.triangleAlpha = null; } else { this.aByte19 = (byte) (this.aByte19 | 0x2); } } if (arg2 && Preferences.highDetailLighting) { - if (this.aClass127_2.valid) { + if (this.normalsBuffer.valid) { this.aShortArray76 = null; this.aShortArray79 = null; this.aShortArray85 = null; @@ -2284,14 +2259,14 @@ public final class GlModel extends Model { this.aByte19 = (byte) (this.aByte19 | 0x4); } } - if (this.aClass127_3.valid) { - this.aFloatArray25 = null; - this.aFloatArray26 = null; + if (this.texCoordBuffer.valid) { + this.vertexS = null; + this.vertexT = null; } else { this.aByte19 = (byte) (this.aByte19 | 0x8); } if (arg3 && arg1) { - if (this.aClass127_5.valid && this.aClass127_1.valid) { + if (this.indexBuffer.valid && this.colorBuffer.valid) { this.aShortArray77 = null; this.aShortArray82 = null; this.aShortArray83 = null; @@ -2300,40 +2275,40 @@ public final class GlModel extends Model { } } if (arg4) { - this.anIntArray464 = null; - this.aByteArray72 = null; - this.anIntArrayArray36 = null; - this.anIntArrayArray37 = null; + this.vertexBones = null; + this.triangleBones = null; + this.boneVertices = null; + this.boneTriangles = null; } } } @OriginalMember(owner = "client!td", name = "a", descriptor = "(ZZZZZ)V") private void method4113(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) boolean arg3, @OriginalArg(4) boolean arg4) { - @Pc(1) int local1 = 0; + @Pc(1) int stride = 0; if (arg1) { - this.bounds.anInt4777 = 0; - local1 += 12; + this.vertexBuffer.pointer = 0; + stride += 12; } if (arg2) { - this.aClass127_1.anInt4777 = local1; - local1 += 4; + this.colorBuffer.pointer = stride; + stride += 4; } if (arg3) { - this.aClass127_2.anInt4777 = local1; - local1 += 12; + this.normalsBuffer.pointer = stride; + stride += 12; } if (arg4) { - this.aClass127_3.anInt4777 = local1; - local1 += 8; + this.texCoordBuffer.pointer = stride; + stride += 8; } - if (local1 == 0) { + if (stride == 0) { return; } - if (aClass3_Sub15_8.data.length < this.anInt5296 * local1) { - aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * local1); + if (tempBuffer.data.length < this.anInt5296 * stride) { + tempBuffer = new Buffer((this.anInt5296 + 100) * stride); } else { - aClass3_Sub15_8.offset = 0; + tempBuffer.offset = 0; } @Pc(60) int local60; @Pc(71) int local71; @@ -2356,10 +2331,10 @@ public final class GlModel extends Model { if (local109 == -1) { break; } - aClass3_Sub15_8.offset = local109 * local1; - aClass3_Sub15_8.p4(local71); - aClass3_Sub15_8.p4(local78); - aClass3_Sub15_8.p4(local85); + tempBuffer.offset = local109 * stride; + tempBuffer.p4(local71); + tempBuffer.p4(local78); + tempBuffer.p4(local85); } } } else { @@ -2374,24 +2349,24 @@ public final class GlModel extends Model { if (local109 == -1) { break; } - aClass3_Sub15_8.offset = local109 * local1; - aClass3_Sub15_8.ip4(local71); - aClass3_Sub15_8.ip4(local78); - aClass3_Sub15_8.ip4(local85); + tempBuffer.offset = local109 * stride; + tempBuffer.ip4(local71); + tempBuffer.ip4(local78); + tempBuffer.ip4(local85); } } } } if (arg2) { if (Preferences.highDetailLighting) { - for (local60 = 0; local60 < this.anInt5297; local60++) { - local71 = method4096(this.aShortArray75[local60], this.aShortArray80[local60], this.aShort29, this.aByteArray71[local60]); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray77[local60] * local1; - aClass3_Sub15_8.p4(local71); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray82[local60] * local1; - aClass3_Sub15_8.p4(local71); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray83[local60] * local1; - aClass3_Sub15_8.p4(local71); + for (local60 = 0; local60 < this.triangleCount; local60++) { + local71 = method4096(this.triangleColors[local60], this.triangleTextures[local60], this.aShort29, this.triangleAlpha[local60]); + tempBuffer.offset = this.colorBuffer.pointer + this.aShortArray77[local60] * stride; + tempBuffer.p4(local71); + tempBuffer.offset = this.colorBuffer.pointer + this.aShortArray82[local60] * stride; + tempBuffer.p4(local71); + tempBuffer.offset = this.colorBuffer.pointer + this.aShortArray83[local60] * stride; + tempBuffer.p4(local71); } } else { local60 = (int) FogManager.light0Position[0]; @@ -2400,7 +2375,7 @@ public final class GlModel extends Model { local85 = (int) Math.sqrt(local60 * local60 + local71 * local71 + local78 * local78); local90 = (int) ((float) this.aShort29 * 1.3F); local97 = this.aShort28 * local85 >> 8; - for (local99 = 0; local99 < this.anInt5297; local99++) { + for (local99 = 0; local99 < this.triangleCount; local99++) { @Pc(270) short local270 = this.aShortArray77[local99]; @Pc(275) short local275 = this.aShortArray86[local270]; @Pc(281) int local281; @@ -2455,15 +2430,15 @@ public final class GlModel extends Model { } this.aShortArray86[local458] = (short) (-local469 - 1); } - @Pc(562) int local562 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local281, this.aByteArray71[local99]); - @Pc(577) int local577 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local375, this.aByteArray71[local99]); - @Pc(592) int local592 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local469, this.aByteArray71[local99]); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local270 * local1; - aClass3_Sub15_8.p4(local562); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local364 * local1; - aClass3_Sub15_8.p4(local577); - aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local458 * local1; - aClass3_Sub15_8.p4(local592); + @Pc(562) int local562 = method4096(this.triangleColors[local99], this.triangleTextures[local99], local281, this.triangleAlpha[local99]); + @Pc(577) int local577 = method4096(this.triangleColors[local99], this.triangleTextures[local99], local375, this.triangleAlpha[local99]); + @Pc(592) int local592 = method4096(this.triangleColors[local99], this.triangleTextures[local99], local469, this.triangleAlpha[local99]); + tempBuffer.offset = this.colorBuffer.pointer + local270 * stride; + tempBuffer.p4(local562); + tempBuffer.offset = this.colorBuffer.pointer + local364 * stride; + tempBuffer.p4(local577); + tempBuffer.offset = this.colorBuffer.pointer + local458 * stride; + tempBuffer.p4(local592); } this.aShortArray76 = null; this.aShortArray79 = null; @@ -2473,180 +2448,180 @@ public final class GlModel extends Model { if (arg3) { @Pc(723) float local723 = 3.0F / (float) this.aShort28; @Pc(734) float local734 = 3.0F / (float) (this.aShort28 + this.aShort28 / 2); - aClass3_Sub15_8.offset = this.aClass127_2.anInt4777; + tempBuffer.offset = this.normalsBuffer.pointer; @Pc(752) short local752; @Pc(790) float local790; if (GlRenderer.bigEndian) { for (local78 = 0; local78 < this.anInt5296; local78++) { local752 = this.aShortArray86[local78]; if (local752 == 0) { - aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local734); - aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local734); - aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local734); + tempBuffer.pFloat((float) this.aShortArray76[local78] * local734); + tempBuffer.pFloat((float) this.aShortArray79[local78] * local734); + tempBuffer.pFloat((float) this.aShortArray85[local78] * local734); } else { local790 = local723 / (float) local752; - aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local790); - aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local790); - aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local790); + tempBuffer.pFloat((float) this.aShortArray76[local78] * local790); + tempBuffer.pFloat((float) this.aShortArray79[local78] * local790); + tempBuffer.pFloat((float) this.aShortArray85[local78] * local790); } - aClass3_Sub15_8.offset += local1 - 12; + tempBuffer.offset += stride - 12; } } else { for (local78 = 0; local78 < this.anInt5296; local78++) { local752 = this.aShortArray86[local78]; if (local752 == 0) { - aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local734); - aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local734); - aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local734); + tempBuffer.gFloat((float) this.aShortArray76[local78] * local734); + tempBuffer.gFloat((float) this.aShortArray79[local78] * local734); + tempBuffer.gFloat((float) this.aShortArray85[local78] * local734); } else { local790 = local723 / (float) local752; - aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local790); - aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local790); - aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local790); + tempBuffer.gFloat((float) this.aShortArray76[local78] * local790); + tempBuffer.gFloat((float) this.aShortArray79[local78] * local790); + tempBuffer.gFloat((float) this.aShortArray85[local78] * local790); } - aClass3_Sub15_8.offset += local1 - 12; + tempBuffer.offset += stride - 12; } } } if (arg4) { - aClass3_Sub15_8.offset = this.aClass127_3.anInt4777; + tempBuffer.offset = this.texCoordBuffer.pointer; if (GlRenderer.bigEndian) { for (local60 = 0; local60 < this.anInt5296; local60++) { - aClass3_Sub15_8.pFloat(this.aFloatArray25[local60]); - aClass3_Sub15_8.pFloat(this.aFloatArray26[local60]); - aClass3_Sub15_8.offset += local1 - 8; + tempBuffer.pFloat(this.vertexS[local60]); + tempBuffer.pFloat(this.vertexT[local60]); + tempBuffer.offset += stride - 8; } } else { for (local60 = 0; local60 < this.anInt5296; local60++) { - aClass3_Sub15_8.gFloat(this.aFloatArray25[local60]); - aClass3_Sub15_8.gFloat(this.aFloatArray26[local60]); - aClass3_Sub15_8.offset += local1 - 8; + tempBuffer.gFloat(this.vertexS[local60]); + tempBuffer.gFloat(this.vertexT[local60]); + tempBuffer.offset += stride - 8; } } } - aClass3_Sub15_8.offset = local1 * this.anInt5296; + tempBuffer.offset = stride * this.anInt5296; @Pc(1007) ByteBuffer local1007; if (arg0) { if (arbVboSupported) { - local1007 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); + local1007 = ByteBuffer.wrap(tempBuffer.data, 0, tempBuffer.offset); if (this.aClass155_5 == null) { this.aClass155_5 = new GlVertexBufferObject(true); - this.aClass155_5.method4519(local1007); + this.aClass155_5.setArrayBuffer(local1007); } else { - this.aClass155_5.method4515(local1007); + this.aClass155_5.updateArrayBuffer(local1007); } if (arg1) { - this.bounds.valid = true; - this.bounds.aByteBuffer8 = null; - this.bounds.aClass155_4 = this.aClass155_5; - this.bounds.anInt4782 = local1; + this.vertexBuffer.valid = true; + this.vertexBuffer.buffer = null; + this.vertexBuffer.vbo = this.aClass155_5; + this.vertexBuffer.stride = stride; } if (arg2) { - this.aClass127_1.valid = true; - this.aClass127_1.aByteBuffer8 = null; - this.aClass127_1.aClass155_4 = this.aClass155_5; - this.aClass127_1.anInt4782 = local1; + this.colorBuffer.valid = true; + this.colorBuffer.buffer = null; + this.colorBuffer.vbo = this.aClass155_5; + this.colorBuffer.stride = stride; } if (arg3) { - this.aClass127_2.valid = true; - this.aClass127_2.aByteBuffer8 = null; - this.aClass127_2.aClass155_4 = this.aClass155_5; - this.aClass127_2.anInt4782 = local1; + this.normalsBuffer.valid = true; + this.normalsBuffer.buffer = null; + this.normalsBuffer.vbo = this.aClass155_5; + this.normalsBuffer.stride = stride; } if (arg4) { - this.aClass127_3.valid = true; - this.aClass127_3.aByteBuffer8 = null; - this.aClass127_3.aClass155_4 = this.aClass155_5; - this.aClass127_3.anInt4782 = local1; + this.texCoordBuffer.valid = true; + this.texCoordBuffer.buffer = null; + this.texCoordBuffer.vbo = this.aClass155_5; + this.texCoordBuffer.stride = stride; } } else { - if (aByteBuffer9 == null || aByteBuffer9.capacity() < aClass3_Sub15_8.offset) { - aByteBuffer9 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset + local1 * 100); + if (aByteBuffer9 == null || aByteBuffer9.capacity() < tempBuffer.offset) { + aByteBuffer9 = ByteBuffer.allocateDirect(tempBuffer.offset + stride * 100); } else { aByteBuffer9.clear(); } - aByteBuffer9.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); + aByteBuffer9.put(tempBuffer.data, 0, tempBuffer.offset); aByteBuffer9.flip(); if (arg1) { - this.bounds.valid = true; - this.bounds.aByteBuffer8 = aByteBuffer9; - this.bounds.aClass155_4 = null; - this.bounds.anInt4782 = local1; + this.vertexBuffer.valid = true; + this.vertexBuffer.buffer = aByteBuffer9; + this.vertexBuffer.vbo = null; + this.vertexBuffer.stride = stride; } if (arg2) { - this.aClass127_1.valid = true; - this.aClass127_1.aByteBuffer8 = aByteBuffer9; - this.bounds.aClass155_4 = null; - this.aClass127_1.anInt4782 = local1; + this.colorBuffer.valid = true; + this.colorBuffer.buffer = aByteBuffer9; + this.vertexBuffer.vbo = null; + this.colorBuffer.stride = stride; } if (arg3) { - this.aClass127_2.valid = true; - this.aClass127_2.aByteBuffer8 = aByteBuffer9; - this.aClass127_2.aClass155_4 = null; - this.aClass127_2.anInt4782 = local1; + this.normalsBuffer.valid = true; + this.normalsBuffer.buffer = aByteBuffer9; + this.normalsBuffer.vbo = null; + this.normalsBuffer.stride = stride; } if (arg4) { - this.aClass127_3.valid = true; - this.aClass127_3.aByteBuffer8 = aByteBuffer9; - this.aClass127_3.aClass155_4 = null; - this.aClass127_3.anInt4782 = local1; + this.texCoordBuffer.valid = true; + this.texCoordBuffer.buffer = aByteBuffer9; + this.texCoordBuffer.vbo = null; + this.texCoordBuffer.stride = stride; } } } else if (GlRenderer.arbVboSupported) { @Pc(1211) GlVertexBufferObject local1211 = new GlVertexBufferObject(); - @Pc(1218) ByteBuffer local1218 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); - local1211.method4519(local1218); + @Pc(1218) ByteBuffer local1218 = ByteBuffer.wrap(tempBuffer.data, 0, tempBuffer.offset); + local1211.setArrayBuffer(local1218); if (arg1) { - this.bounds.valid = true; - this.bounds.aByteBuffer8 = null; - this.bounds.aClass155_4 = local1211; - this.bounds.anInt4782 = local1; + this.vertexBuffer.valid = true; + this.vertexBuffer.buffer = null; + this.vertexBuffer.vbo = local1211; + this.vertexBuffer.stride = stride; } if (arg2) { - this.aClass127_1.valid = true; - this.aClass127_1.aByteBuffer8 = null; - this.aClass127_1.aClass155_4 = local1211; - this.aClass127_1.anInt4782 = local1; + this.colorBuffer.valid = true; + this.colorBuffer.buffer = null; + this.colorBuffer.vbo = local1211; + this.colorBuffer.stride = stride; } if (arg3) { - this.aClass127_2.valid = true; - this.aClass127_2.aByteBuffer8 = null; - this.aClass127_2.aClass155_4 = local1211; - this.aClass127_2.anInt4782 = local1; + this.normalsBuffer.valid = true; + this.normalsBuffer.buffer = null; + this.normalsBuffer.vbo = local1211; + this.normalsBuffer.stride = stride; } if (arg4) { - this.aClass127_3.valid = true; - this.aClass127_3.aByteBuffer8 = null; - this.aClass127_3.aClass155_4 = local1211; - this.aClass127_3.anInt4782 = local1; + this.texCoordBuffer.valid = true; + this.texCoordBuffer.buffer = null; + this.texCoordBuffer.vbo = local1211; + this.texCoordBuffer.stride = stride; } } else { - local1007 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset); - local1007.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); + local1007 = ByteBuffer.allocateDirect(tempBuffer.offset); + local1007.put(tempBuffer.data, 0, tempBuffer.offset); local1007.flip(); if (arg1) { - this.bounds.valid = true; - this.bounds.aByteBuffer8 = local1007; - this.bounds.aClass155_4 = null; - this.bounds.anInt4782 = local1; + this.vertexBuffer.valid = true; + this.vertexBuffer.buffer = local1007; + this.vertexBuffer.vbo = null; + this.vertexBuffer.stride = stride; } if (arg2) { - this.aClass127_1.valid = true; - this.aClass127_1.aByteBuffer8 = local1007; - this.bounds.aClass155_4 = null; - this.aClass127_1.anInt4782 = local1; + this.colorBuffer.valid = true; + this.colorBuffer.buffer = local1007; + this.vertexBuffer.vbo = null; + this.colorBuffer.stride = stride; } if (arg3) { - this.aClass127_2.valid = true; - this.aClass127_2.aByteBuffer8 = local1007; - this.aClass127_2.aClass155_4 = null; - this.aClass127_2.anInt4782 = local1; + this.normalsBuffer.valid = true; + this.normalsBuffer.buffer = local1007; + this.normalsBuffer.vbo = null; + this.normalsBuffer.stride = stride; } if (arg4) { - this.aClass127_3.valid = true; - this.aClass127_3.aByteBuffer8 = local1007; - this.aClass127_3.aClass155_4 = null; - this.aClass127_3.anInt4782 = local1; + this.texCoordBuffer.valid = true; + this.texCoordBuffer.buffer = local1007; + this.texCoordBuffer.vbo = null; + this.texCoordBuffer.stride = stride; } } } @@ -2655,7 +2630,7 @@ public final class GlModel extends Model { private Model method4114(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) GlModel arg3, @OriginalArg(4) GlModel arg4) { arg3.vertexCount = this.vertexCount; arg3.anInt5296 = this.anInt5296; - arg3.anInt5297 = this.anInt5297; + arg3.triangleCount = this.triangleCount; arg3.aShort29 = this.aShort29; arg3.aShort28 = this.aShort28; arg3.aByte18 = (byte) ((arg0 && arg1 ? 0 : 2) | 0x1 | (arg2 ? 0 : 4)); @@ -2670,51 +2645,51 @@ public final class GlModel extends Model { arg3.vertexY[local69] = this.vertexY[local69]; arg3.vertexZ[local69] = this.vertexZ[local69]; } - if (arg3.bounds == null) { - arg3.bounds = new GlBuffer(); - } - arg3.bounds.valid = false; if (arg3.vertexBuffer == null) { - arg3.vertexBuffer = new GlVertexBuffer(); + arg3.vertexBuffer = new GlBuffer(); } arg3.vertexBuffer.valid = false; + if (arg3.bounds == null) { + arg3.bounds = new GlBoundingBox(); + } + arg3.bounds.valid = false; if (arg0) { - arg3.aByteArray71 = this.aByteArray71; + arg3.triangleAlpha = this.triangleAlpha; } else { - if (arg4.aByteArray71 == null || arg4.aByteArray71.length < this.anInt5297) { - arg4.aByteArray71 = new byte[this.anInt5297 + 100]; + if (arg4.triangleAlpha == null || arg4.triangleAlpha.length < this.triangleCount) { + arg4.triangleAlpha = new byte[this.triangleCount + 100]; } - arg3.aByteArray71 = arg4.aByteArray71; - for (local69 = 0; local69 < this.anInt5297; local69++) { - arg3.aByteArray71[local69] = this.aByteArray71[local69]; + arg3.triangleAlpha = arg4.triangleAlpha; + for (local69 = 0; local69 < this.triangleCount; local69++) { + arg3.triangleAlpha[local69] = this.triangleAlpha[local69]; } } if (arg1) { - arg3.aShortArray75 = this.aShortArray75; + arg3.triangleColors = this.triangleColors; } else { - if (arg4.aShortArray75 == null || arg4.aShortArray75.length < this.anInt5297) { - arg4.aShortArray75 = new short[this.anInt5297 + 100]; + if (arg4.triangleColors == null || arg4.triangleColors.length < this.triangleCount) { + arg4.triangleColors = new short[this.triangleCount + 100]; } - arg3.aShortArray75 = arg4.aShortArray75; - for (local69 = 0; local69 < this.anInt5297; local69++) { - arg3.aShortArray75[local69] = this.aShortArray75[local69]; + arg3.triangleColors = arg4.triangleColors; + for (local69 = 0; local69 < this.triangleCount; local69++) { + arg3.triangleColors[local69] = this.triangleColors[local69]; } } if (arg0 && arg1) { - arg3.aClass127_1 = this.aClass127_1; + arg3.colorBuffer = this.colorBuffer; } else { - if (arg4.aClass127_1 == null) { - arg4.aClass127_1 = new GlBuffer(); + if (arg4.colorBuffer == null) { + arg4.colorBuffer = new GlBuffer(); } - arg3.aClass127_1 = arg4.aClass127_1; - arg3.aClass127_1.valid = false; + arg3.colorBuffer = arg4.colorBuffer; + arg3.colorBuffer.valid = false; } if (arg2 || this.aShortArray76 == null) { arg3.aShortArray76 = this.aShortArray76; arg3.aShortArray79 = this.aShortArray79; arg3.aShortArray85 = this.aShortArray85; arg3.aShortArray86 = this.aShortArray86; - arg3.aClass127_2 = this.aClass127_2; + arg3.normalsBuffer = this.normalsBuffer; } else { if (arg4.aShortArray76 == null || arg4.aShortArray76.length < this.anInt5296) { arg4.aShortArray76 = new short[this.anInt5296 + 100]; @@ -2733,33 +2708,33 @@ public final class GlModel extends Model { arg3.aShortArray86[local69] = this.aShortArray86[local69]; } if (Preferences.highDetailLighting) { - if (arg4.aClass127_2 == null) { - arg4.aClass127_2 = new GlBuffer(); + if (arg4.normalsBuffer == null) { + arg4.normalsBuffer = new GlBuffer(); } - arg3.aClass127_2 = arg4.aClass127_2; - arg3.aClass127_2.valid = false; + arg3.normalsBuffer = arg4.normalsBuffer; + arg3.normalsBuffer.valid = false; } else { - arg3.aClass127_2 = null; + arg3.normalsBuffer = null; } } - arg3.aFloatArray25 = this.aFloatArray25; - arg3.aFloatArray26 = this.aFloatArray26; - arg3.anIntArray464 = this.anIntArray464; - arg3.anIntArrayArray36 = this.anIntArrayArray36; + arg3.vertexS = this.vertexS; + arg3.vertexT = this.vertexT; + arg3.vertexBones = this.vertexBones; + arg3.boneVertices = this.boneVertices; arg3.aShortArray77 = this.aShortArray77; arg3.aShortArray82 = this.aShortArray82; arg3.aShortArray83 = this.aShortArray83; - arg3.aShortArray80 = this.aShortArray80; - arg3.aByteArray72 = this.aByteArray72; - arg3.anIntArrayArray37 = this.anIntArrayArray37; - arg3.aClass127_3 = this.aClass127_3; - arg3.aClass127_5 = this.aClass127_5; + arg3.triangleTextures = this.triangleTextures; + arg3.triangleBones = this.triangleBones; + arg3.boneTriangles = this.boneTriangles; + arg3.texCoordBuffer = this.texCoordBuffer; + arg3.indexBuffer = this.indexBuffer; arg3.anIntArray463 = this.anIntArray463; arg3.aShortArray81 = this.aShortArray81; arg3.anIntArray462 = this.anIntArray462; arg3.aBoolean303 = this.aBoolean303; - arg3.aShortArray84 = this.aShortArray84; - arg3.aShortArray78 = this.aShortArray78; + arg3.vertexSources = this.vertexSources; + arg3.triangleSources = this.triangleSources; return arg3; } @@ -2799,98 +2774,98 @@ public final class GlModel extends Model { this.aShortArray76[local7] = this.aShortArray85[local7]; this.aShortArray85[local7] = (short) -local43; } - this.vertexBuffer.valid = false; this.bounds.valid = false; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + this.vertexBuffer.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } @OriginalMember(owner = "client!td", name = "a", descriptor = "(ZZZZZZZZZZZ)Lclient!td;") public final GlModel method4117(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2, @OriginalArg(4) boolean arg3, @OriginalArg(5) boolean arg4, @OriginalArg(6) boolean arg5, @OriginalArg(7) boolean arg6, @OriginalArg(9) boolean arg7, @OriginalArg(10) boolean arg8) { - @Pc(3) GlModel local3 = new GlModel(); - local3.vertexCount = this.vertexCount; - local3.anInt5296 = this.anInt5296; - local3.anInt5297 = this.anInt5297; + @Pc(3) GlModel model = new GlModel(); + model.vertexCount = this.vertexCount; + model.anInt5296 = this.anInt5296; + model.triangleCount = this.triangleCount; if (arg0) { - local3.vertexX = this.vertexX; - local3.vertexZ = this.vertexZ; + model.vertexX = this.vertexX; + model.vertexZ = this.vertexZ; } else { - local3.vertexX = RawModel.method2308(this.vertexX); - local3.vertexZ = RawModel.method2308(this.vertexZ); + model.vertexX = ArrayUtils.copyOfNullable(this.vertexX); + model.vertexZ = ArrayUtils.copyOfNullable(this.vertexZ); } if (arg1) { - local3.vertexY = this.vertexY; + model.vertexY = this.vertexY; } else { - local3.vertexY = RawModel.method2308(this.vertexY); + model.vertexY = ArrayUtils.copyOfNullable(this.vertexY); } if (arg0 && arg1) { - local3.bounds = this.bounds; - local3.vertexBuffer = this.vertexBuffer; + model.vertexBuffer = this.vertexBuffer; + model.bounds = this.bounds; } else { - local3.bounds = new GlBuffer(); - local3.vertexBuffer = new GlVertexBuffer(); + model.vertexBuffer = new GlBuffer(); + model.bounds = new GlBoundingBox(); } if (arg2) { - local3.aShortArray75 = this.aShortArray75; + model.triangleColors = this.triangleColors; } else { - local3.aShortArray75 = method4511(this.aShortArray75); + model.triangleColors = ArrayUtils.copyOfNullable(this.triangleColors); } - local3.aByteArray71 = this.aByteArray71; + model.triangleAlpha = this.triangleAlpha; if (arg2 && arg3 && (arg6 && arg4 || Preferences.highDetailLighting)) { - local3.aClass127_1 = this.aClass127_1; + model.colorBuffer = this.colorBuffer; } else { - local3.aClass127_1 = new GlBuffer(); + model.colorBuffer = new GlBuffer(); } if (arg4) { - local3.aShortArray76 = this.aShortArray76; - local3.aShortArray79 = this.aShortArray79; - local3.aShortArray85 = this.aShortArray85; - local3.aShortArray86 = this.aShortArray86; + model.aShortArray76 = this.aShortArray76; + model.aShortArray79 = this.aShortArray79; + model.aShortArray85 = this.aShortArray85; + model.aShortArray86 = this.aShortArray86; } else { - local3.aShortArray76 = method4511(this.aShortArray76); - local3.aShortArray79 = method4511(this.aShortArray79); - local3.aShortArray85 = method4511(this.aShortArray85); - local3.aShortArray86 = method4511(this.aShortArray86); + model.aShortArray76 = ArrayUtils.copyOfNullable(this.aShortArray76); + model.aShortArray79 = ArrayUtils.copyOfNullable(this.aShortArray79); + model.aShortArray85 = ArrayUtils.copyOfNullable(this.aShortArray85); + model.aShortArray86 = ArrayUtils.copyOfNullable(this.aShortArray86); } if (!Preferences.highDetailLighting) { - local3.aClass127_2 = null; + model.normalsBuffer = null; } else if (arg4 && arg5 && arg6) { - local3.aClass127_2 = this.aClass127_2; + model.normalsBuffer = this.normalsBuffer; } else { - local3.aClass127_2 = new GlBuffer(); + model.normalsBuffer = new GlBuffer(); } - local3.aFloatArray25 = this.aFloatArray25; - local3.aFloatArray26 = this.aFloatArray26; - local3.aClass127_3 = this.aClass127_3; + model.vertexS = this.vertexS; + model.vertexT = this.vertexT; + model.texCoordBuffer = this.texCoordBuffer; if (arg7) { - local3.aShortArray77 = this.aShortArray77; - local3.aShortArray82 = this.aShortArray82; - local3.aShortArray83 = this.aShortArray83; - local3.aClass127_5 = this.aClass127_5; + model.aShortArray77 = this.aShortArray77; + model.aShortArray82 = this.aShortArray82; + model.aShortArray83 = this.aShortArray83; + model.indexBuffer = this.indexBuffer; } else { - local3.aShortArray77 = method4511(this.aShortArray77); - local3.aShortArray82 = method4511(this.aShortArray82); - local3.aShortArray83 = method4511(this.aShortArray83); - local3.aClass127_5 = new GlBuffer(); + model.aShortArray77 = ArrayUtils.copyOfNullable(this.aShortArray77); + model.aShortArray82 = ArrayUtils.copyOfNullable(this.aShortArray82); + model.aShortArray83 = ArrayUtils.copyOfNullable(this.aShortArray83); + model.indexBuffer = new GlBuffer(); } if (arg8) { - local3.aShortArray80 = this.aShortArray80; + model.triangleTextures = this.triangleTextures; } else { - local3.aShortArray80 = method4511(this.aShortArray80); + model.triangleTextures = ArrayUtils.copyOfNullable(this.triangleTextures); } - local3.anIntArray464 = this.anIntArray464; - local3.anIntArrayArray36 = this.anIntArrayArray36; - local3.aByteArray72 = this.aByteArray72; - local3.anIntArrayArray37 = this.anIntArrayArray37; - local3.anIntArray463 = this.anIntArray463; - local3.aShortArray81 = this.aShortArray81; - local3.anIntArray462 = this.anIntArray462; - local3.aShort29 = this.aShort29; - local3.aShort28 = this.aShort28; - local3.aShortArray84 = this.aShortArray84; - local3.aShortArray78 = this.aShortArray78; - return local3; + model.vertexBones = this.vertexBones; + model.boneVertices = this.boneVertices; + model.triangleBones = this.triangleBones; + model.boneTriangles = this.boneTriangles; + model.anIntArray463 = this.anIntArray463; + model.aShortArray81 = this.aShortArray81; + model.anIntArray462 = this.anIntArray462; + model.aShort29 = this.aShort29; + model.aShort28 = this.aShort28; + model.vertexSources = this.vertexSources; + model.triangleSources = this.triangleSources; + return model; } @OriginalMember(owner = "client!td", name = "i", descriptor = "()V") @@ -2901,8 +2876,8 @@ public final class GlModel extends Model { this.vertexX[local1] = this.vertexZ[local1]; this.vertexZ[local1] = -local10; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIIII)Z") @@ -2921,10 +2896,10 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "j", descriptor = "()I") @Override public final int method4566() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort4; + return this.bounds.cylinderRadius; } @OriginalMember(owner = "client!td", name = "a", descriptor = "(I[IIIIZ)V") @@ -2948,8 +2923,8 @@ public final class GlModel extends Model { anInt5299 = 0; for (local26 = 0; local26 < local2; local26++) { @Pc(33) int local33 = arg1[local26]; - if (local33 < this.anIntArrayArray36.length) { - @Pc(43) int[] local43 = this.anIntArrayArray36[local33]; + if (local33 < this.boneVertices.length) { + @Pc(43) int[] local43 = this.boneVertices[local33]; for (local45 = 0; local45 < local43.length; local45++) { local53 = local43[local45]; anInt5298 += this.vertexX[local53]; @@ -2978,8 +2953,8 @@ public final class GlModel extends Model { local16 = arg4 << 4; for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local141 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local141 = this.boneVertices[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; this.vertexX[local45] += local8; @@ -2996,8 +2971,8 @@ public final class GlModel extends Model { if (arg0 == 2) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local141 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local141 = this.boneVertices[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; this.vertexX[local45] -= anInt5298; @@ -3033,8 +3008,8 @@ public final class GlModel extends Model { if (arg5 && this.aShortArray76 != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local141 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local141 = this.boneVertices[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; local53 = this.anIntArray462[local45]; @@ -3072,15 +3047,15 @@ public final class GlModel extends Model { } } } - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } } else if (arg0 == 3) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray36.length) { - local141 = this.anIntArrayArray36[local26]; + if (local26 < this.boneVertices.length) { + local141 = this.boneVertices[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; this.vertexX[local45] -= anInt5298; @@ -3096,35 +3071,35 @@ public final class GlModel extends Model { } } } else if (arg0 == 5) { - if (this.anIntArrayArray37 != null && this.aByteArray71 != null) { + if (this.boneTriangles != null && this.triangleAlpha != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray37.length) { - local141 = this.anIntArrayArray37[local26]; + if (local26 < this.boneTriangles.length) { + local141 = this.boneTriangles[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; - local53 = (this.aByteArray71[local45] & 0xFF) + arg2 * 8; + local53 = (this.triangleAlpha[local45] & 0xFF) + arg2 * 8; if (local53 < 0) { local53 = 0; } else if (local53 > 255) { local53 = 255; } - this.aByteArray71[local45] = (byte) local53; + this.triangleAlpha[local45] = (byte) local53; } if (local141.length > 0) { - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } } } - } else if (arg0 == 7 && this.anIntArrayArray37 != null) { + } else if (arg0 == 7 && this.boneTriangles != null) { for (local18 = 0; local18 < local2; local18++) { local26 = arg1[local18]; - if (local26 < this.anIntArrayArray37.length) { - local141 = this.anIntArrayArray37[local26]; + if (local26 < this.boneTriangles.length) { + local141 = this.boneTriangles[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; - local53 = this.aShortArray75[local45] & 0xFFFF; + local53 = this.triangleColors[local45] & 0xFFFF; local246 = local53 >> 10 & 0x3F; local264 = local53 >> 7 & 0x7; local484 = local53 & 0x7F; @@ -3141,10 +3116,10 @@ public final class GlModel extends Model { } else if (local484 > 127) { local484 = 127; } - this.aShortArray75[local45] = (short) (local932 << 10 | local264 << 7 | local484); + this.triangleColors[local45] = (short) (local932 << 10 | local264 << 7 | local484); } if (local141.length > 0) { - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } } @@ -3228,19 +3203,19 @@ public final class GlModel extends Model { this.vertexZ[local3] += anInt5299; } } else if (arg0 == 5) { - for (local3 = 0; local3 < this.anInt5297; local3++) { - local11 = (this.aByteArray71[local3] & 0xFF) + arg1 * 8; + for (local3 = 0; local3 < this.triangleCount; local3++) { + local11 = (this.triangleAlpha[local3] & 0xFF) + arg1 * 8; if (local11 < 0) { local11 = 0; } else if (local11 > 255) { local11 = 255; } - this.aByteArray71[local3] = (byte) local11; + this.triangleAlpha[local3] = (byte) local11; } - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } else if (arg0 == 7) { - for (local3 = 0; local3 < this.anInt5297; local3++) { - local11 = this.aShortArray75[local3] & 0xFFFF; + for (local3 = 0; local3 < this.triangleCount; local3++) { + local11 = this.triangleColors[local3] & 0xFFFF; local146 = local11 >> 10 & 0x3F; local164 = local11 >> 7 & 0x7; @Pc(496) int local496 = local11 & 0x7F; @@ -3257,9 +3232,9 @@ public final class GlModel extends Model { } else if (local496 > 127) { local496 = 127; } - this.aShortArray75[local3] = (short) (local502 << 10 | local164 << 7 | local496); + this.triangleColors[local3] = (short) (local502 << 10 | local164 << 7 | local496); } - this.aClass127_1.valid = false; + this.colorBuffer.valid = false; } } } @@ -3267,23 +3242,23 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "h", descriptor = "()I") @Override public final int getMinX() { - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } - return this.vertexBuffer.aShort6; + return this.bounds.minX; } @OriginalMember(owner = "client!td", name = "w", descriptor = "()V") private void method4121() { @Pc(1) GL2 local1 = GlRenderer.gl; - if (this.anInt5297 == 0) { + if (this.triangleCount == 0) { return; } if (this.aByte18 != 0) { - this.method4113(true, !this.bounds.valid && (this.aByte18 & 0x1) != 0, !this.aClass127_1.valid && (this.aByte18 & 0x2) != 0, this.aClass127_2 != null && !this.aClass127_2.valid && (this.aByte18 & 0x4) != 0, false); + this.method4113(true, !this.vertexBuffer.valid && (this.aByte18 & 0x1) != 0, !this.colorBuffer.valid && (this.aByte18 & 0x2) != 0, this.normalsBuffer != null && !this.normalsBuffer.valid && (this.aByte18 & 0x4) != 0, false); } - this.method4113(false, !this.bounds.valid, !this.aClass127_1.valid, this.aClass127_2 != null && !this.aClass127_2.valid, !this.aClass127_3.valid); - if (!this.aClass127_5.valid) { + this.method4113(false, !this.vertexBuffer.valid, !this.colorBuffer.valid, this.normalsBuffer != null && !this.normalsBuffer.valid, !this.texCoordBuffer.valid); + if (!this.indexBuffer.valid) { this.method4103(); } if (this.aByte19 != 0) { @@ -3295,8 +3270,8 @@ public final class GlModel extends Model { this.anIntArray462 = null; } if ((this.aByte19 & 0x2) != 0) { - this.aShortArray75 = null; - this.aByteArray71 = null; + this.triangleColors = null; + this.triangleAlpha = null; } if ((this.aByte19 & 0x4) != 0) { this.aShortArray76 = null; @@ -3305,8 +3280,8 @@ public final class GlModel extends Model { this.aShortArray86 = null; } if ((this.aByte19 & 0x8) != 0) { - this.aFloatArray25 = null; - this.aFloatArray26 = null; + this.vertexS = null; + this.vertexT = null; } if ((this.aByte19 & 0x10) != 0) { this.aShortArray77 = null; @@ -3316,75 +3291,75 @@ public final class GlModel extends Model { this.aByte19 = 0; } @Pc(172) GlVertexBufferObject local172 = null; - if (this.bounds.aClass155_4 != null) { - this.bounds.aClass155_4.method4516(); - local172 = this.bounds.aClass155_4; - local1.glVertexPointer(3, GL2.GL_FLOAT, this.bounds.anInt4782, this.bounds.anInt4777); + if (this.vertexBuffer.vbo != null) { + this.vertexBuffer.vbo.bindArray(); + local172 = this.vertexBuffer.vbo; + local1.glVertexPointer(3, GL2.GL_FLOAT, this.vertexBuffer.stride, this.vertexBuffer.pointer); } - if (this.aClass127_1.aClass155_4 != null) { - if (local172 != this.aClass127_1.aClass155_4) { - this.aClass127_1.aClass155_4.method4516(); - local172 = this.aClass127_1.aClass155_4; + if (this.colorBuffer.vbo != null) { + if (local172 != this.colorBuffer.vbo) { + this.colorBuffer.vbo.bindArray(); + local172 = this.colorBuffer.vbo; } - local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.aClass127_1.anInt4782, this.aClass127_1.anInt4777); + local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.colorBuffer.stride, this.colorBuffer.pointer); } - if (Preferences.highDetailLighting && this.aClass127_2.aClass155_4 != null) { - if (local172 != this.aClass127_2.aClass155_4) { - this.aClass127_2.aClass155_4.method4516(); - local172 = this.aClass127_2.aClass155_4; + if (Preferences.highDetailLighting && this.normalsBuffer.vbo != null) { + if (local172 != this.normalsBuffer.vbo) { + this.normalsBuffer.vbo.bindArray(); + local172 = this.normalsBuffer.vbo; } - local1.glNormalPointer(GL2.GL_FLOAT, this.aClass127_2.anInt4782, this.aClass127_2.anInt4777); + local1.glNormalPointer(GL2.GL_FLOAT, this.normalsBuffer.stride, this.normalsBuffer.pointer); } - if (this.aClass127_3.aClass155_4 != null) { - if (local172 != this.aClass127_3.aClass155_4) { - this.aClass127_3.aClass155_4.method4516(); - local172 = this.aClass127_3.aClass155_4; + if (this.texCoordBuffer.vbo != null) { + if (local172 != this.texCoordBuffer.vbo) { + this.texCoordBuffer.vbo.bindArray(); + local172 = this.texCoordBuffer.vbo; } - local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.aClass127_3.anInt4782, this.aClass127_3.anInt4777); + local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.texCoordBuffer.stride, this.texCoordBuffer.pointer); } - if (this.aClass127_5.aClass155_4 != null) { - this.aClass127_5.aClass155_4.method4518(); + if (this.indexBuffer.vbo != null) { + this.indexBuffer.vbo.bindElementArray(); } - if (this.bounds.aClass155_4 == null || this.aClass127_1.aClass155_4 == null || Preferences.highDetailLighting && this.aClass127_2.aClass155_4 == null || this.aClass127_3.aClass155_4 == null) { + if (this.vertexBuffer.vbo == null || this.colorBuffer.vbo == null || Preferences.highDetailLighting && this.normalsBuffer.vbo == null || this.texCoordBuffer.vbo == null) { if (GlRenderer.arbVboSupported) { local1.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0); } - if (this.bounds.aClass155_4 == null) { - this.bounds.aByteBuffer8.position(this.bounds.anInt4777); - local1.glVertexPointer(3, GL2.GL_FLOAT, this.bounds.anInt4782, this.bounds.aByteBuffer8); + if (this.vertexBuffer.vbo == null) { + this.vertexBuffer.buffer.position(this.vertexBuffer.pointer); + local1.glVertexPointer(3, GL2.GL_FLOAT, this.vertexBuffer.stride, this.vertexBuffer.buffer); } - if (this.aClass127_1.aClass155_4 == null) { - this.aClass127_1.aByteBuffer8.position(this.aClass127_1.anInt4777); - local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.aClass127_1.anInt4782, this.aClass127_1.aByteBuffer8); + if (this.colorBuffer.vbo == null) { + this.colorBuffer.buffer.position(this.colorBuffer.pointer); + local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.colorBuffer.stride, this.colorBuffer.buffer); } - if (Preferences.highDetailLighting && this.aClass127_2.aClass155_4 == null) { - this.aClass127_2.aByteBuffer8.position(this.aClass127_2.anInt4777); - local1.glNormalPointer(GL2.GL_FLOAT, this.aClass127_2.anInt4782, this.aClass127_2.aByteBuffer8); + if (Preferences.highDetailLighting && this.normalsBuffer.vbo == null) { + this.normalsBuffer.buffer.position(this.normalsBuffer.pointer); + local1.glNormalPointer(GL2.GL_FLOAT, this.normalsBuffer.stride, this.normalsBuffer.buffer); } - if (this.aClass127_3.aClass155_4 == null) { - this.aClass127_3.aByteBuffer8.position(this.aClass127_3.anInt4777); - local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.aClass127_3.anInt4782, this.aClass127_3.aByteBuffer8); + if (this.texCoordBuffer.vbo == null) { + this.texCoordBuffer.buffer.position(this.texCoordBuffer.pointer); + local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.texCoordBuffer.stride, this.texCoordBuffer.buffer); } } - if (this.aClass127_5.aClass155_4 == null && GlRenderer.arbVboSupported) { + if (this.indexBuffer.vbo == null && GlRenderer.arbVboSupported) { local1.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, 0); } @Pc(417) int local417 = this.anIntArray463.length - 1; for (@Pc(419) int local419 = 0; local419 < local417; local419++) { @Pc(427) int local427 = this.anIntArray463[local419]; @Pc(434) int local434 = this.anIntArray463[local419 + 1]; - @Pc(439) short local439 = this.aShortArray80[local427]; + @Pc(439) short local439 = this.triangleTextures[local427]; if (local439 == -1) { GlRenderer.setTextureId(-1); MaterialManager.setMaterial(0, 0); } else { Rasteriser.textureProvider.method3227(local439 & 0xFFFF); } - if (this.aClass127_5.aClass155_4 == null) { - this.aClass127_5.aByteBuffer8.position(local427 * 12); - local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, this.aClass127_5.aByteBuffer8); + if (this.indexBuffer.vbo == null) { + this.indexBuffer.buffer.position(local427 * 12); + local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, this.indexBuffer.buffer); } else { - local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, local427 * 12); + local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, local427 * 12L); } } } @@ -3397,8 +3372,8 @@ public final class GlModel extends Model { this.vertexY[local1] = this.vertexY[local1] + 7 >> 4; this.vertexZ[local1] = this.vertexZ[local1] + 7 >> 4; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "x", descriptor = "()V") @@ -3412,17 +3387,17 @@ public final class GlModel extends Model { this.aShortArray85[local1] = (short) -this.aShortArray85[local1]; } } - for (local1 = 0; local1 < this.anInt5297; local1++) { + for (local1 = 0; local1 < this.triangleCount; local1++) { @Pc(48) short local48 = this.aShortArray77[local1]; this.aShortArray77[local1] = this.aShortArray83[local1]; this.aShortArray83[local1] = local48; } - this.vertexBuffer.valid = false; this.bounds.valid = false; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + this.vertexBuffer.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } - this.aClass127_5.valid = false; + this.indexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "d", descriptor = "(I)V") @@ -3435,8 +3410,8 @@ public final class GlModel extends Model { this.vertexZ[local9] = this.vertexY[local9] * local3 + this.vertexZ[local9] * local7 >> 16; this.vertexY[local9] = local29; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } @OriginalMember(owner = "client!td", name = "g", descriptor = "(I)V") @@ -3459,10 +3434,10 @@ public final class GlModel extends Model { this.aShortArray85[local16] = (short) (this.aShortArray85[local16] * local14 - this.aShortArray76[local16] * local10 >> 16); this.aShortArray76[local16] = (short) local36; } - this.vertexBuffer.valid = false; this.bounds.valid = false; - if (this.aClass127_2 != null) { - this.aClass127_2.valid = false; + this.vertexBuffer.valid = false; + if (this.normalsBuffer != null) { + this.normalsBuffer.valid = false; } } @@ -3471,26 +3446,26 @@ public final class GlModel extends Model { if (this.anInt5296 == 0) { return null; } - if (!this.vertexBuffer.valid) { - this.method4108(); + if (!this.bounds.valid) { + this.calculateBounds(); } @Pc(26) int local26; @Pc(40) int local40; if (FogManager.lightX > 0) { - local26 = this.vertexBuffer.aShort6 - (this.vertexBuffer.aShort3 * FogManager.lightX >> 8) >> 3; - local40 = this.vertexBuffer.aShort5 - (this.vertexBuffer.aShort2 * FogManager.lightX >> 8) >> 3; + local26 = this.bounds.minX - (this.bounds.maxY * FogManager.lightX >> 8) >> 3; + local40 = this.bounds.maxX - (this.bounds.minY * FogManager.lightX >> 8) >> 3; } else { - local26 = this.vertexBuffer.aShort6 - (this.vertexBuffer.aShort2 * FogManager.lightX >> 8) >> 3; - local40 = this.vertexBuffer.aShort5 - (this.vertexBuffer.aShort3 * FogManager.lightX >> 8) >> 3; + local26 = this.bounds.minX - (this.bounds.minY * FogManager.lightX >> 8) >> 3; + local40 = this.bounds.maxX - (this.bounds.maxY * FogManager.lightX >> 8) >> 3; } @Pc(85) int local85; @Pc(99) int local99; if (FogManager.lightZ > 0) { - local85 = this.vertexBuffer.aShort8 - (this.vertexBuffer.aShort3 * FogManager.lightZ >> 8) >> 3; - local99 = this.vertexBuffer.aShort7 - (this.vertexBuffer.aShort2 * FogManager.lightZ >> 8) >> 3; + local85 = this.bounds.minZ - (this.bounds.maxY * FogManager.lightZ >> 8) >> 3; + local99 = this.bounds.maxZ - (this.bounds.minY * FogManager.lightZ >> 8) >> 3; } else { - local85 = this.vertexBuffer.aShort8 - (this.vertexBuffer.aShort2 * FogManager.lightZ >> 8) >> 3; - local99 = this.vertexBuffer.aShort7 - (this.vertexBuffer.aShort3 * FogManager.lightZ >> 8) >> 3; + local85 = this.bounds.minZ - (this.bounds.minY * FogManager.lightZ >> 8) >> 3; + local99 = this.bounds.maxZ - (this.bounds.maxY * FogManager.lightZ >> 8) >> 3; } @Pc(134) int local134 = local40 + 1 - local26; @Pc(140) int local140 = local99 + 1 - local85; @@ -3527,8 +3502,8 @@ public final class GlModel extends Model { anIntArray467[local258] = local234; } } - for (local194 = 0; local194 < this.anInt5297; local194++) { - if (this.aByteArray71[local194] <= 128) { + for (local194 = 0; local194 < this.triangleCount; local194++) { + if (this.triangleAlpha[local194] <= 128) { @Pc(292) short local292 = this.aShortArray77[local194]; @Pc(297) short local297 = this.aShortArray82[local194]; @Pc(302) short local302 = this.aShortArray83[local194]; @@ -3554,7 +3529,7 @@ public final class GlModel extends Model { this.vertexZ[local1] = this.vertexX[local1]; this.vertexX[local1] = -local10; } - this.vertexBuffer.valid = false; this.bounds.valid = false; + this.vertexBuffer.valid = false; } } diff --git a/client/src/main/java/rt4/GlSolidColorTexture.java b/client/src/main/java/rt4/GlSolidColorTexture.java index b5a2ced..5d29539 100644 --- a/client/src/main/java/rt4/GlSolidColorTexture.java +++ b/client/src/main/java/rt4/GlSolidColorTexture.java @@ -12,53 +12,53 @@ import java.nio.ByteBuffer; public final class GlSolidColorTexture extends SecondaryNode { @OriginalMember(owner = "client!sd", name = "U", descriptor = "I") - private int anInt5065 = 0; + private int textureSize = 0; @OriginalMember(owner = "client!sd", name = "K", descriptor = "I") - private int anInt5058 = -1; + private int textureId = -1; @OriginalMember(owner = "client!sd", name = "L", descriptor = "I") - private final int anInt5059; + private final int contextId; @OriginalMember(owner = "client!sd", name = "", descriptor = "(I)V") - public GlSolidColorTexture(@OriginalArg(0) int arg0) { - @Pc(9) GL2 local9 = GlRenderer.gl; - @Pc(12) int[] local12 = new int[1]; - local9.glGenTextures(1, local12, 0); - this.anInt5058 = local12[0]; - this.anInt5059 = GlCleaner.contextId; - GlRenderer.setTextureId(this.anInt5058); - @Pc(32) int local32 = Rasteriser.palette[arg0]; - @Pc(58) byte[] local58 = new byte[]{(byte) (local32 >> 16), (byte) (local32 >> 8), (byte) local32, -1}; - @Pc(61) ByteBuffer local61 = ByteBuffer.wrap(local58); - local9.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, 1, 1, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local61); - local9.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); - local9.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); - GlCleaner.onCardTexture += local61.limit() - this.anInt5065; - this.anInt5065 = local61.limit(); + public GlSolidColorTexture(@OriginalArg(0) int hsl) { + @Pc(9) GL2 gl = GlRenderer.gl; + @Pc(12) int[] temp = new int[1]; + gl.glGenTextures(1, temp, 0); + this.textureId = temp[0]; + this.contextId = GlCleaner.contextId; + GlRenderer.setTextureId(this.textureId); + @Pc(32) int rgb = Rasteriser.palette[hsl]; + @Pc(58) byte[] bytes = new byte[]{(byte) (rgb >> 16), (byte) (rgb >> 8), (byte) rgb, -1}; + @Pc(61) ByteBuffer buffer = ByteBuffer.wrap(bytes); + gl.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, 1, 1, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, buffer); + gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); + gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); + GlCleaner.onCardTexture += buffer.limit() - this.textureSize; + this.textureSize = buffer.limit(); } @OriginalMember(owner = "client!sd", name = "finalize", descriptor = "()V") @Override public final void finalize() throws Throwable { - if (this.anInt5058 != -1) { - GlCleaner.method1485(this.anInt5058, this.anInt5065, this.anInt5059); - this.anInt5058 = -1; - this.anInt5065 = 0; + if (this.textureId != -1) { + GlCleaner.deleteTexture(this.textureId, this.textureSize, this.contextId); + this.textureId = -1; + this.textureSize = 0; } super.finalize(); } @OriginalMember(owner = "client!sd", name = "g", descriptor = "(B)V") public final void method3887() { - @Pc(8) int local8 = MaterialManager.getFlags(); - if ((local8 & 0x1) == 0) { - GlRenderer.setTextureId(this.anInt5058); + @Pc(8) int flags = MaterialManager.getFlags(); + if ((flags & 0x1) == 0) { + GlRenderer.setTextureId(this.textureId); } - if ((local8 & 0x2) == 0) { + if ((flags & 0x2) == 0) { GlRenderer.setTextureCombineRgbMode(0); } - if ((local8 & 0x4) == 0) { + if ((flags & 0x4) == 0) { GlRenderer.setTextureCombineAlphaMode(0); } } diff --git a/client/src/main/java/rt4/GlTexture.java b/client/src/main/java/rt4/GlTexture.java index d8049d9..1189bce 100644 --- a/client/src/main/java/rt4/GlTexture.java +++ b/client/src/main/java/rt4/GlTexture.java @@ -11,6 +11,8 @@ import java.nio.ByteBuffer; @OriginalClass("client!uh") public final class GlTexture extends SecondaryNode { + @OriginalMember(owner = "client!oj", name = "t", descriptor = "[I") + public static int[] anIntArray372; @OriginalMember(owner = "client!uh", name = "K", descriptor = "F") private float aFloat35; @@ -285,8 +287,8 @@ public final class GlTexture extends SecondaryNode { if (this.anIntArray481 == null || this.anInt5497 == 0 && this.anInt5485 == 0) { return; } - if (Static182.anIntArray372 == null || Static182.anIntArray372.length < this.anIntArray481.length) { - Static182.anIntArray372 = new int[this.anIntArray481.length]; + if (anIntArray372 == null || anIntArray372.length < this.anIntArray481.length) { + anIntArray372 = new int[this.anIntArray481.length]; } @Pc(47) int local47 = arg0 * this.anInt5485; @Pc(58) int local58 = this.anIntArray481.length == 4096 ? 64 : 128; @@ -299,19 +301,19 @@ public final class GlTexture extends SecondaryNode { for (@Pc(90) int local90 = 0; local90 < local58; local90++) { @Pc(102) int local102 = (local66 & local90 + local47) + local88; @Pc(106) int local106 = local90 + local79; - Static182.anIntArray372[local106] = this.anIntArray481[local102]; + anIntArray372[local106] = this.anIntArray481[local102]; } } @Pc(125) int[] local125 = this.anIntArray481; - this.anIntArray481 = Static182.anIntArray372; - Static182.anIntArray372 = local125; + this.anIntArray481 = anIntArray372; + anIntArray372 = local125; } @OriginalMember(owner = "client!uh", name = "finalize", descriptor = "()V") @Override public final void finalize() throws Throwable { if (this.textureId != -1) { - GlCleaner.method1485(this.textureId, this.textureSize, this.anInt5492); + GlCleaner.deleteTexture(this.textureId, this.textureSize, this.anInt5492); this.textureSize = 0; this.textureId = -1; } diff --git a/client/src/main/java/rt4/GlTile.java b/client/src/main/java/rt4/GlTile.java index df63227..edd31b1 100644 --- a/client/src/main/java/rt4/GlTile.java +++ b/client/src/main/java/rt4/GlTile.java @@ -14,12 +14,16 @@ public final class GlTile extends Node { @OriginalMember(owner = "client!hg", name = "J", descriptor = "Ljava/nio/ByteBuffer;") public static ByteBuffer aByteBuffer4; + @OriginalMember(owner = "client!hg", name = "U", descriptor = "Lclient!wa;") public static Buffer aClass3_Sub15_3; + @OriginalMember(owner = "client!hg", name = "K", descriptor = "Lclient!wa;") public static Buffer aClass3_Sub15_2; + @OriginalMember(owner = "client!hg", name = "Q", descriptor = "Ljava/nio/ByteBuffer;") public static ByteBuffer aByteBuffer5; + @OriginalMember(owner = "client!hg", name = "s", descriptor = "Ljava/nio/ByteBuffer;") private ByteBuffer aByteBuffer3; @@ -208,7 +212,7 @@ public final class GlTile extends Node { if (GlRenderer.arbVboSupported) { @Pc(200) ByteBuffer local200 = ByteBuffer.wrap(local12.data, 0, local12.offset); this.aClass155_3 = new GlVertexBufferObject(); - this.aClass155_3.method4519(local200); + this.aClass155_3.setArrayBuffer(local200); } else { this.aByteBuffer3 = ByteBuffer.allocateDirect(local12.offset).order(ByteOrder.nativeOrder()); this.aByteBuffer3.put(local12.data, 0, local12.offset); @@ -323,7 +327,7 @@ public final class GlTile extends Node { gl.glClientActiveTexture(GL2.GL_TEXTURE0); } } else { - this.aClass155_3.method4516(); + this.aClass155_3.bindArray(); gl.glVertexPointer(3, GL2.GL_FLOAT, i, 0L); gl.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, i, 12L); if (Preferences.highDetailLighting) { diff --git a/client/src/main/java/rt4/GlVertexBufferObject.java b/client/src/main/java/rt4/GlVertexBufferObject.java index a75046d..a8e6410 100644 --- a/client/src/main/java/rt4/GlVertexBufferObject.java +++ b/client/src/main/java/rt4/GlVertexBufferObject.java @@ -12,16 +12,16 @@ import java.nio.ByteBuffer; public final class GlVertexBufferObject { @OriginalMember(owner = "client!vi", name = "a", descriptor = "I") - private int anInt5760; + private int id; @OriginalMember(owner = "client!vi", name = "b", descriptor = "I") - private final int anInt5761; + private final int contextId; @OriginalMember(owner = "client!vi", name = "c", descriptor = "I") - private int anInt5762; + private int size; @OriginalMember(owner = "client!vi", name = "d", descriptor = "Z") - private final boolean aBoolean300; + private final boolean stream; @OriginalMember(owner = "client!vi", name = "", descriptor = "()V") public GlVertexBufferObject() { @@ -29,66 +29,66 @@ public final class GlVertexBufferObject { } @OriginalMember(owner = "client!vi", name = "", descriptor = "(Z)V") - public GlVertexBufferObject(@OriginalArg(0) boolean arg0) { - this.anInt5760 = -1; - this.anInt5762 = 0; - @Pc(9) GL2 local9 = GlRenderer.gl; - @Pc(12) int[] local12 = new int[1]; - local9.glGenBuffers(1, local12, 0); - this.aBoolean300 = arg0; - this.anInt5760 = local12[0]; - this.anInt5761 = GlCleaner.contextId; + public GlVertexBufferObject(@OriginalArg(0) boolean stream) { + this.id = -1; + this.size = 0; + @Pc(9) GL2 gl = GlRenderer.gl; + @Pc(12) int[] temp = new int[1]; + gl.glGenBuffers(1, temp, 0); + this.stream = stream; + this.id = temp[0]; + this.contextId = GlCleaner.contextId; } @OriginalMember(owner = "client!vi", name = "a", descriptor = "(Ljava/nio/ByteBuffer;)V") - public final void method4515(@OriginalArg(0) ByteBuffer arg0) { - if (arg0.limit() <= this.anInt5762) { - @Pc(6) GL2 local6 = GlRenderer.gl; - local6.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.anInt5760); - local6.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0, arg0.limit(), arg0); + public final void updateArrayBuffer(@OriginalArg(0) ByteBuffer buffer) { + if (buffer.limit() <= this.size) { + @Pc(6) GL2 gl = GlRenderer.gl; + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.id); + gl.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0, buffer.limit(), buffer); } else { - this.method4519(arg0); + this.setArrayBuffer(buffer); } } @OriginalMember(owner = "client!vi", name = "finalize", descriptor = "()V") @Override public final void finalize() throws Throwable { - if (this.anInt5760 != -1) { - GlCleaner.method1489(this.anInt5760, this.anInt5762, this.anInt5761); - this.anInt5760 = -1; - this.anInt5762 = 0; + if (this.id != -1) { + GlCleaner.deleteBuffer(this.id, this.size, this.contextId); + this.id = -1; + this.size = 0; } super.finalize(); } @OriginalMember(owner = "client!vi", name = "a", descriptor = "()V") - public final void method4516() { - @Pc(1) GL2 local1 = GlRenderer.gl; - local1.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.anInt5760); + public final void bindArray() { + @Pc(1) GL2 gl = GlRenderer.gl; + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.id); } @OriginalMember(owner = "client!vi", name = "b", descriptor = "(Ljava/nio/ByteBuffer;)V") - public final void method4517(@OriginalArg(0) ByteBuffer arg0) { - @Pc(1) GL2 local1 = GlRenderer.gl; - local1.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, this.anInt5760); - local1.glBufferData(GL2.GL_ELEMENT_ARRAY_BUFFER, arg0.limit(), arg0, this.aBoolean300 ? GL2.GL_STREAM_DRAW : GL2.GL_STATIC_DRAW); - GlCleaner.onCardGeometry += arg0.limit() - this.anInt5762; - this.anInt5762 = arg0.limit(); + public final void setElementArrayBuffer(@OriginalArg(0) ByteBuffer buffer) { + @Pc(1) GL2 gl = GlRenderer.gl; + gl.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, this.id); + gl.glBufferData(GL2.GL_ELEMENT_ARRAY_BUFFER, buffer.limit(), buffer, this.stream ? GL2.GL_STREAM_DRAW : GL2.GL_STATIC_DRAW); + GlCleaner.onCardGeometry += buffer.limit() - this.size; + this.size = buffer.limit(); } @OriginalMember(owner = "client!vi", name = "b", descriptor = "()V") - public final void method4518() { - @Pc(1) GL2 local1 = GlRenderer.gl; - local1.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, this.anInt5760); + public final void bindElementArray() { + @Pc(1) GL2 gl = GlRenderer.gl; + gl.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, this.id); } @OriginalMember(owner = "client!vi", name = "c", descriptor = "(Ljava/nio/ByteBuffer;)V") - public final void method4519(@OriginalArg(0) ByteBuffer arg0) { - @Pc(1) GL2 local1 = GlRenderer.gl; - local1.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.anInt5760); - local1.glBufferData(GL2.GL_ARRAY_BUFFER, arg0.limit(), arg0, this.aBoolean300 ? GL2.GL_STREAM_DRAW : GL2.GL_STATIC_DRAW); - GlCleaner.onCardGeometry += arg0.limit() - this.anInt5762; - this.anInt5762 = arg0.limit(); + public final void setArrayBuffer(@OriginalArg(0) ByteBuffer buffer) { + @Pc(1) GL2 gl = GlRenderer.gl; + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, this.id); + gl.glBufferData(GL2.GL_ARRAY_BUFFER, buffer.limit(), buffer, this.stream ? GL2.GL_STREAM_DRAW : GL2.GL_STATIC_DRAW); + GlCleaner.onCardGeometry += buffer.limit() - this.size; + this.size = buffer.limit(); } } diff --git a/client/src/main/java/rt4/HintArrowManager.java b/client/src/main/java/rt4/HintArrowManager.java index 449d108..aaddd18 100644 --- a/client/src/main/java/rt4/HintArrowManager.java +++ b/client/src/main/java/rt4/HintArrowManager.java @@ -50,8 +50,8 @@ public class HintArrowManager { for (local94 = 0; local94 < local68.vertexCount; local94++) { local68.vertexY[local94] += SceneGraph.getTileHeight(Player.level, local68.vertexX[local94] + arg3, local68.vertexZ[local94] + arg1) - arg5; } - local68.bounds.valid = false; local68.vertexBuffer.valid = false; + local68.bounds.valid = false; } } else { @Pc(142) SoftwareModel local142 = (SoftwareModel) model; diff --git a/client/src/main/java/rt4/IgnoreList.java b/client/src/main/java/rt4/IgnoreList.java index b821d25..ff6872b 100644 --- a/client/src/main/java/rt4/IgnoreList.java +++ b/client/src/main/java/rt4/IgnoreList.java @@ -8,7 +8,7 @@ public class IgnoreList { @OriginalMember(owner = "client!pf", name = "h", descriptor = "[J") public static final long[] encodedUsernames = new long[100]; @OriginalMember(owner = "client!pi", name = "V", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array134 = new JagString[100]; + public static final JagString[] usernames = new JagString[100]; @OriginalMember(owner = "client!cl", name = "Z", descriptor = "I") public static int size = 0; @@ -18,7 +18,7 @@ public class IgnoreList { return false; } for (@Pc(11) int local11 = 0; local11 < size; local11++) { - if (arg0.equalsIgnoreCase(aClass100Array134[local11])) { + if (arg0.equalsIgnoreCase(usernames[local11])) { return true; } } @@ -53,7 +53,7 @@ public class IgnoreList { return; } encodedUsernames[size] = arg0; - aClass100Array134[size++] = Base37.decode37(arg0); + usernames[size++] = Base37.decode37(arg0); FriendsList.transmitAt = InterfaceList.transmitTimer; Protocol.outboundBuffer.p1isaac(34); Protocol.outboundBuffer.p8(arg0); @@ -69,7 +69,7 @@ public class IgnoreList { size--; for (@Pc(36) int local36 = local12; local36 < size; local36++) { encodedUsernames[local36] = encodedUsernames[local36 + 1]; - aClass100Array134[local36] = aClass100Array134[local36 + 1]; + usernames[local36] = usernames[local36 + 1]; } FriendsList.transmitAt = InterfaceList.transmitTimer; Protocol.outboundBuffer.p1isaac(213); diff --git a/client/src/main/java/rt4/IntUtils.java b/client/src/main/java/rt4/IntUtils.java index b3e33a8..345ac84 100644 --- a/client/src/main/java/rt4/IntUtils.java +++ b/client/src/main/java/rt4/IntUtils.java @@ -58,4 +58,9 @@ public class IntUtils { } return arg0 + local5; } + + @OriginalMember(owner = "client!gd", name = "a", descriptor = "(IIBI)I") + public static int clamp(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { + return arg2 > arg1 ? arg2 : arg1 > arg0 ? arg0 : arg1; + } } diff --git a/client/src/main/java/rt4/InterfaceList.java b/client/src/main/java/rt4/InterfaceList.java index 25d3068..2a8007a 100644 --- a/client/src/main/java/rt4/InterfaceList.java +++ b/client/src/main/java/rt4/InterfaceList.java @@ -29,6 +29,10 @@ public class InterfaceList { public static final JagString aClass100_903 = JagString.parse("Hidden)2"); @OriginalMember(owner = "client!ja", name = "f", descriptor = "Lclient!ih;") public static final LinkedList mediumPriorityRequests = new LinkedList(); + @OriginalMember(owner = "client!ac", name = "i", descriptor = "Lclient!ih;") + public static final LinkedList highPriorityRequests = new LinkedList(); + @OriginalMember(owner = "client!sc", name = "z", descriptor = "[Z") + public static final boolean[] aBooleanArray116 = new boolean[100]; @OriginalMember(owner = "client!bn", name = "V", descriptor = "I") public static int rectangles = 0; @OriginalMember(owner = "client!md", name = "W", descriptor = "I") @@ -79,6 +83,16 @@ public class InterfaceList { public static Component aClass13_22; @OriginalMember(owner = "client!ok", name = "b", descriptor = "I") public static int anInt4271; + @OriginalMember(owner = "client!lg", name = "b", descriptor = "Z") + public static boolean aBoolean174 = false; + @OriginalMember(owner = "client!ac", name = "n", descriptor = "I") + public static int mouseOverInventoryObjectIndex = 0; + @OriginalMember(owner = "client!jj", name = "j", descriptor = "Z") + public static boolean draggingClickedInventoryObject = false; + @OriginalMember(owner = "client!rg", name = "s", descriptor = "I") + public static int anInt5574 = -1; + @OriginalMember(owner = "client!oj", name = "v", descriptor = "I") + public static int anInt4311 = -2; @OriginalMember(owner = "client!ab", name = "a", descriptor = "(ZLclient!ve;Lclient!ve;Lclient!ve;Lclient!ve;)V") public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) Js5 arg2, @OriginalArg(4) Js5 arg3) { @@ -214,7 +228,7 @@ public class InterfaceList { @OriginalMember(owner = "client!dg", name = "a", descriptor = "(ILclient!be;)V") public static void redraw(@OriginalArg(1) Component arg0) { - if (Static182.anInt4311 == arg0.rectangleLoop) { + if (anInt4311 == arg0.rectangleLoop) { aBooleanArray100[arg0.rectangle] = true; } } @@ -224,7 +238,7 @@ public class InterfaceList { if (!getServerActiveProperties(arg0).isButtonEnabled(arg1) && arg0.onOptionClick == null) { return null; } else if (arg0.ops == null || arg0.ops.length <= arg1 || arg0.ops[arg1] == null || arg0.ops[arg1].trim().length() == 0) { - return Static121.qaOpTest ? JagString.concatenate(new JagString[]{aClass100_903, JagString.parseInt(arg1)}) : null; + return Cheat.qaOpTest ? JagString.concatenate(new JagString[]{aClass100_903, JagString.parseInt(arg1)}) : null; } else { return arg0.ops[arg1]; } @@ -395,7 +409,7 @@ public class InterfaceList { } else { arg0.x = arg2 - (arg2 * arg0.baseX >> 14) - arg0.width; } - if (!Static121.qaOpTest || getServerActiveProperties(arg0).events == 0 && arg0.type != 0) { + if (!Cheat.qaOpTest || getServerActiveProperties(arg0).events == 0 && arg0.type != 0) { return; } if (arg0.y < 0) { @@ -462,7 +476,7 @@ public class InterfaceList { if (arg2.dynamicHeightValue == 4) { arg2.height = arg2.aspectHeight * arg2.width / arg2.aspectWidth; } - if (Static121.qaOpTest && (getServerActiveProperties(arg2).events != 0 || arg2.type == 0)) { + if (Cheat.qaOpTest && (getServerActiveProperties(arg2).events != 0 || arg2.type == 0)) { if (arg2.height < 5 && arg2.width < 5) { arg2.height = 5; arg2.width = 5; @@ -659,7 +673,7 @@ public class InterfaceList { aClass13_12 = component; } if (component == Static40.aClass13_1) { - Static146.aBoolean174 = true; + aBoolean174 = true; Static81.anInt2225 = local50; anInt5103 = local55; } @@ -818,7 +832,7 @@ public class InterfaceList { request = new HookRequest(); request.source = component; request.arguments = component.onTimer; - Static4.highPriorityRequests.addTail(request); + highPriorityRequests.addTail(request); } @Pc(966) HookRequest request2; if (component.onVarcTransmit != null && VarcDomain.updatedVarcsWriterIndex > component.updatedVarcsReaderIndex) { @@ -1051,7 +1065,7 @@ public class InterfaceList { PlayerList.self.zFine = 3000; PlayerList.self.xFine = 3000; if (!GlRenderer.enabled) { - Flames.method2743(client.js5Archive8); + Flames.load(client.js5Archive8); client.setGameState(10); return; } @@ -1065,4 +1079,44 @@ public class InterfaceList { LoginManager.setupLoadingScreenRegion(); client.setGameState(28); } + + @OriginalMember(owner = "client!jg", name = "a", descriptor = "(IBIII)V") + public static void forceRedrawScreen(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + for (@Pc(3) int local3 = 0; local3 < rectangles; local3++) { + if (arg0 < rectangleX[local3] + rectangleWidth[local3] && arg0 + arg3 > rectangleX[local3] && rectangleY[local3] + rectangleHeight[local3] > arg1 && rectangleY[local3] < arg2 + arg1) { + rectangleRedraw[local3] = true; + } + } + } + + @OriginalMember(owner = "client!jm", name = "a", descriptor = "(Z)V") + public static void method2460() { + if (topLevelInterface != -1) { + Static96.method1949(topLevelInterface); + } + for (@Pc(15) int local15 = 0; local15 < rectangles; local15++) { + if (aBooleanArray100[local15]) { + rectangleRedraw[local15] = true; + } + aBooleanArray116[local15] = aBooleanArray100[local15]; + aBooleanArray100[local15] = false; + } + Static87.anInt2503 = -1; + mouseOverInventoryInterface = null; + anInt4311 = client.loop; + if (GlRenderer.enabled) { + ScriptRunner.aBoolean299 = true; + } + anInt5574 = -1; + if (topLevelInterface != -1) { + rectangles = 0; + Static9.method182(); + } + if (GlRenderer.enabled) { + GlRaster.method1177(); + } else { + SoftwareRaster.method2503(); + } + Protocol.anInt4247 = 0; + } } diff --git a/client/src/main/java/rt4/JagString.java b/client/src/main/java/rt4/JagString.java index f3e396d..a92d3f4 100644 --- a/client/src/main/java/rt4/JagString.java +++ b/client/src/main/java/rt4/JagString.java @@ -336,7 +336,7 @@ public final class JagString implements StringInterface { } if (local46 == 9) { for (local124 = 0; local124 < 25; local124++) { - if (Static182.aBooleanArray97[local124]) { + if (PlayerSkillXpTable.ENABLED_SKILLS[local124]) { local41 += PlayerSkillXpTable.baseLevels[local124]; } } diff --git a/client/src/main/java/rt4/Js5GlTextureProvider.java b/client/src/main/java/rt4/Js5GlTextureProvider.java index d823c82..11f4642 100644 --- a/client/src/main/java/rt4/Js5GlTextureProvider.java +++ b/client/src/main/java/rt4/Js5GlTextureProvider.java @@ -134,7 +134,7 @@ public final class Js5GlTextureProvider implements TextureProvider { @OriginalMember(owner = "client!nk", name = "a", descriptor = "(ZI)V") public final void method3239(@OriginalArg(1) int arg0) { - for (@Pc(19) GlTexture local19 = (GlTexture) this.glTextures.method1808(); local19 != null; local19 = (GlTexture) this.glTextures.method1813()) { + for (@Pc(19) GlTexture local19 = (GlTexture) this.glTextures.method1808(); local19 != null; local19 = (GlTexture) this.glTextures.next()) { if (local19.aBoolean287) { local19.method4300(arg0); local19.aBoolean287 = false; diff --git a/client/src/main/java/rt4/Light_Class45.java b/client/src/main/java/rt4/Light_Class45.java index 28885b1..ab85ca6 100644 --- a/client/src/main/java/rt4/Light_Class45.java +++ b/client/src/main/java/rt4/Light_Class45.java @@ -148,10 +148,10 @@ public final class Light_Class45 { if (GlRenderer.arbVboSupported) { this.aClass155_1 = new GlVertexBufferObject(); @Pc(173) ByteBuffer local173 = ByteBuffer.wrap(local15.data); - this.aClass155_1.method4519(local173); + this.aClass155_1.setArrayBuffer(local173); this.aClass155_2 = new GlVertexBufferObject(); @Pc(186) ByteBuffer local186 = ByteBuffer.wrap(local7.data); - this.aClass155_2.method4517(local186); + this.aClass155_2.setElementArrayBuffer(local186); } else { this.aByteBuffer1 = ByteBuffer.allocateDirect(local15.offset); this.aByteBuffer1.put(local15.data); @@ -186,10 +186,10 @@ public final class Light_Class45 { public final void method1556() { @Pc(1) GL2 local1 = GlRenderer.gl; if (GlRenderer.arbVboSupported) { - this.aClass155_1.method4516(); + this.aClass155_1.bindArray(); local1.glInterleavedArrays(GL2.GL_C4UB_V3F, 16, 0L); GlRenderer.normalArrayEnabled = false; - this.aClass155_2.method4518(); + this.aClass155_2.bindElementArray(); local1.glDrawElements(GL2.GL_TRIANGLES, this.anInt2018, GL2.GL_UNSIGNED_INT, 0L); return; } diff --git a/client/src/main/java/rt4/LiquidMaterialRenderer.java b/client/src/main/java/rt4/LiquidMaterialRenderer.java index f4cfb6a..9fa38fb 100644 --- a/client/src/main/java/rt4/LiquidMaterialRenderer.java +++ b/client/src/main/java/rt4/LiquidMaterialRenderer.java @@ -34,8 +34,8 @@ public final class LiquidMaterialRenderer implements MaterialRenderer { @Pc(21) GL2 local21 = GlRenderer.gl; local21.glGenProgramsARB(1, local19, 0); this.anInt4830 = local19[0]; - @Pc(42) int[][] local42 = Static33.method874(0.4F); - @Pc(53) int[][] local53 = Static33.method874(0.4F); + @Pc(42) int[][] local42 = method874(0.4F); + @Pc(53) int[][] local53 = method874(0.4F); @Pc(58) Buffer local58 = new Buffer(262144); for (@Pc(60) int local60 = 0; local60 < 256; local60++) { @Pc(67) int[] local67 = local42[local60]; @@ -63,6 +63,23 @@ public final class LiquidMaterialRenderer implements MaterialRenderer { } } + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZIIIIIIFB)[[I") + public static int[][] method874(@OriginalArg(7) float arg0) { + @Pc(15) int[][] local15 = new int[256][64]; + @Pc(19) TextureOp34 local19 = new TextureOp34(); + local19.anInt648 = (int) (arg0 * 4096.0F); + local19.anInt642 = 3; + local19.anInt641 = 4; + local19.aBoolean44 = false; + local19.anInt646 = 8; + local19.postDecode(); + Texture.setSize(256, 64); + for (@Pc(46) int local46 = 0; local46 < 256; local46++) { + local19.method584(local46, local15[local46]); + } + return local15; + } + @OriginalMember(owner = "client!rd", name = "a", descriptor = "()V") @Override public final void unbind() { diff --git a/client/src/main/java/rt4/LoginManager.java b/client/src/main/java/rt4/LoginManager.java index 1e60c85..3909a05 100644 --- a/client/src/main/java/rt4/LoginManager.java +++ b/client/src/main/java/rt4/LoginManager.java @@ -114,6 +114,8 @@ public class LoginManager { public static int mapFilesMissingCount = 0; @OriginalMember(owner = "client!t", name = "y", descriptor = "I") public static int loadingScreenState = 0; + @OriginalMember(owner = "client!sk", name = "lb", descriptor = "Z") + public static boolean aBoolean252 = false; @OriginalMember(owner = "client!dm", name = "d", descriptor = "(I)V") public static void clear() { @@ -193,7 +195,7 @@ public class LoginManager { return; } local126 = Protocol.socket.read() << 8 | Protocol.socket.read(); - Static176.hopWorld(local126); + WorldList.hopWorld(local126); if (Player.worldId == -1) { anInt4937 = 0; reply = 6; @@ -1060,7 +1062,7 @@ public class LoginManager { client.audioLoop(); ChangeLocRequest.flush(); client.method3768(); - Static231.aBoolean252 = false; + aBoolean252 = false; if (GameShell.frame != null && Protocol.socket != null && client.gameState == 25) { Protocol.outboundBuffer.p1isaac(20); Protocol.outboundBuffer.p4(1057001181); diff --git a/client/src/main/java/rt4/LruHashTable.java b/client/src/main/java/rt4/LruHashTable.java index c76359b..3883bc6 100644 --- a/client/src/main/java/rt4/LruHashTable.java +++ b/client/src/main/java/rt4/LruHashTable.java @@ -12,70 +12,70 @@ public final class LruHashTable { private SecondaryNode aClass3_Sub2_37 = new SecondaryNode(); @OriginalMember(owner = "client!gn", name = "s", descriptor = "Lclient!ce;") - private final SecondaryLinkedList aClass16_1 = new SecondaryLinkedList(); + private final SecondaryLinkedList queue = new SecondaryLinkedList(); @OriginalMember(owner = "client!gn", name = "u", descriptor = "I") - private int anInt2314; + private int available; @OriginalMember(owner = "client!gn", name = "r", descriptor = "I") - private final int anInt2313; + private final int capacity; @OriginalMember(owner = "client!gn", name = "q", descriptor = "Lclient!sc;") - private final HashTable aClass133_5; + private final HashTable table; @OriginalMember(owner = "client!gn", name = "", descriptor = "(I)V") public LruHashTable(@OriginalArg(0) int arg0) { @Pc(13) int local13 = 1; - this.anInt2314 = arg0; + this.available = arg0; while (arg0 > local13 + local13) { local13 += local13; } - this.anInt2313 = arg0; - this.aClass133_5 = new HashTable(local13); + this.capacity = arg0; + this.table = new HashTable(local13); } @OriginalMember(owner = "client!gn", name = "a", descriptor = "(JI)Lclient!rg;") public final SecondaryNode get(@OriginalArg(0) long arg0) { - @Pc(16) SecondaryNode local16 = (SecondaryNode) this.aClass133_5.get(arg0); + @Pc(16) SecondaryNode local16 = (SecondaryNode) this.table.get(arg0); if (local16 != null) { - this.aClass16_1.addTail(local16); + this.queue.addTail(local16); } return local16; } @OriginalMember(owner = "client!gn", name = "a", descriptor = "(I)Lclient!ab;") public final Node method1808() { - return this.aClass133_5.head(); + return this.table.head(); } @OriginalMember(owner = "client!gn", name = "a", descriptor = "(Lclient!rg;JB)V") public final void put(@OriginalArg(0) SecondaryNode arg0, @OriginalArg(1) long arg1) { - if (this.anInt2314 == 0) { - @Pc(14) SecondaryNode local14 = this.aClass16_1.removeHead(); + if (this.available == 0) { + @Pc(14) SecondaryNode local14 = this.queue.removeHead(); local14.unlink(); local14.unlinkSecondary(); if (this.aClass3_Sub2_37 == local14) { - local14 = this.aClass16_1.removeHead(); + local14 = this.queue.removeHead(); local14.unlink(); local14.unlinkSecondary(); } } else { - this.anInt2314--; + this.available--; } - this.aClass133_5.put(arg0, arg1); - this.aClass16_1.addTail(arg0); + this.table.put(arg0, arg1); + this.queue.addTail(arg0); } @OriginalMember(owner = "client!gn", name = "b", descriptor = "(I)Lclient!ab;") - public final Node method1813() { - return this.aClass133_5.next(); + public final Node next() { + return this.table.next(); } @OriginalMember(owner = "client!gn", name = "c", descriptor = "(I)V") public final void clear() { - this.aClass16_1.clear(); - this.aClass133_5.clear(); + this.queue.clear(); + this.table.clear(); this.aClass3_Sub2_37 = new SecondaryNode(); - this.anInt2314 = this.anInt2313; + this.available = this.capacity; } } diff --git a/client/src/main/java/rt4/Map.java b/client/src/main/java/rt4/Map.java index 8fad81e..e360740 100644 --- a/client/src/main/java/rt4/Map.java +++ b/client/src/main/java/rt4/Map.java @@ -12,7 +12,7 @@ public final class Map extends SecondaryNode { public int displayMinZ = 0; @OriginalMember(owner = "client!bn", name = "L", descriptor = "I") - public int anInt759 = -1; + public int backgroundColor = -1; @OriginalMember(owner = "client!bn", name = "S", descriptor = "I") public int displayMinX = 12800; @@ -24,35 +24,35 @@ public final class Map extends SecondaryNode { public int displayMaxX = 12800; @OriginalMember(owner = "client!bn", name = "P", descriptor = "Z") - public boolean aBoolean50 = true; + public boolean valid = true; @OriginalMember(owner = "client!bn", name = "db", descriptor = "I") public int defaultZoom = -1; @OriginalMember(owner = "client!bn", name = "T", descriptor = "I") - public final int anInt764; + public final int originZ; @OriginalMember(owner = "client!bn", name = "bb", descriptor = "Lclient!na;") public final JagString group; @OriginalMember(owner = "client!bn", name = "Q", descriptor = "Lclient!na;") - public final JagString aClass100_137; + public final JagString name; @OriginalMember(owner = "client!bn", name = "Y", descriptor = "I") - public final int anInt769; + public final int originX; @OriginalMember(owner = "client!bn", name = "ab", descriptor = "Lclient!ih;") public final LinkedList chunks; @OriginalMember(owner = "client!bn", name = "", descriptor = "(Lclient!na;Lclient!na;IIIZI)V") public Map(@OriginalArg(0) JagString arg0, @OriginalArg(1) JagString arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) boolean arg5, @OriginalArg(6) int arg6) { - this.anInt764 = arg3; - this.anInt759 = arg4; - this.aBoolean50 = arg5; + this.originZ = arg3; + this.backgroundColor = arg4; + this.valid = arg5; this.group = arg0; - this.aClass100_137 = arg1; + this.name = arg1; this.defaultZoom = arg6; - this.anInt769 = arg2; + this.originX = arg2; if (this.defaultZoom == 255) { this.defaultZoom = 0; } @@ -60,14 +60,14 @@ public final class Map extends SecondaryNode { } @OriginalMember(owner = "client!rb", name = "a", descriptor = "(Lclient!wa;Z)Lclient!bn;") - public static Map create(@OriginalArg(0) Buffer arg0) { - @Pc(35) Map local35 = new Map(arg0.gjstr(), arg0.gjstr(), arg0.g2(), arg0.g2(), arg0.g4(), arg0.g1() == 1, arg0.g1()); - @Pc(39) int local39 = arg0.g1(); - for (@Pc(41) int local41 = 0; local41 < local39; local41++) { - local35.chunks.addTail(new MapChunk(arg0.g2(), arg0.g2(), arg0.g2(), arg0.g2())); + public static Map create(@OriginalArg(0) Buffer buffer) { + @Pc(35) Map map = new Map(buffer.gjstr(), buffer.gjstr(), buffer.g2(), buffer.g2(), buffer.g4(), buffer.g1() == 1, buffer.g1()); + @Pc(39) int len = buffer.g1(); + for (@Pc(41) int i = 0; i < len; i++) { + map.chunks.addTail(new MapChunk(buffer.g2(), buffer.g2(), buffer.g2(), buffer.g2())); } - local35.computeBounds(); - return local35; + map.computeBounds(); + return map; } @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IBI)Z") @@ -75,8 +75,8 @@ public final class Map extends SecondaryNode { if (this.displayMinX > arg1 || arg1 > this.displayMaxZ || arg0 < this.displayMaxX || arg0 > this.displayMinZ) { return false; } - for (@Pc(33) MapChunk local33 = (MapChunk) this.chunks.head(); local33 != null; local33 = (MapChunk) this.chunks.next()) { - if (local33.method2760(arg0, arg1)) { + for (@Pc(33) MapChunk chunk = (MapChunk) this.chunks.head(); chunk != null; chunk = (MapChunk) this.chunks.next()) { + if (chunk.containsDisplay(arg0, arg1)) { return true; } } @@ -90,17 +90,17 @@ public final class Map extends SecondaryNode { this.displayMinZ = 0; this.displayMinX = 12800; for (@Pc(29) MapChunk local29 = (MapChunk) this.chunks.head(); local29 != null; local29 = (MapChunk) this.chunks.next()) { - if (local29.anInt3522 < this.displayMaxX) { - this.displayMaxX = local29.anInt3522; + if (local29.displayMaxX < this.displayMaxX) { + this.displayMaxX = local29.displayMaxX; } - if (local29.anInt3520 < this.displayMinX) { - this.displayMinX = local29.anInt3520; + if (local29.displayMinX < this.displayMinX) { + this.displayMinX = local29.displayMinX; } - if (local29.anInt3523 > this.displayMaxZ) { - this.displayMaxZ = local29.anInt3523; + if (local29.displayMaxZ > this.displayMaxZ) { + this.displayMaxZ = local29.displayMaxZ; } - if (this.displayMinZ < local29.anInt3524) { - this.displayMinZ = local29.anInt3524; + if (this.displayMinZ < local29.displayMinZ) { + this.displayMinZ = local29.displayMinZ; } } } diff --git a/client/src/main/java/rt4/MapChunk.java b/client/src/main/java/rt4/MapChunk.java index 68d012e..b8d3c09 100644 --- a/client/src/main/java/rt4/MapChunk.java +++ b/client/src/main/java/rt4/MapChunk.java @@ -8,27 +8,27 @@ import org.openrs2.deob.annotation.OriginalMember; public final class MapChunk extends Node { @OriginalMember(owner = "client!lh", name = "y", descriptor = "I") - public final int anInt3524; + public final int displayMinZ; @OriginalMember(owner = "client!lh", name = "v", descriptor = "I") - public final int anInt3522; + public final int displayMaxX; @OriginalMember(owner = "client!lh", name = "w", descriptor = "I") - public final int anInt3523; + public final int displayMaxZ; @OriginalMember(owner = "client!lh", name = "t", descriptor = "I") - public final int anInt3520; + public final int displayMinX; @OriginalMember(owner = "client!lh", name = "", descriptor = "(IIII)V") public MapChunk(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - this.anInt3524 = arg3; - this.anInt3522 = arg1; - this.anInt3523 = arg2; - this.anInt3520 = arg0; + this.displayMinZ = arg3; + this.displayMaxX = arg1; + this.displayMaxZ = arg2; + this.displayMinX = arg0; } @OriginalMember(owner = "client!lh", name = "a", descriptor = "(BII)Z") - public final boolean method2760(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - return arg1 >= this.anInt3520 && this.anInt3523 >= arg1 && this.anInt3522 <= arg0 && arg0 <= this.anInt3524; + public final boolean containsDisplay(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + return arg1 >= this.displayMinX && this.displayMaxZ >= arg1 && this.displayMaxX <= arg0 && arg0 <= this.displayMinZ; } } diff --git a/client/src/main/java/rt4/MapList.java b/client/src/main/java/rt4/MapList.java index 347de99..eb4b849 100644 --- a/client/src/main/java/rt4/MapList.java +++ b/client/src/main/java/rt4/MapList.java @@ -42,7 +42,7 @@ public class MapList { @OriginalMember(owner = "client!ce", name = "a", descriptor = "(IBI)Lclient!bn;") public static Map getContainingSource(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { for (@Pc(10) Map local10 = (Map) aClass69_120.head(); local10 != null; local10 = (Map) aClass69_120.next()) { - if (local10.aBoolean50 && local10.method664(arg1, arg0)) { + if (local10.valid && local10.method664(arg1, arg0)) { return local10; } } diff --git a/client/src/main/java/rt4/MiniMap.java b/client/src/main/java/rt4/MiniMap.java index 68f6cdc..f2300b0 100644 --- a/client/src/main/java/rt4/MiniMap.java +++ b/client/src/main/java/rt4/MiniMap.java @@ -469,9 +469,45 @@ public class MiniMap { if (InterfaceList.getServerActiveProperties(arg0).getTargetMask() == 0) { return null; } else if (arg0.targetVerb == null || arg0.targetVerb.trim().length() == 0) { - return Static121.qaOpTest ? aClass100_668 : null; + return Cheat.qaOpTest ? aClass100_668 : null; } else { return arg0.targetVerb; } } + + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ILclient!pb;ZIIII)Z") + public static boolean renderScenery(@OriginalArg(0) int arg0, @OriginalArg(1) LocType arg1, @OriginalArg(5) int arg2, @OriginalArg(6) int arg3) { + @Pc(10) MsiType msiType = MsiTypeList.get(arg1.mapSceneId); + if (msiType.spriteId == -1) { + return true; + } + if (arg1.mapSceneRotated) { + @Pc(24) int local24 = arg3 + arg1.mapSceneAngleOffset; + arg3 = local24 & 0x3; + } else { + arg3 = 0; + } + @Pc(42) SoftwareIndexedSprite local42 = msiType.getSprite(arg3); + if (local42 == null) { + return false; + } + @Pc(49) int local49 = arg1.width; + @Pc(52) int local52 = arg1.length; + if ((arg3 & 0x1) == 1) { + local49 = arg1.length; + local52 = arg1.width; + } + @Pc(66) int local66 = local42.innerWidth; + @Pc(69) int local69 = local42.innerHeight; + if (msiType.aBoolean2) { + local69 = local52 * 4; + local66 = local49 * 4; + } + if (msiType.anInt11 == 0) { + local42.method1398(arg0 * 4 + 48, (-local52 + -arg2 + 104) * 4 + 48, local66, local69); + } else { + local42.method1390(arg0 * 4 + 48, (-local52 + -arg2 + 104) * 4 + 48, local66, local69, msiType.anInt11); + } + return true; + } } diff --git a/client/src/main/java/rt4/MiniMenu.java b/client/src/main/java/rt4/MiniMenu.java index 7a9badf..b93f3b2 100644 --- a/client/src/main/java/rt4/MiniMenu.java +++ b/client/src/main/java/rt4/MiniMenu.java @@ -75,6 +75,8 @@ public class MiniMenu { public static final JagString aClass100_1042 = JagString.parse("Null"); @OriginalMember(owner = "client!e", name = "pc", descriptor = "[I") public static final int[] anIntArray132 = new int[4]; + @OriginalMember(owner = "client!af", name = "l", descriptor = "[S") + public static final short[] aShortArray2 = new short[]{30, 6, 31, 29, 10, 44, 37, 57}; @OriginalMember(owner = "client!ck", name = "D", descriptor = "Lclient!na;") public static JagString aClass100_203 = null; @OriginalMember(owner = "client!hn", name = "W", descriptor = "Lclient!na;") @@ -1454,7 +1456,7 @@ public class MiniMenu { } else if (Player.secondaryOptions[local275]) { local291 = 2000; } - @Pc(353) short local353 = Static5.aShortArray2[local275]; + @Pc(353) short local353 = aShortArray2[local275]; @Pc(358) short local358 = (short) (local353 + local291); add(Player.cursors[local275], arg0, JagString.concatenate(new JagString[]{COLOR_WHITE, string}), arg3, local358, Player.options[local275], arg1); } diff --git a/client/src/main/java/rt4/Player.java b/client/src/main/java/rt4/Player.java index f125596..11a3409 100644 --- a/client/src/main/java/rt4/Player.java +++ b/client/src/main/java/rt4/Player.java @@ -209,7 +209,7 @@ public final class Player extends PathingEntity { @OriginalMember(owner = "client!bf", name = "c", descriptor = "(I)V") public static void method501() { - if (!GlRenderer.enabled || Static231.aBoolean252) { + if (!GlRenderer.enabled || LoginManager.aBoolean252) { return; } @Pc(14) Tile[][][] local14 = SceneGraph.tiles; @@ -278,7 +278,7 @@ public final class Player extends PathingEntity { } } } - Static231.aBoolean252 = true; + LoginManager.aBoolean252 = true; } @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIB)V") diff --git a/client/src/main/java/rt4/PlayerAppearance.java b/client/src/main/java/rt4/PlayerAppearance.java index 8fbcecc..11c6e5a 100644 --- a/client/src/main/java/rt4/PlayerAppearance.java +++ b/client/src/main/java/rt4/PlayerAppearance.java @@ -67,6 +67,8 @@ public final class PlayerAppearance { @OriginalMember(owner = "client!fm", name = "fb", descriptor = "[I") public static final int[] anIntArray183 = new int[14]; + @OriginalMember(owner = "client!th", name = "i", descriptor = "[I") + public static final int[] anIntArray520 = new int[14]; @OriginalMember(owner = "client!cj", name = "e", descriptor = "[[S") public static short[][] destinationBodyColors; @@ -416,7 +418,7 @@ public final class PlayerAppearance { local381 = local858.frames[local374]; aClass3_Sub2_Sub7Array8[local353] = SeqTypeList.getAnimFrameset(local381 >>> 16); local381 &= 0xFFFF; - Static241.anIntArray520[local353] = local381; + anIntArray520[local353] = local381; if (aClass3_Sub2_Sub7Array8[local353] != null) { local836 |= aClass3_Sub2_Sub7Array8[local353].isColorTransformed(local381); local827 |= aClass3_Sub2_Sub7Array8[local353].isAlphaTransformed(local381); @@ -512,7 +514,7 @@ public final class PlayerAppearance { local598 = 1; while (local481 < local346) { if (aClass3_Sub2_Sub7Array8[local481] != null) { - local1284.method4565(aClass3_Sub2_Sub7Array8[local481], Static241.anIntArray520[local481], aClass3_Sub2_Sub7Array7[local481], anIntArray187[local481], anIntArray183[local481] - 1, anIntArray515[local481], local598, aClass144Array2[local481].aBoolean278, this.anIntArrayArray19[local481]); + local1284.method4565(aClass3_Sub2_Sub7Array8[local481], anIntArray520[local481], aClass3_Sub2_Sub7Array7[local481], anIntArray187[local481], anIntArray183[local481] - 1, anIntArray515[local481], local598, aClass144Array2[local481].aBoolean278, this.anIntArrayArray19[local481]); } local481++; local598 <<= 0x1; diff --git a/client/src/main/java/rt4/PlayerSkillXpTable.java b/client/src/main/java/rt4/PlayerSkillXpTable.java index e8be02d..0436683 100644 --- a/client/src/main/java/rt4/PlayerSkillXpTable.java +++ b/client/src/main/java/rt4/PlayerSkillXpTable.java @@ -20,6 +20,9 @@ public class PlayerSkillXpTable { @OriginalMember(owner = "client!h", name = "S", descriptor = "[I") public static final int[] xpLevelLookup = new int[99]; + @OriginalMember(owner = "client!oj", name = "z", descriptor = "[Z") + public static final boolean[] ENABLED_SKILLS = new boolean[]{true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false}; + @OriginalMember(owner = "client!ha", name = "m", descriptor = "I") public static int updatedStatsWriterIndex = 0; diff --git a/client/src/main/java/rt4/Protocol.java b/client/src/main/java/rt4/Protocol.java index ec023d5..9fc026f 100644 --- a/client/src/main/java/rt4/Protocol.java +++ b/client/src/main/java/rt4/Protocol.java @@ -60,6 +60,8 @@ public class Protocol { public static final int[] anIntArray76 = new int[5]; @OriginalMember(owner = "client!pg", name = "db", descriptor = "Lclient!na;") public static final JagString ASSISTREQ = JagString.parse(":assistreq:"); + @OriginalMember(owner = "client!rj", name = "ab", descriptor = "Lclient!na;") + public static final JagString aClass100_916 = JagString.parse(":clanreq:"); @OriginalMember(owner = "client!jk", name = "B", descriptor = "Lclient!ma;") public static BufferedSocket socket; @OriginalMember(owner = "client!fl", name = "C", descriptor = "Lsignlink!im;") @@ -108,6 +110,8 @@ public class Protocol { public static boolean prevFocus = true; @OriginalMember(owner = "client!rm", name = "c", descriptor = "I") public static int anInt4941 = 1; + @OriginalMember(owner = "client!cj", name = "n", descriptor = "Lsignlink!im;") + public static PrivilegedRequest openUrlRequest; @OriginalMember(owner = "client!g", name = "b", descriptor = "(B)V") public static void readZonePacket() { @@ -1033,7 +1037,7 @@ public class Protocol { if (!ignored && Player.inTutorialIsland == 0) { Chat.add(name, 15, JagString.EMPTY); } - } else if (message.endsWith(Static217.aClass100_916)) { + } else if (message.endsWith(aClass100_916)) { JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); long name37 = name.encode37(); boolean ignored = false; @@ -1571,7 +1575,7 @@ public class Protocol { FriendsList.worldNames[i] = worldName; FriendsList.ranks[i] = x; name = null; - FriendsList.aBooleanArray135[i] = ignored; + FriendsList.sameGame[i] = ignored; break; } } @@ -1581,7 +1585,7 @@ public class Protocol { FriendsList.worlds[FriendsList.size] = worldId; FriendsList.worldNames[FriendsList.size] = worldName; FriendsList.ranks[FriendsList.size] = x; - FriendsList.aBooleanArray135[FriendsList.size] = ignored; + FriendsList.sameGame[FriendsList.size] = ignored; FriendsList.size++; } FriendsList.transmitAt = InterfaceList.transmitTimer; @@ -1607,9 +1611,9 @@ public class Protocol { @Pc(3074) int local3074 = FriendsList.ranks[i]; FriendsList.ranks[i] = FriendsList.ranks[i + 1]; FriendsList.ranks[i + 1] = local3074; - @Pc(3092) boolean local3092 = FriendsList.aBooleanArray135[i]; - FriendsList.aBooleanArray135[i] = FriendsList.aBooleanArray135[i + 1]; - FriendsList.aBooleanArray135[i + 1] = local3092; + @Pc(3092) boolean local3092 = FriendsList.sameGame[i]; + FriendsList.sameGame[i] = FriendsList.sameGame[i + 1]; + FriendsList.sameGame[i + 1] = local3092; } } if (sorting) { @@ -1728,7 +1732,7 @@ public class Protocol { int frequency = inboundBuffer.g1(); int shake4 = inboundBuffer.g2(); setVerifyId(tracknum); - Static176.customCameraActive[cameraId] = true; + Camera.customCameraActive[cameraId] = true; Camera.cameraJitter[cameraId] = jitter; Camera.cameraAmplitude[cameraId] = amplitude; Camera.cameraFrequency[cameraId] = frequency; @@ -1749,7 +1753,7 @@ public class Protocol { InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; return true; } else if (opcode == ServerProt.REFLECTION_CHEAT_CHECK) { - ReflectionCheck.method3654(GameShell.signLink, inboundBuffer, length); + ReflectionCheck.push(GameShell.signLink, inboundBuffer, length); opcode = -1; return true; } else if (opcode == ServerProt.CLIENT_SETVARC_SMALL) { @@ -1812,7 +1816,7 @@ public class Protocol { } else { ScriptRunner.url = url; Static164.newTab = true; - Static33.openUrlRequest = GameShell.signLink.openUrl(new String(url.method3148(), StandardCharsets.ISO_8859_1)); + openUrlRequest = GameShell.signLink.openUrl(new String(url.method3148(), StandardCharsets.ISO_8859_1)); } opcode = -1; return true; @@ -1906,7 +1910,7 @@ public class Protocol { IgnoreList.size = length / 8; for (int i = 0; i < IgnoreList.size; i++) { IgnoreList.encodedUsernames[i] = inboundBuffer.g8(); - IgnoreList.aClass100Array134[i] = Base37.decode37(IgnoreList.encodedUsernames[i]); + IgnoreList.usernames[i] = Base37.decode37(IgnoreList.encodedUsernames[i]); } FriendsList.transmitAt = InterfaceList.transmitTimer; opcode = -1; @@ -2694,13 +2698,13 @@ public class Protocol { if (InterfaceList.clickedInventoryComponent != null) { InterfaceList.redraw(InterfaceList.clickedInventoryComponent); if (InterfaceList.clickedInventoryComponentX + 5 < Mouse.lastMouseX || Mouse.lastMouseX < InterfaceList.clickedInventoryComponentX - 5 || InterfaceList.clickedInventoryComponentY + 5 < Mouse.lastMouseY || InterfaceList.clickedInventoryComponentY - 5 > Mouse.lastMouseY) { - Static123.draggingClickedInventoryObject = true; + InterfaceList.draggingClickedInventoryObject = true; } InterfaceList.clickedInventoryComponentCycle++; if (Mouse.pressedButton == 0) { - if (Static123.draggingClickedInventoryObject && InterfaceList.clickedInventoryComponentCycle >= 5) { - if (InterfaceList.clickedInventoryComponent == InterfaceList.mouseOverInventoryInterface && Static4.mouseOverInventoryObjectIndex != MiniMenu.clickedInventoryIndex) { + if (InterfaceList.draggingClickedInventoryObject && InterfaceList.clickedInventoryComponentCycle >= 5) { + if (InterfaceList.clickedInventoryComponent == InterfaceList.mouseOverInventoryInterface && InterfaceList.mouseOverInventoryObjectIndex != MiniMenu.clickedInventoryIndex) { component = InterfaceList.clickedInventoryComponent; @Pc(1363) byte inserting = 0; @@ -2713,7 +2717,7 @@ public class Protocol { } if (InterfaceList.getServerActiveProperties(component).isObjReplaceEnabled()) { - int newIndex = Static4.mouseOverInventoryObjectIndex; + int newIndex = InterfaceList.mouseOverInventoryObjectIndex; int currentIndex = MiniMenu.clickedInventoryIndex; component.objTypes[currentIndex] = component.objTypes[newIndex]; component.objCounts[currentIndex] = component.objCounts[newIndex]; @@ -2721,7 +2725,7 @@ public class Protocol { component.objCounts[newIndex] = 0; } else if (inserting == 1) { int currentIndex = MiniMenu.clickedInventoryIndex; - int newIndex = Static4.mouseOverInventoryObjectIndex; + int newIndex = InterfaceList.mouseOverInventoryObjectIndex; while (currentIndex != newIndex) { if (currentIndex > newIndex) { component.swapObjs(currentIndex - 1, currentIndex); @@ -2732,10 +2736,10 @@ public class Protocol { } } } else { - component.swapObjs(MiniMenu.clickedInventoryIndex, Static4.mouseOverInventoryObjectIndex); + component.swapObjs(MiniMenu.clickedInventoryIndex, InterfaceList.mouseOverInventoryObjectIndex); } outboundBuffer.p1isaac(231); - outboundBuffer.p2(Static4.mouseOverInventoryObjectIndex); + outboundBuffer.p2(InterfaceList.mouseOverInventoryObjectIndex); outboundBuffer.ip4(InterfaceList.clickedInventoryComponent.id); outboundBuffer.p2add(MiniMenu.clickedInventoryIndex); outboundBuffer.p1sub(inserting); @@ -2750,7 +2754,7 @@ public class Protocol { InterfaceList.clickedInventoryComponent = null; } } - Static146.aBoolean174 = false; + InterfaceList.aBoolean174 = false; InterfaceList.aClass13_12 = null; Static44.aBoolean83 = false; InterfaceList.keyQueueSize = 0; @@ -2773,7 +2777,7 @@ public class Protocol { @Pc(1560) Component prioritySource; @Pc(1555) HookRequest priorityRequest; do { - priorityRequest = (HookRequest) Static4.highPriorityRequests.removeHead(); + priorityRequest = (HookRequest) InterfaceList.highPriorityRequests.removeHead(); if (priorityRequest == null) { while (true) { do { @@ -2883,12 +2887,12 @@ public class Protocol { Mouse.setIdleLoops(14500); outboundBuffer.p1isaac(245); } - if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { - if (Static33.openUrlRequest.result != null) { + if (openUrlRequest != null && openUrlRequest.status == 1) { + if (openUrlRequest.result != null) { ScriptRunner.openUrl(ScriptRunner.url, Static164.newTab); } ScriptRunner.url = null; - Static33.openUrlRequest = null; + openUrlRequest = null; Static164.newTab = false; } Static131.anInt3251++; diff --git a/client/src/main/java/rt4/RawModel.java b/client/src/main/java/rt4/RawModel.java index b855e4d..16f0fb4 100644 --- a/client/src/main/java/rt4/RawModel.java +++ b/client/src/main/java/rt4/RawModel.java @@ -22,6 +22,8 @@ public final class RawModel extends Entity { @OriginalMember(owner = "client!gb", name = "S", descriptor = "I") public static int anInt2138 = 0; + @OriginalMember(owner = "client!ck", name = "K", descriptor = "I") + public static int anInt1053 = 0; @OriginalMember(owner = "client!gb", name = "s", descriptor = "[B") public byte[] triangleAlpha; @@ -51,7 +53,7 @@ public final class RawModel extends Entity { private short minY; @OriginalMember(owner = "client!gb", name = "E", descriptor = "[S") - public short[] aShortArray22; + public short[] triangleSources; @OriginalMember(owner = "client!gb", name = "F", descriptor = "[[I") public int[][] boneTriangles; @@ -267,7 +269,7 @@ public final class RawModel extends Entity { } this.triangleColors = new short[this.triangleCount]; - this.aShortArray22 = new short[this.triangleCount]; + this.triangleSources = new short[this.triangleCount]; if (this.texturedCount > 0) { this.textureTypes = new byte[this.texturedCount]; @@ -332,7 +334,7 @@ public final class RawModel extends Entity { } this.triangleColors[this.triangleCount] = other.triangleColors[t]; - this.aShortArray22[this.triangleCount] = local323; + this.triangleSources[this.triangleCount] = local323; this.triangleVertexA[this.triangleCount] = this.addVertex(other, other.triangleVertexA[t], local323); this.triangleVertexB[this.triangleCount] = this.addVertex(other, other.triangleVertexB[t], local323); this.triangleVertexC[this.triangleCount] = this.addVertex(other, other.triangleVertexC[t], local323); @@ -452,17 +454,6 @@ public final class RawModel extends Entity { return data == null ? null : new RawModel(data); } - @OriginalMember(owner = "client!ja", name = "a", descriptor = "([II)[I") - public static int[] method2308(@OriginalArg(0) int[] arg0) { - if (arg0 == null) { - return null; - } else { - @Pc(18) int[] local18 = new int[arg0.length]; - ArrayUtils.copy(arg0, 0, local18, 0, arg0.length); - return local18; - } - } - @OriginalMember(owner = "client!gb", name = "c", descriptor = "()V") public final void negateXz() { for (@Pc(1) int v = 0; v < this.vertexCount; v++) { @@ -786,9 +777,9 @@ public final class RawModel extends Entity { m.triangleNormals = this.triangleNormals; m.aClass57Array2 = this.aClass57Array2; if (orientation == 3) { - m.vertexX = method2308(this.vertexX); - m.vertexY = method2308(this.vertexY); - m.vertexZ = method2308(this.vertexZ); + m.vertexX = ArrayUtils.copyOfNullable(this.vertexX); + m.vertexY = ArrayUtils.copyOfNullable(this.vertexY); + m.vertexZ = ArrayUtils.copyOfNullable(this.vertexZ); } else { m.vertexX = this.vertexX; m.vertexY = new int[m.vertexCount]; diff --git a/client/src/main/java/rt4/ReflectionCheck.java b/client/src/main/java/rt4/ReflectionCheck.java index 0d0d1b5..123f06d 100644 --- a/client/src/main/java/rt4/ReflectionCheck.java +++ b/client/src/main/java/rt4/ReflectionCheck.java @@ -14,54 +14,55 @@ import java.lang.reflect.Method; public final class ReflectionCheck extends Node { @OriginalMember(owner = "client!qi", name = "u", descriptor = "Lclient!ih;") - public static LinkedList aClass69_113 = new LinkedList(); + public static LinkedList queue = new LinkedList(); + @OriginalMember(owner = "client!ed", name = "p", descriptor = "I") - public int anInt1725; + public int size; @OriginalMember(owner = "client!ed", name = "u", descriptor = "[Lsignlink!im;") - public PrivilegedRequest[] aClass212Array1; + public PrivilegedRequest[] methodRequests; @OriginalMember(owner = "client!ed", name = "v", descriptor = "[I") - public int[] anIntArray137; + public int[] fieldValues; @OriginalMember(owner = "client!ed", name = "w", descriptor = "[I") - public int[] anIntArray138; + public int[] errors; @OriginalMember(owner = "client!ed", name = "y", descriptor = "[I") - public int[] anIntArray139; + public int[] types; @OriginalMember(owner = "client!ed", name = "B", descriptor = "[[[B") - public byte[][][] aByteArrayArrayArray6; + public byte[][][] methodArguments; @OriginalMember(owner = "client!ed", name = "C", descriptor = "[Lsignlink!im;") - public PrivilegedRequest[] aClass212Array2; + public PrivilegedRequest[] fieldRequests; @OriginalMember(owner = "client!ed", name = "F", descriptor = "I") - public int anInt1732; + public int id; @OriginalMember(owner = "client!t", name = "a", descriptor = "(Lclient!i;II)V") public static void loop(@OriginalArg(0) Packet arg0) { while (true) { - @Pc(18) ReflectionCheck local18 = (ReflectionCheck) aClass69_113.head(); + @Pc(18) ReflectionCheck local18 = (ReflectionCheck) queue.head(); if (local18 == null) { return; } @Pc(23) boolean local23 = false; @Pc(25) int local25; - for (local25 = 0; local25 < local18.anInt1725; local25++) { - if (local18.aClass212Array2[local25] != null) { - if (local18.aClass212Array2[local25].status == 2) { - local18.anIntArray138[local25] = -5; + for (local25 = 0; local25 < local18.size; local25++) { + if (local18.fieldRequests[local25] != null) { + if (local18.fieldRequests[local25].status == 2) { + local18.errors[local25] = -5; } - if (local18.aClass212Array2[local25].status == 0) { + if (local18.fieldRequests[local25].status == 0) { local23 = true; } } - if (local18.aClass212Array1[local25] != null) { - if (local18.aClass212Array1[local25].status == 2) { - local18.anIntArray138[local25] = -6; + if (local18.methodRequests[local25] != null) { + if (local18.methodRequests[local25].status == 2) { + local18.errors[local25] = -6; } - if (local18.aClass212Array1[local25].status == 0) { + if (local18.methodRequests[local25].status == 0) { local23 = true; } } @@ -72,32 +73,32 @@ public final class ReflectionCheck extends Node { arg0.p1isaac(163); arg0.p1(0); local25 = arg0.offset; - arg0.p4(local18.anInt1732); - for (@Pc(121) int local121 = 0; local121 < local18.anInt1725; local121++) { - if (local18.anIntArray138[local121] == 0) { + arg0.p4(local18.id); + for (@Pc(121) int local121 = 0; local121 < local18.size; local121++) { + if (local18.errors[local121] == 0) { try { - @Pc(151) int local151 = local18.anIntArray139[local121]; + @Pc(151) int local151 = local18.types[local121]; @Pc(168) Field local168; @Pc(195) int local195; if (local151 == 0) { - local168 = (Field) local18.aClass212Array2[local121].result; + local168 = (Field) local18.fieldRequests[local121].result; local195 = local168.getInt(null); arg0.p1(0); arg0.p4(local195); } else if (local151 == 1) { - local168 = (Field) local18.aClass212Array2[local121].result; - local168.setInt(null, local18.anIntArray137[local121]); + local168 = (Field) local18.fieldRequests[local121].result; + local168.setInt(null, local18.fieldValues[local121]); arg0.p1(0); } else if (local151 == 2) { - local168 = (Field) local18.aClass212Array2[local121].result; + local168 = (Field) local18.fieldRequests[local121].result; local195 = local168.getModifiers(); arg0.p1(0); arg0.p4(local195); } @Pc(234) Method local234; if (local151 == 3) { - local234 = (Method) local18.aClass212Array1[local121].result; - @Pc(239) byte[][] local239 = local18.aByteArrayArrayArray6[local121]; + local234 = (Method) local18.methodRequests[local121].result; + @Pc(239) byte[][] local239 = local18.methodArguments[local121]; @Pc(243) Object[] local243 = new Object[local239.length]; for (@Pc(245) int local245 = 0; local245 < local239.length; local245++) { @Pc(259) ObjectInputStream local259 = new ObjectInputStream(new ByteArrayInputStream(local239[local245])); @@ -116,7 +117,7 @@ public final class ReflectionCheck extends Node { arg0.p1(4); } } else if (local151 == 4) { - local234 = (Method) local18.aClass212Array1[local121].result; + local234 = (Method) local18.methodRequests[local121].result; local195 = local234.getModifiers(); arg0.p1(0); arg0.p4(local195); @@ -147,7 +148,7 @@ public final class ReflectionCheck extends Node { arg0.p1(-21); } } else { - arg0.p1(local18.anIntArray138[local121]); + arg0.p1(local18.errors[local121]); } } arg0.addcrc(local25); @@ -157,17 +158,17 @@ public final class ReflectionCheck extends Node { } @OriginalMember(owner = "client!qg", name = "a", descriptor = "(Lsignlink!ll;Lclient!wa;IB)V") - public static void method3654(@OriginalArg(0) SignLink arg0, @OriginalArg(1) Buffer arg1, @OriginalArg(2) int arg2) { - @Pc(17) ReflectionCheck local17 = new ReflectionCheck(); - local17.anInt1725 = arg1.g1(); - local17.anInt1732 = arg1.g4(); - local17.aClass212Array1 = new PrivilegedRequest[local17.anInt1725]; - local17.anIntArray138 = new int[local17.anInt1725]; - local17.aByteArrayArrayArray6 = new byte[local17.anInt1725][][]; - local17.aClass212Array2 = new PrivilegedRequest[local17.anInt1725]; - local17.anIntArray139 = new int[local17.anInt1725]; - local17.anIntArray137 = new int[local17.anInt1725]; - for (@Pc(59) int local59 = 0; local59 < local17.anInt1725; local59++) { + public static void push(@OriginalArg(0) SignLink arg0, @OriginalArg(1) Buffer arg1, @OriginalArg(2) int arg2) { + @Pc(17) ReflectionCheck check = new ReflectionCheck(); + check.size = arg1.g1(); + check.id = arg1.g4(); + check.methodRequests = new PrivilegedRequest[check.size]; + check.errors = new int[check.size]; + check.methodArguments = new byte[check.size][][]; + check.fieldRequests = new PrivilegedRequest[check.size]; + check.types = new int[check.size]; + check.fieldValues = new int[check.size]; + for (@Pc(59) int local59 = 0; local59 < check.size; local59++) { try { @Pc(71) int local71 = arg1.g1(); @Pc(93) String local93; @@ -180,9 +181,9 @@ public final class ReflectionCheck extends Node { if (local71 == 1) { local95 = arg1.g4(); } - local17.anIntArray139[local59] = local71; - local17.anIntArray137[local59] = local95; - local17.aClass212Array2[local59] = arg0.getDeclaredField(local104, method85(local93)); + check.types[local59] = local71; + check.fieldValues[local59] = local95; + check.fieldRequests[local59] = arg0.getDeclaredField(local104, classForName(local93)); } else if (local71 == 3 || local71 == 4) { local93 = new String(arg1.gjstr().method3148()); local104 = new String(arg1.gjstr().method3148()); @@ -200,54 +201,54 @@ public final class ReflectionCheck extends Node { arg1.gdata(local210, local193[local199]); } } - local17.anIntArray139[local59] = local71; - @Pc(234) Class[] local234 = new Class[local95]; + check.types[local59] = local71; + @Pc(234) Class[] local234 = new Class[local95]; for (local210 = 0; local210 < local95; local210++) { - local234[local210] = method85(local171[local210]); + local234[local210] = classForName(local171[local210]); } - local17.aClass212Array1[local59] = arg0.getDeclaredMethod(method85(local93), local234, local104); - local17.aByteArrayArrayArray6[local59] = local193; + check.methodRequests[local59] = arg0.getDeclaredMethod(classForName(local93), local234, local104); + check.methodArguments[local59] = local193; } } catch (@Pc(269) ClassNotFoundException local269) { - local17.anIntArray138[local59] = -1; + check.errors[local59] = -1; } catch (@Pc(276) SecurityException local276) { - local17.anIntArray138[local59] = -2; + check.errors[local59] = -2; } catch (@Pc(283) NullPointerException local283) { - local17.anIntArray138[local59] = -3; + check.errors[local59] = -3; } catch (@Pc(290) Exception local290) { - local17.anIntArray138[local59] = -4; + check.errors[local59] = -4; } catch (@Pc(297) Throwable local297) { - local17.anIntArray138[local59] = -5; + check.errors[local59] = -5; } } - aClass69_113.addTail(local17); + queue.addTail(check); } @OriginalMember(owner = "client!j", name = "c", descriptor = "(I)V") - public static void method4625() { - aClass69_113 = new LinkedList(); + public static void clear() { + queue = new LinkedList(); } @OriginalMember(owner = "client!ag", name = "a", descriptor = "(ILjava/lang/String;)Ljava/lang/Class;") - public static Class method85(@OriginalArg(1) String arg0) throws ClassNotFoundException { - if (arg0.equals("B")) { + public static Class classForName(@OriginalArg(1) String name) throws ClassNotFoundException { + if (name.equals("B")) { return Byte.TYPE; - } else if (arg0.equals("I")) { + } else if (name.equals("I")) { return Integer.TYPE; - } else if (arg0.equals("S")) { + } else if (name.equals("S")) { return Short.TYPE; - } else if (arg0.equals("J")) { + } else if (name.equals("J")) { return Long.TYPE; - } else if (arg0.equals("Z")) { + } else if (name.equals("Z")) { return Boolean.TYPE; - } else if (arg0.equals("F")) { + } else if (name.equals("F")) { return Float.TYPE; - } else if (arg0.equals("D")) { + } else if (name.equals("D")) { return Double.TYPE; - } else if (arg0.equals("C")) { + } else if (name.equals("C")) { return Character.TYPE; } else { - return Class.forName(arg0); + return Class.forName(name); } } } diff --git a/client/src/main/java/rt4/SceneGraph.java b/client/src/main/java/rt4/SceneGraph.java index 410565a..7746a0d 100644 --- a/client/src/main/java/rt4/SceneGraph.java +++ b/client/src/main/java/rt4/SceneGraph.java @@ -24,6 +24,22 @@ public class SceneGraph { public static final LinkedList projectiles = new LinkedList(); @OriginalMember(owner = "client!hk", name = "W", descriptor = "Lclient!ih;") public static final LinkedList spotanims = new LinkedList(); + @OriginalMember(owner = "client!ec", name = "B", descriptor = "[[I") + public static final int[][] anIntArrayArray8 = new int[][]{new int[0], {128, 0, 128, 128, 0, 128}, {0, 0, 128, 0, 128, 128, 64, 128}, {0, 128, 0, 0, 128, 0, 64, 128}, {0, 0, 64, 128, 0, 128}, {128, 128, 64, 128, 128, 0}, {64, 0, 128, 0, 128, 128, 64, 128}, {128, 0, 128, 128, 0, 128, 0, 64, 64, 0}, {0, 0, 64, 0, 0, 64}, {0, 0, 128, 0, 128, 128, 64, 96, 32, 64}, {0, 128, 0, 0, 32, 64, 64, 96, 128, 128}, {0, 128, 0, 0, 32, 32, 96, 32, 128, 0, 128, 128}}; + @OriginalMember(owner = "client!ck", name = "d", descriptor = "[I") + public static final int[] anIntArray80 = new int[]{1, 0, -1, 0}; + @OriginalMember(owner = "client!ka", name = "t", descriptor = "[I") + public static final int[] anIntArray294 = new int[]{0, 0, 2, 0, 0, 2, 1, 1, 0}; + @OriginalMember(owner = "client!uj", name = "A", descriptor = "[I") + public static final int[] anIntArray489 = new int[]{2, 0, 0, 2, 0, 0, 0, 4, 4}; + @OriginalMember(owner = "client!gm", name = "gb", descriptor = "[I") + public static final int[] anIntArray211 = new int[]{0, 4, 4, 8, 0, 0, 8, 0, 0}; + @OriginalMember(owner = "client!kd", name = "sb", descriptor = "[I") + public static final int[] anIntArray307 = new int[]{1, 1, 0, 0, 0, 8, 0, 0, 8}; + @OriginalMember(owner = "client!hb", name = "t", descriptor = "[I") + public static final int[] anIntArray215 = new int[]{160, 192, 80, 96, 0, 144, 80, 48, 160}; + @OriginalMember(owner = "client!km", name = "Rc", descriptor = "[I") + public static final int[] anIntArray324 = new int[]{19, 55, 38, 155, 255, 110, 137, 205, 76}; @OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;") public static Tile[][][] tiles; @@ -107,6 +123,20 @@ public class SceneGraph { public static int anInt2293 = (int) (Math.random() * 17.0D) - 8; @OriginalMember(owner = "client!ok", name = "c", descriptor = "I") public static int anInt4272 = (int) (Math.random() * 33.0D) - 16; + @OriginalMember(owner = "client!rj", name = "R", descriptor = "I") + public static int anInt4903; + @OriginalMember(owner = "client!pi", name = "U", descriptor = "I") + public static int anInt4539; + @OriginalMember(owner = "client!sk", name = "mb", descriptor = "I") + public static int anInt5205; + @OriginalMember(owner = "client!bl", name = "X", descriptor = "I") + public static int anInt730 = -1; + @OriginalMember(owner = "client!aj", name = "Z", descriptor = "[I") + public static int[] anIntArray8; + @OriginalMember(owner = "client!jg", name = "a", descriptor = "I") + public static int anInt3038; + @OriginalMember(owner = "client!ma", name = "z", descriptor = "I") + public static int anInt3604 = -1; @OriginalMember(owner = "client!km", name = "f", descriptor = "(I)Z") public static boolean allLevelsAreVisible() { @@ -861,7 +891,7 @@ public class SceneGraph { for (local168 = 1; local168 < 103; local168++) { label771: for (local173 = 1; local173 < 103; local173++) { - if (underwater || allLevelsAreVisible() || (tileFlags[0][local168][local173] & 0x2) != 0 || (tileFlags[local152][local168][local173] & 0x10) == 0 && Static4.method22(local173, local168, local152) == LoginManager.centralPlane) { + if (underwater || allLevelsAreVisible() || (tileFlags[0][local168][local173] & 0x2) != 0 || (tileFlags[local152][local168][local173] & 0x10) == 0 && method22(local173, local168, local152) == LoginManager.centralPlane) { if (firstVisibleLevel > local152) { firstVisibleLevel = local152; } @@ -1001,11 +1031,11 @@ public class SceneGraph { if (local200 > 103) { @Pc(2025) GlTile[] local2025; if (underwater) { - local2025 = Static193.method3501(tileFlags, tileShapes[local152], tileUnderlays[local152], local146, local1896, anIntArrayArray11, tileOverlays[local152], tileAngles[local152], local1888, local152, local1900, local142, tileHeights[local152], surfaceTileHeights[0]); + local2025 = method3501(tileFlags, tileShapes[local152], tileUnderlays[local152], local146, local1896, anIntArrayArray11, tileOverlays[local152], tileAngles[local152], local1888, local152, local1900, local142, tileHeights[local152], surfaceTileHeights[0]); method2280(local152, local2025); break; } - local2025 = Static193.method3501(tileFlags, tileShapes[local152], tileUnderlays[local152], local146, local1896, null, tileOverlays[local152], tileAngles[local152], local1888, local152, local1900, local142, tileHeights[local152], null); + local2025 = method3501(tileFlags, tileShapes[local152], tileUnderlays[local152], local146, local1896, null, tileOverlays[local152], tileAngles[local152], local1888, local152, local1900, local142, tileHeights[local152], null); @Pc(2049) GlTile[] local2049 = Static1.method2(local1896, local1888, tileHeights[local152], local152, local1900, tileAngles[local152], local146, tileShapes[local152], tileUnderlays[local152], tileOverlays[local152], tileFlags); @Pc(2057) GlTile[] local2057 = new GlTile[local2025.length + local2049.length]; for (local349 = 0; local349 < local2025.length; local349++) { @@ -1413,7 +1443,7 @@ public class SceneGraph { if (local100 instanceof Loc) { ((Loc) local100).method1046(); } else { - Loc.method181(type, anIntArray469[angle] * 8, angle, Static34.anIntArray80[angle] * 8, 4, x, z, arg4); + Loc.method181(type, anIntArray469[angle] * 8, angle, anIntArray80[angle] * 8, 4, x, z, arg4); } } else if (shape == 6) { if (local100 instanceof Loc) { @@ -1607,14 +1637,14 @@ public class SceneGraph { if (underwaterTileHeights == tileHeights) { var9 = anIntArrayArray11[local18][local21]; var10 = var9 & 0xFFFFFF; - if (var10 != Static152.anInt3604) { - Static152.anInt3604 = var10; + if (var10 != anInt3604) { + anInt3604 = var10; WaterMaterialRenderer.method619(var10); FogManager.setFogColor(WaterMaterialRenderer.method2422()); } local65 = var9 >>> 24 << 3; - if (local65 != Static247.anInt730) { - Static247.anInt730 = local65; + if (local65 != anInt730) { + anInt730 = local65; Static147.method2761(local65); } local115 = surfaceTileHeights[0][local18][local21] + surfaceTileHeights[0][local18 + 1][local21] + surfaceTileHeights[0][local18][local21 + 1] + surfaceTileHeights[0][local18 + 1][local21 + 1] >> 2; @@ -1648,13 +1678,13 @@ public class SceneGraph { continue; } } - if (local21 <= Static193.anInt4539 && local21 > LightingManager.anInt4698) { + if (local21 <= anInt4539 && local21 > LightingManager.anInt4698) { local153 = local31[local18][local21 - 1]; if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x8) == 0)) { continue; } } - if (local21 >= Static193.anInt4539 && local21 < LightingManager.anInt4866 - 1) { + if (local21 >= anInt4539 && local21 < LightingManager.anInt4866 - 1) { local153 = local31[local18][local21 + 1]; if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x2) == 0)) { continue; @@ -1671,28 +1701,28 @@ public class SceneGraph { } if (local153.plainTile == null) { if (local153.shapedTile != null) { - Static147.method2762(local153.shapedTile, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, Static9.method187(0, local18, local21)); + Static147.method2762(local153.shapedTile, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, Static9.method187(0, local18, local21)); } } else - Static247.method2610(local153.plainTile, 0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, Static9.method187(0, local18, local21)); + method2610(local153.plainTile, 0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, Static9.method187(0, local18, local21)); var22 = local153.wall; if (var22 != null) { if (GlRenderer.enabled) { if ((var22.anInt3049 & local8.anInt670) == 0) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } else { - LightingManager.method2388(var22.anInt3049, Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local27, local18, local21); + LightingManager.method2388(var22.anInt3049, Static123.anInt3555, Static123.anInt3947, anInt4903, local27, local18, local21); } } - var22.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, var22.xFine - Static123.anInt3555, var22.anInt3051 - Static123.anInt3947, var22.zFine - Static217.anInt4903, var22.key, local24, null); + var22.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, var22.xFine - Static123.anInt3555, var22.anInt3051 - Static123.anInt3947, var22.zFine - anInt4903, var22.key, local24, null); } for (local65 = 0; local65 < local153.sceneryLen; local65++) { var25 = local153.scenery[local65]; if (var25 != null) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - var25.entity.render(var25.anInt1714, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, var25.anInt1699 - Static123.anInt3555, var25.anInt1706 - Static123.anInt3947, var25.anInt1703 - Static217.anInt4903, var25.key, local24, null); + var25.entity.render(var25.anInt1714, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, var25.anInt1699 - Static123.anInt3555, var25.anInt1706 - Static123.anInt3947, var25.anInt1703 - anInt4903, var25.key, local24, null); } } if (GlRenderer.enabled) { @@ -1703,18 +1733,18 @@ public class SceneGraph { if (local8.plainTile == null) { if (local8.shapedTile != null) { if (Static9.method187(local27, local18, local21)) { - Static147.method2762(local8.shapedTile, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + Static147.method2762(local8.shapedTile, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, true); } else { var24 = true; - Static147.method2762(local8.shapedTile, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + Static147.method2762(local8.shapedTile, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, false); } } } else if (Static9.method187(local27, local18, local21)) { - Static247.method2610(local8.plainTile, local27, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + method2610(local8.plainTile, local27, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, true); } else { var24 = true; if (local8.plainTile.anInt4865 != 12345678 || MiniMenu.aBoolean187 && local24 <= MiniMenu.anInt3902) { - Static247.method2610(local8.plainTile, local27, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + method2610(local8.plainTile, local27, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local18, local21, false); } } if (var24) { @@ -1724,9 +1754,9 @@ public class SceneGraph { GlRenderer.method4159(local33 + 50.0F - 1.5F); } if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local549.entity.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local549.xFine - Static123.anInt3555, local549.anInt733 - Static123.anInt3947, local549.zFine - Static217.anInt4903, local549.key, local24, null); + local549.entity.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local549.xFine - Static123.anInt3555, local549.anInt733 - Static123.anInt3947, local549.zFine - anInt4903, local549.key, local24, null); if (GlRenderer.enabled && local549.aBoolean49) { GlRenderer.method4159(local33); } @@ -1742,45 +1772,45 @@ public class SceneGraph { } else if (Static123.anInt4069 < local18) { var10 += 2; } - if (Static193.anInt4539 == local21) { + if (anInt4539 == local21) { var10 += 3; - } else if (Static193.anInt4539 > local21) { + } else if (anInt4539 > local21) { var10 += 6; } - local65 = Static247.anIntArray324[var10]; + local65 = anIntArray324[var10]; local8.anInt670 = anIntArray386[var10]; } if (local616 != null) { - if ((local616.anInt3049 & Static247.anIntArray215[var10]) == 0) { + if ((local616.anInt3049 & anIntArray215[var10]) == 0) { local8.anInt663 = 0; } else if (local616.anInt3049 == 16) { local8.anInt663 = 3; - local8.anInt665 = Static247.anIntArray294[var10]; + local8.anInt665 = anIntArray294[var10]; local8.anInt667 = 3 - local8.anInt665; } else if (local616.anInt3049 == 32) { local8.anInt663 = 6; - local8.anInt665 = Static247.anIntArray489[var10]; + local8.anInt665 = anIntArray489[var10]; local8.anInt667 = 6 - local8.anInt665; } else if (local616.anInt3049 == 64) { local8.anInt663 = 12; - local8.anInt665 = Static247.anIntArray211[var10]; + local8.anInt665 = anIntArray211[var10]; local8.anInt667 = 12 - local8.anInt665; } else { local8.anInt663 = 9; - local8.anInt665 = Static247.anIntArray307[var10]; + local8.anInt665 = anIntArray307[var10]; local8.anInt667 = 9 - local8.anInt665; } if ((local616.anInt3049 & local65) != 0 && !method3850(local27, local18, local21, local616.anInt3049)) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local616.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local616.xFine - Static123.anInt3555, local616.anInt3051 - Static123.anInt3947, local616.zFine - Static217.anInt4903, local616.key, local24, null); + local616.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local616.xFine - Static123.anInt3555, local616.anInt3051 - Static123.anInt3947, local616.zFine - anInt4903, local616.key, local24, null); } if ((local616.anInt3052 & local65) != 0 && !method3850(local27, local18, local21, local616.anInt3052)) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local616.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local616.xFine - Static123.anInt3555, local616.anInt3051 - Static123.anInt3947, local616.zFine - Static217.anInt4903, local616.key, local24, null); + local616.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local616.xFine - Static123.anInt3555, local616.anInt3051 - Static123.anInt3947, local616.zFine - anInt4903, local616.key, local24, null); } } if (local619 != null && !method4611(local27, local18, local21, local619.primary.getMinY())) { @@ -1789,13 +1819,13 @@ public class SceneGraph { } if ((local619.anInt1395 & local65) != 0) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local619.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local619.xFine + local619.xOffset - Static123.anInt3555, local619.anInt1391 - Static123.anInt3947, local619.zFine + local619.zOffset - Static217.anInt4903, local619.key, local24, null); + local619.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local619.xFine + local619.xOffset - Static123.anInt3555, local619.anInt1391 - Static123.anInt3947, local619.zFine + local619.zOffset - anInt4903, local619.key, local24, null); } else if (local619.anInt1395 == 256) { local894 = local619.xFine - Static123.anInt3555; local899 = local619.anInt1391 - Static123.anInt3947; - local904 = local619.zFine - Static217.anInt4903; + local904 = local619.zFine - anInt4903; var17 = local619.anInt1388; if (var17 == 1 || var17 == 2) { var18 = -local894; @@ -1810,14 +1840,14 @@ public class SceneGraph { } if (local928 < var18) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local619.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local894 + local619.xOffset, local899, local904 + local619.zOffset, local619.key, local24, null); + local619.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local894 + local619.xOffset, local899, local904 + local619.zOffset, local619.key, local24, null); } else if (local619.secondary != null) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local619.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local894, local899, local904, local619.key, local24, null); + local619.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local894, local899, local904, local619.key, local24, null); } } if (GlRenderer.enabled) { @@ -1831,9 +1861,9 @@ public class SceneGraph { GlRenderer.method4159(local33 + 50.0F - 1.5F); } if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local1001.entity.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1001.xFine - Static123.anInt3555, local1001.anInt733 - Static123.anInt3947, local1001.zFine - Static217.anInt4903, local1001.key, local24, null); + local1001.entity.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1001.xFine - Static123.anInt3555, local1001.anInt733 - Static123.anInt3947, local1001.zFine - anInt4903, local1001.key, local24, null); if (GlRenderer.enabled && local1001.aBoolean49) { GlRenderer.method4159(local33); } @@ -1841,16 +1871,16 @@ public class SceneGraph { @Pc(1064) ObjStackEntity local1064 = local8.objStack; if (local1064 != null && local1064.anInt3063 == 0) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } if (local1064.secondary != null) { - local1064.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - Static217.anInt4903, local1064.key, local24, null); + local1064.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - anInt4903, local1064.key, local24, null); } if (local1064.tertiary != null) { - local1064.tertiary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - Static217.anInt4903, local1064.key, local24, null); + local1064.tertiary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - anInt4903, local1064.key, local24, null); } if (local1064.primary != null) { - local1064.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - Static217.anInt4903, local1064.key, local24, null); + local1064.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1064.xFine - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.zFine - anInt4903, local1064.key, local24, null); } } } @@ -1862,7 +1892,7 @@ public class SceneGraph { Static7.aClass69_32.addTail(var32); } } - if (local21 < Static193.anInt4539 && (local894 & 0x2) != 0) { + if (local21 < anInt4539 && (local894 & 0x2) != 0) { var32 = local31[local18][local21 + 1]; if (var32 != null && var32.aBoolean46) { Static7.aClass69_32.addTail(var32); @@ -1874,7 +1904,7 @@ public class SceneGraph { Static7.aClass69_32.addTail(var32); } } - if (local21 > Static193.anInt4539 && (local894 & 0x8) != 0) { + if (local21 > anInt4539 && (local894 & 0x8) != 0) { var32 = local31[local18][local21 - 1]; if (var32 != null && var32.aBoolean46) { Static7.aClass69_32.addTail(var32); @@ -1899,42 +1929,42 @@ public class SceneGraph { { if ((var22.key & 0xFC000L) == 16384L) { local65 = var22.xFine - Static123.anInt3555; - local115 = var22.zFine - Static217.anInt4903; + local115 = var22.zFine - anInt4903; local1332 = (int) (var22.key >> 20 & 0x3L); if (local1332 == 0) { local65 -= 64; local115 += 64; if (local115 < local65 && local18 > 0 && local21 < length - 1) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18 - 1, local21 + 1); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18 - 1, local21 + 1); break label882; } } else if (local1332 == 1) { local65 += 64; local115 += 64; if (local115 < -local65 && local18 < width - 1 && local21 < length - 1) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18 + 1, local21 + 1); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18 + 1, local21 + 1); break label882; } } else if (local1332 == 2) { local65 += 64; local115 -= 64; if (local115 > local65 && local18 < width - 1 && local21 > 0) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18 + 1, local21 - 1); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18 + 1, local21 - 1); break label882; } } else if (local1332 == 3) { local65 -= 64; local115 -= 64; if (local115 > -local65 && local18 > 0 && local21 > 0) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18 - 1, local21 - 1); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18 - 1, local21 - 1); break label882; } } } - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } } - var22.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, var22.xFine - Static123.anInt3555, var22.anInt3051 - Static123.anInt3947, var22.zFine - Static217.anInt4903, var22.key, local24, null); + var22.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, var22.xFine - Static123.anInt3555, var22.anInt3051 - Static123.anInt3947, var22.zFine - anInt4903, var22.key, local24, null); } local8.anInt663 = 0; } @@ -1984,8 +2014,8 @@ public class SceneGraph { if (local894 > local1332) { local1332 = local894; } - local899 = Static193.anInt4539 - var25.zMin; - local904 = var25.zMax - Static193.anInt4539; + local899 = anInt4539 - var25.zMin; + local904 = var25.zMax - anInt4539; if (local904 > local899) { var25.anInt1705 = local1332 + local904; } else { @@ -2004,9 +2034,9 @@ public class SceneGraph { local115 = local1332; } else if (local1628.anInt1705 == local65) { local899 = local1628.anInt1699 - Static123.anInt3555; - local904 = local1628.anInt1703 - Static217.anInt4903; + local904 = local1628.anInt1703 - anInt4903; var17 = aClass31Array2[local115].anInt1699 - Static123.anInt3555; - var18 = aClass31Array2[local115].anInt1703 - Static217.anInt4903; + var18 = aClass31Array2[local115].anInt1703 - anInt4903; if (local899 * local899 + local904 * local904 > var17 * var17 + var18 * var18) { local115 = local1332; } @@ -2021,9 +2051,9 @@ public class SceneGraph { if (!method1599(local27, local1697.xMin, local1697.xMax, local1697.zMin, local1697.zMax, local1697.entity.getMinY())) { if (GlRenderer.enabled) { if ((local1697.key & 0xFC000L) == 147456L) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); local894 = local1697.anInt1699 - Static123.anInt3555; - local899 = local1697.anInt1703 - Static217.anInt4903; + local899 = local1697.anInt1703 - anInt4903; local904 = (int) (local1697.key >> 20 & 0x3L); if (local904 == 1 || local904 == 3) { if (local899 > -local894) { @@ -2037,10 +2067,10 @@ public class SceneGraph { LightingManager.method2397(local24, local18, local21 + 1, local18 - 1, local21); } } else { - LightingManager.method2391(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local1697.xMin, local1697.zMin, local1697.xMax, local1697.zMax); + LightingManager.method2391(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local1697.xMin, local1697.zMin, local1697.xMax, local1697.zMax); } } - local1697.entity.render(local1697.anInt1714, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1697.anInt1699 - Static123.anInt3555, local1697.anInt1706 - Static123.anInt3947, local1697.anInt1703 - Static217.anInt4903, local1697.key, local24, null); + local1697.entity.render(local1697.anInt1714, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1697.anInt1699 - Static123.anInt3555, local1697.anInt1706 - Static123.anInt3947, local1697.anInt1703 - anInt4903, local1697.key, local24, null); } for (local894 = local1697.xMin; local894 <= local1697.xMax; local894++) { for (local899 = local1697.zMin; local899 <= local1697.zMax; local899++) { @@ -2073,12 +2103,12 @@ public class SceneGraph { } local153 = local31[local18 + 1][local21]; } while (local153 != null && local153.aBoolean46); - if (local21 > Static193.anInt4539 || local21 <= LightingManager.anInt4698) { + if (local21 > anInt4539 || local21 <= LightingManager.anInt4698) { break; } local153 = local31[local18][local21 - 1]; } while (local153 != null && local153.aBoolean46); - if (local21 < Static193.anInt4539 || local21 >= LightingManager.anInt4866 - 1) { + if (local21 < anInt4539 || local21 >= LightingManager.anInt4866 - 1) { break; } local153 = local31[local18][local21 + 1]; @@ -2088,16 +2118,16 @@ public class SceneGraph { @Pc(1999) ObjStackEntity local1999 = local8.objStack; if (local1999 != null && local1999.anInt3063 != 0) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } if (local1999.secondary != null) { - local1999.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - Static217.anInt4903, local1999.key, local24, null); + local1999.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - anInt4903, local1999.key, local24, null); } if (local1999.tertiary != null) { - local1999.tertiary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - Static217.anInt4903, local1999.key, local24, null); + local1999.tertiary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - anInt4903, local1999.key, local24, null); } if (local1999.primary != null) { - local1999.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - Static217.anInt4903, local1999.key, local24, null); + local1999.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local1999.xFine - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.zFine - anInt4903, local1999.key, local24, null); } } if (local8.anInt670 != 0) { @@ -2105,13 +2135,13 @@ public class SceneGraph { if (local2109 != null && !method4611(local27, local18, local21, local2109.primary.getMinY())) { if ((local2109.anInt1395 & local8.anInt670) != 0) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local2109.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local2109.xFine + local2109.xOffset - Static123.anInt3555, local2109.anInt1391 - Static123.anInt3947, local2109.zFine + local2109.zOffset - Static217.anInt4903, local2109.key, local24, null); + local2109.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local2109.xFine + local2109.xOffset - Static123.anInt3555, local2109.anInt1391 - Static123.anInt3947, local2109.zFine + local2109.zOffset - anInt4903, local2109.key, local24, null); } else if (local2109.anInt1395 == 256) { local65 = local2109.xFine - Static123.anInt3555; local115 = local2109.anInt1391 - Static123.anInt3947; - local1332 = local2109.zFine - Static217.anInt4903; + local1332 = local2109.zFine - anInt4903; local894 = local2109.anInt1388; if (local894 == 1 || local894 == 2) { local899 = -local65; @@ -2125,14 +2155,14 @@ public class SceneGraph { } if (local904 >= local899) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local2109.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local65 + local2109.xOffset, local115, local1332 + local2109.zOffset, local2109.key, local24, null); + local2109.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local65 + local2109.xOffset, local115, local1332 + local2109.zOffset, local2109.key, local24, null); } else if (local2109.secondary != null) { if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, anInt4903, local24, local18, local21); } - local2109.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local65, local115, local1332, local2109.key, local24, null); + local2109.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local65, local115, local1332, local2109.key, local24, null); } } } @@ -2140,15 +2170,15 @@ public class SceneGraph { if (local2275 != null) { if ((local2275.anInt3052 & local8.anInt670) != 0 && !method3850(local27, local18, local21, local2275.anInt3052)) { if (GlRenderer.enabled) { - LightingManager.method2388(local2275.anInt3052, Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local27, local18, local21); + LightingManager.method2388(local2275.anInt3052, Static123.anInt3555, Static123.anInt3947, anInt4903, local27, local18, local21); } - local2275.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local2275.xFine - Static123.anInt3555, local2275.anInt3051 - Static123.anInt3947, local2275.zFine - Static217.anInt4903, local2275.key, local24, null); + local2275.secondary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local2275.xFine - Static123.anInt3555, local2275.anInt3051 - Static123.anInt3947, local2275.zFine - anInt4903, local2275.key, local24, null); } if ((local2275.anInt3049 & local8.anInt670) != 0 && !method3850(local27, local18, local21, local2275.anInt3049)) { if (GlRenderer.enabled) { - LightingManager.method2388(local2275.anInt3049, Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local27, local18, local21); + LightingManager.method2388(local2275.anInt3049, Static123.anInt3555, Static123.anInt3947, anInt4903, local27, local18, local21); } - local2275.primary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local2275.xFine - Static123.anInt3555, local2275.anInt3051 - Static123.anInt3947, local2275.zFine - Static217.anInt4903, local2275.key, local24, null); + local2275.primary.render(0, Static160.anInt2886, anInt3038, anInt5205, Static81.anInt2222, local2275.xFine - Static123.anInt3555, local2275.anInt3051 - Static123.anInt3947, local2275.zFine - anInt4903, local2275.key, local24, null); } } } @@ -2165,7 +2195,7 @@ public class SceneGraph { Static7.aClass69_32.addTail(local2388); } } - if (local21 < Static193.anInt4539) { + if (local21 < anInt4539) { local2388 = local31[local18][local21 + 1]; if (local2388 != null && local2388.aBoolean46) { Static7.aClass69_32.addTail(local2388); @@ -2177,7 +2207,7 @@ public class SceneGraph { Static7.aClass69_32.addTail(local2388); } } - if (local21 > Static193.anInt4539) { + if (local21 > anInt4539) { local2388 = local31[local18][local21 - 1]; if (local2388 != null && local2388.aBoolean46) { Static7.aClass69_32.addTail(local2388); @@ -2232,7 +2262,7 @@ public class SceneGraph { return method4394(local10, local32, local14 + 128); } if (arg3 == 2) { - if (local14 < Static217.anInt4903) { + if (local14 < anInt4903) { if (!method4394(local10, local24, local14 + 128)) { return false; } @@ -2276,7 +2306,7 @@ public class SceneGraph { return method4394(local10 + 128, local32, local14 + 128); } if (arg3 == 8) { - if (local14 > Static217.anInt4903) { + if (local14 > anInt4903) { if (!method4394(local10, local24, local14)) { return false; } @@ -2319,7 +2349,7 @@ public class SceneGraph { if ((tileFlags[arg2][arg7][arg8] & 0x10) != 0) { return; } - if (Static4.method22(arg8, arg7, arg2) != LoginManager.centralPlane) { + if (method22(arg8, arg7, arg2) != LoginManager.centralPlane) { return; } } @@ -2417,7 +2447,7 @@ public class SceneGraph { local387 = new Loc(arg5, 10, arg6 == 11 ? arg9 + 4 : arg9, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null); } if (local387 != null) { - @Pc(531) boolean local531 = Static5.method35(arg2, arg7, arg8, local199, local84, local81, local387, local261); + @Pc(531) boolean local531 = method35(arg2, arg7, arg8, local199, local84, local81, local387, local261); if (local62.aBoolean215 && local531 && arg1) { @Pc(541) int local541 = 15; if (local387 instanceof Model) { @@ -2448,7 +2478,7 @@ public class SceneGraph { } else { local387 = new Loc(arg5, arg6, arg9, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null); } - Static5.method35(arg2, arg7, arg8, local199, 1, 1, local387, local261); + method35(arg2, arg7, arg8, local199, 1, 1, local387, local261); if (arg1 && arg6 >= 12 && arg6 <= 17 && arg6 != 13 && arg2 > 0) { anIntArrayArrayArray6[arg2][arg7][arg8] |= 0x4; } @@ -2610,7 +2640,7 @@ public class SceneGraph { } else { local387 = new Loc(arg5, arg6, arg9, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null); } - Static5.method35(arg2, arg7, arg8, local199, 1, 1, local387, local261); + method35(arg2, arg7, arg8, local199, 1, 1, local387, local261); if (local62.anInt4435 != 0 && arg4 != null) { arg4.flagScenery(arg7, local62.aBoolean207, arg8, local84, local81); } @@ -2641,13 +2671,13 @@ public class SceneGraph { if (local62.anInt4430 == -1 && local62.multiLocs == null && !local62.aBoolean214) { local1950 = local62.method3428(arg9, local165, local153, 4, local199, local213, arg1, null, local330, local173); if (GlRenderer.enabled && local330) { - ShadowManager.method4211(local1950.aClass36_Sub1_3, local165 - Static34.anIntArray80[arg9] * 8, local201, local173 - anIntArray469[arg9] * 8); + ShadowManager.method4211(local1950.aClass36_Sub1_3, local165 - anIntArray80[arg9] * 8, local201, local173 - anIntArray469[arg9] * 8); } local1934 = local1950.aClass8_10; } else { local1934 = new Loc(arg5, 4, arg9, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null); } - setWallDecor(arg2, arg7, arg8, local199, local1934, null, anIntArray517[arg9], 0, local1226 * Static34.anIntArray80[arg9], anIntArray469[arg9] * local1226, local261); + setWallDecor(arg2, arg7, arg8, local199, local1934, null, anIntArray517[arg9], 0, local1226 * anIntArray80[arg9], anIntArray469[arg9] * local1226, local261); } else if (arg6 == 6) { local1226 = 8; local1889 = getWallKey(arg2, arg7, arg8); @@ -2801,19 +2831,19 @@ public class SceneGraph { arg2 = length * 128 - 1; } Static160.anInt2886 = MathUtils.sin[arg3]; - Static121.anInt3038 = MathUtils.cos[arg3]; - Static231.anInt5205 = MathUtils.sin[arg4]; + anInt3038 = MathUtils.cos[arg3]; + anInt5205 = MathUtils.sin[arg4]; Static81.anInt2222 = MathUtils.cos[arg4]; Static123.anInt3555 = arg0; Static123.anInt3947 = arg1; - Static217.anInt4903 = arg2; + anInt4903 = arg2; Static123.anInt4069 = arg0 / 128; - Static193.anInt4539 = arg2 / 128; + anInt4539 = arg2 / 128; LightingManager.anInt987 = Static123.anInt4069 - visibility; if (LightingManager.anInt987 < 0) { LightingManager.anInt987 = 0; } - LightingManager.anInt4698 = Static193.anInt4539 - visibility; + LightingManager.anInt4698 = anInt4539 - visibility; if (LightingManager.anInt4698 < 0) { LightingManager.anInt4698 = 0; } @@ -2821,7 +2851,7 @@ public class SceneGraph { if (LightingManager.anInt15 > width) { LightingManager.anInt15 = width; } - LightingManager.anInt4866 = Static193.anInt4539 + visibility; + LightingManager.anInt4866 = anInt4539 + visibility; if (LightingManager.anInt4866 > length) { LightingManager.anInt4866 = length; } @@ -2836,9 +2866,9 @@ public class SceneGraph { for (local104 = 0; local104 < visibility + visibility + 2; local104++) { for (local113 = 0; local113 < visibility + visibility + 2; local113++) { @Pc(130) int local130 = (local104 - visibility << 7) - (Static123.anInt3555 & 0x7F); - @Pc(140) int local140 = (local113 - visibility << 7) - (Static217.anInt4903 & 0x7F); + @Pc(140) int local140 = (local113 - visibility << 7) - (anInt4903 & 0x7F); @Pc(146) int local146 = Static123.anInt4069 + local104 - visibility; - @Pc(152) int local152 = Static193.anInt4539 + local113 - visibility; + @Pc(152) int local152 = anInt4539 + local113 - visibility; if (local146 >= 0 && local152 >= 0 && local146 < width && local152 < length) { @Pc(176) int local176; if (underwaterTileHeights == null) { @@ -2858,7 +2888,7 @@ public class SceneGraph { aBooleanArrayArray1[local104][local113] = aBooleanArrayArray3[local104][local113] || aBooleanArrayArray3[local104 + 1][local113] || aBooleanArrayArray3[local104][local113 + 1] || aBooleanArrayArray3[local104 + 1][local113 + 1]; } } - Static8.anIntArray8 = arg6; + anIntArray8 = arg6; Static123.anIntArray292 = arg7; Static96.anIntArray234 = arg8; Static123.anIntArray454 = arg9; @@ -2895,7 +2925,7 @@ public class SceneGraph { for (local37 = LightingManager.anInt4698; local37 < LightingManager.anInt4866; local37++) { @Pc(46) Tile local46 = local30[local32][local37]; if (local46 != null) { - if (aBooleanArrayArray1[local32 + visibility - Static123.anInt4069][local37 + visibility - Static193.anInt4539] && (arg3 == null || local23 < arg4 || arg3[local23][local32][local37] != arg5)) { + if (aBooleanArrayArray1[local32 + visibility - Static123.anInt4069][local37 + visibility - anInt4539] && (arg3 == null || local23 < arg4 || arg3[local23][local32][local37] != arg5)) { local46.aBoolean45 = true; local46.aBoolean46 = true; local46.aBoolean47 = local46.sceneryLen > 0; @@ -2945,13 +2975,13 @@ public class SceneGraph { MaterialManager.setMaterial(-1, 3); MaterialManager.renderingUnderwater = true; UnderwaterMaterialRenderer.method4609(); - Static152.anInt3604 = -1; - Static247.anInt730 = -1; + anInt3604 = -1; + anInt730 = -1; for (local32 = 0; local32 < underwaterHdTiles[0].length; local32++) { @Pc(285) GlTile local285 = underwaterHdTiles[0][local32]; @Pc(294) float local294 = 251.5F - (local285.blend ? 1.0F : 0.5F); - if (local285.underwaterColor != Static152.anInt3604) { - Static152.anInt3604 = local285.underwaterColor; + if (local285.underwaterColor != anInt3604) { + anInt3604 = local285.underwaterColor; WaterMaterialRenderer.method619(local285.underwaterColor); FogManager.setFogColor(WaterMaterialRenderer.method2422()); } @@ -2962,7 +2992,7 @@ public class SceneGraph { local32 = Static156.anInt5276; while (true) { if (local32 >= levels) { - LightingManager.method2402(Static123.anInt4069, Static193.anInt4539, tiles); + LightingManager.method2402(Static123.anInt4069, anInt4539, tiles); break; } for (local37 = 0; local37 < underwaterHdTiles[local32].length; local37++) { @@ -2975,7 +3005,7 @@ public class SceneGraph { } if (local32 == 0 && Preferences.sceneryShadowsType > 0) { GlRenderer.method4159(101.5F); - ShadowManager.method4198(Static123.anInt4069, Static193.anInt4539, visibility, arg1, aBooleanArrayArray1, tileHeights[0]); + ShadowManager.method4198(Static123.anInt4069, anInt4539, visibility, arg1, aBooleanArrayArray1, tileHeights[0]); } local32++; } @@ -2996,8 +3026,8 @@ public class SceneGraph { local183 = Static123.anInt4069 - local37; if (local415 >= LightingManager.anInt987 || local183 < LightingManager.anInt15) { for (local428 = -visibility; local428 <= 0; local428++) { - local434 = Static193.anInt4539 + local428; - local438 = Static193.anInt4539 - local428; + local434 = anInt4539 + local428; + local438 = anInt4539 - local428; if (local415 >= LightingManager.anInt987) { if (local434 >= LightingManager.anInt4698) { local450 = local406[local415][local434]; @@ -3043,8 +3073,8 @@ public class SceneGraph { local183 = Static123.anInt4069 - local37; if (local415 >= LightingManager.anInt987 || local183 < LightingManager.anInt15) { for (local428 = -visibility; local428 <= 0; local428++) { - local434 = Static193.anInt4539 + local428; - local438 = Static193.anInt4539 - local428; + local434 = anInt4539 + local428; + local438 = anInt4539 - local428; if (local415 >= LightingManager.anInt987) { if (local434 >= LightingManager.anInt4698) { local450 = local406[local415][local434]; @@ -3247,7 +3277,7 @@ public class SceneGraph { if (local151.anInt5899 == -1) { local224 = arg7[local114][local72]; if (local224 != 0) { - local234 = Static193.anIntArrayArray8[local224]; + local234 = anIntArrayArray8[local224]; local28.anInt2016 += ((local234.length >> 1) - 2) * 3; local28.anInt2019 += local234.length >> 1; } @@ -3320,7 +3350,7 @@ public class SceneGraph { } } if (local135) { - local234 = Static193.anIntArrayArray8[arg7[local114][local72]]; + local234 = anIntArrayArray8[arg7[local114][local72]]; local176 = Static1.anIntArrayArray35[arg7[local114][local72]]; local28.anInt2016 += ((local176.length >> 1) - 2) * 3; local28.anInt2016 += ((local234.length >> 1) - 2) * 3; @@ -3370,7 +3400,7 @@ public class SceneGraph { } else if (local775 != 0) { local805 = FloTypeList.method4395(local775 - 1); if (local805.anInt5899 == -1) { - Static131.method2578(arg0, arg9, local114, arg6, local72, Static193.anIntArrayArray8[arg7[local114][local72]], local28, local18, arg10, arg2[local114][local72]); + Static131.method2578(arg0, arg9, local114, arg6, local72, anIntArrayArray8[arg7[local114][local72]], local28, local18, arg10, arg2[local114][local72]); continue; } @Pc(815) byte local815 = arg7[local114][local72]; @@ -3443,7 +3473,7 @@ public class SceneGraph { } } if (local791) { - Static131.method2578(arg0, arg9, local114, arg6, local72, Static193.anIntArrayArray8[arg7[local114][local72]], local28, local18, arg10, arg2[local114][local72]); + Static131.method2578(arg0, arg9, local114, arg6, local72, anIntArrayArray8[arg7[local114][local72]], local28, local18, arg10, arg2[local114][local72]); Static131.method2578(arg0, arg9, local114, arg6, local72, Static1.anIntArrayArray35[arg7[local114][local72]], local28, local18, arg10, arg2[local114][local72]); } else { Static131.method2578(arg0, arg9, local114, arg6, local72, Static1.anIntArrayArray35[0], local28, local18, arg10, local789); @@ -3458,4 +3488,431 @@ public class SceneGraph { } } } + + @OriginalMember(owner = "client!pi", name = "a", descriptor = "([[[B[[B[[B[[I[[F[[I[[B[[B[[FI[[F[[I[[I[[II)[Lclient!hg;") + public static GlTile[] method3501(@OriginalArg(0) byte[][][] arg0, @OriginalArg(1) byte[][] arg1, @OriginalArg(2) byte[][] arg2, @OriginalArg(3) int[][] arg3, @OriginalArg(4) float[][] arg4, @OriginalArg(5) int[][] arg5, @OriginalArg(6) byte[][] arg6, @OriginalArg(7) byte[][] arg7, @OriginalArg(8) float[][] arg8, @OriginalArg(9) int arg9, @OriginalArg(10) float[][] arg10, @OriginalArg(11) int[][] arg11, @OriginalArg(12) int[][] arg12, @OriginalArg(13) int[][] arg13) { + @Pc(9) int[][] local9 = new int[105][105]; + @Pc(16) int local16; + for (@Pc(11) int local11 = 1; local11 <= 103; local11++) { + for (local16 = 1; local16 <= 103; local16++) { + @Pc(25) byte local25 = arg2[local11][local16]; + if (local25 == 0) { + local25 = arg2[local11 - 1][local16]; + } + if (local25 == 0) { + local25 = arg2[local11][local16 - 1]; + } + if (local25 == 0) { + local25 = arg2[local11 - 1][local16 - 1]; + } + if (local25 != 0) { + @Pc(77) FluType local77 = FluTypeList.get((local25 & 0xFF) - 1); + local9[local11][local16] = (local77.anInt4155 + 1 << 16) + local77.anInt4156; + } + } + } + @Pc(103) HashTable local103 = new HashTable(128); + @Pc(155) int local155; + @Pc(161) int local161; + @Pc(169) int local169; + @Pc(112) int local112; + for (local16 = 1; local16 <= 102; local16++) { + for (local112 = 1; local112 <= 102; local112++) { + if (arg2[local16][local112] != 0) { + @Pc(135) int[] local135; + if (arg6[local16][local112] == 0) { + local135 = Static1.anIntArrayArray35[0]; + } else { + local135 = anIntArrayArray8[arg1[local16][local112]]; + if (local135.length == 0) { + continue; + } + } + local155 = 0; + local161 = local9[local16][local112]; + local169 = local9[local16 + 1][local112]; + if (arg5 != null) { + local155 = arg5[local16][local112] & 0xFFFFFF; + } + @Pc(188) long local188 = (long) local155 | (long) local169 << 32; + @Pc(196) int local196 = local9[local16][local112 + 1]; + @Pc(206) int local206 = local9[local16 + 1][local112 + 1]; + @Pc(214) long local214 = (long) local196 << 32 | (long) local155; + @Pc(219) int local219 = local135.length / 2; + @Pc(227) long local227 = (long) local155 | (long) local161 << 32; + @Pc(233) GlTile local233 = (GlTile) local103.get(local227); + if (local233 == null) { + local233 = new GlTile((local161 >> 16) - 1, (float) (local161 & 0xFFFF), false, arg13 != null, local155); + local103.put(local233, local227); + } + local233.anInt2484++; + local233.anInt2482 += local219; + if (local188 != local227) { + local233 = (GlTile) local103.get(local188); + if (local233 == null) { + local233 = new GlTile((local169 >> 16) - 1, (float) (local169 & 0xFFFF), false, arg13 != null, local155); + local103.put(local233, local188); + } + local233.anInt2484++; + local233.anInt2482 += local219; + } + @Pc(340) long local340 = (long) local206 << 32 | (long) local155; + if (local340 != local227 && local340 != local188) { + local233 = (GlTile) local103.get(local340); + if (local233 == null) { + local233 = new GlTile((local206 >> 16) - 1, (float) (local206 & 0xFFFF), false, arg13 != null, local155); + local103.put(local233, local340); + } + local233.anInt2482 += local219; + local233.anInt2484++; + } + if (local214 != local227 && local188 != local214 && local214 != local340) { + local233 = (GlTile) local103.get(local214); + if (local233 == null) { + local233 = new GlTile((local196 >> 16) - 1, (float) (local196 & 0xFFFF), false, arg13 != null, local155); + local103.put(local233, local214); + } + local233.anInt2484++; + local233.anInt2482 += local219; + } + } + } + } + @Pc(493) GlTile local493; + for (local493 = (GlTile) local103.head(); local493 != null; local493 = (GlTile) local103.next()) { + local493.method1940(); + } + for (local16 = 1; local16 <= 102; local16++) { + for (local112 = 1; local112 <= 102; local112++) { + @Pc(524) byte local524 = arg2[local16][local112]; + if (local524 != 0) { + if ((arg0[arg9][local16][local112] & 0x8) != 0) { + local155 = 0; + } else if ((arg0[1][local16][local112] & 0x2) == 2 && arg9 > 0) { + local155 = arg9 - 1; + } else { + local155 = arg9; + } + local161 = 0; + @Pc(574) boolean[] local574 = null; + local169 = 128; + if (arg5 != null) { + local169 = arg5[local16][local112] >>> 24 << 3; + local161 = arg5[local16][local112] & 0xFFFFFF; + } + @Pc(655) int local655; + @Pc(712) int local712; + @Pc(614) int[] local614; + @Pc(628) byte local628; + @Pc(678) int local678; + @Pc(754) int local754; + if (arg6[local16][local112] == 0) { + local655 = local524 == arg2[local16 - 1][local112 - 1] ? 1 : -1; + local614 = Static1.anIntArrayArray35[0]; + local678 = local524 == arg2[local16 + 1][local112 - 1] ? 1 : -1; + if (arg2[local16][local112 - 1] == local524) { + local678++; + local655++; + } else { + local655--; + local678--; + } + local712 = local524 == arg2[local16 + 1][local112 + 1] ? 1 : -1; + if (local524 == arg2[local16 + 1][local112]) { + local712++; + local678++; + } else { + local678--; + local712--; + } + local754 = local524 == arg2[local16 - 1][local112 + 1] ? 1 : -1; + if (arg2[local16][local112 + 1] == local524) { + local754++; + local712++; + } else { + local712--; + local754--; + } + if (arg2[local16 - 1][local112] == local524) { + local754++; + local655++; + } else { + local754--; + local655--; + } + @Pc(789) int local789 = local655 - local712; + @Pc(794) int local794 = local678 - local754; + if (local794 < 0) { + local794 = -local794; + } + if (local789 < 0) { + local789 = -local789; + } + local628 = (byte) (local794 <= local789 ? 0 : 1); + arg7[local16][local112] = local628; + } else { + local614 = anIntArrayArray8[arg1[local16][local112]]; + local574 = Static69.aBooleanArrayArray2[arg1[local16][local112]]; + local628 = arg7[local16][local112]; + if (local614.length == 0) { + continue; + } + } + local655 = local9[local16][local112]; + local678 = local9[local16 + 1][local112]; + local712 = local9[local16 + 1][local112 + 1]; + @Pc(861) long local861 = (long) local655 << 32 | (long) local161; + @Pc(869) long local869 = (long) local678 << 32 | (long) local161; + @Pc(877) long local877 = (long) local712 << 32 | (long) local161; + @Pc(883) int local883 = arg11[local16][local112]; + local754 = local9[local16][local112 + 1]; + @Pc(901) int local901 = arg11[local16 + 1][local112 + 1]; + @Pc(909) int local909 = arg11[local16 + 1][local112]; + @Pc(917) long local917 = (long) local161 | (long) local754 << 32; + @Pc(925) int local925 = arg11[local16][local112 + 1]; + @Pc(931) int local931 = arg3[local16][local112]; + @Pc(939) int local939 = arg3[local16 + 1][local112]; + @Pc(949) int local949 = arg3[local16 + 1][local112 + 1]; + @Pc(957) int local957 = arg3[local16][local112 + 1]; + @Pc(963) int local963 = (local678 >> 16) - 1; + @Pc(969) int local969 = (local655 >> 16) - 1; + @Pc(975) int local975 = (local712 >> 16) - 1; + @Pc(981) GlTile local981 = (GlTile) local103.get(local861); + method1291(arg13, local655 <= local655, Static1.method588(local969, local883, local931), local981, local614, local112, local155, local16, local655 <= local712, arg8, local754 >= local655, arg4, local169, Static1.method588(local969, local925, local957), Static1.method588(local969, local901, local949), local655 <= local678, arg12, arg10, local628, Static1.method588(local969, local909, local939), local574); + @Pc(1050) int local1050 = (local754 >> 16) - 1; + if (local869 != local861) { + local981 = (GlTile) local103.get(local869); + method1291(arg13, local678 <= local655, Static1.method588(local963, local883, local931), local981, local614, local112, local155, local16, local712 >= local678, arg8, local678 <= local754, arg4, local169, Static1.method588(local963, local925, local957), Static1.method588(local963, local901, local949), local678 <= local678, arg12, arg10, local628, Static1.method588(local963, local909, local939), local574); + } + if (local877 != local861 && local877 != local869) { + local981 = (GlTile) local103.get(local877); + method1291(arg13, local655 >= local712, Static1.method588(local975, local883, local931), local981, local614, local112, local155, local16, local712 <= local712, arg8, local712 <= local754, arg4, local169, Static1.method588(local975, local925, local957), Static1.method588(local975, local901, local949), local678 >= local712, arg12, arg10, local628, Static1.method588(local975, local909, local939), local574); + } + if (local917 != local861 && local917 != local869 && local917 != local877) { + local981 = (GlTile) local103.get(local917); + method1291(arg13, local754 <= local655, Static1.method588(local1050, local883, local931), local981, local614, local112, local155, local16, local754 <= local712, arg8, local754 >= local754, arg4, local169, Static1.method588(local1050, local925, local957), Static1.method588(local1050, local901, local949), local678 >= local754, arg12, arg10, local628, Static1.method588(local1050, local909, local939), local574); + } + } + } + } + for (local493 = (GlTile) local103.head(); local493 != null; local493 = (GlTile) local103.next()) { + if (local493.anInt2483 == 0) { + local493.unlink(); + } else { + local493.method1943(); + } + } + local16 = local103.size(); + @Pc(1348) GlTile[] local1348 = new GlTile[local16]; + local103.method3865(local1348); + @Pc(1358) long[] local1358 = new long[local16]; + for (local155 = 0; local155 < local16; local155++) { + local1358[local155] = local1348[local155].key; + } + method23(local1358, local1348); + return local1348; + } + + @OriginalMember(owner = "client!ec", name = "a", descriptor = "([[IZILclient!hg;[IIIIZ[[FZI[[FIIIZ[[I[[FBI[Z)V") + public static void method1291(@OriginalArg(0) int[][] arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) int arg2, @OriginalArg(3) GlTile arg3, @OriginalArg(4) int[] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) boolean arg8, @OriginalArg(9) float[][] arg9, @OriginalArg(10) boolean arg10, @OriginalArg(12) float[][] arg11, @OriginalArg(13) int arg12, @OriginalArg(14) int arg13, @OriginalArg(15) int arg14, @OriginalArg(16) boolean arg15, @OriginalArg(17) int[][] arg16, @OriginalArg(18) float[][] arg17, @OriginalArg(19) byte arg18, @OriginalArg(20) int arg19, @OriginalArg(21) boolean[] arg20) { + @Pc(11) int local11 = (arg2 << 8) + (arg1 ? 255 : 0); + @Pc(25) int local25 = (arg8 ? 255 : 0) + (arg14 << 8); + @Pc(31) int[] local31 = new int[arg4.length / 2]; + @Pc(41) int local41 = (arg10 ? 255 : 0) + (arg13 << 8); + @Pc(51) int local51 = (arg19 << 8) + (arg15 ? 255 : 0); + for (@Pc(53) int local53 = 0; local53 < local31.length; local53++) { + @Pc(67) int local67 = arg4[local53 + local53]; + @Pc(80) int[][] local80 = arg0 == null || arg20 == null || !arg20[local53] ? arg16 : arg0; + @Pc(88) int local88 = arg4[local53 + local53 + 1]; + local31[local53] = Static1.method3683(local41, (float) arg12, local11, local51, arg0, local80, arg7, arg17, local25, arg18, false, arg3, arg9, arg5, local67, arg11, local88); + } + arg3.method1945(arg6, arg7, arg5, local31, null, false); + } + + @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IIIIIIII)V") + public static void method1698(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { + if (arg1 < 1 || arg4 < 1 || arg1 > 102 || arg4 > 102) { + return; + } + @Pc(39) int local39; + if (!allLevelsAreVisible() && (tileFlags[0][arg1][arg4] & 0x2) == 0) { + local39 = arg2; + if ((tileFlags[arg2][arg1][arg4] & 0x8) != 0) { + local39 = 0; + } + if (local39 != LoginManager.centralPlane) { + return; + } + } + local39 = arg2; + if (arg2 < 3 && (tileFlags[1][arg1][arg4] & 0x2) == 2) { + local39 = arg2 + 1; + } + method1144(arg4, arg1, arg2, arg6, local39, PathFinder.collisionMaps[arg2]); + if (arg0 >= 0) { + @Pc(92) boolean local92 = Preferences.showGroundDecorations; + Preferences.showGroundDecorations = true; + method3397(local39, false, arg2, false, PathFinder.collisionMaps[arg2], arg0, arg5, arg1, arg4, arg3); + Preferences.showGroundDecorations = local92; + } + } + + @OriginalMember(owner = "client!af", name = "a", descriptor = "(IIIIIILclient!th;IJ)Z") + public static boolean method35(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) Entity arg6, @OriginalArg(8) long arg7) { + if (arg6 == null) { + return true; + } else { + @Pc(11) int local11 = arg1 * 128 + arg4 * 64; + @Pc(19) int local19 = arg2 * 128 + arg5 * 64; + return method2256(arg0, arg1, arg2, arg4, arg5, local11, local19, arg3, arg6, 0, false, arg7); + } + } + + @OriginalMember(owner = "client!ac", name = "a", descriptor = "(IIII)I") + public static int method22(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { + if ((tileFlags[arg2][arg1][arg0] & 0x8) == 0) { + return arg2 <= 0 || (tileFlags[1][arg1][arg0] & 0x2) == 0 ? arg2 : arg2 - 1; + } else { + return 0; + } + } + + @OriginalMember(owner = "client!ac", name = "a", descriptor = "([J[Ljava/lang/Object;I)V") + public static void method23(@OriginalArg(0) long[] arg0, @OriginalArg(1) Object[] arg1) { + method3909(arg0.length - 1, arg0, 0, arg1); + } + + @OriginalMember(owner = "client!sh", name = "a", descriptor = "(I[JII[Ljava/lang/Object;)V") + public static void method3909(@OriginalArg(0) int arg0, @OriginalArg(1) long[] arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Object[] arg3) { + if (arg2 >= arg0) { + return; + } + @Pc(16) int local16 = arg2; + @Pc(23) int local23 = (arg2 + arg0) / 2; + @Pc(27) long local27 = arg1[local23]; + arg1[local23] = arg1[arg0]; + arg1[arg0] = local27; + @Pc(41) Object local41 = arg3[local23]; + arg3[local23] = arg3[arg0]; + arg3[arg0] = local41; + for (@Pc(53) int local53 = arg2; local53 < arg0; local53++) { + if (local27 + (long) (local53 & 0x1) > arg1[local53]) { + @Pc(72) long local72 = arg1[local53]; + arg1[local53] = arg1[local16]; + arg1[local16] = local72; + @Pc(86) Object local86 = arg3[local53]; + arg3[local53] = arg3[local16]; + arg3[local16++] = local86; + } + } + arg1[arg0] = arg1[local16]; + arg1[local16] = local27; + arg3[arg0] = arg3[local16]; + arg3[local16] = local41; + method3909(local16 - 1, arg1, arg2, arg3); + method3909(arg0, arg1, local16 + 1, arg3); + } + + @OriginalMember(owner = "client!ke", name = "a", descriptor = "(Lclient!rh;IIIIIIIZ)V") + public static void method2610(@OriginalArg(0) PlainTile arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) boolean arg8) { + @Pc(6) int local6; + @Pc(7) int local7 = local6 = (arg6 << 7) - Static123.anInt3555; + @Pc(14) int local14; + @Pc(15) int local15 = local14 = (arg7 << 7) - anInt4903; + @Pc(20) int local20; + @Pc(21) int local21 = local20 = local7 + 128; + @Pc(26) int local26; + @Pc(27) int local27 = local26 = local15 + 128; + @Pc(37) int local37 = tileHeights[arg1][arg6][arg7] - Static123.anInt3947; + @Pc(49) int local49 = tileHeights[arg1][arg6 + 1][arg7] - Static123.anInt3947; + @Pc(63) int local63 = tileHeights[arg1][arg6 + 1][arg7 + 1] - Static123.anInt3947; + @Pc(75) int local75 = tileHeights[arg1][arg6][arg7 + 1] - Static123.anInt3947; + @Pc(85) int local85 = local15 * arg4 + local7 * arg5 >> 16; + @Pc(95) int local95 = local15 * arg5 - local7 * arg4 >> 16; + @Pc(97) int local97 = local85; + @Pc(107) int local107 = local37 * arg3 - local95 * arg2 >> 16; + @Pc(117) int local117 = local37 * arg2 + local95 * arg3 >> 16; + @Pc(119) int local119 = local107; + if (local117 < 50) { + return; + } + local85 = local14 * arg4 + local21 * arg5 >> 16; + @Pc(143) int local143 = local14 * arg5 - local21 * arg4 >> 16; + local21 = local85; + local85 = local49 * arg3 - local143 * arg2 >> 16; + @Pc(165) int local165 = local49 * arg2 + local143 * arg3 >> 16; + local49 = local85; + if (local165 < 50) { + return; + } + local85 = local27 * arg4 + local20 * arg5 >> 16; + local27 = local27 * arg5 - local20 * arg4 >> 16; + @Pc(193) int local193 = local85; + local85 = local63 * arg3 - local27 * arg2 >> 16; + local27 = local63 * arg2 + local27 * arg3 >> 16; + local63 = local85; + if (local27 < 50) { + return; + } + local85 = local26 * arg4 + local6 * arg5 >> 16; + @Pc(239) int local239 = local26 * arg5 - local6 * arg4 >> 16; + @Pc(241) int local241 = local85; + local85 = local75 * arg3 - local239 * arg2 >> 16; + @Pc(261) int local261 = local75 * arg2 + local239 * arg3 >> 16; + if (local261 < 50) { + return; + } + @Pc(275) int local275 = Rasteriser.centerX + (local97 << 9) / local117; + @Pc(283) int local283 = Rasteriser.centerY + (local119 << 9) / local117; + @Pc(291) int local291 = Rasteriser.centerX + (local21 << 9) / local165; + @Pc(299) int local299 = Rasteriser.centerY + (local49 << 9) / local165; + @Pc(307) int local307 = Rasteriser.centerX + (local193 << 9) / local27; + @Pc(315) int local315 = Rasteriser.centerY + (local63 << 9) / local27; + @Pc(323) int local323 = Rasteriser.centerX + (local241 << 9) / local261; + @Pc(331) int local331 = Rasteriser.centerY + (local85 << 9) / local261; + Rasteriser.alpha = 0; + @Pc(475) int local475; + if ((local307 - local323) * (local299 - local331) - (local315 - local331) * (local291 - local323) > 0) { + if (MiniMenu.aBoolean187 && Static147.method583(MiniMenu.anInt2388 + Rasteriser.centerX, MiniMenu.anInt3259 + Rasteriser.centerY, local315, local331, local299, local307, local323, local291)) { + MiniMenu.anInt1742 = arg6; + MiniMenu.anInt2954 = arg7; + } + if (!GlRenderer.enabled && !arg8) { + Rasteriser.testX = local307 < 0 || local323 < 0 || local291 < 0 || local307 > Rasteriser.width || local323 > Rasteriser.width || local291 > Rasteriser.width; + if (arg0.anInt4869 == -1) { + if (arg0.anInt4865 != 12345678) { + Rasteriser.fillGouraudTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867); + } + } else if (!Preferences.manyGroundTextures) { + local475 = Rasteriser.textureProvider.getAverageColor(arg0.anInt4869); + Rasteriser.fillGouraudTriangle(local315, local331, local299, local307, local323, local291, Static147.method1640(local475, arg0.anInt4865), Static147.method1640(local475, arg0.anInt4864), Static147.method1640(local475, arg0.anInt4867)); + } else if (arg0.aBoolean241) { + Rasteriser.fillTexturedTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867, local97, local21, local241, local119, local49, local85, local117, local165, local261, arg0.anInt4869); + } else { + Rasteriser.fillTexturedTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867, local193, local241, local21, local63, local85, local49, local27, local261, local165, arg0.anInt4869); + } + } + } + if ((local275 - local291) * (local331 - local299) - (local283 - local299) * (local323 - local291) <= 0) { + return; + } + if (MiniMenu.aBoolean187 && Static147.method583(MiniMenu.anInt2388 + Rasteriser.centerX, MiniMenu.anInt3259 + Rasteriser.centerY, local283, local299, local331, local275, local291, local323)) { + MiniMenu.anInt1742 = arg6; + MiniMenu.anInt2954 = arg7; + } + if (GlRenderer.enabled || arg8) { + return; + } + Rasteriser.testX = local275 < 0 || local291 < 0 || local323 < 0 || local275 > Rasteriser.width || local291 > Rasteriser.width || local323 > Rasteriser.width; + if (arg0.anInt4869 == -1) { + if (arg0.anInt4872 != 12345678) { + Rasteriser.fillGouraudTriangle(local283, local299, local331, local275, local291, local323, arg0.anInt4872, arg0.anInt4867, arg0.anInt4864); + } + } else if (Preferences.manyGroundTextures) { + Rasteriser.fillTexturedTriangle(local283, local299, local331, local275, local291, local323, arg0.anInt4872, arg0.anInt4867, arg0.anInt4864, local97, local21, local241, local119, local49, local85, local117, local165, local261, arg0.anInt4869); + } else { + local475 = Rasteriser.textureProvider.getAverageColor(arg0.anInt4869); + Rasteriser.fillGouraudTriangle(local283, local299, local331, local275, local291, local323, Static147.method1640(local475, arg0.anInt4872), Static147.method1640(local475, arg0.anInt4867), Static147.method1640(local475, arg0.anInt4864)); + } + } } diff --git a/client/src/main/java/rt4/ScriptRunner.java b/client/src/main/java/rt4/ScriptRunner.java index f89e5e8..082a2ed 100644 --- a/client/src/main/java/rt4/ScriptRunner.java +++ b/client/src/main/java/rt4/ScriptRunner.java @@ -62,6 +62,10 @@ public final class ScriptRunner { public static final JagString aClass100_767 = JagString.parse(")2"); @OriginalMember(owner = "client!je", name = "U", descriptor = "Lclient!na;") public static final JagString aClass100_588 = JagString.parse("showingVideoAd"); + @OriginalMember(owner = "client!ob", name = "p", descriptor = "Lclient!na;") + public static final JagString aClass100_802 = JagString.parse("(U0a )2 non)2existant gosub script)2num: "); + @OriginalMember(owner = "client!af", name = "m", descriptor = "Lclient!na;") + public static final JagString aClass100_10 = JagString.parse("
"); @OriginalMember(owner = "client!jh", name = "n", descriptor = "Lclient!bd;") public static QuickChatPhrase activePhrase; @OriginalMember(owner = "client!wf", name = "j", descriptor = "Lclient!be;") @@ -228,7 +232,7 @@ public final class ScriptRunner { if (local59 < Camera.anInt5245 / 256) { local59 = Camera.anInt5245 / 256; } - if (Static176.customCameraActive[4] && Camera.cameraAmplitude[4] + 128 > local59) { + if (Camera.customCameraActive[4] && Camera.cameraAmplitude[4] + 128 > local59) { local59 = Camera.cameraAmplitude[4] + 128; } Camera.method555(Camera.cameraX, arg0, SceneGraph.getTileHeight(Player.level, PlayerList.self.xFine, PlayerList.self.zFine) - 50, Camera.ZOOM - -(local59 * 3), local57, Camera.cameraZ, local59); @@ -241,7 +245,7 @@ public final class ScriptRunner { @Pc(127) int local127; @Pc(171) int local171; for (local127 = 0; local127 < 5; local127++) { - if (Static176.customCameraActive[local127]) { + if (Camera.customCameraActive[local127]) { local171 = (int) ((double) -Camera.cameraJitter[local127] + (double) (Camera.cameraJitter[local127] * 2 + 1) * Math.random() + Math.sin((double) Protocol.anIntArray76[local127] * ((double) Camera.cameraFrequency[local127] / 100.0D)) * (double) Camera.cameraAmplitude[local127]); if (local127 == 3) { Camera.cameraYaw = local171 + Camera.cameraYaw & 0x7FF; @@ -266,13 +270,13 @@ public final class ScriptRunner { } } } - Static252.method4302(); + method4302(); if (GlRenderer.enabled) { GlRaster.setClip(arg2, arg4, arg2 + arg3, arg4 - -arg0); @Pc(248) float local248 = (float) Camera.cameraPitch * 0.17578125F; @Pc(253) float local253 = (float) Camera.cameraYaw * 0.17578125F; if (Camera.cameraType == 3) { - local248 = Static146.aFloat15 * 360.0F / 6.2831855F; + local248 = Camera.aFloat15 * 360.0F / 6.2831855F; local253 = Camera.aFloat10 * 360.0F / 6.2831855F; } GlRenderer.method4171(arg2, arg4, arg3, arg0, arg3 / 2 + arg2, arg4 - -(arg0 / 2), local248, local253, anInt5029, anInt5029); @@ -291,7 +295,7 @@ public final class ScriptRunner { local127 = Rasteriser.screenLowerX; GlModel.anInt3582 = local127 + (local171 - local127) * (-arg2 + anInt3751) / arg3; @Pc(361) int local361 = Rasteriser.screenUpperY; - Static34.anInt1053 = (local361 - local344) * (anInt1892 - arg4) / arg0 + local344; + RawModel.anInt1053 = (local361 - local344) * (anInt1892 - arg4) / arg0 + local344; } client.audioLoop(); @Pc(387) byte local387 = method4047() == 2 ? (byte) anInt3325 : 1; @@ -985,7 +989,7 @@ public final class ScriptRunner { public static SecondaryLinkedList method3333(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { @Pc(9) SecondaryLinkedList local9 = new SecondaryLinkedList(); for (@Pc(14) Map local14 = (Map) MapList.aClass69_120.head(); local14 != null; local14 = (Map) MapList.aClass69_120.next()) { - if (local14.aBoolean50 && local14.method664(arg1, arg0)) { + if (local14.valid && local14.method664(arg1, arg0)) { local9.addTail(local14); } } @@ -1304,6 +1308,118 @@ public final class ScriptRunner { return true; } + @OriginalMember(owner = "client!uh", name = "f", descriptor = "(I)V") + public static void method4302() { + if (method4047() != 2) { + return; + } + @Pc(27) byte local27 = (byte) (anInt3325 - 4 & 0xFF); + @Pc(31) int local31 = anInt3325 % 104; + @Pc(33) int local33; + @Pc(40) int local40; + for (local33 = 0; local33 < 4; local33++) { + for (local40 = 0; local40 < 104; local40++) { + aByteArrayArrayArray15[local33][local31][local40] = local27; + } + } + if (Player.level == 3) { + return; + } + for (local33 = 0; local33 < 2; local33++) { + anIntArray205[local33] = -1000000; + anIntArray338[local33] = 1000000; + anIntArray518[local33] = 0; + anIntArray476[local33] = 1000000; + anIntArray134[local33] = 0; + } + if (Camera.cameraType != 1) { + local33 = SceneGraph.getTileHeight(Player.level, Camera.renderX, Camera.renderZ); + if (local33 - Camera.anInt40 < 800 && (SceneGraph.tileFlags[Player.level][Camera.renderX >> 7][Camera.renderZ >> 7] & 0x4) != 0) { + method4348(false, Camera.renderX >> 7, Camera.renderZ >> 7, SceneGraph.tiles, 1); + } + return; + } + if ((SceneGraph.tileFlags[Player.level][PlayerList.self.xFine >> 7][PlayerList.self.zFine >> 7] & 0x4) != 0) { + method4348(false, PlayerList.self.xFine >> 7, PlayerList.self.zFine >> 7, SceneGraph.tiles, 0); + } + if (Camera.cameraPitch >= 310) { + return; + } + @Pc(135) int local135 = PlayerList.self.zFine >> 7; + local40 = Camera.renderZ >> 7; + @Pc(146) int local146; + if (local40 < local135) { + local146 = local135 - local40; + } else { + local146 = local40 - local135; + } + local33 = Camera.renderX >> 7; + @Pc(162) int local162 = PlayerList.self.xFine >> 7; + @Pc(174) int local174; + if (local162 > local33) { + local174 = local162 - local33; + } else { + local174 = local33 - local162; + } + @Pc(192) int local192; + @Pc(186) int local186; + if (local174 <= local146) { + local186 = 32768; + local192 = local174 * 65536 / local146; + while (local40 != local135) { + if (local40 < local135) { + local40++; + } else if (local40 > local135) { + local40--; + } + if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { + method4348(false, local33, local40, SceneGraph.tiles, 1); + break; + } + local186 += local192; + if (local186 >= 65536) { + if (local162 > local33) { + local33++; + } else if (local162 < local33) { + local33--; + } + local186 -= 65536; + if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { + method4348(false, local33, local40, SceneGraph.tiles, 1); + break; + } + } + } + return; + } + local186 = 32768; + local192 = local146 * 65536 / local174; + while (local162 != local33) { + if (local162 > local33) { + local33++; + } else if (local33 > local162) { + local33--; + } + if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { + method4348(false, local33, local40, SceneGraph.tiles, 1); + break; + } + local186 += local192; + if (local186 >= 65536) { + if (local40 < local135) { + local40++; + } else if (local135 < local40) { + local40--; + } + local186 -= 65536; + if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { + method4348(false, local33, local40, SceneGraph.tiles, 1); + break; + } + } + } + } + public static class Cs2Opcodes { // Component setters public static final int setPosition = 1000; @@ -3406,7 +3522,7 @@ public final class ScriptRunner { isp--; int1 = intStack[isp]; if (FriendsList.state == 2 && int1 >= 0 && int1 < FriendsList.size) { - intStack[isp++] = FriendsList.aBooleanArray135[int1] ? 1 : 0; + intStack[isp++] = FriendsList.sameGame[int1] ? 1 : 0; continue; } intStack[isp++] = 0; @@ -3418,7 +3534,7 @@ public final class ScriptRunner { if (string.startsWith(aClass100_446) || string.startsWith(aClass100_537)) { string = string.substring(7); } - intStack[isp++] = FriendsList.method25(string); + intStack[isp++] = FriendsList.indexOf(string); continue; } if (opcode == 3629) { @@ -4287,12 +4403,12 @@ public final class ScriptRunner { } continue; } - @Pc(7293) Map local7293; + @Pc(7293) Map map; if (opcode == Cs2Opcodes.getDungeonMapName) { ssp--; - local7293 = MapList.get(stringStack[ssp]); - if (local7293 != null && local7293.aClass100_137 != null) { - stringStack[ssp++] = local7293.aClass100_137; + map = MapList.get(stringStack[ssp]); + if (map != null && map.name != null) { + stringStack[ssp++] = map.name; continue; } stringStack[ssp++] = EMPTY_STRING; @@ -4309,24 +4425,24 @@ public final class ScriptRunner { continue; } if (opcode == Cs2Opcodes.getDungeonmapCenter) { - local7293 = WorldMap.method4361(); - if (local7293 == null) { + map = WorldMap.getCurrentMap(); + if (map == null) { intStack[isp++] = 0; intStack[isp++] = 0; } else { - intStack[isp++] = local7293.anInt769 * 64; - intStack[isp++] = local7293.anInt764 * 64; + intStack[isp++] = map.originX * 64; + intStack[isp++] = map.originZ * 64; } continue; } if (opcode == 5211) { - local7293 = WorldMap.method4361(); - if (local7293 == null) { + map = WorldMap.getCurrentMap(); + if (map == null) { intStack[isp++] = 0; intStack[isp++] = 0; } else { - intStack[isp++] = local7293.displayMaxZ - local7293.displayMinX; - intStack[isp++] = local7293.displayMinZ - local7293.displayMaxX; + intStack[isp++] = map.displayMaxZ - map.displayMinX; + intStack[isp++] = map.displayMinZ - map.displayMaxX; } continue; } @@ -4339,7 +4455,7 @@ public final class ScriptRunner { str1 = WorldMap.labels.aClass100Array153[int1]; int2 = WorldMap.labels.method3894(int1); } - str1 = str1.method3140(aClass100_639, Static5.aClass100_10); + str1 = str1.method3140(aClass100_639, aClass100_10); stringStack[ssp++] = str1; intStack[isp++] = int2; continue; @@ -4353,7 +4469,7 @@ public final class ScriptRunner { str1 = WorldMap.labels.aClass100Array153[int1]; int2 = WorldMap.labels.method3894(int1); } - str1 = str1.method3140(aClass100_639, Static5.aClass100_10); + str1 = str1.method3140(aClass100_639, aClass100_10); stringStack[ssp++] = str1; intStack[isp++] = int2; continue; @@ -4401,11 +4517,11 @@ public final class ScriptRunner { continue; } if (opcode == Cs2Opcodes.getMapDefaultZoom) { - local7293 = WorldMap.method4361(); - if (local7293 == null) { + map = WorldMap.getCurrentMap(); + if (map == null) { intStack[isp++] = -1; } else { - intStack[isp++] = local7293.defaultZoom; + intStack[isp++] = map.defaultZoom; } continue; } @@ -4581,7 +4697,7 @@ public final class ScriptRunner { if (GameShell.frame != null || local1552 && SignLink.anInt5928 != 3 && SignLink.osName.startsWith("win") && !client.haveIe6) { Static164.newTab = local1552; url = local8356; - Static33.openUrlRequest = GameShell.signLink.openUrl(new String(local8356.method3148(), StandardCharsets.ISO_8859_1)); + Protocol.openUrlRequest = GameShell.signLink.openUrl(new String(local8356.method3148(), StandardCharsets.ISO_8859_1)); continue; } openUrl(local8356, local1552); @@ -5329,7 +5445,7 @@ public final class ScriptRunner { isp--; int1 = intStack[isp]; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0) { - intStack[isp++] = Static176.hopWorld(int1) ? 1 : 0; + intStack[isp++] = WorldList.hopWorld(int1) ? 1 : 0; continue; } intStack[isp++] = 0; @@ -5449,7 +5565,7 @@ public final class ScriptRunner { local652 = aCalendar2.get(Calendar.DATE); c = aCalendar2.get(Calendar.MONTH); local1087 = aCalendar2.get(Calendar.YEAR); - stringStack[ssp++] = JagString.concatenate(new JagString[]{JagString.parseInt(local652), aClass100_767, Static34.aClass100Array40[c], aClass100_767, JagString.parseInt(local1087)}); + stringStack[ssp++] = JagString.concatenate(new JagString[]{JagString.parseInt(local652), aClass100_767, DateUtil.aClass100Array40[c], aClass100_767, JagString.parseInt(local1087)}); continue; } if (opcode == Cs2Opcodes.strForGender) { @@ -5730,7 +5846,7 @@ public final class ScriptRunner { } if (op == 40) { cycles = intOperands[pc]; - str.method3113(Static176.aClass100_802).method3113(JagString.parseInt(cycles)); + str.method3113(aClass100_802).method3113(JagString.parseInt(cycles)); } if (client.modeWhere != 0) { Chat.add(EMPTY_STRING, 0, JagString.concatenate(new JagString[]{aClass100_780, script.name})); diff --git a/client/src/main/java/rt4/Shadow.java b/client/src/main/java/rt4/Shadow.java index 6c9d59c..b2dad71 100644 --- a/client/src/main/java/rt4/Shadow.java +++ b/client/src/main/java/rt4/Shadow.java @@ -73,7 +73,7 @@ public final class Shadow { if (GlRenderer.arbVboSupported) { @Pc(112) ByteBuffer local112 = ByteBuffer.wrap(local4.data, 0, local4.offset); this.aClass155_7 = new GlVertexBufferObject(); - this.aClass155_7.method4519(local112); + this.aClass155_7.setArrayBuffer(local112); } else { this.aByteBuffer12 = ByteBuffer.allocateDirect(local4.offset).order(ByteOrder.nativeOrder()); this.aByteBuffer12.put(local4.data, 0, local4.offset); @@ -102,7 +102,7 @@ public final class Shadow { if (GlRenderer.arbVboSupported) { @Pc(293) ByteBuffer local293 = ByteBuffer.wrap(local147.data, 0, local147.offset); this.aClass155_6 = new GlVertexBufferObject(); - this.aClass155_6.method4517(local293); + this.aClass155_6.setElementArrayBuffer(local293); } else { this.aByteBuffer11 = ByteBuffer.allocateDirect(local147.offset).order(ByteOrder.nativeOrder()); this.aByteBuffer11.put(local147.data, 0, local147.offset); @@ -176,7 +176,7 @@ public final class Shadow { local1.glInterleavedArrays(GL2.GL_T2F_V3F, 20, this.aByteBuffer12); GlRenderer.normalArrayEnabled = false; } else { - this.aClass155_7.method4516(); + this.aClass155_7.bindArray(); local1.glInterleavedArrays(GL2.GL_T2F_V3F, 20, 0L); GlRenderer.normalArrayEnabled = false; } @@ -186,7 +186,7 @@ public final class Shadow { } local1.glDrawElements(GL2.GL_TRIANGLES, 384, GL2.GL_UNSIGNED_INT, this.aByteBuffer11); } else { - this.aClass155_6.method4518(); + this.aClass155_6.bindElementArray(); local1.glDrawElements(GL2.GL_TRIANGLES, 384, GL2.GL_UNSIGNED_INT, 0L); } } diff --git a/client/src/main/java/rt4/ShadowModelList.java b/client/src/main/java/rt4/ShadowModelList.java index 7f1076f..b40274f 100644 --- a/client/src/main/java/rt4/ShadowModelList.java +++ b/client/src/main/java/rt4/ShadowModelList.java @@ -131,8 +131,8 @@ public class ShadowModelList { for (local162 = 0; local162 < local650.vertexCount; local162++) { local650.vertexY[local162] += SceneGraph.getTileHeight(Player.level, local650.vertexX[local162] + arg3, arg5 + local650.vertexZ[local162]) - arg11; } - local650.vertexBuffer.valid = false; local650.bounds.valid = false; + local650.vertexBuffer.valid = false; } } else { @Pc(574) SoftwareModel local574 = (SoftwareModel) local33; diff --git a/client/src/main/java/rt4/SoftwareModel.java b/client/src/main/java/rt4/SoftwareModel.java index d8d5337..d800999 100644 --- a/client/src/main/java/rt4/SoftwareModel.java +++ b/client/src/main/java/rt4/SoftwareModel.java @@ -241,7 +241,7 @@ public final class SoftwareModel extends Model { this.aShortArray89 = arg0.triangleColors; this.anIntArrayArray41 = arg0.boneVertices; this.anIntArrayArray42 = arg0.boneTriangles; - this.aShortArray90 = arg0.aShortArray22; + this.aShortArray90 = arg0.triangleSources; this.aShortArray91 = arg0.vertexSources; @Pc(102) int local102 = (int) Math.sqrt(arg3 * arg3 + arg4 * arg4 + arg5 * arg5); @Pc(108) int local108 = arg2 * local102 >> 8; @@ -848,7 +848,7 @@ public final class SoftwareModel extends Model { local223 = local146 / local53; local227 = local123 / local38; } - if (GlModel.anInt3582 >= local204 && GlModel.anInt3582 <= local208 && Static34.anInt1053 >= local223 && Static34.anInt1053 <= local227) { + if (GlModel.anInt3582 >= local204 && GlModel.anInt3582 <= local208 && RawModel.anInt1053 >= local223 && RawModel.anInt1053 <= local227) { local204 = 999999; local208 = -999999; local223 = 999999; @@ -891,7 +891,7 @@ public final class SoftwareModel extends Model { } } } - if (GlModel.anInt3582 >= local204 && GlModel.anInt3582 <= local208 && Static34.anInt1053 >= local223 && Static34.anInt1053 <= local227) { + if (GlModel.anInt3582 >= local204 && GlModel.anInt3582 <= local208 && RawModel.anInt1053 >= local223 && RawModel.anInt1053 <= local227) { if (this.aBoolean303) { Model.aLongArray11[MiniMenu.anInt7++] = arg8; } else { @@ -994,9 +994,9 @@ public final class SoftwareModel extends Model { local150.aShortArray90 = this.aShortArray90; local150.aBoolean303 = this.aBoolean303; if (arg0 == 3) { - local150.vertexX = RawModel.method2308(this.vertexX); - local150.vertexY = RawModel.method2308(this.vertexY); - local150.vertexZ = RawModel.method2308(this.vertexZ); + local150.vertexX = ArrayUtils.copyOfNullable(this.vertexX); + local150.vertexY = ArrayUtils.copyOfNullable(this.vertexY); + local150.vertexZ = ArrayUtils.copyOfNullable(this.vertexZ); } else { local150.vertexX = this.vertexX; local150.vertexY = new int[local150.vertexCount]; @@ -1658,7 +1658,7 @@ public final class SoftwareModel extends Model { } } } else { - if (arg1 && this.method4589(GlModel.anInt3582 + Rasteriser.centerX, Static34.anInt1053 + Rasteriser.centerY, anIntArray551[local51], anIntArray551[local56], anIntArray551[local61], local65, local69, local73)) { + if (arg1 && this.method4589(GlModel.anInt3582 + Rasteriser.centerX, RawModel.anInt1053 + Rasteriser.centerY, anIntArray551[local51], anIntArray551[local56], anIntArray551[local61], local65, local69, local73)) { Model.aLongArray11[MiniMenu.anInt7++] = arg2; arg1 = false; } diff --git a/client/src/main/java/rt4/SpriteLoader.java b/client/src/main/java/rt4/SpriteLoader.java index 2606ca7..6bc4676 100644 --- a/client/src/main/java/rt4/SpriteLoader.java +++ b/client/src/main/java/rt4/SpriteLoader.java @@ -338,11 +338,18 @@ public class SpriteLoader { @OriginalMember(owner = "client!na", name = "a", descriptor = "(IZILclient!ve;)Lclient!ek;") public static SoftwareIndexedSprite loadSoftwareIndexedSprite(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { - return decode(arg1, 0, arg0) ? Static134.method2619() : null; + return decode(arg1, 0, arg0) ? method2619() : null; } @OriginalMember(owner = "client!na", name = "a", descriptor = "(Lclient!ve;IZ)Lclient!mm;") public static SoftwareSprite loadSoftwareSpriteAutoDetect(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1) { return decode(arg0, arg1) ? method3537() : null; } + + @OriginalMember(owner = "client!kh", name = "a", descriptor = "(B)Lclient!ek;") + public static SoftwareIndexedSprite method2619() { + @Pc(25) SoftwareIndexedSprite local25 = new SoftwareIndexedSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], pixels[0], palette); + clear(); + return local25; + } } diff --git a/client/src/main/java/rt4/Static1.java b/client/src/main/java/rt4/Static1.java index a3428c4..3d264ec 100644 --- a/client/src/main/java/rt4/Static1.java +++ b/client/src/main/java/rt4/Static1.java @@ -529,7 +529,7 @@ public final class Static1 { for (local38 = 0; local38 < local12; local38++) { local2826[local38] = local2823[local38].key; } - Static4.method23(local2826, local2823); + SceneGraph.method23(local2826, local2823); return local2823; } @@ -829,8 +829,15 @@ public final class Static1 { local80 = Static69.method1540(arg16, local382, local388); } @Pc(405) int local405 = arg16 + (arg13 << 7); - @Pc(413) int local413 = Static182.method3361(arg14, arg13, arg5, arg6, arg16); + @Pc(413) int local413 = method3361(arg14, arg13, arg5, arg6, arg16); @Pc(420) int local420 = (arg6 << 7) + arg14; - return arg11.method1941(local420, local413, local405, local78, local66, local72, arg10 ? local80 & 0xFFFFFF00 : local80, arg4 == null ? 0.0F : (float) (local413 - Static182.method3361(arg14, arg13, arg4, arg6, arg16)) / arg1); + return arg11.method1941(local420, local413, local405, local78, local66, local72, arg10 ? local80 & 0xFFFFFF00 : local80, arg4 == null ? 0.0F : (float) (local413 - method3361(arg14, arg13, arg4, arg6, arg16)) / arg1); + } + + @OriginalMember(owner = "client!oj", name = "a", descriptor = "(IBI[[III)I") + public static int method3361(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int[][] arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { + @Pc(25) int local25 = arg0 * arg2[arg3 + 1][arg1] + (128 - arg0) * arg2[arg3][arg1] >> 7; + @Pc(52) int local52 = arg2[arg3][arg1 + 1] * (128 - arg0) + arg2[arg3 + 1][arg1 + 1] * arg0 >> 7; + return local25 * (128 - arg4) + arg4 * local52 >> 7; } } diff --git a/client/src/main/java/rt4/Static10.java b/client/src/main/java/rt4/Static10.java deleted file mode 100644 index 7293406..0000000 --- a/client/src/main/java/rt4/Static10.java +++ /dev/null @@ -1,32 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static10 { - - @OriginalMember(owner = "client!an", name = "a", descriptor = "(IIIIIII)V") - public static void method352(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - @Pc(11) int local11 = Static231.method1690(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); - @Pc(17) int local17 = Static231.method1690(TextureOp29.anInt2869, arg0, TextureOp29.anInt5773); - @Pc(23) int local23 = Static231.method1690(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); - @Pc(29) int local29 = Static231.method1690(TextureOp29.anInt5063, arg2, TextureOp29.anInt4164); - @Pc(42) int local42 = Static231.method1690(TextureOp29.anInt2869, arg5 + arg1, TextureOp29.anInt5773); - @Pc(51) int local51 = Static231.method1690(TextureOp29.anInt2869, arg0 - arg1, TextureOp29.anInt5773); - @Pc(53) int local53; - for (local53 = local11; local53 < local42; local53++) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local53], local23, local29, arg4); - } - for (local53 = local17; local53 > local51; local53--) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local53], local23, local29, arg4); - } - @Pc(95) int local95 = Static231.method1690(TextureOp29.anInt5063, arg1 + arg3, TextureOp29.anInt4164); - @Pc(104) int local104 = Static231.method1690(TextureOp29.anInt5063, arg2 - arg1, TextureOp29.anInt4164); - for (local53 = local42; local53 <= local51; local53++) { - @Pc(117) int[] local117 = TextureOp29SubOp4.anIntArrayArray10[local53]; - TextureOp29SubOp4.method2576(local117, local23, local95, arg4); - TextureOp29SubOp4.method2576(local117, local104, local29, arg4); - } - } -} diff --git a/client/src/main/java/rt4/Static112.java b/client/src/main/java/rt4/Static112.java index f9c7a62..40bd805 100644 --- a/client/src/main/java/rt4/Static112.java +++ b/client/src/main/java/rt4/Static112.java @@ -116,7 +116,7 @@ public final class Static112 { } Fonts.b12Full.renderLeft(MiniMenu.getOp(local203), local3 + 3, local219, local418, 0); } - Static121.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761); + InterfaceList.forceRedrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761); } } diff --git a/client/src/main/java/rt4/Static121.java b/client/src/main/java/rt4/Static121.java deleted file mode 100644 index 25a90ca..0000000 --- a/client/src/main/java/rt4/Static121.java +++ /dev/null @@ -1,23 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static121 { - - @OriginalMember(owner = "client!jg", name = "a", descriptor = "I") - public static int anInt3038; - - @OriginalMember(owner = "client!jg", name = "e", descriptor = "Z") - public static boolean qaOpTest = false; - - @OriginalMember(owner = "client!jg", name = "a", descriptor = "(IBIII)V") - public static void redrawScreen(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - for (@Pc(3) int local3 = 0; local3 < InterfaceList.rectangles; local3++) { - if (arg0 < InterfaceList.rectangleX[local3] + InterfaceList.rectangleWidth[local3] && arg0 + arg3 > InterfaceList.rectangleX[local3] && InterfaceList.rectangleY[local3] + InterfaceList.rectangleHeight[local3] > arg1 && InterfaceList.rectangleY[local3] < arg2 + arg1) { - InterfaceList.rectangleRedraw[local3] = true; - } - } - } -} diff --git a/client/src/main/java/rt4/Static123.java b/client/src/main/java/rt4/Static123.java index 2f9e50d..7c50700 100644 --- a/client/src/main/java/rt4/Static123.java +++ b/client/src/main/java/rt4/Static123.java @@ -8,9 +8,6 @@ public final class Static123 { @OriginalMember(owner = "client!qk", name = "b", descriptor = "Lclient!na;") public static final JagString aClass100_900 = JagString.parse("tbrefresh"); - @OriginalMember(owner = "client!jj", name = "j", descriptor = "Z") - public static boolean draggingClickedInventoryObject = false; - @OriginalMember(owner = "client!ml", name = "K", descriptor = "I") public static int anInt3947; @OriginalMember(owner = "client!k", name = "l", descriptor = "[I") @@ -41,9 +38,9 @@ public final class Static123 { for (@Pc(3) int local3 = 0; local3 < SceneGraph.anInt917; local3++) { @Pc(10) SceneGraph_Class120 local10 = SceneGraph.aClass120Array1[local3]; @Pc(14) int local14; - if (Static8.anIntArray8 != null) { - for (local14 = 0; local14 < Static8.anIntArray8.length; local14++) { - if (Static8.anIntArray8[local14] != -1000000 && (local10.anInt4444 <= Static8.anIntArray8[local14] || local10.anInt4447 <= Static8.anIntArray8[local14]) && (local10.anInt4460 <= Static96.anIntArray234[local14] || local10.anInt4445 <= Static96.anIntArray234[local14]) && (local10.anInt4460 >= anIntArray292[local14] || local10.anInt4445 >= anIntArray292[local14]) && (local10.anInt4458 <= anIntArray454[local14] || local10.anInt4449 <= anIntArray454[local14]) && (local10.anInt4458 >= anIntArray427[local14] || local10.anInt4449 >= anIntArray427[local14])) { + if (SceneGraph.anIntArray8 != null) { + for (local14 = 0; local14 < SceneGraph.anIntArray8.length; local14++) { + if (SceneGraph.anIntArray8[local14] != -1000000 && (local10.anInt4444 <= SceneGraph.anIntArray8[local14] || local10.anInt4447 <= SceneGraph.anIntArray8[local14]) && (local10.anInt4460 <= Static96.anIntArray234[local14] || local10.anInt4445 <= Static96.anIntArray234[local14]) && (local10.anInt4460 >= anIntArray292[local14] || local10.anInt4445 >= anIntArray292[local14]) && (local10.anInt4458 <= anIntArray454[local14] || local10.anInt4449 <= anIntArray454[local14]) && (local10.anInt4458 >= anIntArray427[local14] || local10.anInt4449 >= anIntArray427[local14])) { continue label194; } } @@ -55,11 +52,11 @@ public final class Static123 { if (local10.anInt4453 == 1) { local14 = local10.anInt4452 + SceneGraph.visibility - anInt4069; if (local14 >= 0 && local14 <= SceneGraph.visibility + SceneGraph.visibility) { - local115 = local10.anInt4461 + SceneGraph.visibility - Static193.anInt4539; + local115 = local10.anInt4461 + SceneGraph.visibility - SceneGraph.anInt4539; if (local115 < 0) { local115 = 0; } - local126 = local10.anInt4464 + SceneGraph.visibility - Static193.anInt4539; + local126 = local10.anInt4464 + SceneGraph.visibility - SceneGraph.anInt4539; if (local126 > SceneGraph.visibility + SceneGraph.visibility) { local126 = SceneGraph.visibility + SceneGraph.visibility; } @@ -81,15 +78,15 @@ public final class Static123 { local10.anInt4462 = 2; local158 = -local158; } - local10.anInt4454 = (local10.anInt4458 - Static217.anInt4903 << 8) / local158; - local10.anInt4450 = (local10.anInt4449 - Static217.anInt4903 << 8) / local158; + local10.anInt4454 = (local10.anInt4458 - SceneGraph.anInt4903 << 8) / local158; + local10.anInt4450 = (local10.anInt4449 - SceneGraph.anInt4903 << 8) / local158; local10.anInt4459 = (local10.anInt4444 - anInt3947 << 8) / local158; local10.anInt4463 = (local10.anInt4447 - anInt3947 << 8) / local158; SceneGraph.aClass120Array2[SceneGraph.anInt4870++] = local10; } } } else if (local10.anInt4453 == 2) { - local14 = local10.anInt4461 + SceneGraph.visibility - Static193.anInt4539; + local14 = local10.anInt4461 + SceneGraph.visibility - SceneGraph.anInt4539; if (local14 >= 0 && local14 <= SceneGraph.visibility + SceneGraph.visibility) { local115 = local10.anInt4452 + SceneGraph.visibility - anInt4069; if (local115 < 0) { @@ -107,7 +104,7 @@ public final class Static123 { } } if (local137) { - local158 = Static217.anInt4903 - local10.anInt4458; + local158 = SceneGraph.anInt4903 - local10.anInt4458; if (local158 > 32) { local10.anInt4462 = 3; } else { @@ -127,11 +124,11 @@ public final class Static123 { } else if (local10.anInt4453 == 4) { local14 = local10.anInt4444 - anInt3947; if (local14 > 128) { - local115 = local10.anInt4461 + SceneGraph.visibility - Static193.anInt4539; + local115 = local10.anInt4461 + SceneGraph.visibility - SceneGraph.anInt4539; if (local115 < 0) { local115 = 0; } - local126 = local10.anInt4464 + SceneGraph.visibility - Static193.anInt4539; + local126 = local10.anInt4464 + SceneGraph.visibility - SceneGraph.anInt4539; if (local126 > SceneGraph.visibility + SceneGraph.visibility) { local126 = SceneGraph.visibility + SceneGraph.visibility; } @@ -158,8 +155,8 @@ public final class Static123 { local10.anInt4462 = 5; local10.anInt4448 = (local10.anInt4460 - anInt3555 << 8) / local14; local10.anInt4456 = (local10.anInt4445 - anInt3555 << 8) / local14; - local10.anInt4454 = (local10.anInt4458 - Static217.anInt4903 << 8) / local14; - local10.anInt4450 = (local10.anInt4449 - Static217.anInt4903 << 8) / local14; + local10.anInt4454 = (local10.anInt4458 - SceneGraph.anInt4903 << 8) / local14; + local10.anInt4450 = (local10.anInt4449 - SceneGraph.anInt4903 << 8) / local14; SceneGraph.aClass120Array2[SceneGraph.anInt4870++] = local10; } } diff --git a/client/src/main/java/rt4/Static126.java b/client/src/main/java/rt4/Static126.java deleted file mode 100644 index 027e441..0000000 --- a/client/src/main/java/rt4/Static126.java +++ /dev/null @@ -1,43 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static126 { - - @OriginalMember(owner = "client!sc", name = "z", descriptor = "[Z") - public static final boolean[] aBooleanArray116 = new boolean[100]; - @OriginalMember(owner = "client!rg", name = "s", descriptor = "I") - public static int anInt5574 = -1; - - @OriginalMember(owner = "client!jm", name = "a", descriptor = "(Z)V") - public static void method2460() { - if (InterfaceList.topLevelInterface != -1) { - Static96.method1949(InterfaceList.topLevelInterface); - } - for (@Pc(15) int local15 = 0; local15 < InterfaceList.rectangles; local15++) { - if (InterfaceList.aBooleanArray100[local15]) { - InterfaceList.rectangleRedraw[local15] = true; - } - aBooleanArray116[local15] = InterfaceList.aBooleanArray100[local15]; - InterfaceList.aBooleanArray100[local15] = false; - } - Static87.anInt2503 = -1; - InterfaceList.mouseOverInventoryInterface = null; - Static182.anInt4311 = client.loop; - if (GlRenderer.enabled) { - ScriptRunner.aBoolean299 = true; - } - anInt5574 = -1; - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.rectangles = 0; - Static9.method182(); - } - if (GlRenderer.enabled) { - GlRaster.method1177(); - } else { - SoftwareRaster.method2503(); - } - Protocol.anInt4247 = 0; - } -} diff --git a/client/src/main/java/rt4/Static131.java b/client/src/main/java/rt4/Static131.java index c68ee01..65e2a2b 100644 --- a/client/src/main/java/rt4/Static131.java +++ b/client/src/main/java/rt4/Static131.java @@ -73,7 +73,7 @@ public final class Static131 { } @Pc(393) int local393 = (arg2 << 7) + local27; @Pc(400) int local400 = (arg4 << 7) + local35; - @Pc(408) int local408 = Static182.method3361(local27, arg4, arg1, arg2, local35); + @Pc(408) int local408 = Static1.method3361(local27, arg4, arg1, arg2, local35); local7[local13] = arg6.method1553(arg7, local393, local408, local400, local115, local123, local107); } arg6.method1557(local7); diff --git a/client/src/main/java/rt4/Static134.java b/client/src/main/java/rt4/Static134.java deleted file mode 100644 index 33a40ba..0000000 --- a/client/src/main/java/rt4/Static134.java +++ /dev/null @@ -1,28 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static134 { - - @OriginalMember(owner = "client!kh", name = "a", descriptor = "(B)Lclient!ek;") - public static SoftwareIndexedSprite method2619() { - @Pc(25) SoftwareIndexedSprite local25 = new SoftwareIndexedSprite(SpriteLoader.width, SpriteLoader.height, SpriteLoader.xOffsets[0], SpriteLoader.yOffsets[0], SpriteLoader.innerWidths[0], SpriteLoader.innerHeights[0], SpriteLoader.pixels[0], SpriteLoader.palette); - SpriteLoader.clear(); - return local25; - } - - @OriginalMember(owner = "client!kh", name = "a", descriptor = "(IIIBII)V") - public static void method2622(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(8) int local8 = arg2 + 1; - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg2], arg4, arg1, arg0); - @Pc(17) int local17 = arg3 - 1; - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg3], arg4, arg1, arg0); - for (@Pc(29) int local29 = local8; local29 <= local17; local29++) { - @Pc(40) int[] local40 = TextureOp29SubOp4.anIntArrayArray10[local29]; - local40[arg4] = local40[arg1] = arg0; - } - } - -} diff --git a/client/src/main/java/rt4/Static139.java b/client/src/main/java/rt4/Static139.java index 6893e58..35b610d 100644 --- a/client/src/main/java/rt4/Static139.java +++ b/client/src/main/java/rt4/Static139.java @@ -7,9 +7,6 @@ import java.awt.*; public final class Static139 { - @OriginalMember(owner = "client!l", name = "d", descriptor = "Lclient!na;") - public static final JagString aClass100_659 = JagString.parse(")4j"); - @OriginalMember(owner = "client!l", name = "b", descriptor = "(I)V") public static void method2704() { @Pc(7) int local7 = GameShell.topMargin; diff --git a/client/src/main/java/rt4/Static145.java b/client/src/main/java/rt4/Static145.java index cc4e3b5..d0d562f 100644 --- a/client/src/main/java/rt4/Static145.java +++ b/client/src/main/java/rt4/Static145.java @@ -44,7 +44,7 @@ public final class Static145 { } Fonts.b12Full.renderLeft(MiniMenu.getOp(local107), local11 + 3, local127, local129, 0); } - Static121.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761); + InterfaceList.forceRedrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761); } } diff --git a/client/src/main/java/rt4/Static146.java b/client/src/main/java/rt4/Static146.java deleted file mode 100644 index 4989781..0000000 --- a/client/src/main/java/rt4/Static146.java +++ /dev/null @@ -1,13 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static146 { - - @OriginalMember(owner = "client!lg", name = "d", descriptor = "F") - public static float aFloat15; - - @OriginalMember(owner = "client!lg", name = "b", descriptor = "Z") - public static boolean aBoolean174 = false; - -} diff --git a/client/src/main/java/rt4/Static147.java b/client/src/main/java/rt4/Static147.java index 354e87d..2485d95 100644 --- a/client/src/main/java/rt4/Static147.java +++ b/client/src/main/java/rt4/Static147.java @@ -37,7 +37,7 @@ public final class Static147 { for (local5 = 0; local5 < local3; local5++) { local15 = arg0.anIntArray168[local5] - Static123.anInt3555; local22 = arg0.anIntArray160[local5] - Static123.anInt3947; - local29 = arg0.anIntArray163[local5] - Static217.anInt4903; + local29 = arg0.anIntArray163[local5] - SceneGraph.anInt4903; local39 = local29 * arg3 + local15 * arg4 >> 16; @Pc(49) int local49 = local29 * arg4 - local15 * arg3 >> 16; @Pc(61) int local61 = local22 * arg2 - local49 * arg1 >> 16; diff --git a/client/src/main/java/rt4/Static152.java b/client/src/main/java/rt4/Static152.java deleted file mode 100644 index deb1671..0000000 --- a/client/src/main/java/rt4/Static152.java +++ /dev/null @@ -1,127 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static152 { - - @OriginalMember(owner = "client!ma", name = "z", descriptor = "I") - public static int anInt3604 = -1; - - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IBIIIII)V") - public static void method4670(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - @Pc(18) int local18 = arg2 - arg4; - Static241.method4278(arg2); - @Pc(23) int local23 = 0; - if (local18 < 0) { - local18 = 0; - } - @Pc(32) int local32 = arg2; - @Pc(35) int local35 = -arg2; - @Pc(38) int local38 = -local18; - @Pc(40) int local40 = local18; - @Pc(42) int local42 = -1; - @Pc(61) int local61; - @Pc(69) int local69; - @Pc(78) int local78; - @Pc(87) int local87; - if (arg1 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg1) { - @Pc(52) int[] local52 = TextureOp29SubOp4.anIntArrayArray10[arg1]; - local61 = Static231.method1690(TextureOp29.anInt5063, arg5 - arg2, TextureOp29.anInt4164); - local69 = Static231.method1690(TextureOp29.anInt5063, arg2 + arg5, TextureOp29.anInt4164); - local78 = Static231.method1690(TextureOp29.anInt5063, arg5 - local18, TextureOp29.anInt4164); - local87 = Static231.method1690(TextureOp29.anInt5063, arg5 + local18, TextureOp29.anInt4164); - TextureOp29SubOp4.method2576(local52, local61, local78, arg3); - TextureOp29SubOp4.method2576(local52, local78, local87, arg0); - TextureOp29SubOp4.method2576(local52, local87, local69, arg3); - } - @Pc(107) int local107 = -1; - while (local23 < local32) { - local42 += 2; - local107 += 2; - local38 += local107; - local35 += local42; - if (local38 >= 0 && local40 >= 1) { - local40--; - Static241.anIntArray522[local40] = local23; - local38 -= local40 << 1; - } - local23++; - @Pc(264) int local264; - @Pc(273) int local273; - @Pc(280) int[] local280; - @Pc(161) int local161; - if (local35 >= 0) { - local32--; - local35 -= local32 << 1; - local161 = arg1 - local32; - local61 = arg1 + local32; - if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { - if (local32 >= local18) { - local69 = Static231.method1690(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); - local78 = Static231.method1690(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); - if (TextureOp29.anInt2869 >= local61) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local61], local78, local69, arg3); - } - if (local161 >= TextureOp29.anInt5773) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local161], local78, local69, arg3); - } - } else { - local69 = Static241.anIntArray522[local32]; - local78 = Static231.method1690(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); - local87 = Static231.method1690(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); - local264 = Static231.method1690(TextureOp29.anInt5063, arg5 + local69, TextureOp29.anInt4164); - local273 = Static231.method1690(TextureOp29.anInt5063, arg5 - local69, TextureOp29.anInt4164); - if (TextureOp29.anInt2869 >= local61) { - local280 = TextureOp29SubOp4.anIntArrayArray10[local61]; - TextureOp29SubOp4.method2576(local280, local87, local273, arg3); - TextureOp29SubOp4.method2576(local280, local273, local264, arg0); - TextureOp29SubOp4.method2576(local280, local264, local78, arg3); - } - if (local161 >= TextureOp29.anInt5773) { - local280 = TextureOp29SubOp4.anIntArrayArray10[local161]; - TextureOp29SubOp4.method2576(local280, local87, local273, arg3); - TextureOp29SubOp4.method2576(local280, local273, local264, arg0); - TextureOp29SubOp4.method2576(local280, local264, local78, arg3); - } - } - } - } - local161 = arg1 - local23; - local61 = arg1 + local23; - if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { - local69 = arg5 + local32; - local78 = arg5 - local32; - if (local69 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= local78) { - local69 = Static231.method1690(TextureOp29.anInt5063, local69, TextureOp29.anInt4164); - local78 = Static231.method1690(TextureOp29.anInt5063, local78, TextureOp29.anInt4164); - if (local23 < local18) { - local87 = local40 >= local23 ? local40 : Static241.anIntArray522[local23]; - local264 = Static231.method1690(TextureOp29.anInt5063, local87 + arg5, TextureOp29.anInt4164); - local273 = Static231.method1690(TextureOp29.anInt5063, arg5 - local87, TextureOp29.anInt4164); - if (TextureOp29.anInt2869 >= local61) { - local280 = TextureOp29SubOp4.anIntArrayArray10[local61]; - TextureOp29SubOp4.method2576(local280, local78, local273, arg3); - TextureOp29SubOp4.method2576(local280, local273, local264, arg0); - TextureOp29SubOp4.method2576(local280, local264, local69, arg3); - } - if (local161 >= TextureOp29.anInt5773) { - local280 = TextureOp29SubOp4.anIntArrayArray10[local161]; - TextureOp29SubOp4.method2576(local280, local78, local273, arg3); - TextureOp29SubOp4.method2576(local280, local273, local264, arg0); - TextureOp29SubOp4.method2576(local280, local264, local69, arg3); - } - } else { - if (TextureOp29.anInt2869 >= local61) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local61], local78, local69, arg3); - } - if (local161 >= TextureOp29.anInt5773) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local161], local78, local69, arg3); - } - } - } - } - } - } -} diff --git a/client/src/main/java/rt4/Static158.java b/client/src/main/java/rt4/Static158.java index 3619424..95a75b1 100644 --- a/client/src/main/java/rt4/Static158.java +++ b/client/src/main/java/rt4/Static158.java @@ -5,6 +5,8 @@ import org.openrs2.deob.annotation.Pc; public final class Static158 { + @OriginalMember(owner = "client!rj", name = "Z", descriptor = "[I") + public static final int[] anIntArray434 = new int[64]; @OriginalMember(owner = "client!mh", name = "X", descriptor = "I") public static int anInt3851 = -1; @OriginalMember(owner = "client!mg", name = "Q", descriptor = "I") @@ -17,13 +19,13 @@ public final class Static158 { if (LoginManager.npcSpawnsFilesBuffer[local16] != null) { @Pc(25) int local25 = -1; for (@Pc(27) int local27 = 0; local27 < anInt3811; local27++) { - if (Static217.anIntArray434[local27] == LoginManager.regionBitPacked[local16]) { + if (anIntArray434[local27] == LoginManager.regionBitPacked[local16]) { local25 = local27; break; } } if (local25 == -1) { - Static217.anIntArray434[anInt3811] = LoginManager.regionBitPacked[local16]; + anIntArray434[anInt3811] = LoginManager.regionBitPacked[local16]; local25 = anInt3811++; } @Pc(67) int local67 = 0; diff --git a/client/src/main/java/rt4/Static160.java b/client/src/main/java/rt4/Static160.java index 08a6962..c2e7751 100644 --- a/client/src/main/java/rt4/Static160.java +++ b/client/src/main/java/rt4/Static160.java @@ -33,17 +33,17 @@ public final class Static160 { @OriginalMember(owner = "client!mj", name = "a", descriptor = "(IIIII)Z") public static boolean method3049(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - @Pc(9) int local9 = arg3 * Static231.anInt5205 + arg0 * Static81.anInt2222 >> 16; - @Pc(19) int local19 = arg3 * Static81.anInt2222 - arg0 * Static231.anInt5205 >> 16; - @Pc(29) int local29 = arg1 * anInt2886 + local19 * Static121.anInt3038 >> 16; - @Pc(39) int local39 = arg1 * Static121.anInt3038 - local19 * anInt2886 >> 16; + @Pc(9) int local9 = arg3 * SceneGraph.anInt5205 + arg0 * Static81.anInt2222 >> 16; + @Pc(19) int local19 = arg3 * Static81.anInt2222 - arg0 * SceneGraph.anInt5205 >> 16; + @Pc(29) int local29 = arg1 * anInt2886 + local19 * SceneGraph.anInt3038 >> 16; + @Pc(39) int local39 = arg1 * SceneGraph.anInt3038 - local19 * anInt2886 >> 16; if (local29 < 1) { local29 = 1; } @Pc(50) int local50 = (local9 << 9) / local29; @Pc(56) int local56 = (local39 << 9) / local29; - @Pc(66) int local66 = arg2 * anInt2886 + local19 * Static121.anInt3038 >> 16; - @Pc(76) int local76 = arg2 * Static121.anInt3038 - local19 * anInt2886 >> 16; + @Pc(66) int local66 = arg2 * anInt2886 + local19 * SceneGraph.anInt3038 >> 16; + @Pc(76) int local76 = arg2 * SceneGraph.anInt3038 - local19 * anInt2886 >> 16; if (local66 < 1) { local66 = 1; } diff --git a/client/src/main/java/rt4/Static164.java b/client/src/main/java/rt4/Static164.java index 98e83d7..5fecd6c 100644 --- a/client/src/main/java/rt4/Static164.java +++ b/client/src/main/java/rt4/Static164.java @@ -93,7 +93,7 @@ public final class Static164 { local75[local90 + 1539] = local65; } } - } else if (!Static33.method867(arg0, local46, arg2, local28)) { + } else if (!MiniMap.renderScenery(arg0, local46, arg2, local28)) { return false; } } @@ -123,7 +123,7 @@ public final class Static164 { local75[local90 + 1536 + 3] = local65; } } - } else if (!Static33.method867(arg0, local46, arg2, local28)) { + } else if (!MiniMap.renderScenery(arg0, local46, arg2, local28)) { return false; } } @@ -132,7 +132,7 @@ public final class Static164 { local28 = (int) local14 >> 20 & 0x3; local35 = (int) (local14 >>> 32) & Integer.MAX_VALUE; @Pc(586) LocType local586 = LocTypeList.get(local35); - return local586.mapSceneId == -1 || Static33.method867(arg0, local586, arg2, local28); + return local586.mapSceneId == -1 || MiniMap.renderScenery(arg0, local586, arg2, local28); } return true; } diff --git a/client/src/main/java/rt4/Static165.java b/client/src/main/java/rt4/Static165.java index 07c8127..f56f68c 100644 --- a/client/src/main/java/rt4/Static165.java +++ b/client/src/main/java/rt4/Static165.java @@ -15,7 +15,7 @@ public final class Static165 { @OriginalMember(owner = "client!nb", name = "a", descriptor = "(IIIIIIIIII)V") public static void method3162(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8) { if (arg0 == arg1 && arg8 == arg2 && arg7 == arg6 && arg4 == arg5) { - Static231.method3982(arg3, arg4, arg0, arg8, arg6); + TextureOp29.method3982(arg3, arg4, arg0, arg8, arg6); return; } @Pc(32) int local32 = arg0; @@ -43,7 +43,7 @@ public final class Static165 { @Pc(156) int local156 = arg0 + (local136 + local140 + local144 >> 12); @Pc(160) int local160 = local107 * local105; @Pc(172) int local172 = arg8 + (local160 + local132 + local128 >> 12); - Static231.method3982(arg3, local172, local32, local42, local156); + TextureOp29.method3982(arg3, local172, local32, local42, local156); local32 = local156; local42 = local172; } @@ -71,7 +71,7 @@ public final class Static165 { @OriginalMember(owner = "client!fl", name = "a", descriptor = "(IIIIII)V") public static void method1568(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg0], arg1 - arg2, arg2 + arg1, arg4); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[arg0], arg1 - arg2, arg2 + arg1, arg4); @Pc(17) int local17 = 0; @Pc(21) int local21 = arg2 * arg2; @Pc(25) int local25 = arg3 * arg3; @@ -113,8 +113,8 @@ public final class Static165 { local48 += -local98; @Pc(179) int local179 = arg1 - local17; local98 -= local60; - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local109], local179, local160, arg4); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local105], local179, local160, arg4); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local109], local179, local160, arg4); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local105], local179, local160, arg4); } } @@ -137,9 +137,9 @@ public final class Static165 { @Pc(95) int local95; @Pc(104) int local104; if (arg4 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg4) { - local95 = Static231.method1690(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); - local104 = Static231.method1690(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg4], local104, local95, arg0); + local95 = IntUtils.clamp(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); + local104 = IntUtils.clamp(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[arg4], local104, local95, arg0); } @Pc(118) int local118 = local67 * (arg1 - 1); while (local17 > 0) { @@ -166,13 +166,13 @@ public final class Static165 { local42 += -local118; local104 = local17 + arg4; if (TextureOp29.anInt5773 <= local104 && TextureOp29.anInt2869 >= local95) { - @Pc(213) int local213 = Static231.method1690(TextureOp29.anInt5063, local15 + arg3, TextureOp29.anInt4164); - @Pc(222) int local222 = Static231.method1690(TextureOp29.anInt5063, arg3 - local15, TextureOp29.anInt4164); + @Pc(213) int local213 = IntUtils.clamp(TextureOp29.anInt5063, local15 + arg3, TextureOp29.anInt4164); + @Pc(222) int local222 = IntUtils.clamp(TextureOp29.anInt5063, arg3 - local15, TextureOp29.anInt4164); if (local95 >= TextureOp29.anInt5773) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local95], local222, local213, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local95], local222, local213, arg0); } if (TextureOp29.anInt2869 >= local104) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local104], local222, local213, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local104], local222, local213, arg0); } } local118 -= local67; diff --git a/client/src/main/java/rt4/Static173.java b/client/src/main/java/rt4/Static173.java deleted file mode 100644 index e1dc8d7..0000000 --- a/client/src/main/java/rt4/Static173.java +++ /dev/null @@ -1,96 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static173 { - - @OriginalMember(owner = "client!nk", name = "a", descriptor = "(Z[J[I)V") - public static void method3243(@OriginalArg(1) long[] arg0, @OriginalArg(2) int[] arg1) { - method436(arg0, 0, arg0.length - 1, arg1); - } - - @OriginalMember(owner = "client!nk", name = "a", descriptor = "(IIIIIB)V") - public static void method3246(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - if (arg4 > TextureOp29.anInt2869 || arg2 < TextureOp29.anInt5773) { - return; - } - @Pc(24) boolean local24; - if (TextureOp29.anInt4164 > arg1) { - local24 = false; - arg1 = TextureOp29.anInt4164; - } else if (TextureOp29.anInt5063 >= arg1) { - local24 = true; - } else { - local24 = false; - arg1 = TextureOp29.anInt5063; - } - @Pc(43) boolean local43; - if (arg3 < TextureOp29.anInt4164) { - arg3 = TextureOp29.anInt4164; - local43 = false; - } else if (arg3 > TextureOp29.anInt5063) { - arg3 = TextureOp29.anInt5063; - local43 = false; - } else { - local43 = true; - } - if (TextureOp29.anInt5773 > arg4) { - arg4 = TextureOp29.anInt5773; - } else { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg4++], arg1, arg3, arg0); - } - if (arg2 <= TextureOp29.anInt2869) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg2--], arg1, arg3, arg0); - } else { - arg2 = TextureOp29.anInt2869; - } - @Pc(98) int local98; - if (local24 && local43) { - for (local98 = arg4; local98 <= arg2; local98++) { - @Pc(105) int[] local105 = TextureOp29SubOp4.anIntArrayArray10[local98]; - local105[arg1] = local105[arg3] = arg0; - } - } else if (local24) { - for (local98 = arg4; local98 <= arg2; local98++) { - TextureOp29SubOp4.anIntArrayArray10[local98][arg1] = arg0; - } - } else if (local43) { - for (local98 = arg4; local98 <= arg2; local98++) { - TextureOp29SubOp4.anIntArrayArray10[local98][arg3] = arg0; - } - } - } - - @OriginalMember(owner = "client!gj", name = "a", descriptor = "([JII[II)V") - public static void method436(@OriginalArg(0) long[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int[] arg3) { - if (arg1 >= arg2) { - return; - } - @Pc(20) int local20 = arg1; - @Pc(26) int local26 = (arg2 + arg1) / 2; - @Pc(30) long local30 = arg0[local26]; - arg0[local26] = arg0[arg2]; - arg0[arg2] = local30; - @Pc(44) int local44 = arg3[local26]; - arg3[local26] = arg3[arg2]; - arg3[arg2] = local44; - for (@Pc(56) int local56 = arg1; local56 < arg2; local56++) { - if (arg0[local56] < local30 + (long) (local56 & 0x1)) { - @Pc(76) long local76 = arg0[local56]; - arg0[local56] = arg0[local20]; - arg0[local20] = local76; - @Pc(90) int local90 = arg3[local56]; - arg3[local56] = arg3[local20]; - arg3[local20++] = local90; - } - } - arg0[arg2] = arg0[local20]; - arg0[local20] = local30; - arg3[arg2] = arg3[local20]; - arg3[local20] = local44; - method436(arg0, arg1, local20 - 1, arg3); - method436(arg0, local20 + 1, arg2, arg3); - } -} diff --git a/client/src/main/java/rt4/Static176.java b/client/src/main/java/rt4/Static176.java deleted file mode 100644 index 201b971..0000000 --- a/client/src/main/java/rt4/Static176.java +++ /dev/null @@ -1,74 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static176 { - - @OriginalMember(owner = "client!wk", name = "x", descriptor = "Lclient!na;") - public static final JagString aClass100_1107 = JagString.parse(")4l="); - @OriginalMember(owner = "client!cg", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_184 = JagString.parse("1"); - @OriginalMember(owner = "client!ch", name = "x", descriptor = "Lclient!na;") - public static final JagString aClass100_193 = JagString.parse(":"); - @OriginalMember(owner = "client!em", name = "u", descriptor = "Lclient!na;") - public static final JagString aClass100_420 = JagString.parse(")1o"); - @OriginalMember(owner = "client!nd", name = "x", descriptor = "Lclient!na;") - public static final JagString aClass100_783 = JagString.parse(")4p="); - @OriginalMember(owner = "client!rc", name = "G", descriptor = "Lclient!na;") - public static final JagString aClass100_230 = JagString.parse(""); - @OriginalMember(owner = "client!ja", name = "s", descriptor = "Lclient!na;") - public static final JagString HTTP_PROTOCOL = JagString.parse("http:)4)4"); - @OriginalMember(owner = "client!vd", name = "F", descriptor = "Lclient!na;") - public static final JagString aClass100_945 = JagString.parse("0"); - @OriginalMember(owner = "client!q", name = "a", descriptor = "Lclient!na;") - public static final JagString aClass100_260 = JagString.parse(")1a2)1m"); - - @OriginalMember(owner = "client!ob", name = "a", descriptor = "[Z") - public static final boolean[] customCameraActive = new boolean[5]; - - @OriginalMember(owner = "client!ob", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_800 = JagString.parse(""); - - @OriginalMember(owner = "client!ob", name = "o", descriptor = "Lclient!na;") - private static final JagString aClass100_801 = JagString.parse(")4a="); - - @OriginalMember(owner = "client!ob", name = "p", descriptor = "Lclient!na;") - public static final JagString aClass100_802 = JagString.parse("(U0a )2 non)2existant gosub script)2num: "); - - @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IB)Z") - public static boolean hopWorld(@OriginalArg(0) int arg0) { - @Pc(3) World local3 = ScriptRunner.getWorld(arg0); - if (local3 == null) { - return false; - } else if (SignLink.anInt5928 == 1 || SignLink.anInt5928 == 2 || client.modeWhere == 2) { - @Pc(31) byte[] local31 = local3.hostname.method3148(); - client.hostname = new String(local31, 0, local31.length); - Player.worldId = local3.id; - if (client.modeWhere != 0) { - client.defaultPort = Player.worldId + 43594; // 40000; - client.port = client.defaultPort; - client.alternatePort = Player.worldId + 43594; // 50000; - } - return true; - } else { - @Pc(62) JagString local62 = aClass100_230; - if (client.modeWhere != 0) { - local62 = JagString.concatenate(new JagString[]{aClass100_193, JagString.parseInt(local3.id + 7000)}); - } - @Pc(89) JagString local89 = aClass100_230; - if (client.settings != null) { - local89 = JagString.concatenate(new JagString[]{aClass100_783, client.settings}); - } - @Pc(182) JagString local182 = JagString.concatenate(new JagString[]{HTTP_PROTOCOL, local3.hostname, local62, aClass100_1107, JagString.parseInt(client.language), aClass100_801, JagString.parseInt(client.affiliate), local89, Static139.aClass100_659, client.objectTag ? aClass100_184 : aClass100_945, aClass100_420, client.javaScript ? aClass100_184 : aClass100_945, aClass100_260, client.advertSuppressed ? aClass100_184 : aClass100_945}); - try { - client.instance.getAppletContext().showDocument(local182.method3107(), "_self"); - return true; - } catch (@Pc(191) Exception local191) { - return false; - } - } - } - -} diff --git a/client/src/main/java/rt4/Static182.java b/client/src/main/java/rt4/Static182.java deleted file mode 100644 index cf06e76..0000000 --- a/client/src/main/java/rt4/Static182.java +++ /dev/null @@ -1,28 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static182 { - - @OriginalMember(owner = "client!tl", name = "i", descriptor = "Lclient!na;") - public static final JagString aClass100_1017 = JagString.parse(")1"); - @OriginalMember(owner = "client!cg", name = "h", descriptor = "Lclient!na;") - public static final JagString aClass100_185 = JagString.parse(")3"); - @OriginalMember(owner = "client!oj", name = "t", descriptor = "[I") - public static int[] anIntArray372; - - @OriginalMember(owner = "client!oj", name = "v", descriptor = "I") - public static int anInt4311 = -2; - - @OriginalMember(owner = "client!oj", name = "z", descriptor = "[Z") - public static final boolean[] aBooleanArray97 = new boolean[]{true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false}; - - @OriginalMember(owner = "client!oj", name = "a", descriptor = "(IBI[[III)I") - public static int method3361(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int[][] arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(25) int local25 = arg0 * arg2[arg3 + 1][arg1] + (128 - arg0) * arg2[arg3][arg1] >> 7; - @Pc(52) int local52 = arg2[arg3][arg1 + 1] * (128 - arg0) + arg2[arg3 + 1][arg1 + 1] * arg0 >> 7; - return local25 * (128 - arg4) + arg4 * local52 >> 7; - } -} diff --git a/client/src/main/java/rt4/Static193.java b/client/src/main/java/rt4/Static193.java deleted file mode 100644 index 40c2783..0000000 --- a/client/src/main/java/rt4/Static193.java +++ /dev/null @@ -1,253 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static193 { - - @OriginalMember(owner = "client!ec", name = "B", descriptor = "[[I") - public static final int[][] anIntArrayArray8 = new int[][]{new int[0], {128, 0, 128, 128, 0, 128}, {0, 0, 128, 0, 128, 128, 64, 128}, {0, 128, 0, 0, 128, 0, 64, 128}, {0, 0, 64, 128, 0, 128}, {128, 128, 64, 128, 128, 0}, {64, 0, 128, 0, 128, 128, 64, 128}, {128, 0, 128, 128, 0, 128, 0, 64, 64, 0}, {0, 0, 64, 0, 0, 64}, {0, 0, 128, 0, 128, 128, 64, 96, 32, 64}, {0, 128, 0, 0, 32, 64, 64, 96, 128, 128}, {0, 128, 0, 0, 32, 32, 96, 32, 128, 0, 128, 128}}; - @OriginalMember(owner = "client!pi", name = "U", descriptor = "I") - public static int anInt4539; - - @OriginalMember(owner = "client!pi", name = "a", descriptor = "([[[B[[B[[B[[I[[F[[I[[B[[B[[FI[[F[[I[[I[[II)[Lclient!hg;") - public static GlTile[] method3501(@OriginalArg(0) byte[][][] arg0, @OriginalArg(1) byte[][] arg1, @OriginalArg(2) byte[][] arg2, @OriginalArg(3) int[][] arg3, @OriginalArg(4) float[][] arg4, @OriginalArg(5) int[][] arg5, @OriginalArg(6) byte[][] arg6, @OriginalArg(7) byte[][] arg7, @OriginalArg(8) float[][] arg8, @OriginalArg(9) int arg9, @OriginalArg(10) float[][] arg10, @OriginalArg(11) int[][] arg11, @OriginalArg(12) int[][] arg12, @OriginalArg(13) int[][] arg13) { - @Pc(9) int[][] local9 = new int[105][105]; - @Pc(16) int local16; - for (@Pc(11) int local11 = 1; local11 <= 103; local11++) { - for (local16 = 1; local16 <= 103; local16++) { - @Pc(25) byte local25 = arg2[local11][local16]; - if (local25 == 0) { - local25 = arg2[local11 - 1][local16]; - } - if (local25 == 0) { - local25 = arg2[local11][local16 - 1]; - } - if (local25 == 0) { - local25 = arg2[local11 - 1][local16 - 1]; - } - if (local25 != 0) { - @Pc(77) FluType local77 = FluTypeList.get((local25 & 0xFF) - 1); - local9[local11][local16] = (local77.anInt4155 + 1 << 16) + local77.anInt4156; - } - } - } - @Pc(103) HashTable local103 = new HashTable(128); - @Pc(155) int local155; - @Pc(161) int local161; - @Pc(169) int local169; - @Pc(112) int local112; - for (local16 = 1; local16 <= 102; local16++) { - for (local112 = 1; local112 <= 102; local112++) { - if (arg2[local16][local112] != 0) { - @Pc(135) int[] local135; - if (arg6[local16][local112] == 0) { - local135 = Static1.anIntArrayArray35[0]; - } else { - local135 = anIntArrayArray8[arg1[local16][local112]]; - if (local135.length == 0) { - continue; - } - } - local155 = 0; - local161 = local9[local16][local112]; - local169 = local9[local16 + 1][local112]; - if (arg5 != null) { - local155 = arg5[local16][local112] & 0xFFFFFF; - } - @Pc(188) long local188 = (long) local155 | (long) local169 << 32; - @Pc(196) int local196 = local9[local16][local112 + 1]; - @Pc(206) int local206 = local9[local16 + 1][local112 + 1]; - @Pc(214) long local214 = (long) local196 << 32 | (long) local155; - @Pc(219) int local219 = local135.length / 2; - @Pc(227) long local227 = (long) local155 | (long) local161 << 32; - @Pc(233) GlTile local233 = (GlTile) local103.get(local227); - if (local233 == null) { - local233 = new GlTile((local161 >> 16) - 1, (float) (local161 & 0xFFFF), false, arg13 != null, local155); - local103.put(local233, local227); - } - local233.anInt2484++; - local233.anInt2482 += local219; - if (local188 != local227) { - local233 = (GlTile) local103.get(local188); - if (local233 == null) { - local233 = new GlTile((local169 >> 16) - 1, (float) (local169 & 0xFFFF), false, arg13 != null, local155); - local103.put(local233, local188); - } - local233.anInt2484++; - local233.anInt2482 += local219; - } - @Pc(340) long local340 = (long) local206 << 32 | (long) local155; - if (local340 != local227 && local340 != local188) { - local233 = (GlTile) local103.get(local340); - if (local233 == null) { - local233 = new GlTile((local206 >> 16) - 1, (float) (local206 & 0xFFFF), false, arg13 != null, local155); - local103.put(local233, local340); - } - local233.anInt2482 += local219; - local233.anInt2484++; - } - if (local214 != local227 && local188 != local214 && local214 != local340) { - local233 = (GlTile) local103.get(local214); - if (local233 == null) { - local233 = new GlTile((local196 >> 16) - 1, (float) (local196 & 0xFFFF), false, arg13 != null, local155); - local103.put(local233, local214); - } - local233.anInt2484++; - local233.anInt2482 += local219; - } - } - } - } - @Pc(493) GlTile local493; - for (local493 = (GlTile) local103.head(); local493 != null; local493 = (GlTile) local103.next()) { - local493.method1940(); - } - for (local16 = 1; local16 <= 102; local16++) { - for (local112 = 1; local112 <= 102; local112++) { - @Pc(524) byte local524 = arg2[local16][local112]; - if (local524 != 0) { - if ((arg0[arg9][local16][local112] & 0x8) != 0) { - local155 = 0; - } else if ((arg0[1][local16][local112] & 0x2) == 2 && arg9 > 0) { - local155 = arg9 - 1; - } else { - local155 = arg9; - } - local161 = 0; - @Pc(574) boolean[] local574 = null; - local169 = 128; - if (arg5 != null) { - local169 = arg5[local16][local112] >>> 24 << 3; - local161 = arg5[local16][local112] & 0xFFFFFF; - } - @Pc(655) int local655; - @Pc(712) int local712; - @Pc(614) int[] local614; - @Pc(628) byte local628; - @Pc(678) int local678; - @Pc(754) int local754; - if (arg6[local16][local112] == 0) { - local655 = local524 == arg2[local16 - 1][local112 - 1] ? 1 : -1; - local614 = Static1.anIntArrayArray35[0]; - local678 = local524 == arg2[local16 + 1][local112 - 1] ? 1 : -1; - if (arg2[local16][local112 - 1] == local524) { - local678++; - local655++; - } else { - local655--; - local678--; - } - local712 = local524 == arg2[local16 + 1][local112 + 1] ? 1 : -1; - if (local524 == arg2[local16 + 1][local112]) { - local712++; - local678++; - } else { - local678--; - local712--; - } - local754 = local524 == arg2[local16 - 1][local112 + 1] ? 1 : -1; - if (arg2[local16][local112 + 1] == local524) { - local754++; - local712++; - } else { - local712--; - local754--; - } - if (arg2[local16 - 1][local112] == local524) { - local754++; - local655++; - } else { - local754--; - local655--; - } - @Pc(789) int local789 = local655 - local712; - @Pc(794) int local794 = local678 - local754; - if (local794 < 0) { - local794 = -local794; - } - if (local789 < 0) { - local789 = -local789; - } - local628 = (byte) (local794 <= local789 ? 0 : 1); - arg7[local16][local112] = local628; - } else { - local614 = anIntArrayArray8[arg1[local16][local112]]; - local574 = Static69.aBooleanArrayArray2[arg1[local16][local112]]; - local628 = arg7[local16][local112]; - if (local614.length == 0) { - continue; - } - } - local655 = local9[local16][local112]; - local678 = local9[local16 + 1][local112]; - local712 = local9[local16 + 1][local112 + 1]; - @Pc(861) long local861 = (long) local655 << 32 | (long) local161; - @Pc(869) long local869 = (long) local678 << 32 | (long) local161; - @Pc(877) long local877 = (long) local712 << 32 | (long) local161; - @Pc(883) int local883 = arg11[local16][local112]; - local754 = local9[local16][local112 + 1]; - @Pc(901) int local901 = arg11[local16 + 1][local112 + 1]; - @Pc(909) int local909 = arg11[local16 + 1][local112]; - @Pc(917) long local917 = (long) local161 | (long) local754 << 32; - @Pc(925) int local925 = arg11[local16][local112 + 1]; - @Pc(931) int local931 = arg3[local16][local112]; - @Pc(939) int local939 = arg3[local16 + 1][local112]; - @Pc(949) int local949 = arg3[local16 + 1][local112 + 1]; - @Pc(957) int local957 = arg3[local16][local112 + 1]; - @Pc(963) int local963 = (local678 >> 16) - 1; - @Pc(969) int local969 = (local655 >> 16) - 1; - @Pc(975) int local975 = (local712 >> 16) - 1; - @Pc(981) GlTile local981 = (GlTile) local103.get(local861); - method1291(arg13, local655 <= local655, Static1.method588(local969, local883, local931), local981, local614, local112, local155, local16, local655 <= local712, arg8, local754 >= local655, arg4, local169, Static1.method588(local969, local925, local957), Static1.method588(local969, local901, local949), local655 <= local678, arg12, arg10, local628, Static1.method588(local969, local909, local939), local574); - @Pc(1050) int local1050 = (local754 >> 16) - 1; - if (local869 != local861) { - local981 = (GlTile) local103.get(local869); - method1291(arg13, local678 <= local655, Static1.method588(local963, local883, local931), local981, local614, local112, local155, local16, local712 >= local678, arg8, local678 <= local754, arg4, local169, Static1.method588(local963, local925, local957), Static1.method588(local963, local901, local949), local678 <= local678, arg12, arg10, local628, Static1.method588(local963, local909, local939), local574); - } - if (local877 != local861 && local877 != local869) { - local981 = (GlTile) local103.get(local877); - method1291(arg13, local655 >= local712, Static1.method588(local975, local883, local931), local981, local614, local112, local155, local16, local712 <= local712, arg8, local712 <= local754, arg4, local169, Static1.method588(local975, local925, local957), Static1.method588(local975, local901, local949), local678 >= local712, arg12, arg10, local628, Static1.method588(local975, local909, local939), local574); - } - if (local917 != local861 && local917 != local869 && local917 != local877) { - local981 = (GlTile) local103.get(local917); - method1291(arg13, local754 <= local655, Static1.method588(local1050, local883, local931), local981, local614, local112, local155, local16, local754 <= local712, arg8, local754 >= local754, arg4, local169, Static1.method588(local1050, local925, local957), Static1.method588(local1050, local901, local949), local678 >= local754, arg12, arg10, local628, Static1.method588(local1050, local909, local939), local574); - } - } - } - } - for (local493 = (GlTile) local103.head(); local493 != null; local493 = (GlTile) local103.next()) { - if (local493.anInt2483 == 0) { - local493.unlink(); - } else { - local493.method1943(); - } - } - local16 = local103.size(); - @Pc(1348) GlTile[] local1348 = new GlTile[local16]; - local103.method3865(local1348); - @Pc(1358) long[] local1358 = new long[local16]; - for (local155 = 0; local155 < local16; local155++) { - local1358[local155] = local1348[local155].key; - } - Static4.method23(local1358, local1348); - return local1348; - } - - @OriginalMember(owner = "client!ec", name = "a", descriptor = "([[IZILclient!hg;[IIIIZ[[FZI[[FIIIZ[[I[[FBI[Z)V") - public static void method1291(@OriginalArg(0) int[][] arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) int arg2, @OriginalArg(3) GlTile arg3, @OriginalArg(4) int[] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) boolean arg8, @OriginalArg(9) float[][] arg9, @OriginalArg(10) boolean arg10, @OriginalArg(12) float[][] arg11, @OriginalArg(13) int arg12, @OriginalArg(14) int arg13, @OriginalArg(15) int arg14, @OriginalArg(16) boolean arg15, @OriginalArg(17) int[][] arg16, @OriginalArg(18) float[][] arg17, @OriginalArg(19) byte arg18, @OriginalArg(20) int arg19, @OriginalArg(21) boolean[] arg20) { - @Pc(11) int local11 = (arg2 << 8) + (arg1 ? 255 : 0); - @Pc(25) int local25 = (arg8 ? 255 : 0) + (arg14 << 8); - @Pc(31) int[] local31 = new int[arg4.length / 2]; - @Pc(41) int local41 = (arg10 ? 255 : 0) + (arg13 << 8); - @Pc(51) int local51 = (arg19 << 8) + (arg15 ? 255 : 0); - for (@Pc(53) int local53 = 0; local53 < local31.length; local53++) { - @Pc(67) int local67 = arg4[local53 + local53]; - @Pc(80) int[][] local80 = arg0 == null || arg20 == null || !arg20[local53] ? arg16 : arg0; - @Pc(88) int local88 = arg4[local53 + local53 + 1]; - local31[local53] = Static1.method3683(local41, (float) arg12, local11, local51, arg0, local80, arg7, arg17, local25, arg18, false, arg3, arg9, arg5, local67, arg11, local88); - } - arg3.method1945(arg6, arg7, arg5, local31, null, false); - } -} diff --git a/client/src/main/java/rt4/Static217.java b/client/src/main/java/rt4/Static217.java deleted file mode 100644 index 19c98e0..0000000 --- a/client/src/main/java/rt4/Static217.java +++ /dev/null @@ -1,81 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static217 { - - @OriginalMember(owner = "client!rj", name = "R", descriptor = "I") - public static int anInt4903; - - @OriginalMember(owner = "client!rj", name = "Z", descriptor = "[I") - public static final int[] anIntArray434 = new int[64]; - - @OriginalMember(owner = "client!rj", name = "ab", descriptor = "Lclient!na;") - public static final JagString aClass100_916 = JagString.parse(":clanreq:"); - - @OriginalMember(owner = "client!rj", name = "a", descriptor = "([Lclient!mj;I[BIIIIZIIB)V") - public static void method3771(@OriginalArg(0) CollisionMap[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) byte[] arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) boolean arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9) { - @Pc(7) int local7 = -1; - @Pc(12) Buffer local12 = new Buffer(arg2); - while (true) { - @Pc(20) int local20 = local12.gVarSmart(); - if (local20 == 0) { - return; - } - local7 += local20; - @Pc(31) int local31 = 0; - while (true) { - @Pc(35) int local35 = local12.gsmarts(); - if (local35 == 0) { - break; - } - local31 += local35 - 1; - @Pc(50) int local50 = local31 & 0x3F; - @Pc(56) int local56 = local31 >> 6 & 0x3F; - @Pc(60) int local60 = local31 >> 12; - @Pc(64) int local64 = local12.g1(); - @Pc(68) int local68 = local64 >> 2; - @Pc(72) int local72 = local64 & 0x3; - if (arg3 == local60 && local56 >= arg8 && local56 < arg8 + 8 && arg9 <= local50 && arg9 + 8 > local50) { - @Pc(103) LocType local103 = LocTypeList.get(local7); - @Pc(120) int local120 = method1286(local50 & 0x7, arg4, local72, local103.length, local103.width, local56 & 0x7) + arg5; - @Pc(137) int local137 = Static241.method4541(local103.width, arg4, local103.length, local56 & 0x7, local72, local50 & 0x7) + arg6; - if (local120 > 0 && local137 > 0 && local120 < 103 && local137 < 103) { - @Pc(154) CollisionMap local154 = null; - if (!arg7) { - @Pc(159) int local159 = arg1; - if ((SceneGraph.tileFlags[1][local120][local137] & 0x2) == 2) { - local159 = arg1 - 1; - } - if (local159 >= 0) { - local154 = arg0[local159]; - } - } - SceneGraph.method3397(arg1, !arg7, arg1, arg7, local154, local7, local68, local120, local137, local72 + arg4 & 0x3); - } - } - } - } - } - - @OriginalMember(owner = "client!eb", name = "a", descriptor = "(IIIIIII)I") - public static int method1286(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5) { - if ((arg2 & 0x1) == 1) { - @Pc(10) int local10 = arg4; - arg4 = arg3; - arg3 = local10; - } - @Pc(18) int local18 = arg1 & 0x3; - if (local18 == 0) { - return arg5; - } else if (local18 == 1) { - return arg0; - } else if (local18 == 2) { - return 7 + 1 - arg5 - arg4; - } else { - return 7 + 1 - arg0 - arg3; - } - } -} diff --git a/client/src/main/java/rt4/Static231.java b/client/src/main/java/rt4/Static231.java deleted file mode 100644 index a8b7179..0000000 --- a/client/src/main/java/rt4/Static231.java +++ /dev/null @@ -1,118 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static231 { - - @OriginalMember(owner = "client!sk", name = "jb", descriptor = "I") - public static int anInt5203; - - @OriginalMember(owner = "client!sk", name = "mb", descriptor = "I") - public static int anInt5205; - - @OriginalMember(owner = "client!sk", name = "lb", descriptor = "Z") - public static boolean aBoolean252 = false; - - @OriginalMember(owner = "client!sk", name = "a", descriptor = "(IIIIII)V") - public static void method3982(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(15) int local15 = arg4 - arg2; - @Pc(19) int local19 = arg1 - arg3; - if (local15 == 0) { - if (local19 != 0) { - method1306(arg1, arg3, arg0, arg2); - } - } else if (local19 == 0) { - method4019(arg2, arg0, arg4, arg3); - } else { - @Pc(50) int local50 = (local19 << 12) / local15; - @Pc(59) int local59 = arg3 - (local50 * arg2 >> 12); - @Pc(68) int local68; - @Pc(76) int local76; - if (TextureOp29.anInt4164 > arg2) { - local68 = TextureOp29.anInt4164; - local76 = (TextureOp29.anInt4164 * local50 >> 12) + local59; - } else if (arg2 > TextureOp29.anInt5063) { - local76 = (TextureOp29.anInt5063 * local50 >> 12) + local59; - local68 = TextureOp29.anInt5063; - } else { - local68 = arg2; - local76 = arg3; - } - @Pc(109) int local109; - @Pc(118) int local118; - if (arg4 < TextureOp29.anInt4164) { - local109 = TextureOp29.anInt4164; - local118 = local59 + (local50 * TextureOp29.anInt4164 >> 12); - } else if (TextureOp29.anInt5063 < arg4) { - local109 = TextureOp29.anInt5063; - local118 = local59 + (local50 * TextureOp29.anInt5063 >> 12); - } else { - local118 = arg1; - local109 = arg4; - } - if (TextureOp29.anInt5773 > local118) { - local109 = (TextureOp29.anInt5773 - local59 << 12) / local50; - local118 = TextureOp29.anInt5773; - } else if (local118 > TextureOp29.anInt2869) { - local118 = TextureOp29.anInt2869; - local109 = (TextureOp29.anInt2869 - local59 << 12) / local50; - } - if (local76 < TextureOp29.anInt5773) { - local76 = TextureOp29.anInt5773; - local68 = (TextureOp29.anInt5773 - local59 << 12) / local50; - } else if (TextureOp29.anInt2869 < local76) { - local76 = TextureOp29.anInt2869; - local68 = (TextureOp29.anInt2869 - local59 << 12) / local50; - } - Static241.method4547(arg0, local118, local76, local109, local68); - } - } - - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IIZII)V") - public static void method4019(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (arg3 >= TextureOp29.anInt5773 && arg3 <= TextureOp29.anInt2869) { - @Pc(15) int local15 = method1690(TextureOp29.anInt5063, arg0, TextureOp29.anInt4164); - @Pc(21) int local21 = method1690(TextureOp29.anInt5063, arg2, TextureOp29.anInt4164); - method3826(arg1, arg3, local21, local15); - } - } - - @OriginalMember(owner = "client!gd", name = "a", descriptor = "(IIBI)I") - public static int method1690(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { - return arg2 > arg1 ? arg2 : arg1 > arg0 ? arg0 : arg1; - } - - @OriginalMember(owner = "client!sa", name = "a", descriptor = "(IIIBI)V") - public static void method3826(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { - if (arg3 <= arg2) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg1], arg3, arg2, arg0); - } else { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg1], arg2, arg3, arg0); - } - } - - @OriginalMember(owner = "client!ed", name = "a", descriptor = "(ZIIII)V") - public static void method1306(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (arg3 >= TextureOp29.anInt4164 && arg3 <= TextureOp29.anInt5063) { - @Pc(22) int local22 = method1690(TextureOp29.anInt2869, arg1, TextureOp29.anInt5773); - @Pc(28) int local28 = method1690(TextureOp29.anInt2869, arg0, TextureOp29.anInt5773); - method2054(local22, arg3, local28, arg2); - } - } - - @OriginalMember(owner = "client!hm", name = "a", descriptor = "(IIIII)V") - public static void method2054(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - @Pc(8) int local8; - if (arg0 <= arg2) { - for (local8 = arg0; local8 < arg2; local8++) { - TextureOp29SubOp4.anIntArrayArray10[local8][arg1] = arg3; - } - } else { - for (local8 = arg2; local8 < arg0; local8++) { - TextureOp29SubOp4.anIntArrayArray10[local8][arg1] = arg3; - } - } - } -} diff --git a/client/src/main/java/rt4/Static232.java b/client/src/main/java/rt4/Static232.java deleted file mode 100644 index 908350f..0000000 --- a/client/src/main/java/rt4/Static232.java +++ /dev/null @@ -1,10 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static232 { - - @OriginalMember(owner = "client!nj", name = "h", descriptor = "Lclient!ih;") - public static final LinkedList aClass69_97 = new LinkedList(); - -} diff --git a/client/src/main/java/rt4/Static233.java b/client/src/main/java/rt4/Static233.java index 5652361..1e243ec 100644 --- a/client/src/main/java/rt4/Static233.java +++ b/client/src/main/java/rt4/Static233.java @@ -53,7 +53,7 @@ public final class Static233 { @Pc(99) int local99 = local89 / 8 + (local83 / 8 << 8); for (@Pc(101) int local101 = 0; local101 < LoginManager.regionBitPacked.length; local101++) { if (LoginManager.regionBitPacked[local101] == local99 && local21[local101] != null) { - Static217.method3771(PathFinder.collisionMaps, local29, local21[local101], local67, local77, local36 * 8, local43 * 8, arg0, (local83 & 0x7) * 8, (local89 & 0x7) * 8); + method3771(PathFinder.collisionMaps, local29, local21[local101], local67, local77, local36 * 8, local43 * 8, arg0, (local83 & 0x7) * 8, (local89 & 0x7) * 8); break; } } @@ -64,4 +64,86 @@ public final class Static233 { } } + @OriginalMember(owner = "client!rj", name = "a", descriptor = "([Lclient!mj;I[BIIIIZIIB)V") + public static void method3771(@OriginalArg(0) CollisionMap[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) byte[] arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) boolean arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9) { + @Pc(7) int local7 = -1; + @Pc(12) Buffer local12 = new Buffer(arg2); + while (true) { + @Pc(20) int local20 = local12.gVarSmart(); + if (local20 == 0) { + return; + } + local7 += local20; + @Pc(31) int local31 = 0; + while (true) { + @Pc(35) int local35 = local12.gsmarts(); + if (local35 == 0) { + break; + } + local31 += local35 - 1; + @Pc(50) int local50 = local31 & 0x3F; + @Pc(56) int local56 = local31 >> 6 & 0x3F; + @Pc(60) int local60 = local31 >> 12; + @Pc(64) int local64 = local12.g1(); + @Pc(68) int local68 = local64 >> 2; + @Pc(72) int local72 = local64 & 0x3; + if (arg3 == local60 && local56 >= arg8 && local56 < arg8 + 8 && arg9 <= local50 && arg9 + 8 > local50) { + @Pc(103) LocType local103 = LocTypeList.get(local7); + @Pc(120) int local120 = method1286(local50 & 0x7, arg4, local72, local103.length, local103.width, local56 & 0x7) + arg5; + @Pc(137) int local137 = method4541(local103.width, arg4, local103.length, local56 & 0x7, local72, local50 & 0x7) + arg6; + if (local120 > 0 && local137 > 0 && local120 < 103 && local137 < 103) { + @Pc(154) CollisionMap local154 = null; + if (!arg7) { + @Pc(159) int local159 = arg1; + if ((SceneGraph.tileFlags[1][local120][local137] & 0x2) == 2) { + local159 = arg1 - 1; + } + if (local159 >= 0) { + local154 = arg0[local159]; + } + } + SceneGraph.method3397(arg1, !arg7, arg1, arg7, local154, local7, local68, local120, local137, local72 + arg4 & 0x3); + } + } + } + } + } + + @OriginalMember(owner = "client!eb", name = "a", descriptor = "(IIIIIII)I") + public static int method1286(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5) { + if ((arg2 & 0x1) == 1) { + @Pc(10) int local10 = arg4; + arg4 = arg3; + arg3 = local10; + } + @Pc(18) int local18 = arg1 & 0x3; + if (local18 == 0) { + return arg5; + } else if (local18 == 1) { + return arg0; + } else if (local18 == 2) { + return 7 + 1 - arg5 - arg4; + } else { + return 7 + 1 - arg0 - arg3; + } + } + + @OriginalMember(owner = "client!th", name = "a", descriptor = "(IIBIIII)I") + public static int method4541(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + if ((arg4 & 0x1) == 1) { + @Pc(9) int local9 = arg0; + arg0 = arg2; + arg2 = local9; + } + @Pc(29) int local29 = arg1 & 0x3; + if (local29 == 0) { + return arg5; + } else if (local29 == 1) { + return 7 + 1 - arg3 - arg0; + } else if (local29 == 2) { + return 1 + 7 - arg2 - arg5; + } else { + return arg3; + } + } } diff --git a/client/src/main/java/rt4/Static241.java b/client/src/main/java/rt4/Static241.java deleted file mode 100644 index 903c3bb..0000000 --- a/client/src/main/java/rt4/Static241.java +++ /dev/null @@ -1,110 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static241 { - - @OriginalMember(owner = "client!th", name = "m", descriptor = "[Lclient!be;") - public static Component[] aClass13Array13; - - @OriginalMember(owner = "client!th", name = "o", descriptor = "[I") - public static int[] anIntArray522; - - @OriginalMember(owner = "client!th", name = "i", descriptor = "[I") - public static final int[] anIntArray520 = new int[14]; - - @OriginalMember(owner = "client!th", name = "a", descriptor = "(IIBIIII)I") - public static int method4541(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - if ((arg4 & 0x1) == 1) { - @Pc(9) int local9 = arg0; - arg0 = arg2; - arg2 = local9; - } - @Pc(29) int local29 = arg1 & 0x3; - if (local29 == 0) { - return arg5; - } else if (local29 == 1) { - return 7 + 1 - arg3 - arg0; - } else if (local29 == 2) { - return 1 + 7 - arg2 - arg5; - } else { - return arg3; - } - } - - @OriginalMember(owner = "client!th", name = "a", descriptor = "(BIIIII)V") - public static void method4547(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(9) int local9 = arg1 - arg2; - @Pc(14) int local14 = arg3 - arg4; - if (local14 == 0) { - if (local9 != 0) { - Static231.method2054(arg2, arg4, arg1, arg0); - } - } else if (local9 == 0) { - Static231.method3826(arg0, arg2, arg3, arg4); - } else { - if (local9 < 0) { - local9 = -local9; - } - if (local14 < 0) { - local14 = -local14; - } - @Pc(70) boolean local70 = local14 < local9; - @Pc(74) int local74; - @Pc(78) int local78; - if (local70) { - local74 = arg4; - arg4 = arg2; - local78 = arg3; - arg2 = local74; - arg3 = arg1; - arg1 = local78; - } - if (arg3 < arg4) { - local74 = arg4; - arg4 = arg3; - arg3 = local74; - local78 = arg2; - arg2 = arg1; - arg1 = local78; - } - local74 = arg2; - local78 = arg3 - arg4; - @Pc(111) int local111 = arg1 - arg2; - @Pc(116) int local116 = -(local78 >> 1); - @Pc(123) int local123 = arg1 <= arg2 ? -1 : 1; - if (local111 < 0) { - local111 = -local111; - } - @Pc(136) int local136; - if (local70) { - for (local136 = arg4; local136 <= arg3; local136++) { - TextureOp29SubOp4.anIntArrayArray10[local136][local74] = arg0; - local116 += local111; - if (local116 > 0) { - local74 += local123; - local116 -= local78; - } - } - } else { - for (local136 = arg4; local136 <= arg3; local136++) { - local116 += local111; - TextureOp29SubOp4.anIntArrayArray10[local74][local136] = arg0; - if (local116 > 0) { - local74 += local123; - local116 -= local78; - } - } - } - } - } - - @OriginalMember(owner = "client!ug", name = "a", descriptor = "(II)V") - public static void method4278(@OriginalArg(0) int arg0) { - if (anIntArray522 == null || anIntArray522.length < arg0) { - anIntArray522 = new int[arg0]; - } - } -} diff --git a/client/src/main/java/rt4/Static247.java b/client/src/main/java/rt4/Static247.java deleted file mode 100644 index a0a3f76..0000000 --- a/client/src/main/java/rt4/Static247.java +++ /dev/null @@ -1,161 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static247 { - - @OriginalMember(owner = "client!ka", name = "t", descriptor = "[I") - public static final int[] anIntArray294 = new int[]{0, 0, 2, 0, 0, 2, 1, 1, 0}; - @OriginalMember(owner = "client!uj", name = "A", descriptor = "[I") - public static final int[] anIntArray489 = new int[]{2, 0, 0, 2, 0, 0, 0, 4, 4}; - @OriginalMember(owner = "client!gm", name = "gb", descriptor = "[I") - public static final int[] anIntArray211 = new int[]{0, 4, 4, 8, 0, 0, 8, 0, 0}; - @OriginalMember(owner = "client!kd", name = "sb", descriptor = "[I") - public static final int[] anIntArray307 = new int[]{1, 1, 0, 0, 0, 8, 0, 0, 8}; - @OriginalMember(owner = "client!hb", name = "t", descriptor = "[I") - public static final int[] anIntArray215 = new int[]{160, 192, 80, 96, 0, 144, 80, 48, 160}; - @OriginalMember(owner = "client!km", name = "Rc", descriptor = "[I") - public static final int[] anIntArray324 = new int[]{19, 55, 38, 155, 255, 110, 137, 205, 76}; - @OriginalMember(owner = "client!bl", name = "X", descriptor = "I") - public static int anInt730 = -1; - - @OriginalMember(owner = "client!ub", name = "a", descriptor = "(IIIIIII)V") - public static void method4244(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { - if (TextureOp29.anInt4164 <= arg1 && TextureOp29.anInt5063 >= arg3 && TextureOp29.anInt5773 <= arg2 && arg4 <= TextureOp29.anInt2869) { - if (arg5 == 1) { - Static134.method2622(arg0, arg3, arg2, arg4, arg1); - } else { - method3334(arg3, arg2, arg0, arg4, arg5, arg1); - } - } else if (arg5 == 1) { - Static173.method3246(arg0, arg1, arg4, arg3, arg2); - } else { - Static10.method352(arg4, arg5, arg3, arg1, arg0, arg2); - } - } - - @OriginalMember(owner = "client!ke", name = "a", descriptor = "(Lclient!rh;IIIIIIIZ)V") - public static void method2610(@OriginalArg(0) PlainTile arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) boolean arg8) { - @Pc(6) int local6; - @Pc(7) int local7 = local6 = (arg6 << 7) - Static123.anInt3555; - @Pc(14) int local14; - @Pc(15) int local15 = local14 = (arg7 << 7) - Static217.anInt4903; - @Pc(20) int local20; - @Pc(21) int local21 = local20 = local7 + 128; - @Pc(26) int local26; - @Pc(27) int local27 = local26 = local15 + 128; - @Pc(37) int local37 = SceneGraph.tileHeights[arg1][arg6][arg7] - Static123.anInt3947; - @Pc(49) int local49 = SceneGraph.tileHeights[arg1][arg6 + 1][arg7] - Static123.anInt3947; - @Pc(63) int local63 = SceneGraph.tileHeights[arg1][arg6 + 1][arg7 + 1] - Static123.anInt3947; - @Pc(75) int local75 = SceneGraph.tileHeights[arg1][arg6][arg7 + 1] - Static123.anInt3947; - @Pc(85) int local85 = local15 * arg4 + local7 * arg5 >> 16; - @Pc(95) int local95 = local15 * arg5 - local7 * arg4 >> 16; - @Pc(97) int local97 = local85; - @Pc(107) int local107 = local37 * arg3 - local95 * arg2 >> 16; - @Pc(117) int local117 = local37 * arg2 + local95 * arg3 >> 16; - @Pc(119) int local119 = local107; - if (local117 < 50) { - return; - } - local85 = local14 * arg4 + local21 * arg5 >> 16; - @Pc(143) int local143 = local14 * arg5 - local21 * arg4 >> 16; - local21 = local85; - local85 = local49 * arg3 - local143 * arg2 >> 16; - @Pc(165) int local165 = local49 * arg2 + local143 * arg3 >> 16; - local49 = local85; - if (local165 < 50) { - return; - } - local85 = local27 * arg4 + local20 * arg5 >> 16; - local27 = local27 * arg5 - local20 * arg4 >> 16; - @Pc(193) int local193 = local85; - local85 = local63 * arg3 - local27 * arg2 >> 16; - local27 = local63 * arg2 + local27 * arg3 >> 16; - local63 = local85; - if (local27 < 50) { - return; - } - local85 = local26 * arg4 + local6 * arg5 >> 16; - @Pc(239) int local239 = local26 * arg5 - local6 * arg4 >> 16; - @Pc(241) int local241 = local85; - local85 = local75 * arg3 - local239 * arg2 >> 16; - @Pc(261) int local261 = local75 * arg2 + local239 * arg3 >> 16; - if (local261 < 50) { - return; - } - @Pc(275) int local275 = Rasteriser.centerX + (local97 << 9) / local117; - @Pc(283) int local283 = Rasteriser.centerY + (local119 << 9) / local117; - @Pc(291) int local291 = Rasteriser.centerX + (local21 << 9) / local165; - @Pc(299) int local299 = Rasteriser.centerY + (local49 << 9) / local165; - @Pc(307) int local307 = Rasteriser.centerX + (local193 << 9) / local27; - @Pc(315) int local315 = Rasteriser.centerY + (local63 << 9) / local27; - @Pc(323) int local323 = Rasteriser.centerX + (local241 << 9) / local261; - @Pc(331) int local331 = Rasteriser.centerY + (local85 << 9) / local261; - Rasteriser.alpha = 0; - @Pc(475) int local475; - if ((local307 - local323) * (local299 - local331) - (local315 - local331) * (local291 - local323) > 0) { - if (MiniMenu.aBoolean187 && Static147.method583(MiniMenu.anInt2388 + Rasteriser.centerX, MiniMenu.anInt3259 + Rasteriser.centerY, local315, local331, local299, local307, local323, local291)) { - MiniMenu.anInt1742 = arg6; - MiniMenu.anInt2954 = arg7; - } - if (!GlRenderer.enabled && !arg8) { - Rasteriser.testX = local307 < 0 || local323 < 0 || local291 < 0 || local307 > Rasteriser.width || local323 > Rasteriser.width || local291 > Rasteriser.width; - if (arg0.anInt4869 == -1) { - if (arg0.anInt4865 != 12345678) { - Rasteriser.fillGouraudTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867); - } - } else if (!Preferences.manyGroundTextures) { - local475 = Rasteriser.textureProvider.getAverageColor(arg0.anInt4869); - Rasteriser.fillGouraudTriangle(local315, local331, local299, local307, local323, local291, Static147.method1640(local475, arg0.anInt4865), Static147.method1640(local475, arg0.anInt4864), Static147.method1640(local475, arg0.anInt4867)); - } else if (arg0.aBoolean241) { - Rasteriser.fillTexturedTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867, local97, local21, local241, local119, local49, local85, local117, local165, local261, arg0.anInt4869); - } else { - Rasteriser.fillTexturedTriangle(local315, local331, local299, local307, local323, local291, arg0.anInt4865, arg0.anInt4864, arg0.anInt4867, local193, local241, local21, local63, local85, local49, local27, local261, local165, arg0.anInt4869); - } - } - } - if ((local275 - local291) * (local331 - local299) - (local283 - local299) * (local323 - local291) <= 0) { - return; - } - if (MiniMenu.aBoolean187 && Static147.method583(MiniMenu.anInt2388 + Rasteriser.centerX, MiniMenu.anInt3259 + Rasteriser.centerY, local283, local299, local331, local275, local291, local323)) { - MiniMenu.anInt1742 = arg6; - MiniMenu.anInt2954 = arg7; - } - if (GlRenderer.enabled || arg8) { - return; - } - Rasteriser.testX = local275 < 0 || local291 < 0 || local323 < 0 || local275 > Rasteriser.width || local291 > Rasteriser.width || local323 > Rasteriser.width; - if (arg0.anInt4869 == -1) { - if (arg0.anInt4872 != 12345678) { - Rasteriser.fillGouraudTriangle(local283, local299, local331, local275, local291, local323, arg0.anInt4872, arg0.anInt4867, arg0.anInt4864); - } - } else if (Preferences.manyGroundTextures) { - Rasteriser.fillTexturedTriangle(local283, local299, local331, local275, local291, local323, arg0.anInt4872, arg0.anInt4867, arg0.anInt4864, local97, local21, local241, local119, local49, local85, local117, local165, local261, arg0.anInt4869); - } else { - local475 = Rasteriser.textureProvider.getAverageColor(arg0.anInt4869); - Rasteriser.fillGouraudTriangle(local283, local299, local331, local275, local291, local323, Static147.method1640(local475, arg0.anInt4872), Static147.method1640(local475, arg0.anInt4867), Static147.method1640(local475, arg0.anInt4864)); - } - } - - @OriginalMember(owner = "client!ok", name = "a", descriptor = "(IIIIIII)V") - public static void method3334(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - @Pc(5) int local5 = arg4 + arg1; - @Pc(14) int local14 = arg3 - arg4; - @Pc(29) int local29 = arg4 + arg5; - @Pc(31) int local31; - for (local31 = arg1; local31 < local5; local31++) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local31], arg5, arg0, arg2); - } - for (local31 = arg3; local31 > local14; local31--) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local31], arg5, arg0, arg2); - } - @Pc(70) int local70 = arg0 - arg4; - for (local31 = local5; local31 <= local14; local31++) { - @Pc(83) int[] local83 = TextureOp29SubOp4.anIntArrayArray10[local31]; - TextureOp29SubOp4.method2576(local83, arg5, local29, arg2); - TextureOp29SubOp4.method2576(local83, local70, arg0, arg2); - } - } -} diff --git a/client/src/main/java/rt4/Static252.java b/client/src/main/java/rt4/Static252.java deleted file mode 100644 index bce98f4..0000000 --- a/client/src/main/java/rt4/Static252.java +++ /dev/null @@ -1,122 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static252 { - - @OriginalMember(owner = "client!uh", name = "Y", descriptor = "Lclient!na;") - public static final JagString HUFFMAN_GROUP = JagString.parse("huffman"); - - @OriginalMember(owner = "client!uh", name = "f", descriptor = "(I)V") - public static void method4302() { - if (ScriptRunner.method4047() != 2) { - return; - } - @Pc(27) byte local27 = (byte) (ScriptRunner.anInt3325 - 4 & 0xFF); - @Pc(31) int local31 = ScriptRunner.anInt3325 % 104; - @Pc(33) int local33; - @Pc(40) int local40; - for (local33 = 0; local33 < 4; local33++) { - for (local40 = 0; local40 < 104; local40++) { - ScriptRunner.aByteArrayArrayArray15[local33][local31][local40] = local27; - } - } - if (Player.level == 3) { - return; - } - for (local33 = 0; local33 < 2; local33++) { - ScriptRunner.anIntArray205[local33] = -1000000; - ScriptRunner.anIntArray338[local33] = 1000000; - ScriptRunner.anIntArray518[local33] = 0; - ScriptRunner.anIntArray476[local33] = 1000000; - ScriptRunner.anIntArray134[local33] = 0; - } - if (Camera.cameraType != 1) { - local33 = SceneGraph.getTileHeight(Player.level, Camera.renderX, Camera.renderZ); - if (local33 - Camera.anInt40 < 800 && (SceneGraph.tileFlags[Player.level][Camera.renderX >> 7][Camera.renderZ >> 7] & 0x4) != 0) { - ScriptRunner.method4348(false, Camera.renderX >> 7, Camera.renderZ >> 7, SceneGraph.tiles, 1); - } - return; - } - if ((SceneGraph.tileFlags[Player.level][PlayerList.self.xFine >> 7][PlayerList.self.zFine >> 7] & 0x4) != 0) { - ScriptRunner.method4348(false, PlayerList.self.xFine >> 7, PlayerList.self.zFine >> 7, SceneGraph.tiles, 0); - } - if (Camera.cameraPitch >= 310) { - return; - } - @Pc(135) int local135 = PlayerList.self.zFine >> 7; - local40 = Camera.renderZ >> 7; - @Pc(146) int local146; - if (local40 < local135) { - local146 = local135 - local40; - } else { - local146 = local40 - local135; - } - local33 = Camera.renderX >> 7; - @Pc(162) int local162 = PlayerList.self.xFine >> 7; - @Pc(174) int local174; - if (local162 > local33) { - local174 = local162 - local33; - } else { - local174 = local33 - local162; - } - @Pc(192) int local192; - @Pc(186) int local186; - if (local174 <= local146) { - local186 = 32768; - local192 = local174 * 65536 / local146; - while (local40 != local135) { - if (local40 < local135) { - local40++; - } else if (local40 > local135) { - local40--; - } - if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { - ScriptRunner.method4348(false, local33, local40, SceneGraph.tiles, 1); - break; - } - local186 += local192; - if (local186 >= 65536) { - if (local162 > local33) { - local33++; - } else if (local162 < local33) { - local33--; - } - local186 -= 65536; - if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { - ScriptRunner.method4348(false, local33, local40, SceneGraph.tiles, 1); - break; - } - } - } - return; - } - local186 = 32768; - local192 = local146 * 65536 / local174; - while (local162 != local33) { - if (local162 > local33) { - local33++; - } else if (local33 > local162) { - local33--; - } - if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { - ScriptRunner.method4348(false, local33, local40, SceneGraph.tiles, 1); - break; - } - local186 += local192; - if (local186 >= 65536) { - if (local40 < local135) { - local40++; - } else if (local135 < local40) { - local40--; - } - local186 -= 65536; - if ((SceneGraph.tileFlags[Player.level][local33][local40] & 0x4) != 0) { - ScriptRunner.method4348(false, local33, local40, SceneGraph.tiles, 1); - break; - } - } - } - } -} diff --git a/client/src/main/java/rt4/Static33.java b/client/src/main/java/rt4/Static33.java deleted file mode 100644 index 847232a..0000000 --- a/client/src/main/java/rt4/Static33.java +++ /dev/null @@ -1,64 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static33 { - - @OriginalMember(owner = "client!cj", name = "n", descriptor = "Lsignlink!im;") - public static PrivilegedRequest openUrlRequest; - - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ILclient!pb;ZIIII)Z") - public static boolean method867(@OriginalArg(0) int arg0, @OriginalArg(1) LocType arg1, @OriginalArg(5) int arg2, @OriginalArg(6) int arg3) { - @Pc(10) MsiType local10 = MsiTypeList.get(arg1.mapSceneId); - if (local10.spriteId == -1) { - return true; - } - if (arg1.mapSceneRotated) { - @Pc(24) int local24 = arg3 + arg1.mapSceneAngleOffset; - arg3 = local24 & 0x3; - } else { - arg3 = 0; - } - @Pc(42) SoftwareIndexedSprite local42 = local10.getSprite(arg3); - if (local42 == null) { - return false; - } - @Pc(49) int local49 = arg1.width; - @Pc(52) int local52 = arg1.length; - if ((arg3 & 0x1) == 1) { - local49 = arg1.length; - local52 = arg1.width; - } - @Pc(66) int local66 = local42.innerWidth; - @Pc(69) int local69 = local42.innerHeight; - if (local10.aBoolean2) { - local69 = local52 * 4; - local66 = local49 * 4; - } - if (local10.anInt11 == 0) { - local42.method1398(arg0 * 4 + 48, (-local52 + -arg2 + 104) * 4 + 48, local66, local69); - } else { - local42.method1390(arg0 * 4 + 48, (-local52 + -arg2 + 104) * 4 + 48, local66, local69, local10.anInt11); - } - return true; - } - - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZIIIIIIFB)[[I") - public static int[][] method874(@OriginalArg(7) float arg0) { - @Pc(15) int[][] local15 = new int[256][64]; - @Pc(19) TextureOp34 local19 = new TextureOp34(); - local19.anInt648 = (int) (arg0 * 4096.0F); - local19.anInt642 = 3; - local19.anInt641 = 4; - local19.aBoolean44 = false; - local19.anInt646 = 8; - local19.postDecode(); - Texture.setSize(256, 64); - for (@Pc(46) int local46 = 0; local46 < 256; local46++) { - local19.method584(local46, local15[local46]); - } - return local15; - } -} diff --git a/client/src/main/java/rt4/Static34.java b/client/src/main/java/rt4/Static34.java deleted file mode 100644 index 3ae9f0b..0000000 --- a/client/src/main/java/rt4/Static34.java +++ /dev/null @@ -1,55 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static34 { - - @OriginalMember(owner = "client!ck", name = "d", descriptor = "[I") - public static final int[] anIntArray80 = new int[]{1, 0, -1, 0}; - - @OriginalMember(owner = "client!ck", name = "T", descriptor = "Lclient!na;") - private static final JagString aClass100_207 = JagString.parse("Jan"); - - @OriginalMember(owner = "client!ck", name = "hb", descriptor = "Lclient!na;") - private static final JagString aClass100_212 = JagString.parse("Feb"); - - @OriginalMember(owner = "client!ck", name = "gb", descriptor = "Lclient!na;") - private static final JagString aClass100_211 = JagString.parse("Mar"); - - @OriginalMember(owner = "client!ck", name = "db", descriptor = "Lclient!na;") - private static final JagString aClass100_210 = JagString.parse("Apr"); - - @OriginalMember(owner = "client!ck", name = "n", descriptor = "Lclient!na;") - private static final JagString aClass100_199 = JagString.parse("May"); - - @OriginalMember(owner = "client!ck", name = "L", descriptor = "Lclient!na;") - private static final JagString aClass100_204 = JagString.parse("Jun"); - - @OriginalMember(owner = "client!ck", name = "B", descriptor = "Lclient!na;") - private static final JagString aClass100_202 = JagString.parse("Jul"); - - @OriginalMember(owner = "client!ck", name = "l", descriptor = "Lclient!na;") - private static final JagString aClass100_198 = JagString.parse("Aug"); - - @OriginalMember(owner = "client!ck", name = "V", descriptor = "Lclient!na;") - private static final JagString aClass100_208 = JagString.parse("Sep"); - - @OriginalMember(owner = "client!ck", name = "S", descriptor = "Lclient!na;") - private static final JagString aClass100_206 = JagString.parse("Oct"); - - @OriginalMember(owner = "client!ck", name = "Y", descriptor = "Lclient!na;") - private static final JagString aClass100_209 = JagString.parse("Nov"); - - @OriginalMember(owner = "client!ck", name = "O", descriptor = "Lclient!na;") - private static final JagString aClass100_205 = JagString.parse("Dec"); - - @OriginalMember(owner = "client!ck", name = "f", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array40 = new JagString[]{aClass100_207, aClass100_212, aClass100_211, aClass100_210, aClass100_199, aClass100_204, aClass100_202, aClass100_198, aClass100_208, aClass100_206, aClass100_209, aClass100_205}; - - @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") - private static final JagString aClass100_200 = JagString.parse("Loaded world list data"); - - @OriginalMember(owner = "client!ck", name = "K", descriptor = "I") - public static int anInt1053 = 0; - -} diff --git a/client/src/main/java/rt4/Static36.java b/client/src/main/java/rt4/Static36.java index d0a9603..061dce7 100644 --- a/client/src/main/java/rt4/Static36.java +++ b/client/src/main/java/rt4/Static36.java @@ -38,7 +38,7 @@ public final class Static36 { @OriginalMember(owner = "client!client", name = "c", descriptor = "(Lclient!be;)Z") public static boolean method947(@OriginalArg(0) Component arg0) { - if (Static121.qaOpTest) { + if (Cheat.qaOpTest) { if (InterfaceList.getServerActiveProperties(arg0).events != 0) { return false; } diff --git a/client/src/main/java/rt4/Static38.java b/client/src/main/java/rt4/Static38.java index 1081301..77bc197 100644 --- a/client/src/main/java/rt4/Static38.java +++ b/client/src/main/java/rt4/Static38.java @@ -91,7 +91,7 @@ public final class Static38 { @OriginalMember(owner = "client!cn", name = "a", descriptor = "(IIIIIIIIII)V") public static void method962(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8) { if (arg8 == arg7 && arg2 == arg6 && arg4 == arg3 && arg0 == arg5) { - Static241.method4547(arg1, arg5, arg6, arg4, arg8); + TextureOp29SubOp4.method4547(arg1, arg5, arg6, arg4, arg8); return; } @Pc(37) int local37 = arg6; @@ -119,7 +119,7 @@ public final class Static38 { @Pc(156) int local156 = local113 * local115; @Pc(167) int local167 = (local152 + local144 + local140 >> 12) + arg8; @Pc(177) int local177 = arg6 + (local156 + local136 + local148 >> 12); - Static241.method4547(arg1, local177, local37, local167, local39); + TextureOp29SubOp4.method4547(arg1, local177, local37, local167, local39); local39 = local167; local37 = local177; } diff --git a/client/src/main/java/rt4/Static4.java b/client/src/main/java/rt4/Static4.java deleted file mode 100644 index 5a5cdfb..0000000 --- a/client/src/main/java/rt4/Static4.java +++ /dev/null @@ -1,59 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static4 { - - @OriginalMember(owner = "client!ac", name = "i", descriptor = "Lclient!ih;") - public static final LinkedList highPriorityRequests = new LinkedList(); - - @OriginalMember(owner = "client!ac", name = "n", descriptor = "I") - public static int mouseOverInventoryObjectIndex = 0; - - @OriginalMember(owner = "client!ac", name = "a", descriptor = "(IIII)I") - public static int method22(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { - if ((SceneGraph.tileFlags[arg2][arg1][arg0] & 0x8) == 0) { - return arg2 <= 0 || (SceneGraph.tileFlags[1][arg1][arg0] & 0x2) == 0 ? arg2 : arg2 - 1; - } else { - return 0; - } - } - - @OriginalMember(owner = "client!ac", name = "a", descriptor = "([J[Ljava/lang/Object;I)V") - public static void method23(@OriginalArg(0) long[] arg0, @OriginalArg(1) Object[] arg1) { - method3909(arg0.length - 1, arg0, 0, arg1); - } - - @OriginalMember(owner = "client!sh", name = "a", descriptor = "(I[JII[Ljava/lang/Object;)V") - public static void method3909(@OriginalArg(0) int arg0, @OriginalArg(1) long[] arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Object[] arg3) { - if (arg2 >= arg0) { - return; - } - @Pc(16) int local16 = arg2; - @Pc(23) int local23 = (arg2 + arg0) / 2; - @Pc(27) long local27 = arg1[local23]; - arg1[local23] = arg1[arg0]; - arg1[arg0] = local27; - @Pc(41) Object local41 = arg3[local23]; - arg3[local23] = arg3[arg0]; - arg3[arg0] = local41; - for (@Pc(53) int local53 = arg2; local53 < arg0; local53++) { - if (local27 + (long) (local53 & 0x1) > arg1[local53]) { - @Pc(72) long local72 = arg1[local53]; - arg1[local53] = arg1[local16]; - arg1[local16] = local72; - @Pc(86) Object local86 = arg3[local53]; - arg3[local53] = arg3[local16]; - arg3[local16++] = local86; - } - } - arg1[arg0] = arg1[local16]; - arg1[local16] = local27; - arg3[arg0] = arg3[local16]; - arg3[local16] = local41; - method3909(local16 - 1, arg1, arg2, arg3); - method3909(arg0, arg1, local16 + 1, arg3); - } -} diff --git a/client/src/main/java/rt4/Static5.java b/client/src/main/java/rt4/Static5.java deleted file mode 100644 index a117b79..0000000 --- a/client/src/main/java/rt4/Static5.java +++ /dev/null @@ -1,25 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static5 { - - @OriginalMember(owner = "client!af", name = "l", descriptor = "[S") - public static final short[] aShortArray2 = new short[]{30, 6, 31, 29, 10, 44, 37, 57}; - - @OriginalMember(owner = "client!af", name = "m", descriptor = "Lclient!na;") - public static final JagString aClass100_10 = JagString.parse("
"); - - @OriginalMember(owner = "client!af", name = "a", descriptor = "(IIIIIILclient!th;IJ)Z") - public static boolean method35(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) Entity arg6, @OriginalArg(8) long arg7) { - if (arg6 == null) { - return true; - } else { - @Pc(11) int local11 = arg1 * 128 + arg4 * 64; - @Pc(19) int local19 = arg2 * 128 + arg5 * 64; - return SceneGraph.method2256(arg0, arg1, arg2, arg4, arg5, local11, local19, arg3, arg6, 0, false, arg7); - } - } -} diff --git a/client/src/main/java/rt4/Static54.java b/client/src/main/java/rt4/Static54.java deleted file mode 100644 index ad966d3..0000000 --- a/client/src/main/java/rt4/Static54.java +++ /dev/null @@ -1,5 +0,0 @@ -package rt4; - -public final class Static54 { - -} diff --git a/client/src/main/java/rt4/Static7.java b/client/src/main/java/rt4/Static7.java index 422b797..69f6e18 100644 --- a/client/src/main/java/rt4/Static7.java +++ b/client/src/main/java/rt4/Static7.java @@ -29,14 +29,14 @@ public final class Static7 { @Pc(106) ServerActiveProperties local106 = InterfaceList.getServerActiveProperties(local103); if (local106.isObjSwapEnabled() || local106.isObjReplaceEnabled()) { InterfaceList.clickedInventoryComponentCycle = 0; - Static123.draggingClickedInventoryObject = false; + InterfaceList.draggingClickedInventoryObject = false; if (InterfaceList.clickedInventoryComponent != null) { InterfaceList.redraw(InterfaceList.clickedInventoryComponent); } InterfaceList.clickedInventoryComponent = InterfaceList.getComponent(local99); InterfaceList.clickedInventoryComponentX = Mouse.clickX; InterfaceList.clickedInventoryComponentY = Mouse.clickY; - Static4.mouseOverInventoryObjectIndex = local93; + InterfaceList.mouseOverInventoryObjectIndex = local93; InterfaceList.redraw(InterfaceList.clickedInventoryComponent); return; } diff --git a/client/src/main/java/rt4/Static74.java b/client/src/main/java/rt4/Static74.java deleted file mode 100644 index 62ba725..0000000 --- a/client/src/main/java/rt4/Static74.java +++ /dev/null @@ -1,255 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static74 { - - @OriginalMember(owner = "client!fn", name = "a", descriptor = "(ZIIIIIII)V") - public static void method1623(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - if (arg3 == arg6) { - method2826(arg0, arg2, arg5, arg6, arg1, arg4); - } else if (arg1 - arg6 >= TextureOp29.anInt4164 && arg6 + arg1 <= TextureOp29.anInt5063 && TextureOp29.anInt5773 <= arg2 - arg3 && TextureOp29.anInt2869 >= arg2 + arg3) { - method4594(arg5, arg1, arg2, arg4, arg6, arg3, arg0); - } else { - method3981(arg6, arg5, arg4, arg0, arg2, arg1, arg3); - } - } - - @OriginalMember(owner = "client!wb", name = "a", descriptor = "(IIIIIIII)V") - public static void method4594(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - @Pc(7) int local7 = 0; - @Pc(9) int local9 = arg5; - @Pc(11) int local11 = 0; - @Pc(16) int local16 = arg4 - arg6; - @Pc(20) int local20 = arg4 * arg4; - @Pc(25) int local25 = arg5 - arg6; - @Pc(29) int local29 = arg5 * arg5; - @Pc(33) int local33 = local25 * local25; - @Pc(37) int local37 = local29 << 1; - @Pc(41) int local41 = local20 << 1; - @Pc(45) int local45 = local33 << 1; - @Pc(49) int local49 = local16 * local16; - @Pc(53) int local53 = local49 << 1; - @Pc(57) int local57 = arg5 << 1; - @Pc(61) int local61 = local25 << 1; - @Pc(70) int local70 = local29 - (local57 - 1) * local41; - @Pc(80) int local80 = local49 * (1 - local61) + local45; - @Pc(89) int local89 = (1 - local57) * local20 + local37; - @Pc(93) int local93 = local20 << 2; - @Pc(102) int local102 = local33 - local53 * (local61 - 1); - @Pc(106) int local106 = local49 << 2; - @Pc(110) int local110 = local29 << 2; - @Pc(114) int local114 = local33 << 2; - @Pc(120) int local120 = (local57 - 3) * local41; - @Pc(124) int local124 = local37 * 3; - @Pc(130) int local130 = (local61 - 3) * local53; - @Pc(134) int local134 = local45 * 3; - @Pc(136) int local136 = local110; - @Pc(138) int local138 = local114; - @Pc(144) int local144 = (local25 - 1) * local106; - @Pc(162) int local162 = (arg5 - 1) * local93; - @Pc(166) int[] local166 = TextureOp29SubOp4.anIntArrayArray10[arg2]; - TextureOp29SubOp4.method2576(local166, arg1 - arg4, -local16 + arg1, arg3); - TextureOp29SubOp4.method2576(local166, arg1 - local16, arg1 - -local16, arg0); - TextureOp29SubOp4.method2576(local166, arg1 + local16, arg4 + arg1, arg3); - while (local9 > 0) { - if (local89 < 0) { - while (local89 < 0) { - local70 += local136; - local89 += local124; - local7++; - local136 += local110; - local124 += local110; - } - } - if (local70 < 0) { - local89 += local124; - local7++; - local124 += local110; - local70 += local136; - local136 += local110; - } - @Pc(258) boolean local258 = local9 <= local25; - if (local258) { - if (local80 < 0) { - while (local80 < 0) { - local80 += local134; - local134 += local114; - local11++; - local102 += local138; - local138 += local114; - } - } - if (local102 < 0) { - local80 += local134; - local11++; - local134 += local114; - local102 += local138; - local138 += local114; - } - local102 += -local130; - local130 -= local106; - local80 += -local144; - local144 -= local106; - } - local89 += -local162; - local70 += -local120; - local120 -= local93; - local9--; - @Pc(348) int local348 = arg2 - local9; - @Pc(352) int local352 = local7 + arg1; - local162 -= local93; - @Pc(360) int local360 = local9 + arg2; - @Pc(365) int local365 = arg1 - local7; - if (local258) { - @Pc(371) int local371 = arg1 + local11; - @Pc(376) int local376 = arg1 - local11; - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local348], local365, local376, arg3); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local348], local376, local371, arg0); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local348], local371, local352, arg3); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local360], local365, local376, arg3); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local360], local376, local371, arg0); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local360], local371, local352, arg3); - } else { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local348], local365, local352, arg3); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local360], local365, local352, arg3); - } - } - } - - @OriginalMember(owner = "client!ma", name = "a", descriptor = "(IIBIIII)V") - public static void method2826(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - if (arg4 - arg3 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg4 + arg3 && TextureOp29.anInt5773 <= arg1 - arg3 && TextureOp29.anInt2869 >= arg3 + arg1) { - Static8.method120(arg5, arg0, arg1, arg2, arg3, arg4); - } else { - Static152.method4670(arg2, arg1, arg3, arg5, arg0, arg4); - } - } - - @OriginalMember(owner = "client!sk", name = "a", descriptor = "(IIIIBIII)V") - public static void method3981(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - @Pc(7) int local7 = 0; - @Pc(12) int local12 = arg0 - arg3; - @Pc(14) int local14 = 0; - @Pc(16) int local16 = arg6; - @Pc(20) int local20 = arg6 * arg6; - @Pc(25) int local25 = arg6 - arg3; - @Pc(29) int local29 = arg0 * arg0; - @Pc(33) int local33 = local20 << 1; - @Pc(37) int local37 = local25 * local25; - @Pc(41) int local41 = local12 * local12; - @Pc(45) int local45 = local29 << 1; - @Pc(49) int local49 = local37 << 1; - @Pc(53) int local53 = local41 << 1; - @Pc(57) int local57 = local25 << 1; - @Pc(61) int local61 = arg6 << 1; - @Pc(70) int local70 = local33 + local29 * (1 - local61); - @Pc(79) int local79 = local20 - (local61 - 1) * local45; - @Pc(88) int local88 = local49 + local41 * (1 - local57); - @Pc(96) int local96 = local37 - local53 * (local57 - 1); - @Pc(100) int local100 = local20 << 2; - @Pc(104) int local104 = local29 << 2; - @Pc(108) int local108 = local37 << 2; - @Pc(112) int local112 = local33 * 3; - @Pc(118) int local118 = (local61 - 3) * local45; - @Pc(130) int local130 = local41 << 2; - @Pc(134) int local134 = local49 * 3; - @Pc(140) int local140 = (local57 - 3) * local53; - @Pc(146) int local146 = (arg6 - 1) * local104; - @Pc(148) int local148 = local108; - @Pc(150) int local150 = local100; - @Pc(156) int local156 = (local25 - 1) * local130; - @Pc(174) int local174; - @Pc(183) int local183; - @Pc(192) int local192; - @Pc(201) int local201; - if (arg4 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg4) { - @Pc(166) int[] local166 = TextureOp29SubOp4.anIntArrayArray10[arg4]; - local174 = Static231.method1690(TextureOp29.anInt5063, arg5 - arg0, TextureOp29.anInt4164); - local183 = Static231.method1690(TextureOp29.anInt5063, arg5 + arg0, TextureOp29.anInt4164); - local192 = Static231.method1690(TextureOp29.anInt5063, arg5 - local12, TextureOp29.anInt4164); - local201 = Static231.method1690(TextureOp29.anInt5063, arg5 + local12, TextureOp29.anInt4164); - TextureOp29SubOp4.method2576(local166, local174, local192, arg2); - TextureOp29SubOp4.method2576(local166, local192, local201, arg1); - TextureOp29SubOp4.method2576(local166, local201, local183, arg2); - } - while (local16 > 0) { - if (local70 < 0) { - while (local70 < 0) { - local70 += local112; - local112 += local100; - local7++; - local79 += local150; - local150 += local100; - } - } - @Pc(255) boolean local255 = local16 <= local25; - if (local79 < 0) { - local79 += local150; - local70 += local112; - local7++; - local150 += local100; - local112 += local100; - } - if (local255) { - if (local88 < 0) { - while (local88 < 0) { - local14++; - local96 += local148; - local148 += local108; - local88 += local134; - local134 += local108; - } - } - if (local96 < 0) { - local14++; - local96 += local148; - local88 += local134; - local148 += local108; - local134 += local108; - } - local88 += -local156; - local156 -= local130; - local96 += -local140; - local140 -= local130; - } - local79 += -local118; - local70 += -local146; - local146 -= local104; - local118 -= local104; - local16--; - local183 = arg4 + local16; - local174 = arg4 - local16; - if (TextureOp29.anInt5773 <= local183 && TextureOp29.anInt2869 >= local174) { - local192 = Static231.method1690(TextureOp29.anInt5063, arg5 + local7, TextureOp29.anInt4164); - local201 = Static231.method1690(TextureOp29.anInt5063, arg5 - local7, TextureOp29.anInt4164); - if (local255) { - @Pc(404) int local404 = Static231.method1690(TextureOp29.anInt5063, arg5 + local14, TextureOp29.anInt4164); - @Pc(412) int local412 = Static231.method1690(TextureOp29.anInt5063, arg5 - local14, TextureOp29.anInt4164); - @Pc(420) int[] local420; - if (TextureOp29.anInt5773 <= local174) { - local420 = TextureOp29SubOp4.anIntArrayArray10[local174]; - TextureOp29SubOp4.method2576(local420, local201, local412, arg2); - TextureOp29SubOp4.method2576(local420, local412, local404, arg1); - TextureOp29SubOp4.method2576(local420, local404, local192, arg2); - } - if (local183 <= TextureOp29.anInt2869) { - local420 = TextureOp29SubOp4.anIntArrayArray10[local183]; - TextureOp29SubOp4.method2576(local420, local201, local412, arg2); - TextureOp29SubOp4.method2576(local420, local412, local404, arg1); - TextureOp29SubOp4.method2576(local420, local404, local192, arg2); - } - } else { - if (TextureOp29.anInt5773 <= local174) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local174], local201, local192, arg2); - } - if (TextureOp29.anInt2869 >= local183) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local183], local201, local192, arg2); - } - } - } - } - } -} diff --git a/client/src/main/java/rt4/Static79.java b/client/src/main/java/rt4/Static79.java deleted file mode 100644 index 1511520..0000000 --- a/client/src/main/java/rt4/Static79.java +++ /dev/null @@ -1,37 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static79 { - - @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IIIIIIII)V") - public static void method1698(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - if (arg1 < 1 || arg4 < 1 || arg1 > 102 || arg4 > 102) { - return; - } - @Pc(39) int local39; - if (!SceneGraph.allLevelsAreVisible() && (SceneGraph.tileFlags[0][arg1][arg4] & 0x2) == 0) { - local39 = arg2; - if ((SceneGraph.tileFlags[arg2][arg1][arg4] & 0x8) != 0) { - local39 = 0; - } - if (local39 != LoginManager.centralPlane) { - return; - } - } - local39 = arg2; - if (arg2 < 3 && (SceneGraph.tileFlags[1][arg1][arg4] & 0x2) == 2) { - local39 = arg2 + 1; - } - SceneGraph.method1144(arg4, arg1, arg2, arg6, local39, PathFinder.collisionMaps[arg2]); - if (arg0 >= 0) { - @Pc(92) boolean local92 = Preferences.showGroundDecorations; - Preferences.showGroundDecorations = true; - SceneGraph.method3397(local39, false, arg2, false, PathFinder.collisionMaps[arg2], arg0, arg5, arg1, arg4, arg3); - Preferences.showGroundDecorations = local92; - } - } - -} diff --git a/client/src/main/java/rt4/Static8.java b/client/src/main/java/rt4/Static8.java deleted file mode 100644 index 1d527c6..0000000 --- a/client/src/main/java/rt4/Static8.java +++ /dev/null @@ -1,97 +0,0 @@ -package rt4; - -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static8 { - - @OriginalMember(owner = "client!aj", name = "Z", descriptor = "[I") - public static int[] anIntArray8; - - @OriginalMember(owner = "client!aj", name = "a", descriptor = "(IIIZIII)V") - public static void method120(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - Static241.method4278(arg4); - @Pc(8) int local8 = arg4 - arg1; - @Pc(10) int local10 = 0; - if (local8 < 0) { - local8 = 0; - } - @Pc(21) int local21 = -arg4; - @Pc(23) int local23 = arg4; - @Pc(25) int local25 = local8; - @Pc(28) int local28 = -local8; - @Pc(30) int local30 = -1; - @Pc(34) int[] local34 = TextureOp29SubOp4.anIntArrayArray10[arg2]; - @Pc(39) int local39 = arg5 + local8; - @Pc(41) int local41 = -1; - @Pc(46) int local46 = arg5 - local8; - TextureOp29SubOp4.method2576(local34, arg5 - arg4, local46, arg0); - TextureOp29SubOp4.method2576(local34, local46, local39, arg3); - TextureOp29SubOp4.method2576(local34, local39, arg5 + arg4, arg0); - while (local10 < local23) { - local30 += 2; - local28 += local30; - if (local28 >= 0 && local25 >= 1) { - Static241.anIntArray522[local25] = local10; - local25--; - local28 -= local25 << 1; - } - local10++; - local41 += 2; - local21 += local41; - @Pc(142) int[] local142; - @Pc(149) int[] local149; - @Pc(162) int local162; - @Pc(158) int local158; - @Pc(154) int local154; - @Pc(171) int local171; - @Pc(167) int local167; - if (local21 >= 0) { - local23--; - local21 -= local23 << 1; - if (local8 > local23) { - local142 = TextureOp29SubOp4.anIntArrayArray10[local23 + arg2]; - local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local23]; - local154 = arg5 - local10; - local158 = local10 + arg5; - local162 = Static241.anIntArray522[local23]; - local167 = arg5 - local162; - local171 = local162 + arg5; - TextureOp29SubOp4.method2576(local142, local154, local167, arg0); - TextureOp29SubOp4.method2576(local142, local167, local171, arg3); - TextureOp29SubOp4.method2576(local142, local171, local158, arg0); - TextureOp29SubOp4.method2576(local149, local154, local167, arg0); - TextureOp29SubOp4.method2576(local149, local167, local171, arg3); - TextureOp29SubOp4.method2576(local149, local171, local158, arg0); - } else { - local142 = TextureOp29SubOp4.anIntArrayArray10[arg2 + local23]; - local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local23]; - local162 = local10 + arg5; - local158 = arg5 - local10; - TextureOp29SubOp4.method2576(local142, local158, local162, arg0); - TextureOp29SubOp4.method2576(local149, local158, local162, arg0); - } - } - local142 = TextureOp29SubOp4.anIntArrayArray10[arg2 + local10]; - local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local10]; - local162 = local23 + arg5; - local158 = arg5 - local23; - if (local8 <= local10) { - TextureOp29SubOp4.method2576(local142, local158, local162, arg0); - TextureOp29SubOp4.method2576(local149, local158, local162, arg0); - } else { - local154 = local10 <= local25 ? local25 : Static241.anIntArray522[local10]; - local171 = local154 + arg5; - local167 = arg5 - local154; - TextureOp29SubOp4.method2576(local142, local158, local167, arg0); - TextureOp29SubOp4.method2576(local142, local167, local171, arg3); - TextureOp29SubOp4.method2576(local142, local171, local162, arg0); - TextureOp29SubOp4.method2576(local149, local158, local167, arg0); - TextureOp29SubOp4.method2576(local149, local167, local171, arg3); - TextureOp29SubOp4.method2576(local149, local171, local162, arg0); - } - } - } - -} diff --git a/client/src/main/java/rt4/Static87.java b/client/src/main/java/rt4/Static87.java index 293c641..37c3206 100644 --- a/client/src/main/java/rt4/Static87.java +++ b/client/src/main/java/rt4/Static87.java @@ -137,7 +137,7 @@ public final class Static87 { @Pc(114) int local114 = arg1 + component.y; @Pc(117) int alpha = component.alpha; @Pc(123) int local123 = component.x + arg2; - if (Static121.qaOpTest && (InterfaceList.getServerActiveProperties(component).events != 0 || component.type == 0) && alpha > 127) { + if (Cheat.qaOpTest && (InterfaceList.getServerActiveProperties(component).events != 0 || component.type == 0) && alpha > 127) { alpha = 127; } @Pc(166) int local166; @@ -146,10 +146,10 @@ public final class Static87 { if (layer != 0xabcdabcd && !component.dragRenderBehavior) { anInt4696 = arg2; anInt3126 = arg1; - Static241.aClass13Array13 = components; + Static9.aClass13Array13 = components; continue; } - if (Static40.aBoolean172 && Static146.aBoolean174) { + if (Static40.aBoolean172 && InterfaceList.aBoolean174) { local164 = Mouse.lastMouseY; local166 = Mouse.lastMouseX; local164 -= Static40.anInt4035; @@ -206,7 +206,7 @@ public final class Static87 { if (component.clientCode != 0) { if (component.clientCode == 1337 || component.clientCode == 1403 && GlRenderer.enabled) { InterfaceList.aClass13_26 = component; - Static126.anInt5574 = local114; + InterfaceList.anInt5574 = local114; anInt2503 = local123; ScriptRunner.method4326(component.height, component.clientCode == 1403, local123, component.width, local114); if (GlRenderer.enabled) { @@ -352,7 +352,7 @@ public final class Static87 { } } if (!Static40.aBoolean108) { - if (component.type == 0 && component.noClickThrough && ScriptRunner.anInt3751 >= local166 && ScriptRunner.anInt1892 >= local164 && ScriptRunner.anInt3751 < local302 && local291 > ScriptRunner.anInt1892 && !Static121.qaOpTest) { + if (component.type == 0 && component.noClickThrough && ScriptRunner.anInt3751 >= local166 && ScriptRunner.anInt1892 >= local164 && ScriptRunner.anInt3751 < local302 && local291 > ScriptRunner.anInt1892 && !Cheat.qaOpTest) { MiniMenu.size = 1; MiniMenu.cursors[0] = MiniMenu.anInt1092; MiniMenu.ops[0] = LocalizedText.CANCEL; @@ -381,7 +381,7 @@ public final class Static87 { } @Pc(1186) ComponentPointer local1186 = (ComponentPointer) InterfaceList.openInterfaces.get(component.id); if (local1186 != null) { - if (local1186.anInt5879 == 0 && !Static40.aBoolean108 && ScriptRunner.anInt3751 >= local166 && local164 <= ScriptRunner.anInt1892 && local302 > ScriptRunner.anInt3751 && ScriptRunner.anInt1892 < local291 && !Static121.qaOpTest) { + if (local1186.anInt5879 == 0 && !Static40.aBoolean108 && ScriptRunner.anInt3751 >= local166 && local164 <= ScriptRunner.anInt1892 && local302 > ScriptRunner.anInt3751 && ScriptRunner.anInt1892 < local291 && !Cheat.qaOpTest) { MiniMenu.ops[0] = LocalizedText.CANCEL; MiniMenu.size = 1; MiniMenu.cursors[0] = MiniMenu.anInt1092; @@ -397,7 +397,7 @@ public final class Static87 { Rasteriser.prepare(); } } - if (Static126.aBooleanArray116[rectangle] || Cheat.rectDebug > 1) { + if (InterfaceList.aBooleanArray116[rectangle] || Cheat.rectDebug > 1) { if (component.type == 0 && !component.if3 && component.scrollMaxV > component.height) { method1624(component.scrollY, component.scrollMaxV, component.width + local123, local114, component.height); } @@ -415,7 +415,7 @@ public final class Static87 { } if (component.objTypes[local270] > 0) { objId = component.objTypes[local270] - 1; - if (arg0 < x + 32 && x < arg4 && arg6 < y + 32 && y < arg7 || component == InterfaceList.clickedInventoryComponent && Static4.mouseOverInventoryObjectIndex == local270) { + if (arg0 < x + 32 && x < arg4 && arg6 < y + 32 && y < arg7 || component == InterfaceList.clickedInventoryComponent && InterfaceList.mouseOverInventoryObjectIndex == local270) { @Pc(1476) Sprite sprite; if (MiniMenu.anInt5014 == 1 && MiniMenu.anInt4370 == local270 && component.id == MiniMap.anInt5062) { @@ -430,7 +430,7 @@ public final class Static87 { if (sprite == null) { InterfaceList.redraw(component); - } else if (InterfaceList.clickedInventoryComponent == component && local270 == Static4.mouseOverInventoryObjectIndex) { + } else if (InterfaceList.clickedInventoryComponent == component && local270 == InterfaceList.mouseOverInventoryObjectIndex) { int dragX = Mouse.lastMouseX - InterfaceList.clickedInventoryComponentX; int dragY = Mouse.lastMouseY - InterfaceList.clickedInventoryComponentY; diff --git a/client/src/main/java/rt4/Static89.java b/client/src/main/java/rt4/Static89.java index 185cfc6..2bb07bd 100644 --- a/client/src/main/java/rt4/Static89.java +++ b/client/src/main/java/rt4/Static89.java @@ -113,17 +113,17 @@ public final class Static89 { if (InterfaceList.aBooleanArray100[local60]) { InterfaceList.rectangleRedraw[local60] = true; } - Static126.aBooleanArray116[local60] = InterfaceList.aBooleanArray100[local60]; + InterfaceList.aBooleanArray116[local60] = InterfaceList.aBooleanArray100[local60]; InterfaceList.aBooleanArray100[local60] = false; } Static87.aClass13_13 = null; Static87.anInt2503 = -1; - Static126.anInt5574 = -1; + InterfaceList.anInt5574 = -1; InterfaceList.mouseOverInventoryInterface = null; if (GlRenderer.enabled) { ScriptRunner.aBoolean299 = true; } - Static182.anInt4311 = client.loop; + InterfaceList.anInt4311 = client.loop; if (InterfaceList.topLevelInterface != -1) { InterfaceList.rectangles = 0; Static9.method182(); @@ -143,7 +143,7 @@ public final class Static89 { } else if (Static87.aClass13_13 != null) { MiniMenu.method1207(Static87.aClass13_13, Static87.anInt3484, Static131.anInt3260); } else if (Static87.anInt2503 != -1) { - MiniMenu.method1207(null, Static126.anInt5574, Static87.anInt2503); + MiniMenu.method1207(null, InterfaceList.anInt5574, Static87.anInt2503); } local60 = Static40.aBoolean108 ? -1 : method4044(); if (local60 == -1) { @@ -158,7 +158,7 @@ public final class Static89 { } if (Cheat.rectDebug == 3) { for (@Pc(189) int local189 = 0; local189 < InterfaceList.rectangles; local189++) { - if (Static126.aBooleanArray116[local189]) { + if (InterfaceList.aBooleanArray116[local189]) { if (GlRenderer.enabled) { GlRaster.fillRectAlpha(InterfaceList.rectangleX[local189], InterfaceList.rectangleY[local189], InterfaceList.rectangleWidth[local189], InterfaceList.rectangleHeight[local189], 16711935, 128); } else { @@ -183,9 +183,9 @@ public final class Static89 { @Pc(9) int local9 = arg2; @Pc(12) int local12 = -arg2; @Pc(14) int local14 = -1; - @Pc(22) int local22 = Static231.method1690(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); - @Pc(30) int local30 = Static231.method1690(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg1], local30, local22, arg0); + @Pc(22) int local22 = IntUtils.clamp(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); + @Pc(30) int local30 = IntUtils.clamp(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[arg1], local30, local22, arg0); while (local7 < local9) { local14 += 2; local12 += local14; @@ -199,13 +199,13 @@ public final class Static89 { local12 -= local9 << 1; local68 = arg1 + local9; if (local68 >= TextureOp29.anInt5773 && local58 <= TextureOp29.anInt2869) { - local84 = Static231.method1690(TextureOp29.anInt5063, arg3 + local7, TextureOp29.anInt4164); - local93 = Static231.method1690(TextureOp29.anInt5063, arg3 - local7, TextureOp29.anInt4164); + local84 = IntUtils.clamp(TextureOp29.anInt5063, arg3 + local7, TextureOp29.anInt4164); + local93 = IntUtils.clamp(TextureOp29.anInt5063, arg3 - local7, TextureOp29.anInt4164); if (TextureOp29.anInt2869 >= local68) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local68], local93, local84, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local68], local93, local84, arg0); } if (TextureOp29.anInt5773 <= local58) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local58], local93, local84, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local58], local93, local84, arg0); } } } @@ -213,13 +213,13 @@ public final class Static89 { local58 = arg1 - local7; local68 = local7 + arg1; if (local68 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= local58) { - local84 = Static231.method1690(TextureOp29.anInt5063, arg3 + local9, TextureOp29.anInt4164); - local93 = Static231.method1690(TextureOp29.anInt5063, arg3 - local9, TextureOp29.anInt4164); + local84 = IntUtils.clamp(TextureOp29.anInt5063, arg3 + local9, TextureOp29.anInt4164); + local93 = IntUtils.clamp(TextureOp29.anInt5063, arg3 - local9, TextureOp29.anInt4164); if (local68 <= TextureOp29.anInt2869) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local68], local93, local84, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local68], local93, local84, arg0); } if (local58 >= TextureOp29.anInt5773) { - TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[local58], local93, local84, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local58], local93, local84, arg0); } } } diff --git a/client/src/main/java/rt4/Static9.java b/client/src/main/java/rt4/Static9.java index 4bda602..5a8d328 100644 --- a/client/src/main/java/rt4/Static9.java +++ b/client/src/main/java/rt4/Static9.java @@ -11,14 +11,16 @@ public final class Static9 { @OriginalMember(owner = "client!al", name = "r", descriptor = "Lclient!na;") public static final JagString aClass100_35 = JagString.parse("showVideoAd"); + @OriginalMember(owner = "client!th", name = "m", descriptor = "[Lclient!be;") + public static Component[] aClass13Array13; @OriginalMember(owner = "client!al", name = "a", descriptor = "(Z)V") public static void method182() { - Static241.aClass13Array13 = null; + aClass13Array13 = null; Static87.method86(InterfaceList.topLevelInterface, 0, GameShell.canvasWidth, 0, -1, GameShell.canvasHeight, 0, 0); - if (Static241.aClass13Array13 != null) { - Static87.method1809(0, Static87.anInt3126, Static87.anInt4696, Static241.aClass13Array13, GameShell.canvasWidth, -1412584499, 0, GameShell.canvasHeight, Static40.aClass13_1.rectangle); - Static241.aClass13Array13 = null; + if (aClass13Array13 != null) { + Static87.method1809(0, Static87.anInt3126, Static87.anInt4696, aClass13Array13, GameShell.canvasWidth, -1412584499, 0, GameShell.canvasHeight, Static40.aClass13_1.rectangle); + aClass13Array13 = null; } } diff --git a/client/src/main/java/rt4/StringUtils.java b/client/src/main/java/rt4/StringUtils.java index 5cd4964..03e4dcc 100644 --- a/client/src/main/java/rt4/StringUtils.java +++ b/client/src/main/java/rt4/StringUtils.java @@ -13,6 +13,10 @@ public class StringUtils { public static final JagString aClass100_930 = JagString.parse("(Z"); @OriginalMember(owner = "client!fm", name = "W", descriptor = "Lclient!na;") public static final JagString aClass100_453 = JagString.parse(")2"); + @OriginalMember(owner = "client!cg", name = "h", descriptor = "Lclient!na;") + public static final JagString aClass100_185 = JagString.parse(")3"); + @OriginalMember(owner = "client!tl", name = "i", descriptor = "Lclient!na;") + public static final JagString aClass100_1017 = JagString.parse(")1"); @OriginalMember(owner = "client!gj", name = "a", descriptor = "(II)Z") public static boolean isAlphaNumeric(@OriginalArg(0) int arg0) { @@ -84,19 +88,19 @@ public class StringUtils { arg3 = -arg3; local9.method3113(aClass100_453); } - @Pc(26) JagString local26 = Static182.aClass100_1017; - @Pc(28) JagString local28 = Static182.aClass100_185; + @Pc(26) JagString local26 = aClass100_1017; + @Pc(28) JagString local28 = aClass100_185; if (arg0 == 1) { - local26 = Static182.aClass100_185; - local28 = Static182.aClass100_1017; + local26 = aClass100_185; + local28 = aClass100_1017; } if (arg0 == 2) { - local28 = Static182.aClass100_1017; + local28 = aClass100_1017; local26 = nonBreakingSpace; } if (arg0 == 3) { - local26 = Static182.aClass100_185; - local28 = Static182.aClass100_1017; + local26 = aClass100_185; + local28 = aClass100_1017; } @Pc(59) JagString local59 = Static87.allocate(0); @Pc(61) int local61; diff --git a/client/src/main/java/rt4/TextureOp29.java b/client/src/main/java/rt4/TextureOp29.java index f7ef17f..802e463 100644 --- a/client/src/main/java/rt4/TextureOp29.java +++ b/client/src/main/java/rt4/TextureOp29.java @@ -32,6 +32,204 @@ public final class TextureOp29 extends TextureOp { anInt2869 = arg0; } + @OriginalMember(owner = "client!ed", name = "a", descriptor = "(ZIIII)V") + public static void method1306(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + if (arg3 >= anInt4164 && arg3 <= anInt5063) { + @Pc(22) int local22 = IntUtils.clamp(anInt2869, arg1, anInt5773); + @Pc(28) int local28 = IntUtils.clamp(anInt2869, arg0, anInt5773); + TextureOp29SubOp4.method2054(local22, arg3, local28, arg2); + } + } + + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IIZII)V") + public static void method4019(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + if (arg3 >= anInt5773 && arg3 <= anInt2869) { + @Pc(15) int local15 = IntUtils.clamp(anInt5063, arg0, anInt4164); + @Pc(21) int local21 = IntUtils.clamp(anInt5063, arg2, anInt4164); + TextureOp29SubOp4.method3826(arg1, arg3, local21, local15); + } + } + + @OriginalMember(owner = "client!sk", name = "a", descriptor = "(IIIIII)V") + public static void method3982(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { + @Pc(15) int local15 = arg4 - arg2; + @Pc(19) int local19 = arg1 - arg3; + if (local15 == 0) { + if (local19 != 0) { + method1306(arg1, arg3, arg0, arg2); + } + } else if (local19 == 0) { + method4019(arg2, arg0, arg4, arg3); + } else { + @Pc(50) int local50 = (local19 << 12) / local15; + @Pc(59) int local59 = arg3 - (local50 * arg2 >> 12); + @Pc(68) int local68; + @Pc(76) int local76; + if (anInt4164 > arg2) { + local68 = anInt4164; + local76 = (anInt4164 * local50 >> 12) + local59; + } else if (arg2 > anInt5063) { + local76 = (anInt5063 * local50 >> 12) + local59; + local68 = anInt5063; + } else { + local68 = arg2; + local76 = arg3; + } + @Pc(109) int local109; + @Pc(118) int local118; + if (arg4 < anInt4164) { + local109 = anInt4164; + local118 = local59 + (local50 * anInt4164 >> 12); + } else if (anInt5063 < arg4) { + local109 = anInt5063; + local118 = local59 + (local50 * anInt5063 >> 12); + } else { + local118 = arg1; + local109 = arg4; + } + if (anInt5773 > local118) { + local109 = (anInt5773 - local59 << 12) / local50; + local118 = anInt5773; + } else if (local118 > anInt2869) { + local118 = anInt2869; + local109 = (anInt2869 - local59 << 12) / local50; + } + if (local76 < anInt5773) { + local76 = anInt5773; + local68 = (anInt5773 - local59 << 12) / local50; + } else if (anInt2869 < local76) { + local76 = anInt2869; + local68 = (anInt2869 - local59 << 12) / local50; + } + TextureOp29SubOp4.method4547(arg0, local118, local76, local109, local68); + } + } + + @OriginalMember(owner = "client!sk", name = "a", descriptor = "(IIIIBIII)V") + public static void method3981(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { + @Pc(7) int local7 = 0; + @Pc(12) int local12 = arg0 - arg3; + @Pc(14) int local14 = 0; + @Pc(16) int local16 = arg6; + @Pc(20) int local20 = arg6 * arg6; + @Pc(25) int local25 = arg6 - arg3; + @Pc(29) int local29 = arg0 * arg0; + @Pc(33) int local33 = local20 << 1; + @Pc(37) int local37 = local25 * local25; + @Pc(41) int local41 = local12 * local12; + @Pc(45) int local45 = local29 << 1; + @Pc(49) int local49 = local37 << 1; + @Pc(53) int local53 = local41 << 1; + @Pc(57) int local57 = local25 << 1; + @Pc(61) int local61 = arg6 << 1; + @Pc(70) int local70 = local33 + local29 * (1 - local61); + @Pc(79) int local79 = local20 - (local61 - 1) * local45; + @Pc(88) int local88 = local49 + local41 * (1 - local57); + @Pc(96) int local96 = local37 - local53 * (local57 - 1); + @Pc(100) int local100 = local20 << 2; + @Pc(104) int local104 = local29 << 2; + @Pc(108) int local108 = local37 << 2; + @Pc(112) int local112 = local33 * 3; + @Pc(118) int local118 = (local61 - 3) * local45; + @Pc(130) int local130 = local41 << 2; + @Pc(134) int local134 = local49 * 3; + @Pc(140) int local140 = (local57 - 3) * local53; + @Pc(146) int local146 = (arg6 - 1) * local104; + @Pc(148) int local148 = local108; + @Pc(150) int local150 = local100; + @Pc(156) int local156 = (local25 - 1) * local130; + @Pc(174) int local174; + @Pc(183) int local183; + @Pc(192) int local192; + @Pc(201) int local201; + if (arg4 >= anInt5773 && anInt2869 >= arg4) { + @Pc(166) int[] local166 = TextureOp29SubOp4.anIntArrayArray10[arg4]; + local174 = IntUtils.clamp(anInt5063, arg5 - arg0, anInt4164); + local183 = IntUtils.clamp(anInt5063, arg5 + arg0, anInt4164); + local192 = IntUtils.clamp(anInt5063, arg5 - local12, anInt4164); + local201 = IntUtils.clamp(anInt5063, arg5 + local12, anInt4164); + ArrayUtils.fillRange(local166, local174, local192, arg2); + ArrayUtils.fillRange(local166, local192, local201, arg1); + ArrayUtils.fillRange(local166, local201, local183, arg2); + } + while (local16 > 0) { + if (local70 < 0) { + while (local70 < 0) { + local70 += local112; + local112 += local100; + local7++; + local79 += local150; + local150 += local100; + } + } + @Pc(255) boolean local255 = local16 <= local25; + if (local79 < 0) { + local79 += local150; + local70 += local112; + local7++; + local150 += local100; + local112 += local100; + } + if (local255) { + if (local88 < 0) { + while (local88 < 0) { + local14++; + local96 += local148; + local148 += local108; + local88 += local134; + local134 += local108; + } + } + if (local96 < 0) { + local14++; + local96 += local148; + local88 += local134; + local148 += local108; + local134 += local108; + } + local88 += -local156; + local156 -= local130; + local96 += -local140; + local140 -= local130; + } + local79 += -local118; + local70 += -local146; + local146 -= local104; + local118 -= local104; + local16--; + local183 = arg4 + local16; + local174 = arg4 - local16; + if (anInt5773 <= local183 && anInt2869 >= local174) { + local192 = IntUtils.clamp(anInt5063, arg5 + local7, anInt4164); + local201 = IntUtils.clamp(anInt5063, arg5 - local7, anInt4164); + if (local255) { + @Pc(404) int local404 = IntUtils.clamp(anInt5063, arg5 + local14, anInt4164); + @Pc(412) int local412 = IntUtils.clamp(anInt5063, arg5 - local14, anInt4164); + @Pc(420) int[] local420; + if (anInt5773 <= local174) { + local420 = TextureOp29SubOp4.anIntArrayArray10[local174]; + ArrayUtils.fillRange(local420, local201, local412, arg2); + ArrayUtils.fillRange(local420, local412, local404, arg1); + ArrayUtils.fillRange(local420, local404, local192, arg2); + } + if (local183 <= anInt2869) { + local420 = TextureOp29SubOp4.anIntArrayArray10[local183]; + ArrayUtils.fillRange(local420, local201, local412, arg2); + ArrayUtils.fillRange(local420, local412, local404, arg1); + ArrayUtils.fillRange(local420, local404, local192, arg2); + } + } else { + if (anInt5773 <= local174) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local174], local201, local192, arg2); + } + if (anInt2869 >= local183) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local183], local201, local192, arg2); + } + } + } + } + } + @OriginalMember(owner = "client!si", name = "a", descriptor = "(IB)[I") @Override public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { diff --git a/client/src/main/java/rt4/TextureOp29SubOp1.java b/client/src/main/java/rt4/TextureOp29SubOp1.java index 74ee92b..f712c00 100644 --- a/client/src/main/java/rt4/TextureOp29SubOp1.java +++ b/client/src/main/java/rt4/TextureOp29SubOp1.java @@ -46,6 +46,6 @@ public final class TextureOp29SubOp1 extends TextureOp29SubOp { @Pc(25) int local25 = this.anInt1017 * arg1 >> 12; @Pc(32) int local32 = arg0 * this.anInt1012 >> 12; @Pc(39) int local39 = arg0 * this.anInt1015 >> 12; - Static231.method3982(this.anInt5229, local39, local10, local32, local25); + TextureOp29.method3982(this.anInt5229, local39, local10, local32, local25); } } diff --git a/client/src/main/java/rt4/TextureOp29SubOp2.java b/client/src/main/java/rt4/TextureOp29SubOp2.java index e1b5b2e..e5e655f 100644 --- a/client/src/main/java/rt4/TextureOp29SubOp2.java +++ b/client/src/main/java/rt4/TextureOp29SubOp2.java @@ -8,6 +8,8 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!kc") public final class TextureOp29SubOp2 extends TextureOp29SubOp { + @OriginalMember(owner = "client!th", name = "o", descriptor = "[I") + public static int[] anIntArray522; @OriginalMember(owner = "client!kc", name = "B", descriptor = "I") private final int anInt3168; @@ -34,6 +36,336 @@ public final class TextureOp29SubOp2 extends TextureOp29SubOp { return new TextureOp29SubOp2(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g3(), arg0.g1()); } + @OriginalMember(owner = "client!fn", name = "a", descriptor = "(ZIIIIIII)V") + public static void method1623(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { + if (arg3 == arg6) { + method2826(arg0, arg2, arg5, arg6, arg1, arg4); + } else if (arg1 - arg6 >= TextureOp29.anInt4164 && arg6 + arg1 <= TextureOp29.anInt5063 && TextureOp29.anInt5773 <= arg2 - arg3 && TextureOp29.anInt2869 >= arg2 + arg3) { + method4594(arg5, arg1, arg2, arg4, arg6, arg3, arg0); + } else { + TextureOp29.method3981(arg6, arg5, arg4, arg0, arg2, arg1, arg3); + } + } + + @OriginalMember(owner = "client!wb", name = "a", descriptor = "(IIIIIIII)V") + public static void method4594(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { + @Pc(7) int local7 = 0; + @Pc(9) int local9 = arg5; + @Pc(11) int local11 = 0; + @Pc(16) int local16 = arg4 - arg6; + @Pc(20) int local20 = arg4 * arg4; + @Pc(25) int local25 = arg5 - arg6; + @Pc(29) int local29 = arg5 * arg5; + @Pc(33) int local33 = local25 * local25; + @Pc(37) int local37 = local29 << 1; + @Pc(41) int local41 = local20 << 1; + @Pc(45) int local45 = local33 << 1; + @Pc(49) int local49 = local16 * local16; + @Pc(53) int local53 = local49 << 1; + @Pc(57) int local57 = arg5 << 1; + @Pc(61) int local61 = local25 << 1; + @Pc(70) int local70 = local29 - (local57 - 1) * local41; + @Pc(80) int local80 = local49 * (1 - local61) + local45; + @Pc(89) int local89 = (1 - local57) * local20 + local37; + @Pc(93) int local93 = local20 << 2; + @Pc(102) int local102 = local33 - local53 * (local61 - 1); + @Pc(106) int local106 = local49 << 2; + @Pc(110) int local110 = local29 << 2; + @Pc(114) int local114 = local33 << 2; + @Pc(120) int local120 = (local57 - 3) * local41; + @Pc(124) int local124 = local37 * 3; + @Pc(130) int local130 = (local61 - 3) * local53; + @Pc(134) int local134 = local45 * 3; + @Pc(136) int local136 = local110; + @Pc(138) int local138 = local114; + @Pc(144) int local144 = (local25 - 1) * local106; + @Pc(162) int local162 = (arg5 - 1) * local93; + @Pc(166) int[] local166 = TextureOp29SubOp4.anIntArrayArray10[arg2]; + ArrayUtils.fillRange(local166, arg1 - arg4, -local16 + arg1, arg3); + ArrayUtils.fillRange(local166, arg1 - local16, arg1 - -local16, arg0); + ArrayUtils.fillRange(local166, arg1 + local16, arg4 + arg1, arg3); + while (local9 > 0) { + if (local89 < 0) { + while (local89 < 0) { + local70 += local136; + local89 += local124; + local7++; + local136 += local110; + local124 += local110; + } + } + if (local70 < 0) { + local89 += local124; + local7++; + local124 += local110; + local70 += local136; + local136 += local110; + } + @Pc(258) boolean local258 = local9 <= local25; + if (local258) { + if (local80 < 0) { + while (local80 < 0) { + local80 += local134; + local134 += local114; + local11++; + local102 += local138; + local138 += local114; + } + } + if (local102 < 0) { + local80 += local134; + local11++; + local134 += local114; + local102 += local138; + local138 += local114; + } + local102 += -local130; + local130 -= local106; + local80 += -local144; + local144 -= local106; + } + local89 += -local162; + local70 += -local120; + local120 -= local93; + local9--; + @Pc(348) int local348 = arg2 - local9; + @Pc(352) int local352 = local7 + arg1; + local162 -= local93; + @Pc(360) int local360 = local9 + arg2; + @Pc(365) int local365 = arg1 - local7; + if (local258) { + @Pc(371) int local371 = arg1 + local11; + @Pc(376) int local376 = arg1 - local11; + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local348], local365, local376, arg3); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local348], local376, local371, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local348], local371, local352, arg3); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local360], local365, local376, arg3); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local360], local376, local371, arg0); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local360], local371, local352, arg3); + } else { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local348], local365, local352, arg3); + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local360], local365, local352, arg3); + } + } + } + + @OriginalMember(owner = "client!ma", name = "a", descriptor = "(IIBIIII)V") + public static void method2826(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + if (arg4 - arg3 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg4 + arg3 && TextureOp29.anInt5773 <= arg1 - arg3 && TextureOp29.anInt2869 >= arg3 + arg1) { + method120(arg5, arg0, arg1, arg2, arg3, arg4); + } else { + method4670(arg2, arg1, arg3, arg5, arg0, arg4); + } + } + + @OriginalMember(owner = "client!aj", name = "a", descriptor = "(IIIZIII)V") + public static void method120(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + method4278(arg4); + @Pc(8) int local8 = arg4 - arg1; + @Pc(10) int local10 = 0; + if (local8 < 0) { + local8 = 0; + } + @Pc(21) int local21 = -arg4; + @Pc(23) int local23 = arg4; + @Pc(25) int local25 = local8; + @Pc(28) int local28 = -local8; + @Pc(30) int local30 = -1; + @Pc(34) int[] local34 = TextureOp29SubOp4.anIntArrayArray10[arg2]; + @Pc(39) int local39 = arg5 + local8; + @Pc(41) int local41 = -1; + @Pc(46) int local46 = arg5 - local8; + ArrayUtils.fillRange(local34, arg5 - arg4, local46, arg0); + ArrayUtils.fillRange(local34, local46, local39, arg3); + ArrayUtils.fillRange(local34, local39, arg5 + arg4, arg0); + while (local10 < local23) { + local30 += 2; + local28 += local30; + if (local28 >= 0 && local25 >= 1) { + anIntArray522[local25] = local10; + local25--; + local28 -= local25 << 1; + } + local10++; + local41 += 2; + local21 += local41; + @Pc(142) int[] local142; + @Pc(149) int[] local149; + @Pc(162) int local162; + @Pc(158) int local158; + @Pc(154) int local154; + @Pc(171) int local171; + @Pc(167) int local167; + if (local21 >= 0) { + local23--; + local21 -= local23 << 1; + if (local8 > local23) { + local142 = TextureOp29SubOp4.anIntArrayArray10[local23 + arg2]; + local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local23]; + local154 = arg5 - local10; + local158 = local10 + arg5; + local162 = anIntArray522[local23]; + local167 = arg5 - local162; + local171 = local162 + arg5; + ArrayUtils.fillRange(local142, local154, local167, arg0); + ArrayUtils.fillRange(local142, local167, local171, arg3); + ArrayUtils.fillRange(local142, local171, local158, arg0); + ArrayUtils.fillRange(local149, local154, local167, arg0); + ArrayUtils.fillRange(local149, local167, local171, arg3); + ArrayUtils.fillRange(local149, local171, local158, arg0); + } else { + local142 = TextureOp29SubOp4.anIntArrayArray10[arg2 + local23]; + local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local23]; + local162 = local10 + arg5; + local158 = arg5 - local10; + ArrayUtils.fillRange(local142, local158, local162, arg0); + ArrayUtils.fillRange(local149, local158, local162, arg0); + } + } + local142 = TextureOp29SubOp4.anIntArrayArray10[arg2 + local10]; + local149 = TextureOp29SubOp4.anIntArrayArray10[arg2 - local10]; + local162 = local23 + arg5; + local158 = arg5 - local23; + if (local8 <= local10) { + ArrayUtils.fillRange(local142, local158, local162, arg0); + ArrayUtils.fillRange(local149, local158, local162, arg0); + } else { + local154 = local10 <= local25 ? local25 : anIntArray522[local10]; + local171 = local154 + arg5; + local167 = arg5 - local154; + ArrayUtils.fillRange(local142, local158, local167, arg0); + ArrayUtils.fillRange(local142, local167, local171, arg3); + ArrayUtils.fillRange(local142, local171, local162, arg0); + ArrayUtils.fillRange(local149, local158, local167, arg0); + ArrayUtils.fillRange(local149, local167, local171, arg3); + ArrayUtils.fillRange(local149, local171, local162, arg0); + } + } + } + + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IBIIIII)V") + public static void method4670(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + @Pc(18) int local18 = arg2 - arg4; + method4278(arg2); + @Pc(23) int local23 = 0; + if (local18 < 0) { + local18 = 0; + } + @Pc(32) int local32 = arg2; + @Pc(35) int local35 = -arg2; + @Pc(38) int local38 = -local18; + @Pc(40) int local40 = local18; + @Pc(42) int local42 = -1; + @Pc(61) int local61; + @Pc(69) int local69; + @Pc(78) int local78; + @Pc(87) int local87; + if (arg1 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg1) { + @Pc(52) int[] local52 = TextureOp29SubOp4.anIntArrayArray10[arg1]; + local61 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - arg2, TextureOp29.anInt4164); + local69 = IntUtils.clamp(TextureOp29.anInt5063, arg2 + arg5, TextureOp29.anInt4164); + local78 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - local18, TextureOp29.anInt4164); + local87 = IntUtils.clamp(TextureOp29.anInt5063, arg5 + local18, TextureOp29.anInt4164); + ArrayUtils.fillRange(local52, local61, local78, arg3); + ArrayUtils.fillRange(local52, local78, local87, arg0); + ArrayUtils.fillRange(local52, local87, local69, arg3); + } + @Pc(107) int local107 = -1; + while (local23 < local32) { + local42 += 2; + local107 += 2; + local38 += local107; + local35 += local42; + if (local38 >= 0 && local40 >= 1) { + local40--; + anIntArray522[local40] = local23; + local38 -= local40 << 1; + } + local23++; + @Pc(264) int local264; + @Pc(273) int local273; + @Pc(280) int[] local280; + @Pc(161) int local161; + if (local35 >= 0) { + local32--; + local35 -= local32 << 1; + local161 = arg1 - local32; + local61 = arg1 + local32; + if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { + if (local32 >= local18) { + local69 = IntUtils.clamp(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); + local78 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local61], local78, local69, arg3); + } + if (local161 >= TextureOp29.anInt5773) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local161], local78, local69, arg3); + } + } else { + local69 = anIntArray522[local32]; + local78 = IntUtils.clamp(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); + local87 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); + local264 = IntUtils.clamp(TextureOp29.anInt5063, arg5 + local69, TextureOp29.anInt4164); + local273 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - local69, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { + local280 = TextureOp29SubOp4.anIntArrayArray10[local61]; + ArrayUtils.fillRange(local280, local87, local273, arg3); + ArrayUtils.fillRange(local280, local273, local264, arg0); + ArrayUtils.fillRange(local280, local264, local78, arg3); + } + if (local161 >= TextureOp29.anInt5773) { + local280 = TextureOp29SubOp4.anIntArrayArray10[local161]; + ArrayUtils.fillRange(local280, local87, local273, arg3); + ArrayUtils.fillRange(local280, local273, local264, arg0); + ArrayUtils.fillRange(local280, local264, local78, arg3); + } + } + } + } + local161 = arg1 - local23; + local61 = arg1 + local23; + if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { + local69 = arg5 + local32; + local78 = arg5 - local32; + if (local69 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= local78) { + local69 = IntUtils.clamp(TextureOp29.anInt5063, local69, TextureOp29.anInt4164); + local78 = IntUtils.clamp(TextureOp29.anInt5063, local78, TextureOp29.anInt4164); + if (local23 < local18) { + local87 = local40 >= local23 ? local40 : anIntArray522[local23]; + local264 = IntUtils.clamp(TextureOp29.anInt5063, local87 + arg5, TextureOp29.anInt4164); + local273 = IntUtils.clamp(TextureOp29.anInt5063, arg5 - local87, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { + local280 = TextureOp29SubOp4.anIntArrayArray10[local61]; + ArrayUtils.fillRange(local280, local78, local273, arg3); + ArrayUtils.fillRange(local280, local273, local264, arg0); + ArrayUtils.fillRange(local280, local264, local69, arg3); + } + if (local161 >= TextureOp29.anInt5773) { + local280 = TextureOp29SubOp4.anIntArrayArray10[local161]; + ArrayUtils.fillRange(local280, local78, local273, arg3); + ArrayUtils.fillRange(local280, local273, local264, arg0); + ArrayUtils.fillRange(local280, local264, local69, arg3); + } + } else { + if (TextureOp29.anInt2869 >= local61) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local61], local78, local69, arg3); + } + if (local161 >= TextureOp29.anInt5773) { + ArrayUtils.fillRange(TextureOp29SubOp4.anIntArrayArray10[local161], local78, local69, arg3); + } + } + } + } + } + } + + @OriginalMember(owner = "client!ug", name = "a", descriptor = "(II)V") + public static void method4278(@OriginalArg(0) int arg0) { + if (anIntArray522 == null || anIntArray522.length < arg0) { + anIntArray522 = new int[arg0]; + } + } + @OriginalMember(owner = "client!kc", name = "c", descriptor = "(III)V") @Override public final void method4013(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { @@ -56,6 +388,6 @@ public final class TextureOp29SubOp2 extends TextureOp29SubOp { @Pc(23) int local23 = this.anInt3168 * arg0 >> 12; @Pc(30) int local30 = this.anInt3163 * arg0 >> 12; @Pc(37) int local37 = this.anInt3159 * arg1 >> 12; - Static74.method1623(this.anInt5231, local6, local30, local23, this.anInt5229, this.anInt5228, local37); + method1623(this.anInt5231, local6, local30, local23, this.anInt5229, this.anInt5228, local37); } } diff --git a/client/src/main/java/rt4/TextureOp29SubOp4.java b/client/src/main/java/rt4/TextureOp29SubOp4.java index 07365ce..3ea0cec 100644 --- a/client/src/main/java/rt4/TextureOp29SubOp4.java +++ b/client/src/main/java/rt4/TextureOp29SubOp4.java @@ -10,6 +10,7 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @OriginalMember(owner = "client!fk", name = "j", descriptor = "[[I") public static int[][] anIntArrayArray10; + @OriginalMember(owner = "client!ta", name = "D", descriptor = "I") private final int anInt5247; @@ -46,43 +47,43 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @Pc(13) int local13 = arg4 + arg6; @Pc(15) int local15; for (local15 = arg1; local15 < local9; local15++) { - method2576(anIntArrayArray10[local15], arg6, arg5, arg0); + ArrayUtils.fillRange(anIntArrayArray10[local15], arg6, arg5, arg0); } @Pc(34) int local34 = arg2 - arg4; @Pc(39) int local39 = arg5 - arg4; for (local15 = arg2; local15 > local34; local15--) { - method2576(anIntArrayArray10[local15], arg6, arg5, arg0); + ArrayUtils.fillRange(anIntArrayArray10[local15], arg6, arg5, arg0); } for (local15 = local9; local15 <= local34; local15++) { @Pc(72) int[] local72 = anIntArrayArray10[local15]; - method2576(local72, arg6, local13, arg0); - method2576(local72, local13, local39, arg3); - method2576(local72, local39, arg5, arg0); + ArrayUtils.fillRange(local72, arg6, local13, arg0); + ArrayUtils.fillRange(local72, local13, local39, arg3); + ArrayUtils.fillRange(local72, local39, arg5, arg0); } } @OriginalMember(owner = "client!tl", name = "a", descriptor = "(IIIIIIII)V") public static void method4222(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - @Pc(11) int local11 = Static231.method1690(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); - @Pc(17) int local17 = Static231.method1690(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); - @Pc(23) int local23 = Static231.method1690(TextureOp29.anInt5063, arg6, TextureOp29.anInt4164); - @Pc(29) int local29 = Static231.method1690(TextureOp29.anInt5063, arg0, TextureOp29.anInt4164); - @Pc(37) int local37 = Static231.method1690(TextureOp29.anInt2869, arg3 + arg5, TextureOp29.anInt5773); - @Pc(46) int local46 = Static231.method1690(TextureOp29.anInt2869, arg2 - arg3, TextureOp29.anInt5773); + @Pc(11) int local11 = IntUtils.clamp(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); + @Pc(17) int local17 = IntUtils.clamp(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); + @Pc(23) int local23 = IntUtils.clamp(TextureOp29.anInt5063, arg6, TextureOp29.anInt4164); + @Pc(29) int local29 = IntUtils.clamp(TextureOp29.anInt5063, arg0, TextureOp29.anInt4164); + @Pc(37) int local37 = IntUtils.clamp(TextureOp29.anInt2869, arg3 + arg5, TextureOp29.anInt5773); + @Pc(46) int local46 = IntUtils.clamp(TextureOp29.anInt2869, arg2 - arg3, TextureOp29.anInt5773); @Pc(48) int local48; for (local48 = local11; local48 < local37; local48++) { - method2576(anIntArrayArray10[local48], local23, local29, arg4); + ArrayUtils.fillRange(anIntArrayArray10[local48], local23, local29, arg4); } for (local48 = local17; local48 > local46; local48--) { - method2576(anIntArrayArray10[local48], local23, local29, arg4); + ArrayUtils.fillRange(anIntArrayArray10[local48], local23, local29, arg4); } - @Pc(94) int local94 = Static231.method1690(TextureOp29.anInt5063, arg3 + arg6, TextureOp29.anInt4164); - @Pc(103) int local103 = Static231.method1690(TextureOp29.anInt5063, arg0 - arg3, TextureOp29.anInt4164); + @Pc(94) int local94 = IntUtils.clamp(TextureOp29.anInt5063, arg3 + arg6, TextureOp29.anInt4164); + @Pc(103) int local103 = IntUtils.clamp(TextureOp29.anInt5063, arg0 - arg3, TextureOp29.anInt4164); for (local48 = local37; local48 <= local46; local48++) { @Pc(122) int[] local122 = anIntArrayArray10[local48]; - method2576(local122, local23, local94, arg4); - method2576(local122, local94, local103, arg1); - method2576(local122, local103, local29, arg4); + ArrayUtils.fillRange(local122, local23, local94, arg4); + ArrayUtils.fillRange(local122, local94, local103, arg1); + ArrayUtils.fillRange(local122, local103, local29, arg4); } } @@ -98,47 +99,18 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IIIIII)V") public static void method3308(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { for (@Pc(8) int local8 = arg2; local8 <= arg0; local8++) { - method2576(anIntArrayArray10[local8], arg3, arg1, arg4); - } - } - - @OriginalMember(owner = "client!kd", name = "a", descriptor = "([IIIII)V") - public static void method2576(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - arg1--; - @Pc(14) int local14 = arg2 - 1; - @Pc(17) int local17 = local14 - 7; - while (local17 > arg1) { - @Pc(22) int local22 = arg1 + 1; - arg0[local22] = arg3; - @Pc(27) int local27 = local22 + 1; - arg0[local27] = arg3; - @Pc(32) int local32 = local27 + 1; - arg0[local32] = arg3; - @Pc(37) int local37 = local32 + 1; - arg0[local37] = arg3; - @Pc(42) int local42 = local37 + 1; - arg0[local42] = arg3; - @Pc(47) int local47 = local42 + 1; - arg0[local47] = arg3; - @Pc(52) int local52 = local47 + 1; - arg0[local52] = arg3; - arg1 = local52 + 1; - arg0[arg1] = arg3; - } - while (local14 > arg1) { - arg1++; - arg0[arg1] = arg3; + ArrayUtils.fillRange(anIntArrayArray10[local8], arg3, arg1, arg4); } } @OriginalMember(owner = "client!n", name = "a", descriptor = "(IIIIII)V") public static void method3105(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(11) int local11 = Static231.method1690(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); - @Pc(17) int local17 = Static231.method1690(TextureOp29.anInt2869, arg4, TextureOp29.anInt5773); - @Pc(23) int local23 = Static231.method1690(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); - @Pc(35) int local35 = Static231.method1690(TextureOp29.anInt5063, arg1, TextureOp29.anInt4164); + @Pc(11) int local11 = IntUtils.clamp(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); + @Pc(17) int local17 = IntUtils.clamp(TextureOp29.anInt2869, arg4, TextureOp29.anInt5773); + @Pc(23) int local23 = IntUtils.clamp(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); + @Pc(35) int local35 = IntUtils.clamp(TextureOp29.anInt5063, arg1, TextureOp29.anInt4164); for (@Pc(37) int local37 = local11; local37 <= local17; local37++) { - method2576(anIntArrayArray10[local37], local23, local35, arg0); + ArrayUtils.fillRange(anIntArrayArray10[local37], local23, local35, arg0); } } @@ -150,7 +122,7 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @OriginalMember(owner = "client!dm", name = "a", descriptor = "(IBIII)V") public static void method1206(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { @Pc(15) int local15 = 0; - method2576(anIntArrayArray10[arg3], arg0 - arg1, arg0 - -arg1, arg2); + ArrayUtils.fillRange(anIntArrayArray10[arg3], arg0 - arg1, arg0 - -arg1, arg2); @Pc(32) int local32 = -arg1; @Pc(34) int local34 = arg1; @Pc(36) int local36 = -1; @@ -165,15 +137,228 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @Pc(71) int[] local71 = anIntArrayArray10[arg3 - local34]; @Pc(76) int local76 = arg0 + local15; @Pc(81) int local81 = arg0 - local15; - method2576(local65, local81, local76, arg2); - method2576(local71, local81, local76, arg2); + ArrayUtils.fillRange(local65, local81, local76, arg2); + ArrayUtils.fillRange(local71, local81, local76, arg2); } @Pc(97) int local97 = local34 + arg0; @Pc(102) int local102 = arg0 - local34; @Pc(109) int[] local109 = anIntArrayArray10[arg3 + local15]; @Pc(116) int[] local116 = anIntArrayArray10[arg3 - local15]; - method2576(local109, local102, local97, arg2); - method2576(local116, local102, local97, arg2); + ArrayUtils.fillRange(local109, local102, local97, arg2); + ArrayUtils.fillRange(local116, local102, local97, arg2); + } + } + + @OriginalMember(owner = "client!sa", name = "a", descriptor = "(IIIBI)V") + public static void method3826(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { + if (arg3 <= arg2) { + ArrayUtils.fillRange(anIntArrayArray10[arg1], arg3, arg2, arg0); + } else { + ArrayUtils.fillRange(anIntArrayArray10[arg1], arg2, arg3, arg0); + } + } + + @OriginalMember(owner = "client!hm", name = "a", descriptor = "(IIIII)V") + public static void method2054(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + @Pc(8) int local8; + if (arg0 <= arg2) { + for (local8 = arg0; local8 < arg2; local8++) { + anIntArrayArray10[local8][arg1] = arg3; + } + } else { + for (local8 = arg2; local8 < arg0; local8++) { + anIntArrayArray10[local8][arg1] = arg3; + } + } + } + + @OriginalMember(owner = "client!th", name = "a", descriptor = "(BIIIII)V") + public static void method4547(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { + @Pc(9) int local9 = arg1 - arg2; + @Pc(14) int local14 = arg3 - arg4; + if (local14 == 0) { + if (local9 != 0) { + method2054(arg2, arg4, arg1, arg0); + } + } else if (local9 == 0) { + method3826(arg0, arg2, arg3, arg4); + } else { + if (local9 < 0) { + local9 = -local9; + } + if (local14 < 0) { + local14 = -local14; + } + @Pc(70) boolean local70 = local14 < local9; + @Pc(74) int local74; + @Pc(78) int local78; + if (local70) { + local74 = arg4; + arg4 = arg2; + local78 = arg3; + arg2 = local74; + arg3 = arg1; + arg1 = local78; + } + if (arg3 < arg4) { + local74 = arg4; + arg4 = arg3; + arg3 = local74; + local78 = arg2; + arg2 = arg1; + arg1 = local78; + } + local74 = arg2; + local78 = arg3 - arg4; + @Pc(111) int local111 = arg1 - arg2; + @Pc(116) int local116 = -(local78 >> 1); + @Pc(123) int local123 = arg1 <= arg2 ? -1 : 1; + if (local111 < 0) { + local111 = -local111; + } + @Pc(136) int local136; + if (local70) { + for (local136 = arg4; local136 <= arg3; local136++) { + anIntArrayArray10[local136][local74] = arg0; + local116 += local111; + if (local116 > 0) { + local74 += local123; + local116 -= local78; + } + } + } else { + for (local136 = arg4; local136 <= arg3; local136++) { + local116 += local111; + anIntArrayArray10[local74][local136] = arg0; + if (local116 > 0) { + local74 += local123; + local116 -= local78; + } + } + } + } + } + + @OriginalMember(owner = "client!ub", name = "a", descriptor = "(IIIIIII)V") + public static void method4244(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { + if (TextureOp29.anInt4164 <= arg1 && TextureOp29.anInt5063 >= arg3 && TextureOp29.anInt5773 <= arg2 && arg4 <= TextureOp29.anInt2869) { + if (arg5 == 1) { + method2622(arg0, arg3, arg2, arg4, arg1); + } else { + method3334(arg3, arg2, arg0, arg4, arg5, arg1); + } + } else if (arg5 == 1) { + method3246(arg0, arg1, arg4, arg3, arg2); + } else { + method352(arg4, arg5, arg3, arg1, arg0, arg2); + } + } + + @OriginalMember(owner = "client!kh", name = "a", descriptor = "(IIIBII)V") + public static void method2622(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { + @Pc(8) int local8 = arg2 + 1; + ArrayUtils.fillRange(anIntArrayArray10[arg2], arg4, arg1, arg0); + @Pc(17) int local17 = arg3 - 1; + ArrayUtils.fillRange(anIntArrayArray10[arg3], arg4, arg1, arg0); + for (@Pc(29) int local29 = local8; local29 <= local17; local29++) { + @Pc(40) int[] local40 = anIntArrayArray10[local29]; + local40[arg4] = local40[arg1] = arg0; + } + } + + @OriginalMember(owner = "client!ok", name = "a", descriptor = "(IIIIIII)V") + public static void method3334(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + @Pc(5) int local5 = arg4 + arg1; + @Pc(14) int local14 = arg3 - arg4; + @Pc(29) int local29 = arg4 + arg5; + @Pc(31) int local31; + for (local31 = arg1; local31 < local5; local31++) { + ArrayUtils.fillRange(anIntArrayArray10[local31], arg5, arg0, arg2); + } + for (local31 = arg3; local31 > local14; local31--) { + ArrayUtils.fillRange(anIntArrayArray10[local31], arg5, arg0, arg2); + } + @Pc(70) int local70 = arg0 - arg4; + for (local31 = local5; local31 <= local14; local31++) { + @Pc(83) int[] local83 = anIntArrayArray10[local31]; + ArrayUtils.fillRange(local83, arg5, local29, arg2); + ArrayUtils.fillRange(local83, local70, arg0, arg2); + } + } + + @OriginalMember(owner = "client!nk", name = "a", descriptor = "(IIIIIB)V") + public static void method3246(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { + if (arg4 > TextureOp29.anInt2869 || arg2 < TextureOp29.anInt5773) { + return; + } + @Pc(24) boolean local24; + if (TextureOp29.anInt4164 > arg1) { + local24 = false; + arg1 = TextureOp29.anInt4164; + } else if (TextureOp29.anInt5063 >= arg1) { + local24 = true; + } else { + local24 = false; + arg1 = TextureOp29.anInt5063; + } + @Pc(43) boolean local43; + if (arg3 < TextureOp29.anInt4164) { + arg3 = TextureOp29.anInt4164; + local43 = false; + } else if (arg3 > TextureOp29.anInt5063) { + arg3 = TextureOp29.anInt5063; + local43 = false; + } else { + local43 = true; + } + if (TextureOp29.anInt5773 > arg4) { + arg4 = TextureOp29.anInt5773; + } else { + ArrayUtils.fillRange(anIntArrayArray10[arg4++], arg1, arg3, arg0); + } + if (arg2 <= TextureOp29.anInt2869) { + ArrayUtils.fillRange(anIntArrayArray10[arg2--], arg1, arg3, arg0); + } else { + arg2 = TextureOp29.anInt2869; + } + @Pc(98) int local98; + if (local24 && local43) { + for (local98 = arg4; local98 <= arg2; local98++) { + @Pc(105) int[] local105 = anIntArrayArray10[local98]; + local105[arg1] = local105[arg3] = arg0; + } + } else if (local24) { + for (local98 = arg4; local98 <= arg2; local98++) { + anIntArrayArray10[local98][arg1] = arg0; + } + } else if (local43) { + for (local98 = arg4; local98 <= arg2; local98++) { + anIntArrayArray10[local98][arg3] = arg0; + } + } + } + + @OriginalMember(owner = "client!an", name = "a", descriptor = "(IIIIIII)V") + public static void method352(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { + @Pc(11) int local11 = IntUtils.clamp(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); + @Pc(17) int local17 = IntUtils.clamp(TextureOp29.anInt2869, arg0, TextureOp29.anInt5773); + @Pc(23) int local23 = IntUtils.clamp(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); + @Pc(29) int local29 = IntUtils.clamp(TextureOp29.anInt5063, arg2, TextureOp29.anInt4164); + @Pc(42) int local42 = IntUtils.clamp(TextureOp29.anInt2869, arg5 + arg1, TextureOp29.anInt5773); + @Pc(51) int local51 = IntUtils.clamp(TextureOp29.anInt2869, arg0 - arg1, TextureOp29.anInt5773); + @Pc(53) int local53; + for (local53 = local11; local53 < local42; local53++) { + ArrayUtils.fillRange(anIntArrayArray10[local53], local23, local29, arg4); + } + for (local53 = local17; local53 > local51; local53--) { + ArrayUtils.fillRange(anIntArrayArray10[local53], local23, local29, arg4); + } + @Pc(95) int local95 = IntUtils.clamp(TextureOp29.anInt5063, arg1 + arg3, TextureOp29.anInt4164); + @Pc(104) int local104 = IntUtils.clamp(TextureOp29.anInt5063, arg2 - arg1, TextureOp29.anInt4164); + for (local53 = local42; local53 <= local51; local53++) { + @Pc(117) int[] local117 = anIntArrayArray10[local53]; + ArrayUtils.fillRange(local117, local23, local95, arg4); + ArrayUtils.fillRange(local117, local104, local29, arg4); } } @@ -184,7 +369,7 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @Pc(17) int local17 = this.anInt5244 * arg0 >> 12; @Pc(24) int local24 = this.anInt5246 * arg1 >> 12; @Pc(31) int local31 = this.anInt5247 * arg0 >> 12; - Static247.method4244(this.anInt5229, local24, local31, local10, local17, this.anInt5231); + method4244(this.anInt5229, local24, local31, local10, local17, this.anInt5231); } @OriginalMember(owner = "client!ta", name = "c", descriptor = "(III)V") diff --git a/client/src/main/java/rt4/WorldList.java b/client/src/main/java/rt4/WorldList.java index 1a18730..daa4c0f 100644 --- a/client/src/main/java/rt4/WorldList.java +++ b/client/src/main/java/rt4/WorldList.java @@ -8,6 +8,28 @@ import java.io.IOException; import java.net.Socket; public class WorldList { + @OriginalMember(owner = "client!nd", name = "x", descriptor = "Lclient!na;") + public static final JagString aClass100_783 = JagString.parse(")4p="); + @OriginalMember(owner = "client!ja", name = "s", descriptor = "Lclient!na;") + public static final JagString HTTP_PROTOCOL = JagString.parse("http:)4)4"); + @OriginalMember(owner = "client!wk", name = "x", descriptor = "Lclient!na;") + public static final JagString aClass100_1107 = JagString.parse(")4l="); + @OriginalMember(owner = "client!rc", name = "G", descriptor = "Lclient!na;") + public static final JagString aClass100_230 = JagString.parse(""); + @OriginalMember(owner = "client!ob", name = "o", descriptor = "Lclient!na;") + public static final JagString aClass100_801 = JagString.parse(")4a="); + @OriginalMember(owner = "client!l", name = "d", descriptor = "Lclient!na;") + public static final JagString aClass100_659 = JagString.parse(")4j"); + @OriginalMember(owner = "client!cg", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_184 = JagString.parse("1"); + @OriginalMember(owner = "client!vd", name = "F", descriptor = "Lclient!na;") + public static final JagString aClass100_945 = JagString.parse("0"); + @OriginalMember(owner = "client!em", name = "u", descriptor = "Lclient!na;") + public static final JagString aClass100_420 = JagString.parse(")1o"); + @OriginalMember(owner = "client!q", name = "a", descriptor = "Lclient!na;") + public static final JagString aClass100_260 = JagString.parse(")1a2)1m"); + @OriginalMember(owner = "client!ch", name = "x", descriptor = "Lclient!na;") + public static final JagString aClass100_193 = JagString.parse(":"); @OriginalMember(owner = "client!gi", name = "c", descriptor = "I") public static int step = 0; @OriginalMember(owner = "client!be", name = "kc", descriptor = "J") @@ -260,4 +282,38 @@ public class WorldList { worldPos = 0; return getNextWorld(); } + + @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IB)Z") + public static boolean hopWorld(@OriginalArg(0) int arg0) { + @Pc(3) World local3 = ScriptRunner.getWorld(arg0); + if (local3 == null) { + return false; + } else if (SignLink.anInt5928 == 1 || SignLink.anInt5928 == 2 || client.modeWhere == 2) { + @Pc(31) byte[] local31 = local3.hostname.method3148(); + client.hostname = new String(local31, 0, local31.length); + Player.worldId = local3.id; + if (client.modeWhere != 0) { + client.defaultPort = Player.worldId + 43594; // 40000; + client.port = client.defaultPort; + client.alternatePort = Player.worldId + 43594; // 50000; + } + return true; + } else { + @Pc(62) JagString local62 = aClass100_230; + if (client.modeWhere != 0) { + local62 = JagString.concatenate(new JagString[]{aClass100_193, JagString.parseInt(local3.id + 7000)}); + } + @Pc(89) JagString local89 = aClass100_230; + if (client.settings != null) { + local89 = JagString.concatenate(new JagString[]{aClass100_783, client.settings}); + } + @Pc(182) JagString local182 = JagString.concatenate(new JagString[]{HTTP_PROTOCOL, local3.hostname, local62, aClass100_1107, JagString.parseInt(client.language), aClass100_801, JagString.parseInt(client.affiliate), local89, aClass100_659, client.objectTag ? aClass100_184 : aClass100_945, aClass100_420, client.javaScript ? aClass100_184 : aClass100_945, aClass100_260, client.advertSuppressed ? aClass100_184 : aClass100_945}); + try { + client.instance.getAppletContext().showDocument(local182.method3107(), "_self"); + return true; + } catch (@Pc(191) Exception local191) { + return false; + } + } + } } diff --git a/client/src/main/java/rt4/WorldMap.java b/client/src/main/java/rt4/WorldMap.java index 90d73e0..0f91606 100644 --- a/client/src/main/java/rt4/WorldMap.java +++ b/client/src/main/java/rt4/WorldMap.java @@ -27,6 +27,8 @@ public class WorldMap { public static final JagString aClass100_538 = JagString.parse(" "); @OriginalMember(owner = "client!pm", name = "Y", descriptor = "Lclient!na;") public static final JagString aClass100_872 = JagString.parse("
"); + @OriginalMember(owner = "client!nj", name = "h", descriptor = "Lclient!ih;") + public static final LinkedList aClass69_97 = new LinkedList(); @OriginalMember(owner = "client!wa", name = "ub", descriptor = "Lclient!bn;") public static Map currentMap; @OriginalMember(owner = "client!dc", name = "O", descriptor = "I") @@ -153,8 +155,8 @@ public class WorldMap { anInt435 = local153; anInt919 = local177; } else { - anInt919 = originZ + length - currentMap.anInt764 * 64 - 1; - anInt435 = currentMap.anInt769 * 64 - originX; + anInt919 = originZ + length - currentMap.originZ * 64 - 1; + anInt435 = currentMap.originX * 64 - originX; } method965(); @@ -666,8 +668,8 @@ public class WorldMap { local270 = local32 + arg5 & 0x3F; local276 = (local260 << 6) + local270; if (angle < 0 || local185.length - 1 < angle || local185[angle] == null) { - if (currentMap.anInt759 != -1) { - local312 = currentMap.anInt759; + if (currentMap.backgroundColor != -1) { + local312 = currentMap.backgroundColor; } else if ((local211 + arg2 & 0x4) == (arg5 + local32 & 0x4)) { local312 = overlayColors[FloType.anInt865 + 1]; } else { @@ -783,8 +785,8 @@ public class WorldMap { } else { local47 += arg4; for (@Pc(90) int local90 = 0; local90 < local14; local90++) { - if (currentMap.anInt759 != -1) { - local104 = currentMap.anInt759; + if (currentMap.backgroundColor != -1) { + local104 = currentMap.backgroundColor; } else if ((local32 + arg5 & 0x4) == (local90 + arg2 & 0x4)) { local104 = overlayColors[FloType.anInt865 + 1]; } else { @@ -1038,7 +1040,7 @@ public class WorldMap { } @OriginalMember(owner = "client!rg", name = "d", descriptor = "(B)Lclient!bn;") - public static Map method4361() { + public static Map getCurrentMap() { return currentMap; } @@ -1727,7 +1729,7 @@ public class WorldMap { local243.anInt4307 = local65; local243.anInt4314 = local144; local243.id = local222.mapElement; - Static232.aClass69_97.addTail(local243); + aClass69_97.addTail(local243); } else { MapList.sprites[local222.mapElement].render(local65 - 7, local144 + -7); } @@ -1739,14 +1741,14 @@ public class WorldMap { } } } - for (@Pc(285) MapElement local285 = (MapElement) Static232.aClass69_97.head(); local285 != null; local285 = (MapElement) Static232.aClass69_97.next()) { + for (@Pc(285) MapElement local285 = (MapElement) aClass69_97.head(); local285 != null; local285 = (MapElement) aClass69_97.next()) { SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 15, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 13, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 11, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 9, local11); MapList.sprites[local285.id].render(local285.anInt4307 - 7, local285.anInt4314 + -7); } - Static232.aClass69_97.clear(); + aClass69_97.clear(); } @OriginalMember(owner = "client!fi", name = "a", descriptor = "(III)V") diff --git a/client/src/main/java/rt4/client.java b/client/src/main/java/rt4/client.java index 704840b..af5ef1d 100644 --- a/client/src/main/java/rt4/client.java +++ b/client/src/main/java/rt4/client.java @@ -32,6 +32,8 @@ public final class client extends GameShell { public static final JagString LOGINSCREEN = JagString.parse("loginscreen"); @OriginalMember(owner = "client!qk", name = "a", descriptor = "Lclient!na;") public static final JagString aClass100_899 = JagString.parse("0(U"); + @OriginalMember(owner = "client!uh", name = "Y", descriptor = "Lclient!na;") + public static final JagString HUFFMAN_GROUP = JagString.parse("huffman"); @OriginalMember(owner = "client!jm", name = "A", descriptor = "Lclient!na;") static final JagString aClass100_603 = JagString.parse(""); @OriginalMember(owner = "client!jm", name = "z", descriptor = "Lclient!na;") @@ -517,7 +519,7 @@ public final class client extends GameShell { Mouse.prevClickTime = 0L; MouseRecorder.instance.samples = 0; focus = true; - ReflectionCheck.method4625(); + ReflectionCheck.clear(); Protocol.opcode4 = -1; Protocol.opcode3 = -1; Protocol.opcode = -1; @@ -580,7 +582,7 @@ public final class client extends GameShell { Camera.anInt5230 = 0; Static233.anInt5217 = 0; Camera.anInt5765 = 0; - Static231.anInt5203 = 0; + Camera.anInt5203 = 0; Camera.anInt4232 = 0; Camera.anInt5375 = 0; Camera.anInt1744 = 0; @@ -718,7 +720,7 @@ public final class client extends GameShell { } else if (gameState == 5) { LoadingBar.render(false, Fonts.b12Full); } else if (gameState == 10) { - Static126.method2460(); + InterfaceList.method2460(); } else if (gameState == 25 || gameState == 28) { if (LoginManager.loadingScreenState == 1) { if (anInt5150 < LoginManager.mapFilesMissingCount) { @@ -1063,7 +1065,7 @@ public final class client extends GameShell { @Pc(379) Component prioritySource; @Pc(387) Component priorityComponent; do { - priorityRequest = (HookRequest) Static4.highPriorityRequests.removeHead(); + priorityRequest = (HookRequest) InterfaceList.highPriorityRequests.removeHead(); if (priorityRequest == null) { while (true) { do { @@ -1076,13 +1078,13 @@ public final class client extends GameShell { if (Static40.aClass13_14 != null) { ClientProt.method28(); } - if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { - if (Static33.openUrlRequest.result != null) { + if (Protocol.openUrlRequest != null && Protocol.openUrlRequest.status == 1) { + if (Protocol.openUrlRequest.result != null) { ScriptRunner.openUrl(ScriptRunner.url, Static164.newTab); } Static164.newTab = false; ScriptRunner.url = null; - Static33.openUrlRequest = null; + Protocol.openUrlRequest = null; } if (loop % 1500 == 0) { Static123.topBannerRefresh(); @@ -1461,8 +1463,8 @@ public final class client extends GameShell { mainLoadPercentage = 75; mainLoadState = 120; } else if (mainLoadState == 120) { - if (js5Archive10.isFileReady(JagString.EMPTY, Static252.HUFFMAN_GROUP)) { - @Pc(1060) HuffmanCodec codec = new HuffmanCodec(js5Archive10.fetchFile(JagString.EMPTY, Static252.HUFFMAN_GROUP)); + if (js5Archive10.isFileReady(JagString.EMPTY, HUFFMAN_GROUP)) { + @Pc(1060) HuffmanCodec codec = new HuffmanCodec(js5Archive10.fetchFile(JagString.EMPTY, HUFFMAN_GROUP)); WordPack.init(codec); mainLoadSecondaryText = LocalizedText.MAINLOAD120B; mainLoadState = 130;