diff --git a/client/src/main/java/rt4/AnimFrameset.java b/client/src/main/java/rt4/AnimFrameset.java index a8ccb94..417825d 100644 --- a/client/src/main/java/rt4/AnimFrameset.java +++ b/client/src/main/java/rt4/AnimFrameset.java @@ -38,34 +38,34 @@ public final class AnimFrameset extends SecondaryNode { } } - @OriginalMember(owner = "client!gn", name = "a", descriptor = "(Lclient!ve;ZLclient!ve;BI)Lclient!cl;") - public static AnimFrameset create(@OriginalArg(0) Js5 animsArchive, @OriginalArg(2) Js5 basesArchive, @OriginalArg(4) int id) { - @Pc(5) boolean ready = true; - @Pc(16) int[] fileIds = animsArchive.getFileIds(id); - for (@Pc(18) int i = 0; i < fileIds.length; i++) { - @Pc(30) byte[] bytes = animsArchive.fetchFileNoDiscard(fileIds[i], id); - if (bytes == null) { - ready = false; - } else { - @Pc(49) int baseId = (bytes[0] & 0xFF) << 8 | bytes[1] & 0xFF; - @Pc(57) byte[] baseBytes = basesArchive.fetchFileNoDiscard(0, baseId); - if (baseBytes == null) { - ready = false; - } - } - } - if (!ready) { - return null; - } - try { - return new AnimFrameset(animsArchive, basesArchive, id, false); - } catch (@Pc(84) Exception ex) { + @OriginalMember(owner = "client!gn", name = "a", descriptor = "(Lclient!ve;ZLclient!ve;BI)Lclient!cl;") + public static AnimFrameset create(@OriginalArg(0) Js5 animsArchive, @OriginalArg(2) Js5 basesArchive, @OriginalArg(4) int id) { + @Pc(5) boolean ready = true; + @Pc(16) int[] fileIds = animsArchive.getFileIds(id); + for (@Pc(18) int i = 0; i < fileIds.length; i++) { + @Pc(30) byte[] bytes = animsArchive.fetchFileNoDiscard(fileIds[i], id); + if (bytes == null) { + ready = false; + } else { + @Pc(49) int baseId = (bytes[0] & 0xFF) << 8 | bytes[1] & 0xFF; + @Pc(57) byte[] baseBytes = basesArchive.fetchFileNoDiscard(0, baseId); + if (baseBytes == null) { + ready = false; + } + } + } + if (!ready) { + return null; + } + try { + return new AnimFrameset(animsArchive, basesArchive, id, false); + } catch (@Pc(84) Exception ex) { ex.printStackTrace(); - return null; - } - } + return null; + } + } - @OriginalMember(owner = "client!cl", name = "c", descriptor = "(II)Z") + @OriginalMember(owner = "client!cl", name = "c", descriptor = "(II)Z") public final boolean isAlphaTransformed(@OriginalArg(1) int frame) { return this.frames[frame].transformsAlpha; } diff --git a/client/src/main/java/rt4/AreaSoundManager.java b/client/src/main/java/rt4/AreaSoundManager.java index 7654c43..e38be55 100644 --- a/client/src/main/java/rt4/AreaSoundManager.java +++ b/client/src/main/java/rt4/AreaSoundManager.java @@ -5,286 +5,286 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class AreaSoundManager { - @OriginalMember(owner = "client!he", name = "ab", descriptor = "Lclient!sc;") - public static final HashTable playerSounds = new HashTable(16); + @OriginalMember(owner = "client!he", name = "ab", descriptor = "Lclient!sc;") + public static final HashTable playerSounds = new HashTable(16); - @OriginalMember(owner = "client!ab", name = "n", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!ab", name = "n", descriptor = "Lclient!ih;") public static final LinkedList locSounds = new LinkedList(); - @OriginalMember(owner = "client!ma", name = "x", descriptor = "Lclient!ih;") - public static final LinkedList npcSounds = new LinkedList(); + @OriginalMember(owner = "client!ma", name = "x", descriptor = "Lclient!ih;") + public static final LinkedList npcSounds = new LinkedList(); - @OriginalMember(owner = "client!wc", name = "a", descriptor = "(Lclient!e;I)V") - public static void remove(@OriginalArg(0) Player player) { - @Pc(10) AreaSound areaSound = (AreaSound) playerSounds.get(player.username.encode37()); - if (areaSound == null) { - return; - } - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.unlink(); - } + @OriginalMember(owner = "client!wc", name = "a", descriptor = "(Lclient!e;I)V") + public static void remove(@OriginalArg(0) Player player) { + @Pc(10) AreaSound areaSound = (AreaSound) playerSounds.get(player.username.encode37()); + if (areaSound == null) { + return; + } + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.unlink(); + } - @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IZLclient!pb;ILclient!km;IILclient!e;)V") - public static void add(@OriginalArg(0) int z, @OriginalArg(2) LocType loc, @OriginalArg(3) int arg2, @OriginalArg(4) Npc npc, @OriginalArg(5) int x, @OriginalArg(6) int level, @OriginalArg(7) Player player) { - @Pc(13) AreaSound sound = new AreaSound(); - sound.minZFine = z * 128; - sound.minXFine = x * 128; - sound.level = level; - if (loc != null) { - sound.sounds = loc.anIntArray381; - sound.radius = loc.soundRadius * 128; - sound.maxInterval = loc.anInt4414; - sound.locType = loc; - sound.sound = loc.sound; - sound.minInterval = loc.anInt4419; - @Pc(57) int local57 = loc.width; - @Pc(60) int local60 = loc.length; - if (arg2 == 1 || arg2 == 3) { - local57 = loc.length; - local60 = loc.width; - } - sound.maxZFine = (local60 + z) * 128; - sound.maxXFine = (x + local57) * 128; - if (loc.multiLocs != null) { - sound.multiLocOrNpc = true; - sound.update(); - } - if (sound.sounds != null) { - sound.remainingLoops = sound.minInterval + (int) (Math.random() * (double) (sound.maxInterval - sound.minInterval)); - } - locSounds.addTail(sound); - } else if (npc != null) { - sound.npc = npc; - @Pc(138) NpcType npcType = npc.type; - if (npcType.multiNpcs != null) { - sound.multiLocOrNpc = true; - npcType = npcType.getMultiNpc(); - } - if (npcType != null) { - sound.maxZFine = (npcType.size + z) * 128; - sound.maxXFine = (npcType.size + x) * 128; - sound.sound = Npc.getSound(npc); - sound.radius = npcType.soundRadius * 128; - } - npcSounds.addTail(sound); - } else if (player != null) { - sound.player = player; - sound.maxXFine = (player.getSize() + x) * 128; - sound.maxZFine = (player.getSize() + z) * 128; - sound.sound = Player.getSound(player); - sound.radius = player.soundRadius * 128; - playerSounds.put(sound, player.username.encode37()); - } - } + @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IZLclient!pb;ILclient!km;IILclient!e;)V") + public static void add(@OriginalArg(0) int z, @OriginalArg(2) LocType loc, @OriginalArg(3) int arg2, @OriginalArg(4) Npc npc, @OriginalArg(5) int x, @OriginalArg(6) int level, @OriginalArg(7) Player player) { + @Pc(13) AreaSound sound = new AreaSound(); + sound.minZFine = z * 128; + sound.minXFine = x * 128; + sound.level = level; + if (loc != null) { + sound.sounds = loc.anIntArray381; + sound.radius = loc.soundRadius * 128; + sound.maxInterval = loc.anInt4414; + sound.locType = loc; + sound.sound = loc.sound; + sound.minInterval = loc.anInt4419; + @Pc(57) int local57 = loc.width; + @Pc(60) int local60 = loc.length; + if (arg2 == 1 || arg2 == 3) { + local57 = loc.length; + local60 = loc.width; + } + sound.maxZFine = (local60 + z) * 128; + sound.maxXFine = (x + local57) * 128; + if (loc.multiLocs != null) { + sound.multiLocOrNpc = true; + sound.update(); + } + if (sound.sounds != null) { + sound.remainingLoops = sound.minInterval + (int) (Math.random() * (double) (sound.maxInterval - sound.minInterval)); + } + locSounds.addTail(sound); + } else if (npc != null) { + sound.npc = npc; + @Pc(138) NpcType npcType = npc.type; + if (npcType.multiNpcs != null) { + sound.multiLocOrNpc = true; + npcType = npcType.getMultiNpc(); + } + if (npcType != null) { + sound.maxZFine = (npcType.size + z) * 128; + sound.maxXFine = (npcType.size + x) * 128; + sound.sound = Npc.getSound(npc); + sound.radius = npcType.soundRadius * 128; + } + npcSounds.addTail(sound); + } else if (player != null) { + sound.player = player; + sound.maxXFine = (player.getSize() + x) * 128; + sound.maxZFine = (player.getSize() + z) * 128; + sound.sound = Player.getSound(player); + sound.radius = player.soundRadius * 128; + playerSounds.put(sound, player.username.encode37()); + } + } - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!km;Z)V") - public static void remove(@OriginalArg(0) Npc npc) { - for (@Pc(13) AreaSound areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { - if (npc == areaSound.npc) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.unlink(); - return; - } - } - } + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!km;Z)V") + public static void remove(@OriginalArg(0) Npc npc) { + for (@Pc(13) AreaSound areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { + if (npc == areaSound.npc) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.unlink(); + return; + } + } + } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(IIIII)V") - public static void redraw(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - @Pc(6) AreaSound areaSound; - for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { - redraw(arg1, areaSound, arg3, arg0, arg2); - } - @Pc(37) byte movementSpeed; - @Pc(42) BasType basType; - @Pc(141) int sound; - for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { - movementSpeed = 1; - basType = areaSound.npc.getBasType(); - if (basType.idleAnimationId == areaSound.npc.movementSeqId) { - movementSpeed = 0; - } else if (basType.runAnimationId == areaSound.npc.movementSeqId || basType.runAnimationId2 == areaSound.npc.movementSeqId || basType.runAnimationId4 == areaSound.npc.movementSeqId || basType.runAnimationId3 == areaSound.npc.movementSeqId) { - movementSpeed = 2; - } else if (basType.anInt1062 == areaSound.npc.movementSeqId || basType.anInt1042 == areaSound.npc.movementSeqId || areaSound.npc.movementSeqId == basType.anInt1048 || basType.anInt1066 == areaSound.npc.movementSeqId) { - movementSpeed = 3; - } - if (areaSound.movementSpeed != movementSpeed) { - sound = Npc.getSound(areaSound.npc); - if (sound != areaSound.sound) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.sound = sound; - } - areaSound.movementSpeed = movementSpeed; - } - areaSound.minXFine = areaSound.npc.xFine; - areaSound.maxXFine = areaSound.npc.xFine + areaSound.npc.getSize() * 64; - areaSound.minZFine = areaSound.npc.zFine; - areaSound.maxZFine = areaSound.npc.zFine + areaSound.npc.getSize() * 64; - redraw(arg1, areaSound, arg3, arg0, arg2); - } - for (areaSound = (AreaSound) playerSounds.head(); areaSound != null; areaSound = (AreaSound) playerSounds.next()) { - movementSpeed = 1; - basType = areaSound.player.getBasType(); - if (areaSound.player.movementSeqId == basType.idleAnimationId) { - movementSpeed = 0; - } else if (areaSound.player.movementSeqId == basType.runAnimationId || areaSound.player.movementSeqId == basType.runAnimationId2 || areaSound.player.movementSeqId == basType.runAnimationId4 || basType.runAnimationId3 == areaSound.player.movementSeqId) { - movementSpeed = 2; - } else if (basType.anInt1062 == areaSound.player.movementSeqId || areaSound.player.movementSeqId == basType.anInt1042 || areaSound.player.movementSeqId == basType.anInt1048 || areaSound.player.movementSeqId == basType.anInt1066) { - movementSpeed = 3; - } - if (areaSound.movementSpeed != movementSpeed) { - sound = Player.getSound(areaSound.player); - if (areaSound.sound != sound) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.sound = sound; - } - areaSound.movementSpeed = movementSpeed; - } - areaSound.minXFine = areaSound.player.xFine; - areaSound.maxXFine = areaSound.player.xFine + areaSound.player.getSize() * 64; - areaSound.minZFine = areaSound.player.zFine; - areaSound.maxZFine = areaSound.player.zFine + areaSound.player.getSize() * 64; - redraw(arg1, areaSound, arg3, arg0, arg2); - } - } + @OriginalMember(owner = "client!ih", name = "a", descriptor = "(IIIII)V") + public static void redraw(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + @Pc(6) AreaSound areaSound; + for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { + redraw(arg1, areaSound, arg3, arg0, arg2); + } + @Pc(37) byte movementSpeed; + @Pc(42) BasType basType; + @Pc(141) int sound; + for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { + movementSpeed = 1; + basType = areaSound.npc.getBasType(); + if (basType.idleAnimationId == areaSound.npc.movementSeqId) { + movementSpeed = 0; + } else if (basType.runAnimationId == areaSound.npc.movementSeqId || basType.runAnimationId2 == areaSound.npc.movementSeqId || basType.runAnimationId4 == areaSound.npc.movementSeqId || basType.runAnimationId3 == areaSound.npc.movementSeqId) { + movementSpeed = 2; + } else if (basType.anInt1062 == areaSound.npc.movementSeqId || basType.anInt1042 == areaSound.npc.movementSeqId || areaSound.npc.movementSeqId == basType.anInt1048 || basType.anInt1066 == areaSound.npc.movementSeqId) { + movementSpeed = 3; + } + if (areaSound.movementSpeed != movementSpeed) { + sound = Npc.getSound(areaSound.npc); + if (sound != areaSound.sound) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.sound = sound; + } + areaSound.movementSpeed = movementSpeed; + } + areaSound.minXFine = areaSound.npc.xFine; + areaSound.maxXFine = areaSound.npc.xFine + areaSound.npc.getSize() * 64; + areaSound.minZFine = areaSound.npc.zFine; + areaSound.maxZFine = areaSound.npc.zFine + areaSound.npc.getSize() * 64; + redraw(arg1, areaSound, arg3, arg0, arg2); + } + for (areaSound = (AreaSound) playerSounds.head(); areaSound != null; areaSound = (AreaSound) playerSounds.next()) { + movementSpeed = 1; + basType = areaSound.player.getBasType(); + if (areaSound.player.movementSeqId == basType.idleAnimationId) { + movementSpeed = 0; + } else if (areaSound.player.movementSeqId == basType.runAnimationId || areaSound.player.movementSeqId == basType.runAnimationId2 || areaSound.player.movementSeqId == basType.runAnimationId4 || basType.runAnimationId3 == areaSound.player.movementSeqId) { + movementSpeed = 2; + } else if (basType.anInt1062 == areaSound.player.movementSeqId || areaSound.player.movementSeqId == basType.anInt1042 || areaSound.player.movementSeqId == basType.anInt1048 || areaSound.player.movementSeqId == basType.anInt1066) { + movementSpeed = 3; + } + if (areaSound.movementSpeed != movementSpeed) { + sound = Player.getSound(areaSound.player); + if (areaSound.sound != sound) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.sound = sound; + } + areaSound.movementSpeed = movementSpeed; + } + areaSound.minXFine = areaSound.player.xFine; + areaSound.maxXFine = areaSound.player.xFine + areaSound.player.getSize() * 64; + areaSound.minZFine = areaSound.player.zFine; + areaSound.maxZFine = areaSound.player.zFine + areaSound.player.getSize() * 64; + redraw(arg1, areaSound, arg3, arg0, arg2); + } + } - @OriginalMember(owner = "client!je", name = "k", descriptor = "(I)V") - public static void updateMulti() { - @Pc(6) AreaSound areaSound; - for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { - if (areaSound.multiLocOrNpc) { - areaSound.update(); - } - } - for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { - if (areaSound.multiLocOrNpc) { - areaSound.update(); - } - } - } + @OriginalMember(owner = "client!je", name = "k", descriptor = "(I)V") + public static void updateMulti() { + @Pc(6) AreaSound areaSound; + for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { + if (areaSound.multiLocOrNpc) { + areaSound.update(); + } + } + for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { + if (areaSound.multiLocOrNpc) { + areaSound.update(); + } + } + } - @OriginalMember(owner = "client!ra", name = "a", descriptor = "(ILclient!pb;BII)V") - public static void remove(@OriginalArg(0) int x, @OriginalArg(1) LocType locType, @OriginalArg(3) int z, @OriginalArg(4) int level) { - for (@Pc(10) AreaSound areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { - if (level == areaSound.level && areaSound.minXFine == x * 128 && areaSound.minZFine == z * 128 && locType.id == areaSound.locType.id) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - if (areaSound.secondaryStream != null) { - client.soundStream.removeSubStream(areaSound.secondaryStream); - areaSound.secondaryStream = null; - } - areaSound.unlink(); - return; - } - } - } + @OriginalMember(owner = "client!ra", name = "a", descriptor = "(ILclient!pb;BII)V") + public static void remove(@OriginalArg(0) int x, @OriginalArg(1) LocType locType, @OriginalArg(3) int z, @OriginalArg(4) int level) { + for (@Pc(10) AreaSound areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { + if (level == areaSound.level && areaSound.minXFine == x * 128 && areaSound.minZFine == z * 128 && locType.id == areaSound.locType.id) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + if (areaSound.secondaryStream != null) { + client.soundStream.removeSubStream(areaSound.secondaryStream); + areaSound.secondaryStream = null; + } + areaSound.unlink(); + return; + } + } + } - @OriginalMember(owner = "client!vd", name = "a", descriptor = "(BZ)V") - public static void clear(@OriginalArg(1) boolean pathingEntities) { - @Pc(14) AreaSound areaSound; - for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - if (areaSound.secondaryStream != null) { - client.soundStream.removeSubStream(areaSound.secondaryStream); - areaSound.secondaryStream = null; - } - areaSound.unlink(); - } - if (!pathingEntities) { - return; - } - for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.unlink(); - } - for (areaSound = (AreaSound) playerSounds.head(); areaSound != null; areaSound = (AreaSound) playerSounds.next()) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - areaSound.unlink(); - } - } + @OriginalMember(owner = "client!vd", name = "a", descriptor = "(BZ)V") + public static void clear(@OriginalArg(1) boolean pathingEntities) { + @Pc(14) AreaSound areaSound; + for (areaSound = (AreaSound) locSounds.head(); areaSound != null; areaSound = (AreaSound) locSounds.next()) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + if (areaSound.secondaryStream != null) { + client.soundStream.removeSubStream(areaSound.secondaryStream); + areaSound.secondaryStream = null; + } + areaSound.unlink(); + } + if (!pathingEntities) { + return; + } + for (areaSound = (AreaSound) npcSounds.head(); areaSound != null; areaSound = (AreaSound) npcSounds.next()) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.unlink(); + } + for (areaSound = (AreaSound) playerSounds.head(); areaSound != null; areaSound = (AreaSound) playerSounds.next()) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + areaSound.unlink(); + } + } - @OriginalMember(owner = "client!lk", name = "a", descriptor = "(ILclient!fl;IIII)V") - public static void redraw(@OriginalArg(0) int x, @OriginalArg(1) AreaSound areaSound, @OriginalArg(2) int level, @OriginalArg(3) int loops, @OriginalArg(4) int z) { - if (areaSound.sound == -1 && areaSound.sounds == null) { - return; - } - @Pc(20) int distance = 0; - if (areaSound.maxXFine < x) { - distance = x - areaSound.maxXFine; - } else if (areaSound.minXFine > x) { - distance = areaSound.minXFine - x; - } - if (areaSound.maxZFine < z) { - distance += z - areaSound.maxZFine; - } else if (z < areaSound.minZFine) { - distance += areaSound.minZFine - z; - } - if (areaSound.radius == 0 || areaSound.radius < distance - 64 || Preferences.ambientSoundsVolume == 0 || level != areaSound.level) { - if (areaSound.primaryStream != null) { - client.soundStream.removeSubStream(areaSound.primaryStream); - areaSound.primaryStream = null; - } - if (areaSound.secondaryStream != null) { - client.soundStream.removeSubStream(areaSound.secondaryStream); - areaSound.secondaryStream = null; - } - return; - } - distance -= 64; - if (distance < 0) { - distance = 0; - } - @Pc(134) int volume = (areaSound.radius - distance) * Preferences.ambientSoundsVolume / areaSound.radius; - if (areaSound.primaryStream != null) { - areaSound.primaryStream.setVolume(volume); - } else if (areaSound.sound >= 0) { - @Pc(150) SynthSound synthSound = SynthSound.create(client.js5Archive4, areaSound.sound, 0); - if (synthSound != null) { - @Pc(158) PcmSound pcmSound = synthSound.toPcmSound().resample(client.resampler); - @Pc(163) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); - stream.setLoops(-1); - client.soundStream.addSubStream(stream); - areaSound.primaryStream = stream; - } - } - if (areaSound.secondaryStream != null) { - areaSound.secondaryStream.setVolume(volume); - if (!areaSound.secondaryStream.isLinked()) { - areaSound.secondaryStream = null; - } - } else if (areaSound.sounds != null && (areaSound.remainingLoops -= loops) <= 0) { - @Pc(219) int index = (int) ((double) areaSound.sounds.length * Math.random()); - @Pc(227) SynthSound synthSound = SynthSound.create(client.js5Archive4, areaSound.sounds[index], 0); - if (synthSound != null) { - @Pc(236) PcmSound pcmSound = synthSound.toPcmSound().resample(client.resampler); - @Pc(241) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); - stream.setLoops(0); - client.soundStream.addSubStream(stream); - areaSound.remainingLoops = (int) ((double) (areaSound.maxInterval - areaSound.minInterval) * Math.random()) + areaSound.minInterval; - areaSound.secondaryStream = stream; - } - } - } + @OriginalMember(owner = "client!lk", name = "a", descriptor = "(ILclient!fl;IIII)V") + public static void redraw(@OriginalArg(0) int x, @OriginalArg(1) AreaSound areaSound, @OriginalArg(2) int level, @OriginalArg(3) int loops, @OriginalArg(4) int z) { + if (areaSound.sound == -1 && areaSound.sounds == null) { + return; + } + @Pc(20) int distance = 0; + if (areaSound.maxXFine < x) { + distance = x - areaSound.maxXFine; + } else if (areaSound.minXFine > x) { + distance = areaSound.minXFine - x; + } + if (areaSound.maxZFine < z) { + distance += z - areaSound.maxZFine; + } else if (z < areaSound.minZFine) { + distance += areaSound.minZFine - z; + } + if (areaSound.radius == 0 || areaSound.radius < distance - 64 || Preferences.ambientSoundsVolume == 0 || level != areaSound.level) { + if (areaSound.primaryStream != null) { + client.soundStream.removeSubStream(areaSound.primaryStream); + areaSound.primaryStream = null; + } + if (areaSound.secondaryStream != null) { + client.soundStream.removeSubStream(areaSound.secondaryStream); + areaSound.secondaryStream = null; + } + return; + } + distance -= 64; + if (distance < 0) { + distance = 0; + } + @Pc(134) int volume = (areaSound.radius - distance) * Preferences.ambientSoundsVolume / areaSound.radius; + if (areaSound.primaryStream != null) { + areaSound.primaryStream.setVolume(volume); + } else if (areaSound.sound >= 0) { + @Pc(150) SynthSound synthSound = SynthSound.create(client.js5Archive4, areaSound.sound, 0); + if (synthSound != null) { + @Pc(158) PcmSound pcmSound = synthSound.toPcmSound().resample(client.resampler); + @Pc(163) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); + stream.setLoops(-1); + client.soundStream.addSubStream(stream); + areaSound.primaryStream = stream; + } + } + if (areaSound.secondaryStream != null) { + areaSound.secondaryStream.setVolume(volume); + if (!areaSound.secondaryStream.isLinked()) { + areaSound.secondaryStream = null; + } + } else if (areaSound.sounds != null && (areaSound.remainingLoops -= loops) <= 0) { + @Pc(219) int index = (int) ((double) areaSound.sounds.length * Math.random()); + @Pc(227) SynthSound synthSound = SynthSound.create(client.js5Archive4, areaSound.sounds[index], 0); + if (synthSound != null) { + @Pc(236) PcmSound pcmSound = synthSound.toPcmSound().resample(client.resampler); + @Pc(241) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); + stream.setLoops(0); + client.soundStream.addSubStream(stream); + areaSound.remainingLoops = (int) ((double) (areaSound.maxInterval - areaSound.minInterval) * Math.random()) + areaSound.minInterval; + areaSound.secondaryStream = stream; + } + } + } } diff --git a/client/src/main/java/rt4/ArrayUtils.java b/client/src/main/java/rt4/ArrayUtils.java index a5a00eb..a2fdb17 100644 --- a/client/src/main/java/rt4/ArrayUtils.java +++ b/client/src/main/java/rt4/ArrayUtils.java @@ -46,7 +46,7 @@ public final class ArrayUtils { } } - @OriginalMember(owner = "client!kg", name = "a", descriptor = "([II[III)V") + @OriginalMember(owner = "client!kg", name = "a", descriptor = "([II[III)V") public static void copy(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int[] arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { @Pc(15) int local15; if (arg0 == arg2) { diff --git a/client/src/main/java/rt4/AttachLocRequest.java b/client/src/main/java/rt4/AttachLocRequest.java index dc27936..0ad5e2b 100644 --- a/client/src/main/java/rt4/AttachLocRequest.java +++ b/client/src/main/java/rt4/AttachLocRequest.java @@ -8,10 +8,10 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!cn") public final class AttachLocRequest extends Node { - @OriginalMember(owner = "client!ka", name = "q", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!ka", name = "q", descriptor = "Lclient!ih;") public static final LinkedList queue = new LinkedList(); - @OriginalMember(owner = "client!cn", name = "p", descriptor = "I") + @OriginalMember(owner = "client!cn", name = "p", descriptor = "I") public int setLoops; @OriginalMember(owner = "client!cn", name = "r", descriptor = "I") @@ -141,21 +141,21 @@ public final class AttachLocRequest extends Node { } } - @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIIIIIIIIIII)V") - public static void push(@OriginalArg(0) int x1Delta, @OriginalArg(1) int setLoops, @OriginalArg(2) int entityId, @OriginalArg(3) int resetLoops, @OriginalArg(4) int z, @OriginalArg(5) int z1Delta, @OriginalArg(6) int angle, @OriginalArg(7) int x0Delta, @OriginalArg(8) int x, @OriginalArg(9) int shape, @OriginalArg(11) int z0Delta, @OriginalArg(12) int locId) { - @Pc(7) AttachLocRequest req = new AttachLocRequest(); - req.angle = angle; - req.resetLoops = resetLoops; - req.setLoops = setLoops; - req.z1Delta = z1Delta; - req.entityId = entityId; - req.x = x; - req.z0Delta = z0Delta; - req.z = z; - req.locId = locId; - req.x0Delta = x0Delta; - req.x1Delta = x1Delta; - req.shape = shape; - queue.addTail(req); - } + @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIIIIIIIIIII)V") + public static void push(@OriginalArg(0) int x1Delta, @OriginalArg(1) int setLoops, @OriginalArg(2) int entityId, @OriginalArg(3) int resetLoops, @OriginalArg(4) int z, @OriginalArg(5) int z1Delta, @OriginalArg(6) int angle, @OriginalArg(7) int x0Delta, @OriginalArg(8) int x, @OriginalArg(9) int shape, @OriginalArg(11) int z0Delta, @OriginalArg(12) int locId) { + @Pc(7) AttachLocRequest req = new AttachLocRequest(); + req.angle = angle; + req.resetLoops = resetLoops; + req.setLoops = setLoops; + req.z1Delta = z1Delta; + req.entityId = entityId; + req.x = x; + req.z0Delta = z0Delta; + req.z = z; + req.locId = locId; + req.x0Delta = x0Delta; + req.x1Delta = x1Delta; + req.shape = shape; + queue.addTail(req); + } } diff --git a/client/src/main/java/rt4/AudioChannel.java b/client/src/main/java/rt4/AudioChannel.java index 4faa5f2..1e6b34a 100644 --- a/client/src/main/java/rt4/AudioChannel.java +++ b/client/src/main/java/rt4/AudioChannel.java @@ -1,20 +1,21 @@ package rt4; -import java.awt.Component; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; + @OriginalClass("client!vh") public class AudioChannel { - @OriginalMember(owner = "client!na", name = "w", descriptor = "Z") - public static boolean stereo; - @OriginalMember(owner = "client!va", name = "O", descriptor = "I") - public static int threadPriority; - @OriginalMember(owner = "client!em", name = "x", descriptor = "Lclient!cj;") - public static AudioThread thread; + @OriginalMember(owner = "client!na", name = "w", descriptor = "Z") + public static boolean stereo; + @OriginalMember(owner = "client!va", name = "O", descriptor = "I") + public static int threadPriority; + @OriginalMember(owner = "client!em", name = "x", descriptor = "Lclient!cj;") + public static AudioThread thread; @OriginalMember(owner = "client!dh", name = "h", descriptor = "I") public static int sampleRate; @@ -66,12 +67,12 @@ public class AudioChannel { @OriginalMember(owner = "client!vh", name = "C", descriptor = "I") private int prevBufferSize = 0; - @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IIIZ)V") - public static void init(@OriginalArg(3) boolean stereo) { - threadPriority = 2; - AudioChannel.stereo = stereo; - sampleRate = 22050; - } + @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IIIZ)V") + public static void init(@OriginalArg(3) boolean stereo) { + threadPriority = 2; + AudioChannel.stereo = stereo; + sampleRate = 22050; + } @OriginalMember(owner = "client!id", name = "a", descriptor = "(ILsignlink!ll;Ljava/awt/Component;II)Lclient!vh;") public static AudioChannel create(@OriginalArg(0) int arg0, @OriginalArg(1) SignLink arg1, @OriginalArg(2) Component arg2, @OriginalArg(3) int arg3) { @@ -128,18 +129,18 @@ public class AudioChannel { } } - @OriginalMember(owner = "client!nd", name = "a", descriptor = "(ZLclient!qb;)V") - public static void setInactive(@OriginalArg(1) PcmStream arg0) { - if (arg0.sound != null) { - arg0.sound.position = 0; - } - arg0.active = false; - for (@Pc(14) PcmStream local14 = arg0.firstSubStream(); local14 != null; local14 = arg0.nextSubStream()) { - setInactive(local14); - } - } + @OriginalMember(owner = "client!nd", name = "a", descriptor = "(ZLclient!qb;)V") + public static void setInactive(@OriginalArg(1) PcmStream arg0) { + if (arg0.sound != null) { + arg0.sound.position = 0; + } + arg0.active = false; + for (@Pc(14) PcmStream local14 = arg0.firstSubStream(); local14 != null; local14 = arg0.nextSubStream()) { + setInactive(local14); + } + } - @OriginalMember(owner = "client!vh", name = "a", descriptor = "()V") + @OriginalMember(owner = "client!vh", name = "a", descriptor = "()V") protected void write() throws Exception { } @@ -166,7 +167,8 @@ public class AudioChannel { @Pc(45) int local45 = 0; @Pc(47) int local47 = 255; @Pc(49) int local49 = 7; - label106: while (local47 != 0) { + label106: + while (local47 != 0) { @Pc(57) int local57; @Pc(62) int local62; if (local49 < 0) { @@ -181,7 +183,8 @@ public class AudioChannel { local47 &= ~(0x1 << local57); @Pc(91) PcmStream local91 = null; @Pc(96) PcmStream local96 = this.aClass3_Sub3Array5[local57]; - label100: while (true) { + label100: + while (true) { while (true) { if (local96 == null) { break label100; diff --git a/client/src/main/java/rt4/BasTypeList.java b/client/src/main/java/rt4/BasTypeList.java index 659abb4..a9970fc 100644 --- a/client/src/main/java/rt4/BasTypeList.java +++ b/client/src/main/java/rt4/BasTypeList.java @@ -5,44 +5,44 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class BasTypeList { - @OriginalMember(owner = "client!vf", name = "a", descriptor = "Lclient!n;") + @OriginalMember(owner = "client!vf", name = "a", descriptor = "Lclient!n;") public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!nd", name = "p", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!nd", name = "p", descriptor = "Lclient!ve;") public static Js5 archive; - @OriginalMember(owner = "client!ge", name = "a", descriptor = "(BLclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!ge", name = "a", descriptor = "(BLclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!hb", name = "a", descriptor = "(ZI)Lclient!ck;") - public static BasType get(@OriginalArg(1) int arg0) { - @Pc(10) BasType local10 = (BasType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(21) byte[] local21 = archive.fetchFile(32, arg0); - local10 = new BasType(); - if (local21 != null) { - local10.decode(new Buffer(local21)); - } - local10.method878(); - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!hb", name = "a", descriptor = "(ZI)Lclient!ck;") + public static BasType get(@OriginalArg(1) int arg0) { + @Pc(10) BasType local10 = (BasType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(21) byte[] local21 = archive.fetchFile(32, arg0); + local10 = new BasType(); + if (local21 != null) { + local10.decode(new Buffer(local21)); + } + local10.method878(); + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!jk", name = "e", descriptor = "(B)V") - public static void method2433() { - types.clear(); - } + @OriginalMember(owner = "client!jk", name = "e", descriptor = "(B)V") + public static void method2433() { + types.clear(); + } - @OriginalMember(owner = "client!bi", name = "c", descriptor = "(II)V") - public static void clean() { - types.clean(5); - } + @OriginalMember(owner = "client!bi", name = "c", descriptor = "(II)V") + public static void clean() { + types.clean(5); + } - @OriginalMember(owner = "client!di", name = "d", descriptor = "(I)V") - public static void method1172() { - types.removeSoft(); - } + @OriginalMember(owner = "client!di", name = "d", descriptor = "(I)V") + public static void method1172() { + types.removeSoft(); + } } diff --git a/client/src/main/java/rt4/Base37.java b/client/src/main/java/rt4/Base37.java index 2492179..71f1513 100644 --- a/client/src/main/java/rt4/Base37.java +++ b/client/src/main/java/rt4/Base37.java @@ -5,33 +5,33 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Base37 { - @OriginalMember(owner = "client!ch", name = "v", descriptor = "[B") - public static final byte[] aByteArray12 = new byte[] { 95, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }; + @OriginalMember(owner = "client!ch", name = "v", descriptor = "[B") + public static final byte[] aByteArray12 = new byte[]{95, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57}; - @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IJ)Lclient!na;") - public static JagString decode37(@OriginalArg(1) long arg0) { - if (arg0 <= 0L || arg0 >= 6582952005840035281L) { - return null; - } else if (arg0 % 37L == 0L) { - return null; - } else { - @Pc(32) int local32 = 0; - @Pc(34) long local34 = arg0; - while (local34 != 0L) { - local34 /= 37L; - local32++; - } - @Pc(48) byte[] local48 = new byte[local32]; - while (arg0 != 0L) { - @Pc(65) long local65 = arg0; - arg0 /= 37L; - local32--; - local48[local32] = aByteArray12[(int) (local65 - arg0 * 37L)]; - } - @Pc(88) JagString local88 = new JagString(); - local88.chars = local48; - local88.length = local48.length; - return local88; - } - } + @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IJ)Lclient!na;") + public static JagString decode37(@OriginalArg(1) long arg0) { + if (arg0 <= 0L || arg0 >= 6582952005840035281L) { + return null; + } else if (arg0 % 37L == 0L) { + return null; + } else { + @Pc(32) int local32 = 0; + @Pc(34) long local34 = arg0; + while (local34 != 0L) { + local34 /= 37L; + local32++; + } + @Pc(48) byte[] local48 = new byte[local32]; + while (arg0 != 0L) { + @Pc(65) long local65 = arg0; + arg0 /= 37L; + local32--; + local48[local32] = aByteArray12[(int) (local65 - arg0 * 37L)]; + } + @Pc(88) JagString local88 = new JagString(); + local88.chars = local48; + local88.length = local48.length; + return local88; + } + } } diff --git a/client/src/main/java/rt4/BrokenInputStream.java b/client/src/main/java/rt4/BrokenInputStream.java index 9f84151..03ff4c0 100644 --- a/client/src/main/java/rt4/BrokenInputStream.java +++ b/client/src/main/java/rt4/BrokenInputStream.java @@ -1,9 +1,10 @@ package rt4; -import java.io.InputStream; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.io.InputStream; + @OriginalClass("client!qk") public final class BrokenInputStream extends InputStream { diff --git a/client/src/main/java/rt4/BrokenOutputStream.java b/client/src/main/java/rt4/BrokenOutputStream.java index 9d661e2..61c0622 100644 --- a/client/src/main/java/rt4/BrokenOutputStream.java +++ b/client/src/main/java/rt4/BrokenOutputStream.java @@ -1,11 +1,12 @@ package rt4; -import java.io.IOException; -import java.io.OutputStream; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.io.IOException; +import java.io.OutputStream; + @OriginalClass("client!vg") public final class BrokenOutputStream extends OutputStream { diff --git a/client/src/main/java/rt4/BrowserControl.java b/client/src/main/java/rt4/BrowserControl.java index 3cb6620..bc7ce94 100644 --- a/client/src/main/java/rt4/BrowserControl.java +++ b/client/src/main/java/rt4/BrowserControl.java @@ -1,10 +1,10 @@ package rt4; -import java.applet.Applet; -// import netscape.javascript.JSObject; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; +import java.applet.Applet; + public final class BrowserControl { @OriginalMember(owner = "client!gh", name = "a", descriptor = "(Ljava/lang/String;BLjava/applet/Applet;)Ljava/lang/Object;") diff --git a/client/src/main/java/rt4/Buffer.java b/client/src/main/java/rt4/Buffer.java index 5f75d64..2794190 100644 --- a/client/src/main/java/rt4/Buffer.java +++ b/client/src/main/java/rt4/Buffer.java @@ -36,7 +36,7 @@ public class Buffer extends Node { public static final byte[][] allocatedMin = new byte[1000][]; @OriginalMember(owner = "client!bb", name = "t", descriptor = "[[B") - public static final byte[][] allocatedMid = new byte[250][]; + public static final byte[][] allocatedMid = new byte[250][]; @OriginalMember(owner = "client!dc", name = "db", descriptor = "[[B") public static final byte[][] allocatedMax = new byte[50][]; @@ -51,22 +51,22 @@ public class Buffer extends Node { public static int allocatedMaxCount = 0; @OriginalMember(owner = "client!wa", name = "y", descriptor = "[B") - public byte[] data; + public byte[] data; - @OriginalMember(owner = "client!wa", name = "T", descriptor = "I") - public int offset; + @OriginalMember(owner = "client!wa", name = "T", descriptor = "I") + public int offset; - @OriginalMember(owner = "client!wa", name = "", descriptor = "(I)V") - public Buffer(@OriginalArg(0) int size) { - this.data = allocate(size); - this.offset = 0; - } + @OriginalMember(owner = "client!wa", name = "", descriptor = "(I)V") + public Buffer(@OriginalArg(0) int size) { + this.data = allocate(size); + this.offset = 0; + } - @OriginalMember(owner = "client!wa", name = "", descriptor = "([B)V") - public Buffer(@OriginalArg(0) byte[] src) { - this.offset = 0; - this.data = src; - } + @OriginalMember(owner = "client!wa", name = "", descriptor = "([B)V") + public Buffer(@OriginalArg(0) byte[] src) { + this.offset = 0; + this.data = src; + } @OriginalMember(owner = "client!sh", name = "a", descriptor = "(II)[B") public static synchronized byte[] allocate(@OriginalArg(1) int length) { @@ -421,11 +421,11 @@ public class Buffer extends Node { this.data[this.offset - length - 1] = (byte) length; } - @OriginalMember(owner = "client!wa", name = "o", descriptor = "(II)V") - public final void p2(@OriginalArg(1) int value) { - this.data[this.offset++] = (byte) (value >> 8); - this.data[this.offset++] = (byte) value; - } + @OriginalMember(owner = "client!wa", name = "o", descriptor = "(II)V") + public final void p2(@OriginalArg(1) int value) { + this.data[this.offset++] = (byte) (value >> 8); + this.data[this.offset++] = (byte) value; + } @OriginalMember(owner = "client!wa", name = "l", descriptor = "(II)V") public final void p2add(@OriginalArg(0) int value) { diff --git a/client/src/main/java/rt4/BufferedFile.java b/client/src/main/java/rt4/BufferedFile.java index 9b7dc71..5c95361 100644 --- a/client/src/main/java/rt4/BufferedFile.java +++ b/client/src/main/java/rt4/BufferedFile.java @@ -1,13 +1,14 @@ package rt4; -import java.io.EOFException; -import java.io.File; -import java.io.IOException; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.io.EOFException; +import java.io.File; +import java.io.IOException; + @OriginalClass("client!en") public final class BufferedFile { diff --git a/client/src/main/java/rt4/BufferedImageFrameBuffer.java b/client/src/main/java/rt4/BufferedImageFrameBuffer.java index bf25793..c4024c8 100644 --- a/client/src/main/java/rt4/BufferedImageFrameBuffer.java +++ b/client/src/main/java/rt4/BufferedImageFrameBuffer.java @@ -1,19 +1,15 @@ package rt4; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Shape; -import java.awt.image.BufferedImage; -import java.awt.image.DataBufferInt; -import java.awt.image.DirectColorModel; -import java.awt.image.Raster; -import java.awt.image.WritableRaster; -import java.util.Hashtable; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; +import java.awt.*; +import java.awt.image.*; +import java.util.Hashtable; + @OriginalClass("client!ti") public final class BufferedImageFrameBuffer extends FrameBuffer { diff --git a/client/src/main/java/rt4/BufferedSocket.java b/client/src/main/java/rt4/BufferedSocket.java index c0720cc..1a30b52 100644 --- a/client/src/main/java/rt4/BufferedSocket.java +++ b/client/src/main/java/rt4/BufferedSocket.java @@ -1,14 +1,15 @@ package rt4; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ma") public final class BufferedSocket implements Runnable { @@ -60,9 +61,11 @@ public final class BufferedSocket implements Runnable { while (true) { @Pc(39) int len; @Pc(24) int off; - ready: { + ready: + { synchronized (this) { - close: { + close: + { if (this.writePointer == this.readPointer) { if (this.closed) { break close; diff --git a/client/src/main/java/rt4/ByteArray.java b/client/src/main/java/rt4/ByteArray.java index 66ae9c2..c5dfdda 100644 --- a/client/src/main/java/rt4/ByteArray.java +++ b/client/src/main/java/rt4/ByteArray.java @@ -8,52 +8,52 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!u") public abstract class ByteArray { - @OriginalMember(owner = "client!gk", name = "g", descriptor = "Z") - public static boolean directBuffersUnsupported = false; + @OriginalMember(owner = "client!gk", name = "g", descriptor = "Z") + public static boolean directBuffersUnsupported = false; - @OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B") - public static byte[] unwrap(@OriginalArg(1) Object in, @OriginalArg(2) boolean copy) { - if (in == null) { - return null; - } else if (in instanceof byte[]) { - @Pc(14) byte[] bytes = (byte[]) in; - return copy ? copy(bytes) : bytes; - } else if (in instanceof ByteArray) { - @Pc(34) ByteArray array = (ByteArray) in; - return array.get(); - } else { - throw new IllegalArgumentException(); - } - } + @OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B") + public static byte[] unwrap(@OriginalArg(1) Object in, @OriginalArg(2) boolean copy) { + if (in == null) { + return null; + } else if (in instanceof byte[]) { + @Pc(14) byte[] bytes = (byte[]) in; + return copy ? copy(bytes) : bytes; + } else if (in instanceof ByteArray) { + @Pc(34) ByteArray array = (ByteArray) in; + return array.get(); + } else { + throw new IllegalArgumentException(); + } + } - @OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B") - public static byte[] copy(@OriginalArg(1) byte[] in) { - @Pc(6) int len = in.length; - @Pc(9) byte[] out = new byte[len]; - JagString.copy(in, 0, out, 0, len); - return out; - } + @OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B") + public static byte[] copy(@OriginalArg(1) byte[] in) { + @Pc(6) int len = in.length; + @Pc(9) byte[] out = new byte[len]; + JagString.copy(in, 0, out, 0, len); + return out; + } - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZI[B)Ljava/lang/Object;") - public static Object wrap(@OriginalArg(2) byte[] bytes) { - if (bytes == null) { - return null; - } - if (bytes.length > 136 && !directBuffersUnsupported) { - try { - @Pc(27) ByteArray array = new DirectByteArray(); - array.set(bytes); - return array; - } catch (@Pc(34) Throwable ex) { - directBuffersUnsupported = true; - } - } - return bytes; - } + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZI[B)Ljava/lang/Object;") + public static Object wrap(@OriginalArg(2) byte[] bytes) { + if (bytes == null) { + return null; + } + if (bytes.length > 136 && !directBuffersUnsupported) { + try { + @Pc(27) ByteArray array = new DirectByteArray(); + array.set(bytes); + return array; + } catch (@Pc(34) Throwable ex) { + directBuffersUnsupported = true; + } + } + return bytes; + } - @OriginalMember(owner = "client!u", name = "a", descriptor = "(I)[B") - public abstract byte[] get(); + @OriginalMember(owner = "client!u", name = "a", descriptor = "(I)[B") + public abstract byte[] get(); - @OriginalMember(owner = "client!u", name = "a", descriptor = "(I[B)V") - public abstract void set(@OriginalArg(1) byte[] bytes); + @OriginalMember(owner = "client!u", name = "a", descriptor = "(I[B)V") + public abstract void set(@OriginalArg(1) byte[] bytes); } diff --git a/client/src/main/java/rt4/ByteArrayNode.java b/client/src/main/java/rt4/ByteArrayNode.java index 925951c..686406d 100644 --- a/client/src/main/java/rt4/ByteArrayNode.java +++ b/client/src/main/java/rt4/ByteArrayNode.java @@ -3,7 +3,6 @@ package rt4; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ea") public final class ByteArrayNode extends Node { diff --git a/client/src/main/java/rt4/Bzip2Decompressor.java b/client/src/main/java/rt4/Bzip2Decompressor.java index d167da2..e0479cd 100644 --- a/client/src/main/java/rt4/Bzip2Decompressor.java +++ b/client/src/main/java/rt4/Bzip2Decompressor.java @@ -37,7 +37,8 @@ public final class Bzip2Decompressor { @Pc(25) int local25 = arg0.strmAvailOut; @Pc(27) int local27 = local25; @Pc(32) int local32 = arg0.saveNblock + 1; - returnNotr: while (true) { + returnNotr: + while (true) { if (local5 > 0) { while (true) { if (local25 == 0) { @@ -226,11 +227,7 @@ public final class Bzip2Decompressor { @Pc(141) int local141; for (local141 = 0; local141 < 16; local141++) { local61 = getBit(arg0); - if (local61 == 1) { - arg0.inUse16[local141] = true; - } else { - arg0.inUse16[local141] = false; - } + arg0.inUse16[local141] = local61 == 1; } for (local141 = 0; local141 < 256; local141++) { arg0.inUse[local141] = false; diff --git a/client/src/main/java/rt4/Cache.java b/client/src/main/java/rt4/Cache.java index 2c95a6a..3f5b020 100644 --- a/client/src/main/java/rt4/Cache.java +++ b/client/src/main/java/rt4/Cache.java @@ -1,12 +1,13 @@ package rt4; -import java.io.EOFException; -import java.io.IOException; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.io.EOFException; +import java.io.IOException; + @OriginalClass("client!ge") public final class Cache { @@ -64,7 +65,7 @@ public final class Cache { local27 = null; return (byte[]) local27; } - this.index.seek((long) (group * 6)); + this.index.seek(group * 6); this.index.read(0, buffer, 6); @Pc(69) int local69 = ((buffer[3] & 0xFF) << 16) - (-((buffer[4] & 0xFF) << 8) - (buffer[5] & 0xFF)); @Pc(99) int local99 = (buffer[2] & 0xFF) + ((buffer[1] & 0xFF) << 8) + ((buffer[0] & 0xFF) << 16); @@ -84,7 +85,7 @@ public final class Cache { return (byte[]) local27; } @Pc(157) int local157 = local99 - local136; - this.data.seek((long) (local69 * 520)); + this.data.seek(local69 * 520); if (local157 > 512) { local157 = 512; } @@ -129,7 +130,7 @@ public final class Cache { local27 = false; return local27; } - this.index.seek((long) (arg1 * 6)); + this.index.seek(arg1 * 6); this.index.read(0, buffer, 6); local67 = ((buffer[3] & 0xFF) << 16) + (buffer[4] << 8 & 0xFF00) + (buffer[5] & 0xFF); if (local67 <= 0 || this.data.length() / 520L < (long) local67) { @@ -150,15 +151,16 @@ public final class Cache { buffer[3] = (byte) (local67 >> 16); @Pc(156) int local156 = 0; buffer[1] = (byte) (arg0 >> 8); - this.index.seek((long) (arg1 * 6)); + this.index.seek(arg1 * 6); this.index.write(buffer, 0, 6); while (true) { if (local125 < arg0) { - label134: { + label134: + { @Pc(189) int local189 = 0; @Pc(248) int local248; if (arg3) { - this.data.seek((long) (local67 * 520)); + this.data.seek(local67 * 520); try { this.data.read(0, buffer, 8); } catch (@Pc(209) EOFException local209) { @@ -203,7 +205,7 @@ public final class Cache { buffer[3] = (byte) local156; local156++; buffer[5] = (byte) (local189 >> 8); - this.data.seek((long) (local67 * 520)); + this.data.seek(local67 * 520); local67 = local189; this.data.write(buffer, 0, 8); this.data.write(arg2, local125, local248); diff --git a/client/src/main/java/rt4/Camera.java b/client/src/main/java/rt4/Camera.java index 63fd97c..ccf9f35 100644 --- a/client/src/main/java/rt4/Camera.java +++ b/client/src/main/java/rt4/Camera.java @@ -5,301 +5,297 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Camera { - @OriginalMember(owner = "client!id", name = "d", descriptor = "[[[I") - public static final int[][][] anIntArrayArrayArray9 = new int[2][][]; - @OriginalMember(owner = "client!sa", name = "Q", descriptor = "[I") - public static final int[] cameraJitter = new int[5]; - @OriginalMember(owner = "client!wh", name = "m", descriptor = "[I") - 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!fl", name = "s", descriptor = "I") + @OriginalMember(owner = "client!id", name = "d", descriptor = "[[[I") + public static final int[][][] anIntArrayArrayArray9 = new int[2][][]; + @OriginalMember(owner = "client!sa", name = "Q", descriptor = "[I") + public static final int[] cameraJitter = new int[5]; + @OriginalMember(owner = "client!wh", name = "m", descriptor = "[I") + 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!fl", name = "s", descriptor = "I") public static double pitchTarget = 128; - @OriginalMember(owner = "client!eg", name = "d", descriptor = "I") - public static double yawTarget = 0; + @OriginalMember(owner = "client!eg", name = "d", descriptor = "I") + public static double yawTarget = 0; - @OriginalMember(owner = "client!ef", name = "i", descriptor = "I") - public static double pitchAccel = 0; + @OriginalMember(owner = "client!ef", name = "i", descriptor = "I") + public static double pitchAccel = 0; - @OriginalMember(owner = "client!ii", name = "a", descriptor = "I") - public static int cameraZ; - @OriginalMember(owner = "client!gg", name = "bb", descriptor = "I") - public static int cameraX; - @OriginalMember(owner = "client!tg", name = "b", descriptor = "I") - public static int cameraPitch; - @OriginalMember(owner = "client!ol", name = "ib", descriptor = "I") + @OriginalMember(owner = "client!ii", name = "a", descriptor = "I") + public static int cameraZ; + @OriginalMember(owner = "client!gg", name = "bb", descriptor = "I") + public static int cameraX; + @OriginalMember(owner = "client!tg", name = "b", descriptor = "I") + public static int cameraPitch; + @OriginalMember(owner = "client!ol", name = "ib", descriptor = "I") public static int cameraYaw; - @OriginalMember(owner = "client!sg", name = "o", descriptor = "I") + @OriginalMember(owner = "client!sg", name = "o", descriptor = "I") public static int cameraType; - @OriginalMember(owner = "client!g", name = "d", descriptor = "I") - public static int anInt2119 = 0; - @OriginalMember(owner = "client!eb", name = "t", descriptor = "I") - public static int anInt1694 = -1; - @OriginalMember(owner = "client!j", name = "K", descriptor = "I") - public static int anInt5843 = 0; - @OriginalMember(owner = "client!sh", name = "c", descriptor = "I") + @OriginalMember(owner = "client!g", name = "d", descriptor = "I") + public static int anInt2119 = 0; + @OriginalMember(owner = "client!eb", name = "t", descriptor = "I") + public static int anInt1694 = -1; + @OriginalMember(owner = "client!j", name = "K", descriptor = "I") + public static int anInt5843 = 0; + @OriginalMember(owner = "client!sh", name = "c", descriptor = "I") public static int anInt5101 = 0; - @OriginalMember(owner = "client!t", name = "z", descriptor = "I") - public static int anInt5224 = 0; - @OriginalMember(owner = "client!k", name = "i", descriptor = "I") - public static int anInt3125 = 0; - @OriginalMember(owner = "client!me", name = "k", descriptor = "I") - public static int anInt3718 = -1; - @OriginalMember(owner = "client!lc", name = "n", descriptor = "I") - public static int originZ; - @OriginalMember(owner = "client!se", name = "a", descriptor = "I") - public static int originX; - @OriginalMember(owner = "client!bc", name = "I", descriptor = "Z") - public static boolean aBoolean16 = false; - @OriginalMember(owner = "client!km", name = "Pc", descriptor = "I") - public static int renderX; - @OriginalMember(owner = "client!kh", name = "f", descriptor = "I") - public static int renderZ; - @OriginalMember(owner = "client!uc", name = "f", descriptor = "I") - public static int anInt4232; - @OriginalMember(owner = "client!ug", name = "h", descriptor = "I") + @OriginalMember(owner = "client!t", name = "z", descriptor = "I") + public static int anInt5224 = 0; + @OriginalMember(owner = "client!k", name = "i", descriptor = "I") + public static int anInt3125 = 0; + @OriginalMember(owner = "client!me", name = "k", descriptor = "I") + public static int anInt3718 = -1; + @OriginalMember(owner = "client!lc", name = "n", descriptor = "I") + public static int originZ; + @OriginalMember(owner = "client!se", name = "a", descriptor = "I") + public static int originX; + @OriginalMember(owner = "client!bc", name = "I", descriptor = "Z") + public static boolean aBoolean16 = false; + @OriginalMember(owner = "client!km", name = "Pc", descriptor = "I") + public static int renderX; + @OriginalMember(owner = "client!kh", name = "f", descriptor = "I") + public static int renderZ; + @OriginalMember(owner = "client!uc", name = "f", descriptor = "I") + public static int anInt4232; + @OriginalMember(owner = "client!ug", name = "h", descriptor = "I") public static int anInt5449; - @OriginalMember(owner = "client!vj", name = "d", descriptor = "I") - public static int anInt5765; - @OriginalMember(owner = "client!tm", name = "g", descriptor = "I") - public static int anInt5375; - @OriginalMember(owner = "client!pa", name = "K", descriptor = "Z") + @OriginalMember(owner = "client!vj", name = "d", descriptor = "I") + public static int anInt5765; + @OriginalMember(owner = "client!tm", name = "g", descriptor = "I") + public static int anInt5375; + @OriginalMember(owner = "client!pa", name = "K", descriptor = "Z") public static boolean aBoolean205 = false; - @OriginalMember(owner = "client!gk", name = "d", descriptor = "F") - public static float aFloat10; - public static int ZOOM = 600; - @OriginalMember(owner = "client!il", name = "O", descriptor = "I") - public static int anInt4612; - @OriginalMember(owner = "client!eg", name = "a", descriptor = "I") - public static int anInt1744; - @OriginalMember(owner = "client!kf", name = "f", descriptor = "I") - public static int anInt5230; - @OriginalMember(owner = "client!ke", name = "U", descriptor = "I") - public static int anInt3291 = 0; - @OriginalMember(owner = "client!uc", name = "a", descriptor = "I") - public static int anInt4229 = 2; - @OriginalMember(owner = "client!ta", name = "B", descriptor = "I") - public static int anInt5245 = 0; - @OriginalMember(owner = "client!qk", name = "h", descriptor = "I") - public static int anInt4774 = 0; - @OriginalMember(owner = "client!sj", name = "H", descriptor = "I") - public static int anInt5161 = 0; - @OriginalMember(owner = "client!af", name = "d", descriptor = "I") - public static int anInt40; + @OriginalMember(owner = "client!gk", name = "d", descriptor = "F") + public static float aFloat10; + public static int ZOOM = 600; + @OriginalMember(owner = "client!il", name = "O", descriptor = "I") + public static int anInt4612; + @OriginalMember(owner = "client!eg", name = "a", descriptor = "I") + public static int anInt1744; + @OriginalMember(owner = "client!kf", name = "f", descriptor = "I") + public static int anInt5230; + @OriginalMember(owner = "client!ke", name = "U", descriptor = "I") + public static int anInt3291 = 0; + @OriginalMember(owner = "client!uc", name = "a", descriptor = "I") + public static int anInt4229 = 2; + @OriginalMember(owner = "client!ta", name = "B", descriptor = "I") + public static int anInt5245 = 0; + @OriginalMember(owner = "client!qk", name = "h", descriptor = "I") + public static int anInt4774 = 0; + @OriginalMember(owner = "client!sj", name = "H", descriptor = "I") + public static int anInt5161 = 0; + @OriginalMember(owner = "client!af", name = "d", descriptor = "I") + public static int anInt40; - public static double mod(double a, double b) { - return ((a % b) + b) % b; - } + public static double mod(double a, double b) { + return ((a % b) + b) % b; + } - @OriginalMember(owner = "client!gn", name = "b", descriptor = "(B)V") - public static void clampCameraAngle() { - if (pitchTarget < 128) { - pitchTarget = 128; - } - if (pitchTarget > 383) { - pitchTarget = 383; - } - yawTarget = mod(yawTarget, 2047.0d); - @Pc(33) int local33 = cameraX >> 7; - @Pc(37) int local37 = cameraZ >> 7; - @Pc(43) int local43 = SceneGraph.getTileHeight(Player.level, cameraX, cameraZ); - @Pc(45) int local45 = 0; - @Pc(64) int local64; - if (local33 > 3 && local37 > 3 && local33 < 100 && local37 < 100) { - for (local64 = local33 - 4; local64 <= local33 + 4; local64++) { - for (@Pc(73) int local73 = local37 - 4; local73 <= local37 + 4; local73++) { - @Pc(80) int local80 = Player.level; - if (local80 < 3 && (SceneGraph.tileFlags[1][local64][local73] & 0x2) == 2) { - local80++; - } - @Pc(117) int local117 = (SceneGraph.aByteArrayArrayArray13[local80][local64][local73] & 0xFF) * 8 + local43 - SceneGraph.tileHeights[local80][local64][local73]; - if (local117 > local45) { - local45 = local117; - } - } - } - } - local64 = local45 * 192; - if (local64 > 98048) { - local64 = 98048; - } - if (local64 < 32768) { - local64 = 32768; - } - if (anInt5245 < local64) { - anInt5245 += (local64 - anInt5245) / 24; - } else if (local64 < anInt5245) { - anInt5245 += (local64 - anInt5245) / 80; - } - } + @OriginalMember(owner = "client!gn", name = "b", descriptor = "(B)V") + public static void clampCameraAngle() { + if (pitchTarget < 128) { + pitchTarget = 128; + } + if (pitchTarget > 383) { + pitchTarget = 383; + } + yawTarget = mod(yawTarget, 2047.0d); + @Pc(33) int local33 = cameraX >> 7; + @Pc(37) int local37 = cameraZ >> 7; + @Pc(43) int local43 = SceneGraph.getTileHeight(Player.level, cameraX, cameraZ); + @Pc(45) int local45 = 0; + @Pc(64) int local64; + if (local33 > 3 && local37 > 3 && local33 < 100 && local37 < 100) { + for (local64 = local33 - 4; local64 <= local33 + 4; local64++) { + for (@Pc(73) int local73 = local37 - 4; local73 <= local37 + 4; local73++) { + @Pc(80) int local80 = Player.level; + if (local80 < 3 && (SceneGraph.tileFlags[1][local64][local73] & 0x2) == 2) { + local80++; + } + @Pc(117) int local117 = (SceneGraph.aByteArrayArrayArray13[local80][local64][local73] & 0xFF) * 8 + local43 - SceneGraph.tileHeights[local80][local64][local73]; + if (local117 > local45) { + local45 = local117; + } + } + } + } + local64 = local45 * 192; + if (local64 > 98048) { + local64 = 98048; + } + if (local64 < 32768) { + local64 = 32768; + } + if (anInt5245 < local64) { + anInt5245 += (local64 - anInt5245) / 24; + } else if (local64 < anInt5245) { + anInt5245 += (local64 - anInt5245) / 80; + } + } - @OriginalMember(owner = "client!jl", name = "c", descriptor = "(I)V") - 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; - if (anInt4612 >= 100) { - renderX = anInt5375 * 128 + 64; - renderZ = anInt4232 * 128 + 64; - anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - Static231.anInt5203; - } else { - if (renderX < local15) { - renderX += Static233.anInt5225 + anInt4612 * (local15 - renderX) / 1000; - if (renderX > local15) { - renderX = local15; - } - } - if (anInt40 < local23) { - anInt40 += (local23 - anInt40) * anInt4612 / 1000 + Static233.anInt5225; - if (anInt40 > local23) { - anInt40 = local23; - } - } - if (renderX > local15) { - renderX -= Static233.anInt5225 + (renderX - local15) * anInt4612 / 1000; - if (renderX < local15) { - renderX = local15; - } - } - if (renderZ < local9) { - renderZ += Static233.anInt5225 + anInt4612 * (local9 - renderZ) / 1000; - if (local9 < renderZ) { - renderZ = local9; - } - } - if (local23 < anInt40) { - anInt40 -= (anInt40 - local23) * anInt4612 / 1000 + Static233.anInt5225; - if (local23 > anInt40) { - anInt40 = local23; - } - } - if (renderZ > local9) { - renderZ -= Static233.anInt5225 + (renderZ - local9) * anInt4612 / 1000; - if (local9 > renderZ) { - renderZ = local9; - } - } - } - local9 = anInt5765 * 128 + 64; - local15 = anInt5449 * 128 + 64; - local23 = SceneGraph.getTileHeight(Player.level, local15, local9) - anInt1744; - @Pc(236) int local236 = local23 - anInt40; - @Pc(241) int local241 = local9 - renderZ; - @Pc(246) int local246 = local15 - renderX; - @Pc(257) int local257 = (int) Math.sqrt((double) (local246 * local246 + local241 * local241)); - @Pc(268) int local268 = (int) (Math.atan2((double) local236, (double) local257) * 325.949D) & 0x7FF; - if (local268 < 128) { - local268 = 128; - } - if (local268 > 383) { - local268 = 383; - } - @Pc(292) int local292 = (int) (-325.949D * Math.atan2((double) local246, (double) local241)) & 0x7FF; - if (cameraPitch < local268) { - cameraPitch += anInt5230 + Static233.anInt5217 * (local268 - cameraPitch) / 1000; - if (cameraPitch > local268) { - cameraPitch = local268; - } - } - if (cameraPitch > local268) { - cameraPitch -= (cameraPitch - local268) * Static233.anInt5217 / 1000 + anInt5230; - if (cameraPitch < local268) { - cameraPitch = local268; - } - } - @Pc(350) int local350 = local292 - cameraYaw; - if (local350 > 1024) { - local350 -= 2048; - } - if (local350 < -1024) { - local350 += 2048; - } - if (local350 > 0) { - cameraYaw += local350 * Static233.anInt5217 / 1000 + anInt5230; - cameraYaw &= 0x7FF; - } - if (local350 < 0) { - cameraYaw -= Static233.anInt5217 * -local350 / 1000 + anInt5230; - cameraYaw &= 0x7FF; - } - @Pc(404) int local404 = local292 - cameraYaw; - if (local404 > 1024) { - local404 -= 2048; - } - if (local404 < -1024) { - local404 += 2048; - } - if (local404 < 0 && local350 > 0 || local404 > 0 && local350 < 0) { - cameraYaw = local292; - } - } + @OriginalMember(owner = "client!jl", name = "c", descriptor = "(I)V") + 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; + if (anInt4612 >= 100) { + renderX = anInt5375 * 128 + 64; + renderZ = anInt4232 * 128 + 64; + anInt40 = SceneGraph.getTileHeight(Player.level, renderX, renderZ) - Static231.anInt5203; + } else { + if (renderX < local15) { + renderX += Static233.anInt5225 + anInt4612 * (local15 - renderX) / 1000; + if (renderX > local15) { + renderX = local15; + } + } + if (anInt40 < local23) { + anInt40 += (local23 - anInt40) * anInt4612 / 1000 + Static233.anInt5225; + if (anInt40 > local23) { + anInt40 = local23; + } + } + if (renderX > local15) { + renderX -= Static233.anInt5225 + (renderX - local15) * anInt4612 / 1000; + if (renderX < local15) { + renderX = local15; + } + } + if (renderZ < local9) { + renderZ += Static233.anInt5225 + anInt4612 * (local9 - renderZ) / 1000; + if (local9 < renderZ) { + renderZ = local9; + } + } + if (local23 < anInt40) { + anInt40 -= (anInt40 - local23) * anInt4612 / 1000 + Static233.anInt5225; + if (local23 > anInt40) { + anInt40 = local23; + } + } + if (renderZ > local9) { + renderZ -= Static233.anInt5225 + (renderZ - local9) * anInt4612 / 1000; + if (local9 > renderZ) { + renderZ = local9; + } + } + } + local9 = anInt5765 * 128 + 64; + local15 = anInt5449 * 128 + 64; + local23 = SceneGraph.getTileHeight(Player.level, local15, local9) - anInt1744; + @Pc(236) int local236 = local23 - anInt40; + @Pc(241) int local241 = local9 - renderZ; + @Pc(246) int local246 = local15 - renderX; + @Pc(257) int local257 = (int) Math.sqrt(local246 * local246 + local241 * local241); + @Pc(268) int local268 = (int) (Math.atan2(local236, local257) * 325.949D) & 0x7FF; + if (local268 < 128) { + local268 = 128; + } + if (local268 > 383) { + local268 = 383; + } + @Pc(292) int local292 = (int) (-325.949D * Math.atan2(local246, local241)) & 0x7FF; + if (cameraPitch < local268) { + cameraPitch += anInt5230 + Static233.anInt5217 * (local268 - cameraPitch) / 1000; + if (cameraPitch > local268) { + cameraPitch = local268; + } + } + if (cameraPitch > local268) { + cameraPitch -= (cameraPitch - local268) * Static233.anInt5217 / 1000 + anInt5230; + if (cameraPitch < local268) { + cameraPitch = local268; + } + } + @Pc(350) int local350 = local292 - cameraYaw; + if (local350 > 1024) { + local350 -= 2048; + } + if (local350 < -1024) { + local350 += 2048; + } + if (local350 > 0) { + cameraYaw += local350 * Static233.anInt5217 / 1000 + anInt5230; + cameraYaw &= 0x7FF; + } + if (local350 < 0) { + cameraYaw -= Static233.anInt5217 * -local350 / 1000 + anInt5230; + cameraYaw &= 0x7FF; + } + @Pc(404) int local404 = local292 - cameraYaw; + if (local404 > 1024) { + local404 -= 2048; + } + if (local404 < -1024) { + local404 += 2048; + } + if (local404 < 0 && local350 > 0 || local404 > 0 && local350 < 0) { + cameraYaw = local292; + } + } - @OriginalMember(owner = "client!da", name = "d", descriptor = "(I)V") - public static void updateLoginScreenCamera() { - if (anInt3718 == -1 || anInt1694 == -1) { - return; - } - @Pc(27) int local27 = (anInt5224 * (anInt5843 - anInt5101) >> 16) + anInt5101; - @Pc(30) float[] renderCoordinates = new float[3]; - anInt5224 += local27; - if (anInt5224 >= 65535) { - anInt5224 = 65535; - if (aBoolean205) { - aBoolean16 = false; - } else { - aBoolean16 = true; - } - aBoolean205 = true; - } else { - aBoolean205 = false; - aBoolean16 = false; - } - @Pc(66) float local66 = (float) anInt5224 / 65535.0F; - @Pc(70) int local70 = anInt3125 * 2; - @Pc(141) int local141; - @Pc(131) int local131; - @Pc(111) int local111; - @Pc(119) int local119; - @Pc(146) int local146; - @Pc(155) int local155; - @Pc(173) int local173; - for (@Pc(72) int local72 = 0; local72 < 3; local72++) { - local111 = (anIntArrayArrayArray9[anInt3718][local70 + 2][local72] + anIntArrayArrayArray9[anInt3718][local70 + 2][local72] - anIntArrayArrayArray9[anInt3718][local70 + 3][local72]) * 3; - local119 = anIntArrayArrayArray9[anInt3718][local70][local72]; - local131 = anIntArrayArrayArray9[anInt3718][local70 + 1][local72] * 3; - local141 = anIntArrayArrayArray9[anInt3718][local70][local72] * 3; - local146 = local131 - local141; - local155 = local111 + local141 - local131 * 2; - local173 = anIntArrayArrayArray9[anInt3718][local70 + 2][local72] + local131 - local119 - local111; - renderCoordinates[local72] = (float) local119 + (((float) local173 * local66 + (float) local155) * local66 + (float) local146) * local66; - } - anInt40 = (int) renderCoordinates[1] * -1; - renderX = (int) renderCoordinates[0] - originX * 128; - renderZ = (int) renderCoordinates[2] - originZ * 128; - @Pc(226) float[] local226 = new float[3]; - local141 = anInt2119 * 2; - for (local131 = 0; local131 < 3; local131++) { - local111 = anIntArrayArrayArray9[anInt1694][local141][local131] * 3; - local146 = (anIntArrayArrayArray9[anInt1694][local141 + 2][local131] + anIntArrayArrayArray9[anInt1694][local141 + 2][local131] - anIntArrayArrayArray9[anInt1694][local141 + 3][local131]) * 3; - local155 = anIntArrayArrayArray9[anInt1694][local141][local131]; - local119 = anIntArrayArrayArray9[anInt1694][local141 + 1][local131] * 3; - local173 = local119 - local111; - @Pc(313) int local313 = local146 + local111 - local119 * 2; - @Pc(331) int local331 = anIntArrayArrayArray9[anInt1694][local141 + 2][local131] + local119 - local146 - local155; - local226[local131] = (float) local155 + local66 * (local66 * (local66 * (float) local331 + (float) local313) + (float) local173); - } - @Pc(363) float local363 = local226[0] - renderCoordinates[0]; - @Pc(371) float local371 = local226[2] - renderCoordinates[2]; - @Pc(382) float local382 = (local226[1] - renderCoordinates[1]) * -1.0F; - @Pc(392) double local392 = Math.sqrt((double) (local371 * local371 + local363 * local363)); - Static146.aFloat15 = (float) Math.atan2((double) local382, local392); - aFloat10 = -((float) Math.atan2((double) local363, (double) local371)); - cameraPitch = (int) ((double) Static146.aFloat15 * 325.949D) & 0x7FF; - cameraYaw = (int) ((double) aFloat10 * 325.949D) & 0x7FF; - } + @OriginalMember(owner = "client!da", name = "d", descriptor = "(I)V") + public static void updateLoginScreenCamera() { + if (anInt3718 == -1 || anInt1694 == -1) { + return; + } + @Pc(27) int local27 = (anInt5224 * (anInt5843 - anInt5101) >> 16) + anInt5101; + @Pc(30) float[] renderCoordinates = new float[3]; + anInt5224 += local27; + if (anInt5224 >= 65535) { + anInt5224 = 65535; + aBoolean16 = !aBoolean205; + aBoolean205 = true; + } else { + aBoolean205 = false; + aBoolean16 = false; + } + @Pc(66) float local66 = (float) anInt5224 / 65535.0F; + @Pc(70) int local70 = anInt3125 * 2; + @Pc(141) int local141; + @Pc(131) int local131; + @Pc(111) int local111; + @Pc(119) int local119; + @Pc(146) int local146; + @Pc(155) int local155; + @Pc(173) int local173; + for (@Pc(72) int local72 = 0; local72 < 3; local72++) { + local111 = (anIntArrayArrayArray9[anInt3718][local70 + 2][local72] + anIntArrayArrayArray9[anInt3718][local70 + 2][local72] - anIntArrayArrayArray9[anInt3718][local70 + 3][local72]) * 3; + local119 = anIntArrayArrayArray9[anInt3718][local70][local72]; + local131 = anIntArrayArrayArray9[anInt3718][local70 + 1][local72] * 3; + local141 = anIntArrayArrayArray9[anInt3718][local70][local72] * 3; + local146 = local131 - local141; + local155 = local111 + local141 - local131 * 2; + local173 = anIntArrayArrayArray9[anInt3718][local70 + 2][local72] + local131 - local119 - local111; + renderCoordinates[local72] = (float) local119 + (((float) local173 * local66 + (float) local155) * local66 + (float) local146) * local66; + } + anInt40 = (int) renderCoordinates[1] * -1; + renderX = (int) renderCoordinates[0] - originX * 128; + renderZ = (int) renderCoordinates[2] - originZ * 128; + @Pc(226) float[] local226 = new float[3]; + local141 = anInt2119 * 2; + for (local131 = 0; local131 < 3; local131++) { + local111 = anIntArrayArrayArray9[anInt1694][local141][local131] * 3; + local146 = (anIntArrayArrayArray9[anInt1694][local141 + 2][local131] + anIntArrayArrayArray9[anInt1694][local141 + 2][local131] - anIntArrayArrayArray9[anInt1694][local141 + 3][local131]) * 3; + local155 = anIntArrayArrayArray9[anInt1694][local141][local131]; + local119 = anIntArrayArrayArray9[anInt1694][local141 + 1][local131] * 3; + local173 = local119 - local111; + @Pc(313) int local313 = local146 + local111 - local119 * 2; + @Pc(331) int local331 = anIntArrayArrayArray9[anInt1694][local141 + 2][local131] + local119 - local146 - local155; + local226[local131] = (float) local155 + local66 * (local66 * (local66 * (float) local331 + (float) local313) + (float) local173); + } + @Pc(363) float local363 = local226[0] - renderCoordinates[0]; + @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); + aFloat10 = -((float) Math.atan2(local363, local371)); + cameraPitch = (int) ((double) Static146.aFloat15 * 325.949D) & 0x7FF; + cameraYaw = (int) ((double) aFloat10 * 325.949D) & 0x7FF; + } - @OriginalMember(owner = "client!vd", name = "a", descriptor = "(IIIIBI)V") + @OriginalMember(owner = "client!vd", name = "a", descriptor = "(IIIIBI)V") public static void method3849(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) { anInt5230 = arg2; anInt5765 = arg1; @@ -313,9 +309,9 @@ public class Camera { @Pc(49) int local49 = local44 - anInt40; @Pc(54) int local54 = local30 - renderX; @Pc(59) int local59 = local36 - renderZ; - @Pc(70) int local70 = (int) Math.sqrt((double) (local59 * local59 + local54 * local54)); - cameraPitch = (int) (Math.atan2((double) local49, (double) local70) * 325.949D) & 0x7FF; - cameraYaw = (int) (Math.atan2((double) local54, (double) local59) * -325.949D) & 0x7FF; + @Pc(70) int local70 = (int) Math.sqrt(local59 * local59 + local54 * local54); + cameraPitch = (int) (Math.atan2(local49, local70) * 325.949D) & 0x7FF; + cameraYaw = (int) (Math.atan2(local54, local59) * -325.949D) & 0x7FF; if (cameraPitch < 128) { cameraPitch = 128; } @@ -326,65 +322,65 @@ public class Camera { cameraType = 2; } - @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; - 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; - } - cameraType = 2; - } + @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; + 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; + } + cameraType = 2; + } - @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; - } - anInt5230 = 0; - Static233.anInt5217 = 0; - anInt3718 = -1; - anInt1694 = -1; - cameraType = 1; - } + @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; + } + anInt5230 = 0; + Static233.anInt5217 = 0; + anInt3718 = -1; + anInt1694 = -1; + cameraType = 1; + } - @OriginalMember(owner = "client!uf", name = "a", descriptor = "(B)V") - public static void method4273() { - @Pc(14) int playerX = PlayerList.self.xFine + anInt3291; - @Pc(20) int playerZ = PlayerList.self.zFine + anInt4774; - if (cameraX - playerX < -500 || cameraX - playerX > 500 || cameraZ - playerZ < -500 || cameraZ - playerZ > 500) { - cameraX = playerX; - cameraZ = playerZ; - } - if (cameraZ != playerZ) { - cameraZ += (playerZ - cameraZ) / 16; - } - if (cameraX != playerX) { - cameraX += (playerX - cameraX) / 16; - } - if (Preferences.aBoolean63) { - for (@Pc(93) int local93 = 0; local93 < InterfaceList.keyQueueSize; local93++) { - @Pc(104) int code = InterfaceList.keyCodes[local93]; - if (code == Keyboard.KEY_UP) { - pitchTarget += 47; - } else if (code == Keyboard.KEY_DOWN) { - pitchTarget -= 17; - } else if (code == Keyboard.KEY_LEFT) { - yawTarget -= 65; - } else if (code == Keyboard.KEY_RIGHT) { - yawTarget += 191; - } - } - clampCameraAngle(); - } - } + @OriginalMember(owner = "client!uf", name = "a", descriptor = "(B)V") + public static void method4273() { + @Pc(14) int playerX = PlayerList.self.xFine + anInt3291; + @Pc(20) int playerZ = PlayerList.self.zFine + anInt4774; + if (cameraX - playerX < -500 || cameraX - playerX > 500 || cameraZ - playerZ < -500 || cameraZ - playerZ > 500) { + cameraX = playerX; + cameraZ = playerZ; + } + if (cameraZ != playerZ) { + cameraZ += (playerZ - cameraZ) / 16; + } + if (cameraX != playerX) { + cameraX += (playerX - cameraX) / 16; + } + if (Preferences.aBoolean63) { + for (@Pc(93) int local93 = 0; local93 < InterfaceList.keyQueueSize; local93++) { + @Pc(104) int code = InterfaceList.keyCodes[local93]; + if (code == Keyboard.KEY_UP) { + pitchTarget += 47; + } else if (code == Keyboard.KEY_DOWN) { + pitchTarget -= 17; + } else if (code == Keyboard.KEY_LEFT) { + yawTarget -= 65; + } else if (code == Keyboard.KEY_RIGHT) { + yawTarget += 191; + } + } + clampCameraAngle(); + } + } - @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IIIIIIII)V") + @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IIIIIIII)V") public static void method555(@OriginalArg(0) 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) { @Pc(5) int local5; @Pc(29) int local29; diff --git a/client/src/main/java/rt4/ChangeLocRequest.java b/client/src/main/java/rt4/ChangeLocRequest.java index 158615b..5fb4568 100644 --- a/client/src/main/java/rt4/ChangeLocRequest.java +++ b/client/src/main/java/rt4/ChangeLocRequest.java @@ -138,15 +138,15 @@ public final class ChangeLocRequest extends Node { } } - @OriginalMember(owner = "client!il", name = "a", descriptor = "(BII)Z") - public static boolean method3557(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - if (arg1 == 11) { - arg1 = 10; - } - if (arg1 >= 5 && arg1 <= 8) { - arg1 = 4; - } - @Pc(30) LocType local30 = LocTypeList.get(arg0); - return local30.isReady(arg1); - } + @OriginalMember(owner = "client!il", name = "a", descriptor = "(BII)Z") + public static boolean method3557(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + if (arg1 == 11) { + arg1 = 10; + } + if (arg1 >= 5 && arg1 <= 8) { + arg1 = 4; + } + @Pc(30) LocType local30 = LocTypeList.get(arg0); + return local30.isReady(arg1); + } } diff --git a/client/src/main/java/rt4/Chat.java b/client/src/main/java/rt4/Chat.java index 2291422..cdb3b32 100644 --- a/client/src/main/java/rt4/Chat.java +++ b/client/src/main/java/rt4/Chat.java @@ -5,56 +5,56 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Chat { - @OriginalMember(owner = "client!ca", name = "eb", descriptor = "[I") + @OriginalMember(owner = "client!ca", name = "eb", descriptor = "[I") public static final int[] types = new int[100]; - @OriginalMember(owner = "client!fb", name = "l", descriptor = "[Lclient!na;") - public static final JagString[] clans = new JagString[100]; - @OriginalMember(owner = "client!sj", name = "q", descriptor = "[Lclient!na;") - public static final JagString[] messages = new JagString[100]; - @OriginalMember(owner = "client!th", name = "l", descriptor = "[I") - public static final int[] phraseIds = new int[100]; - @OriginalMember(owner = "client!mc", name = "Y", descriptor = "[Lclient!na;") + @OriginalMember(owner = "client!fb", name = "l", descriptor = "[Lclient!na;") + public static final JagString[] clans = new JagString[100]; + @OriginalMember(owner = "client!sj", name = "q", descriptor = "[Lclient!na;") + public static final JagString[] messages = new JagString[100]; + @OriginalMember(owner = "client!th", name = "l", descriptor = "[I") + public static final int[] phraseIds = new int[100]; + @OriginalMember(owner = "client!mc", name = "Y", descriptor = "[Lclient!na;") public static final JagString[] names = new JagString[100]; - @OriginalMember(owner = "client!t", name = "w", descriptor = "[J") - public static final long[] recentMessages = new long[100]; - @OriginalMember(owner = "client!dm", name = "u", descriptor = "I") - public static int transmitAt = 0; - @OriginalMember(owner = "client!f", name = "Z", descriptor = "I") - public static int size = 0; - @OriginalMember(owner = "client!gk", name = "i", descriptor = "I") - public static int tradeFilter = 0; - @OriginalMember(owner = "client!dm", name = "m", descriptor = "I") - public static int privateFilter = 0; - @OriginalMember(owner = "client!ej", name = "U", descriptor = "I") - public static int publicFilter = 0; - @OriginalMember(owner = "client!ug", name = "e", descriptor = "I") - public static int messageCounter = 0; + @OriginalMember(owner = "client!t", name = "w", descriptor = "[J") + public static final long[] recentMessages = new long[100]; + @OriginalMember(owner = "client!dm", name = "u", descriptor = "I") + public static int transmitAt = 0; + @OriginalMember(owner = "client!f", name = "Z", descriptor = "I") + public static int size = 0; + @OriginalMember(owner = "client!gk", name = "i", descriptor = "I") + public static int tradeFilter = 0; + @OriginalMember(owner = "client!dm", name = "m", descriptor = "I") + public static int privateFilter = 0; + @OriginalMember(owner = "client!ej", name = "U", descriptor = "I") + public static int publicFilter = 0; + @OriginalMember(owner = "client!ug", name = "e", descriptor = "I") + public static int messageCounter = 0; - @OriginalMember(owner = "client!md", name = "a", descriptor = "(IILclient!na;Lclient!na;BLclient!na;)V") - public static void add(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString arg2, @OriginalArg(3) JagString arg3, @OriginalArg(5) JagString arg4) { - for (@Pc(14) int local14 = 99; local14 > 0; local14--) { - types[local14] = types[local14 - 1]; - names[local14] = names[local14 - 1]; - messages[local14] = messages[local14 - 1]; - clans[local14] = clans[local14 - 1]; - phraseIds[local14] = phraseIds[local14 - 1]; - } - size++; - types[0] = arg1; - names[0] = arg4; - transmitAt = InterfaceList.transmitTimer; - phraseIds[0] = arg0; - messages[0] = arg2; - clans[0] = arg3; - } + @OriginalMember(owner = "client!md", name = "a", descriptor = "(IILclient!na;Lclient!na;BLclient!na;)V") + public static void add(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString arg2, @OriginalArg(3) JagString arg3, @OriginalArg(5) JagString arg4) { + for (@Pc(14) int local14 = 99; local14 > 0; local14--) { + types[local14] = types[local14 - 1]; + names[local14] = names[local14 - 1]; + messages[local14] = messages[local14 - 1]; + clans[local14] = clans[local14 - 1]; + phraseIds[local14] = phraseIds[local14 - 1]; + } + size++; + types[0] = arg1; + names[0] = arg4; + transmitAt = InterfaceList.transmitTimer; + phraseIds[0] = arg0; + messages[0] = arg2; + clans[0] = arg3; + } - @OriginalMember(owner = "client!i", name = "a", descriptor = "(Lclient!na;ILclient!na;I)V") - public static void add(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString arg2) { - add(-1, arg1, arg2, null, arg0); - } + @OriginalMember(owner = "client!i", name = "a", descriptor = "(Lclient!na;ILclient!na;I)V") + public static void add(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString arg2) { + add(-1, arg1, arg2, null, arg0); + } - @OriginalMember(owner = "client!fm", name = "a", descriptor = "(ILclient!na;Lclient!na;Lclient!na;I)V") - public static void method1598(@OriginalArg(1) JagString arg0, @OriginalArg(2) JagString arg1, @OriginalArg(3) JagString arg2) { - add(-1, 9, arg0, arg2, arg1); - } + @OriginalMember(owner = "client!fm", name = "a", descriptor = "(ILclient!na;Lclient!na;Lclient!na;I)V") + public static void method1598(@OriginalArg(1) JagString arg0, @OriginalArg(2) JagString arg1, @OriginalArg(3) JagString arg2) { + add(-1, 9, arg0, arg2, arg1); + } } diff --git a/client/src/main/java/rt4/Cheat.java b/client/src/main/java/rt4/Cheat.java index 60f2469..cf744a5 100644 --- a/client/src/main/java/rt4/Cheat.java +++ b/client/src/main/java/rt4/Cheat.java @@ -5,231 +5,231 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Cheat { - @OriginalMember(owner = "client!p", name = "f", descriptor = "Lclient!na;") - public static final JagString JS5DROP = JagString.parse("::serverjs5drop"); - @OriginalMember(owner = "client!v", name = "d", descriptor = "Lclient!na;") - public static final JagString CLIENTDROP = JagString.parse("::clientdrop"); - @OriginalMember(owner = "client!dg", name = "b", descriptor = "Lclient!na;") - public static final JagString aClass100_333 = JagString.parse("Shift)2click ENABLED(Q"); - @OriginalMember(owner = "client!nh", name = "hb", descriptor = "Lclient!na;") - public static final JagString COMMAND_FPS = JagString.parse("::fps "); - @OriginalMember(owner = "client!nb", name = "e", descriptor = "Lclient!na;") - public static final JagString BREAKCON = JagString.parse("::breakcon"); - @OriginalMember(owner = "client!wf", name = "s", descriptor = "Lclient!na;") - public static final JagString aClass100_943 = JagString.parse("Forced tweening disabled)3"); - @OriginalMember(owner = "client!wd", name = "f", descriptor = "Lclient!na;") - public static final JagString ERROR_TEST = JagString.parse("::errortest"); - @OriginalMember(owner = "client!wb", name = "j", descriptor = "Lclient!na;") - public static final JagString aClass100_1093 = JagString.parse("Memory after cleanup="); - @OriginalMember(owner = "client!th", name = "h", descriptor = "Lclient!na;") - public static final JagString PARTICLES = JagString.parse("::setparticles"); - @OriginalMember(owner = "client!rc", name = "K", descriptor = "Lclient!na;") - public static final JagString RECT_DEBUG = JagString.parse("::rect_debug"); - @OriginalMember(owner = "client!hh", name = "b", descriptor = "Lclient!na;") - public static final JagString aClass100_521 = JagString.parse("::tele "); - @OriginalMember(owner = "client!hh", name = "k", descriptor = "Lclient!na;") - public static final JagString WM0 = JagString.parse("::wm0"); - @OriginalMember(owner = "client!tg", name = "i", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!p", name = "f", descriptor = "Lclient!na;") + public static final JagString JS5DROP = JagString.parse("::serverjs5drop"); + @OriginalMember(owner = "client!v", name = "d", descriptor = "Lclient!na;") + public static final JagString CLIENTDROP = JagString.parse("::clientdrop"); + @OriginalMember(owner = "client!dg", name = "b", descriptor = "Lclient!na;") + public static final JagString aClass100_333 = JagString.parse("Shift)2click ENABLED(Q"); + @OriginalMember(owner = "client!nh", name = "hb", descriptor = "Lclient!na;") + public static final JagString COMMAND_FPS = JagString.parse("::fps "); + @OriginalMember(owner = "client!nb", name = "e", descriptor = "Lclient!na;") + public static final JagString BREAKCON = JagString.parse("::breakcon"); + @OriginalMember(owner = "client!wf", name = "s", descriptor = "Lclient!na;") + public static final JagString aClass100_943 = JagString.parse("Forced tweening disabled)3"); + @OriginalMember(owner = "client!wd", name = "f", descriptor = "Lclient!na;") + public static final JagString ERROR_TEST = JagString.parse("::errortest"); + @OriginalMember(owner = "client!wb", name = "j", descriptor = "Lclient!na;") + public static final JagString aClass100_1093 = JagString.parse("Memory after cleanup="); + @OriginalMember(owner = "client!th", name = "h", descriptor = "Lclient!na;") + public static final JagString PARTICLES = JagString.parse("::setparticles"); + @OriginalMember(owner = "client!rc", name = "K", descriptor = "Lclient!na;") + public static final JagString RECT_DEBUG = JagString.parse("::rect_debug"); + @OriginalMember(owner = "client!hh", name = "b", descriptor = "Lclient!na;") + public static final JagString aClass100_521 = JagString.parse("::tele "); + @OriginalMember(owner = "client!hh", name = "k", descriptor = "Lclient!na;") + public static final JagString WM0 = JagString.parse("::wm0"); + @OriginalMember(owner = "client!tg", name = "i", descriptor = "Lclient!na;") public static final JagString PCACHESIZE = JagString.parse("::pcachesize"); - @OriginalMember(owner = "client!fh", name = "ab", descriptor = "Lclient!na;") - public static final JagString NOCLIP = JagString.parse("::noclip"); - @OriginalMember(owner = "client!en", name = "e", descriptor = "Lclient!na;") - public static final JagString FPSOFF = JagString.parse("::fpsoff"); - @OriginalMember(owner = "client!ja", name = "k", descriptor = "Lclient!na;") - public static final JagString DEBUG_FPS = JagString.parse("FPS: "); - @OriginalMember(owner = "client!qh", name = "i", descriptor = "Lclient!na;") - public static final JagString DEBUG_MEMORY = JagString.parse("RAM: "); - @OriginalMember(owner = "client!bi", name = "W", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!fh", name = "ab", descriptor = "Lclient!na;") + public static final JagString NOCLIP = JagString.parse("::noclip"); + @OriginalMember(owner = "client!en", name = "e", descriptor = "Lclient!na;") + public static final JagString FPSOFF = JagString.parse("::fpsoff"); + @OriginalMember(owner = "client!ja", name = "k", descriptor = "Lclient!na;") + public static final JagString DEBUG_FPS = JagString.parse("FPS: "); + @OriginalMember(owner = "client!qh", name = "i", descriptor = "Lclient!na;") + public static final JagString DEBUG_MEMORY = JagString.parse("RAM: "); + @OriginalMember(owner = "client!bi", name = "W", descriptor = "Lclient!na;") public static final JagString DEBUG_MEMORY_UNIT = JagString.parse(" MB"); - @OriginalMember(owner = "client!dg", name = "d", descriptor = "Lclient!na;") - public static final JagString DEBUG_CAHE = JagString.parse("Cache: "); - @OriginalMember(owner = "client!hm", name = "Y", descriptor = "Lclient!na;") - public static final JagString DEBUG_FPS2 = JagString.parse("FPS: "); - @OriginalMember(owner = "client!c", name = "Y", descriptor = "Lclient!na;") - public static final JagString DEBUG_MEM = JagString.parse("RAM: "); - @OriginalMember(owner = "client!bg", name = "z", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!dg", name = "d", descriptor = "Lclient!na;") + public static final JagString DEBUG_CAHE = JagString.parse("Cache: "); + @OriginalMember(owner = "client!hm", name = "Y", descriptor = "Lclient!na;") + public static final JagString DEBUG_FPS2 = JagString.parse("FPS: "); + @OriginalMember(owner = "client!c", name = "Y", descriptor = "Lclient!na;") + public static final JagString DEBUG_MEM = JagString.parse("RAM: "); + @OriginalMember(owner = "client!bg", name = "z", descriptor = "Lclient!na;") public static final JagString DEBUG_MEM_UNIT = JagString.parse(" MB"); - @OriginalMember(owner = "client!q", name = "h", descriptor = "Lclient!na;") - public static final JagString DEBUG_CARD = JagString.parse("GPU: "); - @OriginalMember(owner = "client!oi", name = "b", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!q", name = "h", descriptor = "Lclient!na;") + public static final JagString DEBUG_CARD = JagString.parse("GPU: "); + @OriginalMember(owner = "client!oi", name = "b", descriptor = "Lclient!na;") public static final JagString QA_OP_TEST = JagString.parse("::qa_op_test"); - @OriginalMember(owner = "client!jk", name = "F", descriptor = "Lclient!na;") - public static final JagString TWEENING = JagString.parse("::tween"); - @OriginalMember(owner = "client!j", name = "z", descriptor = "Lclient!na;") - public static final JagString SHIFTCLICK = JagString.parse("::shiftclick"); - @OriginalMember(owner = "client!qf", name = "N", descriptor = "Lclient!na;") - public static final JagString CARDMEM = JagString.parse("::cardmem"); - @OriginalMember(owner = "client!e", name = "Ac", descriptor = "Lclient!na;") - public static final JagString aClass100_362 = JagString.parse("Forced tweening ENABLED(Q"); - @OriginalMember(owner = "client!md", name = "T", descriptor = "Lclient!na;") - public static final JagString aClass100_736 = JagString.parse("Shift)2click disabled)3"); - @OriginalMember(owner = "client!wh", name = "o", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!jk", name = "F", descriptor = "Lclient!na;") + public static final JagString TWEENING = JagString.parse("::tween"); + @OriginalMember(owner = "client!j", name = "z", descriptor = "Lclient!na;") + public static final JagString SHIFTCLICK = JagString.parse("::shiftclick"); + @OriginalMember(owner = "client!qf", name = "N", descriptor = "Lclient!na;") + public static final JagString CARDMEM = JagString.parse("::cardmem"); + @OriginalMember(owner = "client!e", name = "Ac", descriptor = "Lclient!na;") + public static final JagString aClass100_362 = JagString.parse("Forced tweening ENABLED(Q"); + @OriginalMember(owner = "client!md", name = "T", descriptor = "Lclient!na;") + public static final JagString aClass100_736 = JagString.parse("Shift)2click disabled)3"); + @OriginalMember(owner = "client!wh", name = "o", descriptor = "Lclient!na;") public static final JagString RECT_DEBUG_EQUALS = JagString.parse("rect_debug="); - @OriginalMember(owner = "client!dh", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_335 = JagString.parse("Number of player models in cache:"); - @OriginalMember(owner = "client!qh", name = "c", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!dh", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_335 = JagString.parse("Number of player models in cache:"); + @OriginalMember(owner = "client!qh", name = "c", descriptor = "Lclient!na;") public static final JagString aClass100_893 = JagString.parse("Memory before cleanup="); - @OriginalMember(owner = "client!qg", name = "Z", descriptor = "Lclient!na;") - public static final JagString aClass100_892 = JagString.parse("mem="); - @OriginalMember(owner = "client!gg", name = "Y", descriptor = "Lclient!na;") - public static final JagString aClass100_476 = JagString.parse("::gc"); - @OriginalMember(owner = "client!wk", name = "u", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!qg", name = "Z", descriptor = "Lclient!na;") + public static final JagString aClass100_892 = JagString.parse("mem="); + @OriginalMember(owner = "client!gg", name = "Y", descriptor = "Lclient!na;") + public static final JagString aClass100_476 = JagString.parse("::gc"); + @OriginalMember(owner = "client!wk", name = "u", descriptor = "Lclient!na;") public static final JagString CLIENTJS5DROP = JagString.parse("::clientjs5drop"); - @OriginalMember(owner = "client!id", name = "c", descriptor = "Lclient!na;") - public static final JagString FPSON = JagString.parse("::fpson"); - @OriginalMember(owner = "client!md", name = "Q", descriptor = "Lclient!na;") - public static final JagString MM = JagString.parse("::mm"); - @OriginalMember(owner = "client!j", name = "M", descriptor = "Lclient!na;") - public static final JagString REPLACECANVAS = JagString.parse("::replacecanvas"); - @OriginalMember(owner = "client!li", name = "p", descriptor = "Lclient!na;") - public static final JagString REBUILD = JagString.parse("::rebuild"); - @OriginalMember(owner = "client!oi", name = "j", descriptor = "Lclient!na;") - public static final JagString WM1 = JagString.parse("::wm1"); - @OriginalMember(owner = "client!ql", name = "i", descriptor = "Lclient!na;") - public static final JagString WM2 = JagString.parse("::wm2"); - @OriginalMember(owner = "client!hk", name = "db", descriptor = "Lclient!na;") - public static final JagString WM3 = JagString.parse("::wm3"); - @OriginalMember(owner = "client!dg", name = "f", descriptor = "Z") - public static boolean displayFps = false; - @OriginalMember(owner = "client!nj", name = "a", descriptor = "Z") + @OriginalMember(owner = "client!id", name = "c", descriptor = "Lclient!na;") + public static final JagString FPSON = JagString.parse("::fpson"); + @OriginalMember(owner = "client!md", name = "Q", descriptor = "Lclient!na;") + public static final JagString MM = JagString.parse("::mm"); + @OriginalMember(owner = "client!j", name = "M", descriptor = "Lclient!na;") + public static final JagString REPLACECANVAS = JagString.parse("::replacecanvas"); + @OriginalMember(owner = "client!li", name = "p", descriptor = "Lclient!na;") + public static final JagString REBUILD = JagString.parse("::rebuild"); + @OriginalMember(owner = "client!oi", name = "j", descriptor = "Lclient!na;") + public static final JagString WM1 = JagString.parse("::wm1"); + @OriginalMember(owner = "client!ql", name = "i", descriptor = "Lclient!na;") + public static final JagString WM2 = JagString.parse("::wm2"); + @OriginalMember(owner = "client!hk", name = "db", descriptor = "Lclient!na;") + public static final JagString WM3 = JagString.parse("::wm3"); + @OriginalMember(owner = "client!dg", name = "f", descriptor = "Z") + public static boolean displayFps = false; + @OriginalMember(owner = "client!nj", name = "a", descriptor = "Z") public static boolean shiftClick = GlobalConfig.USE_SHIFT_CLICK; - @OriginalMember(owner = "client!qc", name = "U", descriptor = "I") - public static int rectDebug = 0; + @OriginalMember(owner = "client!qc", name = "U", descriptor = "I") + public static int rectDebug = 0; - @OriginalMember(owner = "client!en", name = "a", descriptor = "(IIIB)V") + @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) { - @Pc(66) JagString local66 = JagString.concatenate(new JagString[] { aClass100_521, JagString.parseInt(arg2), Static70.aClass100_760, JagString.parseInt(arg0 >> 6), Static70.aClass100_760, JagString.parseInt(arg1 >> 6), Static70.aClass100_760, JagString.parseInt(arg0 & 0x3F), Static70.aClass100_760, JagString.parseInt(arg1 & 0x3F) }); + @Pc(66) JagString local66 = JagString.concatenate(new JagString[]{aClass100_521, JagString.parseInt(arg2), Static70.aClass100_760, JagString.parseInt(arg0 >> 6), Static70.aClass100_760, JagString.parseInt(arg1 >> 6), Static70.aClass100_760, JagString.parseInt(arg0 & 0x3F), Static70.aClass100_760, JagString.parseInt(arg1 & 0x3F)}); local66.print(); execute(local66); } - @OriginalMember(owner = "client!k", name = "a", descriptor = "(Lclient!na;Z)V") - public static void execute(@OriginalArg(0) JagString arg0) { - if (LoginManager.staffModLevel >= 2) { - @Pc(18) int local18; - @Pc(38) int local38; - @Pc(29) Runtime local29; - if (arg0.equalsIgnoreCase(aClass100_476)) { - client.method2380(); - for (local18 = 0; local18 < 10; local18++) { - System.gc(); - } - local29 = Runtime.getRuntime(); - local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); - Chat.add(null, 0, JagString.concatenate(new JagString[] { aClass100_892, JagString.parseInt(local38), DEBUG_MEM_UNIT})); - } - @Pc(117) int local117; - if (arg0.equalsIgnoreCase(MM)) { - client.method2380(); - for (local18 = 0; local18 < 10; local18++) { - System.gc(); - } - local29 = Runtime.getRuntime(); - local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); - Chat.add(null, 0, JagString.concatenate(new JagString[] { aClass100_893, JagString.parseInt(local38), DEBUG_MEM_UNIT})); - Player.method501(); - client.method2380(); - for (local117 = 0; local117 < 10; local117++) { - System.gc(); - } - local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); - Chat.add(null, 0, JagString.concatenate(new JagString[] {aClass100_1093, JagString.parseInt(local38), DEBUG_MEM_UNIT})); - } - if (arg0.equalsIgnoreCase(PCACHESIZE)) { - Chat.add(null, 0, JagString.concatenate(new JagString[] { aClass100_335, JagString.parseInt(PlayerAppearance.method1029()) })); - } - if (GlRenderer.enabled && arg0.equalsIgnoreCase(CARDMEM)) { - System.out.println("oncard_geometry:" + GlCleaner.onCardGeometry); - System.out.println("oncard_2d:" + GlCleaner.onCard2d); - System.out.println("oncard_texture:" + GlCleaner.onCardTexture); - } - if (arg0.equalsIgnoreCase(CLIENTDROP)) { - Protocol.method3279(); - } - if (arg0.equalsIgnoreCase(CLIENTJS5DROP)) { - client.js5NetQueue.quit(); - } - if (arg0.equalsIgnoreCase(JS5DROP)) { - client.js5NetQueue.drop(); - } - if (arg0.equalsIgnoreCase(BREAKCON)) { - GameShell.signLink.breakConnection(); - Protocol.socket.breakConnection(); - client.js5NetQueue.breakConnection(); - } - if (arg0.equalsIgnoreCase(REPLACECANVAS)) { - GameShell.replaceCanvas = true; - } - if (arg0.equalsIgnoreCase(REBUILD)) { - client.setGameState(25); - } - if (arg0.equalsIgnoreCase(FPSON)) { - displayFps = true; - } - if (arg0.equalsIgnoreCase(FPSOFF)) { - displayFps = false; - } - if (arg0.equalsIgnoreCase(WM0)) { - DisplayMode.setWindowMode(false, 0, -1, -1); - } - if (arg0.equalsIgnoreCase(WM1)) { - DisplayMode.setWindowMode(false, 1, -1, -1); - } - if (arg0.equalsIgnoreCase(WM2)) { - DisplayMode.setWindowMode(false, 2, -1, -1); - } - if (arg0.equalsIgnoreCase(WM3)) { - DisplayMode.setWindowMode(false, 3, 1024, 768); - } - if (arg0.equalsIgnoreCase(NOCLIP)) { - for (local18 = 0; local18 < 4; local18++) { - for (local38 = 1; local38 < 103; local38++) { - for (local117 = 1; local117 < 103; local117++) { - PathFinder.collisionMaps[local18].flags[local38][local117] = 0; - } - } - } - } - if (arg0.startsWith(PARTICLES)) { - Preferences.setParticles(arg0.substring(15).parseInt()); - Preferences.write(GameShell.signLink); - Preferences.sentToServer = false; - } - if (arg0.startsWith(COMMAND_FPS) && client.modeWhere != 0) { - GameShell.setFpsTarget(arg0.substring(6).parseInt()); - } - if (arg0.equalsIgnoreCase(ERROR_TEST)) { - throw new RuntimeException(); - } - if (arg0.startsWith(RECT_DEBUG)) { - rectDebug = arg0.substring(12).trim().parseInt(); - Chat.add(null, 0, JagString.concatenate(new JagString[] { RECT_DEBUG_EQUALS, JagString.parseInt(rectDebug) })); - } - if (arg0.equalsIgnoreCase(QA_OP_TEST)) { - Static121.qaOpTest = true; - } - if (arg0.equalsIgnoreCase(TWEENING)) { - if (SeqType.applyTweening) { - SeqType.applyTweening = false; - Chat.add(null, 0, aClass100_943); - } else { - SeqType.applyTweening = true; - Chat.add(null, 0, aClass100_362); - } - } - if (arg0.equalsIgnoreCase(SHIFTCLICK)) { - if (shiftClick) { - aClass100_736.print(); - shiftClick = false; - } else { - aClass100_333.print(); - shiftClick = true; - } - } - } - Protocol.outboundBuffer.p1isaac(44); - Protocol.outboundBuffer.p1(arg0.length() - 1); - Protocol.outboundBuffer.pjstr(arg0.substring(2)); - } + @OriginalMember(owner = "client!k", name = "a", descriptor = "(Lclient!na;Z)V") + public static void execute(@OriginalArg(0) JagString arg0) { + if (LoginManager.staffModLevel >= 2) { + @Pc(18) int local18; + @Pc(38) int local38; + @Pc(29) Runtime local29; + if (arg0.equalsIgnoreCase(aClass100_476)) { + client.method2380(); + for (local18 = 0; local18 < 10; local18++) { + System.gc(); + } + local29 = Runtime.getRuntime(); + local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); + Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_892, JagString.parseInt(local38), DEBUG_MEM_UNIT})); + } + @Pc(117) int local117; + if (arg0.equalsIgnoreCase(MM)) { + client.method2380(); + for (local18 = 0; local18 < 10; local18++) { + System.gc(); + } + local29 = Runtime.getRuntime(); + local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); + Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_893, JagString.parseInt(local38), DEBUG_MEM_UNIT})); + Player.method501(); + client.method2380(); + for (local117 = 0; local117 < 10; local117++) { + System.gc(); + } + local38 = (int) ((local29.totalMemory() - local29.freeMemory()) / 1024L); + Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_1093, JagString.parseInt(local38), DEBUG_MEM_UNIT})); + } + if (arg0.equalsIgnoreCase(PCACHESIZE)) { + Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_335, JagString.parseInt(PlayerAppearance.method1029())})); + } + if (GlRenderer.enabled && arg0.equalsIgnoreCase(CARDMEM)) { + System.out.println("oncard_geometry:" + GlCleaner.onCardGeometry); + System.out.println("oncard_2d:" + GlCleaner.onCard2d); + System.out.println("oncard_texture:" + GlCleaner.onCardTexture); + } + if (arg0.equalsIgnoreCase(CLIENTDROP)) { + Protocol.method3279(); + } + if (arg0.equalsIgnoreCase(CLIENTJS5DROP)) { + client.js5NetQueue.quit(); + } + if (arg0.equalsIgnoreCase(JS5DROP)) { + client.js5NetQueue.drop(); + } + if (arg0.equalsIgnoreCase(BREAKCON)) { + GameShell.signLink.breakConnection(); + Protocol.socket.breakConnection(); + client.js5NetQueue.breakConnection(); + } + if (arg0.equalsIgnoreCase(REPLACECANVAS)) { + GameShell.replaceCanvas = true; + } + if (arg0.equalsIgnoreCase(REBUILD)) { + client.setGameState(25); + } + if (arg0.equalsIgnoreCase(FPSON)) { + displayFps = true; + } + if (arg0.equalsIgnoreCase(FPSOFF)) { + displayFps = false; + } + if (arg0.equalsIgnoreCase(WM0)) { + DisplayMode.setWindowMode(false, 0, -1, -1); + } + if (arg0.equalsIgnoreCase(WM1)) { + DisplayMode.setWindowMode(false, 1, -1, -1); + } + if (arg0.equalsIgnoreCase(WM2)) { + DisplayMode.setWindowMode(false, 2, -1, -1); + } + if (arg0.equalsIgnoreCase(WM3)) { + DisplayMode.setWindowMode(false, 3, 1024, 768); + } + if (arg0.equalsIgnoreCase(NOCLIP)) { + for (local18 = 0; local18 < 4; local18++) { + for (local38 = 1; local38 < 103; local38++) { + for (local117 = 1; local117 < 103; local117++) { + PathFinder.collisionMaps[local18].flags[local38][local117] = 0; + } + } + } + } + if (arg0.startsWith(PARTICLES)) { + Preferences.setParticles(arg0.substring(15).parseInt()); + Preferences.write(GameShell.signLink); + Preferences.sentToServer = false; + } + if (arg0.startsWith(COMMAND_FPS) && client.modeWhere != 0) { + GameShell.setFpsTarget(arg0.substring(6).parseInt()); + } + if (arg0.equalsIgnoreCase(ERROR_TEST)) { + throw new RuntimeException(); + } + if (arg0.startsWith(RECT_DEBUG)) { + rectDebug = arg0.substring(12).trim().parseInt(); + Chat.add(null, 0, JagString.concatenate(new JagString[]{RECT_DEBUG_EQUALS, JagString.parseInt(rectDebug)})); + } + if (arg0.equalsIgnoreCase(QA_OP_TEST)) { + Static121.qaOpTest = true; + } + if (arg0.equalsIgnoreCase(TWEENING)) { + if (SeqType.applyTweening) { + SeqType.applyTweening = false; + Chat.add(null, 0, aClass100_943); + } else { + SeqType.applyTweening = true; + Chat.add(null, 0, aClass100_362); + } + } + if (arg0.equalsIgnoreCase(SHIFTCLICK)) { + if (shiftClick) { + aClass100_736.print(); + shiftClick = false; + } else { + aClass100_333.print(); + shiftClick = true; + } + } + } + Protocol.outboundBuffer.p1isaac(44); + Protocol.outboundBuffer.p1(arg0.length() - 1); + Protocol.outboundBuffer.pjstr(arg0.substring(2)); + } } diff --git a/client/src/main/java/rt4/ClanChat.java b/client/src/main/java/rt4/ClanChat.java index 53dc0e1..f6c46fc 100644 --- a/client/src/main/java/rt4/ClanChat.java +++ b/client/src/main/java/rt4/ClanChat.java @@ -5,36 +5,36 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ClanChat { - @OriginalMember(owner = "client!wj", name = "l", descriptor = "I") - public static int transmitAt = 0; - @OriginalMember(owner = "client!mj", name = "u", descriptor = "B") - public static byte rank; - @OriginalMember(owner = "client!e", name = "rc", descriptor = "B") - public static byte minKick; - @OriginalMember(owner = "client!wb", name = "m", descriptor = "Lclient!na;") - public static JagString owner = null; - @OriginalMember(owner = "client!be", name = "ac", descriptor = "Lclient!na;") - public static JagString name = null; - @OriginalMember(owner = "client!rg", name = "y", descriptor = "I") - public static int size; - @OriginalMember(owner = "client!qc", name = "bb", descriptor = "[Lclient!kl;") - public static ClanMember[] members; + @OriginalMember(owner = "client!wj", name = "l", descriptor = "I") + public static int transmitAt = 0; + @OriginalMember(owner = "client!mj", name = "u", descriptor = "B") + public static byte rank; + @OriginalMember(owner = "client!e", name = "rc", descriptor = "B") + public static byte minKick; + @OriginalMember(owner = "client!wb", name = "m", descriptor = "Lclient!na;") + public static JagString owner = null; + @OriginalMember(owner = "client!be", name = "ac", descriptor = "Lclient!na;") + public static JagString name = null; + @OriginalMember(owner = "client!rg", name = "y", descriptor = "I") + public static int size; + @OriginalMember(owner = "client!qc", name = "bb", descriptor = "[Lclient!kl;") + public static ClanMember[] members; - @OriginalMember(owner = "client!kh", name = "b", descriptor = "(I)V") - public static void leave() { - Protocol.outboundBuffer.p1isaac(104); - Protocol.outboundBuffer.p8(0L); - } + @OriginalMember(owner = "client!kh", name = "b", descriptor = "(I)V") + public static void leave() { + Protocol.outboundBuffer.p1isaac(104); + Protocol.outboundBuffer.p8(0L); + } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "(JI)V") - public static void join(@OriginalArg(0) long arg0) { - if ((long) 0 != arg0) { - Protocol.outboundBuffer.p1isaac(104); - Protocol.outboundBuffer.p8(arg0); - } - } + @OriginalMember(owner = "client!mf", name = "a", descriptor = "(JI)V") + public static void join(@OriginalArg(0) long arg0) { + if ((long) 0 != arg0) { + Protocol.outboundBuffer.p1isaac(104); + Protocol.outboundBuffer.p8(arg0); + } + } - @OriginalMember(owner = "client!od", name = "a", descriptor = "(ILclient!na;)V") + @OriginalMember(owner = "client!od", name = "a", descriptor = "(ILclient!na;)V") public static void kick(@OriginalArg(1) JagString arg0) { if (members == null) { return; diff --git a/client/src/main/java/rt4/ClientProt.java b/client/src/main/java/rt4/ClientProt.java index 94d49a3..27023a9 100644 --- a/client/src/main/java/rt4/ClientProt.java +++ b/client/src/main/java/rt4/ClientProt.java @@ -7,431 +7,431 @@ import org.openrs2.deob.annotation.Pc; import java.io.IOException; public class ClientProt { - @OriginalMember(owner = "client!e", name = "Dc", descriptor = "Lclient!na;") - public static final JagString aClass100_363 = JagString.parse("_labels"); - @OriginalMember(owner = "client!bh", name = "C", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!e", name = "Dc", descriptor = "Lclient!na;") + public static final JagString aClass100_363 = JagString.parse("_labels"); + @OriginalMember(owner = "client!bh", name = "C", descriptor = "Lclient!na;") public static final JagString COMPLETE_PERCENT = JagString.parse("
(X100(U(Y"); - @OriginalMember(owner = "client!wc", name = "g", descriptor = "I") - public static int anInt5804 = 0; - @OriginalMember(owner = "client!nm", name = "U", descriptor = "I") - public static int mapFilesMissingCount = 0; + @OriginalMember(owner = "client!wc", name = "g", descriptor = "I") + public static int anInt5804 = 0; + @OriginalMember(owner = "client!nm", name = "U", descriptor = "I") + public static int mapFilesMissingCount = 0; - @OriginalMember(owner = "client!vg", name = "a", descriptor = "(Lclient!na;IIBI)V") - public static void method4512(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { - @Pc(8) Component local8 = InterfaceList.method1418(arg3, arg1); - if (local8 == null) { - return; - } - if (local8.onOptionClick != null) { - @Pc(19) HookRequest local19 = new HookRequest(); - local19.arguments = local8.onOptionClick; - local19.source = local8; - local19.opBase = arg0; - local19.op = arg2; - ScriptRunner.run(local19); - } - @Pc(37) boolean local37 = true; - if (local8.clientCode > 0) { - local37 = MiniMenu.method4265(local8); - } - if (!local37 || !InterfaceList.getServerActiveProperties(local8).method503(arg2 - 1)) { - return; - } - if (arg2 == 1) { - Protocol.outboundBuffer.p1isaac(155); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 2) { - Protocol.outboundBuffer.p1isaac(196); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 3) { - Protocol.outboundBuffer.p1isaac(124); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 4) { - Protocol.outboundBuffer.p1isaac(199); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 5) { - Protocol.outboundBuffer.p1isaac(234); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 6) { - Protocol.outboundBuffer.p1isaac(168); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 7) { - Protocol.outboundBuffer.p1isaac(166); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 8) { - Protocol.outboundBuffer.p1isaac(64); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 9) { - Protocol.outboundBuffer.p1isaac(53); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - if (arg2 == 10) { - Protocol.outboundBuffer.p1isaac(9); - Protocol.outboundBuffer.p4(arg3); - Protocol.outboundBuffer.p2(arg1); - } - } + @OriginalMember(owner = "client!vg", name = "a", descriptor = "(Lclient!na;IIBI)V") + public static void method4512(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { + @Pc(8) Component local8 = InterfaceList.method1418(arg3, arg1); + if (local8 == null) { + return; + } + if (local8.onOptionClick != null) { + @Pc(19) HookRequest local19 = new HookRequest(); + local19.arguments = local8.onOptionClick; + local19.source = local8; + local19.opBase = arg0; + local19.op = arg2; + ScriptRunner.run(local19); + } + @Pc(37) boolean local37 = true; + if (local8.clientCode > 0) { + local37 = MiniMenu.method4265(local8); + } + if (!local37 || !InterfaceList.getServerActiveProperties(local8).method503(arg2 - 1)) { + return; + } + if (arg2 == 1) { + Protocol.outboundBuffer.p1isaac(155); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 2) { + Protocol.outboundBuffer.p1isaac(196); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 3) { + Protocol.outboundBuffer.p1isaac(124); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 4) { + Protocol.outboundBuffer.p1isaac(199); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 5) { + Protocol.outboundBuffer.p1isaac(234); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 6) { + Protocol.outboundBuffer.p1isaac(168); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 7) { + Protocol.outboundBuffer.p1isaac(166); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 8) { + Protocol.outboundBuffer.p1isaac(64); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 9) { + Protocol.outboundBuffer.p1isaac(53); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + if (arg2 == 10) { + Protocol.outboundBuffer.p1isaac(9); + Protocol.outboundBuffer.p4(arg3); + Protocol.outboundBuffer.p2(arg1); + } + } - @OriginalMember(owner = "client!pi", name = "c", descriptor = "(III)V") - public static void method3502(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(13) int local13 = arg0; - if (arg0 > 25) { - local13 = 25; - } - arg0--; - @Pc(23) int local23 = PathFinder.queueX[arg0]; - @Pc(27) int local27 = PathFinder.queueZ[arg0]; - if (arg1 == 0) { - Protocol.outboundBuffer.p1isaac(215); - Protocol.outboundBuffer.p1(local13 + local13 + 3); - } - if (arg1 == 1) { - Protocol.outboundBuffer.p1isaac(39); - Protocol.outboundBuffer.p1(local13 + local13 + 3 + 14); - } - if (arg1 == 2) { - Protocol.outboundBuffer.p1isaac(77); - Protocol.outboundBuffer.p1(local13 + local13 + 3); - } - Protocol.outboundBuffer.p1add(Keyboard.pressedKeys[Keyboard.KEY_CTRL] ? 1 : 0); - Protocol.outboundBuffer.p2(Camera.originX + local23); - Protocol.outboundBuffer.p2add(Camera.originZ + local27); - LoginManager.mapFlagZ = PathFinder.queueZ[0]; - LoginManager.mapFlagX = PathFinder.queueX[0]; - for (@Pc(126) int local126 = 1; local126 < local13; local126++) { - arg0--; - Protocol.outboundBuffer.p1add(PathFinder.queueX[arg0] - local23); - Protocol.outboundBuffer.p1sub(PathFinder.queueZ[arg0] - local27); - } - } + @OriginalMember(owner = "client!pi", name = "c", descriptor = "(III)V") + public static void method3502(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(13) int local13 = arg0; + if (arg0 > 25) { + local13 = 25; + } + arg0--; + @Pc(23) int local23 = PathFinder.queueX[arg0]; + @Pc(27) int local27 = PathFinder.queueZ[arg0]; + if (arg1 == 0) { + Protocol.outboundBuffer.p1isaac(215); + Protocol.outboundBuffer.p1(local13 + local13 + 3); + } + if (arg1 == 1) { + Protocol.outboundBuffer.p1isaac(39); + Protocol.outboundBuffer.p1(local13 + local13 + 3 + 14); + } + if (arg1 == 2) { + Protocol.outboundBuffer.p1isaac(77); + Protocol.outboundBuffer.p1(local13 + local13 + 3); + } + Protocol.outboundBuffer.p1add(Keyboard.pressedKeys[Keyboard.KEY_CTRL] ? 1 : 0); + Protocol.outboundBuffer.p2(Camera.originX + local23); + Protocol.outboundBuffer.p2add(Camera.originZ + local27); + LoginManager.mapFlagZ = PathFinder.queueZ[0]; + LoginManager.mapFlagX = PathFinder.queueX[0]; + for (@Pc(126) int local126 = 1; local126 < local13; local126++) { + arg0--; + Protocol.outboundBuffer.p1add(PathFinder.queueX[arg0] - local23); + Protocol.outboundBuffer.p1sub(PathFinder.queueZ[arg0] - local27); + } + } - @OriginalMember(owner = "client!mc", name = "f", descriptor = "(B)V") - public static void closeWidget() { - Protocol.outboundBuffer.p1isaac(184); - for (@Pc(18) ComponentPointer local18 = (ComponentPointer) InterfaceList.openInterfaces.head(); local18 != null; local18 = (ComponentPointer) InterfaceList.openInterfaces.next()) { - if (local18.anInt5879 == 0) { - InterfaceList.closeInterface(true, local18); - } - } - if (Static44.aClass13_10 != null) { - InterfaceList.redraw(Static44.aClass13_10); - Static44.aClass13_10 = null; - } - } + @OriginalMember(owner = "client!mc", name = "f", descriptor = "(B)V") + public static void closeWidget() { + Protocol.outboundBuffer.p1isaac(184); + for (@Pc(18) ComponentPointer local18 = (ComponentPointer) InterfaceList.openInterfaces.head(); local18 != null; local18 = (ComponentPointer) InterfaceList.openInterfaces.next()) { + if (local18.anInt5879 == 0) { + InterfaceList.closeInterface(true, local18); + } + } + if (Static44.aClass13_10 != null) { + InterfaceList.redraw(Static44.aClass13_10); + Static44.aClass13_10 = null; + } + } - @OriginalMember(owner = "client!wh", name = "a", descriptor = "(IILclient!na;)V") - public static void clickPlayerOption(@OriginalArg(0) int arg0, @OriginalArg(2) JagString arg1) { - @Pc(7) JagString local7 = arg1.method3159().toTitleCase(); - @Pc(13) boolean local13 = false; - for (@Pc(15) int local15 = 0; local15 < PlayerList.size; local15++) { - @Pc(28) Player local28 = PlayerList.players[PlayerList.ids[local15]]; - if (local28 != null && local28.username != null && local28.username.equalsIgnoreCase(local7)) { - local13 = true; - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local28.movementQueueX[0], 1, 0, 2, local28.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - if (arg0 == 1) { - Protocol.outboundBuffer.p1isaac(68); - Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); - } else if (arg0 == 4) { - Protocol.outboundBuffer.p1isaac(180); - Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); - } else if (arg0 == 5) { - Protocol.outboundBuffer.p1isaac(4); - Protocol.outboundBuffer.ip2(PlayerList.ids[local15]); - } else if (arg0 == 6) { - Protocol.outboundBuffer.p1isaac(133); - Protocol.outboundBuffer.ip2(PlayerList.ids[local15]); - } else if (arg0 == 7) { - Protocol.outboundBuffer.p1isaac(114); - Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); - } - break; - } - } - if (!local13) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { LocalizedText.UNABLETOFIND, local7 })); - } - } + @OriginalMember(owner = "client!wh", name = "a", descriptor = "(IILclient!na;)V") + public static void clickPlayerOption(@OriginalArg(0) int arg0, @OriginalArg(2) JagString arg1) { + @Pc(7) JagString local7 = arg1.method3159().toTitleCase(); + @Pc(13) boolean local13 = false; + for (@Pc(15) int local15 = 0; local15 < PlayerList.size; local15++) { + @Pc(28) Player local28 = PlayerList.players[PlayerList.ids[local15]]; + if (local28 != null && local28.username != null && local28.username.equalsIgnoreCase(local7)) { + local13 = true; + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local28.movementQueueX[0], 1, 0, 2, local28.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + if (arg0 == 1) { + Protocol.outboundBuffer.p1isaac(68); + Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); + } else if (arg0 == 4) { + Protocol.outboundBuffer.p1isaac(180); + Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); + } else if (arg0 == 5) { + Protocol.outboundBuffer.p1isaac(4); + Protocol.outboundBuffer.ip2(PlayerList.ids[local15]); + } else if (arg0 == 6) { + Protocol.outboundBuffer.p1isaac(133); + Protocol.outboundBuffer.ip2(PlayerList.ids[local15]); + } else if (arg0 == 7) { + Protocol.outboundBuffer.p1isaac(114); + Protocol.outboundBuffer.ip2add(PlayerList.ids[local15]); + } + break; + } + } + if (!local13) { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{LocalizedText.UNABLETOFIND, local7})); + } + } - @OriginalMember(owner = "client!gd", name = "c", descriptor = "(I)V") - public static void rebuildMap() { - ping(false); - mapFilesMissingCount = 0; - @Pc(12) boolean fileExists = true; - @Pc(14) int id; - for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) { - if (LoginManager.mapFileIds[id] != -1 && LoginManager.mapFilesBuffer[id] == null) { - LoginManager.mapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.mapFileIds[id], 0); - if (LoginManager.mapFilesBuffer[id] == null) { - mapFilesMissingCount++; - fileExists = false; - } - } - if (LoginManager.locationsMapFileIds[id] != -1 && LoginManager.locationMapFilesBuffer[id] == null) { - LoginManager.locationMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.locationsMapFileIds[id], LoginManager.regionsXteaKeys[id], 0); - if (LoginManager.locationMapFilesBuffer[id] == null) { - fileExists = false; - mapFilesMissingCount++; - } - } + @OriginalMember(owner = "client!gd", name = "c", descriptor = "(I)V") + public static void rebuildMap() { + ping(false); + mapFilesMissingCount = 0; + @Pc(12) boolean fileExists = true; + @Pc(14) int id; + for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) { + if (LoginManager.mapFileIds[id] != -1 && LoginManager.mapFilesBuffer[id] == null) { + LoginManager.mapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.mapFileIds[id], 0); + if (LoginManager.mapFilesBuffer[id] == null) { + mapFilesMissingCount++; + fileExists = false; + } + } + if (LoginManager.locationsMapFileIds[id] != -1 && LoginManager.locationMapFilesBuffer[id] == null) { + LoginManager.locationMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.locationsMapFileIds[id], LoginManager.regionsXteaKeys[id], 0); + if (LoginManager.locationMapFilesBuffer[id] == null) { + fileExists = false; + mapFilesMissingCount++; + } + } - if (GlRenderer.enabled) { - if (LoginManager.underWaterMapFileIds[id] != -1 && LoginManager.underWaterMapFilesBuffer[id] == null) { - LoginManager.underWaterMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterMapFileIds[id], 0); - if (LoginManager.underWaterMapFilesBuffer[id] == null) { - fileExists = false; - mapFilesMissingCount++; - } - } - if (LoginManager.underWaterLocationsMapFileIds[id] != -1 && LoginManager.underWaterLocationsMapFilesBuffer[id] == null) { - LoginManager.underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterLocationsMapFileIds[id], 0); - if (LoginManager.underWaterLocationsMapFilesBuffer[id] == null) { - mapFilesMissingCount++; - fileExists = false; - } - } - } + if (GlRenderer.enabled) { + if (LoginManager.underWaterMapFileIds[id] != -1 && LoginManager.underWaterMapFilesBuffer[id] == null) { + LoginManager.underWaterMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterMapFileIds[id], 0); + if (LoginManager.underWaterMapFilesBuffer[id] == null) { + fileExists = false; + mapFilesMissingCount++; + } + } + if (LoginManager.underWaterLocationsMapFileIds[id] != -1 && LoginManager.underWaterLocationsMapFilesBuffer[id] == null) { + LoginManager.underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterLocationsMapFileIds[id], 0); + if (LoginManager.underWaterLocationsMapFilesBuffer[id] == null) { + mapFilesMissingCount++; + fileExists = false; + } + } + } - if (LoginManager.npcSpawnsFileIds != null && LoginManager.npcSpawnsFilesBuffer[id] == null && LoginManager.npcSpawnsFileIds[id] != -1) { - LoginManager.npcSpawnsFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.npcSpawnsFileIds[id], LoginManager.regionsXteaKeys[id], 0); - if (LoginManager.npcSpawnsFilesBuffer[id] == null) { - mapFilesMissingCount++; - fileExists = false; - } - } - } + if (LoginManager.npcSpawnsFileIds != null && LoginManager.npcSpawnsFilesBuffer[id] == null && LoginManager.npcSpawnsFileIds[id] != -1) { + LoginManager.npcSpawnsFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.npcSpawnsFileIds[id], LoginManager.regionsXteaKeys[id], 0); + if (LoginManager.npcSpawnsFilesBuffer[id] == null) { + mapFilesMissingCount++; + fileExists = false; + } + } + } - if (LoginManager.mapElementList == null) { - if (LoginManager.map == null || !client.js5Archive23.isGroupNameValid(JagString.concatenate(new JagString[] { LoginManager.map.group, aClass100_363 }))) { - LoginManager.mapElementList = new MapElementList(0); - } else if (client.js5Archive23.isGroupReady(JagString.concatenate(new JagString[] { LoginManager.map.group, aClass100_363 }))) { - LoginManager.mapElementList = MapElementList.create(JagString.concatenate(new JagString[] { LoginManager.map.group, aClass100_363 }), client.js5Archive23); - } else { - fileExists = false; - mapFilesMissingCount++; - } - } + if (LoginManager.mapElementList == null) { + if (LoginManager.map == null || !client.js5Archive23.isGroupNameValid(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}))) { + LoginManager.mapElementList = new MapElementList(0); + } else if (client.js5Archive23.isGroupReady(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}))) { + LoginManager.mapElementList = MapElementList.create(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}), client.js5Archive23); + } else { + fileExists = false; + mapFilesMissingCount++; + } + } - if (!fileExists) { - Static233.loadingScreenState = 1; - return; - } + if (!fileExists) { + Static233.loadingScreenState = 1; + return; + } - anInt5804 = 0; - fileExists = true; - @Pc(320) int chunkX; - @Pc(309) int chunkZ; - for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) { - @Pc(294) byte[] local294 = LoginManager.locationMapFilesBuffer[id]; - if (local294 != null) { - chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ; - chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX; - if (LoginManager.dynamicMapRegion) { - chunkZ = 10; - chunkX = 10; - } - fileExists &= Static49.method1201(chunkX, chunkZ, local294); - } - if (GlRenderer.enabled) { - local294 = LoginManager.underWaterLocationsMapFilesBuffer[id]; - if (local294 != null) { - chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX; - chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ; - if (LoginManager.dynamicMapRegion) { - chunkZ = 10; - chunkX = 10; - } - fileExists &= Static49.method1201(chunkX, chunkZ, local294); - } - } - } - if (!fileExists) { - Static233.loadingScreenState = 2; - return; - } + anInt5804 = 0; + fileExists = true; + @Pc(320) int chunkX; + @Pc(309) int chunkZ; + for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) { + @Pc(294) byte[] local294 = LoginManager.locationMapFilesBuffer[id]; + if (local294 != null) { + chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ; + chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX; + if (LoginManager.dynamicMapRegion) { + chunkZ = 10; + chunkX = 10; + } + fileExists &= Static49.method1201(chunkX, chunkZ, local294); + } + if (GlRenderer.enabled) { + local294 = LoginManager.underWaterLocationsMapFilesBuffer[id]; + if (local294 != null) { + chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX; + chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ; + if (LoginManager.dynamicMapRegion) { + chunkZ = 10; + chunkX = 10; + } + fileExists &= Static49.method1201(chunkX, chunkZ, local294); + } + } + } + if (!fileExists) { + Static233.loadingScreenState = 2; + return; + } - if (Static233.loadingScreenState != 0) { - Static114.drawTextOnScreen(true, JagString.concatenate(new JagString[] { LocalizedText.LOADING, COMPLETE_PERCENT})); - } + if (Static233.loadingScreenState != 0) { + Static114.drawTextOnScreen(true, JagString.concatenate(new JagString[]{LocalizedText.LOADING, COMPLETE_PERCENT})); + } - client.audioLoop(); - client.method3768(); - @Pc(420) boolean hasUnderWaterMap = false; - @Pc(427) int i; - if (GlRenderer.enabled && Preferences.highWaterDetail) { - for (i = 0; i < LoginManager.mapFilesBuffer.length; i++) { - if (LoginManager.underWaterLocationsMapFilesBuffer[i] != null || LoginManager.underWaterMapFilesBuffer[i] != null) { - hasUnderWaterMap = true; - break; - } - } - } - SceneGraph.init(GlRenderer.enabled ? GlobalConfig.TILE_DISTANCE : 25, hasUnderWaterMap); - for (i = 0; i < 4; i++) { - PathFinder.collisionMaps[i].clear(); - } - for (i = 0; i < 4; i++) { - for (chunkX = 0; chunkX < 104; chunkX++) { - for (chunkZ = 0; chunkZ < 104; chunkZ++) { - SceneGraph.tileFlags[i][chunkX][chunkZ] = 0; - } - } - } - AreaSoundManager.clear(false); - if (GlRenderer.enabled) { - ShadowManager.shadowMapImage.clear(); - for (i = 0; i < 13; i++) { - for (chunkX = 0; chunkX < 13; chunkX++) { - ShadowManager.shadows[i][chunkX].outputToSprite = true; - } - } - } - if (GlRenderer.enabled) { - LightingManager.method2404(); - } - if (GlRenderer.enabled) { - setDefaultChunksAtmosphere(); - } - client.audioLoop(); - System.gc(); - ping(true); - SceneGraph.load(false); - if (!LoginManager.dynamicMapRegion) { - Static87.method1805(false); - ping(true); - if (GlRenderer.enabled) { - i = PlayerList.self.movementQueueX[0] >> 3; - chunkX = PlayerList.self.movementQueueZ[0] >> 3; - Static73.setLightPosition(chunkX, i); - } - LoginManager.method743(false); - if (LoginManager.npcSpawnsFilesBuffer != null) { - Static158.decodeNpcFiles(); - } - } - if (LoginManager.dynamicMapRegion) { - Static89.method1835(false); - ping(true); - if (GlRenderer.enabled) { - i = PlayerList.self.movementQueueX[0] >> 3; - chunkX = PlayerList.self.movementQueueZ[0] >> 3; - Static73.setLightPosition(chunkX, i); - } - Static233.method4002(false); - } - client.method3768(); - ping(true); - SceneGraph.method1169(PathFinder.collisionMaps, false); - if (GlRenderer.enabled) { - LightingManager.method2395(); - } - ping(true); - i = SceneGraph.firstVisibleLevel; - if (i > Player.level) { - i = Player.level; - } - if (i < Player.level - 1) { - } - if (SceneGraph.allLevelsAreVisible()) { - SceneGraph.method2750(0); - } else { - SceneGraph.method2750(SceneGraph.firstVisibleLevel); - } - SceneGraph.unload(); - if (GlRenderer.enabled && hasUnderWaterMap) { - SceneGraph.setUnderwater(true); - SceneGraph.load(true); - if (!LoginManager.dynamicMapRegion) { - Static87.method1805(true); - ping(true); - LoginManager.method743(true); - } - if (LoginManager.dynamicMapRegion) { - Static89.method1835(true); - ping(true); - Static233.method4002(true); - } - client.method3768(); - ping(true); - SceneGraph.method1169(PathFinder.collisionMaps, true); - ping(true); - SceneGraph.unload(); - SceneGraph.setUnderwater(false); - } - if (GlRenderer.enabled) { - for (chunkX = 0; chunkX < 13; chunkX++) { - for (chunkZ = 0; chunkZ < 13; chunkZ++) { - ShadowManager.shadows[chunkX][chunkZ].method4676(SceneGraph.tileHeights[0], chunkX * 8, chunkZ * 8); - } - } - } - for (chunkX = 0; chunkX < 104; chunkX++) { - for (chunkZ = 0; chunkZ < 104; chunkZ++) { - Protocol.spawnGroundObject(chunkZ, chunkX); - } - } - ScriptRunner.method2218(); - client.audioLoop(); - ChangeLocRequest.flush(); - client.method3768(); - Static231.aBoolean252 = false; - if (GameShell.frame != null && Protocol.socket != null && client.gameState == 25) { - Protocol.outboundBuffer.p1isaac(20); - Protocol.outboundBuffer.p4(1057001181); - } - if (!LoginManager.dynamicMapRegion) { - @Pc(815) int local815 = (LoginManager.centralZoneZ + 6) / 8; - @Pc(821) int local821 = (LoginManager.centralZoneZ - 6) / 8; - chunkX = (LoginManager.centralZoneX - 6) / 8; - chunkZ = (LoginManager.centralZoneX + 6) / 8; - for (@Pc(837) int local837 = chunkX - 1; local837 <= chunkZ + 1; local837++) { - for (@Pc(850) int local850 = local821 - 1; local850 <= local815 + 1; local850++) { - if (local837 < chunkX || local837 > chunkZ || local850 < local821 || local850 > local815) { - client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[] { LoginManager.aClass100_558, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) })); - client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[] { LoginManager.aClass100_1090, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) })); - } - } - } - } - if (client.gameState == 28) { - client.setGameState(10); - } else { - client.setGameState(30); - if (Protocol.socket != null) { - Protocol.outboundBuffer.p1isaac(110); - } - } - WorldMap.method2720(); - client.audioLoop(); - GameShell.resetTimer(); - } + client.audioLoop(); + client.method3768(); + @Pc(420) boolean hasUnderWaterMap = false; + @Pc(427) int i; + if (GlRenderer.enabled && Preferences.highWaterDetail) { + for (i = 0; i < LoginManager.mapFilesBuffer.length; i++) { + if (LoginManager.underWaterLocationsMapFilesBuffer[i] != null || LoginManager.underWaterMapFilesBuffer[i] != null) { + hasUnderWaterMap = true; + break; + } + } + } + SceneGraph.init(GlRenderer.enabled ? GlobalConfig.TILE_DISTANCE : 25, hasUnderWaterMap); + for (i = 0; i < 4; i++) { + PathFinder.collisionMaps[i].clear(); + } + for (i = 0; i < 4; i++) { + for (chunkX = 0; chunkX < 104; chunkX++) { + for (chunkZ = 0; chunkZ < 104; chunkZ++) { + SceneGraph.tileFlags[i][chunkX][chunkZ] = 0; + } + } + } + AreaSoundManager.clear(false); + if (GlRenderer.enabled) { + ShadowManager.shadowMapImage.clear(); + for (i = 0; i < 13; i++) { + for (chunkX = 0; chunkX < 13; chunkX++) { + ShadowManager.shadows[i][chunkX].outputToSprite = true; + } + } + } + if (GlRenderer.enabled) { + LightingManager.method2404(); + } + if (GlRenderer.enabled) { + setDefaultChunksAtmosphere(); + } + client.audioLoop(); + System.gc(); + ping(true); + SceneGraph.load(false); + if (!LoginManager.dynamicMapRegion) { + Static87.method1805(false); + ping(true); + if (GlRenderer.enabled) { + i = PlayerList.self.movementQueueX[0] >> 3; + chunkX = PlayerList.self.movementQueueZ[0] >> 3; + Static73.setLightPosition(chunkX, i); + } + LoginManager.method743(false); + if (LoginManager.npcSpawnsFilesBuffer != null) { + Static158.decodeNpcFiles(); + } + } + if (LoginManager.dynamicMapRegion) { + Static89.method1835(false); + ping(true); + if (GlRenderer.enabled) { + i = PlayerList.self.movementQueueX[0] >> 3; + chunkX = PlayerList.self.movementQueueZ[0] >> 3; + Static73.setLightPosition(chunkX, i); + } + Static233.method4002(false); + } + client.method3768(); + ping(true); + SceneGraph.method1169(PathFinder.collisionMaps, false); + if (GlRenderer.enabled) { + LightingManager.method2395(); + } + ping(true); + i = SceneGraph.firstVisibleLevel; + if (i > Player.level) { + i = Player.level; + } + if (i < Player.level - 1) { + } + if (SceneGraph.allLevelsAreVisible()) { + SceneGraph.method2750(0); + } else { + SceneGraph.method2750(SceneGraph.firstVisibleLevel); + } + SceneGraph.unload(); + if (GlRenderer.enabled && hasUnderWaterMap) { + SceneGraph.setUnderwater(true); + SceneGraph.load(true); + if (!LoginManager.dynamicMapRegion) { + Static87.method1805(true); + ping(true); + LoginManager.method743(true); + } + if (LoginManager.dynamicMapRegion) { + Static89.method1835(true); + ping(true); + Static233.method4002(true); + } + client.method3768(); + ping(true); + SceneGraph.method1169(PathFinder.collisionMaps, true); + ping(true); + SceneGraph.unload(); + SceneGraph.setUnderwater(false); + } + if (GlRenderer.enabled) { + for (chunkX = 0; chunkX < 13; chunkX++) { + for (chunkZ = 0; chunkZ < 13; chunkZ++) { + ShadowManager.shadows[chunkX][chunkZ].method4676(SceneGraph.tileHeights[0], chunkX * 8, chunkZ * 8); + } + } + } + for (chunkX = 0; chunkX < 104; chunkX++) { + for (chunkZ = 0; chunkZ < 104; chunkZ++) { + Protocol.spawnGroundObject(chunkZ, chunkX); + } + } + ScriptRunner.method2218(); + client.audioLoop(); + ChangeLocRequest.flush(); + client.method3768(); + Static231.aBoolean252 = false; + if (GameShell.frame != null && Protocol.socket != null && client.gameState == 25) { + Protocol.outboundBuffer.p1isaac(20); + Protocol.outboundBuffer.p4(1057001181); + } + if (!LoginManager.dynamicMapRegion) { + @Pc(815) int local815 = (LoginManager.centralZoneZ + 6) / 8; + @Pc(821) int local821 = (LoginManager.centralZoneZ - 6) / 8; + chunkX = (LoginManager.centralZoneX - 6) / 8; + chunkZ = (LoginManager.centralZoneX + 6) / 8; + for (@Pc(837) int local837 = chunkX - 1; local837 <= chunkZ + 1; local837++) { + for (@Pc(850) int local850 = local821 - 1; local850 <= local815 + 1; local850++) { + if (local837 < chunkX || local837 > chunkZ || local850 < local821 || local850 > local815) { + client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{LoginManager.aClass100_558, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850)})); + client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{LoginManager.aClass100_1090, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850)})); + } + } + } + } + if (client.gameState == 28) { + client.setGameState(10); + } else { + client.setGameState(30); + if (Protocol.socket != null) { + Protocol.outboundBuffer.p1isaac(110); + } + } + WorldMap.method2720(); + client.audioLoop(); + GameShell.resetTimer(); + } - @OriginalMember(owner = "client!ej", name = "i", descriptor = "(I)V") - public static void method1373() { - Protocol.outboundBuffer.p1isaac(243); - Protocol.outboundBuffer.p1(DisplayMode.getWindowMode()); - Protocol.outboundBuffer.p2(GameShell.canvasWidth); - Protocol.outboundBuffer.p2(GameShell.canvasHeight); - Protocol.outboundBuffer.p1(Preferences.antiAliasingMode); - } + @OriginalMember(owner = "client!ej", name = "i", descriptor = "(I)V") + public static void method1373() { + Protocol.outboundBuffer.p1isaac(243); + Protocol.outboundBuffer.p1(DisplayMode.getWindowMode()); + Protocol.outboundBuffer.p2(GameShell.canvasWidth); + Protocol.outboundBuffer.p2(GameShell.canvasHeight); + Protocol.outboundBuffer.p1(Preferences.antiAliasingMode); + } - @OriginalMember(owner = "client!ah", name = "a", descriptor = "(BZ)V") + @OriginalMember(owner = "client!ah", name = "a", descriptor = "(BZ)V") public static void ping(@OriginalArg(1) boolean arg0) { client.audioLoop(); if (client.gameState != 30 && client.gameState != 25) { @@ -454,82 +454,82 @@ public class ClientProt { client.audioLoop(); } - @OriginalMember(owner = "client!ac", name = "b", descriptor = "(I)V") - public static void method28() { - InterfaceList.redraw(Static40.aClass13_14); - Static40.anInt4851++; - if (Static44.aBoolean83 && Static146.aBoolean174) { - @Pc(30) int local30 = Mouse.lastMouseX; - local30 -= Static40.anInt5388; - if (Static81.anInt2225 > local30) { - local30 = Static81.anInt2225; - } - @Pc(41) int local41 = Mouse.lastMouseY; - if (Static81.anInt2225 + Static40.aClass13_1.width < local30 - -Static40.aClass13_14.width) { - local30 = Static81.anInt2225 + Static40.aClass13_1.width - Static40.aClass13_14.width; - } - local41 -= Static40.anInt4035; - if (local41 < InterfaceList.anInt5103) { - local41 = InterfaceList.anInt5103; - } - if (InterfaceList.anInt5103 + Static40.aClass13_1.height < local41 - -Static40.aClass13_14.height) { - local41 = InterfaceList.anInt5103 + Static40.aClass13_1.height - Static40.aClass13_14.height; - } - @Pc(109) int local109 = local41 - Static36.anInt660; - @Pc(114) int local114 = local30 - Static36.anInt3075; - @Pc(122) int local122 = local30 + Static40.aClass13_1.scrollX - Static81.anInt2225; - @Pc(130) int local130 = Static40.aClass13_1.scrollY + local41 - InterfaceList.anInt5103; - @Pc(133) int local133 = Static40.aClass13_14.dragDeadzone; - if (Static40.anInt4851 > Static40.aClass13_14.dragDeadtime && (local133 < local114 || -local133 > local114 || local109 > local133 || local109 < -local133)) { - Static40.aBoolean172 = true; - } - @Pc(176) HookRequest local176; - if (Static40.aClass13_14.onDragStart != null && Static40.aBoolean172) { - local176 = new HookRequest(); - local176.source = Static40.aClass13_14; - local176.arguments = Static40.aClass13_14.onDragStart; - local176.mouseX = local122; - local176.mouseY = local130; - ScriptRunner.run(local176); - } - if (Mouse.pressedButton == 0) { - if (Static40.aBoolean172) { - if (Static40.aClass13_14.onDragRelease != null) { - local176 = new HookRequest(); - local176.mouseY = local130; - local176.target = InterfaceList.aClass13_12; - local176.mouseX = local122; - local176.arguments = Static40.aClass13_14.onDragRelease; - local176.source = Static40.aClass13_14; - ScriptRunner.run(local176); - } - if (InterfaceList.aClass13_12 != null && Static36.method938(Static40.aClass13_14) != null) { - Protocol.outboundBuffer.p1isaac(79); - Protocol.outboundBuffer.mp4(Static40.aClass13_14.id); - Protocol.outboundBuffer.ip2(InterfaceList.aClass13_12.createdComponentId); - Protocol.outboundBuffer.p4(InterfaceList.aClass13_12.id); - Protocol.outboundBuffer.ip2(Static40.aClass13_14.createdComponentId); - } - } else if ((VarpDomain.anInt2952 == 1 || MiniMenu.method4640(MiniMenu.size - 1)) && MiniMenu.size > 2) { - Static226.method3901(); - } else if (MiniMenu.size > 0) { - Static59.method1372(); - } - Static40.aClass13_14 = null; - } - } else if (Static40.anInt4851 > 1) { - Static40.aClass13_14 = null; - } - } + @OriginalMember(owner = "client!ac", name = "b", descriptor = "(I)V") + public static void method28() { + InterfaceList.redraw(Static40.aClass13_14); + Static40.anInt4851++; + if (Static44.aBoolean83 && Static146.aBoolean174) { + @Pc(30) int local30 = Mouse.lastMouseX; + local30 -= Static40.anInt5388; + if (Static81.anInt2225 > local30) { + local30 = Static81.anInt2225; + } + @Pc(41) int local41 = Mouse.lastMouseY; + if (Static81.anInt2225 + Static40.aClass13_1.width < local30 - -Static40.aClass13_14.width) { + local30 = Static81.anInt2225 + Static40.aClass13_1.width - Static40.aClass13_14.width; + } + local41 -= Static40.anInt4035; + if (local41 < InterfaceList.anInt5103) { + local41 = InterfaceList.anInt5103; + } + if (InterfaceList.anInt5103 + Static40.aClass13_1.height < local41 - -Static40.aClass13_14.height) { + local41 = InterfaceList.anInt5103 + Static40.aClass13_1.height - Static40.aClass13_14.height; + } + @Pc(109) int local109 = local41 - Static36.anInt660; + @Pc(114) int local114 = local30 - Static36.anInt3075; + @Pc(122) int local122 = local30 + Static40.aClass13_1.scrollX - Static81.anInt2225; + @Pc(130) int local130 = Static40.aClass13_1.scrollY + local41 - InterfaceList.anInt5103; + @Pc(133) int local133 = Static40.aClass13_14.dragDeadzone; + if (Static40.anInt4851 > Static40.aClass13_14.dragDeadtime && (local133 < local114 || -local133 > local114 || local109 > local133 || local109 < -local133)) { + Static40.aBoolean172 = true; + } + @Pc(176) HookRequest local176; + if (Static40.aClass13_14.onDragStart != null && Static40.aBoolean172) { + local176 = new HookRequest(); + local176.source = Static40.aClass13_14; + local176.arguments = Static40.aClass13_14.onDragStart; + local176.mouseX = local122; + local176.mouseY = local130; + ScriptRunner.run(local176); + } + if (Mouse.pressedButton == 0) { + if (Static40.aBoolean172) { + if (Static40.aClass13_14.onDragRelease != null) { + local176 = new HookRequest(); + local176.mouseY = local130; + local176.target = InterfaceList.aClass13_12; + local176.mouseX = local122; + local176.arguments = Static40.aClass13_14.onDragRelease; + local176.source = Static40.aClass13_14; + ScriptRunner.run(local176); + } + if (InterfaceList.aClass13_12 != null && Static36.method938(Static40.aClass13_14) != null) { + Protocol.outboundBuffer.p1isaac(79); + Protocol.outboundBuffer.mp4(Static40.aClass13_14.id); + Protocol.outboundBuffer.ip2(InterfaceList.aClass13_12.createdComponentId); + Protocol.outboundBuffer.p4(InterfaceList.aClass13_12.id); + Protocol.outboundBuffer.ip2(Static40.aClass13_14.createdComponentId); + } + } else if ((VarpDomain.anInt2952 == 1 || MiniMenu.method4640(MiniMenu.size - 1)) && MiniMenu.size > 2) { + Static226.method3901(); + } else if (MiniMenu.size > 0) { + Static59.method1372(); + } + Static40.aClass13_14 = null; + } + } else if (Static40.anInt4851 > 1) { + Static40.aClass13_14 = null; + } + } - @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IZI)V") - public static void method10(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - Protocol.outboundBuffer.p1isaac(132); - Protocol.outboundBuffer.imp4(arg1); - Protocol.outboundBuffer.ip2(arg0); - } + @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IZI)V") + public static void method10(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + Protocol.outboundBuffer.p1isaac(132); + Protocol.outboundBuffer.imp4(arg1); + Protocol.outboundBuffer.ip2(arg0); + } - @OriginalMember(owner = "client!g", name = "b", descriptor = "(I)V") + @OriginalMember(owner = "client!g", name = "b", descriptor = "(I)V") public static void setDefaultChunksAtmosphere() { @Pc(9) Environment local9 = new Environment(); for (@Pc(18) int local18 = 0; local18 < 13; local18++) { diff --git a/client/src/main/java/rt4/ClientScriptList.java b/client/src/main/java/rt4/ClientScriptList.java index 9407130..19d8554 100644 --- a/client/src/main/java/rt4/ClientScriptList.java +++ b/client/src/main/java/rt4/ClientScriptList.java @@ -5,62 +5,62 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ClientScriptList { - @OriginalMember(owner = "client!ib", name = "d", descriptor = "Lclient!gn;") - public static final LruHashTable scripts = new LruHashTable(128); + @OriginalMember(owner = "client!ib", name = "d", descriptor = "Lclient!gn;") + public static final LruHashTable scripts = new LruHashTable(128); - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(IB)Lclient!qc;") - public static ClientScript get(@OriginalArg(0) int id) { - @Pc(12) ClientScript script = (ClientScript) scripts.get(id); - if (script != null) { - return script; - } - @Pc(22) byte[] bytes = client.js5Archive12.fetchFile(id, 0); - if (bytes == null) { - return null; - } - script = new ClientScript(); - @Pc(42) Buffer buffer = new Buffer(bytes); - buffer.offset = buffer.data.length - 2; - @Pc(53) int trailerLen = buffer.g2(); - @Pc(63) int trailerPos = buffer.data.length - trailerLen - 12 - 2; - buffer.offset = trailerPos; - @Pc(70) int instructions = buffer.g4(); - script.intLocals = buffer.g2(); - script.stringLocals = buffer.g2(); - script.intArgs = buffer.g2(); - script.stringArgs = buffer.g2(); - @Pc(98) int switches = buffer.g1(); - if (switches > 0) { - script.switchTables = new HashTable[switches]; - for (int i = 0; i < switches; i++) { - int cases = buffer.g2(); - @Pc(121) HashTable table = new HashTable(IntUtils.clp2(cases)); - script.switchTables[i] = table; - while (cases-- > 0) { - @Pc(136) int value = buffer.g4(); - @Pc(140) int offset = buffer.g4(); - table.put(new IntNode(offset), value); - } - } - } - buffer.offset = 0; - script.name = buffer.fastgjstr(); - script.opcodes = new int[instructions]; - script.stringOperands = new JagString[instructions]; - int i = 0; - script.intOperands = new int[instructions]; - while (trailerPos > buffer.offset) { - int cases = buffer.g2(); - if (cases == 3) { - script.stringOperands[i] = buffer.gjstr(); - } else if (cases >= 100 || cases == 21 || cases == 38 || cases == 39) { - script.intOperands[i] = buffer.g1(); - } else { - script.intOperands[i] = buffer.g4(); - } - script.opcodes[i++] = cases; - } - scripts.put(script, id); - return script; - } + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(IB)Lclient!qc;") + public static ClientScript get(@OriginalArg(0) int id) { + @Pc(12) ClientScript script = (ClientScript) scripts.get(id); + if (script != null) { + return script; + } + @Pc(22) byte[] bytes = client.js5Archive12.fetchFile(id, 0); + if (bytes == null) { + return null; + } + script = new ClientScript(); + @Pc(42) Buffer buffer = new Buffer(bytes); + buffer.offset = buffer.data.length - 2; + @Pc(53) int trailerLen = buffer.g2(); + @Pc(63) int trailerPos = buffer.data.length - trailerLen - 12 - 2; + buffer.offset = trailerPos; + @Pc(70) int instructions = buffer.g4(); + script.intLocals = buffer.g2(); + script.stringLocals = buffer.g2(); + script.intArgs = buffer.g2(); + script.stringArgs = buffer.g2(); + @Pc(98) int switches = buffer.g1(); + if (switches > 0) { + script.switchTables = new HashTable[switches]; + for (int i = 0; i < switches; i++) { + int cases = buffer.g2(); + @Pc(121) HashTable table = new HashTable(IntUtils.clp2(cases)); + script.switchTables[i] = table; + while (cases-- > 0) { + @Pc(136) int value = buffer.g4(); + @Pc(140) int offset = buffer.g4(); + table.put(new IntNode(offset), value); + } + } + } + buffer.offset = 0; + script.name = buffer.fastgjstr(); + script.opcodes = new int[instructions]; + script.stringOperands = new JagString[instructions]; + int i = 0; + script.intOperands = new int[instructions]; + while (trailerPos > buffer.offset) { + int cases = buffer.g2(); + if (cases == 3) { + script.stringOperands[i] = buffer.gjstr(); + } else if (cases >= 100 || cases == 21 || cases == 38 || cases == 39) { + script.intOperands[i] = buffer.g1(); + } else { + script.intOperands[i] = buffer.g4(); + } + script.opcodes[i++] = cases; + } + scripts.put(script, id); + return script; + } } diff --git a/client/src/main/java/rt4/CollisionMap.java b/client/src/main/java/rt4/CollisionMap.java index 1d054d5..5481a65 100644 --- a/client/src/main/java/rt4/CollisionMap.java +++ b/client/src/main/java/rt4/CollisionMap.java @@ -413,9 +413,7 @@ public final class CollisionMap { if (endX == startX - 1 && endZ == startZ && (this.flags[endX][endZ] & 0x8) == 0) { return true; } - if (startX + 1 == endX && startZ == endZ && (this.flags[endX][endZ] & 0x80) == 0) { - return true; - } + return startX + 1 == endX && startZ == endZ && (this.flags[endX][endZ] & 0x80) == 0; } } else { @Pc(785) int x1 = size + endX - 1; @@ -528,9 +526,7 @@ public final class CollisionMap { if (startX - size == endX && startZ >= endZ && startZ <= z1 && (this.flags[x1][startZ] & 0x12C0108) == 0) { return true; } - if (endX == startX + 1 && startZ >= endZ && z1 >= startZ && (this.flags[endX][startZ] & 0x12C0180) == 0) { - return true; - } + return endX == startX + 1 && startZ >= endZ && z1 >= startZ && (this.flags[endX][startZ] & 0x12C0180) == 0; } } return false; @@ -618,9 +614,7 @@ public final class CollisionMap { if (startX - 1 == endX && endZ == startZ && (this.flags[endX][endZ] & 0x8) == 0) { return true; } - if (endX == startX + 1 && startZ == endZ && (this.flags[endX][endZ] & 0x80) == 0) { - return true; - } + return endX == startX + 1 && startZ == endZ && (this.flags[endX][endZ] & 0x80) == 0; } } else { @Pc(414) int x1 = endX + size - 1; @@ -669,9 +663,7 @@ public final class CollisionMap { if (endX == startX - size && endZ <= startZ && z1 >= startZ && (this.flags[x1][startZ] & 0x8) == 0) { return true; } - if (endX == startX + 1 && startZ >= endZ && startZ <= z1 && (this.flags[endX][startZ] & 0x80) == 0) { - return true; - } + return endX == startX + 1 && startZ >= endZ && startZ <= z1 && (this.flags[endX][startZ] & 0x80) == 0; } } return false; diff --git a/client/src/main/java/rt4/ColorImageCache.java b/client/src/main/java/rt4/ColorImageCache.java index b0a80ae..deceac1 100644 --- a/client/src/main/java/rt4/ColorImageCache.java +++ b/client/src/main/java/rt4/ColorImageCache.java @@ -8,9 +8,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!pf") public final class ColorImageCache { - @OriginalMember(owner = "client!ib", name = "c", descriptor = "Lclient!qi;") + @OriginalMember(owner = "client!ib", name = "c", descriptor = "Lclient!qi;") public static final ColorImageCacheEntry VALID = new ColorImageCacheEntry(0, 0); - @OriginalMember(owner = "client!pf", name = "d", descriptor = "I") + @OriginalMember(owner = "client!pf", name = "d", descriptor = "I") private int size = 0; @OriginalMember(owner = "client!pf", name = "m", descriptor = "I") diff --git a/client/src/main/java/rt4/ColorUtils.java b/client/src/main/java/rt4/ColorUtils.java index 2f5c99e..239860e 100644 --- a/client/src/main/java/rt4/ColorUtils.java +++ b/client/src/main/java/rt4/ColorUtils.java @@ -5,120 +5,120 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ColorUtils { - @OriginalMember(owner = "client!ug", name = "b", descriptor = "[F") + @OriginalMember(owner = "client!ug", name = "b", descriptor = "[F") public static final float[] aFloatArray28 = new float[4]; - @OriginalMember(owner = "client!ib", name = "a", descriptor = "(II)I") - public static int rgbToHsl(@OriginalArg(1) int arg0) { - @Pc(10) double local10 = (double) (arg0 >> 16 & 0xFF) / 256.0D; - @Pc(19) double local19 = (double) (arg0 >> 8 & 0xFF) / 256.0D; - @Pc(25) double local25 = 0.0D; - @Pc(32) double local32 = (double) (arg0 & 0xFF) / 256.0D; - @Pc(34) double local34 = local10; - @Pc(37) double local37 = (double) 0; - @Pc(39) double local39 = local10; - if (local10 > local19) { - local34 = local19; - } - if (local32 < local34) { - local34 = local32; - } - if (local19 > local10) { - local39 = local19; - } - if (local32 > local39) { - local39 = local32; - } - @Pc(72) double local72 = (local34 + local39) / 2.0D; - if (local34 != local39) { - if (local72 < 0.5D) { - local37 = (local39 - local34) / (local34 + local39); - } - if (local72 >= 0.5D) { - local37 = (local39 - local34) / (2.0D - local39 - local34); - } - if (local39 == local10) { - local25 = (local19 - local32) / (local39 - local34); - } else if (local19 == local39) { - local25 = (local32 - local10) / (local39 - local34) + 2.0D; - } else if (local39 == local32) { - local25 = (local10 - local19) / (-local34 + local39) + 4.0D; - } - } - @Pc(159) int local159 = (int) (local37 * 256.0D); - @Pc(164) int local164 = (int) (local72 * 256.0D); - local25 /= 6.0D; - if (local164 < 0) { - local164 = 0; - } else if (local164 > 255) { - local164 = 255; - } - @Pc(188) int local188 = (int) (local25 * 256.0D); - if (local159 < 0) { - local159 = 0; - } else if (local159 > 255) { - local159 = 255; - } - if (local164 > 243) { - local159 >>= 0x4; - } else if (local164 > 217) { - local159 >>= 0x3; - } else if (local164 > 192) { - local159 >>= 0x2; - } else if (local164 > 179) { - local159 >>= 0x1; - } - return (local188 >> 2 << 10) + (local159 >> 5 << 7) + (local164 >> 1); - } + @OriginalMember(owner = "client!ib", name = "a", descriptor = "(II)I") + public static int rgbToHsl(@OriginalArg(1) int arg0) { + @Pc(10) double local10 = (double) (arg0 >> 16 & 0xFF) / 256.0D; + @Pc(19) double local19 = (double) (arg0 >> 8 & 0xFF) / 256.0D; + @Pc(25) double local25 = 0.0D; + @Pc(32) double local32 = (double) (arg0 & 0xFF) / 256.0D; + @Pc(34) double local34 = local10; + @Pc(37) double local37 = 0; + @Pc(39) double local39 = local10; + if (local10 > local19) { + local34 = local19; + } + if (local32 < local34) { + local34 = local32; + } + if (local19 > local10) { + local39 = local19; + } + if (local32 > local39) { + local39 = local32; + } + @Pc(72) double local72 = (local34 + local39) / 2.0D; + if (local34 != local39) { + if (local72 < 0.5D) { + local37 = (local39 - local34) / (local34 + local39); + } + if (local72 >= 0.5D) { + local37 = (local39 - local34) / (2.0D - local39 - local34); + } + if (local39 == local10) { + local25 = (local19 - local32) / (local39 - local34); + } else if (local19 == local39) { + local25 = (local32 - local10) / (local39 - local34) + 2.0D; + } else if (local39 == local32) { + local25 = (local10 - local19) / (-local34 + local39) + 4.0D; + } + } + @Pc(159) int local159 = (int) (local37 * 256.0D); + @Pc(164) int local164 = (int) (local72 * 256.0D); + local25 /= 6.0D; + if (local164 < 0) { + local164 = 0; + } else if (local164 > 255) { + local164 = 255; + } + @Pc(188) int local188 = (int) (local25 * 256.0D); + if (local159 < 0) { + local159 = 0; + } else if (local159 > 255) { + local159 = 255; + } + if (local164 > 243) { + local159 >>= 0x4; + } else if (local164 > 217) { + local159 >>= 0x3; + } else if (local164 > 192) { + local159 >>= 0x2; + } else if (local164 > 179) { + local159 >>= 0x1; + } + return (local188 >> 2 << 10) + (local159 >> 5 << 7) + (local164 >> 1); + } - @OriginalMember(owner = "client!pf", name = "a", descriptor = "(II)[F") - public static float[] getRgbFloat(@OriginalArg(0) int arg0) { - @Pc(7) float local7 = FogManager.method3068() + FogManager.method3059(); - @Pc(9) int local9 = FogManager.method3064(); - @Pc(11) float local11 = 0.58823526F; - aFloatArray28[3] = 1.0F; - @Pc(24) float local24 = (float) (local9 >> 16 & 0xFF) / 255.0F; - @Pc(33) float local33 = (float) (local9 >> 8 & 0xFF) / 255.0F; - aFloatArray28[1] = local7 * (float) (arg0 >> 8 & 0xFF) / 255.0F * local33 * local11; - aFloatArray28[0] = local7 * local11 * local24 * ((float) (arg0 >> 16 & 0xFF) / 255.0F); - @Pc(74) float local74 = (float) (local9 & 0xFF) / 255.0F; - aFloatArray28[2] = (float) (arg0 & 0xFF) / 255.0F * local74 * local11 * local7; - return aFloatArray28; - } + @OriginalMember(owner = "client!pf", name = "a", descriptor = "(II)[F") + public static float[] getRgbFloat(@OriginalArg(0) int arg0) { + @Pc(7) float local7 = FogManager.method3068() + FogManager.method3059(); + @Pc(9) int local9 = FogManager.method3064(); + @Pc(11) float local11 = 0.58823526F; + aFloatArray28[3] = 1.0F; + @Pc(24) float local24 = (float) (local9 >> 16 & 0xFF) / 255.0F; + @Pc(33) float local33 = (float) (local9 >> 8 & 0xFF) / 255.0F; + aFloatArray28[1] = local7 * (float) (arg0 >> 8 & 0xFF) / 255.0F * local33 * local11; + aFloatArray28[0] = local7 * local11 * local24 * ((float) (arg0 >> 16 & 0xFF) / 255.0F); + @Pc(74) float local74 = (float) (local9 & 0xFF) / 255.0F; + aFloatArray28[2] = (float) (arg0 & 0xFF) / 255.0F * local74 * local11 * local7; + return aFloatArray28; + } - @OriginalMember(owner = "client!gn", name = "a", descriptor = "(IZI)I") - public static int multiplyLightnessSafe(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - if (arg1 == -1) { - return 12345678; - } - arg0 = arg0 * (arg1 & 0x7F) >> 7; - if (arg0 < 2) { - arg0 = 2; - } else if (arg0 > 126) { - arg0 = 126; - } - return arg0 + (arg1 & 0xFF80); - } + @OriginalMember(owner = "client!gn", name = "a", descriptor = "(IZI)I") + public static int multiplyLightnessSafe(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + if (arg1 == -1) { + return 12345678; + } + arg0 = arg0 * (arg1 & 0x7F) >> 7; + if (arg0 < 2) { + arg0 = 2; + } else if (arg0 > 126) { + arg0 = 126; + } + return arg0 + (arg1 & 0xFF80); + } - @OriginalMember(owner = "client!sj", name = "a", descriptor = "(BII)I") - public static int multiplyLightnessGrayscale(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - if (arg0 == -2) { - return 12345678; - } else if (arg0 == -1) { - if (arg1 < 2) { - arg1 = 2; - } else if (arg1 > 126) { - arg1 = 126; - } - return arg1; - } else { - arg1 = (arg0 & 0x7F) * arg1 >> 7; - if (arg1 < 2) { - arg1 = 2; - } else if (arg1 > 126) { - arg1 = 126; - } - return (arg0 & 0xFF80) + arg1; - } - } + @OriginalMember(owner = "client!sj", name = "a", descriptor = "(BII)I") + public static int multiplyLightnessGrayscale(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + if (arg0 == -2) { + return 12345678; + } else if (arg0 == -1) { + if (arg1 < 2) { + arg1 = 2; + } else if (arg1 > 126) { + arg1 = 126; + } + return arg1; + } else { + arg1 = (arg0 & 0x7F) * arg1 >> 7; + if (arg1 < 2) { + arg1 = 2; + } else if (arg1 > 126) { + arg1 = 126; + } + return (arg0 & 0xFF80) + arg1; + } + } } diff --git a/client/src/main/java/rt4/Component.java b/client/src/main/java/rt4/Component.java index cc5c24f..2e70107 100644 --- a/client/src/main/java/rt4/Component.java +++ b/client/src/main/java/rt4/Component.java @@ -8,15 +8,15 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!be") public final class Component { - @OriginalMember(owner = "client!pf", name = "b", descriptor = "Lclient!n;") + @OriginalMember(owner = "client!pf", name = "b", descriptor = "Lclient!n;") public static final SoftLruHashTable sprites = new SoftLruHashTable(200); @OriginalMember(owner = "client!jk", name = "z", descriptor = "Lclient!n;") public static final SoftLruHashTable models = new SoftLruHashTable(50); @OriginalMember(owner = "client!gn", name = "i", descriptor = "Lclient!n;") public static final SoftLruHashTable fonts = new SoftLruHashTable(20); - @OriginalMember(owner = "client!rc", name = "C", descriptor = "Z") - public static boolean aBoolean72 = false; - @OriginalMember(owner = "client!be", name = "b", descriptor = "[Ljava/lang/Object;") + @OriginalMember(owner = "client!rc", name = "C", descriptor = "Z") + public static boolean aBoolean72 = false; + @OriginalMember(owner = "client!be", name = "b", descriptor = "[Ljava/lang/Object;") public Object[] onFriendTransmit; @OriginalMember(owner = "client!be", name = "d", descriptor = "[Ljava/lang/Object;") @@ -794,7 +794,7 @@ public final class Component { if (local29 == -1) { return null; } - @Pc(43) Sprite local43 = (Sprite) sprites.get((long) local29); + @Pc(43) Sprite local43 = (Sprite) sprites.get(local29); if (local43 != null) { return local43; } @@ -802,7 +802,7 @@ public final class Component { if (local43 == null) { aBoolean72 = true; } else { - sprites.put(local43, (long) local29); + sprites.put(local43, local29); } return local43; } @@ -869,7 +869,7 @@ public final class Component { } else { @Pc(61) Model local61; if (local10 == 1) { - local61 = (Model) models.get((long) ((local10 << 16) + local13)); + local61 = (Model) models.get((local10 << 16) + local13); if (local61 == null) { @Pc(69) RawModel local69 = RawModel.create(InterfaceList.aClass153_85, local13); if (local69 == null) { @@ -877,7 +877,7 @@ public final class Component { return null; } local61 = local69.createModel(64, 768, -50, -10, -50); - models.put(local61, (long) (local13 + (local10 << 16))); + models.put(local61, local13 + (local10 << 16)); } if (arg1 != null) { local61 = arg1.method4215(local61, arg0, arg3, arg2); @@ -1183,7 +1183,7 @@ public final class Component { if (this.font == -1) { return null; } - @Pc(21) Font local21 = (Font) fonts.get((long) this.font); + @Pc(21) Font local21 = (Font) fonts.get(this.font); if (local21 != null) { return local21; } @@ -1192,7 +1192,7 @@ public final class Component { aBoolean72 = true; } else { local21.setNameIcons(arg0, null); - fonts.put(local21, (long) this.font); + fonts.put(local21, this.font); } return local21; } diff --git a/client/src/main/java/rt4/CreateManager.java b/client/src/main/java/rt4/CreateManager.java index 91a2952..8f81744 100644 --- a/client/src/main/java/rt4/CreateManager.java +++ b/client/src/main/java/rt4/CreateManager.java @@ -8,138 +8,138 @@ import java.io.IOException; import java.net.Socket; public class CreateManager { - @OriginalMember(owner = "client!oe", name = "l", descriptor = "I") - public static int step = 0; - @OriginalMember(owner = "client!sf", name = "a", descriptor = "I") - public static int loops = 0; - @OriginalMember(owner = "client!eg", name = "v", descriptor = "I") - public static int errors = 0; - @OriginalMember(owner = "client!sc", name = "y", descriptor = "I") - public static int reply = -2; - @OriginalMember(owner = "client!si", name = "S", descriptor = "[Lclient!na;") + @OriginalMember(owner = "client!oe", name = "l", descriptor = "I") + public static int step = 0; + @OriginalMember(owner = "client!sf", name = "a", descriptor = "I") + public static int loops = 0; + @OriginalMember(owner = "client!eg", name = "v", descriptor = "I") + public static int errors = 0; + @OriginalMember(owner = "client!sc", name = "y", descriptor = "I") + public static int reply = -2; + @OriginalMember(owner = "client!si", name = "S", descriptor = "[Lclient!na;") public static JagString[] suggestedNames; - @OriginalMember(owner = "client!mh", name = "f", descriptor = "(B)V") - public static void loop() { - if (step == 0) { - return; - } - try { - if (++loops > 2000) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (errors >= 1) { - reply = -5; - step = 0; - return; - } - step = 1; - loops = 0; - errors++; - if (client.port == client.defaultPort) { - client.port = client.alternatePort; - } else { - client.port = client.defaultPort; - } - } - if (step == 1) { - Protocol.socketRequest = GameShell.signLink.openSocket(client.hostname, client.port); - step = 2; - } - @Pc(120) int local120; - if (step == 2) { - if (Protocol.socketRequest.status == 2) { - throw new IOException(); - } - if (Protocol.socketRequest.status != 1) { - return; - } - Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); - Protocol.socketRequest = null; - Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - local120 = Protocol.socket.read(); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - if (local120 != 21) { - reply = local120; - step = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - step = 3; - } - if (step == 3) { - if (Protocol.socket.available() < 1) { - return; - } - suggestedNames = new JagString[Protocol.socket.read()]; - step = 4; - } - if (step == 4) { - if (Protocol.socket.available() < suggestedNames.length * 8) { - return; - } - Protocol.inboundBuffer.offset = 0; - Protocol.socket.read(0, suggestedNames.length * 8, Protocol.inboundBuffer.data); - for (local120 = 0; local120 < suggestedNames.length; local120++) { - suggestedNames[local120] = Base37.decode37(Protocol.inboundBuffer.g8()); - } - reply = 21; - step = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - } catch (@Pc(238) IOException local238) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (errors < 1) { - errors++; - if (client.defaultPort == client.port) { - client.port = client.alternatePort; - } else { - client.port = client.defaultPort; - } - loops = 0; - step = 1; - } else { - reply = -4; - step = 0; - } - } - } + @OriginalMember(owner = "client!mh", name = "f", descriptor = "(B)V") + public static void loop() { + if (step == 0) { + return; + } + try { + if (++loops > 2000) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (errors >= 1) { + reply = -5; + step = 0; + return; + } + step = 1; + loops = 0; + errors++; + if (client.port == client.defaultPort) { + client.port = client.alternatePort; + } else { + client.port = client.defaultPort; + } + } + if (step == 1) { + Protocol.socketRequest = GameShell.signLink.openSocket(client.hostname, client.port); + step = 2; + } + @Pc(120) int local120; + if (step == 2) { + if (Protocol.socketRequest.status == 2) { + throw new IOException(); + } + if (Protocol.socketRequest.status != 1) { + return; + } + Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); + Protocol.socketRequest = null; + Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + local120 = Protocol.socket.read(); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + if (local120 != 21) { + reply = local120; + step = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + step = 3; + } + if (step == 3) { + if (Protocol.socket.available() < 1) { + return; + } + suggestedNames = new JagString[Protocol.socket.read()]; + step = 4; + } + if (step == 4) { + if (Protocol.socket.available() < suggestedNames.length * 8) { + return; + } + Protocol.inboundBuffer.offset = 0; + Protocol.socket.read(0, suggestedNames.length * 8, Protocol.inboundBuffer.data); + for (local120 = 0; local120 < suggestedNames.length; local120++) { + suggestedNames[local120] = Base37.decode37(Protocol.inboundBuffer.g8()); + } + reply = 21; + step = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + } catch (@Pc(238) IOException local238) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (errors < 1) { + errors++; + if (client.defaultPort == client.port) { + client.port = client.alternatePort; + } else { + client.port = client.defaultPort; + } + loops = 0; + step = 1; + } else { + reply = -4; + step = 0; + } + } + } - @OriginalMember(owner = "client!gd", name = "a", descriptor = "(JI)V") - public static void method1691(@OriginalArg(0) long name) { - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1(186); - if (GlobalConfig.LOGIN_USE_STRINGS) { - Protocol.outboundBuffer.pjstr(Base37.decode37(name)); - } else { - Protocol.outboundBuffer.p8(name); - } - step = 1; - loops = 0; - errors = 0; - reply = -3; - } + @OriginalMember(owner = "client!gd", name = "a", descriptor = "(JI)V") + public static void method1691(@OriginalArg(0) long name) { + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1(186); + if (GlobalConfig.LOGIN_USE_STRINGS) { + Protocol.outboundBuffer.pjstr(Base37.decode37(name)); + } else { + Protocol.outboundBuffer.p8(name); + } + step = 1; + loops = 0; + errors = 0; + reply = -3; + } - @OriginalMember(owner = "client!jl", name = "a", descriptor = "(IIIII)V") + @OriginalMember(owner = "client!jl", name = "a", descriptor = "(IIIII)V") public static void method2448(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { Protocol.outboundBuffer.offset = 0; Protocol.outboundBuffer.p1(147); @@ -153,35 +153,35 @@ public class CreateManager { reply = -3; } - @OriginalMember(owner = "client!da", name = "a", descriptor = "(IIIILclient!na;JI)V") - public static void method1016(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) JagString password, @OriginalArg(5) long name, @OriginalArg(6) int arg5) { - @Pc(8) Buffer local8 = new Buffer(GlobalConfig.LOGIN_USE_STRINGS ? 129 : 128); - local8.p1(10); - local8.p2((int) (Math.random() * 99999.0D)); - local8.p2(530); - if (GlobalConfig.LOGIN_USE_STRINGS) { - local8.pjstr(Base37.decode37(name)); - } else { - local8.p8(name); - } - local8.p4((int) (Math.random() * 9.9999999E7D)); - local8.pjstr(password); - local8.p4((int) (Math.random() * 9.9999999E7D)); - local8.p2(client.affiliate); - local8.p1(arg0); - local8.p1(arg2); - local8.p4((int) (Math.random() * 9.9999999E7D)); - local8.p2(arg5); - local8.p2(arg1); - local8.p4((int) (Math.random() * 9.9999999E7D)); - local8.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1(36); - Protocol.outboundBuffer.p1(local8.offset); - Protocol.outboundBuffer.pdata(local8.data, local8.offset); - reply = -3; - step = 1; - loops = 0; - errors = 0; - } + @OriginalMember(owner = "client!da", name = "a", descriptor = "(IIIILclient!na;JI)V") + public static void method1016(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) JagString password, @OriginalArg(5) long name, @OriginalArg(6) int arg5) { + @Pc(8) Buffer local8 = new Buffer(GlobalConfig.LOGIN_USE_STRINGS ? 129 : 128); + local8.p1(10); + local8.p2((int) (Math.random() * 99999.0D)); + local8.p2(530); + if (GlobalConfig.LOGIN_USE_STRINGS) { + local8.pjstr(Base37.decode37(name)); + } else { + local8.p8(name); + } + local8.p4((int) (Math.random() * 9.9999999E7D)); + local8.pjstr(password); + local8.p4((int) (Math.random() * 9.9999999E7D)); + local8.p2(client.affiliate); + local8.p1(arg0); + local8.p1(arg2); + local8.p4((int) (Math.random() * 9.9999999E7D)); + local8.p2(arg5); + local8.p2(arg1); + local8.p4((int) (Math.random() * 9.9999999E7D)); + local8.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1(36); + Protocol.outboundBuffer.p1(local8.offset); + Protocol.outboundBuffer.pdata(local8.data, local8.offset); + reply = -3; + step = 1; + loops = 0; + errors = 0; + } } diff --git a/client/src/main/java/rt4/Cross.java b/client/src/main/java/rt4/Cross.java index 6ac604e..4a668cd 100644 --- a/client/src/main/java/rt4/Cross.java +++ b/client/src/main/java/rt4/Cross.java @@ -3,12 +3,12 @@ package rt4; import org.openrs2.deob.annotation.OriginalMember; public class Cross { - @OriginalMember(owner = "client!fi", name = "k", descriptor = "I") + @OriginalMember(owner = "client!fi", name = "k", descriptor = "I") public static int type = 0; - @OriginalMember(owner = "client!bg", name = "M", descriptor = "I") - public static int milliseconds = 0; - @OriginalMember(owner = "client!c", name = "eb", descriptor = "I") - public static int y = 0; - @OriginalMember(owner = "client!jh", name = "j", descriptor = "I") - public static int x = 0; + @OriginalMember(owner = "client!bg", name = "M", descriptor = "I") + public static int milliseconds = 0; + @OriginalMember(owner = "client!c", name = "eb", descriptor = "I") + public static int y = 0; + @OriginalMember(owner = "client!jh", name = "j", descriptor = "I") + public static int x = 0; } diff --git a/client/src/main/java/rt4/CursorType.java b/client/src/main/java/rt4/CursorType.java index f246091..e858129 100644 --- a/client/src/main/java/rt4/CursorType.java +++ b/client/src/main/java/rt4/CursorType.java @@ -19,13 +19,13 @@ public final class CursorType { @OriginalMember(owner = "client!ia", name = "a", descriptor = "(B)Lclient!mm;") public final SoftwareSprite getSprite() { - @Pc(7) SoftwareSprite local7 = (SoftwareSprite) CursorTypeList.sprites.get((long) this.spriteId); + @Pc(7) SoftwareSprite local7 = (SoftwareSprite) CursorTypeList.sprites.get(this.spriteId); if (local7 != null) { return local7; } local7 = SoftwareSprite.loadSoftwareAlphaSprite(CursorTypeList.spritesArchive, this.spriteId); if (local7 != null) { - CursorTypeList.sprites.put(local7, (long) this.spriteId); + CursorTypeList.sprites.put(local7, this.spriteId); } return local7; } diff --git a/client/src/main/java/rt4/CursorTypeList.java b/client/src/main/java/rt4/CursorTypeList.java index f90384d..d6fbe55 100644 --- a/client/src/main/java/rt4/CursorTypeList.java +++ b/client/src/main/java/rt4/CursorTypeList.java @@ -5,51 +5,51 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class CursorTypeList { - @OriginalMember(owner = "client!ge", name = "i", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!ah", name = "i", descriptor = "Lclient!n;") - public static final SoftLruHashTable sprites = new SoftLruHashTable(2); - @OriginalMember(owner = "client!mc", name = "Z", descriptor = "Lclient!ve;") - public static Js5 archive; - @OriginalMember(owner = "client!tk", name = "j", descriptor = "Lclient!ve;") - public static Js5 spritesArchive; + @OriginalMember(owner = "client!ge", name = "i", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!ah", name = "i", descriptor = "Lclient!n;") + public static final SoftLruHashTable sprites = new SoftLruHashTable(2); + @OriginalMember(owner = "client!mc", name = "Z", descriptor = "Lclient!ve;") + public static Js5 archive; + @OriginalMember(owner = "client!tk", name = "j", descriptor = "Lclient!ve;") + public static Js5 spritesArchive; - @OriginalMember(owner = "client!u", name = "a", descriptor = "(BLclient!ve;Lclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { - archive = arg0; - spritesArchive = arg1; - } + @OriginalMember(owner = "client!u", name = "a", descriptor = "(BLclient!ve;Lclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { + archive = arg0; + spritesArchive = arg1; + } - @OriginalMember(owner = "client!qg", name = "d", descriptor = "(II)Lclient!ia;") - public static CursorType get(@OriginalArg(0) int arg0) { - @Pc(10) CursorType local10 = (CursorType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(20) byte[] local20 = archive.fetchFile(33, arg0); - local10 = new CursorType(); - if (local20 != null) { - local10.decode(new Buffer(local20), arg0); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!qg", name = "d", descriptor = "(II)Lclient!ia;") + public static CursorType get(@OriginalArg(0) int arg0) { + @Pc(10) CursorType local10 = (CursorType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(20) byte[] local20 = archive.fetchFile(33, arg0); + local10 = new CursorType(); + if (local20 != null) { + local10.decode(new Buffer(local20), arg0); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!an", name = "i", descriptor = "(I)V") - public static void method351() { - types.clear(); - sprites.clear(); - } + @OriginalMember(owner = "client!an", name = "i", descriptor = "(I)V") + public static void method351() { + types.clear(); + sprites.clear(); + } - @OriginalMember(owner = "client!c", name = "d", descriptor = "(II)V") - public static void clean() { - types.clean(5); - sprites.clean(5); - } + @OriginalMember(owner = "client!c", name = "d", descriptor = "(II)V") + public static void clean() { + types.clean(5); + sprites.clean(5); + } - @OriginalMember(owner = "client!ca", name = "a", descriptor = "(Z)V") - public static void method741() { - types.removeSoft(); - sprites.removeSoft(); - } + @OriginalMember(owner = "client!ca", name = "a", descriptor = "(Z)V") + public static void method741() { + types.removeSoft(); + sprites.removeSoft(); + } } diff --git a/client/src/main/java/rt4/DateUtil.java b/client/src/main/java/rt4/DateUtil.java index 32971fb..0df8e14 100644 --- a/client/src/main/java/rt4/DateUtil.java +++ b/client/src/main/java/rt4/DateUtil.java @@ -60,7 +60,7 @@ public final class DateUtil { 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}; + 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;") @@ -76,7 +76,7 @@ public final class DateUtil { @OriginalMember(owner = "client!rl", name = "bb", descriptor = "Lclient!na;") private static final JagString THU = JagString.parse("Thu"); @OriginalMember(owner = "client!rl", name = "Y", descriptor = "[Lclient!na;") - public static final JagString[] DAYS = new JagString[] {SUN, MON, TUE, WED, THU, FRI, SAT}; + public static final JagString[] DAYS = new JagString[]{SUN, MON, TUE, WED, THU, FRI, SAT}; @OriginalMember(owner = "client!cj", name = "a", descriptor = "(JB)Lclient!na;") public static JagString getDateString(@OriginalArg(0) long date) { @@ -88,6 +88,6 @@ public final class DateUtil { @Pc(36) int local36 = calendar.get(Calendar.HOUR_OF_DAY); @Pc(40) int local40 = calendar.get(Calendar.MINUTE); @Pc(44) int local44 = calendar.get(Calendar.SECOND); - return JagString.concatenate(new JagString[] { DAYS[local13 - 1], aClass100_461, JagString.parseInt(local17 / 10), JagString.parseInt(local17 % 10), aClass100_1089, MONTHS[local21], aClass100_1089, JagString.parseInt(local32), SPACE, JagString.parseInt(local36 / 10), JagString.parseInt(local36 % 10), COLON, JagString.parseInt(local40 / 10), JagString.parseInt(local40 % 10), COLON, JagString.parseInt(local44 / 10), JagString.parseInt(local44 % 10), TIMEZONE}); + return JagString.concatenate(new JagString[]{DAYS[local13 - 1], aClass100_461, JagString.parseInt(local17 / 10), JagString.parseInt(local17 % 10), aClass100_1089, MONTHS[local21], aClass100_1089, JagString.parseInt(local32), SPACE, JagString.parseInt(local36 / 10), JagString.parseInt(local36 % 10), COLON, JagString.parseInt(local40 / 10), JagString.parseInt(local40 % 10), COLON, JagString.parseInt(local44 / 10), JagString.parseInt(local44 % 10), TIMEZONE}); } } diff --git a/client/src/main/java/rt4/DeadClass.java b/client/src/main/java/rt4/DeadClass.java index 8602694..3c850e0 100644 --- a/client/src/main/java/rt4/DeadClass.java +++ b/client/src/main/java/rt4/DeadClass.java @@ -9,9 +9,9 @@ public final class DeadClass { @OriginalMember(owner = "client!ul", name = "I", descriptor = "Lclient!gn;") public static final LruHashTable cache = new LruHashTable(4); - @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") - private static final JagString aClass100_195 = JagString.parse("Discard"); + @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") + private static final JagString aClass100_195 = JagString.parse("Discard"); - @OriginalMember(owner = "client!rc", name = "R", descriptor = "Z") - private static boolean aBoolean74; + @OriginalMember(owner = "client!rc", name = "R", descriptor = "Z") + private static boolean aBoolean74; } diff --git a/client/src/main/java/rt4/DelayedStateChange.java b/client/src/main/java/rt4/DelayedStateChange.java index 072f6db..d88d26a 100644 --- a/client/src/main/java/rt4/DelayedStateChange.java +++ b/client/src/main/java/rt4/DelayedStateChange.java @@ -31,19 +31,19 @@ public final class DelayedStateChange extends SecondaryNode { this.key = (long) arg0 << 32 | (long) arg1; } - @OriginalMember(owner = "client!bj", name = "d", descriptor = "(B)V") - public static void clear() { - changes.clear(); - clientQueue.clear(); - serverQueue.clear(); - } + @OriginalMember(owner = "client!bj", name = "d", descriptor = "(B)V") + public static void clear() { + changes.clear(); + clientQueue.clear(); + serverQueue.clear(); + } - @OriginalMember(owner = "client!pf", name = "a", descriptor = "(III)V") - public static void setComponentModelRotationSpeedServer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(14) DelayedStateChange local14 = create(13, arg1); - local14.pushServer(); - local14.intArg1 = arg0; - } + @OriginalMember(owner = "client!pf", name = "a", descriptor = "(III)V") + public static void setComponentModelRotationSpeedServer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(14) DelayedStateChange local14 = create(13, arg1); + local14.pushServer(); + local14.intArg1 = arg0; + } @OriginalMember(owner = "client!pi", name = "a", descriptor = "(Lclient!na;BI)V") public static void method3498(@OriginalArg(0) JagString arg0, @OriginalArg(2) int arg1) { @@ -106,18 +106,18 @@ public final class DelayedStateChange extends SecondaryNode { local18.intArg1 = arg0; } - @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lclient!na;II)V") - public static void method3617(@OriginalArg(0) JagString arg0, @OriginalArg(2) int arg1) { - @Pc(6) DelayedStateChange local6 = create(3, arg1); - local6.pushServer(); - local6.stringArg = arg0; - } + @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lclient!na;II)V") + public static void method3617(@OriginalArg(0) JagString arg0, @OriginalArg(2) int arg1) { + @Pc(6) DelayedStateChange local6 = create(3, arg1); + local6.pushServer(); + local6.stringArg = arg0; + } - @OriginalMember(owner = "client!ug", name = "a", descriptor = "(IB)V") - public static void setComponentObjClient(@OriginalArg(0) int arg0) { - @Pc(14) DelayedStateChange local14 = create(9, arg0); - local14.pushClient(); - } + @OriginalMember(owner = "client!ug", name = "a", descriptor = "(IB)V") + public static void setComponentObjClient(@OriginalArg(0) int arg0) { + @Pc(14) DelayedStateChange local14 = create(9, arg0); + local14.pushClient(); + } @OriginalMember(owner = "client!mc", name = "a", descriptor = "(BI)V") public static void setComponentModelAngleClient(@OriginalArg(1) int arg0) { diff --git a/client/src/main/java/rt4/DirectByteArray.java b/client/src/main/java/rt4/DirectByteArray.java index f42e64d..b9b6cf2 100644 --- a/client/src/main/java/rt4/DirectByteArray.java +++ b/client/src/main/java/rt4/DirectByteArray.java @@ -1,11 +1,12 @@ package rt4; -import java.nio.ByteBuffer; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!ua") public final class DirectByteArray extends ByteArray { diff --git a/client/src/main/java/rt4/DisplayMode.java b/client/src/main/java/rt4/DisplayMode.java index eaea4d3..93a6aab 100644 --- a/client/src/main/java/rt4/DisplayMode.java +++ b/client/src/main/java/rt4/DisplayMode.java @@ -12,10 +12,10 @@ public final class DisplayMode { @OriginalMember(owner = "client!ib", name = "i", descriptor = "[Lclient!od;") public static DisplayMode[] aClass114Array1; - @OriginalMember(owner = "client!rc", name = "M", descriptor = "Z") - public static boolean aBoolean73 = false; - @OriginalMember(owner = "client!jk", name = "y", descriptor = "Z") - public static boolean aBoolean156 = false; + @OriginalMember(owner = "client!rc", name = "M", descriptor = "Z") + public static boolean aBoolean73 = false; + @OriginalMember(owner = "client!jk", name = "y", descriptor = "Z") + public static boolean aBoolean156 = false; @OriginalMember(owner = "client!hi", name = "f", descriptor = "J") public static long aLong89 = 0L; @@ -54,10 +54,7 @@ public final class DisplayMode { if (arg1 == 3 || mode == 3) { arg0 = true; } - @Pc(44) boolean useHd = false; - if (mode > 0 != arg1 > 0) { - useHd = true; - } + @Pc(44) boolean useHd = mode > 0 != arg1 > 0; if (arg0 && arg1 > 0) { useHd = true; } @@ -227,11 +224,7 @@ public final class DisplayMode { if (arg2) { client.method2721(); } - if (arg1 >= 2) { - aBoolean156 = true; - } else { - aBoolean156 = false; - } + aBoolean156 = arg1 >= 2; if (InterfaceList.topLevelInterface != -1) { InterfaceList.method3712(true); } @@ -250,7 +243,8 @@ public final class DisplayMode { @Pc(16) DisplayMode[] local16 = method3558(GameShell.signLink); @Pc(20) DisplayMode[] local20 = new DisplayMode[local16.length]; @Pc(22) int local22 = 0; - label52: for (@Pc(24) int local24 = 0; local24 < local16.length; local24++) { + label52: + for (@Pc(24) int local24 = 0; local24 < local16.length; local24++) { @Pc(32) DisplayMode local32 = local16[local24]; if ((local32.bitDepth <= 0 || local32.bitDepth >= 24) && local32.width >= 800 && local32.height >= 600) { for (@Pc(52) int local52 = 0; local52 < local22; local52++) { diff --git a/client/src/main/java/rt4/EnumType.java b/client/src/main/java/rt4/EnumType.java index 08d76c2..e082798 100644 --- a/client/src/main/java/rt4/EnumType.java +++ b/client/src/main/java/rt4/EnumType.java @@ -47,7 +47,7 @@ public final class EnumType extends SecondaryNode { } else { local70 = new IntNode(arg1.g4()); } - this.table.put(local70, (long) local58); + this.table.put(local70, local58); } } } @@ -57,7 +57,7 @@ public final class EnumType extends SecondaryNode { if (this.table == null) { return this.defaultString; } else { - @Pc(26) StringNode local26 = (StringNode) this.table.get((long) arg0); + @Pc(26) StringNode local26 = (StringNode) this.table.get(arg0); return local26 == null ? this.defaultString : local26.value; } } @@ -92,7 +92,7 @@ public final class EnumType extends SecondaryNode { if (this.table == null) { return this.defaultInt; } else { - @Pc(18) IntNode local18 = (IntNode) this.table.get((long) arg0); + @Pc(18) IntNode local18 = (IntNode) this.table.get(arg0); return local18 == null ? this.defaultInt : local18.value; } } @@ -105,7 +105,7 @@ public final class EnumType extends SecondaryNode { if (this.inverseTable == null) { this.inverseInts(); } - @Pc(34) IntNode node = (IntNode) this.inverseTable.get((long) arg0); + @Pc(34) IntNode node = (IntNode) this.inverseTable.get(arg0); return node != null; } @@ -114,7 +114,7 @@ public final class EnumType extends SecondaryNode { this.inverseTable = new HashTable(this.table.getBucketCount()); for (@Pc(24) IntNode node = (IntNode) this.table.head(); node != null; node = (IntNode) this.table.next()) { @Pc(34) IntNode inverseNode = new IntNode((int) node.key); - this.inverseTable.put(inverseNode, (long) node.value); + this.inverseTable.put(inverseNode, node.value); } } diff --git a/client/src/main/java/rt4/EnumTypeList.java b/client/src/main/java/rt4/EnumTypeList.java index b8f1c99..358f399 100644 --- a/client/src/main/java/rt4/EnumTypeList.java +++ b/client/src/main/java/rt4/EnumTypeList.java @@ -5,38 +5,38 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class EnumTypeList { - @OriginalMember(owner = "client!lj", name = "p", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(128); - @OriginalMember(owner = "client!gk", name = "e", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!lj", name = "p", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(128); + @OriginalMember(owner = "client!gk", name = "e", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!gl", name = "a", descriptor = "(Lclient!ve;I)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!gl", name = "a", descriptor = "(Lclient!ve;I)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!ui", name = "a", descriptor = "(IZ)Lclient!ml;") - public static EnumType get(@OriginalArg(0) int arg0) { - @Pc(10) EnumType local10 = (EnumType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(24) byte[] local24 = archive.fetchFile(getGroupId(arg0), getFileId(arg0)); - local10 = new EnumType(); - if (local24 != null) { - local10.decode(new Buffer(local24)); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!ui", name = "a", descriptor = "(IZ)Lclient!ml;") + public static EnumType get(@OriginalArg(0) int arg0) { + @Pc(10) EnumType local10 = (EnumType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(24) byte[] local24 = archive.fetchFile(getGroupId(arg0), getFileId(arg0)); + local10 = new EnumType(); + if (local24 != null) { + local10.decode(new Buffer(local24)); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!i", name = "e", descriptor = "(BI)I") - public static int getFileId(@OriginalArg(1) int arg0) { - return arg0 & 0xFF; - } + @OriginalMember(owner = "client!i", name = "e", descriptor = "(BI)I") + public static int getFileId(@OriginalArg(1) int arg0) { + return arg0 & 0xFF; + } - @OriginalMember(owner = "client!hi", name = "a", descriptor = "(BI)I") - public static int getGroupId(@OriginalArg(1) int arg0) { - return arg0 >>> 8; - } + @OriginalMember(owner = "client!hi", name = "a", descriptor = "(BI)I") + public static int getGroupId(@OriginalArg(1) int arg0) { + return arg0 >>> 8; + } } diff --git a/client/src/main/java/rt4/Equipment.java b/client/src/main/java/rt4/Equipment.java index 67e8c1a..5581567 100644 --- a/client/src/main/java/rt4/Equipment.java +++ b/client/src/main/java/rt4/Equipment.java @@ -4,23 +4,23 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Equipment { - @OriginalMember(owner = "client!ta", name = "p", descriptor = "[I") - public static int[] anIntArray455; + @OriginalMember(owner = "client!ta", name = "p", descriptor = "[I") + public static int[] anIntArray455; - @OriginalMember(owner = "client!eh", name = "a", descriptor = "(I)V") - public static void init() { - @Pc(8) int[] local8 = new int[ObjTypeList.anInt3245]; - @Pc(10) int local10 = 0; - @Pc(12) int local12; - for (local12 = 0; local12 < ObjTypeList.anInt3245; local12++) { - @Pc(19) ObjType local19 = ObjTypeList.get(local12); - if (local19.manwear >= 0 || local19.womanwear >= 0) { - local8[local10++] = local12; - } - } - anIntArray455 = new int[local10]; - for (local12 = 0; local12 < local10; local12++) { - anIntArray455[local12] = local8[local12]; - } - } + @OriginalMember(owner = "client!eh", name = "a", descriptor = "(I)V") + public static void init() { + @Pc(8) int[] local8 = new int[ObjTypeList.anInt3245]; + @Pc(10) int local10 = 0; + @Pc(12) int local12; + for (local12 = 0; local12 < ObjTypeList.anInt3245; local12++) { + @Pc(19) ObjType local19 = ObjTypeList.get(local12); + if (local19.manwear >= 0 || local19.womanwear >= 0) { + local8[local10++] = local12; + } + } + anIntArray455 = new int[local10]; + for (local12 = 0; local12 < local10; local12++) { + anIntArray455[local12] = local8[local12]; + } + } } diff --git a/client/src/main/java/rt4/Find.java b/client/src/main/java/rt4/Find.java index 5a2c821..78e868d 100644 --- a/client/src/main/java/rt4/Find.java +++ b/client/src/main/java/rt4/Find.java @@ -5,114 +5,114 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Find { - @OriginalMember(owner = "client!nf", name = "c", descriptor = "[S") - public static short[] results; - @OriginalMember(owner = "client!fe", name = "x", descriptor = "I") - public static int size; - @OriginalMember(owner = "client!ii", name = "l", descriptor = "I") + @OriginalMember(owner = "client!nf", name = "c", descriptor = "[S") + public static short[] results; + @OriginalMember(owner = "client!fe", name = "x", descriptor = "I") + public static int size; + @OriginalMember(owner = "client!ii", name = "l", descriptor = "I") public static int index; - @OriginalMember(owner = "client!bn", name = "a", descriptor = "(BZLclient!na;)V") - public static void findQuickChatPhrases(@OriginalArg(1) boolean arg0, @OriginalArg(2) JagString arg1) { - @Pc(9) JagString local9 = arg1.toLowerCase(); - @Pc(11) int local11 = 0; - @Pc(22) short[] local22 = new short[16]; - @Pc(28) int local28 = arg0 ? 32768 : 0; - @Pc(36) int local36 = (arg0 ? QuickChatPhraseTypeList.anInt1047 : QuickChatPhraseTypeList.anInt3490) + local28; - for (@Pc(38) int local38 = local28; local38 < local36; local38++) { - @Pc(45) QuickChatPhraseType local45 = QuickChatPhraseTypeList.get(local38); - if (local45.aBoolean60 && local45.getText().toLowerCase().indexOf(local9) != -1) { - if (local11 >= 50) { - index = -1; - results = null; - return; - } - if (local11 >= local22.length) { - @Pc(79) short[] local79 = new short[local22.length * 2]; - for (@Pc(81) int local81 = 0; local81 < local11; local81++) { - local79[local81] = local22[local81]; - } - local22 = local79; - } - local22[local11++] = (short) local38; - } - } - results = local22; - index = local11; - size = 0; - @Pc(113) JagString[] local113 = new JagString[index]; - for (@Pc(115) int local115 = 0; local115 < index; local115++) { - local113[local115] = QuickChatPhraseTypeList.get(local22[local115]).getText(); - } - method3656(local113, results); - } + @OriginalMember(owner = "client!bn", name = "a", descriptor = "(BZLclient!na;)V") + public static void findQuickChatPhrases(@OriginalArg(1) boolean arg0, @OriginalArg(2) JagString arg1) { + @Pc(9) JagString local9 = arg1.toLowerCase(); + @Pc(11) int local11 = 0; + @Pc(22) short[] local22 = new short[16]; + @Pc(28) int local28 = arg0 ? 32768 : 0; + @Pc(36) int local36 = (arg0 ? QuickChatPhraseTypeList.anInt1047 : QuickChatPhraseTypeList.anInt3490) + local28; + for (@Pc(38) int local38 = local28; local38 < local36; local38++) { + @Pc(45) QuickChatPhraseType local45 = QuickChatPhraseTypeList.get(local38); + if (local45.aBoolean60 && local45.getText().toLowerCase().indexOf(local9) != -1) { + if (local11 >= 50) { + index = -1; + results = null; + return; + } + if (local11 >= local22.length) { + @Pc(79) short[] local79 = new short[local22.length * 2]; + for (@Pc(81) int local81 = 0; local81 < local11; local81++) { + local79[local81] = local22[local81]; + } + local22 = local79; + } + local22[local11++] = (short) local38; + } + } + results = local22; + index = local11; + size = 0; + @Pc(113) JagString[] local113 = new JagString[index]; + for (@Pc(115) int local115 = 0; local115 < index; local115++) { + local113[local115] = QuickChatPhraseTypeList.get(local22[local115]).getText(); + } + method3656(local113, results); + } - @OriginalMember(owner = "client!me", name = "a", descriptor = "(ZLclient!na;I)V") - public static void search(@OriginalArg(0) boolean arg0, @OriginalArg(1) JagString arg1) { - @Pc(8) short[] local8 = new short[16]; - @Pc(12) JagString local12 = arg1.toLowerCase(); - @Pc(14) int local14 = 0; - for (@Pc(16) int local16 = 0; local16 < ObjTypeList.anInt3245; local16++) { - @Pc(27) ObjType local27 = ObjTypeList.get(local16); - if ((!arg0 || local27.stockMarket) && local27.certtemplate == -1 && local27.lentTemplate == -1 && local27.dummyItem == 0 && local27.name.toLowerCase().indexOf(local12) != -1) { - if (local14 >= 250) { - results = null; - index = -1; - return; - } - if (local14 >= local8.length) { - @Pc(83) short[] local83 = new short[local8.length * 2]; - for (@Pc(85) int local85 = 0; local85 < local14; local85++) { - local83[local85] = local8[local85]; - } - local8 = local83; - } - local8[local14++] = (short) local16; - } - } - results = local8; - size = 0; - index = local14; - @Pc(117) JagString[] local117 = new JagString[index]; - for (@Pc(119) int local119 = 0; local119 < index; local119++) { - local117[local119] = ObjTypeList.get(local8[local119]).name; - } - method3656(local117, results); - } + @OriginalMember(owner = "client!me", name = "a", descriptor = "(ZLclient!na;I)V") + public static void search(@OriginalArg(0) boolean arg0, @OriginalArg(1) JagString arg1) { + @Pc(8) short[] local8 = new short[16]; + @Pc(12) JagString local12 = arg1.toLowerCase(); + @Pc(14) int local14 = 0; + for (@Pc(16) int local16 = 0; local16 < ObjTypeList.anInt3245; local16++) { + @Pc(27) ObjType local27 = ObjTypeList.get(local16); + if ((!arg0 || local27.stockMarket) && local27.certtemplate == -1 && local27.lentTemplate == -1 && local27.dummyItem == 0 && local27.name.toLowerCase().indexOf(local12) != -1) { + if (local14 >= 250) { + results = null; + index = -1; + return; + } + if (local14 >= local8.length) { + @Pc(83) short[] local83 = new short[local8.length * 2]; + for (@Pc(85) int local85 = 0; local85 < local14; local85++) { + local83[local85] = local8[local85]; + } + local8 = local83; + } + local8[local14++] = (short) local16; + } + } + results = local8; + size = 0; + index = local14; + @Pc(117) JagString[] local117 = new JagString[index]; + for (@Pc(119) int local119 = 0; local119 < index; local119++) { + local117[local119] = ObjTypeList.get(local8[local119]).name; + } + method3656(local117, results); + } - @OriginalMember(owner = "client!qg", name = "a", descriptor = "([Lclient!na;[SI)V") - public static void method3656(@OriginalArg(0) JagString[] arg0, @OriginalArg(1) short[] arg1) { - method1307(arg1, arg0.length - 1, arg0, 0); - } + @OriginalMember(owner = "client!qg", name = "a", descriptor = "([Lclient!na;[SI)V") + public static void method3656(@OriginalArg(0) JagString[] arg0, @OriginalArg(1) short[] arg1) { + method1307(arg1, arg0.length - 1, arg0, 0); + } - @OriginalMember(owner = "client!ed", name = "a", descriptor = "([SI[Lclient!na;II)V") - public static void method1307(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString[] arg2, @OriginalArg(4) int arg3) { - if (arg1 <= arg3) { - return; - } - @Pc(14) int local14 = arg3; - @Pc(21) int local21 = (arg3 + arg1) / 2; - @Pc(25) JagString local25 = arg2[local21]; - arg2[local21] = arg2[arg1]; - arg2[arg1] = local25; - @Pc(39) short local39 = arg0[local21]; - arg0[local21] = arg0[arg1]; - arg0[arg1] = local39; - for (@Pc(51) int local51 = arg3; local51 < arg1; local51++) { - if (local25 == null || arg2[local51] != null && arg2[local51].method3139(local25) < (local51 & 0x1)) { - @Pc(80) JagString local80 = arg2[local51]; - arg2[local51] = arg2[local14]; - arg2[local14] = local80; - @Pc(94) short local94 = arg0[local51]; - arg0[local51] = arg0[local14]; - arg0[local14++] = local94; - } - } - arg2[arg1] = arg2[local14]; - arg2[local14] = local25; - arg0[arg1] = arg0[local14]; - arg0[local14] = local39; - method1307(arg0, local14 - 1, arg2, arg3); - method1307(arg0, arg1, arg2, local14 + 1); - } + @OriginalMember(owner = "client!ed", name = "a", descriptor = "([SI[Lclient!na;II)V") + public static void method1307(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString[] arg2, @OriginalArg(4) int arg3) { + if (arg1 <= arg3) { + return; + } + @Pc(14) int local14 = arg3; + @Pc(21) int local21 = (arg3 + arg1) / 2; + @Pc(25) JagString local25 = arg2[local21]; + arg2[local21] = arg2[arg1]; + arg2[arg1] = local25; + @Pc(39) short local39 = arg0[local21]; + arg0[local21] = arg0[arg1]; + arg0[arg1] = local39; + for (@Pc(51) int local51 = arg3; local51 < arg1; local51++) { + if (local25 == null || arg2[local51] != null && arg2[local51].method3139(local25) < (local51 & 0x1)) { + @Pc(80) JagString local80 = arg2[local51]; + arg2[local51] = arg2[local14]; + arg2[local14] = local80; + @Pc(94) short local94 = arg0[local51]; + arg0[local51] = arg0[local14]; + arg0[local14++] = local94; + } + } + arg2[arg1] = arg2[local14]; + arg2[local14] = local25; + arg0[arg1] = arg0[local14]; + arg0[local14] = local39; + method1307(arg0, local14 - 1, arg2, arg3); + method1307(arg0, arg1, arg2, local14 + 1); + } } diff --git a/client/src/main/java/rt4/Flames.java b/client/src/main/java/rt4/Flames.java index 2e06d06..34d6360 100644 --- a/client/src/main/java/rt4/Flames.java +++ b/client/src/main/java/rt4/Flames.java @@ -4,27 +4,27 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public class Flames { - @OriginalMember(owner = "client!se", name = "t", descriptor = "[I") - public static final int[] anIntArray445 = new int[] { 12543016, 15504954, 15914854, 16773818 }; - @OriginalMember(owner = "client!bb", name = "m", descriptor = "Lclient!na;") - public static final JagString RUNES = JagString.parse("runes"); - @OriginalMember(owner = "client!km", name = "Yc", descriptor = "I") - public static int anInt3443; - @OriginalMember(owner = "client!uf", name = "e", descriptor = "I") + @OriginalMember(owner = "client!se", name = "t", descriptor = "[I") + public static final int[] anIntArray445 = new int[]{12543016, 15504954, 15914854, 16773818}; + @OriginalMember(owner = "client!bb", name = "m", descriptor = "Lclient!na;") + public static final JagString RUNES = JagString.parse("runes"); + @OriginalMember(owner = "client!km", name = "Yc", descriptor = "I") + public static int anInt3443; + @OriginalMember(owner = "client!uf", name = "e", descriptor = "I") public static int anInt5434 = 0; - @OriginalMember(owner = "client!gg", name = "a", descriptor = "(ILclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0) { - anInt3443 = arg0.getGroupId(RUNES); - } + @OriginalMember(owner = "client!gg", name = "a", descriptor = "(ILclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0) { + anInt3443 = arg0.getGroupId(RUNES); + } - @OriginalMember(owner = "client!sk", name = "a", descriptor = "(Lclient!ve;I)Z") - public static boolean isReady(@OriginalArg(0) Js5 arg0) { - return arg0.isFileReady(anInt3443); - } + @OriginalMember(owner = "client!sk", name = "a", descriptor = "(Lclient!ve;I)Z") + public static boolean isReady(@OriginalArg(0) Js5 arg0) { + return arg0.isFileReady(anInt3443); + } - @OriginalMember(owner = "client!wa", name = "a", descriptor = "(Z)V") - public static void update() { - anInt5434++; - } + @OriginalMember(owner = "client!wa", name = "a", descriptor = "(Z)V") + public static void update() { + anInt5434++; + } } diff --git a/client/src/main/java/rt4/FloType.java b/client/src/main/java/rt4/FloType.java index 2b0c612..c2ae8eb 100644 --- a/client/src/main/java/rt4/FloType.java +++ b/client/src/main/java/rt4/FloType.java @@ -8,9 +8,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!wl") public final class FloType { - @OriginalMember(owner = "client!ca", name = "db", descriptor = "I") - public static int anInt865 = 0; - @OriginalMember(owner = "client!wl", name = "j", descriptor = "Z") + @OriginalMember(owner = "client!ca", name = "db", descriptor = "I") + public static int anInt865 = 0; + @OriginalMember(owner = "client!wl", name = "j", descriptor = "Z") public boolean aBoolean310 = false; @OriginalMember(owner = "client!wl", name = "l", descriptor = "Z") @@ -40,12 +40,12 @@ public final class FloType { @OriginalMember(owner = "client!wl", name = "m", descriptor = "I") public int anInt5889 = 1190717; - @OriginalMember(owner = "client!be", name = "a", descriptor = "(II)I") - public static int method492(@OriginalArg(1) int arg0) { - return arg0 == 16711935 ? -1 : ColorUtils.rgbToHsl(arg0); - } + @OriginalMember(owner = "client!be", name = "a", descriptor = "(II)I") + public static int method492(@OriginalArg(1) int arg0) { + return arg0 == 16711935 ? -1 : ColorUtils.rgbToHsl(arg0); + } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(ILclient!wa;I)V") + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(ILclient!wa;I)V") public final void decode(@OriginalArg(1) Buffer arg0, @OriginalArg(2) int arg1) { while (true) { @Pc(5) int local5 = arg0.g1(); diff --git a/client/src/main/java/rt4/FloTypeList.java b/client/src/main/java/rt4/FloTypeList.java index c7fd55e..eaa4027 100644 --- a/client/src/main/java/rt4/FloTypeList.java +++ b/client/src/main/java/rt4/FloTypeList.java @@ -5,46 +5,46 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class FloTypeList { - @OriginalMember(owner = "client!t", name = "p", descriptor = "Lclient!n;") + @OriginalMember(owner = "client!t", name = "p", descriptor = "Lclient!n;") public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!hj", name = "a", descriptor = "I") - public static int capacity; - @OriginalMember(owner = "client!cl", name = "J", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!hj", name = "a", descriptor = "I") + public static int capacity; + @OriginalMember(owner = "client!cl", name = "J", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZLclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0) { - archive = arg0; - capacity = archive.getGroupCapacity(4); - } + @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZLclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0) { + archive = arg0; + capacity = archive.getGroupCapacity(4); + } - @OriginalMember(owner = "client!um", name = "a", descriptor = "(BI)Lclient!wl;") - public static FloType method4395(@OriginalArg(1) int arg0) { - @Pc(6) FloType local6 = (FloType) types.get((long) arg0); - if (local6 != null) { - return local6; - } - @Pc(30) byte[] local30 = archive.fetchFile(4, arg0); - local6 = new FloType(); - if (local30 != null) { - local6.decode(new Buffer(local30), arg0); - } - types.put(local6, (long) arg0); - return local6; - } + @OriginalMember(owner = "client!um", name = "a", descriptor = "(BI)Lclient!wl;") + public static FloType method4395(@OriginalArg(1) int arg0) { + @Pc(6) FloType local6 = (FloType) types.get(arg0); + if (local6 != null) { + return local6; + } + @Pc(30) byte[] local30 = archive.fetchFile(4, arg0); + local6 = new FloType(); + if (local30 != null) { + local6.decode(new Buffer(local30), arg0); + } + types.put(local6, arg0); + return local6; + } - @OriginalMember(owner = "client!uh", name = "e", descriptor = "(I)V") - public static void method4301() { - types.removeSoft(); - } + @OriginalMember(owner = "client!uh", name = "e", descriptor = "(I)V") + public static void method4301() { + types.removeSoft(); + } - @OriginalMember(owner = "client!wh", name = "a", descriptor = "(I)V") - public static void method4612() { - types.clear(); - } + @OriginalMember(owner = "client!wh", name = "a", descriptor = "(I)V") + public static void method4612() { + types.clear(); + } - @OriginalMember(owner = "client!aj", name = "c", descriptor = "(II)V") - public static void clean() { - types.clean(5); - } + @OriginalMember(owner = "client!aj", name = "c", descriptor = "(II)V") + public static void clean() { + types.clean(5); + } } diff --git a/client/src/main/java/rt4/FluTypeList.java b/client/src/main/java/rt4/FluTypeList.java index 80062bd..90771bf 100644 --- a/client/src/main/java/rt4/FluTypeList.java +++ b/client/src/main/java/rt4/FluTypeList.java @@ -5,43 +5,43 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class FluTypeList { - @OriginalMember(owner = "client!gj", name = "p", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!oj", name = "x", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!gj", name = "p", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!oj", name = "x", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZI)Lclient!ni;") - public static FluType get(@OriginalArg(1) int arg0) { - @Pc(10) FluType local10 = (FluType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(27) byte[] local27 = archive.fetchFile(1, arg0); - local10 = new FluType(); - if (local27 != null) { - local10.decode(arg0, new Buffer(local27)); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZI)Lclient!ni;") + public static FluType get(@OriginalArg(1) int arg0) { + @Pc(10) FluType local10 = (FluType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(27) byte[] local27 = archive.fetchFile(1, arg0); + local10 = new FluType(); + if (local27 != null) { + local10.decode(arg0, new Buffer(local27)); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!ve;I)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!ve;I)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!sd", name = "f", descriptor = "(B)V") - public static void method3885() { - types.removeSoft(); - } + @OriginalMember(owner = "client!sd", name = "f", descriptor = "(B)V") + public static void method3885() { + types.removeSoft(); + } - @OriginalMember(owner = "client!ed", name = "c", descriptor = "(I)V") - public static void method1308() { - types.clear(); - } + @OriginalMember(owner = "client!ed", name = "c", descriptor = "(I)V") + public static void method1308() { + types.clear(); + } - @OriginalMember(owner = "client!fk", name = "b", descriptor = "(IB)V") - public static void clean() { - types.clean(5); - } + @OriginalMember(owner = "client!fk", name = "b", descriptor = "(IB)V") + public static void clean() { + types.clean(5); + } } diff --git a/client/src/main/java/rt4/FogManager.java b/client/src/main/java/rt4/FogManager.java index 2eb7c9a..e8eb057 100644 --- a/client/src/main/java/rt4/FogManager.java +++ b/client/src/main/java/rt4/FogManager.java @@ -1,6 +1,6 @@ package rt4; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -71,11 +71,11 @@ public final class FogManager { @Pc(34) float local34 = (float) (arg0 >> 16 & 0xFF) / 255.0F; @Pc(43) float local43 = (float) (arg0 >> 8 & 0xFF) / 255.0F; @Pc(50) float local50 = (float) (arg0 & 0xFF) / 255.0F; - @Pc(75) float[] local75 = new float[] { arg1 * local34, arg1 * local43, arg1 * local50, 1.0F }; + @Pc(75) float[] local75 = new float[]{arg1 * local34, arg1 * local43, arg1 * local50, 1.0F}; local25.glLightModelfv(GL2.GL_LIGHT_MODEL_AMBIENT, local75, 0); - @Pc(105) float[] local105 = new float[] { arg2 * local34, arg2 * local43, arg2 * local50, 1.0F }; + @Pc(105) float[] local105 = new float[]{arg2 * local34, arg2 * local43, arg2 * local50, 1.0F}; local25.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, local105, 0); - @Pc(139) float[] local139 = new float[] { -arg3 * local34, -arg3 * local43, -arg3 * local50, 1.0F }; + @Pc(139) float[] local139 = new float[]{-arg3 * local34, -arg3 * local43, -arg3 * local50, 1.0F}; local25.glLightfv(GL2.GL_LIGHT1, GL2.GL_DIFFUSE, local139, 0); } @@ -94,7 +94,7 @@ public final class FogManager { gl.glFogf(GL2.GL_FOG_DENSITY, 0.95F); gl.glHint(GL2.GL_FOG_HINT, GL2.GL_FASTEST); int fogEnd = GlobalConfig.VIEW_DISTANCE; - @Pc(65) int fogStart = fogEnd - (int)(GlobalConfig.VIEW_FADE_DISTANCE * 2.0f) - offset; + @Pc(65) int fogStart = fogEnd - (int) (GlobalConfig.VIEW_FADE_DISTANCE * 2.0f) - offset; if (fogStart < 50) { fogStart = 50; } @@ -128,10 +128,10 @@ public final class FogManager { @Pc(1) GL2 local1 = GlRenderer.gl; local1.glColorMaterial(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE); local1.glEnable(GL2.GL_COLOR_MATERIAL); - @Pc(27) float[] local27 = new float[] { 0.0F, 0.0F, 0.0F, 1.0F }; + @Pc(27) float[] local27 = new float[]{0.0F, 0.0F, 0.0F, 1.0F}; local1.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, local27, 0); local1.glEnable(GL2.GL_LIGHT0); - @Pc(55) float[] local55 = new float[] { 0.0F, 0.0F, 0.0F, 1.0F }; + @Pc(55) float[] local55 = new float[]{0.0F, 0.0F, 0.0F, 1.0F}; local1.glLightfv(GL2.GL_LIGHT1, GL2.GL_AMBIENT, local55, 0); local1.glEnable(GL2.GL_LIGHT1); anInt3919 = -1; @@ -160,11 +160,11 @@ public final class FogManager { return aFloat21; } - @OriginalMember(owner = "client!si", name = "a", descriptor = "(IZ)V") - public static void method3935(@OriginalArg(0) int arg0) { - method3060(anInt3923, ((float) arg0 * 0.1F + 0.7F) * 1.1523438F, 0.69921875F, 0.69921875F); - method3063(-50.0F, -60.0F, -50.0F); - method3062(anInt3922, 0); - method3058(); - } + @OriginalMember(owner = "client!si", name = "a", descriptor = "(IZ)V") + public static void method3935(@OriginalArg(0) int arg0) { + method3060(anInt3923, ((float) arg0 * 0.1F + 0.7F) * 1.1523438F, 0.69921875F, 0.69921875F); + method3063(-50.0F, -60.0F, -50.0F); + method3062(anInt3922, 0); + method3058(); + } } diff --git a/client/src/main/java/rt4/Font.java b/client/src/main/java/rt4/Font.java index dd393f7..2b078e2 100644 --- a/client/src/main/java/rt4/Font.java +++ b/client/src/main/java/rt4/Font.java @@ -1,11 +1,12 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!rk") public abstract class Font extends SecondaryNode { @@ -198,7 +199,7 @@ public abstract class Font extends SecondaryNode { return -local37; } - @OriginalMember(owner = "client!ce", name = "a", descriptor = "(I[B)Lclient!rk;") + @OriginalMember(owner = "client!ce", name = "a", descriptor = "(I[B)Lclient!rk;") public static Font method799(@OriginalArg(1) byte[] arg0) { if (arg0 == null) { return null; @@ -329,7 +330,7 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "b", descriptor = "(Lclient!na;I)I") public final int getMaxLineWidth(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1) { - @Pc(10) int local10 = this.splitParagraph(arg0, new int[] { arg1 }, lines); + @Pc(10) int local10 = this.splitParagraph(arg0, new int[]{arg1}, lines); @Pc(12) int local12 = 0; for (@Pc(14) int local14 = 0; local14 < local10; local14++) { @Pc(23) int local23 = this.getStringWidth(lines[local14]); @@ -411,7 +412,7 @@ public abstract class Font extends SecondaryNode { if (arg0 == null) { return 0; } - arg3.setSeed((long) arg4); + arg3.setSeed(arg4); this.setColors(16777215, 0, (arg3.nextInt() & 0x1F) + 192); @Pc(21) int local21 = arg0.length(); @Pc(24) int[] local24 = new int[local21]; @@ -428,7 +429,7 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "c", descriptor = "(Lclient!na;I)I") public final int getParagraphLineCount(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1) { - return this.splitParagraph(arg0, new int[] { arg1 }, lines); + return this.splitParagraph(arg0, new int[]{arg1}, lines); } @OriginalMember(owner = "client!rk", name = "b", descriptor = "(Lclient!na;)V") @@ -670,7 +671,7 @@ public abstract class Font extends SecondaryNode { if (arg9 == 0) { arg9 = this.lineHeight; } - @Pc(20) int[] local20 = new int[] { arg3 }; + @Pc(20) int[] local20 = new int[]{arg3}; if (arg4 < this.paragraphTopPadding + this.paragraphBottomPadding + arg9 && arg4 < arg9 + arg9) { local20 = null; } @@ -850,7 +851,7 @@ public abstract class Font extends SecondaryNode { if (arg0 == null) { return 0; } - arg9.setSeed((long) arg10); + arg9.setSeed(arg10); this.setColors(arg5, arg6, (arg9.nextInt() & 0x1F) + 192); @Pc(21) int local21 = arg0.length(); @Pc(24) int[] local24 = new int[local21]; diff --git a/client/src/main/java/rt4/FontMetricsList.java b/client/src/main/java/rt4/FontMetricsList.java index da01186..30828a7 100644 --- a/client/src/main/java/rt4/FontMetricsList.java +++ b/client/src/main/java/rt4/FontMetricsList.java @@ -5,19 +5,19 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class FontMetricsList { - @OriginalMember(owner = "client!l", name = "f", descriptor = "Lclient!n;") - public static final SoftLruHashTable fontMetrics = new SoftLruHashTable(4); + @OriginalMember(owner = "client!l", name = "f", descriptor = "Lclient!n;") + public static final SoftLruHashTable fontMetrics = new SoftLruHashTable(4); - @OriginalMember(owner = "client!li", name = "a", descriptor = "(II)Lclient!dd;") - public static SoftwareFont get(@OriginalArg(1) int arg0) { - @Pc(16) SoftwareFont local16 = (SoftwareFont) fontMetrics.get((long) arg0); - if (local16 != null) { - return local16; - } - @Pc(26) byte[] local26 = client.js5Archive13.fetchFile(arg0, 0); - local16 = new SoftwareFont(local26); - local16.setNameIcons(Sprites.nameIcons, null); - fontMetrics.put(local16, (long) arg0); - return local16; - } + @OriginalMember(owner = "client!li", name = "a", descriptor = "(II)Lclient!dd;") + public static SoftwareFont get(@OriginalArg(1) int arg0) { + @Pc(16) SoftwareFont local16 = (SoftwareFont) fontMetrics.get(arg0); + if (local16 != null) { + return local16; + } + @Pc(26) byte[] local26 = client.js5Archive13.fetchFile(arg0, 0); + local16 = new SoftwareFont(local26); + local16.setNameIcons(Sprites.nameIcons, null); + fontMetrics.put(local16, arg0); + return local16; + } } diff --git a/client/src/main/java/rt4/Fonts.java b/client/src/main/java/rt4/Fonts.java index 638bb17..ad78800 100644 --- a/client/src/main/java/rt4/Fonts.java +++ b/client/src/main/java/rt4/Fonts.java @@ -5,53 +5,53 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Fonts { - @OriginalMember(owner = "client!j", name = "x", descriptor = "Lclient!rk;") - public static Font p11Full; - @OriginalMember(owner = "client!rh", name = "h", descriptor = "Lclient!rk;") - public static Font p12Full; - @OriginalMember(owner = "client!wl", name = "q", descriptor = "Lclient!rk;") - public static Font b12Full; - @OriginalMember(owner = "client!vj", name = "j", descriptor = "Lclient!dd;") - public static SoftwareFont p11FullSoftware; + @OriginalMember(owner = "client!j", name = "x", descriptor = "Lclient!rk;") + public static Font p11Full; + @OriginalMember(owner = "client!rh", name = "h", descriptor = "Lclient!rk;") + public static Font p12Full; + @OriginalMember(owner = "client!wl", name = "q", descriptor = "Lclient!rk;") + public static Font b12Full; + @OriginalMember(owner = "client!vj", name = "j", descriptor = "Lclient!dd;") + public static SoftwareFont p11FullSoftware; - @OriginalMember(owner = "client!fn", name = "a", descriptor = "(Lclient!ve;Lclient!ve;Z)I") - public static int getReady(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { - @Pc(5) int ready = 0; - if (arg0.isFileReady(Sprites.p11FullId)) { - ready++; - } - if (arg0.isFileReady(Sprites.p12FullId)) { - ready++; - } - if (arg0.isFileReady(Sprites.b12FullId)) { - ready++; - } - if (arg1.isFileReady(Sprites.p11FullId)) { - ready++; - } - if (arg1.isFileReady(Sprites.p12FullId)) { - ready++; - } - if (arg1.isFileReady(Sprites.b12FullId)) { - ready++; - } - return ready; - } + @OriginalMember(owner = "client!fn", name = "a", descriptor = "(Lclient!ve;Lclient!ve;Z)I") + public static int getReady(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { + @Pc(5) int ready = 0; + if (arg0.isFileReady(Sprites.p11FullId)) { + ready++; + } + if (arg0.isFileReady(Sprites.p12FullId)) { + ready++; + } + if (arg0.isFileReady(Sprites.b12FullId)) { + ready++; + } + if (arg1.isFileReady(Sprites.p11FullId)) { + ready++; + } + if (arg1.isFileReady(Sprites.p12FullId)) { + ready++; + } + if (arg1.isFileReady(Sprites.b12FullId)) { + ready++; + } + return ready; + } - @OriginalMember(owner = "client!ld", name = "a", descriptor = "(B)I") - public static int getTotal() { - return 6; - } + @OriginalMember(owner = "client!ld", name = "a", descriptor = "(B)I") + public static int getTotal() { + return 6; + } - @OriginalMember(owner = "client!hn", name = "a", descriptor = "(Lclient!ve;ILclient!ve;)V") - public static void load(@OriginalArg(0) Js5 arg0, @OriginalArg(2) Js5 arg1) { - p11Full = Font.method2462(Sprites.p11FullId, arg1, arg0); - if (GlRenderer.enabled) { - p11FullSoftware = SoftwareFont.method2412(Sprites.p11FullId, arg0, arg1); - } else { - p11FullSoftware = (SoftwareFont) p11Full; - } - p12Full = Font.method2462(Sprites.p12FullId, arg1, arg0); - b12Full = Font.method2462(Sprites.b12FullId, arg1, arg0); - } + @OriginalMember(owner = "client!hn", name = "a", descriptor = "(Lclient!ve;ILclient!ve;)V") + public static void load(@OriginalArg(0) Js5 arg0, @OriginalArg(2) Js5 arg1) { + p11Full = Font.method2462(Sprites.p11FullId, arg1, arg0); + if (GlRenderer.enabled) { + p11FullSoftware = SoftwareFont.method2412(Sprites.p11FullId, arg0, arg1); + } else { + p11FullSoftware = (SoftwareFont) p11Full; + } + p12Full = Font.method2462(Sprites.p12FullId, arg1, arg0); + b12Full = Font.method2462(Sprites.b12FullId, arg1, arg0); + } } diff --git a/client/src/main/java/rt4/FrameBuffer.java b/client/src/main/java/rt4/FrameBuffer.java index ef9a3f3..57a0e63 100644 --- a/client/src/main/java/rt4/FrameBuffer.java +++ b/client/src/main/java/rt4/FrameBuffer.java @@ -1,12 +1,12 @@ package rt4; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Image; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.awt.Component; +import java.awt.*; + @OriginalClass("client!vk") public abstract class FrameBuffer { diff --git a/client/src/main/java/rt4/FriendsList.java b/client/src/main/java/rt4/FriendsList.java index 56de099..a687f9c 100644 --- a/client/src/main/java/rt4/FriendsList.java +++ b/client/src/main/java/rt4/FriendsList.java @@ -5,26 +5,26 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class FriendsList { - @OriginalMember(owner = "client!hd", name = "g", descriptor = "[J") - public static final long[] encodedUsernames = new long[200]; - @OriginalMember(owner = "client!rg", name = "r", descriptor = "[Lclient!na;") - public static final JagString[] worldNames = new JagString[200]; - @OriginalMember(owner = "client!ic", name = "l", descriptor = "[I") - public static final int[] ranks = new int[200]; - @OriginalMember(owner = "client!ia", name = "d", descriptor = "[I") - public static final int[] worlds = new int[200]; - @OriginalMember(owner = "client!jh", name = "b", descriptor = "[Lclient!na;") + @OriginalMember(owner = "client!hd", name = "g", descriptor = "[J") + public static final long[] encodedUsernames = new long[200]; + @OriginalMember(owner = "client!rg", name = "r", descriptor = "[Lclient!na;") + public static final JagString[] worldNames = new JagString[200]; + @OriginalMember(owner = "client!ic", name = "l", descriptor = "[I") + public static final int[] ranks = new int[200]; + @OriginalMember(owner = "client!ia", name = "d", descriptor = "[I") + public static final int[] worlds = new int[200]; + @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]; - @OriginalMember(owner = "client!p", name = "d", descriptor = "I") - public static int transmitAt = 0; - @OriginalMember(owner = "client!nc", name = "m", descriptor = "I") + @OriginalMember(owner = "client!ab", name = "c", descriptor = "[Z") + public static final boolean[] aBooleanArray135 = new boolean[200]; + @OriginalMember(owner = "client!p", name = "d", descriptor = "I") + public static int transmitAt = 0; + @OriginalMember(owner = "client!nc", name = "m", descriptor = "I") public static int state = 0; - @OriginalMember(owner = "client!al", name = "m", descriptor = "I") + @OriginalMember(owner = "client!al", name = "m", descriptor = "I") public static int size = 0; - @OriginalMember(owner = "client!hj", name = "a", descriptor = "(Lclient!na;B)Z") + @OriginalMember(owner = "client!hj", name = "a", descriptor = "(Lclient!na;B)Z") public static boolean contains(@OriginalArg(0) JagString arg0) { if (arg0 == null) { return false; @@ -34,93 +34,89 @@ public class FriendsList { return true; } } - if (arg0.equalsIgnoreCase(PlayerList.self.username)) { - return true; - } else { - return false; + return arg0.equalsIgnoreCase(PlayerList.self.username); + } + + @OriginalMember(owner = "client!fb", name = "a", descriptor = "(JB)V") + public static void add(@OriginalArg(0) long arg0) { + if (arg0 == 0L) { + return; + } + if (size >= 100 && !LoginManager.playerMember || size >= 200) { + Chat.add(JagString.EMPTY, 0, LocalizedText.FRIENDLISTFULL); + return; + } + @Pc(35) JagString local35 = Base37.decode37(arg0).toTitleCase(); + @Pc(42) int local42; + for (local42 = 0; local42 < size; local42++) { + if (encodedUsernames[local42] == arg0) { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{local35, LocalizedText.FRIENDLISTDUPE})); + return; + } + } + for (local42 = 0; local42 < IgnoreList.size; local42++) { + if (arg0 == IgnoreList.encodedUsernames[local42]) { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{LocalizedText.REMOVESOCIAL1, local35, LocalizedText.REMOVEIGNORE})); + return; + } + } + if (local35.strEquals(PlayerList.self.username)) { + Chat.add(JagString.EMPTY, 0, LocalizedText.FRIENDCANTADDSELF); + return; + } + usernames[size] = local35; + encodedUsernames[size] = arg0; + worlds[size] = 0; + worldNames[size] = JagString.EMPTY; + ranks[size] = 0; + aBooleanArray135[size] = false; + size++; + transmitAt = InterfaceList.transmitTimer; + Protocol.outboundBuffer.p1isaac(120); + Protocol.outboundBuffer.p8(arg0); + } + + @OriginalMember(owner = "client!pi", name = "a", descriptor = "(JI)V") + public static void remove(@OriginalArg(0) long arg0) { + if (arg0 == 0L) { + return; + } + for (@Pc(13) int local13 = 0; local13 < size; local13++) { + if (encodedUsernames[local13] == arg0) { + size--; + for (@Pc(41) int local41 = local13; local41 < size; local41++) { + usernames[local41] = usernames[local41 + 1]; + worlds[local41] = worlds[local41 + 1]; + worldNames[local41] = worldNames[local41 + 1]; + encodedUsernames[local41] = encodedUsernames[local41 + 1]; + ranks[local41] = ranks[local41 + 1]; + aBooleanArray135[local41] = aBooleanArray135[local41 + 1]; + } + transmitAt = InterfaceList.transmitTimer; + Protocol.outboundBuffer.p1isaac(57); + Protocol.outboundBuffer.p8(arg0); + break; + } } } - @OriginalMember(owner = "client!fb", name = "a", descriptor = "(JB)V") - public static void add(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - if (size >= 100 && !LoginManager.playerMember || size >= 200) { - Chat.add(JagString.EMPTY, 0, LocalizedText.FRIENDLISTFULL); - return; - } - @Pc(35) JagString local35 = Base37.decode37(arg0).toTitleCase(); - @Pc(42) int local42; - for (local42 = 0; local42 < size; local42++) { - if (encodedUsernames[local42] == arg0) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { local35, LocalizedText.FRIENDLISTDUPE})); - return; - } - } - for (local42 = 0; local42 < IgnoreList.size; local42++) { - if (arg0 == IgnoreList.encodedUsernames[local42]) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { LocalizedText.REMOVESOCIAL1, local35, LocalizedText.REMOVEIGNORE})); - return; - } - } - if (local35.strEquals(PlayerList.self.username)) { - Chat.add(JagString.EMPTY, 0, LocalizedText.FRIENDCANTADDSELF); - return; - } - usernames[size] = local35; - encodedUsernames[size] = arg0; - worlds[size] = 0; - worldNames[size] = JagString.EMPTY; - ranks[size] = 0; - aBooleanArray135[size] = false; - size++; - transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(120); - Protocol.outboundBuffer.p8(arg0); - } + @OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;I)V") + public static void setRank(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { + Protocol.outboundBuffer.p1isaac(188); + Protocol.outboundBuffer.p1add(arg1); + Protocol.outboundBuffer.p8(arg0.encode37()); + } - @OriginalMember(owner = "client!pi", name = "a", descriptor = "(JI)V") - public static void remove(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - for (@Pc(13) int local13 = 0; local13 < size; local13++) { - if (encodedUsernames[local13] == arg0) { - size--; - for (@Pc(41) int local41 = local13; local41 < size; local41++) { - usernames[local41] = usernames[local41 + 1]; - worlds[local41] = worlds[local41 + 1]; - worldNames[local41] = worldNames[local41 + 1]; - encodedUsernames[local41] = encodedUsernames[local41 + 1]; - ranks[local41] = ranks[local41 + 1]; - aBooleanArray135[local41] = aBooleanArray135[local41 + 1]; - } - transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(57); - Protocol.outboundBuffer.p8(arg0); - break; - } - } - } - - @OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;I)V") - public static void setRank(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { - Protocol.outboundBuffer.p1isaac(188); - Protocol.outboundBuffer.p1add(arg1); - Protocol.outboundBuffer.p8(arg0.encode37()); - } - - @OriginalMember(owner = "client!ac", name = "a", descriptor = "(Lclient!na;I)I") - public static int method25(@OriginalArg(0) JagString arg0) { - if (arg0 == null) { - return -1; - } - for (@Pc(20) int local20 = 0; local20 < size; local20++) { - if (arg0.equalsIgnoreCase(usernames[local20])) { - return local20; - } - } - return -1; - } + @OriginalMember(owner = "client!ac", name = "a", descriptor = "(Lclient!na;I)I") + public static int method25(@OriginalArg(0) JagString arg0) { + if (arg0 == null) { + return -1; + } + for (@Pc(20) int local20 = 0; local20 < size; local20++) { + if (arg0.equalsIgnoreCase(usernames[local20])) { + return local20; + } + } + return -1; + } } diff --git a/client/src/main/java/rt4/GameCanvas.java b/client/src/main/java/rt4/GameCanvas.java index 2a3da68..76eda48 100644 --- a/client/src/main/java/rt4/GameCanvas.java +++ b/client/src/main/java/rt4/GameCanvas.java @@ -1,12 +1,12 @@ package rt4; -import java.awt.Canvas; -import java.awt.Component; -import java.awt.Graphics; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.awt.Component; +import java.awt.*; + @OriginalClass("client!tm") public final class GameCanvas extends Canvas { diff --git a/client/src/main/java/rt4/GameShell.java b/client/src/main/java/rt4/GameShell.java index 67fa000..00fc98e 100644 --- a/client/src/main/java/rt4/GameShell.java +++ b/client/src/main/java/rt4/GameShell.java @@ -1,15 +1,16 @@ package rt4; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.applet.Applet; import java.applet.AppletContext; import java.awt.*; import java.awt.event.*; import java.lang.reflect.Method; import java.net.URL; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; @OriginalClass("client!rc") public abstract class GameShell extends Applet implements Runnable, FocusListener, WindowListener { @@ -85,10 +86,10 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene @OriginalMember(owner = "client!ba", name = "B", descriptor = "I") public static double VARIABLE_RENDER_RATE = 20.0d; - public static long VARIABLE_RENDER_RATE_NS = (long)(VARIABLE_RENDER_RATE * 1_000_000.0d); + public static long VARIABLE_RENDER_RATE_NS = (long) (VARIABLE_RENDER_RATE * 1_000_000.0d); public static final double FIXED_UPDATE_RATE = 20.0d; - public static final long FIXED_UPDATE_RATE_NS = (long)(FIXED_UPDATE_RATE * 1_000_000.0d); + public static final long FIXED_UPDATE_RATE_NS = (long) (FIXED_UPDATE_RATE * 1_000_000.0d); @OriginalMember(owner = "client!cm", name = "b", descriptor = "Ljava/lang/Thread;") public static Thread thread; @@ -158,26 +159,26 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene } } - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(Z)V") - public static void resetTimer() { - timer.reset(); - @Pc(10) int local10; - for (local10 = 0; local10 < 32; local10++) { - redrawTimes[local10] = 0L; - } - for (local10 = 0; local10 < 32; local10++) { - logicTimes[local10] = 0L; - } - logicCycles = 0; - } - - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(II)V") - public static void setFpsTarget(@OriginalArg(0) int fps) { - VARIABLE_RENDER_RATE = 1000.0d / (double)fps; - VARIABLE_RENDER_RATE_NS = (int)(VARIABLE_RENDER_RATE * 1_000_000.0d); + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(Z)V") + public static void resetTimer() { + timer.reset(); + @Pc(10) int local10; + for (local10 = 0; local10 < 32; local10++) { + redrawTimes[local10] = 0L; + } + for (local10 = 0; local10 < 32; local10++) { + logicTimes[local10] = 0L; + } + logicCycles = 0; } - @OriginalMember(owner = "client!qh", name = "a", descriptor = "(Z)V") + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(II)V") + public static void setFpsTarget(@OriginalArg(0) int fps) { + VARIABLE_RENDER_RATE = 1000.0d / (double) fps; + VARIABLE_RENDER_RATE_NS = (int) (VARIABLE_RENDER_RATE * 1_000_000.0d); + } + + @OriginalMember(owner = "client!qh", name = "a", descriptor = "(Z)V") public static void method3662() { @Pc(8) Container local8; if (fullScreenFrame != null) { @@ -222,7 +223,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene Static139.method2704(); } - @OriginalMember(owner = "client!rc", name = "focusLost", descriptor = "(Ljava/awt/event/FocusEvent;)V") + @OriginalMember(owner = "client!rc", name = "focusLost", descriptor = "(Ljava/awt/event/FocusEvent;)V") @Override public final void focusLost(@OriginalArg(0) FocusEvent event) { focusIn = false; @@ -446,7 +447,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene private void mainRedrawWrapper() { long now = System.currentTimeMillis(); if (now - lastFpsUpdate > 1000) { - lastFps[lastFpsIndex++] = 1_000_000_000.0d / (double)renderDelta; + lastFps[lastFpsIndex++] = 1_000_000_000.0d / (double) renderDelta; double total = 0.0d; for (int i = 0; i < lastFps.length; ++i) { total += lastFps[i]; @@ -575,7 +576,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene updateDelta = currentTime - lastUpdateTime; if (updateDelta >= FIXED_UPDATE_RATE_NS) { - logicCycles = timer.count(minimumDelay, (int)FIXED_UPDATE_RATE); + logicCycles = timer.count(minimumDelay, (int) FIXED_UPDATE_RATE); for (int cycle = 0; cycle < logicCycles; ++cycle) { this.mainLoopWrapper(); } @@ -688,11 +689,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene canvasHeight = 503; frameHeight = 503; @Pc(54) String openWindowJavaScriptStr = this.getParameter("openwinjs"); - if (openWindowJavaScriptStr != null && openWindowJavaScriptStr.equals("1")) { - openWindowJavaScript = true; - } else { - openWindowJavaScript = false; - } + openWindowJavaScript = openWindowJavaScriptStr != null && openWindowJavaScriptStr.equals("1"); if (signLink == null) { Static69.signLink = signLink = new SignLink(this, cacheId, null, 0); } diff --git a/client/src/main/java/rt4/GlAlphaSprite.java b/client/src/main/java/rt4/GlAlphaSprite.java index 4705de8..d53762b 100644 --- a/client/src/main/java/rt4/GlAlphaSprite.java +++ b/client/src/main/java/rt4/GlAlphaSprite.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!el") public final class GlAlphaSprite extends GlSprite { diff --git a/client/src/main/java/rt4/GlBuffer.java b/client/src/main/java/rt4/GlBuffer.java index f03c0b7..930d91b 100644 --- a/client/src/main/java/rt4/GlBuffer.java +++ b/client/src/main/java/rt4/GlBuffer.java @@ -1,9 +1,10 @@ package rt4; -import java.nio.ByteBuffer; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.nio.ByteBuffer; + @OriginalClass("client!ql") public final class GlBuffer { diff --git a/client/src/main/java/rt4/GlCleaner.java b/client/src/main/java/rt4/GlCleaner.java index 8efa92b..bce7df4 100644 --- a/client/src/main/java/rt4/GlCleaner.java +++ b/client/src/main/java/rt4/GlCleaner.java @@ -1,6 +1,6 @@ package rt4; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; diff --git a/client/src/main/java/rt4/GlFont.java b/client/src/main/java/rt4/GlFont.java index cbeee31..3bcc54a 100644 --- a/client/src/main/java/rt4/GlFont.java +++ b/client/src/main/java/rt4/GlFont.java @@ -1,18 +1,19 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!mb") public final class GlFont extends Font { - @OriginalMember(owner = "client!dj", name = "a", descriptor = "Lclient!cf;") - public static GlSprite masked = null; - @OriginalMember(owner = "client!mb", name = "Gb", descriptor = "[I") + @OriginalMember(owner = "client!dj", name = "a", descriptor = "Lclient!cf;") + public static GlSprite masked = null; + @OriginalMember(owner = "client!mb", name = "Gb", descriptor = "[I") private int[] listIds; @OriginalMember(owner = "client!mb", name = "Hb", descriptor = "I") @@ -121,13 +122,13 @@ public final class GlFont extends Font { @OriginalMember(owner = "client!mb", name = "a", descriptor = "(IIIIIIIZ)V") @Override protected final void renderGlyphTransparent(@OriginalArg(0) int glyph, @OriginalArg(1) int x, @OriginalArg(2) int y, @OriginalArg(3) int width, @OriginalArg(4) int height, @OriginalArg(5) int color, @OriginalArg(6) int alpha) { - GlRenderer.method4151(); - @Pc(2) GL2 gl = GlRenderer.gl; - GlRenderer.setTextureId(this.textureId); - gl.glColor4ub((byte) (color >> 16), (byte) (color >> 8), (byte) color, alpha > 255 ? -1 : (byte) alpha); - gl.glTranslatef((float) x, (float) (GlRenderer.canvasHeight - y), 0.0F); - gl.glCallList(this.listIds[glyph]); - gl.glLoadIdentity(); + GlRenderer.method4151(); + @Pc(2) GL2 gl = GlRenderer.gl; + GlRenderer.setTextureId(this.textureId); + gl.glColor4ub((byte) (color >> 16), (byte) (color >> 8), (byte) color, alpha > 255 ? -1 : (byte) alpha); + gl.glTranslatef((float) x, (float) (GlRenderer.canvasHeight - y), 0.0F); + gl.glCallList(this.listIds[glyph]); + gl.glLoadIdentity(); } @OriginalMember(owner = "client!mb", name = "b", descriptor = "()V") diff --git a/client/src/main/java/rt4/GlIndexedSprite.java b/client/src/main/java/rt4/GlIndexedSprite.java index 841f698..7c4ad68 100644 --- a/client/src/main/java/rt4/GlIndexedSprite.java +++ b/client/src/main/java/rt4/GlIndexedSprite.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!oh") public final class GlIndexedSprite extends IndexedSprite { diff --git a/client/src/main/java/rt4/GlModel.java b/client/src/main/java/rt4/GlModel.java index 6cbd1e5..9f29be8 100644 --- a/client/src/main/java/rt4/GlModel.java +++ b/client/src/main/java/rt4/GlModel.java @@ -1,19 +1,20 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!td") 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); + @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); @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;") @@ -54,10 +55,10 @@ public final class GlModel extends Model { public static int anInt5300; @OriginalMember(owner = "client!td", name = "zb", descriptor = "F") public static float aFloat28; - @OriginalMember(owner = "client!lk", name = "V", descriptor = "I") + @OriginalMember(owner = "client!lk", name = "V", descriptor = "I") public static int anInt3582 = 0; - @OriginalMember(owner = "client!td", name = "t", descriptor = "[S") + @OriginalMember(owner = "client!td", name = "t", descriptor = "[S") private short[] aShortArray75; @OriginalMember(owner = "client!td", name = "v", descriptor = "[S") @@ -688,7 +689,7 @@ public final class GlModel extends Model { @Pc(32) float local32 = (float) local3 * arg6[0] + (float) local7 * arg6[1] + (float) local11 * arg6[2]; @Pc(53) float local53 = (float) local3 * arg6[3] + (float) local7 * arg6[4] + (float) local11 * arg6[5]; @Pc(74) float local74 = (float) local3 * arg6[6] + (float) local7 * arg6[7] + (float) local11 * arg6[8]; - @Pc(85) float local85 = (float) Math.atan2((double) local32, (double) local74) / 6.2831855F + 0.5F; + @Pc(85) float local85 = (float) Math.atan2(local32, local74) / 6.2831855F + 0.5F; if (arg7 != 1.0F) { local85 *= arg7; } @@ -757,8 +758,8 @@ public final class GlModel extends Model { public static float[] method4097(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) float arg4, @OriginalArg(5) float arg5, @OriginalArg(6) float arg6) { @Pc(2) float[] local2 = new float[9]; @Pc(5) float[] local5 = new float[9]; - @Pc(13) float local13 = (float) Math.cos((double) ((float) arg3 * 0.024543693F)); - @Pc(21) float local21 = (float) Math.sin((double) ((float) arg3 * 0.024543693F)); + @Pc(13) float local13 = (float) Math.cos((float) arg3 * 0.024543693F); + @Pc(21) float local21 = (float) Math.sin((float) arg3 * 0.024543693F); local2[0] = local13; local2[1] = 0.0F; local2[2] = local21; @@ -772,9 +773,9 @@ public final class GlModel extends Model { @Pc(67) float local67 = 1.0F; @Pc(69) float local69 = 0.0F; @Pc(74) float local74 = (float) arg1 / 32767.0F; - @Pc(84) float local84 = -((float) Math.sqrt((double) (1.0F - local74 * local74))); + @Pc(84) float local84 = -((float) Math.sqrt(1.0F - local74 * local74)); @Pc(88) float local88 = 1.0F - local74; - @Pc(99) float local99 = (float) Math.sqrt((double) (arg0 * arg0 + arg2 * arg2)); + @Pc(99) float local99 = (float) Math.sqrt(arg0 * arg0 + arg2 * arg2); if (local99 == 0.0F && local74 == 0.0F) { local5 = local2; } else { @@ -821,9 +822,9 @@ public final class GlModel extends Model { @Pc(32) float local32 = (float) local3 * arg6[0] + (float) local7 * arg6[1] + (float) local11 * arg6[2]; @Pc(53) float local53 = (float) local3 * arg6[3] + (float) local7 * arg6[4] + (float) local11 * arg6[5]; @Pc(74) float local74 = (float) local3 * arg6[6] + (float) local7 * arg6[7] + (float) local11 * arg6[8]; - @Pc(89) float local89 = (float) Math.sqrt((double) (local32 * local32 + local53 * local53 + local74 * local74)); - @Pc(100) float local100 = (float) Math.atan2((double) local32, (double) local74) / 6.2831855F + 0.5F; - @Pc(113) float local113 = (float) Math.asin((double) (local53 / local89)) / 3.1415927F + arg8 + 0.5F; + @Pc(89) float local89 = (float) Math.sqrt(local32 * local32 + local53 * local53 + local74 * local74); + @Pc(100) float local100 = (float) Math.atan2(local32, local74) / 6.2831855F + 0.5F; + @Pc(113) float local113 = (float) Math.asin(local53 / local89) / 3.1415927F + arg8 + 0.5F; @Pc(118) float local118; if (arg7 == 1) { local118 = local100; @@ -911,18 +912,18 @@ 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!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;") + @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) { return this.method4114(arg0, arg1, arg2, aClass8_Sub1_Sub1_4, aClass8_Sub1_Sub1_3); @@ -1002,9 +1003,9 @@ public final class GlModel extends Model { @Pc(247) short local247 = this.vertexBuffer.aShort5; @Pc(251) short local251 = this.vertexBuffer.aShort8; @Pc(255) short local255 = this.vertexBuffer.aShort7; - @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 }; + @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}; @Pc(362) int local362; @Pc(369) int local369; @Pc(373) int local373; @@ -1055,7 +1056,8 @@ public final class GlModel extends Model { anIntArray467 = new int[this.anInt5296]; } local362 = 0; - label118: while (true) { + label118: + while (true) { if (local362 >= this.vertexCount) { local362 = 0; while (true) { @@ -1750,7 +1752,7 @@ public final class GlModel extends Model { local446 = local428 + anInt5298; local454 = local434 + anInt5300; local462 = local440 + anInt5299; - @Pc(1783) int[] local1783 = new int[] { local343 * arg7[0] + 16384 >> 15, local343 * arg7[3] + 16384 >> 15, local343 * arg7[6] + 16384 >> 15, local365 * arg7[1] + 16384 >> 15, local365 * arg7[4] + 16384 >> 15, local365 * arg7[7] + 16384 >> 15, local387 * arg7[2] + 16384 >> 15, local387 * arg7[5] + 16384 >> 15, local387 * arg7[8] + 16384 >> 15 }; + @Pc(1783) int[] local1783 = new int[]{local343 * arg7[0] + 16384 >> 15, local343 * arg7[3] + 16384 >> 15, local343 * arg7[6] + 16384 >> 15, local365 * arg7[1] + 16384 >> 15, local365 * arg7[4] + 16384 >> 15, local365 * arg7[7] + 16384 >> 15, local387 * arg7[2] + 16384 >> 15, local387 * arg7[5] + 16384 >> 15, local387 * arg7[8] + 16384 >> 15}; local615 = local343 * local230 + 16384 >> 15; local640 = local365 * local45 + 16384 >> 15; local644 = local387 * local53 + 16384 >> 15; @@ -2110,8 +2112,8 @@ public final class GlModel extends Model { this.vertexBuffer.aShort3 = (short) local9; this.vertexBuffer.aShort8 = (short) local5; this.vertexBuffer.aShort7 = (short) local11; - this.vertexBuffer.aShort4 = (short) (Math.sqrt((double) local13) + 0.99D); - Math.sqrt((double) local15); + this.vertexBuffer.aShort4 = (short) (Math.sqrt(local13) + 0.99D); + Math.sqrt(local15); this.vertexBuffer.valid = true; } @@ -2395,7 +2397,7 @@ public final class GlModel extends Model { local60 = (int) FogManager.aFloatArray18[0]; local71 = (int) FogManager.aFloatArray18[1]; local78 = (int) FogManager.aFloatArray18[2]; - local85 = (int) Math.sqrt((double) (local60 * local60 + local71 * local71 + local78 * local78)); + 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++) { @@ -3317,28 +3319,28 @@ public final class GlModel extends Model { 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, (long) this.bounds.anInt4777); + local1.glVertexPointer(3, GL2.GL_FLOAT, this.bounds.anInt4782, this.bounds.anInt4777); } 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; } - local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.aClass127_1.anInt4782, (long) this.aClass127_1.anInt4777); + local1.glColorPointer(4, GL2.GL_UNSIGNED_BYTE, this.aClass127_1.anInt4782, this.aClass127_1.anInt4777); } 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; } - local1.glNormalPointer(GL2.GL_FLOAT, this.aClass127_2.anInt4782, (long) this.aClass127_2.anInt4777); + local1.glNormalPointer(GL2.GL_FLOAT, this.aClass127_2.anInt4782, this.aClass127_2.anInt4777); } 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; } - local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.aClass127_3.anInt4782, (long) this.aClass127_3.anInt4777); + local1.glTexCoordPointer(2, GL2.GL_FLOAT, this.aClass127_3.anInt4782, this.aClass127_3.anInt4777); } if (this.aClass127_5.aClass155_4 != null) { this.aClass127_5.aClass155_4.method4518(); @@ -3382,7 +3384,7 @@ public final class GlModel extends Model { this.aClass127_5.aByteBuffer8.position(local427 * 12); local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, this.aClass127_5.aByteBuffer8); } else { - local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, (long) (local427 * 12)); + local1.glDrawElements(GL2.GL_TRIANGLES, (local434 - local427) * 3, GL2.GL_UNSIGNED_INT, local427 * 12); } } } diff --git a/client/src/main/java/rt4/GlRaster.java b/client/src/main/java/rt4/GlRaster.java index 554ad5b..c85c3cd 100644 --- a/client/src/main/java/rt4/GlRaster.java +++ b/client/src/main/java/rt4/GlRaster.java @@ -1,11 +1,12 @@ package rt4; -import java.nio.IntBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.IntBuffer; + public final class GlRaster { @OriginalMember(owner = "client!dj", name = "b", descriptor = "I") @@ -64,7 +65,7 @@ public final class GlRaster { GlRenderer.method4162(); @Pc(2) GL2 gl = GlRenderer.gl; gl.glRasterPos2i(x, GlRenderer.canvasHeight - y); - gl.glPixelZoom((float) GameShell.canvasScale, (float) -GameShell.canvasScale); + gl.glPixelZoom((float) GameShell.canvasScale, (float) -GameShell.canvasScale); gl.glDisable(GL2.GL_BLEND); gl.glDisable(GL2.GL_ALPHA_TEST); gl.glDrawPixels(width, height, GL2.GL_BGRA, GlRenderer.bigEndian ? GL2.GL_UNSIGNED_INT_8_8_8_8_REV : GL2.GL_UNSIGNED_BYTE, IntBuffer.wrap(arg0)); @@ -191,7 +192,7 @@ public final class GlRaster { @Pc(21) GL2 gl = GlRenderer.gl; gl.glEnable(GL2.GL_SCISSOR_TEST); if (clipLeft <= clipRight && clipTop <= clipBottom) { - gl.glScissor((int)(clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int)((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int)((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY)); + gl.glScissor((int) (clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int) ((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int) ((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int) ((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY)); } else { gl.glScissor(0, 0, 0, 0); } @@ -256,7 +257,7 @@ public final class GlRaster { @Pc(27) GL2 local27 = GlRenderer.gl; local27.glEnable(GL2.GL_SCISSOR_TEST); if (clipLeft <= clipRight && clipTop <= clipBottom) { - local27.glScissor((int)(clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int)((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int)((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY)); + local27.glScissor((int) (clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int) ((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int) ((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int) ((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY)); } else { local27.glScissor(0, 0, 0, 0); } diff --git a/client/src/main/java/rt4/GlRenderer.java b/client/src/main/java/rt4/GlRenderer.java index 4c87d39..4cf273d 100644 --- a/client/src/main/java/rt4/GlRenderer.java +++ b/client/src/main/java/rt4/GlRenderer.java @@ -1,10 +1,5 @@ package rt4; -import java.awt.Canvas; -import java.nio.ByteOrder; -import java.nio.IntBuffer; -import java.nio.charset.StandardCharsets; - import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration; import com.jogamp.nativewindow.awt.JAWTWindow; import com.jogamp.opengl.*; @@ -13,6 +8,11 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.*; +import java.nio.ByteOrder; +import java.nio.IntBuffer; +import java.nio.charset.StandardCharsets; + public final class GlRenderer { @OriginalMember(owner = "client!tf", name = "a", descriptor = "Ljava/lang/String;") @@ -693,7 +693,7 @@ public final class GlRenderer { if (window.getLock().isLocked()) { window.unlockSurface(); } - gl = GLContext.getCurrentGL().getGL2(); + gl = GLContext.getCurrentGL().getGL2(); gl.glLineWidth((float) GameShell.canvasScale); enabled = true; canvasWidth = canvas.getSize().width; @@ -767,7 +767,7 @@ public final class GlRenderer { @Pc(23) float local23 = (float) arg2 / 512.0F; @Pc(30) float local30 = local23 * (256.0F / (float) arg4); @Pc(37) float local37 = local23 * (256.0F / (float) arg5); - gl.glOrtho((double) ((float) local2 * local30), (double) ((float) local6 * local30), (double) ((float) -local13 * local37), (double) ((float) -local9 * local37), (double) (50 - arg3), (double) (GlobalConfig.VIEW_DISTANCE - arg3)); + gl.glOrtho((float) local2 * local30, (float) local6 * local30, (float) -local13 * local37, (float) -local9 * local37, 50 - arg3, GlobalConfig.VIEW_DISTANCE - arg3); setViewportBounds(0, 0, canvasWidth, canvasHeight); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glLoadIdentity(); @@ -807,7 +807,7 @@ public final class GlRenderer { gl.glGenTextures(1, local2, 0); anInt5328 = local2[0]; gl.glBindTexture(GL2.GL_TEXTURE_2D, anInt5328); - gl.glTexImage2D(GL2.GL_TEXTURE_2D, 0, 4, 1, 1, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, IntBuffer.wrap(new int[] { -1 })); + gl.glTexImage2D(GL2.GL_TEXTURE_2D, 0, 4, 1, 1, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, IntBuffer.wrap(new int[]{-1})); LightingManager.method2401(); MaterialManager.init(); } diff --git a/client/src/main/java/rt4/GlSolidColorTexture.java b/client/src/main/java/rt4/GlSolidColorTexture.java index 2362332..b5a2ced 100644 --- a/client/src/main/java/rt4/GlSolidColorTexture.java +++ b/client/src/main/java/rt4/GlSolidColorTexture.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!sd") public final class GlSolidColorTexture extends SecondaryNode { @@ -28,7 +29,7 @@ public final class GlSolidColorTexture extends SecondaryNode { 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(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); diff --git a/client/src/main/java/rt4/GlSprite.java b/client/src/main/java/rt4/GlSprite.java index ff35e3f..ad8e4f6 100644 --- a/client/src/main/java/rt4/GlSprite.java +++ b/client/src/main/java/rt4/GlSprite.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!cf") public class GlSprite extends Sprite { diff --git a/client/src/main/java/rt4/GlTexture.java b/client/src/main/java/rt4/GlTexture.java index 8b56816..d8049d9 100644 --- a/client/src/main/java/rt4/GlTexture.java +++ b/client/src/main/java/rt4/GlTexture.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!uh") public final class GlTexture extends SecondaryNode { @@ -86,7 +87,7 @@ public final class GlTexture extends SecondaryNode { return null; } @Pc(36) int local36 = arg3 ? 64 : 128; - this.anIntArray481 = this.aClass88_1.method2725(local36, this.aBoolean288, local36, (double) arg1, arg2, arg0, true); + this.anIntArray481 = this.aClass88_1.method2725(local36, this.aBoolean288, local36, arg1, arg2, arg0, true); this.aFloat35 = arg1; if (this.aBoolean286) { @Pc(62) int[] local62 = new int[local36]; diff --git a/client/src/main/java/rt4/GlTile.java b/client/src/main/java/rt4/GlTile.java index b5f7ed3..df63227 100644 --- a/client/src/main/java/rt4/GlTile.java +++ b/client/src/main/java/rt4/GlTile.java @@ -1,18 +1,19 @@ package rt4; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + @OriginalClass("client!hg") 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 = "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;") diff --git a/client/src/main/java/rt4/GlVertexBufferObject.java b/client/src/main/java/rt4/GlVertexBufferObject.java index 60a7ce8..a75046d 100644 --- a/client/src/main/java/rt4/GlVertexBufferObject.java +++ b/client/src/main/java/rt4/GlVertexBufferObject.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!vi") public final class GlVertexBufferObject { diff --git a/client/src/main/java/rt4/GlobalConfig.java b/client/src/main/java/rt4/GlobalConfig.java index 165c476..5c1d13f 100644 --- a/client/src/main/java/rt4/GlobalConfig.java +++ b/client/src/main/java/rt4/GlobalConfig.java @@ -5,54 +5,54 @@ import org.openrs2.deob.annotation.OriginalMember; import java.math.BigInteger; public class GlobalConfig { - // Jagex's RSA key: - // public static final BigInteger RSA_MODULUS = new BigInteger("7162900525229798032761816791230527296329313291232324290237849263501208207972894053929065636522363163621000728841182238772712427862772219676577293600221789"); - // public static final BigInteger RSA_EXPONENT = new BigInteger("58778699976184461502525193738213253649000149147835990136706041084440742975821"); + // Jagex's RSA key: + // public static final BigInteger RSA_MODULUS = new BigInteger("7162900525229798032761816791230527296329313291232324290237849263501208207972894053929065636522363163621000728841182238772712427862772219676577293600221789"); + // public static final BigInteger RSA_EXPONENT = new BigInteger("58778699976184461502525193738213253649000149147835990136706041084440742975821"); - //region 2009scape-compatibility Configuration - @OriginalMember(owner = "client!um", name = "V", descriptor = "Ljava/math/BigInteger;") - public static final BigInteger RSA_MODULUS = new BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051"); + //region 2009scape-compatibility Configuration + @OriginalMember(owner = "client!um", name = "V", descriptor = "Ljava/math/BigInteger;") + public static final BigInteger RSA_MODULUS = new BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051"); - @OriginalMember(owner = "client!gm", name = "X", descriptor = "Ljava/math/BigInteger;") - public static final BigInteger RSA_EXPONENT = new BigInteger("65537"); + @OriginalMember(owner = "client!gm", name = "X", descriptor = "Ljava/math/BigInteger;") + public static final BigInteger RSA_EXPONENT = new BigInteger("65537"); - public static String EXTENDED_CONFIG_PATH = "config.json"; + public static String EXTENDED_CONFIG_PATH = "config.json"; - // Server IP - public static String DEFAULT_HOSTNAME = "test.2009scape.org"; + // Server IP + public static String DEFAULT_HOSTNAME = "test.2009scape.org"; - // Jagex had this at 40000+id - public static int DEFAULT_PORT = 43594; + // Jagex had this at 40000+id + public static int DEFAULT_PORT = 43594; - // Jagex had this at 50000+id/443 - public static int ALTERNATE_PORT = 43593; + // Jagex had this at 50000+id/443 + public static int ALTERNATE_PORT = 43593; - // If this isn't set, the world server will need to send a default - public static boolean SELECT_DEFAULT_WORLD = true; + // If this isn't set, the world server will need to send a default + public static boolean SELECT_DEFAULT_WORLD = true; - // Send strings instead of base37 for login/registration packets - public static boolean LOGIN_USE_STRINGS = true; + // Send strings instead of base37 for login/registration packets + public static boolean LOGIN_USE_STRINGS = true; - // Send additional information like user/serial/mac address - public static boolean LOGIN_EXTRA_INFO = true; + // Send additional information like user/serial/mac address + public static boolean LOGIN_EXTRA_INFO = true; - // Send an additional empty CRC for idx28 (not in this revision originally) - public static boolean LOGIN_FAKE_IDX28 = true; + // Send an additional empty CRC for idx28 (not in this revision originally) + public static boolean LOGIN_FAKE_IDX28 = true; - // Packet opcode encryption - public static boolean USE_ISAAC = false; - //endregion + // Packet opcode encryption + public static boolean USE_ISAAC = false; + //endregion - // default distance is 28 - public static int TILE_DISTANCE = 56; - public static int VIEW_DISTANCE = TILE_DISTANCE * 128; - public static float VIEW_FADE_DISTANCE = ((float) TILE_DISTANCE / 28.0f) * 256.0f; + // default distance is 28 + public static int TILE_DISTANCE = 56; + public static int VIEW_DISTANCE = TILE_DISTANCE * 128; + public static float VIEW_FADE_DISTANCE = ((float) TILE_DISTANCE / 28.0f) * 256.0f; - public static boolean USE_SHIFT_CLICK = true; - public static boolean USE_TWEENING = true; - public static boolean BILINEAR_MINIMAP = true; - public static boolean MOUSEWHEEL_ZOOM = true; + public static boolean USE_SHIFT_CLICK = true; + public static boolean USE_TWEENING = true; + public static boolean BILINEAR_MINIMAP = true; + public static boolean MOUSEWHEEL_ZOOM = true; - public static int JS5_RESPONSE_TIMEOUT = 5000; + public static int JS5_RESPONSE_TIMEOUT = 5000; } diff --git a/client/src/main/java/rt4/GlobalJsonConfig.java b/client/src/main/java/rt4/GlobalJsonConfig.java index 133c118..2157f76 100644 --- a/client/src/main/java/rt4/GlobalJsonConfig.java +++ b/client/src/main/java/rt4/GlobalJsonConfig.java @@ -5,26 +5,26 @@ import com.google.gson.Gson; import java.io.FileReader; public class GlobalJsonConfig { - public static GlobalJsonConfig instance = null; + public static GlobalJsonConfig instance = null; - public static void load(String path) { - Gson gson = new Gson(); + public static void load(String path) { + Gson gson = new Gson(); - try { - instance = gson.fromJson(new FileReader(path), GlobalJsonConfig.class); - } catch (Exception ex) { - System.err.println("No config.json file, using defaults"); - } - } + try { + instance = gson.fromJson(new FileReader(path), GlobalJsonConfig.class); + } catch (Exception ex) { + System.err.println("No config.json file, using defaults"); + } + } - // ---- + // ---- - String ip_management; - String ip_address; - int world; - int server_port; - int wl_port; - int js5_port; - boolean mouseWheelZoom = GlobalConfig.MOUSEWHEEL_ZOOM; + String ip_management; + String ip_address; + int world; + int server_port; + int wl_port; + int js5_port; + boolean mouseWheelZoom = GlobalConfig.MOUSEWHEEL_ZOOM; } diff --git a/client/src/main/java/rt4/GzipDecompressor.java b/client/src/main/java/rt4/GzipDecompressor.java index 0048b3c..3b477f7 100644 --- a/client/src/main/java/rt4/GzipDecompressor.java +++ b/client/src/main/java/rt4/GzipDecompressor.java @@ -1,11 +1,12 @@ package rt4; -import java.util.zip.Inflater; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.zip.Inflater; + @OriginalClass("client!ha") public final class GzipDecompressor { diff --git a/client/src/main/java/rt4/HintArrowManager.java b/client/src/main/java/rt4/HintArrowManager.java index 92c4f60..449d108 100644 --- a/client/src/main/java/rt4/HintArrowManager.java +++ b/client/src/main/java/rt4/HintArrowManager.java @@ -5,63 +5,63 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class HintArrowManager { - @OriginalMember(owner = "client!ih", name = "l", descriptor = "Lclient!n;") - public static final SoftLruHashTable models = new SoftLruHashTable(4); + @OriginalMember(owner = "client!ih", name = "l", descriptor = "Lclient!n;") + public static final SoftLruHashTable models = new SoftLruHashTable(4); - @OriginalMember(owner = "client!mh", name = "c", descriptor = "(II)V") - public static void clean() { - models.clean(5); - } + @OriginalMember(owner = "client!mh", name = "c", descriptor = "(II)V") + public static void clean() { + models.clean(5); + } - @OriginalMember(owner = "client!og", name = "a", descriptor = "(I)V") - public static void removeSoft() { - models.removeSoft(); - } + @OriginalMember(owner = "client!og", name = "a", descriptor = "(I)V") + public static void removeSoft() { + models.removeSoft(); + } - @OriginalMember(owner = "client!oi", name = "b", descriptor = "(I)V") - public static void clear() { - models.clear(); - } + @OriginalMember(owner = "client!oi", name = "b", descriptor = "(I)V") + public static void clear() { + models.clear(); + } - @OriginalMember(owner = "client!rm", name = "a", descriptor = "(ZIIIILclient!ak;I)Lclient!ak;") - public static Model getModel(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) Model arg4, @OriginalArg(6) int arg5) { - @Pc(4) long local4 = arg2; - @Pc(10) Model model = (Model) models.get(local4); - if (model == null) { - @Pc(22) RawModel local22 = RawModel.create(client.js5Archive7, arg2); - if (local22 == null) { - return null; - } - model = local22.createModel(64, 768, -50, -10, -50); - models.put(model, local4); - } - @Pc(42) int minX = arg4.getMinX(); - @Pc(45) int maxX = arg4.getMaxX(); - @Pc(48) int minZ = arg4.getMinZ(); - @Pc(51) int maxZ = arg4.getMaxZ(); - model = model.method4560(true, true, true); - if (arg0 != 0) { - model.method4554(arg0); - } - @Pc(94) int local94; - if (GlRenderer.enabled) { - @Pc(68) GlModel local68 = (GlModel) model; - if (arg5 != SceneGraph.getTileHeight(Player.level, arg3 + minX, arg1 + minZ) || arg5 != SceneGraph.getTileHeight(Player.level, arg3 + maxX, maxZ + arg1)) { - 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; - } - } else { - @Pc(142) SoftwareModel local142 = (SoftwareModel) model; - if (arg5 != SceneGraph.getTileHeight(Player.level, minX + arg3, minZ + arg1) || arg5 != SceneGraph.getTileHeight(Player.level, arg3 + maxX, maxZ + arg1)) { - for (local94 = 0; local94 < local142.vertexCount; local94++) { - local142.vertexY[local94] += SceneGraph.getTileHeight(Player.level, arg3 + local142.vertexX[local94], local142.vertexZ[local94] + arg1) - arg5; - } - local142.boundsValid = false; - } - } - return model; - } + @OriginalMember(owner = "client!rm", name = "a", descriptor = "(ZIIIILclient!ak;I)Lclient!ak;") + public static Model getModel(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) Model arg4, @OriginalArg(6) int arg5) { + @Pc(4) long local4 = arg2; + @Pc(10) Model model = (Model) models.get(local4); + if (model == null) { + @Pc(22) RawModel local22 = RawModel.create(client.js5Archive7, arg2); + if (local22 == null) { + return null; + } + model = local22.createModel(64, 768, -50, -10, -50); + models.put(model, local4); + } + @Pc(42) int minX = arg4.getMinX(); + @Pc(45) int maxX = arg4.getMaxX(); + @Pc(48) int minZ = arg4.getMinZ(); + @Pc(51) int maxZ = arg4.getMaxZ(); + model = model.method4560(true, true, true); + if (arg0 != 0) { + model.method4554(arg0); + } + @Pc(94) int local94; + if (GlRenderer.enabled) { + @Pc(68) GlModel local68 = (GlModel) model; + if (arg5 != SceneGraph.getTileHeight(Player.level, arg3 + minX, arg1 + minZ) || arg5 != SceneGraph.getTileHeight(Player.level, arg3 + maxX, maxZ + arg1)) { + 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; + } + } else { + @Pc(142) SoftwareModel local142 = (SoftwareModel) model; + if (arg5 != SceneGraph.getTileHeight(Player.level, minX + arg3, minZ + arg1) || arg5 != SceneGraph.getTileHeight(Player.level, arg3 + maxX, maxZ + arg1)) { + for (local94 = 0; local94 < local142.vertexCount; local94++) { + local142.vertexY[local94] += SceneGraph.getTileHeight(Player.level, arg3 + local142.vertexX[local94], local142.vertexZ[local94] + arg1) - arg5; + } + local142.boundsValid = false; + } + } + return model; + } } diff --git a/client/src/main/java/rt4/HitBarList.java b/client/src/main/java/rt4/HitBarList.java index f85aa37..632060d 100644 --- a/client/src/main/java/rt4/HitBarList.java +++ b/client/src/main/java/rt4/HitBarList.java @@ -3,6 +3,6 @@ package rt4; import org.openrs2.deob.annotation.OriginalMember; public class HitBarList { - @OriginalMember(owner = "client!fm", name = "S", descriptor = "Lclient!n;") - public static final SoftLruHashTable hitBars = new SoftLruHashTable(4); + @OriginalMember(owner = "client!fm", name = "S", descriptor = "Lclient!n;") + public static final SoftLruHashTable hitBars = new SoftLruHashTable(4); } diff --git a/client/src/main/java/rt4/IdkType.java b/client/src/main/java/rt4/IdkType.java index 0a25632..20e8120 100644 --- a/client/src/main/java/rt4/IdkType.java +++ b/client/src/main/java/rt4/IdkType.java @@ -24,7 +24,7 @@ public final class IdkType { private int[] bodyModels; @OriginalMember(owner = "client!dm", name = "x", descriptor = "[I") - private final int[] headModels = new int[] { -1, -1, -1, -1, -1 }; + private final int[] headModels = new int[]{-1, -1, -1, -1, -1}; @OriginalMember(owner = "client!dm", name = "k", descriptor = "I") public int feature = -1; diff --git a/client/src/main/java/rt4/IdkTypeList.java b/client/src/main/java/rt4/IdkTypeList.java index ef84354..12f2d03 100644 --- a/client/src/main/java/rt4/IdkTypeList.java +++ b/client/src/main/java/rt4/IdkTypeList.java @@ -23,7 +23,7 @@ public class IdkTypeList { @OriginalMember(owner = "client!gg", name = "d", descriptor = "(II)Lclient!dm;") public static IdkType get(@OriginalArg(0) int arg0) { - @Pc(10) IdkType local10 = (IdkType) types.get((long) arg0); + @Pc(10) IdkType local10 = (IdkType) types.get(arg0); if (local10 != null) { return local10; } @@ -32,7 +32,7 @@ public class IdkTypeList { if (local21 != null) { local10.decode(new Buffer(local21)); } - types.put(local10, (long) arg0); + types.put(local10, arg0); return local10; } diff --git a/client/src/main/java/rt4/IgnoreList.java b/client/src/main/java/rt4/IgnoreList.java index 56d6d3e..b821d25 100644 --- a/client/src/main/java/rt4/IgnoreList.java +++ b/client/src/main/java/rt4/IgnoreList.java @@ -5,77 +5,77 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; 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]; - @OriginalMember(owner = "client!cl", name = "Z", descriptor = "I") - public static int size = 0; + @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]; + @OriginalMember(owner = "client!cl", name = "Z", descriptor = "I") + public static int size = 0; - @OriginalMember(owner = "client!te", name = "b", descriptor = "(Lclient!na;I)Z") - public static boolean contains(@OriginalArg(0) JagString arg0) { - if (arg0 == null) { - return false; - } - for (@Pc(11) int local11 = 0; local11 < size; local11++) { - if (arg0.equalsIgnoreCase(aClass100Array134[local11])) { - return true; - } - } - return false; - } + @OriginalMember(owner = "client!te", name = "b", descriptor = "(Lclient!na;I)Z") + public static boolean contains(@OriginalArg(0) JagString arg0) { + if (arg0 == null) { + return false; + } + for (@Pc(11) int local11 = 0; local11 < size; local11++) { + if (arg0.equalsIgnoreCase(aClass100Array134[local11])) { + return true; + } + } + return false; + } - @OriginalMember(owner = "client!la", name = "a", descriptor = "(IJ)V") - public static void add(@OriginalArg(1) long arg0) { - if (arg0 == 0L) { - return; - } - if (size >= 100) { - Chat.add(JagString.EMPTY, 0, LocalizedText.IGNORELISTFULL); - return; - } - @Pc(34) JagString local34 = Base37.decode37(arg0).toTitleCase(); - @Pc(36) int local36; - for (local36 = 0; local36 < size; local36++) { - if (encodedUsernames[local36] == arg0) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { local34, LocalizedText.IGNORELISTDUPE})); - return; - } - } - for (local36 = 0; local36 < FriendsList.size; local36++) { - if (FriendsList.encodedUsernames[local36] == arg0) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { LocalizedText.REMOVESOCIAL2, local34, LocalizedText.REMOVEFRIEND})); - return; - } - } - if (local34.strEquals(PlayerList.self.username)) { - Chat.add(JagString.EMPTY, 0, LocalizedText.IGNORECANTADDSELF); - return; - } - encodedUsernames[size] = arg0; - aClass100Array134[size++] = Base37.decode37(arg0); - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(34); - Protocol.outboundBuffer.p8(arg0); - } + @OriginalMember(owner = "client!la", name = "a", descriptor = "(IJ)V") + public static void add(@OriginalArg(1) long arg0) { + if (arg0 == 0L) { + return; + } + if (size >= 100) { + Chat.add(JagString.EMPTY, 0, LocalizedText.IGNORELISTFULL); + return; + } + @Pc(34) JagString local34 = Base37.decode37(arg0).toTitleCase(); + @Pc(36) int local36; + for (local36 = 0; local36 < size; local36++) { + if (encodedUsernames[local36] == arg0) { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{local34, LocalizedText.IGNORELISTDUPE})); + return; + } + } + for (local36 = 0; local36 < FriendsList.size; local36++) { + if (FriendsList.encodedUsernames[local36] == arg0) { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{LocalizedText.REMOVESOCIAL2, local34, LocalizedText.REMOVEFRIEND})); + return; + } + } + if (local34.strEquals(PlayerList.self.username)) { + Chat.add(JagString.EMPTY, 0, LocalizedText.IGNORECANTADDSELF); + return; + } + encodedUsernames[size] = arg0; + aClass100Array134[size++] = Base37.decode37(arg0); + FriendsList.transmitAt = InterfaceList.transmitTimer; + Protocol.outboundBuffer.p1isaac(34); + Protocol.outboundBuffer.p8(arg0); + } - @OriginalMember(owner = "client!fh", name = "a", descriptor = "(JI)V") - public static void remove(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - for (@Pc(12) int local12 = 0; local12 < size; local12++) { - if (encodedUsernames[local12] == arg0) { - size--; - for (@Pc(36) int local36 = local12; local36 < size; local36++) { - encodedUsernames[local36] = encodedUsernames[local36 + 1]; - aClass100Array134[local36] = aClass100Array134[local36 + 1]; - } - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(213); - Protocol.outboundBuffer.p8(arg0); - break; - } - } - } + @OriginalMember(owner = "client!fh", name = "a", descriptor = "(JI)V") + public static void remove(@OriginalArg(0) long arg0) { + if (arg0 == 0L) { + return; + } + for (@Pc(12) int local12 = 0; local12 < size; local12++) { + if (encodedUsernames[local12] == arg0) { + size--; + for (@Pc(36) int local36 = local12; local36 < size; local36++) { + encodedUsernames[local36] = encodedUsernames[local36 + 1]; + aClass100Array134[local36] = aClass100Array134[local36 + 1]; + } + FriendsList.transmitAt = InterfaceList.transmitTimer; + Protocol.outboundBuffer.p1isaac(213); + Protocol.outboundBuffer.p8(arg0); + break; + } + } + } } diff --git a/client/src/main/java/rt4/ImageProducerFrameBuffer.java b/client/src/main/java/rt4/ImageProducerFrameBuffer.java index ed5d4cb..05c3796 100644 --- a/client/src/main/java/rt4/ImageProducerFrameBuffer.java +++ b/client/src/main/java/rt4/ImageProducerFrameBuffer.java @@ -1,20 +1,14 @@ package rt4; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.Shape; -import java.awt.image.ColorModel; -import java.awt.image.DirectColorModel; -import java.awt.image.ImageConsumer; -import java.awt.image.ImageObserver; -import java.awt.image.ImageProducer; - import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; +import java.awt.*; +import java.awt.image.*; + @OriginalClass("client!di") public final class ImageProducerFrameBuffer extends FrameBuffer implements ImageProducer, ImageObserver { diff --git a/client/src/main/java/rt4/IntUtils.java b/client/src/main/java/rt4/IntUtils.java index db68ab2..b3e33a8 100644 --- a/client/src/main/java/rt4/IntUtils.java +++ b/client/src/main/java/rt4/IntUtils.java @@ -5,57 +5,57 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class IntUtils { - @OriginalMember(owner = "client!ra", name = "b", descriptor = "(III)I") - public static int pow(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(15) int local15 = 1; - while (arg0 > 1) { - if ((arg0 & 0x1) != 0) { - local15 *= arg1; - } - arg1 *= arg1; - arg0 >>= 0x1; - } - if (arg0 == 1) { - return local15 * arg1; - } else { - return local15; - } - } + @OriginalMember(owner = "client!ra", name = "b", descriptor = "(III)I") + public static int pow(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(15) int local15 = 1; + while (arg0 > 1) { + if ((arg0 & 0x1) != 0) { + local15 *= arg1; + } + arg1 *= arg1; + arg0 >>= 0x1; + } + if (arg0 == 1) { + return local15 * arg1; + } else { + return local15; + } + } - @OriginalMember(owner = "client!nb", name = "a", descriptor = "(BI)I") - public static int clp2(@OriginalArg(1) int arg0) { - @Pc(0) int local0 = arg0 - 1; - @Pc(6) int local6 = local0 | local0 >>> 1; - @Pc(22) int local22 = local6 | local6 >>> 2; - @Pc(28) int local28 = local22 | local22 >>> 4; - @Pc(34) int local34 = local28 | local28 >>> 8; - @Pc(40) int local40 = local34 | local34 >>> 16; - return local40 + 1; - } + @OriginalMember(owner = "client!nb", name = "a", descriptor = "(BI)I") + public static int clp2(@OriginalArg(1) int arg0) { + @Pc(0) int local0 = arg0 - 1; + @Pc(6) int local6 = local0 | local0 >>> 1; + @Pc(22) int local22 = local6 | local6 >>> 2; + @Pc(28) int local28 = local22 | local22 >>> 4; + @Pc(34) int local34 = local28 | local28 >>> 8; + @Pc(40) int local40 = local34 | local34 >>> 16; + return local40 + 1; + } - @OriginalMember(owner = "client!qi", name = "b", descriptor = "(II)I") - public static int bitCount(@OriginalArg(0) int arg0) { - @Pc(5) int local5 = 0; - if (arg0 < 0 || arg0 >= 65536) { - local5 += 16; - arg0 >>>= 0x10; - } - if (arg0 >= 256) { - local5 += 8; - arg0 >>>= 0x8; - } - if (arg0 >= 16) { - local5 += 4; - arg0 >>>= 0x4; - } - if (arg0 >= 4) { - arg0 >>>= 0x2; - local5 += 2; - } - if (arg0 >= 1) { - arg0 >>>= 0x1; - local5++; - } - return arg0 + local5; - } + @OriginalMember(owner = "client!qi", name = "b", descriptor = "(II)I") + public static int bitCount(@OriginalArg(0) int arg0) { + @Pc(5) int local5 = 0; + if (arg0 < 0 || arg0 >= 65536) { + local5 += 16; + arg0 >>>= 0x10; + } + if (arg0 >= 256) { + local5 += 8; + arg0 >>>= 0x8; + } + if (arg0 >= 16) { + local5 += 4; + arg0 >>>= 0x4; + } + if (arg0 >= 4) { + arg0 >>>= 0x2; + local5 += 2; + } + if (arg0 >= 1) { + arg0 >>>= 0x1; + local5++; + } + return arg0 + local5; + } } diff --git a/client/src/main/java/rt4/InterfaceList.java b/client/src/main/java/rt4/InterfaceList.java index 2a30576..1527cc4 100644 --- a/client/src/main/java/rt4/InterfaceList.java +++ b/client/src/main/java/rt4/InterfaceList.java @@ -5,286 +5,286 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class InterfaceList { - @OriginalMember(owner = "client!p", name = "c", descriptor = "Lclient!ih;") - public static final LinkedList lowPriorityRequests = new LinkedList(); - @OriginalMember(owner = "client!ch", name = "y", descriptor = "[Z") - public static final boolean[] rectangleRedraw = new boolean[100]; - @OriginalMember(owner = "client!qj", name = "i", descriptor = "[I") - public static final int[] keyChars = new int[128]; - @OriginalMember(owner = "client!sg", name = "q", descriptor = "[I") - public static final int[] keyCodes = new int[128]; - @OriginalMember(owner = "client!rb", name = "b", descriptor = "Lclient!sc;") - public static final HashTable properties = new HashTable(512); - @OriginalMember(owner = "client!vh", name = "b", descriptor = "[I") + @OriginalMember(owner = "client!p", name = "c", descriptor = "Lclient!ih;") + public static final LinkedList lowPriorityRequests = new LinkedList(); + @OriginalMember(owner = "client!ch", name = "y", descriptor = "[Z") + public static final boolean[] rectangleRedraw = new boolean[100]; + @OriginalMember(owner = "client!qj", name = "i", descriptor = "[I") + public static final int[] keyChars = new int[128]; + @OriginalMember(owner = "client!sg", name = "q", descriptor = "[I") + public static final int[] keyCodes = new int[128]; + @OriginalMember(owner = "client!rb", name = "b", descriptor = "Lclient!sc;") + public static final HashTable properties = new HashTable(512); + @OriginalMember(owner = "client!vh", name = "b", descriptor = "[I") public static final int[] rectangleX = new int[100]; - @OriginalMember(owner = "client!e", name = "sc", descriptor = "[I") - public static final int[] rectangleY = new int[100]; - @OriginalMember(owner = "client!sd", name = "V", descriptor = "[I") - public static final int[] rectangleWidth = new int[100]; - @OriginalMember(owner = "client!fe", name = "lb", descriptor = "[I") + @OriginalMember(owner = "client!e", name = "sc", descriptor = "[I") + public static final int[] rectangleY = new int[100]; + @OriginalMember(owner = "client!sd", name = "V", descriptor = "[I") + public static final int[] rectangleWidth = new int[100]; + @OriginalMember(owner = "client!fe", name = "lb", descriptor = "[I") public static final int[] rectangleHeight = new int[100]; - @OriginalMember(owner = "client!pa", name = "R", descriptor = "[Z") - public static final boolean[] aBooleanArray100 = new boolean[100]; - @OriginalMember(owner = "client!ql", name = "h", descriptor = "Lclient!na;") - public static final JagString aClass100_903 = JagString.parse("Hidden)2"); - @OriginalMember(owner = "client!ja", name = "f", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!pa", name = "R", descriptor = "[Z") + public static final boolean[] aBooleanArray100 = new boolean[100]; + @OriginalMember(owner = "client!ql", name = "h", descriptor = "Lclient!na;") + 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!bn", name = "V", descriptor = "I") - public static int rectangles = 0; - @OriginalMember(owner = "client!md", name = "W", descriptor = "I") - public static int topLevelInterface = -1; - @OriginalMember(owner = "client!bm", name = "f", descriptor = "Lclient!ve;") - public static Js5 aClass153_12; - @OriginalMember(owner = "client!nd", name = "v", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!bn", name = "V", descriptor = "I") + public static int rectangles = 0; + @OriginalMember(owner = "client!md", name = "W", descriptor = "I") + public static int topLevelInterface = -1; + @OriginalMember(owner = "client!bm", name = "f", descriptor = "Lclient!ve;") + public static Js5 aClass153_12; + @OriginalMember(owner = "client!nd", name = "v", descriptor = "Lclient!ve;") public static Js5 aClass153_64; - @OriginalMember(owner = "client!qg", name = "ab", descriptor = "Lclient!ve;") - public static Js5 aClass153_84; - @OriginalMember(owner = "client!qh", name = "g", descriptor = "Lclient!ve;") - public static Js5 aClass153_85; - @OriginalMember(owner = "client!th", name = "j", descriptor = "[[Lclient!be;") - public static Component[][] components; - @OriginalMember(owner = "client!sc", name = "m", descriptor = "[Z") - public static boolean[] aBooleanArray115; - @OriginalMember(owner = "client!oj", name = "y", descriptor = "I") - public static int keyQueueSize = 0; - @OriginalMember(owner = "client!je", name = "fb", descriptor = "I") - public static int transmitTimer = 1; - @OriginalMember(owner = "client!ra", name = "J", descriptor = "I") - public static int miscTransmitAt = 0; - @OriginalMember(owner = "client!je", name = "T", descriptor = "Lclient!sc;") - public static HashTable openInterfaces = new HashTable(8); - @OriginalMember(owner = "client!wl", name = "h", descriptor = "Lclient!be;") - public static Component aClass13_26 = null; - @OriginalMember(owner = "client!jd", name = "i", descriptor = "Lclient!be;") + @OriginalMember(owner = "client!qg", name = "ab", descriptor = "Lclient!ve;") + public static Js5 aClass153_84; + @OriginalMember(owner = "client!qh", name = "g", descriptor = "Lclient!ve;") + public static Js5 aClass153_85; + @OriginalMember(owner = "client!th", name = "j", descriptor = "[[Lclient!be;") + public static Component[][] components; + @OriginalMember(owner = "client!sc", name = "m", descriptor = "[Z") + public static boolean[] aBooleanArray115; + @OriginalMember(owner = "client!oj", name = "y", descriptor = "I") + public static int keyQueueSize = 0; + @OriginalMember(owner = "client!je", name = "fb", descriptor = "I") + public static int transmitTimer = 1; + @OriginalMember(owner = "client!ra", name = "J", descriptor = "I") + public static int miscTransmitAt = 0; + @OriginalMember(owner = "client!je", name = "T", descriptor = "Lclient!sc;") + public static HashTable openInterfaces = new HashTable(8); + @OriginalMember(owner = "client!wl", name = "h", descriptor = "Lclient!be;") + public static Component aClass13_26 = null; + @OriginalMember(owner = "client!jd", name = "i", descriptor = "Lclient!be;") public static Component clickedInventoryComponent; - @OriginalMember(owner = "client!nf", name = "h", descriptor = "Lclient!be;") + @OriginalMember(owner = "client!nf", name = "h", descriptor = "Lclient!be;") public static Component mouseOverInventoryInterface; - @OriginalMember(owner = "client!qk", name = "f", descriptor = "I") - public static int clickedInventoryComponentY = 0; - @OriginalMember(owner = "client!ef", name = "r", descriptor = "Lclient!be;") - public static Component aClass13_12 = null; - @OriginalMember(owner = "client!bn", name = "O", descriptor = "I") - public static int anInt761; - @OriginalMember(owner = "client!bc", name = "X", descriptor = "I") + @OriginalMember(owner = "client!qk", name = "f", descriptor = "I") + public static int clickedInventoryComponentY = 0; + @OriginalMember(owner = "client!ef", name = "r", descriptor = "Lclient!be;") + public static Component aClass13_12 = null; + @OriginalMember(owner = "client!bn", name = "O", descriptor = "I") + public static int anInt761; + @OriginalMember(owner = "client!bc", name = "X", descriptor = "I") public static int anInt436; - @OriginalMember(owner = "client!si", name = "ab", descriptor = "I") - public static int anInt5138; - @OriginalMember(owner = "client!sh", name = "f", descriptor = "I") - public static int anInt5103 = -1; - @OriginalMember(owner = "client!gd", name = "j", descriptor = "I") - public static int clickedInventoryComponentCycle = 0; - @OriginalMember(owner = "client!lj", name = "w", descriptor = "I") - public static int clickedInventoryComponentX = 0; - @OriginalMember(owner = "client!og", name = "e", descriptor = "Lclient!be;") - public static Component aClass13_22; - @OriginalMember(owner = "client!ok", name = "b", descriptor = "I") - public static int anInt4271; + @OriginalMember(owner = "client!si", name = "ab", descriptor = "I") + public static int anInt5138; + @OriginalMember(owner = "client!sh", name = "f", descriptor = "I") + public static int anInt5103 = -1; + @OriginalMember(owner = "client!gd", name = "j", descriptor = "I") + public static int clickedInventoryComponentCycle = 0; + @OriginalMember(owner = "client!lj", name = "w", descriptor = "I") + public static int clickedInventoryComponentX = 0; + @OriginalMember(owner = "client!og", name = "e", descriptor = "Lclient!be;") + public static Component aClass13_22; + @OriginalMember(owner = "client!ok", name = "b", descriptor = "I") + public static int anInt4271; - @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) { - aClass153_12 = arg1; - aClass153_64 = arg0; - aClass153_84 = arg2; - aClass153_85 = arg3; - components = new Component[aClass153_84.capacity()][]; - aBooleanArray115 = new boolean[aClass153_84.capacity()]; - } + @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) { + aClass153_12 = arg1; + aClass153_64 = arg0; + aClass153_84 = arg2; + aClass153_85 = arg3; + components = new Component[aClass153_84.capacity()][]; + aBooleanArray115 = new boolean[aClass153_84.capacity()]; + } - @OriginalMember(owner = "client!ig", name = "a", descriptor = "(BI)V") - public static void method2275(@OriginalArg(1) int arg0) { - if (arg0 == -1 || !aBooleanArray115[arg0]) { - return; - } - aClass153_84.discardUnpacked(arg0); - if (components[arg0] == null) { - return; - } - @Pc(27) boolean local27 = true; - for (@Pc(29) int local29 = 0; local29 < components[arg0].length; local29++) { - if (components[arg0][local29] != null) { - if (components[arg0][local29].type == 2) { - local27 = false; - } else { - components[arg0][local29] = null; - } - } - } - if (local27) { - components[arg0] = null; - } - aBooleanArray115[arg0] = false; - } + @OriginalMember(owner = "client!ig", name = "a", descriptor = "(BI)V") + public static void method2275(@OriginalArg(1) int arg0) { + if (arg0 == -1 || !aBooleanArray115[arg0]) { + return; + } + aClass153_84.discardUnpacked(arg0); + if (components[arg0] == null) { + return; + } + @Pc(27) boolean local27 = true; + for (@Pc(29) int local29 = 0; local29 < components[arg0].length; local29++) { + if (components[arg0][local29] != null) { + if (components[arg0][local29].type == 2) { + local27 = false; + } else { + components[arg0][local29] = null; + } + } + } + if (local27) { + components[arg0] = null; + } + aBooleanArray115[arg0] = false; + } - @OriginalMember(owner = "client!tm", name = "b", descriptor = "(II)Z") - public static boolean load(@OriginalArg(0) int arg0) { - if (aBooleanArray115[arg0]) { - return true; - } + @OriginalMember(owner = "client!tm", name = "b", descriptor = "(II)Z") + public static boolean load(@OriginalArg(0) int arg0) { + if (aBooleanArray115[arg0]) { + return true; + } - if (aClass153_84.isGroupReady(arg0)) { - @Pc(25) int local25 = aClass153_84.getGroupCapacity(arg0); - if (local25 == 0) { - aBooleanArray115[arg0] = true; - return true; - } - if (components[arg0] == null) { - components[arg0] = new Component[local25]; - } - for (@Pc(46) int local46 = 0; local46 < local25; local46++) { - if (components[arg0][local46] == null) { - @Pc(62) byte[] local62 = aClass153_84.fetchFile(arg0, local46); - if (local62 != null) { - @Pc(74) Component local74 = components[arg0][local46] = new Component(); - local74.id = local46 + (arg0 << 16); - if (local62[0] == -1) { - local74.decodeScriptFormat(new Buffer(local62)); - } else { - local74.decodeNoScripts(new Buffer(local62)); - } - } - } - } - aBooleanArray115[arg0] = true; - return true; - } else { - return false; - } - } + if (aClass153_84.isGroupReady(arg0)) { + @Pc(25) int local25 = aClass153_84.getGroupCapacity(arg0); + if (local25 == 0) { + aBooleanArray115[arg0] = true; + return true; + } + if (components[arg0] == null) { + components[arg0] = new Component[local25]; + } + for (@Pc(46) int local46 = 0; local46 < local25; local46++) { + if (components[arg0][local46] == null) { + @Pc(62) byte[] local62 = aClass153_84.fetchFile(arg0, local46); + if (local62 != null) { + @Pc(74) Component local74 = components[arg0][local46] = new Component(); + local74.id = local46 + (arg0 << 16); + if (local62[0] == -1) { + local74.decodeScriptFormat(new Buffer(local62)); + } else { + local74.decodeNoScripts(new Buffer(local62)); + } + } + } + } + aBooleanArray115[arg0] = true; + return true; + } else { + return false; + } + } - @OriginalMember(owner = "client!eb", name = "d", descriptor = "(I)V") - public static void method1287() { - components = new Component[aClass153_84.capacity()][]; - aBooleanArray115 = new boolean[aClass153_84.capacity()]; - } + @OriginalMember(owner = "client!eb", name = "d", descriptor = "(I)V") + public static void method1287() { + components = new Component[aClass153_84.capacity()][]; + aBooleanArray115 = new boolean[aClass153_84.capacity()]; + } - @OriginalMember(owner = "client!i", name = "i", descriptor = "(Z)V") - public static void redrawActiveInterfaces() { - for (@Pc(6) ComponentPointer local6 = (ComponentPointer) openInterfaces.head(); local6 != null; local6 = (ComponentPointer) openInterfaces.next()) { - @Pc(14) int local14 = local6.anInt5878; - if (load(local14)) { - @Pc(21) boolean local21 = true; - @Pc(25) Component[] local25 = components[local14]; - @Pc(27) int local27; - for (local27 = 0; local27 < local25.length; local27++) { - if (local25[local27] != null) { - local21 = local25[local27].if3; - break; - } - } - if (!local21) { - local27 = (int) local6.key; - @Pc(60) Component local60 = getComponent(local27); - if (local60 != null) { - redraw(local60); - } - } - } - } - } + @OriginalMember(owner = "client!i", name = "i", descriptor = "(Z)V") + public static void redrawActiveInterfaces() { + for (@Pc(6) ComponentPointer local6 = (ComponentPointer) openInterfaces.head(); local6 != null; local6 = (ComponentPointer) openInterfaces.next()) { + @Pc(14) int local14 = local6.anInt5878; + if (load(local14)) { + @Pc(21) boolean local21 = true; + @Pc(25) Component[] local25 = components[local14]; + @Pc(27) int local27; + for (local27 = 0; local27 < local25.length; local27++) { + if (local25[local27] != null) { + local21 = local25[local27].if3; + break; + } + } + if (!local21) { + local27 = (int) local6.key; + @Pc(60) Component local60 = getComponent(local27); + if (local60 != null) { + redraw(local60); + } + } + } + } + } - @OriginalMember(owner = "client!af", name = "a", descriptor = "(BI)Lclient!be;") - public static Component getComponent(@OriginalArg(1) int id) { - try { - @Pc(7) int parent = id >> 16; - @Pc(18) int child = id & 0xFFFF; - if (components.length <= parent || parent < 0) { - return null; - } - if (components[parent] == null || components[parent].length <= child || components[parent][child] == null) { - @Pc(33) boolean success = load(parent); - if (!success) { - return null; - } - } - if (components[parent].length <= child) { - return null; - } - return components[parent][child]; - } catch (Exception ex) { - ex.printStackTrace(); - return null; - } - } + @OriginalMember(owner = "client!af", name = "a", descriptor = "(BI)Lclient!be;") + public static Component getComponent(@OriginalArg(1) int id) { + try { + @Pc(7) int parent = id >> 16; + @Pc(18) int child = id & 0xFFFF; + if (components.length <= parent || parent < 0) { + return null; + } + if (components[parent] == null || components[parent].length <= child || components[parent][child] == null) { + @Pc(33) boolean success = load(parent); + if (!success) { + return null; + } + } + if (components[parent].length <= child) { + return null; + } + return components[parent][child]; + } catch (Exception ex) { + ex.printStackTrace(); + return null; + } + } - @OriginalMember(owner = "client!client", name = "b", descriptor = "(Lclient!be;)Lclient!bf;") - public static ServerActiveProperties getServerActiveProperties(@OriginalArg(0) Component arg0) { - @Pc(13) ServerActiveProperties local13 = (ServerActiveProperties) properties.get(((long) arg0.id << 32) + (long) arg0.createdComponentId); - return local13 == null ? arg0.properties : local13; - } + @OriginalMember(owner = "client!client", name = "b", descriptor = "(Lclient!be;)Lclient!bf;") + public static ServerActiveProperties getServerActiveProperties(@OriginalArg(0) Component arg0) { + @Pc(13) ServerActiveProperties local13 = (ServerActiveProperties) properties.get(((long) arg0.id << 32) + (long) arg0.createdComponentId); + return local13 == null ? arg0.properties : local13; + } - @OriginalMember(owner = "client!dg", name = "a", descriptor = "(ILclient!be;)V") - public static void redraw(@OriginalArg(1) Component arg0) { - if (Static182.anInt4311 == arg0.rectangleLoop) { - aBooleanArray100[arg0.rectangle] = true; - } - } + @OriginalMember(owner = "client!dg", name = "a", descriptor = "(ILclient!be;)V") + public static void redraw(@OriginalArg(1) Component arg0) { + if (Static182.anInt4311 == arg0.rectangleLoop) { + aBooleanArray100[arg0.rectangle] = true; + } + } - @OriginalMember(owner = "client!qj", name = "a", descriptor = "(Lclient!be;BI)Lclient!na;") - public static JagString getOp(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1) { - if (!getServerActiveProperties(arg0).method503(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; - } else { - return arg0.ops[arg1]; - } - } + @OriginalMember(owner = "client!qj", name = "a", descriptor = "(Lclient!be;BI)Lclient!na;") + public static JagString getOp(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1) { + if (!getServerActiveProperties(arg0).method503(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; + } else { + return arg0.ops[arg1]; + } + } - @OriginalMember(owner = "client!qf", name = "a", descriptor = "(BII)Lclient!be;") - public static Component method1418(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(7) Component local7 = getComponent(arg0); - if (arg1 == -1) { - return local7; - } else if (local7 == null || local7.createdComponents == null || local7.createdComponents.length <= arg1) { - return null; - } else { - return local7.createdComponents[arg1]; - } - } + @OriginalMember(owner = "client!qf", name = "a", descriptor = "(BII)Lclient!be;") + public static Component method1418(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(7) Component local7 = getComponent(arg0); + if (arg1 == -1) { + return local7; + } else if (local7 == null || local7.createdComponents == null || local7.createdComponents.length <= arg1) { + return null; + } else { + return local7.createdComponents[arg1]; + } + } - @OriginalMember(owner = "client!gg", name = "e", descriptor = "(II)V") - public static void method1753(@OriginalArg(0) int arg0) { - if (!load(arg0)) { - return; - } - @Pc(15) Component[] local15 = components[arg0]; - for (@Pc(17) int local17 = 0; local17 < local15.length; local17++) { - @Pc(29) Component local29 = local15[local17]; - if (local29 != null) { - local29.anInt496 = 1; - local29.anInt510 = 0; - local29.anInt500 = 0; - } - } - } + @OriginalMember(owner = "client!gg", name = "e", descriptor = "(II)V") + public static void method1753(@OriginalArg(0) int arg0) { + if (!load(arg0)) { + return; + } + @Pc(15) Component[] local15 = components[arg0]; + for (@Pc(17) int local17 = 0; local17 < local15.length; local17++) { + @Pc(29) Component local29 = local15[local17]; + if (local29 != null) { + local29.anInt496 = 1; + local29.anInt510 = 0; + local29.anInt500 = 0; + } + } + } - @OriginalMember(owner = "client!rb", name = "a", descriptor = "(ZB)V") - public static void method3712(@OriginalArg(0) boolean arg0) { - method4017(GameShell.canvasHeight, arg0, topLevelInterface, GameShell.canvasWidth); - } + @OriginalMember(owner = "client!rb", name = "a", descriptor = "(ZB)V") + public static void method3712(@OriginalArg(0) boolean arg0) { + method4017(GameShell.canvasHeight, arg0, topLevelInterface, GameShell.canvasWidth); + } - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZIII)V") - public static void method4017(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (load(arg2)) { - method4190(-1, arg1, arg3, arg0, components[arg2]); - } - } + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZIII)V") + public static void method4017(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + if (load(arg2)) { + method4190(-1, arg1, arg3, arg0, components[arg2]); + } + } - @OriginalMember(owner = "client!bg", name = "a", descriptor = "(Lclient!be;ZI)V") - public static void method531(@OriginalArg(0) Component arg0, @OriginalArg(1) boolean arg1) { - @Pc(20) int local20 = arg0.scrollMaxH == 0 ? arg0.width : arg0.scrollMaxH; - @Pc(32) int local32 = arg0.scrollMaxV == 0 ? arg0.height : arg0.scrollMaxV; - method4190(arg0.id, arg1, local20, local32, components[arg0.id >> 16]); - if (arg0.createdComponents != null) { - method4190(arg0.id, arg1, local20, local32, arg0.createdComponents); - } - @Pc(66) ComponentPointer local66 = (ComponentPointer) openInterfaces.get((long) arg0.id); - if (local66 != null) { - method4017(local32, arg1, local66.anInt5878, local20); - } - } + @OriginalMember(owner = "client!bg", name = "a", descriptor = "(Lclient!be;ZI)V") + public static void method531(@OriginalArg(0) Component arg0, @OriginalArg(1) boolean arg1) { + @Pc(20) int local20 = arg0.scrollMaxH == 0 ? arg0.width : arg0.scrollMaxH; + @Pc(32) int local32 = arg0.scrollMaxV == 0 ? arg0.height : arg0.scrollMaxV; + method4190(arg0.id, arg1, local20, local32, components[arg0.id >> 16]); + if (arg0.createdComponents != null) { + method4190(arg0.id, arg1, local20, local32, arg0.createdComponents); + } + @Pc(66) ComponentPointer local66 = (ComponentPointer) openInterfaces.get(arg0.id); + if (local66 != null) { + method4017(local32, arg1, local66.anInt5878, local20); + } + } - @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IZIII[Lclient!be;)V") + @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IZIII[Lclient!be;)V") public static void method4190(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) Component[] arg4) { for (@Pc(3) int local3 = 0; local3 < arg4.length; local3++) { @Pc(19) Component local19 = arg4[local3]; @@ -310,64 +310,64 @@ public class InterfaceList { } } - @OriginalMember(owner = "client!fn", name = "c", descriptor = "(II)V") - public static void method1626(@OriginalArg(0) int arg0) { - if (arg0 == -1 || !load(arg0)) { - return; - } - @Pc(31) Component[] local31 = components[arg0]; - for (@Pc(33) int local33 = 0; local33 < local31.length; local33++) { - @Pc(41) Component local41 = local31[local33]; - if (local41.anObjectArray3 != null) { - @Pc(50) HookRequest local50 = new HookRequest(); - local50.arguments = local41.anObjectArray3; - local50.source = local41; - ScriptRunner.run(2000000, local50); - } - } - } + @OriginalMember(owner = "client!fn", name = "c", descriptor = "(II)V") + public static void method1626(@OriginalArg(0) int arg0) { + if (arg0 == -1 || !load(arg0)) { + return; + } + @Pc(31) Component[] local31 = components[arg0]; + for (@Pc(33) int local33 = 0; local33 < local31.length; local33++) { + @Pc(41) Component local41 = local31[local33]; + if (local41.anObjectArray3 != null) { + @Pc(50) HookRequest local50 = new HookRequest(); + local50.arguments = local41.anObjectArray3; + local50.source = local41; + ScriptRunner.run(2000000, local50); + } + } + } - @OriginalMember(owner = "client!ke", name = "a", descriptor = "(ZLclient!wk;Z)V") - public static void closeInterface(@OriginalArg(0) boolean arg0, @OriginalArg(1) ComponentPointer arg1) { - @Pc(9) int local9 = (int) arg1.key; - @Pc(16) int local16 = arg1.anInt5878; - arg1.unlink(); - if (arg0) { - method2275(local16); - } - method3214(local16); - @Pc(32) Component local32 = getComponent(local9); - if (local32 != null) { - redraw(local32); - } - @Pc(41) int local41 = MiniMenu.size; - @Pc(43) int local43; - for (local43 = 0; local43 < local41; local43++) { - if (method5(MiniMenu.actions[local43])) { - MiniMenu.remove(local43); - } - } - if (MiniMenu.size == 1) { - Static40.aBoolean108 = false; - method4012(anInt4271, anInt761, anInt5138, anInt436); - } else { - method4012(anInt4271, anInt761, anInt5138, anInt436); - local43 = Fonts.b12Full.getStringWidth(LocalizedText.CHOOSE_OPTION); - for (@Pc(75) int local75 = 0; local75 < MiniMenu.size; local75++) { - @Pc(88) int local88 = Fonts.b12Full.getStringWidth(MiniMenu.getOp(local75)); - if (local43 < local88) { - local43 = local88; - } - } - anInt436 = MiniMenu.size * 15 + (Static40.aBoolean298 ? 26 : 22); - anInt761 = local43 + 8; - } - if (topLevelInterface != -1) { - runScripts(1, topLevelInterface); - } - } + @OriginalMember(owner = "client!ke", name = "a", descriptor = "(ZLclient!wk;Z)V") + public static void closeInterface(@OriginalArg(0) boolean arg0, @OriginalArg(1) ComponentPointer arg1) { + @Pc(9) int local9 = (int) arg1.key; + @Pc(16) int local16 = arg1.anInt5878; + arg1.unlink(); + if (arg0) { + method2275(local16); + } + method3214(local16); + @Pc(32) Component local32 = getComponent(local9); + if (local32 != null) { + redraw(local32); + } + @Pc(41) int local41 = MiniMenu.size; + @Pc(43) int local43; + for (local43 = 0; local43 < local41; local43++) { + if (method5(MiniMenu.actions[local43])) { + MiniMenu.remove(local43); + } + } + if (MiniMenu.size == 1) { + Static40.aBoolean108 = false; + method4012(anInt4271, anInt761, anInt5138, anInt436); + } else { + method4012(anInt4271, anInt761, anInt5138, anInt436); + local43 = Fonts.b12Full.getStringWidth(LocalizedText.CHOOSE_OPTION); + for (@Pc(75) int local75 = 0; local75 < MiniMenu.size; local75++) { + @Pc(88) int local88 = Fonts.b12Full.getStringWidth(MiniMenu.getOp(local75)); + if (local43 < local88) { + local43 = local88; + } + } + anInt436 = MiniMenu.size * 15 + (Static40.aBoolean298 ? 26 : 22); + anInt761 = local43 + 8; + } + if (topLevelInterface != -1) { + runScripts(1, topLevelInterface); + } + } - @OriginalMember(owner = "client!ii", name = "a", descriptor = "(Lclient!be;III)V") + @OriginalMember(owner = "client!ii", name = "a", descriptor = "(Lclient!be;III)V") public static void method2291(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { if (arg0.xMode == 0) { arg0.y = arg0.baseY; @@ -410,23 +410,23 @@ public class InterfaceList { } } - @OriginalMember(owner = "client!fn", name = "a", descriptor = "(ILclient!be;)V") - public static void update(@OriginalArg(1) Component arg0) { - @Pc(7) Component local7 = method4668(arg0); - @Pc(19) int local19; - @Pc(17) int local17; - if (local7 == null) { - local17 = GameShell.canvasHeight; - local19 = GameShell.canvasWidth; - } else { - local17 = local7.height; - local19 = local7.width; - } - method2801(local17, local19, arg0, false); - method2291(arg0, local17, local19); - } + @OriginalMember(owner = "client!fn", name = "a", descriptor = "(ILclient!be;)V") + public static void update(@OriginalArg(1) Component arg0) { + @Pc(7) Component local7 = method4668(arg0); + @Pc(19) int local19; + @Pc(17) int local17; + if (local7 == null) { + local17 = GameShell.canvasHeight; + local19 = GameShell.canvasWidth; + } else { + local17 = local7.height; + local19 = local7.width; + } + method2801(local17, local19, arg0, false); + method2291(arg0, local17, local19); + } - @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIILclient!be;Z)V") + @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIILclient!be;Z)V") public static void method2801(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component arg2, @OriginalArg(4) boolean arg3) { @Pc(4) int local4 = arg2.width; @Pc(7) int local7 = arg2.height; @@ -486,590 +486,583 @@ public class InterfaceList { } } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(Lclient!be;I)Lclient!be;") - public static Component method4668(@OriginalArg(0) Component arg0) { - if (arg0.layer != -1) { - return getComponent(arg0.layer); - } - @Pc(28) int local28 = arg0.id >>> 16; - @Pc(33) HashTableIterator local33 = new HashTableIterator(openInterfaces); - for (@Pc(38) ComponentPointer local38 = (ComponentPointer) local33.method2701(); local38 != null; local38 = (ComponentPointer) local33.method2700()) { - if (local28 == local38.anInt5878) { - return getComponent((int) local38.key); - } - } - return null; - } + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(Lclient!be;I)Lclient!be;") + public static Component method4668(@OriginalArg(0) Component arg0) { + if (arg0.layer != -1) { + return getComponent(arg0.layer); + } + @Pc(28) int local28 = arg0.id >>> 16; + @Pc(33) HashTableIterator local33 = new HashTableIterator(openInterfaces); + for (@Pc(38) ComponentPointer local38 = (ComponentPointer) local33.method2701(); local38 != null; local38 = (ComponentPointer) local33.method2700()) { + if (local28 == local38.anInt5878) { + return getComponent((int) local38.key); + } + } + return null; + } - @OriginalMember(owner = "client!kf", name = "a", descriptor = "(IIBII)V") - public static void method4012(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - for (@Pc(12) int local12 = 0; local12 < rectangles; local12++) { - if (rectangleWidth[local12] + rectangleX[local12] > arg0 && arg1 + arg0 > rectangleX[local12] && arg2 < rectangleHeight[local12] + rectangleY[local12] && rectangleY[local12] < arg2 + arg3) { - aBooleanArray100[local12] = true; - } - } - } + @OriginalMember(owner = "client!kf", name = "a", descriptor = "(IIBII)V") + public static void method4012(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + for (@Pc(12) int local12 = 0; local12 < rectangles; local12++) { + if (rectangleWidth[local12] + rectangleX[local12] > arg0 && arg1 + arg0 > rectangleX[local12] && arg2 < rectangleHeight[local12] + rectangleY[local12] && rectangleY[local12] < arg2 + arg3) { + aBooleanArray100[local12] = true; + } + } + } - @OriginalMember(owner = "client!we", name = "b", descriptor = "(BI)V") - public static void method3214(@OriginalArg(1) int arg0) { - for (@Pc(11) Node local11 = properties.head(); local11 != null; local11 = properties.next()) { - if ((local11.key >> 48 & 0xFFFFL) == (long) arg0) { - local11.unlink(); - } - } - } + @OriginalMember(owner = "client!we", name = "b", descriptor = "(BI)V") + public static void method3214(@OriginalArg(1) int arg0) { + for (@Pc(11) Node local11 = properties.head(); local11 != null; local11 = properties.next()) { + if ((local11.key >> 48 & 0xFFFFL) == (long) arg0) { + local11.unlink(); + } + } + } - @OriginalMember(owner = "client!ed", name = "a", descriptor = "(III)V") - public static void runScripts(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - if (load(arg1)) { - method7(components[arg1], arg0); - } - } + @OriginalMember(owner = "client!ed", name = "a", descriptor = "(III)V") + public static void runScripts(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + if (load(arg1)) { + method7(components[arg1], arg0); + } + } - @OriginalMember(owner = "client!aa", name = "a", descriptor = "([Lclient!be;ZI)V") - public static void method7(@OriginalArg(0) Component[] arg0, @OriginalArg(2) int arg1) { - for (@Pc(11) int local11 = 0; local11 < arg0.length; local11++) { - @Pc(23) Component local23 = arg0[local11]; - if (local23 != null) { - if (local23.type == 0) { - if (local23.createdComponents != null) { - method7(local23.createdComponents, arg1); - } - @Pc(49) ComponentPointer local49 = (ComponentPointer) openInterfaces.get((long) local23.id); - if (local49 != null) { - runScripts(arg1, local49.anInt5878); - } - } - @Pc(72) HookRequest local72; - if (arg1 == 0 && local23.onDialogAbort != null) { - local72 = new HookRequest(); - local72.arguments = local23.onDialogAbort; - local72.source = local23; - ScriptRunner.run(local72); - } - if (arg1 == 1 && local23.onWidgetsOpenClose != null) { - if (local23.createdComponentId >= 0) { - @Pc(103) Component local103 = getComponent(local23.id); - if (local103 == null || local103.createdComponents == null || local23.createdComponentId >= local103.createdComponents.length || local103.createdComponents[local23.createdComponentId] != local23) { - continue; - } - } - local72 = new HookRequest(); - local72.arguments = local23.onWidgetsOpenClose; - local72.source = local23; - ScriptRunner.run(local72); - } - } - } - } + @OriginalMember(owner = "client!aa", name = "a", descriptor = "([Lclient!be;ZI)V") + public static void method7(@OriginalArg(0) Component[] arg0, @OriginalArg(2) int arg1) { + for (@Pc(11) int local11 = 0; local11 < arg0.length; local11++) { + @Pc(23) Component local23 = arg0[local11]; + if (local23 != null) { + if (local23.type == 0) { + if (local23.createdComponents != null) { + method7(local23.createdComponents, arg1); + } + @Pc(49) ComponentPointer local49 = (ComponentPointer) openInterfaces.get(local23.id); + if (local49 != null) { + runScripts(arg1, local49.anInt5878); + } + } + @Pc(72) HookRequest local72; + if (arg1 == 0 && local23.onDialogAbort != null) { + local72 = new HookRequest(); + local72.arguments = local23.onDialogAbort; + local72.source = local23; + ScriptRunner.run(local72); + } + if (arg1 == 1 && local23.onWidgetsOpenClose != null) { + if (local23.createdComponentId >= 0) { + @Pc(103) Component local103 = getComponent(local23.id); + if (local103 == null || local103.createdComponents == null || local23.createdComponentId >= local103.createdComponents.length || local103.createdComponents[local23.createdComponentId] != local23) { + continue; + } + } + local72 = new HookRequest(); + local72.arguments = local23.onWidgetsOpenClose; + local72.source = local23; + ScriptRunner.run(local72); + } + } + } + } - @OriginalMember(owner = "client!eg", name = "a", descriptor = "(IIIIIIII)V") - public static void method1320(@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) { - if (load(arg4)) { - method946(components[arg4], -1, arg5, arg1, arg3, arg6, arg0, arg2); - } - } + @OriginalMember(owner = "client!eg", name = "a", descriptor = "(IIIIIIII)V") + public static void method1320(@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) { + if (load(arg4)) { + method946(components[arg4], -1, arg5, arg1, arg3, arg6, arg0, arg2); + } + } - @OriginalMember(owner = "client!client", name = "a", descriptor = "([Lclient!be;IIIIIII)V") - public static void method946(@OriginalArg(0) Component[] 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) { - for (@Pc(1) int local1 = 0; local1 < arg0.length; local1++) { - @Pc(9) Component component = arg0[local1]; - if (component != null && component.layer == arg1 && (!component.if3 || component.type == 0 || component.aBoolean25 || getServerActiveProperties(component).events != 0 || component == Static40.aClass13_1 || component.clientCode == 1338) && (!component.if3 || !Static36.method947(component))) { - @Pc(50) int local50 = component.x + arg6; - @Pc(55) int local55 = component.y + arg7; - @Pc(61) int local61; - @Pc(63) int local63; - @Pc(65) int local65; - @Pc(67) int local67; - if (component.type == 2) { - local61 = arg2; - local63 = arg3; - local65 = arg4; - local67 = arg5; - } else { - @Pc(73) int local73 = local50 + component.width; - @Pc(78) int local78 = local55 + component.height; - if (component.type == 9) { - local73++; - local78++; - } - local61 = local50 > arg2 ? local50 : arg2; - local63 = local55 > arg3 ? local55 : arg3; - local65 = local73 < arg4 ? local73 : arg4; - local67 = local78 < arg5 ? local78 : arg5; - } - if (component == Static40.aClass13_14) { - Static44.aBoolean83 = true; - Static36.anInt3075 = local50; - Static36.anInt660 = local55; - } - if (!component.if3 || local61 < local65 && local63 < local67) { - if (component.type == 0) { - if (!component.if3 && Static36.method947(component) && aClass13_22 != component) { - continue; - } - if (component.noClickThrough && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { - for (@Pc(164) HookRequest local164 = (HookRequest) lowPriorityRequests.head(); local164 != null; local164 = (HookRequest) lowPriorityRequests.next()) { - if (local164.aBoolean158) { - local164.unlink(); - local164.source.aBoolean19 = false; - } - } - if (Static40.anInt4851 == 0) { - Static40.aClass13_14 = null; - Static40.aClass13_1 = null; - } - Static36.anInt3337 = 0; - } - } - if (component.if3) { - @Pc(207) boolean local207; - if (Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { - local207 = true; - } else { - local207 = false; - } - @Pc(212) boolean local212 = false; - if (Mouse.pressedButton == 1 && local207) { - local212 = true; - } - @Pc(221) boolean local221 = false; - if (Mouse.clickButton == 1 && Mouse.clickX >= local61 && Mouse.clickY >= local63 && Mouse.clickX < local65 && Mouse.clickY < local67) { - local221 = true; - } - @Pc(243) int i; - @Pc(322) int k; - if (component.aByteArray8 != null) { - for (i = 0; i < component.aByteArray8.length; i++) { - if (Keyboard.pressedKeys[component.aByteArray8[i]]) { - if (component.anIntArray49 == null || client.loop >= component.anIntArray49[i]) { - @Pc(279) byte local279 = component.aByteArray7[i]; - if (local279 == 0 || ((local279 & 0x2) == 0 || Keyboard.pressedKeys[Keyboard.KEY_ALT]) && ((local279 & 0x1) == 0 || Keyboard.pressedKeys[Keyboard.KEY_CTRL]) && ((local279 & 0x4) == 0 || Keyboard.pressedKeys[Keyboard.KEY_SHIFT])) { - ClientProt.method4512(JagString.EMPTY, -1, i + 1, component.id); - k = component.anIntArray46[i]; - if (component.anIntArray49 == null) { - component.anIntArray49 = new int[component.aByteArray8.length]; - } - if (k == 0) { - component.anIntArray49[i] = Integer.MAX_VALUE; - } else { - component.anIntArray49[i] = client.loop + k; - } - } - } - } else if (component.anIntArray49 != null) { - component.anIntArray49[i] = 0; - } - } - } - if (local221) { - Static40.method1015(Mouse.clickY - local55, Mouse.clickX - local50, component); - } - if (Static40.aClass13_14 != null && Static40.aClass13_14 != component && local207 && getServerActiveProperties(component).method509()) { - aClass13_12 = component; - } - if (component == Static40.aClass13_1) { - Static146.aBoolean174 = true; - Static81.anInt2225 = local50; - anInt5103 = local55; - } - if (component.aBoolean25 || component.clientCode != 0) { - @Pc(399) HookRequest request; - if (local207 && MouseWheel.wheelRotation != 0 && component.onScroll != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseY = MouseWheel.wheelRotation; - request.arguments = component.onScroll; - lowPriorityRequests.addTail(request); - } - if (Static40.aClass13_14 != null || clickedInventoryComponent != null || Static40.aBoolean108 || component.clientCode != 1400 && Static36.anInt3337 > 0) { - local221 = false; - local212 = false; - local207 = false; - } - @Pc(508) int skill; - if (component.clientCode != 0) { - if (component.clientCode == 1337) { - aClass13_26 = component; - redraw(component); - continue; - } - if (component.clientCode == 1338) { - if (local221) { - Static1.anInt5 = Mouse.clickX - local50; - MiniMenu.anInt2878 = Mouse.clickY - local55; - } - continue; - } - if (component.clientCode == 1400) { - WorldMap.component = component; - if (local221) { - if (Keyboard.pressedKeys[Keyboard.KEY_CTRL] && LoginManager.staffModLevel > 0) { - i = (int) ((double) (Mouse.clickX - local50 - component.width / 2) * 2.0D / (double) WorldMap.zoom); - skill = (int) ((double) (Mouse.clickY - local55 - component.height / 2) * 2.0D / (double) WorldMap.zoom); - k = WorldMap.anInt435 + i; - @Pc(516) int local516 = WorldMap.anInt919 + skill; - @Pc(520) int local520 = k + WorldMap.originX; - @Pc(528) int local528 = WorldMap.length + WorldMap.originZ - local516 - 1; - Cheat.teleport(local520, local528, 0); - ClientProt.closeWidget(); - continue; - } - Static36.anInt3337 = 1; - Static40.anInt5388 = Mouse.lastMouseX; - Static40.anInt4035 = Mouse.lastMouseY; - continue; - } - if (local212 && Static36.anInt3337 > 0) { - if (Static36.anInt3337 == 1 && (Static40.anInt5388 != Mouse.lastMouseX || Static40.anInt4035 != Mouse.lastMouseY)) { - Static36.anInt4620 = WorldMap.anInt435; - Static36.anInt1885 = WorldMap.anInt919; - Static36.anInt3337 = 2; - } - if (Static36.anInt3337 == 2) { - WorldMap.method1964(Static36.anInt4620 + (int) ((double) (Static40.anInt5388 - Mouse.lastMouseX) * 2.0D / (double) WorldMap.targetZoom)); - WorldMap.method4641(Static36.anInt1885 + (int) ((double) (Static40.anInt4035 - Mouse.lastMouseY) * 2.0D / (double) WorldMap.targetZoom)); - } - continue; - } - Static36.anInt3337 = 0; - continue; - } - if (component.clientCode == 1401) { - if (local212) { - WorldMap.method2387(component.width, Mouse.lastMouseY - local55, Mouse.lastMouseX - local50, component.height); - } - continue; - } - if (component.clientCode == 1402) { - if (!GlRenderer.enabled) { - redraw(component); - } - continue; - } - } - if (!component.aBoolean24 && local221) { - component.aBoolean24 = true; - if (component.onClickRepeat != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.clickX - local50; - request.mouseY = Mouse.clickY - local55; - request.arguments = component.onClickRepeat; - lowPriorityRequests.addTail(request); - } - } - if (component.aBoolean24 && local212 && component.onDrag != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onDrag; - lowPriorityRequests.addTail(request); - } - if (component.aBoolean24 && !local212) { - component.aBoolean24 = false; - if (component.onRelease != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onRelease; - mediumPriorityRequests.addTail(request); - } - } - if (local212 && component.onHold != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onHold; - lowPriorityRequests.addTail(request); - } - if (!component.aBoolean19 && local207) { - component.aBoolean19 = true; - if (component.onMouseOver != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onMouseOver; - lowPriorityRequests.addTail(request); - } - } - if (component.aBoolean19 && local207 && component.onMouseRepeat != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onMouseRepeat; - lowPriorityRequests.addTail(request); - } - if (component.aBoolean19 && !local207) { - component.aBoolean19 = false; - if (component.onMouseLeave != null) { - request = new HookRequest(); - request.aBoolean158 = true; - request.source = component; - request.mouseX = Mouse.lastMouseX - local50; - request.mouseY = Mouse.lastMouseY - local55; - request.arguments = component.onMouseLeave; - mediumPriorityRequests.addTail(request); - } - } - if (component.onTimer != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onTimer; - Static4.highPriorityRequests.addTail(request); - } - @Pc(966) HookRequest request2; - if (component.onVarcTransmit != null && VarcDomain.updatedVarcsWriterIndex > component.updatedVarcsReaderIndex) { - if (component.varcTriggers == null || VarcDomain.updatedVarcsWriterIndex - component.updatedVarcsReaderIndex > 32) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onVarcTransmit; - lowPriorityRequests.addTail(request); - } else { - label563: for (i = component.updatedVarcsReaderIndex; i < VarcDomain.updatedVarcsWriterIndex; i++) { - skill = VarcDomain.updatedVarcs[i & 0x1F]; - for (k = 0; k < component.varcTriggers.length; k++) { - if (component.varcTriggers[k] == skill) { - request2 = new HookRequest(); - request2.source = component; - request2.arguments = component.onVarcTransmit; - lowPriorityRequests.addTail(request2); - break label563; - } - } - } - } - component.updatedVarcsReaderIndex = VarcDomain.updatedVarcsWriterIndex; - } - if (component.onVarcstrTransmit != null && VarcDomain.updatedVarcstrsWriterIndex > component.updatedVarcstrsReaderIndex) { - if (component.varcstrTriggers == null || VarcDomain.updatedVarcstrsWriterIndex - component.updatedVarcstrsReaderIndex > 32) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onVarcstrTransmit; - lowPriorityRequests.addTail(request); - } else { - label539: for (i = component.updatedVarcstrsReaderIndex; i < VarcDomain.updatedVarcstrsWriterIndex; i++) { - skill = VarcDomain.updatedVarcstrs[i & 0x1F]; - for (k = 0; k < component.varcstrTriggers.length; k++) { - if (component.varcstrTriggers[k] == skill) { - request2 = new HookRequest(); - request2.source = component; - request2.arguments = component.onVarcstrTransmit; - lowPriorityRequests.addTail(request2); - break label539; - } - } - } - } - component.updatedVarcstrsReaderIndex = VarcDomain.updatedVarcstrsWriterIndex; - } - if (component.onVarpTransmit != null && VarpDomain.updatedVarpsWriterIndex > component.updatedVarpsReaderIndex) { - if (component.varpTriggers == null || VarpDomain.updatedVarpsWriterIndex - component.updatedVarpsReaderIndex > 32) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onVarpTransmit; - lowPriorityRequests.addTail(request); - } else { - label515: for (i = component.updatedVarpsReaderIndex; i < VarpDomain.updatedVarpsWriterIndex; i++) { - skill = VarpDomain.updatedVarps[i & 0x1F]; - for (k = 0; k < component.varpTriggers.length; k++) { - if (component.varpTriggers[k] == skill) { - request2 = new HookRequest(); - request2.source = component; - request2.arguments = component.onVarpTransmit; - lowPriorityRequests.addTail(request2); - break label515; - } - } - } - } - component.updatedVarpsReaderIndex = VarpDomain.updatedVarpsWriterIndex; - } - if (component.onInvTransmit != null && Inv.updatedInventoriesWriterIndex > component.updatedInventoriesReaderIndex) { - if (component.inventoryTriggers == null || Inv.updatedInventoriesWriterIndex - component.updatedInventoriesReaderIndex > 32) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onInvTransmit; - lowPriorityRequests.addTail(request); - } else { - outer: - for (i = component.updatedInventoriesReaderIndex; i < Inv.updatedInventoriesWriterIndex; i++) { - skill = Inv.updatedInventories[i & 0x1F]; - for (k = 0; k < component.inventoryTriggers.length; k++) { - if (component.inventoryTriggers[k] == skill) { - request2 = new HookRequest(); - request2.source = component; - request2.arguments = component.onInvTransmit; - lowPriorityRequests.addTail(request2); - break outer; - } - } - } - } - component.updatedInventoriesReaderIndex = Inv.updatedInventoriesWriterIndex; - } - if (component.onStatTransmit != null && PlayerSkillXpTable.updatedStatsWriterIndex > component.updatedStatsReaderIndex) { - if (component.statTriggers == null || PlayerSkillXpTable.updatedStatsWriterIndex - component.updatedStatsReaderIndex > 32) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onStatTransmit; - lowPriorityRequests.addTail(request); - } else { - outer: - for (i = component.updatedStatsReaderIndex; i < PlayerSkillXpTable.updatedStatsWriterIndex; i++) { - skill = PlayerSkillXpTable.updatedStats[i & 0x1F]; - for (k = 0; k < component.statTriggers.length; k++) { - if (component.statTriggers[k] == skill) { - request2 = new HookRequest(); - request2.source = component; - request2.arguments = component.onStatTransmit; - lowPriorityRequests.addTail(request2); - break outer; - } - } - } - } - component.updatedStatsReaderIndex = PlayerSkillXpTable.updatedStatsWriterIndex; - } - if (Chat.transmitAt > component.lastTransmitTimer && component.onMsg != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onMsg; - lowPriorityRequests.addTail(request); - } - if (FriendsList.transmitAt > component.lastTransmitTimer && component.onFriendTransmit != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onFriendTransmit; - lowPriorityRequests.addTail(request); - } - if (ClanChat.transmitAt > component.lastTransmitTimer && component.onClanTransmit != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onClanTransmit; - lowPriorityRequests.addTail(request); - } - if (StockMarketManager.transmitAt > component.lastTransmitTimer && component.onStockTransmit != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onStockTransmit; - lowPriorityRequests.addTail(request); - } - if (miscTransmitAt > component.lastTransmitTimer && component.onMiscTransmit != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onMiscTransmit; - lowPriorityRequests.addTail(request); - } - component.lastTransmitTimer = transmitTimer; - if (component.onKey != null) { - for (i = 0; i < keyQueueSize; i++) { - @Pc(1430) HookRequest local1430 = new HookRequest(); - local1430.source = component; - local1430.keyCode = keyCodes[i]; - local1430.keyChar = keyChars[i]; - local1430.arguments = component.onKey; - lowPriorityRequests.addTail(local1430); - } - } - if (Camera.aBoolean16 && component.onMinimapUnlock != null) { - request = new HookRequest(); - request.source = component; - request.arguments = component.onMinimapUnlock; - lowPriorityRequests.addTail(request); - } - } - } - if (!component.if3 && Static40.aClass13_14 == null && clickedInventoryComponent == null && !Static40.aBoolean108) { - if ((component.anInt470 >= 0 || component.anInt480 != 0) && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { - if (component.anInt470 >= 0) { - aClass13_22 = arg0[component.anInt470]; - } else { - aClass13_22 = component; - } - } - if (component.type == 8 && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { - Protocol.aClass13_11 = component; - } - if (component.scrollMaxV > component.height) { - Static36.method4049(Mouse.lastMouseY, component.height, component, Mouse.lastMouseX, local50 + component.width, local55, component.scrollMaxV); - } - } - if (component.type == 0) { - method946(arg0, component.id, local61, local63, local65, local67, local50 - component.scrollX, local55 - component.scrollY); - if (component.createdComponents != null) { - method946(component.createdComponents, component.id, local61, local63, local65, local67, local50 - component.scrollX, local55 - component.scrollY); - } - @Pc(1595) ComponentPointer local1595 = (ComponentPointer) openInterfaces.get((long) component.id); - if (local1595 != null) { - method1320(local50, local63, local55, local65, local1595.anInt5878, local61, local67); - } - } - } - } - } - } + @OriginalMember(owner = "client!client", name = "a", descriptor = "([Lclient!be;IIIIIII)V") + public static void method946(@OriginalArg(0) Component[] 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) { + for (@Pc(1) int local1 = 0; local1 < arg0.length; local1++) { + @Pc(9) Component component = arg0[local1]; + if (component != null && component.layer == arg1 && (!component.if3 || component.type == 0 || component.aBoolean25 || getServerActiveProperties(component).events != 0 || component == Static40.aClass13_1 || component.clientCode == 1338) && (!component.if3 || !Static36.method947(component))) { + @Pc(50) int local50 = component.x + arg6; + @Pc(55) int local55 = component.y + arg7; + @Pc(61) int local61; + @Pc(63) int local63; + @Pc(65) int local65; + @Pc(67) int local67; + if (component.type == 2) { + local61 = arg2; + local63 = arg3; + local65 = arg4; + local67 = arg5; + } else { + @Pc(73) int local73 = local50 + component.width; + @Pc(78) int local78 = local55 + component.height; + if (component.type == 9) { + local73++; + local78++; + } + local61 = local50 > arg2 ? local50 : arg2; + local63 = local55 > arg3 ? local55 : arg3; + local65 = local73 < arg4 ? local73 : arg4; + local67 = local78 < arg5 ? local78 : arg5; + } + if (component == Static40.aClass13_14) { + Static44.aBoolean83 = true; + Static36.anInt3075 = local50; + Static36.anInt660 = local55; + } + if (!component.if3 || local61 < local65 && local63 < local67) { + if (component.type == 0) { + if (!component.if3 && Static36.method947(component) && aClass13_22 != component) { + continue; + } + if (component.noClickThrough && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { + for (@Pc(164) HookRequest local164 = (HookRequest) lowPriorityRequests.head(); local164 != null; local164 = (HookRequest) lowPriorityRequests.next()) { + if (local164.aBoolean158) { + local164.unlink(); + local164.source.aBoolean19 = false; + } + } + if (Static40.anInt4851 == 0) { + Static40.aClass13_14 = null; + Static40.aClass13_1 = null; + } + Static36.anInt3337 = 0; + } + } + if (component.if3) { + @Pc(207) boolean local207; + local207 = Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67; + @Pc(212) boolean local212 = Mouse.pressedButton == 1 && local207; + @Pc(221) boolean local221 = Mouse.clickButton == 1 && Mouse.clickX >= local61 && Mouse.clickY >= local63 && Mouse.clickX < local65 && Mouse.clickY < local67; + @Pc(243) int i; + @Pc(322) int k; + if (component.aByteArray8 != null) { + for (i = 0; i < component.aByteArray8.length; i++) { + if (Keyboard.pressedKeys[component.aByteArray8[i]]) { + if (component.anIntArray49 == null || client.loop >= component.anIntArray49[i]) { + @Pc(279) byte local279 = component.aByteArray7[i]; + if (local279 == 0 || ((local279 & 0x2) == 0 || Keyboard.pressedKeys[Keyboard.KEY_ALT]) && ((local279 & 0x1) == 0 || Keyboard.pressedKeys[Keyboard.KEY_CTRL]) && ((local279 & 0x4) == 0 || Keyboard.pressedKeys[Keyboard.KEY_SHIFT])) { + ClientProt.method4512(JagString.EMPTY, -1, i + 1, component.id); + k = component.anIntArray46[i]; + if (component.anIntArray49 == null) { + component.anIntArray49 = new int[component.aByteArray8.length]; + } + if (k == 0) { + component.anIntArray49[i] = Integer.MAX_VALUE; + } else { + component.anIntArray49[i] = client.loop + k; + } + } + } + } else if (component.anIntArray49 != null) { + component.anIntArray49[i] = 0; + } + } + } + if (local221) { + Static40.method1015(Mouse.clickY - local55, Mouse.clickX - local50, component); + } + if (Static40.aClass13_14 != null && Static40.aClass13_14 != component && local207 && getServerActiveProperties(component).method509()) { + aClass13_12 = component; + } + if (component == Static40.aClass13_1) { + Static146.aBoolean174 = true; + Static81.anInt2225 = local50; + anInt5103 = local55; + } + if (component.aBoolean25 || component.clientCode != 0) { + @Pc(399) HookRequest request; + if (local207 && MouseWheel.wheelRotation != 0 && component.onScroll != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseY = MouseWheel.wheelRotation; + request.arguments = component.onScroll; + lowPriorityRequests.addTail(request); + } + if (Static40.aClass13_14 != null || clickedInventoryComponent != null || Static40.aBoolean108 || component.clientCode != 1400 && Static36.anInt3337 > 0) { + local221 = false; + local212 = false; + local207 = false; + } + @Pc(508) int skill; + if (component.clientCode != 0) { + if (component.clientCode == 1337) { + aClass13_26 = component; + redraw(component); + continue; + } + if (component.clientCode == 1338) { + if (local221) { + Static1.anInt5 = Mouse.clickX - local50; + MiniMenu.anInt2878 = Mouse.clickY - local55; + } + continue; + } + if (component.clientCode == 1400) { + WorldMap.component = component; + if (local221) { + if (Keyboard.pressedKeys[Keyboard.KEY_CTRL] && LoginManager.staffModLevel > 0) { + i = (int) ((double) (Mouse.clickX - local50 - component.width / 2) * 2.0D / (double) WorldMap.zoom); + skill = (int) ((double) (Mouse.clickY - local55 - component.height / 2) * 2.0D / (double) WorldMap.zoom); + k = WorldMap.anInt435 + i; + @Pc(516) int local516 = WorldMap.anInt919 + skill; + @Pc(520) int local520 = k + WorldMap.originX; + @Pc(528) int local528 = WorldMap.length + WorldMap.originZ - local516 - 1; + Cheat.teleport(local520, local528, 0); + ClientProt.closeWidget(); + continue; + } + Static36.anInt3337 = 1; + Static40.anInt5388 = Mouse.lastMouseX; + Static40.anInt4035 = Mouse.lastMouseY; + continue; + } + if (local212 && Static36.anInt3337 > 0) { + if (Static36.anInt3337 == 1 && (Static40.anInt5388 != Mouse.lastMouseX || Static40.anInt4035 != Mouse.lastMouseY)) { + Static36.anInt4620 = WorldMap.anInt435; + Static36.anInt1885 = WorldMap.anInt919; + Static36.anInt3337 = 2; + } + if (Static36.anInt3337 == 2) { + WorldMap.method1964(Static36.anInt4620 + (int) ((double) (Static40.anInt5388 - Mouse.lastMouseX) * 2.0D / (double) WorldMap.targetZoom)); + WorldMap.method4641(Static36.anInt1885 + (int) ((double) (Static40.anInt4035 - Mouse.lastMouseY) * 2.0D / (double) WorldMap.targetZoom)); + } + continue; + } + Static36.anInt3337 = 0; + continue; + } + if (component.clientCode == 1401) { + if (local212) { + WorldMap.method2387(component.width, Mouse.lastMouseY - local55, Mouse.lastMouseX - local50, component.height); + } + continue; + } + if (component.clientCode == 1402) { + if (!GlRenderer.enabled) { + redraw(component); + } + continue; + } + } + if (!component.aBoolean24 && local221) { + component.aBoolean24 = true; + if (component.onClickRepeat != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.clickX - local50; + request.mouseY = Mouse.clickY - local55; + request.arguments = component.onClickRepeat; + lowPriorityRequests.addTail(request); + } + } + if (component.aBoolean24 && local212 && component.onDrag != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onDrag; + lowPriorityRequests.addTail(request); + } + if (component.aBoolean24 && !local212) { + component.aBoolean24 = false; + if (component.onRelease != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onRelease; + mediumPriorityRequests.addTail(request); + } + } + if (local212 && component.onHold != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onHold; + lowPriorityRequests.addTail(request); + } + if (!component.aBoolean19 && local207) { + component.aBoolean19 = true; + if (component.onMouseOver != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onMouseOver; + lowPriorityRequests.addTail(request); + } + } + if (component.aBoolean19 && local207 && component.onMouseRepeat != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onMouseRepeat; + lowPriorityRequests.addTail(request); + } + if (component.aBoolean19 && !local207) { + component.aBoolean19 = false; + if (component.onMouseLeave != null) { + request = new HookRequest(); + request.aBoolean158 = true; + request.source = component; + request.mouseX = Mouse.lastMouseX - local50; + request.mouseY = Mouse.lastMouseY - local55; + request.arguments = component.onMouseLeave; + mediumPriorityRequests.addTail(request); + } + } + if (component.onTimer != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onTimer; + Static4.highPriorityRequests.addTail(request); + } + @Pc(966) HookRequest request2; + if (component.onVarcTransmit != null && VarcDomain.updatedVarcsWriterIndex > component.updatedVarcsReaderIndex) { + if (component.varcTriggers == null || VarcDomain.updatedVarcsWriterIndex - component.updatedVarcsReaderIndex > 32) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onVarcTransmit; + lowPriorityRequests.addTail(request); + } else { + label563: + for (i = component.updatedVarcsReaderIndex; i < VarcDomain.updatedVarcsWriterIndex; i++) { + skill = VarcDomain.updatedVarcs[i & 0x1F]; + for (k = 0; k < component.varcTriggers.length; k++) { + if (component.varcTriggers[k] == skill) { + request2 = new HookRequest(); + request2.source = component; + request2.arguments = component.onVarcTransmit; + lowPriorityRequests.addTail(request2); + break label563; + } + } + } + } + component.updatedVarcsReaderIndex = VarcDomain.updatedVarcsWriterIndex; + } + if (component.onVarcstrTransmit != null && VarcDomain.updatedVarcstrsWriterIndex > component.updatedVarcstrsReaderIndex) { + if (component.varcstrTriggers == null || VarcDomain.updatedVarcstrsWriterIndex - component.updatedVarcstrsReaderIndex > 32) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onVarcstrTransmit; + lowPriorityRequests.addTail(request); + } else { + label539: + for (i = component.updatedVarcstrsReaderIndex; i < VarcDomain.updatedVarcstrsWriterIndex; i++) { + skill = VarcDomain.updatedVarcstrs[i & 0x1F]; + for (k = 0; k < component.varcstrTriggers.length; k++) { + if (component.varcstrTriggers[k] == skill) { + request2 = new HookRequest(); + request2.source = component; + request2.arguments = component.onVarcstrTransmit; + lowPriorityRequests.addTail(request2); + break label539; + } + } + } + } + component.updatedVarcstrsReaderIndex = VarcDomain.updatedVarcstrsWriterIndex; + } + if (component.onVarpTransmit != null && VarpDomain.updatedVarpsWriterIndex > component.updatedVarpsReaderIndex) { + if (component.varpTriggers == null || VarpDomain.updatedVarpsWriterIndex - component.updatedVarpsReaderIndex > 32) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onVarpTransmit; + lowPriorityRequests.addTail(request); + } else { + label515: + for (i = component.updatedVarpsReaderIndex; i < VarpDomain.updatedVarpsWriterIndex; i++) { + skill = VarpDomain.updatedVarps[i & 0x1F]; + for (k = 0; k < component.varpTriggers.length; k++) { + if (component.varpTriggers[k] == skill) { + request2 = new HookRequest(); + request2.source = component; + request2.arguments = component.onVarpTransmit; + lowPriorityRequests.addTail(request2); + break label515; + } + } + } + } + component.updatedVarpsReaderIndex = VarpDomain.updatedVarpsWriterIndex; + } + if (component.onInvTransmit != null && Inv.updatedInventoriesWriterIndex > component.updatedInventoriesReaderIndex) { + if (component.inventoryTriggers == null || Inv.updatedInventoriesWriterIndex - component.updatedInventoriesReaderIndex > 32) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onInvTransmit; + lowPriorityRequests.addTail(request); + } else { + outer: + for (i = component.updatedInventoriesReaderIndex; i < Inv.updatedInventoriesWriterIndex; i++) { + skill = Inv.updatedInventories[i & 0x1F]; + for (k = 0; k < component.inventoryTriggers.length; k++) { + if (component.inventoryTriggers[k] == skill) { + request2 = new HookRequest(); + request2.source = component; + request2.arguments = component.onInvTransmit; + lowPriorityRequests.addTail(request2); + break outer; + } + } + } + } + component.updatedInventoriesReaderIndex = Inv.updatedInventoriesWriterIndex; + } + if (component.onStatTransmit != null && PlayerSkillXpTable.updatedStatsWriterIndex > component.updatedStatsReaderIndex) { + if (component.statTriggers == null || PlayerSkillXpTable.updatedStatsWriterIndex - component.updatedStatsReaderIndex > 32) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onStatTransmit; + lowPriorityRequests.addTail(request); + } else { + outer: + for (i = component.updatedStatsReaderIndex; i < PlayerSkillXpTable.updatedStatsWriterIndex; i++) { + skill = PlayerSkillXpTable.updatedStats[i & 0x1F]; + for (k = 0; k < component.statTriggers.length; k++) { + if (component.statTriggers[k] == skill) { + request2 = new HookRequest(); + request2.source = component; + request2.arguments = component.onStatTransmit; + lowPriorityRequests.addTail(request2); + break outer; + } + } + } + } + component.updatedStatsReaderIndex = PlayerSkillXpTable.updatedStatsWriterIndex; + } + if (Chat.transmitAt > component.lastTransmitTimer && component.onMsg != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onMsg; + lowPriorityRequests.addTail(request); + } + if (FriendsList.transmitAt > component.lastTransmitTimer && component.onFriendTransmit != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onFriendTransmit; + lowPriorityRequests.addTail(request); + } + if (ClanChat.transmitAt > component.lastTransmitTimer && component.onClanTransmit != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onClanTransmit; + lowPriorityRequests.addTail(request); + } + if (StockMarketManager.transmitAt > component.lastTransmitTimer && component.onStockTransmit != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onStockTransmit; + lowPriorityRequests.addTail(request); + } + if (miscTransmitAt > component.lastTransmitTimer && component.onMiscTransmit != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onMiscTransmit; + lowPriorityRequests.addTail(request); + } + component.lastTransmitTimer = transmitTimer; + if (component.onKey != null) { + for (i = 0; i < keyQueueSize; i++) { + @Pc(1430) HookRequest local1430 = new HookRequest(); + local1430.source = component; + local1430.keyCode = keyCodes[i]; + local1430.keyChar = keyChars[i]; + local1430.arguments = component.onKey; + lowPriorityRequests.addTail(local1430); + } + } + if (Camera.aBoolean16 && component.onMinimapUnlock != null) { + request = new HookRequest(); + request.source = component; + request.arguments = component.onMinimapUnlock; + lowPriorityRequests.addTail(request); + } + } + } + if (!component.if3 && Static40.aClass13_14 == null && clickedInventoryComponent == null && !Static40.aBoolean108) { + if ((component.anInt470 >= 0 || component.anInt480 != 0) && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { + if (component.anInt470 >= 0) { + aClass13_22 = arg0[component.anInt470]; + } else { + aClass13_22 = component; + } + } + if (component.type == 8 && Mouse.lastMouseX >= local61 && Mouse.lastMouseY >= local63 && Mouse.lastMouseX < local65 && Mouse.lastMouseY < local67) { + Protocol.aClass13_11 = component; + } + if (component.scrollMaxV > component.height) { + Static36.method4049(Mouse.lastMouseY, component.height, component, Mouse.lastMouseX, local50 + component.width, local55, component.scrollMaxV); + } + } + if (component.type == 0) { + method946(arg0, component.id, local61, local63, local65, local67, local50 - component.scrollX, local55 - component.scrollY); + if (component.createdComponents != null) { + method946(component.createdComponents, component.id, local61, local63, local65, local67, local50 - component.scrollX, local55 - component.scrollY); + } + @Pc(1595) ComponentPointer local1595 = (ComponentPointer) openInterfaces.get(component.id); + if (local1595 != null) { + method1320(local50, local63, local55, local65, local1595.anInt5878, local61, local67); + } + } + } + } + } + } - @OriginalMember(owner = "client!aa", name = "a", descriptor = "(SI)Z") - public static boolean method5(@OriginalArg(0) short arg0) { - if (arg0 == 47 || arg0 == 5 || arg0 == 43 || arg0 == 35 || arg0 == 58 || arg0 == 22 || arg0 == 40 || arg0 == 3) { - return true; - } else if (arg0 == 9 || arg0 == 12 || arg0 == 1006 || arg0 == 1003) { - return true; - } else if (arg0 == 25 || arg0 == 23 || arg0 == 48 || arg0 == 7 || arg0 == 13) { - return true; - } else { - return arg0 == 8 || arg0 == 32 || arg0 == 28 || arg0 == 59 || arg0 == 51 || arg0 == 41; - } - } + @OriginalMember(owner = "client!aa", name = "a", descriptor = "(SI)Z") + public static boolean method5(@OriginalArg(0) short arg0) { + if (arg0 == 47 || arg0 == 5 || arg0 == 43 || arg0 == 35 || arg0 == 58 || arg0 == 22 || arg0 == 40 || arg0 == 3) { + return true; + } else if (arg0 == 9 || arg0 == 12 || arg0 == 1006 || arg0 == 1003) { + return true; + } else if (arg0 == 25 || arg0 == 23 || arg0 == 48 || arg0 == 7 || arg0 == 13) { + return true; + } else { + return arg0 == 8 || arg0 == 32 || arg0 == 28 || arg0 == 59 || arg0 == 51 || arg0 == 41; + } + } - @OriginalMember(owner = "client!fm", name = "a", descriptor = "(ZI)V") - public static void method1596(@OriginalArg(0) boolean arg0) { - if (arg0) { - if (topLevelInterface != -1) { - method2275(topLevelInterface); - } - for (@Pc(18) ComponentPointer local18 = (ComponentPointer) openInterfaces.head(); local18 != null; local18 = (ComponentPointer) openInterfaces.next()) { - closeInterface(true, local18); - } - topLevelInterface = -1; - openInterfaces = new HashTable(8); - method1287(); - topLevelInterface = Static156.loginScreenId; - method3712(false); - Static87.method1807(); - method1626(topLevelInterface); - } - MiniMenu.anInt1092 = -1; - Static81.method1750(ScriptRunner.anInt5794); - PlayerList.self = new Player(); - PlayerList.self.zFine = 3000; - PlayerList.self.xFine = 3000; - if (!GlRenderer.enabled) { - Static145.method2743(client.js5Archive8); - client.setGameState(10); - return; - } - if (Camera.cameraType == 2) { - Camera.renderX = Camera.anInt5375 << 7; - Camera.renderZ = Camera.anInt4232 << 7; - } else { - Camera.updateLoginScreenCamera(); - } - Static103.setInstantFade(); - LoginManager.setupLoadingScreenRegion(); - client.setGameState(28); - } + @OriginalMember(owner = "client!fm", name = "a", descriptor = "(ZI)V") + public static void method1596(@OriginalArg(0) boolean arg0) { + if (arg0) { + if (topLevelInterface != -1) { + method2275(topLevelInterface); + } + for (@Pc(18) ComponentPointer local18 = (ComponentPointer) openInterfaces.head(); local18 != null; local18 = (ComponentPointer) openInterfaces.next()) { + closeInterface(true, local18); + } + topLevelInterface = -1; + openInterfaces = new HashTable(8); + method1287(); + topLevelInterface = Static156.loginScreenId; + method3712(false); + Static87.method1807(); + method1626(topLevelInterface); + } + MiniMenu.anInt1092 = -1; + Static81.method1750(ScriptRunner.anInt5794); + PlayerList.self = new Player(); + PlayerList.self.zFine = 3000; + PlayerList.self.xFine = 3000; + if (!GlRenderer.enabled) { + Static145.method2743(client.js5Archive8); + client.setGameState(10); + return; + } + if (Camera.cameraType == 2) { + Camera.renderX = Camera.anInt5375 << 7; + Camera.renderZ = Camera.anInt4232 << 7; + } else { + Camera.updateLoginScreenCamera(); + } + Static103.setInstantFade(); + LoginManager.setupLoadingScreenRegion(); + client.setGameState(28); + } } diff --git a/client/src/main/java/rt4/Inv.java b/client/src/main/java/rt4/Inv.java index 87b065e..2ac4029 100644 --- a/client/src/main/java/rt4/Inv.java +++ b/client/src/main/java/rt4/Inv.java @@ -8,277 +8,277 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!qe") public final class Inv extends Node { - @OriginalMember(owner = "client!cb", name = "I", descriptor = "[I") - public static final int[] updatedInventories = new int[32]; - @OriginalMember(owner = "client!kl", name = "u", descriptor = "Lclient!na;") - public static final JagString aClass100_637 = JagString.parse(""); - @OriginalMember(owner = "client!ol", name = "Y", descriptor = "Lclient!na;") - public static final JagString aClass100_819 = JagString.parse(""); - @OriginalMember(owner = "client!ib", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_559 = JagString.parse(""); - @OriginalMember(owner = "client!jj", name = "m", descriptor = "Lclient!na;") - public static final JagString aClass100_594 = JagString.parse("<)4col>"); - @OriginalMember(owner = "client!ii", name = "c", descriptor = "I") - public static int updatedInventoriesWriterIndex = 0; - @OriginalMember(owner = "client!bj", name = "v", descriptor = "Lclient!sc;") - public static HashTable objectContainerCache = new HashTable(32); - @OriginalMember(owner = "client!qe", name = "p", descriptor = "[I") - public int[] objectIds = new int[] { -1 }; + @OriginalMember(owner = "client!cb", name = "I", descriptor = "[I") + public static final int[] updatedInventories = new int[32]; + @OriginalMember(owner = "client!kl", name = "u", descriptor = "Lclient!na;") + public static final JagString aClass100_637 = JagString.parse(""); + @OriginalMember(owner = "client!ol", name = "Y", descriptor = "Lclient!na;") + public static final JagString aClass100_819 = JagString.parse(""); + @OriginalMember(owner = "client!ib", name = "g", descriptor = "Lclient!na;") + public static final JagString aClass100_559 = JagString.parse(""); + @OriginalMember(owner = "client!jj", name = "m", descriptor = "Lclient!na;") + public static final JagString aClass100_594 = JagString.parse("<)4col>"); + @OriginalMember(owner = "client!ii", name = "c", descriptor = "I") + public static int updatedInventoriesWriterIndex = 0; + @OriginalMember(owner = "client!bj", name = "v", descriptor = "Lclient!sc;") + public static HashTable objectContainerCache = new HashTable(32); + @OriginalMember(owner = "client!qe", name = "p", descriptor = "[I") + public int[] objectIds = new int[]{-1}; @OriginalMember(owner = "client!qe", name = "u", descriptor = "[I") - public int[] anIntArray422 = new int[] { 0 }; + public int[] anIntArray422 = new int[]{0}; - @OriginalMember(owner = "client!ba", name = "a", descriptor = "(IB)I") - public static int getFreeSpace(@OriginalArg(0) int arg0) { - if (arg0 < 0) { - return 0; - } - @Pc(17) Inv local17 = (Inv) objectContainerCache.get((long) arg0); - if (local17 == null) { - return InvTypeList.get(arg0).size; - } - @Pc(31) int freeSpaces = 0; - for (@Pc(33) int id = 0; id < local17.objectIds.length; id++) { - if (local17.objectIds[id] == -1) { - freeSpaces++; - } - } - return freeSpaces + InvTypeList.get(arg0).size - local17.objectIds.length; - } + @OriginalMember(owner = "client!ba", name = "a", descriptor = "(IB)I") + public static int getFreeSpace(@OriginalArg(0) int arg0) { + if (arg0 < 0) { + return 0; + } + @Pc(17) Inv local17 = (Inv) objectContainerCache.get(arg0); + if (local17 == null) { + return InvTypeList.get(arg0).size; + } + @Pc(31) int freeSpaces = 0; + for (@Pc(33) int id = 0; id < local17.objectIds.length; id++) { + if (local17.objectIds[id] == -1) { + freeSpaces++; + } + } + return freeSpaces + InvTypeList.get(arg0).size - local17.objectIds.length; + } - @OriginalMember(owner = "client!od", name = "a", descriptor = "(IZII)I") - public static int getTotalParam(@OriginalArg(1) boolean arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(19) Inv local19 = (Inv) objectContainerCache.get((long) arg1); - if (local19 == null) { - return 0; - } - @Pc(27) int local27 = 0; - for (@Pc(29) int local29 = 0; local29 < local19.objectIds.length; local29++) { - if (local19.objectIds[local29] >= 0 && ObjTypeList.anInt3245 > local19.objectIds[local29]) { - @Pc(56) ObjType local56 = ObjTypeList.get(local19.objectIds[local29]); - if (local56.params != null) { - @Pc(68) IntNode local68 = (IntNode) local56.params.get((long) arg2); - if (local68 != null) { - if (arg0) { - local27 += local19.anIntArray422[local29] * local68.value; - } else { - local27 += local68.value; - } - } - } - } - } - return local27; - } + @OriginalMember(owner = "client!od", name = "a", descriptor = "(IZII)I") + public static int getTotalParam(@OriginalArg(1) boolean arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + @Pc(19) Inv local19 = (Inv) objectContainerCache.get(arg1); + if (local19 == null) { + return 0; + } + @Pc(27) int local27 = 0; + for (@Pc(29) int local29 = 0; local29 < local19.objectIds.length; local29++) { + if (local19.objectIds[local29] >= 0 && ObjTypeList.anInt3245 > local19.objectIds[local29]) { + @Pc(56) ObjType local56 = ObjTypeList.get(local19.objectIds[local29]); + if (local56.params != null) { + @Pc(68) IntNode local68 = (IntNode) local56.params.get(arg2); + if (local68 != null) { + if (arg0) { + local27 += local19.anIntArray422[local29] * local68.value; + } else { + local27 += local68.value; + } + } + } + } + } + return local27; + } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(BII)I") - public static int getSlotTotal(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(8) Inv local8 = (Inv) objectContainerCache.get((long) arg0); - if (local8 == null) { - return 0; - } else if (arg1 == -1) { - return 0; - } else { - @Pc(25) int local25 = 0; - for (@Pc(27) int local27 = 0; local27 < local8.anIntArray422.length; local27++) { - if (arg1 == local8.objectIds[local27]) { - local25 += local8.anIntArray422[local27]; - } - } - return local25; - } - } + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(BII)I") + public static int getSlotTotal(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(8) Inv local8 = (Inv) objectContainerCache.get(arg0); + if (local8 == null) { + return 0; + } else if (arg1 == -1) { + return 0; + } else { + @Pc(25) int local25 = 0; + for (@Pc(27) int local27 = 0; local27 < local8.anIntArray422.length; local27++) { + if (arg1 == local8.objectIds[local27]) { + local25 += local8.anIntArray422[local27]; + } + } + return local25; + } + } - @OriginalMember(owner = "client!bm", name = "a", descriptor = "(III)I") - public static int getItemCount(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(10) Inv local10 = (Inv) objectContainerCache.get((long) arg0); - if (local10 == null) { - return 0; - } else if (arg1 >= 0 && arg1 < local10.anIntArray422.length) { - return local10.anIntArray422[arg1]; - } else { - return 0; - } - } + @OriginalMember(owner = "client!bm", name = "a", descriptor = "(III)I") + public static int getItemCount(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(10) Inv local10 = (Inv) objectContainerCache.get(arg0); + if (local10 == null) { + return 0; + } else if (arg1 >= 0 && arg1 < local10.anIntArray422.length) { + return local10.anIntArray422[arg1]; + } else { + return 0; + } + } - @OriginalMember(owner = "client!be", name = "a", descriptor = "(III)I") - public static int getItemType(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(10) Inv local10 = (Inv) objectContainerCache.get((long) arg0); - if (local10 == null) { - return -1; - } else if (arg1 >= 0 && arg1 < local10.objectIds.length) { - return local10.objectIds[arg1]; - } else { - return -1; - } - } + @OriginalMember(owner = "client!be", name = "a", descriptor = "(III)I") + public static int getItemType(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(10) Inv local10 = (Inv) objectContainerCache.get(arg0); + if (local10 == null) { + return -1; + } else if (arg1 >= 0 && arg1 < local10.objectIds.length) { + return local10.objectIds[arg1]; + } else { + return -1; + } + } - @OriginalMember(owner = "client!bc", name = "d", descriptor = "(II)V") - public static void delete(@OriginalArg(0) int arg0) { - @Pc(14) Inv local14 = (Inv) objectContainerCache.get((long) arg0); - if (local14 != null) { - local14.unlink(); - } - } + @OriginalMember(owner = "client!bc", name = "d", descriptor = "(II)V") + public static void delete(@OriginalArg(0) int arg0) { + @Pc(14) Inv local14 = (Inv) objectContainerCache.get(arg0); + if (local14 != null) { + local14.unlink(); + } + } - @OriginalMember(owner = "client!hn", name = "f", descriptor = "(B)V") - public static void method2073() { - objectContainerCache = new HashTable(32); - } + @OriginalMember(owner = "client!hn", name = "f", descriptor = "(B)V") + public static void method2073() { + objectContainerCache = new HashTable(32); + } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIIIB)V") - public static void updateContainer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - @Pc(12) Inv local12 = (Inv) objectContainerCache.get((long) arg3); - if (local12 == null) { - local12 = new Inv(); - objectContainerCache.put(local12, (long) arg3); - } - if (arg1 >= local12.objectIds.length) { - @Pc(39) int[] local39 = new int[arg1 + 1]; - @Pc(44) int[] local44 = new int[arg1 + 1]; - @Pc(46) int local46; - for (local46 = 0; local46 < local12.objectIds.length; local46++) { - local39[local46] = local12.objectIds[local46]; - local44[local46] = local12.anIntArray422[local46]; - } - for (local46 = local12.objectIds.length; local46 < arg1; local46++) { - local39[local46] = -1; - local44[local46] = 0; - } - local12.objectIds = local39; - local12.anIntArray422 = local44; - } - local12.objectIds[arg1] = arg0; - local12.anIntArray422[arg1] = arg2; - } + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIIIB)V") + public static void updateContainer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + @Pc(12) Inv local12 = (Inv) objectContainerCache.get(arg3); + if (local12 == null) { + local12 = new Inv(); + objectContainerCache.put(local12, arg3); + } + if (arg1 >= local12.objectIds.length) { + @Pc(39) int[] local39 = new int[arg1 + 1]; + @Pc(44) int[] local44 = new int[arg1 + 1]; + @Pc(46) int local46; + for (local46 = 0; local46 < local12.objectIds.length; local46++) { + local39[local46] = local12.objectIds[local46]; + local44[local46] = local12.anIntArray422[local46]; + } + for (local46 = local12.objectIds.length; local46 < arg1; local46++) { + local39[local46] = -1; + local44[local46] = 0; + } + local12.objectIds = local39; + local12.anIntArray422 = local44; + } + local12.objectIds[arg1] = arg0; + local12.anIntArray422[arg1] = arg2; + } - @OriginalMember(owner = "client!pf", name = "a", descriptor = "(IIZIII)Lclient!qf;") - public static Sprite getObjectSprite(@OriginalArg(0) int selected, @OriginalArg(1) int id, @OriginalArg(2) boolean drawText, @OriginalArg(3) int count, @OriginalArg(4) int shadow) { - @Pc(27) int key = (drawText ? 65536 : 0) + id + (selected << 17) + (shadow << 19); - @Pc(37) long uid = (long) key * 3849834839L + (long) count * 3147483667L; - @Pc(43) Sprite sprite = (Sprite) ObjTypeList.objectSpriteCache.get(uid); - if (sprite != null) { - return sprite; - } + @OriginalMember(owner = "client!pf", name = "a", descriptor = "(IIZIII)Lclient!qf;") + public static Sprite getObjectSprite(@OriginalArg(0) int selected, @OriginalArg(1) int id, @OriginalArg(2) boolean drawText, @OriginalArg(3) int count, @OriginalArg(4) int shadow) { + @Pc(27) int key = (drawText ? 65536 : 0) + id + (selected << 17) + (shadow << 19); + @Pc(37) long uid = (long) key * 3849834839L + (long) count * 3147483667L; + @Pc(43) Sprite sprite = (Sprite) ObjTypeList.objectSpriteCache.get(uid); + if (sprite != null) { + return sprite; + } - Rasteriser.textureHasTransparency = false; - sprite = renderObjectSprite(shadow, false, id, drawText, selected, count, false); - if (sprite != null && !Rasteriser.textureHasTransparency) { - ObjTypeList.objectSpriteCache.put(sprite, uid); - } + Rasteriser.textureHasTransparency = false; + sprite = renderObjectSprite(shadow, false, id, drawText, selected, count, false); + if (sprite != null && !Rasteriser.textureHasTransparency) { + ObjTypeList.objectSpriteCache.put(sprite, uid); + } - return sprite; - } + return sprite; + } - @OriginalMember(owner = "client!na", name = "a", descriptor = "(IBZIZIIZ)Lclient!qf;") - public static Sprite renderObjectSprite(@OriginalArg(0) int shadow, @OriginalArg(2) boolean linked, @OriginalArg(3) int id, @OriginalArg(4) boolean drawText, @OriginalArg(5) int state, @OriginalArg(6) int stack, @OriginalArg(7) boolean cert) { - @Pc(5) ObjType objType = ObjTypeList.get(id); - if (stack > 1 && objType.countobj != null) { - @Pc(15) int stackId = -1; - for (@Pc(17) int i = 0; i < 10; i++) { - if (stack >= objType.countco[i] && objType.countco[i] != 0) { - stackId = objType.countobj[i]; - } - } - if (stackId != -1) { - objType = ObjTypeList.get(stackId); - } - } + @OriginalMember(owner = "client!na", name = "a", descriptor = "(IBZIZIIZ)Lclient!qf;") + public static Sprite renderObjectSprite(@OriginalArg(0) int shadow, @OriginalArg(2) boolean linked, @OriginalArg(3) int id, @OriginalArg(4) boolean drawText, @OriginalArg(5) int state, @OriginalArg(6) int stack, @OriginalArg(7) boolean cert) { + @Pc(5) ObjType objType = ObjTypeList.get(id); + if (stack > 1 && objType.countobj != null) { + @Pc(15) int stackId = -1; + for (@Pc(17) int i = 0; i < 10; i++) { + if (stack >= objType.countco[i] && objType.countco[i] != 0) { + stackId = objType.countobj[i]; + } + } + if (stackId != -1) { + objType = ObjTypeList.get(stackId); + } + } - @Pc(60) SoftwareModel model = objType.getInvModel(); - if (model == null) { - return null; - } + @Pc(60) SoftwareModel model = objType.getInvModel(); + if (model == null) { + return null; + } - @Pc(71) SoftwareSprite linkedSprite = null; - if (objType.certtemplate != -1) { - linkedSprite = (SoftwareSprite) renderObjectSprite(0, true, objType.certlink, false, 1, 10, true); - if (linkedSprite == null) { - return null; - } - } else if (objType.lentTemplate != -1) { - linkedSprite = (SoftwareSprite) renderObjectSprite(shadow, true, objType.lentLink, false, state, stack, false); - if (linkedSprite == null) { - return null; - } - } + @Pc(71) SoftwareSprite linkedSprite = null; + if (objType.certtemplate != -1) { + linkedSprite = (SoftwareSprite) renderObjectSprite(0, true, objType.certlink, false, 1, 10, true); + if (linkedSprite == null) { + return null; + } + } else if (objType.lentTemplate != -1) { + linkedSprite = (SoftwareSprite) renderObjectSprite(shadow, true, objType.lentLink, false, state, stack, false); + if (linkedSprite == null) { + return null; + } + } - @Pc(118) int[] pixels = SoftwareRaster.pixels; - @Pc(120) int width = SoftwareRaster.width; - @Pc(122) int height = SoftwareRaster.height; - @Pc(125) int[] clip = new int[4]; - SoftwareRaster.saveClip(clip); + @Pc(118) int[] pixels = SoftwareRaster.pixels; + @Pc(120) int width = SoftwareRaster.width; + @Pc(122) int height = SoftwareRaster.height; + @Pc(125) int[] clip = new int[4]; + SoftwareRaster.saveClip(clip); - final int canvasWidth = 36; - final int canvasHeight = 32; + final int canvasWidth = 36; + final int canvasHeight = 32; - @Pc(133) SoftwareSprite canvas = new SoftwareSprite(canvasWidth, canvasHeight); - SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight); - Rasteriser.prepare(); - Rasteriser.setBounds(canvasWidth / 2, canvasHeight / 2); - Rasteriser.jagged = false; + @Pc(133) SoftwareSprite canvas = new SoftwareSprite(canvasWidth, canvasHeight); + SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight); + Rasteriser.prepare(); + Rasteriser.setBounds(canvasWidth / 2, canvasHeight / 2); + Rasteriser.jagged = false; - @Pc(145) int zoom = objType.zoom2d; // / 4; - if (cert) { - zoom = (int) ((double) zoom * 1.5D); - } else if (state == 2) { - zoom = (int) ((double) zoom * 1.04D); - } + @Pc(145) int zoom = objType.zoom2d; // / 4; + if (cert) { + zoom = (int) ((double) zoom * 1.5D); + } else if (state == 2) { + zoom = (int) ((double) zoom * 1.04D); + } - @Pc(176) int pitchcos = MathUtils.cos[objType.xAngle2D] * zoom >> 16; - @Pc(185) int pitchsin = MathUtils.sin[objType.xAngle2D] * zoom >> 16; - model.setCamera(objType.yAngle2D, objType.zAngle2D, objType.xAngle2D, objType.xOffset2D, pitchsin + objType.yOffset2D - model.getMinY() / 2, objType.yOffset2D + pitchcos, -1L); + @Pc(176) int pitchcos = MathUtils.cos[objType.xAngle2D] * zoom >> 16; + @Pc(185) int pitchsin = MathUtils.sin[objType.xAngle2D] * zoom >> 16; + model.setCamera(objType.yAngle2D, objType.zAngle2D, objType.xAngle2D, objType.xOffset2D, pitchsin + objType.yOffset2D - model.getMinY() / 2, objType.yOffset2D + pitchcos, -1L); - if (state >= 1) { - canvas.drawOutline(1); - if (state >= 2) { - canvas.drawOutline(16777215); - } - SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight); - } + if (state >= 1) { + canvas.drawOutline(1); + if (state >= 2) { + canvas.drawOutline(16777215); + } + SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight); + } - if (shadow != 0) { - canvas.drawShadow(shadow); - } + if (shadow != 0) { + canvas.drawShadow(shadow); + } - if (objType.certtemplate != -1) { - linkedSprite.render(0, 0); - } else if (objType.lentTemplate != -1) { - SoftwareRaster.setSize(linkedSprite.pixels, canvasWidth, canvasHeight); - canvas.render(0, 0); - canvas = linkedSprite; - } + if (objType.certtemplate != -1) { + linkedSprite.render(0, 0); + } else if (objType.lentTemplate != -1) { + SoftwareRaster.setSize(linkedSprite.pixels, canvasWidth, canvasHeight); + canvas.render(0, 0); + canvas = linkedSprite; + } - if (drawText && (objType.stackable == 1 || stack != 1) && stack != -1) { - ObjTypeList.font.renderLeft(formatObjAmount(stack), 0, 9, 16776960, 1); - } + if (drawText && (objType.stackable == 1 || stack != 1) && stack != -1) { + ObjTypeList.font.renderLeft(formatObjAmount(stack), 0, 9, 16776960, 1); + } - SoftwareRaster.setSize(pixels, width, height); - SoftwareRaster.restoreClip(clip); - Rasteriser.prepare(); - Rasteriser.jagged = true; - return GlRenderer.enabled && !linked ? new GlSprite(canvas) : canvas; - } + SoftwareRaster.setSize(pixels, width, height); + SoftwareRaster.restoreClip(clip); + Rasteriser.prepare(); + Rasteriser.jagged = true; + return GlRenderer.enabled && !linked ? new GlSprite(canvas) : canvas; + } - @OriginalMember(owner = "client!eb", name = "b", descriptor = "(II)Lclient!na;") - public static JagString formatObjAmount(@OriginalArg(1) int arg0) { - if (arg0 < 100000) { - return JagString.concatenate(new JagString[] { aClass100_559, JagString.parseInt(arg0), aClass100_594 }); - } else if (arg0 >= 10000000) { - return JagString.concatenate(new JagString[] { aClass100_819, JagString.parseInt(arg0 / 1000000), LocalizedText.MILLION, aClass100_594 }); - } else { - return JagString.concatenate(new JagString[] { aClass100_637, JagString.parseInt(arg0 / 1000), LocalizedText.THOUSAND, aClass100_594 }); - } - } + @OriginalMember(owner = "client!eb", name = "b", descriptor = "(II)Lclient!na;") + public static JagString formatObjAmount(@OriginalArg(1) int arg0) { + if (arg0 < 100000) { + return JagString.concatenate(new JagString[]{aClass100_559, JagString.parseInt(arg0), aClass100_594}); + } else if (arg0 >= 10000000) { + return JagString.concatenate(new JagString[]{aClass100_819, JagString.parseInt(arg0 / 1000000), LocalizedText.MILLION, aClass100_594}); + } else { + return JagString.concatenate(new JagString[]{aClass100_637, JagString.parseInt(arg0 / 1000), LocalizedText.THOUSAND, aClass100_594}); + } + } - @OriginalMember(owner = "client!bd", name = "a", descriptor = "(BI)V") - public static void method475(@OriginalArg(1) int arg0) { - @Pc(8) Inv local8 = (Inv) objectContainerCache.get((long) arg0); - if (local8 != null) { - for (@Pc(24) int local24 = 0; local24 < local8.objectIds.length; local24++) { - local8.objectIds[local24] = -1; - local8.anIntArray422[local24] = 0; - } - } - } + @OriginalMember(owner = "client!bd", name = "a", descriptor = "(BI)V") + public static void method475(@OriginalArg(1) int arg0) { + @Pc(8) Inv local8 = (Inv) objectContainerCache.get(arg0); + if (local8 != null) { + for (@Pc(24) int local24 = 0; local24 < local8.objectIds.length; local24++) { + local8.objectIds[local24] = -1; + local8.anIntArray422[local24] = 0; + } + } + } } diff --git a/client/src/main/java/rt4/InvTypeList.java b/client/src/main/java/rt4/InvTypeList.java index 9132871..15ac3e2 100644 --- a/client/src/main/java/rt4/InvTypeList.java +++ b/client/src/main/java/rt4/InvTypeList.java @@ -5,28 +5,28 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class InvTypeList { - @OriginalMember(owner = "client!ha", name = "p", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(64); - @OriginalMember(owner = "client!al", name = "q", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!ha", name = "p", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(64); + @OriginalMember(owner = "client!al", name = "q", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!je", name = "a", descriptor = "(ILclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!je", name = "a", descriptor = "(ILclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!u", name = "a", descriptor = "(II)Lclient!md;") - public static InvType get(@OriginalArg(0) int id) { - @Pc(16) InvType invType = (InvType) types.get((long) id); - if (invType != null) { - return invType; - } - @Pc(27) byte[] data = archive.fetchFile(5, id); - invType = new InvType(); - if (data != null) { - invType.decode(new Buffer(data)); - } - types.put(invType, (long) id); - return invType; - } + @OriginalMember(owner = "client!u", name = "a", descriptor = "(II)Lclient!md;") + public static InvType get(@OriginalArg(0) int id) { + @Pc(16) InvType invType = (InvType) types.get(id); + if (invType != null) { + return invType; + } + @Pc(27) byte[] data = archive.fetchFile(5, id); + invType = new InvType(); + if (data != null) { + invType.decode(new Buffer(data)); + } + types.put(invType, id); + return invType; + } } diff --git a/client/src/main/java/rt4/JagString.java b/client/src/main/java/rt4/JagString.java index bc4963b..f3e396d 100644 --- a/client/src/main/java/rt4/JagString.java +++ b/client/src/main/java/rt4/JagString.java @@ -1,22 +1,21 @@ package rt4; -import java.applet.Applet; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.net.MalformedURLException; -import java.net.URL; -import java.nio.charset.StandardCharsets; - import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.applet.Applet; +import java.awt.*; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.charset.StandardCharsets; + @OriginalClass("client!na") public final class JagString implements StringInterface { - @OriginalMember(owner = "client!pa", name = "O", descriptor = "Lclient!na;") - public static final JagString EMPTY = parse(""); + @OriginalMember(owner = "client!pa", name = "O", descriptor = "Lclient!na;") + public static final JagString EMPTY = parse(""); @OriginalMember(owner = "client!pi", name = "Q", descriptor = "Lclient!na;") public static final JagString aClass100_853 = parse("null"); @OriginalMember(owner = "client!t", name = "C", descriptor = "Lclient!na;") @@ -36,12 +35,12 @@ public final class JagString implements StringInterface { @OriginalMember(owner = "client!bm", name = "p", descriptor = "Lclient!na;") public static final JagString aClass100_133 = parse("(U1"); @OriginalMember(owner = "client!vk", name = "a", descriptor = "[I") - public static final int[] anIntArray471 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 73, 74, 76, 78, 83, 84, 85, 86, 91, 92, 93, 94, 95, 97, 103, 104, 105, 106, 107, 108, 113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 133, 134, 136, 138, 143, 144, 145, 146, 151, 152, 153, 154, 155, 157, 163, 164, 165, 166, 168, 169, 174, 175, 176, 177, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 97, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 157, 215, 216, 117, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 66, 66, 66, 66, 66, 66, 65, 75, 79, 79, 79, 79, 87, 87, 87, 87, 77, 96, 98, 98, 98, 98, 98, 250, 251, 109, 109, 109, 109, 117, 252, 167, 126, 126, 126, 126, 126, 126, 125, 135, 139, 139, 139, 139, 147, 147, 147, 147, 137, 156, 158, 158, 158, 158, 158, 253, 254, 170, 170, 170, 170, 178, 255, 178 }; + public static final int[] anIntArray471 = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 73, 74, 76, 78, 83, 84, 85, 86, 91, 92, 93, 94, 95, 97, 103, 104, 105, 106, 107, 108, 113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 133, 134, 136, 138, 143, 144, 145, 146, 151, 152, 153, 154, 155, 157, 163, 164, 165, 166, 168, 169, 174, 175, 176, 177, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 97, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 157, 215, 216, 117, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 66, 66, 66, 66, 66, 66, 65, 75, 79, 79, 79, 79, 87, 87, 87, 87, 77, 96, 98, 98, 98, 98, 98, 250, 251, 109, 109, 109, 109, 117, 252, 167, 126, 126, 126, 126, 126, 126, 125, 135, 139, 139, 139, 139, 147, 147, 147, 147, 137, 156, 158, 158, 158, 158, 158, 253, 254, 170, 170, 170, 170, 178, 255, 178}; @OriginalMember(owner = "client!sh", name = "e", descriptor = "Lclient!na;") public static final JagString aClass100_967 = parse(""); @OriginalMember(owner = "client!li", name = "w", descriptor = "Lclient!sc;") - public static HashTable aClass133_13; - @OriginalMember(owner = "client!na", name = "T", descriptor = "[B") + public static HashTable aClass133_13; + @OriginalMember(owner = "client!na", name = "T", descriptor = "[B") public byte[] chars; @OriginalMember(owner = "client!na", name = "lb", descriptor = "I") @@ -50,13 +49,13 @@ public final class JagString implements StringInterface { @OriginalMember(owner = "client!na", name = "N", descriptor = "Z") private boolean aBoolean193 = true; - @OriginalMember(owner = "client!ck", name = "a", descriptor = "([Lclient!na;B)Lclient!na;") - public static JagString concatenate(@OriginalArg(0) JagString[] arg0) { - if (arg0.length < 2) { - throw new IllegalArgumentException(); - } - return method2355(0, arg0.length, arg0); - } + @OriginalMember(owner = "client!ck", name = "a", descriptor = "([Lclient!na;B)Lclient!na;") + public static JagString concatenate(@OriginalArg(0) JagString[] arg0) { + if (arg0.length < 2) { + throw new IllegalArgumentException(); + } + return method2355(0, arg0.length, arg0); + } @OriginalMember(owner = "client!jd", name = "a", descriptor = "(II[Lclient!na;I)Lclient!na;") public static JagString method2355(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) JagString[] arg2) { @@ -128,33 +127,33 @@ public final class JagString implements StringInterface { } } - @OriginalMember(owner = "client!cd", name = "a", descriptor = "(Ljava/lang/String;B)Lclient!na;") - public static JagString parse(@OriginalArg(0) String arg0) { - @Pc(6) byte[] local6 = arg0.getBytes(); - @Pc(9) int local9 = local6.length; - @Pc(13) JagString local13 = new JagString(); - @Pc(15) int local15 = 0; - local13.chars = new byte[local9]; - while (local9 > local15) { - @Pc(29) int local29 = local6[local15++] & 0xFF; - if (local29 <= 45 && local29 >= 40) { - if (local15 >= local9) { - break; - } - @Pc(51) int local51 = local6[local15++] & 0xFF; - local13.chars[local13.length++] = (byte) (local51 + (local29 + -40) * 43 - 48); - } else if (local29 != 0) { - local13.chars[local13.length++] = (byte) local29; - } - } - local13.method3156(); - return local13.method3151(); - } + @OriginalMember(owner = "client!cd", name = "a", descriptor = "(Ljava/lang/String;B)Lclient!na;") + public static JagString parse(@OriginalArg(0) String arg0) { + @Pc(6) byte[] local6 = arg0.getBytes(); + @Pc(9) int local9 = local6.length; + @Pc(13) JagString local13 = new JagString(); + @Pc(15) int local15 = 0; + local13.chars = new byte[local9]; + while (local9 > local15) { + @Pc(29) int local29 = local6[local15++] & 0xFF; + if (local29 <= 45 && local29 >= 40) { + if (local15 >= local9) { + break; + } + @Pc(51) int local51 = local6[local15++] & 0xFF; + local13.chars[local13.length++] = (byte) (local51 + (local29 + -40) * 43 - 48); + } else if (local29 != 0) { + local13.chars[local13.length++] = (byte) local29; + } + } + local13.method3156(); + return local13.method3151(); + } - @OriginalMember(owner = "client!jj", name = "b", descriptor = "(BI)Lclient!na;") - public static JagString parseInt(@OriginalArg(1) int arg0) { - return parseInt(false, arg0); - } + @OriginalMember(owner = "client!jj", name = "b", descriptor = "(BI)Lclient!na;") + public static JagString parseInt(@OriginalArg(1) int arg0) { + return parseInt(false, arg0); + } @OriginalMember(owner = "client!q", name = "a", descriptor = "(BZII)Lclient!na;") public static JagString parseInt(@OriginalArg(1) boolean arg0, @OriginalArg(3) int arg1) { @@ -191,33 +190,33 @@ public final class JagString implements StringInterface { return local112; } - @OriginalMember(owner = "client!an", name = "a", descriptor = "([BIII)Lclient!na;") - public static JagString decodeString(@OriginalArg(0) byte[] arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(7) JagString local7 = new JagString(); - local7.chars = new byte[arg1]; - local7.length = 0; - for (@Pc(22) int local22 = arg2; local22 < arg1 + arg2; local22++) { - if (arg0[local22] != 0) { - local7.chars[local7.length++] = arg0[local22]; - } - } - return local7; - } + @OriginalMember(owner = "client!an", name = "a", descriptor = "([BIII)Lclient!na;") + public static JagString decodeString(@OriginalArg(0) byte[] arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + @Pc(7) JagString local7 = new JagString(); + local7.chars = new byte[arg1]; + local7.length = 0; + for (@Pc(22) int local22 = arg2; local22 < arg1 + arg2; local22++) { + if (arg0[local22] != 0) { + local7.chars[local7.length++] = arg0[local22]; + } + } + return local7; + } - @OriginalMember(owner = "client!bg", name = "d", descriptor = "(II)Z") - public static boolean method530(@OriginalArg(0) int arg0) { - return arg0 == 198 || arg0 == 230 || arg0 == 156 || arg0 == 140 || arg0 == 223; - } + @OriginalMember(owner = "client!bg", name = "d", descriptor = "(II)Z") + public static boolean method530(@OriginalArg(0) int arg0) { + return arg0 == 198 || arg0 == 230 || arg0 == 156 || arg0 == 140 || arg0 == 223; + } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(ZII)Lclient!na;") - public static JagString parseIntTrue(@OriginalArg(2) int arg0) { - return parseInt(true, arg0); - } + @OriginalMember(owner = "client!ih", name = "a", descriptor = "(ZII)Lclient!na;") + public static JagString parseIntTrue(@OriginalArg(2) int arg0) { + return parseInt(true, arg0); + } - @OriginalMember(owner = "client!oi", name = "a", descriptor = "(II)Lclient!na;") - public static JagString formatIp(@OriginalArg(0) int arg0) { - return concatenate(new JagString[] { parseInt(arg0 >> 24 & 0xFF), aClass100_994, parseInt(arg0 >> 16 & 0xFF), aClass100_994, parseInt(arg0 >> 8 & 0xFF), aClass100_994, parseInt(arg0 & 0xFF) }); - } + @OriginalMember(owner = "client!oi", name = "a", descriptor = "(II)Lclient!na;") + public static JagString formatIp(@OriginalArg(0) int arg0) { + return concatenate(new JagString[]{parseInt(arg0 >> 24 & 0xFF), aClass100_994, parseInt(arg0 >> 16 & 0xFF), aClass100_994, parseInt(arg0 >> 8 & 0xFF), aClass100_994, parseInt(arg0 & 0xFF)}); + } @OriginalMember(owner = "client!k", name = "a", descriptor = "(Lclient!be;Lclient!na;I)Lclient!na;") public static JagString method2465(@OriginalArg(0) Component arg0, @OriginalArg(1) JagString arg1) { @@ -252,165 +251,165 @@ public final class JagString implements StringInterface { local246 = decodeString(local265, local265.length, 0); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), local246, arg1.substring(local14 + 4) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), local246, arg1.substring(local14 + 4)}); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), StringUtils.method4510(method3212(4, arg0)), arg1.substring(local14 + 2) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), StringUtils.method4510(method3212(4, arg0)), arg1.substring(local14 + 2)}); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), StringUtils.method4510(method3212(3, arg0)), arg1.substring(local14 + 2) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), StringUtils.method4510(method3212(3, arg0)), arg1.substring(local14 + 2)}); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), StringUtils.method4510(method3212(2, arg0)), arg1.substring(local14 + 2) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), StringUtils.method4510(method3212(2, arg0)), arg1.substring(local14 + 2)}); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), StringUtils.method4510(method3212(1, arg0)), arg1.substring(local14 + 2) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), StringUtils.method4510(method3212(1, arg0)), arg1.substring(local14 + 2)}); } } - arg1 = concatenate(new JagString[] { arg1.substring(local14, 0), StringUtils.method4510(method3212(0, arg0)), arg1.substring(local14 + 2) }); + arg1 = concatenate(new JagString[]{arg1.substring(local14, 0), StringUtils.method4510(method3212(0, arg0)), arg1.substring(local14 + 2)}); } } - @OriginalMember(owner = "client!we", name = "a", descriptor = "(BILclient!be;)I") - public static int method3212(@OriginalArg(1) int arg0, @OriginalArg(2) Component arg1) { - if (arg1.anIntArrayArray4 == null || arg0 >= arg1.anIntArrayArray4.length) { - return -2; - } - try { - @Pc(33) int[] local33 = arg1.anIntArrayArray4[arg0]; - @Pc(35) byte local35 = 0; - @Pc(37) int local37 = 0; - @Pc(39) int local39 = 0; - while (true) { - @Pc(41) int local41 = 0; - @Pc(46) int local46 = local33[local39++]; - @Pc(48) byte local48 = 0; - if (local46 == 0) { - return local37; - } - if (local46 == 15) { - local48 = 1; - } - if (local46 == 16) { - local48 = 2; - } - if (local46 == 1) { - local41 = PlayerSkillXpTable.boostedLevels[local33[local39++]]; - } - if (local46 == 17) { - local48 = 3; - } - if (local46 == 2) { - local41 = PlayerSkillXpTable.baseLevels[local33[local39++]]; - } - if (local46 == 3) { - local41 = PlayerSkillXpTable.experience[local33[local39++]]; - } - @Pc(124) int local124; - @Pc(135) Component local135; - @Pc(140) int local140; - @Pc(152) int local152; - if (local46 == 4) { - local124 = local33[local39++] << 16; - @Pc(131) int local131 = local124 + local33[local39++]; - local135 = InterfaceList.getComponent(local131); - local140 = local33[local39++]; - if (local140 != -1 && (!ObjTypeList.get(local140).members || LoginManager.mapMembers)) { - for (local152 = 0; local152 < local135.objTypes.length; local152++) { - if (local140 + 1 == local135.objTypes[local152]) { - local41 += local135.objCounts[local152]; - } - } - } - } - if (local46 == 5) { - local41 = VarpDomain.activeVarps[local33[local39++]]; - } - if (local46 == 6) { - local41 = PlayerSkillXpTable.xpLevelLookup[PlayerSkillXpTable.baseLevels[local33[local39++]] - 1]; - } - if (local46 == 7) { - local41 = VarpDomain.activeVarps[local33[local39++]] * 100 / 46875; - } - if (local46 == 8) { - local41 = PlayerList.self.combatLevel; - } - if (local46 == 9) { - for (local124 = 0; local124 < 25; local124++) { - if (Static182.aBooleanArray97[local124]) { - local41 += PlayerSkillXpTable.baseLevels[local124]; - } - } - } - if (local46 == 10) { - local124 = local33[local39++] << 16; - local124 += local33[local39++]; - local135 = InterfaceList.getComponent(local124); - local140 = local33[local39++]; - if (local140 != -1 && (!ObjTypeList.get(local140).members || LoginManager.mapMembers)) { - for (local152 = 0; local152 < local135.objTypes.length; local152++) { - if (local135.objTypes[local152] == local140 + 1) { - local41 = 999999999; - break; - } - } - } - } - if (local46 == 11) { - local41 = Player.runEnergy; - } - if (local46 == 12) { - local41 = Player.weight; - } - if (local46 == 13) { - local124 = VarpDomain.activeVarps[local33[local39++]]; - @Pc(353) int local353 = local33[local39++]; - local41 = (0x1 << local353 & local124) == 0 ? 0 : 1; - } - if (local46 == 14) { - local124 = local33[local39++]; - local41 = VarpDomain.getVarbit(local124); - } - if (local46 == 18) { - local41 = (PlayerList.self.xFine >> 7) + Camera.originX; - } - if (local46 == 19) { - local41 = (PlayerList.self.zFine >> 7) + Camera.originZ; - } - if (local46 == 20) { - local41 = local33[local39++]; - } - if (local48 == 0) { - if (local35 == 0) { - local37 += local41; - } - if (local35 == 1) { - local37 -= local41; - } - if (local35 == 2 && local41 != 0) { - local37 /= local41; - } - if (local35 == 3) { - local37 *= local41; - } - local35 = 0; - } else { - local35 = local48; - } - } - } catch (@Pc(464) Exception local464) { - return -1; - } - } + @OriginalMember(owner = "client!we", name = "a", descriptor = "(BILclient!be;)I") + public static int method3212(@OriginalArg(1) int arg0, @OriginalArg(2) Component arg1) { + if (arg1.anIntArrayArray4 == null || arg0 >= arg1.anIntArrayArray4.length) { + return -2; + } + try { + @Pc(33) int[] local33 = arg1.anIntArrayArray4[arg0]; + @Pc(35) byte local35 = 0; + @Pc(37) int local37 = 0; + @Pc(39) int local39 = 0; + while (true) { + @Pc(41) int local41 = 0; + @Pc(46) int local46 = local33[local39++]; + @Pc(48) byte local48 = 0; + if (local46 == 0) { + return local37; + } + if (local46 == 15) { + local48 = 1; + } + if (local46 == 16) { + local48 = 2; + } + if (local46 == 1) { + local41 = PlayerSkillXpTable.boostedLevels[local33[local39++]]; + } + if (local46 == 17) { + local48 = 3; + } + if (local46 == 2) { + local41 = PlayerSkillXpTable.baseLevels[local33[local39++]]; + } + if (local46 == 3) { + local41 = PlayerSkillXpTable.experience[local33[local39++]]; + } + @Pc(124) int local124; + @Pc(135) Component local135; + @Pc(140) int local140; + @Pc(152) int local152; + if (local46 == 4) { + local124 = local33[local39++] << 16; + @Pc(131) int local131 = local124 + local33[local39++]; + local135 = InterfaceList.getComponent(local131); + local140 = local33[local39++]; + if (local140 != -1 && (!ObjTypeList.get(local140).members || LoginManager.mapMembers)) { + for (local152 = 0; local152 < local135.objTypes.length; local152++) { + if (local140 + 1 == local135.objTypes[local152]) { + local41 += local135.objCounts[local152]; + } + } + } + } + if (local46 == 5) { + local41 = VarpDomain.activeVarps[local33[local39++]]; + } + if (local46 == 6) { + local41 = PlayerSkillXpTable.xpLevelLookup[PlayerSkillXpTable.baseLevels[local33[local39++]] - 1]; + } + if (local46 == 7) { + local41 = VarpDomain.activeVarps[local33[local39++]] * 100 / 46875; + } + if (local46 == 8) { + local41 = PlayerList.self.combatLevel; + } + if (local46 == 9) { + for (local124 = 0; local124 < 25; local124++) { + if (Static182.aBooleanArray97[local124]) { + local41 += PlayerSkillXpTable.baseLevels[local124]; + } + } + } + if (local46 == 10) { + local124 = local33[local39++] << 16; + local124 += local33[local39++]; + local135 = InterfaceList.getComponent(local124); + local140 = local33[local39++]; + if (local140 != -1 && (!ObjTypeList.get(local140).members || LoginManager.mapMembers)) { + for (local152 = 0; local152 < local135.objTypes.length; local152++) { + if (local135.objTypes[local152] == local140 + 1) { + local41 = 999999999; + break; + } + } + } + } + if (local46 == 11) { + local41 = Player.runEnergy; + } + if (local46 == 12) { + local41 = Player.weight; + } + if (local46 == 13) { + local124 = VarpDomain.activeVarps[local33[local39++]]; + @Pc(353) int local353 = local33[local39++]; + local41 = (0x1 << local353 & local124) == 0 ? 0 : 1; + } + if (local46 == 14) { + local124 = local33[local39++]; + local41 = VarpDomain.getVarbit(local124); + } + if (local46 == 18) { + local41 = (PlayerList.self.xFine >> 7) + Camera.originX; + } + if (local46 == 19) { + local41 = (PlayerList.self.zFine >> 7) + Camera.originZ; + } + if (local46 == 20) { + local41 = local33[local39++]; + } + if (local48 == 0) { + if (local35 == 0) { + local37 += local41; + } + if (local35 == 1) { + local37 -= local41; + } + if (local35 == 2 && local41 != 0) { + local37 /= local41; + } + if (local35 == 3) { + local37 *= local41; + } + local35 = 0; + } else { + local35 = local48; + } + } + } catch (@Pc(464) Exception local464) { + return -1; + } + } - @OriginalMember(owner = "client!nb", name = "a", descriptor = "(II)Lclient!na;") - public static JagString getNbsp() { - @Pc(21) JagString str = new JagString(); - str.length = 1; - str.chars = new byte[1]; - str.chars[0] = -96; // 0xA0 - NBSP - return str; - } + @OriginalMember(owner = "client!nb", name = "a", descriptor = "(II)Lclient!na;") + public static JagString getNbsp() { + @Pc(21) JagString str = new JagString(); + str.length = 1; + str.chars = new byte[1]; + str.chars[0] = -96; // 0xA0 - NBSP + return str; + } @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Ljava/lang/String;I)Lclient!na;") public static JagString method3952(@OriginalArg(0) String arg0) { diff --git a/client/src/main/java/rt4/JavaAudioChannel.java b/client/src/main/java/rt4/JavaAudioChannel.java index d4018b0..66173ca 100644 --- a/client/src/main/java/rt4/JavaAudioChannel.java +++ b/client/src/main/java/rt4/JavaAudioChannel.java @@ -1,15 +1,16 @@ package rt4; -import java.awt.Component; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer.Info; import javax.sound.sampled.SourceDataLine; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; +import java.awt.Component; @OriginalClass("client!qa") public final class JavaAudioChannel extends AudioChannel { diff --git a/client/src/main/java/rt4/JavaMouseWheel.java b/client/src/main/java/rt4/JavaMouseWheel.java index 54483cc..6c09d0d 100644 --- a/client/src/main/java/rt4/JavaMouseWheel.java +++ b/client/src/main/java/rt4/JavaMouseWheel.java @@ -1,13 +1,14 @@ package rt4; -import java.awt.Component; -import java.awt.event.MouseWheelEvent; -import java.awt.event.MouseWheelListener; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; +import java.awt.event.MouseWheelEvent; +import java.awt.event.MouseWheelListener; + import static rt4.MathUtils.clamp; @OriginalClass("client!o") @@ -38,7 +39,7 @@ public final class JavaMouseWheel extends MouseWheel implements MouseWheelListen int diff = this.anInt4233 - previous; if (((GlobalJsonConfig.instance != null && GlobalJsonConfig.instance.mouseWheelZoom) || (GlobalJsonConfig.instance == null && GlobalConfig.MOUSEWHEEL_ZOOM)) && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50: -50)); + Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50 : -50)); } } diff --git a/client/src/main/java/rt4/Js5.java b/client/src/main/java/rt4/Js5.java index f593dab..ce4ddec 100644 --- a/client/src/main/java/rt4/Js5.java +++ b/client/src/main/java/rt4/Js5.java @@ -296,7 +296,7 @@ public final class Js5 { uncompressed = Js5Compression.uncompress(compressed); } catch (@Pc(142) RuntimeException ex) { System.out.println("T3 - " + (key != null) + "," + group + "," + compressed.length + "," + Buffer.crc32(compressed, compressed.length) + "," + Buffer.crc32(compressed, compressed.length - 2) + "," + this.index.groupChecksums[group] + "," + this.index.checksum); - uncompressed = new byte[] { 0 }; + uncompressed = new byte[]{0}; } if (this.discardPacked) { this.packed[group] = null; diff --git a/client/src/main/java/rt4/Js5CachedResourceProvider.java b/client/src/main/java/rt4/Js5CachedResourceProvider.java index 22721f3..c4852e5 100644 --- a/client/src/main/java/rt4/Js5CachedResourceProvider.java +++ b/client/src/main/java/rt4/Js5CachedResourceProvider.java @@ -10,10 +10,10 @@ import java.util.zip.CRC32; @OriginalClass("client!bg") public final class Js5CachedResourceProvider extends Js5ResourceProvider { - @OriginalMember(owner = "client!fn", name = "X", descriptor = "Ljava/util/zip/CRC32;") - public static final CRC32 crc32 = new CRC32(); + @OriginalMember(owner = "client!fn", name = "X", descriptor = "Ljava/util/zip/CRC32;") + public static final CRC32 crc32 = new CRC32(); - @OriginalMember(owner = "client!bg", name = "m", descriptor = "Lclient!ii;") + @OriginalMember(owner = "client!bg", name = "m", descriptor = "Lclient!ii;") private Js5Index index; @OriginalMember(owner = "client!bg", name = "w", descriptor = "[B") @@ -305,7 +305,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { @OriginalMember(owner = "client!bg", name = "b", descriptor = "(II)I") @Override public final int getPercentageComplete(@OriginalArg(0) int arg0) { - @Pc(15) Js5Request request = (Js5Request) this.requests.get((long) arg0); + @Pc(15) Js5Request request = (Js5Request) this.requests.get(arg0); return request == null ? 0 : request.getPercentageComplete(); } @@ -316,7 +316,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { @OriginalMember(owner = "client!bg", name = "a", descriptor = "(III)Lclient!il;") private Js5Request fetchGroupInner(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(13) Js5Request local13 = (Js5Request) this.requests.get((long) arg1); + @Pc(13) Js5Request local13 = (Js5Request) this.requests.get(arg1); if (local13 != null && arg0 == 0 && !local13.urgent && local13.incomplete) { local13.unlink(); local13 = null; @@ -350,7 +350,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { } else { throw new RuntimeException(); } - this.requests.put(local13, (long) arg1); + this.requests.put(local13, arg1); } if (local13.incomplete) { return null; @@ -376,7 +376,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { local13.unlink(); if (local13.urgent && !this.netQueue.isUrgentRequestQueueFull()) { local252 = this.netQueue.read(this.archive, (byte) 2, arg1, true); - this.requests.put(local252, (long) arg1); + this.requests.put(local252, arg1); } return null; } @@ -423,7 +423,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { local13.unlink(); if (local13.urgent && !this.netQueue.isUrgentRequestQueueFull()) { local252 = this.netQueue.read(this.archive, (byte) 2, arg1, true); - this.requests.put(local252, (long) arg1); + this.requests.put(local252, arg1); } return null; } diff --git a/client/src/main/java/rt4/Js5GlTextureProvider.java b/client/src/main/java/rt4/Js5GlTextureProvider.java index 8e29aa8..d823c82 100644 --- a/client/src/main/java/rt4/Js5GlTextureProvider.java +++ b/client/src/main/java/rt4/Js5GlTextureProvider.java @@ -166,7 +166,7 @@ public final class Js5GlTextureProvider implements TextureProvider { @OriginalMember(owner = "client!nk", name = "i", descriptor = "(II)Lclient!uh;") private GlTexture method3242(@OriginalArg(0) int arg0) { - @Pc(14) GlTexture local14 = (GlTexture) this.glTextures.get((long) arg0); + @Pc(14) GlTexture local14 = (GlTexture) this.glTextures.get(arg0); if (local14 != null) { return local14; } @@ -176,7 +176,7 @@ public final class Js5GlTextureProvider implements TextureProvider { } else { @Pc(41) Buffer local41 = new Buffer(local30); local14 = new GlTexture(local41); - this.glTextures.put(local14, (long) arg0); + this.glTextures.put(local14, arg0); return local14; } } @@ -207,10 +207,10 @@ public final class Js5GlTextureProvider implements TextureProvider { @OriginalMember(owner = "client!nk", name = "j", descriptor = "(II)Lclient!sd;") private GlSolidColorTexture method3244(@OriginalArg(1) int arg0) { - @Pc(19) GlSolidColorTexture local19 = (GlSolidColorTexture) this.solidColorSprites.get((long) arg0); + @Pc(19) GlSolidColorTexture local19 = (GlSolidColorTexture) this.solidColorSprites.get(arg0); if (local19 == null) { local19 = new GlSolidColorTexture(this.aShortArray59[arg0] & 0xFFFF); - this.solidColorSprites.put(local19, (long) arg0); + this.solidColorSprites.put(local19, arg0); return local19; } else { return local19; @@ -221,7 +221,7 @@ public final class Js5GlTextureProvider implements TextureProvider { @Override public final boolean method3230(@OriginalArg(1) int arg0) { @Pc(15) GlTexture local15 = this.method3242(arg0); - return local15 == null ? false : local15.method4299(this, this.aClass153_72); + return local15 != null && local15.method4299(this, this.aClass153_72); } @OriginalMember(owner = "client!nk", name = "b", descriptor = "(ZI)V") diff --git a/client/src/main/java/rt4/Js5NetQueue.java b/client/src/main/java/rt4/Js5NetQueue.java index a766a09..02d97b0 100644 --- a/client/src/main/java/rt4/Js5NetQueue.java +++ b/client/src/main/java/rt4/Js5NetQueue.java @@ -1,11 +1,12 @@ package rt4; -import java.io.IOException; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.io.IOException; + @OriginalClass("client!jb") public final class Js5NetQueue { @@ -155,7 +156,7 @@ public final class Js5NetQueue { @Pc(476) int local476 = this.inBuffer.g4(); @Pc(480) int local480 = local471 & 0x7F; @Pc(491) boolean local491 = (local471 & 0x80) != 0; - @Pc(501) long local501 = (long) ((local235 << 16) + local283); + @Pc(501) long local501 = (local235 << 16) + local283; @Pc(509) Js5NetRequest local509; if (local491) { for (local509 = (Js5NetRequest) this.inFlightPrefetchRequests.head(); local509 != null && local509.secondaryKey != local501; local509 = (Js5NetRequest) this.inFlightPrefetchRequests.next()) { diff --git a/client/src/main/java/rt4/Keyboard.java b/client/src/main/java/rt4/Keyboard.java index 5c4e5c4..ed4a0d3 100644 --- a/client/src/main/java/rt4/Keyboard.java +++ b/client/src/main/java/rt4/Keyboard.java @@ -1,5 +1,10 @@ package rt4; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.awt.Component; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; @@ -8,11 +13,6 @@ import java.awt.event.KeyListener; import java.lang.reflect.Method; import java.util.Arrays; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - @OriginalClass("client!uf") public final class Keyboard implements KeyListener, FocusListener { @@ -281,22 +281,22 @@ public final class Keyboard implements KeyListener, FocusListener { component.addFocusListener(instance); } - @OriginalMember(owner = "client!ag", name = "h", descriptor = "(I)V") - public static void quit() { - if (instance != null) { - @Pc(4) Keyboard local4 = instance; - synchronized (instance) { - instance = null; - } - } - } + @OriginalMember(owner = "client!ag", name = "h", descriptor = "(I)V") + public static void quit() { + if (instance != null) { + @Pc(4) Keyboard local4 = instance; + synchronized (instance) { + instance = null; + } + } + } - @OriginalMember(owner = "client!pk", name = "f", descriptor = "(B)I") + @OriginalMember(owner = "client!pk", name = "f", descriptor = "(B)I") public static int getIdleLoops() { return idleLoops; } - @OriginalMember(owner = "client!uf", name = "keyPressed", descriptor = "(Ljava/awt/event/KeyEvent;)V") + @OriginalMember(owner = "client!uf", name = "keyPressed", descriptor = "(Ljava/awt/event/KeyEvent;)V") @Override public final synchronized void keyPressed(@OriginalArg(0) KeyEvent event) { if (instance == null) { diff --git a/client/src/main/java/rt4/LangUtils.java b/client/src/main/java/rt4/LangUtils.java index bd87487..75c0110 100644 --- a/client/src/main/java/rt4/LangUtils.java +++ b/client/src/main/java/rt4/LangUtils.java @@ -15,7 +15,7 @@ public final class LangUtils { @OriginalMember(owner = "client!mc", name = "pb", descriptor = "Lclient!na;") private static final JagString LANG_FR = JagString.parse("fr"); @OriginalMember(owner = "client!mc", name = "ob", descriptor = "[Lclient!na;") - public static final JagString[] LANGUAGES = new JagString[] {LANG_EN, LANG_DE, LANG_FR, LANG_PT}; + public static final JagString[] LANGUAGES = new JagString[]{LANG_EN, LANG_DE, LANG_FR, LANG_PT}; @OriginalMember(owner = "client!hm", name = "a", descriptor = "(Lclient!na;B)I") public static int method2053(@OriginalArg(0) JagString arg0) { diff --git a/client/src/main/java/rt4/Light.java b/client/src/main/java/rt4/Light.java index 2269a53..3b2cbae 100644 --- a/client/src/main/java/rt4/Light.java +++ b/client/src/main/java/rt4/Light.java @@ -8,9 +8,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!gi") public final class Light { - @OriginalMember(owner = "client!f", name = "P", descriptor = "[I") - public static int[] NOISE; - @OriginalMember(owner = "client!gi", name = "a", descriptor = "Z") + @OriginalMember(owner = "client!f", name = "P", descriptor = "[I") + public static int[] NOISE; + @OriginalMember(owner = "client!gi", name = "a", descriptor = "Z") public final boolean aBoolean124; @OriginalMember(owner = "client!gi", name = "d", descriptor = "I") diff --git a/client/src/main/java/rt4/LightTypeList.java b/client/src/main/java/rt4/LightTypeList.java index 2acf0b1..9cbd6ab 100644 --- a/client/src/main/java/rt4/LightTypeList.java +++ b/client/src/main/java/rt4/LightTypeList.java @@ -5,43 +5,43 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class LightTypeList { - @OriginalMember(owner = "client!rm", name = "d", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!gl", name = "a", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!rm", name = "d", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!gl", name = "a", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!id", name = "a", descriptor = "(Lclient!ve;B)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!id", name = "a", descriptor = "(Lclient!ve;B)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!la", name = "a", descriptor = "(II)Lclient!ic;") - public static LightType get(@OriginalArg(1) int arg0) { - @Pc(10) LightType local10 = (LightType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(26) byte[] local26 = archive.fetchFile(31, arg0); - local10 = new LightType(); - if (local26 != null) { - local10.decode(new Buffer(local26), arg0); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!la", name = "a", descriptor = "(II)Lclient!ic;") + public static LightType get(@OriginalArg(1) int arg0) { + @Pc(10) LightType local10 = (LightType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(26) byte[] local26 = archive.fetchFile(31, arg0); + local10 = new LightType(); + if (local26 != null) { + local10.decode(new Buffer(local26), arg0); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!c", name = "c", descriptor = "(II)V") + @OriginalMember(owner = "client!c", name = "c", descriptor = "(II)V") public static void clean() { types.clean(5); } - @OriginalMember(owner = "client!gd", name = "b", descriptor = "(I)V") - public static void method1695() { - types.clear(); - } + @OriginalMember(owner = "client!gd", name = "b", descriptor = "(I)V") + public static void method1695() { + types.clear(); + } - @OriginalMember(owner = "client!hd", name = "a", descriptor = "(I)V") - public static void method1882() { - types.removeSoft(); - } + @OriginalMember(owner = "client!hd", name = "a", descriptor = "(I)V") + public static void method1882() { + types.removeSoft(); + } } diff --git a/client/src/main/java/rt4/Light_Class45.java b/client/src/main/java/rt4/Light_Class45.java index c0a8612..28885b1 100644 --- a/client/src/main/java/rt4/Light_Class45.java +++ b/client/src/main/java/rt4/Light_Class45.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!fj") public final class Light_Class45 { @@ -72,7 +73,7 @@ public final class Light_Class45 { @Pc(37) float local37 = (float) (arg0.x - arg1); @Pc(43) float local43 = (float) (arg0.y - arg2); @Pc(49) float local49 = (float) (arg0.z - arg3); - @Pc(64) float local64 = (float) Math.sqrt((double) (local37 * local37 + local43 * local43 + local49 * local49)); + @Pc(64) float local64 = (float) Math.sqrt(local37 * local37 + local43 * local43 + local49 * local49); @Pc(68) float local68 = 1.0F / local64; @Pc(72) float local72 = local37 * local68; @Pc(76) float local76 = local43 * local68; diff --git a/client/src/main/java/rt4/LightingManager.java b/client/src/main/java/rt4/LightingManager.java index 01a200a..27eb08e 100644 --- a/client/src/main/java/rt4/LightingManager.java +++ b/client/src/main/java/rt4/LightingManager.java @@ -6,454 +6,460 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class LightingManager { - @OriginalMember(owner = "client!jf", name = "b", descriptor = "[F") - private static final float[] aFloatArray17 = new float[] { 0.0F, 0.0F, 0.0F, 1.0F }; - @OriginalMember(owner = "client!jf", name = "l", descriptor = "I") - public static int lightCount = 0; - @OriginalMember(owner = "client!jf", name = "a", descriptor = "[Lclient!gi;") - public static Light[] lights; - @OriginalMember(owner = "client!rh", name = "d", descriptor = "I") + @OriginalMember(owner = "client!jf", name = "b", descriptor = "[F") + private static final float[] aFloatArray17 = new float[]{0.0F, 0.0F, 0.0F, 1.0F}; + @OriginalMember(owner = "client!jf", name = "l", descriptor = "I") + public static int lightCount = 0; + @OriginalMember(owner = "client!jf", name = "a", descriptor = "[Lclient!gi;") + public static Light[] lights; + @OriginalMember(owner = "client!rh", name = "d", descriptor = "I") public static int anInt4866; - @OriginalMember(owner = "client!aa", name = "m", descriptor = "I") - public static int anInt15; - @OriginalMember(owner = "client!gf", name = "M", descriptor = "I") - public static int anInt4698; - @OriginalMember(owner = "client!ch", name = "w", descriptor = "I") - public static int anInt987; - @OriginalMember(owner = "client!id", name = "b", descriptor = "I") - public static int anInt2875 = -1; - @OriginalMember(owner = "client!jf", name = "c", descriptor = "[I") - private static int[] anIntArray283; - @OriginalMember(owner = "client!jf", name = "d", descriptor = "I") - private static int anInt3029; - @OriginalMember(owner = "client!jf", name = "e", descriptor = "I") - private static int anInt3030; - @OriginalMember(owner = "client!jf", name = "f", descriptor = "[Z") - private static boolean[] enabledLights; - @OriginalMember(owner = "client!jf", name = "g", descriptor = "[[[I") - private static int[][][] anIntArrayArrayArray11; - @OriginalMember(owner = "client!jf", name = "h", descriptor = "[I") - private static int[] anIntArray284; - @OriginalMember(owner = "client!jf", name = "i", descriptor = "I") - private static int anInt3031; - @OriginalMember(owner = "client!jf", name = "j", descriptor = "I") - private static int anInt3032; - @OriginalMember(owner = "client!jf", name = "k", descriptor = "I") - private static int anInt3033; - @OriginalMember(owner = "client!jf", name = "m", descriptor = "[Z") - private static boolean[] aBooleanArray66; - @OriginalMember(owner = "client!jf", name = "n", descriptor = "I") - private static int anInt3035; - @OriginalMember(owner = "client!jf", name = "o", descriptor = "I") - private static int length; - @OriginalMember(owner = "client!jf", name = "p", descriptor = "I") - private static int width; + @OriginalMember(owner = "client!aa", name = "m", descriptor = "I") + public static int anInt15; + @OriginalMember(owner = "client!gf", name = "M", descriptor = "I") + public static int anInt4698; + @OriginalMember(owner = "client!ch", name = "w", descriptor = "I") + public static int anInt987; + @OriginalMember(owner = "client!id", name = "b", descriptor = "I") + public static int anInt2875 = -1; + @OriginalMember(owner = "client!jf", name = "c", descriptor = "[I") + private static int[] anIntArray283; + @OriginalMember(owner = "client!jf", name = "d", descriptor = "I") + private static int anInt3029; + @OriginalMember(owner = "client!jf", name = "e", descriptor = "I") + private static int anInt3030; + @OriginalMember(owner = "client!jf", name = "f", descriptor = "[Z") + private static boolean[] enabledLights; + @OriginalMember(owner = "client!jf", name = "g", descriptor = "[[[I") + private static int[][][] anIntArrayArrayArray11; + @OriginalMember(owner = "client!jf", name = "h", descriptor = "[I") + private static int[] anIntArray284; + @OriginalMember(owner = "client!jf", name = "i", descriptor = "I") + private static int anInt3031; + @OriginalMember(owner = "client!jf", name = "j", descriptor = "I") + private static int anInt3032; + @OriginalMember(owner = "client!jf", name = "k", descriptor = "I") + private static int anInt3033; + @OriginalMember(owner = "client!jf", name = "m", descriptor = "[Z") + private static boolean[] aBooleanArray66; + @OriginalMember(owner = "client!jf", name = "n", descriptor = "I") + private static int anInt3035; + @OriginalMember(owner = "client!jf", name = "o", descriptor = "I") + private static int length; + @OriginalMember(owner = "client!jf", name = "p", descriptor = "I") + private static int width; - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIIII)V") - public static void method2388(@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) int arg6) { - if (!Preferences.highDetailLighting) { - return; - } - if (arg0 == 1 && arg5 > 0) { - method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6); - } else if (arg0 == 4 && arg5 < width - 1) { - method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6); - } else if (arg0 == 8 && arg6 > 0) { - method2393(arg1, arg2, arg3, arg4, arg5, arg6 - 1); - } else if (arg0 == 2 && arg6 < length - 1) { - method2393(arg1, arg2, arg3, arg4, arg5, arg6 + 1); - } else if (arg0 == 16 && arg5 > 0 && arg6 < length - 1) { - method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6 + 1); - } else if (arg0 == 32 && arg5 < width - 1 && arg6 < length - 1) { - method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6 + 1); - } else if (arg0 == 128 && arg5 > 0 && arg6 > 0) { - method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6 - 1); - } else if (arg0 == 64 && arg5 < width - 1 && arg6 > 0) { - method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6 - 1); - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIIII)V") + public static void method2388(@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) int arg6) { + if (!Preferences.highDetailLighting) { + return; + } + if (arg0 == 1 && arg5 > 0) { + method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6); + } else if (arg0 == 4 && arg5 < width - 1) { + method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6); + } else if (arg0 == 8 && arg6 > 0) { + method2393(arg1, arg2, arg3, arg4, arg5, arg6 - 1); + } else if (arg0 == 2 && arg6 < length - 1) { + method2393(arg1, arg2, arg3, arg4, arg5, arg6 + 1); + } else if (arg0 == 16 && arg5 > 0 && arg6 < length - 1) { + method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6 + 1); + } else if (arg0 == 32 && arg5 < width - 1 && arg6 < length - 1) { + method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6 + 1); + } else if (arg0 == 128 && arg5 > 0 && arg6 > 0) { + method2393(arg1, arg2, arg3, arg4, arg5 - 1, arg6 - 1); + } else if (arg0 == 64 && arg5 < width - 1 && arg6 > 0) { + method2393(arg1, arg2, arg3, arg4, arg5 + 1, arg6 - 1); + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(Lclient!gi;)V") - public static void method2389(@OriginalArg(0) Light arg0) { - if (lightCount >= 255) { - System.out.println("Number of lights added exceeds maximum!"); - } else { - lights[lightCount++] = arg0; - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(Lclient!gi;)V") + public static void method2389(@OriginalArg(0) Light arg0) { + if (lightCount >= 255) { + System.out.println("Number of lights added exceeds maximum!"); + } else { + lights[lightCount++] = arg0; + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "()V") - public static void method2390() { - for (@Pc(1) int local1 = 0; local1 < 4; local1++) { - anIntArray284[local1] = -1; - disableLight(local1); - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "()V") + public static void method2390() { + for (@Pc(1) int local1 = 0; local1 < 4; local1++) { + anIntArray284[local1] = -1; + disableLight(local1); + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIIIII)V") - public static void method2391(@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) int arg6, @OriginalArg(7) int arg7) { - if (!Preferences.highDetailLighting || anInt3031 == arg3 && anInt3033 == arg4 && anInt3029 == arg5 && anInt3035 == arg6 && anInt3030 == arg7) { - return; - } - @Pc(20) int local20; - for (local20 = 0; local20 < 4; local20++) { - aBooleanArray66[local20] = false; - } - local20 = 0; - @Pc(33) int local33 = 0; - @Pc(35) int local35; - @Pc(40) int local40; - label112: for (local35 = arg4; local35 <= arg6; local35++) { - label110: for (local40 = arg5; local40 <= arg7; local40++) { - @Pc(51) int local51 = anIntArrayArrayArray11[arg3][local35][local40]; - while (true) { - while (true) { - label96: while (true) { - if (local51 == 0) { - continue label110; - } - @Pc(59) int local59 = (local51 & 0xFF) - 1; - local51 >>>= 0x8; - @Pc(65) int local65; - for (local65 = 0; local65 < local33; local65++) { - if (local59 == anIntArray283[local65]) { - continue label96; - } - } - for (local65 = 0; local65 < 4; local65++) { - if (local59 == anIntArray284[local65]) { - if (!aBooleanArray66[local65]) { - aBooleanArray66[local65] = true; - local20++; - if (local20 == 4) { - break label112; - } - } - continue label96; - } - } - anIntArray283[local33++] = local59; - local20++; - if (local20 == 4) { - break label112; - } - } - } - } - } - } - for (local35 = 0; local35 < local33; local35++) { - for (local40 = 0; local40 < 4; local40++) { - if (!aBooleanArray66[local40]) { - anIntArray284[local40] = anIntArray283[local35]; - aBooleanArray66[local40] = true; - method2403(local40, lights[anIntArray283[local35]], arg0, arg1, arg2); - break; - } - } - } - for (local35 = 0; local35 < 4; local35++) { - if (!aBooleanArray66[local35]) { - anIntArray284[local35] = -1; - disableLight(local35); - } - } - anInt3031 = arg3; - anInt3033 = arg4; - anInt3029 = arg5; - anInt3035 = arg6; - anInt3030 = arg7; - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIIIII)V") + public static void method2391(@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) int arg6, @OriginalArg(7) int arg7) { + if (!Preferences.highDetailLighting || anInt3031 == arg3 && anInt3033 == arg4 && anInt3029 == arg5 && anInt3035 == arg6 && anInt3030 == arg7) { + return; + } + @Pc(20) int local20; + for (local20 = 0; local20 < 4; local20++) { + aBooleanArray66[local20] = false; + } + local20 = 0; + @Pc(33) int local33 = 0; + @Pc(35) int local35; + @Pc(40) int local40; + label112: + for (local35 = arg4; local35 <= arg6; local35++) { + label110: + for (local40 = arg5; local40 <= arg7; local40++) { + @Pc(51) int local51 = anIntArrayArrayArray11[arg3][local35][local40]; + while (true) { + while (true) { + label96: + while (true) { + if (local51 == 0) { + continue label110; + } + @Pc(59) int local59 = (local51 & 0xFF) - 1; + local51 >>>= 0x8; + @Pc(65) int local65; + for (local65 = 0; local65 < local33; local65++) { + if (local59 == anIntArray283[local65]) { + continue label96; + } + } + for (local65 = 0; local65 < 4; local65++) { + if (local59 == anIntArray284[local65]) { + if (!aBooleanArray66[local65]) { + aBooleanArray66[local65] = true; + local20++; + if (local20 == 4) { + break label112; + } + } + continue label96; + } + } + anIntArray283[local33++] = local59; + local20++; + if (local20 == 4) { + break label112; + } + } + } + } + } + } + for (local35 = 0; local35 < local33; local35++) { + for (local40 = 0; local40 < 4; local40++) { + if (!aBooleanArray66[local40]) { + anIntArray284[local40] = anIntArray283[local35]; + aBooleanArray66[local40] = true; + method2403(local40, lights[anIntArray283[local35]], arg0, arg1, arg2); + break; + } + } + } + for (local35 = 0; local35 < 4; local35++) { + if (!aBooleanArray66[local35]) { + anIntArray284[local35] = -1; + disableLight(local35); + } + } + anInt3031 = arg3; + anInt3033 = arg4; + anInt3029 = arg5; + anInt3035 = arg6; + anInt3030 = arg7; + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(III)V") - public static void method2392() { - anInt3032 = 4; - width = 104; - length = 104; - anIntArrayArrayArray11 = new int[anInt3032][width][length]; - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(III)V") + public static void method2392() { + anInt3032 = 4; + width = 104; + length = 104; + anIntArrayArrayArray11 = new int[anInt3032][width][length]; + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIII)V") - public static void method2393(@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 (!Preferences.highDetailLighting || anInt3031 == arg3 && anInt3033 == arg4 && anInt3029 == arg5 && anInt3035 == arg4 && anInt3030 == arg5) { - return; - } - @Pc(20) int local20; - for (local20 = 0; local20 < 4; local20++) { - aBooleanArray66[local20] = false; - } - local20 = 0; - @Pc(39) int local39 = anIntArrayArrayArray11[arg3][arg4][arg5]; - while (true) { - @Pc(47) int local47; - @Pc(53) int local53; - label72: while (local39 != 0) { - local47 = (local39 & 0xFF) - 1; - local39 >>>= 0x8; - for (local53 = 0; local53 < 4; local53++) { - if (local47 == anIntArray284[local53]) { - aBooleanArray66[local53] = true; - continue label72; - } - } - anIntArray283[local20++] = local47; - } - for (local47 = 0; local47 < local20; local47++) { - for (local53 = 0; local53 < 4; local53++) { - if (!aBooleanArray66[local53]) { - anIntArray284[local53] = anIntArray283[local47]; - aBooleanArray66[local53] = true; - method2403(local53, lights[anIntArray283[local47]], arg0, arg1, arg2); - break; - } - } - } - for (local47 = 0; local47 < 4; local47++) { - if (!aBooleanArray66[local47]) { - anIntArray284[local47] = -1; - disableLight(local47); - } - } - anInt3031 = arg3; - anInt3033 = arg4; - anInt3029 = arg5; - anInt3035 = arg4; - anInt3030 = arg5; - return; - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIIII)V") + public static void method2393(@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 (!Preferences.highDetailLighting || anInt3031 == arg3 && anInt3033 == arg4 && anInt3029 == arg5 && anInt3035 == arg4 && anInt3030 == arg5) { + return; + } + @Pc(20) int local20; + for (local20 = 0; local20 < 4; local20++) { + aBooleanArray66[local20] = false; + } + local20 = 0; + @Pc(39) int local39 = anIntArrayArrayArray11[arg3][arg4][arg5]; + while (true) { + @Pc(47) int local47; + @Pc(53) int local53; + label72: + while (local39 != 0) { + local47 = (local39 & 0xFF) - 1; + local39 >>>= 0x8; + for (local53 = 0; local53 < 4; local53++) { + if (local47 == anIntArray284[local53]) { + aBooleanArray66[local53] = true; + continue label72; + } + } + anIntArray283[local20++] = local47; + } + for (local47 = 0; local47 < local20; local47++) { + for (local53 = 0; local53 < 4; local53++) { + if (!aBooleanArray66[local53]) { + anIntArray284[local53] = anIntArray283[local47]; + aBooleanArray66[local53] = true; + method2403(local53, lights[anIntArray283[local47]], arg0, arg1, arg2); + break; + } + } + } + for (local47 = 0; local47 < 4; local47++) { + if (!aBooleanArray66[local47]) { + anIntArray284[local47] = -1; + disableLight(local47); + } + } + anInt3031 = arg3; + anInt3033 = arg4; + anInt3029 = arg5; + anInt3035 = arg4; + anInt3030 = arg5; + return; + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IZ)V") - public static void method2394(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1) { - for (@Pc(1) int local1 = 0; local1 < lightCount; local1++) { - lights[local1].method1765(arg1, arg0); - } - anInt3031 = -1; - anInt3033 = -1; - anInt3029 = -1; - anInt3035 = -1; - anInt3030 = -1; - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IZ)V") + public static void method2394(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1) { + for (@Pc(1) int local1 = 0; local1 < lightCount; local1++) { + lights[local1].method1765(arg1, arg0); + } + anInt3031 = -1; + anInt3033 = -1; + anInt3029 = -1; + anInt3035 = -1; + anInt3030 = -1; + } - @OriginalMember(owner = "client!jf", name = "b", descriptor = "()V") - public static void method2395() { - for (@Pc(1) int local1 = 0; local1 < lightCount; local1++) { - @Pc(8) Light local8 = lights[local1]; - @Pc(11) int local11 = local8.level; - if (local8.aBoolean124) { - local11 = 0; - } - @Pc(19) int local19 = local8.level; - if (local8.aBoolean126) { - local19 = 3; - } - for (@Pc(26) int local26 = local11; local26 <= local19; local26++) { - @Pc(31) int local31 = 0; - @Pc(39) int local39 = (local8.z >> 7) - local8.radius; - if (local39 < 0) { - local31 = -local39; - local39 = 0; - } - @Pc(55) int local55 = (local8.z >> 7) + local8.radius; - if (local55 > length - 1) { - local55 = length - 1; - } - for (@Pc(66) int local66 = local39; local66 <= local55; local66++) { - @Pc(75) short local75 = local8.aShortArray30[local31++]; - @Pc(87) int local87 = (local8.x >> 7) + (local75 >> 8) - local8.radius; - @Pc(95) int local95 = local87 + (local75 & 0xFF) - 1; - if (local87 < 0) { - local87 = 0; - } - if (local95 > width - 1) { - local95 = width - 1; - } - for (@Pc(110) int local110 = local87; local110 <= local95; local110++) { - @Pc(121) int local121 = anIntArrayArrayArray11[local26][local110][local66]; - if ((local121 & 0xFF) == 0) { - anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1; - } else if ((local121 & 0xFF00) == 0) { - anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 8; - } else if ((local121 & 0xFF0000) == 0) { - anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 16; - } else if ((local121 & 0xFF000000) == 0) { - anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 24; - } - } - } - } - } - } + @OriginalMember(owner = "client!jf", name = "b", descriptor = "()V") + public static void method2395() { + for (@Pc(1) int local1 = 0; local1 < lightCount; local1++) { + @Pc(8) Light local8 = lights[local1]; + @Pc(11) int local11 = local8.level; + if (local8.aBoolean124) { + local11 = 0; + } + @Pc(19) int local19 = local8.level; + if (local8.aBoolean126) { + local19 = 3; + } + for (@Pc(26) int local26 = local11; local26 <= local19; local26++) { + @Pc(31) int local31 = 0; + @Pc(39) int local39 = (local8.z >> 7) - local8.radius; + if (local39 < 0) { + local31 = -local39; + local39 = 0; + } + @Pc(55) int local55 = (local8.z >> 7) + local8.radius; + if (local55 > length - 1) { + local55 = length - 1; + } + for (@Pc(66) int local66 = local39; local66 <= local55; local66++) { + @Pc(75) short local75 = local8.aShortArray30[local31++]; + @Pc(87) int local87 = (local8.x >> 7) + (local75 >> 8) - local8.radius; + @Pc(95) int local95 = local87 + (local75 & 0xFF) - 1; + if (local87 < 0) { + local87 = 0; + } + if (local95 > width - 1) { + local95 = width - 1; + } + for (@Pc(110) int local110 = local87; local110 <= local95; local110++) { + @Pc(121) int local121 = anIntArrayArrayArray11[local26][local110][local66]; + if ((local121 & 0xFF) == 0) { + anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1; + } else if ((local121 & 0xFF00) == 0) { + anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 8; + } else if ((local121 & 0xFF0000) == 0) { + anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 16; + } else if ((local121 & 0xFF000000) == 0) { + anIntArrayArrayArray11[local26][local110][local66] = local121 | local1 + 1 << 24; + } + } + } + } + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(I)V") - private static void disableLight(@OriginalArg(0) int i) { - if (enabledLights[i]) { - enabledLights[i] = false; - @Pc(14) int light = i + 16384 + 4; - @Pc(16) GL2 gl = GlRenderer.gl; - gl.glDisable(light); - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(I)V") + private static void disableLight(@OriginalArg(0) int i) { + if (enabledLights[i]) { + enabledLights[i] = false; + @Pc(14) int light = i + 16384 + 4; + @Pc(16) GL2 gl = GlRenderer.gl; + gl.glDisable(light); + } + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIII)V") - public static void method2397(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - if (!Preferences.highDetailLighting) { - return; - } - label43: for (@Pc(4) int local4 = 0; local4 < 4; local4++) { - if (anIntArray284[local4] != -1) { - @Pc(20) int local20 = anIntArrayArrayArray11[arg0][arg1][arg2]; - @Pc(28) int local28; - while (local20 != 0) { - local28 = (local20 & 0xFF) - 1; - local20 >>>= 0x8; - if (local28 == anIntArray284[local4]) { - continue label43; - } - } - local20 = anIntArrayArrayArray11[arg0][arg3][arg4]; - while (local20 != 0) { - local28 = (local20 & 0xFF) - 1; - local20 >>>= 0x8; - if (local28 == anIntArray284[local4]) { - continue label43; - } - } - } - anIntArray284[local4] = -1; - disableLight(local4); - } - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(IIIII)V") + public static void method2397(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { + if (!Preferences.highDetailLighting) { + return; + } + label43: + for (@Pc(4) int local4 = 0; local4 < 4; local4++) { + if (anIntArray284[local4] != -1) { + @Pc(20) int local20 = anIntArrayArrayArray11[arg0][arg1][arg2]; + @Pc(28) int local28; + while (local20 != 0) { + local28 = (local20 & 0xFF) - 1; + local20 >>>= 0x8; + if (local28 == anIntArray284[local4]) { + continue label43; + } + } + local20 = anIntArrayArrayArray11[arg0][arg3][arg4]; + while (local20 != 0) { + local28 = (local20 & 0xFF) - 1; + local20 >>>= 0x8; + if (local28 == anIntArray284[local4]) { + continue label43; + } + } + } + anIntArray284[local4] = -1; + disableLight(local4); + } + } - @OriginalMember(owner = "client!jf", name = "c", descriptor = "()V") - public static void method2398() { - lights = null; - anIntArray284 = null; - enabledLights = null; - anIntArray283 = null; - aBooleanArray66 = null; - anIntArrayArrayArray11 = null; - } + @OriginalMember(owner = "client!jf", name = "c", descriptor = "()V") + public static void method2398() { + lights = null; + anIntArray284 = null; + enabledLights = null; + anIntArray283 = null; + aBooleanArray66 = null; + anIntArrayArrayArray11 = null; + } - @OriginalMember(owner = "client!jf", name = "e", descriptor = "()V") - public static void method2400() { - @Pc(1) GL2 local1 = GlRenderer.gl; - @Pc(3) int local3; - for (local3 = 0; local3 < 4; local3++) { - @Pc(10) int local10 = local3 + 16388; - local1.glLightfv(local10, GL2.GL_AMBIENT, new float[] { 0.0F, 0.0F, 0.0F, 1.0F }, 0); - local1.glLightf(local10, GL2.GL_LINEAR_ATTENUATION, 0.0F); - local1.glLightf(local10, GL2.GL_CONSTANT_ATTENUATION, 0.0F); - } - for (local3 = 0; local3 < 4; local3++) { - anIntArray284[local3] = -1; - disableLight(local3); - } - } + @OriginalMember(owner = "client!jf", name = "e", descriptor = "()V") + public static void method2400() { + @Pc(1) GL2 local1 = GlRenderer.gl; + @Pc(3) int local3; + for (local3 = 0; local3 < 4; local3++) { + @Pc(10) int local10 = local3 + 16388; + local1.glLightfv(local10, GL2.GL_AMBIENT, new float[]{0.0F, 0.0F, 0.0F, 1.0F}, 0); + local1.glLightf(local10, GL2.GL_LINEAR_ATTENUATION, 0.0F); + local1.glLightf(local10, GL2.GL_CONSTANT_ATTENUATION, 0.0F); + } + for (local3 = 0; local3 < 4; local3++) { + anIntArray284[local3] = -1; + disableLight(local3); + } + } - @OriginalMember(owner = "client!jf", name = "f", descriptor = "()V") - public static void method2401() { - lights = new Light[255]; - anIntArray284 = new int[4]; - enabledLights = new boolean[4]; - anIntArray283 = new int[4]; - aBooleanArray66 = new boolean[4]; - anIntArrayArrayArray11 = new int[anInt3032][width][length]; - } + @OriginalMember(owner = "client!jf", name = "f", descriptor = "()V") + public static void method2401() { + lights = new Light[255]; + anIntArray284 = new int[4]; + enabledLights = new boolean[4]; + anIntArray283 = new int[4]; + aBooleanArray66 = new boolean[4]; + anIntArrayArrayArray11 = new int[anInt3032][width][length]; + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(II[[[Lclient!bj;)V") - public static void method2402(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) Tile[][][] arg2) { - if (!Preferences.highDetailLighting) { - return; - } - @Pc(4) GL2 gl = GlRenderer.gl; - MaterialManager.setMaterial(0, 0); - GlRenderer.setTextureCombineRgbMode(0); - GlRenderer.resetTextureMatrix(); - GlRenderer.setTextureId(GlRenderer.anInt5328); - gl.glDepthMask(false); - GlRenderer.setLightingEnabled(false); - gl.glBlendFunc(GL2.GL_DST_COLOR, GL2.GL_ONE); - gl.glFogfv(GL2.GL_FOG_COLOR, new float[] { 0.0F, 0.0F, 0.0F, 0.0F }, 0); - gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_CONSTANT); - gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_OPERAND0_RGB, GL2.GL_SRC_ALPHA); - label71: for (@Pc(56) int local56 = 0; local56 < lightCount; local56++) { - @Pc(63) Light local63 = lights[local56]; - @Pc(66) int local66 = local63.level; - if (local63.aBoolean125) { - local66--; - } - if (local63.aClass45_1 != null) { - @Pc(76) int local76 = 0; - @Pc(84) int local84 = (local63.z >> 7) - local63.radius; - @Pc(92) int local92 = (local63.z >> 7) + local63.radius; - if (local92 >= anInt4866) { - local92 = anInt4866 - 1; - } - if (local84 < anInt4698) { - local76 = anInt4698 - local84; - local84 = anInt4698; - } - for (@Pc(112) int local112 = local84; local112 <= local92; local112++) { - @Pc(121) short local121 = local63.aShortArray30[local76++]; - @Pc(133) int local133 = (local63.x >> 7) + (local121 >> 8) - local63.radius; - @Pc(141) int local141 = local133 + (local121 & 0xFF) - 1; - if (local133 < anInt987) { - local133 = anInt987; - } - if (local141 >= anInt15) { - local141 = anInt15 - 1; - } - for (@Pc(155) int local155 = local133; local155 <= local141; local155++) { - @Pc(160) Tile local160 = null; - if (local66 >= 0) { - local160 = arg2[local66][local155][local112]; - } - if (local66 < 0 || local160 != null && local160.aBoolean45) { - GlRenderer.method4159(201.5F - (float) local63.level * 50.0F - 1.5F); - gl.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, new float[] { 0.0F, 0.0F, 0.0F, local63.alpha}, 0); - local63.aClass45_1.method1556(); - continue label71; - } - } - } - } - } - gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_TEXTURE); - gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_OPERAND0_RGB, GL2.GL_SRC_COLOR); - gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA); - gl.glDepthMask(true); - gl.glFogfv(GL2.GL_FOG_COLOR, FogManager.fogColor, 0); - gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY); - GlRenderer.restoreLighting(); - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(II[[[Lclient!bj;)V") + public static void method2402(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) Tile[][][] arg2) { + if (!Preferences.highDetailLighting) { + return; + } + @Pc(4) GL2 gl = GlRenderer.gl; + MaterialManager.setMaterial(0, 0); + GlRenderer.setTextureCombineRgbMode(0); + GlRenderer.resetTextureMatrix(); + GlRenderer.setTextureId(GlRenderer.anInt5328); + gl.glDepthMask(false); + GlRenderer.setLightingEnabled(false); + gl.glBlendFunc(GL2.GL_DST_COLOR, GL2.GL_ONE); + gl.glFogfv(GL2.GL_FOG_COLOR, new float[]{0.0F, 0.0F, 0.0F, 0.0F}, 0); + gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_CONSTANT); + gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_OPERAND0_RGB, GL2.GL_SRC_ALPHA); + label71: + for (@Pc(56) int local56 = 0; local56 < lightCount; local56++) { + @Pc(63) Light local63 = lights[local56]; + @Pc(66) int local66 = local63.level; + if (local63.aBoolean125) { + local66--; + } + if (local63.aClass45_1 != null) { + @Pc(76) int local76 = 0; + @Pc(84) int local84 = (local63.z >> 7) - local63.radius; + @Pc(92) int local92 = (local63.z >> 7) + local63.radius; + if (local92 >= anInt4866) { + local92 = anInt4866 - 1; + } + if (local84 < anInt4698) { + local76 = anInt4698 - local84; + local84 = anInt4698; + } + for (@Pc(112) int local112 = local84; local112 <= local92; local112++) { + @Pc(121) short local121 = local63.aShortArray30[local76++]; + @Pc(133) int local133 = (local63.x >> 7) + (local121 >> 8) - local63.radius; + @Pc(141) int local141 = local133 + (local121 & 0xFF) - 1; + if (local133 < anInt987) { + local133 = anInt987; + } + if (local141 >= anInt15) { + local141 = anInt15 - 1; + } + for (@Pc(155) int local155 = local133; local155 <= local141; local155++) { + @Pc(160) Tile local160 = null; + if (local66 >= 0) { + local160 = arg2[local66][local155][local112]; + } + if (local66 < 0 || local160 != null && local160.aBoolean45) { + GlRenderer.method4159(201.5F - (float) local63.level * 50.0F - 1.5F); + gl.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, new float[]{0.0F, 0.0F, 0.0F, local63.alpha}, 0); + local63.aClass45_1.method1556(); + continue label71; + } + } + } + } + } + gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_TEXTURE); + gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_OPERAND0_RGB, GL2.GL_SRC_COLOR); + gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA); + gl.glDepthMask(true); + gl.glFogfv(GL2.GL_FOG_COLOR, FogManager.fogColor, 0); + gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY); + GlRenderer.restoreLighting(); + } - @OriginalMember(owner = "client!jf", name = "a", descriptor = "(ILclient!gi;III)V") - private static void method2403(@OriginalArg(0) int arg0, @OriginalArg(1) Light arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - @Pc(5) int local5 = arg0 + 16384 + 4; - @Pc(7) GL2 gl = GlRenderer.gl; - if (!enabledLights[arg0]) { - gl.glEnable(local5); - enabledLights[arg0] = true; - } - gl.glLightf(local5, GL2.GL_QUADRATIC_ATTENUATION, arg1.aFloat9); - gl.glLightfv(local5, GL2.GL_DIFFUSE, arg1.diffuse, 0); - aFloatArray17[0] = arg1.x - arg2; - aFloatArray17[1] = arg1.y - arg3; - aFloatArray17[2] = arg1.z - arg4; - gl.glLightfv(local5, GL2.GL_POSITION, aFloatArray17, 0); - } + @OriginalMember(owner = "client!jf", name = "a", descriptor = "(ILclient!gi;III)V") + private static void method2403(@OriginalArg(0) int arg0, @OriginalArg(1) Light arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { + @Pc(5) int local5 = arg0 + 16384 + 4; + @Pc(7) GL2 gl = GlRenderer.gl; + if (!enabledLights[arg0]) { + gl.glEnable(local5); + enabledLights[arg0] = true; + } + gl.glLightf(local5, GL2.GL_QUADRATIC_ATTENUATION, arg1.aFloat9); + gl.glLightfv(local5, GL2.GL_DIFFUSE, arg1.diffuse, 0); + aFloatArray17[0] = arg1.x - arg2; + aFloatArray17[1] = arg1.y - arg3; + aFloatArray17[2] = arg1.z - arg4; + gl.glLightfv(local5, GL2.GL_POSITION, aFloatArray17, 0); + } - @OriginalMember(owner = "client!jf", name = "g", descriptor = "()V") - public static void method2404() { - lightCount = 0; - for (@Pc(3) int local3 = 0; local3 < anInt3032; local3++) { - for (@Pc(8) int local8 = 0; local8 < width; local8++) { - for (@Pc(13) int local13 = 0; local13 < length; local13++) { - anIntArrayArrayArray11[local3][local8][local13] = 0; - } - } - } - } + @OriginalMember(owner = "client!jf", name = "g", descriptor = "()V") + public static void method2404() { + lightCount = 0; + for (@Pc(3) int local3 = 0; local3 < anInt3032; local3++) { + for (@Pc(8) int local8 = 0; local8 < width; local8++) { + for (@Pc(13) int local13 = 0; local13 < length; local13++) { + anIntArrayArrayArray11[local3][local8][local13] = 0; + } + } + } + } } diff --git a/client/src/main/java/rt4/LiquidMaterialRenderer.java b/client/src/main/java/rt4/LiquidMaterialRenderer.java index 8a25c54..f4cfb6a 100644 --- a/client/src/main/java/rt4/LiquidMaterialRenderer.java +++ b/client/src/main/java/rt4/LiquidMaterialRenderer.java @@ -1,20 +1,21 @@ package rt4; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; + @OriginalClass("client!rd") public final class LiquidMaterialRenderer implements MaterialRenderer { - @OriginalMember(owner = "client!rd", name = "d", descriptor = "[F") - public static final float[] aFloatArray24 = new float[4]; - @OriginalMember(owner = "client!rd", name = "a", descriptor = "I") + @OriginalMember(owner = "client!rd", name = "d", descriptor = "[F") + public static final float[] aFloatArray24 = new float[4]; + @OriginalMember(owner = "client!rd", name = "a", descriptor = "I") private int anInt4829 = -1; @OriginalMember(owner = "client!rd", name = "e", descriptor = "I") diff --git a/client/src/main/java/rt4/LoadingBar.java b/client/src/main/java/rt4/LoadingBar.java index 3759c7d..da7634d 100644 --- a/client/src/main/java/rt4/LoadingBar.java +++ b/client/src/main/java/rt4/LoadingBar.java @@ -5,28 +5,28 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class LoadingBar { - @OriginalMember(owner = "client!oj", name = "a", descriptor = "(BZLclient!rk;)V") - public static void render(@OriginalArg(1) boolean arg0, @OriginalArg(2) Font arg1) { - @Pc(9) int local9; - if (GlRenderer.enabled || arg0) { - local9 = GameShell.canvasHeight; - @Pc(15) int local15 = local9 * 956 / 503; - TitleScreen.titleBg.renderResized((GameShell.canvasWidth - local15) / 2, 0, local15, local9); - TitleScreen.logo.renderTransparent(GameShell.canvasWidth / 2 - TitleScreen.logo.width / 2, 18); - } - arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1); - local9 = GameShell.canvasHeight / 2 - 18; - if (GlRenderer.enabled) { - GlRaster.method1179(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); - GlRaster.method1179(GameShell.canvasWidth / 2 - 151, local9 - -1, 302, 32, 0); - GlRaster.method1186(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); - GlRaster.method1186(GameShell.canvasWidth / 2 + client.mainLoadPercentage * 3 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); - } else { - SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); - SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 + 1, 302, 32, 0); - SoftwareRaster.fillRect(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); - SoftwareRaster.fillRect(client.mainLoadPercentage * 3 + GameShell.canvasWidth / 2 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); - } - arg1.renderCenter(client.mainLoadSecondaryText, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 + 4, 16777215, -1); - } + @OriginalMember(owner = "client!oj", name = "a", descriptor = "(BZLclient!rk;)V") + public static void render(@OriginalArg(1) boolean arg0, @OriginalArg(2) Font arg1) { + @Pc(9) int local9; + if (GlRenderer.enabled || arg0) { + local9 = GameShell.canvasHeight; + @Pc(15) int local15 = local9 * 956 / 503; + TitleScreen.titleBg.renderResized((GameShell.canvasWidth - local15) / 2, 0, local15, local9); + TitleScreen.logo.renderTransparent(GameShell.canvasWidth / 2 - TitleScreen.logo.width / 2, 18); + } + arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1); + local9 = GameShell.canvasHeight / 2 - 18; + if (GlRenderer.enabled) { + GlRaster.method1179(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); + GlRaster.method1179(GameShell.canvasWidth / 2 - 151, local9 - -1, 302, 32, 0); + GlRaster.method1186(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); + GlRaster.method1186(GameShell.canvasWidth / 2 + client.mainLoadPercentage * 3 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); + } else { + SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); + SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 + 1, 302, 32, 0); + SoftwareRaster.fillRect(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); + SoftwareRaster.fillRect(client.mainLoadPercentage * 3 + GameShell.canvasWidth / 2 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); + } + arg1.renderCenter(client.mainLoadSecondaryText, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 + 4, 16777215, -1); + } } diff --git a/client/src/main/java/rt4/LoadingBarAwt.java b/client/src/main/java/rt4/LoadingBarAwt.java index 49af1a9..5a5d0a3 100644 --- a/client/src/main/java/rt4/LoadingBarAwt.java +++ b/client/src/main/java/rt4/LoadingBarAwt.java @@ -4,74 +4,74 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; -import java.awt.*; import java.awt.Font; +import java.awt.*; public class LoadingBarAwt { - @OriginalMember(owner = "client!tg", name = "a", descriptor = "Ljava/awt/FontMetrics;") - public static FontMetrics aFontMetrics1; - @OriginalMember(owner = "client!lj", name = "y", descriptor = "Ljava/awt/Image;") - public static Image anImage3; - @OriginalMember(owner = "client!sa", name = "R", descriptor = "Ljava/awt/Font;") - public static Font aFont1; + @OriginalMember(owner = "client!tg", name = "a", descriptor = "Ljava/awt/FontMetrics;") + public static FontMetrics aFontMetrics1; + @OriginalMember(owner = "client!lj", name = "y", descriptor = "Ljava/awt/Image;") + public static Image anImage3; + @OriginalMember(owner = "client!sa", name = "R", descriptor = "Ljava/awt/Font;") + public static Font aFont1; - @OriginalMember(owner = "client!bc", name = "a", descriptor = "(Ljava/awt/Color;ZZLclient!na;I)V") - public static void render(@OriginalArg(0) Color arg0, @OriginalArg(2) boolean arg1, @OriginalArg(3) JagString arg2, @OriginalArg(4) int arg3) { - try { - @Pc(6) Graphics local6 = GameShell.canvas.getGraphics(); - if (aFont1 == null) { - aFont1 = new Font("Helvetica", 1, 13); - aFontMetrics1 = GameShell.canvas.getFontMetrics(aFont1); - } - if (arg1) { - local6.setColor(Color.black); - local6.fillRect(0, 0, GameShell.canvasWidth, GameShell.canvasHeight); - } - if (arg0 == null) { - arg0 = new Color(140, 17, 17); - } - try { - if (anImage3 == null) { - anImage3 = GameShell.canvas.createImage(304, 34); - } - @Pc(56) Graphics local56 = anImage3.getGraphics(); - local56.setColor(arg0); - local56.drawRect(0, 0, 303, 33); - local56.fillRect(2, 2, arg3 * 3, 30); - local56.setColor(Color.black); - local56.drawRect(1, 1, 301, 31); - local56.fillRect(arg3 * 3 + 2, 2, 300 - arg3 * 3, 30); - local56.setFont(aFont1); - local56.setColor(Color.white); - arg2.method3112(22, (304 - arg2.method3155(aFontMetrics1)) / 2, local56); - local6.drawImage(anImage3, GameShell.canvasWidth / 2 - 152, GameShell.canvasHeight / 2 + -18, null); - } catch (@Pc(134) Exception local134) { - @Pc(140) int local140 = GameShell.canvasWidth / 2 - 152; - @Pc(146) int local146 = GameShell.canvasHeight / 2 - 18; - local6.setColor(arg0); - local6.drawRect(local140, local146, 303, 33); - local6.fillRect(local140 + 2, local146 + 2, arg3 * 3, 30); - local6.setColor(Color.black); - local6.drawRect(local140 + 1, local146 - -1, 301, 31); - local6.fillRect(arg3 * 3 + local140 + 2, local146 + 2, 300 - arg3 * 3, 30); - local6.setFont(aFont1); - local6.setColor(Color.white); - arg2.method3112(local146 + 22, local140 + (-arg2.method3155(aFontMetrics1) + 304) / 2, local6); - } - if (client.mainLoadPrimaryText != null) { - local6.setFont(aFont1); - local6.setColor(Color.white); - client.mainLoadPrimaryText.method3112(GameShell.canvasHeight / 2 - 26, GameShell.canvasWidth / 2 - client.mainLoadPrimaryText.method3155(aFontMetrics1) / 2, local6); - } - } catch (@Pc(252) Exception local252) { - GameShell.canvas.repaint(); - } - } + @OriginalMember(owner = "client!bc", name = "a", descriptor = "(Ljava/awt/Color;ZZLclient!na;I)V") + public static void render(@OriginalArg(0) Color arg0, @OriginalArg(2) boolean arg1, @OriginalArg(3) JagString arg2, @OriginalArg(4) int arg3) { + try { + @Pc(6) Graphics local6 = GameShell.canvas.getGraphics(); + if (aFont1 == null) { + aFont1 = new Font("Helvetica", 1, 13); + aFontMetrics1 = GameShell.canvas.getFontMetrics(aFont1); + } + if (arg1) { + local6.setColor(Color.black); + local6.fillRect(0, 0, GameShell.canvasWidth, GameShell.canvasHeight); + } + if (arg0 == null) { + arg0 = new Color(140, 17, 17); + } + try { + if (anImage3 == null) { + anImage3 = GameShell.canvas.createImage(304, 34); + } + @Pc(56) Graphics local56 = anImage3.getGraphics(); + local56.setColor(arg0); + local56.drawRect(0, 0, 303, 33); + local56.fillRect(2, 2, arg3 * 3, 30); + local56.setColor(Color.black); + local56.drawRect(1, 1, 301, 31); + local56.fillRect(arg3 * 3 + 2, 2, 300 - arg3 * 3, 30); + local56.setFont(aFont1); + local56.setColor(Color.white); + arg2.method3112(22, (304 - arg2.method3155(aFontMetrics1)) / 2, local56); + local6.drawImage(anImage3, GameShell.canvasWidth / 2 - 152, GameShell.canvasHeight / 2 + -18, null); + } catch (@Pc(134) Exception local134) { + @Pc(140) int local140 = GameShell.canvasWidth / 2 - 152; + @Pc(146) int local146 = GameShell.canvasHeight / 2 - 18; + local6.setColor(arg0); + local6.drawRect(local140, local146, 303, 33); + local6.fillRect(local140 + 2, local146 + 2, arg3 * 3, 30); + local6.setColor(Color.black); + local6.drawRect(local140 + 1, local146 - -1, 301, 31); + local6.fillRect(arg3 * 3 + local140 + 2, local146 + 2, 300 - arg3 * 3, 30); + local6.setFont(aFont1); + local6.setColor(Color.white); + arg2.method3112(local146 + 22, local140 + (-arg2.method3155(aFontMetrics1) + 304) / 2, local6); + } + if (client.mainLoadPrimaryText != null) { + local6.setFont(aFont1); + local6.setColor(Color.white); + client.mainLoadPrimaryText.method3112(GameShell.canvasHeight / 2 - 26, GameShell.canvasWidth / 2 - client.mainLoadPrimaryText.method3155(aFontMetrics1) / 2, local6); + } + } catch (@Pc(252) Exception local252) { + GameShell.canvas.repaint(); + } + } - @OriginalMember(owner = "client!n", name = "a", descriptor = "(B)V") - public static void clear() { - aFontMetrics1 = null; - aFont1 = null; - anImage3 = null; - } + @OriginalMember(owner = "client!n", name = "a", descriptor = "(B)V") + public static void clear() { + aFontMetrics1 = null; + aFont1 = null; + anImage3 = null; + } } diff --git a/client/src/main/java/rt4/Loc.java b/client/src/main/java/rt4/Loc.java index 3c0d62b..a7f6c1e 100644 --- a/client/src/main/java/rt4/Loc.java +++ b/client/src/main/java/rt4/Loc.java @@ -9,10 +9,10 @@ import org.openrs2.deob.annotation.Pc; public final class Loc extends Entity { @OriginalMember(owner = "client!kf", name = "h", descriptor = "[I") - public static final int[] LAYERS = new int[] { 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3 }; + public static final int[] LAYERS = new int[]{0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3}; @OriginalMember(owner = "client!ci", name = "q", descriptor = "Lclient!ek;") - public static SoftwareIndexedSprite aClass36_Sub1_1 = null; - @OriginalMember(owner = "client!dc", name = "U", descriptor = "Lclient!ga;") + public static SoftwareIndexedSprite aClass36_Sub1_1 = null; + @OriginalMember(owner = "client!dc", name = "U", descriptor = "Lclient!ga;") private ParticleSystem aClass47_Sub1_2; @OriginalMember(owner = "client!dc", name = "x", descriptor = "I") @@ -141,55 +141,55 @@ public final class Loc extends Entity { } } - @OriginalMember(owner = "client!al", name = "a", descriptor = "(Lclient!pb;BIIIIIII)V") - public static void method181(@OriginalArg(0) LocType 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) { - @Pc(5) int local5 = arg2 & 0x3; - @Pc(28) int local28; - @Pc(31) int local31; - if (local5 == 1 || local5 == 3) { - local28 = arg0.length; - local31 = arg0.width; - } else { - local31 = arg0.length; - local28 = arg0.width; - } - @Pc(53) int local53; - @Pc(51) int local51; - if (arg6 + local31 > 104) { - local51 = arg6 + 1; - local53 = arg6; - } else { - local53 = arg6 + (local31 >> 1); - local51 = arg6 + (local31 + 1 >> 1); - } - @Pc(80) int local80 = (arg5 << 7) + (local28 << 6); - @Pc(88) int local88 = (arg6 << 7) + (local31 << 6); - @Pc(96) int local96; - @Pc(100) int local100; - if (arg5 + local28 > 104) { - local96 = arg5; - local100 = arg5 + 1; - } else { - local96 = arg5 + (local28 >> 1); - local100 = (local28 + 1 >> 1) + arg5; - } - @Pc(120) int[][] local120 = SceneGraph.tileHeights[arg7]; - @Pc(122) int local122 = 0; - @Pc(148) int local148 = local120[local96][local51] + local120[local96][local53] + local120[local100][local53] + local120[local100][local51] >> 2; - @Pc(158) int[][] local158; - if (arg7 != 0) { - local158 = SceneGraph.tileHeights[0]; - local122 = local148 - (local158[local96][local51] + local158[local100][local53] + local158[local96][local53] + local158[local100][local51] >> 2); - } - local158 = null; - if (arg7 < 3) { - local158 = SceneGraph.tileHeights[arg7 + 1]; - } - @Pc(215) Loc_Class139 local215 = arg0.method3428(arg2, local80, local120, arg4, local148, local158, false, null, true, local88); - ShadowManager.method4207(local215.aClass36_Sub1_3, local80 - arg3, local122, local88 - arg1); - } + @OriginalMember(owner = "client!al", name = "a", descriptor = "(Lclient!pb;BIIIIIII)V") + public static void method181(@OriginalArg(0) LocType 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) { + @Pc(5) int local5 = arg2 & 0x3; + @Pc(28) int local28; + @Pc(31) int local31; + if (local5 == 1 || local5 == 3) { + local28 = arg0.length; + local31 = arg0.width; + } else { + local31 = arg0.length; + local28 = arg0.width; + } + @Pc(53) int local53; + @Pc(51) int local51; + if (arg6 + local31 > 104) { + local51 = arg6 + 1; + local53 = arg6; + } else { + local53 = arg6 + (local31 >> 1); + local51 = arg6 + (local31 + 1 >> 1); + } + @Pc(80) int local80 = (arg5 << 7) + (local28 << 6); + @Pc(88) int local88 = (arg6 << 7) + (local31 << 6); + @Pc(96) int local96; + @Pc(100) int local100; + if (arg5 + local28 > 104) { + local96 = arg5; + local100 = arg5 + 1; + } else { + local96 = arg5 + (local28 >> 1); + local100 = (local28 + 1 >> 1) + arg5; + } + @Pc(120) int[][] local120 = SceneGraph.tileHeights[arg7]; + @Pc(122) int local122 = 0; + @Pc(148) int local148 = local120[local96][local51] + local120[local96][local53] + local120[local100][local53] + local120[local100][local51] >> 2; + @Pc(158) int[][] local158; + if (arg7 != 0) { + local158 = SceneGraph.tileHeights[0]; + local122 = local148 - (local158[local96][local51] + local158[local100][local53] + local158[local96][local53] + local158[local100][local51] >> 2); + } + local158 = null; + if (arg7 < 3) { + local158 = SceneGraph.tileHeights[arg7 + 1]; + } + @Pc(215) Loc_Class139 local215 = arg0.method3428(arg2, local80, local120, arg4, local148, local158, false, null, true, local88); + ShadowManager.method4207(local215.aClass36_Sub1_3, local80 - arg3, local122, local88 - arg1); + } - @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IIIII)V") + @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IIIII)V") @Override public final void method4545(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { if (GlRenderer.enabled) { diff --git a/client/src/main/java/rt4/LocType.java b/client/src/main/java/rt4/LocType.java index b30a1a7..b228209 100644 --- a/client/src/main/java/rt4/LocType.java +++ b/client/src/main/java/rt4/LocType.java @@ -8,11 +8,11 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!pb") public final class LocType { - @OriginalMember(owner = "client!wf", name = "o", descriptor = "[Lclient!gb;") - public static final RawModel[] tempModels = new RawModel[4]; - @OriginalMember(owner = "client!ni", name = "n", descriptor = "Lclient!sm;") + @OriginalMember(owner = "client!wf", name = "o", descriptor = "[Lclient!gb;") + public static final RawModel[] tempModels = new RawModel[4]; + @OriginalMember(owner = "client!ni", name = "n", descriptor = "Lclient!sm;") public static Loc_Class139 aClass139_1 = new Loc_Class139(); - @OriginalMember(owner = "client!pb", name = "a", descriptor = "[S") + @OriginalMember(owner = "client!pb", name = "a", descriptor = "[S") private short[] retextureSource; @OriginalMember(owner = "client!pb", name = "b", descriptor = "[S") @@ -251,7 +251,7 @@ public final class LocType { if (local10) { local60 += 65536; } - local7 = (RawModel) LocTypeList.aClass99_24.get((long) local60); + local7 = (RawModel) LocTypeList.aClass99_24.get(local60); if (local7 == null) { local7 = RawModel.create(LocTypeList.modelsArchive, local60 & 0xFFFF); if (local7 == null) { @@ -260,7 +260,7 @@ public final class LocType { if (local10) { local7.method1673(); } - LocTypeList.aClass99_24.put(local7, (long) local60); + LocTypeList.aClass99_24.put(local7, local60); } if (local46 > 1) { tempModels[local48] = local7; @@ -284,7 +284,7 @@ public final class LocType { if (local10) { local48 += 65536; } - local7 = (RawModel) LocTypeList.aClass99_24.get((long) local48); + local7 = (RawModel) LocTypeList.aClass99_24.get(local48); if (local7 == null) { local7 = RawModel.create(LocTypeList.modelsArchive, local48 & 0xFFFF); if (local7 == null) { @@ -293,21 +293,13 @@ public final class LocType { if (local10) { local7.method1673(); } - LocTypeList.aClass99_24.put(local7, (long) local48); + LocTypeList.aClass99_24.put(local7, local48); } } @Pc(211) boolean local211; - if (this.resizeX == 128 && this.resizeY == 128 && this.resizeZ == 128) { - local211 = false; - } else { - local211 = true; - } + local211 = this.resizeX != 128 || this.resizeY != 128 || this.resizeZ != 128; @Pc(230) boolean local230; - if (this.translateX == 0 && this.translateY == 0 && this.translateZ == 0) { - local230 = false; - } else { - local230 = true; - } + local230 = this.translateX != 0 || this.translateY != 0 || this.translateZ != 0; @Pc(265) RawModel local265 = new RawModel(local7, arg0 == 0 && !local211 && !local230, this.recolorSource == null, this.retextureSource == null, true); if (arg1 == 4 && arg0 > 3) { local265.method1682(); @@ -385,7 +377,7 @@ public final class LocType { if (this.params == null) { return arg0; } else { - @Pc(21) IntNode local21 = (IntNode) this.params.get((long) arg1); + @Pc(21) IntNode local21 = (IntNode) this.params.get(arg1); return local21 == null ? arg0 : local21.value; } } @@ -605,7 +597,7 @@ public final class LocType { } else { local589 = new IntNode(arg0.g4()); } - this.params.put(local589, (long) local580); + this.params.put(local589, local580); } } } @@ -681,14 +673,14 @@ public final class LocType { if (arg1) { local26 += 65536; } - local79 = (GlModel) LocTypeList.aClass99_24.get((long) local26); + local79 = (GlModel) LocTypeList.aClass99_24.get(local26); if (local79 == null) { @Pc(90) RawModel local90 = RawModel.create(LocTypeList.modelsArchive, local26 & 0xFFFF); if (local90 == null) { return null; } local79 = new GlModel(local90, local10, local17, arg1); - LocTypeList.aClass99_24.put(local79, (long) local26); + LocTypeList.aClass99_24.put(local79, local26); } } @Pc(236) boolean local236 = this.aBoolean217; @@ -918,7 +910,7 @@ public final class LocType { if (this.params == null) { return arg0; } else { - @Pc(26) StringNode local26 = (StringNode) this.params.get((long) arg1); + @Pc(26) StringNode local26 = (StringNode) this.params.get(arg1); return local26 == null ? arg0 : local26.value; } } diff --git a/client/src/main/java/rt4/LocTypeList.java b/client/src/main/java/rt4/LocTypeList.java index b59c2eb..f8aedf1 100644 --- a/client/src/main/java/rt4/LocTypeList.java +++ b/client/src/main/java/rt4/LocTypeList.java @@ -5,91 +5,91 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class LocTypeList { - @OriginalMember(owner = "client!oe", name = "j", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!nf", name = "f", descriptor = "Lclient!n;") - public static final SoftLruHashTable aClass99_24 = new SoftLruHashTable(500); - @OriginalMember(owner = "client!he", name = "fb", descriptor = "Lclient!n;") - public static final SoftLruHashTable aClass99_14 = new SoftLruHashTable(30); - @OriginalMember(owner = "client!vf", name = "l", descriptor = "Lclient!n;") - public static final SoftLruHashTable aClass99_36 = new SoftLruHashTable(50); - @OriginalMember(owner = "client!cg", name = "c", descriptor = "Z") - public static boolean allowMembers; - @OriginalMember(owner = "client!lg", name = "g", descriptor = "Lclient!ve;") - public static Js5 locsArchive; - @OriginalMember(owner = "client!jg", name = "j", descriptor = "Lclient!ve;") - public static Js5 modelsArchive; + @OriginalMember(owner = "client!oe", name = "j", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!nf", name = "f", descriptor = "Lclient!n;") + public static final SoftLruHashTable aClass99_24 = new SoftLruHashTable(500); + @OriginalMember(owner = "client!he", name = "fb", descriptor = "Lclient!n;") + public static final SoftLruHashTable aClass99_14 = new SoftLruHashTable(30); + @OriginalMember(owner = "client!vf", name = "l", descriptor = "Lclient!n;") + public static final SoftLruHashTable aClass99_36 = new SoftLruHashTable(50); + @OriginalMember(owner = "client!cg", name = "c", descriptor = "Z") + public static boolean allowMembers; + @OriginalMember(owner = "client!lg", name = "g", descriptor = "Lclient!ve;") + public static Js5 locsArchive; + @OriginalMember(owner = "client!jg", name = "j", descriptor = "Lclient!ve;") + public static Js5 modelsArchive; - @OriginalMember(owner = "client!wc", name = "a", descriptor = "(II)Lclient!pb;") - public static LocType get(@OriginalArg(1) int id) { - @Pc(15) LocType local15 = (LocType) types.get((long) id); - if (local15 != null) { - return local15; - } - @Pc(30) byte[] local30 = locsArchive.fetchFile(getGroupId(id), getFileId(id)); - local15 = new LocType(); - local15.id = id; - if (local30 != null) { - local15.decode(new Buffer(local30)); - } - local15.postDecode(); - if (!allowMembers && local15.members) { - local15.ops = null; - } - if (local15.breakroutefinding) { - local15.anInt4435 = 0; - local15.aBoolean207 = false; - } - types.put(local15, (long) id); - return local15; - } + @OriginalMember(owner = "client!wc", name = "a", descriptor = "(II)Lclient!pb;") + public static LocType get(@OriginalArg(1) int id) { + @Pc(15) LocType local15 = (LocType) types.get(id); + if (local15 != null) { + return local15; + } + @Pc(30) byte[] local30 = locsArchive.fetchFile(getGroupId(id), getFileId(id)); + local15 = new LocType(); + local15.id = id; + if (local30 != null) { + local15.decode(new Buffer(local30)); + } + local15.postDecode(); + if (!allowMembers && local15.members) { + local15.ops = null; + } + if (local15.breakroutefinding) { + local15.anInt4435 = 0; + local15.aBoolean207 = false; + } + types.put(local15, id); + return local15; + } - @OriginalMember(owner = "client!ui", name = "c", descriptor = "(II)I") - public static int getGroupId(@OriginalArg(0) int arg0) { - return arg0 >>> 8; - } + @OriginalMember(owner = "client!ui", name = "c", descriptor = "(II)I") + public static int getGroupId(@OriginalArg(0) int arg0) { + return arg0 >>> 8; + } - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(IB)I") + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(IB)I") public static int getFileId(@OriginalArg(0) int arg0) { return arg0 & 0xFF; } - @OriginalMember(owner = "client!oi", name = "a", descriptor = "(ILclient!ve;Lclient!ve;Z)V") - public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { - allowMembers = true; - modelsArchive = arg1; - locsArchive = arg0; - } + @OriginalMember(owner = "client!oi", name = "a", descriptor = "(ILclient!ve;Lclient!ve;Z)V") + public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { + allowMembers = true; + modelsArchive = arg1; + locsArchive = arg0; + } - @OriginalMember(owner = "client!oe", name = "b", descriptor = "(I)V") - public static void method3323() { - types.removeSoft(); - aClass99_24.removeSoft(); - aClass99_14.removeSoft(); - aClass99_36.removeSoft(); - } + @OriginalMember(owner = "client!oe", name = "b", descriptor = "(I)V") + public static void method3323() { + types.removeSoft(); + aClass99_24.removeSoft(); + aClass99_14.removeSoft(); + aClass99_36.removeSoft(); + } - @OriginalMember(owner = "client!va", name = "b", descriptor = "(II)V") - public static void clean() { - types.clean(5); - aClass99_24.clean(5); - aClass99_14.clean(5); - aClass99_36.clean(5); - } + @OriginalMember(owner = "client!va", name = "b", descriptor = "(II)V") + public static void clean() { + types.clean(5); + aClass99_24.clean(5); + aClass99_14.clean(5); + aClass99_36.clean(5); + } - @OriginalMember(owner = "client!hb", name = "c", descriptor = "(I)V") - public static void clear() { - types.clear(); - aClass99_24.clear(); - aClass99_14.clear(); - aClass99_36.clear(); - } + @OriginalMember(owner = "client!hb", name = "c", descriptor = "(I)V") + public static void clear() { + types.clear(); + aClass99_24.clear(); + aClass99_14.clear(); + aClass99_36.clear(); + } - @OriginalMember(owner = "client!pe", name = "a", descriptor = "(BZ)V") - public static void setAllowMembers(@OriginalArg(1) boolean arg0) { - if (arg0 != allowMembers) { - allowMembers = arg0; - clear(); - } - } + @OriginalMember(owner = "client!pe", name = "a", descriptor = "(BZ)V") + public static void setAllowMembers(@OriginalArg(1) boolean arg0) { + if (arg0 != allowMembers) { + allowMembers = arg0; + clear(); + } + } } diff --git a/client/src/main/java/rt4/LocalizedText.java b/client/src/main/java/rt4/LocalizedText.java index 055beb8..7a9ba9e 100644 --- a/client/src/main/java/rt4/LocalizedText.java +++ b/client/src/main/java/rt4/LocalizedText.java @@ -4,1322 +4,1322 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public class LocalizedText { - //region English Translations - @OriginalMember(owner = "client!ui", name = "ob", descriptor = "Lclient!na;") - private static final JagString ENG_ATTACK = JagString.parse("Attack"); + //region English Translations + @OriginalMember(owner = "client!ui", name = "ob", descriptor = "Lclient!na;") + private static final JagString ENG_ATTACK = JagString.parse("Attack"); - @OriginalMember(owner = "client!vf", name = "d", descriptor = "Lclient!na;") - private static final JagString ENG_ATTEMPT_TO_REESTABLISH = JagString.parse("Please wait )2 attempting to reestablish)3"); + @OriginalMember(owner = "client!vf", name = "d", descriptor = "Lclient!na;") + private static final JagString ENG_ATTEMPT_TO_REESTABLISH = JagString.parse("Please wait )2 attempting to reestablish)3"); - @OriginalMember(owner = "client!wb", name = "i", descriptor = "Lclient!na;") - private static final JagString ENG_CANCEL = JagString.parse("Cancel"); + @OriginalMember(owner = "client!wb", name = "i", descriptor = "Lclient!na;") + private static final JagString ENG_CANCEL = JagString.parse("Cancel"); - @OriginalMember(owner = "client!bk", name = "I", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL0 = JagString.parse("yellow:"); + @OriginalMember(owner = "client!bk", name = "I", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL0 = JagString.parse("yellow:"); - @OriginalMember(owner = "client!lb", name = "x", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL1 = JagString.parse("red:"); + @OriginalMember(owner = "client!lb", name = "x", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL1 = JagString.parse("red:"); - @OriginalMember(owner = "client!h", name = "Bb", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL2 = JagString.parse("green:"); + @OriginalMember(owner = "client!h", name = "Bb", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL2 = JagString.parse("green:"); - @OriginalMember(owner = "client!client", name = "eb", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL3 = JagString.parse("cyan:"); + @OriginalMember(owner = "client!client", name = "eb", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL3 = JagString.parse("cyan:"); - @OriginalMember(owner = "client!hd", name = "h", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL4 = JagString.parse("purple:"); + @OriginalMember(owner = "client!hd", name = "h", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL4 = JagString.parse("purple:"); - @OriginalMember(owner = "client!bf", name = "y", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL5 = JagString.parse("white:"); + @OriginalMember(owner = "client!bf", name = "y", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL5 = JagString.parse("white:"); - @OriginalMember(owner = "client!mg", name = "U", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL6 = JagString.parse("flash1:"); + @OriginalMember(owner = "client!mg", name = "U", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL6 = JagString.parse("flash1:"); - @OriginalMember(owner = "client!tm", name = "n", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL7 = JagString.parse("flash2:"); + @OriginalMember(owner = "client!tm", name = "n", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL7 = JagString.parse("flash2:"); - @OriginalMember(owner = "client!km", name = "Cc", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL8 = JagString.parse("flash3:"); + @OriginalMember(owner = "client!km", name = "Cc", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL8 = JagString.parse("flash3:"); - @OriginalMember(owner = "client!aa", name = "r", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL9 = JagString.parse("glow1:"); + @OriginalMember(owner = "client!aa", name = "r", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL9 = JagString.parse("glow1:"); - @OriginalMember(owner = "client!vf", name = "j", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL10 = JagString.parse("glow2:"); + @OriginalMember(owner = "client!vf", name = "j", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL10 = JagString.parse("glow2:"); - @OriginalMember(owner = "client!ah", name = "m", descriptor = "Lclient!na;") - private static final JagString ENG_CHATCOL11 = JagString.parse("glow3:"); + @OriginalMember(owner = "client!ah", name = "m", descriptor = "Lclient!na;") + private static final JagString ENG_CHATCOL11 = JagString.parse("glow3:"); - @OriginalMember(owner = "client!dc", name = "E", descriptor = "Lclient!na;") - private static final JagString ENG_CHATEFFECT1 = JagString.parse("wave:"); + @OriginalMember(owner = "client!dc", name = "E", descriptor = "Lclient!na;") + private static final JagString ENG_CHATEFFECT1 = JagString.parse("wave:"); - @OriginalMember(owner = "client!pg", name = "ib", descriptor = "Lclient!na;") - private static final JagString ENG_CHATEFFECT2 = JagString.parse("wave2:"); + @OriginalMember(owner = "client!pg", name = "ib", descriptor = "Lclient!na;") + private static final JagString ENG_CHATEFFECT2 = JagString.parse("wave2:"); - @OriginalMember(owner = "client!rm", name = "h", descriptor = "Lclient!na;") - private static final JagString ENG_CHATEFFECT3 = JagString.parse("shake:"); + @OriginalMember(owner = "client!rm", name = "h", descriptor = "Lclient!na;") + private static final JagString ENG_CHATEFFECT3 = JagString.parse("shake:"); - @OriginalMember(owner = "client!ef", name = "m", descriptor = "Lclient!na;") - private static final JagString ENG_CHATEFFECT4 = JagString.parse("scroll:"); + @OriginalMember(owner = "client!ef", name = "m", descriptor = "Lclient!na;") + private static final JagString ENG_CHATEFFECT4 = JagString.parse("scroll:"); - @OriginalMember(owner = "client!eg", name = "B", descriptor = "Lclient!na;") - private static final JagString ENG_CHATEFFECT5 = JagString.parse("slide:"); + @OriginalMember(owner = "client!eg", name = "B", descriptor = "Lclient!na;") + private static final JagString ENG_CHATEFFECT5 = JagString.parse("slide:"); - @OriginalMember(owner = "client!bm", name = "d", descriptor = "Lclient!na;") - private static final JagString ENG_CHECKING_FOR_UPDATES = JagString.parse("Checking for updates )2 "); + @OriginalMember(owner = "client!bm", name = "d", descriptor = "Lclient!na;") + private static final JagString ENG_CHECKING_FOR_UPDATES = JagString.parse("Checking for updates )2 "); - @OriginalMember(owner = "client!ta", name = "q", descriptor = "Lclient!na;") - private static final JagString ENG_CHOOSE_OPTION = JagString.parse("Choose Option"); + @OriginalMember(owner = "client!ta", name = "q", descriptor = "Lclient!na;") + private static final JagString ENG_CHOOSE_OPTION = JagString.parse("Choose Option"); - @OriginalMember(owner = "client!d", name = "fb", descriptor = "Lclient!na;") - private static final JagString ENG_CLOSE = JagString.parse("Close"); + @OriginalMember(owner = "client!d", name = "fb", descriptor = "Lclient!na;") + private static final JagString ENG_CLOSE = JagString.parse("Close"); - @OriginalMember(owner = "client!sm", name = "f", descriptor = "Lclient!na;") - private static final JagString ENG_CONLOST = JagString.parse("Connection lost)3"); + @OriginalMember(owner = "client!sm", name = "f", descriptor = "Lclient!na;") + private static final JagString ENG_CONLOST = JagString.parse("Connection lost)3"); - @OriginalMember(owner = "client!ig", name = "c", descriptor = "Lclient!na;") - private static final JagString ENG_CONTINUE = JagString.parse("Continue"); + @OriginalMember(owner = "client!ig", name = "c", descriptor = "Lclient!na;") + private static final JagString ENG_CONTINUE = JagString.parse("Continue"); - @OriginalMember(owner = "client!dc", name = "R", descriptor = "Lclient!na;") - private static final JagString ENG_DROP = JagString.parse("Drop"); + @OriginalMember(owner = "client!dc", name = "R", descriptor = "Lclient!na;") + private static final JagString ENG_DROP = JagString.parse("Drop"); - @OriginalMember(owner = "client!li", name = "u", descriptor = "Lclient!na;") - private static final JagString ENG_EXAMINE = JagString.parse("Examine"); + @OriginalMember(owner = "client!li", name = "u", descriptor = "Lclient!na;") + private static final JagString ENG_EXAMINE = JagString.parse("Examine"); - @OriginalMember(owner = "client!sd", name = "M", descriptor = "Lclient!na;") - private static final JagString ENG_FACEHERE = JagString.parse("Face here"); + @OriginalMember(owner = "client!sd", name = "M", descriptor = "Lclient!na;") + private static final JagString ENG_FACEHERE = JagString.parse("Face here"); - @OriginalMember(owner = "client!ii", name = "g", descriptor = "Lclient!na;") - private static final JagString ENG_FRIENDCANTADDSELF = JagString.parse("You can(Wt add yourself to your own friend list)3"); + @OriginalMember(owner = "client!ii", name = "g", descriptor = "Lclient!na;") + private static final JagString ENG_FRIENDCANTADDSELF = JagString.parse("You can(Wt add yourself to your own friend list)3"); - @OriginalMember(owner = "client!lk", name = "S", descriptor = "Lclient!na;") - private static final JagString ENG_FRIENDLISTDUPE = JagString.parse(" is already on your friend list)3"); + @OriginalMember(owner = "client!lk", name = "S", descriptor = "Lclient!na;") + private static final JagString ENG_FRIENDLISTDUPE = JagString.parse(" is already on your friend list)3"); - @OriginalMember(owner = "client!t", name = "B", descriptor = "Lclient!na;") - private static final JagString ENG_FRIENDLISTFULL = JagString.parse("Your friend list is full)3 Max of 100 for free users)1 and 200 for members)3"); + @OriginalMember(owner = "client!t", name = "B", descriptor = "Lclient!na;") + private static final JagString ENG_FRIENDLISTFULL = JagString.parse("Your friend list is full)3 Max of 100 for free users)1 and 200 for members)3"); - @OriginalMember(owner = "client!c", name = "W", descriptor = "Lclient!na;") - private static final JagString ENG_FRIENDLOGIN = JagString.parse(" has logged in)3"); + @OriginalMember(owner = "client!c", name = "W", descriptor = "Lclient!na;") + private static final JagString ENG_FRIENDLOGIN = JagString.parse(" has logged in)3"); - @OriginalMember(owner = "client!hd", name = "o", descriptor = "Lclient!na;") - private static final JagString ENG_FRIENDLOGOUT = JagString.parse(" has logged out)3"); + @OriginalMember(owner = "client!hd", name = "o", descriptor = "Lclient!na;") + private static final JagString ENG_FRIENDLOGOUT = JagString.parse(" has logged out)3"); - @OriginalMember(owner = "client!ec", name = "r", descriptor = "Lclient!na;") - private static final JagString ENG_GAME0_LOADING = JagString.parse("RuneScape is loading )2 please wait)3)3)3"); + @OriginalMember(owner = "client!ec", name = "r", descriptor = "Lclient!na;") + private static final JagString ENG_GAME0_LOADING = JagString.parse("RuneScape is loading )2 please wait)3)3)3"); - @OriginalMember(owner = "client!an", name = "Z", descriptor = "Lclient!na;") - private static final JagString ENG_HIDDEN = JagString.parse("Hidden"); + @OriginalMember(owner = "client!an", name = "Z", descriptor = "Lclient!na;") + private static final JagString ENG_HIDDEN = JagString.parse("Hidden"); - @OriginalMember(owner = "client!nb", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_IGNORECANTADDSELF = JagString.parse("You can(Wt add yourself to your own ignore list)3"); + @OriginalMember(owner = "client!nb", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_IGNORECANTADDSELF = JagString.parse("You can(Wt add yourself to your own ignore list)3"); - @OriginalMember(owner = "client!ol", name = "X", descriptor = "Lclient!na;") - private static final JagString ENG_IGNORELISTDUPE = JagString.parse(" is already on your ignore list)3"); + @OriginalMember(owner = "client!ol", name = "X", descriptor = "Lclient!na;") + private static final JagString ENG_IGNORELISTDUPE = JagString.parse(" is already on your ignore list)3"); - @OriginalMember(owner = "client!u", name = "l", descriptor = "Lclient!na;") - private static final JagString ENG_IGNORELISTFULL = JagString.parse("Your ignore list is full)3 Max of 100 users)3"); + @OriginalMember(owner = "client!u", name = "l", descriptor = "Lclient!na;") + private static final JagString ENG_IGNORELISTFULL = JagString.parse("Your ignore list is full)3 Max of 100 users)3"); - @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_LENT_ITEM_RETURN = JagString.parse("Discard"); + @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_LENT_ITEM_RETURN = JagString.parse("Discard"); - @OriginalMember(owner = "client!ef", name = "s", descriptor = "Lclient!na;") - private static final JagString ENG_LEVEL = JagString.parse("level: "); + @OriginalMember(owner = "client!ef", name = "s", descriptor = "Lclient!na;") + private static final JagString ENG_LEVEL = JagString.parse("level: "); - @OriginalMember(owner = "client!nh", name = "bb", descriptor = "Lclient!na;") - private static final JagString ENG_LOADING = JagString.parse("Loading )2 please wait)3"); + @OriginalMember(owner = "client!nh", name = "bb", descriptor = "Lclient!na;") + private static final JagString ENG_LOADING = JagString.parse("Loading )2 please wait)3"); - @OriginalMember(owner = "client!dm", name = "B", descriptor = "Lclient!na;") - private static final JagString ENG_LOADINGDOTDOTDOT = JagString.parse("Loading)3)3)3"); + @OriginalMember(owner = "client!dm", name = "B", descriptor = "Lclient!na;") + private static final JagString ENG_LOADINGDOTDOTDOT = JagString.parse("Loading)3)3)3"); - @OriginalMember(owner = "client!kd", name = "kb", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD0 = JagString.parse("Allocating memory"); + @OriginalMember(owner = "client!kd", name = "kb", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD0 = JagString.parse("Allocating memory"); - @OriginalMember(owner = "client!na", name = "ob", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD0B = JagString.parse("Allocated memory"); + @OriginalMember(owner = "client!na", name = "ob", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD0B = JagString.parse("Allocated memory"); - @OriginalMember(owner = "client!il", name = "J", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD10B = JagString.parse("Created gameworld"); + @OriginalMember(owner = "client!il", name = "J", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD10B = JagString.parse("Created gameworld"); - @OriginalMember(owner = "client!vj", name = "h", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD30 = JagString.parse("Connecting to update server"); + @OriginalMember(owner = "client!vj", name = "h", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD30 = JagString.parse("Connecting to update server"); - @OriginalMember(owner = "client!od", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD30B = JagString.parse("Connected to update server"); + @OriginalMember(owner = "client!od", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD30B = JagString.parse("Connected to update server"); - @OriginalMember(owner = "client!ba", name = "s", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD40B = JagString.parse("Loaded update list"); + @OriginalMember(owner = "client!ba", name = "s", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD40B = JagString.parse("Loaded update list"); - @OriginalMember(owner = "client!se", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD45B = JagString.parse("Prepared sound engine"); + @OriginalMember(owner = "client!se", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD45B = JagString.parse("Prepared sound engine"); - @OriginalMember(owner = "client!lk", name = "P", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD50 = JagString.parse("Loading fonts )2 "); + @OriginalMember(owner = "client!lk", name = "P", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD50 = JagString.parse("Loading fonts )2 "); - @OriginalMember(owner = "client!tl", name = "e", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD50B = JagString.parse("Loaded fonts"); + @OriginalMember(owner = "client!tl", name = "e", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD50B = JagString.parse("Loaded fonts"); - @OriginalMember(owner = "client!dm", name = "v", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD60 = JagString.parse("Loading title screen )2 "); + @OriginalMember(owner = "client!dm", name = "v", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD60 = JagString.parse("Loading title screen )2 "); - @OriginalMember(owner = "client!cb", name = "gb", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD60B = JagString.parse("Loaded title screen"); + @OriginalMember(owner = "client!cb", name = "gb", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD60B = JagString.parse("Loaded title screen"); - @OriginalMember(owner = "client!dl", name = "j", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD65B = JagString.parse("Opened title screen"); + @OriginalMember(owner = "client!dl", name = "j", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD65B = JagString.parse("Opened title screen"); - @OriginalMember(owner = "client!bk", name = "K", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD70 = JagString.parse("Loading config )2 "); + @OriginalMember(owner = "client!bk", name = "K", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD70 = JagString.parse("Loading config )2 "); - @OriginalMember(owner = "client!fn", name = "P", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD70B = JagString.parse("Loaded config"); + @OriginalMember(owner = "client!fn", name = "P", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD70B = JagString.parse("Loaded config"); - @OriginalMember(owner = "client!vc", name = "X", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD80 = JagString.parse("Loading sprites )2 "); + @OriginalMember(owner = "client!vc", name = "X", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD80 = JagString.parse("Loading sprites )2 "); - @OriginalMember(owner = "client!sc", name = "w", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD80B = JagString.parse("Loaded sprites"); + @OriginalMember(owner = "client!sc", name = "w", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD80B = JagString.parse("Loaded sprites"); - @OriginalMember(owner = "client!ub", name = "n", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD90 = JagString.parse("Loading textures )2 "); + @OriginalMember(owner = "client!ub", name = "n", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD90 = JagString.parse("Loading textures )2 "); - @OriginalMember(owner = "client!gm", name = "fb", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD90B = JagString.parse("Loaded textures"); + @OriginalMember(owner = "client!gm", name = "fb", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD90B = JagString.parse("Loaded textures"); - @OriginalMember(owner = "client!ni", name = "p", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD110B = JagString.parse("Loaded input handler"); + @OriginalMember(owner = "client!ni", name = "p", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD110B = JagString.parse("Loaded input handler"); - @OriginalMember(owner = "client!li", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD120 = JagString.parse("Loading wordpack )2 "); + @OriginalMember(owner = "client!li", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD120 = JagString.parse("Loading wordpack )2 "); - @OriginalMember(owner = "client!pl", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD120B = JagString.parse("Loaded wordpack"); + @OriginalMember(owner = "client!pl", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD120B = JagString.parse("Loaded wordpack"); - @OriginalMember(owner = "client!bg", name = "O", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD130 = JagString.parse("Loading interfaces )2 "); + @OriginalMember(owner = "client!bg", name = "O", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD130 = JagString.parse("Loading interfaces )2 "); - @OriginalMember(owner = "client!wa", name = "D", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD130B = JagString.parse("Loaded interfaces"); + @OriginalMember(owner = "client!wa", name = "D", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD130B = JagString.parse("Loaded interfaces"); - @OriginalMember(owner = "client!r", name = "c", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD135 = JagString.parse("Loading world list data"); + @OriginalMember(owner = "client!r", name = "c", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD135 = JagString.parse("Loading world list data"); - @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD135B = JagString.parse("Loaded world list data"); + @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD135B = JagString.parse("Loaded world list data"); - @OriginalMember(owner = "client!cn", name = "J", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD140 = JagString.parse("Starting 3d Library"); + @OriginalMember(owner = "client!cn", name = "J", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD140 = JagString.parse("Starting 3d Library"); - @OriginalMember(owner = "client!rg", name = "u", descriptor = "Lclient!na;") - private static final JagString ENG_MAINLOAD150B = JagString.parse("Started 3d Library"); + @OriginalMember(owner = "client!rg", name = "u", descriptor = "Lclient!na;") + private static final JagString ENG_MAINLOAD150B = JagString.parse("Started 3d Library"); - @OriginalMember(owner = "client!qc", name = "Z", descriptor = "Lclient!na;") - private static final JagString ENG_MEMBERS_OBJECT = JagString.parse("Members object"); + @OriginalMember(owner = "client!qc", name = "Z", descriptor = "Lclient!na;") + private static final JagString ENG_MEMBERS_OBJECT = JagString.parse("Members object"); - @OriginalMember(owner = "client!fh", name = "W", descriptor = "Lclient!na;") - private static final JagString ENG_MILLION_SUFFIX = JagString.parse("M"); + @OriginalMember(owner = "client!fh", name = "W", descriptor = "Lclient!na;") + private static final JagString ENG_MILLION_SUFFIX = JagString.parse("M"); - @OriginalMember(owner = "client!qk", name = "l", descriptor = "Lclient!na;") - private static final JagString ENG_MINISEPARATOR = JagString.parse(" "); + @OriginalMember(owner = "client!qk", name = "l", descriptor = "Lclient!na;") + private static final JagString ENG_MINISEPARATOR = JagString.parse(" "); - @OriginalMember(owner = "client!ui", name = "ab", descriptor = "Lclient!na;") - private static final JagString ENG_MOREOPTIONS = JagString.parse(" more options"); + @OriginalMember(owner = "client!ui", name = "ab", descriptor = "Lclient!na;") + private static final JagString ENG_MOREOPTIONS = JagString.parse(" more options"); - @OriginalMember(owner = "client!ph", name = "c", descriptor = "Lclient!na;") - private static final JagString ENG_OK = JagString.parse("Ok"); + @OriginalMember(owner = "client!ph", name = "c", descriptor = "Lclient!na;") + private static final JagString ENG_OK = JagString.parse("Ok"); - @OriginalMember(owner = "client!bj", name = "z", descriptor = "Lclient!na;") - private static final JagString ENG_PLEASEWAIT = JagString.parse("Please wait)3)3)3"); + @OriginalMember(owner = "client!bj", name = "z", descriptor = "Lclient!na;") + private static final JagString ENG_PLEASEWAIT = JagString.parse("Please wait)3)3)3"); - @OriginalMember(owner = "client!mf", name = "T", descriptor = "Lclient!na;") - private static final JagString ENG_RATING = JagString.parse("rating: "); + @OriginalMember(owner = "client!mf", name = "T", descriptor = "Lclient!na;") + private static final JagString ENG_RATING = JagString.parse("rating: "); - @OriginalMember(owner = "client!pm", name = "gb", descriptor = "Lclient!na;") - private static final JagString ENG_REMOVEFRIEND = JagString.parse(" from your friend list first)3"); + @OriginalMember(owner = "client!pm", name = "gb", descriptor = "Lclient!na;") + private static final JagString ENG_REMOVEFRIEND = JagString.parse(" from your friend list first)3"); - @OriginalMember(owner = "client!rc", name = "v", descriptor = "Lclient!na;") - private static final JagString ENG_REMOVEIGNORE = JagString.parse(" from your ignore list first)3"); + @OriginalMember(owner = "client!rc", name = "v", descriptor = "Lclient!na;") + private static final JagString ENG_REMOVEIGNORE = JagString.parse(" from your ignore list first)3"); - @OriginalMember(owner = "client!fk", name = "b", descriptor = "Lclient!na;") - private static final JagString ENG_REMOVESOCIAL = JagString.parse("Please remove "); + @OriginalMember(owner = "client!fk", name = "b", descriptor = "Lclient!na;") + private static final JagString ENG_REMOVESOCIAL = JagString.parse("Please remove "); - @OriginalMember(owner = "client!se", name = "o", descriptor = "Lclient!na;") - private static final JagString ENG_SELECT = JagString.parse("Select"); + @OriginalMember(owner = "client!se", name = "o", descriptor = "Lclient!na;") + private static final JagString ENG_SELECT = JagString.parse("Select"); - @OriginalMember(owner = "client!ef", name = "k", descriptor = "Lclient!na;") - private static final JagString ENG_SKILL = JagString.parse("skill: "); + @OriginalMember(owner = "client!ef", name = "k", descriptor = "Lclient!na;") + private static final JagString ENG_SKILL = JagString.parse("skill: "); - @OriginalMember(owner = "client!si", name = "hb", descriptor = "Lclient!na;") - private static final JagString ENG_TAKE = JagString.parse("Take"); + @OriginalMember(owner = "client!si", name = "hb", descriptor = "Lclient!na;") + private static final JagString ENG_TAKE = JagString.parse("Take"); - @OriginalMember(owner = "client!cl", name = "N", descriptor = "Lclient!na;") - private static final JagString ENG_THOUSAND_SUFFIX = JagString.parse("K"); + @OriginalMember(owner = "client!cl", name = "N", descriptor = "Lclient!na;") + private static final JagString ENG_THOUSAND_SUFFIX = JagString.parse("K"); - @OriginalMember(owner = "client!ea", name = "q", descriptor = "Lclient!na;") - private static final JagString ENG_TRADEREQ = JagString.parse("wishes to trade with you)3"); + @OriginalMember(owner = "client!ea", name = "q", descriptor = "Lclient!na;") + private static final JagString ENG_TRADEREQ = JagString.parse("wishes to trade with you)3"); - @OriginalMember(owner = "client!gi", name = "f", descriptor = "Lclient!na;") - private static final JagString ENG_UNABLETOFIND = JagString.parse("Unable to find "); + @OriginalMember(owner = "client!gi", name = "f", descriptor = "Lclient!na;") + private static final JagString ENG_UNABLETOFIND = JagString.parse("Unable to find "); - @OriginalMember(owner = "client!sa", name = "U", descriptor = "Lclient!na;") - private static final JagString ENG_USE = JagString.parse("Use"); + @OriginalMember(owner = "client!sa", name = "U", descriptor = "Lclient!na;") + private static final JagString ENG_USE = JagString.parse("Use"); - @OriginalMember(owner = "client!ib", name = "m", descriptor = "Lclient!na;") - private static final JagString ENG_WALKHERE = JagString.parse("Walk here"); - //endregion + @OriginalMember(owner = "client!ib", name = "m", descriptor = "Lclient!na;") + private static final JagString ENG_WALKHERE = JagString.parse("Walk here"); + //endregion - //region Stable Translations (chat effects/colors) - @OriginalMember(owner = "client!bk", name = "R", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL0 = ENG_CHATCOL0; + //region Stable Translations (chat effects/colors) + @OriginalMember(owner = "client!bk", name = "R", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL0 = ENG_CHATCOL0; - @OriginalMember(owner = "client!lb", name = "D", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL1 = ENG_CHATCOL1; + @OriginalMember(owner = "client!lb", name = "D", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL1 = ENG_CHATCOL1; - @OriginalMember(owner = "client!h", name = "wb", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL2 = ENG_CHATCOL2; + @OriginalMember(owner = "client!h", name = "wb", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL2 = ENG_CHATCOL2; - @OriginalMember(owner = "client!client", name = "cb", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL3 = ENG_CHATCOL3; + @OriginalMember(owner = "client!client", name = "cb", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL3 = ENG_CHATCOL3; - @OriginalMember(owner = "client!hd", name = "p", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL4 = ENG_CHATCOL4; + @OriginalMember(owner = "client!hd", name = "p", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL4 = ENG_CHATCOL4; - @OriginalMember(owner = "client!bf", name = "N", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL5 = ENG_CHATCOL5; + @OriginalMember(owner = "client!bf", name = "N", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL5 = ENG_CHATCOL5; - @OriginalMember(owner = "client!mg", name = "T", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL6 = ENG_CHATCOL6; + @OriginalMember(owner = "client!mg", name = "T", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL6 = ENG_CHATCOL6; - @OriginalMember(owner = "client!tm", name = "k", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL7 = ENG_CHATCOL7; + @OriginalMember(owner = "client!tm", name = "k", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL7 = ENG_CHATCOL7; - @OriginalMember(owner = "client!km", name = "wc", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL8 = ENG_CHATCOL8; + @OriginalMember(owner = "client!km", name = "wc", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL8 = ENG_CHATCOL8; - @OriginalMember(owner = "client!aa", name = "d", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL9 = ENG_CHATCOL9; + @OriginalMember(owner = "client!aa", name = "d", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL9 = ENG_CHATCOL9; - @OriginalMember(owner = "client!vf", name = "h", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL10 = ENG_CHATCOL10; + @OriginalMember(owner = "client!vf", name = "h", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL10 = ENG_CHATCOL10; - @OriginalMember(owner = "client!ah", name = "r", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATCOL11 = ENG_CHATCOL11; + @OriginalMember(owner = "client!ah", name = "r", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATCOL11 = ENG_CHATCOL11; - @OriginalMember(owner = "client!dc", name = "S", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATEFFECT1 = ENG_CHATEFFECT1; + @OriginalMember(owner = "client!dc", name = "S", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATEFFECT1 = ENG_CHATEFFECT1; - @OriginalMember(owner = "client!pg", name = "X", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATEFFECT2 = ENG_CHATEFFECT2; + @OriginalMember(owner = "client!pg", name = "X", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATEFFECT2 = ENG_CHATEFFECT2; - @OriginalMember(owner = "client!rm", name = "k", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATEFFECT3 = ENG_CHATEFFECT3; + @OriginalMember(owner = "client!rm", name = "k", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATEFFECT3 = ENG_CHATEFFECT3; - @OriginalMember(owner = "client!ef", name = "t", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATEFFECT4 = ENG_CHATEFFECT4; + @OriginalMember(owner = "client!ef", name = "t", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATEFFECT4 = ENG_CHATEFFECT4; - @OriginalMember(owner = "client!eg", name = "u", descriptor = "Lclient!na;") - public static final JagString STABLE_CHATEFFECTC5 = ENG_CHATEFFECT5; - //endregion + @OriginalMember(owner = "client!eg", name = "u", descriptor = "Lclient!na;") + public static final JagString STABLE_CHATEFFECTC5 = ENG_CHATEFFECT5; + //endregion - // TODO: unsorted - //region Active - @OriginalMember(owner = "client!vj", name = "b", descriptor = "Lclient!na;") - public static JagString MAINLOAD30 = ENG_MAINLOAD30; + // TODO: unsorted + //region Active + @OriginalMember(owner = "client!vj", name = "b", descriptor = "Lclient!na;") + public static JagString MAINLOAD30 = ENG_MAINLOAD30; - @OriginalMember(owner = "client!lb", name = "q", descriptor = "Lclient!na;") - public static JagString CHATCOL1 = ENG_CHATCOL1; + @OriginalMember(owner = "client!lb", name = "q", descriptor = "Lclient!na;") + public static JagString CHATCOL1 = ENG_CHATCOL1; - @OriginalMember(owner = "client!sd", name = "O", descriptor = "Lclient!na;") - public static JagString FACEHERE = ENG_FACEHERE; + @OriginalMember(owner = "client!sd", name = "O", descriptor = "Lclient!na;") + public static JagString FACEHERE = ENG_FACEHERE; - @OriginalMember(owner = "client!vc", name = "Q", descriptor = "Lclient!na;") - public static JagString MAINLOAD80 = ENG_MAINLOAD80; + @OriginalMember(owner = "client!vc", name = "Q", descriptor = "Lclient!na;") + public static JagString MAINLOAD80 = ENG_MAINLOAD80; - @OriginalMember(owner = "client!mf", name = "U", descriptor = "Lclient!na;") - public static JagString RATING = ENG_RATING; + @OriginalMember(owner = "client!mf", name = "U", descriptor = "Lclient!na;") + public static JagString RATING = ENG_RATING; - @OriginalMember(owner = "client!qc", name = "Y", descriptor = "Lclient!na;") - public static JagString MEMBERS_OBJECT = ENG_MEMBERS_OBJECT; + @OriginalMember(owner = "client!qc", name = "Y", descriptor = "Lclient!na;") + public static JagString MEMBERS_OBJECT = ENG_MEMBERS_OBJECT; - @OriginalMember(owner = "client!si", name = "db", descriptor = "Lclient!na;") - public static JagString TAKE = ENG_TAKE; + @OriginalMember(owner = "client!si", name = "db", descriptor = "Lclient!na;") + public static JagString TAKE = ENG_TAKE; - @OriginalMember(owner = "client!ni", name = "j", descriptor = "Lclient!na;") - public static JagString MAINLOAD110B = ENG_MAINLOAD110B; + @OriginalMember(owner = "client!ni", name = "j", descriptor = "Lclient!na;") + public static JagString MAINLOAD110B = ENG_MAINLOAD110B; - @OriginalMember(owner = "client!ib", name = "j", descriptor = "Lclient!na;") - public static JagString WALKHERE = ENG_WALKHERE; + @OriginalMember(owner = "client!ib", name = "j", descriptor = "Lclient!na;") + public static JagString WALKHERE = ENG_WALKHERE; - @OriginalMember(owner = "client!qk", name = "i", descriptor = "Lclient!na;") - public static JagString MINISEPARATOR = ENG_MINISEPARATOR; + @OriginalMember(owner = "client!qk", name = "i", descriptor = "Lclient!na;") + public static JagString MINISEPARATOR = ENG_MINISEPARATOR; - @OriginalMember(owner = "client!gi", name = "b", descriptor = "Lclient!na;") - public static JagString UNABLETOFIND = ENG_UNABLETOFIND; + @OriginalMember(owner = "client!gi", name = "b", descriptor = "Lclient!na;") + public static JagString UNABLETOFIND = ENG_UNABLETOFIND; - @OriginalMember(owner = "client!nb", name = "c", descriptor = "Lclient!na;") - public static JagString IGNORECANTADDSELF = ENG_IGNORECANTADDSELF; + @OriginalMember(owner = "client!nb", name = "c", descriptor = "Lclient!na;") + public static JagString IGNORECANTADDSELF = ENG_IGNORECANTADDSELF; - @OriginalMember(owner = "client!ph", name = "d", descriptor = "Lclient!na;") - public static JagString OK = ENG_OK; + @OriginalMember(owner = "client!ph", name = "d", descriptor = "Lclient!na;") + public static JagString OK = ENG_OK; - @OriginalMember(owner = "client!rg", name = "E", descriptor = "Lclient!na;") - public static JagString MAINLOAD150B = ENG_MAINLOAD150B; + @OriginalMember(owner = "client!rg", name = "E", descriptor = "Lclient!na;") + public static JagString MAINLOAD150B = ENG_MAINLOAD150B; - @OriginalMember(owner = "client!rc", name = "s", descriptor = "Lclient!na;") - public static JagString REMOVEIGNORE = ENG_REMOVEIGNORE; + @OriginalMember(owner = "client!rc", name = "s", descriptor = "Lclient!na;") + public static JagString REMOVEIGNORE = ENG_REMOVEIGNORE; - @OriginalMember(owner = "client!tm", name = "p", descriptor = "Lclient!na;") - public static JagString CHATCOL7 = ENG_CHATCOL7; + @OriginalMember(owner = "client!tm", name = "p", descriptor = "Lclient!na;") + public static JagString CHATCOL7 = ENG_CHATCOL7; - @OriginalMember(owner = "client!ta", name = "w", descriptor = "Lclient!na;") - public static JagString CHOOSE_OPTION = ENG_CHOOSE_OPTION; + @OriginalMember(owner = "client!ta", name = "w", descriptor = "Lclient!na;") + public static JagString CHOOSE_OPTION = ENG_CHOOSE_OPTION; - @OriginalMember(owner = "client!vf", name = "i", descriptor = "Lclient!na;") - public static JagString CHATCOL10 = ENG_CHATCOL10; + @OriginalMember(owner = "client!vf", name = "i", descriptor = "Lclient!na;") + public static JagString CHATCOL10 = ENG_CHATCOL10; - @OriginalMember(owner = "client!vf", name = "e", descriptor = "Lclient!na;") - public static JagString ATTEMPT_TO_REESTABLISH = ENG_ATTEMPT_TO_REESTABLISH; + @OriginalMember(owner = "client!vf", name = "e", descriptor = "Lclient!na;") + public static JagString ATTEMPT_TO_REESTABLISH = ENG_ATTEMPT_TO_REESTABLISH; - @OriginalMember(owner = "client!ig", name = "g", descriptor = "Lclient!na;") - public static JagString CONTINUE = ENG_CONTINUE; + @OriginalMember(owner = "client!ig", name = "g", descriptor = "Lclient!na;") + public static JagString CONTINUE = ENG_CONTINUE; - @OriginalMember(owner = "client!sc", name = "r", descriptor = "Lclient!na;") - public static JagString MAINLOAD80B = ENG_MAINLOAD80B; + @OriginalMember(owner = "client!sc", name = "r", descriptor = "Lclient!na;") + public static JagString MAINLOAD80B = ENG_MAINLOAD80B; - @OriginalMember(owner = "client!r", name = "a", descriptor = "Lclient!na;") - public static JagString MAINLOAD135 = ENG_MAINLOAD135; + @OriginalMember(owner = "client!r", name = "a", descriptor = "Lclient!na;") + public static JagString MAINLOAD135 = ENG_MAINLOAD135; - @OriginalMember(owner = "client!sa", name = "X", descriptor = "Lclient!na;") - public static JagString USE = ENG_USE; + @OriginalMember(owner = "client!sa", name = "X", descriptor = "Lclient!na;") + public static JagString USE = ENG_USE; - @OriginalMember(owner = "client!ub", name = "e", descriptor = "Lclient!na;") - public static JagString MAINLOAD90 = ENG_MAINLOAD90; + @OriginalMember(owner = "client!ub", name = "e", descriptor = "Lclient!na;") + public static JagString MAINLOAD90 = ENG_MAINLOAD90; - @OriginalMember(owner = "client!hd", name = "f", descriptor = "Lclient!na;") - public static JagString CHATCOL4 = ENG_CHATCOL4; + @OriginalMember(owner = "client!hd", name = "f", descriptor = "Lclient!na;") + public static JagString CHATCOL4 = ENG_CHATCOL4; - @OriginalMember(owner = "client!hd", name = "c", descriptor = "Lclient!na;") - public static JagString FRIENDLOGOUT = ENG_FRIENDLOGOUT; + @OriginalMember(owner = "client!hd", name = "c", descriptor = "Lclient!na;") + public static JagString FRIENDLOGOUT = ENG_FRIENDLOGOUT; - @OriginalMember(owner = "client!nh", name = "W", descriptor = "Lclient!na;") - public static JagString LOADING = ENG_LOADING; + @OriginalMember(owner = "client!nh", name = "W", descriptor = "Lclient!na;") + public static JagString LOADING = ENG_LOADING; - @OriginalMember(owner = "client!h", name = "zb", descriptor = "Lclient!na;") - public static JagString CHATCOL2 = ENG_CHATCOL2; + @OriginalMember(owner = "client!h", name = "zb", descriptor = "Lclient!na;") + public static JagString CHATCOL2 = ENG_CHATCOL2; - @OriginalMember(owner = "client!wa", name = "eb", descriptor = "Lclient!na;") - public static JagString MAINLOAD130B = ENG_MAINLOAD130B; + @OriginalMember(owner = "client!wa", name = "eb", descriptor = "Lclient!na;") + public static JagString MAINLOAD130B = ENG_MAINLOAD130B; - @OriginalMember(owner = "client!u", name = "f", descriptor = "Lclient!na;") - public static JagString IGNORELISTFULL = ENG_IGNORELISTFULL; + @OriginalMember(owner = "client!u", name = "f", descriptor = "Lclient!na;") + public static JagString IGNORELISTFULL = ENG_IGNORELISTFULL; - @OriginalMember(owner = "client!sm", name = "d", descriptor = "Lclient!na;") - public static JagString CONLOST = ENG_CONLOST; + @OriginalMember(owner = "client!sm", name = "d", descriptor = "Lclient!na;") + public static JagString CONLOST = ENG_CONLOST; - @OriginalMember(owner = "client!il", name = "M", descriptor = "Lclient!na;") - public static JagString MAINLOAD10B = ENG_MAINLOAD10B; + @OriginalMember(owner = "client!il", name = "M", descriptor = "Lclient!na;") + public static JagString MAINLOAD10B = ENG_MAINLOAD10B; - @OriginalMember(owner = "client!wb", name = "h", descriptor = "Lclient!na;") - public static JagString CANCEL = ENG_CANCEL; + @OriginalMember(owner = "client!wb", name = "h", descriptor = "Lclient!na;") + public static JagString CANCEL = ENG_CANCEL; - @OriginalMember(owner = "client!t", name = "D", descriptor = "Lclient!na;") - public static JagString FRIENDLISTFULL = ENG_FRIENDLISTFULL; + @OriginalMember(owner = "client!t", name = "D", descriptor = "Lclient!na;") + public static JagString FRIENDLISTFULL = ENG_FRIENDLISTFULL; - @OriginalMember(owner = "client!km", name = "Dc", descriptor = "Lclient!na;") - public static JagString CHATCOL8 = ENG_CHATCOL8; + @OriginalMember(owner = "client!km", name = "Dc", descriptor = "Lclient!na;") + public static JagString CHATCOL8 = ENG_CHATCOL8; - @OriginalMember(owner = "client!mg", name = "W", descriptor = "Lclient!na;") - public static JagString CHATCOL6 = ENG_CHATCOL6; + @OriginalMember(owner = "client!mg", name = "W", descriptor = "Lclient!na;") + public static JagString CHATCOL6 = ENG_CHATCOL6; - @OriginalMember(owner = "client!kd", name = "Ab", descriptor = "Lclient!na;") - public static JagString MAINLOAD0 = ENG_MAINLOAD0; + @OriginalMember(owner = "client!kd", name = "Ab", descriptor = "Lclient!na;") + public static JagString MAINLOAD0 = ENG_MAINLOAD0; - @OriginalMember(owner = "client!rm", name = "j", descriptor = "Lclient!na;") - public static JagString CHATEFFECT3 = ENG_CHATEFFECT3; + @OriginalMember(owner = "client!rm", name = "j", descriptor = "Lclient!na;") + public static JagString CHATEFFECT3 = ENG_CHATEFFECT3; - @OriginalMember(owner = "client!pm", name = "fb", descriptor = "Lclient!na;") - public static JagString REMOVEFRIEND = ENG_REMOVEFRIEND; + @OriginalMember(owner = "client!pm", name = "fb", descriptor = "Lclient!na;") + public static JagString REMOVEFRIEND = ENG_REMOVEFRIEND; - @OriginalMember(owner = "client!tl", name = "h", descriptor = "Lclient!na;") - public static JagString MAINLOAD50B = ENG_MAINLOAD50B; + @OriginalMember(owner = "client!tl", name = "h", descriptor = "Lclient!na;") + public static JagString MAINLOAD50B = ENG_MAINLOAD50B; - @OriginalMember(owner = "client!dm", name = "d", descriptor = "Lclient!na;") - public static JagString MAINLOAD60 = ENG_MAINLOAD60; + @OriginalMember(owner = "client!dm", name = "d", descriptor = "Lclient!na;") + public static JagString MAINLOAD60 = ENG_MAINLOAD60; - @OriginalMember(owner = "client!se", name = "v", descriptor = "Lclient!na;") - public static JagString MAINLOAD45B = ENG_MAINLOAD45B; + @OriginalMember(owner = "client!se", name = "v", descriptor = "Lclient!na;") + public static JagString MAINLOAD45B = ENG_MAINLOAD45B; - @OriginalMember(owner = "client!se", name = "k", descriptor = "Lclient!na;") - public static JagString SELECT = ENG_SELECT; + @OriginalMember(owner = "client!se", name = "k", descriptor = "Lclient!na;") + public static JagString SELECT = ENG_SELECT; - @OriginalMember(owner = "client!li", name = "i", descriptor = "Lclient!na;") - public static JagString MAINLOAD120 = ENG_MAINLOAD120; + @OriginalMember(owner = "client!li", name = "i", descriptor = "Lclient!na;") + public static JagString MAINLOAD120 = ENG_MAINLOAD120; - @OriginalMember(owner = "client!li", name = "f", descriptor = "Lclient!na;") - public static JagString EXAMINE = ENG_EXAMINE; + @OriginalMember(owner = "client!li", name = "f", descriptor = "Lclient!na;") + public static JagString EXAMINE = ENG_EXAMINE; - @OriginalMember(owner = "client!gm", name = "cb", descriptor = "Lclient!na;") - public static JagString MAINLOAD90B = ENG_MAINLOAD90B; + @OriginalMember(owner = "client!gm", name = "cb", descriptor = "Lclient!na;") + public static JagString MAINLOAD90B = ENG_MAINLOAD90B; - @OriginalMember(owner = "client!ii", name = "q", descriptor = "Lclient!na;") - public static JagString FRIENDCANTADDSELF = ENG_FRIENDCANTADDSELF; + @OriginalMember(owner = "client!ii", name = "q", descriptor = "Lclient!na;") + public static JagString FRIENDCANTADDSELF = ENG_FRIENDCANTADDSELF; - @OriginalMember(owner = "client!pl", name = "g", descriptor = "Lclient!na;") - public static JagString MAINLOAD120B = ENG_MAINLOAD120B; + @OriginalMember(owner = "client!pl", name = "g", descriptor = "Lclient!na;") + public static JagString MAINLOAD120B = ENG_MAINLOAD120B; - @OriginalMember(owner = "client!ol", name = "db", descriptor = "Lclient!na;") - public static JagString IGNORELISTDUPE = ENG_IGNORELISTDUPE; + @OriginalMember(owner = "client!ol", name = "db", descriptor = "Lclient!na;") + public static JagString IGNORELISTDUPE = ENG_IGNORELISTDUPE; - @OriginalMember(owner = "client!lk", name = "X", descriptor = "Lclient!na;") - public static JagString MAINLOAD50 = ENG_MAINLOAD50; + @OriginalMember(owner = "client!lk", name = "X", descriptor = "Lclient!na;") + public static JagString MAINLOAD50 = ENG_MAINLOAD50; - @OriginalMember(owner = "client!lk", name = "ab", descriptor = "Lclient!na;") - public static JagString FRIENDLISTDUPE = ENG_FRIENDLISTDUPE; + @OriginalMember(owner = "client!lk", name = "ab", descriptor = "Lclient!na;") + public static JagString FRIENDLISTDUPE = ENG_FRIENDLISTDUPE; - @OriginalMember(owner = "client!pg", name = "hb", descriptor = "Lclient!na;") - public static JagString CHATEFFECT2 = ENG_CHATEFFECT2; + @OriginalMember(owner = "client!pg", name = "hb", descriptor = "Lclient!na;") + public static JagString CHATEFFECT2 = ENG_CHATEFFECT2; - @OriginalMember(owner = "client!od", name = "h", descriptor = "Lclient!na;") - public static JagString MAINLOAD30B = ENG_MAINLOAD30B; + @OriginalMember(owner = "client!od", name = "h", descriptor = "Lclient!na;") + public static JagString MAINLOAD30B = ENG_MAINLOAD30B; - @OriginalMember(owner = "client!na", name = "D", descriptor = "Lclient!na;") - public static JagString MAINLOAD0B = ENG_MAINLOAD0B; + @OriginalMember(owner = "client!na", name = "D", descriptor = "Lclient!na;") + public static JagString MAINLOAD0B = ENG_MAINLOAD0B; - @OriginalMember(owner = "client!fk", name = "h", descriptor = "Lclient!na;") - public static JagString REMOVESOCIAL1 = ENG_REMOVESOCIAL; + @OriginalMember(owner = "client!fk", name = "h", descriptor = "Lclient!na;") + public static JagString REMOVESOCIAL1 = ENG_REMOVESOCIAL; - @OriginalMember(owner = "client!ui", name = "Y", descriptor = "Lclient!na;") - public static JagString ATTACK = ENG_ATTACK; + @OriginalMember(owner = "client!ui", name = "Y", descriptor = "Lclient!na;") + public static JagString ATTACK = ENG_ATTACK; - @OriginalMember(owner = "client!ui", name = "V", descriptor = "Lclient!na;") - public static JagString MOREOPTIONS = ENG_MOREOPTIONS; + @OriginalMember(owner = "client!ui", name = "V", descriptor = "Lclient!na;") + public static JagString MOREOPTIONS = ENG_MOREOPTIONS; - @OriginalMember(owner = "client!fn", name = "R", descriptor = "Lclient!na;") - public static JagString MAINLOAD70B = ENG_MAINLOAD70B; + @OriginalMember(owner = "client!fn", name = "R", descriptor = "Lclient!na;") + public static JagString MAINLOAD70B = ENG_MAINLOAD70B; - @OriginalMember(owner = "client!fk", name = "o", descriptor = "Lclient!na;") - public static JagString REMOVESOCIAL2 = ENG_REMOVESOCIAL; + @OriginalMember(owner = "client!fk", name = "o", descriptor = "Lclient!na;") + public static JagString REMOVESOCIAL2 = ENG_REMOVESOCIAL; - @OriginalMember(owner = "client!fh", name = "bb", descriptor = "Lclient!na;") - public static JagString MILLION_SHORT = ENG_MILLION_SUFFIX; + @OriginalMember(owner = "client!fh", name = "bb", descriptor = "Lclient!na;") + public static JagString MILLION_SHORT = ENG_MILLION_SUFFIX; - @OriginalMember(owner = "client!fh", name = "T", descriptor = "Lclient!na;") - public static JagString MILLION = ENG_MILLION_SUFFIX; + @OriginalMember(owner = "client!fh", name = "T", descriptor = "Lclient!na;") + public static JagString MILLION = ENG_MILLION_SUFFIX; - @OriginalMember(owner = "client!eg", name = "z", descriptor = "Lclient!na;") - public static JagString CHATEFFECT5 = ENG_CHATEFFECT5; + @OriginalMember(owner = "client!eg", name = "z", descriptor = "Lclient!na;") + public static JagString CHATEFFECT5 = ENG_CHATEFFECT5; - @OriginalMember(owner = "client!ef", name = "q", descriptor = "Lclient!na;") - public static JagString LEVEL = ENG_LEVEL; + @OriginalMember(owner = "client!ef", name = "q", descriptor = "Lclient!na;") + public static JagString LEVEL = ENG_LEVEL; - @OriginalMember(owner = "client!ef", name = "n", descriptor = "Lclient!na;") - public static JagString SKILL = ENG_SKILL; + @OriginalMember(owner = "client!ef", name = "n", descriptor = "Lclient!na;") + public static JagString SKILL = ENG_SKILL; - @OriginalMember(owner = "client!ef", name = "o", descriptor = "Lclient!na;") - public static JagString CHATEFFECT4 = ENG_CHATEFFECT4; + @OriginalMember(owner = "client!ef", name = "o", descriptor = "Lclient!na;") + public static JagString CHATEFFECT4 = ENG_CHATEFFECT4; - @OriginalMember(owner = "client!ec", name = "k", descriptor = "Lclient!na;") - public static JagString GAME0_LOADING = ENG_GAME0_LOADING; + @OriginalMember(owner = "client!ec", name = "k", descriptor = "Lclient!na;") + public static JagString GAME0_LOADING = ENG_GAME0_LOADING; - @OriginalMember(owner = "client!ea", name = "p", descriptor = "Lclient!na;") - public static JagString TRADEREQ = ENG_TRADEREQ; + @OriginalMember(owner = "client!ea", name = "p", descriptor = "Lclient!na;") + public static JagString TRADEREQ = ENG_TRADEREQ; - @OriginalMember(owner = "client!dm", name = "e", descriptor = "Lclient!na;") - public static JagString LOADINGDOTDOTDOT = ENG_LOADINGDOTDOTDOT; + @OriginalMember(owner = "client!dm", name = "e", descriptor = "Lclient!na;") + public static JagString LOADINGDOTDOTDOT = ENG_LOADINGDOTDOTDOT; - @OriginalMember(owner = "client!dl", name = "k", descriptor = "Lclient!na;") - public static JagString MAINLOAD65B = ENG_MAINLOAD65B; + @OriginalMember(owner = "client!dl", name = "k", descriptor = "Lclient!na;") + public static JagString MAINLOAD65B = ENG_MAINLOAD65B; - @OriginalMember(owner = "client!dc", name = "hb", descriptor = "Lclient!na;") - public static JagString CHATEFFECT1 = ENG_CHATEFFECT1; + @OriginalMember(owner = "client!dc", name = "hb", descriptor = "Lclient!na;") + public static JagString CHATEFFECT1 = ENG_CHATEFFECT1; - @OriginalMember(owner = "client!dc", name = "Y", descriptor = "Lclient!na;") - public static JagString DROP = ENG_DROP; + @OriginalMember(owner = "client!dc", name = "Y", descriptor = "Lclient!na;") + public static JagString DROP = ENG_DROP; - @OriginalMember(owner = "client!d", name = "gb", descriptor = "Lclient!na;") - public static JagString CLOSE = ENG_CLOSE; + @OriginalMember(owner = "client!d", name = "gb", descriptor = "Lclient!na;") + public static JagString CLOSE = ENG_CLOSE; - @OriginalMember(owner = "client!cn", name = "q", descriptor = "Lclient!na;") - public static JagString MAINLOAD140 = ENG_MAINLOAD140; + @OriginalMember(owner = "client!cn", name = "q", descriptor = "Lclient!na;") + public static JagString MAINLOAD140 = ENG_MAINLOAD140; - @OriginalMember(owner = "client!client", name = "X", descriptor = "Lclient!na;") - public static JagString CHATCOL3 = ENG_CHATCOL3; + @OriginalMember(owner = "client!client", name = "X", descriptor = "Lclient!na;") + public static JagString CHATCOL3 = ENG_CHATCOL3; - @OriginalMember(owner = "client!cl", name = "T", descriptor = "Lclient!na;") - public static JagString THOUSAND_SHORT = ENG_THOUSAND_SUFFIX; + @OriginalMember(owner = "client!cl", name = "T", descriptor = "Lclient!na;") + public static JagString THOUSAND_SHORT = ENG_THOUSAND_SUFFIX; - @OriginalMember(owner = "client!cl", name = "Q", descriptor = "Lclient!na;") - public static JagString THOUSAND = ENG_THOUSAND_SUFFIX; + @OriginalMember(owner = "client!cl", name = "Q", descriptor = "Lclient!na;") + public static JagString THOUSAND = ENG_THOUSAND_SUFFIX; - @OriginalMember(owner = "client!ck", name = "y", descriptor = "Lclient!na;") - public static JagString MAINLOAD135B = ENG_MAINLOAD135B; + @OriginalMember(owner = "client!ck", name = "y", descriptor = "Lclient!na;") + public static JagString MAINLOAD135B = ENG_MAINLOAD135B; - @OriginalMember(owner = "client!ck", name = "i", descriptor = "Lclient!na;") - public static JagString LENT_ITEM_RETURN = ENG_LENT_ITEM_RETURN; + @OriginalMember(owner = "client!ck", name = "i", descriptor = "Lclient!na;") + public static JagString LENT_ITEM_RETURN = ENG_LENT_ITEM_RETURN; - @OriginalMember(owner = "client!cb", name = "db", descriptor = "Lclient!na;") - public static JagString MAINLOAD60B = ENG_MAINLOAD60B; + @OriginalMember(owner = "client!cb", name = "db", descriptor = "Lclient!na;") + public static JagString MAINLOAD60B = ENG_MAINLOAD60B; - @OriginalMember(owner = "client!c", name = "Z", descriptor = "Lclient!na;") - public static JagString FRIENDLOGIN = ENG_FRIENDLOGIN; + @OriginalMember(owner = "client!c", name = "Z", descriptor = "Lclient!na;") + public static JagString FRIENDLOGIN = ENG_FRIENDLOGIN; - @OriginalMember(owner = "client!bm", name = "l", descriptor = "Lclient!na;") - public static JagString CHECKING_FOR_UPDATES = ENG_CHECKING_FOR_UPDATES; + @OriginalMember(owner = "client!bm", name = "l", descriptor = "Lclient!na;") + public static JagString CHECKING_FOR_UPDATES = ENG_CHECKING_FOR_UPDATES; - @OriginalMember(owner = "client!bk", name = "L", descriptor = "Lclient!na;") - public static JagString CHATCOL0 = ENG_CHATCOL0; + @OriginalMember(owner = "client!bk", name = "L", descriptor = "Lclient!na;") + public static JagString CHATCOL0 = ENG_CHATCOL0; - @OriginalMember(owner = "client!bk", name = "N", descriptor = "Lclient!na;") - public static JagString MAINLOAD70 = ENG_MAINLOAD70; + @OriginalMember(owner = "client!bk", name = "N", descriptor = "Lclient!na;") + public static JagString MAINLOAD70 = ENG_MAINLOAD70; - @OriginalMember(owner = "client!bj", name = "q", descriptor = "Lclient!na;") - public static JagString PLEASEWAIT = ENG_PLEASEWAIT; + @OriginalMember(owner = "client!bj", name = "q", descriptor = "Lclient!na;") + public static JagString PLEASEWAIT = ENG_PLEASEWAIT; - @OriginalMember(owner = "client!bg", name = "P", descriptor = "Lclient!na;") - public static JagString MAINLOAD130 = ENG_MAINLOAD130; + @OriginalMember(owner = "client!bg", name = "P", descriptor = "Lclient!na;") + public static JagString MAINLOAD130 = ENG_MAINLOAD130; - @OriginalMember(owner = "client!bf", name = "D", descriptor = "Lclient!na;") - public static JagString CHATCOL5 = ENG_CHATCOL5; + @OriginalMember(owner = "client!bf", name = "D", descriptor = "Lclient!na;") + public static JagString CHATCOL5 = ENG_CHATCOL5; - @OriginalMember(owner = "client!ba", name = "z", descriptor = "Lclient!na;") - public static JagString MAINLOAD40B = ENG_MAINLOAD40B; + @OriginalMember(owner = "client!ba", name = "z", descriptor = "Lclient!na;") + public static JagString MAINLOAD40B = ENG_MAINLOAD40B; - @OriginalMember(owner = "client!an", name = "cb", descriptor = "Lclient!na;") - public static JagString HIDDEN = ENG_HIDDEN; + @OriginalMember(owner = "client!an", name = "cb", descriptor = "Lclient!na;") + public static JagString HIDDEN = ENG_HIDDEN; - @OriginalMember(owner = "client!ah", name = "q", descriptor = "Lclient!na;") - public static JagString CHATCOL11 = ENG_CHATCOL11; + @OriginalMember(owner = "client!ah", name = "q", descriptor = "Lclient!na;") + public static JagString CHATCOL11 = ENG_CHATCOL11; - @OriginalMember(owner = "client!aa", name = "g", descriptor = "Lclient!na;") - public static JagString CHATCOL9 = ENG_CHATCOL9; - //endregion + @OriginalMember(owner = "client!aa", name = "g", descriptor = "Lclient!na;") + public static JagString CHATCOL9 = ENG_CHATCOL9; + //endregion - // TODO: unsorted - //region German Translations - @OriginalMember(owner = "client!vk", name = "l", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD135 = JagString.parse("Lade Liste der Welten"); + // TODO: unsorted + //region German Translations + @OriginalMember(owner = "client!vk", name = "l", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD135 = JagString.parse("Lade Liste der Welten"); - @OriginalMember(owner = "client!eg", name = "A", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD80B = JagString.parse("Sprites geladen)3"); + @OriginalMember(owner = "client!eg", name = "A", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD80B = JagString.parse("Sprites geladen)3"); - @OriginalMember(owner = "client!eh", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_TRADEREQ = JagString.parse("m-Ochte mit Ihnen handeln)3"); + @OriginalMember(owner = "client!eh", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_TRADEREQ = JagString.parse("m-Ochte mit Ihnen handeln)3"); - @OriginalMember(owner = "client!eh", name = "i", descriptor = "Lclient!na;") - public static final JagString GER_REMOVEFRIEND = JagString.parse(" zuerst von Ihrer Freunde)2Liste(Q"); + @OriginalMember(owner = "client!eh", name = "i", descriptor = "Lclient!na;") + public static final JagString GER_REMOVEFRIEND = JagString.parse(" zuerst von Ihrer Freunde)2Liste(Q"); - @OriginalMember(owner = "client!ed", name = "r", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD120B = JagString.parse("Wordpack geladen)3"); + @OriginalMember(owner = "client!ed", name = "r", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD120B = JagString.parse("Wordpack geladen)3"); - @OriginalMember(owner = "client!dk", name = "i", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL6 = JagString.parse("blinken1:"); + @OriginalMember(owner = "client!dk", name = "i", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL6 = JagString.parse("blinken1:"); - @OriginalMember(owner = "client!dm", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_REMOVESOCIAL = JagString.parse("Bitte entfernen Sie "); + @OriginalMember(owner = "client!dm", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_REMOVESOCIAL = JagString.parse("Bitte entfernen Sie "); - @OriginalMember(owner = "client!ck", name = "c", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD70 = JagString.parse("Lade Konfiguration )2 "); + @OriginalMember(owner = "client!ck", name = "c", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD70 = JagString.parse("Lade Konfiguration )2 "); - @OriginalMember(owner = "client!cm", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_CONLOST = JagString.parse("Verbindung abgebrochen)3"); + @OriginalMember(owner = "client!cm", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_CONLOST = JagString.parse("Verbindung abgebrochen)3"); - @OriginalMember(owner = "client!cn", name = "s", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL4 = JagString.parse("lila:"); + @OriginalMember(owner = "client!cn", name = "s", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL4 = JagString.parse("lila:"); - @OriginalMember(owner = "client!cn", name = "C", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL1 = JagString.parse("rot:"); + @OriginalMember(owner = "client!cn", name = "C", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL1 = JagString.parse("rot:"); - @OriginalMember(owner = "client!cd", name = "y", descriptor = "Lclient!na;") - public static final JagString GER_CHECKING_FOR_UPDATES = JagString.parse("Suche nach Updates )2 "); + @OriginalMember(owner = "client!cd", name = "y", descriptor = "Lclient!na;") + public static final JagString GER_CHECKING_FOR_UPDATES = JagString.parse("Suche nach Updates )2 "); - @OriginalMember(owner = "client!cd", name = "D", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD120 = JagString.parse("Lade Wordpack )2 "); + @OriginalMember(owner = "client!cd", name = "D", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD120 = JagString.parse("Lade Wordpack )2 "); - @OriginalMember(owner = "client!ce", name = "m", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD90 = JagString.parse("Lade Texturen )2 "); + @OriginalMember(owner = "client!ce", name = "m", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD90 = JagString.parse("Lade Texturen )2 "); - @OriginalMember(owner = "client!cg", name = "d", descriptor = "Lclient!na;") - public static final JagString GER_LENT_ITEM_RETURN = JagString.parse("Ablegen"); + @OriginalMember(owner = "client!cg", name = "d", descriptor = "Lclient!na;") + public static final JagString GER_LENT_ITEM_RETURN = JagString.parse("Ablegen"); - @OriginalMember(owner = "client!bj", name = "p", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD70B = JagString.parse("Konfig geladen)3"); + @OriginalMember(owner = "client!bj", name = "p", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD70B = JagString.parse("Konfig geladen)3"); - @OriginalMember(owner = "client!bj", name = "U", descriptor = "Lclient!na;") - public static final JagString GER_CHATEFFECT2 = JagString.parse("welle2:"); + @OriginalMember(owner = "client!bj", name = "U", descriptor = "Lclient!na;") + public static final JagString GER_CHATEFFECT2 = JagString.parse("welle2:"); - @OriginalMember(owner = "client!bk", name = "P", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD0 = JagString.parse("Speicher wird zugewiesen)3"); + @OriginalMember(owner = "client!bk", name = "P", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD0 = JagString.parse("Speicher wird zugewiesen)3"); - @OriginalMember(owner = "client!bd", name = "d", descriptor = "Lclient!na;") - public static final JagString GER_SELECT = JagString.parse("Ausw-=hlen"); + @OriginalMember(owner = "client!bd", name = "d", descriptor = "Lclient!na;") + public static final JagString GER_SELECT = JagString.parse("Ausw-=hlen"); - @OriginalMember(owner = "client!bb", name = "N", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL0 = JagString.parse("gelb:"); + @OriginalMember(owner = "client!bb", name = "N", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL0 = JagString.parse("gelb:"); - @OriginalMember(owner = "client!an", name = "eb", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD50 = JagString.parse("Lade Schrifts-=tze )2 "); + @OriginalMember(owner = "client!an", name = "eb", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD50 = JagString.parse("Lade Schrifts-=tze )2 "); - @OriginalMember(owner = "client!ba", name = "E", descriptor = "Lclient!na;") - public static final JagString GER_LEVEL = JagString.parse("Stufe: "); + @OriginalMember(owner = "client!ba", name = "E", descriptor = "Lclient!na;") + public static final JagString GER_LEVEL = JagString.parse("Stufe: "); - @OriginalMember(owner = "client!af", name = "f", descriptor = "Lclient!na;") - public static final JagString GER_MEMBERS_OBJECT = JagString.parse("Gegenstand f-Ur Mitglieder"); + @OriginalMember(owner = "client!af", name = "f", descriptor = "Lclient!na;") + public static final JagString GER_MEMBERS_OBJECT = JagString.parse("Gegenstand f-Ur Mitglieder"); - @OriginalMember(owner = "client!be", name = "Zc", descriptor = "Lclient!na;") - public static final JagString GER_TAKE = JagString.parse("Nehmen"); + @OriginalMember(owner = "client!be", name = "Zc", descriptor = "Lclient!na;") + public static final JagString GER_TAKE = JagString.parse("Nehmen"); - @OriginalMember(owner = "client!se", name = "s", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD110B = JagString.parse("Eingabeprozedur geladen)3"); + @OriginalMember(owner = "client!se", name = "s", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD110B = JagString.parse("Eingabeprozedur geladen)3"); - @OriginalMember(owner = "client!gm", name = "eb", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD80 = JagString.parse("Lade Sprites )2 "); + @OriginalMember(owner = "client!gm", name = "eb", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD80 = JagString.parse("Lade Sprites )2 "); - @OriginalMember(owner = "client!qj", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD90B = JagString.parse("Texturen geladen)3"); + @OriginalMember(owner = "client!qj", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD90B = JagString.parse("Texturen geladen)3"); - @OriginalMember(owner = "client!rb", name = "e", descriptor = "Lclient!na;") - public static final JagString GER_HIDDEN = JagString.parse("Versteckt"); + @OriginalMember(owner = "client!rb", name = "e", descriptor = "Lclient!na;") + public static final JagString GER_HIDDEN = JagString.parse("Versteckt"); - @OriginalMember(owner = "client!tk", name = "x", descriptor = "Lclient!na;") - public static final JagString GER_FRIENDLISTDUPE = JagString.parse(" steht bereits auf Ihrer Freunde)2Liste(Q"); + @OriginalMember(owner = "client!tk", name = "x", descriptor = "Lclient!na;") + public static final JagString GER_FRIENDLISTDUPE = JagString.parse(" steht bereits auf Ihrer Freunde)2Liste(Q"); - @OriginalMember(owner = "client!nk", name = "o", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD65B = JagString.parse("Titelbild ge-Offnet)3"); + @OriginalMember(owner = "client!nk", name = "o", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD65B = JagString.parse("Titelbild ge-Offnet)3"); - @OriginalMember(owner = "client!nm", name = "R", descriptor = "Lclient!na;") - public static final JagString GER_CLOSE = JagString.parse("Schlie-8en"); + @OriginalMember(owner = "client!nm", name = "R", descriptor = "Lclient!na;") + public static final JagString GER_CLOSE = JagString.parse("Schlie-8en"); - @OriginalMember(owner = "client!s", name = "j", descriptor = "Lclient!na;") - public static final JagString GER_FRIENDCANTADDSELF = JagString.parse("Sie k-Onnen sich selbst nicht auf Ihre Freunde)2Liste setzen(Q"); + @OriginalMember(owner = "client!s", name = "j", descriptor = "Lclient!na;") + public static final JagString GER_FRIENDCANTADDSELF = JagString.parse("Sie k-Onnen sich selbst nicht auf Ihre Freunde)2Liste setzen(Q"); - @OriginalMember(owner = "client!oe", name = "k", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL11 = JagString.parse("leuchten3:"); + @OriginalMember(owner = "client!oe", name = "k", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL11 = JagString.parse("leuchten3:"); - @OriginalMember(owner = "client!pg", name = "W", descriptor = "Lclient!na;") - public static final JagString GER_FRIENDLOGIN = JagString.parse(" loggt sich ein)3"); + @OriginalMember(owner = "client!pg", name = "W", descriptor = "Lclient!na;") + public static final JagString GER_FRIENDLOGIN = JagString.parse(" loggt sich ein)3"); - @OriginalMember(owner = "client!pg", name = "Y", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL9 = JagString.parse("leuchten1:"); + @OriginalMember(owner = "client!pg", name = "Y", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL9 = JagString.parse("leuchten1:"); - @OriginalMember(owner = "client!g", name = "b", descriptor = "Lclient!na;") - public static final JagString GER_FRIENDLISTFULL = JagString.parse("Ihre Freunde)2Liste ist voll(Q Maximale Eintr-=ge: Mitglieder 200)4freie Spieler 100"); + @OriginalMember(owner = "client!g", name = "b", descriptor = "Lclient!na;") + public static final JagString GER_FRIENDLISTFULL = JagString.parse("Ihre Freunde)2Liste ist voll(Q Maximale Eintr-=ge: Mitglieder 200)4freie Spieler 100"); - @OriginalMember(owner = "client!ui", name = "hb", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD50B = JagString.parse("Schrifts-=tze geladen)3"); + @OriginalMember(owner = "client!ui", name = "hb", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD50B = JagString.parse("Schrifts-=tze geladen)3"); - @OriginalMember(owner = "client!na", name = "p", descriptor = "Lclient!na;") - public static final JagString GER_ATTEMPT_TO_REESTABLISH = JagString.parse("Bitte warten Sie )2 es wird versucht)1 die Verbindung wiederherzustellen)3"); + @OriginalMember(owner = "client!na", name = "p", descriptor = "Lclient!na;") + public static final JagString GER_ATTEMPT_TO_REESTABLISH = JagString.parse("Bitte warten Sie )2 es wird versucht)1 die Verbindung wiederherzustellen)3"); - @OriginalMember(owner = "client!fc", name = "d", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD130 = JagString.parse("Lade Benutzeroberfl-=che )2 "); + @OriginalMember(owner = "client!fc", name = "d", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD130 = JagString.parse("Lade Benutzeroberfl-=che )2 "); - @OriginalMember(owner = "client!em", name = "A", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL8 = JagString.parse("blinken3:"); + @OriginalMember(owner = "client!em", name = "A", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL8 = JagString.parse("blinken3:"); - @OriginalMember(owner = "client!q", name = "b", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD30B = JagString.parse("Verbindung zum Update)2Server hergestellt)3"); + @OriginalMember(owner = "client!q", name = "b", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD30B = JagString.parse("Verbindung zum Update)2Server hergestellt)3"); - @OriginalMember(owner = "client!gi", name = "l", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL3 = JagString.parse("blaugr-Un:"); + @OriginalMember(owner = "client!gi", name = "l", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL3 = JagString.parse("blaugr-Un:"); - @OriginalMember(owner = "client!jm", name = "w", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD150B = JagString.parse("3D)2Softwarebibliothek gestartet)3"); + @OriginalMember(owner = "client!jm", name = "w", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD150B = JagString.parse("3D)2Softwarebibliothek gestartet)3"); - @OriginalMember(owner = "client!ig", name = "e", descriptor = "Lclient!na;") - public static final JagString GER_LOADING = JagString.parse("Ladevorgang )2 bitte warten Sie)3"); + @OriginalMember(owner = "client!ig", name = "e", descriptor = "Lclient!na;") + public static final JagString GER_LOADING = JagString.parse("Ladevorgang )2 bitte warten Sie)3"); - @OriginalMember(owner = "client!ta", name = "m", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD0B = JagString.parse("Zugewiesener Speicher)3"); + @OriginalMember(owner = "client!ta", name = "m", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD0B = JagString.parse("Zugewiesener Speicher)3"); - @OriginalMember(owner = "client!sc", name = "k", descriptor = "Lclient!na;") - public static final JagString GER_FACEHERE = JagString.parse("Hierhin drehen"); + @OriginalMember(owner = "client!sc", name = "k", descriptor = "Lclient!na;") + public static final JagString GER_FACEHERE = JagString.parse("Hierhin drehen"); - @OriginalMember(owner = "client!ub", name = "a", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL7 = JagString.parse("blinken2:"); + @OriginalMember(owner = "client!ub", name = "a", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL7 = JagString.parse("blinken2:"); - @OriginalMember(owner = "client!h", name = "yb", descriptor = "Lclient!na;") - public static final JagString GER_REMOVEIGNORE = JagString.parse(" zuerst von Ihrer Ignorieren)2Liste(Q"); + @OriginalMember(owner = "client!h", name = "yb", descriptor = "Lclient!na;") + public static final JagString GER_REMOVEIGNORE = JagString.parse(" zuerst von Ihrer Ignorieren)2Liste(Q"); - @OriginalMember(owner = "client!nh", name = "S", descriptor = "Lclient!na;") - public static final JagString GER_LOADINGDOTDOTDOT = JagString.parse("Lade)3)3)3"); + @OriginalMember(owner = "client!nh", name = "S", descriptor = "Lclient!na;") + public static final JagString GER_LOADINGDOTDOTDOT = JagString.parse("Lade)3)3)3"); - @OriginalMember(owner = "client!nh", name = "V", descriptor = "Lclient!na;") - public static final JagString GER_CHATEFFECT3 = JagString.parse("sch-Utteln:"); + @OriginalMember(owner = "client!nh", name = "V", descriptor = "Lclient!na;") + public static final JagString GER_CHATEFFECT3 = JagString.parse("sch-Utteln:"); - @OriginalMember(owner = "client!pi", name = "bb", descriptor = "Lclient!na;") - public static final JagString GER_IGNORECANTADDSELF = JagString.parse("Sie k-Onnen sich selbst nicht selbst auf Ihre Ignorieren)2Liste setzen(Q"); + @OriginalMember(owner = "client!pi", name = "bb", descriptor = "Lclient!na;") + public static final JagString GER_IGNORECANTADDSELF = JagString.parse("Sie k-Onnen sich selbst nicht selbst auf Ihre Ignorieren)2Liste setzen(Q"); - @OriginalMember(owner = "client!ug", name = "f", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL5 = JagString.parse("weiss:"); + @OriginalMember(owner = "client!ug", name = "f", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL5 = JagString.parse("weiss:"); - @OriginalMember(owner = "client!nc", name = "d", descriptor = "Lclient!na;") - public static final JagString GER_RATING = JagString.parse("Kampfstufe: "); + @OriginalMember(owner = "client!nc", name = "d", descriptor = "Lclient!na;") + public static final JagString GER_RATING = JagString.parse("Kampfstufe: "); - @OriginalMember(owner = "client!pk", name = "eb", descriptor = "Lclient!na;") - public static final JagString GER_ATTACK = JagString.parse("Angreifen"); + @OriginalMember(owner = "client!pk", name = "eb", descriptor = "Lclient!na;") + public static final JagString GER_ATTACK = JagString.parse("Angreifen"); - @OriginalMember(owner = "client!pf", name = "l", descriptor = "Lclient!na;") - public static final JagString GER_MOREOPTIONS = JagString.parse(" weitere Optionen"); + @OriginalMember(owner = "client!pf", name = "l", descriptor = "Lclient!na;") + public static final JagString GER_MOREOPTIONS = JagString.parse(" weitere Optionen"); - @OriginalMember(owner = "client!la", name = "g", descriptor = "Lclient!na;") - public static final JagString GER_IGNORELISTDUPE = JagString.parse(" steht bereits auf Ihrer Ignorieren)2Liste(Q"); + @OriginalMember(owner = "client!la", name = "g", descriptor = "Lclient!na;") + public static final JagString GER_IGNORELISTDUPE = JagString.parse(" steht bereits auf Ihrer Ignorieren)2Liste(Q"); - @OriginalMember(owner = "client!jg", name = "k", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD60B = JagString.parse("Titelbild geladen)3"); + @OriginalMember(owner = "client!jg", name = "k", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD60B = JagString.parse("Titelbild geladen)3"); - @OriginalMember(owner = "client!lg", name = "j", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL2 = JagString.parse("gr-Un:"); + @OriginalMember(owner = "client!lg", name = "j", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL2 = JagString.parse("gr-Un:"); - @OriginalMember(owner = "client!nd", name = "u", descriptor = "Lclient!na;") - public static final JagString GER_CANCEL = JagString.parse("Abbrechen"); + @OriginalMember(owner = "client!nd", name = "u", descriptor = "Lclient!na;") + public static final JagString GER_CANCEL = JagString.parse("Abbrechen"); - @OriginalMember(owner = "client!uh", name = "fb", descriptor = "Lclient!na;") - public static final JagString GER_GAME0_LOADING = JagString.parse("RuneScape wird geladen )2 bitte warten)3)3)3"); + @OriginalMember(owner = "client!uh", name = "fb", descriptor = "Lclient!na;") + public static final JagString GER_GAME0_LOADING = JagString.parse("RuneScape wird geladen )2 bitte warten)3)3)3"); - @OriginalMember(owner = "client!hb", name = "p", descriptor = "Lclient!na;") - public static final JagString GER_MILLION_SUFFIX = JagString.parse("M"); + @OriginalMember(owner = "client!hb", name = "p", descriptor = "Lclient!na;") + public static final JagString GER_MILLION_SUFFIX = JagString.parse("M"); - @OriginalMember(owner = "client!hb", name = "x", descriptor = "Lclient!na;") - public static final JagString GER_PLEASEWAIT = JagString.parse("Bitte warten Sie)3)3)3"); + @OriginalMember(owner = "client!hb", name = "x", descriptor = "Lclient!na;") + public static final JagString GER_PLEASEWAIT = JagString.parse("Bitte warten Sie)3)3)3"); - @OriginalMember(owner = "client!lj", name = "q", descriptor = "Lclient!na;") - public static final JagString GER_DROP = JagString.parse("Fallen lassen"); + @OriginalMember(owner = "client!lj", name = "q", descriptor = "Lclient!na;") + public static final JagString GER_DROP = JagString.parse("Fallen lassen"); - @OriginalMember(owner = "client!uh", name = "O", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD130B = JagString.parse("Benutzeroberfl-=che geladen)3"); + @OriginalMember(owner = "client!uh", name = "O", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD130B = JagString.parse("Benutzeroberfl-=che geladen)3"); - @OriginalMember(owner = "client!pe", name = "q", descriptor = "Lclient!na;") - public static final JagString GER_MINISEPARATOR = JagString.parse(": "); + @OriginalMember(owner = "client!pe", name = "q", descriptor = "Lclient!na;") + public static final JagString GER_MINISEPARATOR = JagString.parse(": "); - @OriginalMember(owner = "client!pe", name = "d", descriptor = "Lclient!na;") - public static final JagString GER_CHATEFFECT1 = JagString.parse("welle:"); + @OriginalMember(owner = "client!pe", name = "d", descriptor = "Lclient!na;") + public static final JagString GER_CHATEFFECT1 = JagString.parse("welle:"); - @OriginalMember(owner = "client!si", name = "ib", descriptor = "Lclient!na;") - public static final JagString GER_CONTINUE = JagString.parse("Weiter"); + @OriginalMember(owner = "client!si", name = "ib", descriptor = "Lclient!na;") + public static final JagString GER_CONTINUE = JagString.parse("Weiter"); - @OriginalMember(owner = "client!ic", name = "i", descriptor = "Lclient!na;") - public static final JagString GER_IGNORELISTFULL = JagString.parse("Ihre Ignorieren)2Liste ist voll)1 Sie k-Onnen nur 100 Spieler darauf eintragen)3"); + @OriginalMember(owner = "client!ic", name = "i", descriptor = "Lclient!na;") + public static final JagString GER_IGNORELISTFULL = JagString.parse("Ihre Ignorieren)2Liste ist voll)1 Sie k-Onnen nur 100 Spieler darauf eintragen)3"); - @OriginalMember(owner = "client!mf", name = "S", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD140 = JagString.parse("Starte 3D)2Softwarebibliothek)3"); + @OriginalMember(owner = "client!mf", name = "S", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD140 = JagString.parse("Starte 3D)2Softwarebibliothek)3"); - @OriginalMember(owner = "client!lh", name = "x", descriptor = "Lclient!na;") - public static final JagString GER_CHATEFFECT4 = JagString.parse("scrollen:"); + @OriginalMember(owner = "client!lh", name = "x", descriptor = "Lclient!na;") + public static final JagString GER_CHATEFFECT4 = JagString.parse("scrollen:"); - @OriginalMember(owner = "client!sk", name = "cb", descriptor = "Lclient!na;") - public static final JagString GER_EXAMINE = JagString.parse("Untersuchen"); + @OriginalMember(owner = "client!sk", name = "cb", descriptor = "Lclient!na;") + public static final JagString GER_EXAMINE = JagString.parse("Untersuchen"); - @OriginalMember(owner = "client!sk", name = "eb", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD45B = JagString.parse("Musik)2Engine vorbereitet)3"); - - @OriginalMember(owner = "client!sd", name = "P", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD135B = JagString.parse("Liste der Welten geladen"); - - @OriginalMember(owner = "client!vh", name = "i", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD30 = JagString.parse("Verbindung mit Update)2Server)3)3)3"); - - @OriginalMember(owner = "client!re", name = "r", descriptor = "Lclient!na;") - public static final JagString GER_WALKHERE = JagString.parse("Hierhin gehen"); - - @OriginalMember(owner = "client!qf", name = "U", descriptor = "Lclient!na;") - public static final JagString GER_CHOOSE_OPTION = JagString.parse("W-=hlen Sie eine Option"); - - @OriginalMember(owner = "client!hj", name = "i", descriptor = "Lclient!na;") - public static final JagString GER_USE = JagString.parse("Benutzen"); - - @OriginalMember(owner = "client!ql", name = "k", descriptor = "Lclient!na;") - public static final JagString GER_CHATEFFECT5 = JagString.parse("gleiten:"); - - @OriginalMember(owner = "client!ok", name = "g", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD60 = JagString.parse("Lade Titelbild )2 "); - - @OriginalMember(owner = "client!gk", name = "a", descriptor = "Lclient!na;") - public static final JagString GER_CHATCOL10 = JagString.parse("leuchten2:"); - - @OriginalMember(owner = "client!wd", name = "c", descriptor = "Lclient!na;") - public static final JagString GER_UNABLETOFIND = JagString.parse("Spieler kann nicht gefunden werden: "); - - @OriginalMember(owner = "client!og", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_FRIENDLOGOUT = JagString.parse(" loggt sich aus)3"); - - @OriginalMember(owner = "client!ml", name = "S", descriptor = "Lclient!na;") - public static final JagString GER_THOUSAND_SUFFIX = JagString.parse("T"); - - @OriginalMember(owner = "client!va", name = "v", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD10B = JagString.parse("Spielwelt erstellt)3"); - - @OriginalMember(owner = "client!mf", name = "q", descriptor = "Lclient!na;") - public static final JagString GER_OK = JagString.parse("Okay"); - - @OriginalMember(owner = "client!ob", name = "c", descriptor = "Lclient!na;") - public static final JagString GER_SKILL = JagString.parse("Fertigkeit: "); - - @OriginalMember(owner = "client!wf", name = "h", descriptor = "Lclient!na;") - public static final JagString GER_MAINLOAD40B = JagString.parse("Update)2Liste geladen)3"); - - @OriginalMember(owner = "client!lk", name = "a", descriptor = "(Z)V") - public static void switchToGerman() { - CHATEFFECT1 = GER_CHATEFFECT1; - MOREOPTIONS = GER_MOREOPTIONS; - REMOVESOCIAL1 = GER_REMOVESOCIAL; - MAINLOAD70B = GER_MAINLOAD70B; - MAINLOAD50B = GER_MAINLOAD50B; - REMOVEFRIEND = GER_REMOVEFRIEND; - TRADEREQ = GER_TRADEREQ; - CHATCOL8 = GER_CHATCOL8; - FRIENDLISTFULL = GER_FRIENDLISTFULL; - IGNORECANTADDSELF = GER_IGNORECANTADDSELF; - CHECKING_FOR_UPDATES = GER_CHECKING_FOR_UPDATES; - CHATCOL5 = GER_CHATCOL5; - DROP = GER_DROP; - FRIENDLOGIN = GER_FRIENDLOGIN; - RATING = GER_RATING; - THOUSAND_SHORT = GER_THOUSAND_SUFFIX; - MAINLOAD135 = GER_MAINLOAD135; - MINISEPARATOR = GER_MINISEPARATOR; - CHATCOL2 = GER_CHATCOL2; - CHATCOL9 = GER_CHATCOL9; - MAINLOAD110B = GER_MAINLOAD110B; - CHATCOL1 = GER_CHATCOL1; - OK = GER_OK; - GAME0_LOADING = GER_GAME0_LOADING; - CHATCOL4 = GER_CHATCOL4; - MAINLOAD10B = GER_MAINLOAD10B; - REMOVESOCIAL2 = GER_REMOVESOCIAL; - MAINLOAD50 = GER_MAINLOAD50; - CANCEL = GER_CANCEL; - CHATEFFECT3 = GER_CHATEFFECT3; - IGNORELISTFULL = GER_IGNORELISTFULL; - CONTINUE = GER_CONTINUE; - LOADING = GER_LOADING; - ATTACK = GER_ATTACK; - MAINLOAD80B = GER_MAINLOAD80B; - MAINLOAD90 = GER_MAINLOAD90; - CHATCOL3 = GER_CHATCOL3; - EXAMINE = GER_EXAMINE; - CONLOST = GER_CONLOST; - SKILL = GER_SKILL; - MEMBERS_OBJECT = GER_MEMBERS_OBJECT; - MAINLOAD135B = GER_MAINLOAD135B; - REMOVEIGNORE = GER_REMOVEIGNORE; - PLEASEWAIT = GER_PLEASEWAIT; - FRIENDLOGOUT = GER_FRIENDLOGOUT; - MAINLOAD140 = GER_MAINLOAD140; - THOUSAND = GER_THOUSAND_SUFFIX; - SELECT = GER_SELECT; - CHATCOL10 = GER_CHATCOL10; - TAKE = GER_TAKE; - UNABLETOFIND = GER_UNABLETOFIND; - MAINLOAD60 = GER_MAINLOAD60; - MAINLOAD30 = GER_MAINLOAD30; - WALKHERE = GER_WALKHERE; - FACEHERE = GER_FACEHERE; - MAINLOAD80 = GER_MAINLOAD80; - MILLION_SHORT = GER_MILLION_SUFFIX; - CHOOSE_OPTION = GER_CHOOSE_OPTION; - MAINLOAD150B = GER_MAINLOAD150B; - USE = GER_USE; - MAINLOAD0 = GER_MAINLOAD0; - ATTEMPT_TO_REESTABLISH = GER_ATTEMPT_TO_REESTABLISH; - MAINLOAD130B = GER_MAINLOAD130B; - CHATEFFECT5 = GER_CHATEFFECT5; - MAINLOAD40B = GER_MAINLOAD40B; - CHATCOL0 = GER_CHATCOL0; - CHATCOL7 = GER_CHATCOL7; - CHATCOL6 = GER_CHATCOL6; - LOADINGDOTDOTDOT = GER_LOADINGDOTDOTDOT; - MILLION = GER_MILLION_SUFFIX; - MAINLOAD70 = GER_MAINLOAD70; - MAINLOAD0B = GER_MAINLOAD0B; - MAINLOAD60B = GER_MAINLOAD60B; - CHATCOL11 = GER_CHATCOL11; - FRIENDCANTADDSELF = GER_FRIENDCANTADDSELF; - MAINLOAD120B = GER_MAINLOAD120B; - IGNORELISTDUPE = GER_IGNORELISTDUPE; - MAINLOAD30B = GER_MAINLOAD30B; - LENT_ITEM_RETURN = GER_LENT_ITEM_RETURN; - HIDDEN = GER_HIDDEN; - CHATEFFECT2 = GER_CHATEFFECT2; - MAINLOAD130 = GER_MAINLOAD130; - FRIENDLISTDUPE = GER_FRIENDLISTDUPE; - MAINLOAD65B = GER_MAINLOAD65B; - CLOSE = GER_CLOSE; - CHATEFFECT4 = GER_CHATEFFECT4; - MAINLOAD90B = GER_MAINLOAD90B; - MAINLOAD120 = GER_MAINLOAD120; - MAINLOAD45B = GER_MAINLOAD45B; - LEVEL = GER_LEVEL; - } - //endregion - - // TODO: unsorted - //region French Translations - @OriginalMember(owner = "client!kc", name = "r", descriptor = "Lclient!na;") - public static final JagString FR_THOUSAND_SUFFIX = JagString.parse("K"); - - @OriginalMember(owner = "client!qj", name = "g", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL1 = JagString.parse("rouge:"); - - @OriginalMember(owner = "client!oe", name = "m", descriptor = "Lclient!na;") - public static final JagString FR_GAME0_LOADING = JagString.parse("Chargement de RuneScape en cours )2 veuillez patienter)3)3)3"); - - @OriginalMember(owner = "client!ii", name = "j", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD130B = JagString.parse("Interfaces charg-Bes"); - - @OriginalMember(owner = "client!pl", name = "d", descriptor = "Lclient!na;") - public static final JagString FR_RATING = JagString.parse("classement "); - - @OriginalMember(owner = "client!ol", name = "S", descriptor = "Lclient!na;") - public static final JagString FR_CONLOST = JagString.parse("Connexion perdue)3"); - - @OriginalMember(owner = "client!ui", name = "nb", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL0 = JagString.parse("jaune:"); - - @OriginalMember(owner = "client!fm", name = "T", descriptor = "Lclient!na;") - public static final JagString FR_MINISEPARATOR = JagString.parse(" "); - - @OriginalMember(owner = "client!fk", name = "c", descriptor = "Lclient!na;") - public static final JagString FR_CHECKING_FOR_UPDATES = JagString.parse("V-Brification des mises -9 jour )2 "); - - @OriginalMember(owner = "client!fk", name = "p", descriptor = "Lclient!na;") - public static final JagString FR_CHATEFFECT2 = JagString.parse("ondulation2:"); - - @OriginalMember(owner = "client!fh", name = "V", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL2 = JagString.parse("vert:"); - - @OriginalMember(owner = "client!fc", name = "g", descriptor = "Lclient!na;") - public static final JagString FR_USE = JagString.parse("Utiliser"); - - @OriginalMember(owner = "client!ab", name = "m", descriptor = "Lclient!na;") - public static final JagString FR_MEMBERS_OBJECT = JagString.parse("Objet d(Wabonn-Bs"); - - @OriginalMember(owner = "client!ah", name = "u", descriptor = "Lclient!na;") - public static final JagString FR_REMOVESOCIAL = JagString.parse("Veuillez commencer par supprimer "); - - @OriginalMember(owner = "client!bf", name = "A", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL10 = JagString.parse("brillant2:"); - - @OriginalMember(owner = "client!bg", name = "n", descriptor = "Lclient!na;") - public static final JagString FR_FRIENDLISTFULL = JagString.parse("Votre liste d(Wamis est pleine (X100 noms maximum pour la version gratuite et 200 pour les abonn-Bs(Y)3"); + @OriginalMember(owner = "client!sk", name = "eb", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD45B = JagString.parse("Musik)2Engine vorbereitet)3"); + + @OriginalMember(owner = "client!sd", name = "P", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD135B = JagString.parse("Liste der Welten geladen"); + + @OriginalMember(owner = "client!vh", name = "i", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD30 = JagString.parse("Verbindung mit Update)2Server)3)3)3"); + + @OriginalMember(owner = "client!re", name = "r", descriptor = "Lclient!na;") + public static final JagString GER_WALKHERE = JagString.parse("Hierhin gehen"); + + @OriginalMember(owner = "client!qf", name = "U", descriptor = "Lclient!na;") + public static final JagString GER_CHOOSE_OPTION = JagString.parse("W-=hlen Sie eine Option"); + + @OriginalMember(owner = "client!hj", name = "i", descriptor = "Lclient!na;") + public static final JagString GER_USE = JagString.parse("Benutzen"); + + @OriginalMember(owner = "client!ql", name = "k", descriptor = "Lclient!na;") + public static final JagString GER_CHATEFFECT5 = JagString.parse("gleiten:"); + + @OriginalMember(owner = "client!ok", name = "g", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD60 = JagString.parse("Lade Titelbild )2 "); + + @OriginalMember(owner = "client!gk", name = "a", descriptor = "Lclient!na;") + public static final JagString GER_CHATCOL10 = JagString.parse("leuchten2:"); + + @OriginalMember(owner = "client!wd", name = "c", descriptor = "Lclient!na;") + public static final JagString GER_UNABLETOFIND = JagString.parse("Spieler kann nicht gefunden werden: "); + + @OriginalMember(owner = "client!og", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_FRIENDLOGOUT = JagString.parse(" loggt sich aus)3"); + + @OriginalMember(owner = "client!ml", name = "S", descriptor = "Lclient!na;") + public static final JagString GER_THOUSAND_SUFFIX = JagString.parse("T"); + + @OriginalMember(owner = "client!va", name = "v", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD10B = JagString.parse("Spielwelt erstellt)3"); + + @OriginalMember(owner = "client!mf", name = "q", descriptor = "Lclient!na;") + public static final JagString GER_OK = JagString.parse("Okay"); + + @OriginalMember(owner = "client!ob", name = "c", descriptor = "Lclient!na;") + public static final JagString GER_SKILL = JagString.parse("Fertigkeit: "); + + @OriginalMember(owner = "client!wf", name = "h", descriptor = "Lclient!na;") + public static final JagString GER_MAINLOAD40B = JagString.parse("Update)2Liste geladen)3"); + + @OriginalMember(owner = "client!lk", name = "a", descriptor = "(Z)V") + public static void switchToGerman() { + CHATEFFECT1 = GER_CHATEFFECT1; + MOREOPTIONS = GER_MOREOPTIONS; + REMOVESOCIAL1 = GER_REMOVESOCIAL; + MAINLOAD70B = GER_MAINLOAD70B; + MAINLOAD50B = GER_MAINLOAD50B; + REMOVEFRIEND = GER_REMOVEFRIEND; + TRADEREQ = GER_TRADEREQ; + CHATCOL8 = GER_CHATCOL8; + FRIENDLISTFULL = GER_FRIENDLISTFULL; + IGNORECANTADDSELF = GER_IGNORECANTADDSELF; + CHECKING_FOR_UPDATES = GER_CHECKING_FOR_UPDATES; + CHATCOL5 = GER_CHATCOL5; + DROP = GER_DROP; + FRIENDLOGIN = GER_FRIENDLOGIN; + RATING = GER_RATING; + THOUSAND_SHORT = GER_THOUSAND_SUFFIX; + MAINLOAD135 = GER_MAINLOAD135; + MINISEPARATOR = GER_MINISEPARATOR; + CHATCOL2 = GER_CHATCOL2; + CHATCOL9 = GER_CHATCOL9; + MAINLOAD110B = GER_MAINLOAD110B; + CHATCOL1 = GER_CHATCOL1; + OK = GER_OK; + GAME0_LOADING = GER_GAME0_LOADING; + CHATCOL4 = GER_CHATCOL4; + MAINLOAD10B = GER_MAINLOAD10B; + REMOVESOCIAL2 = GER_REMOVESOCIAL; + MAINLOAD50 = GER_MAINLOAD50; + CANCEL = GER_CANCEL; + CHATEFFECT3 = GER_CHATEFFECT3; + IGNORELISTFULL = GER_IGNORELISTFULL; + CONTINUE = GER_CONTINUE; + LOADING = GER_LOADING; + ATTACK = GER_ATTACK; + MAINLOAD80B = GER_MAINLOAD80B; + MAINLOAD90 = GER_MAINLOAD90; + CHATCOL3 = GER_CHATCOL3; + EXAMINE = GER_EXAMINE; + CONLOST = GER_CONLOST; + SKILL = GER_SKILL; + MEMBERS_OBJECT = GER_MEMBERS_OBJECT; + MAINLOAD135B = GER_MAINLOAD135B; + REMOVEIGNORE = GER_REMOVEIGNORE; + PLEASEWAIT = GER_PLEASEWAIT; + FRIENDLOGOUT = GER_FRIENDLOGOUT; + MAINLOAD140 = GER_MAINLOAD140; + THOUSAND = GER_THOUSAND_SUFFIX; + SELECT = GER_SELECT; + CHATCOL10 = GER_CHATCOL10; + TAKE = GER_TAKE; + UNABLETOFIND = GER_UNABLETOFIND; + MAINLOAD60 = GER_MAINLOAD60; + MAINLOAD30 = GER_MAINLOAD30; + WALKHERE = GER_WALKHERE; + FACEHERE = GER_FACEHERE; + MAINLOAD80 = GER_MAINLOAD80; + MILLION_SHORT = GER_MILLION_SUFFIX; + CHOOSE_OPTION = GER_CHOOSE_OPTION; + MAINLOAD150B = GER_MAINLOAD150B; + USE = GER_USE; + MAINLOAD0 = GER_MAINLOAD0; + ATTEMPT_TO_REESTABLISH = GER_ATTEMPT_TO_REESTABLISH; + MAINLOAD130B = GER_MAINLOAD130B; + CHATEFFECT5 = GER_CHATEFFECT5; + MAINLOAD40B = GER_MAINLOAD40B; + CHATCOL0 = GER_CHATCOL0; + CHATCOL7 = GER_CHATCOL7; + CHATCOL6 = GER_CHATCOL6; + LOADINGDOTDOTDOT = GER_LOADINGDOTDOTDOT; + MILLION = GER_MILLION_SUFFIX; + MAINLOAD70 = GER_MAINLOAD70; + MAINLOAD0B = GER_MAINLOAD0B; + MAINLOAD60B = GER_MAINLOAD60B; + CHATCOL11 = GER_CHATCOL11; + FRIENDCANTADDSELF = GER_FRIENDCANTADDSELF; + MAINLOAD120B = GER_MAINLOAD120B; + IGNORELISTDUPE = GER_IGNORELISTDUPE; + MAINLOAD30B = GER_MAINLOAD30B; + LENT_ITEM_RETURN = GER_LENT_ITEM_RETURN; + HIDDEN = GER_HIDDEN; + CHATEFFECT2 = GER_CHATEFFECT2; + MAINLOAD130 = GER_MAINLOAD130; + FRIENDLISTDUPE = GER_FRIENDLISTDUPE; + MAINLOAD65B = GER_MAINLOAD65B; + CLOSE = GER_CLOSE; + CHATEFFECT4 = GER_CHATEFFECT4; + MAINLOAD90B = GER_MAINLOAD90B; + MAINLOAD120 = GER_MAINLOAD120; + MAINLOAD45B = GER_MAINLOAD45B; + LEVEL = GER_LEVEL; + } + //endregion + + // TODO: unsorted + //region French Translations + @OriginalMember(owner = "client!kc", name = "r", descriptor = "Lclient!na;") + public static final JagString FR_THOUSAND_SUFFIX = JagString.parse("K"); + + @OriginalMember(owner = "client!qj", name = "g", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL1 = JagString.parse("rouge:"); + + @OriginalMember(owner = "client!oe", name = "m", descriptor = "Lclient!na;") + public static final JagString FR_GAME0_LOADING = JagString.parse("Chargement de RuneScape en cours )2 veuillez patienter)3)3)3"); + + @OriginalMember(owner = "client!ii", name = "j", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD130B = JagString.parse("Interfaces charg-Bes"); + + @OriginalMember(owner = "client!pl", name = "d", descriptor = "Lclient!na;") + public static final JagString FR_RATING = JagString.parse("classement "); + + @OriginalMember(owner = "client!ol", name = "S", descriptor = "Lclient!na;") + public static final JagString FR_CONLOST = JagString.parse("Connexion perdue)3"); + + @OriginalMember(owner = "client!ui", name = "nb", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL0 = JagString.parse("jaune:"); + + @OriginalMember(owner = "client!fm", name = "T", descriptor = "Lclient!na;") + public static final JagString FR_MINISEPARATOR = JagString.parse(" "); + + @OriginalMember(owner = "client!fk", name = "c", descriptor = "Lclient!na;") + public static final JagString FR_CHECKING_FOR_UPDATES = JagString.parse("V-Brification des mises -9 jour )2 "); + + @OriginalMember(owner = "client!fk", name = "p", descriptor = "Lclient!na;") + public static final JagString FR_CHATEFFECT2 = JagString.parse("ondulation2:"); + + @OriginalMember(owner = "client!fh", name = "V", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL2 = JagString.parse("vert:"); + + @OriginalMember(owner = "client!fc", name = "g", descriptor = "Lclient!na;") + public static final JagString FR_USE = JagString.parse("Utiliser"); + + @OriginalMember(owner = "client!ab", name = "m", descriptor = "Lclient!na;") + public static final JagString FR_MEMBERS_OBJECT = JagString.parse("Objet d(Wabonn-Bs"); + + @OriginalMember(owner = "client!ah", name = "u", descriptor = "Lclient!na;") + public static final JagString FR_REMOVESOCIAL = JagString.parse("Veuillez commencer par supprimer "); + + @OriginalMember(owner = "client!bf", name = "A", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL10 = JagString.parse("brillant2:"); + + @OriginalMember(owner = "client!bg", name = "n", descriptor = "Lclient!na;") + public static final JagString FR_FRIENDLISTFULL = JagString.parse("Votre liste d(Wamis est pleine (X100 noms maximum pour la version gratuite et 200 pour les abonn-Bs(Y)3"); - @OriginalMember(owner = "client!bm", name = "h", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD60B = JagString.parse(",Mcran)2titre charg-B"); + @OriginalMember(owner = "client!bm", name = "h", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD60B = JagString.parse(",Mcran)2titre charg-B"); - @OriginalMember(owner = "client!ca", name = "bb", descriptor = "Lclient!na;") - public static final JagString FR_EXAMINE = JagString.parse("Examiner"); + @OriginalMember(owner = "client!ca", name = "bb", descriptor = "Lclient!na;") + public static final JagString FR_EXAMINE = JagString.parse("Examiner"); - @OriginalMember(owner = "client!cd", name = "v", descriptor = "Lclient!na;") - public static final JagString FR_WALKHERE = JagString.parse("Atteindre"); + @OriginalMember(owner = "client!cd", name = "v", descriptor = "Lclient!na;") + public static final JagString FR_WALKHERE = JagString.parse("Atteindre"); - @OriginalMember(owner = "client!cj", name = "b", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL5 = JagString.parse("blanc:"); + @OriginalMember(owner = "client!cj", name = "b", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL5 = JagString.parse("blanc:"); - @OriginalMember(owner = "client!cl", name = "P", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL11 = JagString.parse("brillant3:"); + @OriginalMember(owner = "client!cl", name = "P", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL11 = JagString.parse("brillant3:"); - @OriginalMember(owner = "client!cl", name = "R", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD65B = JagString.parse(",Mcran)2titre ouvert"); + @OriginalMember(owner = "client!cl", name = "R", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD65B = JagString.parse(",Mcran)2titre ouvert"); - @OriginalMember(owner = "client!cm", name = "e", descriptor = "Lclient!na;") - public static final JagString FR_FRIENDCANTADDSELF = JagString.parse("Vous ne pouvez pas ajouter votre nom -9 votre liste d(Wamis)3"); + @OriginalMember(owner = "client!cm", name = "e", descriptor = "Lclient!na;") + public static final JagString FR_FRIENDCANTADDSELF = JagString.parse("Vous ne pouvez pas ajouter votre nom -9 votre liste d(Wamis)3"); - @OriginalMember(owner = "client!cm", name = "i", descriptor = "Lclient!na;") - public static final JagString FR_SKILL = JagString.parse("comp-Btence "); + @OriginalMember(owner = "client!cm", name = "i", descriptor = "Lclient!na;") + public static final JagString FR_SKILL = JagString.parse("comp-Btence "); - @OriginalMember(owner = "client!cn", name = "x", descriptor = "Lclient!na;") - public static final JagString FR_IGNORECANTADDSELF = JagString.parse("Vous ne pouvez pas ajouter votre nom -9 votre liste noire)3"); + @OriginalMember(owner = "client!cn", name = "x", descriptor = "Lclient!na;") + public static final JagString FR_IGNORECANTADDSELF = JagString.parse("Vous ne pouvez pas ajouter votre nom -9 votre liste noire)3"); - @OriginalMember(owner = "client!e", name = "vc", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD110B = JagString.parse("Gestionnaire de saisie charg-B"); + @OriginalMember(owner = "client!e", name = "vc", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD110B = JagString.parse("Gestionnaire de saisie charg-B"); - @OriginalMember(owner = "client!ef", name = "l", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD130 = JagString.parse("Chargement des interfaces )2 "); + @OriginalMember(owner = "client!ef", name = "l", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD130 = JagString.parse("Chargement des interfaces )2 "); - @OriginalMember(owner = "client!eg", name = "y", descriptor = "Lclient!na;") - public static final JagString FR_LENT_ITEM_RETURN = JagString.parse("Jeter"); + @OriginalMember(owner = "client!eg", name = "y", descriptor = "Lclient!na;") + public static final JagString FR_LENT_ITEM_RETURN = JagString.parse("Jeter"); - @OriginalMember(owner = "client!ej", name = "cb", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL7 = JagString.parse("clignotant2:"); + @OriginalMember(owner = "client!ej", name = "cb", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL7 = JagString.parse("clignotant2:"); - @OriginalMember(owner = "client!fb", name = "k", descriptor = "Lclient!na;") - public static final JagString FR_MILLION_SUFFIX = JagString.parse("M"); + @OriginalMember(owner = "client!fb", name = "k", descriptor = "Lclient!na;") + public static final JagString FR_MILLION_SUFFIX = JagString.parse("M"); - @OriginalMember(owner = "client!rc", name = "D", descriptor = "Lclient!na;") - public static final JagString FR_FRIENDLOGOUT = JagString.parse(" s(West d-Bconnect-B)3"); + @OriginalMember(owner = "client!rc", name = "D", descriptor = "Lclient!na;") + public static final JagString FR_FRIENDLOGOUT = JagString.parse(" s(West d-Bconnect-B)3"); - @OriginalMember(owner = "client!tm", name = "o", descriptor = "Lclient!na;") - public static final JagString FR_CANCEL = JagString.parse("Annuler"); + @OriginalMember(owner = "client!tm", name = "o", descriptor = "Lclient!na;") + public static final JagString FR_CANCEL = JagString.parse("Annuler"); - @OriginalMember(owner = "client!wa", name = "tb", descriptor = "Lclient!na;") - public static final JagString FR_CHATEFFECT4 = JagString.parse("d-Broulement:"); + @OriginalMember(owner = "client!wa", name = "tb", descriptor = "Lclient!na;") + public static final JagString FR_CHATEFFECT4 = JagString.parse("d-Broulement:"); - @OriginalMember(owner = "client!wa", name = "H", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD50B = JagString.parse("Polices charg-Bes"); + @OriginalMember(owner = "client!wa", name = "H", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD50B = JagString.parse("Polices charg-Bes"); - @OriginalMember(owner = "client!il", name = "Q", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD90B = JagString.parse("Textures charg-Bes"); + @OriginalMember(owner = "client!il", name = "Q", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD90B = JagString.parse("Textures charg-Bes"); - @OriginalMember(owner = "client!il", name = "R", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD135B = JagString.parse("Liste des serveurs charg-Be"); + @OriginalMember(owner = "client!il", name = "R", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD135B = JagString.parse("Liste des serveurs charg-Be"); - @OriginalMember(owner = "client!u", name = "d", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD150B = JagString.parse("Librairie 3D d-Bmarr-Be"); + @OriginalMember(owner = "client!u", name = "d", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD150B = JagString.parse("Librairie 3D d-Bmarr-Be"); - @OriginalMember(owner = "client!kd", name = "tb", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD30B = JagString.parse("Connect-B au serveur de mise -9 jour"); + @OriginalMember(owner = "client!kd", name = "tb", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD30B = JagString.parse("Connect-B au serveur de mise -9 jour"); - @OriginalMember(owner = "client!mg", name = "Y", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD0B = JagString.parse("M-Bmoire attribu-Be"); + @OriginalMember(owner = "client!mg", name = "Y", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD0B = JagString.parse("M-Bmoire attribu-Be"); - @OriginalMember(owner = "client!km", name = "Ic", descriptor = "Lclient!na;") - public static final JagString FR_CHATEFFECT1 = JagString.parse("ondulation:"); + @OriginalMember(owner = "client!km", name = "Ic", descriptor = "Lclient!na;") + public static final JagString FR_CHATEFFECT1 = JagString.parse("ondulation:"); - @OriginalMember(owner = "client!tl", name = "g", descriptor = "Lclient!na;") - public static final JagString FR_CHATEFFECT3 = JagString.parse("tremblement:"); + @OriginalMember(owner = "client!tl", name = "g", descriptor = "Lclient!na;") + public static final JagString FR_CHATEFFECT3 = JagString.parse("tremblement:"); - @OriginalMember(owner = "client!gm", name = "hb", descriptor = "Lclient!na;") - public static final JagString FR_FACEHERE = JagString.parse("Regarder dans cette direction"); + @OriginalMember(owner = "client!gm", name = "hb", descriptor = "Lclient!na;") + public static final JagString FR_FACEHERE = JagString.parse("Regarder dans cette direction"); - @OriginalMember(owner = "client!li", name = "e", descriptor = "Lclient!na;") - public static final JagString FR_PLEASEWAIT = JagString.parse("Veuillez patienter)3)3)3"); + @OriginalMember(owner = "client!li", name = "e", descriptor = "Lclient!na;") + public static final JagString FR_PLEASEWAIT = JagString.parse("Veuillez patienter)3)3)3"); - @OriginalMember(owner = "client!gi", name = "o", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD135 = JagString.parse("Chargement de la liste des serveurs"); + @OriginalMember(owner = "client!gi", name = "o", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD135 = JagString.parse("Chargement de la liste des serveurs"); - @OriginalMember(owner = "client!jm", name = "t", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD120B = JagString.parse("Module texte charg-B"); + @OriginalMember(owner = "client!jm", name = "t", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD120B = JagString.parse("Module texte charg-B"); - @OriginalMember(owner = "client!pb", name = "J", descriptor = "Lclient!na;") - public static final JagString FR_CHOOSE_OPTION = JagString.parse("Choisir une option"); + @OriginalMember(owner = "client!pb", name = "J", descriptor = "Lclient!na;") + public static final JagString FR_CHOOSE_OPTION = JagString.parse("Choisir une option"); - @OriginalMember(owner = "client!pb", name = "K", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD90 = JagString.parse("Chargement des textures )2 "); + @OriginalMember(owner = "client!pb", name = "K", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD90 = JagString.parse("Chargement des textures )2 "); - @OriginalMember(owner = "client!pb", name = "cb", descriptor = "Lclient!na;") - public static final JagString FR_LOADING = JagString.parse("Chargement en cours)3 Veuillez patienter)3"); + @OriginalMember(owner = "client!pb", name = "cb", descriptor = "Lclient!na;") + public static final JagString FR_LOADING = JagString.parse("Chargement en cours)3 Veuillez patienter)3"); - @OriginalMember(owner = "client!gi", name = "k", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL8 = JagString.parse("clignotant3:"); + @OriginalMember(owner = "client!gi", name = "k", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL8 = JagString.parse("clignotant3:"); - @OriginalMember(owner = "client!q", name = "f", descriptor = "Lclient!na;") - public static final JagString FR_HIDDEN = JagString.parse("Cach-B"); + @OriginalMember(owner = "client!q", name = "f", descriptor = "Lclient!na;") + public static final JagString FR_HIDDEN = JagString.parse("Cach-B"); - @OriginalMember(owner = "client!q", name = "g", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD50 = JagString.parse("Chargement des polices )2 "); + @OriginalMember(owner = "client!q", name = "g", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD50 = JagString.parse("Chargement des polices )2 "); - @OriginalMember(owner = "client!gl", name = "c", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD10B = JagString.parse("Monde de jeu cr-B-B"); + @OriginalMember(owner = "client!gl", name = "c", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD10B = JagString.parse("Monde de jeu cr-B-B"); - @OriginalMember(owner = "client!me", name = "T", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL4 = JagString.parse("violet:"); + @OriginalMember(owner = "client!me", name = "T", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL4 = JagString.parse("violet:"); - @OriginalMember(owner = "client!me", name = "kb", descriptor = "Lclient!na;") - public static final JagString FR_IGNORELISTFULL = JagString.parse("Votre liste noire est pleine (X100 noms maximum(Y)3"); + @OriginalMember(owner = "client!me", name = "kb", descriptor = "Lclient!na;") + public static final JagString FR_IGNORELISTFULL = JagString.parse("Votre liste noire est pleine (X100 noms maximum(Y)3"); - @OriginalMember(owner = "client!ud", name = "I", descriptor = "Lclient!na;") - public static final JagString FR_LOADINGDOTDOTDOT = JagString.parse("Chargement en cours)3)3)3"); + @OriginalMember(owner = "client!ud", name = "I", descriptor = "Lclient!na;") + public static final JagString FR_LOADINGDOTDOTDOT = JagString.parse("Chargement en cours)3)3)3"); - @OriginalMember(owner = "client!ud", name = "L", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL6 = JagString.parse("clignotant1:"); + @OriginalMember(owner = "client!ud", name = "L", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL6 = JagString.parse("clignotant1:"); - @OriginalMember(owner = "client!ja", name = "o", descriptor = "Lclient!na;") - public static final JagString FR_TRADEREQ = JagString.parse("voudrait faire un -Bchange avec vous)3"); + @OriginalMember(owner = "client!ja", name = "o", descriptor = "Lclient!na;") + public static final JagString FR_TRADEREQ = JagString.parse("voudrait faire un -Bchange avec vous)3"); - @OriginalMember(owner = "client!ja", name = "p", descriptor = "Lclient!na;") - public static final JagString FR_FRIENDSLISTDUPE = JagString.parse(" est d-Bj-9 dans votre liste d(Wamis)3"); + @OriginalMember(owner = "client!ja", name = "p", descriptor = "Lclient!na;") + public static final JagString FR_FRIENDSLISTDUPE = JagString.parse(" est d-Bj-9 dans votre liste d(Wamis)3"); - @OriginalMember(owner = "client!ja", name = "b", descriptor = "Lclient!na;") - public static final JagString FR_SELECT = JagString.parse("S-Blectionner"); + @OriginalMember(owner = "client!ja", name = "b", descriptor = "Lclient!na;") + public static final JagString FR_SELECT = JagString.parse("S-Blectionner"); - @OriginalMember(owner = "client!ja", name = "d", descriptor = "Lclient!na;") - public static final JagString FR_LEVEL = JagString.parse("niveau "); + @OriginalMember(owner = "client!ja", name = "d", descriptor = "Lclient!na;") + public static final JagString FR_LEVEL = JagString.parse("niveau "); - @OriginalMember(owner = "client!md", name = "X", descriptor = "Lclient!na;") - public static final JagString FR_UNABLETOFIND = JagString.parse("Impossible de trouver "); + @OriginalMember(owner = "client!md", name = "X", descriptor = "Lclient!na;") + public static final JagString FR_UNABLETOFIND = JagString.parse("Impossible de trouver "); - @OriginalMember(owner = "client!md", name = "J", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD140 = JagString.parse("D-Bmarrage de la librairie 3D"); + @OriginalMember(owner = "client!md", name = "J", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD140 = JagString.parse("D-Bmarrage de la librairie 3D"); - @OriginalMember(owner = "client!md", name = "O", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD70B = JagString.parse("Fichiers config charg-Bs"); + @OriginalMember(owner = "client!md", name = "O", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD70B = JagString.parse("Fichiers config charg-Bs"); - @OriginalMember(owner = "client!md", name = "P", descriptor = "Lclient!na;") - public static final JagString FR_CLOSE = JagString.parse("Fermer"); + @OriginalMember(owner = "client!md", name = "P", descriptor = "Lclient!na;") + public static final JagString FR_CLOSE = JagString.parse("Fermer"); - @OriginalMember(owner = "client!vj", name = "l", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD70 = JagString.parse("Chargement des fichiers config )2 "); + @OriginalMember(owner = "client!vj", name = "l", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD70 = JagString.parse("Chargement des fichiers config )2 "); - @OriginalMember(owner = "client!sd", name = "J", descriptor = "Lclient!na;") - public static final JagString FR_ATTEMPT_TO_REESTABLISH = JagString.parse("Veuillez patienter )2 tentative de r-Btablissement)3"); + @OriginalMember(owner = "client!sd", name = "J", descriptor = "Lclient!na;") + public static final JagString FR_ATTEMPT_TO_REESTABLISH = JagString.parse("Veuillez patienter )2 tentative de r-Btablissement)3"); - @OriginalMember(owner = "client!k", name = "n", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL9 = JagString.parse("brillant1:"); + @OriginalMember(owner = "client!k", name = "n", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL9 = JagString.parse("brillant1:"); - @OriginalMember(owner = "client!k", name = "u", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD80 = JagString.parse("Chargement des sprites )2 "); + @OriginalMember(owner = "client!k", name = "u", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD80 = JagString.parse("Chargement des sprites )2 "); - @OriginalMember(owner = "client!ij", name = "n", descriptor = "Lclient!na;") - public static final JagString FR_REMOVEIGNORE = JagString.parse(" de votre liste noire)3"); + @OriginalMember(owner = "client!ij", name = "n", descriptor = "Lclient!na;") + public static final JagString FR_REMOVEIGNORE = JagString.parse(" de votre liste noire)3"); - @OriginalMember(owner = "client!ic", name = "d", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD40B = JagString.parse("Liste des mises -9 jour charg-Be"); + @OriginalMember(owner = "client!ic", name = "d", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD40B = JagString.parse("Liste des mises -9 jour charg-Be"); - @OriginalMember(owner = "client!ic", name = "m", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD80B = JagString.parse("Sprites charg-Bs"); + @OriginalMember(owner = "client!ic", name = "m", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD80B = JagString.parse("Sprites charg-Bs"); - @OriginalMember(owner = "client!mf", name = "K", descriptor = "Lclient!na;") - public static final JagString FR_DROP = JagString.parse("Poser"); - - @OriginalMember(owner = "client!rh", name = "q", descriptor = "Lclient!na;") - public static final JagString FR_OK = JagString.parse("OK"); - - @OriginalMember(owner = "client!pk", name = "Q", descriptor = "Lclient!na;") - public static final JagString FR_CHATEFFECT5 = JagString.parse("glissement:"); - - @OriginalMember(owner = "client!kh", name = "a", descriptor = "Lclient!na;") - public static final JagString FR_ATTACK = JagString.parse("Attaquer"); - - @OriginalMember(owner = "client!tc", name = "b", descriptor = "Lclient!na;") - public static final JagString FR_TAKE = JagString.parse("Prendre"); - - @OriginalMember(owner = "client!tc", name = "c", descriptor = "Lclient!na;") - public static final JagString FR_REMOVEFRIEND = JagString.parse(" de votre liste d(Wamis)3"); - - @OriginalMember(owner = "client!hm", name = "lb", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD45B = JagString.parse("Moteur son pr-Bpar-B"); - - @OriginalMember(owner = "client!kk", name = "a", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD0 = JagString.parse("M-Bmoire en cours d(Wattribution"); - - @OriginalMember(owner = "client!wj", name = "k", descriptor = "Lclient!na;") - public static final JagString FR_CONTINUE = JagString.parse("Continuer"); - - @OriginalMember(owner = "client!oi", name = "k", descriptor = "Lclient!na;") - public static final JagString FR_CHATCOL3 = JagString.parse("cyan:"); - - @OriginalMember(owner = "client!sj", name = "x", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD30 = JagString.parse("Connexion au serveur de mise -9 jour en cours"); - - @OriginalMember(owner = "client!la", name = "k", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOLAD120 = JagString.parse("Chargement du module texte )2 "); - - @OriginalMember(owner = "client!hi", name = "h", descriptor = "Lclient!na;") - public static final JagString FR_MAINLOAD60 = JagString.parse("Chargement de l(W-Bcran)2titre )2 "); - - @OriginalMember(owner = "client!gg", name = "jb", descriptor = "Lclient!na;") - public static final JagString FR_IGNORELISTDUPE = JagString.parse(" est d-Bj-9 dans votre liste noire)3"); - - @OriginalMember(owner = "client!uf", name = "d", descriptor = "Lclient!na;") - public static final JagString FR_MOREOPTIONS = JagString.parse(" autres options"); - - @OriginalMember(owner = "client!gg", name = "Q", descriptor = "Lclient!na;") - public static final JagString FR_FRIENDLOGIN = JagString.parse(" s(West connect-B)3"); - - @OriginalMember(owner = "client!bb", name = "a", descriptor = "(B)V") - public static void switchToFrench() { - MAINLOAD70B = FR_MAINLOAD70B; - MAINLOAD70 = FR_MAINLOAD70; - CHATCOL4 = FR_CHATCOL4; - CONTINUE = FR_CONTINUE; - SKILL = FR_SKILL; - EXAMINE = FR_EXAMINE; - MAINLOAD120 = FR_MAINLOLAD120; - CHATCOL10 = FR_CHATCOL10; - MILLION_SHORT = FR_MILLION_SUFFIX; - CHATCOL7 = FR_CHATCOL7; - CHATEFFECT2 = FR_CHATEFFECT2; - ATTACK = FR_ATTACK; - FRIENDLISTFULL = FR_FRIENDLISTFULL; - IGNORELISTDUPE = FR_IGNORELISTDUPE; - MAINLOAD135B = FR_MAINLOAD135B; - MAINLOAD110B = FR_MAINLOAD110B; - CHATCOL1 = FR_CHATCOL1; - CHATEFFECT1 = FR_CHATEFFECT1; - MAINLOAD30 = FR_MAINLOAD30; - FRIENDLISTDUPE = FR_FRIENDSLISTDUPE; - CHATEFFECT3 = FR_CHATEFFECT3; - MAINLOAD60 = FR_MAINLOAD60; - MOREOPTIONS = FR_MOREOPTIONS; - MAINLOAD65B = FR_MAINLOAD65B; - MAINLOAD150B = FR_MAINLOAD150B; - PLEASEWAIT = FR_PLEASEWAIT; - FACEHERE = FR_FACEHERE; - MILLION = FR_MILLION_SUFFIX; - FRIENDLOGIN = FR_FRIENDLOGIN; - CHATCOL3 = FR_CHATCOL3; - MAINLOAD50 = FR_MAINLOAD50; - CHATCOL8 = FR_CHATCOL8; - OK = FR_OK; - IGNORECANTADDSELF = FR_IGNORECANTADDSELF; - MAINLOAD90B = FR_MAINLOAD90B; - CHATCOL11 = FR_CHATCOL11; - MAINLOAD140 = FR_MAINLOAD140; - CHECKING_FOR_UPDATES = FR_CHECKING_FOR_UPDATES; - ATTEMPT_TO_REESTABLISH = FR_ATTEMPT_TO_REESTABLISH; - CHATEFFECT5 = FR_CHATEFFECT5; - MAINLOAD0 = FR_MAINLOAD0; - MAINLOAD45B = FR_MAINLOAD45B; - MAINLOAD0B = FR_MAINLOAD0B; - DROP = FR_DROP; - MINISEPARATOR = FR_MINISEPARATOR; - WALKHERE = FR_WALKHERE; - UNABLETOFIND = FR_UNABLETOFIND; - MAINLOAD60B = FR_MAINLOAD60B; - REMOVEFRIEND = FR_REMOVEFRIEND; - MAINLOAD80 = FR_MAINLOAD80; - MEMBERS_OBJECT = FR_MEMBERS_OBJECT; - MAINLOAD40B = FR_MAINLOAD40B; - MAINLOAD50B = FR_MAINLOAD50B; - TAKE = FR_TAKE; - RATING = FR_RATING; - LENT_ITEM_RETURN = FR_LENT_ITEM_RETURN; - CLOSE = FR_CLOSE; - TRADEREQ = FR_TRADEREQ; - CHATCOL0 = FR_CHATCOL0; - REMOVEIGNORE = FR_REMOVEIGNORE; - CHATCOL9 = FR_CHATCOL9; - CHOOSE_OPTION = FR_CHOOSE_OPTION; - LOADINGDOTDOTDOT = FR_LOADINGDOTDOTDOT; - CHATCOL5 = FR_CHATCOL5; - MAINLOAD80B = FR_MAINLOAD80B; - MAINLOAD130 = FR_MAINLOAD130; - FRIENDCANTADDSELF = FR_FRIENDCANTADDSELF; - REMOVESOCIAL1 = FR_REMOVESOCIAL; - CANCEL = FR_CANCEL; - MAINLOAD120B = FR_MAINLOAD120B; - MAINLOAD10B = FR_MAINLOAD10B; - THOUSAND = FR_THOUSAND_SUFFIX; - LEVEL = FR_LEVEL; - THOUSAND_SHORT = FR_THOUSAND_SUFFIX; - SELECT = FR_SELECT; - CONLOST = FR_CONLOST; - IGNORELISTFULL = FR_IGNORELISTFULL; - MAINLOAD130B = FR_MAINLOAD130B; - GAME0_LOADING = FR_GAME0_LOADING; - CHATCOL6 = FR_CHATCOL6; - REMOVESOCIAL2 = FR_REMOVESOCIAL; - CHATCOL2 = FR_CHATCOL2; - HIDDEN = FR_HIDDEN; - LOADING = FR_LOADING; - MAINLOAD30B = FR_MAINLOAD30B; - FRIENDLOGOUT = FR_FRIENDLOGOUT; - MAINLOAD90 = FR_MAINLOAD90; - USE = FR_USE; - CHATEFFECT4 = FR_CHATEFFECT4; - MAINLOAD135 = FR_MAINLOAD135; - } - - @OriginalMember(owner = "client!ab", name = "a", descriptor = "(II)V") - public static void setLanguage(@OriginalArg(1) int arg0) { - if (arg0 == 0) { - return; - } - if (arg0 == 1) { - switchToGerman(); - } else if (arg0 == 2) { - switchToFrench(); - } else { - throw new RuntimeException(); - } - } - //endregion + @OriginalMember(owner = "client!mf", name = "K", descriptor = "Lclient!na;") + public static final JagString FR_DROP = JagString.parse("Poser"); + + @OriginalMember(owner = "client!rh", name = "q", descriptor = "Lclient!na;") + public static final JagString FR_OK = JagString.parse("OK"); + + @OriginalMember(owner = "client!pk", name = "Q", descriptor = "Lclient!na;") + public static final JagString FR_CHATEFFECT5 = JagString.parse("glissement:"); + + @OriginalMember(owner = "client!kh", name = "a", descriptor = "Lclient!na;") + public static final JagString FR_ATTACK = JagString.parse("Attaquer"); + + @OriginalMember(owner = "client!tc", name = "b", descriptor = "Lclient!na;") + public static final JagString FR_TAKE = JagString.parse("Prendre"); + + @OriginalMember(owner = "client!tc", name = "c", descriptor = "Lclient!na;") + public static final JagString FR_REMOVEFRIEND = JagString.parse(" de votre liste d(Wamis)3"); + + @OriginalMember(owner = "client!hm", name = "lb", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD45B = JagString.parse("Moteur son pr-Bpar-B"); + + @OriginalMember(owner = "client!kk", name = "a", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD0 = JagString.parse("M-Bmoire en cours d(Wattribution"); + + @OriginalMember(owner = "client!wj", name = "k", descriptor = "Lclient!na;") + public static final JagString FR_CONTINUE = JagString.parse("Continuer"); + + @OriginalMember(owner = "client!oi", name = "k", descriptor = "Lclient!na;") + public static final JagString FR_CHATCOL3 = JagString.parse("cyan:"); + + @OriginalMember(owner = "client!sj", name = "x", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD30 = JagString.parse("Connexion au serveur de mise -9 jour en cours"); + + @OriginalMember(owner = "client!la", name = "k", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOLAD120 = JagString.parse("Chargement du module texte )2 "); + + @OriginalMember(owner = "client!hi", name = "h", descriptor = "Lclient!na;") + public static final JagString FR_MAINLOAD60 = JagString.parse("Chargement de l(W-Bcran)2titre )2 "); + + @OriginalMember(owner = "client!gg", name = "jb", descriptor = "Lclient!na;") + public static final JagString FR_IGNORELISTDUPE = JagString.parse(" est d-Bj-9 dans votre liste noire)3"); + + @OriginalMember(owner = "client!uf", name = "d", descriptor = "Lclient!na;") + public static final JagString FR_MOREOPTIONS = JagString.parse(" autres options"); + + @OriginalMember(owner = "client!gg", name = "Q", descriptor = "Lclient!na;") + public static final JagString FR_FRIENDLOGIN = JagString.parse(" s(West connect-B)3"); + + @OriginalMember(owner = "client!bb", name = "a", descriptor = "(B)V") + public static void switchToFrench() { + MAINLOAD70B = FR_MAINLOAD70B; + MAINLOAD70 = FR_MAINLOAD70; + CHATCOL4 = FR_CHATCOL4; + CONTINUE = FR_CONTINUE; + SKILL = FR_SKILL; + EXAMINE = FR_EXAMINE; + MAINLOAD120 = FR_MAINLOLAD120; + CHATCOL10 = FR_CHATCOL10; + MILLION_SHORT = FR_MILLION_SUFFIX; + CHATCOL7 = FR_CHATCOL7; + CHATEFFECT2 = FR_CHATEFFECT2; + ATTACK = FR_ATTACK; + FRIENDLISTFULL = FR_FRIENDLISTFULL; + IGNORELISTDUPE = FR_IGNORELISTDUPE; + MAINLOAD135B = FR_MAINLOAD135B; + MAINLOAD110B = FR_MAINLOAD110B; + CHATCOL1 = FR_CHATCOL1; + CHATEFFECT1 = FR_CHATEFFECT1; + MAINLOAD30 = FR_MAINLOAD30; + FRIENDLISTDUPE = FR_FRIENDSLISTDUPE; + CHATEFFECT3 = FR_CHATEFFECT3; + MAINLOAD60 = FR_MAINLOAD60; + MOREOPTIONS = FR_MOREOPTIONS; + MAINLOAD65B = FR_MAINLOAD65B; + MAINLOAD150B = FR_MAINLOAD150B; + PLEASEWAIT = FR_PLEASEWAIT; + FACEHERE = FR_FACEHERE; + MILLION = FR_MILLION_SUFFIX; + FRIENDLOGIN = FR_FRIENDLOGIN; + CHATCOL3 = FR_CHATCOL3; + MAINLOAD50 = FR_MAINLOAD50; + CHATCOL8 = FR_CHATCOL8; + OK = FR_OK; + IGNORECANTADDSELF = FR_IGNORECANTADDSELF; + MAINLOAD90B = FR_MAINLOAD90B; + CHATCOL11 = FR_CHATCOL11; + MAINLOAD140 = FR_MAINLOAD140; + CHECKING_FOR_UPDATES = FR_CHECKING_FOR_UPDATES; + ATTEMPT_TO_REESTABLISH = FR_ATTEMPT_TO_REESTABLISH; + CHATEFFECT5 = FR_CHATEFFECT5; + MAINLOAD0 = FR_MAINLOAD0; + MAINLOAD45B = FR_MAINLOAD45B; + MAINLOAD0B = FR_MAINLOAD0B; + DROP = FR_DROP; + MINISEPARATOR = FR_MINISEPARATOR; + WALKHERE = FR_WALKHERE; + UNABLETOFIND = FR_UNABLETOFIND; + MAINLOAD60B = FR_MAINLOAD60B; + REMOVEFRIEND = FR_REMOVEFRIEND; + MAINLOAD80 = FR_MAINLOAD80; + MEMBERS_OBJECT = FR_MEMBERS_OBJECT; + MAINLOAD40B = FR_MAINLOAD40B; + MAINLOAD50B = FR_MAINLOAD50B; + TAKE = FR_TAKE; + RATING = FR_RATING; + LENT_ITEM_RETURN = FR_LENT_ITEM_RETURN; + CLOSE = FR_CLOSE; + TRADEREQ = FR_TRADEREQ; + CHATCOL0 = FR_CHATCOL0; + REMOVEIGNORE = FR_REMOVEIGNORE; + CHATCOL9 = FR_CHATCOL9; + CHOOSE_OPTION = FR_CHOOSE_OPTION; + LOADINGDOTDOTDOT = FR_LOADINGDOTDOTDOT; + CHATCOL5 = FR_CHATCOL5; + MAINLOAD80B = FR_MAINLOAD80B; + MAINLOAD130 = FR_MAINLOAD130; + FRIENDCANTADDSELF = FR_FRIENDCANTADDSELF; + REMOVESOCIAL1 = FR_REMOVESOCIAL; + CANCEL = FR_CANCEL; + MAINLOAD120B = FR_MAINLOAD120B; + MAINLOAD10B = FR_MAINLOAD10B; + THOUSAND = FR_THOUSAND_SUFFIX; + LEVEL = FR_LEVEL; + THOUSAND_SHORT = FR_THOUSAND_SUFFIX; + SELECT = FR_SELECT; + CONLOST = FR_CONLOST; + IGNORELISTFULL = FR_IGNORELISTFULL; + MAINLOAD130B = FR_MAINLOAD130B; + GAME0_LOADING = FR_GAME0_LOADING; + CHATCOL6 = FR_CHATCOL6; + REMOVESOCIAL2 = FR_REMOVESOCIAL; + CHATCOL2 = FR_CHATCOL2; + HIDDEN = FR_HIDDEN; + LOADING = FR_LOADING; + MAINLOAD30B = FR_MAINLOAD30B; + FRIENDLOGOUT = FR_FRIENDLOGOUT; + MAINLOAD90 = FR_MAINLOAD90; + USE = FR_USE; + CHATEFFECT4 = FR_CHATEFFECT4; + MAINLOAD135 = FR_MAINLOAD135; + } + + @OriginalMember(owner = "client!ab", name = "a", descriptor = "(II)V") + public static void setLanguage(@OriginalArg(1) int arg0) { + if (arg0 == 0) { + return; + } + if (arg0 == 1) { + switchToGerman(); + } else if (arg0 == 2) { + switchToFrench(); + } else { + throw new RuntimeException(); + } + } + //endregion } diff --git a/client/src/main/java/rt4/LoginManager.java b/client/src/main/java/rt4/LoginManager.java index 632b731..893a33a 100644 --- a/client/src/main/java/rt4/LoginManager.java +++ b/client/src/main/java/rt4/LoginManager.java @@ -8,556 +8,556 @@ import java.io.IOException; import java.net.Socket; public class LoginManager { - @OriginalMember(owner = "client!bg", name = "g", descriptor = "Lclient!i;") - public static final Packet buffer = new Packet(5000); - @OriginalMember(owner = "client!nd", name = "r", descriptor = "Lclient!na;") - public static final JagString ZAP = JagString.parse("zap"); - @OriginalMember(owner = "client!ef", name = "h", descriptor = "Lclient!na;") - public static final JagString UNZAP = JagString.parse("unzap"); - @OriginalMember(owner = "client!wj", name = "f", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!bg", name = "g", descriptor = "Lclient!i;") + public static final Packet buffer = new Packet(5000); + @OriginalMember(owner = "client!nd", name = "r", descriptor = "Lclient!na;") + public static final JagString ZAP = JagString.parse("zap"); + @OriginalMember(owner = "client!ef", name = "h", descriptor = "Lclient!na;") + public static final JagString UNZAP = JagString.parse("unzap"); + @OriginalMember(owner = "client!wj", name = "f", descriptor = "Lclient!na;") public static final JagString aClass100_1103 = JagString.parse("ul"); - @OriginalMember(owner = "client!i", name = "ic", descriptor = "Lclient!na;") - public static final JagString aClass100_558 = JagString.parse("m"); - @OriginalMember(owner = "client!wb", name = "e", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!i", name = "ic", descriptor = "Lclient!na;") + public static final JagString aClass100_558 = JagString.parse("m"); + @OriginalMember(owner = "client!wb", name = "e", descriptor = "Lclient!na;") public static final JagString aClass100_1090 = JagString.parse("l"); - @OriginalMember(owner = "client!oe", name = "o", descriptor = "Lclient!na;") - public static final JagString aClass100_807 = JagString.parse("n"); - @OriginalMember(owner = "client!nb", name = "a", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!oe", name = "o", descriptor = "Lclient!na;") + public static final JagString aClass100_807 = JagString.parse("n"); + @OriginalMember(owner = "client!nb", name = "a", descriptor = "Lclient!na;") public static final JagString aClass100_772 = JagString.parse("um"); - @OriginalMember(owner = "client!gm", name = "W", descriptor = "Lclient!na;") - public static final JagString UNDERSCORE = JagString.parse("_"); - @OriginalMember(owner = "client!hk", name = "W", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!gm", name = "W", descriptor = "Lclient!na;") + public static final JagString UNDERSCORE = JagString.parse("_"); + @OriginalMember(owner = "client!hk", name = "W", descriptor = "Lclient!ih;") public static final LinkedList aClass69_64 = new LinkedList(); - @OriginalMember(owner = "client!gd", name = "h", descriptor = "[I") - public static final int[] anIntArray204 = new int[] { 16, 32, 64, 128 }; - @OriginalMember(owner = "client!rl", name = "X", descriptor = "I") - public static int anInt4937 = 0; - @OriginalMember(owner = "client!sd", name = "X", descriptor = "Z") - public static boolean aBoolean247 = false; - @OriginalMember(owner = "client!sk", name = "ib", descriptor = "I") - public static int hopTime = 0; - @OriginalMember(owner = "client!vk", name = "b", descriptor = "I") - public static int reply = -2; - @OriginalMember(owner = "client!hd", name = "a", descriptor = "I") - public static int loops = 0; - @OriginalMember(owner = "client!ol", name = "V", descriptor = "I") - public static int step = 0; - @OriginalMember(owner = "client!qi", name = "A", descriptor = "I") - public static int disallowResult = -1; - @OriginalMember(owner = "client!wh", name = "s", descriptor = "I") - public static int errors = 0; - @OriginalMember(owner = "client!bj", name = "Y", descriptor = "I") - public static int anInt673 = 0; - @OriginalMember(owner = "client!pl", name = "i", descriptor = "I") - public static int anInt4587 = 0; - @OriginalMember(owner = "client!pi", name = "P", descriptor = "J") - public static long serverKey = 0L; - @OriginalMember(owner = "client!af", name = "c", descriptor = "I") - public static int anInt39 = -1; - @OriginalMember(owner = "client!pg", name = "S", descriptor = "I") - public static int staffModLevel = 0; - @OriginalMember(owner = "client!ud", name = "O", descriptor = "I") + @OriginalMember(owner = "client!gd", name = "h", descriptor = "[I") + public static final int[] anIntArray204 = new int[]{16, 32, 64, 128}; + @OriginalMember(owner = "client!rl", name = "X", descriptor = "I") + public static int anInt4937 = 0; + @OriginalMember(owner = "client!sd", name = "X", descriptor = "Z") + public static boolean aBoolean247 = false; + @OriginalMember(owner = "client!sk", name = "ib", descriptor = "I") + public static int hopTime = 0; + @OriginalMember(owner = "client!vk", name = "b", descriptor = "I") + public static int reply = -2; + @OriginalMember(owner = "client!hd", name = "a", descriptor = "I") + public static int loops = 0; + @OriginalMember(owner = "client!ol", name = "V", descriptor = "I") + public static int step = 0; + @OriginalMember(owner = "client!qi", name = "A", descriptor = "I") + public static int disallowResult = -1; + @OriginalMember(owner = "client!wh", name = "s", descriptor = "I") + public static int errors = 0; + @OriginalMember(owner = "client!bj", name = "Y", descriptor = "I") + public static int anInt673 = 0; + @OriginalMember(owner = "client!pl", name = "i", descriptor = "I") + public static int anInt4587 = 0; + @OriginalMember(owner = "client!pi", name = "P", descriptor = "J") + public static long serverKey = 0L; + @OriginalMember(owner = "client!af", name = "c", descriptor = "I") + public static int anInt39 = -1; + @OriginalMember(owner = "client!pg", name = "S", descriptor = "I") + public static int staffModLevel = 0; + @OriginalMember(owner = "client!ud", name = "O", descriptor = "I") public static int blackmarks = 0; - @OriginalMember(owner = "client!jk", name = "G", descriptor = "Z") - public static boolean playerUnderage = false; - @OriginalMember(owner = "client!ql", name = "c", descriptor = "Z") - public static boolean parentalChatConsent = false; - @OriginalMember(owner = "client!qg", name = "W", descriptor = "Z") - public static boolean playerMember = false; - @OriginalMember(owner = "client!aa", name = "l", descriptor = "Z") - public static boolean mapMembers = false; - @OriginalMember(owner = "client!gm", name = "bb", descriptor = "Z") - public static boolean mapQuickChat = false; - @OriginalMember(owner = "client!c", name = "hb", descriptor = "Z") - public static boolean parentalAdvertConsent = false; - @OriginalMember(owner = "client!we", name = "H", descriptor = "[[B") - public static byte[][] mapFilesBuffer; - @OriginalMember(owner = "client!mf", name = "O", descriptor = "[[B") - public static byte[][] locationMapFilesBuffer; - @OriginalMember(owner = "client!cl", name = "V", descriptor = "[I") + @OriginalMember(owner = "client!jk", name = "G", descriptor = "Z") + public static boolean playerUnderage = false; + @OriginalMember(owner = "client!ql", name = "c", descriptor = "Z") + public static boolean parentalChatConsent = false; + @OriginalMember(owner = "client!qg", name = "W", descriptor = "Z") + public static boolean playerMember = false; + @OriginalMember(owner = "client!aa", name = "l", descriptor = "Z") + public static boolean mapMembers = false; + @OriginalMember(owner = "client!gm", name = "bb", descriptor = "Z") + public static boolean mapQuickChat = false; + @OriginalMember(owner = "client!c", name = "hb", descriptor = "Z") + public static boolean parentalAdvertConsent = false; + @OriginalMember(owner = "client!we", name = "H", descriptor = "[[B") + public static byte[][] mapFilesBuffer; + @OriginalMember(owner = "client!mf", name = "O", descriptor = "[[B") + public static byte[][] locationMapFilesBuffer; + @OriginalMember(owner = "client!cl", name = "V", descriptor = "[I") public static int[] underWaterLocationsMapFileIds; - @OriginalMember(owner = "client!pg", name = "jb", descriptor = "[[B") - public static byte[][] npcSpawnsFilesBuffer; - @OriginalMember(owner = "client!client", name = "lb", descriptor = "[I") + @OriginalMember(owner = "client!pg", name = "jb", descriptor = "[[B") + public static byte[][] npcSpawnsFilesBuffer; + @OriginalMember(owner = "client!client", name = "lb", descriptor = "[I") public static int[] mapFileIds; - @OriginalMember(owner = "client!pa", name = "L", descriptor = "[[B") - public static byte[][] underWaterMapFilesBuffer; - @OriginalMember(owner = "client!fl", name = "D", descriptor = "[[I") - public static int[][] regionsXteaKeys; - @OriginalMember(owner = "client!te", name = "H", descriptor = "[I") + @OriginalMember(owner = "client!pa", name = "L", descriptor = "[[B") + public static byte[][] underWaterMapFilesBuffer; + @OriginalMember(owner = "client!fl", name = "D", descriptor = "[[I") + public static int[][] regionsXteaKeys; + @OriginalMember(owner = "client!te", name = "H", descriptor = "[I") public static int[] regionBitPacked; - @OriginalMember(owner = "client!nm", name = "P", descriptor = "[I") - public static int[] npcSpawnsFileIds; - @OriginalMember(owner = "client!hk", name = "bb", descriptor = "[I") + @OriginalMember(owner = "client!nm", name = "P", descriptor = "[I") + public static int[] npcSpawnsFileIds; + @OriginalMember(owner = "client!hk", name = "bb", descriptor = "[I") public static int[] underWaterMapFileIds; - @OriginalMember(owner = "client!nj", name = "j", descriptor = "[I") - public static int[] locationsMapFileIds; - @OriginalMember(owner = "client!bi", name = "Y", descriptor = "[[B") - public static byte[][] underWaterLocationsMapFilesBuffer; - @OriginalMember(owner = "client!gf", name = "R", descriptor = "I") + @OriginalMember(owner = "client!nj", name = "j", descriptor = "[I") + public static int[] locationsMapFileIds; + @OriginalMember(owner = "client!bi", name = "Y", descriptor = "[[B") + public static byte[][] underWaterLocationsMapFilesBuffer; + @OriginalMember(owner = "client!gf", name = "R", descriptor = "I") public static int centralZoneX; - @OriginalMember(owner = "client!eb", name = "u", descriptor = "I") - public static int centralZoneZ; - @OriginalMember(owner = "client!dc", name = "ab", descriptor = "I") - public static int centralPlane = 0; - @OriginalMember(owner = "client!mh", name = "hb", descriptor = "Lclient!bn;") - public static Map map; - @OriginalMember(owner = "client!tb", name = "X", descriptor = "Lclient!se;") - public static MapElementList mapElementList; - @OriginalMember(owner = "client!ja", name = "n", descriptor = "I") - public static int mapFlagX = 0; - @OriginalMember(owner = "client!gk", name = "h", descriptor = "I") - public static int mapFlagZ = 0; - @OriginalMember(owner = "client!qf", name = "M", descriptor = "I") - public static int anInt1862 = 0; - @OriginalMember(owner = "client!sj", name = "u", descriptor = "Z") + @OriginalMember(owner = "client!eb", name = "u", descriptor = "I") + public static int centralZoneZ; + @OriginalMember(owner = "client!dc", name = "ab", descriptor = "I") + public static int centralPlane = 0; + @OriginalMember(owner = "client!mh", name = "hb", descriptor = "Lclient!bn;") + public static Map map; + @OriginalMember(owner = "client!tb", name = "X", descriptor = "Lclient!se;") + public static MapElementList mapElementList; + @OriginalMember(owner = "client!ja", name = "n", descriptor = "I") + public static int mapFlagX = 0; + @OriginalMember(owner = "client!gk", name = "h", descriptor = "I") + public static int mapFlagZ = 0; + @OriginalMember(owner = "client!qf", name = "M", descriptor = "I") + public static int anInt1862 = 0; + @OriginalMember(owner = "client!sj", name = "u", descriptor = "Z") public static boolean dynamicMapRegion = false; - @OriginalMember(owner = "client!dm", name = "d", descriptor = "(I)V") - public static void clear() { - aBoolean247 = false; - hopTime = 0; - reply = -3; - loops = 0; - step = 1; - errors = 0; - disallowResult = -1; - } + @OriginalMember(owner = "client!dm", name = "d", descriptor = "(I)V") + public static void clear() { + aBoolean247 = false; + hopTime = 0; + reply = -3; + loops = 0; + step = 1; + errors = 0; + disallowResult = -1; + } - @OriginalMember(owner = "client!ch", name = "b", descriptor = "(B)V") - public static void loopAuto() { - if (anInt4937 == 0) { - return; - } - try { - if (++anInt673 > 1500) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (anInt4587 >= 1) { - reply = -5; - anInt4937 = 0; - return; - } - anInt673 = 0; - anInt4587++; - anInt4937 = 1; - if (client.worldListPort == client.worldListDefaultPort) { - client.worldListPort = client.worldListAlternatePort; - } else { - client.worldListPort = client.worldListDefaultPort; - } - } - if (anInt4937 == 1) { - Protocol.socketRequest = GameShell.signLink.openSocket(client.worldListHostname, client.worldListPort); - anInt4937 = 2; - } - @Pc(126) int local126; - if (anInt4937 == 2) { - if (Protocol.socketRequest.status == 2) { - throw new IOException(); - } - if (Protocol.socketRequest.status != 1) { - return; - } - Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); - Protocol.socketRequest = null; - Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - local126 = Protocol.socket.read(); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - if (local126 != 101) { - reply = local126; - anInt4937 = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - anInt4937 = 3; - } - if (anInt4937 == 3) { - if (Protocol.socket.available() < 2) { - return; - } - local126 = Protocol.socket.read() << 8 | Protocol.socket.read(); - Static176.hopWorld(local126); - if (Player.worldId == -1) { - anInt4937 = 0; - reply = 6; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - anInt4937 = 0; - Protocol.socket.close(); - Protocol.socket = null; - clear(); - } - } catch (@Pc(210) IOException local210) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (anInt4587 < 1) { - if (client.worldListPort == client.worldListDefaultPort) { - client.worldListPort = client.worldListAlternatePort; - } else { - client.worldListPort = client.worldListDefaultPort; - } - anInt4937 = 1; - anInt673 = 0; - anInt4587++; - } else { - reply = -4; - anInt4937 = 0; - } - } - } + @OriginalMember(owner = "client!ch", name = "b", descriptor = "(B)V") + public static void loopAuto() { + if (anInt4937 == 0) { + return; + } + try { + if (++anInt673 > 1500) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (anInt4587 >= 1) { + reply = -5; + anInt4937 = 0; + return; + } + anInt673 = 0; + anInt4587++; + anInt4937 = 1; + if (client.worldListPort == client.worldListDefaultPort) { + client.worldListPort = client.worldListAlternatePort; + } else { + client.worldListPort = client.worldListDefaultPort; + } + } + if (anInt4937 == 1) { + Protocol.socketRequest = GameShell.signLink.openSocket(client.worldListHostname, client.worldListPort); + anInt4937 = 2; + } + @Pc(126) int local126; + if (anInt4937 == 2) { + if (Protocol.socketRequest.status == 2) { + throw new IOException(); + } + if (Protocol.socketRequest.status != 1) { + return; + } + Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); + Protocol.socketRequest = null; + Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + local126 = Protocol.socket.read(); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + if (local126 != 101) { + reply = local126; + anInt4937 = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + anInt4937 = 3; + } + if (anInt4937 == 3) { + if (Protocol.socket.available() < 2) { + return; + } + local126 = Protocol.socket.read() << 8 | Protocol.socket.read(); + Static176.hopWorld(local126); + if (Player.worldId == -1) { + anInt4937 = 0; + reply = 6; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + anInt4937 = 0; + Protocol.socket.close(); + Protocol.socket = null; + clear(); + } + } catch (@Pc(210) IOException local210) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (anInt4587 < 1) { + if (client.worldListPort == client.worldListDefaultPort) { + client.worldListPort = client.worldListAlternatePort; + } else { + client.worldListPort = client.worldListDefaultPort; + } + anInt4937 = 1; + anInt673 = 0; + anInt4587++; + } else { + reply = -4; + anInt4937 = 0; + } + } + } - @OriginalMember(owner = "client!ri", name = "a", descriptor = "(B)V") - public static void loop() { - if (step == 0 || step == 5) { - return; - } - try { - if (++loops > 2000) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (errors >= 1) { - reply = -5; - step = 0; - return; - } - loops = 0; - if (client.port == client.defaultPort) { - client.port = client.alternatePort; - } else { - client.port = client.defaultPort; - } - step = 1; - errors++; - } - if (step == 1) { - if (GlobalJsonConfig.instance != null) { - client.hostname = GlobalJsonConfig.instance.ip_management; - client.port = GlobalJsonConfig.instance.server_port + client.worldListId; - } - Protocol.socketRequest = GameShell.signLink.openSocket(client.hostname, client.port); - step = 2; - } - if (step == 2) { - if (Protocol.socketRequest.status == 2) { - throw new IOException(); - } - if (Protocol.socketRequest.status != 1) { - return; - } - Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); - Protocol.socketRequest = null; - @Pc(106) long local106 = Player.name37 = Player.usernameInput.encode37(); - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1(14); - @Pc(120) int local120 = (int) (local106 >> 16 & 0x1FL); - Protocol.outboundBuffer.p1(local120); - Protocol.socket.write(Protocol.outboundBuffer.data, 2); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - @Pc(150) int local150 = Protocol.socket.read(); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - if (local150 != 0) { - reply = local150; - step = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - step = 3; - } - if (step == 3) { - if (Protocol.socket.available() < 8) { - return; - } - Protocol.socket.read(0, 8, Protocol.inboundBuffer.data); - Protocol.inboundBuffer.offset = 0; - serverKey = Protocol.inboundBuffer.g8(); - @Pc(210) int[] key = new int[4]; - Protocol.outboundBuffer.offset = 0; - key[2] = (int) (serverKey >> 32); - key[3] = (int) serverKey; - key[1] = (int) (Math.random() * 9.9999999E7D); - key[0] = (int) (Math.random() * 9.9999999E7D); - Protocol.outboundBuffer.p1(10); - Protocol.outboundBuffer.p4(key[0]); - Protocol.outboundBuffer.p4(key[1]); - Protocol.outboundBuffer.p4(key[2]); - Protocol.outboundBuffer.p4(key[3]); - Protocol.outboundBuffer.p8(Player.usernameInput.encode37()); - Protocol.outboundBuffer.pjstr(Player.password); - if (GlobalConfig.LOGIN_EXTRA_INFO) { - Protocol.outboundBuffer.pjstr(JagString.parse("")); - Protocol.outboundBuffer.pjstr(JagString.parse("")); - Protocol.outboundBuffer.pjstr(JagString.parse("")); - } - Protocol.outboundBuffer.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); - buffer.offset = 0; - if (client.gameState == 40) { - buffer.p1(18); - } else { - buffer.p1(16); - } - int offset = 0; - if (GlobalConfig.LOGIN_FAKE_IDX28) { - // pretend that we're loading the archive so we don't throw the packet size off - offset = 4; - } - buffer.p2(Protocol.outboundBuffer.offset + Buffer.gjstrlen(client.settings) + (159 + offset)); - buffer.p4(530); - buffer.p1(anInt39); - buffer.p1(client.advertSuppressed ? 1 : 0); - buffer.p1(1); - buffer.p1(DisplayMode.getWindowMode()); - buffer.p2(GameShell.canvasWidth); - buffer.p2(GameShell.canvasHeight); - buffer.p1(Preferences.antiAliasingMode); - client.writeUid(buffer); - buffer.pjstr(client.settings); - buffer.p4(client.affiliate); - buffer.p4(Preferences.toInt()); - Preferences.sentToServer = true; - buffer.p2(Protocol.verifyId); - buffer.p4(client.js5Archive0.getChecksum()); - buffer.p4(client.js5Archive1.getChecksum()); - buffer.p4(client.js5Archive2.getChecksum()); - buffer.p4(client.js5Archive3.getChecksum()); - buffer.p4(client.js5Archive4.getChecksum()); - buffer.p4(client.js5Archive5.getChecksum()); - buffer.p4(client.js5Archive6.getChecksum()); - buffer.p4(client.js5Archive7.getChecksum()); - buffer.p4(client.js5Archive8.getChecksum()); - buffer.p4(client.js5Archive9.getChecksum()); - buffer.p4(client.js5Archive10.getChecksum()); - buffer.p4(client.js5Archive11.getChecksum()); - buffer.p4(client.js5Archive12.getChecksum()); - buffer.p4(client.js5Archive13.getChecksum()); - buffer.p4(client.js5Archive14.getChecksum()); - buffer.p4(client.js5Archive15.getChecksum()); - buffer.p4(client.js5Archive16.getChecksum()); - buffer.p4(client.js5Archive17.getChecksum()); - buffer.p4(client.js5Archive18.getChecksum()); - buffer.p4(client.js5Archive19.getChecksum()); - buffer.p4(client.js5Archive20.getChecksum()); - buffer.p4(client.js5Archive21.getChecksum()); - buffer.p4(client.js5Archive22.getChecksum()); - buffer.p4(client.js5Archive23.getChecksum()); - buffer.p4(client.js5Archive24.getChecksum()); - buffer.p4(client.js5Archive25.getChecksum()); - buffer.p4(client.js5Archive26.getChecksum()); - buffer.p4(client.js5Archive27.getChecksum()); - if (GlobalConfig.LOGIN_FAKE_IDX28) { - buffer.p4(0); - } - buffer.pdata(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - Protocol.socket.write(buffer.data, buffer.offset); - Protocol.outboundBuffer.setKey(key); - for (@Pc(583) int local583 = 0; local583 < 4; local583++) { - key[local583] += 50; - } - Protocol.inboundBuffer.setKey(key); - step = 4; - } - if (step == 4) { - if (Protocol.socket.available() < 1) { - return; - } - @Pc(623) int local623 = Protocol.socket.read(); - if (local623 == 21) { - step = 7; - } else if (local623 == 29) { - step = 10; - } else if (local623 == 1) { - step = 5; - reply = local623; - return; - } else if (local623 == 2) { - step = 8; - } else if (local623 == 15) { - step = 0; - reply = local623; - return; - } else if (local623 == 23 && errors < 1) { - step = 1; - errors++; - loops = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } else { - reply = local623; - step = 0; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - } - if (step == 6) { - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1isaac(17); - Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - step = 4; - return; - } - if (step == 7) { - if (Protocol.socket.available() >= 1) { - hopTime = (Protocol.socket.read() + 3) * 60; - step = 0; - reply = 21; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - return; - } - if (step == 10) { - if (Protocol.socket.available() >= 1) { - disallowResult = Protocol.socket.read(); - step = 0; - reply = 29; - Protocol.socket.close(); - Protocol.socket = null; - return; - } - return; - } - if (step == 8) { - if (Protocol.socket.available() < 14) { - return; - } - Protocol.socket.read(0, 14, Protocol.inboundBuffer.data); - Protocol.inboundBuffer.offset = 0; - staffModLevel = Protocol.inboundBuffer.g1(); - blackmarks = Protocol.inboundBuffer.g1(); - playerUnderage = Protocol.inboundBuffer.g1() == 1; - parentalChatConsent = Protocol.inboundBuffer.g1() == 1; - parentalAdvertConsent = Protocol.inboundBuffer.g1() == 1; - mapQuickChat = Protocol.inboundBuffer.g1() == 1; - MouseRecorder.enabled = Protocol.inboundBuffer.g1() == 1; - PlayerList.selfId = Protocol.inboundBuffer.g2(); - playerMember = Protocol.inboundBuffer.g1() == 1; - mapMembers = Protocol.inboundBuffer.g1() == 1; - LocTypeList.setAllowMembers(mapMembers); - ObjTypeList.setAllowMembers(mapMembers); - if (!client.advertSuppressed) { - if (playerUnderage && !parentalAdvertConsent || playerMember) { - try { - ZAP.browserControlCall(GameShell.signLink.applet); - } catch (@Pc(910) Throwable local910) { - } - } else { - try { - UNZAP.browserControlCall(GameShell.signLink.applet); - } catch (@Pc(920) Throwable local920) { - } - } - } - Protocol.opcode = Protocol.inboundBuffer.g1isaac(); - Protocol.length = Protocol.inboundBuffer.g2(); - step = 9; - } - if (step == 9) { - if (Protocol.socket.available() < Protocol.length) { - return; - } - Protocol.inboundBuffer.offset = 0; - Protocol.socket.read(0, Protocol.length, Protocol.inboundBuffer.data); - reply = 2; - step = 0; - client.method4221(); - centralZoneX = -1; - Protocol.readRebuildPacket(false); - Protocol.opcode = -1; - return; - } - } catch (@Pc(977) IOException ex) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - if (errors >= 1) { - step = 0; - reply = -4; - } else { - step = 1; - loops = 0; - errors++; - if (client.defaultPort == client.port) { - client.port = client.alternatePort; - } else { - client.port = client.defaultPort; - } - } - } - } + @OriginalMember(owner = "client!ri", name = "a", descriptor = "(B)V") + public static void loop() { + if (step == 0 || step == 5) { + return; + } + try { + if (++loops > 2000) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (errors >= 1) { + reply = -5; + step = 0; + return; + } + loops = 0; + if (client.port == client.defaultPort) { + client.port = client.alternatePort; + } else { + client.port = client.defaultPort; + } + step = 1; + errors++; + } + if (step == 1) { + if (GlobalJsonConfig.instance != null) { + client.hostname = GlobalJsonConfig.instance.ip_management; + client.port = GlobalJsonConfig.instance.server_port + client.worldListId; + } + Protocol.socketRequest = GameShell.signLink.openSocket(client.hostname, client.port); + step = 2; + } + if (step == 2) { + if (Protocol.socketRequest.status == 2) { + throw new IOException(); + } + if (Protocol.socketRequest.status != 1) { + return; + } + Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); + Protocol.socketRequest = null; + @Pc(106) long local106 = Player.name37 = Player.usernameInput.encode37(); + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1(14); + @Pc(120) int local120 = (int) (local106 >> 16 & 0x1FL); + Protocol.outboundBuffer.p1(local120); + Protocol.socket.write(Protocol.outboundBuffer.data, 2); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + @Pc(150) int local150 = Protocol.socket.read(); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + if (local150 != 0) { + reply = local150; + step = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + step = 3; + } + if (step == 3) { + if (Protocol.socket.available() < 8) { + return; + } + Protocol.socket.read(0, 8, Protocol.inboundBuffer.data); + Protocol.inboundBuffer.offset = 0; + serverKey = Protocol.inboundBuffer.g8(); + @Pc(210) int[] key = new int[4]; + Protocol.outboundBuffer.offset = 0; + key[2] = (int) (serverKey >> 32); + key[3] = (int) serverKey; + key[1] = (int) (Math.random() * 9.9999999E7D); + key[0] = (int) (Math.random() * 9.9999999E7D); + Protocol.outboundBuffer.p1(10); + Protocol.outboundBuffer.p4(key[0]); + Protocol.outboundBuffer.p4(key[1]); + Protocol.outboundBuffer.p4(key[2]); + Protocol.outboundBuffer.p4(key[3]); + Protocol.outboundBuffer.p8(Player.usernameInput.encode37()); + Protocol.outboundBuffer.pjstr(Player.password); + if (GlobalConfig.LOGIN_EXTRA_INFO) { + Protocol.outboundBuffer.pjstr(JagString.parse("")); + Protocol.outboundBuffer.pjstr(JagString.parse("")); + Protocol.outboundBuffer.pjstr(JagString.parse("")); + } + Protocol.outboundBuffer.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); + buffer.offset = 0; + if (client.gameState == 40) { + buffer.p1(18); + } else { + buffer.p1(16); + } + int offset = 0; + if (GlobalConfig.LOGIN_FAKE_IDX28) { + // pretend that we're loading the archive so we don't throw the packet size off + offset = 4; + } + buffer.p2(Protocol.outboundBuffer.offset + Buffer.gjstrlen(client.settings) + (159 + offset)); + buffer.p4(530); + buffer.p1(anInt39); + buffer.p1(client.advertSuppressed ? 1 : 0); + buffer.p1(1); + buffer.p1(DisplayMode.getWindowMode()); + buffer.p2(GameShell.canvasWidth); + buffer.p2(GameShell.canvasHeight); + buffer.p1(Preferences.antiAliasingMode); + client.writeUid(buffer); + buffer.pjstr(client.settings); + buffer.p4(client.affiliate); + buffer.p4(Preferences.toInt()); + Preferences.sentToServer = true; + buffer.p2(Protocol.verifyId); + buffer.p4(client.js5Archive0.getChecksum()); + buffer.p4(client.js5Archive1.getChecksum()); + buffer.p4(client.js5Archive2.getChecksum()); + buffer.p4(client.js5Archive3.getChecksum()); + buffer.p4(client.js5Archive4.getChecksum()); + buffer.p4(client.js5Archive5.getChecksum()); + buffer.p4(client.js5Archive6.getChecksum()); + buffer.p4(client.js5Archive7.getChecksum()); + buffer.p4(client.js5Archive8.getChecksum()); + buffer.p4(client.js5Archive9.getChecksum()); + buffer.p4(client.js5Archive10.getChecksum()); + buffer.p4(client.js5Archive11.getChecksum()); + buffer.p4(client.js5Archive12.getChecksum()); + buffer.p4(client.js5Archive13.getChecksum()); + buffer.p4(client.js5Archive14.getChecksum()); + buffer.p4(client.js5Archive15.getChecksum()); + buffer.p4(client.js5Archive16.getChecksum()); + buffer.p4(client.js5Archive17.getChecksum()); + buffer.p4(client.js5Archive18.getChecksum()); + buffer.p4(client.js5Archive19.getChecksum()); + buffer.p4(client.js5Archive20.getChecksum()); + buffer.p4(client.js5Archive21.getChecksum()); + buffer.p4(client.js5Archive22.getChecksum()); + buffer.p4(client.js5Archive23.getChecksum()); + buffer.p4(client.js5Archive24.getChecksum()); + buffer.p4(client.js5Archive25.getChecksum()); + buffer.p4(client.js5Archive26.getChecksum()); + buffer.p4(client.js5Archive27.getChecksum()); + if (GlobalConfig.LOGIN_FAKE_IDX28) { + buffer.p4(0); + } + buffer.pdata(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); + Protocol.socket.write(buffer.data, buffer.offset); + Protocol.outboundBuffer.setKey(key); + for (@Pc(583) int local583 = 0; local583 < 4; local583++) { + key[local583] += 50; + } + Protocol.inboundBuffer.setKey(key); + step = 4; + } + if (step == 4) { + if (Protocol.socket.available() < 1) { + return; + } + @Pc(623) int local623 = Protocol.socket.read(); + if (local623 == 21) { + step = 7; + } else if (local623 == 29) { + step = 10; + } else if (local623 == 1) { + step = 5; + reply = local623; + return; + } else if (local623 == 2) { + step = 8; + } else if (local623 == 15) { + step = 0; + reply = local623; + return; + } else if (local623 == 23 && errors < 1) { + step = 1; + errors++; + loops = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } else { + reply = local623; + step = 0; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + } + if (step == 6) { + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1isaac(17); + Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); + step = 4; + return; + } + if (step == 7) { + if (Protocol.socket.available() >= 1) { + hopTime = (Protocol.socket.read() + 3) * 60; + step = 0; + reply = 21; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + return; + } + if (step == 10) { + if (Protocol.socket.available() >= 1) { + disallowResult = Protocol.socket.read(); + step = 0; + reply = 29; + Protocol.socket.close(); + Protocol.socket = null; + return; + } + return; + } + if (step == 8) { + if (Protocol.socket.available() < 14) { + return; + } + Protocol.socket.read(0, 14, Protocol.inboundBuffer.data); + Protocol.inboundBuffer.offset = 0; + staffModLevel = Protocol.inboundBuffer.g1(); + blackmarks = Protocol.inboundBuffer.g1(); + playerUnderage = Protocol.inboundBuffer.g1() == 1; + parentalChatConsent = Protocol.inboundBuffer.g1() == 1; + parentalAdvertConsent = Protocol.inboundBuffer.g1() == 1; + mapQuickChat = Protocol.inboundBuffer.g1() == 1; + MouseRecorder.enabled = Protocol.inboundBuffer.g1() == 1; + PlayerList.selfId = Protocol.inboundBuffer.g2(); + playerMember = Protocol.inboundBuffer.g1() == 1; + mapMembers = Protocol.inboundBuffer.g1() == 1; + LocTypeList.setAllowMembers(mapMembers); + ObjTypeList.setAllowMembers(mapMembers); + if (!client.advertSuppressed) { + if (playerUnderage && !parentalAdvertConsent || playerMember) { + try { + ZAP.browserControlCall(GameShell.signLink.applet); + } catch (@Pc(910) Throwable local910) { + } + } else { + try { + UNZAP.browserControlCall(GameShell.signLink.applet); + } catch (@Pc(920) Throwable local920) { + } + } + } + Protocol.opcode = Protocol.inboundBuffer.g1isaac(); + Protocol.length = Protocol.inboundBuffer.g2(); + step = 9; + } + if (step == 9) { + if (Protocol.socket.available() < Protocol.length) { + return; + } + Protocol.inboundBuffer.offset = 0; + Protocol.socket.read(0, Protocol.length, Protocol.inboundBuffer.data); + reply = 2; + step = 0; + client.method4221(); + centralZoneX = -1; + Protocol.readRebuildPacket(false); + Protocol.opcode = -1; + return; + } + } catch (@Pc(977) IOException ex) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + if (errors >= 1) { + step = 0; + reply = -4; + } else { + step = 1; + loops = 0; + errors++; + if (client.defaultPort == client.port) { + client.port = client.alternatePort; + } else { + client.port = client.defaultPort; + } + } + } + } - @OriginalMember(owner = "client!p", name = "a", descriptor = "(I)V") - public static void method3395() { - if (step == 5) { - step = 6; - } - } + @OriginalMember(owner = "client!p", name = "a", descriptor = "(I)V") + public static void method3395() { + if (step == 5) { + step = 6; + } + } - @OriginalMember(owner = "client!se", name = "a", descriptor = "(Lclient!na;Lclient!na;IB)V") - public static void method3896(@OriginalArg(0) JagString arg0, @OriginalArg(1) JagString arg1, @OriginalArg(2) int arg2) { - Player.password = arg1; - anInt39 = arg2; - Player.usernameInput = arg0; - if (Player.usernameInput.strEquals(JagString.EMPTY) || Player.password.strEquals(JagString.EMPTY)) { - reply = 3; - } else if (Player.worldId == -1) { - anInt673 = 0; - anInt4587 = 0; - reply = -3; - anInt4937 = 1; - @Pc(43) Buffer local43 = new Buffer(128); - local43.p1(10); - local43.p2((int) (Math.random() * 99999.0D)); - local43.p2(530); - local43.p8(Player.usernameInput.encode37()); - local43.p4((int) (Math.random() * 9.9999999E7D)); - local43.pjstr(Player.password); - local43.p4((int) (Math.random() * 9.9999999E7D)); - local43.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1(210); - Protocol.outboundBuffer.p1(local43.offset); - Protocol.outboundBuffer.pdata(local43.data, local43.offset); - } else { - clear(); - } - } + @OriginalMember(owner = "client!se", name = "a", descriptor = "(Lclient!na;Lclient!na;IB)V") + public static void method3896(@OriginalArg(0) JagString arg0, @OriginalArg(1) JagString arg1, @OriginalArg(2) int arg2) { + Player.password = arg1; + anInt39 = arg2; + Player.usernameInput = arg0; + if (Player.usernameInput.strEquals(JagString.EMPTY) || Player.password.strEquals(JagString.EMPTY)) { + reply = 3; + } else if (Player.worldId == -1) { + anInt673 = 0; + anInt4587 = 0; + reply = -3; + anInt4937 = 1; + @Pc(43) Buffer local43 = new Buffer(128); + local43.p1(10); + local43.p2((int) (Math.random() * 99999.0D)); + local43.p2(530); + local43.p8(Player.usernameInput.encode37()); + local43.p4((int) (Math.random() * 9.9999999E7D)); + local43.pjstr(Player.password); + local43.p4((int) (Math.random() * 9.9999999E7D)); + local43.rsaenc(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1(210); + Protocol.outboundBuffer.p1(local43.offset); + Protocol.outboundBuffer.pdata(local43.data, local43.offset); + } else { + clear(); + } + } - @OriginalMember(owner = "client!ca", name = "h", descriptor = "(I)V") + @OriginalMember(owner = "client!ca", name = "h", descriptor = "(I)V") public static void setupLoadingScreenRegion() { @Pc(10) int local10 = (Camera.renderX >> 10) + (Camera.originX >> 3); @Pc(23) int local23 = (Camera.renderZ >> 10) + (Camera.originZ >> 3); @@ -579,11 +579,11 @@ public class LoginManager { for (@Pc(97) int local97 = (local23 - 6) / 8; local97 <= (local23 + 6) / 8; local97++) { @Pc(115) int local115 = (local80 << 8) + local97; regionBitPacked[local74] = local115; - mapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { aClass100_558, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97) })); - locationsMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { aClass100_1090, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97) })); - npcSpawnsFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { aClass100_807, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97) })); - underWaterMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { aClass100_772, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97) })); - underWaterLocationsMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { aClass100_1103, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97) })); + mapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{aClass100_558, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97)})); + locationsMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{aClass100_1090, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97)})); + npcSpawnsFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{aClass100_807, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97)})); + underWaterMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{aClass100_772, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97)})); + underWaterLocationsMapFileIds[local74] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{aClass100_1103, JagString.parseInt(local80), UNDERSCORE, JagString.parseInt(local97)})); if (npcSpawnsFileIds[local74] == -1) { mapFileIds[local74] = -1; locationsMapFileIds[local74] = -1; @@ -603,239 +603,239 @@ public class LoginManager { method2463(0, local23, local10, 8, true, 8); } - @OriginalMember(owner = "client!wj", name = "b", descriptor = "(B)V") - public static void processLogout() { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - client.method3768(); - SceneGraph.clear(); - @Pc(19) int local19; - for (local19 = 0; local19 < 4; local19++) { - PathFinder.collisionMaps[local19].clear(); - } - WorldMap.clear(false); - System.gc(); - MidiPlayer.playFadeOut(); - MidiPlayer.jingle = false; - MusicPlayer.groupId = -1; - AreaSoundManager.clear(true); - dynamicMapRegion = false; - Camera.originZ = 0; - centralZoneX = 0; - centralZoneZ = 0; - Camera.originX = 0; - for (local19 = 0; local19 < MiniMap.hintMapMarkers.length; local19++) { - MiniMap.hintMapMarkers[local19] = null; - } - PlayerList.size = 0; - NpcList.size = 0; - for (local19 = 0; local19 < 2048; local19++) { - PlayerList.players[local19] = null; - PlayerList.appearanceCache[local19] = null; - } - for (local19 = 0; local19 < 32768; local19++) { - NpcList.npcs[local19] = null; - } - for (local19 = 0; local19 < 4; local19++) { - for (@Pc(115) int local115 = 0; local115 < 104; local115++) { - for (@Pc(122) int local122 = 0; local122 < 104; local122++) { - SceneGraph.objStacks[local19][local115][local122] = null; - } - } - } - Camera.resetCameraEffects(); - Protocol.verifyId = 0; - VarpDomain.reset(); - InterfaceList.method1596(true); - } + @OriginalMember(owner = "client!wj", name = "b", descriptor = "(B)V") + public static void processLogout() { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + client.method3768(); + SceneGraph.clear(); + @Pc(19) int local19; + for (local19 = 0; local19 < 4; local19++) { + PathFinder.collisionMaps[local19].clear(); + } + WorldMap.clear(false); + System.gc(); + MidiPlayer.playFadeOut(); + MidiPlayer.jingle = false; + MusicPlayer.groupId = -1; + AreaSoundManager.clear(true); + dynamicMapRegion = false; + Camera.originZ = 0; + centralZoneX = 0; + centralZoneZ = 0; + Camera.originX = 0; + for (local19 = 0; local19 < MiniMap.hintMapMarkers.length; local19++) { + MiniMap.hintMapMarkers[local19] = null; + } + PlayerList.size = 0; + NpcList.size = 0; + for (local19 = 0; local19 < 2048; local19++) { + PlayerList.players[local19] = null; + PlayerList.appearanceCache[local19] = null; + } + for (local19 = 0; local19 < 32768; local19++) { + NpcList.npcs[local19] = null; + } + for (local19 = 0; local19 < 4; local19++) { + for (@Pc(115) int local115 = 0; local115 < 104; local115++) { + for (@Pc(122) int local122 = 0; local122 < 104; local122++) { + SceneGraph.objStacks[local19][local115][local122] = null; + } + } + } + Camera.resetCameraEffects(); + Protocol.verifyId = 0; + VarpDomain.reset(); + InterfaceList.method1596(true); + } - @OriginalMember(owner = "client!k", name = "a", descriptor = "(IIIIZIZ)V") - public static void method2463(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) boolean arg4, @OriginalArg(5) int arg5) { - if (centralZoneX == arg2 && arg1 == centralZoneZ && (centralPlane == arg0 || SceneGraph.allLevelsAreVisible())) { - return; - } - centralZoneX = arg2; - centralZoneZ = arg1; - centralPlane = arg0; - if (SceneGraph.allLevelsAreVisible()) { - centralPlane = 0; - } - if (arg4) { - client.setGameState(28); - } else { - client.setGameState(25); - } - Static114.drawTextOnScreen(true, LocalizedText.LOADING); - @Pc(53) int local53 = Camera.originZ; - @Pc(55) int local55 = Camera.originX; - Camera.originZ = arg1 * 8 - 48; - Camera.originX = (arg2 - 6) * 8; - map = MapList.getContainingSource(centralZoneX * 8, centralZoneZ * 8); - @Pc(81) int local81 = Camera.originZ - local53; - @Pc(86) int local86 = Camera.originX - local55; - mapElementList = null; - @Pc(96) int local96; - @Pc(103) Npc local103; - @Pc(109) int local109; - if (arg4) { - NpcList.size = 0; - for (local96 = 0; local96 < 32768; local96++) { - local103 = NpcList.npcs[local96]; - if (local103 != null) { - local103.xFine -= local86 * 128; - local103.zFine -= local81 * 128; - if (local103.xFine >= 0 && local103.xFine <= 13184 && local103.zFine >= 0 && local103.zFine <= 13184) { - for (local109 = 0; local109 < 10; local109++) { - local103.movementQueueX[local109] -= local86; - local103.movementQueueZ[local109] -= local81; - } - NpcList.ids[NpcList.size++] = local96; - } else { - NpcList.npcs[local96].setNpcType(null); - NpcList.npcs[local96] = null; - } - } - } - } else { - for (local96 = 0; local96 < 32768; local96++) { - local103 = NpcList.npcs[local96]; - if (local103 != null) { - for (local109 = 0; local109 < 10; local109++) { - local103.movementQueueX[local109] -= local86; - local103.movementQueueZ[local109] -= local81; - } - local103.xFine -= local86 * 128; - local103.zFine -= local81 * 128; - } - } - } - for (local96 = 0; local96 < 2048; local96++) { - @Pc(265) Player local265 = PlayerList.players[local96]; - if (local265 != null) { - for (local109 = 0; local109 < 10; local109++) { - local265.movementQueueX[local109] -= local86; - local265.movementQueueZ[local109] -= local81; - } - local265.xFine -= local86 * 128; - local265.zFine -= local81 * 128; - } - } - Player.level = arg0; - PlayerList.self.teleport(arg5, false, arg3); - @Pc(322) byte local322 = 104; - @Pc(324) byte local324 = 0; - @Pc(326) byte local326 = 0; - @Pc(328) byte local328 = 1; - @Pc(330) byte local330 = 104; - @Pc(332) byte local332 = 1; - if (local81 < 0) { - local328 = -1; - local330 = -1; - local326 = 103; - } - if (local86 < 0) { - local332 = -1; - local324 = 103; - local322 = -1; - } - for (@Pc(358) int local358 = local324; local358 != local322; local358 += local332) { - for (@Pc(367) int local367 = local326; local367 != local330; local367 += local328) { - @Pc(378) int local378 = local86 + local358; - @Pc(382) int local382 = local367 + local81; - for (@Pc(384) int local384 = 0; local384 < 4; local384++) { - if (local378 >= 0 && local382 >= 0 && local378 < 104 && local382 < 104) { - SceneGraph.objStacks[local384][local358][local367] = SceneGraph.objStacks[local384][local378][local382]; - } else { - SceneGraph.objStacks[local384][local358][local367] = null; - } - } - } - } - for (@Pc(451) ChangeLocRequest local451 = (ChangeLocRequest) ChangeLocRequest.queue.head(); local451 != null; local451 = (ChangeLocRequest) ChangeLocRequest.queue.next()) { - local451.z -= local81; - local451.x -= local86; - if (local451.x < 0 || local451.z < 0 || local451.x >= 104 || local451.z >= 104) { - local451.unlink(); - } - } - if (arg4) { - Camera.renderX -= local86 * 128; - Camera.renderZ -= local81 * 128; - Camera.anInt4232 -= local81; - Camera.anInt5449 -= local86; - Camera.anInt5765 -= local81; - Camera.anInt5375 -= local86; - } else { - Camera.cameraType = 1; - } - SoundPlayer.size = 0; - if (mapFlagX != 0) { - mapFlagZ -= local81; - mapFlagX -= local86; - } - if (GlRenderer.enabled && arg4 && (Math.abs(local86) > 104 || Math.abs(local81) > 104)) { - Static103.setInstantFade(); - } - LightingManager.anInt2875 = -1; - aClass69_64.clear(); - Static217.aClass69_116.clear(); - } + @OriginalMember(owner = "client!k", name = "a", descriptor = "(IIIIZIZ)V") + public static void method2463(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) boolean arg4, @OriginalArg(5) int arg5) { + if (centralZoneX == arg2 && arg1 == centralZoneZ && (centralPlane == arg0 || SceneGraph.allLevelsAreVisible())) { + return; + } + centralZoneX = arg2; + centralZoneZ = arg1; + centralPlane = arg0; + if (SceneGraph.allLevelsAreVisible()) { + centralPlane = 0; + } + if (arg4) { + client.setGameState(28); + } else { + client.setGameState(25); + } + Static114.drawTextOnScreen(true, LocalizedText.LOADING); + @Pc(53) int local53 = Camera.originZ; + @Pc(55) int local55 = Camera.originX; + Camera.originZ = arg1 * 8 - 48; + Camera.originX = (arg2 - 6) * 8; + map = MapList.getContainingSource(centralZoneX * 8, centralZoneZ * 8); + @Pc(81) int local81 = Camera.originZ - local53; + @Pc(86) int local86 = Camera.originX - local55; + mapElementList = null; + @Pc(96) int local96; + @Pc(103) Npc local103; + @Pc(109) int local109; + if (arg4) { + NpcList.size = 0; + for (local96 = 0; local96 < 32768; local96++) { + local103 = NpcList.npcs[local96]; + if (local103 != null) { + local103.xFine -= local86 * 128; + local103.zFine -= local81 * 128; + if (local103.xFine >= 0 && local103.xFine <= 13184 && local103.zFine >= 0 && local103.zFine <= 13184) { + for (local109 = 0; local109 < 10; local109++) { + local103.movementQueueX[local109] -= local86; + local103.movementQueueZ[local109] -= local81; + } + NpcList.ids[NpcList.size++] = local96; + } else { + NpcList.npcs[local96].setNpcType(null); + NpcList.npcs[local96] = null; + } + } + } + } else { + for (local96 = 0; local96 < 32768; local96++) { + local103 = NpcList.npcs[local96]; + if (local103 != null) { + for (local109 = 0; local109 < 10; local109++) { + local103.movementQueueX[local109] -= local86; + local103.movementQueueZ[local109] -= local81; + } + local103.xFine -= local86 * 128; + local103.zFine -= local81 * 128; + } + } + } + for (local96 = 0; local96 < 2048; local96++) { + @Pc(265) Player local265 = PlayerList.players[local96]; + if (local265 != null) { + for (local109 = 0; local109 < 10; local109++) { + local265.movementQueueX[local109] -= local86; + local265.movementQueueZ[local109] -= local81; + } + local265.xFine -= local86 * 128; + local265.zFine -= local81 * 128; + } + } + Player.level = arg0; + PlayerList.self.teleport(arg5, false, arg3); + @Pc(322) byte local322 = 104; + @Pc(324) byte local324 = 0; + @Pc(326) byte local326 = 0; + @Pc(328) byte local328 = 1; + @Pc(330) byte local330 = 104; + @Pc(332) byte local332 = 1; + if (local81 < 0) { + local328 = -1; + local330 = -1; + local326 = 103; + } + if (local86 < 0) { + local332 = -1; + local324 = 103; + local322 = -1; + } + for (@Pc(358) int local358 = local324; local358 != local322; local358 += local332) { + for (@Pc(367) int local367 = local326; local367 != local330; local367 += local328) { + @Pc(378) int local378 = local86 + local358; + @Pc(382) int local382 = local367 + local81; + for (@Pc(384) int local384 = 0; local384 < 4; local384++) { + if (local378 >= 0 && local382 >= 0 && local378 < 104 && local382 < 104) { + SceneGraph.objStacks[local384][local358][local367] = SceneGraph.objStacks[local384][local378][local382]; + } else { + SceneGraph.objStacks[local384][local358][local367] = null; + } + } + } + } + for (@Pc(451) ChangeLocRequest local451 = (ChangeLocRequest) ChangeLocRequest.queue.head(); local451 != null; local451 = (ChangeLocRequest) ChangeLocRequest.queue.next()) { + local451.z -= local81; + local451.x -= local86; + if (local451.x < 0 || local451.z < 0 || local451.x >= 104 || local451.z >= 104) { + local451.unlink(); + } + } + if (arg4) { + Camera.renderX -= local86 * 128; + Camera.renderZ -= local81 * 128; + Camera.anInt4232 -= local81; + Camera.anInt5449 -= local86; + Camera.anInt5765 -= local81; + Camera.anInt5375 -= local86; + } else { + Camera.cameraType = 1; + } + SoundPlayer.size = 0; + if (mapFlagX != 0) { + mapFlagZ -= local81; + mapFlagX -= local86; + } + if (GlRenderer.enabled && arg4 && (Math.abs(local86) > 104 || Math.abs(local81) > 104)) { + Static103.setInstantFade(); + } + LightingManager.anInt2875 = -1; + aClass69_64.clear(); + Static217.aClass69_116.clear(); + } - @OriginalMember(owner = "client!dh", name = "a", descriptor = "(Z)V") - public static void reconnect() { - Protocol.outboundBuffer.offset = 0; - Protocol.opcode3 = -1; - Static40.aBoolean108 = false; - Protocol.length = 0; - mapFlagX = 0; - MiniMenu.size = 0; - Protocol.opcode2 = -1; - MiniMap.state = 0; - Player.rebootTimer = 0; - Protocol.opcode4 = -1; - Protocol.inboundBuffer.offset = 0; - anInt1862 = 0; - Protocol.opcode = -1; - @Pc(35) int local35; - for (local35 = 0; local35 < PlayerList.players.length; local35++) { - if (PlayerList.players[local35] != null) { - PlayerList.players[local35].faceEntity = -1; - } - } - for (local35 = 0; local35 < NpcList.npcs.length; local35++) { - if (NpcList.npcs[local35] != null) { - NpcList.npcs[local35].faceEntity = -1; - } - } - Inv.method2073(); - Camera.cameraType = 1; - client.setGameState(30); - for (local35 = 0; local35 < 100; local35++) { - InterfaceList.aBooleanArray100[local35] = true; - } - ClientProt.method1373(); - } + @OriginalMember(owner = "client!dh", name = "a", descriptor = "(Z)V") + public static void reconnect() { + Protocol.outboundBuffer.offset = 0; + Protocol.opcode3 = -1; + Static40.aBoolean108 = false; + Protocol.length = 0; + mapFlagX = 0; + MiniMenu.size = 0; + Protocol.opcode2 = -1; + MiniMap.state = 0; + Player.rebootTimer = 0; + Protocol.opcode4 = -1; + Protocol.inboundBuffer.offset = 0; + anInt1862 = 0; + Protocol.opcode = -1; + @Pc(35) int local35; + for (local35 = 0; local35 < PlayerList.players.length; local35++) { + if (PlayerList.players[local35] != null) { + PlayerList.players[local35].faceEntity = -1; + } + } + for (local35 = 0; local35 < NpcList.npcs.length; local35++) { + if (NpcList.npcs[local35] != null) { + NpcList.npcs[local35].faceEntity = -1; + } + } + Inv.method2073(); + Camera.cameraType = 1; + client.setGameState(30); + for (local35 = 0; local35 < 100; local35++) { + InterfaceList.aBooleanArray100[local35] = true; + } + ClientProt.method1373(); + } - @OriginalMember(owner = "client!ca", name = "a", descriptor = "(ZI)V") - public static void method743(@OriginalArg(0) boolean arg0) { - @Pc(13) int local13 = mapFilesBuffer.length; - @Pc(19) byte[][] local19; - if (GlRenderer.enabled && arg0) { - local19 = underWaterLocationsMapFilesBuffer; - } else { - local19 = locationMapFilesBuffer; - } - for (@Pc(25) int local25 = 0; local25 < local13; local25++) { - @Pc(32) byte[] local32 = local19[local25]; - if (local32 != null) { - @Pc(45) int local45 = (regionBitPacked[local25] >> 8) * 64 - Camera.originX; - @Pc(56) int local56 = (regionBitPacked[local25] & 0xFF) * 64 - Camera.originZ; - client.audioLoop(); - SceneGraph.method2437(local45, arg0, local32, local56, PathFinder.collisionMaps); - } - } - } + @OriginalMember(owner = "client!ca", name = "a", descriptor = "(ZI)V") + public static void method743(@OriginalArg(0) boolean arg0) { + @Pc(13) int local13 = mapFilesBuffer.length; + @Pc(19) byte[][] local19; + if (GlRenderer.enabled && arg0) { + local19 = underWaterLocationsMapFilesBuffer; + } else { + local19 = locationMapFilesBuffer; + } + for (@Pc(25) int local25 = 0; local25 < local13; local25++) { + @Pc(32) byte[] local32 = local19[local25]; + if (local32 != null) { + @Pc(45) int local45 = (regionBitPacked[local25] >> 8) * 64 - Camera.originX; + @Pc(56) int local56 = (regionBitPacked[local25] & 0xFF) * 64 - Camera.originZ; + client.audioLoop(); + SceneGraph.method2437(local45, arg0, local32, local56, PathFinder.collisionMaps); + } + } + } } diff --git a/client/src/main/java/rt4/Map.java b/client/src/main/java/rt4/Map.java index 47634bd..8fad81e 100644 --- a/client/src/main/java/rt4/Map.java +++ b/client/src/main/java/rt4/Map.java @@ -59,18 +59,18 @@ public final class Map extends SecondaryNode { this.chunks = new LinkedList(); } - @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())); - } - local35.computeBounds(); - return local35; - } + @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())); + } + local35.computeBounds(); + return local35; + } - @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IBI)Z") + @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IBI)Z") public final boolean method664(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { if (this.displayMinX > arg1 || arg1 > this.displayMaxZ || arg0 < this.displayMaxX || arg0 > this.displayMinZ) { return false; diff --git a/client/src/main/java/rt4/MapElementList.java b/client/src/main/java/rt4/MapElementList.java index 0472eba..5b35f38 100644 --- a/client/src/main/java/rt4/MapElementList.java +++ b/client/src/main/java/rt4/MapElementList.java @@ -36,26 +36,26 @@ public final class MapElementList { this.aShortArray73 = new short[this.anInt5074]; } - @OriginalMember(owner = "client!la", name = "a", descriptor = "(ILclient!na;Lclient!ve;)Lclient!se;") - public static MapElementList create(@OriginalArg(1) JagString arg0, @OriginalArg(2) Js5 arg1) { - @Pc(10) int local10 = arg1.getGroupId(arg0); - if (local10 == -1) { - return new MapElementList(0); - } - @Pc(29) int[] local29 = arg1.getFileIds(local10); - @Pc(35) MapElementList local35 = new MapElementList(local29.length); - for (@Pc(37) int local37 = 0; local37 < local35.anInt5074; local37++) { - @Pc(56) Buffer local56 = new Buffer(arg1.fetchFile(local10, local29[local37])); - local35.aClass100Array153[local37] = local56.gjstr(); - local35.aByteArray69[local37] = local56.g1b(); - local35.aShortArray73[local37] = (short) local56.g2(); - local35.aShortArray72[local37] = (short) local56.g2(); - local35.anIntArray444[local37] = local56.g4(); - } - return local35; - } + @OriginalMember(owner = "client!la", name = "a", descriptor = "(ILclient!na;Lclient!ve;)Lclient!se;") + public static MapElementList create(@OriginalArg(1) JagString arg0, @OriginalArg(2) Js5 arg1) { + @Pc(10) int local10 = arg1.getGroupId(arg0); + if (local10 == -1) { + return new MapElementList(0); + } + @Pc(29) int[] local29 = arg1.getFileIds(local10); + @Pc(35) MapElementList local35 = new MapElementList(local29.length); + for (@Pc(37) int local37 = 0; local37 < local35.anInt5074; local37++) { + @Pc(56) Buffer local56 = new Buffer(arg1.fetchFile(local10, local29[local37])); + local35.aClass100Array153[local37] = local56.gjstr(); + local35.aByteArray69[local37] = local56.g1b(); + local35.aShortArray73[local37] = (short) local56.g2(); + local35.aShortArray72[local37] = (short) local56.g2(); + local35.anIntArray444[local37] = local56.g4(); + } + return local35; + } - @OriginalMember(owner = "client!se", name = "a", descriptor = "(IB)Z") + @OriginalMember(owner = "client!se", name = "a", descriptor = "(IB)Z") public final boolean method3890(@OriginalArg(0) int arg0) { return (this.aByteArray69[arg0] & 0x8) != 0; } diff --git a/client/src/main/java/rt4/MapList.java b/client/src/main/java/rt4/MapList.java index 234adaf..347de99 100644 --- a/client/src/main/java/rt4/MapList.java +++ b/client/src/main/java/rt4/MapList.java @@ -5,31 +5,31 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class MapList { - @OriginalMember(owner = "client!sh", name = "a", descriptor = "Lclient!ih;") - public static final LinkedList aClass69_120 = new LinkedList(); - @OriginalMember(owner = "client!ed", name = "D", descriptor = "Lclient!na;") - public static final JagString aClass100_374 = JagString.parse("details"); - @OriginalMember(owner = "client!je", name = "W", descriptor = "Lclient!ve;") - public static Js5 archive; - @OriginalMember(owner = "client!th", name = "p", descriptor = "[Lclient!mm;") - public static SoftwareSprite[] sprites; - @OriginalMember(owner = "client!va", name = "G", descriptor = "[Z") - public static boolean[] aBooleanArray130; + @OriginalMember(owner = "client!sh", name = "a", descriptor = "Lclient!ih;") + public static final LinkedList aClass69_120 = new LinkedList(); + @OriginalMember(owner = "client!ed", name = "D", descriptor = "Lclient!na;") + public static final JagString aClass100_374 = JagString.parse("details"); + @OriginalMember(owner = "client!je", name = "W", descriptor = "Lclient!ve;") + public static Js5 archive; + @OriginalMember(owner = "client!th", name = "p", descriptor = "[Lclient!mm;") + public static SoftwareSprite[] sprites; + @OriginalMember(owner = "client!va", name = "G", descriptor = "[Z") + public static boolean[] aBooleanArray130; - @OriginalMember(owner = "client!ta", name = "a", descriptor = "([Lclient!mm;ILclient!ve;)V") - public static void init(@OriginalArg(0) SoftwareSprite[] arg0, @OriginalArg(2) Js5 arg1) { - archive = arg1; - sprites = arg0; - aBooleanArray130 = new boolean[sprites.length]; - aClass69_120.clear(); - @Pc(25) int local25 = archive.getGroupId(aClass100_374); - @Pc(30) int[] local30 = archive.getFileIds(local25); - for (@Pc(32) int local32 = 0; local32 < local30.length; local32++) { - aClass69_120.addTail(Map.create(new Buffer(archive.fetchFile(local25, local30[local32])))); - } - } + @OriginalMember(owner = "client!ta", name = "a", descriptor = "([Lclient!mm;ILclient!ve;)V") + public static void init(@OriginalArg(0) SoftwareSprite[] arg0, @OriginalArg(2) Js5 arg1) { + archive = arg1; + sprites = arg0; + aBooleanArray130 = new boolean[sprites.length]; + aClass69_120.clear(); + @Pc(25) int local25 = archive.getGroupId(aClass100_374); + @Pc(30) int[] local30 = archive.getFileIds(local25); + for (@Pc(32) int local32 = 0; local32 < local30.length; local32++) { + aClass69_120.addTail(Map.create(new Buffer(archive.fetchFile(local25, local30[local32])))); + } + } - @OriginalMember(owner = "client!jk", name = "a", descriptor = "(ILclient!na;)Lclient!bn;") + @OriginalMember(owner = "client!jk", name = "a", descriptor = "(ILclient!na;)Lclient!bn;") public static Map get(@OriginalArg(1) JagString arg0) { for (@Pc(15) Map local15 = (Map) aClass69_120.head(); local15 != null; local15 = (Map) aClass69_120.next()) { if (local15.group.strEquals(arg0)) { @@ -39,7 +39,7 @@ public class MapList { return null; } - @OriginalMember(owner = "client!ce", name = "a", descriptor = "(IBI)Lclient!bn;") + @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)) { @@ -49,15 +49,15 @@ public class MapList { return null; } - @OriginalMember(owner = "client!hb", name = "b", descriptor = "(II)Z") + @OriginalMember(owner = "client!hb", name = "b", descriptor = "(II)Z") public static boolean method1855(@OriginalArg(0) int arg0) { - return arg0 >= 0 && aBooleanArray130.length > arg0 ? aBooleanArray130[arg0] : false; + return arg0 >= 0 && aBooleanArray130.length > arg0 && aBooleanArray130[arg0]; } - @OriginalMember(owner = "client!ui", name = "d", descriptor = "(II)V") - public static void method4332(@OriginalArg(0) int arg0) { - if (arg0 >= 0 && aBooleanArray130.length > arg0) { - aBooleanArray130[arg0] = !aBooleanArray130[arg0]; - } - } + @OriginalMember(owner = "client!ui", name = "d", descriptor = "(II)V") + public static void method4332(@OriginalArg(0) int arg0) { + if (arg0 >= 0 && aBooleanArray130.length > arg0) { + aBooleanArray130[arg0] = !aBooleanArray130[arg0]; + } + } } diff --git a/client/src/main/java/rt4/MaterialManager.java b/client/src/main/java/rt4/MaterialManager.java index 547c432..5815700 100644 --- a/client/src/main/java/rt4/MaterialManager.java +++ b/client/src/main/java/rt4/MaterialManager.java @@ -8,219 +8,219 @@ import org.openrs2.deob.annotation.Pc; import java.nio.ByteBuffer; public class MaterialManager { - public static final int WATER = 4; + public static final int WATER = 4; - @OriginalMember(owner = "client!dl", name = "c", descriptor = "I") - public static int currentType = 0; - @OriginalMember(owner = "client!je", name = "R", descriptor = "Z") - public static boolean renderingUnderwater = false; - @OriginalMember(owner = "client!aa", name = "t", descriptor = "[Lclient!pc;") - public static MaterialRenderer[] renderers; - @OriginalMember(owner = "client!mh", name = "eb", descriptor = "I") - public static int currentArg = 0; - @OriginalMember(owner = "client!sj", name = "D", descriptor = "I") - public static int anInt5158; - @OriginalMember(owner = "client!ej", name = "X", descriptor = "I") - public static int anInt1815; - @OriginalMember(owner = "client!uj", name = "H", descriptor = "I") + @OriginalMember(owner = "client!dl", name = "c", descriptor = "I") + public static int currentType = 0; + @OriginalMember(owner = "client!je", name = "R", descriptor = "Z") + public static boolean renderingUnderwater = false; + @OriginalMember(owner = "client!aa", name = "t", descriptor = "[Lclient!pc;") + public static MaterialRenderer[] renderers; + @OriginalMember(owner = "client!mh", name = "eb", descriptor = "I") + public static int currentArg = 0; + @OriginalMember(owner = "client!sj", name = "D", descriptor = "I") + public static int anInt5158; + @OriginalMember(owner = "client!ej", name = "X", descriptor = "I") + public static int anInt1815; + @OriginalMember(owner = "client!uj", name = "H", descriptor = "I") public static int anInt5559; - @OriginalMember(owner = "client!bb", name = "M", descriptor = "I") - public static int anInt406; - @OriginalMember(owner = "client!qc", name = "cb", descriptor = "I") - public static int anInt4675; - @OriginalMember(owner = "client!lm", name = "e", descriptor = "Z") - public static boolean allows3DTextureMapping; - @OriginalMember(owner = "client!lm", name = "a", descriptor = "[I") - public static int[] waterfallTextures = null; - @OriginalMember(owner = "client!lm", name = "b", descriptor = "[I") - public static int[] anIntArray341 = null; - @OriginalMember(owner = "client!lm", name = "f", descriptor = "I") - public static int texture3D = -1; - @OriginalMember(owner = "client!lm", name = "g", descriptor = "I") - public static int waterfallTextureId = -1; - @OriginalMember(owner = "client!lm", name = "c", descriptor = "Ljava/nio/ByteBuffer;") - private static ByteBuffer aByteBuffer6; - @OriginalMember(owner = "client!lm", name = "d", descriptor = "Ljava/nio/ByteBuffer;") - private static ByteBuffer textureBuffer; + @OriginalMember(owner = "client!bb", name = "M", descriptor = "I") + public static int anInt406; + @OriginalMember(owner = "client!qc", name = "cb", descriptor = "I") + public static int anInt4675; + @OriginalMember(owner = "client!lm", name = "e", descriptor = "Z") + public static boolean allows3DTextureMapping; + @OriginalMember(owner = "client!lm", name = "a", descriptor = "[I") + public static int[] waterfallTextures = null; + @OriginalMember(owner = "client!lm", name = "b", descriptor = "[I") + public static int[] anIntArray341 = null; + @OriginalMember(owner = "client!lm", name = "f", descriptor = "I") + public static int texture3D = -1; + @OriginalMember(owner = "client!lm", name = "g", descriptor = "I") + public static int waterfallTextureId = -1; + @OriginalMember(owner = "client!lm", name = "c", descriptor = "Ljava/nio/ByteBuffer;") + private static ByteBuffer aByteBuffer6; + @OriginalMember(owner = "client!lm", name = "d", descriptor = "Ljava/nio/ByteBuffer;") + private static ByteBuffer textureBuffer; - @OriginalMember(owner = "client!cb", name = "b", descriptor = "(III)V") - public static void setMaterial(@OriginalArg(1) int arg, @OriginalArg(2) int type) { - if (type == 4 && !Preferences.highWaterDetail) { - type = 2; - arg = 2; - } - if (currentType != type) { - if (renderingUnderwater) { - return; - } - if (currentType != 0) { - renderers[currentType].unbind(); - } - if (type != 0) { - @Pc(61) MaterialRenderer renderer = renderers[type]; - renderer.bind(); - renderer.setArgument(arg); - } - currentType = type; - currentArg = arg; - } else if (type != 0 && arg != currentArg) { - renderers[type].setArgument(arg); - currentArg = arg; - } - } + @OriginalMember(owner = "client!cb", name = "b", descriptor = "(III)V") + public static void setMaterial(@OriginalArg(1) int arg, @OriginalArg(2) int type) { + if (type == 4 && !Preferences.highWaterDetail) { + type = 2; + arg = 2; + } + if (currentType != type) { + if (renderingUnderwater) { + return; + } + if (currentType != 0) { + renderers[currentType].unbind(); + } + if (type != 0) { + @Pc(61) MaterialRenderer renderer = renderers[type]; + renderer.bind(); + renderer.setArgument(arg); + } + currentType = type; + currentArg = arg; + } else if (type != 0 && arg != currentArg) { + renderers[type].setArgument(arg); + currentArg = arg; + } + } - @OriginalMember(owner = "client!ka", name = "b", descriptor = "(II)V") - public static void resetArgument(@OriginalArg(1) int arg0) { - if (arg0 == currentType) { - @Pc(12) MaterialRenderer local12 = renderers[arg0]; - local12.setArgument(currentArg); - } - } + @OriginalMember(owner = "client!ka", name = "b", descriptor = "(II)V") + public static void resetArgument(@OriginalArg(1) int arg0) { + if (arg0 == currentType) { + @Pc(12) MaterialRenderer local12 = renderers[arg0]; + local12.setArgument(currentArg); + } + } - @OriginalMember(owner = "client!ef", name = "a", descriptor = "(I)I") - public static int getFlags() { - return currentType == 0 ? 0 : renderers[currentType].getFlags(); - } + @OriginalMember(owner = "client!ef", name = "a", descriptor = "(I)I") + public static int getFlags() { + return currentType == 0 ? 0 : renderers[currentType].getFlags(); + } - @OriginalMember(owner = "client!nj", name = "a", descriptor = "(I)V") - public static void quit() { - renderers = null; - method2808(); - } + @OriginalMember(owner = "client!nj", name = "a", descriptor = "(I)V") + public static void quit() { + renderers = null; + method2808(); + } - @OriginalMember(owner = "client!te", name = "e", descriptor = "(I)V") - public static void init() { - method2809(); - renderers = new MaterialRenderer[7]; - renderers[1] = new SpecularMaterialRenderer(); - renderers[2] = new LiquidMaterialRenderer(); - renderers[3] = new UnderwaterMaterialRenderer(); - renderers[4] = new WaterMaterialRenderer(); - renderers[5] = new WaterfallMaterialRenderer(); - renderers[6] = new UnlitMaterialRenderer(); - } + @OriginalMember(owner = "client!te", name = "e", descriptor = "(I)V") + public static void init() { + method2809(); + renderers = new MaterialRenderer[7]; + renderers[1] = new SpecularMaterialRenderer(); + renderers[2] = new LiquidMaterialRenderer(); + renderers[3] = new UnderwaterMaterialRenderer(); + renderers[4] = new WaterMaterialRenderer(); + renderers[5] = new WaterfallMaterialRenderer(); + renderers[6] = new UnlitMaterialRenderer(); + } - @OriginalMember(owner = "client!ld", name = "a", descriptor = "(IIIIZI)V") - public static void method2731(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) { - anInt5158 = arg1; - anInt1815 = arg4; - anInt5559 = arg0; - anInt406 = arg3; - anInt4675 = arg2; - } + @OriginalMember(owner = "client!ld", name = "a", descriptor = "(IIIIZI)V") + public static void method2731(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) { + anInt5158 = arg1; + anInt1815 = arg4; + anInt5559 = arg0; + anInt406 = arg3; + anInt4675 = arg2; + } - @OriginalMember(owner = "client!lm", name = "a", descriptor = "()V") - public static void method2807() { - @Pc(11) byte[] local11; - if (textureBuffer == null) { - @Pc(5) MaterialManager_Class106_Sub1_Sub1 local5 = new MaterialManager_Class106_Sub1_Sub1(); - local11 = local5.method3215(); - textureBuffer = ByteBuffer.allocateDirect(local11.length); - textureBuffer.position(0); - textureBuffer.put(local11); - textureBuffer.flip(); - } - if (aByteBuffer6 == null) { - @Pc(32) MaterialManager_Class106_Sub2_Sub1 local32 = new MaterialManager_Class106_Sub2_Sub1(); - local11 = local32.method3854(); - aByteBuffer6 = ByteBuffer.allocateDirect(local11.length); - aByteBuffer6.position(0); - aByteBuffer6.put(local11); - aByteBuffer6.flip(); - } - } + @OriginalMember(owner = "client!lm", name = "a", descriptor = "()V") + public static void method2807() { + @Pc(11) byte[] local11; + if (textureBuffer == null) { + @Pc(5) MaterialManager_Class106_Sub1_Sub1 local5 = new MaterialManager_Class106_Sub1_Sub1(); + local11 = local5.method3215(); + textureBuffer = ByteBuffer.allocateDirect(local11.length); + textureBuffer.position(0); + textureBuffer.put(local11); + textureBuffer.flip(); + } + if (aByteBuffer6 == null) { + @Pc(32) MaterialManager_Class106_Sub2_Sub1 local32 = new MaterialManager_Class106_Sub2_Sub1(); + local11 = local32.method3854(); + aByteBuffer6 = ByteBuffer.allocateDirect(local11.length); + aByteBuffer6.position(0); + aByteBuffer6.put(local11); + aByteBuffer6.flip(); + } + } - @OriginalMember(owner = "client!lm", name = "b", descriptor = "()V") - public static void method2808() { - @Pc(4) GL2 local4; - @Pc(11) int[] local11; - if (texture3D != -1) { - local4 = GlRenderer.gl; - local11 = new int[] {texture3D}; - local4.glDeleteTextures(1, local11, 0); - texture3D = -1; - GlCleaner.onCardTexture -= textureBuffer.limit() * 2; - } - if (anIntArray341 != null) { - local4 = GlRenderer.gl; - local4.glDeleteTextures(64, anIntArray341, 0); - anIntArray341 = null; - GlCleaner.onCardTexture -= textureBuffer.limit() * 2; - } - if (waterfallTextureId != -1) { - local4 = GlRenderer.gl; - local11 = new int[] {waterfallTextureId}; - local4.glDeleteTextures(1, local11, 0); - waterfallTextureId = -1; - GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2; - } - if (waterfallTextures != null) { - local4 = GlRenderer.gl; - local4.glDeleteTextures(64, waterfallTextures, 0); - waterfallTextures = null; - GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2; - } - } + @OriginalMember(owner = "client!lm", name = "b", descriptor = "()V") + public static void method2808() { + @Pc(4) GL2 local4; + @Pc(11) int[] local11; + if (texture3D != -1) { + local4 = GlRenderer.gl; + local11 = new int[]{texture3D}; + local4.glDeleteTextures(1, local11, 0); + texture3D = -1; + GlCleaner.onCardTexture -= textureBuffer.limit() * 2; + } + if (anIntArray341 != null) { + local4 = GlRenderer.gl; + local4.glDeleteTextures(64, anIntArray341, 0); + anIntArray341 = null; + GlCleaner.onCardTexture -= textureBuffer.limit() * 2; + } + if (waterfallTextureId != -1) { + local4 = GlRenderer.gl; + local11 = new int[]{waterfallTextureId}; + local4.glDeleteTextures(1, local11, 0); + waterfallTextureId = -1; + GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2; + } + if (waterfallTextures != null) { + local4 = GlRenderer.gl; + local4.glDeleteTextures(64, waterfallTextures, 0); + waterfallTextures = null; + GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2; + } + } - @OriginalMember(owner = "client!lm", name = "c", descriptor = "()V") - public static void method2809() { - allows3DTextureMapping = GlRenderer.extTexture3dSupported; - method2807(); - method2811(); - method2812(); - } + @OriginalMember(owner = "client!lm", name = "c", descriptor = "()V") + public static void method2809() { + allows3DTextureMapping = GlRenderer.extTexture3dSupported; + method2807(); + method2811(); + method2812(); + } - @OriginalMember(owner = "client!lm", name = "e", descriptor = "()V") - private static void method2811() { - @Pc(1) GL2 local1 = GlRenderer.gl; - if (allows3DTextureMapping) { - @Pc(6) int[] local6 = new int[1]; - local1.glGenTextures(1, local6, 0); - local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]); - textureBuffer.position(0); - local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, textureBuffer); - local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); - local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); - texture3D = local6[0]; - GlCleaner.onCardTexture += textureBuffer.limit() * 2; - } else { - anIntArray341 = new int[64]; - local1.glGenTextures(64, anIntArray341, 0); - for (@Pc(65) int local65 = 0; local65 < 64; local65++) { - GlRenderer.setTextureId(anIntArray341[local65]); - textureBuffer.position(local65 * 64 * 64 * 2); - local1.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, textureBuffer); - local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); - local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); - } - GlCleaner.onCardTexture += textureBuffer.limit() * 2; - } - } + @OriginalMember(owner = "client!lm", name = "e", descriptor = "()V") + private static void method2811() { + @Pc(1) GL2 local1 = GlRenderer.gl; + if (allows3DTextureMapping) { + @Pc(6) int[] local6 = new int[1]; + local1.glGenTextures(1, local6, 0); + local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]); + textureBuffer.position(0); + local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, textureBuffer); + local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); + local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); + texture3D = local6[0]; + GlCleaner.onCardTexture += textureBuffer.limit() * 2; + } else { + anIntArray341 = new int[64]; + local1.glGenTextures(64, anIntArray341, 0); + for (@Pc(65) int local65 = 0; local65 < 64; local65++) { + GlRenderer.setTextureId(anIntArray341[local65]); + textureBuffer.position(local65 * 64 * 64 * 2); + local1.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, textureBuffer); + local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); + local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); + } + GlCleaner.onCardTexture += textureBuffer.limit() * 2; + } + } - @OriginalMember(owner = "client!lm", name = "f", descriptor = "()V") - private static void method2812() { - @Pc(1) GL2 local1 = GlRenderer.gl; - if (allows3DTextureMapping) { - @Pc(6) int[] local6 = new int[1]; - local1.glGenTextures(1, local6, 0); - local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]); - aByteBuffer6.position(0); - local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6); - local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); - local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); - waterfallTextureId = local6[0]; - GlCleaner.onCardTexture += aByteBuffer6.limit() * 2; - return; - } - waterfallTextures = new int[64]; - local1.glGenTextures(64, waterfallTextures, 0); - for (@Pc(65) int local65 = 0; local65 < 64; local65++) { - GlRenderer.setTextureId(waterfallTextures[local65]); - aByteBuffer6.position(local65 * 64 * 64 * 2); - local1.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6); - local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); - local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); - } - GlCleaner.onCardTexture += aByteBuffer6.limit() * 2; - } + @OriginalMember(owner = "client!lm", name = "f", descriptor = "()V") + private static void method2812() { + @Pc(1) GL2 local1 = GlRenderer.gl; + if (allows3DTextureMapping) { + @Pc(6) int[] local6 = new int[1]; + local1.glGenTextures(1, local6, 0); + local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]); + aByteBuffer6.position(0); + local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6); + local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); + local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); + waterfallTextureId = local6[0]; + GlCleaner.onCardTexture += aByteBuffer6.limit() * 2; + return; + } + waterfallTextures = new int[64]; + local1.glGenTextures(64, waterfallTextures, 0); + for (@Pc(65) int local65 = 0; local65 < 64; local65++) { + GlRenderer.setTextureId(waterfallTextures[local65]); + aByteBuffer6.position(local65 * 64 * 64 * 2); + local1.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6); + local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); + local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); + } + GlCleaner.onCardTexture += aByteBuffer6.limit() * 2; + } } diff --git a/client/src/main/java/rt4/MaterialManager_Class106.java b/client/src/main/java/rt4/MaterialManager_Class106.java index 04b4985..7a50b34 100644 --- a/client/src/main/java/rt4/MaterialManager_Class106.java +++ b/client/src/main/java/rt4/MaterialManager_Class106.java @@ -1,11 +1,12 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!wf") public abstract class MaterialManager_Class106 { @@ -41,15 +42,15 @@ public abstract class MaterialManager_Class106 { this.method3847(); } - @OriginalMember(owner = "client!se", name = "a", descriptor = "(IIIIZ)I") - public static int method3891(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - @Pc(8) int local8 = arg3 & 0xF; - @Pc(29) int local29 = local8 >= 4 ? (local8 == 12 || local8 == 14 ? arg0 : arg1) : arg2; - @Pc(42) int local42 = local8 < 8 ? arg0 : arg2; - return ((local8 & 0x1) == 0 ? local42 : -local42) + ((local8 & 0x2) == 0 ? local29 : -local29); - } + @OriginalMember(owner = "client!se", name = "a", descriptor = "(IIIIZ)I") + public static int method3891(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + @Pc(8) int local8 = arg3 & 0xF; + @Pc(29) int local29 = local8 >= 4 ? (local8 == 12 || local8 == 14 ? arg0 : arg1) : arg2; + @Pc(42) int local42 = local8 < 8 ? arg0 : arg2; + return ((local8 & 0x1) == 0 ? local42 : -local42) + ((local8 & 0x2) == 0 ? local29 : -local29); + } - @OriginalMember(owner = "client!wf", name = "a", descriptor = "(IIII)V") + @OriginalMember(owner = "client!wf", name = "a", descriptor = "(IIII)V") protected final void method3841() { @Pc(8) int[] local8 = new int[64]; @Pc(11) int[] local11 = new int[64]; @@ -147,7 +148,7 @@ public abstract class MaterialManager_Class106 { private void method3843() { this.aShortArray70 = new short[this.anInt5008]; for (@Pc(12) int local12 = 0; local12 < this.anInt5008; local12++) { - this.aShortArray70[local12] = (short) Math.pow(2.0D, (double) local12); + this.aShortArray70[local12] = (short) Math.pow(2.0D, local12); } } @@ -156,7 +157,7 @@ public abstract class MaterialManager_Class106 { @OriginalMember(owner = "client!wf", name = "c", descriptor = "(I)V") private void method3847() { - @Pc(12) Random local12 = new Random((long) this.anInt5000); + @Pc(12) Random local12 = new Random(this.anInt5000); @Pc(14) int local14; for (local14 = 0; local14 < 255; local14++) { this.aShortArray69[local14] = (short) local14; diff --git a/client/src/main/java/rt4/MaterialManager_Class106_Sub1.java b/client/src/main/java/rt4/MaterialManager_Class106_Sub1.java index faec73f..160755f 100644 --- a/client/src/main/java/rt4/MaterialManager_Class106_Sub1.java +++ b/client/src/main/java/rt4/MaterialManager_Class106_Sub1.java @@ -39,7 +39,7 @@ public class MaterialManager_Class106_Sub1 extends MaterialManager_Class106 { super(arg0, arg1, arg2, arg3, arg4); this.anInt4134 = (int) (arg7 * 4096.0F); this.anInt4139 = (int) (arg6 * 4096.0F); - this.anInt4129 = this.anInt4133 = (int) (Math.pow(0.5D, (double) -arg5) * 4096.0D); + this.anInt4129 = this.anInt4133 = (int) (Math.pow(0.5D, -arg5) * 4096.0D); } @OriginalMember(owner = "client!we", name = "a", descriptor = "(IB)V") diff --git a/client/src/main/java/rt4/MaterialManager_Class106_Sub2.java b/client/src/main/java/rt4/MaterialManager_Class106_Sub2.java index af5cb51..4ba045f 100644 --- a/client/src/main/java/rt4/MaterialManager_Class106_Sub2.java +++ b/client/src/main/java/rt4/MaterialManager_Class106_Sub2.java @@ -24,7 +24,7 @@ public class MaterialManager_Class106_Sub2 extends MaterialManager_Class106 { protected MaterialManager_Class106_Sub2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5) { super(arg0, arg1, arg2, arg3, arg4); for (@Pc(15) int local15 = 0; local15 < this.anInt5008; local15++) { - this.anIntArray441[local15] = (short) (Math.pow((double) arg5, (double) local15) * 4096.0D); + this.anIntArray441[local15] = (short) (Math.pow(arg5, local15) * 4096.0D); } } diff --git a/client/src/main/java/rt4/MidiDecoder.java b/client/src/main/java/rt4/MidiDecoder.java index c61b9be..9dc6fae 100644 --- a/client/src/main/java/rt4/MidiDecoder.java +++ b/client/src/main/java/rt4/MidiDecoder.java @@ -8,9 +8,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ki") public final class MidiDecoder { - @OriginalMember(owner = "client!ki", name = "e", descriptor = "[B") - public static final byte[] STATUS_LENGTHS = new byte[] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - @OriginalMember(owner = "client!ki", name = "b", descriptor = "[I") + @OriginalMember(owner = "client!ki", name = "e", descriptor = "[B") + public static final byte[] STATUS_LENGTHS = new byte[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + @OriginalMember(owner = "client!ki", name = "b", descriptor = "[I") public int[] times; @OriginalMember(owner = "client!ki", name = "c", descriptor = "[I") diff --git a/client/src/main/java/rt4/MidiInstrument.java b/client/src/main/java/rt4/MidiInstrument.java index e91d65f..a13ff7b 100644 --- a/client/src/main/java/rt4/MidiInstrument.java +++ b/client/src/main/java/rt4/MidiInstrument.java @@ -385,19 +385,19 @@ public final class MidiInstrument extends Node { } } - @OriginalMember(owner = "client!sa", name = "c", descriptor = "(III)I") + @OriginalMember(owner = "client!sa", name = "c", descriptor = "(III)I") public static int method3825(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { @Pc(12) int local12 = arg0 >>> 31; return (arg0 + local12) / arg1 - local12; } - @OriginalMember(owner = "client!jb", name = "a", descriptor = "(ILclient!ve;I)Lclient!jk;") + @OriginalMember(owner = "client!jb", name = "a", descriptor = "(ILclient!ve;I)Lclient!jk;") public static MidiInstrument method2320(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) { @Pc(9) byte[] local9 = arg0.fetchFile(arg1); return local9 == null ? null : new MidiInstrument(local9); } - @OriginalMember(owner = "client!jk", name = "d", descriptor = "(B)V") + @OriginalMember(owner = "client!jk", name = "d", descriptor = "(B)V") public final void method2432() { this.anIntArray289 = null; } diff --git a/client/src/main/java/rt4/MidiPcmStream.java b/client/src/main/java/rt4/MidiPcmStream.java index bbbff94..6ec6bc8 100644 --- a/client/src/main/java/rt4/MidiPcmStream.java +++ b/client/src/main/java/rt4/MidiPcmStream.java @@ -111,17 +111,17 @@ public final class MidiPcmStream extends PcmStream { public final synchronized boolean isSongReady(@OriginalArg(0) Song arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) SoundBank arg2) { arg0.createPrograms(); @Pc(5) boolean local5 = true; - @Pc(20) int[] local20 = new int[] { 22050 }; + @Pc(20) int[] local20 = new int[]{22050}; for (@Pc(34) ByteArrayNode local34 = (ByteArrayNode) arg0.programs.head(); local34 != null; local34 = (ByteArrayNode) arg0.programs.next()) { @Pc(40) int local40 = (int) local34.key; - @Pc(48) MidiInstrument local48 = (MidiInstrument) this.aClass133_23.get((long) local40); + @Pc(48) MidiInstrument local48 = (MidiInstrument) this.aClass133_23.get(local40); if (local48 == null) { local48 = MidiInstrument.method2320(arg1, local40); if (local48 == null) { local5 = false; continue; } - this.aClass133_23.put(local48, (long) local40); + this.aClass133_23.put(local48, local40); } if (!local48.method2436(local20, arg2, local34.value)) { local5 = false; @@ -278,7 +278,7 @@ public final class MidiPcmStream extends PcmStream { } } } - @Pc(118) MidiInstrument local118 = (MidiInstrument) this.aClass133_23.get((long) this.anIntArray506[arg1]); + @Pc(118) MidiInstrument local118 = (MidiInstrument) this.aClass133_23.get(this.anIntArray506[arg1]); if (local118 == null) { return; } diff --git a/client/src/main/java/rt4/MidiPlayer.java b/client/src/main/java/rt4/MidiPlayer.java index 969d049..609f96c 100644 --- a/client/src/main/java/rt4/MidiPlayer.java +++ b/client/src/main/java/rt4/MidiPlayer.java @@ -5,163 +5,163 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class MidiPlayer { - @OriginalMember(owner = "client!le", name = "k", descriptor = "Z") - public static boolean jingle = false; - @OriginalMember(owner = "client!cb", name = "hb", descriptor = "Lclient!le;") - public static SoundBank soundBank; - @OriginalMember(owner = "client!bd", name = "i", descriptor = "I") - public static int state = 0; - @OriginalMember(owner = "client!uh", name = "P", descriptor = "Lclient!ve;") - public static Js5 vorbisArchive; - @OriginalMember(owner = "client!ui", name = "R", descriptor = "I") - public static int volume; - @OriginalMember(owner = "client!wi", name = "ab", descriptor = "I") - public static int songGroupId; - @OriginalMember(owner = "client!eg", name = "t", descriptor = "I") - public static int volumeFadeRate; - @OriginalMember(owner = "client!fl", name = "u", descriptor = "Z") - public static boolean aBoolean116; - @OriginalMember(owner = "client!rb", name = "f", descriptor = "Lclient!ve;") - public static Js5 instrumentsArchive; - @OriginalMember(owner = "client!gd", name = "m", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!le", name = "k", descriptor = "Z") + public static boolean jingle = false; + @OriginalMember(owner = "client!cb", name = "hb", descriptor = "Lclient!le;") + public static SoundBank soundBank; + @OriginalMember(owner = "client!bd", name = "i", descriptor = "I") + public static int state = 0; + @OriginalMember(owner = "client!uh", name = "P", descriptor = "Lclient!ve;") + public static Js5 vorbisArchive; + @OriginalMember(owner = "client!ui", name = "R", descriptor = "I") + public static int volume; + @OriginalMember(owner = "client!wi", name = "ab", descriptor = "I") + public static int songGroupId; + @OriginalMember(owner = "client!eg", name = "t", descriptor = "I") + public static int volumeFadeRate; + @OriginalMember(owner = "client!fl", name = "u", descriptor = "Z") + public static boolean aBoolean116; + @OriginalMember(owner = "client!rb", name = "f", descriptor = "Lclient!ve;") + public static Js5 instrumentsArchive; + @OriginalMember(owner = "client!gd", name = "m", descriptor = "Lclient!ve;") public static Js5 synthArchive; - @OriginalMember(owner = "client!le", name = "c", descriptor = "Lclient!rf;") - public static Song song; - @OriginalMember(owner = "client!nj", name = "g", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!le", name = "c", descriptor = "Lclient!rf;") + public static Song song; + @OriginalMember(owner = "client!nj", name = "g", descriptor = "Lclient!ve;") public static Js5 songArchive; - @OriginalMember(owner = "client!nj", name = "e", descriptor = "Lclient!va;") + @OriginalMember(owner = "client!nj", name = "e", descriptor = "Lclient!va;") public static MidiPcmStream stream; - @OriginalMember(owner = "client!sf", name = "j", descriptor = "I") - public static int songFileId; + @OriginalMember(owner = "client!sf", name = "j", descriptor = "I") + public static int songFileId; - @OriginalMember(owner = "client!km", name = "c", descriptor = "(Z)Z") - public static boolean method2699() { - try { - if (state == 2) { - if (song == null) { - song = Song.create(songArchive, songGroupId, songFileId); - if (song == null) { - return false; - } - } - if (soundBank == null) { - soundBank = new SoundBank(synthArchive, vorbisArchive); - } - if (stream.isSongReady(song, instrumentsArchive, soundBank)) { - stream.releaseInstruments(); - stream.setVolume(volume); - stream.method4431(aBoolean116, song); - state = 0; - song = null; - soundBank = null; - songArchive = null; - return true; - } - } - } catch (@Pc(68) Exception ex) { - ex.printStackTrace(); - stream.method4446(); - songArchive = null; - song = null; - state = 0; - soundBank = null; - } - return false; - } + @OriginalMember(owner = "client!km", name = "c", descriptor = "(Z)Z") + public static boolean method2699() { + try { + if (state == 2) { + if (song == null) { + song = Song.create(songArchive, songGroupId, songFileId); + if (song == null) { + return false; + } + } + if (soundBank == null) { + soundBank = new SoundBank(synthArchive, vorbisArchive); + } + if (stream.isSongReady(song, instrumentsArchive, soundBank)) { + stream.releaseInstruments(); + stream.setVolume(volume); + stream.method4431(aBoolean116, song); + state = 0; + song = null; + soundBank = null; + songArchive = null; + return true; + } + } + } catch (@Pc(68) Exception ex) { + ex.printStackTrace(); + stream.method4446(); + songArchive = null; + song = null; + state = 0; + soundBank = null; + } + return false; + } - @OriginalMember(owner = "client!ce", name = "a", descriptor = "(II)V") - public static void playFadeOut() { - volume = 0; - songFileId = -1; - state = 1; - volumeFadeRate = 2; - aBoolean116 = false; - songArchive = null; - songGroupId = -1; - } + @OriginalMember(owner = "client!ce", name = "a", descriptor = "(II)V") + public static void playFadeOut() { + volume = 0; + songFileId = -1; + state = 1; + volumeFadeRate = 2; + aBoolean116 = false; + songArchive = null; + songGroupId = -1; + } - @OriginalMember(owner = "client!v", name = "a", descriptor = "(ZIILclient!ve;ZII)V") - public static void playFadeOut(@OriginalArg(1) int group, @OriginalArg(3) Js5 archive, @OriginalArg(5) int arg2) { - songArchive = archive; - songFileId = 0; - songGroupId = group; - aBoolean116 = false; - state = 1; - volumeFadeRate = 2; - volume = arg2; - } + @OriginalMember(owner = "client!v", name = "a", descriptor = "(ZIILclient!ve;ZII)V") + public static void playFadeOut(@OriginalArg(1) int group, @OriginalArg(3) Js5 archive, @OriginalArg(5) int arg2) { + songArchive = archive; + songFileId = 0; + songGroupId = group; + aBoolean116 = false; + state = 1; + volumeFadeRate = 2; + volume = arg2; + } - @OriginalMember(owner = "client!ck", name = "a", descriptor = "(ILclient!va;Lclient!ve;Lclient!ve;Lclient!ve;)Z") - public static boolean init(@OriginalArg(1) MidiPcmStream pcmStream, @OriginalArg(2) Js5 instruments, @OriginalArg(3) Js5 vorbis, @OriginalArg(4) Js5 synth) { - instrumentsArchive = instruments; - synthArchive = synth; - vorbisArchive = vorbis; - stream = pcmStream; - return true; - } + @OriginalMember(owner = "client!ck", name = "a", descriptor = "(ILclient!va;Lclient!ve;Lclient!ve;Lclient!ve;)Z") + public static boolean init(@OriginalArg(1) MidiPcmStream pcmStream, @OriginalArg(2) Js5 instruments, @OriginalArg(3) Js5 vorbis, @OriginalArg(4) Js5 synth) { + instrumentsArchive = instruments; + synthArchive = synth; + vorbisArchive = vorbis; + stream = pcmStream; + return true; + } - @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Z)V") - public static void loop() { - try { - if (state == 1) { - @Pc(16) int volume = stream.getVolume(); - if (volume > 0 && stream.isValid()) { - volume -= volumeFadeRate; - if (volume < 0) { - volume = 0; - } - stream.setVolume(volume); - return; - } - stream.method4446(); - stream.clearInstruments(); - song = null; - soundBank = null; - if (songArchive == null) { - state = 0; - } else { - state = 2; - } - } - } catch (@Pc(62) Exception ex) { - ex.printStackTrace(); - stream.method4446(); - songArchive = null; - song = null; - state = 0; - soundBank = null; - } - } + @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Z)V") + public static void loop() { + try { + if (state == 1) { + @Pc(16) int volume = stream.getVolume(); + if (volume > 0 && stream.isValid()) { + volume -= volumeFadeRate; + if (volume < 0) { + volume = 0; + } + stream.setVolume(volume); + return; + } + stream.method4446(); + stream.clearInstruments(); + song = null; + soundBank = null; + if (songArchive == null) { + state = 0; + } else { + state = 2; + } + } + } catch (@Pc(62) Exception ex) { + ex.printStackTrace(); + stream.method4446(); + songArchive = null; + song = null; + state = 0; + soundBank = null; + } + } - @OriginalMember(owner = "client!kk", name = "a", descriptor = "(I)Z") + @OriginalMember(owner = "client!kk", name = "a", descriptor = "(I)Z") public static boolean isPlaying() { return state != 0 || stream.isValid(); } - @OriginalMember(owner = "client!jh", name = "a", descriptor = "(Lclient!ve;ZIIZI)V") - public static void playImmediate(@OriginalArg(0) Js5 archive, @OriginalArg(2) int group, @OriginalArg(5) int vol) { - songArchive = archive; - state = 1; - volume = vol; - songFileId = 0; - songGroupId = group; - aBoolean116 = false; - volumeFadeRate = 10000; - } + @OriginalMember(owner = "client!jh", name = "a", descriptor = "(Lclient!ve;ZIIZI)V") + public static void playImmediate(@OriginalArg(0) Js5 archive, @OriginalArg(2) int group, @OriginalArg(5) int vol) { + songArchive = archive; + state = 1; + volume = vol; + songFileId = 0; + songGroupId = group; + aBoolean116 = false; + volumeFadeRate = 10000; + } - @OriginalMember(owner = "client!th", name = "a", descriptor = "(Z)V") - public static void method4548() { - stream.method4446(); - state = 1; - songArchive = null; - } + @OriginalMember(owner = "client!th", name = "a", descriptor = "(Z)V") + public static void method4548() { + stream.method4446(); + state = 1; + songArchive = null; + } - @OriginalMember(owner = "client!sj", name = "c", descriptor = "(II)V") - public static void method3956(@OriginalArg(0) int arg0) { - if (state == 0) { - stream.setVolume(arg0); - } else { - volume = arg0; - } - } + @OriginalMember(owner = "client!sj", name = "c", descriptor = "(II)V") + public static void method3956(@OriginalArg(0) int arg0) { + if (state == 0) { + stream.setVolume(arg0); + } else { + volume = arg0; + } + } } diff --git a/client/src/main/java/rt4/MillisTimer.java b/client/src/main/java/rt4/MillisTimer.java index 9784cf9..0aa7130 100644 --- a/client/src/main/java/rt4/MillisTimer.java +++ b/client/src/main/java/rt4/MillisTimer.java @@ -78,7 +78,7 @@ public final class MillisTimer extends Timer { if (arg0 > this.anInt3552) { this.anInt3552 = arg0; } - ThreadUtils.sleep((long) this.anInt3552); + ThreadUtils.sleep(this.anInt3552); local139 = 0; while (this.anInt3553 < 256) { this.anInt3553 += this.anInt3550; diff --git a/client/src/main/java/rt4/MiniMap.java b/client/src/main/java/rt4/MiniMap.java index e8fdc4a..8a82cc8 100644 --- a/client/src/main/java/rt4/MiniMap.java +++ b/client/src/main/java/rt4/MiniMap.java @@ -5,422 +5,419 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class MiniMap { - @OriginalMember(owner = "client!ke", name = "T", descriptor = "[[I") - public static final int[][] anIntArrayArray24 = new int[][] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1 }, { 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1 }, { 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 }, { 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1 }, { 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1 } }; - @OriginalMember(owner = "client!wc", name = "h", descriptor = "[[I") - public static final int[][] anIntArrayArray46 = new int[][] { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, { 12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3 }, { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, { 3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12 } }; - @OriginalMember(owner = "client!qc", name = "ab", descriptor = "[I") - public static final int[] locId = new int[1000]; - @OriginalMember(owner = "client!lf", name = "d", descriptor = "[I") - public static final int[] locX = new int[1000]; - @OriginalMember(owner = "client!he", name = "eb", descriptor = "[I") - public static final int[] locZ = new int[1000]; - @OriginalMember(owner = "client!ld", name = "b", descriptor = "[Lclient!nc;") - public static final MapMarker[] hintMapMarkers = new MapMarker[4]; - @OriginalMember(owner = "client!ld", name = "d", descriptor = "Lclient!na;") - public static final JagString aClass100_668 = JagString.parse("Hidden)2use"); - @OriginalMember(owner = "client!ef", name = "j", descriptor = "Lclient!mm;") - public static SoftwareSprite softwareSprite; - @OriginalMember(owner = "client!ha", name = "i", descriptor = "Lclient!qf;") - public static Sprite sprite; - @OriginalMember(owner = "client!ug", name = "m", descriptor = "I") - public static int locs = 0; - @OriginalMember(owner = "client!wb", name = "d", descriptor = "I") - public static int state = 0; - @OriginalMember(owner = "client!we", name = "w", descriptor = "I") - public static int anInt4130 = 0; - @OriginalMember(owner = "client!ej", name = "W", descriptor = "I") + @OriginalMember(owner = "client!ke", name = "T", descriptor = "[[I") + public static final int[][] anIntArrayArray24 = new int[][]{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1}}; + @OriginalMember(owner = "client!wc", name = "h", descriptor = "[[I") + public static final int[][] anIntArrayArray46 = new int[][]{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3}, {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, {3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12}}; + @OriginalMember(owner = "client!qc", name = "ab", descriptor = "[I") + public static final int[] locId = new int[1000]; + @OriginalMember(owner = "client!lf", name = "d", descriptor = "[I") + public static final int[] locX = new int[1000]; + @OriginalMember(owner = "client!he", name = "eb", descriptor = "[I") + public static final int[] locZ = new int[1000]; + @OriginalMember(owner = "client!ld", name = "b", descriptor = "[Lclient!nc;") + public static final MapMarker[] hintMapMarkers = new MapMarker[4]; + @OriginalMember(owner = "client!ld", name = "d", descriptor = "Lclient!na;") + public static final JagString aClass100_668 = JagString.parse("Hidden)2use"); + @OriginalMember(owner = "client!ef", name = "j", descriptor = "Lclient!mm;") + public static SoftwareSprite softwareSprite; + @OriginalMember(owner = "client!ha", name = "i", descriptor = "Lclient!qf;") + public static Sprite sprite; + @OriginalMember(owner = "client!ug", name = "m", descriptor = "I") + public static int locs = 0; + @OriginalMember(owner = "client!wb", name = "d", descriptor = "I") + public static int state = 0; + @OriginalMember(owner = "client!we", name = "w", descriptor = "I") + public static int anInt4130 = 0; + @OriginalMember(owner = "client!ej", name = "W", descriptor = "I") public static int anInt1814 = 0; - @OriginalMember(owner = "client!vg", name = "d", descriptor = "I") - public static int anInt5755 = 2; - @OriginalMember(owner = "client!oe", name = "n", descriptor = "I") - public static int anInt4262 = 1; - @OriginalMember(owner = "client!gi", name = "H", descriptor = "I") + @OriginalMember(owner = "client!vg", name = "d", descriptor = "I") + public static int anInt5755 = 2; + @OriginalMember(owner = "client!oe", name = "n", descriptor = "I") + public static int anInt4262 = 1; + @OriginalMember(owner = "client!gi", name = "H", descriptor = "I") public static int anInt2252 = 0; - @OriginalMember(owner = "client!nf", name = "i", descriptor = "I") - public static int anInt4075 = -1; - @OriginalMember(owner = "client!se", name = "h", descriptor = "I") + @OriginalMember(owner = "client!nf", name = "i", descriptor = "I") + public static int anInt4075 = -1; + @OriginalMember(owner = "client!se", name = "h", descriptor = "I") public static int anInt5073 = -1; - @OriginalMember(owner = "client!sd", name = "R", descriptor = "I") + @OriginalMember(owner = "client!sd", name = "R", descriptor = "I") public static int anInt5062; - @OriginalMember(owner = "client!ma", name = "a", descriptor = "([IIIIII)V") - public static void renderTile(@OriginalArg(0) int[] pixels, @OriginalArg(1) int index, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(7) Tile local7 = SceneGraph.tiles[arg2][arg3][arg4]; - if (local7 == null) { - return; - } - @Pc(13) PlainTile local13 = local7.plainTile; - @Pc(23) int local23; - if (local13 != null) { - @Pc(18) int local18 = local13.anInt4871; - if (local18 != 0) { - for (local23 = 0; local23 < 4; local23++) { - pixels[index] = local18; - pixels[index + 1] = local18; - pixels[index + 2] = local18; - pixels[index + 3] = local18; - index += 512; - } - } - return; - } - @Pc(58) ShapedTile local58 = local7.shapedTile; - if (local58 == null) { - return; - } - local23 = local58.anInt1966; - @Pc(67) int local67 = local58.anInt1967; - @Pc(70) int local70 = local58.anInt1969; - @Pc(73) int local73 = local58.anInt1968; - @Pc(77) int[] local77 = anIntArrayArray24[local23]; - @Pc(81) int[] local81 = anIntArrayArray46[local67]; - @Pc(83) int local83 = 0; - @Pc(87) int local87; - if (local70 != 0) { - for (local87 = 0; local87 < 4; local87++) { - pixels[index] = local77[local81[local83++]] == 0 ? local70 : local73; - pixels[index + 1] = local77[local81[local83++]] == 0 ? local70 : local73; - pixels[index + 2] = local77[local81[local83++]] == 0 ? local70 : local73; - pixels[index + 3] = local77[local81[local83++]] == 0 ? local70 : local73; - index += 512; - } - return; - } - for (local87 = 0; local87 < 4; local87++) { - if (local77[local81[local83++]] != 0) { - pixels[index] = local73; - } - if (local77[local81[local83++]] != 0) { - pixels[index + 1] = local73; - } - if (local77[local81[local83++]] != 0) { - pixels[index + 2] = local73; - } - if (local77[local81[local83++]] != 0) { - pixels[index + 3] = local73; - } - index += 512; - } - } + @OriginalMember(owner = "client!ma", name = "a", descriptor = "([IIIIII)V") + public static void renderTile(@OriginalArg(0) int[] pixels, @OriginalArg(1) int index, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { + @Pc(7) Tile local7 = SceneGraph.tiles[arg2][arg3][arg4]; + if (local7 == null) { + return; + } + @Pc(13) PlainTile local13 = local7.plainTile; + @Pc(23) int local23; + if (local13 != null) { + @Pc(18) int local18 = local13.anInt4871; + if (local18 != 0) { + for (local23 = 0; local23 < 4; local23++) { + pixels[index] = local18; + pixels[index + 1] = local18; + pixels[index + 2] = local18; + pixels[index + 3] = local18; + index += 512; + } + } + return; + } + @Pc(58) ShapedTile local58 = local7.shapedTile; + if (local58 == null) { + return; + } + local23 = local58.anInt1966; + @Pc(67) int local67 = local58.anInt1967; + @Pc(70) int local70 = local58.anInt1969; + @Pc(73) int local73 = local58.anInt1968; + @Pc(77) int[] local77 = anIntArrayArray24[local23]; + @Pc(81) int[] local81 = anIntArrayArray46[local67]; + @Pc(83) int local83 = 0; + @Pc(87) int local87; + if (local70 != 0) { + for (local87 = 0; local87 < 4; local87++) { + pixels[index] = local77[local81[local83++]] == 0 ? local70 : local73; + pixels[index + 1] = local77[local81[local83++]] == 0 ? local70 : local73; + pixels[index + 2] = local77[local81[local83++]] == 0 ? local70 : local73; + pixels[index + 3] = local77[local81[local83++]] == 0 ? local70 : local73; + index += 512; + } + return; + } + for (local87 = 0; local87 < 4; local87++) { + if (local77[local81[local83++]] != 0) { + pixels[index] = local73; + } + if (local77[local81[local83++]] != 0) { + pixels[index + 1] = local73; + } + if (local77[local81[local83++]] != 0) { + pixels[index + 2] = local73; + } + if (local77[local81[local83++]] != 0) { + pixels[index + 3] = local73; + } + index += 512; + } + } - @OriginalMember(owner = "client!kl", name = "b", descriptor = "(II)Z") - public static boolean renderMap(@OriginalArg(1) int arg0) { - @Pc(35) int local35; - @Pc(37) int local37; - @Pc(76) int local76; - @Pc(80) int local80; - if (softwareSprite == null) { - if (GlRenderer.enabled || sprite == null) { - softwareSprite = new SoftwareSprite(512, 512); - } else { - softwareSprite = (SoftwareSprite) sprite; - } - @Pc(32) int[] local32 = softwareSprite.pixels; - local35 = local32.length; - for (local37 = 0; local37 < local35; local37++) { - local32[local37] = 1; - } - for (local37 = 1; local37 < 103; local37++) { - local76 = 4 * 512 * (103 - local37) + 24628; - for (local80 = 1; local80 < 103; local80++) { - if ((SceneGraph.tileFlags[arg0][local80][local37] & 0x18) == 0) { - renderTile(local32, local76, arg0, local80, local37); - } - if (arg0 < 3 && (SceneGraph.tileFlags[arg0 + 1][local80][local37] & 0x8) != 0) { - renderTile(local32, local76, arg0 + 1, local80, local37); - } - local76 += 4; - } - } - locs = 0; - for (local37 = 0; local37 < 104; local37++) { - for (local76 = 0; local76 < 104; local76++) { - @Pc(169) long local169 = SceneGraph.getGroundDecorKey(Player.level, local37 + 0, local76); - if (local169 != 0L) { - @Pc(184) LocType local184 = LocTypeList.get((int) (local169 >>> 32) & Integer.MAX_VALUE); - @Pc(187) int local187 = local184.mapElement; - @Pc(194) int local194; - if (local184.multiLocs != null) { - for (local194 = 0; local194 < local184.multiLocs.length; local194++) { - if (local184.multiLocs[local194] != -1) { - @Pc(216) LocType local216 = LocTypeList.get(local184.multiLocs[local194]); - if (local216.mapElement >= 0) { - local187 = local216.mapElement; - break; - } - } - } - } - if (local187 >= 0) { - @Pc(237) int local237 = local76; - local194 = local37; - if (local187 != 22 && local187 != 29 && local187 != 34 && local187 != 36 && local187 != 46 && local187 != 47 && local187 != 48) { - @Pc(269) int[][] local269 = PathFinder.collisionMaps[Player.level].flags; - for (@Pc(271) int local271 = 0; local271 < 10; local271++) { - @Pc(281) int local281 = (int) (Math.random() * 4.0D); - if (local281 == 0 && local194 > 0 && local37 - 3 < local194 && (local269[local194 - 1][local237] & 0x12C0108) == 0) { - local194--; - } - if (local281 == 1 && local194 < 103 && local37 + 3 > local194 && (local269[local194 + 1][local237] & 0x12C0180) == 0) { - local194++; - } - if (local281 == 2 && local237 > 0 && local76 - 3 < local237 && (local269[local194][local237 - 1] & 0x12C0102) == 0) { - local237--; - } - if (local281 == 3 && local237 < 103 && local237 < local76 + 3 && (local269[local194][local237 + 1] & 0x12C0120) == 0) { - local237++; - } - } - } - locId[locs] = local184.id; - locX[locs] = local194; - locZ[locs] = local237; - locs++; - } - } - } - } - } - softwareSprite.makeTarget(); - @Pc(455) int local455 = ((int) (Math.random() * 20.0D) + 238 - 10 << 8) + ((int) (Math.random() * 20.0D) + 238 - 10 << 16) + (int) (Math.random() * 20.0D) + 228; - local35 = (int) (Math.random() * 20.0D) + 238 - 10 << 16; - for (local37 = 1; local37 < 103; local37++) { - for (local76 = 1; local76 < 103; local76++) { - if ((SceneGraph.tileFlags[arg0][local76][local37] & 0x18) == 0 && !Static164.method3109(local76, local455, local37, local35, arg0)) { - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - SoftwareRaster.frameBuffer.makeTarget(); - } - return false; - } - if (arg0 < 3 && (SceneGraph.tileFlags[arg0 + 1][local76][local37] & 0x8) != 0 && !Static164.method3109(local76, local455, local37, local35, arg0 + 1)) { - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - SoftwareRaster.frameBuffer.makeTarget(); - } - return false; - } - } - } - if (GlRenderer.enabled) { - @Pc(576) int[] local576 = softwareSprite.pixels; - local76 = local576.length; - for (local80 = 0; local80 < local76; local80++) { - if (local576[local80] == 0) { - local576[local80] = 1; - } - } - sprite = new GlSprite(softwareSprite); - } else { - sprite = softwareSprite; - } - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - SoftwareRaster.frameBuffer.makeTarget(); - } - softwareSprite = null; - return true; - } + @OriginalMember(owner = "client!kl", name = "b", descriptor = "(II)Z") + public static boolean renderMap(@OriginalArg(1) int arg0) { + @Pc(35) int local35; + @Pc(37) int local37; + @Pc(76) int local76; + @Pc(80) int local80; + if (softwareSprite == null) { + if (GlRenderer.enabled || sprite == null) { + softwareSprite = new SoftwareSprite(512, 512); + } else { + softwareSprite = (SoftwareSprite) sprite; + } + @Pc(32) int[] local32 = softwareSprite.pixels; + local35 = local32.length; + for (local37 = 0; local37 < local35; local37++) { + local32[local37] = 1; + } + for (local37 = 1; local37 < 103; local37++) { + local76 = 4 * 512 * (103 - local37) + 24628; + for (local80 = 1; local80 < 103; local80++) { + if ((SceneGraph.tileFlags[arg0][local80][local37] & 0x18) == 0) { + renderTile(local32, local76, arg0, local80, local37); + } + if (arg0 < 3 && (SceneGraph.tileFlags[arg0 + 1][local80][local37] & 0x8) != 0) { + renderTile(local32, local76, arg0 + 1, local80, local37); + } + local76 += 4; + } + } + locs = 0; + for (local37 = 0; local37 < 104; local37++) { + for (local76 = 0; local76 < 104; local76++) { + @Pc(169) long local169 = SceneGraph.getGroundDecorKey(Player.level, local37 + 0, local76); + if (local169 != 0L) { + @Pc(184) LocType local184 = LocTypeList.get((int) (local169 >>> 32) & Integer.MAX_VALUE); + @Pc(187) int local187 = local184.mapElement; + @Pc(194) int local194; + if (local184.multiLocs != null) { + for (local194 = 0; local194 < local184.multiLocs.length; local194++) { + if (local184.multiLocs[local194] != -1) { + @Pc(216) LocType local216 = LocTypeList.get(local184.multiLocs[local194]); + if (local216.mapElement >= 0) { + local187 = local216.mapElement; + break; + } + } + } + } + if (local187 >= 0) { + @Pc(237) int local237 = local76; + local194 = local37; + if (local187 != 22 && local187 != 29 && local187 != 34 && local187 != 36 && local187 != 46 && local187 != 47 && local187 != 48) { + @Pc(269) int[][] local269 = PathFinder.collisionMaps[Player.level].flags; + for (@Pc(271) int local271 = 0; local271 < 10; local271++) { + @Pc(281) int local281 = (int) (Math.random() * 4.0D); + if (local281 == 0 && local194 > 0 && local37 - 3 < local194 && (local269[local194 - 1][local237] & 0x12C0108) == 0) { + local194--; + } + if (local281 == 1 && local194 < 103 && local37 + 3 > local194 && (local269[local194 + 1][local237] & 0x12C0180) == 0) { + local194++; + } + if (local281 == 2 && local237 > 0 && local76 - 3 < local237 && (local269[local194][local237 - 1] & 0x12C0102) == 0) { + local237--; + } + if (local281 == 3 && local237 < 103 && local237 < local76 + 3 && (local269[local194][local237 + 1] & 0x12C0120) == 0) { + local237++; + } + } + } + locId[locs] = local184.id; + locX[locs] = local194; + locZ[locs] = local237; + locs++; + } + } + } + } + } + softwareSprite.makeTarget(); + @Pc(455) int local455 = ((int) (Math.random() * 20.0D) + 238 - 10 << 8) + ((int) (Math.random() * 20.0D) + 238 - 10 << 16) + (int) (Math.random() * 20.0D) + 228; + local35 = (int) (Math.random() * 20.0D) + 238 - 10 << 16; + for (local37 = 1; local37 < 103; local37++) { + for (local76 = 1; local76 < 103; local76++) { + if ((SceneGraph.tileFlags[arg0][local76][local37] & 0x18) == 0 && !Static164.method3109(local76, local455, local37, local35, arg0)) { + if (GlRenderer.enabled) { + SoftwareRaster.pixels = null; + } else { + SoftwareRaster.frameBuffer.makeTarget(); + } + return false; + } + if (arg0 < 3 && (SceneGraph.tileFlags[arg0 + 1][local76][local37] & 0x8) != 0 && !Static164.method3109(local76, local455, local37, local35, arg0 + 1)) { + if (GlRenderer.enabled) { + SoftwareRaster.pixels = null; + } else { + SoftwareRaster.frameBuffer.makeTarget(); + } + return false; + } + } + } + if (GlRenderer.enabled) { + @Pc(576) int[] local576 = softwareSprite.pixels; + local76 = local576.length; + for (local80 = 0; local80 < local76; local80++) { + if (local576[local80] == 0) { + local576[local80] = 1; + } + } + sprite = new GlSprite(softwareSprite); + } else { + sprite = softwareSprite; + } + if (GlRenderer.enabled) { + SoftwareRaster.pixels = null; + } else { + SoftwareRaster.frameBuffer.makeTarget(); + } + softwareSprite = null; + return true; + } - @OriginalMember(owner = "client!ed", name = "a", descriptor = "(IBIILclient!be;)V") - public static void render(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Component arg3) { - client.audioLoop(); - if (GlRenderer.enabled) { - GlRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height); - } else { - SoftwareRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height); - } - if (state != 2 && state != 5 && sprite != null) { - @Pc(48) int local48 = anInt1814 + (int)Camera.yawTarget & 0x7FF; - @Pc(57) int local57 = PlayerList.self.xFine / 32 + 48; - @Pc(67) int local67 = 464 - PlayerList.self.zFine / 32; - if (GlRenderer.enabled) { - ((GlSprite) sprite).renderRotatedTransparent(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, (GlSprite) arg3.method489(false)); - } else { - ((SoftwareSprite) sprite).renderRotated(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45); - } - @Pc(146) int local146; - @Pc(181) int local181; - @Pc(150) int local150; - @Pc(154) int local154; - @Pc(231) int local231; - @Pc(200) int local200; - @Pc(239) int local239; - @Pc(271) int local271; - if (LoginManager.mapElementList != null) { - for (@Pc(117) int local117 = 0; local117 < LoginManager.mapElementList.anInt5074; local117++) { - if (LoginManager.mapElementList.method3892(local117)) { - local146 = (LoginManager.mapElementList.aShortArray73[local117] - Camera.originX) * 4 + 2 - PlayerList.self.xFine / 32; - local150 = MathUtils.sin[local48]; - local154 = MathUtils.cos[local48]; - @Pc(156) Font local156 = Fonts.p11Full; - @Pc(164) int local164 = local150 * 256 / (anInt4130 + 256); - local181 = (LoginManager.mapElementList.aShortArray72[local117] - Camera.originZ) * 4 + 2 - PlayerList.self.zFine / 32; - @Pc(189) int local189 = local154 * 256 / (anInt4130 + 256); - local200 = local181 * local189 - local146 * local164 >> 16; - if (LoginManager.mapElementList.method3894(local117) == 1) { - local156 = Fonts.p12Full; - } - if (LoginManager.mapElementList.method3894(local117) == 2) { - local156 = Fonts.b12Full; - } - local231 = local164 * local181 + local189 * local146 >> 16; - local239 = local156.getMaxLineWidth(LoginManager.mapElementList.aClass100Array153[local117], 100); - @Pc(245) int local245 = local231 - local239 / 2; - if (local245 >= -arg3.width && local245 <= arg3.width && local200 >= -arg3.height && local200 <= arg3.height) { - local271 = 16777215; - if (LoginManager.mapElementList.anIntArray444[local117] != -1) { - local271 = LoginManager.mapElementList.anIntArray444[local117]; - } - if (GlRenderer.enabled) { - GlFont.method1188((GlSprite) arg3.method489(false)); - } else { - SoftwareRaster.method2486(arg3.anIntArray37, arg3.anIntArray45); - } - local156.renderParagraphAlpha(LoginManager.mapElementList.aClass100Array153[local117], arg2 + local245 + arg3.width / 2, arg1 + arg3.height / 2 + -local200, local239, 50, local271, 0, 1, 0, 0); - if (GlRenderer.enabled) { - GlFont.method1173(); - } else { - SoftwareRaster.method2482(); - } - } - } - } - } - for (local146 = 0; local146 < locs; local146++) { - local181 = locX[local146] * 4 + 2 - PlayerList.self.xFine / 32; - local150 = locZ[local146] * 4 + 2 - PlayerList.self.zFine / 32; - @Pc(382) LocType local382 = LocTypeList.get(locId[local146]); - if (local382.multiLocs != null) { - local382 = local382.getMultiLoc(); - if (local382 == null || local382.mapElement == -1) { - continue; - } - } - method1446(arg3, Sprites.mapfuncs[local382.mapElement], local150, local181, arg1, arg2); - } - for (local146 = 0; local146 < 104; local146++) { - for (local181 = 0; local181 < 104; local181++) { - @Pc(439) LinkedList local439 = SceneGraph.objStacks[Player.level][local146][local181]; - if (local439 != null) { - local154 = local146 * 4 + 2 - PlayerList.self.xFine / 32; - local231 = local181 * 4 + 2 - PlayerList.self.zFine / 32; - method1446(arg3, Sprites.mapdots[0], local231, local154, arg1, arg2); - } - } - } - for (local146 = 0; local146 < NpcList.size; local146++) { - @Pc(498) Npc local498 = NpcList.npcs[NpcList.ids[local146]]; - if (local498 != null && local498.method2682()) { - @Pc(507) NpcType local507 = local498.type; - if (local507 != null && local507.multiNpcs != null) { - local507 = local507.getMultiNpc(); - } - if (local507 != null && local507.aBoolean184 && local507.aBoolean183) { - local154 = local498.xFine / 32 - PlayerList.self.xFine / 32; - local231 = local498.zFine / 32 - PlayerList.self.zFine / 32; - if (local507.anInt3739 == -1) { - method1446(arg3, Sprites.mapdots[1], local231, local154, arg1, arg2); - } else { - method1446(arg3, Sprites.mapfuncs[local507.anInt3739], local231, local154, arg1, arg2); - } - } - } - } - for (local146 = 0; local146 < PlayerList.size; local146++) { - @Pc(591) Player local591 = PlayerList.players[PlayerList.ids[local146]]; - if (local591 != null && local591.method2682()) { - local154 = local591.zFine / 32 - PlayerList.self.zFine / 32; - local150 = local591.xFine / 32 - PlayerList.self.xFine / 32; - @Pc(624) long local624 = local591.username.encode37(); - @Pc(626) boolean local626 = false; - for (local239 = 0; local239 < FriendsList.size; local239++) { - if (local624 == FriendsList.encodedUsernames[local239] && FriendsList.worlds[local239] != 0) { - local626 = true; - break; - } - } - @Pc(660) boolean local660 = false; - for (local271 = 0; local271 < ClanChat.size; local271++) { - if (local624 == ClanChat.members[local271].key) { - local660 = true; - break; - } - } - @Pc(682) boolean local682 = false; - if (PlayerList.self.anInt1650 != 0 && local591.anInt1650 != 0 && local591.anInt1650 == PlayerList.self.anInt1650) { - local682 = true; - } - if (local626) { - method1446(arg3, Sprites.mapdots[3], local154, local150, arg1, arg2); - } else if (local660) { - method1446(arg3, Sprites.mapdots[5], local154, local150, arg1, arg2); - } else if (local682) { - method1446(arg3, Sprites.mapdots[4], local154, local150, arg1, arg2); - } else { - method1446(arg3, Sprites.mapdots[2], local154, local150, arg1, arg2); - } - } - } - @Pc(756) MapMarker[] local756 = hintMapMarkers; - for (local181 = 0; local181 < local756.length; local181++) { - @Pc(770) MapMarker local770 = local756[local181]; - if (local770 != null && local770.type != 0 && client.loop % 20 < 10) { - if (local770.type == 1 && local770.actorTargetId >= 0 && local770.actorTargetId < NpcList.npcs.length) { - @Pc(804) Npc local804 = NpcList.npcs[local770.actorTargetId]; - if (local804 != null) { - local231 = local804.xFine / 32 - PlayerList.self.xFine / 32; - local200 = local804.zFine / 32 - PlayerList.self.zFine / 32; - method1960(local770.anInt4048, arg1, arg2, local231, local200, arg3); - } - } - if (local770.type == 2) { - local154 = (local770.targetX - Camera.originX) * 4 + 2 - PlayerList.self.xFine / 32; - local231 = (-Camera.originZ + local770.anInt4046) * 4 + 2 - PlayerList.self.zFine / 32; - method1960(local770.anInt4048, arg1, arg2, local154, local231, arg3); - } - if (local770.type == 10 && local770.actorTargetId >= 0 && PlayerList.players.length > local770.actorTargetId) { - @Pc(905) Player local905 = PlayerList.players[local770.actorTargetId]; - if (local905 != null) { - local200 = local905.zFine / 32 - PlayerList.self.zFine / 32; - local231 = local905.xFine / 32 - PlayerList.self.xFine / 32; - method1960(local770.anInt4048, arg1, arg2, local231, local200, arg3); - } - } - } - } - if (LoginManager.mapFlagX != 0) { - local146 = LoginManager.mapFlagX * 4 + 2 - PlayerList.self.xFine / 32; - local181 = LoginManager.mapFlagZ * 4 + 2 - PlayerList.self.zFine / 32; - method1446(arg3, Sprites.mapflags, local181, local146, arg1, arg2); - } - if (GlRenderer.enabled) { - GlRaster.method1186(arg2 + arg3.width / 2 - 1, arg1 + -1 - -(arg3.height / 2), 3, 3, 16777215); - } else { - SoftwareRaster.fillRect(arg3.width / 2 + arg2 - 1, arg3.height / 2 + -1 + arg1, 3, 3, 16777215); - } - } else if (GlRenderer.enabled) { - @Pc(1041) Sprite local1041 = arg3.method489(false); - if (local1041 != null) { - local1041.render(arg2, arg1); - } - } else { - SoftwareRaster.method2504(arg2, arg1, arg3.anIntArray37, arg3.anIntArray45); - } - InterfaceList.rectangleRedraw[arg0] = true; - } + @OriginalMember(owner = "client!ed", name = "a", descriptor = "(IBIILclient!be;)V") + public static void render(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Component arg3) { + client.audioLoop(); + if (GlRenderer.enabled) { + GlRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height); + } else { + SoftwareRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height); + } + if (state != 2 && state != 5 && sprite != null) { + @Pc(48) int local48 = anInt1814 + (int) Camera.yawTarget & 0x7FF; + @Pc(57) int local57 = PlayerList.self.xFine / 32 + 48; + @Pc(67) int local67 = 464 - PlayerList.self.zFine / 32; + if (GlRenderer.enabled) { + ((GlSprite) sprite).renderRotatedTransparent(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, (GlSprite) arg3.method489(false)); + } else { + ((SoftwareSprite) sprite).renderRotated(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45); + } + @Pc(146) int local146; + @Pc(181) int local181; + @Pc(150) int local150; + @Pc(154) int local154; + @Pc(231) int local231; + @Pc(200) int local200; + @Pc(239) int local239; + @Pc(271) int local271; + if (LoginManager.mapElementList != null) { + for (@Pc(117) int local117 = 0; local117 < LoginManager.mapElementList.anInt5074; local117++) { + if (LoginManager.mapElementList.method3892(local117)) { + local146 = (LoginManager.mapElementList.aShortArray73[local117] - Camera.originX) * 4 + 2 - PlayerList.self.xFine / 32; + local150 = MathUtils.sin[local48]; + local154 = MathUtils.cos[local48]; + @Pc(156) Font local156 = Fonts.p11Full; + @Pc(164) int local164 = local150 * 256 / (anInt4130 + 256); + local181 = (LoginManager.mapElementList.aShortArray72[local117] - Camera.originZ) * 4 + 2 - PlayerList.self.zFine / 32; + @Pc(189) int local189 = local154 * 256 / (anInt4130 + 256); + local200 = local181 * local189 - local146 * local164 >> 16; + if (LoginManager.mapElementList.method3894(local117) == 1) { + local156 = Fonts.p12Full; + } + if (LoginManager.mapElementList.method3894(local117) == 2) { + local156 = Fonts.b12Full; + } + local231 = local164 * local181 + local189 * local146 >> 16; + local239 = local156.getMaxLineWidth(LoginManager.mapElementList.aClass100Array153[local117], 100); + @Pc(245) int local245 = local231 - local239 / 2; + if (local245 >= -arg3.width && local245 <= arg3.width && local200 >= -arg3.height && local200 <= arg3.height) { + local271 = 16777215; + if (LoginManager.mapElementList.anIntArray444[local117] != -1) { + local271 = LoginManager.mapElementList.anIntArray444[local117]; + } + if (GlRenderer.enabled) { + GlFont.method1188((GlSprite) arg3.method489(false)); + } else { + SoftwareRaster.method2486(arg3.anIntArray37, arg3.anIntArray45); + } + local156.renderParagraphAlpha(LoginManager.mapElementList.aClass100Array153[local117], arg2 + local245 + arg3.width / 2, arg1 + arg3.height / 2 + -local200, local239, 50, local271, 0, 1, 0, 0); + if (GlRenderer.enabled) { + GlFont.method1173(); + } else { + SoftwareRaster.method2482(); + } + } + } + } + } + for (local146 = 0; local146 < locs; local146++) { + local181 = locX[local146] * 4 + 2 - PlayerList.self.xFine / 32; + local150 = locZ[local146] * 4 + 2 - PlayerList.self.zFine / 32; + @Pc(382) LocType local382 = LocTypeList.get(locId[local146]); + if (local382.multiLocs != null) { + local382 = local382.getMultiLoc(); + if (local382 == null || local382.mapElement == -1) { + continue; + } + } + method1446(arg3, Sprites.mapfuncs[local382.mapElement], local150, local181, arg1, arg2); + } + for (local146 = 0; local146 < 104; local146++) { + for (local181 = 0; local181 < 104; local181++) { + @Pc(439) LinkedList local439 = SceneGraph.objStacks[Player.level][local146][local181]; + if (local439 != null) { + local154 = local146 * 4 + 2 - PlayerList.self.xFine / 32; + local231 = local181 * 4 + 2 - PlayerList.self.zFine / 32; + method1446(arg3, Sprites.mapdots[0], local231, local154, arg1, arg2); + } + } + } + for (local146 = 0; local146 < NpcList.size; local146++) { + @Pc(498) Npc local498 = NpcList.npcs[NpcList.ids[local146]]; + if (local498 != null && local498.method2682()) { + @Pc(507) NpcType local507 = local498.type; + if (local507 != null && local507.multiNpcs != null) { + local507 = local507.getMultiNpc(); + } + if (local507 != null && local507.aBoolean184 && local507.aBoolean183) { + local154 = local498.xFine / 32 - PlayerList.self.xFine / 32; + local231 = local498.zFine / 32 - PlayerList.self.zFine / 32; + if (local507.anInt3739 == -1) { + method1446(arg3, Sprites.mapdots[1], local231, local154, arg1, arg2); + } else { + method1446(arg3, Sprites.mapfuncs[local507.anInt3739], local231, local154, arg1, arg2); + } + } + } + } + for (local146 = 0; local146 < PlayerList.size; local146++) { + @Pc(591) Player local591 = PlayerList.players[PlayerList.ids[local146]]; + if (local591 != null && local591.method2682()) { + local154 = local591.zFine / 32 - PlayerList.self.zFine / 32; + local150 = local591.xFine / 32 - PlayerList.self.xFine / 32; + @Pc(624) long local624 = local591.username.encode37(); + @Pc(626) boolean local626 = false; + for (local239 = 0; local239 < FriendsList.size; local239++) { + if (local624 == FriendsList.encodedUsernames[local239] && FriendsList.worlds[local239] != 0) { + local626 = true; + break; + } + } + @Pc(660) boolean local660 = false; + for (local271 = 0; local271 < ClanChat.size; local271++) { + if (local624 == ClanChat.members[local271].key) { + local660 = true; + break; + } + } + @Pc(682) boolean local682 = PlayerList.self.anInt1650 != 0 && local591.anInt1650 != 0 && local591.anInt1650 == PlayerList.self.anInt1650; + if (local626) { + method1446(arg3, Sprites.mapdots[3], local154, local150, arg1, arg2); + } else if (local660) { + method1446(arg3, Sprites.mapdots[5], local154, local150, arg1, arg2); + } else if (local682) { + method1446(arg3, Sprites.mapdots[4], local154, local150, arg1, arg2); + } else { + method1446(arg3, Sprites.mapdots[2], local154, local150, arg1, arg2); + } + } + } + @Pc(756) MapMarker[] local756 = hintMapMarkers; + for (local181 = 0; local181 < local756.length; local181++) { + @Pc(770) MapMarker local770 = local756[local181]; + if (local770 != null && local770.type != 0 && client.loop % 20 < 10) { + if (local770.type == 1 && local770.actorTargetId >= 0 && local770.actorTargetId < NpcList.npcs.length) { + @Pc(804) Npc local804 = NpcList.npcs[local770.actorTargetId]; + if (local804 != null) { + local231 = local804.xFine / 32 - PlayerList.self.xFine / 32; + local200 = local804.zFine / 32 - PlayerList.self.zFine / 32; + method1960(local770.anInt4048, arg1, arg2, local231, local200, arg3); + } + } + if (local770.type == 2) { + local154 = (local770.targetX - Camera.originX) * 4 + 2 - PlayerList.self.xFine / 32; + local231 = (-Camera.originZ + local770.anInt4046) * 4 + 2 - PlayerList.self.zFine / 32; + method1960(local770.anInt4048, arg1, arg2, local154, local231, arg3); + } + if (local770.type == 10 && local770.actorTargetId >= 0 && PlayerList.players.length > local770.actorTargetId) { + @Pc(905) Player local905 = PlayerList.players[local770.actorTargetId]; + if (local905 != null) { + local200 = local905.zFine / 32 - PlayerList.self.zFine / 32; + local231 = local905.xFine / 32 - PlayerList.self.xFine / 32; + method1960(local770.anInt4048, arg1, arg2, local231, local200, arg3); + } + } + } + } + if (LoginManager.mapFlagX != 0) { + local146 = LoginManager.mapFlagX * 4 + 2 - PlayerList.self.xFine / 32; + local181 = LoginManager.mapFlagZ * 4 + 2 - PlayerList.self.zFine / 32; + method1446(arg3, Sprites.mapflags, local181, local146, arg1, arg2); + } + if (GlRenderer.enabled) { + GlRaster.method1186(arg2 + arg3.width / 2 - 1, arg1 + -1 - -(arg3.height / 2), 3, 3, 16777215); + } else { + SoftwareRaster.fillRect(arg3.width / 2 + arg2 - 1, arg3.height / 2 + -1 + arg1, 3, 3, 16777215); + } + } else if (GlRenderer.enabled) { + @Pc(1041) Sprite local1041 = arg3.method489(false); + if (local1041 != null) { + local1041.render(arg2, arg1); + } + } else { + SoftwareRaster.method2504(arg2, arg1, arg3.anIntArray37, arg3.anIntArray45); + } + InterfaceList.rectangleRedraw[arg0] = true; + } - @OriginalMember(owner = "client!em", name = "a", descriptor = "(Lclient!be;Lclient!qf;IIIBI)V") + @OriginalMember(owner = "client!em", name = "a", descriptor = "(Lclient!be;Lclient!qf;IIIBI)V") public static void method1446(@OriginalArg(0) Component arg0, @OriginalArg(1) Sprite arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5) { if (arg1 == null) { return; } @Pc(21) int local21 = arg3 * arg3 + arg2 * arg2; - @Pc(27) int local27 = anInt1814 + (int)Camera.yawTarget & 0x7FF; + @Pc(27) int local27 = anInt1814 + (int) Camera.yawTarget & 0x7FF; @Pc(39) int local39 = Math.max(arg0.width / 2, arg0.height / 2) + 10; if (local39 * local39 < local21) { return; @@ -438,43 +435,43 @@ public class MiniMap { } } - @OriginalMember(owner = "client!hi", name = "a", descriptor = "(IIIIILclient!be;Z)V") - public static void method1960(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) Component arg5) { - @Pc(13) int local13 = arg3 * arg3 + arg4 * arg4; - if (local13 > 360000) { - return; - } - @Pc(30) int local30 = Math.min(arg5.width / 2, arg5.height / 2); - if (local30 * local30 >= local13) { - method1446(arg5, Sprites.mapmarkhints[arg0], arg4, arg3, arg1, arg2); - return; - } - local30 -= 10; - @Pc(58) int local58 = anInt1814 + (int)Camera.yawTarget & 0x7FF; - @Pc(62) int local62 = MathUtils.cos[local58]; - @Pc(66) int local66 = MathUtils.sin[local58]; - @Pc(74) int local74 = local66 * 256 / (anInt4130 + 256); - @Pc(82) int local82 = local62 * 256 / (anInt4130 + 256); - @Pc(93) int local93 = arg4 * local74 + local82 * arg3 >> 16; - @Pc(104) int local104 = arg4 * local82 - local74 * arg3 >> 16; - @Pc(110) double local110 = Math.atan2((double) local93, (double) local104); - @Pc(117) int local117 = (int) (Math.sin(local110) * (double) local30); - @Pc(124) int local124 = (int) (Math.cos(local110) * (double) local30); - if (GlRenderer.enabled) { - ((GlSprite) Sprites.hintMapEdge[arg0]).method1428((arg5.width / 2 + arg2 + local117) * 16, (arg5.height / 2 + arg1 - local124) * 16, (int) (local110 * 10430.378D)); - } else { - ((SoftwareSprite) Sprites.hintMapEdge[arg0]).method306(local117 + arg5.width / 2 + arg2 - 10, arg5.height / 2 + -10 + arg1 + -local124, local110); - } - } + @OriginalMember(owner = "client!hi", name = "a", descriptor = "(IIIIILclient!be;Z)V") + public static void method1960(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) Component arg5) { + @Pc(13) int local13 = arg3 * arg3 + arg4 * arg4; + if (local13 > 360000) { + return; + } + @Pc(30) int local30 = Math.min(arg5.width / 2, arg5.height / 2); + if (local30 * local30 >= local13) { + method1446(arg5, Sprites.mapmarkhints[arg0], arg4, arg3, arg1, arg2); + return; + } + local30 -= 10; + @Pc(58) int local58 = anInt1814 + (int) Camera.yawTarget & 0x7FF; + @Pc(62) int local62 = MathUtils.cos[local58]; + @Pc(66) int local66 = MathUtils.sin[local58]; + @Pc(74) int local74 = local66 * 256 / (anInt4130 + 256); + @Pc(82) int local82 = local62 * 256 / (anInt4130 + 256); + @Pc(93) int local93 = arg4 * local74 + local82 * arg3 >> 16; + @Pc(104) int local104 = arg4 * local82 - local74 * arg3 >> 16; + @Pc(110) double local110 = Math.atan2(local93, local104); + @Pc(117) int local117 = (int) (Math.sin(local110) * (double) local30); + @Pc(124) int local124 = (int) (Math.cos(local110) * (double) local30); + if (GlRenderer.enabled) { + ((GlSprite) Sprites.hintMapEdge[arg0]).method1428((arg5.width / 2 + arg2 + local117) * 16, (arg5.height / 2 + arg1 - local124) * 16, (int) (local110 * 10430.378D)); + } else { + ((SoftwareSprite) Sprites.hintMapEdge[arg0]).method306(local117 + arg5.width / 2 + arg2 - 10, arg5.height / 2 + -10 + arg1 + -local124, local110); + } + } - @OriginalMember(owner = "client!hi", name = "a", descriptor = "(Lclient!be;B)Lclient!na;") - public static JagString getTargetVerb(@OriginalArg(0) Component arg0) { - if (InterfaceList.getServerActiveProperties(arg0).getTargetMask() == 0) { - return null; - } else if (arg0.targetVerb == null || arg0.targetVerb.trim().length() == 0) { - return Static121.qaOpTest ? aClass100_668 : null; - } else { - return arg0.targetVerb; - } - } + @OriginalMember(owner = "client!hi", name = "a", descriptor = "(Lclient!be;B)Lclient!na;") + public static JagString getTargetVerb(@OriginalArg(0) Component arg0) { + if (InterfaceList.getServerActiveProperties(arg0).getTargetMask() == 0) { + return null; + } else if (arg0.targetVerb == null || arg0.targetVerb.trim().length() == 0) { + return Static121.qaOpTest ? aClass100_668 : null; + } else { + return arg0.targetVerb; + } + } } diff --git a/client/src/main/java/rt4/MiniMenu.java b/client/src/main/java/rt4/MiniMenu.java index 063dbf7..9356c80 100644 --- a/client/src/main/java/rt4/MiniMenu.java +++ b/client/src/main/java/rt4/MiniMenu.java @@ -5,334 +5,334 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class MiniMenu { - @OriginalMember(owner = "client!df", name = "l", descriptor = "Lclient!na;") - public static final JagString COLOR_GREEN = JagString.parse(""); - @OriginalMember(owner = "client!sc", name = "g", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!df", name = "l", descriptor = "Lclient!na;") + public static final JagString COLOR_GREEN = JagString.parse(""); + @OriginalMember(owner = "client!sc", name = "g", descriptor = "Lclient!na;") public static final JagString aClass100_947 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!uj", name = "C", descriptor = "[Lclient!na;") - public static final JagString[] ops = new JagString[500]; - @OriginalMember(owner = "client!t", name = "v", descriptor = "[Lclient!na;") - public static final JagString[] opBases = new JagString[500]; - @OriginalMember(owner = "client!d", name = "eb", descriptor = "[S") - public static final short[] actions = new short[500]; - @OriginalMember(owner = "client!pf", name = "r", descriptor = "[I") - public static final int[] cursors = new int[500]; - @OriginalMember(owner = "client!mi", name = "U", descriptor = "[J") + @OriginalMember(owner = "client!uj", name = "C", descriptor = "[Lclient!na;") + public static final JagString[] ops = new JagString[500]; + @OriginalMember(owner = "client!t", name = "v", descriptor = "[Lclient!na;") + public static final JagString[] opBases = new JagString[500]; + @OriginalMember(owner = "client!d", name = "eb", descriptor = "[S") + public static final short[] actions = new short[500]; + @OriginalMember(owner = "client!pf", name = "r", descriptor = "[I") + public static final int[] cursors = new int[500]; + @OriginalMember(owner = "client!mi", name = "U", descriptor = "[J") public static final long[] keys = new long[500]; - @OriginalMember(owner = "client!pl", name = "e", descriptor = "[I") + @OriginalMember(owner = "client!pl", name = "e", descriptor = "[I") public static final int[] intArgs1 = new int[500]; - @OriginalMember(owner = "client!ef", name = "c", descriptor = "[I") - public static final int[] intArgs2 = new int[500]; - @OriginalMember(owner = "client!nm", name = "bb", descriptor = "Lclient!na;") - public static final JagString aClass100_798 = JagString.parse(""); - @OriginalMember(owner = "client!fb", name = "p", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!ef", name = "c", descriptor = "[I") + public static final int[] intArgs2 = new int[500]; + @OriginalMember(owner = "client!nm", name = "bb", descriptor = "Lclient!na;") + public static final JagString aClass100_798 = JagString.parse(""); + @OriginalMember(owner = "client!fb", name = "p", descriptor = "Lclient!na;") public static final JagString aClass100_433 = JagString.parse(""); - @OriginalMember(owner = "client!sc", name = "D", descriptor = "Lclient!na;") - public static final JagString aClass100_951 = JagString.parse(""); - @OriginalMember(owner = "client!si", name = "Z", descriptor = "Lclient!na;") - public static final JagString aClass100_972 = JagString.parse(""); - @OriginalMember(owner = "client!ag", name = "bb", descriptor = "Lclient!na;") - public static final JagString aClass100_18 = JagString.parse(""); - @OriginalMember(owner = "client!dc", name = "v", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!sc", name = "D", descriptor = "Lclient!na;") + public static final JagString aClass100_951 = JagString.parse(""); + @OriginalMember(owner = "client!si", name = "Z", descriptor = "Lclient!na;") + public static final JagString aClass100_972 = JagString.parse(""); + @OriginalMember(owner = "client!ag", name = "bb", descriptor = "Lclient!na;") + public static final JagString aClass100_18 = JagString.parse(""); + @OriginalMember(owner = "client!dc", name = "v", descriptor = "Lclient!na;") public static final JagString aClass100_266 = JagString.parse(""); - @OriginalMember(owner = "client!sf", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_965 = JagString.parse(""); - @OriginalMember(owner = "client!vg", name = "f", descriptor = "Lclient!na;") - public static final JagString aClass100_1081 = JagString.parse(""); - @OriginalMember(owner = "client!r", name = "d", descriptor = "Z") - public static final boolean aBoolean237 = false; - @OriginalMember(owner = "client!se", name = "m", descriptor = "Lclient!na;") - public static final JagString aClass100_961 = JagString.parse(" )2>"); - @OriginalMember(owner = "client!a", name = "j", descriptor = "Lclient!na;") - public static final JagString aClass100_2 = JagString.parse(" )4 "); - @OriginalMember(owner = "client!cb", name = "fb", descriptor = "Lclient!na;") - public static final JagString aClass100_168 = JagString.parse(": "); - @OriginalMember(owner = "client!qf", name = "Q", descriptor = "Lclient!na;") - public static final JagString aClass100_407 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!qf", name = "R", descriptor = "Lclient!na;") - public static final JagString aClass100_408 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!aj", name = "R", descriptor = "Lclient!na;") - public static final JagString aClass100_32 = JagString.parse(""); - @OriginalMember(owner = "client!fl", name = "V", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!sf", name = "g", descriptor = "Lclient!na;") + public static final JagString aClass100_965 = JagString.parse(""); + @OriginalMember(owner = "client!vg", name = "f", descriptor = "Lclient!na;") + public static final JagString aClass100_1081 = JagString.parse(""); + @OriginalMember(owner = "client!r", name = "d", descriptor = "Z") + public static final boolean aBoolean237 = false; + @OriginalMember(owner = "client!se", name = "m", descriptor = "Lclient!na;") + public static final JagString aClass100_961 = JagString.parse(" )2>"); + @OriginalMember(owner = "client!a", name = "j", descriptor = "Lclient!na;") + public static final JagString aClass100_2 = JagString.parse(" )4 "); + @OriginalMember(owner = "client!cb", name = "fb", descriptor = "Lclient!na;") + public static final JagString aClass100_168 = JagString.parse(": "); + @OriginalMember(owner = "client!qf", name = "Q", descriptor = "Lclient!na;") + public static final JagString aClass100_407 = JagString.parse(" )2> "); + @OriginalMember(owner = "client!qf", name = "R", descriptor = "Lclient!na;") + public static final JagString aClass100_408 = JagString.parse(" )2> "); + @OriginalMember(owner = "client!aj", name = "R", descriptor = "Lclient!na;") + public static final JagString aClass100_32 = JagString.parse(""); + @OriginalMember(owner = "client!fl", name = "V", descriptor = "Lclient!na;") public static final JagString CLOSE_PARENTHESIS = JagString.parse("(Y"); - @OriginalMember(owner = "client!gd", name = "c", descriptor = "Lclient!na;") - public static final JagString PLUS = JagString.parse(")0"); - @OriginalMember(owner = "client!jj", name = "g", descriptor = "Lclient!na;") - public static final JagString OPEN_PARENTHESIS = JagString.parse(" (X"); - @OriginalMember(owner = "client!qi", name = "B", descriptor = "Lclient!na;") - public static final JagString COLOR_WHITE = JagString.parse(""); - @OriginalMember(owner = "client!cb", name = "ab", descriptor = "Lclient!na;") - public static final JagString aClass100_164 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!ud", name = "Q", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!gd", name = "c", descriptor = "Lclient!na;") + public static final JagString PLUS = JagString.parse(")0"); + @OriginalMember(owner = "client!jj", name = "g", descriptor = "Lclient!na;") + public static final JagString OPEN_PARENTHESIS = JagString.parse(" (X"); + @OriginalMember(owner = "client!qi", name = "B", descriptor = "Lclient!na;") + public static final JagString COLOR_WHITE = JagString.parse(""); + @OriginalMember(owner = "client!cb", name = "ab", descriptor = "Lclient!na;") + public static final JagString aClass100_164 = JagString.parse(" )2> "); + @OriginalMember(owner = "client!ud", name = "Q", descriptor = "Lclient!na;") public static final JagString aClass100_1039 = JagString.parse(" x "); - @OriginalMember(owner = "client!hd", name = "l", descriptor = "Lclient!na;") - public static final JagString NULL = JagString.parse("null"); - @OriginalMember(owner = "client!ib", name = "k", descriptor = "Lclient!na;") - public static final JagString aClass100_561 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!tg", name = "e", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!hd", name = "l", descriptor = "Lclient!na;") + public static final JagString NULL = JagString.parse("null"); + @OriginalMember(owner = "client!ib", name = "k", descriptor = "Lclient!na;") + public static final JagString aClass100_561 = JagString.parse(" )2> "); + @OriginalMember(owner = "client!tg", name = "e", descriptor = "Lclient!na;") public static final JagString aClass100_1008 = JagString.parse(""); - @OriginalMember(owner = "client!uf", name = "q", descriptor = "Lclient!na;") - public static final JagString aClass100_1042 = JagString.parse("Null"); - @OriginalMember(owner = "client!ck", name = "D", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!uf", name = "q", descriptor = "Lclient!na;") + public static final JagString aClass100_1042 = JagString.parse("Null"); + @OriginalMember(owner = "client!ck", name = "D", descriptor = "Lclient!na;") public static JagString aClass100_203 = null; - @OriginalMember(owner = "client!hn", name = "W", descriptor = "Lclient!na;") - public static JagString aClass100_545 = null; - @OriginalMember(owner = "client!sk", name = "kb", descriptor = "I") + @OriginalMember(owner = "client!hn", name = "W", descriptor = "Lclient!na;") + public static JagString aClass100_545 = null; + @OriginalMember(owner = "client!sk", name = "kb", descriptor = "I") public static int size = 0; - @OriginalMember(owner = "client!v", name = "b", descriptor = "Lclient!be;") - public static Component pressedInventoryComponent; - @OriginalMember(owner = "client!gd", name = "i", descriptor = "Lclient!na;") - public static JagString aClass100_466 = null; - @OriginalMember(owner = "client!vd", name = "C", descriptor = "I") + @OriginalMember(owner = "client!v", name = "b", descriptor = "Lclient!be;") + public static Component pressedInventoryComponent; + @OriginalMember(owner = "client!gd", name = "i", descriptor = "Lclient!na;") + public static JagString aClass100_466 = null; + @OriginalMember(owner = "client!vd", name = "C", descriptor = "I") public static int anInt5014 = 0; - @OriginalMember(owner = "client!wf", name = "f", descriptor = "I") - public static int anInt4999; - @OriginalMember(owner = "client!wf", name = "d", descriptor = "I") + @OriginalMember(owner = "client!wf", name = "f", descriptor = "I") + public static int anInt4999; + @OriginalMember(owner = "client!wf", name = "d", descriptor = "I") public static int anInt4997; - @OriginalMember(owner = "client!be", name = "Ec", descriptor = "I") - public static int anInt506 = -1; - @OriginalMember(owner = "client!fl", name = "P", descriptor = "I") - public static int anInt2043 = 0; - @OriginalMember(owner = "client!hj", name = "e", descriptor = "I") - public static int anInt2512; - @OriginalMember(owner = "client!mh", name = "Y", descriptor = "Z") - public static boolean aBoolean187 = false; - @OriginalMember(owner = "client!mj", name = "i", descriptor = "I") - public static int anInt3902 = 0; - @OriginalMember(owner = "client!ha", name = "q", descriptor = "I") - public static int anInt2388 = 0; - @OriginalMember(owner = "client!kd", name = "zb", descriptor = "I") - public static int anInt3259 = 0; - @OriginalMember(owner = "client!ef", name = "g", descriptor = "I") - public static int anInt1742 = -1; - @OriginalMember(owner = "client!jb", name = "p", descriptor = "I") - public static int anInt2954 = -1; - @OriginalMember(owner = "client!id", name = "k", descriptor = "I") + @OriginalMember(owner = "client!be", name = "Ec", descriptor = "I") + public static int anInt506 = -1; + @OriginalMember(owner = "client!fl", name = "P", descriptor = "I") + public static int anInt2043 = 0; + @OriginalMember(owner = "client!hj", name = "e", descriptor = "I") + public static int anInt2512; + @OriginalMember(owner = "client!mh", name = "Y", descriptor = "Z") + public static boolean aBoolean187 = false; + @OriginalMember(owner = "client!mj", name = "i", descriptor = "I") + public static int anInt3902 = 0; + @OriginalMember(owner = "client!ha", name = "q", descriptor = "I") + public static int anInt2388 = 0; + @OriginalMember(owner = "client!kd", name = "zb", descriptor = "I") + public static int anInt3259 = 0; + @OriginalMember(owner = "client!ef", name = "g", descriptor = "I") + public static int anInt1742 = -1; + @OriginalMember(owner = "client!jb", name = "p", descriptor = "I") + public static int anInt2954 = -1; + @OriginalMember(owner = "client!id", name = "k", descriptor = "I") public static int anInt2878; - @OriginalMember(owner = "client!u", name = "i", descriptor = "I") - public static int anInt5393; - @OriginalMember(owner = "client!uf", name = "t", descriptor = "I") - public static int anInt5444 = 0; - @OriginalMember(owner = "client!pk", name = "bb", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!u", name = "i", descriptor = "I") + public static int anInt5393; + @OriginalMember(owner = "client!uf", name = "t", descriptor = "I") + public static int anInt5444 = 0; + @OriginalMember(owner = "client!pk", name = "bb", descriptor = "Lclient!na;") public static JagString walkText; - @OriginalMember(owner = "client!jl", name = "v", descriptor = "I") + @OriginalMember(owner = "client!jl", name = "v", descriptor = "I") public static int anInt3096 = 0; - @OriginalMember(owner = "client!aa", name = "a", descriptor = "I") - public static int anInt7 = 0; - @OriginalMember(owner = "client!cl", name = "Y", descriptor = "I") - public static int anInt1092 = -1; - @OriginalMember(owner = "client!p", name = "e", descriptor = "I") - public static int anInt4370; - @OriginalMember(owner = "client!jg", name = "b", descriptor = "I") - public static int anInt3039; - @OriginalMember(owner = "client!th", name = "n", descriptor = "Z") + @OriginalMember(owner = "client!aa", name = "a", descriptor = "I") + public static int anInt7 = 0; + @OriginalMember(owner = "client!cl", name = "Y", descriptor = "I") + public static int anInt1092 = -1; + @OriginalMember(owner = "client!p", name = "e", descriptor = "I") + public static int anInt4370; + @OriginalMember(owner = "client!jg", name = "b", descriptor = "I") + public static int anInt3039; + @OriginalMember(owner = "client!th", name = "n", descriptor = "Z") public static boolean aBoolean302 = false; - @OriginalMember(owner = "client!bh", name = "t", descriptor = "I") + @OriginalMember(owner = "client!bh", name = "t", descriptor = "I") public static int clickedInventoryIndex = 0; - @OriginalMember(owner = "client!va", name = "a", descriptor = "(IZILclient!be;)V") - public static void addComponentEntries(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component component) { - if (component.anInt530 == 1) { - add(-1, 0L, JagString.EMPTY, 0, (short) 8, component.aClass100_89, component.id); - } - @Pc(47) JagString local47; - if (component.anInt530 == 2 && !aBoolean302) { - local47 = MiniMap.getTargetVerb(component); - if (local47 != null) { - add(-1, 0L, JagString.concatenate(new JagString[] {COLOR_GREEN, component.aClass100_85 }), -1, (short) 32, local47, component.id); - } - } - if (component.anInt530 == 3) { - add(-1, 0L, JagString.EMPTY, 0, (short) 28, LocalizedText.CLOSE, component.id); - } - if (component.anInt530 == 4) { - add(-1, 0L, JagString.EMPTY, 0, (short) 59, component.aClass100_89, component.id); - } - if (component.anInt530 == 5) { - add(-1, 0L, JagString.EMPTY, 0, (short) 51, component.aClass100_89, component.id); - } - if (component.anInt530 == 6 && Static44.aClass13_10 == null) { - add(-1, 0L, JagString.EMPTY, -1, (short) 41, component.aClass100_89, component.id); - } - @Pc(173) int local173; - @Pc(171) int local171; - if (component.type == 2) { - local171 = 0; - for (local173 = 0; local173 < component.baseHeight; local173++) { - for (@Pc(183) int local183 = 0; local183 < component.baseWidth; local183++) { - @Pc(195) int local195 = (component.anInt512 + 32) * local183; - @Pc(202) int local202 = (component.anInt516 + 32) * local173; - if (local171 < 20) { - local202 += component.anIntArray47[local171]; - local195 += component.anIntArray41[local171]; - } - if (arg1 >= local195 && local202 <= arg0 && local195 + 32 > arg1 && local202 + 32 > arg0) { - InterfaceList.mouseOverInventoryInterface = component; - clickedInventoryIndex = local171; - if (component.objTypes[local171] > 0) { - @Pc(267) ServerActiveProperties local267 = InterfaceList.getServerActiveProperties(component); - @Pc(276) ObjType local276 = ObjTypeList.get(component.objTypes[local171] - 1); - if (anInt5014 == 1 && local267.isObjOpsEnabled()) { - if (MiniMap.anInt5062 != component.id || anInt4370 != local171) { - add(-1, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_203, aClass100_947, local276.name}), local171, (short) 40, LocalizedText.USE, component.id); - } - } else if (aBoolean302 && local267.isObjOpsEnabled()) { - @Pc(596) ParamType local596 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); - if ((anInt4999 & 0x10) != 0 && (local596 == null || local276.getParam(local596.defaultInt, anInt3039) != local596.defaultInt)) { - add(anInt5393, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_466, aClass100_947, local276.name}), local171, (short) 3, aClass100_545, component.id); - } - } else { - @Pc(296) JagString[] local296 = local276.iops; - if (aBoolean237) { - local296 = annotateOps(local296); - } - @Pc(309) int local309; - @Pc(334) byte local334; - if (local267.isObjOpsEnabled()) { - for (local309 = 4; local309 >= 3; local309--) { - if (local296 != null && local296[local309] != null) { - if (local309 == 3) { - local334 = 35; - } else { - local334 = 58; - } - add(-1, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_32, local276.name}), local171, local334, local296[local309], component.id); - } - } - } - if (local267.method507()) { - add(MiniMap.anInt4075, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_32, local276.name}), local171, (short) 22, LocalizedText.USE, component.id); - } - if (local267.isObjOpsEnabled() && local296 != null) { - for (local309 = 2; local309 >= 0; local309--) { - if (local296[local309] != null) { - local334 = 0; - if (local309 == 0) { - local334 = 47; - } - if (local309 == 1) { - local334 = 5; - } - if (local309 == 2) { - local334 = 43; - } - add(-1, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_32, local276.name}), local171, local334, local296[local309], component.id); - } - } - } - local296 = component.aClass100Array19; - if (aBoolean237) { - local296 = annotateOps(local296); - } - if (local296 != null) { - for (local309 = 4; local309 >= 0; local309--) { - if (local296[local309] != null) { - local334 = 0; - if (local309 == 0) { - local334 = 25; - } - if (local309 == 1) { - local334 = 23; - } - if (local309 == 2) { - local334 = 48; - } - if (local309 == 3) { - local334 = 7; - } - if (local309 == 4) { - local334 = 13; - } - add(-1, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_32, local276.name}), local171, local334, local296[local309], component.id); - } - } - } - add(MiniMap.anInt5073, (long) local276.id, JagString.concatenate(new JagString[] { aClass100_32, local276.name}), local171, (short) 1006, LocalizedText.EXAMINE, component.id); - } - } - } - local171++; - } - } - } - if (!component.if3) { - return; - } - if (!aBoolean302) { - for (local171 = 9; local171 >= 5; local171--) { - @Pc(765) JagString local765 = InterfaceList.getOp(component, local171); - if (local765 != null) { - add(getOpCursor(local171, component), (long) (local171 + 1), component.optionBase, component.createdComponentId, (short) 1003, local765, component.id); - } - } - local47 = MiniMap.getTargetVerb(component); - if (local47 != null) { - add(-1, 0L, component.optionBase, component.createdComponentId, (short) 32, local47, component.id); - } - for (local173 = 4; local173 >= 0; local173--) { - @Pc(828) JagString local828 = InterfaceList.getOp(component, local173); - if (local828 != null) { - add(getOpCursor(local173, component), (long) (local173 + 1), component.optionBase, component.createdComponentId, (short) 9, local828, component.id); - } - } - if (InterfaceList.getServerActiveProperties(component).method506()) { - add(-1, 0L, JagString.EMPTY, component.createdComponentId, (short) 41, LocalizedText.CONTINUE, component.id); - } - } else if (InterfaceList.getServerActiveProperties(component).method508() && (anInt4999 & 0x20) != 0) { - add(anInt5393, 0L, JagString.concatenate(new JagString[] { aClass100_466, aClass100_408, component.optionBase}), component.createdComponentId, (short) 12, aClass100_545, component.id); - } - } + @OriginalMember(owner = "client!va", name = "a", descriptor = "(IZILclient!be;)V") + public static void addComponentEntries(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component component) { + if (component.anInt530 == 1) { + add(-1, 0L, JagString.EMPTY, 0, (short) 8, component.aClass100_89, component.id); + } + @Pc(47) JagString local47; + if (component.anInt530 == 2 && !aBoolean302) { + local47 = MiniMap.getTargetVerb(component); + if (local47 != null) { + add(-1, 0L, JagString.concatenate(new JagString[]{COLOR_GREEN, component.aClass100_85}), -1, (short) 32, local47, component.id); + } + } + if (component.anInt530 == 3) { + add(-1, 0L, JagString.EMPTY, 0, (short) 28, LocalizedText.CLOSE, component.id); + } + if (component.anInt530 == 4) { + add(-1, 0L, JagString.EMPTY, 0, (short) 59, component.aClass100_89, component.id); + } + if (component.anInt530 == 5) { + add(-1, 0L, JagString.EMPTY, 0, (short) 51, component.aClass100_89, component.id); + } + if (component.anInt530 == 6 && Static44.aClass13_10 == null) { + add(-1, 0L, JagString.EMPTY, -1, (short) 41, component.aClass100_89, component.id); + } + @Pc(173) int local173; + @Pc(171) int local171; + if (component.type == 2) { + local171 = 0; + for (local173 = 0; local173 < component.baseHeight; local173++) { + for (@Pc(183) int local183 = 0; local183 < component.baseWidth; local183++) { + @Pc(195) int local195 = (component.anInt512 + 32) * local183; + @Pc(202) int local202 = (component.anInt516 + 32) * local173; + if (local171 < 20) { + local202 += component.anIntArray47[local171]; + local195 += component.anIntArray41[local171]; + } + if (arg1 >= local195 && local202 <= arg0 && local195 + 32 > arg1 && local202 + 32 > arg0) { + InterfaceList.mouseOverInventoryInterface = component; + clickedInventoryIndex = local171; + if (component.objTypes[local171] > 0) { + @Pc(267) ServerActiveProperties local267 = InterfaceList.getServerActiveProperties(component); + @Pc(276) ObjType local276 = ObjTypeList.get(component.objTypes[local171] - 1); + if (anInt5014 == 1 && local267.isObjOpsEnabled()) { + if (MiniMap.anInt5062 != component.id || anInt4370 != local171) { + add(-1, local276.id, JagString.concatenate(new JagString[]{aClass100_203, aClass100_947, local276.name}), local171, (short) 40, LocalizedText.USE, component.id); + } + } else if (aBoolean302 && local267.isObjOpsEnabled()) { + @Pc(596) ParamType local596 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); + if ((anInt4999 & 0x10) != 0 && (local596 == null || local276.getParam(local596.defaultInt, anInt3039) != local596.defaultInt)) { + add(anInt5393, local276.id, JagString.concatenate(new JagString[]{aClass100_466, aClass100_947, local276.name}), local171, (short) 3, aClass100_545, component.id); + } + } else { + @Pc(296) JagString[] local296 = local276.iops; + if (aBoolean237) { + local296 = annotateOps(local296); + } + @Pc(309) int local309; + @Pc(334) byte local334; + if (local267.isObjOpsEnabled()) { + for (local309 = 4; local309 >= 3; local309--) { + if (local296 != null && local296[local309] != null) { + if (local309 == 3) { + local334 = 35; + } else { + local334 = 58; + } + add(-1, local276.id, JagString.concatenate(new JagString[]{aClass100_32, local276.name}), local171, local334, local296[local309], component.id); + } + } + } + if (local267.method507()) { + add(MiniMap.anInt4075, local276.id, JagString.concatenate(new JagString[]{aClass100_32, local276.name}), local171, (short) 22, LocalizedText.USE, component.id); + } + if (local267.isObjOpsEnabled() && local296 != null) { + for (local309 = 2; local309 >= 0; local309--) { + if (local296[local309] != null) { + local334 = 0; + if (local309 == 0) { + local334 = 47; + } + if (local309 == 1) { + local334 = 5; + } + if (local309 == 2) { + local334 = 43; + } + add(-1, local276.id, JagString.concatenate(new JagString[]{aClass100_32, local276.name}), local171, local334, local296[local309], component.id); + } + } + } + local296 = component.aClass100Array19; + if (aBoolean237) { + local296 = annotateOps(local296); + } + if (local296 != null) { + for (local309 = 4; local309 >= 0; local309--) { + if (local296[local309] != null) { + local334 = 0; + if (local309 == 0) { + local334 = 25; + } + if (local309 == 1) { + local334 = 23; + } + if (local309 == 2) { + local334 = 48; + } + if (local309 == 3) { + local334 = 7; + } + if (local309 == 4) { + local334 = 13; + } + add(-1, local276.id, JagString.concatenate(new JagString[]{aClass100_32, local276.name}), local171, local334, local296[local309], component.id); + } + } + } + add(MiniMap.anInt5073, local276.id, JagString.concatenate(new JagString[]{aClass100_32, local276.name}), local171, (short) 1006, LocalizedText.EXAMINE, component.id); + } + } + } + local171++; + } + } + } + if (!component.if3) { + return; + } + if (!aBoolean302) { + for (local171 = 9; local171 >= 5; local171--) { + @Pc(765) JagString local765 = InterfaceList.getOp(component, local171); + if (local765 != null) { + add(getOpCursor(local171, component), local171 + 1, component.optionBase, component.createdComponentId, (short) 1003, local765, component.id); + } + } + local47 = MiniMap.getTargetVerb(component); + if (local47 != null) { + add(-1, 0L, component.optionBase, component.createdComponentId, (short) 32, local47, component.id); + } + for (local173 = 4; local173 >= 0; local173--) { + @Pc(828) JagString local828 = InterfaceList.getOp(component, local173); + if (local828 != null) { + add(getOpCursor(local173, component), local173 + 1, component.optionBase, component.createdComponentId, (short) 9, local828, component.id); + } + } + if (InterfaceList.getServerActiveProperties(component).method506()) { + add(-1, 0L, JagString.EMPTY, component.createdComponentId, (short) 41, LocalizedText.CONTINUE, component.id); + } + } else if (InterfaceList.getServerActiveProperties(component).method508() && (anInt4999 & 0x20) != 0) { + add(anInt5393, 0L, JagString.concatenate(new JagString[]{aClass100_466, aClass100_408, component.optionBase}), component.createdComponentId, (short) 12, aClass100_545, component.id); + } + } - @OriginalMember(owner = "client!hj", name = "a", descriptor = "(IJBLclient!na;ISLclient!na;I)V") - public static void add(@OriginalArg(0) int cursor, @OriginalArg(1) long arg1, @OriginalArg(3) JagString arg2, @OriginalArg(4) int arg3, @OriginalArg(5) short arg4, @OriginalArg(6) JagString arg5, @OriginalArg(7) int arg6) { - if (Static40.aBoolean108 || size >= 500) { - return; - } - ops[size] = arg5; - opBases[size] = arg2; - cursors[size] = cursor == -1 ? anInt1092 : cursor; - actions[size] = arg4; - keys[size] = arg1; - intArgs1[size] = arg3; - intArgs2[size] = arg6; - size++; - } + @OriginalMember(owner = "client!hj", name = "a", descriptor = "(IJBLclient!na;ISLclient!na;I)V") + public static void add(@OriginalArg(0) int cursor, @OriginalArg(1) long arg1, @OriginalArg(3) JagString arg2, @OriginalArg(4) int arg3, @OriginalArg(5) short arg4, @OriginalArg(6) JagString arg5, @OriginalArg(7) int arg6) { + if (Static40.aBoolean108 || size >= 500) { + return; + } + ops[size] = arg5; + opBases[size] = arg2; + cursors[size] = cursor == -1 ? anInt1092 : cursor; + actions[size] = arg4; + keys[size] = arg1; + intArgs1[size] = arg3; + intArgs2[size] = arg6; + size++; + } - @OriginalMember(owner = "client!wl", name = "b", descriptor = "(I)V") - public static void sort() { - @Pc(3) boolean sorted = false; - while (!sorted) { - sorted = true; - for (@Pc(13) int i = 0; i < size - 1; i++) { - if (actions[i] < 1000 && actions[i + 1] > 1000) { - @Pc(41) JagString local41 = opBases[i]; - sorted = false; - opBases[i] = opBases[i + 1]; - opBases[i + 1] = local41; - @Pc(61) JagString local61 = ops[i]; - ops[i] = ops[i + 1]; - ops[i + 1] = local61; - @Pc(79) int local79 = intArgs1[i]; - intArgs1[i] = intArgs1[i + 1]; - intArgs1[i + 1] = local79; - @Pc(97) int local97 = intArgs2[i]; - intArgs2[i] = intArgs2[i + 1]; - intArgs2[i + 1] = local97; - @Pc(115) int local115 = cursors[i]; - cursors[i] = cursors[i + 1]; - cursors[i + 1] = local115; - @Pc(133) short local133 = actions[i]; - actions[i] = actions[i + 1]; - actions[i + 1] = local133; - @Pc(151) long local151 = keys[i]; - keys[i] = keys[i + 1]; - keys[i + 1] = local151; - } - } - } - } + @OriginalMember(owner = "client!wl", name = "b", descriptor = "(I)V") + public static void sort() { + @Pc(3) boolean sorted = false; + while (!sorted) { + sorted = true; + for (@Pc(13) int i = 0; i < size - 1; i++) { + if (actions[i] < 1000 && actions[i + 1] > 1000) { + @Pc(41) JagString local41 = opBases[i]; + sorted = false; + opBases[i] = opBases[i + 1]; + opBases[i + 1] = local41; + @Pc(61) JagString local61 = ops[i]; + ops[i] = ops[i + 1]; + ops[i + 1] = local61; + @Pc(79) int local79 = intArgs1[i]; + intArgs1[i] = intArgs1[i + 1]; + intArgs1[i + 1] = local79; + @Pc(97) int local97 = intArgs2[i]; + intArgs2[i] = intArgs2[i + 1]; + intArgs2[i + 1] = local97; + @Pc(115) int local115 = cursors[i]; + cursors[i] = cursors[i + 1]; + cursors[i + 1] = local115; + @Pc(133) short local133 = actions[i]; + actions[i] = actions[i + 1]; + actions[i + 1] = local133; + @Pc(151) long local151 = keys[i]; + keys[i] = keys[i + 1]; + keys[i + 1] = local151; + } + } + } + } - @OriginalMember(owner = "client!qe", name = "b", descriptor = "(II)V") + @OriginalMember(owner = "client!qe", name = "b", descriptor = "(II)V") public static void remove(@OriginalArg(1) int i) { size--; if (size == i) { @@ -347,1137 +347,1137 @@ public class MiniMenu { ArrayUtils.copy(intArgs2, i + 1, intArgs2, i, size - i); } - @OriginalMember(owner = "client!wa", name = "a", descriptor = "(IZ)Lclient!na;") - public static JagString getOp(@OriginalArg(0) int i) { - return opBases[i].length() > 0 ? JagString.concatenate(new JagString[] { ops[i], LocalizedText.MINISEPARATOR, opBases[i] }) : ops[i]; - } + @OriginalMember(owner = "client!wa", name = "a", descriptor = "(IZ)Lclient!na;") + public static JagString getOp(@OriginalArg(0) int i) { + return opBases[i].length() > 0 ? JagString.concatenate(new JagString[]{ops[i], LocalizedText.MINISEPARATOR, opBases[i]}) : ops[i]; + } - @OriginalMember(owner = "client!i", name = "p", descriptor = "(II)V") - public static void doAction(@OriginalArg(1) int arg0) { - if (arg0 < 0) { - return; - } - @Pc(15) int local15 = intArgs1[arg0]; - @Pc(19) int local19 = intArgs2[arg0]; - @Pc(23) int local23 = actions[arg0]; - if (local23 >= 2000) { - local23 -= 2000; - } - @Pc(31) long local31 = keys[arg0]; - @Pc(36) int local36 = (int) keys[arg0]; - @Pc(43) Player local43; - if (local23 == 31) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.type = 2; - Cross.milliseconds = 0; - Cross.x = Mouse.clickX; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(71); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (local23 == 46) { - PathFinder.findPathToLoc(local31, local19, local15); - Protocol.outboundBuffer.p1isaac(247); - Protocol.outboundBuffer.ip2(Camera.originZ + local19); - Protocol.outboundBuffer.ip2add(local15 + Camera.originX); - Protocol.outboundBuffer.p2(Integer.MAX_VALUE & (int) (local31 >>> 32)); - } - if (local23 == 40) { - Protocol.outboundBuffer.p1isaac(27); - Protocol.outboundBuffer.p2(anInt4370); - Protocol.outboundBuffer.ip4(local19); - Protocol.outboundBuffer.ip2(local15); - Protocol.outboundBuffer.ip4(MiniMap.anInt5062); - Protocol.outboundBuffer.ip2add(anInt4997); - Protocol.outboundBuffer.ip2add(local36); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - @Pc(192) Npc local192; - if (local23 == 19) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(30); - Protocol.outboundBuffer.p2(local36); - } - } - if (local23 == 17) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Cross.type = 2; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(78); - Protocol.outboundBuffer.ip2(local36); - } - } - if (local23 == 44) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(133); - Protocol.outboundBuffer.ip2(local36); - } - } - if (local23 == 58) { - Protocol.outboundBuffer.p1isaac(135); - Protocol.outboundBuffer.p2add(local36); - Protocol.outboundBuffer.p2add(local15); - Protocol.outboundBuffer.mp4(local19); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 42) { - PathFinder.findPathToLoc(local31, local19, local15); - Protocol.outboundBuffer.p1isaac(254); - Protocol.outboundBuffer.ip2(local15 + Camera.originX); - Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); - Protocol.outboundBuffer.p2(local19 + Camera.originZ); - } - if (local23 == 28) { - ClientProt.closeWidget(); - } - if (local23 == 45) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(239); - Protocol.outboundBuffer.ip4(anInt2512); - Protocol.outboundBuffer.p2add(anInt506); - Protocol.outboundBuffer.ip2add(local36); - } - } - @Pc(560) boolean local560; - if (local23 == 18) { - if (client.game == 1) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } else { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - } - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Cross.type = 2; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(66); - Protocol.outboundBuffer.ip2(Camera.originX + local15); - Protocol.outboundBuffer.p2(local36); - Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); - } - if (local23 == 1001) { - PathFinder.findPathToLoc(local31, local19, local15); - Protocol.outboundBuffer.p1isaac(170); - Protocol.outboundBuffer.ip2add(Integer.MAX_VALUE & (int) (local31 >>> 32)); - Protocol.outboundBuffer.ip2add(local15 + Camera.originX); - Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); - } - if (local23 == 1002) { - Cross.type = 2; - Cross.x = Mouse.clickX; - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(92); - Protocol.outboundBuffer.ip2add(local36); - } - @Pc(693) Component local693; - if (local23 == 1006) { - local693 = InterfaceList.getComponent(local19); - if (local693 == null || local693.objCounts[local15] < 100000) { - Protocol.outboundBuffer.p1isaac(92); - Protocol.outboundBuffer.ip2add(local36); - } else { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { JagString.parseInt(local693.objCounts[local15]), aClass100_1039, ObjTypeList.get(local36).name})); - } - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 60) { - if (local36 == 0) { - method3556(Player.level, local15, local19); - } else if (local36 == 1) { - if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - Cheat.teleport(Camera.originX + local15, Camera.originZ + local19, Player.level); - } else if (PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, local15, 0, 0, 1, local19, PlayerList.self.movementQueueX[0])) { - Protocol.outboundBuffer.p1(Static1.anInt5); - Protocol.outboundBuffer.p1(anInt2878); - Protocol.outboundBuffer.p2((int)Camera.yawTarget); - Protocol.outboundBuffer.p1(57); - Protocol.outboundBuffer.p1(MiniMap.anInt1814); - Protocol.outboundBuffer.p1(MiniMap.anInt4130); - Protocol.outboundBuffer.p1(89); - Protocol.outboundBuffer.p2(PlayerList.self.xFine); - Protocol.outboundBuffer.p2(PlayerList.self.zFine); - Protocol.outboundBuffer.p1(PathFinder.anInt4364); - Protocol.outboundBuffer.p1(63); - } - } - } - if (local23 == 1007) { - Cross.milliseconds = 0; - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - local192 = NpcList.npcs[local36]; - if (local192 != null) { - @Pc(884) NpcType local884 = local192.type; - if (local884.multiNpcs != null) { - local884 = local884.getMultiNpc(); - } - if (local884 != null) { - Protocol.outboundBuffer.p1isaac(72); - Protocol.outboundBuffer.p2(local884.id); - } - } - } - if (local23 == 47) { - Protocol.outboundBuffer.p1isaac(156); - Protocol.outboundBuffer.ip2add(local15); - Protocol.outboundBuffer.p2add(local36); - Protocol.outboundBuffer.ip4(local19); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 3) { - Protocol.outboundBuffer.p1isaac(253); - Protocol.outboundBuffer.ip4(anInt2512); - Protocol.outboundBuffer.ip2add(local15); - Protocol.outboundBuffer.ip4(local19); - Protocol.outboundBuffer.p2add(local36); - Protocol.outboundBuffer.ip2(anInt506); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 10) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(4); - Protocol.outboundBuffer.ip2(local36); - } - } - if (local23 == 41 && Static44.aClass13_10 == null) { - ClientProt.method10(local15, local19); - Static44.aClass13_10 = InterfaceList.method1418(local19, local15); - InterfaceList.redraw(Static44.aClass13_10); - } - if (local23 == 49) { - PathFinder.findPathToLoc(local31, local19, local15); - Protocol.outboundBuffer.p1isaac(84); - Protocol.outboundBuffer.ip2add(Integer.MAX_VALUE & (int) (local31 >>> 32)); - Protocol.outboundBuffer.ip2add(Camera.originZ + local19); - Protocol.outboundBuffer.ip2(local15 + Camera.originX); - } - if (local23 == 23) { - Protocol.outboundBuffer.p1isaac(206); - Protocol.outboundBuffer.p2add(local36); - Protocol.outboundBuffer.ip2(local15); - Protocol.outboundBuffer.ip4(local19); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 14 && PathFinder.findPathToLoc(local31, local19, local15)) { - Protocol.outboundBuffer.p1isaac(134); - Protocol.outboundBuffer.p2add(Camera.originX + local15); - Protocol.outboundBuffer.p2(anInt4997); - Protocol.outboundBuffer.ip2(local19 + Camera.originZ); - Protocol.outboundBuffer.p2(anInt4370); - Protocol.outboundBuffer.mp4(MiniMap.anInt5062); - Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); - } - if (local23 == 37) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.milliseconds = 0; - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(114); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (local23 == 9 || local23 == 1003) { - ClientProt.method4512(opBases[arg0], local15, local36, local19); - } - if (local23 == 5) { - Protocol.outboundBuffer.p1isaac(55); - Protocol.outboundBuffer.ip2(local36); - Protocol.outboundBuffer.p2add(local15); - Protocol.outboundBuffer.imp4(local19); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 21) { - if (client.game == 1) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } else { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - } - Cross.type = 2; - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(228); - Protocol.outboundBuffer.p2(local36); - Protocol.outboundBuffer.ip2(Camera.originX + local15); - Protocol.outboundBuffer.ip2add(Camera.originZ + local19); - } - if (local23 == 4) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.type = 2; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(148); - Protocol.outboundBuffer.p2add(local36); - } - } - if (local23 == 32) { - local693 = InterfaceList.method1418(local19, local15); - if (local693 != null) { - method1294(); - @Pc(1493) ServerActiveProperties local1493 = InterfaceList.getServerActiveProperties(local693); - method4246(local19, local15, local1493.getTargetMask(), local1493.anInt540, local693.anInt499, local693.anInt484); - anInt5014 = 0; - aClass100_545 = MiniMap.getTargetVerb(local693); - if (aClass100_545 == null) { - aClass100_545 = aClass100_1042; - } - if (local693.if3) { - aClass100_466 = JagString.concatenate(new JagString[] { local693.optionBase, COLOR_WHITE}); - } else { - aClass100_466 = JagString.concatenate(new JagString[] {COLOR_GREEN, local693.aClass100_85, COLOR_WHITE}); - } - } - return; - } - if (local23 == 29) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Cross.type = 2; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(180); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (local23 == 35) { - Protocol.outboundBuffer.p1isaac(161); - Protocol.outboundBuffer.ip4(local19); - Protocol.outboundBuffer.ip2add(local36); - Protocol.outboundBuffer.ip2add(local15); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 15) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.milliseconds = 0; - Cross.type = 2; - Cross.x = Mouse.clickX; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(195); - Protocol.outboundBuffer.p2add(anInt506); - Protocol.outboundBuffer.ip4(anInt2512); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (local23 == 34) { - if (client.game == 1) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } else { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - } - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(109); - Protocol.outboundBuffer.ip2(local19 + Camera.originZ); - Protocol.outboundBuffer.p2(local15 + Camera.originX); - Protocol.outboundBuffer.ip2add(local36); - } - if (local23 == 25) { - Protocol.outboundBuffer.p1isaac(81); - Protocol.outboundBuffer.p2add(local15); - Protocol.outboundBuffer.p2(local36); - Protocol.outboundBuffer.imp4(local19); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 2) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.y = Mouse.clickY; - Cross.type = 2; - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(218); - Protocol.outboundBuffer.ip2(local36); - } - } - @Pc(1955) int local1955; - if (local23 == 51) { - Protocol.outboundBuffer.p1isaac(10); - Protocol.outboundBuffer.p4(local19); - local693 = InterfaceList.getComponent(local19); - if (local693.anIntArrayArray4 != null && local693.anIntArrayArray4[0][0] == 5) { - local1955 = local693.anIntArrayArray4[0][1]; - if (VarpDomain.activeVarps[local1955] != local693.anIntArray48[0]) { - VarpDomain.activeVarps[local1955] = local693.anIntArray48[0]; - VarpDomain.refreshMagicVarp(local1955); - } - } - } - if (local23 == 26) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.type = 2; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(115); - Protocol.outboundBuffer.mp4(MiniMap.anInt5062); - Protocol.outboundBuffer.ip2(anInt4370); - Protocol.outboundBuffer.ip2(local36); - Protocol.outboundBuffer.ip2add(anInt4997); - } - } - if (local23 == 59) { - Protocol.outboundBuffer.p1isaac(10); - Protocol.outboundBuffer.p4(local19); - local693 = InterfaceList.getComponent(local19); - if (local693.anIntArrayArray4 != null && local693.anIntArrayArray4[0][0] == 5) { - local1955 = local693.anIntArrayArray4[0][1]; - VarpDomain.activeVarps[local1955] = 1 - VarpDomain.activeVarps[local1955]; - VarpDomain.refreshMagicVarp(local1955); - } - } - if (local23 == 33) { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.type = 2; - Protocol.outboundBuffer.p1isaac(101); - Protocol.outboundBuffer.ip2add(local15 + Camera.originX); - Protocol.outboundBuffer.ip2(anInt4370); - Protocol.outboundBuffer.ip2(anInt4997); - Protocol.outboundBuffer.ip2(local36); - Protocol.outboundBuffer.ip2add(Camera.originZ + local19); - Protocol.outboundBuffer.mp4(MiniMap.anInt5062); - } - if (local23 == 1004) { - Cross.milliseconds = 0; - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.y = Mouse.clickY; - Protocol.outboundBuffer.p1isaac(94); - Protocol.outboundBuffer.ip2add(local36); - } - if (local23 == 11) { - if (local36 == 0) { - anInt3096 = 1; - method3556(Player.level, local15, local19); - } else if (local36 == 1) { - Protocol.outboundBuffer.p1isaac(131); - Protocol.outboundBuffer.mp4(anInt2512); - Protocol.outboundBuffer.p2add(Camera.originX + local15); - Protocol.outboundBuffer.ip2add(anInt506); - Protocol.outboundBuffer.p2add(local19 + Camera.originZ); - } - } - if (local23 == 8) { - local693 = InterfaceList.getComponent(local19); - @Pc(2287) boolean local2287 = true; - if (local693.clientCode > 0) { - local2287 = method4265(local693); - } - if (local2287) { - Protocol.outboundBuffer.p1isaac(10); - Protocol.outboundBuffer.p4(local19); - } - } - if (local23 == 1) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.type = 2; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(248); - Protocol.outboundBuffer.ip2add(local36); - Protocol.outboundBuffer.p2(anInt4997); - Protocol.outboundBuffer.p2(anInt4370); - Protocol.outboundBuffer.mp4(MiniMap.anInt5062); - } - } - if (local23 == 7) { - Protocol.outboundBuffer.p1isaac(85); - Protocol.outboundBuffer.imp4(local19); - Protocol.outboundBuffer.p2(local15); - Protocol.outboundBuffer.p2add(local36); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 24) { - if (client.game == 1) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } else { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - } - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(48); - Protocol.outboundBuffer.p2add(local15 + Camera.originX); - Protocol.outboundBuffer.ip2add(local36); - Protocol.outboundBuffer.ip2(Camera.originZ + local19); - } - if (local23 == 38 && PathFinder.findPathToLoc(local31, local19, local15)) { - Protocol.outboundBuffer.p1isaac(233); - Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); - Protocol.outboundBuffer.p2add(Camera.originX + local15); - Protocol.outboundBuffer.ip2add(anInt506); - Protocol.outboundBuffer.imp4(anInt2512); - Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); - } - if (local23 == 13) { - Protocol.outboundBuffer.p1isaac(6); - Protocol.outboundBuffer.p4(local19); - Protocol.outboundBuffer.p2add(local15); - Protocol.outboundBuffer.ip2(local36); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 57) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.type = 2; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(175); - Protocol.outboundBuffer.p2add(local36); - } - } - if (local23 == 22) { - method1294(); - local693 = InterfaceList.getComponent(local19); - MiniMap.anInt5062 = local19; - anInt4370 = local15; - anInt5014 = 1; - anInt4997 = local36; - InterfaceList.redraw(local693); - aClass100_203 = JagString.concatenate(new JagString[] { aClass100_32, ObjTypeList.get(local36).name, COLOR_WHITE}); - if (aClass100_203 == null) { - aClass100_203 = NULL; - } - return; - } - if (local23 == 50) { - PathFinder.findPathToLoc(local31, local19, local15); - Protocol.outboundBuffer.p1isaac(194); - Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); - Protocol.outboundBuffer.ip2(Camera.originX + local15); - Protocol.outboundBuffer.p2((int) (local31 >>> 32) & Integer.MAX_VALUE); - } - if (local23 == 48) { - Protocol.outboundBuffer.p1isaac(154); - Protocol.outboundBuffer.ip2(local15); - Protocol.outboundBuffer.imp4(local19); - Protocol.outboundBuffer.ip2add(local36); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 30) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.milliseconds = 0; - Cross.x = Mouse.clickX; - Cross.y = Mouse.clickY; - Cross.type = 2; - Protocol.outboundBuffer.p1isaac(68); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (local23 == 43) { - Protocol.outboundBuffer.p1isaac(153); - Protocol.outboundBuffer.ip4(local19); - Protocol.outboundBuffer.ip2(local15); - Protocol.outboundBuffer.ip2(local36); - anInt2043 = 0; - pressedInventoryComponent = InterfaceList.getComponent(local19); - anInt5444 = local15; - } - if (local23 == 39) { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - Cross.type = 2; - Cross.milliseconds = 0; - Protocol.outboundBuffer.p1isaac(73); - Protocol.outboundBuffer.imp4(anInt2512); - Protocol.outboundBuffer.p2(Camera.originZ + local19); - Protocol.outboundBuffer.ip2add(local36); - Protocol.outboundBuffer.ip2add(local15 + Camera.originX); - Protocol.outboundBuffer.ip2(anInt506); - } - if (local23 == 12) { - Protocol.outboundBuffer.p1isaac(82); - Protocol.outboundBuffer.p2(anInt506); - Protocol.outboundBuffer.imp4(local19); - Protocol.outboundBuffer.p4(anInt2512); - Protocol.outboundBuffer.ip2add(local15); - } - if (local23 == 36) { - if (local36 == 0) { - Protocol.anInt4422 = 1; - method3556(Player.level, local15, local19); - } else if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - Cheat.teleport(local15 + Camera.originX, Camera.originZ - -local19, Player.level); - } else { - Protocol.outboundBuffer.p1isaac(179); - Protocol.outboundBuffer.p2(local19 + Camera.originZ); - Protocol.outboundBuffer.p2(local15 + Camera.originX); - } - } - if (local23 == 6) { - local43 = PlayerList.players[local36]; - if (local43 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Cross.type = 2; - Cross.x = Mouse.clickX; - Protocol.outboundBuffer.p1isaac(106); - Protocol.outboundBuffer.p2(local36); - } - } - if (local23 == 20) { - if (client.game == 1) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } else { - local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); - if (!local560) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); - } - } - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Cross.x = Mouse.clickX; - Cross.type = 2; - Protocol.outboundBuffer.p1isaac(33); - Protocol.outboundBuffer.p2(local36); - Protocol.outboundBuffer.p2(Camera.originX + local15); - Protocol.outboundBuffer.ip2(Camera.originZ + local19); - } - if (local23 == 16) { - local192 = NpcList.npcs[local36]; - if (local192 != null) { - PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Cross.x = Mouse.clickX; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.type = 2; - Protocol.outboundBuffer.p1isaac(3); - Protocol.outboundBuffer.ip2add(local36); - } - } - if (anInt5014 != 0) { - anInt5014 = 0; - InterfaceList.redraw(InterfaceList.getComponent(MiniMap.anInt5062)); - } - if (aBoolean302) { - method1294(); - } - if (pressedInventoryComponent != null && anInt2043 == 0) { - InterfaceList.redraw(pressedInventoryComponent); - } - } + @OriginalMember(owner = "client!i", name = "p", descriptor = "(II)V") + public static void doAction(@OriginalArg(1) int arg0) { + if (arg0 < 0) { + return; + } + @Pc(15) int local15 = intArgs1[arg0]; + @Pc(19) int local19 = intArgs2[arg0]; + @Pc(23) int local23 = actions[arg0]; + if (local23 >= 2000) { + local23 -= 2000; + } + @Pc(31) long local31 = keys[arg0]; + @Pc(36) int local36 = (int) keys[arg0]; + @Pc(43) Player local43; + if (local23 == 31) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.type = 2; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(71); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (local23 == 46) { + PathFinder.findPathToLoc(local31, local19, local15); + Protocol.outboundBuffer.p1isaac(247); + Protocol.outboundBuffer.ip2(Camera.originZ + local19); + Protocol.outboundBuffer.ip2add(local15 + Camera.originX); + Protocol.outboundBuffer.p2(Integer.MAX_VALUE & (int) (local31 >>> 32)); + } + if (local23 == 40) { + Protocol.outboundBuffer.p1isaac(27); + Protocol.outboundBuffer.p2(anInt4370); + Protocol.outboundBuffer.ip4(local19); + Protocol.outboundBuffer.ip2(local15); + Protocol.outboundBuffer.ip4(MiniMap.anInt5062); + Protocol.outboundBuffer.ip2add(anInt4997); + Protocol.outboundBuffer.ip2add(local36); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + @Pc(192) Npc local192; + if (local23 == 19) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(30); + Protocol.outboundBuffer.p2(local36); + } + } + if (local23 == 17) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(78); + Protocol.outboundBuffer.ip2(local36); + } + } + if (local23 == 44) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(133); + Protocol.outboundBuffer.ip2(local36); + } + } + if (local23 == 58) { + Protocol.outboundBuffer.p1isaac(135); + Protocol.outboundBuffer.p2add(local36); + Protocol.outboundBuffer.p2add(local15); + Protocol.outboundBuffer.mp4(local19); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 42) { + PathFinder.findPathToLoc(local31, local19, local15); + Protocol.outboundBuffer.p1isaac(254); + Protocol.outboundBuffer.ip2(local15 + Camera.originX); + Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); + Protocol.outboundBuffer.p2(local19 + Camera.originZ); + } + if (local23 == 28) { + ClientProt.closeWidget(); + } + if (local23 == 45) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(239); + Protocol.outboundBuffer.ip4(anInt2512); + Protocol.outboundBuffer.p2add(anInt506); + Protocol.outboundBuffer.ip2add(local36); + } + } + @Pc(560) boolean local560; + if (local23 == 18) { + if (client.game == 1) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } else { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + } + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(66); + Protocol.outboundBuffer.ip2(Camera.originX + local15); + Protocol.outboundBuffer.p2(local36); + Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); + } + if (local23 == 1001) { + PathFinder.findPathToLoc(local31, local19, local15); + Protocol.outboundBuffer.p1isaac(170); + Protocol.outboundBuffer.ip2add(Integer.MAX_VALUE & (int) (local31 >>> 32)); + Protocol.outboundBuffer.ip2add(local15 + Camera.originX); + Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); + } + if (local23 == 1002) { + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(92); + Protocol.outboundBuffer.ip2add(local36); + } + @Pc(693) Component local693; + if (local23 == 1006) { + local693 = InterfaceList.getComponent(local19); + if (local693 == null || local693.objCounts[local15] < 100000) { + Protocol.outboundBuffer.p1isaac(92); + Protocol.outboundBuffer.ip2add(local36); + } else { + Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[]{JagString.parseInt(local693.objCounts[local15]), aClass100_1039, ObjTypeList.get(local36).name})); + } + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 60) { + if (local36 == 0) { + method3556(Player.level, local15, local19); + } else if (local36 == 1) { + if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { + Cheat.teleport(Camera.originX + local15, Camera.originZ + local19, Player.level); + } else if (PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, local15, 0, 0, 1, local19, PlayerList.self.movementQueueX[0])) { + Protocol.outboundBuffer.p1(Static1.anInt5); + Protocol.outboundBuffer.p1(anInt2878); + Protocol.outboundBuffer.p2((int) Camera.yawTarget); + Protocol.outboundBuffer.p1(57); + Protocol.outboundBuffer.p1(MiniMap.anInt1814); + Protocol.outboundBuffer.p1(MiniMap.anInt4130); + Protocol.outboundBuffer.p1(89); + Protocol.outboundBuffer.p2(PlayerList.self.xFine); + Protocol.outboundBuffer.p2(PlayerList.self.zFine); + Protocol.outboundBuffer.p1(PathFinder.anInt4364); + Protocol.outboundBuffer.p1(63); + } + } + } + if (local23 == 1007) { + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + local192 = NpcList.npcs[local36]; + if (local192 != null) { + @Pc(884) NpcType local884 = local192.type; + if (local884.multiNpcs != null) { + local884 = local884.getMultiNpc(); + } + if (local884 != null) { + Protocol.outboundBuffer.p1isaac(72); + Protocol.outboundBuffer.p2(local884.id); + } + } + } + if (local23 == 47) { + Protocol.outboundBuffer.p1isaac(156); + Protocol.outboundBuffer.ip2add(local15); + Protocol.outboundBuffer.p2add(local36); + Protocol.outboundBuffer.ip4(local19); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 3) { + Protocol.outboundBuffer.p1isaac(253); + Protocol.outboundBuffer.ip4(anInt2512); + Protocol.outboundBuffer.ip2add(local15); + Protocol.outboundBuffer.ip4(local19); + Protocol.outboundBuffer.p2add(local36); + Protocol.outboundBuffer.ip2(anInt506); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 10) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(4); + Protocol.outboundBuffer.ip2(local36); + } + } + if (local23 == 41 && Static44.aClass13_10 == null) { + ClientProt.method10(local15, local19); + Static44.aClass13_10 = InterfaceList.method1418(local19, local15); + InterfaceList.redraw(Static44.aClass13_10); + } + if (local23 == 49) { + PathFinder.findPathToLoc(local31, local19, local15); + Protocol.outboundBuffer.p1isaac(84); + Protocol.outboundBuffer.ip2add(Integer.MAX_VALUE & (int) (local31 >>> 32)); + Protocol.outboundBuffer.ip2add(Camera.originZ + local19); + Protocol.outboundBuffer.ip2(local15 + Camera.originX); + } + if (local23 == 23) { + Protocol.outboundBuffer.p1isaac(206); + Protocol.outboundBuffer.p2add(local36); + Protocol.outboundBuffer.ip2(local15); + Protocol.outboundBuffer.ip4(local19); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 14 && PathFinder.findPathToLoc(local31, local19, local15)) { + Protocol.outboundBuffer.p1isaac(134); + Protocol.outboundBuffer.p2add(Camera.originX + local15); + Protocol.outboundBuffer.p2(anInt4997); + Protocol.outboundBuffer.ip2(local19 + Camera.originZ); + Protocol.outboundBuffer.p2(anInt4370); + Protocol.outboundBuffer.mp4(MiniMap.anInt5062); + Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); + } + if (local23 == 37) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(114); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (local23 == 9 || local23 == 1003) { + ClientProt.method4512(opBases[arg0], local15, local36, local19); + } + if (local23 == 5) { + Protocol.outboundBuffer.p1isaac(55); + Protocol.outboundBuffer.ip2(local36); + Protocol.outboundBuffer.p2add(local15); + Protocol.outboundBuffer.imp4(local19); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 21) { + if (client.game == 1) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } else { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + } + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(228); + Protocol.outboundBuffer.p2(local36); + Protocol.outboundBuffer.ip2(Camera.originX + local15); + Protocol.outboundBuffer.ip2add(Camera.originZ + local19); + } + if (local23 == 4) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(148); + Protocol.outboundBuffer.p2add(local36); + } + } + if (local23 == 32) { + local693 = InterfaceList.method1418(local19, local15); + if (local693 != null) { + method1294(); + @Pc(1493) ServerActiveProperties local1493 = InterfaceList.getServerActiveProperties(local693); + method4246(local19, local15, local1493.getTargetMask(), local1493.anInt540, local693.anInt499, local693.anInt484); + anInt5014 = 0; + aClass100_545 = MiniMap.getTargetVerb(local693); + if (aClass100_545 == null) { + aClass100_545 = aClass100_1042; + } + if (local693.if3) { + aClass100_466 = JagString.concatenate(new JagString[]{local693.optionBase, COLOR_WHITE}); + } else { + aClass100_466 = JagString.concatenate(new JagString[]{COLOR_GREEN, local693.aClass100_85, COLOR_WHITE}); + } + } + return; + } + if (local23 == 29) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(180); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (local23 == 35) { + Protocol.outboundBuffer.p1isaac(161); + Protocol.outboundBuffer.ip4(local19); + Protocol.outboundBuffer.ip2add(local36); + Protocol.outboundBuffer.ip2add(local15); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 15) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(195); + Protocol.outboundBuffer.p2add(anInt506); + Protocol.outboundBuffer.ip4(anInt2512); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (local23 == 34) { + if (client.game == 1) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } else { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + } + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(109); + Protocol.outboundBuffer.ip2(local19 + Camera.originZ); + Protocol.outboundBuffer.p2(local15 + Camera.originX); + Protocol.outboundBuffer.ip2add(local36); + } + if (local23 == 25) { + Protocol.outboundBuffer.p1isaac(81); + Protocol.outboundBuffer.p2add(local15); + Protocol.outboundBuffer.p2(local36); + Protocol.outboundBuffer.imp4(local19); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 2) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.y = Mouse.clickY; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(218); + Protocol.outboundBuffer.ip2(local36); + } + } + @Pc(1955) int local1955; + if (local23 == 51) { + Protocol.outboundBuffer.p1isaac(10); + Protocol.outboundBuffer.p4(local19); + local693 = InterfaceList.getComponent(local19); + if (local693.anIntArrayArray4 != null && local693.anIntArrayArray4[0][0] == 5) { + local1955 = local693.anIntArrayArray4[0][1]; + if (VarpDomain.activeVarps[local1955] != local693.anIntArray48[0]) { + VarpDomain.activeVarps[local1955] = local693.anIntArray48[0]; + VarpDomain.refreshMagicVarp(local1955); + } + } + } + if (local23 == 26) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(115); + Protocol.outboundBuffer.mp4(MiniMap.anInt5062); + Protocol.outboundBuffer.ip2(anInt4370); + Protocol.outboundBuffer.ip2(local36); + Protocol.outboundBuffer.ip2add(anInt4997); + } + } + if (local23 == 59) { + Protocol.outboundBuffer.p1isaac(10); + Protocol.outboundBuffer.p4(local19); + local693 = InterfaceList.getComponent(local19); + if (local693.anIntArrayArray4 != null && local693.anIntArrayArray4[0][0] == 5) { + local1955 = local693.anIntArrayArray4[0][1]; + VarpDomain.activeVarps[local1955] = 1 - VarpDomain.activeVarps[local1955]; + VarpDomain.refreshMagicVarp(local1955); + } + } + if (local23 == 33) { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; + Protocol.outboundBuffer.p1isaac(101); + Protocol.outboundBuffer.ip2add(local15 + Camera.originX); + Protocol.outboundBuffer.ip2(anInt4370); + Protocol.outboundBuffer.ip2(anInt4997); + Protocol.outboundBuffer.ip2(local36); + Protocol.outboundBuffer.ip2add(Camera.originZ + local19); + Protocol.outboundBuffer.mp4(MiniMap.anInt5062); + } + if (local23 == 1004) { + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; + Protocol.outboundBuffer.p1isaac(94); + Protocol.outboundBuffer.ip2add(local36); + } + if (local23 == 11) { + if (local36 == 0) { + anInt3096 = 1; + method3556(Player.level, local15, local19); + } else if (local36 == 1) { + Protocol.outboundBuffer.p1isaac(131); + Protocol.outboundBuffer.mp4(anInt2512); + Protocol.outboundBuffer.p2add(Camera.originX + local15); + Protocol.outboundBuffer.ip2add(anInt506); + Protocol.outboundBuffer.p2add(local19 + Camera.originZ); + } + } + if (local23 == 8) { + local693 = InterfaceList.getComponent(local19); + @Pc(2287) boolean local2287 = true; + if (local693.clientCode > 0) { + local2287 = method4265(local693); + } + if (local2287) { + Protocol.outboundBuffer.p1isaac(10); + Protocol.outboundBuffer.p4(local19); + } + } + if (local23 == 1) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(248); + Protocol.outboundBuffer.ip2add(local36); + Protocol.outboundBuffer.p2(anInt4997); + Protocol.outboundBuffer.p2(anInt4370); + Protocol.outboundBuffer.mp4(MiniMap.anInt5062); + } + } + if (local23 == 7) { + Protocol.outboundBuffer.p1isaac(85); + Protocol.outboundBuffer.imp4(local19); + Protocol.outboundBuffer.p2(local15); + Protocol.outboundBuffer.p2add(local36); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 24) { + if (client.game == 1) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } else { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + } + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(48); + Protocol.outboundBuffer.p2add(local15 + Camera.originX); + Protocol.outboundBuffer.ip2add(local36); + Protocol.outboundBuffer.ip2(Camera.originZ + local19); + } + if (local23 == 38 && PathFinder.findPathToLoc(local31, local19, local15)) { + Protocol.outboundBuffer.p1isaac(233); + Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); + Protocol.outboundBuffer.p2add(Camera.originX + local15); + Protocol.outboundBuffer.ip2add(anInt506); + Protocol.outboundBuffer.imp4(anInt2512); + Protocol.outboundBuffer.p2add((int) (local31 >>> 32) & Integer.MAX_VALUE); + } + if (local23 == 13) { + Protocol.outboundBuffer.p1isaac(6); + Protocol.outboundBuffer.p4(local19); + Protocol.outboundBuffer.p2add(local15); + Protocol.outboundBuffer.ip2(local36); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 57) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(175); + Protocol.outboundBuffer.p2add(local36); + } + } + if (local23 == 22) { + method1294(); + local693 = InterfaceList.getComponent(local19); + MiniMap.anInt5062 = local19; + anInt4370 = local15; + anInt5014 = 1; + anInt4997 = local36; + InterfaceList.redraw(local693); + aClass100_203 = JagString.concatenate(new JagString[]{aClass100_32, ObjTypeList.get(local36).name, COLOR_WHITE}); + if (aClass100_203 == null) { + aClass100_203 = NULL; + } + return; + } + if (local23 == 50) { + PathFinder.findPathToLoc(local31, local19, local15); + Protocol.outboundBuffer.p1isaac(194); + Protocol.outboundBuffer.ip2add(local19 + Camera.originZ); + Protocol.outboundBuffer.ip2(Camera.originX + local15); + Protocol.outboundBuffer.p2((int) (local31 >>> 32) & Integer.MAX_VALUE); + } + if (local23 == 48) { + Protocol.outboundBuffer.p1isaac(154); + Protocol.outboundBuffer.ip2(local15); + Protocol.outboundBuffer.imp4(local19); + Protocol.outboundBuffer.ip2add(local36); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 30) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.type = 2; + Protocol.outboundBuffer.p1isaac(68); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (local23 == 43) { + Protocol.outboundBuffer.p1isaac(153); + Protocol.outboundBuffer.ip4(local19); + Protocol.outboundBuffer.ip2(local15); + Protocol.outboundBuffer.ip2(local36); + anInt2043 = 0; + pressedInventoryComponent = InterfaceList.getComponent(local19); + anInt5444 = local15; + } + if (local23 == 39) { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Protocol.outboundBuffer.p1isaac(73); + Protocol.outboundBuffer.imp4(anInt2512); + Protocol.outboundBuffer.p2(Camera.originZ + local19); + Protocol.outboundBuffer.ip2add(local36); + Protocol.outboundBuffer.ip2add(local15 + Camera.originX); + Protocol.outboundBuffer.ip2(anInt506); + } + if (local23 == 12) { + Protocol.outboundBuffer.p1isaac(82); + Protocol.outboundBuffer.p2(anInt506); + Protocol.outboundBuffer.imp4(local19); + Protocol.outboundBuffer.p4(anInt2512); + Protocol.outboundBuffer.ip2add(local15); + } + if (local23 == 36) { + if (local36 == 0) { + Protocol.anInt4422 = 1; + method3556(Player.level, local15, local19); + } else if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { + Cheat.teleport(local15 + Camera.originX, Camera.originZ - -local19, Player.level); + } else { + Protocol.outboundBuffer.p1isaac(179); + Protocol.outboundBuffer.p2(local19 + Camera.originZ); + Protocol.outboundBuffer.p2(local15 + Camera.originX); + } + } + if (local23 == 6) { + local43 = PlayerList.players[local36]; + if (local43 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + Protocol.outboundBuffer.p1isaac(106); + Protocol.outboundBuffer.p2(local36); + } + } + if (local23 == 20) { + if (client.game == 1) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } else { + local560 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, false, 0, local15, 0, 0, 2, local19, PlayerList.self.movementQueueX[0]); + if (!local560) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); + } + } + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 2; + Protocol.outboundBuffer.p1isaac(33); + Protocol.outboundBuffer.p2(local36); + Protocol.outboundBuffer.p2(Camera.originX + local15); + Protocol.outboundBuffer.ip2(Camera.originZ + local19); + } + if (local23 == 16) { + local192 = NpcList.npcs[local36]; + if (local192 != null) { + PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; + Protocol.outboundBuffer.p1isaac(3); + Protocol.outboundBuffer.ip2add(local36); + } + } + if (anInt5014 != 0) { + anInt5014 = 0; + InterfaceList.redraw(InterfaceList.getComponent(MiniMap.anInt5062)); + } + if (aBoolean302) { + method1294(); + } + if (pressedInventoryComponent != null && anInt2043 == 0) { + InterfaceList.redraw(pressedInventoryComponent); + } + } - @OriginalMember(owner = "client!jj", name = "a", descriptor = "(IBI)Lclient!na;") - public static JagString getCombatLevelColor(@OriginalArg(0) int otherLevel, @OriginalArg(2) int selfLevel) { - @Pc(4) int delta = selfLevel - otherLevel; - if (delta < -9) { - return aClass100_798; - } else if (delta < -6) { - return aClass100_433; - } else if (delta < -3) { - return aClass100_951; - } else if (delta < 0) { - return aClass100_972; - } else if (delta > 9) { - return COLOR_GREEN; - } else if (delta > 6) { - return aClass100_18; - } else if (delta <= 3) { - return delta > 0 ? aClass100_266 : aClass100_965; - } else { - return aClass100_1081; - } - } + @OriginalMember(owner = "client!jj", name = "a", descriptor = "(IBI)Lclient!na;") + public static JagString getCombatLevelColor(@OriginalArg(0) int otherLevel, @OriginalArg(2) int selfLevel) { + @Pc(4) int delta = selfLevel - otherLevel; + if (delta < -9) { + return aClass100_798; + } else if (delta < -6) { + return aClass100_433; + } else if (delta < -3) { + return aClass100_951; + } else if (delta < 0) { + return aClass100_972; + } else if (delta > 9) { + return COLOR_GREEN; + } else if (delta > 6) { + return aClass100_18; + } else if (delta <= 3) { + return delta > 0 ? aClass100_266 : aClass100_965; + } else { + return aClass100_1081; + } + } - @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IIIIIIB)V") - public static void addEntries(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { - @Pc(15) int local15; - @Pc(47) int x; - if (anInt5014 == 0) { - @Pc(13) int local13 = Rasteriser.screenUpperY; - local15 = Rasteriser.screenLowerY; - @Pc(17) int local17 = Rasteriser.screenUpperX; - @Pc(19) int local19 = Rasteriser.screenLowerX; - @Pc(33) int local33 = (arg5 - arg3) * (local17 - local19) / arg1 + local19; - x = local15 + (local13 - local15) * (arg4 - arg0) / arg2; - if (aBoolean302 && (anInt4999 & 0x40) != 0) { - @Pc(61) Component local61 = InterfaceList.method1418(anInt2512, anInt506); - if (local61 == null) { - method1294(); - } else { - add(anInt5393, 0L, aClass100_961, local33, (short) 11, aClass100_545, x); - } - } else { - if (client.game == 1) { - add(-1, 0L, JagString.EMPTY, local33, (short) 36, LocalizedText.FACEHERE, x); - } - add(-1, 0L, JagString.EMPTY, local33, (short) 60, walkText, x); - } - } - @Pc(112) long local112 = -1L; - for (local15 = 0; local15 < anInt7; local15++) { - @Pc(121) long local121 = Model.aLongArray11[local15]; - x = (int) local121 & 0x7F; - @Pc(133) int local133 = (int) local121 >> 29 & 0x3; - @Pc(140) int local140 = (int) (local121 >>> 32) & Integer.MAX_VALUE; - @Pc(147) int z = (int) local121 >> 7 & 0x7F; - if (local121 != local112) { - local112 = local121; - @Pc(240) int local240; - if (local133 == 2 && SceneGraph.isLocValid(Player.level, x, z, local121)) { - @Pc(172) LocType local172 = LocTypeList.get(local140); - if (local172.multiLocs != null) { - local172 = local172.getMultiLoc(); - } - if (local172 == null) { - continue; - } - if (anInt5014 == 1) { - add(MiniMap.anInt4075, local121, JagString.concatenate(new JagString[] {aClass100_203, aClass100_164, local172.name}), x, (short) 14, LocalizedText.USE, z); - } else if (aBoolean302) { - @Pc(363) ParamType local363 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); - if ((anInt4999 & 0x4) != 0 && (local363 == null || local172.getParam(local363.defaultInt, anInt3039) != local363.defaultInt)) { - add(anInt5393, local121, JagString.concatenate(new JagString[] { aClass100_466, aClass100_164, local172.name}), x, (short) 38, aClass100_545, z); - } - } else { - @Pc(228) JagString[] local228 = local172.ops; - if (aBoolean237) { - local228 = annotateOps(local228); - } - if (local228 != null) { - for (local240 = 4; local240 >= 0; local240--) { - if (local228[local240] != null) { - @Pc(254) short local254 = 0; - if (local240 == 0) { - local254 = 42; - } - if (local240 == 1) { - local254 = 50; - } - @Pc(268) int local268 = -1; - if (local240 == 2) { - local254 = 49; - } - if (local172.cursor1Op == local240) { - local268 = local172.cursor1; - } - if (local240 == 3) { - local254 = 46; - } - if (local240 == local172.cursor2Op) { - local268 = local172.cursor2; - } - if (local240 == 4) { - local254 = 1001; - } - add(local268, local121, JagString.concatenate(new JagString[] { aClass100_1008, local172.name}), x, local254, local228[local240], z); - } - } - } - add(MiniMap.anInt5073, (long) local172.id, JagString.concatenate(new JagString[] { aClass100_1008, local172.name}), x, (short) 1004, LocalizedText.EXAMINE, z); - } - } - @Pc(514) int local514; - @Pc(526) int local526; - @Pc(479) int local479; - @Pc(493) int local493; - @Pc(502) Npc local502; - @Pc(597) Player local597; - if (local133 == 1) { - @Pc(421) Npc local421 = NpcList.npcs[local140]; - if ((local421.type.size & 0x1) == 0 && (local421.xFine & 0x7F) == 0 && (local421.zFine & 0x7F) == 0 || (local421.type.size & 0x1) == 1 && (local421.xFine & 0x7F) == 64 && (local421.zFine & 0x7F) == 64) { - local479 = local421.xFine + 64 - local421.type.size * 64; - local240 = local421.zFine - (local421.type.size - 1) * 64; - for (local493 = 0; local493 < NpcList.size; local493++) { - local502 = NpcList.npcs[NpcList.ids[local493]]; - local514 = local502.xFine + 64 - local502.type.size * 64; - local526 = local502.zFine + 64 - local502.type.size * 64; - if (local502 != null && local421 != local502 && local514 >= local479 && local421.type.size - (local514 - local479 >> 7) >= local502.type.size && local240 <= local526 && local502.type.size <= local421.type.size - (local526 - local240 >> 7)) { - addNpcEntries(local502.type, x, NpcList.ids[local493], z); - } - } - for (local493 = 0; local493 < PlayerList.size; local493++) { - local597 = PlayerList.players[PlayerList.ids[local493]]; - local514 = local597.xFine + 64 - local597.getSize() * 64; - local526 = local597.zFine + 64 - local597.getSize() * 64; - if (local597 != null && local514 >= local479 && local597.getSize() <= local421.type.size - (local514 - local479 >> 7) && local526 >= local240 && local597.getSize() <= local421.type.size - (local526 - local240 >> 7)) { - addPlayerEntries(PlayerList.ids[local493], z, local597, x); - } - } - } - addNpcEntries(local421.type, x, local140, z); - } - if (local133 == 0) { - @Pc(688) Player player = PlayerList.players[local140]; - if ((player.xFine & 0x7F) == 64 && (player.zFine & 0x7F) == 64) { - local479 = player.xFine - (player.getSize() - 1) * 64; - local240 = player.zFine + 64 - player.getSize() * 64; - for (local493 = 0; local493 < NpcList.size; local493++) { - local502 = NpcList.npcs[NpcList.ids[local493]]; - local514 = local502.xFine + 64 - local502.type.size * 64; - local526 = local502.zFine + 64 - local502.type.size * 64; - if (local502 != null && local514 >= local479 && local502.type.size <= player.getSize() - (local514 - local479 >> 7) && local526 >= local240 && local502.type.size <= player.getSize() - (local526 - local240 >> 7)) { - addNpcEntries(local502.type, x, NpcList.ids[local493], z); - } - } - for (local493 = 0; local493 < PlayerList.size; local493++) { - local597 = PlayerList.players[PlayerList.ids[local493]]; - local514 = local597.xFine - (local597.getSize() - 1) * 64; - local526 = local597.zFine + 64 - local597.getSize() * 64; - if (local597 != null && local597 != player && local479 <= local514 && local597.getSize() <= player.getSize() - (local514 - local479 >> 7) && local526 >= local240 && local597.getSize() <= player.getSize() - (local526 - local240 >> 7)) { - addPlayerEntries(PlayerList.ids[local493], z, local597, x); - } - } - } - addPlayerEntries(local140, z, player, x); - } - if (local133 == 3) { - @Pc(931) LinkedList objStacks = SceneGraph.objStacks[Player.level][x][z]; - if (objStacks != null) { - for (@Pc(940) ObjStackNode node = (ObjStackNode) objStacks.tail(); node != null; node = (ObjStackNode) objStacks.prev()) { - local240 = node.value.type; - @Pc(951) ObjType local951 = ObjTypeList.get(local240); - if (anInt5014 == 1) { - add(MiniMap.anInt4075, (long) local240, JagString.concatenate(new JagString[] { aClass100_203, aClass100_947, local951.name }), x, (short) 33, LocalizedText.USE, z); - } else if (aBoolean302) { - @Pc(1142) ParamType local1142 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); - if ((anInt4999 & 0x1) != 0 && (local1142 == null || local951.getParam(local1142.defaultInt, anInt3039) != local1142.defaultInt)) { - add(anInt5393, (long) local240, JagString.concatenate(new JagString[] { aClass100_466, aClass100_947, local951.name }), x, (short) 39, aClass100_545, z); - } - } else { - @Pc(997) JagString[] local997 = local951.ops; - if (aBoolean237) { - local997 = annotateOps(local997); - } - for (local514 = 4; local514 >= 0; local514--) { - if (local997 != null && local997[local514] != null) { - @Pc(1025) byte local1025 = 0; - if (local514 == 0) { - local1025 = 21; - } - if (local514 == 1) { - local1025 = 34; - } - @Pc(1041) int local1041 = -1; - if (local514 == local951.cursor1Op) { - local1041 = local951.cursor1; - } - if (local514 == 2) { - local1025 = 18; - } - if (local951.cursor2Op == local514) { - local1041 = local951.cursor2; - } - if (local514 == 3) { - local1025 = 20; - } - if (local514 == 4) { - local1025 = 24; - } - add(local1041, (long) local240, JagString.concatenate(new JagString[] { aClass100_32, local951.name}), x, local1025, local997[local514], z); - } - } - add(MiniMap.anInt5073, (long) local240, JagString.concatenate(new JagString[] { aClass100_32, local951.name}), x, (short) 1002, LocalizedText.EXAMINE, z); - } - } - } - } - } - } - } + @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IIIIIIB)V") + public static void addEntries(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { + @Pc(15) int local15; + @Pc(47) int x; + if (anInt5014 == 0) { + @Pc(13) int local13 = Rasteriser.screenUpperY; + local15 = Rasteriser.screenLowerY; + @Pc(17) int local17 = Rasteriser.screenUpperX; + @Pc(19) int local19 = Rasteriser.screenLowerX; + @Pc(33) int local33 = (arg5 - arg3) * (local17 - local19) / arg1 + local19; + x = local15 + (local13 - local15) * (arg4 - arg0) / arg2; + if (aBoolean302 && (anInt4999 & 0x40) != 0) { + @Pc(61) Component local61 = InterfaceList.method1418(anInt2512, anInt506); + if (local61 == null) { + method1294(); + } else { + add(anInt5393, 0L, aClass100_961, local33, (short) 11, aClass100_545, x); + } + } else { + if (client.game == 1) { + add(-1, 0L, JagString.EMPTY, local33, (short) 36, LocalizedText.FACEHERE, x); + } + add(-1, 0L, JagString.EMPTY, local33, (short) 60, walkText, x); + } + } + @Pc(112) long local112 = -1L; + for (local15 = 0; local15 < anInt7; local15++) { + @Pc(121) long local121 = Model.aLongArray11[local15]; + x = (int) local121 & 0x7F; + @Pc(133) int local133 = (int) local121 >> 29 & 0x3; + @Pc(140) int local140 = (int) (local121 >>> 32) & Integer.MAX_VALUE; + @Pc(147) int z = (int) local121 >> 7 & 0x7F; + if (local121 != local112) { + local112 = local121; + @Pc(240) int local240; + if (local133 == 2 && SceneGraph.isLocValid(Player.level, x, z, local121)) { + @Pc(172) LocType local172 = LocTypeList.get(local140); + if (local172.multiLocs != null) { + local172 = local172.getMultiLoc(); + } + if (local172 == null) { + continue; + } + if (anInt5014 == 1) { + add(MiniMap.anInt4075, local121, JagString.concatenate(new JagString[]{aClass100_203, aClass100_164, local172.name}), x, (short) 14, LocalizedText.USE, z); + } else if (aBoolean302) { + @Pc(363) ParamType local363 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); + if ((anInt4999 & 0x4) != 0 && (local363 == null || local172.getParam(local363.defaultInt, anInt3039) != local363.defaultInt)) { + add(anInt5393, local121, JagString.concatenate(new JagString[]{aClass100_466, aClass100_164, local172.name}), x, (short) 38, aClass100_545, z); + } + } else { + @Pc(228) JagString[] local228 = local172.ops; + if (aBoolean237) { + local228 = annotateOps(local228); + } + if (local228 != null) { + for (local240 = 4; local240 >= 0; local240--) { + if (local228[local240] != null) { + @Pc(254) short local254 = 0; + if (local240 == 0) { + local254 = 42; + } + if (local240 == 1) { + local254 = 50; + } + @Pc(268) int local268 = -1; + if (local240 == 2) { + local254 = 49; + } + if (local172.cursor1Op == local240) { + local268 = local172.cursor1; + } + if (local240 == 3) { + local254 = 46; + } + if (local240 == local172.cursor2Op) { + local268 = local172.cursor2; + } + if (local240 == 4) { + local254 = 1001; + } + add(local268, local121, JagString.concatenate(new JagString[]{aClass100_1008, local172.name}), x, local254, local228[local240], z); + } + } + } + add(MiniMap.anInt5073, local172.id, JagString.concatenate(new JagString[]{aClass100_1008, local172.name}), x, (short) 1004, LocalizedText.EXAMINE, z); + } + } + @Pc(514) int local514; + @Pc(526) int local526; + @Pc(479) int local479; + @Pc(493) int local493; + @Pc(502) Npc local502; + @Pc(597) Player local597; + if (local133 == 1) { + @Pc(421) Npc local421 = NpcList.npcs[local140]; + if ((local421.type.size & 0x1) == 0 && (local421.xFine & 0x7F) == 0 && (local421.zFine & 0x7F) == 0 || (local421.type.size & 0x1) == 1 && (local421.xFine & 0x7F) == 64 && (local421.zFine & 0x7F) == 64) { + local479 = local421.xFine + 64 - local421.type.size * 64; + local240 = local421.zFine - (local421.type.size - 1) * 64; + for (local493 = 0; local493 < NpcList.size; local493++) { + local502 = NpcList.npcs[NpcList.ids[local493]]; + local514 = local502.xFine + 64 - local502.type.size * 64; + local526 = local502.zFine + 64 - local502.type.size * 64; + if (local502 != null && local421 != local502 && local514 >= local479 && local421.type.size - (local514 - local479 >> 7) >= local502.type.size && local240 <= local526 && local502.type.size <= local421.type.size - (local526 - local240 >> 7)) { + addNpcEntries(local502.type, x, NpcList.ids[local493], z); + } + } + for (local493 = 0; local493 < PlayerList.size; local493++) { + local597 = PlayerList.players[PlayerList.ids[local493]]; + local514 = local597.xFine + 64 - local597.getSize() * 64; + local526 = local597.zFine + 64 - local597.getSize() * 64; + if (local597 != null && local514 >= local479 && local597.getSize() <= local421.type.size - (local514 - local479 >> 7) && local526 >= local240 && local597.getSize() <= local421.type.size - (local526 - local240 >> 7)) { + addPlayerEntries(PlayerList.ids[local493], z, local597, x); + } + } + } + addNpcEntries(local421.type, x, local140, z); + } + if (local133 == 0) { + @Pc(688) Player player = PlayerList.players[local140]; + if ((player.xFine & 0x7F) == 64 && (player.zFine & 0x7F) == 64) { + local479 = player.xFine - (player.getSize() - 1) * 64; + local240 = player.zFine + 64 - player.getSize() * 64; + for (local493 = 0; local493 < NpcList.size; local493++) { + local502 = NpcList.npcs[NpcList.ids[local493]]; + local514 = local502.xFine + 64 - local502.type.size * 64; + local526 = local502.zFine + 64 - local502.type.size * 64; + if (local502 != null && local514 >= local479 && local502.type.size <= player.getSize() - (local514 - local479 >> 7) && local526 >= local240 && local502.type.size <= player.getSize() - (local526 - local240 >> 7)) { + addNpcEntries(local502.type, x, NpcList.ids[local493], z); + } + } + for (local493 = 0; local493 < PlayerList.size; local493++) { + local597 = PlayerList.players[PlayerList.ids[local493]]; + local514 = local597.xFine - (local597.getSize() - 1) * 64; + local526 = local597.zFine + 64 - local597.getSize() * 64; + if (local597 != null && local597 != player && local479 <= local514 && local597.getSize() <= player.getSize() - (local514 - local479 >> 7) && local526 >= local240 && local597.getSize() <= player.getSize() - (local526 - local240 >> 7)) { + addPlayerEntries(PlayerList.ids[local493], z, local597, x); + } + } + } + addPlayerEntries(local140, z, player, x); + } + if (local133 == 3) { + @Pc(931) LinkedList objStacks = SceneGraph.objStacks[Player.level][x][z]; + if (objStacks != null) { + for (@Pc(940) ObjStackNode node = (ObjStackNode) objStacks.tail(); node != null; node = (ObjStackNode) objStacks.prev()) { + local240 = node.value.type; + @Pc(951) ObjType local951 = ObjTypeList.get(local240); + if (anInt5014 == 1) { + add(MiniMap.anInt4075, local240, JagString.concatenate(new JagString[]{aClass100_203, aClass100_947, local951.name}), x, (short) 33, LocalizedText.USE, z); + } else if (aBoolean302) { + @Pc(1142) ParamType local1142 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); + if ((anInt4999 & 0x1) != 0 && (local1142 == null || local951.getParam(local1142.defaultInt, anInt3039) != local1142.defaultInt)) { + add(anInt5393, local240, JagString.concatenate(new JagString[]{aClass100_466, aClass100_947, local951.name}), x, (short) 39, aClass100_545, z); + } + } else { + @Pc(997) JagString[] local997 = local951.ops; + if (aBoolean237) { + local997 = annotateOps(local997); + } + for (local514 = 4; local514 >= 0; local514--) { + if (local997 != null && local997[local514] != null) { + @Pc(1025) byte local1025 = 0; + if (local514 == 0) { + local1025 = 21; + } + if (local514 == 1) { + local1025 = 34; + } + @Pc(1041) int local1041 = -1; + if (local514 == local951.cursor1Op) { + local1041 = local951.cursor1; + } + if (local514 == 2) { + local1025 = 18; + } + if (local951.cursor2Op == local514) { + local1041 = local951.cursor2; + } + if (local514 == 3) { + local1025 = 20; + } + if (local514 == 4) { + local1025 = 24; + } + add(local1041, local240, JagString.concatenate(new JagString[]{aClass100_32, local951.name}), x, local1025, local997[local514], z); + } + } + add(MiniMap.anInt5073, local240, JagString.concatenate(new JagString[]{aClass100_32, local951.name}), x, (short) 1002, LocalizedText.EXAMINE, z); + } + } + } + } + } + } + } - @OriginalMember(owner = "client!bc", name = "f", descriptor = "(B)Lclient!na;") - public static JagString method471() { - @Pc(32) JagString local32; - if (anInt5014 == 1 && size < 2) { - local32 = JagString.concatenate(new JagString[] { LocalizedText.USE, LocalizedText.MINISEPARATOR, aClass100_203, aClass100_961}); - } else if (aBoolean302 && size < 2) { - local32 = JagString.concatenate(new JagString[] { aClass100_545, LocalizedText.MINISEPARATOR, aClass100_466, aClass100_961}); - } else if (Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && size > 2) { - local32 = getOp(size - 2); - } else { - local32 = getOp(size - 1); - } - if (size > 2) { - local32 = JagString.concatenate(new JagString[] { local32, aClass100_2, JagString.parseInt(size - 2), LocalizedText.MOREOPTIONS}); - } - return local32; - } + @OriginalMember(owner = "client!bc", name = "f", descriptor = "(B)Lclient!na;") + public static JagString method471() { + @Pc(32) JagString local32; + if (anInt5014 == 1 && size < 2) { + local32 = JagString.concatenate(new JagString[]{LocalizedText.USE, LocalizedText.MINISEPARATOR, aClass100_203, aClass100_961}); + } else if (aBoolean302 && size < 2) { + local32 = JagString.concatenate(new JagString[]{aClass100_545, LocalizedText.MINISEPARATOR, aClass100_466, aClass100_961}); + } else if (Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && size > 2) { + local32 = getOp(size - 2); + } else { + local32 = getOp(size - 1); + } + if (size > 2) { + local32 = JagString.concatenate(new JagString[]{local32, aClass100_2, JagString.parseInt(size - 2), LocalizedText.MOREOPTIONS}); + } + return local32; + } - @OriginalMember(owner = "client!wk", name = "a", descriptor = "(I[Lclient!na;)[Lclient!na;") - public static JagString[] annotateOps(@OriginalArg(1) JagString[] ops) { - @Pc(8) JagString[] annotatedOps = new JagString[5]; - for (@Pc(15) int i = 0; i < 5; i++) { - annotatedOps[i] = JagString.concatenate(new JagString[] { JagString.parseInt(i), aClass100_168 }); - if (ops != null && ops[i] != null) { - annotatedOps[i] = JagString.concatenate(new JagString[] { annotatedOps[i], ops[i] }); - } - } - return annotatedOps; - } + @OriginalMember(owner = "client!wk", name = "a", descriptor = "(I[Lclient!na;)[Lclient!na;") + public static JagString[] annotateOps(@OriginalArg(1) JagString[] ops) { + @Pc(8) JagString[] annotatedOps = new JagString[5]; + for (@Pc(15) int i = 0; i < 5; i++) { + annotatedOps[i] = JagString.concatenate(new JagString[]{JagString.parseInt(i), aClass100_168}); + if (ops != null && ops[i] != null) { + annotatedOps[i] = JagString.concatenate(new JagString[]{annotatedOps[i], ops[i]}); + } + } + return annotatedOps; + } - @OriginalMember(owner = "client!u", name = "a", descriptor = "(Lclient!me;IIII)V") - public static void addNpcEntries(@OriginalArg(0) NpcType arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (size >= 400) { - return; - } - if (arg0.multiNpcs != null) { - arg0 = arg0.getMultiNpc(); - } - if (arg0 == null || !arg0.aBoolean183) { - return; - } - @Pc(35) JagString local35 = arg0.name; - if (arg0.combatLevel != 0) { - @Pc(47) JagString local47 = client.game == 1 ? LocalizedText.RATING : LocalizedText.LEVEL; - local35 = JagString.concatenate(new JagString[] { local35, getCombatLevelColor(arg0.combatLevel, PlayerList.self.combatLevel), OPEN_PARENTHESIS, local47, JagString.parseInt(arg0.combatLevel), CLOSE_PARENTHESIS}); - } - if (anInt5014 == 1) { - add(MiniMap.anInt4075, (long) arg2, JagString.concatenate(new JagString[] {aClass100_203, aClass100_407, local35 }), arg1, (short) 26, LocalizedText.USE, arg3); - } else if (aBoolean302) { - @Pc(378) ParamType local378 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); - if ((anInt4999 & 0x2) != 0 && (local378 == null || arg0.getParam(anInt3039, local378.defaultInt) != local378.defaultInt)) { - add(anInt5393, (long) arg2, JagString.concatenate(new JagString[] {aClass100_466, aClass100_407, local35 }), arg1, (short) 45, aClass100_545, arg3); - } - } else { - @Pc(129) JagString[] local129 = arg0.ops; - if (aBoolean237) { - local129 = annotateOps(local129); - } - @Pc(140) int local140; - if (local129 != null) { - for (local140 = 4; local140 >= 0; local140--) { - if (local129[local140] != null && (client.game != 0 || !local129[local140].equalsIgnoreCase(LocalizedText.ATTACK))) { - @Pc(161) byte local161 = 0; - if (local140 == 0) { - local161 = 17; - } - if (local140 == 1) { - local161 = 16; - } - @Pc(176) int local176 = -1; - if (local140 == 2) { - local161 = 4; - } - if (local140 == 3) { - local161 = 19; - } - if (arg0.cursor1Op == local140) { - local176 = arg0.cursor1; - } - if (local140 == arg0.cursor2Op) { - local176 = arg0.cursor2; - } - if (local140 == 4) { - local161 = 2; - } - add(local176, (long) arg2, JagString.concatenate(new JagString[] {aClass100_965, local35 }), arg1, local161, local129[local140], arg3); - } - } - } - if (client.game == 0 && local129 != null) { - for (local140 = 4; local140 >= 0; local140--) { - if (local129[local140] != null && local129[local140].equalsIgnoreCase(LocalizedText.ATTACK)) { - @Pc(271) short local271 = 0; - if (arg0.combatLevel > PlayerList.self.combatLevel) { - local271 = 2000; - } - @Pc(281) short local281 = 0; - if (local140 == 0) { - local281 = 17; - } - if (local140 == 1) { - local281 = 16; - } - if (local140 == 2) { - local281 = 4; - } - if (local140 == 3) { - local281 = 19; - } - if (local140 == 4) { - local281 = 2; - } - if (local281 != 0) { - local281 += local271; - } - add(arg0.anInt3752, (long) arg2, JagString.concatenate(new JagString[] {aClass100_965, local35 }), arg1, local281, local129[local140], arg3); - } - } - } - add(MiniMap.anInt5073, (long) arg2, JagString.concatenate(new JagString[] {aClass100_965, local35 }), arg1, (short) 1007, LocalizedText.EXAMINE, arg3); - } - } + @OriginalMember(owner = "client!u", name = "a", descriptor = "(Lclient!me;IIII)V") + public static void addNpcEntries(@OriginalArg(0) NpcType arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + if (size >= 400) { + return; + } + if (arg0.multiNpcs != null) { + arg0 = arg0.getMultiNpc(); + } + if (arg0 == null || !arg0.aBoolean183) { + return; + } + @Pc(35) JagString local35 = arg0.name; + if (arg0.combatLevel != 0) { + @Pc(47) JagString local47 = client.game == 1 ? LocalizedText.RATING : LocalizedText.LEVEL; + local35 = JagString.concatenate(new JagString[]{local35, getCombatLevelColor(arg0.combatLevel, PlayerList.self.combatLevel), OPEN_PARENTHESIS, local47, JagString.parseInt(arg0.combatLevel), CLOSE_PARENTHESIS}); + } + if (anInt5014 == 1) { + add(MiniMap.anInt4075, arg2, JagString.concatenate(new JagString[]{aClass100_203, aClass100_407, local35}), arg1, (short) 26, LocalizedText.USE, arg3); + } else if (aBoolean302) { + @Pc(378) ParamType local378 = anInt3039 == -1 ? null : ParamTypeList.get(anInt3039); + if ((anInt4999 & 0x2) != 0 && (local378 == null || arg0.getParam(anInt3039, local378.defaultInt) != local378.defaultInt)) { + add(anInt5393, arg2, JagString.concatenate(new JagString[]{aClass100_466, aClass100_407, local35}), arg1, (short) 45, aClass100_545, arg3); + } + } else { + @Pc(129) JagString[] local129 = arg0.ops; + if (aBoolean237) { + local129 = annotateOps(local129); + } + @Pc(140) int local140; + if (local129 != null) { + for (local140 = 4; local140 >= 0; local140--) { + if (local129[local140] != null && (client.game != 0 || !local129[local140].equalsIgnoreCase(LocalizedText.ATTACK))) { + @Pc(161) byte local161 = 0; + if (local140 == 0) { + local161 = 17; + } + if (local140 == 1) { + local161 = 16; + } + @Pc(176) int local176 = -1; + if (local140 == 2) { + local161 = 4; + } + if (local140 == 3) { + local161 = 19; + } + if (arg0.cursor1Op == local140) { + local176 = arg0.cursor1; + } + if (local140 == arg0.cursor2Op) { + local176 = arg0.cursor2; + } + if (local140 == 4) { + local161 = 2; + } + add(local176, arg2, JagString.concatenate(new JagString[]{aClass100_965, local35}), arg1, local161, local129[local140], arg3); + } + } + } + if (client.game == 0 && local129 != null) { + for (local140 = 4; local140 >= 0; local140--) { + if (local129[local140] != null && local129[local140].equalsIgnoreCase(LocalizedText.ATTACK)) { + @Pc(271) short local271 = 0; + if (arg0.combatLevel > PlayerList.self.combatLevel) { + local271 = 2000; + } + @Pc(281) short local281 = 0; + if (local140 == 0) { + local281 = 17; + } + if (local140 == 1) { + local281 = 16; + } + if (local140 == 2) { + local281 = 4; + } + if (local140 == 3) { + local281 = 19; + } + if (local140 == 4) { + local281 = 2; + } + if (local281 != 0) { + local281 += local271; + } + add(arg0.anInt3752, arg2, JagString.concatenate(new JagString[]{aClass100_965, local35}), arg1, local281, local129[local140], arg3); + } + } + } + add(MiniMap.anInt5073, arg2, JagString.concatenate(new JagString[]{aClass100_965, local35}), arg1, (short) 1007, LocalizedText.EXAMINE, arg3); + } + } - @OriginalMember(owner = "client!rj", name = "a", descriptor = "(IIILclient!e;I)V") - public static void addPlayerEntries(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Player other, @OriginalArg(4) int arg3) { - if (PlayerList.self == other || size >= 400) { - return; - } - @Pc(158) JagString string; - if (other.skill == 0) { - @Pc(22) boolean markCombatDifference = true; - if (PlayerList.self.combatRange != -1 && other.combatRange != -1) { - @Pc(43) int highestCombatLevel = Math.max(other.combatLevel, PlayerList.self.combatLevel); - @Pc(58) int highestCombatRange = Math.min(other.combatRange, PlayerList.self.combatRange); - @Pc(69) int calc = (highestCombatLevel * 10) / 100 + highestCombatRange + 5; - @Pc(76) int combatDelta = PlayerList.self.combatLevel - other.combatLevel; - if (combatDelta < 0) { - combatDelta = -combatDelta; - } - if (combatDelta < calc) { - markCombatDifference = false; - } - } - @Pc(95) JagString local95 = client.game == 1 ? LocalizedText.RATING : LocalizedText.LEVEL; - if (other.combatLevelWithSummoning > other.combatLevel) { - string = JagString.concatenate(new JagString[] { other.getName(), markCombatDifference ? getCombatLevelColor(other.combatLevel, PlayerList.self.combatLevel) : COLOR_WHITE, OPEN_PARENTHESIS, local95, JagString.parseInt(other.combatLevel), PLUS, JagString.parseInt(other.combatLevelWithSummoning - other.combatLevel), CLOSE_PARENTHESIS}); - } else { - string = JagString.concatenate(new JagString[] { other.getName(), markCombatDifference ? getCombatLevelColor(other.combatLevel, PlayerList.self.combatLevel) : COLOR_WHITE, OPEN_PARENTHESIS, local95, JagString.parseInt(other.combatLevel), CLOSE_PARENTHESIS}); - } - } else { - string = JagString.concatenate(new JagString[] { other.getName(), OPEN_PARENTHESIS, LocalizedText.SKILL, JagString.parseInt(other.skill), CLOSE_PARENTHESIS}); - } - @Pc(275) int local275; - if (anInt5014 == 1) { - add(MiniMap.anInt4075, (long) arg0, JagString.concatenate(new JagString[] {aClass100_203, aClass100_561, string }), arg3, (short) 1, LocalizedText.USE, arg1); - } else if (!aBoolean302) { - for (local275 = 7; local275 >= 0; local275--) { - if (Player.options[local275] != null) { - @Pc(291) short local291 = 0; - if (client.game == 0 && Player.options[local275].equalsIgnoreCase(LocalizedText.ATTACK)) { - if (other.combatLevel > PlayerList.self.combatLevel) { - local291 = 2000; - } - if (PlayerList.self.anInt1650 != 0 && other.anInt1650 != 0) { - if (PlayerList.self.anInt1650 == other.anInt1650) { - local291 = 2000; - } else { - local291 = 0; - } - } - } else if (Player.secondaryOptions[local275]) { - local291 = 2000; - } - @Pc(353) short local353 = Static5.aShortArray2[local275]; - @Pc(358) short local358 = (short) (local353 + local291); - add(Player.cursors[local275], (long) arg0, JagString.concatenate(new JagString[] {COLOR_WHITE, string }), arg3, local358, Player.options[local275], arg1); - } - } - } else if ((anInt4999 & 0x8) != 0) { - add(anInt5393, (long) arg0, JagString.concatenate(new JagString[] {aClass100_466, aClass100_561, string }), arg3, (short) 15, aClass100_545, arg1); - } - for (local275 = 0; local275 < size; local275++) { - if (actions[local275] == 60) { - opBases[local275] = JagString.concatenate(new JagString[] {COLOR_WHITE, string }); - break; - } - } - } + @OriginalMember(owner = "client!rj", name = "a", descriptor = "(IIILclient!e;I)V") + public static void addPlayerEntries(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Player other, @OriginalArg(4) int arg3) { + if (PlayerList.self == other || size >= 400) { + return; + } + @Pc(158) JagString string; + if (other.skill == 0) { + @Pc(22) boolean markCombatDifference = true; + if (PlayerList.self.combatRange != -1 && other.combatRange != -1) { + @Pc(43) int highestCombatLevel = Math.max(other.combatLevel, PlayerList.self.combatLevel); + @Pc(58) int highestCombatRange = Math.min(other.combatRange, PlayerList.self.combatRange); + @Pc(69) int calc = (highestCombatLevel * 10) / 100 + highestCombatRange + 5; + @Pc(76) int combatDelta = PlayerList.self.combatLevel - other.combatLevel; + if (combatDelta < 0) { + combatDelta = -combatDelta; + } + if (combatDelta < calc) { + markCombatDifference = false; + } + } + @Pc(95) JagString local95 = client.game == 1 ? LocalizedText.RATING : LocalizedText.LEVEL; + if (other.combatLevelWithSummoning > other.combatLevel) { + string = JagString.concatenate(new JagString[]{other.getName(), markCombatDifference ? getCombatLevelColor(other.combatLevel, PlayerList.self.combatLevel) : COLOR_WHITE, OPEN_PARENTHESIS, local95, JagString.parseInt(other.combatLevel), PLUS, JagString.parseInt(other.combatLevelWithSummoning - other.combatLevel), CLOSE_PARENTHESIS}); + } else { + string = JagString.concatenate(new JagString[]{other.getName(), markCombatDifference ? getCombatLevelColor(other.combatLevel, PlayerList.self.combatLevel) : COLOR_WHITE, OPEN_PARENTHESIS, local95, JagString.parseInt(other.combatLevel), CLOSE_PARENTHESIS}); + } + } else { + string = JagString.concatenate(new JagString[]{other.getName(), OPEN_PARENTHESIS, LocalizedText.SKILL, JagString.parseInt(other.skill), CLOSE_PARENTHESIS}); + } + @Pc(275) int local275; + if (anInt5014 == 1) { + add(MiniMap.anInt4075, arg0, JagString.concatenate(new JagString[]{aClass100_203, aClass100_561, string}), arg3, (short) 1, LocalizedText.USE, arg1); + } else if (!aBoolean302) { + for (local275 = 7; local275 >= 0; local275--) { + if (Player.options[local275] != null) { + @Pc(291) short local291 = 0; + if (client.game == 0 && Player.options[local275].equalsIgnoreCase(LocalizedText.ATTACK)) { + if (other.combatLevel > PlayerList.self.combatLevel) { + local291 = 2000; + } + if (PlayerList.self.anInt1650 != 0 && other.anInt1650 != 0) { + if (PlayerList.self.anInt1650 == other.anInt1650) { + local291 = 2000; + } else { + local291 = 0; + } + } + } else if (Player.secondaryOptions[local275]) { + local291 = 2000; + } + @Pc(353) short local353 = Static5.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); + } + } + } else if ((anInt4999 & 0x8) != 0) { + add(anInt5393, arg0, JagString.concatenate(new JagString[]{aClass100_466, aClass100_561, string}), arg3, (short) 15, aClass100_545, arg1); + } + for (local275 = 0; local275 < size; local275++) { + if (actions[local275] == 60) { + opBases[local275] = JagString.concatenate(new JagString[]{COLOR_WHITE, string}); + break; + } + } + } - @OriginalMember(owner = "client!aj", name = "a", descriptor = "(BILclient!be;)I") - public static int getOpCursor(@OriginalArg(1) int arg0, @OriginalArg(2) Component arg1) { - if (!InterfaceList.getServerActiveProperties(arg1).method503(arg0) && arg1.onOptionClick == null) { - return -1; - } else if (arg1.anIntArray39 == null || arg0 >= arg1.anIntArray39.length) { - return -1; - } else { - return arg1.anIntArray39[arg0]; - } - } + @OriginalMember(owner = "client!aj", name = "a", descriptor = "(BILclient!be;)I") + public static int getOpCursor(@OriginalArg(1) int arg0, @OriginalArg(2) Component arg1) { + if (!InterfaceList.getServerActiveProperties(arg1).method503(arg0) && arg1.onOptionClick == null) { + return -1; + } else if (arg1.anIntArray39 == null || arg0 >= arg1.anIntArray39.length) { + return -1; + } else { + return arg1.anIntArray39[arg0]; + } + } - @OriginalMember(owner = "client!il", name = "a", descriptor = "(III)V") + @OriginalMember(owner = "client!il", name = "a", descriptor = "(III)V") public static void method3556(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { aBoolean187 = true; anInt3902 = arg0; @@ -1487,29 +1487,29 @@ public class MiniMenu { anInt2954 = -1; } - @OriginalMember(owner = "client!wi", name = "c", descriptor = "(II)Z") - public static boolean method4640(@OriginalArg(0) int arg0) { - if (arg0 < 0) { - return false; - } - @Pc(12) int local12 = actions[arg0]; - if (local12 >= 2000) { - local12 -= 2000; - } - return local12 == 1003; - } + @OriginalMember(owner = "client!wi", name = "c", descriptor = "(II)Z") + public static boolean method4640(@OriginalArg(0) int arg0) { + if (arg0 < 0) { + return false; + } + @Pc(12) int local12 = actions[arg0]; + if (local12 >= 2000) { + local12 -= 2000; + } + return local12 == 1003; + } - @OriginalMember(owner = "client!ud", name = "a", descriptor = "(ILclient!be;)Z") - public static boolean method4265(@OriginalArg(1) Component arg0) { - if (arg0.clientCode == 205) { - Protocol.anInt5775 = 250; - return true; - } else { - return false; - } - } + @OriginalMember(owner = "client!ud", name = "a", descriptor = "(ILclient!be;)Z") + public static boolean method4265(@OriginalArg(1) Component arg0) { + if (arg0.clientCode == 205) { + Protocol.anInt5775 = 250; + return true; + } else { + return false; + } + } - @OriginalMember(owner = "client!ec", name = "a", descriptor = "(B)V") + @OriginalMember(owner = "client!ec", name = "a", descriptor = "(B)V") public static void method1294() { if (!aBoolean302) { return; @@ -1526,22 +1526,22 @@ public class MiniMenu { InterfaceList.redraw(local19); } - @OriginalMember(owner = "client!ub", name = "b", descriptor = "(IIIIIII)V") - public static void method4246(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5) { - @Pc(8) Component local8 = InterfaceList.method1418(arg0, arg1); - if (local8 != null && local8.onUse != null) { - @Pc(19) HookRequest local19 = new HookRequest(); - local19.source = local8; - local19.arguments = local8.onUse; - ScriptRunner.run(local19); - } - anInt506 = arg1; - anInt3039 = arg3; - anInt2512 = arg0; - anInt4999 = arg2; - aBoolean302 = true; - anInt5393 = arg4; - anInt1092 = arg5; - InterfaceList.redraw(local8); - } + @OriginalMember(owner = "client!ub", name = "b", descriptor = "(IIIIIII)V") + public static void method4246(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5) { + @Pc(8) Component local8 = InterfaceList.method1418(arg0, arg1); + if (local8 != null && local8.onUse != null) { + @Pc(19) HookRequest local19 = new HookRequest(); + local19.source = local8; + local19.arguments = local8.onUse; + ScriptRunner.run(local19); + } + anInt506 = arg1; + anInt3039 = arg3; + anInt2512 = arg0; + anInt4999 = arg2; + aBoolean302 = true; + anInt5393 = arg4; + anInt1092 = arg5; + InterfaceList.redraw(local8); + } } diff --git a/client/src/main/java/rt4/Model.java b/client/src/main/java/rt4/Model.java index 91dfa1a..6bd1efe 100644 --- a/client/src/main/java/rt4/Model.java +++ b/client/src/main/java/rt4/Model.java @@ -8,26 +8,26 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ak") public abstract class Model extends Entity { - @OriginalMember(owner = "client!vc", name = "V", descriptor = "[J") - public static final long[] aLongArray11 = new long[1000]; - @OriginalMember(owner = "client!ak", name = "s", descriptor = "Z") + @OriginalMember(owner = "client!vc", name = "V", descriptor = "[J") + public static final long[] aLongArray11 = new long[1000]; + @OriginalMember(owner = "client!ak", name = "s", descriptor = "Z") public boolean aBoolean303 = false; - @OriginalMember(owner = "client!ak", name = "a", descriptor = "([[III)I") - public static int method4556(@OriginalArg(0) int[][] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(3) int local3 = arg1 >> 7; - @Pc(7) int local7 = arg2 >> 7; - if (local3 < 0 || local7 < 0 || local3 >= arg0.length || local7 >= arg0[0].length) { - return 0; - } - @Pc(27) int local27 = arg1 & 0x7F; - @Pc(31) int local31 = arg2 & 0x7F; - @Pc(53) int local53 = arg0[local3][local7] * (128 - local27) + arg0[local3 + 1][local7] * local27 >> 7; - @Pc(79) int local79 = arg0[local3][local7 + 1] * (128 - local27) + arg0[local3 + 1][local7 + 1] * local27 >> 7; - return local53 * (128 - local31) + local79 * local31 >> 7; - } + @OriginalMember(owner = "client!ak", name = "a", descriptor = "([[III)I") + public static int method4556(@OriginalArg(0) int[][] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(3) int local3 = arg1 >> 7; + @Pc(7) int local7 = arg2 >> 7; + if (local3 < 0 || local7 < 0 || local3 >= arg0.length || local7 >= arg0[0].length) { + return 0; + } + @Pc(27) int local27 = arg1 & 0x7F; + @Pc(31) int local31 = arg2 & 0x7F; + @Pc(53) int local53 = arg0[local3][local7] * (128 - local27) + arg0[local3 + 1][local7] * local27 >> 7; + @Pc(79) int local79 = arg0[local3][local7 + 1] * (128 - local27) + arg0[local3 + 1][local7 + 1] * local27 >> 7; + return local53 * (128 - local31) + local79 * local31 >> 7; + } - @OriginalMember(owner = "client!ak", name = "c", descriptor = "()I") + @OriginalMember(owner = "client!ak", name = "c", descriptor = "()I") public abstract int getMaxZ(); @OriginalMember(owner = "client!ak", name = "b", descriptor = "()I") @@ -69,14 +69,8 @@ public abstract class Model extends Entity { local5 = 0; @Pc(136) int local136 = 0; for (@Pc(138) int local138 = 0; local138 < arg0.transforms; local138++) { - @Pc(144) boolean local144 = false; - if (local5 < arg1.length && arg1.indices[local5] == local138) { - local144 = true; - } - @Pc(158) boolean local158 = false; - if (local136 < arg2.length && arg2.indices[local136] == local138) { - local158 = true; - } + @Pc(144) boolean local144 = local5 < arg1.length && arg1.indices[local5] == local138; + @Pc(158) boolean local158 = local136 < arg2.length && arg2.indices[local136] == local138; if (local144 || local158) { if (arg5 == null || arg5[local138] == arg6 || arg0.types[local138] == 0) { @Pc(196) short local196 = 0; @@ -340,13 +334,13 @@ public abstract class Model extends Entity { @Pc(98) int local98 = local42 < local77 ? local42 : local77; @Pc(105) int local105 = local24 < local60 ? local24 : local60; if (arg5 != 0) { - @Pc(120) int local120 = (int) (Math.atan2((double) (local84 - local91), (double) arg5) * 325.95D) & 0x7FF; + @Pc(120) int local120 = (int) (Math.atan2(local84 - local91, arg5) * 325.95D) & 0x7FF; if (local120 != 0) { this.rotateX(local120); } } if (arg4 != 0) { - @Pc(140) int local140 = (int) (Math.atan2((double) (local105 - local98), (double) arg4) * 325.95D) & 0x7FF; + @Pc(140) int local140 = (int) (Math.atan2(local105 - local98, arg4) * 325.95D) & 0x7FF; if (local140 != 0) { this.rotateZ(local140); } diff --git a/client/src/main/java/rt4/MonochromeImageCache.java b/client/src/main/java/rt4/MonochromeImageCache.java index 2e08acf..6f3fca3 100644 --- a/client/src/main/java/rt4/MonochromeImageCache.java +++ b/client/src/main/java/rt4/MonochromeImageCache.java @@ -11,13 +11,13 @@ public final class MonochromeImageCache { @OriginalMember(owner = "client!nd", name = "c", descriptor = "[B") public static final byte[] aByteArray53 = new byte[32896]; - @OriginalMember(owner = "client!a", name = "b", descriptor = "[I") - public static final int[] anIntArray1 = new int[4096]; + @OriginalMember(owner = "client!a", name = "b", descriptor = "[I") + public static final int[] anIntArray1 = new int[4096]; - @OriginalMember(owner = "client!bc", name = "N", descriptor = "Lclient!lb;") - public static final MonochromeImageCacheEntry entry = new MonochromeImageCacheEntry(0, 0); + @OriginalMember(owner = "client!bc", name = "N", descriptor = "Lclient!lb;") + public static final MonochromeImageCacheEntry entry = new MonochromeImageCacheEntry(0, 0); - @OriginalMember(owner = "client!nd", name = "f", descriptor = "I") + @OriginalMember(owner = "client!nd", name = "f", descriptor = "I") private int singleRow = -1; @OriginalMember(owner = "client!nd", name = "k", descriptor = "I") @@ -45,7 +45,7 @@ public final class MonochromeImageCache { @Pc(8) int local8 = 0; for (@Pc(10) int local10 = 0; local10 < 256; local10++) { for (@Pc(15) int local15 = 0; local15 <= local10; local15++) { - aByteArray53[local8++] = (byte) (255.0D / Math.sqrt((double) ((float) (local15 * local15 + local10 * local10 + 65535) / 65535.0F))); + aByteArray53[local8++] = (byte) (255.0D / Math.sqrt((float) (local15 * local15 + local10 * local10 + 65535) / 65535.0F)); } } diff --git a/client/src/main/java/rt4/Mouse.java b/client/src/main/java/rt4/Mouse.java index f8be6dc..733fbc9 100644 --- a/client/src/main/java/rt4/Mouse.java +++ b/client/src/main/java/rt4/Mouse.java @@ -1,41 +1,37 @@ package rt4; -import java.awt.Component; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.awt.event.MouseMotionListener; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; import javax.swing.*; +import java.awt.Component; +import java.awt.event.*; @OriginalClass("client!ug") public final class Mouse implements MouseListener, MouseMotionListener, FocusListener { - @OriginalMember(owner = "client!ah", name = "s", descriptor = "I") - public static int clickX = 0; + @OriginalMember(owner = "client!ah", name = "s", descriptor = "I") + public static int clickX = 0; @OriginalMember(owner = "client!em", name = "y", descriptor = "I") public static int clickY = 0; @OriginalMember(owner = "client!sc", name = "v", descriptor = "I") public static int lastMouseY = 0; @OriginalMember(owner = "client!rh", name = "o", descriptor = "I") public static int lastMouseX = 0; - @OriginalMember(owner = "client!he", name = "bb", descriptor = "Lclient!ug;") - public static Mouse instance = new Mouse(); + @OriginalMember(owner = "client!he", name = "bb", descriptor = "Lclient!ug;") + public static Mouse instance = new Mouse(); @OriginalMember(owner = "client!he", name = "Y", descriptor = "I") public static volatile int anInt2467 = 0; - @OriginalMember(owner = "client!lk", name = "Z", descriptor = "I") - public static int clickButton = 0; + @OriginalMember(owner = "client!lk", name = "Z", descriptor = "I") + public static int clickButton = 0; @OriginalMember(owner = "client!bl", name = "Q", descriptor = "I") public static int pressedButton = 0; - @OriginalMember(owner = "client!ra", name = "jb", descriptor = "J") + @OriginalMember(owner = "client!ra", name = "jb", descriptor = "J") public static volatile long aLong161 = 0L; - @OriginalMember(owner = "client!ck", name = "k", descriptor = "I") - public static volatile int anInt1034 = 0; + @OriginalMember(owner = "client!ck", name = "k", descriptor = "I") + public static volatile int anInt1034 = 0; @OriginalMember(owner = "client!eg", name = "w", descriptor = "I") public static volatile int anInt1759 = 0; @OriginalMember(owner = "client!kf", name = "c", descriptor = "J") @@ -48,20 +44,20 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis public static volatile int anInt3521 = -1; @OriginalMember(owner = "client!sa", name = "Y", descriptor = "I") public static volatile int anInt4973 = 0; - @OriginalMember(owner = "client!wi", name = "W", descriptor = "I") - public static int anInt5850 = 0; - @OriginalMember(owner = "client!ok", name = "f", descriptor = "J") + @OriginalMember(owner = "client!wi", name = "W", descriptor = "I") + public static int anInt5850 = 0; + @OriginalMember(owner = "client!ok", name = "f", descriptor = "J") public static long prevClickTime = 0L; - public int mouseWheelX; + public int mouseWheelX; public int mouseWheelY; - @OriginalMember(owner = "client!sc", name = "a", descriptor = "(ILjava/awt/Component;)V") - public static void stop(@OriginalArg(1) Component arg0) { - arg0.removeMouseListener(instance); - arg0.removeMouseMotionListener(instance); - arg0.removeFocusListener(instance); - anInt1759 = 0; - } + @OriginalMember(owner = "client!sc", name = "a", descriptor = "(ILjava/awt/Component;)V") + public static void stop(@OriginalArg(1) Component arg0) { + arg0.removeMouseListener(instance); + arg0.removeMouseMotionListener(instance); + arg0.removeFocusListener(instance); + anInt1759 = 0; + } @OriginalMember(owner = "client!ug", name = "a", descriptor = "(I)V") public static void quit() { @@ -73,43 +69,43 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis } } - @OriginalMember(owner = "client!ii", name = "b", descriptor = "(I)V") - public static void loop() { - @Pc(2) Mouse local2 = instance; - synchronized (instance) { - pressedButton = anInt1759; - lastMouseX = anInt3521; - lastMouseY = anInt4039; - clickButton = anInt1313; - clickX = anInt1034; - anInt2467++; - clickY = anInt4973; - clickTime = aLong161; - anInt1313 = 0; - } - } + @OriginalMember(owner = "client!ii", name = "b", descriptor = "(I)V") + public static void loop() { + @Pc(2) Mouse local2 = instance; + synchronized (instance) { + pressedButton = anInt1759; + lastMouseX = anInt3521; + lastMouseY = anInt4039; + clickButton = anInt1313; + clickX = anInt1034; + anInt2467++; + clickY = anInt4973; + clickTime = aLong161; + anInt1313 = 0; + } + } - @OriginalMember(owner = "client!h", name = "a", descriptor = "(Ljava/awt/Component;Z)V") - public static void start(@OriginalArg(0) Component arg0) { - arg0.addMouseListener(instance); - arg0.addMouseMotionListener(instance); - arg0.addFocusListener(instance); - } + @OriginalMember(owner = "client!h", name = "a", descriptor = "(Ljava/awt/Component;Z)V") + public static void start(@OriginalArg(0) Component arg0) { + arg0.addMouseListener(instance); + arg0.addMouseMotionListener(instance); + arg0.addFocusListener(instance); + } - @OriginalMember(owner = "client!lc", name = "a", descriptor = "(B)I") - public static int getIdleLoops() { - return anInt2467; - } + @OriginalMember(owner = "client!lc", name = "a", descriptor = "(B)I") + public static int getIdleLoops() { + return anInt2467; + } - @OriginalMember(owner = "client!dl", name = "a", descriptor = "(II)V") - public static void setIdleLoops(@OriginalArg(1) int arg0) { - @Pc(10) Mouse local10 = instance; - synchronized (instance) { - anInt2467 = arg0; - } - } + @OriginalMember(owner = "client!dl", name = "a", descriptor = "(II)V") + public static void setIdleLoops(@OriginalArg(1) int arg0) { + @Pc(10) Mouse local10 = instance; + synchronized (instance) { + anInt2467 = arg0; + } + } - @OriginalMember(owner = "client!ug", name = "mouseMoved", descriptor = "(Ljava/awt/event/MouseEvent;)V") + @OriginalMember(owner = "client!ug", name = "mouseMoved", descriptor = "(Ljava/awt/event/MouseEvent;)V") @Override public final synchronized void mouseMoved(@OriginalArg(0) MouseEvent arg0) { if (instance != null) { diff --git a/client/src/main/java/rt4/MouseRecorder.java b/client/src/main/java/rt4/MouseRecorder.java index a41987c..2dc8a69 100644 --- a/client/src/main/java/rt4/MouseRecorder.java +++ b/client/src/main/java/rt4/MouseRecorder.java @@ -7,15 +7,15 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!jd") public final class MouseRecorder implements Runnable { - @OriginalMember(owner = "client!od", name = "f", descriptor = "Lclient!jd;") - public static MouseRecorder instance; - @OriginalMember(owner = "client!tm", name = "e", descriptor = "Z") - public static boolean enabled = false; - @OriginalMember(owner = "client!oe", name = "a", descriptor = "I") - public static int mouseRecorderPrevY = 0; - @OriginalMember(owner = "client!vh", name = "s", descriptor = "I") - public static int mouseRecorderPrevX = 0; - @OriginalMember(owner = "client!jd", name = "e", descriptor = "Z") + @OriginalMember(owner = "client!od", name = "f", descriptor = "Lclient!jd;") + public static MouseRecorder instance; + @OriginalMember(owner = "client!tm", name = "e", descriptor = "Z") + public static boolean enabled = false; + @OriginalMember(owner = "client!oe", name = "a", descriptor = "I") + public static int mouseRecorderPrevY = 0; + @OriginalMember(owner = "client!vh", name = "s", descriptor = "I") + public static int mouseRecorderPrevX = 0; + @OriginalMember(owner = "client!jd", name = "e", descriptor = "Z") public boolean running = true; @OriginalMember(owner = "client!jd", name = "f", descriptor = "Ljava/lang/Object;") diff --git a/client/src/main/java/rt4/MouseWheel.java b/client/src/main/java/rt4/MouseWheel.java index 4be1d85..40b1964 100644 --- a/client/src/main/java/rt4/MouseWheel.java +++ b/client/src/main/java/rt4/MouseWheel.java @@ -1,27 +1,28 @@ package rt4; -import java.awt.Component; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; + @OriginalClass("client!uc") public abstract class MouseWheel { - @OriginalMember(owner = "client!eh", name = "j", descriptor = "I") - public static int wheelRotation = 0; + @OriginalMember(owner = "client!eh", name = "j", descriptor = "I") + public static int wheelRotation = 0; - @OriginalMember(owner = "client!dh", name = "a", descriptor = "(B)Lclient!uc;") - public static MouseWheel create() { - try { - return new JavaMouseWheel(); - } catch (@Pc(15) Throwable local15) { - return null; - } - } + @OriginalMember(owner = "client!dh", name = "a", descriptor = "(B)Lclient!uc;") + public static MouseWheel create() { + try { + return new JavaMouseWheel(); + } catch (@Pc(15) Throwable local15) { + return null; + } + } - @OriginalMember(owner = "client!uc", name = "a", descriptor = "(I)I") + @OriginalMember(owner = "client!uc", name = "a", descriptor = "(I)I") public abstract int getRotation(); @OriginalMember(owner = "client!uc", name = "a", descriptor = "(ZLjava/awt/Component;)V") diff --git a/client/src/main/java/rt4/MsiType.java b/client/src/main/java/rt4/MsiType.java index 98a3bbd..7f24b83 100644 --- a/client/src/main/java/rt4/MsiType.java +++ b/client/src/main/java/rt4/MsiType.java @@ -30,7 +30,7 @@ public final class MsiType { @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IB)Lclient!ek;") public final SoftwareIndexedSprite getSprite(@OriginalArg(0) int arg0) { - @Pc(17) SoftwareIndexedSprite local17 = (SoftwareIndexedSprite) MsiTypeList.sprites.get((long) (arg0 << 16 | this.spriteId)); + @Pc(17) SoftwareIndexedSprite local17 = (SoftwareIndexedSprite) MsiTypeList.sprites.get(arg0 << 16 | this.spriteId); if (local17 != null) { return local17; } @@ -43,7 +43,7 @@ public final class MsiType { for (@Pc(59) int local59 = 0; local59 < arg0; local59++) { local17.flipVertical(); } - MsiTypeList.sprites.put(local17, (long) (arg0 << 16 | this.spriteId)); + MsiTypeList.sprites.put(local17, arg0 << 16 | this.spriteId); } return local17; } diff --git a/client/src/main/java/rt4/MsiTypeList.java b/client/src/main/java/rt4/MsiTypeList.java index b513b6b..7052312 100644 --- a/client/src/main/java/rt4/MsiTypeList.java +++ b/client/src/main/java/rt4/MsiTypeList.java @@ -5,65 +5,65 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class MsiTypeList { - @OriginalMember(owner = "client!sk", name = "hb", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!rl", name = "P", descriptor = "Lclient!n;") - public static final SoftLruHashTable sprites = new SoftLruHashTable(64); - @OriginalMember(owner = "client!hj", name = "m", descriptor = "Lclient!ve;") - public static Js5 archive; - @OriginalMember(owner = "client!uf", name = "r", descriptor = "Lclient!ve;") - public static Js5 spritesArchive; - @OriginalMember(owner = "client!vk", name = "o", descriptor = "I") - public static int blueDelta; - @OriginalMember(owner = "client!gl", name = "e", descriptor = "I") - public static int greenDelta; - @OriginalMember(owner = "client!nk", name = "E", descriptor = "I") - public static int redDelta; + @OriginalMember(owner = "client!sk", name = "hb", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!rl", name = "P", descriptor = "Lclient!n;") + public static final SoftLruHashTable sprites = new SoftLruHashTable(64); + @OriginalMember(owner = "client!hj", name = "m", descriptor = "Lclient!ve;") + public static Js5 archive; + @OriginalMember(owner = "client!uf", name = "r", descriptor = "Lclient!ve;") + public static Js5 spritesArchive; + @OriginalMember(owner = "client!vk", name = "o", descriptor = "I") + public static int blueDelta; + @OriginalMember(owner = "client!gl", name = "e", descriptor = "I") + public static int greenDelta; + @OriginalMember(owner = "client!nk", name = "E", descriptor = "I") + public static int redDelta; - @OriginalMember(owner = "client!da", name = "c", descriptor = "(II)Lclient!aa;") - public static MsiType get(@OriginalArg(0) int arg0) { - @Pc(10) MsiType local10 = (MsiType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(20) byte[] local20 = archive.fetchFile(34, arg0); - local10 = new MsiType(); - if (local20 != null) { - local10.decode(new Buffer(local20), arg0); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!da", name = "c", descriptor = "(II)Lclient!aa;") + public static MsiType get(@OriginalArg(0) int arg0) { + @Pc(10) MsiType local10 = (MsiType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(20) byte[] local20 = archive.fetchFile(34, arg0); + local10 = new MsiType(); + if (local20 != null) { + local10.decode(new Buffer(local20), arg0); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!og", name = "a", descriptor = "(Lclient!ve;Lclient!ve;B)V") - public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { - spritesArchive = arg1; - @Pc(12) int local12 = (int) (Math.random() * 21.0D) - 10; - archive = arg0; - @Pc(21) int local21 = (int) (Math.random() * 21.0D) - 10; - archive.getGroupCapacity(34); - @Pc(33) int local33 = (int) (Math.random() * 21.0D) - 10; - @Pc(40) int local40 = (int) (Math.random() * 41.0D) - 20; - blueDelta = local40 + local21; - greenDelta = local12 + local40; - redDelta = local40 + local33; - } + @OriginalMember(owner = "client!og", name = "a", descriptor = "(Lclient!ve;Lclient!ve;B)V") + public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { + spritesArchive = arg1; + @Pc(12) int local12 = (int) (Math.random() * 21.0D) - 10; + archive = arg0; + @Pc(21) int local21 = (int) (Math.random() * 21.0D) - 10; + archive.getGroupCapacity(34); + @Pc(33) int local33 = (int) (Math.random() * 21.0D) - 10; + @Pc(40) int local40 = (int) (Math.random() * 41.0D) - 20; + blueDelta = local40 + local21; + greenDelta = local12 + local40; + redDelta = local40 + local33; + } - @OriginalMember(owner = "client!qg", name = "h", descriptor = "(I)V") - public static void method3653() { - types.clear(); - sprites.clear(); - } + @OriginalMember(owner = "client!qg", name = "h", descriptor = "(I)V") + public static void method3653() { + types.clear(); + sprites.clear(); + } - @OriginalMember(owner = "client!vl", name = "b", descriptor = "(I)V") - public static void method4529() { - types.removeSoft(); - sprites.removeSoft(); - } + @OriginalMember(owner = "client!vl", name = "b", descriptor = "(I)V") + public static void method4529() { + types.removeSoft(); + sprites.removeSoft(); + } - @OriginalMember(owner = "client!wh", name = "a", descriptor = "(II)V") - public static void clean() { - types.clean(5); - sprites.clean(5); - } + @OriginalMember(owner = "client!wh", name = "a", descriptor = "(II)V") + public static void clean() { + types.clean(5); + sprites.clean(5); + } } diff --git a/client/src/main/java/rt4/MusicPlayer.java b/client/src/main/java/rt4/MusicPlayer.java index f075729..e0cf67d 100644 --- a/client/src/main/java/rt4/MusicPlayer.java +++ b/client/src/main/java/rt4/MusicPlayer.java @@ -4,26 +4,26 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public class MusicPlayer { - @OriginalMember(owner = "client!s", name = "c", descriptor = "I") - public static int groupId = -1; - @OriginalMember(owner = "client!uf", name = "m", descriptor = "I") - public static int titleSong; + @OriginalMember(owner = "client!s", name = "c", descriptor = "I") + public static int groupId = -1; + @OriginalMember(owner = "client!uf", name = "m", descriptor = "I") + public static int titleSong; - @OriginalMember(owner = "client!li", name = "a", descriptor = "(ZI)V") - public static void playSong(@OriginalArg(1) int arg0) { - if (arg0 == -1 && !MidiPlayer.jingle) { - MidiPlayer.method4548(); - } else if (arg0 != -1 && (groupId != arg0 || !MidiPlayer.isPlaying()) && Preferences.musicVolume != 0 && !MidiPlayer.jingle) { - MidiPlayer.playFadeOut(arg0, client.js5Archive6, Preferences.musicVolume); - } - groupId = arg0; - } + @OriginalMember(owner = "client!li", name = "a", descriptor = "(ZI)V") + public static void playSong(@OriginalArg(1) int arg0) { + if (arg0 == -1 && !MidiPlayer.jingle) { + MidiPlayer.method4548(); + } else if (arg0 != -1 && (groupId != arg0 || !MidiPlayer.isPlaying()) && Preferences.musicVolume != 0 && !MidiPlayer.jingle) { + MidiPlayer.playFadeOut(arg0, client.js5Archive6, Preferences.musicVolume); + } + groupId = arg0; + } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIB)V") - public static void playJingle(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - if (Preferences.musicVolume != 0 && arg1 != -1) { - MidiPlayer.playImmediate(client.js5Archive11, arg1, Preferences.musicVolume); - MidiPlayer.jingle = true; - } - } + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIB)V") + public static void playJingle(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + if (Preferences.musicVolume != 0 && arg1 != -1) { + MidiPlayer.playImmediate(client.js5Archive11, arg1, Preferences.musicVolume); + MidiPlayer.jingle = true; + } + } } diff --git a/client/src/main/java/rt4/Npc.java b/client/src/main/java/rt4/Npc.java index 18e548e..895edf7 100644 --- a/client/src/main/java/rt4/Npc.java +++ b/client/src/main/java/rt4/Npc.java @@ -11,28 +11,28 @@ public final class Npc extends PathingEntity { @OriginalMember(owner = "client!km", name = "rc", descriptor = "Lclient!me;") public NpcType type; - @OriginalMember(owner = "client!ij", name = "a", descriptor = "(Lclient!km;I)I") - public static int getSound(@OriginalArg(0) Npc arg0) { - @Pc(13) NpcType local13 = arg0.type; - if (local13.multiNpcs != null) { - local13 = local13.getMultiNpc(); - if (local13 == null) { - return -1; - } - } - @Pc(29) int local29 = local13.walkSound; - @Pc(33) BasType local33 = arg0.getBasType(); - if (local33.idleAnimationId == arg0.movementSeqId) { - local29 = local13.idleSound; - } else if (arg0.movementSeqId == local33.runAnimationId || local33.runAnimationId2 == arg0.movementSeqId || arg0.movementSeqId == local33.runAnimationId4 || arg0.movementSeqId == local33.runAnimationId3) { - local29 = local13.runSound; - } else if (local33.anInt1062 == arg0.movementSeqId || arg0.movementSeqId == local33.anInt1042 || arg0.movementSeqId == local33.anInt1048 || arg0.movementSeqId == local33.anInt1066) { - local29 = local13.crawlSound; - } - return local29; - } + @OriginalMember(owner = "client!ij", name = "a", descriptor = "(Lclient!km;I)I") + public static int getSound(@OriginalArg(0) Npc arg0) { + @Pc(13) NpcType local13 = arg0.type; + if (local13.multiNpcs != null) { + local13 = local13.getMultiNpc(); + if (local13 == null) { + return -1; + } + } + @Pc(29) int local29 = local13.walkSound; + @Pc(33) BasType local33 = arg0.getBasType(); + if (local33.idleAnimationId == arg0.movementSeqId) { + local29 = local13.idleSound; + } else if (arg0.movementSeqId == local33.runAnimationId || local33.runAnimationId2 == arg0.movementSeqId || arg0.movementSeqId == local33.runAnimationId4 || arg0.movementSeqId == local33.runAnimationId3) { + local29 = local13.runSound; + } else if (local33.anInt1062 == arg0.movementSeqId || arg0.movementSeqId == local33.anInt1042 || arg0.movementSeqId == local33.anInt1048 || arg0.movementSeqId == local33.anInt1066) { + local29 = local13.crawlSound; + } + return local29; + } - @OriginalMember(owner = "client!km", name = "finalize", descriptor = "()V") + @OriginalMember(owner = "client!km", name = "finalize", descriptor = "()V") @Override public final void finalize() { } @@ -146,7 +146,6 @@ public final class Npc extends PathingEntity { @Override public final void method4545(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { if (this.type == null) { - ; } } diff --git a/client/src/main/java/rt4/NpcList.java b/client/src/main/java/rt4/NpcList.java index ee702ae..01947f5 100644 --- a/client/src/main/java/rt4/NpcList.java +++ b/client/src/main/java/rt4/NpcList.java @@ -5,298 +5,298 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class NpcList { - @OriginalMember(owner = "client!nm", name = "S", descriptor = "[Lclient!km;") - public static final Npc[] npcs = new Npc[32768]; - @OriginalMember(owner = "client!cj", name = "i", descriptor = "[I") - public static final int[] ids = new int[32768]; - @OriginalMember(owner = "client!wd", name = "g", descriptor = "I") + @OriginalMember(owner = "client!nm", name = "S", descriptor = "[Lclient!km;") + public static final Npc[] npcs = new Npc[32768]; + @OriginalMember(owner = "client!cj", name = "i", descriptor = "[I") + public static final int[] ids = new int[32768]; + @OriginalMember(owner = "client!wd", name = "g", descriptor = "I") public static int size = 0; - @OriginalMember(owner = "client!ig", name = "a", descriptor = "(I)V") - public static void method2274() { - for (@Pc(7) int local7 = 0; local7 < size; local7++) { - @Pc(18) int local18 = ids[local7]; - @Pc(22) Npc local22 = npcs[local18]; - if (local22 != null) { - method4514(local22.type.size, local22); - } - } - } + @OriginalMember(owner = "client!ig", name = "a", descriptor = "(I)V") + public static void method2274() { + for (@Pc(7) int local7 = 0; local7 < size; local7++) { + @Pc(18) int local18 = ids[local7]; + @Pc(22) Npc local22 = npcs[local18]; + if (local22 != null) { + method4514(local22.type.size, local22); + } + } + } - @OriginalMember(owner = "client!vg", name = "a", descriptor = "(IILclient!fe;)V") - public static void method4514(@OriginalArg(0) int arg0, @OriginalArg(2) PathingEntity arg1) { - if (client.loop < arg1.anInt3395) { - method553(arg1); - } else if (arg1.anInt3386 >= client.loop) { - method4665(arg1); - } else { - method2247(arg1); - } - if (arg1.xFine < 128 || arg1.zFine < 128 || arg1.xFine >= 13184 || arg1.zFine >= 13184) { - arg1.seqId = -1; - arg1.spotAnimId = -1; - arg1.anInt3395 = 0; - arg1.anInt3386 = 0; - arg1.xFine = arg1.movementQueueX[0] * 128 + arg1.getSize() * 64; - arg1.zFine = arg1.movementQueueZ[0] * 128 + arg1.getSize() * 64; - arg1.method2689(); - } - if (arg1 == PlayerList.self && (arg1.xFine < 1536 || arg1.zFine < 1536 || arg1.xFine >= 11776 || arg1.zFine >= 11776)) { - arg1.spotAnimId = -1; - arg1.anInt3395 = 0; - arg1.anInt3386 = 0; - arg1.seqId = -1; - arg1.xFine = arg1.movementQueueX[0] * 128 + arg1.getSize() * 64; - arg1.zFine = arg1.movementQueueZ[0] * 128 + arg1.getSize() * 64; - arg1.method2689(); - } - method949(arg1); - method879(arg1); - } + @OriginalMember(owner = "client!vg", name = "a", descriptor = "(IILclient!fe;)V") + public static void method4514(@OriginalArg(0) int arg0, @OriginalArg(2) PathingEntity arg1) { + if (client.loop < arg1.anInt3395) { + method553(arg1); + } else if (arg1.anInt3386 >= client.loop) { + method4665(arg1); + } else { + method2247(arg1); + } + if (arg1.xFine < 128 || arg1.zFine < 128 || arg1.xFine >= 13184 || arg1.zFine >= 13184) { + arg1.seqId = -1; + arg1.spotAnimId = -1; + arg1.anInt3395 = 0; + arg1.anInt3386 = 0; + arg1.xFine = arg1.movementQueueX[0] * 128 + arg1.getSize() * 64; + arg1.zFine = arg1.movementQueueZ[0] * 128 + arg1.getSize() * 64; + arg1.method2689(); + } + if (arg1 == PlayerList.self && (arg1.xFine < 1536 || arg1.zFine < 1536 || arg1.xFine >= 11776 || arg1.zFine >= 11776)) { + arg1.spotAnimId = -1; + arg1.anInt3395 = 0; + arg1.anInt3386 = 0; + arg1.seqId = -1; + arg1.xFine = arg1.movementQueueX[0] * 128 + arg1.getSize() * 64; + arg1.zFine = arg1.movementQueueZ[0] * 128 + arg1.getSize() * 64; + arg1.method2689(); + } + method949(arg1); + method879(arg1); + } - @OriginalMember(owner = "client!bh", name = "a", descriptor = "(Lclient!fe;Z)V") - public static void method553(@OriginalArg(0) PathingEntity arg0) { - @Pc(8) int local8 = arg0.anInt3395 - client.loop; - @Pc(20) int local20 = arg0.anInt3380 * 128 + arg0.getSize() * 64; - @Pc(36) int local36 = arg0.anInt3428 * 128 + arg0.getSize() * 64; - if (arg0.anInt3431 == 0) { - arg0.anInt3400 = 1024; - } - arg0.xFine += (local20 - arg0.xFine) / local8; - arg0.zFine += (local36 - arg0.zFine) / local8; - if (arg0.anInt3431 == 1) { - arg0.anInt3400 = 1536; - } - arg0.anInt3417 = 0; - if (arg0.anInt3431 == 2) { - arg0.anInt3400 = 0; - } - if (arg0.anInt3431 == 3) { - arg0.anInt3400 = 512; - } - } + @OriginalMember(owner = "client!bh", name = "a", descriptor = "(Lclient!fe;Z)V") + public static void method553(@OriginalArg(0) PathingEntity arg0) { + @Pc(8) int local8 = arg0.anInt3395 - client.loop; + @Pc(20) int local20 = arg0.anInt3380 * 128 + arg0.getSize() * 64; + @Pc(36) int local36 = arg0.anInt3428 * 128 + arg0.getSize() * 64; + if (arg0.anInt3431 == 0) { + arg0.anInt3400 = 1024; + } + arg0.xFine += (local20 - arg0.xFine) / local8; + arg0.zFine += (local36 - arg0.zFine) / local8; + if (arg0.anInt3431 == 1) { + arg0.anInt3400 = 1536; + } + arg0.anInt3417 = 0; + if (arg0.anInt3431 == 2) { + arg0.anInt3400 = 0; + } + if (arg0.anInt3431 == 3) { + arg0.anInt3400 = 512; + } + } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(Lclient!fe;B)V") - public static void method4665(@OriginalArg(0) PathingEntity arg0) { - if (client.loop == arg0.anInt3386 || arg0.seqId == -1 || arg0.anInt3420 != 0 || arg0.anInt3360 + 1 > SeqTypeList.get(arg0.seqId).anIntArray474[arg0.anInt3425]) { - @Pc(35) int local35 = arg0.anInt3386 - arg0.anInt3395; - @Pc(41) int local41 = client.loop - arg0.anInt3395; - @Pc(52) int local52 = arg0.anInt3380 * 128 + arg0.getSize() * 64; - @Pc(64) int local64 = arg0.anInt3428 * 128 + arg0.getSize() * 64; - @Pc(75) int local75 = arg0.anInt3416 * 128 + arg0.getSize() * 64; - @Pc(86) int local86 = arg0.anInt3392 * 128 + arg0.getSize() * 64; - arg0.xFine = (local41 * local75 + local52 * (local35 - local41)) / local35; - arg0.zFine = (local86 * local41 + local64 * (local35 - local41)) / local35; - } - arg0.anInt3417 = 0; - if (arg0.anInt3431 == 0) { - arg0.anInt3400 = 1024; - } - if (arg0.anInt3431 == 1) { - arg0.anInt3400 = 1536; - } - if (arg0.anInt3431 == 2) { - arg0.anInt3400 = 0; - } - if (arg0.anInt3431 == 3) { - arg0.anInt3400 = 512; - } - arg0.anInt3381 = arg0.anInt3400; - } + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(Lclient!fe;B)V") + public static void method4665(@OriginalArg(0) PathingEntity arg0) { + if (client.loop == arg0.anInt3386 || arg0.seqId == -1 || arg0.anInt3420 != 0 || arg0.anInt3360 + 1 > SeqTypeList.get(arg0.seqId).anIntArray474[arg0.anInt3425]) { + @Pc(35) int local35 = arg0.anInt3386 - arg0.anInt3395; + @Pc(41) int local41 = client.loop - arg0.anInt3395; + @Pc(52) int local52 = arg0.anInt3380 * 128 + arg0.getSize() * 64; + @Pc(64) int local64 = arg0.anInt3428 * 128 + arg0.getSize() * 64; + @Pc(75) int local75 = arg0.anInt3416 * 128 + arg0.getSize() * 64; + @Pc(86) int local86 = arg0.anInt3392 * 128 + arg0.getSize() * 64; + arg0.xFine = (local41 * local75 + local52 * (local35 - local41)) / local35; + arg0.zFine = (local86 * local41 + local64 * (local35 - local41)) / local35; + } + arg0.anInt3417 = 0; + if (arg0.anInt3431 == 0) { + arg0.anInt3400 = 1024; + } + if (arg0.anInt3431 == 1) { + arg0.anInt3400 = 1536; + } + if (arg0.anInt3431 == 2) { + arg0.anInt3400 = 0; + } + if (arg0.anInt3431 == 3) { + arg0.anInt3400 = 512; + } + arg0.anInt3381 = arg0.anInt3400; + } - @OriginalMember(owner = "client!ia", name = "a", descriptor = "(BLclient!fe;)V") - public static void method2247(@OriginalArg(1) PathingEntity arg0) { - @Pc(9) BasType local9 = arg0.getBasType(); - arg0.movementSeqId = local9.idleAnimationId; - if (arg0.movementQueueSize == 0) { - arg0.anInt3417 = 0; - return; - } - if (arg0.seqId != -1 && arg0.anInt3420 == 0) { - @Pc(40) SeqType local40 = SeqTypeList.get(arg0.seqId); - if (arg0.anInt3405 > 0 && local40.anInt5363 == 0) { - arg0.anInt3417++; - return; - } - if (arg0.anInt3405 <= 0 && local40.anInt5349 == 0) { - arg0.anInt3417++; - return; - } - } - @Pc(79) int local79 = arg0.xFine; - @Pc(82) int local82 = arg0.zFine; - @Pc(99) int local99 = arg0.movementQueueX[arg0.movementQueueSize - 1] * 128 + arg0.getSize() * 64; - @Pc(116) int local116 = arg0.movementQueueZ[arg0.movementQueueSize - 1] * 128 + arg0.getSize() * 64; - if (local99 - local79 > 256 || local99 - local79 < -256 || local116 - local82 > 256 || local116 - local82 < -256) { - arg0.xFine = local99; - arg0.zFine = local116; - return; - } - if (local99 <= local79) { - if (local79 <= local99) { - if (local116 > local82) { - arg0.anInt3400 = 1024; - } else if (local82 > local116) { - arg0.anInt3400 = 0; - } - } else if (local116 > local82) { - arg0.anInt3400 = 768; - } else if (local116 < local82) { - arg0.anInt3400 = 256; - } else { - arg0.anInt3400 = 512; - } - } else if (local116 > local82) { - arg0.anInt3400 = 1280; - } else if (local82 > local116) { - arg0.anInt3400 = 1792; - } else { - arg0.anInt3400 = 1536; - } - @Pc(224) int local224 = arg0.anInt3400 - arg0.anInt3381 & 0x7FF; - @Pc(227) int local227 = local9.turnAnimation1; - if (local224 > 1024) { - local224 -= 2048; - } - @Pc(233) boolean local233 = true; - @Pc(235) byte local235 = 1; - if (local224 >= -256 && local224 <= 256) { - local227 = local9.walkAnimation; - } else if (local224 >= 256 && local224 < 768) { - local227 = local9.turnAnimation3; - } else if (local224 >= -768 && local224 <= -256) { - local227 = local9.turnAnimation2; - } - @Pc(273) int local273 = 4; - if (local227 == -1) { - local227 = local9.walkAnimation; - } - arg0.movementSeqId = local227; - if (arg0 instanceof Npc) { - local233 = ((Npc) arg0).type.aBoolean181; - } - if (local233) { - if (arg0.anInt3381 != arg0.anInt3400 && arg0.faceEntity == -1 && arg0.anInt3376 != 0) { - local273 = 2; - } - if (arg0.movementQueueSize > 2) { - local273 = 6; - } - if (arg0.movementQueueSize > 3) { - local273 = 8; - } - if (arg0.anInt3417 > 0 && arg0.movementQueueSize > 1) { - local273 = 8; - arg0.anInt3417--; - } - } else { - if (arg0.movementQueueSize > 1) { - local273 = 6; - } - if (arg0.movementQueueSize > 2) { - local273 = 8; - } - if (arg0.anInt3417 > 0 && arg0.movementQueueSize > 1) { - arg0.anInt3417--; - local273 = 8; - } - } - if (arg0.movementQueueSpeed[arg0.movementQueueSize - 1] == 2) { - local273 <<= 0x1; - local235 = 2; - } else if (arg0.movementQueueSpeed[arg0.movementQueueSize - 1] == 0) { - local235 = 0; - local273 >>= 0x1; - } - if (local273 < 8 || local9.runAnimationId == -1) { - if (local9.anInt1062 != -1 && local235 == 0) { - if (local9.turnAnimation1 == arg0.movementSeqId && local9.anInt1042 != -1) { - arg0.movementSeqId = local9.anInt1042; - } else if (local9.turnAnimation2 == arg0.movementSeqId && local9.anInt1066 != -1) { - arg0.movementSeqId = local9.anInt1066; - } else if (local9.turnAnimation3 == arg0.movementSeqId && local9.anInt1048 != -1) { - arg0.movementSeqId = local9.anInt1048; - } else { - arg0.movementSeqId = local9.anInt1062; - } - } - } else if (local9.turnAnimation1 == arg0.movementSeqId && local9.runAnimationId2 != -1) { - arg0.movementSeqId = local9.runAnimationId2; - } else if (arg0.movementSeqId == local9.turnAnimation2 && local9.runAnimationId3 != -1) { - arg0.movementSeqId = local9.runAnimationId3; - } else if (arg0.movementSeqId == local9.turnAnimation3 && local9.runAnimationId4 != -1) { - arg0.movementSeqId = local9.runAnimationId4; - } else { - arg0.movementSeqId = local9.runAnimationId; - } - if (local9.anInt1032 != -1) { - local273 <<= 0x7; - if (arg0.movementQueueSize == 1) { - @Pc(594) int local594 = (local99 >= arg0.xFine ? local99 - arg0.xFine : -local99 + arg0.xFine) << 7; - @Pc(600) int local600 = arg0.anInt3358 * arg0.anInt3358; - @Pc(622) int local622 = (local116 < arg0.zFine ? arg0.zFine - local116 : -arg0.zFine + local116) << 7; - @Pc(629) int local629 = local594 > local622 ? local594 : local622; - @Pc(636) int local636 = local9.anInt1032 * 2 * local629; - if (local636 < local600) { - arg0.anInt3358 /= 2; - } else if (local629 < local600 / 2) { - arg0.anInt3358 -= local9.anInt1032; - if (arg0.anInt3358 < 0) { - arg0.anInt3358 = 0; - } - } else if (arg0.anInt3358 < local273) { - arg0.anInt3358 += local9.anInt1032; - if (arg0.anInt3358 > local273) { - arg0.anInt3358 = local273; - } - } - } else if (local273 > arg0.anInt3358) { - arg0.anInt3358 += local9.anInt1032; - if (local273 < arg0.anInt3358) { - arg0.anInt3358 = local273; - } - } else if (arg0.anInt3358 > 0) { - arg0.anInt3358 -= local9.anInt1032; - if (arg0.anInt3358 < 0) { - arg0.anInt3358 = 0; - } - } - local273 = arg0.anInt3358 >> 7; - if (local273 < 1) { - local273 = 1; - } - } - if (local79 < local99) { - arg0.xFine += local273; - if (local99 < arg0.xFine) { - arg0.xFine = local99; - } - } else if (local79 > local99) { - arg0.xFine -= local273; - if (local99 > arg0.xFine) { - arg0.xFine = local99; - } - } - if (local82 < local116) { - arg0.zFine += local273; - if (arg0.zFine > local116) { - arg0.zFine = local116; - } - } else if (local116 < local82) { - arg0.zFine -= local273; - if (local116 > arg0.zFine) { - arg0.zFine = local116; - } - } - if (arg0.xFine == local99 && local116 == arg0.zFine) { - arg0.movementQueueSize--; - if (arg0.anInt3405 > 0) { - arg0.anInt3405--; - } - } - } + @OriginalMember(owner = "client!ia", name = "a", descriptor = "(BLclient!fe;)V") + public static void method2247(@OriginalArg(1) PathingEntity arg0) { + @Pc(9) BasType local9 = arg0.getBasType(); + arg0.movementSeqId = local9.idleAnimationId; + if (arg0.movementQueueSize == 0) { + arg0.anInt3417 = 0; + return; + } + if (arg0.seqId != -1 && arg0.anInt3420 == 0) { + @Pc(40) SeqType local40 = SeqTypeList.get(arg0.seqId); + if (arg0.anInt3405 > 0 && local40.anInt5363 == 0) { + arg0.anInt3417++; + return; + } + if (arg0.anInt3405 <= 0 && local40.anInt5349 == 0) { + arg0.anInt3417++; + return; + } + } + @Pc(79) int local79 = arg0.xFine; + @Pc(82) int local82 = arg0.zFine; + @Pc(99) int local99 = arg0.movementQueueX[arg0.movementQueueSize - 1] * 128 + arg0.getSize() * 64; + @Pc(116) int local116 = arg0.movementQueueZ[arg0.movementQueueSize - 1] * 128 + arg0.getSize() * 64; + if (local99 - local79 > 256 || local99 - local79 < -256 || local116 - local82 > 256 || local116 - local82 < -256) { + arg0.xFine = local99; + arg0.zFine = local116; + return; + } + if (local99 <= local79) { + if (local79 <= local99) { + if (local116 > local82) { + arg0.anInt3400 = 1024; + } else if (local82 > local116) { + arg0.anInt3400 = 0; + } + } else if (local116 > local82) { + arg0.anInt3400 = 768; + } else if (local116 < local82) { + arg0.anInt3400 = 256; + } else { + arg0.anInt3400 = 512; + } + } else if (local116 > local82) { + arg0.anInt3400 = 1280; + } else if (local82 > local116) { + arg0.anInt3400 = 1792; + } else { + arg0.anInt3400 = 1536; + } + @Pc(224) int local224 = arg0.anInt3400 - arg0.anInt3381 & 0x7FF; + @Pc(227) int local227 = local9.turnAnimation1; + if (local224 > 1024) { + local224 -= 2048; + } + @Pc(233) boolean local233 = true; + @Pc(235) byte local235 = 1; + if (local224 >= -256 && local224 <= 256) { + local227 = local9.walkAnimation; + } else if (local224 >= 256 && local224 < 768) { + local227 = local9.turnAnimation3; + } else if (local224 >= -768 && local224 <= -256) { + local227 = local9.turnAnimation2; + } + @Pc(273) int local273 = 4; + if (local227 == -1) { + local227 = local9.walkAnimation; + } + arg0.movementSeqId = local227; + if (arg0 instanceof Npc) { + local233 = ((Npc) arg0).type.aBoolean181; + } + if (local233) { + if (arg0.anInt3381 != arg0.anInt3400 && arg0.faceEntity == -1 && arg0.anInt3376 != 0) { + local273 = 2; + } + if (arg0.movementQueueSize > 2) { + local273 = 6; + } + if (arg0.movementQueueSize > 3) { + local273 = 8; + } + if (arg0.anInt3417 > 0 && arg0.movementQueueSize > 1) { + local273 = 8; + arg0.anInt3417--; + } + } else { + if (arg0.movementQueueSize > 1) { + local273 = 6; + } + if (arg0.movementQueueSize > 2) { + local273 = 8; + } + if (arg0.anInt3417 > 0 && arg0.movementQueueSize > 1) { + arg0.anInt3417--; + local273 = 8; + } + } + if (arg0.movementQueueSpeed[arg0.movementQueueSize - 1] == 2) { + local273 <<= 0x1; + local235 = 2; + } else if (arg0.movementQueueSpeed[arg0.movementQueueSize - 1] == 0) { + local235 = 0; + local273 >>= 0x1; + } + if (local273 < 8 || local9.runAnimationId == -1) { + if (local9.anInt1062 != -1 && local235 == 0) { + if (local9.turnAnimation1 == arg0.movementSeqId && local9.anInt1042 != -1) { + arg0.movementSeqId = local9.anInt1042; + } else if (local9.turnAnimation2 == arg0.movementSeqId && local9.anInt1066 != -1) { + arg0.movementSeqId = local9.anInt1066; + } else if (local9.turnAnimation3 == arg0.movementSeqId && local9.anInt1048 != -1) { + arg0.movementSeqId = local9.anInt1048; + } else { + arg0.movementSeqId = local9.anInt1062; + } + } + } else if (local9.turnAnimation1 == arg0.movementSeqId && local9.runAnimationId2 != -1) { + arg0.movementSeqId = local9.runAnimationId2; + } else if (arg0.movementSeqId == local9.turnAnimation2 && local9.runAnimationId3 != -1) { + arg0.movementSeqId = local9.runAnimationId3; + } else if (arg0.movementSeqId == local9.turnAnimation3 && local9.runAnimationId4 != -1) { + arg0.movementSeqId = local9.runAnimationId4; + } else { + arg0.movementSeqId = local9.runAnimationId; + } + if (local9.anInt1032 != -1) { + local273 <<= 0x7; + if (arg0.movementQueueSize == 1) { + @Pc(594) int local594 = (local99 >= arg0.xFine ? local99 - arg0.xFine : -local99 + arg0.xFine) << 7; + @Pc(600) int local600 = arg0.anInt3358 * arg0.anInt3358; + @Pc(622) int local622 = (local116 < arg0.zFine ? arg0.zFine - local116 : -arg0.zFine + local116) << 7; + @Pc(629) int local629 = local594 > local622 ? local594 : local622; + @Pc(636) int local636 = local9.anInt1032 * 2 * local629; + if (local636 < local600) { + arg0.anInt3358 /= 2; + } else if (local629 < local600 / 2) { + arg0.anInt3358 -= local9.anInt1032; + if (arg0.anInt3358 < 0) { + arg0.anInt3358 = 0; + } + } else if (arg0.anInt3358 < local273) { + arg0.anInt3358 += local9.anInt1032; + if (arg0.anInt3358 > local273) { + arg0.anInt3358 = local273; + } + } + } else if (local273 > arg0.anInt3358) { + arg0.anInt3358 += local9.anInt1032; + if (local273 < arg0.anInt3358) { + arg0.anInt3358 = local273; + } + } else if (arg0.anInt3358 > 0) { + arg0.anInt3358 -= local9.anInt1032; + if (arg0.anInt3358 < 0) { + arg0.anInt3358 = 0; + } + } + local273 = arg0.anInt3358 >> 7; + if (local273 < 1) { + local273 = 1; + } + } + if (local79 < local99) { + arg0.xFine += local273; + if (local99 < arg0.xFine) { + arg0.xFine = local99; + } + } else if (local79 > local99) { + arg0.xFine -= local273; + if (local99 > arg0.xFine) { + arg0.xFine = local99; + } + } + if (local82 < local116) { + arg0.zFine += local273; + if (arg0.zFine > local116) { + arg0.zFine = local116; + } + } else if (local116 < local82) { + arg0.zFine -= local273; + if (local116 > arg0.zFine) { + arg0.zFine = local116; + } + } + if (arg0.xFine == local99 && local116 == arg0.zFine) { + arg0.movementQueueSize--; + if (arg0.anInt3405 > 0) { + arg0.anInt3405--; + } + } + } - @OriginalMember(owner = "client!cm", name = "a", descriptor = "(ILclient!fe;)V") + @OriginalMember(owner = "client!cm", name = "a", descriptor = "(ILclient!fe;)V") public static void method949(@OriginalArg(1) PathingEntity arg0) { if (arg0.anInt3376 == 0) { return; @@ -310,7 +310,7 @@ public class NpcList { local36 = arg0.zFine - local26.zFine; local43 = arg0.xFine - local26.xFine; if (local43 != 0 || local36 != 0) { - arg0.anInt3400 = (int) (Math.atan2((double) local43, (double) local36) * 325.949D) & 0x7FF; + arg0.anInt3400 = (int) (Math.atan2(local43, local36) * 325.949D) & 0x7FF; } } } @@ -326,7 +326,7 @@ public class NpcList { local94 = arg0.zFine - local83.zFine; local36 = arg0.xFine - local83.xFine; if (local36 != 0 || local94 != 0) { - arg0.anInt3400 = (int) (Math.atan2((double) local36, (double) local94) * 325.949D) & 0x7FF; + arg0.anInt3400 = (int) (Math.atan2(local36, local94) * 325.949D) & 0x7FF; } } } @@ -334,7 +334,7 @@ public class NpcList { local70 = arg0.xFine - (arg0.faceX - Camera.originX - Camera.originX) * 64; local43 = arg0.zFine - (arg0.faceY - Camera.originZ - Camera.originZ) * 64; if (local70 != 0 || local43 != 0) { - arg0.anInt3400 = (int) (Math.atan2((double) local70, (double) local43) * 325.949D) & 0x7FF; + arg0.anInt3400 = (int) (Math.atan2(local70, local43) * 325.949D) & 0x7FF; } arg0.faceY = 0; arg0.faceX = 0; @@ -476,7 +476,7 @@ public class NpcList { } } - @OriginalMember(owner = "client!ck", name = "a", descriptor = "(Lclient!fe;I)V") + @OriginalMember(owner = "client!ck", name = "a", descriptor = "(Lclient!fe;I)V") public static void method879(@OriginalArg(0) PathingEntity arg0) { arg0.aBoolean171 = false; @Pc(18) SeqType local18; diff --git a/client/src/main/java/rt4/NpcType.java b/client/src/main/java/rt4/NpcType.java index 39579c4..79b0dbd 100644 --- a/client/src/main/java/rt4/NpcType.java +++ b/client/src/main/java/rt4/NpcType.java @@ -227,7 +227,7 @@ public final class NpcType { if (this.params == null) { return arg1; } else { - @Pc(18) IntNode local18 = (IntNode) this.params.get((long) arg0); + @Pc(18) IntNode local18 = (IntNode) this.params.get(arg0); return local18 == null ? arg1 : local18.value; } } @@ -238,7 +238,7 @@ public final class NpcType { @Pc(13) NpcType local13 = this.getMultiNpc(); return local13 == null ? null : local13.getBodyModel(seqs, arg1, arg2, arg3, arg4, arg5, seqType1, arg7, seqType2); } - @Pc(40) Model local40 = (Model) NpcTypeList.models.get((long) this.id); + @Pc(40) Model local40 = (Model) NpcTypeList.models.get(this.id); @Pc(46) boolean local46; @Pc(173) int local173; @Pc(235) int local235; @@ -352,7 +352,7 @@ public final class NpcType { if (GlRenderer.enabled) { ((GlModel) local40).method4111(false, false, false, false, false, true); } - NpcTypeList.models.put(local40, (long) this.id); + NpcTypeList.models.put(local40, this.id); } local46 = false; @Pc(721) boolean local721 = false; @@ -497,7 +497,7 @@ public final class NpcType { if (this.params == null) { return arg1; } else { - @Pc(18) StringNode local18 = (StringNode) this.params.get((long) arg0); + @Pc(18) StringNode local18 = (StringNode) this.params.get(arg0); return local18 == null ? arg1 : local18.value; } } @@ -525,7 +525,7 @@ public final class NpcType { } else if (this.anIntArray354 == null) { return null; } else { - @Pc(41) Model local41 = (Model) NpcTypeList.headModels.get((long) this.id); + @Pc(41) Model local41 = (Model) NpcTypeList.headModels.get(this.id); if (local41 == null) { @Pc(46) boolean local46 = false; for (@Pc(48) int local48 = 0; local48 < this.anIntArray354.length; local48++) { @@ -562,7 +562,7 @@ public final class NpcType { } } local41 = local119.createModel(64, 768, -50, -10, -50); - NpcTypeList.headModels.put(local41, (long) this.id); + NpcTypeList.headModels.put(local41, this.id); } if (arg0 != null) { local41 = arg0.method4215(local41, arg2, arg1, arg3); @@ -746,7 +746,7 @@ public final class NpcType { } else { local605 = new IntNode(arg1.g4()); } - this.params.put(local605, (long) local596); + this.params.put(local605, local596); } } } diff --git a/client/src/main/java/rt4/NpcTypeList.java b/client/src/main/java/rt4/NpcTypeList.java index 1a68c8f..4e82081 100644 --- a/client/src/main/java/rt4/NpcTypeList.java +++ b/client/src/main/java/rt4/NpcTypeList.java @@ -5,78 +5,78 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class NpcTypeList { - @OriginalMember(owner = "client!he", name = "V", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!jl", name = "x", descriptor = "Lclient!n;") - public static final SoftLruHashTable models = new SoftLruHashTable(50); - @OriginalMember(owner = "client!vf", name = "k", descriptor = "Lclient!n;") - public static final SoftLruHashTable headModels = new SoftLruHashTable(5); - @OriginalMember(owner = "client!gm", name = "ib", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!he", name = "V", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!jl", name = "x", descriptor = "Lclient!n;") + public static final SoftLruHashTable models = new SoftLruHashTable(50); + @OriginalMember(owner = "client!vf", name = "k", descriptor = "Lclient!n;") + public static final SoftLruHashTable headModels = new SoftLruHashTable(5); + @OriginalMember(owner = "client!gm", name = "ib", descriptor = "Lclient!ve;") public static Js5 modelsArchive; - @OriginalMember(owner = "client!eh", name = "f", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!eh", name = "f", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!h", name = "a", descriptor = "(Lclient!ve;Lclient!ve;Z)V") - public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { - modelsArchive = arg0; - archive = arg1; - } + @OriginalMember(owner = "client!h", name = "a", descriptor = "(Lclient!ve;Lclient!ve;Z)V") + public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { + modelsArchive = arg0; + archive = arg1; + } - @OriginalMember(owner = "client!rg", name = "b", descriptor = "(II)Lclient!me;") - public static NpcType get(@OriginalArg(0) int arg0) { - @Pc(10) NpcType local10 = (NpcType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(26) byte[] local26 = archive.fetchFile(method1447(arg0), method3322(arg0)); - local10 = new NpcType(); - local10.id = arg0; - if (local26 != null) { - local10.decode(new Buffer(local26)); - } - local10.method2942(); - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!rg", name = "b", descriptor = "(II)Lclient!me;") + public static NpcType get(@OriginalArg(0) int arg0) { + @Pc(10) NpcType local10 = (NpcType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(26) byte[] local26 = archive.fetchFile(method1447(arg0), method3322(arg0)); + local10 = new NpcType(); + local10.id = arg0; + if (local26 != null) { + local10.decode(new Buffer(local26)); + } + local10.method2942(); + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!t", name = "b", descriptor = "(B)V") - public static void method4001() { - types.removeSoft(); - models.removeSoft(); - headModels.removeSoft(); - } + @OriginalMember(owner = "client!t", name = "b", descriptor = "(B)V") + public static void method4001() { + types.removeSoft(); + models.removeSoft(); + headModels.removeSoft(); + } - @OriginalMember(owner = "client!qi", name = "e", descriptor = "(B)V") - public static void method3673() { - types.clear(); - models.clear(); - headModels.clear(); - } + @OriginalMember(owner = "client!qi", name = "e", descriptor = "(B)V") + public static void method3673() { + types.clear(); + models.clear(); + headModels.clear(); + } - @OriginalMember(owner = "client!ra", name = "c", descriptor = "(BI)V") - public static void clean() { - types.clean(5); - models.clean(5); - headModels.clean(5); - } + @OriginalMember(owner = "client!ra", name = "c", descriptor = "(BI)V") + public static void clean() { + types.clean(5); + models.clean(5); + headModels.clean(5); + } - @OriginalMember(owner = "client!em", name = "a", descriptor = "(II)I") - public static int method1447(@OriginalArg(0) int arg0) { - return arg0 >>> 7; - } + @OriginalMember(owner = "client!em", name = "a", descriptor = "(II)I") + public static int method1447(@OriginalArg(0) int arg0) { + return arg0 >>> 7; + } - @OriginalMember(owner = "client!oe", name = "a", descriptor = "(IZ)I") - public static int method3322(@OriginalArg(0) int arg0) { - return arg0 & 0x7F; - } + @OriginalMember(owner = "client!oe", name = "a", descriptor = "(IZ)I") + public static int method3322(@OriginalArg(0) int arg0) { + return arg0 & 0x7F; + } - @OriginalMember(owner = "client!wj", name = "b", descriptor = "(I)V") - public static void clearModels() { - models.clear(); - } + @OriginalMember(owner = "client!wj", name = "b", descriptor = "(I)V") + public static void clearModels() { + models.clear(); + } - @OriginalMember(owner = "client!ba", name = "e", descriptor = "(I)V") - public static void clearHeadModels() { - headModels.clear(); - } + @OriginalMember(owner = "client!ba", name = "e", descriptor = "(I)V") + public static void clearHeadModels() { + headModels.clear(); + } } diff --git a/client/src/main/java/rt4/ObjType.java b/client/src/main/java/rt4/ObjType.java index d65c7ad..dbbedf9 100644 --- a/client/src/main/java/rt4/ObjType.java +++ b/client/src/main/java/rt4/ObjType.java @@ -152,7 +152,7 @@ public final class ObjType { public int manwear = -1; @OriginalMember(owner = "client!h", name = "qb", descriptor = "[Lclient!na;") - public JagString[] ops = new JagString[] { null, null, LocalizedText.TAKE, null, null }; + public JagString[] ops = new JagString[]{null, null, LocalizedText.TAKE, null, null}; @OriginalMember(owner = "client!h", name = "ub", descriptor = "I") private int resizeX = 128; @@ -164,7 +164,7 @@ public final class ObjType { private int manWearYOff = 0; @OriginalMember(owner = "client!h", name = "U", descriptor = "[Lclient!na;") - public JagString[] iops = new JagString[] { null, null, null, null, LocalizedText.DROP}; + public JagString[] iops = new JagString[]{null, null, null, null, LocalizedText.DROP}; @OriginalMember(owner = "client!h", name = "Ab", descriptor = "I") public int zoom2d = 2000; @@ -183,10 +183,7 @@ public final class ObjType { if (manhead1 == -1) { return true; } - @Pc(33) boolean ready = true; - if (!ObjTypeList.modelsArchive.isFileReady(0, manhead1)) { - ready = false; - } + @Pc(33) boolean ready = ObjTypeList.modelsArchive.isFileReady(0, manhead1); if (manhead2 != -1 && !ObjTypeList.modelsArchive.isFileReady(0, manhead2)) { ready = false; } @@ -232,10 +229,7 @@ public final class ObjType { if (wear1 == -1) { return true; } - @Pc(41) boolean ready = true; - if (!ObjTypeList.modelsArchive.isFileReady(0, wear1)) { - ready = false; - } + @Pc(41) boolean ready = ObjTypeList.modelsArchive.isFileReady(0, wear1); if (wear2 != -1 && !ObjTypeList.modelsArchive.isFileReady(0, wear2)) { ready = false; } @@ -577,7 +571,7 @@ public final class ObjType { @Pc(36) RawModel model = RawModel.create(ObjTypeList.modelsArchive, head); if (head2 != -1) { @Pc(44) RawModel model2 = RawModel.create(ObjTypeList.modelsArchive, head2); - @Pc(55) RawModel[] models = new RawModel[] { model, model2 }; + @Pc(55) RawModel[] models = new RawModel[]{model, model2}; model = new RawModel(models, 2); } @Pc(66) int i; @@ -611,11 +605,11 @@ public final class ObjType { if (wear2 != -1) { @Pc(54) RawModel model2 = RawModel.create(ObjTypeList.modelsArchive, wear2); if (wear3 == -1) { - @Pc(68) RawModel[] models = new RawModel[] { model, model2 }; + @Pc(68) RawModel[] models = new RawModel[]{model, model2}; model = new RawModel(models, 2); } else { @Pc(81) RawModel model3 = RawModel.create(ObjTypeList.modelsArchive, wear3); - @Pc(96) RawModel[] models = new RawModel[] { model, model2, model3 }; + @Pc(96) RawModel[] models = new RawModel[]{model, model2, model3}; model = new RawModel(models, 3); } } diff --git a/client/src/main/java/rt4/ObjTypeList.java b/client/src/main/java/rt4/ObjTypeList.java index 4be8cd0..922f98c 100644 --- a/client/src/main/java/rt4/ObjTypeList.java +++ b/client/src/main/java/rt4/ObjTypeList.java @@ -5,115 +5,115 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ObjTypeList { - @OriginalMember(owner = "client!cb", name = "Y", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!tl", name = "c", descriptor = "Lclient!n;") - public static final SoftLruHashTable models = new SoftLruHashTable(50); - @OriginalMember(owner = "client!jd", name = "c", descriptor = "Lclient!n;") - public static final SoftLruHashTable objectSpriteCache = new SoftLruHashTable(100); - @OriginalMember(owner = "client!tg", name = "f", descriptor = "Z") - public static boolean aBoolean276; - @OriginalMember(owner = "client!sj", name = "r", descriptor = "Lclient!ve;") - public static Js5 modelsArchive; - @OriginalMember(owner = "client!um", name = "U", descriptor = "Lclient!dd;") - public static SoftwareFont font; - @OriginalMember(owner = "client!wa", name = "X", descriptor = "[Lclient!na;") - public static JagString[] aClass100Array87 = null; - @OriginalMember(owner = "client!ld", name = "g", descriptor = "[Lclient!na;") - public static JagString[] aClass100Array104 = null; - @OriginalMember(owner = "client!nh", name = "eb", descriptor = "I") - public static int anInt3245; - @OriginalMember(owner = "client!nd", name = "n", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!cb", name = "Y", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!tl", name = "c", descriptor = "Lclient!n;") + public static final SoftLruHashTable models = new SoftLruHashTable(50); + @OriginalMember(owner = "client!jd", name = "c", descriptor = "Lclient!n;") + public static final SoftLruHashTable objectSpriteCache = new SoftLruHashTable(100); + @OriginalMember(owner = "client!tg", name = "f", descriptor = "Z") + public static boolean aBoolean276; + @OriginalMember(owner = "client!sj", name = "r", descriptor = "Lclient!ve;") + public static Js5 modelsArchive; + @OriginalMember(owner = "client!um", name = "U", descriptor = "Lclient!dd;") + public static SoftwareFont font; + @OriginalMember(owner = "client!wa", name = "X", descriptor = "[Lclient!na;") + public static JagString[] aClass100Array87 = null; + @OriginalMember(owner = "client!ld", name = "g", descriptor = "[Lclient!na;") + public static JagString[] aClass100Array104 = null; + @OriginalMember(owner = "client!nh", name = "eb", descriptor = "I") + public static int anInt3245; + @OriginalMember(owner = "client!nd", name = "n", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!th", name = "a", descriptor = "(ZBLclient!ve;Lclient!dd;Lclient!ve;)V") - public static void init(@OriginalArg(2) Js5 arg0, @OriginalArg(3) SoftwareFont arg1, @OriginalArg(4) Js5 arg2) { - aBoolean276 = true; - modelsArchive = arg2; - archive = arg0; - @Pc(23) int local23 = archive.capacity() - 1; - anInt3245 = archive.getGroupCapacity(local23) + local23 * 256; - aClass100Array104 = new JagString[] { null, null, null, null, LocalizedText.DROP}; - aClass100Array87 = new JagString[] { null, null, LocalizedText.TAKE, null, null }; - font = arg1; - } + @OriginalMember(owner = "client!th", name = "a", descriptor = "(ZBLclient!ve;Lclient!dd;Lclient!ve;)V") + public static void init(@OriginalArg(2) Js5 arg0, @OriginalArg(3) SoftwareFont arg1, @OriginalArg(4) Js5 arg2) { + aBoolean276 = true; + modelsArchive = arg2; + archive = arg0; + @Pc(23) int local23 = archive.capacity() - 1; + anInt3245 = archive.getGroupCapacity(local23) + local23 * 256; + aClass100Array104 = new JagString[]{null, null, null, null, LocalizedText.DROP}; + aClass100Array87 = new JagString[]{null, null, LocalizedText.TAKE, null, null}; + font = arg1; + } - @OriginalMember(owner = "client!fk", name = "a", descriptor = "(IB)Lclient!h;") - public static ObjType get(@OriginalArg(0) int arg0) { - @Pc(6) ObjType local6 = (ObjType) types.get((long) arg0); - if (local6 != null) { - return local6; - } - @Pc(25) byte[] local25 = archive.fetchFile(method554(arg0), method4247(arg0)); - local6 = new ObjType(); - local6.id = arg0; - if (local25 != null) { - local6.decode(new Buffer(local25)); - } - local6.postDecode(); - if (local6.certtemplate != -1) { - local6.generateCertificate(get(local6.certlink), get(local6.certtemplate)); - } - if (local6.lentTemplate != -1) { - local6.generateLent(get(local6.lentLink), get(local6.lentTemplate)); - } - if (!aBoolean276 && local6.members) { - local6.name = LocalizedText.MEMBERS_OBJECT; - local6.team = 0; - local6.iops = aClass100Array104; - local6.stockMarket = false; - local6.ops = aClass100Array87; - } - types.put(local6, (long) arg0); - return local6; - } + @OriginalMember(owner = "client!fk", name = "a", descriptor = "(IB)Lclient!h;") + public static ObjType get(@OriginalArg(0) int arg0) { + @Pc(6) ObjType local6 = (ObjType) types.get(arg0); + if (local6 != null) { + return local6; + } + @Pc(25) byte[] local25 = archive.fetchFile(method554(arg0), method4247(arg0)); + local6 = new ObjType(); + local6.id = arg0; + if (local25 != null) { + local6.decode(new Buffer(local25)); + } + local6.postDecode(); + if (local6.certtemplate != -1) { + local6.generateCertificate(get(local6.certlink), get(local6.certtemplate)); + } + if (local6.lentTemplate != -1) { + local6.generateLent(get(local6.lentLink), get(local6.lentTemplate)); + } + if (!aBoolean276 && local6.members) { + local6.name = LocalizedText.MEMBERS_OBJECT; + local6.team = 0; + local6.iops = aClass100Array104; + local6.stockMarket = false; + local6.ops = aClass100Array87; + } + types.put(local6, arg0); + return local6; + } - @OriginalMember(owner = "client!i", name = "r", descriptor = "(I)V") - public static void method2239() { - types.removeSoft(); - models.removeSoft(); - objectSpriteCache.removeSoft(); - } + @OriginalMember(owner = "client!i", name = "r", descriptor = "(I)V") + public static void method2239() { + types.removeSoft(); + models.removeSoft(); + objectSpriteCache.removeSoft(); + } - @OriginalMember(owner = "client!ob", name = "a", descriptor = "(B)V") - public static void method3302() { - types.clear(); - models.clear(); - objectSpriteCache.clear(); - } + @OriginalMember(owner = "client!ob", name = "a", descriptor = "(B)V") + public static void method3302() { + types.clear(); + models.clear(); + objectSpriteCache.clear(); + } - @OriginalMember(owner = "client!pf", name = "c", descriptor = "(II)V") - public static void clean() { - types.clean(5); - models.clean(5); - objectSpriteCache.clean(5); - } + @OriginalMember(owner = "client!pf", name = "c", descriptor = "(II)V") + public static void clean() { + types.clean(5); + models.clean(5); + objectSpriteCache.clean(5); + } - @OriginalMember(owner = "client!al", name = "a", descriptor = "(ZI)V") - public static void setAllowMembers(@OriginalArg(0) boolean arg0) { - if (arg0 != aBoolean276) { - aBoolean276 = arg0; - method3302(); - } - } + @OriginalMember(owner = "client!al", name = "a", descriptor = "(ZI)V") + public static void setAllowMembers(@OriginalArg(0) boolean arg0) { + if (arg0 != aBoolean276) { + aBoolean276 = arg0; + method3302(); + } + } - @OriginalMember(owner = "client!rc", name = "a", descriptor = "(Z)V") - public static void clearModels() { - models.clear(); - } + @OriginalMember(owner = "client!rc", name = "a", descriptor = "(Z)V") + public static void clearModels() { + models.clear(); + } - @OriginalMember(owner = "client!wa", name = "e", descriptor = "(B)V") + @OriginalMember(owner = "client!wa", name = "e", descriptor = "(B)V") public static void clearSprites() { objectSpriteCache.clear(); } - @OriginalMember(owner = "client!ub", name = "a", descriptor = "(IB)I") - public static int method4247(@OriginalArg(0) int arg0) { - return arg0 & 0xFF; - } + @OriginalMember(owner = "client!ub", name = "a", descriptor = "(IB)I") + public static int method4247(@OriginalArg(0) int arg0) { + return arg0 & 0xFF; + } - @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IB)I") - public static int method554(@OriginalArg(0) int arg0) { - return arg0 >>> 8; - } + @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IB)I") + public static int method554(@OriginalArg(0) int arg0) { + return arg0 >>> 8; + } } diff --git a/client/src/main/java/rt4/OverheadChat.java b/client/src/main/java/rt4/OverheadChat.java index 31c9dde..a6f3719 100644 --- a/client/src/main/java/rt4/OverheadChat.java +++ b/client/src/main/java/rt4/OverheadChat.java @@ -4,33 +4,33 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class OverheadChat { - @OriginalMember(owner = "client!bi", name = "f", descriptor = "(B)V") - public static void loop() { - @Pc(11) int local11; - for (local11 = -1; local11 < PlayerList.size; local11++) { - @Pc(22) int local22; - if (local11 == -1) { - local22 = 2047; - } else { - local22 = PlayerList.ids[local11]; - } - @Pc(30) Player local30 = PlayerList.players[local22]; - if (local30 != null && local30.chatLoops > 0) { - local30.chatLoops--; - if (local30.chatLoops == 0) { - local30.chatMessage = null; - } - } - } - for (local11 = 0; local11 < NpcList.size; local11++) { - @Pc(68) int local68 = NpcList.ids[local11]; - @Pc(72) Npc local72 = NpcList.npcs[local68]; - if (local72 != null && local72.chatLoops > 0) { - local72.chatLoops--; - if (local72.chatLoops == 0) { - local72.chatMessage = null; - } - } - } - } + @OriginalMember(owner = "client!bi", name = "f", descriptor = "(B)V") + public static void loop() { + @Pc(11) int local11; + for (local11 = -1; local11 < PlayerList.size; local11++) { + @Pc(22) int local22; + if (local11 == -1) { + local22 = 2047; + } else { + local22 = PlayerList.ids[local11]; + } + @Pc(30) Player local30 = PlayerList.players[local22]; + if (local30 != null && local30.chatLoops > 0) { + local30.chatLoops--; + if (local30.chatLoops == 0) { + local30.chatMessage = null; + } + } + } + for (local11 = 0; local11 < NpcList.size; local11++) { + @Pc(68) int local68 = NpcList.ids[local11]; + @Pc(72) Npc local72 = NpcList.npcs[local68]; + if (local72 != null && local72.chatLoops > 0) { + local72.chatLoops--; + if (local72.chatLoops == 0) { + local72.chatMessage = null; + } + } + } + } } diff --git a/client/src/main/java/rt4/Packet.java b/client/src/main/java/rt4/Packet.java index 0575860..8132a51 100644 --- a/client/src/main/java/rt4/Packet.java +++ b/client/src/main/java/rt4/Packet.java @@ -9,7 +9,7 @@ import org.openrs2.deob.annotation.Pc; public final class Packet extends Buffer { @OriginalMember(owner = "client!bh", name = "G", descriptor = "[I") - public static final int[] BIT_MASKS = new int[] { 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, Integer.MAX_VALUE, -1 }; + public static final int[] BIT_MASKS = new int[]{0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, Integer.MAX_VALUE, -1}; @OriginalMember(owner = "client!i", name = "Xb", descriptor = "Lclient!ij;") private IsaacRandom isaac; diff --git a/client/src/main/java/rt4/ParamTypeList.java b/client/src/main/java/rt4/ParamTypeList.java index 3a39b82..54d13d3 100644 --- a/client/src/main/java/rt4/ParamTypeList.java +++ b/client/src/main/java/rt4/ParamTypeList.java @@ -5,28 +5,28 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ParamTypeList { - @OriginalMember(owner = "client!wd", name = "a", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(64); - @OriginalMember(owner = "client!d", name = "hb", descriptor = "Lclient!ve;") + @OriginalMember(owner = "client!wd", name = "a", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(64); + @OriginalMember(owner = "client!d", name = "hb", descriptor = "Lclient!ve;") public static Js5 archive; - @OriginalMember(owner = "client!sf", name = "a", descriptor = "(BLclient!ve;)V") - public static void init(@OriginalArg(1) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!sf", name = "a", descriptor = "(BLclient!ve;)V") + public static void init(@OriginalArg(1) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(II)Lclient!hn;") - public static ParamType get(@OriginalArg(1) int arg0) { - @Pc(6) ParamType local6 = (ParamType) types.get((long) arg0); - if (local6 != null) { - return local6; - } - @Pc(30) byte[] local30 = archive.fetchFile(11, arg0); - local6 = new ParamType(); - if (local30 != null) { - local6.decode(new Buffer(local30)); - } - types.put(local6, (long) arg0); - return local6; - } + @OriginalMember(owner = "client!ih", name = "a", descriptor = "(II)Lclient!hn;") + public static ParamType get(@OriginalArg(1) int arg0) { + @Pc(6) ParamType local6 = (ParamType) types.get(arg0); + if (local6 != null) { + return local6; + } + @Pc(30) byte[] local30 = archive.fetchFile(11, arg0); + local6 = new ParamType(); + if (local30 != null) { + local6.decode(new Buffer(local30)); + } + types.put(local6, arg0); + return local6; + } } diff --git a/client/src/main/java/rt4/ParticleSystem.java b/client/src/main/java/rt4/ParticleSystem.java index 61df4f1..3bfc8c1 100644 --- a/client/src/main/java/rt4/ParticleSystem.java +++ b/client/src/main/java/rt4/ParticleSystem.java @@ -15,30 +15,30 @@ public final class ParticleSystem extends ParticleNode { new Buffer(131056); } - @OriginalMember(owner = "client!ga", name = "a", descriptor = "()V") - public static void load() { - @Pc(1) GL2 gl = GlRenderer.gl; - if (gl.isExtensionAvailable("GL_ARB_point_parameters")) { - @Pc(20) float[] coefficients = new float[] { 1.0F, 0.0F, 5.0E-4F }; - gl.glPointParameterfv(GL2.GL_POINT_DISTANCE_ATTENUATION, coefficients, 0); - @Pc(28) FloatBuffer buffer = FloatBuffer.allocate(1); - gl.glGetFloatv(GL2.GL_POINT_SIZE_MAX, buffer); - @Pc(36) float pointSizeMax = buffer.get(0); - if (pointSizeMax > 1024.0F) { - pointSizeMax = 1024.0F; - } - gl.glPointParameterf(GL2.GL_POINT_SIZE_MIN, 1.0F); - gl.glPointParameterf(GL2.GL_POINT_SIZE_MAX, pointSizeMax); - } - if (gl.isExtensionAvailable("GL_ARB_point_sprite")) { - } - } + @OriginalMember(owner = "client!ga", name = "a", descriptor = "()V") + public static void load() { + @Pc(1) GL2 gl = GlRenderer.gl; + if (gl.isExtensionAvailable("GL_ARB_point_parameters")) { + @Pc(20) float[] coefficients = new float[]{1.0F, 0.0F, 5.0E-4F}; + gl.glPointParameterfv(GL2.GL_POINT_DISTANCE_ATTENUATION, coefficients, 0); + @Pc(28) FloatBuffer buffer = FloatBuffer.allocate(1); + gl.glGetFloatv(GL2.GL_POINT_SIZE_MAX, buffer); + @Pc(36) float pointSizeMax = buffer.get(0); + if (pointSizeMax > 1024.0F) { + pointSizeMax = 1024.0F; + } + gl.glPointParameterf(GL2.GL_POINT_SIZE_MIN, 1.0F); + gl.glPointParameterf(GL2.GL_POINT_SIZE_MAX, pointSizeMax); + } + if (gl.isExtensionAvailable("GL_ARB_point_sprite")) { + } + } - @OriginalMember(owner = "client!ga", name = "b", descriptor = "()V") - public static void quit() { - } + @OriginalMember(owner = "client!ga", name = "b", descriptor = "()V") + public static void quit() { + } - @OriginalMember(owner = "client!ga", name = "d", descriptor = "()V") + @OriginalMember(owner = "client!ga", name = "d", descriptor = "()V") public final void method1646() { } } diff --git a/client/src/main/java/rt4/PathFinder.java b/client/src/main/java/rt4/PathFinder.java index 8b3575a..48ee63e 100644 --- a/client/src/main/java/rt4/PathFinder.java +++ b/client/src/main/java/rt4/PathFinder.java @@ -5,661 +5,650 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class PathFinder { - @OriginalMember(owner = "client!li", name = "h", descriptor = "[Lclient!mj;") - public static final CollisionMap[] collisionMaps = new CollisionMap[4]; - @OriginalMember(owner = "client!lf", name = "a", descriptor = "[[I") - public static final int[][] parents = new int[104][104]; - @OriginalMember(owner = "client!nd", name = "q", descriptor = "[[I") - public static final int[][] costs = new int[104][104]; - @OriginalMember(owner = "client!vc", name = "eb", descriptor = "[I") - public static final int[] queueX = new int[4096]; - @OriginalMember(owner = "client!gk", name = "c", descriptor = "[I") + @OriginalMember(owner = "client!li", name = "h", descriptor = "[Lclient!mj;") + public static final CollisionMap[] collisionMaps = new CollisionMap[4]; + @OriginalMember(owner = "client!lf", name = "a", descriptor = "[[I") + public static final int[][] parents = new int[104][104]; + @OriginalMember(owner = "client!nd", name = "q", descriptor = "[[I") + public static final int[][] costs = new int[104][104]; + @OriginalMember(owner = "client!vc", name = "eb", descriptor = "[I") + public static final int[] queueX = new int[4096]; + @OriginalMember(owner = "client!gk", name = "c", descriptor = "[I") public static final int[] queueZ = new int[4096]; - @OriginalMember(owner = "client!s", name = "d", descriptor = "I") - public static int anInt4364 = 0; + @OriginalMember(owner = "client!s", name = "d", descriptor = "I") + public static int anInt4364 = 0; - @OriginalMember(owner = "client!hn", name = "a", descriptor = "(IIIZIIIIIIII)Z") - public static boolean findPath(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) boolean arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) { - if (PlayerList.self.getSize() == 2) { - return findPath2(arg6, arg7, arg4, arg0, arg9, arg3, arg2, arg1, arg5, arg8, arg10); - } else if (PlayerList.self.getSize() <= 2) { - return findPathN(arg5, arg4, arg10, arg9, arg8, arg2, arg1, arg3, arg7, arg0, arg6); - } else { - return findPath1(arg9, arg6, arg8, arg1, PlayerList.self.getSize(), arg5, arg7, arg4, arg10, arg2, arg3, arg0); - } - } + @OriginalMember(owner = "client!hn", name = "a", descriptor = "(IIIZIIIIIIII)Z") + public static boolean findPath(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) boolean arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) { + if (PlayerList.self.getSize() == 2) { + return findPath2(arg6, arg7, arg4, arg0, arg9, arg3, arg2, arg1, arg5, arg8, arg10); + } else if (PlayerList.self.getSize() <= 2) { + return findPathN(arg5, arg4, arg10, arg9, arg8, arg2, arg1, arg3, arg7, arg0, arg6); + } else { + return findPath1(arg9, arg6, arg8, arg1, PlayerList.self.getSize(), arg5, arg7, arg4, arg10, arg2, arg3, arg0); + } + } - @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IIIIIZIIIIII)Z") - public static boolean findPath2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) boolean arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9, @OriginalArg(11) int arg10) { - @Pc(3) int x; - @Pc(8) int z; - for (x = 0; x < 104; x++) { - for (z = 0; z < 104; z++) { - parents[x][z] = 0; - costs[x][z] = 99999999; - } - } - parents[arg10][arg3] = 99; - costs[arg10][arg3] = 0; - z = arg3; - x = arg10; - @Pc(53) byte local53 = 0; - queueX[0] = arg10; - @Pc(59) boolean local59 = false; - @Pc(61) int local61 = 0; - @Pc(64) int queueWriterIndex = local53 + 1; - queueZ[0] = arg3; - @Pc(71) int[][] flags = collisionMaps[Player.level].flags; - @Pc(193) int cost; - while (local61 != queueWriterIndex) { - x = queueX[local61]; - z = queueZ[local61]; - local61 = local61 + 1 & 0xFFF; - if (arg8 == x && arg4 == z) { - local59 = true; - break; - } - if (arg1 != 0) { - if ((arg1 < 5 || arg1 == 10) && collisionMaps[Player.level].isAtWall(arg4, x, z, arg8, arg1 - 1, 2, arg7)) { - local59 = true; - break; - } - if (arg1 < 10 && collisionMaps[Player.level].isAtWallDecor(arg4, arg1 - 1, arg8, z, 2, arg7, x)) { - local59 = true; - break; - } - } - if (arg0 != 0 && arg6 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg8, z, x, 2, arg0, arg2, arg4, arg6)) { - local59 = true; - break; - } - cost = costs[x][z] + 1; - if (x > 0 && parents[x - 1][z] == 0 && (flags[x - 1][z] & 0x12C010E) == 0 && (flags[x - 1][z + 1] & 0x12C0138) == 0) { - queueX[queueWriterIndex] = x - 1; - queueZ[queueWriterIndex] = z; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - parents[x - 1][z] = 2; - costs[x - 1][z] = cost; - } - if (x < 102 && parents[x + 1][z] == 0 && (flags[x + 2][z] & 0x12C0183) == 0 && (flags[x + 2][z + 1] & 0x12C01E0) == 0) { - queueX[queueWriterIndex] = x + 1; - queueZ[queueWriterIndex] = z; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - parents[x + 1][z] = 8; - costs[x + 1][z] = cost; - } - if (z > 0 && parents[x][z - 1] == 0 && (flags[x][z - 1] & 0x12C010E) == 0 && (flags[x + 1][z - 1] & 0x12C0183) == 0) { - queueX[queueWriterIndex] = x; - queueZ[queueWriterIndex] = z - 1; - parents[x][z - 1] = 1; - costs[x][z - 1] = cost; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - } - if (z < 102 && parents[x][z + 1] == 0 && (flags[x][z + 2] & 0x12C0138) == 0 && (flags[x + 1][z + 2] & 0x12C01E0) == 0) { - queueX[queueWriterIndex] = x; - queueZ[queueWriterIndex] = z + 1; - parents[x][z + 1] = 4; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - costs[x][z + 1] = cost; - } - if (x > 0 && z > 0 && parents[x - 1][z - 1] == 0 && (flags[x - 1][z] & 0x12C0138) == 0 && (flags[x - 1][z - 1] & 0x12C010E) == 0 && (flags[x][z - 1] & 0x12C0183) == 0) { - queueX[queueWriterIndex] = x - 1; - queueZ[queueWriterIndex] = z - 1; - parents[x - 1][z - 1] = 3; - costs[x - 1][z - 1] = cost; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - } - if (x < 102 && z > 0 && parents[x + 1][z - 1] == 0 && (flags[x + 1][z - 1] & 0x12C010E) == 0 && (flags[x + 2][z - 1] & 0x12C0183) == 0 && (flags[x + 2][z] & 0x12C01E0) == 0) { - queueX[queueWriterIndex] = x + 1; - queueZ[queueWriterIndex] = z - 1; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - parents[x + 1][z - 1] = 9; - costs[x + 1][z - 1] = cost; - } - if (x > 0 && z < 102 && parents[x - 1][z + 1] == 0 && (flags[x - 1][z + 1] & 0x12C010E) == 0 && (flags[x - 1][z + 2] & 0x12C0138) == 0 && (flags[x][z + 2] & 0x12C01E0) == 0) { - queueX[queueWriterIndex] = x - 1; - queueZ[queueWriterIndex] = z + 1; - parents[x - 1][z + 1] = 6; - costs[x - 1][z + 1] = cost; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - } - if (x < 102 && z < 102 && parents[x + 1][z + 1] == 0 && (flags[x + 1][z + 2] & 0x12C0138) == 0 && (flags[x + 2][z + 2] & 0x12C01E0) == 0 && (flags[x + 2][z + 1] & 0x12C0183) == 0) { - queueX[queueWriterIndex] = x + 1; - queueZ[queueWriterIndex] = z + 1; - queueWriterIndex = queueWriterIndex + 1 & 0xFFF; - parents[x + 1][z + 1] = 12; - costs[x + 1][z + 1] = cost; - } - } - anInt4364 = 0; - @Pc(921) int local921; - if (!local59) { - if (!arg5) { - return false; - } - cost = 1000; - local921 = 100; - for (@Pc(928) int local928 = arg8 - 10; local928 <= arg8 + 10; local928++) { - for (@Pc(942) int local942 = arg4 - 10; local942 <= arg4 + 10; local942++) { - if (local928 >= 0 && local942 >= 0 && local928 < 104 && local942 < 104 && costs[local928][local942] < 100) { - @Pc(978) int local978 = 0; - @Pc(980) int local980 = 0; - if (local928 < arg8) { - local978 = arg8 - local928; - } else if (local928 > arg0 + arg8 - 1) { - local978 = local928 + 1 - arg0 - arg8; - } - if (arg4 > local942) { - local980 = arg4 - local942; - } else if (local942 > arg4 + arg6 - 1) { - local980 = local942 + 1 - arg4 - arg6; - } - @Pc(1057) int local1057 = local978 * local978 + local980 * local980; - if (local1057 < cost || cost == local1057 && costs[local928][local942] < local921) { - z = local942; - local921 = costs[local928][local942]; - cost = local1057; - x = local928; - } - } - } - } - if (cost == 1000) { - return false; - } - if (arg10 == x && z == arg3) { - return false; - } - anInt4364 = 1; - } - @Pc(1121) byte local1121 = 0; - queueX[0] = x; - local61 = local1121 + 1; - queueZ[0] = z; - cost = local921 = parents[x][z]; - while (arg10 != x || arg3 != z) { - if (local921 != cost) { - queueX[local61] = x; - queueZ[local61++] = z; - local921 = cost; - } - if ((cost & 0x2) != 0) { - x++; - } else if ((cost & 0x8) != 0) { - x--; - } - if ((cost & 0x1) != 0) { - z++; - } else if ((cost & 0x4) != 0) { - z--; - } - cost = parents[x][z]; - } - if (local61 > 0) { - ClientProt.method3502(local61, arg9); - return true; - } else if (arg9 == 1) { - return false; - } else { - return true; - } - } + @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IIIIIZIIIIII)Z") + public static boolean findPath2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) boolean arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9, @OriginalArg(11) int arg10) { + @Pc(3) int x; + @Pc(8) int z; + for (x = 0; x < 104; x++) { + for (z = 0; z < 104; z++) { + parents[x][z] = 0; + costs[x][z] = 99999999; + } + } + parents[arg10][arg3] = 99; + costs[arg10][arg3] = 0; + z = arg3; + x = arg10; + @Pc(53) byte local53 = 0; + queueX[0] = arg10; + @Pc(59) boolean local59 = false; + @Pc(61) int local61 = 0; + @Pc(64) int queueWriterIndex = local53 + 1; + queueZ[0] = arg3; + @Pc(71) int[][] flags = collisionMaps[Player.level].flags; + @Pc(193) int cost; + while (local61 != queueWriterIndex) { + x = queueX[local61]; + z = queueZ[local61]; + local61 = local61 + 1 & 0xFFF; + if (arg8 == x && arg4 == z) { + local59 = true; + break; + } + if (arg1 != 0) { + if ((arg1 < 5 || arg1 == 10) && collisionMaps[Player.level].isAtWall(arg4, x, z, arg8, arg1 - 1, 2, arg7)) { + local59 = true; + break; + } + if (arg1 < 10 && collisionMaps[Player.level].isAtWallDecor(arg4, arg1 - 1, arg8, z, 2, arg7, x)) { + local59 = true; + break; + } + } + if (arg0 != 0 && arg6 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg8, z, x, 2, arg0, arg2, arg4, arg6)) { + local59 = true; + break; + } + cost = costs[x][z] + 1; + if (x > 0 && parents[x - 1][z] == 0 && (flags[x - 1][z] & 0x12C010E) == 0 && (flags[x - 1][z + 1] & 0x12C0138) == 0) { + queueX[queueWriterIndex] = x - 1; + queueZ[queueWriterIndex] = z; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + parents[x - 1][z] = 2; + costs[x - 1][z] = cost; + } + if (x < 102 && parents[x + 1][z] == 0 && (flags[x + 2][z] & 0x12C0183) == 0 && (flags[x + 2][z + 1] & 0x12C01E0) == 0) { + queueX[queueWriterIndex] = x + 1; + queueZ[queueWriterIndex] = z; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + parents[x + 1][z] = 8; + costs[x + 1][z] = cost; + } + if (z > 0 && parents[x][z - 1] == 0 && (flags[x][z - 1] & 0x12C010E) == 0 && (flags[x + 1][z - 1] & 0x12C0183) == 0) { + queueX[queueWriterIndex] = x; + queueZ[queueWriterIndex] = z - 1; + parents[x][z - 1] = 1; + costs[x][z - 1] = cost; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + } + if (z < 102 && parents[x][z + 1] == 0 && (flags[x][z + 2] & 0x12C0138) == 0 && (flags[x + 1][z + 2] & 0x12C01E0) == 0) { + queueX[queueWriterIndex] = x; + queueZ[queueWriterIndex] = z + 1; + parents[x][z + 1] = 4; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + costs[x][z + 1] = cost; + } + if (x > 0 && z > 0 && parents[x - 1][z - 1] == 0 && (flags[x - 1][z] & 0x12C0138) == 0 && (flags[x - 1][z - 1] & 0x12C010E) == 0 && (flags[x][z - 1] & 0x12C0183) == 0) { + queueX[queueWriterIndex] = x - 1; + queueZ[queueWriterIndex] = z - 1; + parents[x - 1][z - 1] = 3; + costs[x - 1][z - 1] = cost; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + } + if (x < 102 && z > 0 && parents[x + 1][z - 1] == 0 && (flags[x + 1][z - 1] & 0x12C010E) == 0 && (flags[x + 2][z - 1] & 0x12C0183) == 0 && (flags[x + 2][z] & 0x12C01E0) == 0) { + queueX[queueWriterIndex] = x + 1; + queueZ[queueWriterIndex] = z - 1; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + parents[x + 1][z - 1] = 9; + costs[x + 1][z - 1] = cost; + } + if (x > 0 && z < 102 && parents[x - 1][z + 1] == 0 && (flags[x - 1][z + 1] & 0x12C010E) == 0 && (flags[x - 1][z + 2] & 0x12C0138) == 0 && (flags[x][z + 2] & 0x12C01E0) == 0) { + queueX[queueWriterIndex] = x - 1; + queueZ[queueWriterIndex] = z + 1; + parents[x - 1][z + 1] = 6; + costs[x - 1][z + 1] = cost; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + } + if (x < 102 && z < 102 && parents[x + 1][z + 1] == 0 && (flags[x + 1][z + 2] & 0x12C0138) == 0 && (flags[x + 2][z + 2] & 0x12C01E0) == 0 && (flags[x + 2][z + 1] & 0x12C0183) == 0) { + queueX[queueWriterIndex] = x + 1; + queueZ[queueWriterIndex] = z + 1; + queueWriterIndex = queueWriterIndex + 1 & 0xFFF; + parents[x + 1][z + 1] = 12; + costs[x + 1][z + 1] = cost; + } + } + anInt4364 = 0; + @Pc(921) int local921; + if (!local59) { + if (!arg5) { + return false; + } + cost = 1000; + local921 = 100; + for (@Pc(928) int local928 = arg8 - 10; local928 <= arg8 + 10; local928++) { + for (@Pc(942) int local942 = arg4 - 10; local942 <= arg4 + 10; local942++) { + if (local928 >= 0 && local942 >= 0 && local928 < 104 && local942 < 104 && costs[local928][local942] < 100) { + @Pc(978) int local978 = 0; + @Pc(980) int local980 = 0; + if (local928 < arg8) { + local978 = arg8 - local928; + } else if (local928 > arg0 + arg8 - 1) { + local978 = local928 + 1 - arg0 - arg8; + } + if (arg4 > local942) { + local980 = arg4 - local942; + } else if (local942 > arg4 + arg6 - 1) { + local980 = local942 + 1 - arg4 - arg6; + } + @Pc(1057) int local1057 = local978 * local978 + local980 * local980; + if (local1057 < cost || cost == local1057 && costs[local928][local942] < local921) { + z = local942; + local921 = costs[local928][local942]; + cost = local1057; + x = local928; + } + } + } + } + if (cost == 1000) { + return false; + } + if (arg10 == x && z == arg3) { + return false; + } + anInt4364 = 1; + } + @Pc(1121) byte local1121 = 0; + queueX[0] = x; + local61 = local1121 + 1; + queueZ[0] = z; + cost = local921 = parents[x][z]; + while (arg10 != x || arg3 != z) { + if (local921 != cost) { + queueX[local61] = x; + queueZ[local61++] = z; + local921 = cost; + } + if ((cost & 0x2) != 0) { + x++; + } else if ((cost & 0x8) != 0) { + x--; + } + if ((cost & 0x1) != 0) { + z++; + } else if ((cost & 0x4) != 0) { + z--; + } + cost = parents[x][z]; + } + if (local61 > 0) { + ClientProt.method3502(local61, arg9); + return true; + } else return arg9 != 1; + } - @OriginalMember(owner = "client!di", name = "a", descriptor = "(IIIIIIIIZIII)Z") - public static boolean findPathN(@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) boolean arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) { - @Pc(3) int local3; - @Pc(10) int local10; - for (local3 = 0; local3 < 104; local3++) { - for (local10 = 0; local10 < 104; local10++) { - parents[local3][local10] = 0; - costs[local3][local10] = 99999999; - } - } - local3 = arg2; - parents[arg2][arg9] = 99; - local10 = arg9; - costs[arg2][arg9] = 0; - @Pc(51) byte local51 = 0; - @Pc(53) boolean local53 = false; - @Pc(64) int local64 = 0; - queueX[0] = arg2; - @Pc(71) int local71 = local51 + 1; - queueZ[0] = arg9; - @Pc(78) int[][] local78 = collisionMaps[Player.level].flags; - @Pc(198) int local198; - while (local71 != local64) { - local10 = queueZ[local64]; - local3 = queueX[local64]; - local64 = local64 + 1 & 0xFFF; - if (local3 == arg0 && local10 == arg3) { - local53 = true; - break; - } - if (arg8 != 0) { - if ((arg8 < 5 || arg8 == 10) && collisionMaps[Player.level].isAtWall(arg3, local3, local10, arg0, arg8 - 1, 1, arg6)) { - local53 = true; - break; - } - if (arg8 < 10 && collisionMaps[Player.level].isAtWallDecor(arg3, arg8 - 1, arg0, local10, 1, arg6, local3)) { - local53 = true; - break; - } - } - if (arg10 != 0 && arg5 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg0, local10, local3, 1, arg10, arg1, arg3, arg5)) { - local53 = true; - break; - } - local198 = costs[local3][local10] + 1; - if (local3 > 0 && parents[local3 - 1][local10] == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0) { - queueX[local71] = local3 - 1; - queueZ[local71] = local10; - local71 = local71 + 1 & 0xFFF; - parents[local3 - 1][local10] = 2; - costs[local3 - 1][local10] = local198; - } - if (local3 < 103 && parents[local3 + 1][local10] == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0) { - queueX[local71] = local3 + 1; - queueZ[local71] = local10; - local71 = local71 + 1 & 0xFFF; - parents[local3 + 1][local10] = 8; - costs[local3 + 1][local10] = local198; - } - if (local10 > 0 && parents[local3][local10 - 1] == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { - queueX[local71] = local3; - queueZ[local71] = local10 - 1; - parents[local3][local10 - 1] = 1; - local71 = local71 + 1 & 0xFFF; - costs[local3][local10 - 1] = local198; - } - if (local10 < 103 && parents[local3][local10 + 1] == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { - queueX[local71] = local3; - queueZ[local71] = local10 + 1; - local71 = local71 + 1 & 0xFFF; - parents[local3][local10 + 1] = 4; - costs[local3][local10 + 1] = local198; - } - if (local3 > 0 && local10 > 0 && parents[local3 - 1][local10 - 1] == 0 && (local78[local3 - 1][local10 - 1] & 0x12C010E) == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { - queueX[local71] = local3 - 1; - queueZ[local71] = local10 - 1; - local71 = local71 + 1 & 0xFFF; - parents[local3 - 1][local10 - 1] = 3; - costs[local3 - 1][local10 - 1] = local198; - } - if (local3 < 103 && local10 > 0 && parents[local3 + 1][local10 - 1] == 0 && (local78[local3 + 1][local10 - 1] & 0x12C0183) == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { - queueX[local71] = local3 + 1; - queueZ[local71] = local10 - 1; - local71 = local71 + 1 & 0xFFF; - parents[local3 + 1][local10 - 1] = 9; - costs[local3 + 1][local10 - 1] = local198; - } - if (local3 > 0 && local10 < 103 && parents[local3 - 1][local10 + 1] == 0 && (local78[local3 - 1][local10 + 1] & 0x12C0138) == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { - queueX[local71] = local3 - 1; - queueZ[local71] = local10 + 1; - parents[local3 - 1][local10 + 1] = 6; - local71 = local71 + 1 & 0xFFF; - costs[local3 - 1][local10 + 1] = local198; - } - if (local3 < 103 && local10 < 103 && parents[local3 + 1][local10 + 1] == 0 && (local78[local3 + 1][local10 + 1] & 0x12C01E0) == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { - queueX[local71] = local3 + 1; - queueZ[local71] = local10 + 1; - parents[local3 + 1][local10 + 1] = 12; - local71 = local71 + 1 & 0xFFF; - costs[local3 + 1][local10 + 1] = local198; - } - } - anInt4364 = 0; - @Pc(839) int local839; - if (!local53) { - if (!arg7) { - return false; - } - local198 = 1000; - local839 = 100; - for (@Pc(846) int local846 = arg0 - 10; local846 <= arg0 + 10; local846++) { - for (@Pc(856) int local856 = arg3 - 10; local856 <= arg3 + 10; local856++) { - if (local846 >= 0 && local856 >= 0 && local846 < 104 && local856 < 104 && costs[local846][local856] < 100) { - @Pc(894) int local894 = 0; - if (local856 < arg3) { - local894 = arg3 - local856; - } else if (arg5 + arg3 - 1 < local856) { - local894 = local856 + 1 - arg3 - arg5; - } - @Pc(927) int local927 = 0; - if (local846 < arg0) { - local927 = arg0 - local846; - } else if (local846 > arg10 + arg0 - 1) { - local927 = local846 + 1 - arg10 - arg0; - } - @Pc(968) int local968 = local894 * local894 + local927 * local927; - if (local968 < local198 || local968 == local198 && costs[local846][local856] < local839) { - local10 = local856; - local198 = local968; - local3 = local846; - local839 = costs[local846][local856]; - } - } - } - } - if (local198 == 1000) { - return false; - } - if (arg2 == local3 && local10 == arg9) { - return false; - } - anInt4364 = 1; - } - @Pc(1032) byte local1032 = 0; - queueX[0] = local3; - local64 = local1032 + 1; - queueZ[0] = local10; - local198 = local839 = parents[local3][local10]; - while (arg2 != local3 || local10 != arg9) { - if (local839 != local198) { - local839 = local198; - queueX[local64] = local3; - queueZ[local64++] = local10; - } - if ((local198 & 0x2) != 0) { - local3++; - } else if ((local198 & 0x8) != 0) { - local3--; - } - if ((local198 & 0x1) != 0) { - local10++; - } else if ((local198 & 0x4) != 0) { - local10--; - } - local198 = parents[local3][local10]; - } - if (local64 > 0) { - ClientProt.method3502(local64, arg4); - return true; - } else if (arg4 == 1) { - return false; - } else { - return true; - } - } + @OriginalMember(owner = "client!di", name = "a", descriptor = "(IIIIIIIIZIII)Z") + public static boolean findPathN(@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) boolean arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) { + @Pc(3) int local3; + @Pc(10) int local10; + for (local3 = 0; local3 < 104; local3++) { + for (local10 = 0; local10 < 104; local10++) { + parents[local3][local10] = 0; + costs[local3][local10] = 99999999; + } + } + local3 = arg2; + parents[arg2][arg9] = 99; + local10 = arg9; + costs[arg2][arg9] = 0; + @Pc(51) byte local51 = 0; + @Pc(53) boolean local53 = false; + @Pc(64) int local64 = 0; + queueX[0] = arg2; + @Pc(71) int local71 = local51 + 1; + queueZ[0] = arg9; + @Pc(78) int[][] local78 = collisionMaps[Player.level].flags; + @Pc(198) int local198; + while (local71 != local64) { + local10 = queueZ[local64]; + local3 = queueX[local64]; + local64 = local64 + 1 & 0xFFF; + if (local3 == arg0 && local10 == arg3) { + local53 = true; + break; + } + if (arg8 != 0) { + if ((arg8 < 5 || arg8 == 10) && collisionMaps[Player.level].isAtWall(arg3, local3, local10, arg0, arg8 - 1, 1, arg6)) { + local53 = true; + break; + } + if (arg8 < 10 && collisionMaps[Player.level].isAtWallDecor(arg3, arg8 - 1, arg0, local10, 1, arg6, local3)) { + local53 = true; + break; + } + } + if (arg10 != 0 && arg5 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg0, local10, local3, 1, arg10, arg1, arg3, arg5)) { + local53 = true; + break; + } + local198 = costs[local3][local10] + 1; + if (local3 > 0 && parents[local3 - 1][local10] == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0) { + queueX[local71] = local3 - 1; + queueZ[local71] = local10; + local71 = local71 + 1 & 0xFFF; + parents[local3 - 1][local10] = 2; + costs[local3 - 1][local10] = local198; + } + if (local3 < 103 && parents[local3 + 1][local10] == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0) { + queueX[local71] = local3 + 1; + queueZ[local71] = local10; + local71 = local71 + 1 & 0xFFF; + parents[local3 + 1][local10] = 8; + costs[local3 + 1][local10] = local198; + } + if (local10 > 0 && parents[local3][local10 - 1] == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { + queueX[local71] = local3; + queueZ[local71] = local10 - 1; + parents[local3][local10 - 1] = 1; + local71 = local71 + 1 & 0xFFF; + costs[local3][local10 - 1] = local198; + } + if (local10 < 103 && parents[local3][local10 + 1] == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { + queueX[local71] = local3; + queueZ[local71] = local10 + 1; + local71 = local71 + 1 & 0xFFF; + parents[local3][local10 + 1] = 4; + costs[local3][local10 + 1] = local198; + } + if (local3 > 0 && local10 > 0 && parents[local3 - 1][local10 - 1] == 0 && (local78[local3 - 1][local10 - 1] & 0x12C010E) == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { + queueX[local71] = local3 - 1; + queueZ[local71] = local10 - 1; + local71 = local71 + 1 & 0xFFF; + parents[local3 - 1][local10 - 1] = 3; + costs[local3 - 1][local10 - 1] = local198; + } + if (local3 < 103 && local10 > 0 && parents[local3 + 1][local10 - 1] == 0 && (local78[local3 + 1][local10 - 1] & 0x12C0183) == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0 && (local78[local3][local10 - 1] & 0x12C0102) == 0) { + queueX[local71] = local3 + 1; + queueZ[local71] = local10 - 1; + local71 = local71 + 1 & 0xFFF; + parents[local3 + 1][local10 - 1] = 9; + costs[local3 + 1][local10 - 1] = local198; + } + if (local3 > 0 && local10 < 103 && parents[local3 - 1][local10 + 1] == 0 && (local78[local3 - 1][local10 + 1] & 0x12C0138) == 0 && (local78[local3 - 1][local10] & 0x12C0108) == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { + queueX[local71] = local3 - 1; + queueZ[local71] = local10 + 1; + parents[local3 - 1][local10 + 1] = 6; + local71 = local71 + 1 & 0xFFF; + costs[local3 - 1][local10 + 1] = local198; + } + if (local3 < 103 && local10 < 103 && parents[local3 + 1][local10 + 1] == 0 && (local78[local3 + 1][local10 + 1] & 0x12C01E0) == 0 && (local78[local3 + 1][local10] & 0x12C0180) == 0 && (local78[local3][local10 + 1] & 0x12C0120) == 0) { + queueX[local71] = local3 + 1; + queueZ[local71] = local10 + 1; + parents[local3 + 1][local10 + 1] = 12; + local71 = local71 + 1 & 0xFFF; + costs[local3 + 1][local10 + 1] = local198; + } + } + anInt4364 = 0; + @Pc(839) int local839; + if (!local53) { + if (!arg7) { + return false; + } + local198 = 1000; + local839 = 100; + for (@Pc(846) int local846 = arg0 - 10; local846 <= arg0 + 10; local846++) { + for (@Pc(856) int local856 = arg3 - 10; local856 <= arg3 + 10; local856++) { + if (local846 >= 0 && local856 >= 0 && local846 < 104 && local856 < 104 && costs[local846][local856] < 100) { + @Pc(894) int local894 = 0; + if (local856 < arg3) { + local894 = arg3 - local856; + } else if (arg5 + arg3 - 1 < local856) { + local894 = local856 + 1 - arg3 - arg5; + } + @Pc(927) int local927 = 0; + if (local846 < arg0) { + local927 = arg0 - local846; + } else if (local846 > arg10 + arg0 - 1) { + local927 = local846 + 1 - arg10 - arg0; + } + @Pc(968) int local968 = local894 * local894 + local927 * local927; + if (local968 < local198 || local968 == local198 && costs[local846][local856] < local839) { + local10 = local856; + local198 = local968; + local3 = local846; + local839 = costs[local846][local856]; + } + } + } + } + if (local198 == 1000) { + return false; + } + if (arg2 == local3 && local10 == arg9) { + return false; + } + anInt4364 = 1; + } + @Pc(1032) byte local1032 = 0; + queueX[0] = local3; + local64 = local1032 + 1; + queueZ[0] = local10; + local198 = local839 = parents[local3][local10]; + while (arg2 != local3 || local10 != arg9) { + if (local839 != local198) { + local839 = local198; + queueX[local64] = local3; + queueZ[local64++] = local10; + } + if ((local198 & 0x2) != 0) { + local3++; + } else if ((local198 & 0x8) != 0) { + local3--; + } + if ((local198 & 0x1) != 0) { + local10++; + } else if ((local198 & 0x4) != 0) { + local10--; + } + local198 = parents[local3][local10]; + } + if (local64 > 0) { + ClientProt.method3502(local64, arg4); + return true; + } else return arg4 != 1; + } - @OriginalMember(owner = "client!hh", name = "a", descriptor = "(IBIIIIIIIIIZI)Z") - public static boolean findPath1(@OriginalArg(0) 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, @OriginalArg(10) int arg9, @OriginalArg(11) boolean arg10, @OriginalArg(12) int arg11) { - @Pc(3) int local3; - @Pc(10) int local10; - for (local3 = 0; local3 < 104; local3++) { - for (local10 = 0; local10 < 104; local10++) { - parents[local3][local10] = 0; - costs[local3][local10] = 99999999; - } - } - local3 = arg8; - local10 = arg11; - parents[arg8][arg11] = 99; - costs[arg8][arg11] = 0; - @Pc(53) byte local53 = 0; - queueX[0] = arg8; - @Pc(65) int local65 = local53 + 1; - queueZ[0] = arg11; - @Pc(69) int local69 = 0; - @Pc(71) boolean local71 = false; - @Pc(76) int[][] local76 = collisionMaps[Player.level].flags; - @Pc(201) int local201; - @Pc(242) int local242; - label397: while (local69 != local65) { - local3 = queueX[local69]; - local10 = queueZ[local69]; - local69 = local69 + 1 & 0xFFF; - if (arg5 == local3 && local10 == arg0) { - local71 = true; - break; - } - if (arg6 != 0) { - if ((arg6 < 5 || arg6 == 10) && collisionMaps[Player.level].isAtWall(arg0, local3, local10, arg5, arg6 - 1, arg4, arg3)) { - local71 = true; - break; - } - if (arg6 < 10 && collisionMaps[Player.level].isAtWallDecor(arg0, arg6 - 1, arg5, local10, arg4, arg3, local3)) { - local71 = true; - break; - } - } - if (arg1 != 0 && arg9 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg5, local10, local3, arg4, arg1, arg7, arg0, arg9)) { - local71 = true; - break; - } - local201 = costs[local3][local10] + 1; - if (local3 > 0 && parents[local3 - 1][local10] == 0 && (local76[local3 - 1][local10] & 0x12C010E) == 0 && (local76[local3 - 1][arg4 + local10 - 1] & 0x12C0138) == 0) { - local242 = 1; - while (true) { - if (arg4 - 1 <= local242) { - queueX[local65] = local3 - 1; - queueZ[local65] = local10; - parents[local3 - 1][local10] = 2; - local65 = local65 + 1 & 0xFFF; - costs[local3 - 1][local10] = local201; - break; - } - if ((local76[local3 - 1][local10 + local242] & 0x12C013E) != 0) { - break; - } - local242++; - } - } - if (local3 < 102 && parents[local3 + 1][local10] == 0 && (local76[local3 + arg4][local10] & 0x12C0183) == 0 && (local76[arg4 + local3][local10 + arg4 - 1] & 0x12C01E0) == 0) { - local242 = 1; - while (true) { - if (local242 >= arg4 - 1) { - queueX[local65] = local3 + 1; - queueZ[local65] = local10; - parents[local3 + 1][local10] = 8; - costs[local3 + 1][local10] = local201; - local65 = local65 + 1 & 0xFFF; - break; - } - if ((local76[arg4 + local3][local10 + local242] & 0x12C01E3) != 0) { - break; - } - local242++; - } - } - if (local10 > 0 && parents[local3][local10 - 1] == 0 && (local76[local3][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3 - 1][local10 - 1] & 0x12C0183) == 0) { - local242 = 1; - while (true) { - if (arg4 - 1 <= local242) { - queueX[local65] = local3; - queueZ[local65] = local10 - 1; - parents[local3][local10 - 1] = 1; - local65 = local65 + 1 & 0xFFF; - costs[local3][local10 - 1] = local201; - break; - } - if ((local76[local3 + local242][local10 - 1] & 0x12C018F) != 0) { - break; - } - local242++; - } - } - if (local10 < 102 && parents[local3][local10 + 1] == 0 && (local76[local3][local10 + arg4] & 0x12C0138) == 0 && (local76[local3 + arg4 - 1][arg4 + local10] & 0x12C01E0) == 0) { - local242 = 1; - while (true) { - if (local242 >= arg4 - 1) { - queueX[local65] = local3; - queueZ[local65] = local10 + 1; - parents[local3][local10 + 1] = 4; - costs[local3][local10 + 1] = local201; - local65 = local65 + 1 & 0xFFF; - break; - } - if ((local76[local3 + local242][arg4 + local10] & 0x12C01F8) != 0) { - break; - } - local242++; - } - } - if (local3 > 0 && local10 > 0 && parents[local3 - 1][local10 - 1] == 0 && (local76[local3 - 1][arg4 + local10 - 1 - 1] & 0x12C0138) == 0 && (local76[local3 - 1][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3 - 1 - 1][local10 - 1] & 0x12C0183) == 0) { - local242 = 1; - while (true) { - if (arg4 - 1 <= local242) { - queueX[local65] = local3 - 1; - queueZ[local65] = local10 - 1; - local65 = local65 + 1 & 0xFFF; - parents[local3 - 1][local10 - 1] = 3; - costs[local3 - 1][local10 - 1] = local201; - break; - } - if ((local76[local3 - 1][local10 + local242 - 1] & 0x12C013E) != 0 || (local76[local242 + local3 - 1][local10 - 1] & 0x12C018F) != 0) { - break; - } - local242++; - } - } - if (local3 < 102 && local10 > 0 && parents[local3 + 1][local10 - 1] == 0 && (local76[local3 + 1][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3][local10 - 1] & 0x12C0183) == 0 && (local76[local3 + arg4][local10 + arg4 - 1 - 1] & 0x12C01E0) == 0) { - local242 = 1; - while (true) { - if (local242 >= arg4 - 1) { - queueX[local65] = local3 + 1; - queueZ[local65] = local10 - 1; - local65 = local65 + 1 & 0xFFF; - parents[local3 + 1][local10 - 1] = 9; - costs[local3 + 1][local10 - 1] = local201; - break; - } - if ((local76[local3 + arg4][local10 + local242 - 1] & 0x12C01E3) != 0 || (local76[local242 + local3 + 1][local10 - 1] & 0x12C018F) != 0) { - break; - } - local242++; - } - } - if (local3 > 0 && local10 < 102 && parents[local3 - 1][local10 + 1] == 0 && (local76[local3 - 1][local10 + 1] & 0x12C010E) == 0 && (local76[local3 - 1][local10 + arg4] & 0x12C0138) == 0 && (local76[local3][local10 + arg4] & 0x12C01E0) == 0) { - local242 = 1; - while (true) { - if (arg4 - 1 <= local242) { - queueX[local65] = local3 - 1; - queueZ[local65] = local10 + 1; - local65 = local65 + 1 & 0xFFF; - parents[local3 - 1][local10 + 1] = 6; - costs[local3 - 1][local10 + 1] = local201; - break; - } - if ((local76[local3 - 1][local10 + local242 + 1] & 0x12C013E) != 0 || (local76[local242 + local3 - 1][arg4 + local10] & 0x12C01F8) != 0) { - break; - } - local242++; - } - } - if (local3 < 102 && local10 < 102 && parents[local3 + 1][local10 + 1] == 0 && (local76[local3 + 1][local10 + arg4] & 0x12C0138) == 0 && (local76[local3 + arg4][local10 + arg4] & 0x12C01E0) == 0 && (local76[arg4 + local3][local10 + 1] & 0x12C0183) == 0) { - for (local242 = 1; local242 < arg4 - 1; local242++) { - if ((local76[local242 + local3 + 1][local10 + arg4] & 0x12C01F8) != 0 || (local76[arg4 + local3][local242 + local10 + 1] & 0x12C01E3) != 0) { - continue label397; - } - } - queueX[local65] = local3 + 1; - queueZ[local65] = local10 + 1; - parents[local3 + 1][local10 + 1] = 12; - costs[local3 + 1][local10 + 1] = local201; - local65 = local65 + 1 & 0xFFF; - } - } - anInt4364 = 0; - if (!local71) { - if (!arg10) { - return false; - } - local201 = 1000; - local242 = 100; - for (@Pc(1247) int local1247 = arg5 - 10; local1247 <= arg5 + 10; local1247++) { - for (@Pc(1257) int local1257 = arg0 - 10; local1257 <= arg0 + 10; local1257++) { - if (local1247 >= 0 && local1257 >= 0 && local1247 < 104 && local1257 < 104 && costs[local1247][local1257] < 100) { - @Pc(1295) int local1295 = 0; - if (arg5 > local1247) { - local1295 = arg5 - local1247; - } else if (arg5 + arg1 - 1 < local1247) { - local1295 = local1247 + 1 - arg1 - arg5; - } - @Pc(1334) int local1334 = 0; - if (local1257 < arg0) { - local1334 = arg0 - local1257; - } else if (arg0 + arg9 - 1 < local1257) { - local1334 = local1257 + 1 - arg0 - arg9; - } - @Pc(1377) int local1377 = local1295 * local1295 + local1334 * local1334; - if (local1377 < local201 || local1377 == local201 && local242 > costs[local1247][local1257]) { - local242 = costs[local1247][local1257]; - local3 = local1247; - local201 = local1377; - local10 = local1257; - } - } - } - } - if (local201 == 1000) { - return false; - } - if (local3 == arg8 && arg11 == local10) { - return false; - } - anInt4364 = 1; - } - @Pc(1438) byte local1438 = 0; - queueX[0] = local3; - local69 = local1438 + 1; - queueZ[0] = local10; - local201 = local242 = parents[local3][local10]; - while (local3 != arg8 || arg11 != local10) { - if (local242 != local201) { - queueX[local69] = local3; - local242 = local201; - queueZ[local69++] = local10; - } - if ((local201 & 0x2) != 0) { - local3++; - } else if ((local201 & 0x8) != 0) { - local3--; - } - if ((local201 & 0x1) != 0) { - local10++; - } else if ((local201 & 0x4) != 0) { - local10--; - } - local201 = parents[local3][local10]; - } - if (local69 > 0) { - ClientProt.method3502(local69, arg2); - return true; - } else if (arg2 == 1) { - return false; - } else { - return true; - } - } + @OriginalMember(owner = "client!hh", name = "a", descriptor = "(IBIIIIIIIIIZI)Z") + public static boolean findPath1(@OriginalArg(0) 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, @OriginalArg(10) int arg9, @OriginalArg(11) boolean arg10, @OriginalArg(12) int arg11) { + @Pc(3) int local3; + @Pc(10) int local10; + for (local3 = 0; local3 < 104; local3++) { + for (local10 = 0; local10 < 104; local10++) { + parents[local3][local10] = 0; + costs[local3][local10] = 99999999; + } + } + local3 = arg8; + local10 = arg11; + parents[arg8][arg11] = 99; + costs[arg8][arg11] = 0; + @Pc(53) byte local53 = 0; + queueX[0] = arg8; + @Pc(65) int local65 = local53 + 1; + queueZ[0] = arg11; + @Pc(69) int local69 = 0; + @Pc(71) boolean local71 = false; + @Pc(76) int[][] local76 = collisionMaps[Player.level].flags; + @Pc(201) int local201; + @Pc(242) int local242; + label397: + while (local69 != local65) { + local3 = queueX[local69]; + local10 = queueZ[local69]; + local69 = local69 + 1 & 0xFFF; + if (arg5 == local3 && local10 == arg0) { + local71 = true; + break; + } + if (arg6 != 0) { + if ((arg6 < 5 || arg6 == 10) && collisionMaps[Player.level].isAtWall(arg0, local3, local10, arg5, arg6 - 1, arg4, arg3)) { + local71 = true; + break; + } + if (arg6 < 10 && collisionMaps[Player.level].isAtWallDecor(arg0, arg6 - 1, arg5, local10, arg4, arg3, local3)) { + local71 = true; + break; + } + } + if (arg1 != 0 && arg9 != 0 && collisionMaps[Player.level].isInsideOrOutsideRect(arg5, local10, local3, arg4, arg1, arg7, arg0, arg9)) { + local71 = true; + break; + } + local201 = costs[local3][local10] + 1; + if (local3 > 0 && parents[local3 - 1][local10] == 0 && (local76[local3 - 1][local10] & 0x12C010E) == 0 && (local76[local3 - 1][arg4 + local10 - 1] & 0x12C0138) == 0) { + local242 = 1; + while (true) { + if (arg4 - 1 <= local242) { + queueX[local65] = local3 - 1; + queueZ[local65] = local10; + parents[local3 - 1][local10] = 2; + local65 = local65 + 1 & 0xFFF; + costs[local3 - 1][local10] = local201; + break; + } + if ((local76[local3 - 1][local10 + local242] & 0x12C013E) != 0) { + break; + } + local242++; + } + } + if (local3 < 102 && parents[local3 + 1][local10] == 0 && (local76[local3 + arg4][local10] & 0x12C0183) == 0 && (local76[arg4 + local3][local10 + arg4 - 1] & 0x12C01E0) == 0) { + local242 = 1; + while (true) { + if (local242 >= arg4 - 1) { + queueX[local65] = local3 + 1; + queueZ[local65] = local10; + parents[local3 + 1][local10] = 8; + costs[local3 + 1][local10] = local201; + local65 = local65 + 1 & 0xFFF; + break; + } + if ((local76[arg4 + local3][local10 + local242] & 0x12C01E3) != 0) { + break; + } + local242++; + } + } + if (local10 > 0 && parents[local3][local10 - 1] == 0 && (local76[local3][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3 - 1][local10 - 1] & 0x12C0183) == 0) { + local242 = 1; + while (true) { + if (arg4 - 1 <= local242) { + queueX[local65] = local3; + queueZ[local65] = local10 - 1; + parents[local3][local10 - 1] = 1; + local65 = local65 + 1 & 0xFFF; + costs[local3][local10 - 1] = local201; + break; + } + if ((local76[local3 + local242][local10 - 1] & 0x12C018F) != 0) { + break; + } + local242++; + } + } + if (local10 < 102 && parents[local3][local10 + 1] == 0 && (local76[local3][local10 + arg4] & 0x12C0138) == 0 && (local76[local3 + arg4 - 1][arg4 + local10] & 0x12C01E0) == 0) { + local242 = 1; + while (true) { + if (local242 >= arg4 - 1) { + queueX[local65] = local3; + queueZ[local65] = local10 + 1; + parents[local3][local10 + 1] = 4; + costs[local3][local10 + 1] = local201; + local65 = local65 + 1 & 0xFFF; + break; + } + if ((local76[local3 + local242][arg4 + local10] & 0x12C01F8) != 0) { + break; + } + local242++; + } + } + if (local3 > 0 && local10 > 0 && parents[local3 - 1][local10 - 1] == 0 && (local76[local3 - 1][arg4 + local10 - 1 - 1] & 0x12C0138) == 0 && (local76[local3 - 1][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3 - 1 - 1][local10 - 1] & 0x12C0183) == 0) { + local242 = 1; + while (true) { + if (arg4 - 1 <= local242) { + queueX[local65] = local3 - 1; + queueZ[local65] = local10 - 1; + local65 = local65 + 1 & 0xFFF; + parents[local3 - 1][local10 - 1] = 3; + costs[local3 - 1][local10 - 1] = local201; + break; + } + if ((local76[local3 - 1][local10 + local242 - 1] & 0x12C013E) != 0 || (local76[local242 + local3 - 1][local10 - 1] & 0x12C018F) != 0) { + break; + } + local242++; + } + } + if (local3 < 102 && local10 > 0 && parents[local3 + 1][local10 - 1] == 0 && (local76[local3 + 1][local10 - 1] & 0x12C010E) == 0 && (local76[arg4 + local3][local10 - 1] & 0x12C0183) == 0 && (local76[local3 + arg4][local10 + arg4 - 1 - 1] & 0x12C01E0) == 0) { + local242 = 1; + while (true) { + if (local242 >= arg4 - 1) { + queueX[local65] = local3 + 1; + queueZ[local65] = local10 - 1; + local65 = local65 + 1 & 0xFFF; + parents[local3 + 1][local10 - 1] = 9; + costs[local3 + 1][local10 - 1] = local201; + break; + } + if ((local76[local3 + arg4][local10 + local242 - 1] & 0x12C01E3) != 0 || (local76[local242 + local3 + 1][local10 - 1] & 0x12C018F) != 0) { + break; + } + local242++; + } + } + if (local3 > 0 && local10 < 102 && parents[local3 - 1][local10 + 1] == 0 && (local76[local3 - 1][local10 + 1] & 0x12C010E) == 0 && (local76[local3 - 1][local10 + arg4] & 0x12C0138) == 0 && (local76[local3][local10 + arg4] & 0x12C01E0) == 0) { + local242 = 1; + while (true) { + if (arg4 - 1 <= local242) { + queueX[local65] = local3 - 1; + queueZ[local65] = local10 + 1; + local65 = local65 + 1 & 0xFFF; + parents[local3 - 1][local10 + 1] = 6; + costs[local3 - 1][local10 + 1] = local201; + break; + } + if ((local76[local3 - 1][local10 + local242 + 1] & 0x12C013E) != 0 || (local76[local242 + local3 - 1][arg4 + local10] & 0x12C01F8) != 0) { + break; + } + local242++; + } + } + if (local3 < 102 && local10 < 102 && parents[local3 + 1][local10 + 1] == 0 && (local76[local3 + 1][local10 + arg4] & 0x12C0138) == 0 && (local76[local3 + arg4][local10 + arg4] & 0x12C01E0) == 0 && (local76[arg4 + local3][local10 + 1] & 0x12C0183) == 0) { + for (local242 = 1; local242 < arg4 - 1; local242++) { + if ((local76[local242 + local3 + 1][local10 + arg4] & 0x12C01F8) != 0 || (local76[arg4 + local3][local242 + local10 + 1] & 0x12C01E3) != 0) { + continue label397; + } + } + queueX[local65] = local3 + 1; + queueZ[local65] = local10 + 1; + parents[local3 + 1][local10 + 1] = 12; + costs[local3 + 1][local10 + 1] = local201; + local65 = local65 + 1 & 0xFFF; + } + } + anInt4364 = 0; + if (!local71) { + if (!arg10) { + return false; + } + local201 = 1000; + local242 = 100; + for (@Pc(1247) int local1247 = arg5 - 10; local1247 <= arg5 + 10; local1247++) { + for (@Pc(1257) int local1257 = arg0 - 10; local1257 <= arg0 + 10; local1257++) { + if (local1247 >= 0 && local1257 >= 0 && local1247 < 104 && local1257 < 104 && costs[local1247][local1257] < 100) { + @Pc(1295) int local1295 = 0; + if (arg5 > local1247) { + local1295 = arg5 - local1247; + } else if (arg5 + arg1 - 1 < local1247) { + local1295 = local1247 + 1 - arg1 - arg5; + } + @Pc(1334) int local1334 = 0; + if (local1257 < arg0) { + local1334 = arg0 - local1257; + } else if (arg0 + arg9 - 1 < local1257) { + local1334 = local1257 + 1 - arg0 - arg9; + } + @Pc(1377) int local1377 = local1295 * local1295 + local1334 * local1334; + if (local1377 < local201 || local1377 == local201 && local242 > costs[local1247][local1257]) { + local242 = costs[local1247][local1257]; + local3 = local1247; + local201 = local1377; + local10 = local1257; + } + } + } + } + if (local201 == 1000) { + return false; + } + if (local3 == arg8 && arg11 == local10) { + return false; + } + anInt4364 = 1; + } + @Pc(1438) byte local1438 = 0; + queueX[0] = local3; + local69 = local1438 + 1; + queueZ[0] = local10; + local201 = local242 = parents[local3][local10]; + while (local3 != arg8 || arg11 != local10) { + if (local242 != local201) { + queueX[local69] = local3; + local242 = local201; + queueZ[local69++] = local10; + } + if ((local201 & 0x2) != 0) { + local3++; + } else if ((local201 & 0x8) != 0) { + local3--; + } + if ((local201 & 0x1) != 0) { + local10++; + } else if ((local201 & 0x4) != 0) { + local10--; + } + local201 = parents[local3][local10]; + } + if (local69 > 0) { + ClientProt.method3502(local69, arg2); + return true; + } else return arg2 != 1; + } - @OriginalMember(owner = "client!t", name = "a", descriptor = "(BJII)Z") - public static boolean findPathToLoc(@OriginalArg(1) long key, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(12) int shape = (int) key >> 14 & 0x1F; - @Pc(24) int angle = (int) key >> 20 & 0x3; - @Pc(31) int id = (int) (key >>> 32) & Integer.MAX_VALUE; - if (shape == 10 || shape == 11 || shape == 22) { - @Pc(46) LocType local46 = LocTypeList.get(id); - @Pc(62) int local62; - @Pc(59) int local59; - if (angle == 0 || angle == 2) { - local59 = local46.length; - local62 = local46.width; - } else { - local59 = local46.width; - local62 = local46.length; - } - @Pc(73) int local73 = local46.blockedSides; - if (angle != 0) { - local73 = (local73 << angle & 0xF) + (local73 >> 4 - angle); - } - findPath(PlayerList.self.movementQueueZ[0], 0, local59, true, local73, arg2, local62, 0, 2, arg1, PlayerList.self.movementQueueX[0]); - } else { - findPath(PlayerList.self.movementQueueZ[0], angle, 0, true, 0, arg2, 0, shape + 1, 2, arg1, PlayerList.self.movementQueueX[0]); - } - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Cross.type = 2; - Cross.x = Mouse.clickX; - return true; - } + @OriginalMember(owner = "client!t", name = "a", descriptor = "(BJII)Z") + public static boolean findPathToLoc(@OriginalArg(1) long key, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + @Pc(12) int shape = (int) key >> 14 & 0x1F; + @Pc(24) int angle = (int) key >> 20 & 0x3; + @Pc(31) int id = (int) (key >>> 32) & Integer.MAX_VALUE; + if (shape == 10 || shape == 11 || shape == 22) { + @Pc(46) LocType local46 = LocTypeList.get(id); + @Pc(62) int local62; + @Pc(59) int local59; + if (angle == 0 || angle == 2) { + local59 = local46.length; + local62 = local46.width; + } else { + local59 = local46.width; + local62 = local46.length; + } + @Pc(73) int local73 = local46.blockedSides; + if (angle != 0) { + local73 = (local73 << angle & 0xF) + (local73 >> 4 - angle); + } + findPath(PlayerList.self.movementQueueZ[0], 0, local59, true, local73, arg2, local62, 0, 2, arg1, PlayerList.self.movementQueueX[0]); + } else { + findPath(PlayerList.self.movementQueueZ[0], angle, 0, true, 0, arg2, 0, shape + 1, 2, arg1, PlayerList.self.movementQueueX[0]); + } + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + return true; + } } diff --git a/client/src/main/java/rt4/PathingEntity.java b/client/src/main/java/rt4/PathingEntity.java index b8e8fb6..e3f2ab0 100644 --- a/client/src/main/java/rt4/PathingEntity.java +++ b/client/src/main/java/rt4/PathingEntity.java @@ -8,17 +8,17 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!fe") public abstract class PathingEntity extends Entity { - @OriginalMember(owner = "client!ef", name = "a", descriptor = "[I") - public static final int[] ANGLES = new int[] { 768, 1024, 1280, 512, 1536, 256, 0, 1792 }; + @OriginalMember(owner = "client!ef", name = "a", descriptor = "[I") + public static final int[] ANGLES = new int[]{768, 1024, 1280, 512, 1536, 256, 0, 1792}; @OriginalMember(owner = "client!ac", name = "l", descriptor = "Lclient!ck;") public static final BasType aClass20_1 = new BasType(); - @OriginalMember(owner = "client!hn", name = "Y", descriptor = "I") - public static int anInt2680 = 0; - @OriginalMember(owner = "client!hm", name = "ab", descriptor = "I") - public static int anInt2640 = 0; - @OriginalMember(owner = "client!f", name = "V", descriptor = "I") + @OriginalMember(owner = "client!hn", name = "Y", descriptor = "I") + public static int anInt2680 = 0; + @OriginalMember(owner = "client!hm", name = "ab", descriptor = "I") + public static int anInt2640 = 0; + @OriginalMember(owner = "client!f", name = "V", descriptor = "I") public static int anInt1938 = 0; - @OriginalMember(owner = "client!fe", name = "A", descriptor = "I") + @OriginalMember(owner = "client!fe", name = "A", descriptor = "I") public int spotAnimStart; @OriginalMember(owner = "client!fe", name = "S", descriptor = "I") @@ -395,11 +395,11 @@ public abstract class PathingEntity extends Entity { @Pc(231) int local231 = local224 > local201 ? local201 : local224; @Pc(238) int local238 = local224 > local134 ? local134 : local224; @Pc(245) int local245 = local201 <= local87 ? local201 : local87; - anInt2640 = (int) (Math.atan2((double) (local212 - local231), (double) local27) * 325.95D) & 0x7FF; + anInt2640 = (int) (Math.atan2(local212 - local231, local27) * 325.95D) & 0x7FF; if (anInt2640 != 0) { arg0.rotateX(anInt2640); } - anInt2680 = (int) (Math.atan2((double) (local245 - local238), (double) local24) * 325.95D) & 0x7FF; + anInt2680 = (int) (Math.atan2(local245 - local238, local24) * 325.95D) & 0x7FF; if (anInt2680 != 0) { arg0.rotateZ(anInt2680); } diff --git a/client/src/main/java/rt4/PerlinNoise.java b/client/src/main/java/rt4/PerlinNoise.java index 3432ebf..8bc822e 100644 --- a/client/src/main/java/rt4/PerlinNoise.java +++ b/client/src/main/java/rt4/PerlinNoise.java @@ -5,52 +5,52 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class PerlinNoise { - @OriginalMember(owner = "client!fc", name = "a", descriptor = "(III)I") - public static int getTileHeight(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(36) int local36 = interpolatedNoise(4, arg1 + 45365, arg0 - -91923) + (interpolatedNoise(2, arg1 + 10294, arg0 + 37821) - 128 >> 1) + (interpolatedNoise(1, arg1, arg0) + -128 >> 2) - 128; - local36 = (int) ((double) local36 * 0.3D) + 35; - if (local36 < 10) { - local36 = 10; - } else if (local36 > 60) { - local36 = 60; - } - return local36; - } + @OriginalMember(owner = "client!fc", name = "a", descriptor = "(III)I") + public static int getTileHeight(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(36) int local36 = interpolatedNoise(4, arg1 + 45365, arg0 - -91923) + (interpolatedNoise(2, arg1 + 10294, arg0 + 37821) - 128 >> 1) + (interpolatedNoise(1, arg1, arg0) + -128 >> 2) - 128; + local36 = (int) ((double) local36 * 0.3D) + 35; + if (local36 < 10) { + local36 = 10; + } else if (local36 > 60) { + local36 = 60; + } + return local36; + } - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIII)I") - public static int interpolatedNoise(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) int local7 = arg1 / arg0; - @Pc(11) int local11 = arg2 / arg0; - @Pc(17) int local17 = arg2 & arg0 - 1; - @Pc(23) int local23 = arg0 - 1 & arg1; - @Pc(28) int local28 = smoothNoise(local7, local11); - @Pc(35) int local35 = smoothNoise(local7 + 1, local11); - @Pc(42) int local42 = smoothNoise(local7, local11 + 1); - @Pc(56) int local56 = smoothNoise(local7 + 1, local11 + 1); - @Pc(63) int local63 = interpolate(local28, local35, local23, arg0); - @Pc(70) int local70 = interpolate(local42, local56, local23, arg0); - return interpolate(local63, local70, local17, arg0); - } + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIII)I") + public static int interpolatedNoise(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(7) int local7 = arg1 / arg0; + @Pc(11) int local11 = arg2 / arg0; + @Pc(17) int local17 = arg2 & arg0 - 1; + @Pc(23) int local23 = arg0 - 1 & arg1; + @Pc(28) int local28 = smoothNoise(local7, local11); + @Pc(35) int local35 = smoothNoise(local7 + 1, local11); + @Pc(42) int local42 = smoothNoise(local7, local11 + 1); + @Pc(56) int local56 = smoothNoise(local7 + 1, local11 + 1); + @Pc(63) int local63 = interpolate(local28, local35, local23, arg0); + @Pc(70) int local70 = interpolate(local42, local56, local23, arg0); + return interpolate(local63, local70, local17, arg0); + } - @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IIB)I") - public static int smoothNoise(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(47) int local47 = noise(arg0 - 1, arg1 + -1) + noise(arg0 + 1, arg1 + -1) + noise(arg0 + -1, arg1 - -1) + noise(arg0 + 1, arg1 - -1); - @Pc(76) int local76 = noise(arg0 - 1, arg1) + noise(arg0 + 1, arg1) + noise(arg0, arg1 + -1) + noise(arg0, arg1 + 1); - @Pc(81) int local81 = noise(arg0, arg1); - return local76 / 8 + local47 / 16 + local81 / 4; - } + @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IIB)I") + public static int smoothNoise(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(47) int local47 = noise(arg0 - 1, arg1 + -1) + noise(arg0 + 1, arg1 + -1) + noise(arg0 + -1, arg1 - -1) + noise(arg0 + 1, arg1 - -1); + @Pc(76) int local76 = noise(arg0 - 1, arg1) + noise(arg0 + 1, arg1) + noise(arg0, arg1 + -1) + noise(arg0, arg1 + 1); + @Pc(81) int local81 = noise(arg0, arg1); + return local76 / 8 + local47 / 16 + local81 / 4; + } - @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIII)I") - public static int interpolate(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { - @Pc(22) int local22 = 65536 - MathUtils.cos[arg2 * 1024 / arg3] >> 1; - return (arg0 * (65536 - local22) >> 16) + (arg1 * local22 >> 16); - } + @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIII)I") + public static int interpolate(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { + @Pc(22) int local22 = 65536 - MathUtils.cos[arg2 * 1024 / arg3] >> 1; + return (arg0 * (65536 - local22) >> 16) + (arg1 * local22 >> 16); + } - @OriginalMember(owner = "client!km", name = "b", descriptor = "(III)I") - public static int noise(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(14) int local14 = arg1 * 57 + arg0; - @Pc(20) int local20 = local14 ^ local14 << 13; - @Pc(34) int local34 = Integer.MAX_VALUE & (local20 * local20 * 15731 + 789221) * local20 + 1376312589; - return local34 >> 19 & 0xFF; - } + @OriginalMember(owner = "client!km", name = "b", descriptor = "(III)I") + public static int noise(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(14) int local14 = arg1 * 57 + arg0; + @Pc(20) int local20 = local14 ^ local14 << 13; + @Pc(34) int local34 = Integer.MAX_VALUE & (local20 * local20 * 15731 + 789221) * local20 + 1376312589; + return local34 >> 19 & 0xFF; + } } diff --git a/client/src/main/java/rt4/Player.java b/client/src/main/java/rt4/Player.java index 83634d5..9706b72 100644 --- a/client/src/main/java/rt4/Player.java +++ b/client/src/main/java/rt4/Player.java @@ -15,30 +15,30 @@ public final class Player extends PathingEntity { @OriginalMember(owner = "client!a", name = "f", descriptor = "[Z") public static final boolean[] secondaryOptions = new boolean[8]; @OriginalMember(owner = "client!pa", name = "P", descriptor = "Lclient!na;") - public static JagString password = JagString.EMPTY; + public static JagString password = JagString.EMPTY; @OriginalMember(owner = "client!pa", name = "S", descriptor = "Lclient!na;") public static JagString usernameInput = JagString.EMPTY; @OriginalMember(owner = "client!ba", name = "w", descriptor = "I") public static int inTutorialIsland = 0; @OriginalMember(owner = "client!ee", name = "b", descriptor = "I") public static int level; - @OriginalMember(owner = "client!bb", name = "E", descriptor = "I") - public static int runEnergy = 0; + @OriginalMember(owner = "client!bb", name = "E", descriptor = "I") + public static int runEnergy = 0; @OriginalMember(owner = "client!ug", name = "o", descriptor = "I") public static int weight = 0; @OriginalMember(owner = "client!jl", name = "H", descriptor = "I") public static int worldId = -1; @OriginalMember(owner = "client!em", name = "B", descriptor = "I") public static int rebootTimer = 0; - @OriginalMember(owner = "client!hm", name = "gb", descriptor = "J") - public static long name37; + @OriginalMember(owner = "client!hm", name = "gb", descriptor = "J") + public static long name37; @OriginalMember(owner = "client!sm", name = "k", descriptor = "Lsignlink!im;") public static PrivilegedRequest lastLogAddress; - @OriginalMember(owner = "client!ib", name = "l", descriptor = "I") - public static int anInt2863 = 0; - @OriginalMember(owner = "client!ea", name = "r", descriptor = "[[B") - public static byte[][] aByteArrayArray8; - @OriginalMember(owner = "client!e", name = "Bc", descriptor = "Lclient!hh;") + @OriginalMember(owner = "client!ib", name = "l", descriptor = "I") + public static int anInt2863 = 0; + @OriginalMember(owner = "client!ea", name = "r", descriptor = "[[B") + public static byte[][] aByteArrayArray8; + @OriginalMember(owner = "client!e", name = "Bc", descriptor = "Lclient!hh;") public PlayerAppearance appearance; @OriginalMember(owner = "client!e", name = "Mc", descriptor = "Lclient!na;") @@ -167,35 +167,35 @@ public final class Player extends PathingEntity { } } - @OriginalMember(owner = "client!la", name = "a", descriptor = "(ILclient!e;)I") - public static int getSound(@OriginalArg(1) Player arg0) { - @Pc(14) int local14 = arg0.anInt1654; - @Pc(18) BasType local18 = arg0.getBasType(); - if (local18.idleAnimationId == arg0.movementSeqId) { - local14 = arg0.anInt1648; - } else if (local18.runAnimationId == arg0.movementSeqId || arg0.movementSeqId == local18.runAnimationId2 || arg0.movementSeqId == local18.runAnimationId4 || local18.runAnimationId3 == arg0.movementSeqId) { - local14 = arg0.anInt1670; - } else if (arg0.movementSeqId == local18.anInt1062 || arg0.movementSeqId == local18.anInt1042 || arg0.movementSeqId == local18.anInt1048 || arg0.movementSeqId == local18.anInt1066) { - local14 = arg0.anInt1658; - } - return local14; - } + @OriginalMember(owner = "client!la", name = "a", descriptor = "(ILclient!e;)I") + public static int getSound(@OriginalArg(1) Player arg0) { + @Pc(14) int local14 = arg0.anInt1654; + @Pc(18) BasType local18 = arg0.getBasType(); + if (local18.idleAnimationId == arg0.movementSeqId) { + local14 = arg0.anInt1648; + } else if (local18.runAnimationId == arg0.movementSeqId || arg0.movementSeqId == local18.runAnimationId2 || arg0.movementSeqId == local18.runAnimationId4 || local18.runAnimationId3 == arg0.movementSeqId) { + local14 = arg0.anInt1670; + } else if (arg0.movementSeqId == local18.anInt1062 || arg0.movementSeqId == local18.anInt1042 || arg0.movementSeqId == local18.anInt1048 || arg0.movementSeqId == local18.anInt1066) { + local14 = arg0.anInt1658; + } + return local14; + } - @OriginalMember(owner = "client!um", name = "a", descriptor = "(Z)V") - public static void setTutorialIsland() { - inTutorialIsland = 0; - @Pc(17) int local17 = Camera.originX + (PlayerList.self.xFine >> 7); - @Pc(25) int local25 = (PlayerList.self.zFine >> 7) + Camera.originZ; - if (local17 >= 3053 && local17 <= 3156 && local25 >= 3056 && local25 <= 3136) { - inTutorialIsland = 1; - } - if (local17 >= 3072 && local17 <= 3118 && local25 >= 9492 && local25 <= 9535) { - inTutorialIsland = 1; - } - if (inTutorialIsland == 1 && local17 >= 3139 && local17 <= 3199 && local25 >= 3008 && local25 <= 3062) { - inTutorialIsland = 0; - } - } + @OriginalMember(owner = "client!um", name = "a", descriptor = "(Z)V") + public static void setTutorialIsland() { + inTutorialIsland = 0; + @Pc(17) int local17 = Camera.originX + (PlayerList.self.xFine >> 7); + @Pc(25) int local25 = (PlayerList.self.zFine >> 7) + Camera.originZ; + if (local17 >= 3053 && local17 <= 3156 && local25 >= 3056 && local25 <= 3136) { + inTutorialIsland = 1; + } + if (local17 >= 3072 && local17 <= 3118 && local25 >= 9492 && local25 <= 9535) { + inTutorialIsland = 1; + } + if (inTutorialIsland == 1 && local17 >= 3139 && local17 <= 3199 && local25 >= 3008 && local25 <= 3062) { + inTutorialIsland = 0; + } + } @OriginalMember(owner = "client!rg", name = "a", descriptor = "(Lclient!e;I)V") public static void method4359(@OriginalArg(0) Player arg0) { @@ -207,92 +207,92 @@ public final class Player extends PathingEntity { } } - @OriginalMember(owner = "client!bf", name = "c", descriptor = "(I)V") - public static void method501() { - if (!GlRenderer.enabled || Static231.aBoolean252) { - return; - } - @Pc(14) Tile[][][] local14 = SceneGraph.tiles; - for (@Pc(22) int local22 = 0; local22 < local14.length; local22++) { - @Pc(30) Tile[][] local30 = local14[local22]; - for (@Pc(32) int local32 = 0; local32 < local30.length; local32++) { - for (@Pc(42) int local42 = 0; local42 < local30[local32].length; local42++) { - @Pc(54) Tile local54 = local30[local32][local42]; - if (local54 != null) { - @Pc(71) GlModel local71; - if (local54.groundDecor != null && local54.groundDecor.entity instanceof GlModel) { - local71 = (GlModel) local54.groundDecor.entity; - if ((local54.groundDecor.key & Long.MIN_VALUE) == 0L) { - local71.method4111(false, true, true, false, true, true); - } else { - local71.method4111(true, true, true, true, true, true); - } - } - if (local54.wallDecor != null) { - if (local54.wallDecor.primary instanceof GlModel) { - local71 = (GlModel) local54.wallDecor.primary; - if ((local54.wallDecor.key & Long.MIN_VALUE) == 0L) { - local71.method4111(false, true, true, false, true, true); - } else { - local71.method4111(true, true, true, true, true, true); - } - } - if (local54.wallDecor.secondary instanceof GlModel) { - local71 = (GlModel) local54.wallDecor.secondary; - if ((Long.MIN_VALUE & local54.wallDecor.key) == 0L) { - local71.method4111(false, true, true, false, true, true); - } else { - local71.method4111(true, true, true, true, true, true); - } - } - } - if (local54.wall != null) { - if (local54.wall.primary instanceof GlModel) { - local71 = (GlModel) local54.wall.primary; - if ((local54.wall.key & Long.MIN_VALUE) == 0L) { - local71.method4111(false, true, true, false, true, true); - } else { - local71.method4111(true, true, true, true, true, true); - } - } - if (local54.wall.secondary instanceof GlModel) { - local71 = (GlModel) local54.wall.secondary; - if ((Long.MIN_VALUE & local54.wall.key) == 0L) { - local71.method4111(false, true, true, false, true, true); - } else { - local71.method4111(true, true, true, true, true, true); - } - } - } - for (@Pc(270) int local270 = 0; local270 < local54.sceneryLen; local270++) { - if (local54.scenery[local270].entity instanceof GlModel) { - @Pc(293) GlModel local293 = (GlModel) local54.scenery[local270].entity; - if ((Long.MIN_VALUE & local54.scenery[local270].key) == 0L) { - local293.method4111(false, true, true, false, true, true); - } else { - local293.method4111(true, true, true, true, true, true); - } - } - } - } - } - } - } - Static231.aBoolean252 = true; - } + @OriginalMember(owner = "client!bf", name = "c", descriptor = "(I)V") + public static void method501() { + if (!GlRenderer.enabled || Static231.aBoolean252) { + return; + } + @Pc(14) Tile[][][] local14 = SceneGraph.tiles; + for (@Pc(22) int local22 = 0; local22 < local14.length; local22++) { + @Pc(30) Tile[][] local30 = local14[local22]; + for (@Pc(32) int local32 = 0; local32 < local30.length; local32++) { + for (@Pc(42) int local42 = 0; local42 < local30[local32].length; local42++) { + @Pc(54) Tile local54 = local30[local32][local42]; + if (local54 != null) { + @Pc(71) GlModel local71; + if (local54.groundDecor != null && local54.groundDecor.entity instanceof GlModel) { + local71 = (GlModel) local54.groundDecor.entity; + if ((local54.groundDecor.key & Long.MIN_VALUE) == 0L) { + local71.method4111(false, true, true, false, true, true); + } else { + local71.method4111(true, true, true, true, true, true); + } + } + if (local54.wallDecor != null) { + if (local54.wallDecor.primary instanceof GlModel) { + local71 = (GlModel) local54.wallDecor.primary; + if ((local54.wallDecor.key & Long.MIN_VALUE) == 0L) { + local71.method4111(false, true, true, false, true, true); + } else { + local71.method4111(true, true, true, true, true, true); + } + } + if (local54.wallDecor.secondary instanceof GlModel) { + local71 = (GlModel) local54.wallDecor.secondary; + if ((Long.MIN_VALUE & local54.wallDecor.key) == 0L) { + local71.method4111(false, true, true, false, true, true); + } else { + local71.method4111(true, true, true, true, true, true); + } + } + } + if (local54.wall != null) { + if (local54.wall.primary instanceof GlModel) { + local71 = (GlModel) local54.wall.primary; + if ((local54.wall.key & Long.MIN_VALUE) == 0L) { + local71.method4111(false, true, true, false, true, true); + } else { + local71.method4111(true, true, true, true, true, true); + } + } + if (local54.wall.secondary instanceof GlModel) { + local71 = (GlModel) local54.wall.secondary; + if ((Long.MIN_VALUE & local54.wall.key) == 0L) { + local71.method4111(false, true, true, false, true, true); + } else { + local71.method4111(true, true, true, true, true, true); + } + } + } + for (@Pc(270) int local270 = 0; local270 < local54.sceneryLen; local270++) { + if (local54.scenery[local270].entity instanceof GlModel) { + @Pc(293) GlModel local293 = (GlModel) local54.scenery[local270].entity; + if ((Long.MIN_VALUE & local54.scenery[local270].key) == 0L) { + local293.method4111(false, true, true, false, true, true); + } else { + local293.method4111(true, true, true, true, true, true); + } + } + } + } + } + } + } + Static231.aBoolean252 = true; + } - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIB)V") - public static void method2310(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - if (Cross.type == 1) { - Sprites.crosses[Cross.milliseconds / 100].render(Cross.x - 8, Cross.y + -8); - } - if (Cross.type == 2) { - Sprites.crosses[Cross.milliseconds / 100 + 4].render(Cross.x - 8, Cross.y + -8); - } - setTutorialIsland(); - } + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIB)V") + public static void method2310(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + if (Cross.type == 1) { + Sprites.crosses[Cross.milliseconds / 100].render(Cross.x - 8, Cross.y + -8); + } + if (Cross.type == 2) { + Sprites.crosses[Cross.milliseconds / 100 + 4].render(Cross.x - 8, Cross.y + -8); + } + setTutorialIsland(); + } - @OriginalMember(owner = "client!e", name = "c", descriptor = "(B)I") + @OriginalMember(owner = "client!e", name = "c", descriptor = "(B)I") @Override public final int getSize() { return this.appearance == null || this.appearance.anInt2492 == -1 ? super.getSize() : NpcTypeList.get(this.appearance.anInt2492).size; @@ -555,7 +555,7 @@ public final class Player extends PathingEntity { if (local12 < 16 || local12 > 360000) { return; } - @Pc(34) int local34 = (int) (Math.atan2((double) arg3, (double) arg1) * 325.949D) & 0x7FF; + @Pc(34) int local34 = (int) (Math.atan2(arg3, arg1) * 325.949D) & 0x7FF; @Pc(46) Model local46 = HintArrowManager.getModel(local34, this.zFine, arg11, this.xFine, arg2, this.anInt3424); if (local46 == null) { return; @@ -583,10 +583,10 @@ public final class Player extends PathingEntity { public final JagString getName() { @Pc(2) JagString local2 = this.username; if (PlayerList.playerNames != null) { - local2 = JagString.concatenate(new JagString[] { PlayerList.playerNames[this.anInt1651], local2 }); + local2 = JagString.concatenate(new JagString[]{PlayerList.playerNames[this.anInt1651], local2}); } if (PlayerList.playerNames2 != null) { - local2 = JagString.concatenate(new JagString[] { local2, PlayerList.playerNames2[this.anInt1651] }); + local2 = JagString.concatenate(new JagString[]{local2, PlayerList.playerNames2[this.anInt1651]}); } return local2; } diff --git a/client/src/main/java/rt4/PlayerAppearance.java b/client/src/main/java/rt4/PlayerAppearance.java index 237be70..ca45344 100644 --- a/client/src/main/java/rt4/PlayerAppearance.java +++ b/client/src/main/java/rt4/PlayerAppearance.java @@ -8,12 +8,12 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!hh") public final class PlayerAppearance { - @OriginalMember(owner = "client!bj", name = "t", descriptor = "[S") - public static final short[] aShortArray5 = new short[] { -4160, -4163, -8256, -8259, 22461 }; - @OriginalMember(owner = "client!wd", name = "d", descriptor = "[I") - public static final int[] anIntArray451 = new int[] { 8, 11, 4, 6, 9, 7, 10, 0 }; - @OriginalMember(owner = "client!r", name = "b", descriptor = "[Lclient!tk;") - public static final SeqType[] aClass144Array2 = new SeqType[14]; + @OriginalMember(owner = "client!bj", name = "t", descriptor = "[S") + public static final short[] aShortArray5 = new short[]{-4160, -4163, -8256, -8259, 22461}; + @OriginalMember(owner = "client!wd", name = "d", descriptor = "[I") + public static final int[] anIntArray451 = new int[]{8, 11, 4, 6, 9, 7, 10, 0}; + @OriginalMember(owner = "client!r", name = "b", descriptor = "[Lclient!tk;") + public static final SeqType[] aClass144Array2 = new SeqType[14]; @OriginalMember(owner = "client!ri", name = "b", descriptor = "[I") public static final int[] anIntArray187 = new int[14]; @OriginalMember(owner = "client!uf", name = "j", descriptor = "Lclient!n;") @@ -21,33 +21,33 @@ public final class PlayerAppearance { @OriginalMember(owner = "client!l", name = "b", descriptor = "Lclient!n;") public static final SoftLruHashTable aClass99_21 = new SoftLruHashTable(5); @OriginalMember(owner = "client!aa", name = "h", descriptor = "[S") - public static final short[] aShortArray1 = new short[] { 960, 957, -21568, -21571, 22464 }; + public static final short[] aShortArray1 = new short[]{960, 957, -21568, -21571, 22464}; @OriginalMember(owner = "client!ci", name = "u", descriptor = "[[S") - public static final short[][] aShortArrayArray1 = new short[][] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10339, 10574, 10425, 10398, 10345, 7512, 8507, 7378, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13753, 13737, 13719, 13883, 13863, 13974, 19643, 18601, 16532, 23993, 25121, 24980, 26944, 26921, 24854, 27191, 27171, 26130, 26941, 28696, 30100, 12477, 10407, 10388, 10685, 10665, 10646, 6711, 6693, 6674, 6965, 7073, 7056, 2361, 4387, 3346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904 } }; + public static final short[][] aShortArrayArray1 = new short[][]{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10339, 10574, 10425, 10398, 10345, 7512, 8507, 7378, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13753, 13737, 13719, 13883, 13863, 13974, 19643, 18601, 16532, 23993, 25121, 24980, 26944, 26921, 24854, 27191, 27171, 26130, 26941, 28696, 30100, 12477, 10407, 10388, 10685, 10665, 10646, 6711, 6693, 6674, 6965, 7073, 7056, 2361, 4387, 3346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 44, 64, 84, 104, 304, 678, 698, 550, 934, 954, 6448, 6946, 6966, 2352, 2726, 2746, 10544, 10918, 10938, 10304, 10550, 10570, 14640, 15014, 15034, 19760, 20134, 20154, -29392, -29018, -28998, 31024, 31270, 31290, -24272, -23898, -23878, -19152, -18778, -18758, -14032, -13658, -13638, -6864, -6490, -6470, 516, 536, 6788, 6808, 11012, 11032, 14980, 15000, 21124, 21144, -28924, -28904, -22012, -21992, -12924, -12904}}; @OriginalMember(owner = "client!q", name = "d", descriptor = "[[S") - public static final short[][] aShortArrayArray4 = new short[][] { { 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898 }, { 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10347, 10582, 10429, 10407, 10359, 8414, 9540, 10456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898 }, { 4300, 3294, 3303, 3264, 4506, 4382, 4387, 5293, 7622, 7384, 8412, 7496, 86, 123, 111, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 13766, 13745, 13726, 13890, 13743, 13852, 17602, 18605, 21660, 24000, 24997, 24088, 27972, 25903, 26904, 27193, 27175, 27156, 30020, 28975, 29976, 12482, 13485, 10392, 10692, 10669, 10776, 6717, 6695, 7830, 6971, 6951, 5910, 3389, 3369, 3356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898 } }; + public static final short[][] aShortArrayArray4 = new short[][]{{10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898}, {10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10347, 10582, 10429, 10407, 10359, 8414, 9540, 10456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898}, {4300, 3294, 3303, 3264, 4506, 4382, 4387, 5293, 7622, 7384, 8412, 7496, 86, 123, 111, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 13766, 13745, 13726, 13890, 13743, 13852, 17602, 18605, 21660, 24000, 24997, 24088, 27972, 25903, 26904, 27193, 27175, 27156, 30020, 28975, 29976, 12482, 13485, 10392, 10692, 10669, 10776, 6717, 6695, 7830, 6971, 6951, 5910, 3389, 3369, 3356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898, 10, 30, 50, 70, 90, 110, 310, 684, 704, 556, 940, 960, 6454, 6952, 6972, 2358, 2732, 2752, 10550, 10924, 10944, 10310, 10556, 10576, 14646, 15020, 15040, 19766, 20140, 20160, -29386, -29012, -28992, 31030, 31276, 31296, -24266, -23892, -23872, -19146, -18772, -18752, -14026, -13652, -13632, -6858, -6484, -6464, 522, 542, 6794, 6814, 11018, 11038, 14986, 15006, 21130, 21150, -28918, -28898, -22006, -21986, -12918, -12898}}; @OriginalMember(owner = "client!md", name = "V", descriptor = "[[S") - public static final short[][] aShortArrayArray6 = new short[][] { { 6798, 107, 10283, 16, 4797, 7744, 5799, 4634, -31839, 22433, 2983, -11343, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010 }, { 8741, 12, -1506, -22374, 7735, 8404, 1701, -27106, 24094, 10153, -8915, 4783, 1341, 16578, -30533, 25239, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010 }, { 25238, 8742, 12, -1506, -22374, 7735, 8404, 1701, -27106, 24094, 10153, -8915, 4783, 1341, 16578, -30533, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010 }, { 4626, 11146, 6439, 12, 4758, 10270 }, { 4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574 } }; + public static final short[][] aShortArrayArray6 = new short[][]{{6798, 107, 10283, 16, 4797, 7744, 5799, 4634, -31839, 22433, 2983, -11343, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010}, {8741, 12, -1506, -22374, 7735, 8404, 1701, -27106, 24094, 10153, -8915, 4783, 1341, 16578, -30533, 25239, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010}, {25238, 8742, 12, -1506, -22374, 7735, 8404, 1701, -27106, 24094, 10153, -8915, 4783, 1341, 16578, -30533, 8, 5281, 10438, 3650, -27322, -21845, 200, 571, 908, 21830, 28946, -15701, -14010}, {4626, 11146, 6439, 12, 4758, 10270}, {4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574}}; @OriginalMember(owner = "client!dg", name = "c", descriptor = "[[S") - public static final short[][] aShortArrayArray5 = new short[][] { { 6554, 115, 10304, 28, 5702, 7756, 5681, 4510, -31835, 22437, 2859, -11339, 16, 5157, 10446, 3658, -27314, -21965, 472, 580, 784, 21966, 28950, -15697, -14002 }, { 9104, 10275, 7595, 3610, 7975, 8526, 918, -26734, 24466, 10145, -6882, 5027, 1457, 16565, -30545, 25486, 24, 5392, 10429, 3673, -27335, -21957, 192, 687, 412, 21821, 28835, -15460, -14019 }, new short[0], new short[0], new short[0] }; + public static final short[][] aShortArrayArray5 = new short[][]{{6554, 115, 10304, 28, 5702, 7756, 5681, 4510, -31835, 22437, 2859, -11339, 16, 5157, 10446, 3658, -27314, -21965, 472, 580, 784, 21966, 28950, -15697, -14002}, {9104, 10275, 7595, 3610, 7975, 8526, 918, -26734, 24466, 10145, -6882, 5027, 1457, 16565, -30545, 25486, 24, 5392, 10429, 3673, -27335, -21957, 192, 687, 412, 21821, 28835, -15460, -14019}, new short[0], new short[0], new short[0]}; @OriginalMember(owner = "client!pk", name = "V", descriptor = "[S") - public static final short[] aShortArray64 = new short[] { -10304, 9104, -1, -1, -1 }; + public static final short[] aShortArray64 = new short[]{-10304, 9104, -1, -1, -1}; @OriginalMember(owner = "client!vd", name = "B", descriptor = "[S") - public static final short[] aShortArray71 = new short[] { 6798, 8741, 25238, 4626, 4550 }; - @OriginalMember(owner = "client!qi", name = "x", descriptor = "[I") - public static final int[] MALE_FEATURES = new int[] { 0, 1, 2, 3, 4, 5, 6, 14 }; - @OriginalMember(owner = "client!kh", name = "g", descriptor = "Lclient!hh;") - public static final PlayerAppearance DEFAULT = new PlayerAppearance(); - @OriginalMember(owner = "client!mc", name = "ab", descriptor = "[I") - public static final int[] FEMALE_FEATURES = new int[] { 7, 8, 9, 10, 11, 12, 13, 15 }; - @OriginalMember(owner = "client!wh", name = "j", descriptor = "[Lclient!cl;") - public static final AnimFrameset[] aClass3_Sub2_Sub7Array8 = new AnimFrameset[14]; - @OriginalMember(owner = "client!vf", name = "g", descriptor = "[I") + public static final short[] aShortArray71 = new short[]{6798, 8741, 25238, 4626, 4550}; + @OriginalMember(owner = "client!qi", name = "x", descriptor = "[I") + public static final int[] MALE_FEATURES = new int[]{0, 1, 2, 3, 4, 5, 6, 14}; + @OriginalMember(owner = "client!kh", name = "g", descriptor = "Lclient!hh;") + public static final PlayerAppearance DEFAULT = new PlayerAppearance(); + @OriginalMember(owner = "client!mc", name = "ab", descriptor = "[I") + public static final int[] FEMALE_FEATURES = new int[]{7, 8, 9, 10, 11, 12, 13, 15}; + @OriginalMember(owner = "client!wh", name = "j", descriptor = "[Lclient!cl;") + public static final AnimFrameset[] aClass3_Sub2_Sub7Array8 = new AnimFrameset[14]; + @OriginalMember(owner = "client!vf", name = "g", descriptor = "[I") public static final int[] anIntArray515 = new int[14]; - @OriginalMember(owner = "client!kf", name = "d", descriptor = "[Lclient!cl;") - public static final AnimFrameset[] aClass3_Sub2_Sub7Array7 = new AnimFrameset[14]; - @OriginalMember(owner = "client!cj", name = "e", descriptor = "[[S") - public static short[][] aShortArrayArray2; + @OriginalMember(owner = "client!kf", name = "d", descriptor = "[Lclient!cl;") + public static final AnimFrameset[] aClass3_Sub2_Sub7Array7 = new AnimFrameset[14]; + @OriginalMember(owner = "client!cj", name = "e", descriptor = "[[S") + public static short[][] aShortArrayArray2; @OriginalMember(owner = "client!nj", name = "m", descriptor = "[[S") public static short[][] aShortArrayArray7; @OriginalMember(owner = "client!qe", name = "r", descriptor = "[S") @@ -78,30 +78,30 @@ public final class PlayerAppearance { @OriginalMember(owner = "client!hh", name = "x", descriptor = "Z") public boolean gender; - @OriginalMember(owner = "client!wk", name = "b", descriptor = "(II)V") - public static void clean() { - aClass99_33.clean(5); - aClass99_21.clean(5); - } + @OriginalMember(owner = "client!wk", name = "b", descriptor = "(II)V") + public static void clean() { + aClass99_33.clean(5); + aClass99_21.clean(5); + } - @OriginalMember(owner = "client!ph", name = "b", descriptor = "(B)V") + @OriginalMember(owner = "client!ph", name = "b", descriptor = "(B)V") public static void method3474() { aClass99_33.removeSoft(); aClass99_21.removeSoft(); } - @OriginalMember(owner = "client!sj", name = "c", descriptor = "(I)V") - public static void method3947() { - aClass99_33.clear(); - aClass99_21.clear(); - } + @OriginalMember(owner = "client!sj", name = "c", descriptor = "(I)V") + public static void method3947() { + aClass99_33.clear(); + aClass99_21.clear(); + } - @OriginalMember(owner = "client!q", name = "a", descriptor = "(B)I") - public static int method1029() { - return aClass99_33.size(); - } + @OriginalMember(owner = "client!q", name = "a", descriptor = "(B)I") + public static int method1029() { + return aClass99_33.size(); + } - @OriginalMember(owner = "client!hh", name = "a", descriptor = "(IIIILclient!tk;III)Lclient!ak;") + @OriginalMember(owner = "client!hh", name = "a", descriptor = "(IIIILclient!tk;III)Lclient!ak;") public final Model method1946(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) SeqType arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) { @Pc(24) long local24 = (long) arg2 | (long) (arg6 << 16) | (long) arg1 << 32; @Pc(30) Model local30 = (Model) aClass99_21.get(local24); diff --git a/client/src/main/java/rt4/PlayerList.java b/client/src/main/java/rt4/PlayerList.java index ddb266c..7b59a8e 100644 --- a/client/src/main/java/rt4/PlayerList.java +++ b/client/src/main/java/rt4/PlayerList.java @@ -4,26 +4,26 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class PlayerList { - @OriginalMember(owner = "client!ja", name = "l", descriptor = "[Lclient!wa;") - public static final Buffer[] appearanceCache = new Buffer[2048]; - @OriginalMember(owner = "client!mi", name = "S", descriptor = "[Lclient!e;") - public static final Player[] players = new Player[2048]; - @OriginalMember(owner = "client!ib", name = "f", descriptor = "[I") - public static final int[] ids = new int[2048]; - @OriginalMember(owner = "client!ke", name = "Y", descriptor = "[I") - public static final int[] anIntArray309 = new int[] { 1, 4 }; - @OriginalMember(owner = "client!nk", name = "O", descriptor = "Lclient!e;") - public static Player self; - @OriginalMember(owner = "client!bf", name = "E", descriptor = "I") - public static int selfId = -1; - @OriginalMember(owner = "client!vl", name = "j", descriptor = "I") - public static int size = 0; - @OriginalMember(owner = "client!i", name = "Ub", descriptor = "[Lclient!na;") - public static JagString[] playerNames; - @OriginalMember(owner = "client!vg", name = "a", descriptor = "[Lclient!na;") - public static JagString[] playerNames2; + @OriginalMember(owner = "client!ja", name = "l", descriptor = "[Lclient!wa;") + public static final Buffer[] appearanceCache = new Buffer[2048]; + @OriginalMember(owner = "client!mi", name = "S", descriptor = "[Lclient!e;") + public static final Player[] players = new Player[2048]; + @OriginalMember(owner = "client!ib", name = "f", descriptor = "[I") + public static final int[] ids = new int[2048]; + @OriginalMember(owner = "client!ke", name = "Y", descriptor = "[I") + public static final int[] anIntArray309 = new int[]{1, 4}; + @OriginalMember(owner = "client!nk", name = "O", descriptor = "Lclient!e;") + public static Player self; + @OriginalMember(owner = "client!bf", name = "E", descriptor = "I") + public static int selfId = -1; + @OriginalMember(owner = "client!vl", name = "j", descriptor = "I") + public static int size = 0; + @OriginalMember(owner = "client!i", name = "Ub", descriptor = "[Lclient!na;") + public static JagString[] playerNames; + @OriginalMember(owner = "client!vg", name = "a", descriptor = "[Lclient!na;") + public static JagString[] playerNames2; - @OriginalMember(owner = "client!fk", name = "b", descriptor = "(I)V") + @OriginalMember(owner = "client!fk", name = "b", descriptor = "(I)V") public static void method1444() { for (@Pc(7) int local7 = -1; local7 < size; local7++) { @Pc(21) int local21; diff --git a/client/src/main/java/rt4/PlayerSkillXpTable.java b/client/src/main/java/rt4/PlayerSkillXpTable.java index c59f1f8..e8be02d 100644 --- a/client/src/main/java/rt4/PlayerSkillXpTable.java +++ b/client/src/main/java/rt4/PlayerSkillXpTable.java @@ -5,32 +5,32 @@ import org.openrs2.deob.annotation.Pc; public class PlayerSkillXpTable { - @OriginalMember(owner = "client!ud", name = "T", descriptor = "[I") + @OriginalMember(owner = "client!ud", name = "T", descriptor = "[I") public static final int[] updatedStats = new int[32]; - @OriginalMember(owner = "client!lb", name = "p", descriptor = "[I") - public static final int[] baseLevels = new int[25]; + @OriginalMember(owner = "client!lb", name = "p", descriptor = "[I") + public static final int[] baseLevels = new int[25]; - @OriginalMember(owner = "client!hk", name = "fb", descriptor = "[I") + @OriginalMember(owner = "client!hk", name = "fb", descriptor = "[I") public static final int[] boostedLevels = new int[25]; - @OriginalMember(owner = "client!sg", name = "b", descriptor = "[I") + @OriginalMember(owner = "client!sg", name = "b", descriptor = "[I") public static final int[] experience = new int[25]; - @OriginalMember(owner = "client!h", name = "S", descriptor = "[I") - public static final int[] xpLevelLookup = new int[99]; + @OriginalMember(owner = "client!h", name = "S", descriptor = "[I") + public static final int[] xpLevelLookup = new int[99]; - @OriginalMember(owner = "client!ha", name = "m", descriptor = "I") - public static int updatedStatsWriterIndex = 0; + @OriginalMember(owner = "client!ha", name = "m", descriptor = "I") + public static int updatedStatsWriterIndex = 0; - static { - @Pc(4) int local4 = 0; - for (@Pc(6) int local6 = 0; local6 < 99; local6++) { - @Pc(13) int local13 = local6 + 1; - @Pc(26) int local26 = (int) (Math.pow(2.0D, (double) local13 / 7.0D) * 300.0D + (double) local13); - local4 += local26; - PlayerSkillXpTable.xpLevelLookup[local6] = local4 / 4; - } - } + static { + @Pc(4) int local4 = 0; + for (@Pc(6) int local6 = 0; local6 < 99; local6++) { + @Pc(13) int local13 = local6 + 1; + @Pc(26) int local26 = (int) (Math.pow(2.0D, (double) local13 / 7.0D) * 300.0D + (double) local13); + local4 += local26; + PlayerSkillXpTable.xpLevelLookup[local6] = local4 / 4; + } + } } diff --git a/client/src/main/java/rt4/Preferences.java b/client/src/main/java/rt4/Preferences.java index 105ae95..b968137 100644 --- a/client/src/main/java/rt4/Preferences.java +++ b/client/src/main/java/rt4/Preferences.java @@ -7,322 +7,322 @@ import org.openrs2.deob.annotation.Pc; import java.io.IOException; public class Preferences { - @OriginalMember(owner = "client!pa", name = "N", descriptor = "I") - public static int antiAliasingMode = 0; - @OriginalMember(owner = "client!na", name = "h", descriptor = "Z") - public static boolean safeMode = false; - @OriginalMember(owner = "client!il", name = "I", descriptor = "I") - public static int brightness = 3; - @OriginalMember(owner = "client!gf", name = "N", descriptor = "Z") - public static boolean removeRoofsSelectively = true; - @OriginalMember(owner = "client!hk", name = "eb", descriptor = "Z") - public static boolean stereo = true; - @OriginalMember(owner = "client!rm", name = "g", descriptor = "Z") - public static boolean highWaterDetail = true; - @OriginalMember(owner = "client!hn", name = "X", descriptor = "I") - public static int windowMode = 0; - @OriginalMember(owner = "client!bl", name = "W", descriptor = "I") - public static int fullScreenHeight = 0; - @OriginalMember(owner = "client!uf", name = "b", descriptor = "Z") - public static boolean showGroundDecorations = true; - @OriginalMember(owner = "client!ba", name = "x", descriptor = "Z") - public static boolean flickeringEffectsOn = true; - @OriginalMember(owner = "client!be", name = "Kb", descriptor = "Z") - public static boolean manyIdleAnimations = true; - @OriginalMember(owner = "client!cg", name = "f", descriptor = "I") - public static int ambientSoundsVolume = 127; - @OriginalMember(owner = "client!fk", name = "g", descriptor = "Z") + @OriginalMember(owner = "client!pa", name = "N", descriptor = "I") + public static int antiAliasingMode = 0; + @OriginalMember(owner = "client!na", name = "h", descriptor = "Z") + public static boolean safeMode = false; + @OriginalMember(owner = "client!il", name = "I", descriptor = "I") + public static int brightness = 3; + @OriginalMember(owner = "client!gf", name = "N", descriptor = "Z") + public static boolean removeRoofsSelectively = true; + @OriginalMember(owner = "client!hk", name = "eb", descriptor = "Z") + public static boolean stereo = true; + @OriginalMember(owner = "client!rm", name = "g", descriptor = "Z") + public static boolean highWaterDetail = true; + @OriginalMember(owner = "client!hn", name = "X", descriptor = "I") + public static int windowMode = 0; + @OriginalMember(owner = "client!bl", name = "W", descriptor = "I") + public static int fullScreenHeight = 0; + @OriginalMember(owner = "client!uf", name = "b", descriptor = "Z") + public static boolean showGroundDecorations = true; + @OriginalMember(owner = "client!ba", name = "x", descriptor = "Z") + public static boolean flickeringEffectsOn = true; + @OriginalMember(owner = "client!be", name = "Kb", descriptor = "Z") + public static boolean manyIdleAnimations = true; + @OriginalMember(owner = "client!cg", name = "f", descriptor = "I") + public static int ambientSoundsVolume = 127; + @OriginalMember(owner = "client!fk", name = "g", descriptor = "Z") public static boolean fogEnabled = true; - @OriginalMember(owner = "client!ra", name = "R", descriptor = "Z") - public static boolean characterShadowsOn = true; - @OriginalMember(owner = "client!j", name = "v", descriptor = "I") - public static int fullScreenWidth = 0; - @OriginalMember(owner = "client!l", name = "k", descriptor = "I") - public static int sceneryShadowsType = 2; - @OriginalMember(owner = "client!mi", name = "ab", descriptor = "Z") - public static boolean manyGroundTextures = true; - @OriginalMember(owner = "client!od", name = "c", descriptor = "Z") - public static boolean highDetailLighting = true; - @OriginalMember(owner = "client!bb", name = "n", descriptor = "I") - public static int musicVolume = 255; - @OriginalMember(owner = "client!ec", name = "n", descriptor = "Z") - public static boolean highDetailTextures = true; - @OriginalMember(owner = "client!jl", name = "J", descriptor = "I") - public static int soundEffectVolume = 127; - @OriginalMember(owner = "client!na", name = "o", descriptor = "I") - public static int lastWorldId = 0; - @OriginalMember(owner = "client!lb", name = "A", descriptor = "I") + @OriginalMember(owner = "client!ra", name = "R", descriptor = "Z") + public static boolean characterShadowsOn = true; + @OriginalMember(owner = "client!j", name = "v", descriptor = "I") + public static int fullScreenWidth = 0; + @OriginalMember(owner = "client!l", name = "k", descriptor = "I") + public static int sceneryShadowsType = 2; + @OriginalMember(owner = "client!mi", name = "ab", descriptor = "Z") + public static boolean manyGroundTextures = true; + @OriginalMember(owner = "client!od", name = "c", descriptor = "Z") + public static boolean highDetailLighting = true; + @OriginalMember(owner = "client!bb", name = "n", descriptor = "I") + public static int musicVolume = 255; + @OriginalMember(owner = "client!ec", name = "n", descriptor = "Z") + public static boolean highDetailTextures = true; + @OriginalMember(owner = "client!jl", name = "J", descriptor = "I") + public static int soundEffectVolume = 127; + @OriginalMember(owner = "client!na", name = "o", descriptor = "I") + public static int lastWorldId = 0; + @OriginalMember(owner = "client!lb", name = "A", descriptor = "I") public static int buildArea = 0; - @OriginalMember(owner = "client!ml", name = "ab", descriptor = "Z") - public static boolean allLevelsVisible = true; - @OriginalMember(owner = "client!cj", name = "h", descriptor = "Z") - public static boolean aBoolean63; - @OriginalMember(owner = "client!fb", name = "m", descriptor = "Z") - public static boolean cursorsEnabled = true; - @OriginalMember(owner = "client!k", name = "c", descriptor = "Z") - public static boolean hdr = false; - @OriginalMember(owner = "client!rg", name = "F", descriptor = "I") - public static int favoriteWorlds = 0; - @OriginalMember(owner = "client!bh", name = "z", descriptor = "Z") - public static boolean sentToServer = true; - @OriginalMember(owner = "client!ga", name = "e", descriptor = "I") - static int particles = 2; + @OriginalMember(owner = "client!ml", name = "ab", descriptor = "Z") + public static boolean allLevelsVisible = true; + @OriginalMember(owner = "client!cj", name = "h", descriptor = "Z") + public static boolean aBoolean63; + @OriginalMember(owner = "client!fb", name = "m", descriptor = "Z") + public static boolean cursorsEnabled = true; + @OriginalMember(owner = "client!k", name = "c", descriptor = "Z") + public static boolean hdr = false; + @OriginalMember(owner = "client!rg", name = "F", descriptor = "I") + public static int favoriteWorlds = 0; + @OriginalMember(owner = "client!bh", name = "z", descriptor = "Z") + public static boolean sentToServer = true; + @OriginalMember(owner = "client!ga", name = "e", descriptor = "I") + static int particles = 2; - @OriginalMember(owner = "client!qh", name = "a", descriptor = "(Lsignlink!ll;B)V") - public static void write(@OriginalArg(0) SignLink arg0) { - @Pc(11) FileOnDisk local11 = null; - try { - @Pc(16) PrivilegedRequest local16 = arg0.openPreferences("runescape"); - while (local16.status == 0) { - ThreadUtils.sleep(1L); - } - if (local16.status == 1) { - local11 = (FileOnDisk) local16.result; - @Pc(39) Buffer local39 = encode(); - local11.write(local39.data, local39.offset, 0); - } - } catch (@Pc(49) Exception local49) { - } - try { - if (local11 != null) { - local11.close(); - } - } catch (@Pc(56) Exception local56) { - } - } + @OriginalMember(owner = "client!qh", name = "a", descriptor = "(Lsignlink!ll;B)V") + public static void write(@OriginalArg(0) SignLink arg0) { + @Pc(11) FileOnDisk local11 = null; + try { + @Pc(16) PrivilegedRequest local16 = arg0.openPreferences("runescape"); + while (local16.status == 0) { + ThreadUtils.sleep(1L); + } + if (local16.status == 1) { + local11 = (FileOnDisk) local16.result; + @Pc(39) Buffer local39 = encode(); + local11.write(local39.data, local39.offset, 0); + } + } catch (@Pc(49) Exception local49) { + } + try { + if (local11 != null) { + local11.close(); + } + } catch (@Pc(56) Exception local56) { + } + } - @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lsignlink!ll;I)V") - public static void read(@OriginalArg(0) SignLink arg0) { - brightness = 3; - setAllVisibleLevels(true); - removeRoofsSelectively = true; - stereo = true; - highWaterDetail = true; - windowMode = 0; - fullScreenHeight = 0; - showGroundDecorations = true; - flickeringEffectsOn = true; - manyIdleAnimations = true; - ambientSoundsVolume = 127; - fogEnabled = true; - characterShadowsOn = true; - fullScreenWidth = 0; - sceneryShadowsType = 2; - manyGroundTextures = true; - highDetailLighting = true; - musicVolume = 255; - highDetailTextures = true; - antiAliasingMode = 0; - @Pc(48) FileOnDisk local48 = null; - soundEffectVolume = 127; - if (GameShell.maxMemory >= 96) { - setParticles(2); - } else { - setParticles(0); - } - lastWorldId = 0; - buildArea = 0; - aBoolean63 = false; - cursorsEnabled = true; - safeMode = false; - hdr = false; - favoriteWorlds = 0; - try { - @Pc(78) PrivilegedRequest request = arg0.openPreferences("runescape"); - while (request.status == 0) { - ThreadUtils.sleep(1L); - } - if (request.status == 1) { - local48 = (FileOnDisk) request.result; - @Pc(106) byte[] local106 = new byte[(int) local48.length()]; - @Pc(128) int local128; - for (@Pc(108) int local108 = 0; local108 < local106.length; local108 += local128) { - local128 = local48.read(local108, local106.length - local108, local106); - if (local128 == -1) { - throw new IOException("EOF"); - } - } - decode(new Buffer(local106)); - } - } catch (@Pc(151) Exception local151) { - } - try { - if (local48 != null) { - local48.close(); - } - } catch (@Pc(158) Exception local158) { - } - } + @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lsignlink!ll;I)V") + public static void read(@OriginalArg(0) SignLink arg0) { + brightness = 3; + setAllVisibleLevels(true); + removeRoofsSelectively = true; + stereo = true; + highWaterDetail = true; + windowMode = 0; + fullScreenHeight = 0; + showGroundDecorations = true; + flickeringEffectsOn = true; + manyIdleAnimations = true; + ambientSoundsVolume = 127; + fogEnabled = true; + characterShadowsOn = true; + fullScreenWidth = 0; + sceneryShadowsType = 2; + manyGroundTextures = true; + highDetailLighting = true; + musicVolume = 255; + highDetailTextures = true; + antiAliasingMode = 0; + @Pc(48) FileOnDisk local48 = null; + soundEffectVolume = 127; + if (GameShell.maxMemory >= 96) { + setParticles(2); + } else { + setParticles(0); + } + lastWorldId = 0; + buildArea = 0; + aBoolean63 = false; + cursorsEnabled = true; + safeMode = false; + hdr = false; + favoriteWorlds = 0; + try { + @Pc(78) PrivilegedRequest request = arg0.openPreferences("runescape"); + while (request.status == 0) { + ThreadUtils.sleep(1L); + } + if (request.status == 1) { + local48 = (FileOnDisk) request.result; + @Pc(106) byte[] local106 = new byte[(int) local48.length()]; + @Pc(128) int local128; + for (@Pc(108) int local108 = 0; local108 < local106.length; local108 += local128) { + local128 = local48.read(local108, local106.length - local108, local106); + if (local128 == -1) { + throw new IOException("EOF"); + } + } + decode(new Buffer(local106)); + } + } catch (@Pc(151) Exception local151) { + } + try { + if (local48 != null) { + local48.close(); + } + } catch (@Pc(158) Exception local158) { + } + } - @OriginalMember(owner = "client!ec", name = "a", descriptor = "(IZ)V") - public static void setAllVisibleLevels(@OriginalArg(1) boolean arg0) { - allLevelsVisible = arg0; - Static87.aBoolean130 = !SceneGraph.allLevelsAreVisible(); - } + @OriginalMember(owner = "client!ec", name = "a", descriptor = "(IZ)V") + public static void setAllVisibleLevels(@OriginalArg(1) boolean arg0) { + allLevelsVisible = arg0; + Static87.aBoolean130 = !SceneGraph.allLevelsAreVisible(); + } - @OriginalMember(owner = "client!ga", name = "b", descriptor = "(I)V") - public static void setParticles(@OriginalArg(0) int arg0) { - particles = arg0; - } + @OriginalMember(owner = "client!ga", name = "b", descriptor = "(I)V") + public static void setParticles(@OriginalArg(0) int arg0) { + particles = arg0; + } - @OriginalMember(owner = "client!ga", name = "c", descriptor = "()I") - public static int getParticleSetting() { - return particles; - } + @OriginalMember(owner = "client!ga", name = "c", descriptor = "()I") + public static int getParticleSetting() { + return particles; + } - @OriginalMember(owner = "client!kk", name = "b", descriptor = "(Lclient!wa;I)V") - public static void decode(@OriginalArg(0) Buffer buffer) { - if (buffer.data.length - buffer.offset < 1) { - return; - } - @Pc(21) int version = buffer.g1(); - if (version < 0 || version > 11) { - return; - } - @Pc(34) byte len; - if (version == 11) { - len = 33; - } else if (version == 10) { - len = 32; - } else if (version == 9) { - len = 31; - } else if (version == 8) { - len = 30; - } else if (version == 7) { - len = 29; - } else if (version == 6) { - len = 28; - } else if (version == 5) { - len = 28; - } else if (version == 4) { - len = 24; - } else if (version == 3) { - len = 23; - } else if (version == 2) { - len = 22; - } else if (version == 1) { - len = 23; - } else { - len = 19; - } - if (buffer.data.length - buffer.offset < len) { - return; - } - brightness = buffer.g1(); - if (brightness < 1) { - brightness = 1; - } else if (brightness > 4) { - brightness = 4; - } - setAllVisibleLevels(buffer.g1() == 1); - removeRoofsSelectively = buffer.g1() == 1; - showGroundDecorations = buffer.g1() == 1; - highDetailTextures = buffer.g1() == 1; - manyIdleAnimations = buffer.g1() == 1; - flickeringEffectsOn = buffer.g1() == 1; - manyGroundTextures = buffer.g1() == 1; - characterShadowsOn = buffer.g1() == 1; - sceneryShadowsType = buffer.g1(); - if (sceneryShadowsType > 2) { - sceneryShadowsType = 2; - } - if (version < 2) { - highDetailLighting = buffer.g1() == 1; - buffer.g1(); - } else { - highDetailLighting = buffer.g1() == 1; - } - highWaterDetail = buffer.g1() == 1; - fogEnabled = buffer.g1() == 1; - windowMode = buffer.g1(); - if (windowMode > 2) { - windowMode = 2; - } - antiAliasingMode = windowMode; - stereo = buffer.g1() == 1; - soundEffectVolume = buffer.g1(); - if (soundEffectVolume > 127) { - soundEffectVolume = 127; - } - musicVolume = buffer.g1(); - ambientSoundsVolume = buffer.g1(); - if (ambientSoundsVolume > 127) { - ambientSoundsVolume = 127; - } - if (version >= 1) { - fullScreenWidth = buffer.g2(); - fullScreenHeight = buffer.g2(); - } - if (version >= 3 && version < 6) { - buffer.g1(); - } - if (version >= 4) { - @Pc(386) int particles = buffer.g1(); - if (GameShell.maxMemory < 96) { - particles = 0; - } - setParticles(particles); - } - if (version >= 5) { - lastWorldId = buffer.g4(); - } - if (version >= 6) { - favoriteWorlds = buffer.g1(); - } - if (version >= 7) { - safeMode = buffer.g1() == 1; - } - if (version >= 8) { - aBoolean63 = buffer.g1() == 1; - } - if (version >= 9) { - buildArea = buffer.g1(); - } - if (version >= 10) { - hdr = buffer.g1() != 0; - } - if (version >= 11) { - cursorsEnabled = buffer.g1() != 0; - } - } + @OriginalMember(owner = "client!kk", name = "b", descriptor = "(Lclient!wa;I)V") + public static void decode(@OriginalArg(0) Buffer buffer) { + if (buffer.data.length - buffer.offset < 1) { + return; + } + @Pc(21) int version = buffer.g1(); + if (version < 0 || version > 11) { + return; + } + @Pc(34) byte len; + if (version == 11) { + len = 33; + } else if (version == 10) { + len = 32; + } else if (version == 9) { + len = 31; + } else if (version == 8) { + len = 30; + } else if (version == 7) { + len = 29; + } else if (version == 6) { + len = 28; + } else if (version == 5) { + len = 28; + } else if (version == 4) { + len = 24; + } else if (version == 3) { + len = 23; + } else if (version == 2) { + len = 22; + } else if (version == 1) { + len = 23; + } else { + len = 19; + } + if (buffer.data.length - buffer.offset < len) { + return; + } + brightness = buffer.g1(); + if (brightness < 1) { + brightness = 1; + } else if (brightness > 4) { + brightness = 4; + } + setAllVisibleLevels(buffer.g1() == 1); + removeRoofsSelectively = buffer.g1() == 1; + showGroundDecorations = buffer.g1() == 1; + highDetailTextures = buffer.g1() == 1; + manyIdleAnimations = buffer.g1() == 1; + flickeringEffectsOn = buffer.g1() == 1; + manyGroundTextures = buffer.g1() == 1; + characterShadowsOn = buffer.g1() == 1; + sceneryShadowsType = buffer.g1(); + if (sceneryShadowsType > 2) { + sceneryShadowsType = 2; + } + if (version < 2) { + highDetailLighting = buffer.g1() == 1; + buffer.g1(); + } else { + highDetailLighting = buffer.g1() == 1; + } + highWaterDetail = buffer.g1() == 1; + fogEnabled = buffer.g1() == 1; + windowMode = buffer.g1(); + if (windowMode > 2) { + windowMode = 2; + } + antiAliasingMode = windowMode; + stereo = buffer.g1() == 1; + soundEffectVolume = buffer.g1(); + if (soundEffectVolume > 127) { + soundEffectVolume = 127; + } + musicVolume = buffer.g1(); + ambientSoundsVolume = buffer.g1(); + if (ambientSoundsVolume > 127) { + ambientSoundsVolume = 127; + } + if (version >= 1) { + fullScreenWidth = buffer.g2(); + fullScreenHeight = buffer.g2(); + } + if (version >= 3 && version < 6) { + buffer.g1(); + } + if (version >= 4) { + @Pc(386) int particles = buffer.g1(); + if (GameShell.maxMemory < 96) { + particles = 0; + } + setParticles(particles); + } + if (version >= 5) { + lastWorldId = buffer.g4(); + } + if (version >= 6) { + favoriteWorlds = buffer.g1(); + } + if (version >= 7) { + safeMode = buffer.g1() == 1; + } + if (version >= 8) { + aBoolean63 = buffer.g1() == 1; + } + if (version >= 9) { + buildArea = buffer.g1(); + } + if (version >= 10) { + hdr = buffer.g1() != 0; + } + if (version >= 11) { + cursorsEnabled = buffer.g1() != 0; + } + } - @OriginalMember(owner = "client!dl", name = "a", descriptor = "(B)Lclient!wa;") - public static Buffer encode() { - @Pc(4) Buffer local4 = new Buffer(34); - local4.p1(11); - local4.p1(brightness); - local4.p1(allLevelsVisible ? 1 : 0); - local4.p1(removeRoofsSelectively ? 1 : 0); - local4.p1(showGroundDecorations ? 1 : 0); - local4.p1(highDetailTextures ? 1 : 0); - local4.p1(manyIdleAnimations ? 1 : 0); - local4.p1(flickeringEffectsOn ? 1 : 0); - local4.p1(manyGroundTextures ? 1 : 0); - local4.p1(characterShadowsOn ? 1 : 0); - local4.p1(sceneryShadowsType); - local4.p1(highDetailLighting ? 1 : 0); - local4.p1(highWaterDetail ? 1 : 0); - local4.p1(fogEnabled ? 1 : 0); - local4.p1(windowMode); - local4.p1(stereo ? 1 : 0); - local4.p1(soundEffectVolume); - local4.p1(musicVolume); - local4.p1(ambientSoundsVolume); - local4.p2(fullScreenWidth); - local4.p2(fullScreenHeight); - local4.p1(getParticleSetting()); - local4.p4(lastWorldId); - local4.p1(favoriteWorlds); - local4.p1(safeMode ? 1 : 0); - local4.p1(aBoolean63 ? 1 : 0); - local4.p1(buildArea); - local4.p1(hdr ? 1 : 0); - local4.p1(cursorsEnabled ? 1 : 0); - return local4; - } + @OriginalMember(owner = "client!dl", name = "a", descriptor = "(B)Lclient!wa;") + public static Buffer encode() { + @Pc(4) Buffer local4 = new Buffer(34); + local4.p1(11); + local4.p1(brightness); + local4.p1(allLevelsVisible ? 1 : 0); + local4.p1(removeRoofsSelectively ? 1 : 0); + local4.p1(showGroundDecorations ? 1 : 0); + local4.p1(highDetailTextures ? 1 : 0); + local4.p1(manyIdleAnimations ? 1 : 0); + local4.p1(flickeringEffectsOn ? 1 : 0); + local4.p1(manyGroundTextures ? 1 : 0); + local4.p1(characterShadowsOn ? 1 : 0); + local4.p1(sceneryShadowsType); + local4.p1(highDetailLighting ? 1 : 0); + local4.p1(highWaterDetail ? 1 : 0); + local4.p1(fogEnabled ? 1 : 0); + local4.p1(windowMode); + local4.p1(stereo ? 1 : 0); + local4.p1(soundEffectVolume); + local4.p1(musicVolume); + local4.p1(ambientSoundsVolume); + local4.p2(fullScreenWidth); + local4.p2(fullScreenHeight); + local4.p1(getParticleSetting()); + local4.p4(lastWorldId); + local4.p1(favoriteWorlds); + local4.p1(safeMode ? 1 : 0); + local4.p1(aBoolean63 ? 1 : 0); + local4.p1(buildArea); + local4.p1(hdr ? 1 : 0); + local4.p1(cursorsEnabled ? 1 : 0); + return local4; + } - @OriginalMember(owner = "client!lf", name = "c", descriptor = "(I)I") - public static int toInt() { - return ((stereo ? 1 : 0) << 19) + (((fogEnabled ? 1 : 0) << 16) + ((highWaterDetail ? 1 : 0) << 15) + ((highDetailLighting ? 1 : 0) << 13) + ((characterShadowsOn ? 1 : 0) << 10) + ((manyGroundTextures ? 1 : 0) << 9) + ((manyIdleAnimations ? 1 : 0) << 7) + ((highDetailTextures ? 1 : 0) << 6) + ((showGroundDecorations ? 1 : 0) << 5) + (((allLevelsVisible ? 1 : 0) << 3) + (brightness & 0x7) - (-((removeRoofsSelectively ? 1 : 0) << 4) + -((flickeringEffectsOn ? 1 : 0) << 8)) - (-((sceneryShadowsType & 0x3) << 11) + -((soundEffectVolume == 0 ? 0 : 1) << 20) - (((musicVolume == 0 ? 0 : 1) << 21) + ((ambientSoundsVolume == 0 ? 0 : 1) << 22)))) + (getParticleSetting() << 23)); - } + @OriginalMember(owner = "client!lf", name = "c", descriptor = "(I)I") + public static int toInt() { + return ((stereo ? 1 : 0) << 19) + (((fogEnabled ? 1 : 0) << 16) + ((highWaterDetail ? 1 : 0) << 15) + ((highDetailLighting ? 1 : 0) << 13) + ((characterShadowsOn ? 1 : 0) << 10) + ((manyGroundTextures ? 1 : 0) << 9) + ((manyIdleAnimations ? 1 : 0) << 7) + ((highDetailTextures ? 1 : 0) << 6) + ((showGroundDecorations ? 1 : 0) << 5) + (((allLevelsVisible ? 1 : 0) << 3) + (brightness & 0x7) - (-((removeRoofsSelectively ? 1 : 0) << 4) + -((flickeringEffectsOn ? 1 : 0) << 8)) - (-((sceneryShadowsType & 0x3) << 11) + -((soundEffectVolume == 0 ? 0 : 1) << 20) - (((musicVolume == 0 ? 0 : 1) << 21) + ((ambientSoundsVolume == 0 ? 0 : 1) << 22)))) + (getParticleSetting() << 23)); + } } diff --git a/client/src/main/java/rt4/ProjAnim.java b/client/src/main/java/rt4/ProjAnim.java index 0c5787a..aeb4853 100644 --- a/client/src/main/java/rt4/ProjAnim.java +++ b/client/src/main/java/rt4/ProjAnim.java @@ -174,7 +174,7 @@ public final class ProjAnim extends Entity { public final void method3705(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { @Pc(17) double local17; if (!this.aBoolean239) { - @Pc(10) double local10 = (double) (arg0 - this.anInt4817); + @Pc(10) double local10 = arg0 - this.anInt4817; local17 = arg3 - this.anInt4804; @Pc(26) double local26 = Math.sqrt(local17 * local17 + local10 * local10); this.aDouble6 = this.anInt4813; diff --git a/client/src/main/java/rt4/Protocol.java b/client/src/main/java/rt4/Protocol.java index 8e269bc..024a0d5 100644 --- a/client/src/main/java/rt4/Protocol.java +++ b/client/src/main/java/rt4/Protocol.java @@ -8,712 +8,712 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; public class Protocol { - @OriginalMember(owner = "client!eg", name = "e", descriptor = "Lclient!i;") + @OriginalMember(owner = "client!eg", name = "e", descriptor = "Lclient!i;") public static final Packet inboundBuffer = new Packet(65536); - @OriginalMember(owner = "client!wb", name = "f", descriptor = "Lclient!wa;") - public static final Buffer chatBuffer = new Buffer(new byte[5000]); - @OriginalMember(owner = "client!ag", name = "P", descriptor = "Lclient!i;") - public static final Packet outboundBuffer = new Packet(5000); - @OriginalMember(owner = "client!eb", name = "p", descriptor = "[I") - public static final int[] removedIds = new int[1000]; - @OriginalMember(owner = "client!dh", name = "d", descriptor = "[I") - public static final int[] extendedIds = new int[2048]; - @OriginalMember(owner = "client!ta", name = "z", descriptor = "[I") - public static final int[] PACKET_LENGTHS = new int[] { -1, 0, 8, 0, 2, 0, 0, 0, 0, 12, 0, 1, 0, 3, 7, 0, 15, 6, 0, 0, 4, 7, -2, -1, 2, 0, 2, 8, 0, 0, 0, 0, -2, 5, 0, 0, 8, 3, 6, 0, 0, 0, -1, 0, -1, 0, 0, 6, -2, 0, 12, 0, 0, 0, -1, -2, 10, 0, 0, 0, 3, 0, -1, 0, 0, 5, 6, 0, 0, 8, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 6, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, -2, 0, 0, 0, 0, 0, 12, 2, 0, -2, -2, 20, 0, 0, 10, 0, 15, 0, -1, 0, 8, -2, 0, 0, 0, 8, 0, 12, 0, 0, 7, 0, 0, 0, 0, 0, -1, -1, 0, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 8, 9, 0, 0, 0, 2, -1, 0, -2, 0, 4, 14, 0, 0, 0, 24, 0, -2, 5, 0, 0, 0, 10, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 1, 0, 0, 2, -1, 1, 0, 0, 0, 0, 14, 0, 0, 0, 0, 10, 5, 0, 0, 0, 0, 0, -2, 0, 0, 9, 0, 0, 8, 0, 0, 0, 0, -2, 6, 0, 0, 0, -2, 0, 3, 0, 1, 7, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 3, 0, 0 }; - @OriginalMember(owner = "client!tl", name = "f", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!wb", name = "f", descriptor = "Lclient!wa;") + public static final Buffer chatBuffer = new Buffer(new byte[5000]); + @OriginalMember(owner = "client!ag", name = "P", descriptor = "Lclient!i;") + public static final Packet outboundBuffer = new Packet(5000); + @OriginalMember(owner = "client!eb", name = "p", descriptor = "[I") + public static final int[] removedIds = new int[1000]; + @OriginalMember(owner = "client!dh", name = "d", descriptor = "[I") + public static final int[] extendedIds = new int[2048]; + @OriginalMember(owner = "client!ta", name = "z", descriptor = "[I") + public static final int[] PACKET_LENGTHS = new int[]{-1, 0, 8, 0, 2, 0, 0, 0, 0, 12, 0, 1, 0, 3, 7, 0, 15, 6, 0, 0, 4, 7, -2, -1, 2, 0, 2, 8, 0, 0, 0, 0, -2, 5, 0, 0, 8, 3, 6, 0, 0, 0, -1, 0, -1, 0, 0, 6, -2, 0, 12, 0, 0, 0, -1, -2, 10, 0, 0, 0, 3, 0, -1, 0, 0, 5, 6, 0, 0, 8, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 6, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, -2, 0, 0, 0, 0, 0, 12, 2, 0, -2, -2, 20, 0, 0, 10, 0, 15, 0, -1, 0, 8, -2, 0, 0, 0, 8, 0, 12, 0, 0, 7, 0, 0, 0, 0, 0, -1, -1, 0, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 8, 9, 0, 0, 0, 2, -1, 0, -2, 0, 4, 14, 0, 0, 0, 24, 0, -2, 5, 0, 0, 0, 10, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 1, 0, 0, 2, -1, 1, 0, 0, 0, 0, 14, 0, 0, 0, 0, 10, 5, 0, 0, 0, 0, 0, -2, 0, 0, 9, 0, 0, 8, 0, 0, 0, 0, -2, 6, 0, 0, 0, -2, 0, 3, 0, 1, 7, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 3, 0, 0}; + @OriginalMember(owner = "client!tl", name = "f", descriptor = "Lclient!na;") public static final JagString ASSIST = JagString.parse(":assist:"); - @OriginalMember(owner = "client!pl", name = "f", descriptor = "Lclient!na;") - public static final JagString TRADEREQ = JagString.parse(":tradereq:"); - @OriginalMember(owner = "client!lb", name = "s", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!pl", name = "f", descriptor = "Lclient!na;") + public static final JagString TRADEREQ = JagString.parse(":tradereq:"); + @OriginalMember(owner = "client!lb", name = "s", descriptor = "Lclient!na;") public static final JagString CLAN = JagString.parse(":clan:"); - @OriginalMember(owner = "client!ij", name = "a", descriptor = "Lclient!na;") - public static final JagString DUELFRIEND = JagString.parse(":duelfriend:"); - @OriginalMember(owner = "client!km", name = "Sc", descriptor = "Lclient!na;") - public static final JagString TRADE = JagString.parse(":trade:"); - @OriginalMember(owner = "client!pb", name = "x", descriptor = "[[[I") + @OriginalMember(owner = "client!ij", name = "a", descriptor = "Lclient!na;") + public static final JagString DUELFRIEND = JagString.parse(":duelfriend:"); + @OriginalMember(owner = "client!km", name = "Sc", descriptor = "Lclient!na;") + public static final JagString TRADE = JagString.parse(":trade:"); + @OriginalMember(owner = "client!pb", name = "x", descriptor = "[[[I") public static final int[][][] anIntArrayArrayArray18 = new int[4][13][13]; - @OriginalMember(owner = "client!fc", name = "f", descriptor = "Lclient!na;") - public static final JagString IMG0 = JagString.parse(""); - @OriginalMember(owner = "client!en", name = "h", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!fc", name = "f", descriptor = "Lclient!na;") + public static final JagString IMG0 = JagString.parse(""); + @OriginalMember(owner = "client!en", name = "h", descriptor = "Lclient!na;") public static final JagString CHALREQ = JagString.parse(":chalreq:"); - @OriginalMember(owner = "client!ef", name = "f", descriptor = "Lclient!na;") - public static final JagString DUELSTAKE = JagString.parse(":duelstake:"); - @OriginalMember(owner = "client!wd", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_989 = JagString.parse("cookieprefix"); - @OriginalMember(owner = "client!u", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_1029 = JagString.parse("cookiehost"); - @OriginalMember(owner = "client!lc", name = "m", descriptor = "Lclient!na;") - public static final JagString aClass100_667 = JagString.parse("settings="); - @OriginalMember(owner = "client!wh", name = "n", descriptor = "Lclient!na;") - public static final JagString aClass100_1095 = JagString.parse("; version=1; path=)4; domain="); - @OriginalMember(owner = "client!tm", name = "d", descriptor = "Lclient!na;") - public static final JagString aClass100_1018 = JagString.parse("; Expires=Thu)1 01)2Jan)21970 00:00:00 GMT; Max)2Age=0"); - @OriginalMember(owner = "client!vg", name = "h", descriptor = "Lclient!na;") - public static final JagString aClass100_1082 = JagString.parse("; Expires="); - @OriginalMember(owner = "client!s", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_821 = JagString.parse("document)3cookie=(R"); - @OriginalMember(owner = "client!sc", name = "f", descriptor = "Lclient!na;") - public static final JagString aClass100_946 = JagString.parse("(R"); - @OriginalMember(owner = "client!fb", name = "i", descriptor = "Lclient!na;") - public static final JagString aClass100_431 = JagString.parse("; Max)2Age="); - @OriginalMember(owner = "client!ch", name = "z", descriptor = "[I") - public static final int[] anIntArray76 = new int[5]; - @OriginalMember(owner = "client!jk", name = "B", descriptor = "Lclient!ma;") - public static BufferedSocket socket; - @OriginalMember(owner = "client!fl", name = "C", descriptor = "Lsignlink!im;") - public static PrivilegedRequest socketRequest; - @OriginalMember(owner = "client!pe", name = "a", descriptor = "I") - public static int verifyId = 0; - @OriginalMember(owner = "client!na", name = "l", descriptor = "I") + @OriginalMember(owner = "client!ef", name = "f", descriptor = "Lclient!na;") + public static final JagString DUELSTAKE = JagString.parse(":duelstake:"); + @OriginalMember(owner = "client!wd", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_989 = JagString.parse("cookieprefix"); + @OriginalMember(owner = "client!u", name = "g", descriptor = "Lclient!na;") + public static final JagString aClass100_1029 = JagString.parse("cookiehost"); + @OriginalMember(owner = "client!lc", name = "m", descriptor = "Lclient!na;") + public static final JagString aClass100_667 = JagString.parse("settings="); + @OriginalMember(owner = "client!wh", name = "n", descriptor = "Lclient!na;") + public static final JagString aClass100_1095 = JagString.parse("; version=1; path=)4; domain="); + @OriginalMember(owner = "client!tm", name = "d", descriptor = "Lclient!na;") + public static final JagString aClass100_1018 = JagString.parse("; Expires=Thu)1 01)2Jan)21970 00:00:00 GMT; Max)2Age=0"); + @OriginalMember(owner = "client!vg", name = "h", descriptor = "Lclient!na;") + public static final JagString aClass100_1082 = JagString.parse("; Expires="); + @OriginalMember(owner = "client!s", name = "g", descriptor = "Lclient!na;") + public static final JagString aClass100_821 = JagString.parse("document)3cookie=(R"); + @OriginalMember(owner = "client!sc", name = "f", descriptor = "Lclient!na;") + public static final JagString aClass100_946 = JagString.parse("(R"); + @OriginalMember(owner = "client!fb", name = "i", descriptor = "Lclient!na;") + public static final JagString aClass100_431 = JagString.parse("; Max)2Age="); + @OriginalMember(owner = "client!ch", name = "z", descriptor = "[I") + public static final int[] anIntArray76 = new int[5]; + @OriginalMember(owner = "client!jk", name = "B", descriptor = "Lclient!ma;") + public static BufferedSocket socket; + @OriginalMember(owner = "client!fl", name = "C", descriptor = "Lsignlink!im;") + public static PrivilegedRequest socketRequest; + @OriginalMember(owner = "client!pe", name = "a", descriptor = "I") + public static int verifyId = 0; + @OriginalMember(owner = "client!na", name = "l", descriptor = "I") public static int opcode = 0; - @OriginalMember(owner = "client!sc", name = "o", descriptor = "I") - public static int length = 0; - @OriginalMember(owner = "client!jb", name = "m", descriptor = "I") - public static int extendedCount = 0; - @OriginalMember(owner = "client!tg", name = "h", descriptor = "I") - public static int removedCount = 0; - @OriginalMember(owner = "client!qi", name = "t", descriptor = "I") + @OriginalMember(owner = "client!sc", name = "o", descriptor = "I") + public static int length = 0; + @OriginalMember(owner = "client!jb", name = "m", descriptor = "I") + public static int extendedCount = 0; + @OriginalMember(owner = "client!tg", name = "h", descriptor = "I") + public static int removedCount = 0; + @OriginalMember(owner = "client!qi", name = "t", descriptor = "I") public static int anInt4762 = 0; - @OriginalMember(owner = "client!ck", name = "eb", descriptor = "Z") - public static boolean verifyIdChanged = false; - @OriginalMember(owner = "client!dm", name = "q", descriptor = "I") - public static int opcode4 = 0; - @OriginalMember(owner = "client!af", name = "k", descriptor = "I") + @OriginalMember(owner = "client!ck", name = "eb", descriptor = "Z") + public static boolean verifyIdChanged = false; + @OriginalMember(owner = "client!dm", name = "q", descriptor = "I") + public static int opcode4 = 0; + @OriginalMember(owner = "client!af", name = "k", descriptor = "I") public static int opcode3 = 0; - @OriginalMember(owner = "client!sj", name = "t", descriptor = "I") + @OriginalMember(owner = "client!sj", name = "t", descriptor = "I") public static int opcode2 = 0; - @OriginalMember(owner = "client!bj", name = "r", descriptor = "I") - public static int anInt659 = 2; - @OriginalMember(owner = "client!dg", name = "h", descriptor = "Lclient!be;") - public static Component aClass13_11; - @OriginalMember(owner = "client!ld", name = "i", descriptor = "I") - public static int anInt3486 = 0; - @OriginalMember(owner = "client!kf", name = "l", descriptor = "I") - public static int anInt5235 = 0; - @OriginalMember(owner = "client!pm", name = "ab", descriptor = "Z") - public static boolean aBoolean228 = true; - @OriginalMember(owner = "client!vl", name = "k", descriptor = "I") + @OriginalMember(owner = "client!bj", name = "r", descriptor = "I") + public static int anInt659 = 2; + @OriginalMember(owner = "client!dg", name = "h", descriptor = "Lclient!be;") + public static Component aClass13_11; + @OriginalMember(owner = "client!ld", name = "i", descriptor = "I") + public static int anInt3486 = 0; + @OriginalMember(owner = "client!kf", name = "l", descriptor = "I") + public static int anInt5235 = 0; + @OriginalMember(owner = "client!pm", name = "ab", descriptor = "Z") + public static boolean aBoolean228 = true; + @OriginalMember(owner = "client!vl", name = "k", descriptor = "I") public static int anInt5775 = 0; - @OriginalMember(owner = "client!t", name = "l", descriptor = "Lclient!ma;") - public static BufferedSocket aClass95_4; - @OriginalMember(owner = "client!od", name = "i", descriptor = "I") - public static int anInt4247 = 0; - @OriginalMember(owner = "client!bf", name = "G", descriptor = "I") - public static int anInt551 = 0; - @OriginalMember(owner = "client!pb", name = "ab", descriptor = "I") + @OriginalMember(owner = "client!t", name = "l", descriptor = "Lclient!ma;") + public static BufferedSocket aClass95_4; + @OriginalMember(owner = "client!od", name = "i", descriptor = "I") + public static int anInt4247 = 0; + @OriginalMember(owner = "client!bf", name = "G", descriptor = "I") + public static int anInt551 = 0; + @OriginalMember(owner = "client!pb", name = "ab", descriptor = "I") public static int anInt4422 = 0; - @OriginalMember(owner = "client!fe", name = "R", descriptor = "Z") - public static boolean prevFocus = true; - @OriginalMember(owner = "client!rm", name = "c", descriptor = "I") - public static int anInt4941 = 1; + @OriginalMember(owner = "client!fe", name = "R", descriptor = "Z") + public static boolean prevFocus = true; + @OriginalMember(owner = "client!rm", name = "c", descriptor = "I") + public static int anInt4941 = 1; - @OriginalMember(owner = "client!g", name = "b", descriptor = "(B)V") - public static void readLocationPacket() { - if (opcode == ServerProt.LOCATION_PACKET_195) { - int local15 = inboundBuffer.g1neg(); - int local19 = local15 & 0x3; - int local23 = local15 >> 2; - int local27 = Loc.LAYERS[local23]; - int local31 = inboundBuffer.g1(); - int local39 = (local31 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local45 = (local31 & 0x7) + SceneGraph.currentChunkZ; - if (local39 >= 0 && local45 >= 0 && local39 < 104 && local45 < 104) { - ChangeLocRequest.push(Player.level, local45, local19, local39, -1, -1, local27, local23, 0); - } - } else if (opcode == ServerProt.LOCATION_PACKET_33) { - int local15 = inboundBuffer.ig2(); - int local23 = inboundBuffer.g1(); - int local27 = (local23 & 0x7) + SceneGraph.currentChunkZ; - int local19 = (local23 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local31 = inboundBuffer.g2add(); - if (local19 >= 0 && local27 >= 0 && local19 < 104 && local27 < 104) { - @Pc(122) ObjStack local122 = new ObjStack(); - local122.anInt5550 = local31; - local122.type = local15; - if (SceneGraph.objStacks[Player.level][local19][local27] == null) { - SceneGraph.objStacks[Player.level][local19][local27] = new LinkedList(); - } - SceneGraph.objStacks[Player.level][local19][local27].addTail(new ObjStackNode(local122)); - spawnGroundObject(local27, local19); - } - } else if (opcode == ServerProt.LOCATION_PACKET_121) { - int local15 = inboundBuffer.g1(); - int local23 = SceneGraph.currentChunkX * 2 + (local15 >> 4 & 0xF); - int local19 = (local15 & 0xF) + SceneGraph.currentChunkZ * 2; - int local27 = local23 + inboundBuffer.g1b(); - int local31 = inboundBuffer.g1b() + local19; - int local39 = inboundBuffer.g2b(); - int local45 = inboundBuffer.g2(); - int local218 = inboundBuffer.g1() * 4; - int local224 = inboundBuffer.g1() * 4; - int local228 = inboundBuffer.g2(); - int local232 = inboundBuffer.g2(); - int local236 = inboundBuffer.g1(); - if (local236 == 255) { - local236 = -1; - } - int local247 = inboundBuffer.g1(); - if (local23 >= 0 && local19 >= 0 && local23 < 208 && local19 < 208 && local27 >= 0 && local31 >= 0 && local27 < 208 && local31 < 208 && local45 != 65535) { - local31 *= 64; - local27 = local27 * 64; - local19 = local19 * 64; - local23 = local23 * 64; - ProjAnim local317 = new ProjAnim(local45, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local218, client.loop + local228, local232 + client.loop, local236, local247, local39, local224); - local317.method3705(local31, client.loop + local228, -local224 + SceneGraph.getTileHeight(Player.level, local27, local31), local27); - Static217.aClass69_116.addTail(new ProjAnimNode(local317)); - } - } else if (opcode == ServerProt.LOCATION_PACKET_17) { - int local15 = inboundBuffer.g1(); - int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); - int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); - int local27 = inboundBuffer.g2(); - int local31 = inboundBuffer.g1(); - int local39 = inboundBuffer.g2(); - if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { - local23 = local23 * 128 + 64; - local19 = local19 * 128 + 64; - @Pc(427) SpotAnim local427 = new SpotAnim(local27, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local31, local39, client.loop); - LoginManager.aClass69_64.addTail(new SpotAnimNode(local427)); - } - } else if (opcode == ServerProt.LOCATION_PACKET_179) { - int local15 = inboundBuffer.g1add(); - int local23 = local15 >> 2; - int local19 = local15 & 0x3; - int local27 = Loc.LAYERS[local23]; - int local31 = inboundBuffer.g1(); - int local39 = SceneGraph.currentChunkX + (local31 >> 4 & 0x7); - int local45 = (local31 & 0x7) + SceneGraph.currentChunkZ; - int local218 = inboundBuffer.g2add(); - if (local39 >= 0 && local45 >= 0 && local39 < 104 && local45 < 104) { - ChangeLocRequest.push(Player.level, local45, local19, local39, -1, local218, local27, local23, 0); - } - } else if (opcode == ServerProt.LOCATION_PACKET_20) { - int local15 = inboundBuffer.g1sub(); - int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); - int local27 = inboundBuffer.g1sub(); - int local31 = local27 >> 2; - int local39 = local27 & 0x3; - int local45 = Loc.LAYERS[local31]; - int local218 = inboundBuffer.ig2(); - if (local218 == 65535) { - local218 = -1; - } - SceneGraph.method1881(Player.level, local39, local31, local19, local45, local23, local218); - } else if (opcode == ServerProt.LOCATION_PACKET_202) { - int local15 = inboundBuffer.g1(); - int local23 = local15 >> 2; - int local19 = local15 & 0x3; - int local27 = inboundBuffer.g1(); - int local31 = (local27 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local39 = (local27 & 0x7) + SceneGraph.currentChunkZ; - @Pc(605) byte local605 = inboundBuffer.g1badd(); - @Pc(609) byte local609 = inboundBuffer.g1badd(); - @Pc(613) byte local613 = inboundBuffer.g1bsub(); - int local228 = inboundBuffer.g2add(); - int local232 = inboundBuffer.ig2(); - @Pc(625) byte local625 = inboundBuffer.g1b(); - int local247 = inboundBuffer.g2(); - int local633 = inboundBuffer.ig2badd(); - if (!GlRenderer.enabled) { - AttachLocRequest.push(local625, local247, local633, local232, local39, local613, local19, local605, local31, local23, local609, local228); - } - } else if (opcode == ServerProt.LOCATION_PACKET_14) { - int local15 = inboundBuffer.g1(); - int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); - int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local27 = inboundBuffer.g2(); - int local31 = inboundBuffer.g2(); - int local39 = inboundBuffer.g2(); - if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { - @Pc(710) LinkedList local710 = SceneGraph.objStacks[Player.level][local23][local19]; - if (local710 != null) { - for (@Pc(718) ObjStackNode local718 = (ObjStackNode) local710.head(); local718 != null; local718 = (ObjStackNode) local710.next()) { - @Pc(723) ObjStack local723 = local718.value; - if ((local27 & 0x7FFF) == local723.type && local31 == local723.anInt5550) { - local723.anInt5550 = local39; - break; - } - } - spawnGroundObject(local19, local23); - } - } - } else if (opcode == ServerProt.LOCATION_PACKET_135) { - int local15 = inboundBuffer.ig2add(); - int local23 = inboundBuffer.g1neg(); - int local27 = SceneGraph.currentChunkZ + (local23 & 0x7); - int local19 = (local23 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local31 = inboundBuffer.ig2(); - int local39 = inboundBuffer.ig2(); - if (local19 >= 0 && local27 >= 0 && local19 < 104 && local27 < 104 && PlayerList.selfId != local15) { - @Pc(812) ObjStack local812 = new ObjStack(); - local812.anInt5550 = local31; - local812.type = local39; - if (SceneGraph.objStacks[Player.level][local19][local27] == null) { - SceneGraph.objStacks[Player.level][local19][local27] = new LinkedList(); - } - SceneGraph.objStacks[Player.level][local19][local27].addTail(new ObjStackNode(local812)); - spawnGroundObject(local27, local19); - } - } else if (opcode == ServerProt.LOCATION_PACKET_16) { - int local15 = inboundBuffer.g1(); - int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); - int local19 = (local15 & 0x7) + SceneGraph.currentChunkZ; - int local27 = local23 + inboundBuffer.g1b(); - int local31 = inboundBuffer.g1b() + local19; - int local39 = inboundBuffer.g2b(); - int local45 = inboundBuffer.g2(); - int local218 = inboundBuffer.g1() * 4; - int local224 = inboundBuffer.g1() * 4; - int local228 = inboundBuffer.g2(); - int local232 = inboundBuffer.g2(); - int local236 = inboundBuffer.g1(); - int local247 = inboundBuffer.g1(); - if (local236 == 255) { - local236 = -1; - } - if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104 && local27 >= 0 && local31 >= 0 && local27 < 104 && local31 < 104 && local45 != 65535) { - local31 = local31 * 128 + 64; - local19 = local19 * 128 + 64; - local23 = local23 * 128 + 64; - local27 = local27 * 128 + 64; - ProjAnim local317 = new ProjAnim(local45, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local218, local228 + client.loop, local232 + client.loop, local236, local247, local39, local224); - local317.method3705(local31, client.loop + local228, SceneGraph.getTileHeight(Player.level, local27, local31) - local224, local27); - Static217.aClass69_116.addTail(new ProjAnimNode(local317)); - } - } else if (opcode == ServerProt.LOCATION_PACKET_104) { - int local15 = inboundBuffer.g1(); - int local19 = SceneGraph.currentChunkZ * 2 + (local15 & 0xF); - int local23 = SceneGraph.currentChunkX * 2 + (local15 >> 4 & 0xF); - int local27 = inboundBuffer.g1b() + local23; - int local31 = inboundBuffer.g1b() + local19; - int local39 = inboundBuffer.g2b(); - int local45 = inboundBuffer.g2b(); - int local218 = inboundBuffer.g2(); - int local224 = inboundBuffer.g1b(); - int local228 = inboundBuffer.g1() * 4; - int local232 = inboundBuffer.g2(); - int local236 = inboundBuffer.g2(); - int local247 = inboundBuffer.g1(); - int local633 = inboundBuffer.g1(); - if (local247 == 255) { - local247 = -1; - } - if (local23 >= 0 && local19 >= 0 && local23 < 208 && local19 < 208 && local27 >= 0 && local31 >= 0 && local27 < 208 && local31 < 208 && local218 != 65535) { - local27 = local27 * 64; - local23 *= 64; - local31 *= 64; - local19 *= 64; - if (local39 != 0) { - @Pc(1194) int local1194; - @Pc(1198) PathingEntity local1198; - @Pc(1184) int local1184; - @Pc(1188) int local1188; - if (local39 >= 0) { - local1184 = local39 - 1; - local1188 = local1184 & 0x7FF; - local1194 = local1184 >> 11 & 0xF; - local1198 = NpcList.npcs[local1188]; - } else { - local1184 = -local39 - 1; - local1194 = local1184 >> 11 & 0xF; - local1188 = local1184 & 0x7FF; - if (PlayerList.selfId == local1188) { - local1198 = PlayerList.self; - } else { - local1198 = PlayerList.players[local1188]; - } - } - if (local1198 != null) { - @Pc(1232) BasType local1232 = local1198.getBasType(); - if (local1232.modelRotateTranslate != null && local1232.modelRotateTranslate[local1194] != null) { - local1188 = local1232.modelRotateTranslate[local1194][0]; - local224 -= local1232.modelRotateTranslate[local1194][1]; - @Pc(1264) int local1264 = local1232.modelRotateTranslate[local1194][2]; - @Pc(1269) int local1269 = MathUtils.sin[local1198.anInt3381]; - @Pc(1274) int local1274 = MathUtils.cos[local1198.anInt3381]; - @Pc(1284) int local1284 = local1188 * local1274 + local1264 * local1269 >> 16; - @Pc(1295) int local1295 = local1274 * local1264 - local1188 * local1269 >> 16; - local19 += local1295; - local23 += local1284; - } - } - } - @Pc(1331) ProjAnim local1331 = new ProjAnim(local218, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local224, local232 + client.loop, local236 + client.loop, local247, local633, local45, local228); - local1331.method3705(local31, local232 + client.loop, -local228 + SceneGraph.getTileHeight(Player.level, local27, local31), local27); - Static217.aClass69_116.addTail(new ProjAnimNode(local1331)); - } - } else if (opcode == ServerProt.LOCATION_PACKET_97) { - int local15 = inboundBuffer.g1(); - int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); - int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); - int local27 = inboundBuffer.g2(); - if (local27 == 65535) { - local27 = -1; - } - int local31 = inboundBuffer.g1(); - int local39 = local31 >> 4 & 0xF; - int local218 = inboundBuffer.g1(); - int local45 = local31 & 0x7; - if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { - int local224 = local39 + 1; - if (PlayerList.self.movementQueueX[0] >= local23 - local224 && local224 + local23 >= PlayerList.self.movementQueueX[0] && PlayerList.self.movementQueueZ[0] >= local19 - local224 && PlayerList.self.movementQueueZ[0] <= local224 + local19 && Preferences.ambientSoundsVolume != 0 && local45 > 0 && SoundPlayer.size < 50 && local27 != -1) { - SoundPlayer.ids[SoundPlayer.size] = local27; - SoundPlayer.loops[SoundPlayer.size] = local45; - SoundPlayer.delays[SoundPlayer.size] = local218; - SoundPlayer.sounds[SoundPlayer.size] = null; - SoundPlayer.positions[SoundPlayer.size] = local39 + (local23 << 16) + (local19 << 8); - SoundPlayer.size++; - } - } - } else if (opcode == ServerProt.LOCATION_PACKET_240) { - int local15 = inboundBuffer.g1sub(); - int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); - int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; - int local27 = inboundBuffer.g2(); - if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { - @Pc(1565) LinkedList local1565 = SceneGraph.objStacks[Player.level][local23][local19]; - if (local1565 != null) { - for (@Pc(1572) ObjStackNode local1572 = (ObjStackNode) local1565.head(); local1572 != null; local1572 = (ObjStackNode) local1565.next()) { - if (local1572.value.type == (local27 & 0x7FFF)) { - local1572.unlink(); - break; - } - } - if (local1565.head() == null) { - SceneGraph.objStacks[Player.level][local23][local19] = null; - } - spawnGroundObject(local19, local23); - } - } - } - } + @OriginalMember(owner = "client!g", name = "b", descriptor = "(B)V") + public static void readLocationPacket() { + if (opcode == ServerProt.LOCATION_PACKET_195) { + int local15 = inboundBuffer.g1neg(); + int local19 = local15 & 0x3; + int local23 = local15 >> 2; + int local27 = Loc.LAYERS[local23]; + int local31 = inboundBuffer.g1(); + int local39 = (local31 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local45 = (local31 & 0x7) + SceneGraph.currentChunkZ; + if (local39 >= 0 && local45 >= 0 && local39 < 104 && local45 < 104) { + ChangeLocRequest.push(Player.level, local45, local19, local39, -1, -1, local27, local23, 0); + } + } else if (opcode == ServerProt.LOCATION_PACKET_33) { + int local15 = inboundBuffer.ig2(); + int local23 = inboundBuffer.g1(); + int local27 = (local23 & 0x7) + SceneGraph.currentChunkZ; + int local19 = (local23 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local31 = inboundBuffer.g2add(); + if (local19 >= 0 && local27 >= 0 && local19 < 104 && local27 < 104) { + @Pc(122) ObjStack local122 = new ObjStack(); + local122.anInt5550 = local31; + local122.type = local15; + if (SceneGraph.objStacks[Player.level][local19][local27] == null) { + SceneGraph.objStacks[Player.level][local19][local27] = new LinkedList(); + } + SceneGraph.objStacks[Player.level][local19][local27].addTail(new ObjStackNode(local122)); + spawnGroundObject(local27, local19); + } + } else if (opcode == ServerProt.LOCATION_PACKET_121) { + int local15 = inboundBuffer.g1(); + int local23 = SceneGraph.currentChunkX * 2 + (local15 >> 4 & 0xF); + int local19 = (local15 & 0xF) + SceneGraph.currentChunkZ * 2; + int local27 = local23 + inboundBuffer.g1b(); + int local31 = inboundBuffer.g1b() + local19; + int local39 = inboundBuffer.g2b(); + int local45 = inboundBuffer.g2(); + int local218 = inboundBuffer.g1() * 4; + int local224 = inboundBuffer.g1() * 4; + int local228 = inboundBuffer.g2(); + int local232 = inboundBuffer.g2(); + int local236 = inboundBuffer.g1(); + if (local236 == 255) { + local236 = -1; + } + int local247 = inboundBuffer.g1(); + if (local23 >= 0 && local19 >= 0 && local23 < 208 && local19 < 208 && local27 >= 0 && local31 >= 0 && local27 < 208 && local31 < 208 && local45 != 65535) { + local31 *= 64; + local27 = local27 * 64; + local19 = local19 * 64; + local23 = local23 * 64; + ProjAnim local317 = new ProjAnim(local45, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local218, client.loop + local228, local232 + client.loop, local236, local247, local39, local224); + local317.method3705(local31, client.loop + local228, -local224 + SceneGraph.getTileHeight(Player.level, local27, local31), local27); + Static217.aClass69_116.addTail(new ProjAnimNode(local317)); + } + } else if (opcode == ServerProt.LOCATION_PACKET_17) { + int local15 = inboundBuffer.g1(); + int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); + int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); + int local27 = inboundBuffer.g2(); + int local31 = inboundBuffer.g1(); + int local39 = inboundBuffer.g2(); + if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { + local23 = local23 * 128 + 64; + local19 = local19 * 128 + 64; + @Pc(427) SpotAnim local427 = new SpotAnim(local27, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local31, local39, client.loop); + LoginManager.aClass69_64.addTail(new SpotAnimNode(local427)); + } + } else if (opcode == ServerProt.LOCATION_PACKET_179) { + int local15 = inboundBuffer.g1add(); + int local23 = local15 >> 2; + int local19 = local15 & 0x3; + int local27 = Loc.LAYERS[local23]; + int local31 = inboundBuffer.g1(); + int local39 = SceneGraph.currentChunkX + (local31 >> 4 & 0x7); + int local45 = (local31 & 0x7) + SceneGraph.currentChunkZ; + int local218 = inboundBuffer.g2add(); + if (local39 >= 0 && local45 >= 0 && local39 < 104 && local45 < 104) { + ChangeLocRequest.push(Player.level, local45, local19, local39, -1, local218, local27, local23, 0); + } + } else if (opcode == ServerProt.LOCATION_PACKET_20) { + int local15 = inboundBuffer.g1sub(); + int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); + int local27 = inboundBuffer.g1sub(); + int local31 = local27 >> 2; + int local39 = local27 & 0x3; + int local45 = Loc.LAYERS[local31]; + int local218 = inboundBuffer.ig2(); + if (local218 == 65535) { + local218 = -1; + } + SceneGraph.method1881(Player.level, local39, local31, local19, local45, local23, local218); + } else if (opcode == ServerProt.LOCATION_PACKET_202) { + int local15 = inboundBuffer.g1(); + int local23 = local15 >> 2; + int local19 = local15 & 0x3; + int local27 = inboundBuffer.g1(); + int local31 = (local27 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local39 = (local27 & 0x7) + SceneGraph.currentChunkZ; + @Pc(605) byte local605 = inboundBuffer.g1badd(); + @Pc(609) byte local609 = inboundBuffer.g1badd(); + @Pc(613) byte local613 = inboundBuffer.g1bsub(); + int local228 = inboundBuffer.g2add(); + int local232 = inboundBuffer.ig2(); + @Pc(625) byte local625 = inboundBuffer.g1b(); + int local247 = inboundBuffer.g2(); + int local633 = inboundBuffer.ig2badd(); + if (!GlRenderer.enabled) { + AttachLocRequest.push(local625, local247, local633, local232, local39, local613, local19, local605, local31, local23, local609, local228); + } + } else if (opcode == ServerProt.LOCATION_PACKET_14) { + int local15 = inboundBuffer.g1(); + int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); + int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local27 = inboundBuffer.g2(); + int local31 = inboundBuffer.g2(); + int local39 = inboundBuffer.g2(); + if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { + @Pc(710) LinkedList local710 = SceneGraph.objStacks[Player.level][local23][local19]; + if (local710 != null) { + for (@Pc(718) ObjStackNode local718 = (ObjStackNode) local710.head(); local718 != null; local718 = (ObjStackNode) local710.next()) { + @Pc(723) ObjStack local723 = local718.value; + if ((local27 & 0x7FFF) == local723.type && local31 == local723.anInt5550) { + local723.anInt5550 = local39; + break; + } + } + spawnGroundObject(local19, local23); + } + } + } else if (opcode == ServerProt.LOCATION_PACKET_135) { + int local15 = inboundBuffer.ig2add(); + int local23 = inboundBuffer.g1neg(); + int local27 = SceneGraph.currentChunkZ + (local23 & 0x7); + int local19 = (local23 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local31 = inboundBuffer.ig2(); + int local39 = inboundBuffer.ig2(); + if (local19 >= 0 && local27 >= 0 && local19 < 104 && local27 < 104 && PlayerList.selfId != local15) { + @Pc(812) ObjStack local812 = new ObjStack(); + local812.anInt5550 = local31; + local812.type = local39; + if (SceneGraph.objStacks[Player.level][local19][local27] == null) { + SceneGraph.objStacks[Player.level][local19][local27] = new LinkedList(); + } + SceneGraph.objStacks[Player.level][local19][local27].addTail(new ObjStackNode(local812)); + spawnGroundObject(local27, local19); + } + } else if (opcode == ServerProt.LOCATION_PACKET_16) { + int local15 = inboundBuffer.g1(); + int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); + int local19 = (local15 & 0x7) + SceneGraph.currentChunkZ; + int local27 = local23 + inboundBuffer.g1b(); + int local31 = inboundBuffer.g1b() + local19; + int local39 = inboundBuffer.g2b(); + int local45 = inboundBuffer.g2(); + int local218 = inboundBuffer.g1() * 4; + int local224 = inboundBuffer.g1() * 4; + int local228 = inboundBuffer.g2(); + int local232 = inboundBuffer.g2(); + int local236 = inboundBuffer.g1(); + int local247 = inboundBuffer.g1(); + if (local236 == 255) { + local236 = -1; + } + if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104 && local27 >= 0 && local31 >= 0 && local27 < 104 && local31 < 104 && local45 != 65535) { + local31 = local31 * 128 + 64; + local19 = local19 * 128 + 64; + local23 = local23 * 128 + 64; + local27 = local27 * 128 + 64; + ProjAnim local317 = new ProjAnim(local45, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local218, local228 + client.loop, local232 + client.loop, local236, local247, local39, local224); + local317.method3705(local31, client.loop + local228, SceneGraph.getTileHeight(Player.level, local27, local31) - local224, local27); + Static217.aClass69_116.addTail(new ProjAnimNode(local317)); + } + } else if (opcode == ServerProt.LOCATION_PACKET_104) { + int local15 = inboundBuffer.g1(); + int local19 = SceneGraph.currentChunkZ * 2 + (local15 & 0xF); + int local23 = SceneGraph.currentChunkX * 2 + (local15 >> 4 & 0xF); + int local27 = inboundBuffer.g1b() + local23; + int local31 = inboundBuffer.g1b() + local19; + int local39 = inboundBuffer.g2b(); + int local45 = inboundBuffer.g2b(); + int local218 = inboundBuffer.g2(); + int local224 = inboundBuffer.g1b(); + int local228 = inboundBuffer.g1() * 4; + int local232 = inboundBuffer.g2(); + int local236 = inboundBuffer.g2(); + int local247 = inboundBuffer.g1(); + int local633 = inboundBuffer.g1(); + if (local247 == 255) { + local247 = -1; + } + if (local23 >= 0 && local19 >= 0 && local23 < 208 && local19 < 208 && local27 >= 0 && local31 >= 0 && local27 < 208 && local31 < 208 && local218 != 65535) { + local27 = local27 * 64; + local23 *= 64; + local31 *= 64; + local19 *= 64; + if (local39 != 0) { + @Pc(1194) int local1194; + @Pc(1198) PathingEntity local1198; + @Pc(1184) int local1184; + @Pc(1188) int local1188; + if (local39 >= 0) { + local1184 = local39 - 1; + local1188 = local1184 & 0x7FF; + local1194 = local1184 >> 11 & 0xF; + local1198 = NpcList.npcs[local1188]; + } else { + local1184 = -local39 - 1; + local1194 = local1184 >> 11 & 0xF; + local1188 = local1184 & 0x7FF; + if (PlayerList.selfId == local1188) { + local1198 = PlayerList.self; + } else { + local1198 = PlayerList.players[local1188]; + } + } + if (local1198 != null) { + @Pc(1232) BasType local1232 = local1198.getBasType(); + if (local1232.modelRotateTranslate != null && local1232.modelRotateTranslate[local1194] != null) { + local1188 = local1232.modelRotateTranslate[local1194][0]; + local224 -= local1232.modelRotateTranslate[local1194][1]; + @Pc(1264) int local1264 = local1232.modelRotateTranslate[local1194][2]; + @Pc(1269) int local1269 = MathUtils.sin[local1198.anInt3381]; + @Pc(1274) int local1274 = MathUtils.cos[local1198.anInt3381]; + @Pc(1284) int local1284 = local1188 * local1274 + local1264 * local1269 >> 16; + @Pc(1295) int local1295 = local1274 * local1264 - local1188 * local1269 >> 16; + local19 += local1295; + local23 += local1284; + } + } + } + @Pc(1331) ProjAnim local1331 = new ProjAnim(local218, Player.level, local23, local19, SceneGraph.getTileHeight(Player.level, local23, local19) - local224, local232 + client.loop, local236 + client.loop, local247, local633, local45, local228); + local1331.method3705(local31, local232 + client.loop, -local228 + SceneGraph.getTileHeight(Player.level, local27, local31), local27); + Static217.aClass69_116.addTail(new ProjAnimNode(local1331)); + } + } else if (opcode == ServerProt.LOCATION_PACKET_97) { + int local15 = inboundBuffer.g1(); + int local23 = SceneGraph.currentChunkX + (local15 >> 4 & 0x7); + int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); + int local27 = inboundBuffer.g2(); + if (local27 == 65535) { + local27 = -1; + } + int local31 = inboundBuffer.g1(); + int local39 = local31 >> 4 & 0xF; + int local218 = inboundBuffer.g1(); + int local45 = local31 & 0x7; + if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { + int local224 = local39 + 1; + if (PlayerList.self.movementQueueX[0] >= local23 - local224 && local224 + local23 >= PlayerList.self.movementQueueX[0] && PlayerList.self.movementQueueZ[0] >= local19 - local224 && PlayerList.self.movementQueueZ[0] <= local224 + local19 && Preferences.ambientSoundsVolume != 0 && local45 > 0 && SoundPlayer.size < 50 && local27 != -1) { + SoundPlayer.ids[SoundPlayer.size] = local27; + SoundPlayer.loops[SoundPlayer.size] = local45; + SoundPlayer.delays[SoundPlayer.size] = local218; + SoundPlayer.sounds[SoundPlayer.size] = null; + SoundPlayer.positions[SoundPlayer.size] = local39 + (local23 << 16) + (local19 << 8); + SoundPlayer.size++; + } + } + } else if (opcode == ServerProt.LOCATION_PACKET_240) { + int local15 = inboundBuffer.g1sub(); + int local19 = SceneGraph.currentChunkZ + (local15 & 0x7); + int local23 = (local15 >> 4 & 0x7) + SceneGraph.currentChunkX; + int local27 = inboundBuffer.g2(); + if (local23 >= 0 && local19 >= 0 && local23 < 104 && local19 < 104) { + @Pc(1565) LinkedList local1565 = SceneGraph.objStacks[Player.level][local23][local19]; + if (local1565 != null) { + for (@Pc(1572) ObjStackNode local1572 = (ObjStackNode) local1565.head(); local1572 != null; local1572 = (ObjStackNode) local1565.next()) { + if (local1572.value.type == (local27 & 0x7FFF)) { + local1572.unlink(); + break; + } + } + if (local1565.head() == null) { + SceneGraph.objStacks[Player.level][local23][local19] = null; + } + spawnGroundObject(local19, local23); + } + } + } + } - @OriginalMember(owner = "client!g", name = "a", descriptor = "(IZ)V") - public static void readRebuildPacket(@OriginalArg(1) boolean arg0) { - LoginManager.dynamicMapRegion = arg0; - @Pc(13) int local13; - @Pc(20) int local20; - @Pc(26) int local26; - @Pc(31) int local31; - @Pc(60) int local60; - @Pc(64) int local64; - @Pc(138) int local138; - @Pc(151) int local151; - @Pc(169) int local169; - if (!LoginManager.dynamicMapRegion) { - local13 = inboundBuffer.g2add(); - local20 = (length - inboundBuffer.offset) / 16; - LoginManager.regionsXteaKeys = new int[local20][4]; - for (local26 = 0; local26 < local20; local26++) { - for (local31 = 0; local31 < 4; local31++) { - LoginManager.regionsXteaKeys[local26][local31] = inboundBuffer.mg4(); - } - } - local26 = inboundBuffer.g1sub(); - local31 = inboundBuffer.g2(); - local60 = inboundBuffer.g2add(); - local64 = inboundBuffer.g2add(); - LoginManager.regionBitPacked = new int[local20]; - LoginManager.mapFilesBuffer = new byte[local20][]; - LoginManager.npcSpawnsFilesBuffer = null; - LoginManager.underWaterMapFileIds = new int[local20]; - LoginManager.locationMapFilesBuffer = new byte[local20][]; - LoginManager.underWaterLocationsMapFilesBuffer = new byte[local20][]; - LoginManager.npcSpawnsFileIds = null; - LoginManager.mapFileIds = new int[local20]; - LoginManager.underWaterMapFilesBuffer = new byte[local20][]; - LoginManager.locationsMapFileIds = new int[local20]; - LoginManager.underWaterLocationsMapFileIds = new int[local20]; - local20 = 0; - @Pc(100) boolean local100 = (local31 / 8 == 48 || local31 / 8 == 49) && local60 / 8 == 48; - if (local31 / 8 == 48 && local60 / 8 == 148) { - local100 = true; - } - for (local138 = (local31 - 6) / 8; local138 <= (local31 + 6) / 8; local138++) { - for (local151 = (local60 - 6) / 8; local151 <= (local60 + 6) / 8; local151++) { - local169 = (local138 << 8) + local151; - if (local100 && (local151 == 49 || local151 == 149 || local151 == 147 || local138 == 50 || local138 == 49 && local151 == 47)) { - LoginManager.regionBitPacked[local20] = local169; - LoginManager.mapFileIds[local20] = -1; - LoginManager.locationsMapFileIds[local20] = -1; - LoginManager.underWaterMapFileIds[local20] = -1; - LoginManager.underWaterLocationsMapFileIds[local20] = -1; - } else { - LoginManager.regionBitPacked[local20] = local169; - LoginManager.mapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_558, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151) })); - LoginManager.locationsMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_1090, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151) })); - LoginManager.underWaterMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_772, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151) })); - LoginManager.underWaterLocationsMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_1103, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151) })); - } - local20++; - } - } - LoginManager.method2463(local26, local60, local31, local64, false, local13); - return; - } - local13 = inboundBuffer.ig2add(); - local20 = inboundBuffer.ig2add(); - local26 = inboundBuffer.g1sub(); - local31 = inboundBuffer.ig2add(); - inboundBuffer.accessBits(); - @Pc(391) int local391; - for (local60 = 0; local60 < 4; local60++) { - for (local64 = 0; local64 < 13; local64++) { - for (local391 = 0; local391 < 13; local391++) { - local138 = inboundBuffer.gBits(1); - if (local138 == 1) { - anIntArrayArrayArray18[local60][local64][local391] = inboundBuffer.gBits(26); - } else { - anIntArrayArrayArray18[local60][local64][local391] = -1; - } - } - } - } - inboundBuffer.accessBytes(); - local60 = (length - inboundBuffer.offset) / 16; - LoginManager.regionsXteaKeys = new int[local60][4]; - for (local64 = 0; local64 < local60; local64++) { - for (local391 = 0; local391 < 4; local391++) { - LoginManager.regionsXteaKeys[local64][local391] = inboundBuffer.mg4(); - } - } - local64 = inboundBuffer.g2(); - LoginManager.underWaterLocationsMapFileIds = new int[local60]; - LoginManager.locationsMapFileIds = new int[local60]; - LoginManager.mapFileIds = new int[local60]; - LoginManager.underWaterLocationsMapFilesBuffer = new byte[local60][]; - LoginManager.npcSpawnsFileIds = null; - LoginManager.underWaterMapFileIds = new int[local60]; - LoginManager.locationMapFilesBuffer = new byte[local60][]; - LoginManager.mapFilesBuffer = new byte[local60][]; - LoginManager.regionBitPacked = new int[local60]; - LoginManager.npcSpawnsFilesBuffer = null; - LoginManager.underWaterMapFilesBuffer = new byte[local60][]; - local60 = 0; - for (local391 = 0; local391 < 4; local391++) { - for (local138 = 0; local138 < 13; local138++) { - for (local151 = 0; local151 < 13; local151++) { - local169 = anIntArrayArrayArray18[local391][local138][local151]; - if (local169 != -1) { - @Pc(555) int local555 = local169 >> 14 & 0x3FF; - @Pc(561) int local561 = local169 >> 3 & 0x7FF; - @Pc(571) int local571 = local561 / 8 + (local555 / 8 << 8); - @Pc(573) int local573; - for (local573 = 0; local573 < local60; local573++) { - if (local571 == LoginManager.regionBitPacked[local573]) { - local571 = -1; - break; - } - } - if (local571 != -1) { - LoginManager.regionBitPacked[local60] = local571; - @Pc(609) int local609 = local571 & 0xFF; - local573 = local571 >> 8 & 0xFF; - LoginManager.mapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_558, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609) })); - LoginManager.locationsMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_1090, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609) })); - LoginManager.underWaterMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_772, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609) })); - LoginManager.underWaterLocationsMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[] { LoginManager.aClass100_1103, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609) })); - local60++; - } - } - } - } - } - LoginManager.method2463(local26, local64, local20, local31, false, local13); - } + @OriginalMember(owner = "client!g", name = "a", descriptor = "(IZ)V") + public static void readRebuildPacket(@OriginalArg(1) boolean arg0) { + LoginManager.dynamicMapRegion = arg0; + @Pc(13) int local13; + @Pc(20) int local20; + @Pc(26) int local26; + @Pc(31) int local31; + @Pc(60) int local60; + @Pc(64) int local64; + @Pc(138) int local138; + @Pc(151) int local151; + @Pc(169) int local169; + if (!LoginManager.dynamicMapRegion) { + local13 = inboundBuffer.g2add(); + local20 = (length - inboundBuffer.offset) / 16; + LoginManager.regionsXteaKeys = new int[local20][4]; + for (local26 = 0; local26 < local20; local26++) { + for (local31 = 0; local31 < 4; local31++) { + LoginManager.regionsXteaKeys[local26][local31] = inboundBuffer.mg4(); + } + } + local26 = inboundBuffer.g1sub(); + local31 = inboundBuffer.g2(); + local60 = inboundBuffer.g2add(); + local64 = inboundBuffer.g2add(); + LoginManager.regionBitPacked = new int[local20]; + LoginManager.mapFilesBuffer = new byte[local20][]; + LoginManager.npcSpawnsFilesBuffer = null; + LoginManager.underWaterMapFileIds = new int[local20]; + LoginManager.locationMapFilesBuffer = new byte[local20][]; + LoginManager.underWaterLocationsMapFilesBuffer = new byte[local20][]; + LoginManager.npcSpawnsFileIds = null; + LoginManager.mapFileIds = new int[local20]; + LoginManager.underWaterMapFilesBuffer = new byte[local20][]; + LoginManager.locationsMapFileIds = new int[local20]; + LoginManager.underWaterLocationsMapFileIds = new int[local20]; + local20 = 0; + @Pc(100) boolean local100 = (local31 / 8 == 48 || local31 / 8 == 49) && local60 / 8 == 48; + if (local31 / 8 == 48 && local60 / 8 == 148) { + local100 = true; + } + for (local138 = (local31 - 6) / 8; local138 <= (local31 + 6) / 8; local138++) { + for (local151 = (local60 - 6) / 8; local151 <= (local60 + 6) / 8; local151++) { + local169 = (local138 << 8) + local151; + if (local100 && (local151 == 49 || local151 == 149 || local151 == 147 || local138 == 50 || local138 == 49 && local151 == 47)) { + LoginManager.regionBitPacked[local20] = local169; + LoginManager.mapFileIds[local20] = -1; + LoginManager.locationsMapFileIds[local20] = -1; + LoginManager.underWaterMapFileIds[local20] = -1; + LoginManager.underWaterLocationsMapFileIds[local20] = -1; + } else { + LoginManager.regionBitPacked[local20] = local169; + LoginManager.mapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_558, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151)})); + LoginManager.locationsMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_1090, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151)})); + LoginManager.underWaterMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_772, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151)})); + LoginManager.underWaterLocationsMapFileIds[local20] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_1103, JagString.parseInt(local138), LoginManager.UNDERSCORE, JagString.parseInt(local151)})); + } + local20++; + } + } + LoginManager.method2463(local26, local60, local31, local64, false, local13); + return; + } + local13 = inboundBuffer.ig2add(); + local20 = inboundBuffer.ig2add(); + local26 = inboundBuffer.g1sub(); + local31 = inboundBuffer.ig2add(); + inboundBuffer.accessBits(); + @Pc(391) int local391; + for (local60 = 0; local60 < 4; local60++) { + for (local64 = 0; local64 < 13; local64++) { + for (local391 = 0; local391 < 13; local391++) { + local138 = inboundBuffer.gBits(1); + if (local138 == 1) { + anIntArrayArrayArray18[local60][local64][local391] = inboundBuffer.gBits(26); + } else { + anIntArrayArrayArray18[local60][local64][local391] = -1; + } + } + } + } + inboundBuffer.accessBytes(); + local60 = (length - inboundBuffer.offset) / 16; + LoginManager.regionsXteaKeys = new int[local60][4]; + for (local64 = 0; local64 < local60; local64++) { + for (local391 = 0; local391 < 4; local391++) { + LoginManager.regionsXteaKeys[local64][local391] = inboundBuffer.mg4(); + } + } + local64 = inboundBuffer.g2(); + LoginManager.underWaterLocationsMapFileIds = new int[local60]; + LoginManager.locationsMapFileIds = new int[local60]; + LoginManager.mapFileIds = new int[local60]; + LoginManager.underWaterLocationsMapFilesBuffer = new byte[local60][]; + LoginManager.npcSpawnsFileIds = null; + LoginManager.underWaterMapFileIds = new int[local60]; + LoginManager.locationMapFilesBuffer = new byte[local60][]; + LoginManager.mapFilesBuffer = new byte[local60][]; + LoginManager.regionBitPacked = new int[local60]; + LoginManager.npcSpawnsFilesBuffer = null; + LoginManager.underWaterMapFilesBuffer = new byte[local60][]; + local60 = 0; + for (local391 = 0; local391 < 4; local391++) { + for (local138 = 0; local138 < 13; local138++) { + for (local151 = 0; local151 < 13; local151++) { + local169 = anIntArrayArrayArray18[local391][local138][local151]; + if (local169 != -1) { + @Pc(555) int local555 = local169 >> 14 & 0x3FF; + @Pc(561) int local561 = local169 >> 3 & 0x7FF; + @Pc(571) int local571 = local561 / 8 + (local555 / 8 << 8); + @Pc(573) int local573; + for (local573 = 0; local573 < local60; local573++) { + if (local571 == LoginManager.regionBitPacked[local573]) { + local571 = -1; + break; + } + } + if (local571 != -1) { + LoginManager.regionBitPacked[local60] = local571; + @Pc(609) int local609 = local571 & 0xFF; + local573 = local571 >> 8 & 0xFF; + LoginManager.mapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_558, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609)})); + LoginManager.locationsMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_1090, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609)})); + LoginManager.underWaterMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_772, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609)})); + LoginManager.underWaterLocationsMapFileIds[local60] = client.js5Archive5.getGroupId(JagString.concatenate(new JagString[]{LoginManager.aClass100_1103, JagString.parseInt(local573), LoginManager.UNDERSCORE, JagString.parseInt(local609)})); + local60++; + } + } + } + } + } + LoginManager.method2463(local26, local64, local20, local31, false, local13); + } - @OriginalMember(owner = "client!gk", name = "a", descriptor = "(IIBLclient!e;)V") - public static void readExtendedPlayerInfo(@OriginalArg(0) int flags, @OriginalArg(1) int id, @OriginalArg(3) Player player) { - @Pc(13) int int1; - @Pc(17) int int2; - @Pc(24) int local24; - if ((flags & 0x80) != 0) { - int1 = inboundBuffer.ig2(); - int2 = inboundBuffer.g1(); - @Pc(21) int local21 = inboundBuffer.g1(); - local24 = inboundBuffer.offset; - @Pc(35) boolean local35 = (int1 & 0x8000) != 0; - if (player.username != null && player.appearance != null) { - @Pc(48) long local48 = player.username.encode37(); - @Pc(50) boolean ignore = false; - if (int2 <= 1) { - if (!local35 && (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat)) { - ignore = true; - } else { - for (@Pc(69) int local69 = 0; local69 < IgnoreList.size; local69++) { - if (IgnoreList.encodedUsernames[local69] == local48) { - ignore = true; - break; - } - } - } - } - if (!ignore && Player.inTutorialIsland == 0) { - chatBuffer.offset = 0; - inboundBuffer.igdata(local21, chatBuffer.data); - chatBuffer.offset = 0; - @Pc(106) int local106 = -1; - @Pc(127) JagString message; - if (local35) { - @Pc(112) QuickChatPhrase phrase = QuickChatPhraseType.method3568(chatBuffer); - int1 &= 0x7FFF; - local106 = phrase.id; - message = phrase.type.decodeMessage(chatBuffer); - } else { - message = Font.escape(formatChatMessage(chatBuffer).encodeMessage()); - } - player.chatMessage = message.trim(); - player.chatEffect = int1 & 0xFF; - player.chatLoops = 150; - player.chatColor = int1 >> 8; - if (int2 == 2) { - Chat.add(local106, local35 ? 17 : 1, message, null, JagString.concatenate(new JagString[] { Static44.IMG1, player.getName() })); - } else if (int2 == 1) { - Chat.add(local106, local35 ? 17 : 1, message, null, JagString.concatenate(new JagString[] { IMG0, player.getName() })); - } else { - Chat.add(local106, local35 ? 17 : 2, message, null, player.getName()); - } - } - } - inboundBuffer.offset = local24 + local21; - } - if ((flags & 0x1) != 0) { - int1 = inboundBuffer.gsmarts(); - int2 = inboundBuffer.g1add(); - player.addHit(int2, client.loop, int1); - player.hitpointsBarVisibleUntil = client.loop + 300; - player.hitpointsBar = inboundBuffer.g1sub(); - } - if ((flags & 0x8) != 0) { - int1 = inboundBuffer.g2(); - if (int1 == 65535) { - int1 = -1; - } - int2 = inboundBuffer.g1(); - Player.animate(int2, int1, player); - } - if ((flags & 0x4) != 0) { - int1 = inboundBuffer.g1add(); - @Pc(309) byte[] bytes = new byte[int1]; - @Pc(314) Buffer buffer = new Buffer(bytes); - inboundBuffer.gdata(int1, bytes); - PlayerList.appearanceCache[id] = buffer; - player.decodeAppearance(buffer); - } - if ((flags & 0x2) != 0) { - player.faceEntity = inboundBuffer.g2add(); - if (player.faceEntity == 65535) { - player.faceEntity = -1; - } - } - if ((flags & 0x400) != 0) { - player.anInt3380 = inboundBuffer.g1neg(); - player.anInt3428 = inboundBuffer.g1(); - player.anInt3416 = inboundBuffer.g1add(); - player.anInt3392 = inboundBuffer.g1(); - player.anInt3395 = inboundBuffer.ig2() + client.loop; - player.anInt3386 = inboundBuffer.ig2() + client.loop; - player.anInt3431 = inboundBuffer.g1neg(); - player.movementQueueSize = 1; - player.anInt3405 = 0; - } - if ((flags & 0x20) != 0) { - player.chatMessage = inboundBuffer.gjstr(); - if (player.chatMessage.charAt(0) == 126) { - player.chatMessage = player.chatMessage.substring(1); - Chat.add(player.getName(), 2, player.chatMessage); - } else if (player == PlayerList.self) { - Chat.add(player.getName(), 2, player.chatMessage); - } - player.chatEffect = 0; - player.chatColor = 0; - player.chatLoops = 150; - } - if ((flags & 0x200) != 0) { - int1 = inboundBuffer.gsmarts(); - int2 = inboundBuffer.g1sub(); - player.addHit(int2, client.loop, int1); - } - if ((flags & 0x800) != 0) { - int1 = inboundBuffer.g1neg(); - @Pc(502) int[] seqIds = new int[int1]; - @Pc(505) int[] delays = new int[int1]; - @Pc(508) int[] slotMasks = new int[int1]; - for (@Pc(510) int i = 0; i < int1; i++) { - @Pc(521) int seqId = inboundBuffer.ig2(); - if (seqId == 65535) { - seqId = -1; - } - seqIds[i] = seqId; - delays[i] = inboundBuffer.g1add(); - slotMasks[i] = inboundBuffer.g2(); - } - Player.method865(delays, seqIds, player, slotMasks); - } - if ((flags & 0x100) != 0) { - int1 = inboundBuffer.ig2(); - if (int1 == 65535) { - int1 = -1; - } - int2 = inboundBuffer.mg4(); - @Pc(573) boolean local573 = int1 == -1 || player.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(int1).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(player.spotAnimId).seqId).forcedPriority; - if (local573) { - player.spotAnimStart = (int2 & 0xFFFF) + client.loop; - player.anInt3361 = 0; - player.anInt3399 = 0; - player.spotAnimId = int1; - if (player.spotAnimStart > client.loop) { - player.anInt3399 = -1; - } - player.spotAnimY = int2 >> 16; - player.anInt3418 = 1; - if (player.spotAnimId != -1 && client.loop == player.spotAnimStart) { - local24 = SpotAnimTypeList.get(player.spotAnimId).seqId; - if (local24 != -1) { - @Pc(663) SeqType local663 = SeqTypeList.get(local24); - if (local663 != null && local663.frames != null) { - SoundPlayer.playSeqSound(player.zFine, local663, player.xFine, player == PlayerList.self, 0); - } - } - } - } - } - if ((flags & 0x40) != 0) { - player.faceX = inboundBuffer.g2(); - player.faceY = inboundBuffer.ig2add(); - } - } + @OriginalMember(owner = "client!gk", name = "a", descriptor = "(IIBLclient!e;)V") + public static void readExtendedPlayerInfo(@OriginalArg(0) int flags, @OriginalArg(1) int id, @OriginalArg(3) Player player) { + @Pc(13) int int1; + @Pc(17) int int2; + @Pc(24) int local24; + if ((flags & 0x80) != 0) { + int1 = inboundBuffer.ig2(); + int2 = inboundBuffer.g1(); + @Pc(21) int local21 = inboundBuffer.g1(); + local24 = inboundBuffer.offset; + @Pc(35) boolean local35 = (int1 & 0x8000) != 0; + if (player.username != null && player.appearance != null) { + @Pc(48) long local48 = player.username.encode37(); + @Pc(50) boolean ignore = false; + if (int2 <= 1) { + if (!local35 && (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat)) { + ignore = true; + } else { + for (@Pc(69) int local69 = 0; local69 < IgnoreList.size; local69++) { + if (IgnoreList.encodedUsernames[local69] == local48) { + ignore = true; + break; + } + } + } + } + if (!ignore && Player.inTutorialIsland == 0) { + chatBuffer.offset = 0; + inboundBuffer.igdata(local21, chatBuffer.data); + chatBuffer.offset = 0; + @Pc(106) int local106 = -1; + @Pc(127) JagString message; + if (local35) { + @Pc(112) QuickChatPhrase phrase = QuickChatPhraseType.method3568(chatBuffer); + int1 &= 0x7FFF; + local106 = phrase.id; + message = phrase.type.decodeMessage(chatBuffer); + } else { + message = Font.escape(formatChatMessage(chatBuffer).encodeMessage()); + } + player.chatMessage = message.trim(); + player.chatEffect = int1 & 0xFF; + player.chatLoops = 150; + player.chatColor = int1 >> 8; + if (int2 == 2) { + Chat.add(local106, local35 ? 17 : 1, message, null, JagString.concatenate(new JagString[]{Static44.IMG1, player.getName()})); + } else if (int2 == 1) { + Chat.add(local106, local35 ? 17 : 1, message, null, JagString.concatenate(new JagString[]{IMG0, player.getName()})); + } else { + Chat.add(local106, local35 ? 17 : 2, message, null, player.getName()); + } + } + } + inboundBuffer.offset = local24 + local21; + } + if ((flags & 0x1) != 0) { + int1 = inboundBuffer.gsmarts(); + int2 = inboundBuffer.g1add(); + player.addHit(int2, client.loop, int1); + player.hitpointsBarVisibleUntil = client.loop + 300; + player.hitpointsBar = inboundBuffer.g1sub(); + } + if ((flags & 0x8) != 0) { + int1 = inboundBuffer.g2(); + if (int1 == 65535) { + int1 = -1; + } + int2 = inboundBuffer.g1(); + Player.animate(int2, int1, player); + } + if ((flags & 0x4) != 0) { + int1 = inboundBuffer.g1add(); + @Pc(309) byte[] bytes = new byte[int1]; + @Pc(314) Buffer buffer = new Buffer(bytes); + inboundBuffer.gdata(int1, bytes); + PlayerList.appearanceCache[id] = buffer; + player.decodeAppearance(buffer); + } + if ((flags & 0x2) != 0) { + player.faceEntity = inboundBuffer.g2add(); + if (player.faceEntity == 65535) { + player.faceEntity = -1; + } + } + if ((flags & 0x400) != 0) { + player.anInt3380 = inboundBuffer.g1neg(); + player.anInt3428 = inboundBuffer.g1(); + player.anInt3416 = inboundBuffer.g1add(); + player.anInt3392 = inboundBuffer.g1(); + player.anInt3395 = inboundBuffer.ig2() + client.loop; + player.anInt3386 = inboundBuffer.ig2() + client.loop; + player.anInt3431 = inboundBuffer.g1neg(); + player.movementQueueSize = 1; + player.anInt3405 = 0; + } + if ((flags & 0x20) != 0) { + player.chatMessage = inboundBuffer.gjstr(); + if (player.chatMessage.charAt(0) == 126) { + player.chatMessage = player.chatMessage.substring(1); + Chat.add(player.getName(), 2, player.chatMessage); + } else if (player == PlayerList.self) { + Chat.add(player.getName(), 2, player.chatMessage); + } + player.chatEffect = 0; + player.chatColor = 0; + player.chatLoops = 150; + } + if ((flags & 0x200) != 0) { + int1 = inboundBuffer.gsmarts(); + int2 = inboundBuffer.g1sub(); + player.addHit(int2, client.loop, int1); + } + if ((flags & 0x800) != 0) { + int1 = inboundBuffer.g1neg(); + @Pc(502) int[] seqIds = new int[int1]; + @Pc(505) int[] delays = new int[int1]; + @Pc(508) int[] slotMasks = new int[int1]; + for (@Pc(510) int i = 0; i < int1; i++) { + @Pc(521) int seqId = inboundBuffer.ig2(); + if (seqId == 65535) { + seqId = -1; + } + seqIds[i] = seqId; + delays[i] = inboundBuffer.g1add(); + slotMasks[i] = inboundBuffer.g2(); + } + Player.method865(delays, seqIds, player, slotMasks); + } + if ((flags & 0x100) != 0) { + int1 = inboundBuffer.ig2(); + if (int1 == 65535) { + int1 = -1; + } + int2 = inboundBuffer.mg4(); + @Pc(573) boolean local573 = int1 == -1 || player.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(int1).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(player.spotAnimId).seqId).forcedPriority; + if (local573) { + player.spotAnimStart = (int2 & 0xFFFF) + client.loop; + player.anInt3361 = 0; + player.anInt3399 = 0; + player.spotAnimId = int1; + if (player.spotAnimStart > client.loop) { + player.anInt3399 = -1; + } + player.spotAnimY = int2 >> 16; + player.anInt3418 = 1; + if (player.spotAnimId != -1 && client.loop == player.spotAnimStart) { + local24 = SpotAnimTypeList.get(player.spotAnimId).seqId; + if (local24 != -1) { + @Pc(663) SeqType local663 = SeqTypeList.get(local24); + if (local663 != null && local663.frames != null) { + SoundPlayer.playSeqSound(player.zFine, local663, player.xFine, player == PlayerList.self, 0); + } + } + } + } + } + if ((flags & 0x40) != 0) { + player.faceX = inboundBuffer.g2(); + player.faceY = inboundBuffer.ig2add(); + } + } - @OriginalMember(owner = "client!fb", name = "b", descriptor = "(B)V") - public static void readPlayerInfoPacket() { - extendedCount = 0; - removedCount = 0; - readSelfPlayerInfo(); - readPlayerInfo(); - readNewPlayerInfo(); - readExtendedPlayerInfo(); - @Pc(23) int i; - for (i = 0; i < removedCount; i++) { - @Pc(30) int local30 = removedIds[i]; - if (client.loop != PlayerList.players[local30].lastSeenLoop) { - if (PlayerList.players[local30].soundRadius > 0) { - AreaSoundManager.remove(PlayerList.players[local30]); - } - PlayerList.players[local30] = null; - } - } - if (length != inboundBuffer.offset) { - throw new RuntimeException("gpp1 pos:" + inboundBuffer.offset + " psize:" + length); - } - for (i = 0; i < PlayerList.size; i++) { - if (PlayerList.players[PlayerList.ids[i]] == null) { - throw new RuntimeException("gpp2 pos:" + i + " size:" + PlayerList.size); - } - } - } + @OriginalMember(owner = "client!fb", name = "b", descriptor = "(B)V") + public static void readPlayerInfoPacket() { + extendedCount = 0; + removedCount = 0; + readSelfPlayerInfo(); + readPlayerInfo(); + readNewPlayerInfo(); + readExtendedPlayerInfo(); + @Pc(23) int i; + for (i = 0; i < removedCount; i++) { + @Pc(30) int local30 = removedIds[i]; + if (client.loop != PlayerList.players[local30].lastSeenLoop) { + if (PlayerList.players[local30].soundRadius > 0) { + AreaSoundManager.remove(PlayerList.players[local30]); + } + PlayerList.players[local30] = null; + } + } + if (length != inboundBuffer.offset) { + throw new RuntimeException("gpp1 pos:" + inboundBuffer.offset + " psize:" + length); + } + for (i = 0; i < PlayerList.size; i++) { + if (PlayerList.players[PlayerList.ids[i]] == null) { + throw new RuntimeException("gpp2 pos:" + i + " size:" + PlayerList.size); + } + } + } - @OriginalMember(owner = "client!bg", name = "a", descriptor = "(B)V") + @OriginalMember(owner = "client!bg", name = "a", descriptor = "(B)V") public static void readSelfPlayerInfo() { inboundBuffer.accessBits(); @Pc(11) int upated = inboundBuffer.gBits(1); @@ -761,2732 +761,2734 @@ public class Protocol { } } - @OriginalMember(owner = "client!dc", name = "b", descriptor = "(Z)V") - public static void readPlayerInfo() { - @Pc(6) int local6 = inboundBuffer.gBits(8); - @Pc(20) int local20; - if (PlayerList.size > local6) { - for (local20 = local6; local20 < PlayerList.size; local20++) { - removedIds[removedCount++] = PlayerList.ids[local20]; - } - } - if (local6 > PlayerList.size) { - throw new RuntimeException("gppov1"); - } - PlayerList.size = 0; - for (local20 = 0; local20 < local6; local20++) { - @Pc(75) int local75 = PlayerList.ids[local20]; - @Pc(79) Player local79 = PlayerList.players[local75]; - @Pc(84) int local84 = inboundBuffer.gBits(1); - if (local84 == 0) { - PlayerList.ids[PlayerList.size++] = local75; - local79.lastSeenLoop = client.loop; - } else { - @Pc(107) int local107 = inboundBuffer.gBits(2); - if (local107 == 0) { - PlayerList.ids[PlayerList.size++] = local75; - local79.lastSeenLoop = client.loop; - extendedIds[extendedCount++] = local75; - } else { - @Pc(153) int local153; - @Pc(163) int local163; - if (local107 == 1) { - PlayerList.ids[PlayerList.size++] = local75; - local79.lastSeenLoop = client.loop; - local153 = inboundBuffer.gBits(3); - local79.move(1, local153); - local163 = inboundBuffer.gBits(1); - if (local163 == 1) { - extendedIds[extendedCount++] = local75; - } - } else if (local107 == 2) { - PlayerList.ids[PlayerList.size++] = local75; - local79.lastSeenLoop = client.loop; - if (inboundBuffer.gBits(1) == 1) { - local153 = inboundBuffer.gBits(3); - local79.move(2, local153); - local163 = inboundBuffer.gBits(3); - local79.move(2, local163); - } else { - local153 = inboundBuffer.gBits(3); - local79.move(0, local153); - } - local153 = inboundBuffer.gBits(1); - if (local153 == 1) { - extendedIds[extendedCount++] = local75; - } - } else if (local107 == 3) { - removedIds[removedCount++] = local75; - } - } - } - } - } + @OriginalMember(owner = "client!dc", name = "b", descriptor = "(Z)V") + public static void readPlayerInfo() { + @Pc(6) int local6 = inboundBuffer.gBits(8); + @Pc(20) int local20; + if (PlayerList.size > local6) { + for (local20 = local6; local20 < PlayerList.size; local20++) { + removedIds[removedCount++] = PlayerList.ids[local20]; + } + } + if (local6 > PlayerList.size) { + throw new RuntimeException("gppov1"); + } + PlayerList.size = 0; + for (local20 = 0; local20 < local6; local20++) { + @Pc(75) int local75 = PlayerList.ids[local20]; + @Pc(79) Player local79 = PlayerList.players[local75]; + @Pc(84) int local84 = inboundBuffer.gBits(1); + if (local84 == 0) { + PlayerList.ids[PlayerList.size++] = local75; + local79.lastSeenLoop = client.loop; + } else { + @Pc(107) int local107 = inboundBuffer.gBits(2); + if (local107 == 0) { + PlayerList.ids[PlayerList.size++] = local75; + local79.lastSeenLoop = client.loop; + extendedIds[extendedCount++] = local75; + } else { + @Pc(153) int local153; + @Pc(163) int local163; + if (local107 == 1) { + PlayerList.ids[PlayerList.size++] = local75; + local79.lastSeenLoop = client.loop; + local153 = inboundBuffer.gBits(3); + local79.move(1, local153); + local163 = inboundBuffer.gBits(1); + if (local163 == 1) { + extendedIds[extendedCount++] = local75; + } + } else if (local107 == 2) { + PlayerList.ids[PlayerList.size++] = local75; + local79.lastSeenLoop = client.loop; + if (inboundBuffer.gBits(1) == 1) { + local153 = inboundBuffer.gBits(3); + local79.move(2, local153); + local163 = inboundBuffer.gBits(3); + local79.move(2, local163); + } else { + local153 = inboundBuffer.gBits(3); + local79.move(0, local153); + } + local153 = inboundBuffer.gBits(1); + if (local153 == 1) { + extendedIds[extendedCount++] = local75; + } + } else if (local107 == 3) { + removedIds[removedCount++] = local75; + } + } + } + } + } - @OriginalMember(owner = "client!se", name = "a", descriptor = "(I)V") - public static void readNewPlayerInfo() { - while (true) { - if (inboundBuffer.method2241(length) >= 11) { - @Pc(20) int local20 = inboundBuffer.gBits(11); - if (local20 != 2047) { - @Pc(27) boolean local27 = false; - if (PlayerList.players[local20] == null) { - PlayerList.players[local20] = new Player(); - local27 = true; - if (PlayerList.appearanceCache[local20] != null) { - PlayerList.players[local20].decodeAppearance(PlayerList.appearanceCache[local20]); - } - } - PlayerList.ids[PlayerList.size++] = local20; - @Pc(65) Player local65 = PlayerList.players[local20]; - local65.lastSeenLoop = client.loop; - @Pc(73) int local73 = inboundBuffer.gBits(1); - if (local73 == 1) { - extendedIds[extendedCount++] = local20; - } - @Pc(92) int local92 = inboundBuffer.gBits(5); - @Pc(99) int local99 = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; - if (local92 > 15) { - local92 -= 32; - } - if (local27) { - local65.anInt3400 = local65.anInt3381 = local99; - } - @Pc(116) int local116 = inboundBuffer.gBits(1); - @Pc(121) int local121 = inboundBuffer.gBits(5); - if (local121 > 15) { - local121 -= 32; - } - local65.teleport(local92 + PlayerList.self.movementQueueX[0], local116 == 1, PlayerList.self.movementQueueZ[0] + local121); - continue; - } - } - inboundBuffer.accessBytes(); - return; - } - } + @OriginalMember(owner = "client!se", name = "a", descriptor = "(I)V") + public static void readNewPlayerInfo() { + while (true) { + if (inboundBuffer.method2241(length) >= 11) { + @Pc(20) int local20 = inboundBuffer.gBits(11); + if (local20 != 2047) { + @Pc(27) boolean local27 = false; + if (PlayerList.players[local20] == null) { + PlayerList.players[local20] = new Player(); + local27 = true; + if (PlayerList.appearanceCache[local20] != null) { + PlayerList.players[local20].decodeAppearance(PlayerList.appearanceCache[local20]); + } + } + PlayerList.ids[PlayerList.size++] = local20; + @Pc(65) Player local65 = PlayerList.players[local20]; + local65.lastSeenLoop = client.loop; + @Pc(73) int local73 = inboundBuffer.gBits(1); + if (local73 == 1) { + extendedIds[extendedCount++] = local20; + } + @Pc(92) int local92 = inboundBuffer.gBits(5); + @Pc(99) int local99 = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; + if (local92 > 15) { + local92 -= 32; + } + if (local27) { + local65.anInt3400 = local65.anInt3381 = local99; + } + @Pc(116) int local116 = inboundBuffer.gBits(1); + @Pc(121) int local121 = inboundBuffer.gBits(5); + if (local121 > 15) { + local121 -= 32; + } + local65.teleport(local92 + PlayerList.self.movementQueueX[0], local116 == 1, PlayerList.self.movementQueueZ[0] + local121); + continue; + } + } + inboundBuffer.accessBytes(); + return; + } + } - @OriginalMember(owner = "client!tm", name = "a", descriptor = "(I)V") - public static void readExtendedPlayerInfo() { - for (@Pc(7) int i = 0; i < extendedCount; i++) { - @Pc(31) int id = extendedIds[i]; - @Pc(35) Player player = PlayerList.players[id]; - @Pc(39) int flags = inboundBuffer.g1(); - if ((flags & 0x10) != 0) { - flags += inboundBuffer.g1() << 8; - } - readExtendedPlayerInfo(flags, id, player); - } - } + @OriginalMember(owner = "client!tm", name = "a", descriptor = "(I)V") + public static void readExtendedPlayerInfo() { + for (@Pc(7) int i = 0; i < extendedCount; i++) { + @Pc(31) int id = extendedIds[i]; + @Pc(35) Player player = PlayerList.players[id]; + @Pc(39) int flags = inboundBuffer.g1(); + if ((flags & 0x10) != 0) { + flags += inboundBuffer.g1() << 8; + } + readExtendedPlayerInfo(flags, id, player); + } + } - @OriginalMember(owner = "client!ac", name = "a", descriptor = "(B)Z") - public static boolean readPacketInternal() throws IOException { - if (socket == null) { - return false; - } + @OriginalMember(owner = "client!ac", name = "a", descriptor = "(B)Z") + public static boolean readPacketInternal() throws IOException { + if (socket == null) { + return false; + } - @Pc(14) int available = socket.available(); - if (available == 0) { - return false; - } + @Pc(14) int available = socket.available(); + if (available == 0) { + return false; + } - if (opcode == -1) { - available--; - socket.read(0, 1, inboundBuffer.data); - inboundBuffer.offset = 0; - opcode = inboundBuffer.g1isaac(); - length = PACKET_LENGTHS[opcode]; - } + if (opcode == -1) { + available--; + socket.read(0, 1, inboundBuffer.data); + inboundBuffer.offset = 0; + opcode = inboundBuffer.g1isaac(); + length = PACKET_LENGTHS[opcode]; + } - if (length == -1) { - if (available <= 0) { - return false; - } - socket.read(0, 1, inboundBuffer.data); - available--; - length = inboundBuffer.data[0] & 0xFF; - } else if (length == -2) { - if (available <= 1) { - return false; - } - available -= 2; - socket.read(0, 2, inboundBuffer.data); - inboundBuffer.offset = 0; - length = inboundBuffer.g2(); - } + if (length == -1) { + if (available <= 0) { + return false; + } + socket.read(0, 1, inboundBuffer.data); + available--; + length = inboundBuffer.data[0] & 0xFF; + } else if (length == -2) { + if (available <= 1) { + return false; + } + available -= 2; + socket.read(0, 2, inboundBuffer.data); + inboundBuffer.offset = 0; + length = inboundBuffer.g2(); + } - if (length > available) { - return false; - } + if (length > available) { + return false; + } - inboundBuffer.offset = 0; - socket.read(0, length, inboundBuffer.data); - opcode4 = opcode3; - opcode3 = opcode2; - opcode2 = opcode; - LoginManager.anInt1862 = 0; + inboundBuffer.offset = 0; + socket.read(0, length, inboundBuffer.data); + opcode4 = opcode3; + opcode3 = opcode2; + opcode2 = opcode; + LoginManager.anInt1862 = 0; - if (opcode == ServerProt.VARP_SMALL) { - int id = inboundBuffer.g2add(); - @Pc(137) byte value = inboundBuffer.g1bneg(); - VarpDomain.set(value, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.RUN_CS2) { - int tracknum = inboundBuffer.g2(); - JagString argTypes = inboundBuffer.gjstr(); - @Pc(163) Object[] scriptArgs = new Object[argTypes.length() + 1]; - for (int i = argTypes.length() - 1; i >= 0; i--) { - if (argTypes.charAt(i) == 115) { - scriptArgs[i + 1] = inboundBuffer.gjstr(); - } else { - scriptArgs[i + 1] = inboundBuffer.g4(); - } - } - scriptArgs[0] = inboundBuffer.g4(); - setVerifyId(tracknum); - @Pc(226) HookRequest request = new HookRequest(); - request.arguments = scriptArgs; - ScriptRunner.run(request); - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_GAME) { - @Pc(245) JagString message = inboundBuffer.gjstr(); - if (message.endsWith(TRADEREQ)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (IgnoreList.encodedUsernames[i] == name37) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.add(name, 4, LocalizedText.TRADEREQ); - } - } else if (message.endsWith(CHALREQ)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (IgnoreList.encodedUsernames[i] == name37) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - JagString local506 = message.substring(message.length() - 9, message.indexOf(DateUtil.COLON) + 1); - Chat.add(name, 8, local506); - } - } else if (message.endsWith(Static191.ASSISTREQ)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (name37 == IgnoreList.encodedUsernames[i]) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.add(name, 10, JagString.EMPTY); - } - } else if (message.endsWith(CLAN)) { - JagString name = message.substring(message.indexOf(CLAN), 0); - Chat.add(JagString.EMPTY, 11, name); - } else if (message.endsWith(TRADE)) { - JagString name = message.substring(message.indexOf(TRADE), 0); - if (Player.inTutorialIsland == 0) { - Chat.add(JagString.EMPTY, 12, name); - } - } else if (message.endsWith(ASSIST)) { - JagString name = message.substring(message.indexOf(ASSIST), 0); - if (Player.inTutorialIsland == 0) { - Chat.add(JagString.EMPTY, 13, name); - } - } else if (message.endsWith(DUELSTAKE)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (name37 == IgnoreList.encodedUsernames[i]) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.add(name, 14, JagString.EMPTY); - } - } else if (message.endsWith(DUELFRIEND)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int local277 = 0; local277 < IgnoreList.size; local277++) { - if (IgnoreList.encodedUsernames[local277] == name37) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.add(name, 15, JagString.EMPTY); - } - } else if (message.endsWith(Static217.aClass100_916)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (name37 == IgnoreList.encodedUsernames[i]) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.add(name, 16, JagString.EMPTY); - } - } else if (message.endsWith(Static164.aClass100_770)) { - JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); - long name37 = name.encode37(); - boolean ignored = false; - for (int i = 0; i < IgnoreList.size; i++) { - if (IgnoreList.encodedUsernames[i] == name37) { - ignored = true; - break; - } - } - if (!ignored && Player.inTutorialIsland == 0) { - JagString local506 = message.substring(message.length() - 9, message.indexOf(DateUtil.COLON) + 1); - Chat.add(name, 21, local506); - } - } else { - Chat.add(JagString.EMPTY, 0, message); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETTEXT3) { - int id = inboundBuffer.ig2(); - int tracknum = inboundBuffer.g2add(); - JagString value = inboundBuffer.gjstr(); - setVerifyId(tracknum); - DelayedStateChange.method3498(value, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.BATCH_LOCATION_PACKET) { - SceneGraph.currentChunkZ = inboundBuffer.g1add(); - SceneGraph.currentChunkX = inboundBuffer.g1sub(); - while (length > inboundBuffer.offset) { - opcode = inboundBuffer.g1(); - readLocationPacket(); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.CLEAR_MINIMAP_FLAG) { - opcode = -1; - LoginManager.mapFlagX = 0; - return true; - } else if (opcode == ServerProt.IF_SETSCROLLPOS) { - int id = inboundBuffer.mg4(); - int pos = inboundBuffer.ig2(); - int tracknum = inboundBuffer.g2(); - setVerifyId(tracknum); - DelayedStateChange.method3938(pos, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.CLAN_QUICK_CHAT) { - long name37 = inboundBuffer.g8(); - inboundBuffer.g1b(); - long clan37 = inboundBuffer.g8(); - int top = inboundBuffer.g2(); - int bot = inboundBuffer.g3(); - int rights = inboundBuffer.g1(); - int quickchatId = inboundBuffer.g2(); + if (opcode == ServerProt.VARP_SMALL) { + int id = inboundBuffer.g2add(); + @Pc(137) byte value = inboundBuffer.g1bneg(); + VarpDomain.set(value, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.RUN_CS2) { + int tracknum = inboundBuffer.g2(); + JagString argTypes = inboundBuffer.gjstr(); + @Pc(163) Object[] scriptArgs = new Object[argTypes.length() + 1]; + for (int i = argTypes.length() - 1; i >= 0; i--) { + if (argTypes.charAt(i) == 115) { + scriptArgs[i + 1] = inboundBuffer.gjstr(); + } else { + scriptArgs[i + 1] = inboundBuffer.g4(); + } + } + scriptArgs[0] = inboundBuffer.g4(); + setVerifyId(tracknum); + @Pc(226) HookRequest request = new HookRequest(); + request.arguments = scriptArgs; + ScriptRunner.run(request); + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_GAME) { + @Pc(245) JagString message = inboundBuffer.gjstr(); + if (message.endsWith(TRADEREQ)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (IgnoreList.encodedUsernames[i] == name37) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.add(name, 4, LocalizedText.TRADEREQ); + } + } else if (message.endsWith(CHALREQ)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (IgnoreList.encodedUsernames[i] == name37) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + JagString local506 = message.substring(message.length() - 9, message.indexOf(DateUtil.COLON) + 1); + Chat.add(name, 8, local506); + } + } else if (message.endsWith(Static191.ASSISTREQ)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (name37 == IgnoreList.encodedUsernames[i]) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.add(name, 10, JagString.EMPTY); + } + } else if (message.endsWith(CLAN)) { + JagString name = message.substring(message.indexOf(CLAN), 0); + Chat.add(JagString.EMPTY, 11, name); + } else if (message.endsWith(TRADE)) { + JagString name = message.substring(message.indexOf(TRADE), 0); + if (Player.inTutorialIsland == 0) { + Chat.add(JagString.EMPTY, 12, name); + } + } else if (message.endsWith(ASSIST)) { + JagString name = message.substring(message.indexOf(ASSIST), 0); + if (Player.inTutorialIsland == 0) { + Chat.add(JagString.EMPTY, 13, name); + } + } else if (message.endsWith(DUELSTAKE)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (name37 == IgnoreList.encodedUsernames[i]) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.add(name, 14, JagString.EMPTY); + } + } else if (message.endsWith(DUELFRIEND)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int local277 = 0; local277 < IgnoreList.size; local277++) { + if (IgnoreList.encodedUsernames[local277] == name37) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.add(name, 15, JagString.EMPTY); + } + } else if (message.endsWith(Static217.aClass100_916)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (name37 == IgnoreList.encodedUsernames[i]) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.add(name, 16, JagString.EMPTY); + } + } else if (message.endsWith(Static164.aClass100_770)) { + JagString name = message.substring(message.indexOf(DateUtil.COLON), 0); + long name37 = name.encode37(); + boolean ignored = false; + for (int i = 0; i < IgnoreList.size; i++) { + if (IgnoreList.encodedUsernames[i] == name37) { + ignored = true; + break; + } + } + if (!ignored && Player.inTutorialIsland == 0) { + JagString local506 = message.substring(message.length() - 9, message.indexOf(DateUtil.COLON) + 1); + Chat.add(name, 21, local506); + } + } else { + Chat.add(JagString.EMPTY, 0, message); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETTEXT3) { + int id = inboundBuffer.ig2(); + int tracknum = inboundBuffer.g2add(); + JagString value = inboundBuffer.gjstr(); + setVerifyId(tracknum); + DelayedStateChange.method3498(value, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.BATCH_LOCATION_PACKET) { + SceneGraph.currentChunkZ = inboundBuffer.g1add(); + SceneGraph.currentChunkX = inboundBuffer.g1sub(); + while (length > inboundBuffer.offset) { + opcode = inboundBuffer.g1(); + readLocationPacket(); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.CLEAR_MINIMAP_FLAG) { + opcode = -1; + LoginManager.mapFlagX = 0; + return true; + } else if (opcode == ServerProt.IF_SETSCROLLPOS) { + int id = inboundBuffer.mg4(); + int pos = inboundBuffer.ig2(); + int tracknum = inboundBuffer.g2(); + setVerifyId(tracknum); + DelayedStateChange.method3938(pos, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.CLAN_QUICK_CHAT) { + long name37 = inboundBuffer.g8(); + inboundBuffer.g1b(); + long clan37 = inboundBuffer.g8(); + int top = inboundBuffer.g2(); + int bot = inboundBuffer.g3(); + int rights = inboundBuffer.g1(); + int quickchatId = inboundBuffer.g2(); - @Pc(910) boolean ignored = false; - @Pc(922) long messageId = ((long)top << 32) + bot; - @Pc(924) int n = 0; + @Pc(910) boolean ignored = false; + @Pc(922) long messageId = ((long) top << 32) + bot; + @Pc(924) int n = 0; - check: - while (true) { - if (n < 100) { - if (messageId != Chat.recentMessages[n]) { - n++; - continue; - } - ignored = true; - break; - } - if (rights <= 1) { - for (n = 0; n < IgnoreList.size; n++) { - if (IgnoreList.encodedUsernames[n] == name37) { - ignored = true; - break check; - } - } - } - break; - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.recentMessages[Chat.messageCounter] = messageId; - Chat.messageCounter = (Chat.messageCounter + 1) % 100; - @Pc(999) JagString message = QuickChatPhraseTypeList.get(quickchatId).decodeMessage(inboundBuffer); - if (rights == 2 || rights == 3) { - Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), JagString.concatenate(new JagString[] { Static44.IMG1, Base37.decode37(name37).toTitleCase() })); - } else if (rights == 1) { - Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), JagString.concatenate(new JagString[] { IMG0, Base37.decode37(name37).toTitleCase() })); - } else { - Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), Base37.decode37(name37).toTitleCase()); - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.JOIN_CLAN_CHAT) { - ClanChat.transmitAt = InterfaceList.transmitTimer; - long owner37 = inboundBuffer.g8(); - if (owner37 == 0L) { - ClanChat.owner = null; - opcode = -1; - ClanChat.name = null; - ClanChat.members = null; - ClanChat.size = 0; - return true; - } + check: + while (true) { + if (n < 100) { + if (messageId != Chat.recentMessages[n]) { + n++; + continue; + } + ignored = true; + break; + } + if (rights <= 1) { + for (n = 0; n < IgnoreList.size; n++) { + if (IgnoreList.encodedUsernames[n] == name37) { + ignored = true; + break check; + } + } + } + break; + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.recentMessages[Chat.messageCounter] = messageId; + Chat.messageCounter = (Chat.messageCounter + 1) % 100; + @Pc(999) JagString message = QuickChatPhraseTypeList.get(quickchatId).decodeMessage(inboundBuffer); + if (rights == 2 || rights == 3) { + Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), JagString.concatenate(new JagString[]{Static44.IMG1, Base37.decode37(name37).toTitleCase()})); + } else if (rights == 1) { + Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), JagString.concatenate(new JagString[]{IMG0, Base37.decode37(name37).toTitleCase()})); + } else { + Chat.add(quickchatId, 20, message, Base37.decode37(clan37).toTitleCase(), Base37.decode37(name37).toTitleCase()); + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.JOIN_CLAN_CHAT) { + ClanChat.transmitAt = InterfaceList.transmitTimer; + long owner37 = inboundBuffer.g8(); + if (owner37 == 0L) { + ClanChat.owner = null; + opcode = -1; + ClanChat.name = null; + ClanChat.members = null; + ClanChat.size = 0; + return true; + } - long name37 = inboundBuffer.g8(); - ClanChat.name = Base37.decode37(name37); - ClanChat.owner = Base37.decode37(owner37); - ClanChat.minKick = inboundBuffer.g1b(); - int clanSize = inboundBuffer.g1(); - if (clanSize == 255) { - opcode = -1; - return true; - } + long name37 = inboundBuffer.g8(); + ClanChat.name = Base37.decode37(name37); + ClanChat.owner = Base37.decode37(owner37); + ClanChat.minKick = inboundBuffer.g1b(); + int clanSize = inboundBuffer.g1(); + if (clanSize == 255) { + opcode = -1; + return true; + } - ClanChat.size = clanSize; - @Pc(1158) ClanMember[] members = new ClanMember[100]; - for (int i = 0; i < ClanChat.size; i++) { - members[i] = new ClanMember(); - members[i].key = inboundBuffer.g8(); - members[i].username = Base37.decode37(members[i].key); - members[i].world = inboundBuffer.g2(); - members[i].rank = inboundBuffer.g1b(); - members[i].worldName = inboundBuffer.gjstr(); - if (members[i].key == Player.name37) { - ClanChat.rank = members[i].rank; - } - } + ClanChat.size = clanSize; + @Pc(1158) ClanMember[] members = new ClanMember[100]; + for (int i = 0; i < ClanChat.size; i++) { + members[i] = new ClanMember(); + members[i].key = inboundBuffer.g8(); + members[i].username = Base37.decode37(members[i].key); + members[i].world = inboundBuffer.g2(); + members[i].rank = inboundBuffer.g1b(); + members[i].worldName = inboundBuffer.gjstr(); + if (members[i].key == Player.name37) { + ClanChat.rank = members[i].rank; + } + } - int count = ClanChat.size; - while (count > 0) { - boolean local1245 = true; - count--; - for (int i = 0; i < count; i++) { - if (members[i].username.method3139(members[i + 1].username) > 0) { - local1245 = false; - @Pc(1279) ClanMember member = members[i]; - members[i] = members[i + 1]; - members[i + 1] = member; - } - } - if (local1245) { - break; - } - } - ClanChat.members = members; - opcode = -1; - return true; - } else if (opcode == ServerProt.LAST_LOGIN_INFO) { - int ip32 = inboundBuffer.img4(); - Player.lastLogAddress = GameShell.signLink.getReverseDns(ip32); - opcode = -1; - return true; - } else if (opcode == ServerProt.PLAYER_INFO) { - readPlayerInfoPacket(); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETTEXT2) { - int tracknum = inboundBuffer.g2(); - JagString text = inboundBuffer.gjstr(); - int id = inboundBuffer.ig2add(); - setVerifyId(tracknum); - DelayedStateChange.method3498(text, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.CHAT_FILTER_SETTINGS) { - Chat.publicFilter = inboundBuffer.g1(); - Chat.privateFilter = inboundBuffer.g1(); - Chat.tradeFilter = inboundBuffer.g1(); - opcode = -1; - return true; - } else if (opcode == ServerProt.SET_INTERACTION) { - int cursor = inboundBuffer.ig2add(); - if (cursor == 65535) { - cursor = -1; - } - int top = inboundBuffer.g1(); - int optId = inboundBuffer.g1(); - JagString option = inboundBuffer.gjstr(); - if (optId >= 1 && optId <= 8) { - if (option.equalsIgnoreCase(MiniMenu.NULL)) { - option = null; - } - Player.options[optId - 1] = option; - Player.cursors[optId - 1] = cursor; - Player.secondaryOptions[optId - 1] = top == 0; - } - opcode = -1; - return true; - } else if (opcode == ServerProt.VARP_LARGE) { - int value = inboundBuffer.g4(); - int id = inboundBuffer.g2add(); - VarpDomain.set(value, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETHIDE) { - int parent = inboundBuffer.g1neg(); - int tracknum = inboundBuffer.g2(); - int reset = inboundBuffer.ig4(); - setVerifyId(tracknum); - DelayedStateChange.method2905(reset, parent); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_OPENSUB) { - int parent = inboundBuffer.ig2add(); - int reset = inboundBuffer.g1add(); - int tracknum = inboundBuffer.ig2add(); - setVerifyId(tracknum); - if (reset == 2) { - WorldMap.reset(); - } - InterfaceList.topLevelInterface = parent; - InterfaceList.method1753(parent); - InterfaceList.method3712(false); - InterfaceList.method1626(InterfaceList.topLevelInterface); - for (int i = 0; i < 100; i++) { - InterfaceList.aBooleanArray100[i] = true; - } - opcode = -1; - return true; - } else if (opcode == ServerProt.CLIENT_SETVARC_LARGE) { - int tracknum = inboundBuffer.ig2add(); - int value = inboundBuffer.g4(); - int id = inboundBuffer.g2add(); - setVerifyId(tracknum); - DelayedStateChange.updateVarC(id, value); - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_QUICKCHAT_PRIVATE_ECHO) { - long name37 = inboundBuffer.g8(); - int chatId = inboundBuffer.g2(); - JagString message = QuickChatPhraseTypeList.get(chatId).decodeMessage(inboundBuffer); - Chat.add(chatId, 19, message, null, Base37.decode37(name37).toTitleCase()); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_UID192) { - writeRandom(inboundBuffer); - opcode = -1; - return true; - } else if (opcode == ServerProt.RESET_CLIENT_VARCACHE) { - VarpDomain.reset(); - InterfaceList.redrawActiveInterfaces(); - VarpDomain.updatedVarpsWriterIndex += 32; - opcode = -1; - return true; - } else if (opcode == ServerProt.CAM_LOOKAT) { - int tracknum = inboundBuffer.g2(); - int tx = inboundBuffer.g1(); - int tz = inboundBuffer.g1(); - int cy = inboundBuffer.g2(); - int step = inboundBuffer.g1(); - int dur = inboundBuffer.g1(); - setVerifyId(tracknum); - Camera.method3849(cy, tz, step, tx, dur); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETANIM) { - int id = inboundBuffer.mg4(); - int value = inboundBuffer.ig2b(); - int tracknum = inboundBuffer.g2add(); - setVerifyId(tracknum); - DelayedStateChange.method3893(id, value); - opcode = -1; - return true; - } else if (opcode == ServerProt.WIDGETSTRUCT_SETTING) { - int value = inboundBuffer.ig2add(); - int parent = inboundBuffer.ig4(); - int tracknum = inboundBuffer.g2add(); - int end = inboundBuffer.ig2(); - if (end == 65535) { - end = -1; - } - int start = inboundBuffer.g2add(); - if (start == 65535) { - start = -1; - } - setVerifyId(tracknum); - ServerActiveProperties properties; - for (int slot = start; slot <= end; slot++) { - long ptr = (long) slot + ((long) parent << 32); - ServerActiveProperties prev = (ServerActiveProperties) InterfaceList.properties.get(ptr); - if (prev != null) { - properties = new ServerActiveProperties(prev.events, value); - prev.unlink(); - } else if (slot == -1) { - properties = new ServerActiveProperties(InterfaceList.getComponent(parent).properties.events, value); - } else { - properties = new ServerActiveProperties(0, value); - } - InterfaceList.properties.put(properties, ptr); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.SPOTANIM_SPECIFIC) { - int delay = inboundBuffer.g2(); - int height = inboundBuffer.ig2(); - int target = inboundBuffer.img4(); - int gfxId = inboundBuffer.ig2add(); - if (target >> 30 == 0) { - @Pc(1994) SeqType seq; - if (target >> 29 != 0) { - int npcId = target & 0xFFFF; - @Pc(1894) Npc npc = NpcList.npcs[npcId]; - if (npc != null) { - if (gfxId == 65535) { - gfxId = -1; - } - boolean animated = gfxId == -1 || npc.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(gfxId).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(npc.spotAnimId).seqId).forcedPriority; - if (animated) { - npc.anInt3361 = 0; - npc.spotAnimId = gfxId; - npc.spotAnimStart = client.loop + delay; - npc.anInt3399 = 0; - if (npc.spotAnimStart > client.loop) { - npc.anInt3399 = -1; - } - npc.spotAnimY = height; - npc.anInt3418 = 1; - if (npc.spotAnimId != -1 && client.loop == npc.spotAnimStart) { - int seqId = SpotAnimTypeList.get(npc.spotAnimId).seqId; - if (seqId != -1) { - seq = SeqTypeList.get(seqId); - if (seq.frames != null) { - SoundPlayer.playSeqSound(npc.zFine, seq, npc.xFine, false, 0); - } - } - } - } - } - } else if (target >> 28 != 0) { - int playerId = target & 0xFFFF; - @Pc(2033) Player player; - if (PlayerList.selfId == playerId) { - player = PlayerList.self; - } else { - player = PlayerList.players[playerId]; - } - if (player != null) { - if (gfxId == 65535) { - gfxId = -1; - } - boolean animated = gfxId == -1 || player.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(gfxId).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(player.spotAnimId).seqId).forcedPriority; - if (animated) { - player.spotAnimStart = delay + client.loop; - player.spotAnimY = height; - player.spotAnimId = gfxId; - player.anInt3418 = 1; - player.anInt3361 = 0; - player.anInt3399 = 0; - if (player.spotAnimStart > client.loop) { - player.anInt3399 = -1; - } - if (player.spotAnimId != -1 && player.spotAnimStart == client.loop) { - int seqId = SpotAnimTypeList.get(player.spotAnimId).seqId; - if (seqId != -1) { - seq = SeqTypeList.get(seqId); - if (seq.frames != null) { - SoundPlayer.playSeqSound(player.zFine, seq, player.xFine, player == PlayerList.self, 0); - } - } - } - } - } - } - } else { - int plane = target >> 28 & 0x3; - int posX = (target >> 14 & 0x3FFF) - Camera.originX; - int posZ = (target & 0x3FFF) - Camera.originZ; - if (posX >= 0 && posZ >= 0 && posX < 104 && posZ < 104) { - posZ = posZ * 128 + 64; - posX = posX * 128 + 64; - @Pc(2241) SpotAnim spotAnim = new SpotAnim(gfxId, plane, posX, posZ, SceneGraph.getTileHeight(plane, posX, posZ) - height, delay, client.loop); - LoginManager.aClass69_64.addTail(new SpotAnimNode(spotAnim)); - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.INTERFACE_ANIMATE_ROTATE) { - int ptr = inboundBuffer.mg4(); - int tracknum = inboundBuffer.g2add(); - int pitchStep = inboundBuffer.g2(); - int yawStep = inboundBuffer.g2add(); - setVerifyId(tracknum); - DelayedStateChange.setComponentModelRotationSpeedServer(yawStep + (pitchStep << 16), ptr); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_STAT) { - InterfaceList.redrawActiveInterfaces(); - int level = inboundBuffer.g1add(); - int xp = inboundBuffer.img4(); - int skill = inboundBuffer.g1(); - PlayerSkillXpTable.experience[skill] = xp; - PlayerSkillXpTable.boostedLevels[skill] = level; - PlayerSkillXpTable.baseLevels[skill] = 1; - for (int i = 0; i < 98; i++) { - if (PlayerSkillXpTable.xpLevelLookup[i] <= xp) { - PlayerSkillXpTable.baseLevels[skill] = i + 2; - } - } - PlayerSkillXpTable.updatedStats[PlayerSkillXpTable.updatedStatsWriterIndex++ & 0x1F] = skill; - opcode = -1; - return true; - } else if (opcode == ServerProt.LOCATION_PACKET_104 || opcode == ServerProt.LOCATION_PACKET_121 || opcode == ServerProt.LOCATION_PACKET_97 || opcode == ServerProt.LOCATION_PACKET_14 || opcode == ServerProt.LOCATION_PACKET_202 || opcode == ServerProt.LOCATION_PACKET_135 || opcode == ServerProt.LOCATION_PACKET_17 || opcode == ServerProt.LOCATION_PACKET_16 || opcode == ServerProt.LOCATION_PACKET_240 || opcode == ServerProt.LOCATION_PACKET_33 || opcode == ServerProt.LOCATION_PACKET_20 || opcode == ServerProt.LOCATION_PACKET_195 || opcode == ServerProt.LOCATION_PACKET_179) { - readLocationPacket(); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_CLOSESUB) { - int tracknum = inboundBuffer.g2(); - int id = inboundBuffer.g4(); - setVerifyId(tracknum); - @Pc(2441) ComponentPointer pointer = (ComponentPointer) InterfaceList.openInterfaces.get(id); - if (pointer != null) { - InterfaceList.closeInterface(true, pointer); - } - if (Static44.aClass13_10 != null) { - InterfaceList.redraw(Static44.aClass13_10); - Static44.aClass13_10 = null; - } - opcode = -1; - return true; - } else if (opcode == ServerProt.CAM_FORCEANGLE) { - int yaw = inboundBuffer.ig2(); - int tracknum = inboundBuffer.g2(); - int pitch = inboundBuffer.g2(); - setVerifyId(tracknum); - Camera.yawTarget = yaw; - Camera.pitchTarget = pitch; - if (Camera.cameraType == 2) { - Camera.cameraPitch = (int)Camera.pitchTarget; - Camera.cameraYaw = (int)Camera.yawTarget; - } - Camera.clampCameraAngle(); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETANGLE) { - int pitch = inboundBuffer.g2(); - int tracknum = inboundBuffer.g2add(); - int scale = inboundBuffer.ig2add(); - int yaw = inboundBuffer.ig2add(); - int ptr = inboundBuffer.g4(); - setVerifyId(tracknum); - DelayedStateChange.updateView(scale, ptr, yaw, pitch); - opcode = -1; - return true; - } else if (opcode == ServerProt.CLEAR_GROUND_ITEMS) { - SceneGraph.currentChunkX = inboundBuffer.g1(); - SceneGraph.currentChunkZ = inboundBuffer.g1neg(); - for (int x = SceneGraph.currentChunkX; x < SceneGraph.currentChunkX + 8; x++) { - for (int z = SceneGraph.currentChunkZ; z < SceneGraph.currentChunkZ + 8; z++) { - if (SceneGraph.objStacks[Player.level][x][z] != null) { - SceneGraph.objStacks[Player.level][x][z] = null; - spawnGroundObject(z, x); - } - } - } - for (@Pc(2604) ChangeLocRequest loc = (ChangeLocRequest) ChangeLocRequest.queue.head(); loc != null; loc = (ChangeLocRequest) ChangeLocRequest.queue.next()) { - if (loc.x >= SceneGraph.currentChunkX && SceneGraph.currentChunkX + 8 > loc.x && loc.z >= SceneGraph.currentChunkZ && loc.z < SceneGraph.currentChunkZ + 8 && loc.level == Player.level) { - loc.resetLoops = 0; - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.INTERFACE_ITEMS_CLEAR) { - int id = inboundBuffer.mg4(); - @Pc(2666) Component component = InterfaceList.getComponent(id); - for (int i = 0; i < component.objTypes.length; i++) { - component.objTypes[i] = -1; - component.objTypes[i] = 0; - } - InterfaceList.redraw(component); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETMODEL) { - int id = inboundBuffer.ig4(); - int tracknum = inboundBuffer.ig2add(); - int modelId = inboundBuffer.g2add(); - if (modelId == 65535) { - modelId = -1; - } - setVerifyId(tracknum); - DelayedStateChange.updateComponentModel(-1, 1, id, modelId); - opcode = -1; - return true; - } else if (opcode == ServerProt.SET_MINIMAP_STATE) { - MiniMap.state = inboundBuffer.g1(); - opcode = -1; - return true; - } else if (opcode == ServerProt.TELEPORT_LOCAL_PLAYER) { - int pos1 = inboundBuffer.g1sub(); - int flags = inboundBuffer.g1add(); - int pos2 = inboundBuffer.g1(); - Player.level = flags >> 1; - PlayerList.self.teleport(pos1, (flags & 0x1) == 1, pos2); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_FRIENDLIST) { - long name37 = inboundBuffer.g8(); - int worldId = inboundBuffer.g2(); - int x = inboundBuffer.g1(); - boolean ignored = true; - if (name37 < 0L) { - name37 &= Long.MAX_VALUE; - ignored = false; - } - JagString worldName = JagString.EMPTY; - if (worldId > 0) { - worldName = inboundBuffer.gjstr(); - } - @Pc(2834) JagString name = Base37.decode37(name37).toTitleCase(); - for (int i = 0; i < FriendsList.size; i++) { - if (name37 == FriendsList.encodedUsernames[i]) { - if (worldId != FriendsList.worlds[i]) { - FriendsList.worlds[i] = worldId; - if (worldId > 0) { - Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[] { name, LocalizedText.FRIENDLOGIN})); - } - if (worldId == 0) { - Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[] { name, LocalizedText.FRIENDLOGOUT})); - } - } - FriendsList.worldNames[i] = worldName; - FriendsList.ranks[i] = x; - name = null; - FriendsList.aBooleanArray135[i] = ignored; - break; - } - } - if (name != null && FriendsList.size < 200) { - FriendsList.encodedUsernames[FriendsList.size] = name37; - FriendsList.usernames[FriendsList.size] = name; - FriendsList.worlds[FriendsList.size] = worldId; - FriendsList.worldNames[FriendsList.size] = worldName; - FriendsList.ranks[FriendsList.size] = x; - FriendsList.aBooleanArray135[FriendsList.size] = ignored; - FriendsList.size++; - } - FriendsList.transmitAt = InterfaceList.transmitTimer; - int friendCount = FriendsList.size; - while (friendCount > 0) { - friendCount--; - @Pc(2961) boolean sorting = true; - for (int i = 0; i < friendCount; i++) { - if (FriendsList.worlds[i] != Player.worldId && Player.worldId == FriendsList.worlds[i + 1] || FriendsList.worlds[i] == 0 && FriendsList.worlds[i + 1] != 0) { - sorting = false; - int local3002 = FriendsList.worlds[i]; - FriendsList.worlds[i] = FriendsList.worlds[i + 1]; - FriendsList.worlds[i + 1] = local3002; - JagString local3020 = FriendsList.worldNames[i]; - FriendsList.worldNames[i] = FriendsList.worldNames[i + 1]; - FriendsList.worldNames[i + 1] = local3020; - JagString local3038 = FriendsList.usernames[i]; - FriendsList.usernames[i] = FriendsList.usernames[i + 1]; - FriendsList.usernames[i + 1] = local3038; - @Pc(3056) long local3056 = FriendsList.encodedUsernames[i]; - FriendsList.encodedUsernames[i] = FriendsList.encodedUsernames[i + 1]; - FriendsList.encodedUsernames[i + 1] = local3056; - @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; - } - } - if (sorting) { - break; - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.SET_WALK_TEXT) { - if (length == 0) { - MiniMenu.walkText = LocalizedText.WALKHERE; - } else { - MiniMenu.walkText = inboundBuffer.gjstr(); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.FORCE_VARP_REFRESH) { - for (int i = 0; i < VarpDomain.activeVarps.length; i++) { - if (VarpDomain.varp[i] != VarpDomain.activeVarps[i]) { - VarpDomain.activeVarps[i] = VarpDomain.varp[i]; - VarpDomain.refreshMagicVarp(i); - VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.CAMERA_DETACH) { - int tracknum = inboundBuffer.g2(); - int local786 = inboundBuffer.g1(); - int modelId = inboundBuffer.g1(); - int counter = inboundBuffer.g2(); - int local1146 = inboundBuffer.g1(); - int local277 = inboundBuffer.g1(); - setVerifyId(tracknum); - Camera.method2722(true, local1146, counter, local277, modelId, local786); - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_QUICKCHAT_PRIVATE) { - long name = inboundBuffer.g8(); - int top = inboundBuffer.g2(); - int bot = inboundBuffer.g3(); - int rights = inboundBuffer.g1(); - int chatId = inboundBuffer.g2(); + int count = ClanChat.size; + while (count > 0) { + boolean local1245 = true; + count--; + for (int i = 0; i < count; i++) { + if (members[i].username.method3139(members[i + 1].username) > 0) { + local1245 = false; + @Pc(1279) ClanMember member = members[i]; + members[i] = members[i + 1]; + members[i + 1] = member; + } + } + if (local1245) { + break; + } + } + ClanChat.members = members; + opcode = -1; + return true; + } else if (opcode == ServerProt.LAST_LOGIN_INFO) { + int ip32 = inboundBuffer.img4(); + Player.lastLogAddress = GameShell.signLink.getReverseDns(ip32); + opcode = -1; + return true; + } else if (opcode == ServerProt.PLAYER_INFO) { + readPlayerInfoPacket(); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETTEXT2) { + int tracknum = inboundBuffer.g2(); + JagString text = inboundBuffer.gjstr(); + int id = inboundBuffer.ig2add(); + setVerifyId(tracknum); + DelayedStateChange.method3498(text, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.CHAT_FILTER_SETTINGS) { + Chat.publicFilter = inboundBuffer.g1(); + Chat.privateFilter = inboundBuffer.g1(); + Chat.tradeFilter = inboundBuffer.g1(); + opcode = -1; + return true; + } else if (opcode == ServerProt.SET_INTERACTION) { + int cursor = inboundBuffer.ig2add(); + if (cursor == 65535) { + cursor = -1; + } + int top = inboundBuffer.g1(); + int optId = inboundBuffer.g1(); + JagString option = inboundBuffer.gjstr(); + if (optId >= 1 && optId <= 8) { + if (option.equalsIgnoreCase(MiniMenu.NULL)) { + option = null; + } + Player.options[optId - 1] = option; + Player.cursors[optId - 1] = cursor; + Player.secondaryOptions[optId - 1] = top == 0; + } + opcode = -1; + return true; + } else if (opcode == ServerProt.VARP_LARGE) { + int value = inboundBuffer.g4(); + int id = inboundBuffer.g2add(); + VarpDomain.set(value, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETHIDE) { + int parent = inboundBuffer.g1neg(); + int tracknum = inboundBuffer.g2(); + int reset = inboundBuffer.ig4(); + setVerifyId(tracknum); + DelayedStateChange.method2905(reset, parent); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_OPENSUB) { + int parent = inboundBuffer.ig2add(); + int reset = inboundBuffer.g1add(); + int tracknum = inboundBuffer.ig2add(); + setVerifyId(tracknum); + if (reset == 2) { + WorldMap.reset(); + } + InterfaceList.topLevelInterface = parent; + InterfaceList.method1753(parent); + InterfaceList.method3712(false); + InterfaceList.method1626(InterfaceList.topLevelInterface); + for (int i = 0; i < 100; i++) { + InterfaceList.aBooleanArray100[i] = true; + } + opcode = -1; + return true; + } else if (opcode == ServerProt.CLIENT_SETVARC_LARGE) { + int tracknum = inboundBuffer.ig2add(); + int value = inboundBuffer.g4(); + int id = inboundBuffer.g2add(); + setVerifyId(tracknum); + DelayedStateChange.updateVarC(id, value); + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_QUICKCHAT_PRIVATE_ECHO) { + long name37 = inboundBuffer.g8(); + int chatId = inboundBuffer.g2(); + JagString message = QuickChatPhraseTypeList.get(chatId).decodeMessage(inboundBuffer); + Chat.add(chatId, 19, message, null, Base37.decode37(name37).toTitleCase()); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_UID192) { + writeRandom(inboundBuffer); + opcode = -1; + return true; + } else if (opcode == ServerProt.RESET_CLIENT_VARCACHE) { + VarpDomain.reset(); + InterfaceList.redrawActiveInterfaces(); + VarpDomain.updatedVarpsWriterIndex += 32; + opcode = -1; + return true; + } else if (opcode == ServerProt.CAM_LOOKAT) { + int tracknum = inboundBuffer.g2(); + int tx = inboundBuffer.g1(); + int tz = inboundBuffer.g1(); + int cy = inboundBuffer.g2(); + int step = inboundBuffer.g1(); + int dur = inboundBuffer.g1(); + setVerifyId(tracknum); + Camera.method3849(cy, tz, step, tx, dur); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETANIM) { + int id = inboundBuffer.mg4(); + int value = inboundBuffer.ig2b(); + int tracknum = inboundBuffer.g2add(); + setVerifyId(tracknum); + DelayedStateChange.method3893(id, value); + opcode = -1; + return true; + } else if (opcode == ServerProt.WIDGETSTRUCT_SETTING) { + int value = inboundBuffer.ig2add(); + int parent = inboundBuffer.ig4(); + int tracknum = inboundBuffer.g2add(); + int end = inboundBuffer.ig2(); + if (end == 65535) { + end = -1; + } + int start = inboundBuffer.g2add(); + if (start == 65535) { + start = -1; + } + setVerifyId(tracknum); + ServerActiveProperties properties; + for (int slot = start; slot <= end; slot++) { + long ptr = (long) slot + ((long) parent << 32); + ServerActiveProperties prev = (ServerActiveProperties) InterfaceList.properties.get(ptr); + if (prev != null) { + properties = new ServerActiveProperties(prev.events, value); + prev.unlink(); + } else if (slot == -1) { + properties = new ServerActiveProperties(InterfaceList.getComponent(parent).properties.events, value); + } else { + properties = new ServerActiveProperties(0, value); + } + InterfaceList.properties.put(properties, ptr); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.SPOTANIM_SPECIFIC) { + int delay = inboundBuffer.g2(); + int height = inboundBuffer.ig2(); + int target = inboundBuffer.img4(); + int gfxId = inboundBuffer.ig2add(); + if (target >> 30 == 0) { + @Pc(1994) SeqType seq; + if (target >> 29 != 0) { + int npcId = target & 0xFFFF; + @Pc(1894) Npc npc = NpcList.npcs[npcId]; + if (npc != null) { + if (gfxId == 65535) { + gfxId = -1; + } + boolean animated = gfxId == -1 || npc.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(gfxId).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(npc.spotAnimId).seqId).forcedPriority; + if (animated) { + npc.anInt3361 = 0; + npc.spotAnimId = gfxId; + npc.spotAnimStart = client.loop + delay; + npc.anInt3399 = 0; + if (npc.spotAnimStart > client.loop) { + npc.anInt3399 = -1; + } + npc.spotAnimY = height; + npc.anInt3418 = 1; + if (npc.spotAnimId != -1 && client.loop == npc.spotAnimStart) { + int seqId = SpotAnimTypeList.get(npc.spotAnimId).seqId; + if (seqId != -1) { + seq = SeqTypeList.get(seqId); + if (seq.frames != null) { + SoundPlayer.playSeqSound(npc.zFine, seq, npc.xFine, false, 0); + } + } + } + } + } + } else if (target >> 28 != 0) { + int playerId = target & 0xFFFF; + @Pc(2033) Player player; + if (PlayerList.selfId == playerId) { + player = PlayerList.self; + } else { + player = PlayerList.players[playerId]; + } + if (player != null) { + if (gfxId == 65535) { + gfxId = -1; + } + boolean animated = gfxId == -1 || player.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(gfxId).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(player.spotAnimId).seqId).forcedPriority; + if (animated) { + player.spotAnimStart = delay + client.loop; + player.spotAnimY = height; + player.spotAnimId = gfxId; + player.anInt3418 = 1; + player.anInt3361 = 0; + player.anInt3399 = 0; + if (player.spotAnimStart > client.loop) { + player.anInt3399 = -1; + } + if (player.spotAnimId != -1 && player.spotAnimStart == client.loop) { + int seqId = SpotAnimTypeList.get(player.spotAnimId).seqId; + if (seqId != -1) { + seq = SeqTypeList.get(seqId); + if (seq.frames != null) { + SoundPlayer.playSeqSound(player.zFine, seq, player.xFine, player == PlayerList.self, 0); + } + } + } + } + } + } + } else { + int plane = target >> 28 & 0x3; + int posX = (target >> 14 & 0x3FFF) - Camera.originX; + int posZ = (target & 0x3FFF) - Camera.originZ; + if (posX >= 0 && posZ >= 0 && posX < 104 && posZ < 104) { + posZ = posZ * 128 + 64; + posX = posX * 128 + 64; + @Pc(2241) SpotAnim spotAnim = new SpotAnim(gfxId, plane, posX, posZ, SceneGraph.getTileHeight(plane, posX, posZ) - height, delay, client.loop); + LoginManager.aClass69_64.addTail(new SpotAnimNode(spotAnim)); + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.INTERFACE_ANIMATE_ROTATE) { + int ptr = inboundBuffer.mg4(); + int tracknum = inboundBuffer.g2add(); + int pitchStep = inboundBuffer.g2(); + int yawStep = inboundBuffer.g2add(); + setVerifyId(tracknum); + DelayedStateChange.setComponentModelRotationSpeedServer(yawStep + (pitchStep << 16), ptr); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_STAT) { + InterfaceList.redrawActiveInterfaces(); + int level = inboundBuffer.g1add(); + int xp = inboundBuffer.img4(); + int skill = inboundBuffer.g1(); + PlayerSkillXpTable.experience[skill] = xp; + PlayerSkillXpTable.boostedLevels[skill] = level; + PlayerSkillXpTable.baseLevels[skill] = 1; + for (int i = 0; i < 98; i++) { + if (PlayerSkillXpTable.xpLevelLookup[i] <= xp) { + PlayerSkillXpTable.baseLevels[skill] = i + 2; + } + } + PlayerSkillXpTable.updatedStats[PlayerSkillXpTable.updatedStatsWriterIndex++ & 0x1F] = skill; + opcode = -1; + return true; + } else if (opcode == ServerProt.LOCATION_PACKET_104 || opcode == ServerProt.LOCATION_PACKET_121 || opcode == ServerProt.LOCATION_PACKET_97 || opcode == ServerProt.LOCATION_PACKET_14 || opcode == ServerProt.LOCATION_PACKET_202 || opcode == ServerProt.LOCATION_PACKET_135 || opcode == ServerProt.LOCATION_PACKET_17 || opcode == ServerProt.LOCATION_PACKET_16 || opcode == ServerProt.LOCATION_PACKET_240 || opcode == ServerProt.LOCATION_PACKET_33 || opcode == ServerProt.LOCATION_PACKET_20 || opcode == ServerProt.LOCATION_PACKET_195 || opcode == ServerProt.LOCATION_PACKET_179) { + readLocationPacket(); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_CLOSESUB) { + int tracknum = inboundBuffer.g2(); + int id = inboundBuffer.g4(); + setVerifyId(tracknum); + @Pc(2441) ComponentPointer pointer = (ComponentPointer) InterfaceList.openInterfaces.get(id); + if (pointer != null) { + InterfaceList.closeInterface(true, pointer); + } + if (Static44.aClass13_10 != null) { + InterfaceList.redraw(Static44.aClass13_10); + Static44.aClass13_10 = null; + } + opcode = -1; + return true; + } else if (opcode == ServerProt.CAM_FORCEANGLE) { + int yaw = inboundBuffer.ig2(); + int tracknum = inboundBuffer.g2(); + int pitch = inboundBuffer.g2(); + setVerifyId(tracknum); + Camera.yawTarget = yaw; + Camera.pitchTarget = pitch; + if (Camera.cameraType == 2) { + Camera.cameraPitch = (int) Camera.pitchTarget; + Camera.cameraYaw = (int) Camera.yawTarget; + } + Camera.clampCameraAngle(); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETANGLE) { + int pitch = inboundBuffer.g2(); + int tracknum = inboundBuffer.g2add(); + int scale = inboundBuffer.ig2add(); + int yaw = inboundBuffer.ig2add(); + int ptr = inboundBuffer.g4(); + setVerifyId(tracknum); + DelayedStateChange.updateView(scale, ptr, yaw, pitch); + opcode = -1; + return true; + } else if (opcode == ServerProt.CLEAR_GROUND_ITEMS) { + SceneGraph.currentChunkX = inboundBuffer.g1(); + SceneGraph.currentChunkZ = inboundBuffer.g1neg(); + for (int x = SceneGraph.currentChunkX; x < SceneGraph.currentChunkX + 8; x++) { + for (int z = SceneGraph.currentChunkZ; z < SceneGraph.currentChunkZ + 8; z++) { + if (SceneGraph.objStacks[Player.level][x][z] != null) { + SceneGraph.objStacks[Player.level][x][z] = null; + spawnGroundObject(z, x); + } + } + } + for (@Pc(2604) ChangeLocRequest loc = (ChangeLocRequest) ChangeLocRequest.queue.head(); loc != null; loc = (ChangeLocRequest) ChangeLocRequest.queue.next()) { + if (loc.x >= SceneGraph.currentChunkX && SceneGraph.currentChunkX + 8 > loc.x && loc.z >= SceneGraph.currentChunkZ && loc.z < SceneGraph.currentChunkZ + 8 && loc.level == Player.level) { + loc.resetLoops = 0; + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.INTERFACE_ITEMS_CLEAR) { + int id = inboundBuffer.mg4(); + @Pc(2666) Component component = InterfaceList.getComponent(id); + for (int i = 0; i < component.objTypes.length; i++) { + component.objTypes[i] = -1; + component.objTypes[i] = 0; + } + InterfaceList.redraw(component); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETMODEL) { + int id = inboundBuffer.ig4(); + int tracknum = inboundBuffer.ig2add(); + int modelId = inboundBuffer.g2add(); + if (modelId == 65535) { + modelId = -1; + } + setVerifyId(tracknum); + DelayedStateChange.updateComponentModel(-1, 1, id, modelId); + opcode = -1; + return true; + } else if (opcode == ServerProt.SET_MINIMAP_STATE) { + MiniMap.state = inboundBuffer.g1(); + opcode = -1; + return true; + } else if (opcode == ServerProt.TELEPORT_LOCAL_PLAYER) { + int pos1 = inboundBuffer.g1sub(); + int flags = inboundBuffer.g1add(); + int pos2 = inboundBuffer.g1(); + Player.level = flags >> 1; + PlayerList.self.teleport(pos1, (flags & 0x1) == 1, pos2); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_FRIENDLIST) { + long name37 = inboundBuffer.g8(); + int worldId = inboundBuffer.g2(); + int x = inboundBuffer.g1(); + boolean ignored = true; + if (name37 < 0L) { + name37 &= Long.MAX_VALUE; + ignored = false; + } + JagString worldName = JagString.EMPTY; + if (worldId > 0) { + worldName = inboundBuffer.gjstr(); + } + @Pc(2834) JagString name = Base37.decode37(name37).toTitleCase(); + for (int i = 0; i < FriendsList.size; i++) { + if (name37 == FriendsList.encodedUsernames[i]) { + if (worldId != FriendsList.worlds[i]) { + FriendsList.worlds[i] = worldId; + if (worldId > 0) { + Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[]{name, LocalizedText.FRIENDLOGIN})); + } + if (worldId == 0) { + Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[]{name, LocalizedText.FRIENDLOGOUT})); + } + } + FriendsList.worldNames[i] = worldName; + FriendsList.ranks[i] = x; + name = null; + FriendsList.aBooleanArray135[i] = ignored; + break; + } + } + if (name != null && FriendsList.size < 200) { + FriendsList.encodedUsernames[FriendsList.size] = name37; + FriendsList.usernames[FriendsList.size] = name; + FriendsList.worlds[FriendsList.size] = worldId; + FriendsList.worldNames[FriendsList.size] = worldName; + FriendsList.ranks[FriendsList.size] = x; + FriendsList.aBooleanArray135[FriendsList.size] = ignored; + FriendsList.size++; + } + FriendsList.transmitAt = InterfaceList.transmitTimer; + int friendCount = FriendsList.size; + while (friendCount > 0) { + friendCount--; + @Pc(2961) boolean sorting = true; + for (int i = 0; i < friendCount; i++) { + if (FriendsList.worlds[i] != Player.worldId && Player.worldId == FriendsList.worlds[i + 1] || FriendsList.worlds[i] == 0 && FriendsList.worlds[i + 1] != 0) { + sorting = false; + int local3002 = FriendsList.worlds[i]; + FriendsList.worlds[i] = FriendsList.worlds[i + 1]; + FriendsList.worlds[i + 1] = local3002; + JagString local3020 = FriendsList.worldNames[i]; + FriendsList.worldNames[i] = FriendsList.worldNames[i + 1]; + FriendsList.worldNames[i + 1] = local3020; + JagString local3038 = FriendsList.usernames[i]; + FriendsList.usernames[i] = FriendsList.usernames[i + 1]; + FriendsList.usernames[i + 1] = local3038; + @Pc(3056) long local3056 = FriendsList.encodedUsernames[i]; + FriendsList.encodedUsernames[i] = FriendsList.encodedUsernames[i + 1]; + FriendsList.encodedUsernames[i + 1] = local3056; + @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; + } + } + if (sorting) { + break; + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.SET_WALK_TEXT) { + if (length == 0) { + MiniMenu.walkText = LocalizedText.WALKHERE; + } else { + MiniMenu.walkText = inboundBuffer.gjstr(); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.FORCE_VARP_REFRESH) { + for (int i = 0; i < VarpDomain.activeVarps.length; i++) { + if (VarpDomain.varp[i] != VarpDomain.activeVarps[i]) { + VarpDomain.activeVarps[i] = VarpDomain.varp[i]; + VarpDomain.refreshMagicVarp(i); + VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.CAMERA_DETACH) { + int tracknum = inboundBuffer.g2(); + int local786 = inboundBuffer.g1(); + int modelId = inboundBuffer.g1(); + int counter = inboundBuffer.g2(); + int local1146 = inboundBuffer.g1(); + int local277 = inboundBuffer.g1(); + setVerifyId(tracknum); + Camera.method2722(true, local1146, counter, local277, modelId, local786); + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_QUICKCHAT_PRIVATE) { + long name = inboundBuffer.g8(); + int top = inboundBuffer.g2(); + int bot = inboundBuffer.g3(); + int rights = inboundBuffer.g1(); + int chatId = inboundBuffer.g2(); - @Pc(3263) boolean ignore = false; - @Pc(3270) long messageId = ((long)top << 32) + bot; - @Pc(3272) int ix = 0; + @Pc(3263) boolean ignore = false; + @Pc(3270) long messageId = ((long) top << 32) + bot; + @Pc(3272) int ix = 0; - check: - while (true) { - if (ix < 100) { - if (messageId != Chat.recentMessages[ix]) { - ix++; - continue; - } - ignore = true; - break; - } - if (rights <= 1) { - for (ix = 0; ix < IgnoreList.size; ix++) { - if (name == IgnoreList.encodedUsernames[ix]) { - ignore = true; - break check; - } - } - } - break; - } - if (!ignore && Player.inTutorialIsland == 0) { - Chat.recentMessages[Chat.messageCounter] = messageId; - Chat.messageCounter = (Chat.messageCounter + 1) % 100; - JagString message = QuickChatPhraseTypeList.get(chatId).decodeMessage(inboundBuffer); - if (rights == 2) { - Chat.add(chatId, 18, message, null, JagString.concatenate(new JagString[] { Static44.IMG1, Base37.decode37(name).toTitleCase() })); - } else if (rights == 1) { - Chat.add(chatId, 18, message, null, JagString.concatenate(new JagString[] { IMG0, Base37.decode37(name).toTitleCase() })); - } else { - Chat.add(chatId, 18, message, null, Base37.decode37(name).toTitleCase()); - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.SWITCH_WIDGET) { - int source = inboundBuffer.img4(); - int tracknum = inboundBuffer.g2add(); - int target = inboundBuffer.img4(); - setVerifyId(tracknum); - @Pc(3449) ComponentPointer src = (ComponentPointer) InterfaceList.openInterfaces.get(source); - ComponentPointer tgt = (ComponentPointer) InterfaceList.openInterfaces.get(target); - if (tgt != null) { - InterfaceList.closeInterface(src == null || tgt.anInt5878 != src.anInt5878, tgt); - } - if (src != null) { - src.unlink(); - InterfaceList.openInterfaces.put(src, target); - } - @Pc(3490) Component component = InterfaceList.getComponent(source); - if (component != null) { - InterfaceList.redraw(component); - } - component = InterfaceList.getComponent(target); - if (component != null) { - InterfaceList.redraw(component); - InterfaceList.method531(component, true); - } - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.runScripts(1, InterfaceList.topLevelInterface); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.CAM_SHAKE) { - int tracknum = inboundBuffer.g2(); - int cameraId = inboundBuffer.g1(); - int jitter = inboundBuffer.g1(); - int amplitude = inboundBuffer.g1(); - int frequency = inboundBuffer.g1(); - int shake4 = inboundBuffer.g2(); - setVerifyId(tracknum); - Static176.customCameraActive[cameraId] = true; - Camera.cameraJitter[cameraId] = jitter; - Camera.cameraAmplitude[cameraId] = amplitude; - Camera.cameraFrequency[cameraId] = frequency; - anIntArray76[cameraId] = shake4; - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETCOLOUR) { - int id = inboundBuffer.img4(); - int tracknum = inboundBuffer.g2add(); - int color = inboundBuffer.ig2add(); - setVerifyId(tracknum); - DelayedStateChange.setColor(color, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_REBOOT_TIMER) { - Player.rebootTimer = inboundBuffer.g2() * 30; - opcode = -1; - InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; - return true; - } else if (opcode == ServerProt.REFLECTION_CHEAT_CHECK) { - ReflectionCheck.method3654(GameShell.signLink, inboundBuffer, length); - opcode = -1; - return true; - } else if (opcode == ServerProt.CLIENT_SETVARC_SMALL) { - int tracknum = inboundBuffer.ig2(); - int value = inboundBuffer.g1neg(); - int id = inboundBuffer.ig2add(); - setVerifyId(tracknum); - DelayedStateChange.updateVarC(id, value); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_RUNENERGY) { - InterfaceList.redrawActiveInterfaces(); - Player.runEnergy = inboundBuffer.g1(); - InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; - opcode = -1; - return true; - } else if (opcode == ServerProt.GAME_FRAME_UNK) { - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.runScripts(0, InterfaceList.topLevelInterface); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.DELETE_INVENTORY) { - int id = inboundBuffer.ig2(); - Inv.delete(id); - Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = id & 0x7FFF; - opcode = -1; - return true; - } else if (opcode == ServerProt.NPC_ANIM_SPECIFIC) { - int npcId = inboundBuffer.ig2(); - int value = inboundBuffer.g1sub(); - int seqId = inboundBuffer.g2(); - @Pc(3766) Npc npc = NpcList.npcs[npcId]; - if (npc != null) { - animateNpc(value, seqId, npc); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_RUNWEIGHT) { - InterfaceList.redrawActiveInterfaces(); - Player.weight = inboundBuffer.g2b(); - InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_PRIVATE_ECHO) { - long name37 = inboundBuffer.g8(); - JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); - Chat.add(Base37.decode37(name37).toTitleCase(), 6, message); - opcode = -1; - return true; - } else if (opcode == ServerProt.URL_OPEN) { - if (GameShell.fullScreenFrame != null) { - DisplayMode.setWindowMode(false, Preferences.favoriteWorlds, -1, -1); - } - @Pc(3848) byte[] data = new byte[length]; - inboundBuffer.gBytesIsaac(data, length); - JagString url = JagString.decodeString(data, length, 0); - if (GameShell.frame == null && (SignLink.anInt5928 == 3 || !SignLink.osName.startsWith("win") || client.haveIe6)) { - ScriptRunner.openUrl(url, true); - } else { - ScriptRunner.url = url; - Static164.newTab = true; - Static33.openUrlRequest = GameShell.signLink.openUrl(new String(url.method3148(), StandardCharsets.ISO_8859_1)); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.GENERATE_CHAT_HEAD_FROM_BODY) { - int tracknum = inboundBuffer.g2add(); - int id = inboundBuffer.mg4(); - int value1 = inboundBuffer.ig2add(); - int value2 = inboundBuffer.ig2(); - int value3 = inboundBuffer.ig2add(); - setVerifyId(tracknum); - DelayedStateChange.updateComponentModel(value1, 7, id, value2 << 16 | value3); - opcode = -1; - return true; - } else if (opcode == ServerProt.VARBIT_SMALL) { - int value = inboundBuffer.g1add(); - int id = inboundBuffer.ig2(); - VarpDomain.setVarbit(value, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_OPENTOP) { - int type = inboundBuffer.g1(); - int pointer = inboundBuffer.mg4(); - int tracknum = inboundBuffer.g2add(); - int component = inboundBuffer.g2(); - setVerifyId(tracknum); - ComponentPointer ptr = (ComponentPointer) InterfaceList.openInterfaces.get(pointer); - if (ptr != null) { - InterfaceList.closeInterface(ptr.anInt5878 != component, ptr); - } - Static44.method1148(component, pointer, type); - opcode = -1; - return true; - } else if (opcode == ServerProt.RESET_ANIMS) { - for (int i = 0; i < PlayerList.players.length; i++) { - if (PlayerList.players[i] != null) { - PlayerList.players[i].seqId = -1; - } - } - for (int i = 0; i < NpcList.npcs.length; i++) { - if (NpcList.npcs[i] != null) { - NpcList.npcs[i].seqId = -1; - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.HINT_ARROW) { - int flags = inboundBuffer.g1(); - @Pc(4084) MapMarker mapMarker = new MapMarker(); - int slot = flags >> 6; - mapMarker.type = flags & 0x3F; - mapMarker.anInt4048 = inboundBuffer.g1(); - if (mapMarker.anInt4048 >= 0 && mapMarker.anInt4048 < Sprites.headhints.length) { - if (mapMarker.type == 1 || mapMarker.type == 10) { - mapMarker.actorTargetId = inboundBuffer.g2(); - inboundBuffer.offset += 3; - } else if (mapMarker.type >= 2 && mapMarker.type <= 6) { - if (mapMarker.type == 2) { - mapMarker.anInt4045 = 64; - mapMarker.anInt4047 = 64; - } - if (mapMarker.type == 3) { - mapMarker.anInt4045 = 0; - mapMarker.anInt4047 = 64; - } - if (mapMarker.type == 4) { - mapMarker.anInt4045 = 128; - mapMarker.anInt4047 = 64; - } - if (mapMarker.type == 5) { - mapMarker.anInt4045 = 64; - mapMarker.anInt4047 = 0; - } - if (mapMarker.type == 6) { - mapMarker.anInt4045 = 64; - mapMarker.anInt4047 = 128; - } - mapMarker.type = 2; - mapMarker.targetX = inboundBuffer.g2(); - mapMarker.anInt4046 = inboundBuffer.g2(); - mapMarker.anInt4050 = inboundBuffer.g1(); - } - mapMarker.playerModelId = inboundBuffer.g2(); - if (mapMarker.playerModelId == 65535) { - mapMarker.playerModelId = -1; - } - MiniMap.hintMapMarkers[slot] = mapMarker; - } - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_IGNORELIST) { - 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]); - } - FriendsList.transmitAt = InterfaceList.transmitTimer; - opcode = -1; - return true; - } else if (opcode == ServerProt.NPC_INFO) { - readNpcPacket(); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETPOSITION) { - int tracknum = inboundBuffer.g2add(); - int ptr = inboundBuffer.ig4(); - int x = inboundBuffer.g2b(); - int y = inboundBuffer.g2badd(); - setVerifyId(tracknum); - DelayedStateChange.method4666(x, ptr, y); - opcode = -1; - return true; - } else if (opcode == ServerProt.LOC_ANIM_SPECIFIC) { - int slot = inboundBuffer.g1sub(); - int type = slot >> 2; - int rotation = slot & 0x3; - int type2 = Loc.LAYERS[type]; - int seqId = inboundBuffer.g2(); - int pos = inboundBuffer.g4(); - if (seqId == 65535) { - seqId = -1; - } - int z = pos & 0x3FFF; - int x = pos >> 14 & 0x3FFF; - x -= Camera.originX; - z -= Camera.originZ; - int plane = pos >> 28 & 0x3; - SceneGraph.method1881(plane, rotation, type, z, type2, x, seqId); - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_PRIVATE) { - long name37 = inboundBuffer.g8(); - int top = inboundBuffer.g2(); - int bot = inboundBuffer.g3(); - int rights = inboundBuffer.g1(); - @Pc(4425) boolean ignored = false; - @Pc(4431) long messageId = bot + ((long)top << 32); - int ix = 0; - check: while (true) { - if (ix >= 100) { - if (rights <= 1) { - if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { - ignored = true; - } else { - for (ix = 0; ix < IgnoreList.size; ix++) { - if (name37 == IgnoreList.encodedUsernames[ix]) { - ignored = true; - break check; - } - } - } - } - break; - } - if (messageId == Chat.recentMessages[ix]) { - ignored = true; - break; - } - ix++; - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.recentMessages[Chat.messageCounter] = messageId; - Chat.messageCounter = (Chat.messageCounter + 1) % 100; - @Pc(4518) JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); - if (rights == 2 || rights == 3) { - Chat.add(JagString.concatenate(new JagString[] { Static44.IMG1, Base37.decode37(name37).toTitleCase() }), 7, message); - } else if (rights == 1) { - Chat.add(JagString.concatenate(new JagString[] { IMG0, Base37.decode37(name37).toTitleCase() }), 7, message); - } else { - Chat.add(Base37.decode37(name37).toTitleCase(), 3, message); - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.MESSAGE_CLANCHANNEL) { - long name37 = inboundBuffer.g8(); - inboundBuffer.g1b(); - long chat37 = inboundBuffer.g8(); - int top = inboundBuffer.g2(); - int bot = inboundBuffer.g3(); - @Pc(4626) long local4626 = ((long)top << 32) + bot; - int rights = inboundBuffer.g1(); - @Pc(4632) boolean ignored = false; - @Pc(4634) int ix = 0; - check: while (true) { - if (ix >= 100) { - if (rights <= 1) { - if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { - ignored = true; - } else { - for (ix = 0; ix < IgnoreList.size; ix++) { - if (IgnoreList.encodedUsernames[ix] == name37) { - ignored = true; - break check; - } - } - } - } - break; - } - if (Chat.recentMessages[ix] == local4626) { - ignored = true; - break; - } - ix++; - } - if (!ignored && Player.inTutorialIsland == 0) { - Chat.recentMessages[Chat.messageCounter] = local4626; - Chat.messageCounter = (Chat.messageCounter + 1) % 100; - JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); - if (rights == 2 || rights == 3) { - Chat.method1598(message, JagString.concatenate(new JagString[] { Static44.IMG1, Base37.decode37(name37).toTitleCase() }), Base37.decode37(chat37).toTitleCase()); - } else if (rights == 1) { - Chat.method1598(message, JagString.concatenate(new JagString[] { IMG0, Base37.decode37(name37).toTitleCase() }), Base37.decode37(chat37).toTitleCase()); - } else { - Chat.method1598(message, Base37.decode37(name37).toTitleCase(), Base37.decode37(chat37).toTitleCase()); - } - } - opcode = -1; - return true; - } else if (opcode == ServerProt.DYNAMIC_SCENE_GRAPH) { - readRebuildPacket(true); - opcode = -1; - return true; - } else if (opcode == ServerProt.SYNTH_SOUND) { - int trackId = inboundBuffer.g2(); - int volume = inboundBuffer.g1(); - if (trackId == 65535) { - trackId = -1; - } - int delay = inboundBuffer.g2(); - SoundPlayer.play(volume, trackId, delay); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETPLAYERHEAD) { - int tracknum = inboundBuffer.ig2add(); - int id = inboundBuffer.img4(); - setVerifyId(tracknum); - int set = 0; - if (PlayerList.self.appearance != null) { - set = PlayerList.self.appearance.method1952(); - } - DelayedStateChange.updateComponentModel(-1, 3, id, set); - opcode = -1; - return true; - } else if (opcode == ServerProt.IF_SETTEXT1) { - int id = inboundBuffer.mg4(); - JagString text = inboundBuffer.gjstr(); - int tracknum = inboundBuffer.g2add(); - setVerifyId(tracknum); - DelayedStateChange.method3617(text, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.VARBIT_LARGE) { - int value = inboundBuffer.ig4(); - int id = inboundBuffer.ig2add(); - VarpDomain.setVarbit(value, id); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_INV_PARTIAL) { - int componentHash = inboundBuffer.g4(); - int containerId = inboundBuffer.g2(); - if (componentHash < -70000) { - containerId += 32768; - } - Component component; - if (componentHash < 0) { - component = null; - } else { - component = InterfaceList.getComponent(componentHash); - } - while (inboundBuffer.offset < length) { - int slot = inboundBuffer.gsmarts(); - int amount = inboundBuffer.g2(); - int id = 0; - if (amount != 0) { - id = inboundBuffer.g1(); - if (id == 255) { - id = inboundBuffer.g4(); - } - } - if (component != null && slot >= 0 && component.objTypes.length > slot) { - component.objTypes[slot] = amount; - component.objCounts[slot] = id; - } - Inv.updateContainer(amount - 1, slot, id, containerId); - } - if (component != null) { - InterfaceList.redraw(component); - } - InterfaceList.redrawActiveInterfaces(); - Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = containerId & 0x7FFF; - opcode = -1; - return true; - } else if (opcode == ServerProt.CAM_RESET) { - int tracknum = inboundBuffer.g2(); - setVerifyId(tracknum); - Camera.resetCameraEffects(); - opcode = -1; - return true; - } else if (opcode == ServerProt.LOGOUT) { - LoginManager.processLogout(); - opcode = -1; - return false; - } else if (opcode == ServerProt.GRAND_EXCHANGE_OFFERS) { - int offer = inboundBuffer.g1(); - if (inboundBuffer.g1() == 0) { - StockMarketManager.offers[offer] = new StockMarketOffer(); - } else { - inboundBuffer.offset--; - StockMarketManager.offers[offer] = new StockMarketOffer(inboundBuffer); - } - opcode = -1; - StockMarketManager.transmitAt = InterfaceList.transmitTimer; - return true; - } else if (opcode == ServerProt.IF_SETNPCHEAD) { - int npcId = inboundBuffer.g2add(); - int id = inboundBuffer.ig4(); - if (npcId == 65535) { - npcId = -1; - } - int tracknum = inboundBuffer.ig2(); - setVerifyId(tracknum); - DelayedStateChange.updateComponentModel(-1, 2, id, npcId); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_SCENE_GRAPH) { - readRebuildPacket(false); - opcode = -1; - return true; - } else if (opcode == ServerProt.SET_INTERFACE_SETTINGS) { - int tracknum = inboundBuffer.ig2(); - int end = inboundBuffer.ig2(); - if (end == 65535) { - end = -1; - } - int pointer = inboundBuffer.g4(); - int start = inboundBuffer.g2add(); - int accessMask = inboundBuffer.img4(); - if (start == 65535) { - start = -1; - } - setVerifyId(tracknum); - for (int local277 = start; local277 <= end; local277++) { - long local904 = ((long) pointer << 32) + ((long) local277); - ServerActiveProperties properties = (ServerActiveProperties) InterfaceList.properties.get(local904); - ServerActiveProperties target; - if (properties != null) { - target = new ServerActiveProperties(accessMask, properties.anInt540); - properties.unlink(); - } else if (local277 == -1) { - target = new ServerActiveProperties(accessMask, InterfaceList.getComponent(pointer).properties.anInt540); - } else { - target = new ServerActiveProperties(accessMask, -1); - } - InterfaceList.properties.put(target, local904); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.FRIENDLIST_LOADED) { - FriendsList.state = inboundBuffer.g1(); - FriendsList.transmitAt = InterfaceList.transmitTimer; - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_CLAN) { - long name37 = inboundBuffer.g8(); - int worldId = inboundBuffer.g2(); - @Pc(5325) byte rights = inboundBuffer.g1b(); - boolean ignored = (Long.MIN_VALUE & name37) != 0L; - if (ignored) { - if (ClanChat.size == 0) { - opcode = -1; - return true; - } - name37 &= Long.MAX_VALUE; - int i; - for (i = 0; ClanChat.size > i && (name37 != ClanChat.members[i].key || worldId != ClanChat.members[i].world); i++) { - } - if (i < ClanChat.size) { - while (ClanChat.size - 1 > i) { - ClanChat.members[i] = ClanChat.members[i + 1]; - i++; - } - ClanChat.size--; - ClanChat.members[ClanChat.size] = null; - } - } else { - JagString worldName = inboundBuffer.gjstr(); - @Pc(5347) ClanMember member = new ClanMember(); - member.key = name37; - member.username = Base37.decode37(member.key); - member.rank = rights; - member.worldName = worldName; - member.world = worldId; - int n; - for (n = ClanChat.size - 1; n >= 0; n--) { - int m = ClanChat.members[n].username.method3139(member.username); - if (m == 0) { - ClanChat.members[n].world = worldId; - ClanChat.members[n].rank = rights; - ClanChat.members[n].worldName = worldName; - if (name37 == Player.name37) { - ClanChat.rank = rights; - } - ClanChat.transmitAt = InterfaceList.transmitTimer; - opcode = -1; - return true; - } - if (m < 0) { - break; - } - } - if (ClanChat.members.length <= ClanChat.size) { - opcode = -1; - return true; - } - for (int i = ClanChat.size - 1; i > n; i--) { - ClanChat.members[i + 1] = ClanChat.members[i]; - } - if (ClanChat.size == 0) { - ClanChat.members = new ClanMember[100]; - } - ClanChat.members[n + 1] = member; - if (Player.name37 == name37) { - ClanChat.rank = rights; - } - ClanChat.size++; - } - opcode = -1; - ClanChat.transmitAt = InterfaceList.transmitTimer; - return true; - } else if (opcode == ServerProt.IF_SETOBJECT) { - int slot = inboundBuffer.g4(); - int id = inboundBuffer.mg4(); - int itemId = inboundBuffer.ig2add(); - if (itemId == 65535) { - itemId = -1; - } - int tracknum = inboundBuffer.ig2(); - setVerifyId(tracknum); - @Pc(5603) Component component = InterfaceList.getComponent(id); - @Pc(5615) ObjType objType; - if (component.if3) { - DelayedStateChange.method3707(id, slot, itemId); - objType = ObjTypeList.get(itemId); - DelayedStateChange.updateView(objType.zoom2d, id, objType.yAngle2D, objType.xAngle2D); - DelayedStateChange.method2745(id, objType.zAngle2D, objType.yOffset2D, objType.xOffset2D); - } else if (itemId == -1) { - component.modelType = 0; - opcode = -1; - return true; - } else { - objType = ObjTypeList.get(itemId); - component.modelXAngle = objType.xAngle2D; - component.modelZoom = objType.zoom2d * 100 / slot; - component.modelType = 4; - component.modelId = itemId; - component.modelYAngle = objType.yAngle2D; - InterfaceList.redraw(component); - } - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_INV_FULL) { - int componentHash = inboundBuffer.g4(); - int containerId = inboundBuffer.g2(); - if (componentHash < -70000) { - containerId += 32768; - } - Component component; - if (componentHash >= 0) { - component = InterfaceList.getComponent(componentHash); - } else { - component = null; - } - if (component != null) { - for (int i = 0; i < component.objTypes.length; i++) { - component.objTypes[i] = 0; - component.objCounts[i] = 0; - } - } - Inv.method475(containerId); - int total = inboundBuffer.g2(); - for (int slot = 0; slot < total; slot++) { - int amount = inboundBuffer.g1sub(); - if (amount == 255) { - amount = inboundBuffer.g4(); - } - int itemId = inboundBuffer.g2(); - if (component != null && slot < component.objTypes.length) { - component.objTypes[slot] = itemId; - component.objCounts[slot] = amount; - } - Inv.updateContainer(itemId - 1, slot, amount, containerId); - } - if (component != null) { - InterfaceList.redraw(component); - } - InterfaceList.redrawActiveInterfaces(); - Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = containerId & 0x7FFF; - opcode = -1; - return true; - } else if (opcode == ServerProt.SET_SETTINGS_STRING) { - method3954(inboundBuffer.gjstr()); - opcode = -1; - return true; - } else if (opcode == ServerProt.UPDATE_CURRENT_LOCATION) { - SceneGraph.currentChunkX = inboundBuffer.g1neg(); - SceneGraph.currentChunkZ = inboundBuffer.g1(); - opcode = -1; - return true; - } else if (opcode == ServerProt.MIDI_SONG) { - int id = inboundBuffer.ig2add(); - if (id == 65535) { - id = -1; - } - MusicPlayer.playSong(id); - opcode = -1; - return true; - } else if (opcode == ServerProt.MIDI_JINGLE) { - int volume = inboundBuffer.ig3(); - int id = inboundBuffer.ig2(); - if (id == 65535) { - id = -1; - } - MusicPlayer.playJingle(volume, id); - opcode = -1; - return true; - } else { - TracingException.report("T1 - " + opcode + "," + opcode3 + "," + opcode4 + " - " + length, null); - LoginManager.processLogout(); - return true; - } - } + check: + while (true) { + if (ix < 100) { + if (messageId != Chat.recentMessages[ix]) { + ix++; + continue; + } + ignore = true; + break; + } + if (rights <= 1) { + for (ix = 0; ix < IgnoreList.size; ix++) { + if (name == IgnoreList.encodedUsernames[ix]) { + ignore = true; + break check; + } + } + } + break; + } + if (!ignore && Player.inTutorialIsland == 0) { + Chat.recentMessages[Chat.messageCounter] = messageId; + Chat.messageCounter = (Chat.messageCounter + 1) % 100; + JagString message = QuickChatPhraseTypeList.get(chatId).decodeMessage(inboundBuffer); + if (rights == 2) { + Chat.add(chatId, 18, message, null, JagString.concatenate(new JagString[]{Static44.IMG1, Base37.decode37(name).toTitleCase()})); + } else if (rights == 1) { + Chat.add(chatId, 18, message, null, JagString.concatenate(new JagString[]{IMG0, Base37.decode37(name).toTitleCase()})); + } else { + Chat.add(chatId, 18, message, null, Base37.decode37(name).toTitleCase()); + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.SWITCH_WIDGET) { + int source = inboundBuffer.img4(); + int tracknum = inboundBuffer.g2add(); + int target = inboundBuffer.img4(); + setVerifyId(tracknum); + @Pc(3449) ComponentPointer src = (ComponentPointer) InterfaceList.openInterfaces.get(source); + ComponentPointer tgt = (ComponentPointer) InterfaceList.openInterfaces.get(target); + if (tgt != null) { + InterfaceList.closeInterface(src == null || tgt.anInt5878 != src.anInt5878, tgt); + } + if (src != null) { + src.unlink(); + InterfaceList.openInterfaces.put(src, target); + } + @Pc(3490) Component component = InterfaceList.getComponent(source); + if (component != null) { + InterfaceList.redraw(component); + } + component = InterfaceList.getComponent(target); + if (component != null) { + InterfaceList.redraw(component); + InterfaceList.method531(component, true); + } + if (InterfaceList.topLevelInterface != -1) { + InterfaceList.runScripts(1, InterfaceList.topLevelInterface); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.CAM_SHAKE) { + int tracknum = inboundBuffer.g2(); + int cameraId = inboundBuffer.g1(); + int jitter = inboundBuffer.g1(); + int amplitude = inboundBuffer.g1(); + int frequency = inboundBuffer.g1(); + int shake4 = inboundBuffer.g2(); + setVerifyId(tracknum); + Static176.customCameraActive[cameraId] = true; + Camera.cameraJitter[cameraId] = jitter; + Camera.cameraAmplitude[cameraId] = amplitude; + Camera.cameraFrequency[cameraId] = frequency; + anIntArray76[cameraId] = shake4; + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETCOLOUR) { + int id = inboundBuffer.img4(); + int tracknum = inboundBuffer.g2add(); + int color = inboundBuffer.ig2add(); + setVerifyId(tracknum); + DelayedStateChange.setColor(color, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_REBOOT_TIMER) { + Player.rebootTimer = inboundBuffer.g2() * 30; + opcode = -1; + InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; + return true; + } else if (opcode == ServerProt.REFLECTION_CHEAT_CHECK) { + ReflectionCheck.method3654(GameShell.signLink, inboundBuffer, length); + opcode = -1; + return true; + } else if (opcode == ServerProt.CLIENT_SETVARC_SMALL) { + int tracknum = inboundBuffer.ig2(); + int value = inboundBuffer.g1neg(); + int id = inboundBuffer.ig2add(); + setVerifyId(tracknum); + DelayedStateChange.updateVarC(id, value); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_RUNENERGY) { + InterfaceList.redrawActiveInterfaces(); + Player.runEnergy = inboundBuffer.g1(); + InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; + opcode = -1; + return true; + } else if (opcode == ServerProt.GAME_FRAME_UNK) { + if (InterfaceList.topLevelInterface != -1) { + InterfaceList.runScripts(0, InterfaceList.topLevelInterface); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.DELETE_INVENTORY) { + int id = inboundBuffer.ig2(); + Inv.delete(id); + Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = id & 0x7FFF; + opcode = -1; + return true; + } else if (opcode == ServerProt.NPC_ANIM_SPECIFIC) { + int npcId = inboundBuffer.ig2(); + int value = inboundBuffer.g1sub(); + int seqId = inboundBuffer.g2(); + @Pc(3766) Npc npc = NpcList.npcs[npcId]; + if (npc != null) { + animateNpc(value, seqId, npc); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_RUNWEIGHT) { + InterfaceList.redrawActiveInterfaces(); + Player.weight = inboundBuffer.g2b(); + InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_PRIVATE_ECHO) { + long name37 = inboundBuffer.g8(); + JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); + Chat.add(Base37.decode37(name37).toTitleCase(), 6, message); + opcode = -1; + return true; + } else if (opcode == ServerProt.URL_OPEN) { + if (GameShell.fullScreenFrame != null) { + DisplayMode.setWindowMode(false, Preferences.favoriteWorlds, -1, -1); + } + @Pc(3848) byte[] data = new byte[length]; + inboundBuffer.gBytesIsaac(data, length); + JagString url = JagString.decodeString(data, length, 0); + if (GameShell.frame == null && (SignLink.anInt5928 == 3 || !SignLink.osName.startsWith("win") || client.haveIe6)) { + ScriptRunner.openUrl(url, true); + } else { + ScriptRunner.url = url; + Static164.newTab = true; + Static33.openUrlRequest = GameShell.signLink.openUrl(new String(url.method3148(), StandardCharsets.ISO_8859_1)); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.GENERATE_CHAT_HEAD_FROM_BODY) { + int tracknum = inboundBuffer.g2add(); + int id = inboundBuffer.mg4(); + int value1 = inboundBuffer.ig2add(); + int value2 = inboundBuffer.ig2(); + int value3 = inboundBuffer.ig2add(); + setVerifyId(tracknum); + DelayedStateChange.updateComponentModel(value1, 7, id, value2 << 16 | value3); + opcode = -1; + return true; + } else if (opcode == ServerProt.VARBIT_SMALL) { + int value = inboundBuffer.g1add(); + int id = inboundBuffer.ig2(); + VarpDomain.setVarbit(value, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_OPENTOP) { + int type = inboundBuffer.g1(); + int pointer = inboundBuffer.mg4(); + int tracknum = inboundBuffer.g2add(); + int component = inboundBuffer.g2(); + setVerifyId(tracknum); + ComponentPointer ptr = (ComponentPointer) InterfaceList.openInterfaces.get(pointer); + if (ptr != null) { + InterfaceList.closeInterface(ptr.anInt5878 != component, ptr); + } + Static44.method1148(component, pointer, type); + opcode = -1; + return true; + } else if (opcode == ServerProt.RESET_ANIMS) { + for (int i = 0; i < PlayerList.players.length; i++) { + if (PlayerList.players[i] != null) { + PlayerList.players[i].seqId = -1; + } + } + for (int i = 0; i < NpcList.npcs.length; i++) { + if (NpcList.npcs[i] != null) { + NpcList.npcs[i].seqId = -1; + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.HINT_ARROW) { + int flags = inboundBuffer.g1(); + @Pc(4084) MapMarker mapMarker = new MapMarker(); + int slot = flags >> 6; + mapMarker.type = flags & 0x3F; + mapMarker.anInt4048 = inboundBuffer.g1(); + if (mapMarker.anInt4048 >= 0 && mapMarker.anInt4048 < Sprites.headhints.length) { + if (mapMarker.type == 1 || mapMarker.type == 10) { + mapMarker.actorTargetId = inboundBuffer.g2(); + inboundBuffer.offset += 3; + } else if (mapMarker.type >= 2 && mapMarker.type <= 6) { + if (mapMarker.type == 2) { + mapMarker.anInt4045 = 64; + mapMarker.anInt4047 = 64; + } + if (mapMarker.type == 3) { + mapMarker.anInt4045 = 0; + mapMarker.anInt4047 = 64; + } + if (mapMarker.type == 4) { + mapMarker.anInt4045 = 128; + mapMarker.anInt4047 = 64; + } + if (mapMarker.type == 5) { + mapMarker.anInt4045 = 64; + mapMarker.anInt4047 = 0; + } + if (mapMarker.type == 6) { + mapMarker.anInt4045 = 64; + mapMarker.anInt4047 = 128; + } + mapMarker.type = 2; + mapMarker.targetX = inboundBuffer.g2(); + mapMarker.anInt4046 = inboundBuffer.g2(); + mapMarker.anInt4050 = inboundBuffer.g1(); + } + mapMarker.playerModelId = inboundBuffer.g2(); + if (mapMarker.playerModelId == 65535) { + mapMarker.playerModelId = -1; + } + MiniMap.hintMapMarkers[slot] = mapMarker; + } + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_IGNORELIST) { + 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]); + } + FriendsList.transmitAt = InterfaceList.transmitTimer; + opcode = -1; + return true; + } else if (opcode == ServerProt.NPC_INFO) { + readNpcPacket(); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETPOSITION) { + int tracknum = inboundBuffer.g2add(); + int ptr = inboundBuffer.ig4(); + int x = inboundBuffer.g2b(); + int y = inboundBuffer.g2badd(); + setVerifyId(tracknum); + DelayedStateChange.method4666(x, ptr, y); + opcode = -1; + return true; + } else if (opcode == ServerProt.LOC_ANIM_SPECIFIC) { + int slot = inboundBuffer.g1sub(); + int type = slot >> 2; + int rotation = slot & 0x3; + int type2 = Loc.LAYERS[type]; + int seqId = inboundBuffer.g2(); + int pos = inboundBuffer.g4(); + if (seqId == 65535) { + seqId = -1; + } + int z = pos & 0x3FFF; + int x = pos >> 14 & 0x3FFF; + x -= Camera.originX; + z -= Camera.originZ; + int plane = pos >> 28 & 0x3; + SceneGraph.method1881(plane, rotation, type, z, type2, x, seqId); + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_PRIVATE) { + long name37 = inboundBuffer.g8(); + int top = inboundBuffer.g2(); + int bot = inboundBuffer.g3(); + int rights = inboundBuffer.g1(); + @Pc(4425) boolean ignored = false; + @Pc(4431) long messageId = bot + ((long) top << 32); + int ix = 0; + check: + while (true) { + if (ix >= 100) { + if (rights <= 1) { + if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { + ignored = true; + } else { + for (ix = 0; ix < IgnoreList.size; ix++) { + if (name37 == IgnoreList.encodedUsernames[ix]) { + ignored = true; + break check; + } + } + } + } + break; + } + if (messageId == Chat.recentMessages[ix]) { + ignored = true; + break; + } + ix++; + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.recentMessages[Chat.messageCounter] = messageId; + Chat.messageCounter = (Chat.messageCounter + 1) % 100; + @Pc(4518) JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); + if (rights == 2 || rights == 3) { + Chat.add(JagString.concatenate(new JagString[]{Static44.IMG1, Base37.decode37(name37).toTitleCase()}), 7, message); + } else if (rights == 1) { + Chat.add(JagString.concatenate(new JagString[]{IMG0, Base37.decode37(name37).toTitleCase()}), 7, message); + } else { + Chat.add(Base37.decode37(name37).toTitleCase(), 3, message); + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.MESSAGE_CLANCHANNEL) { + long name37 = inboundBuffer.g8(); + inboundBuffer.g1b(); + long chat37 = inboundBuffer.g8(); + int top = inboundBuffer.g2(); + int bot = inboundBuffer.g3(); + @Pc(4626) long local4626 = ((long) top << 32) + bot; + int rights = inboundBuffer.g1(); + @Pc(4632) boolean ignored = false; + @Pc(4634) int ix = 0; + check: + while (true) { + if (ix >= 100) { + if (rights <= 1) { + if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { + ignored = true; + } else { + for (ix = 0; ix < IgnoreList.size; ix++) { + if (IgnoreList.encodedUsernames[ix] == name37) { + ignored = true; + break check; + } + } + } + } + break; + } + if (Chat.recentMessages[ix] == local4626) { + ignored = true; + break; + } + ix++; + } + if (!ignored && Player.inTutorialIsland == 0) { + Chat.recentMessages[Chat.messageCounter] = local4626; + Chat.messageCounter = (Chat.messageCounter + 1) % 100; + JagString message = Font.escape(formatChatMessage(inboundBuffer).encodeMessage()); + if (rights == 2 || rights == 3) { + Chat.method1598(message, JagString.concatenate(new JagString[]{Static44.IMG1, Base37.decode37(name37).toTitleCase()}), Base37.decode37(chat37).toTitleCase()); + } else if (rights == 1) { + Chat.method1598(message, JagString.concatenate(new JagString[]{IMG0, Base37.decode37(name37).toTitleCase()}), Base37.decode37(chat37).toTitleCase()); + } else { + Chat.method1598(message, Base37.decode37(name37).toTitleCase(), Base37.decode37(chat37).toTitleCase()); + } + } + opcode = -1; + return true; + } else if (opcode == ServerProt.DYNAMIC_SCENE_GRAPH) { + readRebuildPacket(true); + opcode = -1; + return true; + } else if (opcode == ServerProt.SYNTH_SOUND) { + int trackId = inboundBuffer.g2(); + int volume = inboundBuffer.g1(); + if (trackId == 65535) { + trackId = -1; + } + int delay = inboundBuffer.g2(); + SoundPlayer.play(volume, trackId, delay); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETPLAYERHEAD) { + int tracknum = inboundBuffer.ig2add(); + int id = inboundBuffer.img4(); + setVerifyId(tracknum); + int set = 0; + if (PlayerList.self.appearance != null) { + set = PlayerList.self.appearance.method1952(); + } + DelayedStateChange.updateComponentModel(-1, 3, id, set); + opcode = -1; + return true; + } else if (opcode == ServerProt.IF_SETTEXT1) { + int id = inboundBuffer.mg4(); + JagString text = inboundBuffer.gjstr(); + int tracknum = inboundBuffer.g2add(); + setVerifyId(tracknum); + DelayedStateChange.method3617(text, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.VARBIT_LARGE) { + int value = inboundBuffer.ig4(); + int id = inboundBuffer.ig2add(); + VarpDomain.setVarbit(value, id); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_INV_PARTIAL) { + int componentHash = inboundBuffer.g4(); + int containerId = inboundBuffer.g2(); + if (componentHash < -70000) { + containerId += 32768; + } + Component component; + if (componentHash < 0) { + component = null; + } else { + component = InterfaceList.getComponent(componentHash); + } + while (inboundBuffer.offset < length) { + int slot = inboundBuffer.gsmarts(); + int amount = inboundBuffer.g2(); + int id = 0; + if (amount != 0) { + id = inboundBuffer.g1(); + if (id == 255) { + id = inboundBuffer.g4(); + } + } + if (component != null && slot >= 0 && component.objTypes.length > slot) { + component.objTypes[slot] = amount; + component.objCounts[slot] = id; + } + Inv.updateContainer(amount - 1, slot, id, containerId); + } + if (component != null) { + InterfaceList.redraw(component); + } + InterfaceList.redrawActiveInterfaces(); + Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = containerId & 0x7FFF; + opcode = -1; + return true; + } else if (opcode == ServerProt.CAM_RESET) { + int tracknum = inboundBuffer.g2(); + setVerifyId(tracknum); + Camera.resetCameraEffects(); + opcode = -1; + return true; + } else if (opcode == ServerProt.LOGOUT) { + LoginManager.processLogout(); + opcode = -1; + return false; + } else if (opcode == ServerProt.GRAND_EXCHANGE_OFFERS) { + int offer = inboundBuffer.g1(); + if (inboundBuffer.g1() == 0) { + StockMarketManager.offers[offer] = new StockMarketOffer(); + } else { + inboundBuffer.offset--; + StockMarketManager.offers[offer] = new StockMarketOffer(inboundBuffer); + } + opcode = -1; + StockMarketManager.transmitAt = InterfaceList.transmitTimer; + return true; + } else if (opcode == ServerProt.IF_SETNPCHEAD) { + int npcId = inboundBuffer.g2add(); + int id = inboundBuffer.ig4(); + if (npcId == 65535) { + npcId = -1; + } + int tracknum = inboundBuffer.ig2(); + setVerifyId(tracknum); + DelayedStateChange.updateComponentModel(-1, 2, id, npcId); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_SCENE_GRAPH) { + readRebuildPacket(false); + opcode = -1; + return true; + } else if (opcode == ServerProt.SET_INTERFACE_SETTINGS) { + int tracknum = inboundBuffer.ig2(); + int end = inboundBuffer.ig2(); + if (end == 65535) { + end = -1; + } + int pointer = inboundBuffer.g4(); + int start = inboundBuffer.g2add(); + int accessMask = inboundBuffer.img4(); + if (start == 65535) { + start = -1; + } + setVerifyId(tracknum); + for (int local277 = start; local277 <= end; local277++) { + long local904 = ((long) pointer << 32) + ((long) local277); + ServerActiveProperties properties = (ServerActiveProperties) InterfaceList.properties.get(local904); + ServerActiveProperties target; + if (properties != null) { + target = new ServerActiveProperties(accessMask, properties.anInt540); + properties.unlink(); + } else if (local277 == -1) { + target = new ServerActiveProperties(accessMask, InterfaceList.getComponent(pointer).properties.anInt540); + } else { + target = new ServerActiveProperties(accessMask, -1); + } + InterfaceList.properties.put(target, local904); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.FRIENDLIST_LOADED) { + FriendsList.state = inboundBuffer.g1(); + FriendsList.transmitAt = InterfaceList.transmitTimer; + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_CLAN) { + long name37 = inboundBuffer.g8(); + int worldId = inboundBuffer.g2(); + @Pc(5325) byte rights = inboundBuffer.g1b(); + boolean ignored = (Long.MIN_VALUE & name37) != 0L; + if (ignored) { + if (ClanChat.size == 0) { + opcode = -1; + return true; + } + name37 &= Long.MAX_VALUE; + int i; + for (i = 0; ClanChat.size > i && (name37 != ClanChat.members[i].key || worldId != ClanChat.members[i].world); i++) { + } + if (i < ClanChat.size) { + while (ClanChat.size - 1 > i) { + ClanChat.members[i] = ClanChat.members[i + 1]; + i++; + } + ClanChat.size--; + ClanChat.members[ClanChat.size] = null; + } + } else { + JagString worldName = inboundBuffer.gjstr(); + @Pc(5347) ClanMember member = new ClanMember(); + member.key = name37; + member.username = Base37.decode37(member.key); + member.rank = rights; + member.worldName = worldName; + member.world = worldId; + int n; + for (n = ClanChat.size - 1; n >= 0; n--) { + int m = ClanChat.members[n].username.method3139(member.username); + if (m == 0) { + ClanChat.members[n].world = worldId; + ClanChat.members[n].rank = rights; + ClanChat.members[n].worldName = worldName; + if (name37 == Player.name37) { + ClanChat.rank = rights; + } + ClanChat.transmitAt = InterfaceList.transmitTimer; + opcode = -1; + return true; + } + if (m < 0) { + break; + } + } + if (ClanChat.members.length <= ClanChat.size) { + opcode = -1; + return true; + } + for (int i = ClanChat.size - 1; i > n; i--) { + ClanChat.members[i + 1] = ClanChat.members[i]; + } + if (ClanChat.size == 0) { + ClanChat.members = new ClanMember[100]; + } + ClanChat.members[n + 1] = member; + if (Player.name37 == name37) { + ClanChat.rank = rights; + } + ClanChat.size++; + } + opcode = -1; + ClanChat.transmitAt = InterfaceList.transmitTimer; + return true; + } else if (opcode == ServerProt.IF_SETOBJECT) { + int slot = inboundBuffer.g4(); + int id = inboundBuffer.mg4(); + int itemId = inboundBuffer.ig2add(); + if (itemId == 65535) { + itemId = -1; + } + int tracknum = inboundBuffer.ig2(); + setVerifyId(tracknum); + @Pc(5603) Component component = InterfaceList.getComponent(id); + @Pc(5615) ObjType objType; + if (component.if3) { + DelayedStateChange.method3707(id, slot, itemId); + objType = ObjTypeList.get(itemId); + DelayedStateChange.updateView(objType.zoom2d, id, objType.yAngle2D, objType.xAngle2D); + DelayedStateChange.method2745(id, objType.zAngle2D, objType.yOffset2D, objType.xOffset2D); + } else if (itemId == -1) { + component.modelType = 0; + opcode = -1; + return true; + } else { + objType = ObjTypeList.get(itemId); + component.modelXAngle = objType.xAngle2D; + component.modelZoom = objType.zoom2d * 100 / slot; + component.modelType = 4; + component.modelId = itemId; + component.modelYAngle = objType.yAngle2D; + InterfaceList.redraw(component); + } + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_INV_FULL) { + int componentHash = inboundBuffer.g4(); + int containerId = inboundBuffer.g2(); + if (componentHash < -70000) { + containerId += 32768; + } + Component component; + if (componentHash >= 0) { + component = InterfaceList.getComponent(componentHash); + } else { + component = null; + } + if (component != null) { + for (int i = 0; i < component.objTypes.length; i++) { + component.objTypes[i] = 0; + component.objCounts[i] = 0; + } + } + Inv.method475(containerId); + int total = inboundBuffer.g2(); + for (int slot = 0; slot < total; slot++) { + int amount = inboundBuffer.g1sub(); + if (amount == 255) { + amount = inboundBuffer.g4(); + } + int itemId = inboundBuffer.g2(); + if (component != null && slot < component.objTypes.length) { + component.objTypes[slot] = itemId; + component.objCounts[slot] = amount; + } + Inv.updateContainer(itemId - 1, slot, amount, containerId); + } + if (component != null) { + InterfaceList.redraw(component); + } + InterfaceList.redrawActiveInterfaces(); + Inv.updatedInventories[Inv.updatedInventoriesWriterIndex++ & 0x1F] = containerId & 0x7FFF; + opcode = -1; + return true; + } else if (opcode == ServerProt.SET_SETTINGS_STRING) { + method3954(inboundBuffer.gjstr()); + opcode = -1; + return true; + } else if (opcode == ServerProt.UPDATE_CURRENT_LOCATION) { + SceneGraph.currentChunkX = inboundBuffer.g1neg(); + SceneGraph.currentChunkZ = inboundBuffer.g1(); + opcode = -1; + return true; + } else if (opcode == ServerProt.MIDI_SONG) { + int id = inboundBuffer.ig2add(); + if (id == 65535) { + id = -1; + } + MusicPlayer.playSong(id); + opcode = -1; + return true; + } else if (opcode == ServerProt.MIDI_JINGLE) { + int volume = inboundBuffer.ig3(); + int id = inboundBuffer.ig2(); + if (id == 65535) { + id = -1; + } + MusicPlayer.playJingle(volume, id); + opcode = -1; + return true; + } else { + TracingException.report("T1 - " + opcode + "," + opcode3 + "," + opcode4 + " - " + length, null); + LoginManager.processLogout(); + return true; + } + } - @OriginalMember(owner = "client!an", name = "h", descriptor = "(I)Z") - public static boolean readPacket() { - try { - return readPacketInternal(); - } catch (@Pc(14) IOException ex) { + @OriginalMember(owner = "client!an", name = "h", descriptor = "(I)Z") + public static boolean readPacket() { + try { + return readPacketInternal(); + } catch (@Pc(14) IOException ex) { ex.printStackTrace(); - method3279(); - return true; - } catch (@Pc(19) Exception ex) { + method3279(); + return true; + } catch (@Pc(19) Exception ex) { ex.printStackTrace(); - @Pc(61) String local61 = "T2 - " + opcode + "," + opcode3 + "," + opcode4 + " - " + length + "," + (Camera.originX + PlayerList.self.movementQueueX[0]) + "," + (PlayerList.self.movementQueueZ[0] + Camera.originZ) + " - "; - for (@Pc(63) int local63 = 0; local63 < length && local63 < 50; local63++) { - local61 = local61 + inboundBuffer.data[local63] + ","; - } - TracingException.report(local61, ex); - LoginManager.processLogout(); - return true; - } - } + @Pc(61) String local61 = "T2 - " + opcode + "," + opcode3 + "," + opcode4 + " - " + length + "," + (Camera.originX + PlayerList.self.movementQueueX[0]) + "," + (PlayerList.self.movementQueueZ[0] + Camera.originZ) + " - "; + for (@Pc(63) int local63 = 0; local63 < length && local63 < 50; local63++) { + local61 = local61 + inboundBuffer.data[local63] + ","; + } + TracingException.report(local61, ex); + LoginManager.processLogout(); + return true; + } + } - @OriginalMember(owner = "client!gg", name = "a", descriptor = "(Z)V") - public static void method1756() { - // todo: consolidate/rename static classes - if (anInt5775 > 0) { - anInt5775--; - } - if (Player.rebootTimer > 1) { - Player.rebootTimer--; - InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; - } - if (LoginManager.aBoolean247) { - LoginManager.aBoolean247 = false; - method3279(); - return; - } - for (@Pc(34) int i = 0; i < 100 && readPacket(); i++) { - } - if (client.gameState != 30) { - return; - } - ReflectionCheck.loop(outboundBuffer); - @Pc(60) Object mouseRecorder = MouseRecorder.instance.lock; - @Pc(86) int offset; - @Pc(79) int type; - @Pc(88) int i; - @Pc(106) int y; - @Pc(111) int x; - @Pc(182) int dx; - @Pc(189) int dy; - synchronized (mouseRecorder) { - if (!MouseRecorder.enabled) { - MouseRecorder.instance.samples = 0; - } else if (Mouse.clickButton != 0 || MouseRecorder.instance.samples >= 40) { - outboundBuffer.p1isaac(123); - type = 0; - outboundBuffer.p1(0); - offset = outboundBuffer.offset; - for (i = 0; MouseRecorder.instance.samples > i && outboundBuffer.offset - offset < 240; i++) { - type++; - y = MouseRecorder.instance.y[i]; - x = MouseRecorder.instance.x[i]; - if (y < 0) { - y = 0; - } else if (y > 65534) { - y = 65534; - } - if (x < 0) { - x = 0; - } else if (x > 65534) { - x = 65534; - } - @Pc(142) boolean outsideWindow = false; - if (MouseRecorder.instance.y[i] == -1 && MouseRecorder.instance.x[i] == -1) { - outsideWindow = true; - y = -1; - x = -1; - } - if (MouseRecorder.mouseRecorderPrevX != x || y != MouseRecorder.mouseRecorderPrevY) { - dx = x - MouseRecorder.mouseRecorderPrevX; - MouseRecorder.mouseRecorderPrevX = x; - dy = y - MouseRecorder.mouseRecorderPrevY; - MouseRecorder.mouseRecorderPrevY = y; - if (anInt4762 < 8 && dx >= -32 && dx <= 31 && dy >= -32 && dy <= 31) { - dy += 32; - dx += 32; - outboundBuffer.p2(dy + (anInt4762 << 12) + (dx << 6)); - anInt4762 = 0; - } else if (anInt4762 < 32 && dx >= -128 && dx <= 127 && dy >= -128 && dy <= 127) { - outboundBuffer.p1(anInt4762 + 128); - dy += 128; - dx += 128; - outboundBuffer.p2((dx << 8) + dy); - anInt4762 = 0; - } else if (anInt4762 < 32) { - outboundBuffer.p1(anInt4762 + 192); - if (outsideWindow) { - outboundBuffer.p4(Integer.MIN_VALUE); - } else { - outboundBuffer.p4(x | y << 16); - } - anInt4762 = 0; - } else { - outboundBuffer.p2(anInt4762 + 57344); - if (outsideWindow) { - outboundBuffer.p4(Integer.MIN_VALUE); - } else { - outboundBuffer.p4(x | y << 16); - } - anInt4762 = 0; - } - } else if (anInt4762 < 2047) { - anInt4762++; - } - } - outboundBuffer.psize1(outboundBuffer.offset - offset); - if (MouseRecorder.instance.samples > type) { - MouseRecorder.instance.samples -= type; - for (i = 0; i < MouseRecorder.instance.samples; i++) { - MouseRecorder.instance.x[i] = MouseRecorder.instance.x[type + i]; - MouseRecorder.instance.y[i] = MouseRecorder.instance.y[type + i]; - } - } else { - MouseRecorder.instance.samples = 0; - } - } - } - if (Mouse.clickButton != 0) { - @Pc(411) long loops = (Mouse.clickTime - Mouse.prevClickTime) / 50L; - type = Mouse.clickY; - if (type < 0) { - type = 0; - } else if (type > 65535) { - type = 65535; - } - if (loops > 32767L) { - loops = 32767L; - } - i = Mouse.clickX; - Mouse.prevClickTime = Mouse.clickTime; - @Pc(437) byte button = 0; - if (i < 0) { - i = 0; - } else if (i > 65535) { - i = 65535; - } - x = (int) loops; - if (Mouse.clickButton == 2) { - button = 1; - } - outboundBuffer.p1isaac(75); - outboundBuffer.ip2add(button << 15 | x); - outboundBuffer.mp4(i | type << 16); - } - if (anInt551 > 0) { - anInt551--; - } - if (Preferences.aBoolean63) { - for (i = 0; i < InterfaceList.keyQueueSize; i++) { - offset = InterfaceList.keyCodes[i]; - if (offset == 98 || offset == 99 || offset == 96 || offset == 97) { - aBoolean228 = true; - break; - } - } - } else if (Keyboard.pressedKeys[Keyboard.KEY_LEFT] || Keyboard.pressedKeys[Keyboard.KEY_RIGHT] || Keyboard.pressedKeys[Keyboard.KEY_UP] || Keyboard.pressedKeys[Keyboard.KEY_DOWN]) { - aBoolean228 = true; - } - if (aBoolean228 && anInt551 <= 0) { - anInt551 = 20; - aBoolean228 = false; - outboundBuffer.p1isaac(21); - outboundBuffer.p2add((int)Camera.pitchTarget); - outboundBuffer.ip2((int)Camera.yawTarget); - } - if (GameShell.focus && !prevFocus) { - prevFocus = true; - outboundBuffer.p1isaac(22); - outboundBuffer.p1(1); - } - if (!GameShell.focus && prevFocus) { - prevFocus = false; - outboundBuffer.p1isaac(22); - outboundBuffer.p1(0); - } - if (!Preferences.sentToServer) { - outboundBuffer.p1isaac(98); - outboundBuffer.p4(Preferences.toInt()); - Preferences.sentToServer = true; - } - SceneGraph.method846(); - if (client.gameState != 30) { - return; - } - ChangeLocRequest.loop(); - AttachLocRequest.loop(); - SoundPlayer.loop(); - LoginManager.anInt1862++; - if (LoginManager.anInt1862 > 750) { - method3279(); - return; - } - PlayerList.method1444(); - NpcList.method2274(); - OverheadChat.loop(); - if (WorldMap.component != null) { - WorldMap.method447(); - } - // VarpDomain - for (i = Static38.poll(true); i != -1; i = Static38.poll(false)) { - VarpDomain.refreshMagicVarp(i); - VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; - } - @Pc(782) int modelId; - // DelayedStateChange - for (@Pc(709) DelayedStateChange change = DelayedStateChange.poll(); change != null; change = DelayedStateChange.poll()) { - type = change.getType(); - i = change.getId(); - if (type == 1) { - VarcDomain.varcs[i] = change.intArg1; - VarcDomain.updatedVarcs[VarcDomain.updatedVarcsWriterIndex++ & 0x1F] = i; - } else if (type == 2) { - VarcDomain.varcstrs[i] = change.stringArg; - VarcDomain.updatedVarcstrs[VarcDomain.updatedVarcstrsWriterIndex++ & 0x1F] = i; - } else { - @Pc(773) Component component; - if (type == 3) { - component = InterfaceList.getComponent(i); - if (!change.stringArg.strEquals(component.text)) { - component.text = change.stringArg; - InterfaceList.redraw(component); - } - } else if (type == 4) { - component = InterfaceList.getComponent(i); - x = change.intArg1; - dx = change.intArg2; - modelId = change.intArg3; - if (component.modelType != x || component.modelId != modelId || dx != component.anInt498) { - component.modelId = modelId; - component.anInt498 = dx; - component.modelType = x; - InterfaceList.redraw(component); - } - } else if (type == 5) { - component = InterfaceList.getComponent(i); - if (component.modelSeqId != change.intArg1 || change.intArg1 == -1) { - component.anInt496 = 1; - component.anInt500 = 0; - component.modelSeqId = change.intArg1; - component.anInt510 = 0; - InterfaceList.redraw(component); - } - } else if (type == 6) { - y = change.intArg1; - x = y >> 10 & 0x1F; - dx = y & 0x1F; - modelId = y >> 5 & 0x1F; - @Pc(1189) Component local1189 = InterfaceList.getComponent(i); - dy = (dx << 3) + (modelId << 11) + (x << 19); - if (dy != local1189.color) { - local1189.color = dy; - InterfaceList.redraw(local1189); - } - } else if (type == 7) { - component = InterfaceList.getComponent(i); - @Pc(1145) boolean hidden = change.intArg1 == 1; - if (component != null && hidden != component.hidden) { - component.hidden = hidden; - InterfaceList.redraw(component); - } - } else if (type == 8) { - component = InterfaceList.getComponent(i); - if (change.intArg1 != component.modelXAngle || component.modelYAngle != change.intArg3 || change.intArg2 != component.modelZoom) { - component.modelXAngle = change.intArg1; - component.modelZoom = change.intArg2; - component.modelYAngle = change.intArg3; - if (component.objId != -1) { - if (component.anInt451 > 0) { - component.modelZoom = component.modelZoom * 32 / component.anInt451; - } else if (component.baseWidth > 0) { - component.modelZoom = component.modelZoom * 32 / component.baseWidth; - } - } - InterfaceList.redraw(component); - } - } else if (type == 9) { - component = InterfaceList.getComponent(i); - if (change.intArg1 != component.objId || component.objCount != change.intArg3) { - component.objId = change.intArg1; - component.objCount = change.intArg3; - InterfaceList.redraw(component); - } - } else if (type == 10) { - component = InterfaceList.getComponent(i); - if (component.modelXOffset != change.intArg1 || change.intArg3 != component.modelZOffset || component.modelYOffset != change.intArg2) { - component.modelZOffset = change.intArg3; - component.modelYOffset = change.intArg2; - component.modelXOffset = change.intArg1; - InterfaceList.redraw(component); - } - } else if (type == 11) { - component = InterfaceList.getComponent(i); - component.x = component.baseX = change.intArg1; - component.yMode = 0; - component.xMode = 0; - component.y = component.baseY = change.intArg3; - InterfaceList.redraw(component); - } else if (type == 12) { - component = InterfaceList.getComponent(i); - int scrollY = change.intArg1; - if (component != null && component.type == 0) { - if (scrollY > component.scrollMaxV - component.height) { - scrollY = component.scrollMaxV - component.height; - } - if (scrollY < 0) { - scrollY = 0; - } - if (scrollY != component.scrollY) { - component.scrollY = scrollY; - InterfaceList.redraw(component); - } - } - } else if (type == 13) { - component = InterfaceList.getComponent(i); - component.modelRotationSpeed = change.intArg1; - } - } - } - if (Cross.type != 0) { - Cross.milliseconds += 20; - if (Cross.milliseconds >= 400) { - Cross.type = 0; - } - } - anInt4247++; - if (MiniMenu.pressedInventoryComponent != null) { - MiniMenu.anInt2043++; - if (MiniMenu.anInt2043 >= 15) { - InterfaceList.redraw(MiniMenu.pressedInventoryComponent); - MiniMenu.pressedInventoryComponent = null; - } - } + @OriginalMember(owner = "client!gg", name = "a", descriptor = "(Z)V") + public static void method1756() { + // todo: consolidate/rename static classes + if (anInt5775 > 0) { + anInt5775--; + } + if (Player.rebootTimer > 1) { + Player.rebootTimer--; + InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; + } + if (LoginManager.aBoolean247) { + LoginManager.aBoolean247 = false; + method3279(); + return; + } + for (@Pc(34) int i = 0; i < 100 && readPacket(); i++) { + } + if (client.gameState != 30) { + return; + } + ReflectionCheck.loop(outboundBuffer); + @Pc(60) Object mouseRecorder = MouseRecorder.instance.lock; + @Pc(86) int offset; + @Pc(79) int type; + @Pc(88) int i; + @Pc(106) int y; + @Pc(111) int x; + @Pc(182) int dx; + @Pc(189) int dy; + synchronized (mouseRecorder) { + if (!MouseRecorder.enabled) { + MouseRecorder.instance.samples = 0; + } else if (Mouse.clickButton != 0 || MouseRecorder.instance.samples >= 40) { + outboundBuffer.p1isaac(123); + type = 0; + outboundBuffer.p1(0); + offset = outboundBuffer.offset; + for (i = 0; MouseRecorder.instance.samples > i && outboundBuffer.offset - offset < 240; i++) { + type++; + y = MouseRecorder.instance.y[i]; + x = MouseRecorder.instance.x[i]; + if (y < 0) { + y = 0; + } else if (y > 65534) { + y = 65534; + } + if (x < 0) { + x = 0; + } else if (x > 65534) { + x = 65534; + } + @Pc(142) boolean outsideWindow = false; + if (MouseRecorder.instance.y[i] == -1 && MouseRecorder.instance.x[i] == -1) { + outsideWindow = true; + y = -1; + x = -1; + } + if (MouseRecorder.mouseRecorderPrevX != x || y != MouseRecorder.mouseRecorderPrevY) { + dx = x - MouseRecorder.mouseRecorderPrevX; + MouseRecorder.mouseRecorderPrevX = x; + dy = y - MouseRecorder.mouseRecorderPrevY; + MouseRecorder.mouseRecorderPrevY = y; + if (anInt4762 < 8 && dx >= -32 && dx <= 31 && dy >= -32 && dy <= 31) { + dy += 32; + dx += 32; + outboundBuffer.p2(dy + (anInt4762 << 12) + (dx << 6)); + anInt4762 = 0; + } else if (anInt4762 < 32 && dx >= -128 && dx <= 127 && dy >= -128 && dy <= 127) { + outboundBuffer.p1(anInt4762 + 128); + dy += 128; + dx += 128; + outboundBuffer.p2((dx << 8) + dy); + anInt4762 = 0; + } else if (anInt4762 < 32) { + outboundBuffer.p1(anInt4762 + 192); + if (outsideWindow) { + outboundBuffer.p4(Integer.MIN_VALUE); + } else { + outboundBuffer.p4(x | y << 16); + } + anInt4762 = 0; + } else { + outboundBuffer.p2(anInt4762 + 57344); + if (outsideWindow) { + outboundBuffer.p4(Integer.MIN_VALUE); + } else { + outboundBuffer.p4(x | y << 16); + } + anInt4762 = 0; + } + } else if (anInt4762 < 2047) { + anInt4762++; + } + } + outboundBuffer.psize1(outboundBuffer.offset - offset); + if (MouseRecorder.instance.samples > type) { + MouseRecorder.instance.samples -= type; + for (i = 0; i < MouseRecorder.instance.samples; i++) { + MouseRecorder.instance.x[i] = MouseRecorder.instance.x[type + i]; + MouseRecorder.instance.y[i] = MouseRecorder.instance.y[type + i]; + } + } else { + MouseRecorder.instance.samples = 0; + } + } + } + if (Mouse.clickButton != 0) { + @Pc(411) long loops = (Mouse.clickTime - Mouse.prevClickTime) / 50L; + type = Mouse.clickY; + if (type < 0) { + type = 0; + } else if (type > 65535) { + type = 65535; + } + if (loops > 32767L) { + loops = 32767L; + } + i = Mouse.clickX; + Mouse.prevClickTime = Mouse.clickTime; + @Pc(437) byte button = 0; + if (i < 0) { + i = 0; + } else if (i > 65535) { + i = 65535; + } + x = (int) loops; + if (Mouse.clickButton == 2) { + button = 1; + } + outboundBuffer.p1isaac(75); + outboundBuffer.ip2add(button << 15 | x); + outboundBuffer.mp4(i | type << 16); + } + if (anInt551 > 0) { + anInt551--; + } + if (Preferences.aBoolean63) { + for (i = 0; i < InterfaceList.keyQueueSize; i++) { + offset = InterfaceList.keyCodes[i]; + if (offset == 98 || offset == 99 || offset == 96 || offset == 97) { + aBoolean228 = true; + break; + } + } + } else if (Keyboard.pressedKeys[Keyboard.KEY_LEFT] || Keyboard.pressedKeys[Keyboard.KEY_RIGHT] || Keyboard.pressedKeys[Keyboard.KEY_UP] || Keyboard.pressedKeys[Keyboard.KEY_DOWN]) { + aBoolean228 = true; + } + if (aBoolean228 && anInt551 <= 0) { + anInt551 = 20; + aBoolean228 = false; + outboundBuffer.p1isaac(21); + outboundBuffer.p2add((int) Camera.pitchTarget); + outboundBuffer.ip2((int) Camera.yawTarget); + } + if (GameShell.focus && !prevFocus) { + prevFocus = true; + outboundBuffer.p1isaac(22); + outboundBuffer.p1(1); + } + if (!GameShell.focus && prevFocus) { + prevFocus = false; + outboundBuffer.p1isaac(22); + outboundBuffer.p1(0); + } + if (!Preferences.sentToServer) { + outboundBuffer.p1isaac(98); + outboundBuffer.p4(Preferences.toInt()); + Preferences.sentToServer = true; + } + SceneGraph.method846(); + if (client.gameState != 30) { + return; + } + ChangeLocRequest.loop(); + AttachLocRequest.loop(); + SoundPlayer.loop(); + LoginManager.anInt1862++; + if (LoginManager.anInt1862 > 750) { + method3279(); + return; + } + PlayerList.method1444(); + NpcList.method2274(); + OverheadChat.loop(); + if (WorldMap.component != null) { + WorldMap.method447(); + } + // VarpDomain + for (i = Static38.poll(true); i != -1; i = Static38.poll(false)) { + VarpDomain.refreshMagicVarp(i); + VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; + } + @Pc(782) int modelId; + // DelayedStateChange + for (@Pc(709) DelayedStateChange change = DelayedStateChange.poll(); change != null; change = DelayedStateChange.poll()) { + type = change.getType(); + i = change.getId(); + if (type == 1) { + VarcDomain.varcs[i] = change.intArg1; + VarcDomain.updatedVarcs[VarcDomain.updatedVarcsWriterIndex++ & 0x1F] = i; + } else if (type == 2) { + VarcDomain.varcstrs[i] = change.stringArg; + VarcDomain.updatedVarcstrs[VarcDomain.updatedVarcstrsWriterIndex++ & 0x1F] = i; + } else { + @Pc(773) Component component; + if (type == 3) { + component = InterfaceList.getComponent(i); + if (!change.stringArg.strEquals(component.text)) { + component.text = change.stringArg; + InterfaceList.redraw(component); + } + } else if (type == 4) { + component = InterfaceList.getComponent(i); + x = change.intArg1; + dx = change.intArg2; + modelId = change.intArg3; + if (component.modelType != x || component.modelId != modelId || dx != component.anInt498) { + component.modelId = modelId; + component.anInt498 = dx; + component.modelType = x; + InterfaceList.redraw(component); + } + } else if (type == 5) { + component = InterfaceList.getComponent(i); + if (component.modelSeqId != change.intArg1 || change.intArg1 == -1) { + component.anInt496 = 1; + component.anInt500 = 0; + component.modelSeqId = change.intArg1; + component.anInt510 = 0; + InterfaceList.redraw(component); + } + } else if (type == 6) { + y = change.intArg1; + x = y >> 10 & 0x1F; + dx = y & 0x1F; + modelId = y >> 5 & 0x1F; + @Pc(1189) Component local1189 = InterfaceList.getComponent(i); + dy = (dx << 3) + (modelId << 11) + (x << 19); + if (dy != local1189.color) { + local1189.color = dy; + InterfaceList.redraw(local1189); + } + } else if (type == 7) { + component = InterfaceList.getComponent(i); + @Pc(1145) boolean hidden = change.intArg1 == 1; + if (component != null && hidden != component.hidden) { + component.hidden = hidden; + InterfaceList.redraw(component); + } + } else if (type == 8) { + component = InterfaceList.getComponent(i); + if (change.intArg1 != component.modelXAngle || component.modelYAngle != change.intArg3 || change.intArg2 != component.modelZoom) { + component.modelXAngle = change.intArg1; + component.modelZoom = change.intArg2; + component.modelYAngle = change.intArg3; + if (component.objId != -1) { + if (component.anInt451 > 0) { + component.modelZoom = component.modelZoom * 32 / component.anInt451; + } else if (component.baseWidth > 0) { + component.modelZoom = component.modelZoom * 32 / component.baseWidth; + } + } + InterfaceList.redraw(component); + } + } else if (type == 9) { + component = InterfaceList.getComponent(i); + if (change.intArg1 != component.objId || component.objCount != change.intArg3) { + component.objId = change.intArg1; + component.objCount = change.intArg3; + InterfaceList.redraw(component); + } + } else if (type == 10) { + component = InterfaceList.getComponent(i); + if (component.modelXOffset != change.intArg1 || change.intArg3 != component.modelZOffset || component.modelYOffset != change.intArg2) { + component.modelZOffset = change.intArg3; + component.modelYOffset = change.intArg2; + component.modelXOffset = change.intArg1; + InterfaceList.redraw(component); + } + } else if (type == 11) { + component = InterfaceList.getComponent(i); + component.x = component.baseX = change.intArg1; + component.yMode = 0; + component.xMode = 0; + component.y = component.baseY = change.intArg3; + InterfaceList.redraw(component); + } else if (type == 12) { + component = InterfaceList.getComponent(i); + int scrollY = change.intArg1; + if (component != null && component.type == 0) { + if (scrollY > component.scrollMaxV - component.height) { + scrollY = component.scrollMaxV - component.height; + } + if (scrollY < 0) { + scrollY = 0; + } + if (scrollY != component.scrollY) { + component.scrollY = scrollY; + InterfaceList.redraw(component); + } + } + } else if (type == 13) { + component = InterfaceList.getComponent(i); + component.modelRotationSpeed = change.intArg1; + } + } + } + if (Cross.type != 0) { + Cross.milliseconds += 20; + if (Cross.milliseconds >= 400) { + Cross.type = 0; + } + } + anInt4247++; + if (MiniMenu.pressedInventoryComponent != null) { + MiniMenu.anInt2043++; + if (MiniMenu.anInt2043 >= 15) { + InterfaceList.redraw(MiniMenu.pressedInventoryComponent); + MiniMenu.pressedInventoryComponent = null; + } + } - @Pc(1361) Component component; - 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.clickedInventoryComponentCycle++; + @Pc(1361) Component component; + 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.clickedInventoryComponentCycle++; - if (Mouse.pressedButton == 0) { - if (Static123.draggingClickedInventoryObject && InterfaceList.clickedInventoryComponentCycle >= 5) { - if (InterfaceList.clickedInventoryComponent == InterfaceList.mouseOverInventoryInterface && Static4.mouseOverInventoryObjectIndex != MiniMenu.clickedInventoryIndex) { - component = InterfaceList.clickedInventoryComponent; - @Pc(1363) byte inserting = 0; + if (Mouse.pressedButton == 0) { + if (Static123.draggingClickedInventoryObject && InterfaceList.clickedInventoryComponentCycle >= 5) { + if (InterfaceList.clickedInventoryComponent == InterfaceList.mouseOverInventoryInterface && Static4.mouseOverInventoryObjectIndex != MiniMenu.clickedInventoryIndex) { + component = InterfaceList.clickedInventoryComponent; + @Pc(1363) byte inserting = 0; - if (VarpDomain.inserting == 1 && component.clientCode == 206) { - inserting = 1; - } + if (VarpDomain.inserting == 1 && component.clientCode == 206) { + inserting = 1; + } - if (component.objTypes[MiniMenu.clickedInventoryIndex] <= 0) { - inserting = 0; - } + if (component.objTypes[MiniMenu.clickedInventoryIndex] <= 0) { + inserting = 0; + } - if (InterfaceList.getServerActiveProperties(component).isObjReplaceEnabled()) { - int newIndex = Static4.mouseOverInventoryObjectIndex; - int currentIndex = MiniMenu.clickedInventoryIndex; - component.objTypes[currentIndex] = component.objTypes[newIndex]; - component.objCounts[currentIndex] = component.objCounts[newIndex]; - component.objTypes[newIndex] = -1; - component.objCounts[newIndex] = 0; - } else if (inserting == 1) { - int currentIndex = MiniMenu.clickedInventoryIndex; - int newIndex = Static4.mouseOverInventoryObjectIndex; - while (currentIndex != newIndex) { - if (currentIndex > newIndex) { - component.swapObjs(currentIndex - 1, currentIndex); - currentIndex--; - } else { - component.swapObjs(currentIndex + 1, currentIndex); - currentIndex++; - } - } - } else { - component.swapObjs(MiniMenu.clickedInventoryIndex, Static4.mouseOverInventoryObjectIndex); - } - outboundBuffer.p1isaac(231); - outboundBuffer.p2(Static4.mouseOverInventoryObjectIndex); - outboundBuffer.ip4(InterfaceList.clickedInventoryComponent.id); - outboundBuffer.p2add(MiniMenu.clickedInventoryIndex); - outboundBuffer.p1sub(inserting); - } - } else if ((VarpDomain.anInt2952 == 1 || MiniMenu.method4640(MiniMenu.size - 1)) && MiniMenu.size > 2) { - Static226.method3901(); - } else if (MiniMenu.size > 0) { - Static59.method1372(); - } - Mouse.clickButton = 0; - MiniMenu.anInt2043 = 10; - InterfaceList.clickedInventoryComponent = null; - } - } - Static146.aBoolean174 = false; - InterfaceList.aClass13_12 = null; - Static44.aBoolean83 = false; - InterfaceList.keyQueueSize = 0; - component = InterfaceList.aClass13_22; - InterfaceList.aClass13_22 = null; - @Pc(1508) Component local1508 = aClass13_11; - aClass13_11 = null; - while (Keyboard.nextKey() && InterfaceList.keyQueueSize < 128) { - InterfaceList.keyCodes[InterfaceList.keyQueueSize] = Keyboard.keyCode; - InterfaceList.keyChars[InterfaceList.keyQueueSize] = Keyboard.keyChar; - InterfaceList.keyQueueSize++; - } - WorldMap.component = null; - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.method1320(0, 0, 0, GameShell.canvasWidth, InterfaceList.topLevelInterface, 0, GameShell.canvasHeight); - } - InterfaceList.transmitTimer++; - while (true) { - @Pc(1569) Component priorityComponent; - @Pc(1560) Component prioritySource; - @Pc(1555) HookRequest priorityRequest; - do { - priorityRequest = (HookRequest) Static4.highPriorityRequests.removeHead(); - if (priorityRequest == null) { - while (true) { - do { - priorityRequest = (HookRequest) InterfaceList.mediumPriorityRequests.removeHead(); - if (priorityRequest == null) { - while (true) { - do { - priorityRequest = (HookRequest) InterfaceList.lowPriorityRequests.removeHead(); - if (priorityRequest == null) { - if (WorldMap.component == null) { - Static36.anInt3337 = 0; - } - if (Static40.aClass13_14 != null) { - ClientProt.method28(); - } - if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && MouseWheel.wheelRotation != 0) { - y = Player.level - MouseWheel.wheelRotation; - if (y < 0) { - y = 0; - } else if (y > 3) { - y = 3; - } - // Cheat - Cheat.teleport(PlayerList.self.movementQueueX[0] + Camera.originX, PlayerList.self.movementQueueZ[0] + Camera.originZ, y); - } - if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - if (MiniMenu.anInt1742 != -1) { - Cheat.teleport(Camera.originX + MiniMenu.anInt1742, Camera.originZ - -MiniMenu.anInt2954, Player.level); - } - anInt4422 = 0; - MiniMenu.anInt3096 = 0; - } else if (MiniMenu.anInt3096 == 2) { - if (MiniMenu.anInt1742 != -1) { - outboundBuffer.p1isaac(131); - outboundBuffer.mp4(MiniMenu.anInt2512); - outboundBuffer.p2add(Camera.originX + MiniMenu.anInt1742); - outboundBuffer.ip2add(MiniMenu.anInt506); - outboundBuffer.p2add(MiniMenu.anInt2954 + Camera.originZ); - Cross.type = 1; - Cross.milliseconds = 0; - Cross.y = Mouse.clickY; - Cross.x = Mouse.clickX; - } - MiniMenu.anInt3096 = 0; - } else if (anInt4422 == 2) { - if (MiniMenu.anInt1742 != -1) { - outboundBuffer.p1isaac(179); - outboundBuffer.p2(Camera.originZ + MiniMenu.anInt2954); - outboundBuffer.p2(MiniMenu.anInt1742 + Camera.originX); - Cross.milliseconds = 0; - Cross.type = 1; - Cross.x = Mouse.clickX; - Cross.y = Mouse.clickY; - } - anInt4422 = 0; - } else if (MiniMenu.anInt1742 != -1 && MiniMenu.anInt3096 == 0 && anInt4422 == 0) { - @Pc(1871) boolean local1871 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, MiniMenu.anInt1742, 0, 0, 0, MiniMenu.anInt2954, PlayerList.self.movementQueueX[0]); - if (local1871) { - Cross.y = Mouse.clickY; - Cross.milliseconds = 0; - Cross.x = Mouse.clickX; - Cross.type = 1; - } - } - MiniMenu.anInt1742 = -1; - Static7.method843(); - if (InterfaceList.aClass13_22 != component) { - if (component != null) { - InterfaceList.redraw(component); - } - if (InterfaceList.aClass13_22 != null) { - InterfaceList.redraw(InterfaceList.aClass13_22); - } - } - if (local1508 != aClass13_11 && Static191.anInt4504 == anInt5235) { - if (local1508 != null) { - InterfaceList.redraw(local1508); - } - if (aClass13_11 != null) { - InterfaceList.redraw(aClass13_11); - } - } - if (aClass13_11 == null) { - if (anInt5235 > 0) { - anInt5235--; - } - } else if (anInt5235 < Static191.anInt4504) { - anInt5235++; - if (Static191.anInt4504 == anInt5235) { - InterfaceList.redraw(aClass13_11); - } - } - if (Camera.cameraType == 1) { - Camera.method4273(); - } else if (Camera.cameraType == 2) { - Camera.updateLockedCamera(); - } else { - Camera.updateLoginScreenCamera(); - } - for (y = 0; y < 5; y++) { - @Pc(2001) int local2001 = anIntArray76[y]++; - } - y = Mouse.getIdleLoops(); - x = Keyboard.getIdleLoops(); - if (y > 15000 && x > 15000) { - anInt5775 = 250; - Mouse.setIdleLoops(14500); - outboundBuffer.p1isaac(245); - } - if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { - if (Static33.openUrlRequest.result != null) { - ScriptRunner.openUrl(ScriptRunner.url, Static164.newTab); - } - ScriptRunner.url = null; - Static33.openUrlRequest = null; - Static164.newTab = false; - } - Static131.anInt3251++; - MiniMap.anInt2252++; - anInt3486++; - if (anInt3486 > 500) { - anInt3486 = 0; - modelId = (int) (Math.random() * 8.0D); - if ((modelId & 0x4) == 4) { - Camera.anInt5161 += anInt4941; - } - if ((modelId & 0x2) == 2) { - Camera.anInt4774 += anInt659; - } - if ((modelId & 0x1) == 1) { - Camera.anInt3291 += Camera.anInt4229; - } - } - if (MiniMap.anInt2252 > 500) { - MiniMap.anInt2252 = 0; - modelId = (int) (Math.random() * 8.0D); - if ((modelId & 0x1) == 1) { - MiniMap.anInt1814 += MiniMap.anInt5755; - } - if ((modelId & 0x2) == 2) { - MiniMap.anInt4130 += MiniMap.anInt4262; - } - } - if (Camera.anInt3291 < -50) { - Camera.anInt4229 = 2; - } - if (MiniMap.anInt1814 < -60) { - MiniMap.anInt5755 = 2; - } - if (MiniMap.anInt4130 < -20) { - MiniMap.anInt4262 = 1; - } - if (Camera.anInt4774 < -55) { - anInt659 = 2; - } - if (Camera.anInt4774 > 55) { - anInt659 = -2; - } - if (Camera.anInt5161 < -40) { - anInt4941 = 1; - } - if (Camera.anInt3291 > 50) { - Camera.anInt4229 = -2; - } - if (Camera.anInt5161 > 40) { - anInt4941 = -1; - } - if (MiniMap.anInt4130 > 10) { - MiniMap.anInt4262 = -1; - } - if (MiniMap.anInt1814 > 60) { - MiniMap.anInt5755 = -2; - } - if (Static131.anInt3251 > 50) { - outboundBuffer.p1isaac(93); - } - if (verifyIdChanged) { - transmitVerifyId(); - verifyIdChanged = false; - } - try { - if (socket != null && outboundBuffer.offset > 0) { - socket.write(outboundBuffer.data, outboundBuffer.offset); - Static131.anInt3251 = 0; - outboundBuffer.offset = 0; - } - } catch (@Pc(2266) IOException local2266) { - method3279(); - } - return; - } - prioritySource = priorityRequest.source; - if (prioritySource.createdComponentId < 0) { - break; - } - priorityComponent = InterfaceList.getComponent(prioritySource.layer); - } while (priorityComponent == null || priorityComponent.createdComponents == null || prioritySource.createdComponentId >= priorityComponent.createdComponents.length || prioritySource != priorityComponent.createdComponents[prioritySource.createdComponentId]); - ScriptRunner.run(priorityRequest); - } - } - prioritySource = priorityRequest.source; - if (prioritySource.createdComponentId < 0) { - break; - } - priorityComponent = InterfaceList.getComponent(prioritySource.layer); - } while (priorityComponent == null || priorityComponent.createdComponents == null || priorityComponent.createdComponents.length <= prioritySource.createdComponentId || priorityComponent.createdComponents[prioritySource.createdComponentId] != prioritySource); - ScriptRunner.run(priorityRequest); - } - } - prioritySource = priorityRequest.source; - if (prioritySource.createdComponentId < 0) { - break; - } - priorityComponent = InterfaceList.getComponent(prioritySource.layer); - } while (priorityComponent == null || priorityComponent.createdComponents == null || prioritySource.createdComponentId >= priorityComponent.createdComponents.length || priorityComponent.createdComponents[prioritySource.createdComponentId] != prioritySource); - ScriptRunner.run(priorityRequest); - } - } + if (InterfaceList.getServerActiveProperties(component).isObjReplaceEnabled()) { + int newIndex = Static4.mouseOverInventoryObjectIndex; + int currentIndex = MiniMenu.clickedInventoryIndex; + component.objTypes[currentIndex] = component.objTypes[newIndex]; + component.objCounts[currentIndex] = component.objCounts[newIndex]; + component.objTypes[newIndex] = -1; + component.objCounts[newIndex] = 0; + } else if (inserting == 1) { + int currentIndex = MiniMenu.clickedInventoryIndex; + int newIndex = Static4.mouseOverInventoryObjectIndex; + while (currentIndex != newIndex) { + if (currentIndex > newIndex) { + component.swapObjs(currentIndex - 1, currentIndex); + currentIndex--; + } else { + component.swapObjs(currentIndex + 1, currentIndex); + currentIndex++; + } + } + } else { + component.swapObjs(MiniMenu.clickedInventoryIndex, Static4.mouseOverInventoryObjectIndex); + } + outboundBuffer.p1isaac(231); + outboundBuffer.p2(Static4.mouseOverInventoryObjectIndex); + outboundBuffer.ip4(InterfaceList.clickedInventoryComponent.id); + outboundBuffer.p2add(MiniMenu.clickedInventoryIndex); + outboundBuffer.p1sub(inserting); + } + } else if ((VarpDomain.anInt2952 == 1 || MiniMenu.method4640(MiniMenu.size - 1)) && MiniMenu.size > 2) { + Static226.method3901(); + } else if (MiniMenu.size > 0) { + Static59.method1372(); + } + Mouse.clickButton = 0; + MiniMenu.anInt2043 = 10; + InterfaceList.clickedInventoryComponent = null; + } + } + Static146.aBoolean174 = false; + InterfaceList.aClass13_12 = null; + Static44.aBoolean83 = false; + InterfaceList.keyQueueSize = 0; + component = InterfaceList.aClass13_22; + InterfaceList.aClass13_22 = null; + @Pc(1508) Component local1508 = aClass13_11; + aClass13_11 = null; + while (Keyboard.nextKey() && InterfaceList.keyQueueSize < 128) { + InterfaceList.keyCodes[InterfaceList.keyQueueSize] = Keyboard.keyCode; + InterfaceList.keyChars[InterfaceList.keyQueueSize] = Keyboard.keyChar; + InterfaceList.keyQueueSize++; + } + WorldMap.component = null; + if (InterfaceList.topLevelInterface != -1) { + InterfaceList.method1320(0, 0, 0, GameShell.canvasWidth, InterfaceList.topLevelInterface, 0, GameShell.canvasHeight); + } + InterfaceList.transmitTimer++; + while (true) { + @Pc(1569) Component priorityComponent; + @Pc(1560) Component prioritySource; + @Pc(1555) HookRequest priorityRequest; + do { + priorityRequest = (HookRequest) Static4.highPriorityRequests.removeHead(); + if (priorityRequest == null) { + while (true) { + do { + priorityRequest = (HookRequest) InterfaceList.mediumPriorityRequests.removeHead(); + if (priorityRequest == null) { + while (true) { + do { + priorityRequest = (HookRequest) InterfaceList.lowPriorityRequests.removeHead(); + if (priorityRequest == null) { + if (WorldMap.component == null) { + Static36.anInt3337 = 0; + } + if (Static40.aClass13_14 != null) { + ClientProt.method28(); + } + if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && MouseWheel.wheelRotation != 0) { + y = Player.level - MouseWheel.wheelRotation; + if (y < 0) { + y = 0; + } else if (y > 3) { + y = 3; + } + // Cheat + Cheat.teleport(PlayerList.self.movementQueueX[0] + Camera.originX, PlayerList.self.movementQueueZ[0] + Camera.originZ, y); + } + if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { + if (MiniMenu.anInt1742 != -1) { + Cheat.teleport(Camera.originX + MiniMenu.anInt1742, Camera.originZ - -MiniMenu.anInt2954, Player.level); + } + anInt4422 = 0; + MiniMenu.anInt3096 = 0; + } else if (MiniMenu.anInt3096 == 2) { + if (MiniMenu.anInt1742 != -1) { + outboundBuffer.p1isaac(131); + outboundBuffer.mp4(MiniMenu.anInt2512); + outboundBuffer.p2add(Camera.originX + MiniMenu.anInt1742); + outboundBuffer.ip2add(MiniMenu.anInt506); + outboundBuffer.p2add(MiniMenu.anInt2954 + Camera.originZ); + Cross.type = 1; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + } + MiniMenu.anInt3096 = 0; + } else if (anInt4422 == 2) { + if (MiniMenu.anInt1742 != -1) { + outboundBuffer.p1isaac(179); + outboundBuffer.p2(Camera.originZ + MiniMenu.anInt2954); + outboundBuffer.p2(MiniMenu.anInt1742 + Camera.originX); + Cross.milliseconds = 0; + Cross.type = 1; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + } + anInt4422 = 0; + } else if (MiniMenu.anInt1742 != -1 && MiniMenu.anInt3096 == 0 && anInt4422 == 0) { + @Pc(1871) boolean local1871 = PathFinder.findPath(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, MiniMenu.anInt1742, 0, 0, 0, MiniMenu.anInt2954, PlayerList.self.movementQueueX[0]); + if (local1871) { + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 1; + } + } + MiniMenu.anInt1742 = -1; + Static7.method843(); + if (InterfaceList.aClass13_22 != component) { + if (component != null) { + InterfaceList.redraw(component); + } + if (InterfaceList.aClass13_22 != null) { + InterfaceList.redraw(InterfaceList.aClass13_22); + } + } + if (local1508 != aClass13_11 && Static191.anInt4504 == anInt5235) { + if (local1508 != null) { + InterfaceList.redraw(local1508); + } + if (aClass13_11 != null) { + InterfaceList.redraw(aClass13_11); + } + } + if (aClass13_11 == null) { + if (anInt5235 > 0) { + anInt5235--; + } + } else if (anInt5235 < Static191.anInt4504) { + anInt5235++; + if (Static191.anInt4504 == anInt5235) { + InterfaceList.redraw(aClass13_11); + } + } + if (Camera.cameraType == 1) { + Camera.method4273(); + } else if (Camera.cameraType == 2) { + Camera.updateLockedCamera(); + } else { + Camera.updateLoginScreenCamera(); + } + for (y = 0; y < 5; y++) { + @Pc(2001) int local2001 = anIntArray76[y]++; + } + y = Mouse.getIdleLoops(); + x = Keyboard.getIdleLoops(); + if (y > 15000 && x > 15000) { + anInt5775 = 250; + Mouse.setIdleLoops(14500); + outboundBuffer.p1isaac(245); + } + if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { + if (Static33.openUrlRequest.result != null) { + ScriptRunner.openUrl(ScriptRunner.url, Static164.newTab); + } + ScriptRunner.url = null; + Static33.openUrlRequest = null; + Static164.newTab = false; + } + Static131.anInt3251++; + MiniMap.anInt2252++; + anInt3486++; + if (anInt3486 > 500) { + anInt3486 = 0; + modelId = (int) (Math.random() * 8.0D); + if ((modelId & 0x4) == 4) { + Camera.anInt5161 += anInt4941; + } + if ((modelId & 0x2) == 2) { + Camera.anInt4774 += anInt659; + } + if ((modelId & 0x1) == 1) { + Camera.anInt3291 += Camera.anInt4229; + } + } + if (MiniMap.anInt2252 > 500) { + MiniMap.anInt2252 = 0; + modelId = (int) (Math.random() * 8.0D); + if ((modelId & 0x1) == 1) { + MiniMap.anInt1814 += MiniMap.anInt5755; + } + if ((modelId & 0x2) == 2) { + MiniMap.anInt4130 += MiniMap.anInt4262; + } + } + if (Camera.anInt3291 < -50) { + Camera.anInt4229 = 2; + } + if (MiniMap.anInt1814 < -60) { + MiniMap.anInt5755 = 2; + } + if (MiniMap.anInt4130 < -20) { + MiniMap.anInt4262 = 1; + } + if (Camera.anInt4774 < -55) { + anInt659 = 2; + } + if (Camera.anInt4774 > 55) { + anInt659 = -2; + } + if (Camera.anInt5161 < -40) { + anInt4941 = 1; + } + if (Camera.anInt3291 > 50) { + Camera.anInt4229 = -2; + } + if (Camera.anInt5161 > 40) { + anInt4941 = -1; + } + if (MiniMap.anInt4130 > 10) { + MiniMap.anInt4262 = -1; + } + if (MiniMap.anInt1814 > 60) { + MiniMap.anInt5755 = -2; + } + if (Static131.anInt3251 > 50) { + outboundBuffer.p1isaac(93); + } + if (verifyIdChanged) { + transmitVerifyId(); + verifyIdChanged = false; + } + try { + if (socket != null && outboundBuffer.offset > 0) { + socket.write(outboundBuffer.data, outboundBuffer.offset); + Static131.anInt3251 = 0; + outboundBuffer.offset = 0; + } + } catch (@Pc(2266) IOException local2266) { + method3279(); + } + return; + } + prioritySource = priorityRequest.source; + if (prioritySource.createdComponentId < 0) { + break; + } + priorityComponent = InterfaceList.getComponent(prioritySource.layer); + } while (priorityComponent == null || priorityComponent.createdComponents == null || prioritySource.createdComponentId >= priorityComponent.createdComponents.length || prioritySource != priorityComponent.createdComponents[prioritySource.createdComponentId]); + ScriptRunner.run(priorityRequest); + } + } + prioritySource = priorityRequest.source; + if (prioritySource.createdComponentId < 0) { + break; + } + priorityComponent = InterfaceList.getComponent(prioritySource.layer); + } while (priorityComponent == null || priorityComponent.createdComponents == null || priorityComponent.createdComponents.length <= prioritySource.createdComponentId || priorityComponent.createdComponents[prioritySource.createdComponentId] != prioritySource); + ScriptRunner.run(priorityRequest); + } + } + prioritySource = priorityRequest.source; + if (prioritySource.createdComponentId < 0) { + break; + } + priorityComponent = InterfaceList.getComponent(prioritySource.layer); + } while (priorityComponent == null || priorityComponent.createdComponents == null || prioritySource.createdComponentId >= priorityComponent.createdComponents.length || priorityComponent.createdComponents[prioritySource.createdComponentId] != prioritySource); + ScriptRunner.run(priorityRequest); + } + } - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(I)V") - public static void npcCombat() { - for (@Pc(3) int i = 0; i < extendedCount; i++) { - @Pc(10) int extendedId = extendedIds[i]; - @Pc(14) Npc npc = NpcList.npcs[extendedId]; - @Pc(18) int local18 = inboundBuffer.g1(); - @Pc(43) int local43; - @Pc(47) int local47; + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(I)V") + public static void npcCombat() { + for (@Pc(3) int i = 0; i < extendedCount; i++) { + @Pc(10) int extendedId = extendedIds[i]; + @Pc(14) Npc npc = NpcList.npcs[extendedId]; + @Pc(18) int local18 = inboundBuffer.g1(); + @Pc(43) int local43; + @Pc(47) int local47; - //idk - if ((local18 & 0x8) != 0) { - local18 += inboundBuffer.g1() << 8; - } + //idk + if ((local18 & 0x8) != 0) { + local18 += inboundBuffer.g1() << 8; + } - boolean hasHitsplat = (local18 & 0x40) != 0; - if (hasHitsplat) { - local43 = inboundBuffer.g1(); // Hit value - local47 = inboundBuffer.g1neg(); // Color - npc.addHit(local47, client.loop, local43); - npc.hitpointsBarVisibleUntil = client.loop + 300; - npc.hitpointsBar = inboundBuffer.g1sub(); - } + boolean hasHitsplat = (local18 & 0x40) != 0; + if (hasHitsplat) { + local43 = inboundBuffer.g1(); // Hit value + local47 = inboundBuffer.g1neg(); // Color + npc.addHit(local47, client.loop, local43); + npc.hitpointsBarVisibleUntil = client.loop + 300; + npc.hitpointsBar = inboundBuffer.g1sub(); + } - boolean hasSecondaryHitsplat = (local18 & 0x2) != 0; - if (hasSecondaryHitsplat) { - local43 = inboundBuffer.g1neg(); // Hit value - local47 = inboundBuffer.g1sub(); // Color - npc.addHit(local47, client.loop, local43); - } + boolean hasSecondaryHitsplat = (local18 & 0x2) != 0; + if (hasSecondaryHitsplat) { + local43 = inboundBuffer.g1neg(); // Hit value + local47 = inboundBuffer.g1sub(); // Color + npc.addHit(local47, client.loop, local43); + } - boolean hasAnimation = (local18 & 0x10) != 0; - if (hasAnimation) { - local43 = inboundBuffer.g2(); // Animation ID - local47 = inboundBuffer.g1(); // Sequence - if (local43 == 65535) { - local43 = -1; - } - animateNpc(local47, local43, npc); - } + boolean hasAnimation = (local18 & 0x10) != 0; + if (hasAnimation) { + local43 = inboundBuffer.g2(); // Animation ID + local47 = inboundBuffer.g1(); // Sequence + if (local43 == 65535) { + local43 = -1; + } + animateNpc(local47, local43, npc); + } - boolean hasFaceEntity = (local18 & 0x4) != 0; - if (hasFaceEntity) { - npc.faceEntity = inboundBuffer.g2add(); - if (npc.faceEntity == 65535) { - npc.faceEntity = -1; - } - } + boolean hasFaceEntity = (local18 & 0x4) != 0; + if (hasFaceEntity) { + npc.faceEntity = inboundBuffer.g2add(); + if (npc.faceEntity == 65535) { + npc.faceEntity = -1; + } + } - boolean isKillingBlow = (local18 & 0x80) != 0; - if (isKillingBlow) { - local43 = inboundBuffer.g2add(); - if (local43 == 65535) { - local43 = -1; - } - local47 = inboundBuffer.ig4(); - @Pc(147) boolean local147 = local43 == -1 || npc.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(local43).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(npc.spotAnimId).seqId).forcedPriority; - if (local147) { - npc.spotAnimId = local43; - npc.spotAnimStart = (local47 & 0xFFFF) + client.loop; - npc.anInt3361 = 0; - npc.anInt3399 = 0; - npc.spotAnimY = local47 >> 16; - npc.anInt3418 = 1; - if (npc.spotAnimStart > client.loop) { - npc.anInt3399 = -1; - } - if (npc.spotAnimId != -1 && npc.spotAnimStart == client.loop) { - @Pc(227) int seqId = SpotAnimTypeList.get(npc.spotAnimId).seqId; - if (seqId != -1) { - @Pc(236) SeqType seqType = SeqTypeList.get(seqId); - if (seqType.frames != null) { - SoundPlayer.playSeqSound(npc.zFine, seqType, npc.xFine, false, 0); - } - } - } - } - } + boolean isKillingBlow = (local18 & 0x80) != 0; + if (isKillingBlow) { + local43 = inboundBuffer.g2add(); + if (local43 == 65535) { + local43 = -1; + } + local47 = inboundBuffer.ig4(); + @Pc(147) boolean local147 = local43 == -1 || npc.spotAnimId == -1 || SeqTypeList.get(SpotAnimTypeList.get(local43).seqId).forcedPriority >= SeqTypeList.get(SpotAnimTypeList.get(npc.spotAnimId).seqId).forcedPriority; + if (local147) { + npc.spotAnimId = local43; + npc.spotAnimStart = (local47 & 0xFFFF) + client.loop; + npc.anInt3361 = 0; + npc.anInt3399 = 0; + npc.spotAnimY = local47 >> 16; + npc.anInt3418 = 1; + if (npc.spotAnimStart > client.loop) { + npc.anInt3399 = -1; + } + if (npc.spotAnimId != -1 && npc.spotAnimStart == client.loop) { + @Pc(227) int seqId = SpotAnimTypeList.get(npc.spotAnimId).seqId; + if (seqId != -1) { + @Pc(236) SeqType seqType = SeqTypeList.get(seqId); + if (seqType.frames != null) { + SoundPlayer.playSeqSound(npc.zFine, seqType, npc.xFine, false, 0); + } + } + } + } + } - boolean hasSound = (local18 & 0x1) != 0; - if (hasSound) { - if (npc.type.hasAreaSound()) { - AreaSoundManager.remove(npc); - } - npc.setNpcType(NpcTypeList.get(inboundBuffer.ig2())); - npc.setSize(npc.type.size); - npc.anInt3365 = npc.type.basId; - if (npc.type.hasAreaSound()) { - AreaSoundManager.add(npc.movementQueueZ[0], null, 0, npc, npc.movementQueueX[0], Player.level, null); - } - } + boolean hasSound = (local18 & 0x1) != 0; + if (hasSound) { + if (npc.type.hasAreaSound()) { + AreaSoundManager.remove(npc); + } + npc.setNpcType(NpcTypeList.get(inboundBuffer.ig2())); + npc.setSize(npc.type.size); + npc.anInt3365 = npc.type.basId; + if (npc.type.hasAreaSound()) { + AreaSoundManager.add(npc.movementQueueZ[0], null, 0, npc, npc.movementQueueX[0], Player.level, null); + } + } - boolean hasChatMessage = (local18 & 0x20) != 0; - if (hasChatMessage) { - npc.chatMessage = inboundBuffer.gjstr(); - npc.chatLoops = 100; - } - if ((local18 & 0x100) != 0) { - local43 = inboundBuffer.g1neg(); - @Pc(331) int[] local331 = new int[local43]; - @Pc(334) int[] local334 = new int[local43]; - @Pc(337) int[] local337 = new int[local43]; - for (@Pc(339) int i1 = 0; i1 < local43; i1++) { - @Pc(350) int local350 = inboundBuffer.ig2(); - if (local350 == 65535) { - local350 = -1; - } - local331[i1] = local350; - local334[i1] = inboundBuffer.g1sub(); - local337[i1] = inboundBuffer.g2(); - } - method3037(local337, npc, local334, local331); - } + boolean hasChatMessage = (local18 & 0x20) != 0; + if (hasChatMessage) { + npc.chatMessage = inboundBuffer.gjstr(); + npc.chatLoops = 100; + } + if ((local18 & 0x100) != 0) { + local43 = inboundBuffer.g1neg(); + @Pc(331) int[] local331 = new int[local43]; + @Pc(334) int[] local334 = new int[local43]; + @Pc(337) int[] local337 = new int[local43]; + for (@Pc(339) int i1 = 0; i1 < local43; i1++) { + @Pc(350) int local350 = inboundBuffer.ig2(); + if (local350 == 65535) { + local350 = -1; + } + local331[i1] = local350; + local334[i1] = inboundBuffer.g1sub(); + local337[i1] = inboundBuffer.g2(); + } + method3037(local337, npc, local334, local331); + } - boolean hasFaceLocation = (local18 & 0x200) != 0; - if (hasFaceLocation) { - npc.faceX = inboundBuffer.g2add(); - npc.faceY = inboundBuffer.g2(); - } - } - } + boolean hasFaceLocation = (local18 & 0x200) != 0; + if (hasFaceLocation) { + npc.faceX = inboundBuffer.g2add(); + npc.faceY = inboundBuffer.g2(); + } + } + } - @OriginalMember(owner = "client!gm", name = "h", descriptor = "(I)V") - public static void readNpcPacket() { - extendedCount = 0; - removedCount = 0; - clearAreaNPCs(); - loadAreaNPCs(); - npcCombat(); - @Pc(19) int i; - for (i = 0; i < removedCount; i++) { - @Pc(30) int removedId = removedIds[i]; - if (NpcList.npcs[removedId].lastSeenLoop != client.loop) { - if (NpcList.npcs[removedId].type.hasAreaSound()) { - AreaSoundManager.remove(NpcList.npcs[removedId]); - } - NpcList.npcs[removedId].setNpcType(null); - NpcList.npcs[removedId] = null; - } - } - if (length != inboundBuffer.offset) { - throw new RuntimeException("gnp1 pos:" + inboundBuffer.offset + " psize:" + length); - } - for (i = 0; i < NpcList.size; i++) { - if (NpcList.npcs[NpcList.ids[i]] == null) { - throw new RuntimeException("gnp2 pos:" + i + " size:" + NpcList.size); - } - } - } + @OriginalMember(owner = "client!gm", name = "h", descriptor = "(I)V") + public static void readNpcPacket() { + extendedCount = 0; + removedCount = 0; + clearAreaNPCs(); + loadAreaNPCs(); + npcCombat(); + @Pc(19) int i; + for (i = 0; i < removedCount; i++) { + @Pc(30) int removedId = removedIds[i]; + if (NpcList.npcs[removedId].lastSeenLoop != client.loop) { + if (NpcList.npcs[removedId].type.hasAreaSound()) { + AreaSoundManager.remove(NpcList.npcs[removedId]); + } + NpcList.npcs[removedId].setNpcType(null); + NpcList.npcs[removedId] = null; + } + } + if (length != inboundBuffer.offset) { + throw new RuntimeException("gnp1 pos:" + inboundBuffer.offset + " psize:" + length); + } + for (i = 0; i < NpcList.size; i++) { + if (NpcList.npcs[NpcList.ids[i]] == null) { + throw new RuntimeException("gnp2 pos:" + i + " size:" + NpcList.size); + } + } + } - @OriginalMember(owner = "client!dm", name = "a", descriptor = "(B)V") - public static void clearAreaNPCs() { - inboundBuffer.accessBits(); - @Pc(13) int npcsInArea = inboundBuffer.gBits(8); - @Pc(22) int i; - if (NpcList.size > npcsInArea) { - for (i = npcsInArea; i < NpcList.size; i++) { - removedIds[removedCount++] = NpcList.ids[i]; - } - } - if (NpcList.size < npcsInArea) { - throw new RuntimeException("gnpov1"); - } - NpcList.size = 0; - for (i = 0; i < npcsInArea; i++) { - @Pc(61) int id = NpcList.ids[i]; - @Pc(65) Npc npc = NpcList.npcs[id]; - @Pc(70) int local70 = inboundBuffer.gBits(1); - if (local70 == 0) { - NpcList.ids[NpcList.size++] = id; - npc.lastSeenLoop = client.loop; - } else { - @Pc(92) int local92 = inboundBuffer.gBits(2); - if (local92 == 0) { - NpcList.ids[NpcList.size++] = id; - npc.lastSeenLoop = client.loop; - extendedIds[extendedCount++] = id; - } else { - @Pc(139) int local139; - @Pc(149) int local149; - if (local92 == 1) { - NpcList.ids[NpcList.size++] = id; - npc.lastSeenLoop = client.loop; - local139 = inboundBuffer.gBits(3); - npc.move(1, local139); - local149 = inboundBuffer.gBits(1); - if (local149 == 1) { - extendedIds[extendedCount++] = id; - } - } else if (local92 == 2) { - NpcList.ids[NpcList.size++] = id; - npc.lastSeenLoop = client.loop; - if (inboundBuffer.gBits(1) == 1) { - local139 = inboundBuffer.gBits(3); - npc.move(2, local139); - local149 = inboundBuffer.gBits(3); - npc.move(2, local149); - } else { - local139 = inboundBuffer.gBits(3); - npc.move(0, local139); - } - local139 = inboundBuffer.gBits(1); - if (local139 == 1) { - extendedIds[extendedCount++] = id; - } - } else if (local92 == 3) { - removedIds[removedCount++] = id; - } - } - } - } - } + @OriginalMember(owner = "client!dm", name = "a", descriptor = "(B)V") + public static void clearAreaNPCs() { + inboundBuffer.accessBits(); + @Pc(13) int npcsInArea = inboundBuffer.gBits(8); + @Pc(22) int i; + if (NpcList.size > npcsInArea) { + for (i = npcsInArea; i < NpcList.size; i++) { + removedIds[removedCount++] = NpcList.ids[i]; + } + } + if (NpcList.size < npcsInArea) { + throw new RuntimeException("gnpov1"); + } + NpcList.size = 0; + for (i = 0; i < npcsInArea; i++) { + @Pc(61) int id = NpcList.ids[i]; + @Pc(65) Npc npc = NpcList.npcs[id]; + @Pc(70) int local70 = inboundBuffer.gBits(1); + if (local70 == 0) { + NpcList.ids[NpcList.size++] = id; + npc.lastSeenLoop = client.loop; + } else { + @Pc(92) int local92 = inboundBuffer.gBits(2); + if (local92 == 0) { + NpcList.ids[NpcList.size++] = id; + npc.lastSeenLoop = client.loop; + extendedIds[extendedCount++] = id; + } else { + @Pc(139) int local139; + @Pc(149) int local149; + if (local92 == 1) { + NpcList.ids[NpcList.size++] = id; + npc.lastSeenLoop = client.loop; + local139 = inboundBuffer.gBits(3); + npc.move(1, local139); + local149 = inboundBuffer.gBits(1); + if (local149 == 1) { + extendedIds[extendedCount++] = id; + } + } else if (local92 == 2) { + NpcList.ids[NpcList.size++] = id; + npc.lastSeenLoop = client.loop; + if (inboundBuffer.gBits(1) == 1) { + local139 = inboundBuffer.gBits(3); + npc.move(2, local139); + local149 = inboundBuffer.gBits(3); + npc.move(2, local149); + } else { + local139 = inboundBuffer.gBits(3); + npc.move(0, local139); + } + local139 = inboundBuffer.gBits(1); + if (local139 == 1) { + extendedIds[extendedCount++] = id; + } + } else if (local92 == 3) { + removedIds[removedCount++] = id; + } + } + } + } + } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(I)V") - public static void loadAreaNPCs() { - while (true) { - if (inboundBuffer.method2241(length) >= 27) { - @Pc(14) int npcIndex = inboundBuffer.gBits(15); - if (npcIndex != 32767) { - @Pc(19) boolean local19 = false; - if (NpcList.npcs[npcIndex] == null) { - local19 = true; - NpcList.npcs[npcIndex] = new Npc(); - } - @Pc(37) Npc npc = NpcList.npcs[npcIndex]; - NpcList.ids[NpcList.size++] = npcIndex; - npc.lastSeenLoop = client.loop; - if (npc.type != null && npc.type.hasAreaSound()) { - AreaSoundManager.remove(npc); - } - @Pc(66) int local66 = inboundBuffer.gBits(1); - @Pc(73) int angle = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; - if (local19) { - npc.anInt3400 = npc.anInt3381 = angle; - } - @Pc(86) int local86 = inboundBuffer.gBits(1); - if (local86 == 1) { - extendedIds[extendedCount++] = npcIndex; - } - @Pc(105) int local105 = inboundBuffer.gBits(5); - npc.setNpcType(NpcTypeList.get(inboundBuffer.gBits(14))); - if (local105 > 15) { - local105 -= 32; - } - @Pc(124) int local124 = inboundBuffer.gBits(5); - if (local124 > 15) { - local124 -= 32; - } - npc.setSize(npc.type.size); - npc.anInt3365 = npc.type.basId; - npc.anInt3376 = npc.type.anInt3733; - if (npc.anInt3376 == 0) { - npc.anInt3381 = 0; - } - npc.method2683(npc.getSize(), PlayerList.self.movementQueueX[0] + local124, local105 + PlayerList.self.movementQueueZ[0], local66 == 1); - if (npc.type.hasAreaSound()) { - AreaSoundManager.add(npc.movementQueueZ[0], null, 0, npc, npc.movementQueueX[0], Player.level, null); - } - continue; - } - } - inboundBuffer.accessBytes(); - return; - } - } + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(I)V") + public static void loadAreaNPCs() { + while (true) { + if (inboundBuffer.method2241(length) >= 27) { + @Pc(14) int npcIndex = inboundBuffer.gBits(15); + if (npcIndex != 32767) { + @Pc(19) boolean local19 = false; + if (NpcList.npcs[npcIndex] == null) { + local19 = true; + NpcList.npcs[npcIndex] = new Npc(); + } + @Pc(37) Npc npc = NpcList.npcs[npcIndex]; + NpcList.ids[NpcList.size++] = npcIndex; + npc.lastSeenLoop = client.loop; + if (npc.type != null && npc.type.hasAreaSound()) { + AreaSoundManager.remove(npc); + } + @Pc(66) int local66 = inboundBuffer.gBits(1); + @Pc(73) int angle = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; + if (local19) { + npc.anInt3400 = npc.anInt3381 = angle; + } + @Pc(86) int local86 = inboundBuffer.gBits(1); + if (local86 == 1) { + extendedIds[extendedCount++] = npcIndex; + } + @Pc(105) int local105 = inboundBuffer.gBits(5); + npc.setNpcType(NpcTypeList.get(inboundBuffer.gBits(14))); + if (local105 > 15) { + local105 -= 32; + } + @Pc(124) int local124 = inboundBuffer.gBits(5); + if (local124 > 15) { + local124 -= 32; + } + npc.setSize(npc.type.size); + npc.anInt3365 = npc.type.basId; + npc.anInt3376 = npc.type.anInt3733; + if (npc.anInt3376 == 0) { + npc.anInt3381 = 0; + } + npc.method2683(npc.getSize(), PlayerList.self.movementQueueX[0] + local124, local105 + PlayerList.self.movementQueueZ[0], local66 == 1); + if (npc.type.hasAreaSound()) { + AreaSoundManager.add(npc.movementQueueZ[0], null, 0, npc, npc.movementQueueX[0], Player.level, null); + } + continue; + } + } + inboundBuffer.accessBytes(); + return; + } + } - @OriginalMember(owner = "client!uc", name = "a", descriptor = "(IB)Z") - public static boolean setVerifyId(@OriginalArg(0) int arg0) { - verifyId = arg0 + 1 & 0xFFFF; - verifyIdChanged = true; - return true; - } + @OriginalMember(owner = "client!uc", name = "a", descriptor = "(IB)Z") + public static boolean setVerifyId(@OriginalArg(0) int arg0) { + verifyId = arg0 + 1 & 0xFFFF; + verifyIdChanged = true; + return true; + } - @OriginalMember(owner = "client!fk", name = "c", descriptor = "(I)V") - public static void transmitVerifyId() { - outboundBuffer.p1isaac(177); - outboundBuffer.p2(verifyId); - } + @OriginalMember(owner = "client!fk", name = "c", descriptor = "(I)V") + public static void transmitVerifyId() { + outboundBuffer.p1isaac(177); + outboundBuffer.p2(verifyId); + } - @OriginalMember(owner = "client!wc", name = "a", descriptor = "(Lclient!wa;I)V") - public static void writeRandom(@OriginalArg(0) Buffer buffer) { - if (client.uid != null) { - try { - client.uid.seek(0L); - client.uid.write(buffer.data, buffer.offset, 24); - } catch (@Pc(16) Exception local16) { - } - } - buffer.offset += 24; - } + @OriginalMember(owner = "client!wc", name = "a", descriptor = "(Lclient!wa;I)V") + public static void writeRandom(@OriginalArg(0) Buffer buffer) { + if (client.uid != null) { + try { + client.uid.seek(0L); + client.uid.write(buffer.data, buffer.offset, 24); + } catch (@Pc(16) Exception local16) { + } + } + buffer.offset += 24; + } - @OriginalMember(owner = "client!nm", name = "a", descriptor = "(Z)V") - public static void method3279() { - if (anInt5775 > 0) { - LoginManager.processLogout(); - } else { - aClass95_4 = socket; - socket = null; - client.setGameState(40); - } - } + @OriginalMember(owner = "client!nm", name = "a", descriptor = "(Z)V") + public static void method3279() { + if (anInt5775 > 0) { + LoginManager.processLogout(); + } else { + aClass95_4 = socket; + socket = null; + client.setGameState(40); + } + } - @OriginalMember(owner = "client!fc", name = "a", descriptor = "(Lclient!wa;I)Lclient!na;") - public static JagString formatChatMessage(@OriginalArg(0) Buffer arg0) { - return method4350(arg0); - } + @OriginalMember(owner = "client!fc", name = "a", descriptor = "(Lclient!wa;I)Lclient!na;") + public static JagString formatChatMessage(@OriginalArg(0) Buffer arg0) { + return method4350(arg0); + } - @OriginalMember(owner = "client!uj", name = "a", descriptor = "(Lclient!wa;II)Lclient!na;") - public static JagString method4350(@OriginalArg(0) Buffer arg0) { - try { - @Pc(7) int local7 = arg0.gsmarts(); - if (local7 > 32767) { - local7 = 32767; - } - @Pc(15) byte[] local15 = new byte[local7]; - arg0.offset += WordPack.codec.method1552(0, local7, local15, arg0.data, arg0.offset); - return JagString.decodeString(local15, local7, 0); - } catch (@Pc(47) Exception local47) { - return WordPack.CABBAGE; - } - } + @OriginalMember(owner = "client!uj", name = "a", descriptor = "(Lclient!wa;II)Lclient!na;") + public static JagString method4350(@OriginalArg(0) Buffer arg0) { + try { + @Pc(7) int local7 = arg0.gsmarts(); + if (local7 > 32767) { + local7 = 32767; + } + @Pc(15) byte[] local15 = new byte[local7]; + arg0.offset += WordPack.codec.method1552(0, local7, local15, arg0.data, arg0.offset); + return JagString.decodeString(local15, local7, 0); + } catch (@Pc(47) Exception local47) { + return WordPack.CABBAGE; + } + } - @OriginalMember(owner = "client!mi", name = "a", descriptor = "([IBLclient!km;[I[I)V") - public static void method3037(@OriginalArg(0) int[] arg0, @OriginalArg(2) Npc arg1, @OriginalArg(3) int[] arg2, @OriginalArg(4) int[] arg3) { - for (@Pc(3) int local3 = 0; local3 < arg3.length; local3++) { - @Pc(15) int local15 = arg3[local3]; - @Pc(19) int local19 = arg0[local3]; - @Pc(23) int local23 = arg2[local3]; - for (@Pc(25) int local25 = 0; local19 != 0 && arg1.aClass147Array3.length > local25; local25++) { - if ((local19 & 0x1) != 0) { - if (local15 == -1) { - arg1.aClass147Array3[local25] = null; - } else { - @Pc(60) SeqType local60 = SeqTypeList.get(local15); - @Pc(65) Npc_Class147 local65 = arg1.aClass147Array3[local25]; - @Pc(68) int local68 = local60.anInt5347; - if (local65 != null) { - if (local15 == local65.anInt5396) { - if (local68 == 0) { - local65 = arg1.aClass147Array3[local25] = null; - } else if (local68 == 1) { - local65.anInt5399 = 0; - local65.anInt5400 = 0; - local65.anInt5398 = 1; - local65.anInt5404 = 0; - local65.anInt5408 = local23; - SoundPlayer.playSeqSound(arg1.zFine, local60, arg1.xFine, false, 0); - } else if (local68 == 2) { - local65.anInt5400 = 0; - } - } else if (local60.forcedPriority >= SeqTypeList.get(local65.anInt5396).forcedPriority) { - local65 = arg1.aClass147Array3[local25] = null; - } - } - if (local65 == null) { - local65 = arg1.aClass147Array3[local25] = new Npc_Class147(); - local65.anInt5398 = 1; - local65.anInt5404 = 0; - local65.anInt5408 = local23; - local65.anInt5396 = local15; - local65.anInt5400 = 0; - local65.anInt5399 = 0; - SoundPlayer.playSeqSound(arg1.zFine, local60, arg1.xFine, false, 0); - } - } - } - local19 >>>= 0x1; - } - } - } + @OriginalMember(owner = "client!mi", name = "a", descriptor = "([IBLclient!km;[I[I)V") + public static void method3037(@OriginalArg(0) int[] arg0, @OriginalArg(2) Npc arg1, @OriginalArg(3) int[] arg2, @OriginalArg(4) int[] arg3) { + for (@Pc(3) int local3 = 0; local3 < arg3.length; local3++) { + @Pc(15) int local15 = arg3[local3]; + @Pc(19) int local19 = arg0[local3]; + @Pc(23) int local23 = arg2[local3]; + for (@Pc(25) int local25 = 0; local19 != 0 && arg1.aClass147Array3.length > local25; local25++) { + if ((local19 & 0x1) != 0) { + if (local15 == -1) { + arg1.aClass147Array3[local25] = null; + } else { + @Pc(60) SeqType local60 = SeqTypeList.get(local15); + @Pc(65) Npc_Class147 local65 = arg1.aClass147Array3[local25]; + @Pc(68) int local68 = local60.anInt5347; + if (local65 != null) { + if (local15 == local65.anInt5396) { + if (local68 == 0) { + local65 = arg1.aClass147Array3[local25] = null; + } else if (local68 == 1) { + local65.anInt5399 = 0; + local65.anInt5400 = 0; + local65.anInt5398 = 1; + local65.anInt5404 = 0; + local65.anInt5408 = local23; + SoundPlayer.playSeqSound(arg1.zFine, local60, arg1.xFine, false, 0); + } else if (local68 == 2) { + local65.anInt5400 = 0; + } + } else if (local60.forcedPriority >= SeqTypeList.get(local65.anInt5396).forcedPriority) { + local65 = arg1.aClass147Array3[local25] = null; + } + } + if (local65 == null) { + local65 = arg1.aClass147Array3[local25] = new Npc_Class147(); + local65.anInt5398 = 1; + local65.anInt5404 = 0; + local65.anInt5408 = local23; + local65.anInt5396 = local15; + local65.anInt5400 = 0; + local65.anInt5399 = 0; + SoundPlayer.playSeqSound(arg1.zFine, local60, arg1.xFine, false, 0); + } + } + } + local19 >>>= 0x1; + } + } + } - @OriginalMember(owner = "client!sc", name = "a", descriptor = "(IIILclient!km;)V") - public static void animateNpc(@OriginalArg(0) int arg0, @OriginalArg(1) int animationId, @OriginalArg(3) Npc npc) { - if (npc.seqId == animationId && animationId != -1) { - @Pc(10) SeqType seqType = SeqTypeList.get(animationId); - @Pc(13) int local13 = seqType.anInt5347; - if (local13 == 1) { - npc.anInt3373 = 1; - npc.anInt3425 = 0; - npc.anInt3360 = 0; - npc.anInt3371 = 0; - npc.anInt3420 = arg0; - SoundPlayer.playSeqSound(npc.zFine, seqType, npc.xFine, false, npc.anInt3425); - } - if (local13 == 2) { - npc.anInt3371 = 0; - } - } else if (animationId == -1 || npc.seqId == -1 || SeqTypeList.get(animationId).forcedPriority >= SeqTypeList.get(npc.seqId).forcedPriority) { - npc.anInt3360 = 0; - npc.seqId = animationId; - npc.anInt3373 = 1; - npc.anInt3371 = 0; - npc.anInt3420 = arg0; - npc.anInt3405 = npc.movementQueueSize; - npc.anInt3425 = 0; - if (npc.seqId != -1) { - SoundPlayer.playSeqSound(npc.zFine, SeqTypeList.get(npc.seqId), npc.xFine, false, npc.anInt3425); - } - } - } + @OriginalMember(owner = "client!sc", name = "a", descriptor = "(IIILclient!km;)V") + public static void animateNpc(@OriginalArg(0) int arg0, @OriginalArg(1) int animationId, @OriginalArg(3) Npc npc) { + if (npc.seqId == animationId && animationId != -1) { + @Pc(10) SeqType seqType = SeqTypeList.get(animationId); + @Pc(13) int local13 = seqType.anInt5347; + if (local13 == 1) { + npc.anInt3373 = 1; + npc.anInt3425 = 0; + npc.anInt3360 = 0; + npc.anInt3371 = 0; + npc.anInt3420 = arg0; + SoundPlayer.playSeqSound(npc.zFine, seqType, npc.xFine, false, npc.anInt3425); + } + if (local13 == 2) { + npc.anInt3371 = 0; + } + } else if (animationId == -1 || npc.seqId == -1 || SeqTypeList.get(animationId).forcedPriority >= SeqTypeList.get(npc.seqId).forcedPriority) { + npc.anInt3360 = 0; + npc.seqId = animationId; + npc.anInt3373 = 1; + npc.anInt3371 = 0; + npc.anInt3420 = arg0; + npc.anInt3405 = npc.movementQueueSize; + npc.anInt3425 = 0; + if (npc.seqId != -1) { + SoundPlayer.playSeqSound(npc.zFine, SeqTypeList.get(npc.seqId), npc.xFine, false, npc.anInt3425); + } + } + } - @OriginalMember(owner = "client!sj", name = "a", descriptor = "(ILclient!na;)V") - public static void method3954(@OriginalArg(1) JagString arg0) { - client.settings = arg0; - if (GameShell.signLink.applet == null) { - return; - } - try { - @Pc(17) JagString local17 = aClass100_989.fromParameters(GameShell.signLink.applet); - @Pc(23) JagString local23 = aClass100_1029.fromParameters(GameShell.signLink.applet); - @Pc(48) JagString local48 = JagString.concatenate(new JagString[] { local17, aClass100_667, arg0, aClass100_1095, local23 }); - if (arg0.length() == 0) { - local48 = JagString.concatenate(new JagString[] { local48, aClass100_1018 }); - } else { - local48 = JagString.concatenate(new JagString[] { local48, aClass100_1082, DateUtil.getDateString(MonotonicClock.currentTimeMillis() + 94608000000L), aClass100_431, method2929(94608000L) }); - } - JagString.concatenate(new JagString[] { aClass100_821, local48, aClass100_946 }).method3134(GameShell.signLink.applet); - } catch (@Pc(124) Throwable local124) { - } - } + @OriginalMember(owner = "client!sj", name = "a", descriptor = "(ILclient!na;)V") + public static void method3954(@OriginalArg(1) JagString arg0) { + client.settings = arg0; + if (GameShell.signLink.applet == null) { + return; + } + try { + @Pc(17) JagString local17 = aClass100_989.fromParameters(GameShell.signLink.applet); + @Pc(23) JagString local23 = aClass100_1029.fromParameters(GameShell.signLink.applet); + @Pc(48) JagString local48 = JagString.concatenate(new JagString[]{local17, aClass100_667, arg0, aClass100_1095, local23}); + if (arg0.length() == 0) { + local48 = JagString.concatenate(new JagString[]{local48, aClass100_1018}); + } else { + local48 = JagString.concatenate(new JagString[]{local48, aClass100_1082, DateUtil.getDateString(MonotonicClock.currentTimeMillis() + 94608000000L), aClass100_431, method2929(94608000L)}); + } + JagString.concatenate(new JagString[]{aClass100_821, local48, aClass100_946}).method3134(GameShell.signLink.applet); + } catch (@Pc(124) Throwable local124) { + } + } - @OriginalMember(owner = "client!md", name = "a", descriptor = "(JB)Lclient!na;") - public static JagString method2929(@OriginalArg(0) long arg0) { - return method1376(arg0); - } + @OriginalMember(owner = "client!md", name = "a", descriptor = "(JB)Lclient!na;") + public static JagString method2929(@OriginalArg(0) long arg0) { + return method1376(arg0); + } - @OriginalMember(owner = "client!ej", name = "a", descriptor = "(IZIJ)Lclient!na;") - public static JagString method1376(@OriginalArg(3) long arg0) { - @Pc(35) long local35 = arg0 / (long) 10; - @Pc(37) int local37 = 1; - while (local35 != 0L) { - local37++; - local35 /= 10; - } - @Pc(51) int local51 = local37; - if (arg0 < 0L) { - local51 = local37 + 1; - } - @Pc(61) byte[] local61 = new byte[local51]; - if (arg0 < 0L) { - local61[0] = 45; - } - for (@Pc(79) int local79 = 0; local79 < local37; local79++) { - @Pc(92) int local92 = (int) (arg0 % (long) 10); - arg0 /= 10; - if (local92 < 0) { - local92 = -local92; - } - if (local92 > 9) { - local92 += 39; - } - local61[local51 - local79 - 1] = (byte) (local92 + 48); - } - @Pc(126) JagString local126 = new JagString(); - local126.chars = local61; - local126.length = local51; - return local126; - } + @OriginalMember(owner = "client!ej", name = "a", descriptor = "(IZIJ)Lclient!na;") + public static JagString method1376(@OriginalArg(3) long arg0) { + @Pc(35) long local35 = arg0 / (long) 10; + @Pc(37) int local37 = 1; + while (local35 != 0L) { + local37++; + local35 /= 10; + } + @Pc(51) int local51 = local37; + if (arg0 < 0L) { + local51 = local37 + 1; + } + @Pc(61) byte[] local61 = new byte[local51]; + if (arg0 < 0L) { + local61[0] = 45; + } + for (@Pc(79) int local79 = 0; local79 < local37; local79++) { + @Pc(92) int local92 = (int) (arg0 % (long) 10); + arg0 /= 10; + if (local92 < 0) { + local92 = -local92; + } + if (local92 > 9) { + local92 += 39; + } + local61[local51 - local79 - 1] = (byte) (local92 + 48); + } + @Pc(126) JagString local126 = new JagString(); + local126.chars = local61; + local126.length = local51; + return local126; + } - @OriginalMember(owner = "client!rm", name = "a", descriptor = "(IBI)V") - public static void spawnGroundObject(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(9) LinkedList local9 = SceneGraph.objStacks[Player.level][arg1][arg0]; - if (local9 == null) { - SceneGraph.method3420(Player.level, arg1, arg0); - return; - } - @Pc(28) int local28 = -99999999; - @Pc(30) ObjStackNode local30 = null; - @Pc(35) ObjStackNode local35; - for (local35 = (ObjStackNode) local9.head(); local35 != null; local35 = (ObjStackNode) local9.next()) { - @Pc(44) ObjType local44 = ObjTypeList.get(local35.value.type); - @Pc(47) int local47 = local44.cost; - if (local44.stackable == 1) { - local47 *= local35.value.anInt5550 + 1; - } - if (local28 < local47) { - local28 = local47; - local30 = local35; - } - } - if (local30 == null) { - SceneGraph.method3420(Player.level, arg1, arg0); - return; - } - local9.addHead(local30); - @Pc(89) ObjStack local89 = null; - @Pc(91) ObjStack local91 = null; - for (local35 = (ObjStackNode) local9.head(); local35 != null; local35 = (ObjStackNode) local9.next()) { - @Pc(103) ObjStack local103 = local35.value; - if (local103.type != local30.value.type) { - if (local89 == null) { - local89 = local103; - } - if (local103.type != local89.type && local91 == null) { - local91 = local103; - } - } - } - @Pc(152) long local152 = (long) ((arg0 << 7) + arg1 + 1610612736); - SceneGraph.method1543(Player.level, arg1, arg0, SceneGraph.getTileHeight(Player.level, arg1 * 128 + 64, arg0 * 128 + 64), local30.value, local152, local89, local91); - } + @OriginalMember(owner = "client!rm", name = "a", descriptor = "(IBI)V") + public static void spawnGroundObject(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(9) LinkedList local9 = SceneGraph.objStacks[Player.level][arg1][arg0]; + if (local9 == null) { + SceneGraph.method3420(Player.level, arg1, arg0); + return; + } + @Pc(28) int local28 = -99999999; + @Pc(30) ObjStackNode local30 = null; + @Pc(35) ObjStackNode local35; + for (local35 = (ObjStackNode) local9.head(); local35 != null; local35 = (ObjStackNode) local9.next()) { + @Pc(44) ObjType local44 = ObjTypeList.get(local35.value.type); + @Pc(47) int local47 = local44.cost; + if (local44.stackable == 1) { + local47 *= local35.value.anInt5550 + 1; + } + if (local28 < local47) { + local28 = local47; + local30 = local35; + } + } + if (local30 == null) { + SceneGraph.method3420(Player.level, arg1, arg0); + return; + } + local9.addHead(local30); + @Pc(89) ObjStack local89 = null; + @Pc(91) ObjStack local91 = null; + for (local35 = (ObjStackNode) local9.head(); local35 != null; local35 = (ObjStackNode) local9.next()) { + @Pc(103) ObjStack local103 = local35.value; + if (local103.type != local30.value.type) { + if (local89 == null) { + local89 = local103; + } + if (local103.type != local89.type && local91 == null) { + local91 = local103; + } + } + } + @Pc(152) long local152 = (arg0 << 7) + arg1 + 1610612736; + SceneGraph.method1543(Player.level, arg1, arg0, SceneGraph.getTileHeight(Player.level, arg1 * 128 + 64, arg0 * 128 + 64), local30.value, local152, local89, local91); + } } diff --git a/client/src/main/java/rt4/QuickChatCatType.java b/client/src/main/java/rt4/QuickChatCatType.java index 0b5890b..caa2cdb 100644 --- a/client/src/main/java/rt4/QuickChatCatType.java +++ b/client/src/main/java/rt4/QuickChatCatType.java @@ -23,12 +23,12 @@ public final class QuickChatCatType extends SecondaryNode { @OriginalMember(owner = "client!bc", name = "ab", descriptor = "[I") public int[] phrases; - @OriginalMember(owner = "client!si", name = "a", descriptor = "(ZB)I") - public static int method3933(@OriginalArg(1) byte arg0) { - return arg0 & 0xFF; - } + @OriginalMember(owner = "client!si", name = "a", descriptor = "(ZB)I") + public static int method3933(@OriginalArg(1) byte arg0) { + return arg0 & 0xFF; + } - @OriginalMember(owner = "client!bc", name = "d", descriptor = "(I)V") + @OriginalMember(owner = "client!bc", name = "d", descriptor = "(I)V") public final void method465() { @Pc(8) int local8; if (this.phrases != null) { diff --git a/client/src/main/java/rt4/QuickChatCatTypeList.java b/client/src/main/java/rt4/QuickChatCatTypeList.java index b838d3f..6ad71e0 100644 --- a/client/src/main/java/rt4/QuickChatCatTypeList.java +++ b/client/src/main/java/rt4/QuickChatCatTypeList.java @@ -5,39 +5,39 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class QuickChatCatTypeList { - @OriginalMember(owner = "client!fm", name = "db", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(64); - @OriginalMember(owner = "client!gn", name = "t", descriptor = "Lclient!ve;") - public static Js5 archive1; - @OriginalMember(owner = "client!ce", name = "d", descriptor = "Lclient!ve;") - public static Js5 archive2; + @OriginalMember(owner = "client!fm", name = "db", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(64); + @OriginalMember(owner = "client!gn", name = "t", descriptor = "Lclient!ve;") + public static Js5 archive1; + @OriginalMember(owner = "client!ce", name = "d", descriptor = "Lclient!ve;") + public static Js5 archive2; - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(Lclient!ve;Lclient!ve;I)V") - public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { - archive1 = arg1; - archive2 = arg0; - } + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(Lclient!ve;Lclient!ve;I)V") + public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { + archive1 = arg1; + archive2 = arg0; + } - @OriginalMember(owner = "client!tb", name = "b", descriptor = "(IB)Lclient!bc;") - public static QuickChatCatType get(@OriginalArg(0) int arg0) { - @Pc(10) QuickChatCatType local10 = (QuickChatCatType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(24) byte[] local24; - if (arg0 < 32768) { - local24 = archive1.fetchFile(0, arg0); - } else { - local24 = archive2.fetchFile(0, arg0 & 0x7FFF); - } - local10 = new QuickChatCatType(); - if (local24 != null) { - local10.decode(new Buffer(local24)); - } - if (arg0 >= 32768) { - local10.method465(); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!tb", name = "b", descriptor = "(IB)Lclient!bc;") + public static QuickChatCatType get(@OriginalArg(0) int arg0) { + @Pc(10) QuickChatCatType local10 = (QuickChatCatType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(24) byte[] local24; + if (arg0 < 32768) { + local24 = archive1.fetchFile(0, arg0); + } else { + local24 = archive2.fetchFile(0, arg0 & 0x7FFF); + } + local10 = new QuickChatCatType(); + if (local24 != null) { + local10.decode(new Buffer(local24)); + } + if (arg0 >= 32768) { + local10.method465(); + } + types.put(local10, arg0); + return local10; + } } diff --git a/client/src/main/java/rt4/QuickChatCommandDecoder.java b/client/src/main/java/rt4/QuickChatCommandDecoder.java index 40a57c6..fd3177d 100644 --- a/client/src/main/java/rt4/QuickChatCommandDecoder.java +++ b/client/src/main/java/rt4/QuickChatCommandDecoder.java @@ -8,5 +8,5 @@ import org.openrs2.deob.annotation.OriginalMember; public interface QuickChatCommandDecoder { @OriginalMember(owner = "client!of", name = "a", descriptor = "(I[IIJ)Lclient!na;") - JagString decode(@OriginalArg(0) int arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) long arg2); + JagString decode(@OriginalArg(0) int arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) long arg2); } diff --git a/client/src/main/java/rt4/QuickChatPhraseType.java b/client/src/main/java/rt4/QuickChatPhraseType.java index ad0bd5f..4df873c 100644 --- a/client/src/main/java/rt4/QuickChatPhraseType.java +++ b/client/src/main/java/rt4/QuickChatPhraseType.java @@ -8,16 +8,16 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!cb") public final class QuickChatPhraseType extends SecondaryNode { - @OriginalMember(owner = "client!ld", name = "a", descriptor = "[I") - public static final int[] DYNAMIC_COMMAND_ENCODE_BYTES = new int[] { 2, 2, 4, 0, 1, 8, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 }; + @OriginalMember(owner = "client!ld", name = "a", descriptor = "[I") + public static final int[] DYNAMIC_COMMAND_ENCODE_BYTES = new int[]{2, 2, 4, 0, 1, 8, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}; @OriginalMember(owner = "client!rc", name = "I", descriptor = "Lclient!na;") public static final JagString aClass100_231 = JagString.parse(")3)3)3"); @OriginalMember(owner = "client!bf", name = "C", descriptor = "[I") - public static final int[] anIntArray51 = new int[] { 2, 2, 4, 2, 1, 8, 4, 1, 4, 4, 2, 1, 1, 1, 4, 1 }; + public static final int[] anIntArray51 = new int[]{2, 2, 4, 2, 1, 8, 4, 1, 4, 4, 2, 1, 1, 1, 4, 1}; @OriginalMember(owner = "client!qg", name = "U", descriptor = "Lclient!na;") public static final JagString aClass100_891 = JagString.parse(""); @OriginalMember(owner = "client!vh", name = "p", descriptor = "[I") - public static final int[] anIntArray412 = new int[] { 1, 0, 0, 0, 1, 0, 2, 1, 1, 1, 0, 2, 0, 0, 1, 0 }; + public static final int[] anIntArray412 = new int[]{1, 0, 0, 0, 1, 0, 2, 1, 1, 1, 0, 2, 0, 0, 1, 0}; @OriginalMember(owner = "client!cb", name = "L", descriptor = "[I") private int[] anIntArray71; @@ -33,15 +33,15 @@ public final class QuickChatPhraseType extends SecondaryNode { @OriginalMember(owner = "client!cb", name = "O", descriptor = "Z") public boolean aBoolean60 = true; - @OriginalMember(owner = "client!vh", name = "a", descriptor = "(ILclient!wa;)Lclient!bd;") - public static QuickChatPhrase method3568(@OriginalArg(1) Buffer arg0) { - @Pc(3) QuickChatPhrase local3 = new QuickChatPhrase(); - local3.id = arg0.g2(); - local3.type = QuickChatPhraseTypeList.get(local3.id); - return local3; - } + @OriginalMember(owner = "client!vh", name = "a", descriptor = "(ILclient!wa;)Lclient!bd;") + public static QuickChatPhrase method3568(@OriginalArg(1) Buffer arg0) { + @Pc(3) QuickChatPhrase local3 = new QuickChatPhrase(); + local3.id = arg0.g2(); + local3.type = QuickChatPhraseTypeList.get(local3.id); + return local3; + } - @OriginalMember(owner = "client!cb", name = "a", descriptor = "(Lclient!wa;[IZ)V") + @OriginalMember(owner = "client!cb", name = "a", descriptor = "(Lclient!wa;[IZ)V") public final void encodeMessage(@OriginalArg(0) Buffer arg0, @OriginalArg(1) int[] arg1) { if (this.anIntArray71 == null) { return; @@ -49,7 +49,7 @@ public final class QuickChatPhraseType extends SecondaryNode { for (@Pc(14) int local14 = 0; this.anIntArray71.length > local14 && local14 < arg1.length; local14++) { @Pc(38) int local38 = DYNAMIC_COMMAND_ENCODE_BYTES[this.getDynamicCommand(local14)]; if (local38 > 0) { - arg0.pVarLong(local38, (long) arg1[local14]); + arg0.pVarLong(local38, arg1[local14]); } } } diff --git a/client/src/main/java/rt4/QuickChatPhraseTypeList.java b/client/src/main/java/rt4/QuickChatPhraseTypeList.java index a42b69e..19c25a2 100644 --- a/client/src/main/java/rt4/QuickChatPhraseTypeList.java +++ b/client/src/main/java/rt4/QuickChatPhraseTypeList.java @@ -5,52 +5,52 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class QuickChatPhraseTypeList { - @OriginalMember(owner = "client!ud", name = "P", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(64); - @OriginalMember(owner = "client!vf", name = "n", descriptor = "Lclient!ve;") - public static Js5 archive2; - @OriginalMember(owner = "client!id", name = "j", descriptor = "Lclient!of;") - public static QuickChatCommandDecoder decoder = null; - @OriginalMember(owner = "client!te", name = "y", descriptor = "Lclient!ve;") - public static Js5 archive1; - @OriginalMember(owner = "client!le", name = "e", descriptor = "I") - public static int anInt3490 = 0; - @OriginalMember(owner = "client!ck", name = "C", descriptor = "I") - public static int anInt1047 = 0; + @OriginalMember(owner = "client!ud", name = "P", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(64); + @OriginalMember(owner = "client!vf", name = "n", descriptor = "Lclient!ve;") + public static Js5 archive2; + @OriginalMember(owner = "client!id", name = "j", descriptor = "Lclient!of;") + public static QuickChatCommandDecoder decoder = null; + @OriginalMember(owner = "client!te", name = "y", descriptor = "Lclient!ve;") + public static Js5 archive1; + @OriginalMember(owner = "client!le", name = "e", descriptor = "I") + public static int anInt3490 = 0; + @OriginalMember(owner = "client!ck", name = "C", descriptor = "I") + public static int anInt1047 = 0; - @OriginalMember(owner = "client!ej", name = "a", descriptor = "(Lclient!ve;ILclient!ve;Lclient!of;)V") - public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) QuickChatCommandDecoder arg2) { - archive2 = arg0; - decoder = arg2; - archive1 = arg1; - if (archive1 != null) { - anInt3490 = archive1.getGroupCapacity(1); - } - if (archive2 != null) { - anInt1047 = archive2.getGroupCapacity(1); - } - } + @OriginalMember(owner = "client!ej", name = "a", descriptor = "(Lclient!ve;ILclient!ve;Lclient!of;)V") + public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) QuickChatCommandDecoder arg2) { + archive2 = arg0; + decoder = arg2; + archive1 = arg1; + if (archive1 != null) { + anInt3490 = archive1.getGroupCapacity(1); + } + if (archive2 != null) { + anInt1047 = archive2.getGroupCapacity(1); + } + } - @OriginalMember(owner = "client!sj", name = "b", descriptor = "(II)Lclient!cb;") - public static QuickChatPhraseType get(@OriginalArg(1) int arg0) { - @Pc(10) QuickChatPhraseType local10 = (QuickChatPhraseType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(27) byte[] local27; - if (arg0 < 32768) { - local27 = archive1.fetchFile(1, arg0); - } else { - local27 = archive2.fetchFile(1, arg0 & 0x7FFF); - } - local10 = new QuickChatPhraseType(); - if (local27 != null) { - local10.decode(new Buffer(local27)); - } - if (arg0 >= 32768) { - local10.method763(); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!sj", name = "b", descriptor = "(II)Lclient!cb;") + public static QuickChatPhraseType get(@OriginalArg(1) int arg0) { + @Pc(10) QuickChatPhraseType local10 = (QuickChatPhraseType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(27) byte[] local27; + if (arg0 < 32768) { + local27 = archive1.fetchFile(1, arg0); + } else { + local27 = archive2.fetchFile(1, arg0 & 0x7FFF); + } + local10 = new QuickChatPhraseType(); + if (local27 != null) { + local10.decode(new Buffer(local27)); + } + if (arg0 >= 32768) { + local10.method763(); + } + types.put(local10, arg0); + return local10; + } } diff --git a/client/src/main/java/rt4/RawModel.java b/client/src/main/java/rt4/RawModel.java index 28b8a7b..b855e4d 100644 --- a/client/src/main/java/rt4/RawModel.java +++ b/client/src/main/java/rt4/RawModel.java @@ -607,13 +607,13 @@ public final class RawModel extends Entity { @Pc(98) int local98 = local42 < local77 ? local42 : local77; @Pc(105) int local105 = local24 < local60 ? local24 : local60; if (arg5 != 0) { - @Pc(120) int local120 = (int) (Math.atan2((double) (local84 - local91), (double) arg5) * 325.95D) & 0x7FF; + @Pc(120) int local120 = (int) (Math.atan2(local84 - local91, arg5) * 325.95D) & 0x7FF; if (local120 != 0) { this.method1677(local120); } } if (arg4 != 0) { - @Pc(140) int local140 = (int) (Math.atan2((double) (local105 - local98), (double) arg4) * 325.95D) & 0x7FF; + @Pc(140) int local140 = (int) (Math.atan2(local105 - local98, arg4) * 325.95D) & 0x7FF; if (local140 != 0) { this.rotate(local140); } @@ -665,7 +665,7 @@ public final class RawModel extends Entity { local120 >>= 0x1; } - @Pc(174) int local174 = (int) Math.sqrt((double) (local112 * local112 + local120 * local120 + local128 * local128)); + @Pc(174) int local174 = (int) Math.sqrt(local112 * local112 + local120 * local120 + local128 * local128); if (local174 <= 0) { local174 = 1; } diff --git a/client/src/main/java/rt4/ReferenceNodeFactory.java b/client/src/main/java/rt4/ReferenceNodeFactory.java index 57cb0ec..3bbf02f 100644 --- a/client/src/main/java/rt4/ReferenceNodeFactory.java +++ b/client/src/main/java/rt4/ReferenceNodeFactory.java @@ -8,18 +8,18 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!q") public abstract class ReferenceNodeFactory { - @OriginalMember(owner = "client!uh", name = "ab", descriptor = "Lclient!q;") - public static final ReferenceNodeFactory SOFT_REFERENCE_NODE_FACTORY = createSoftReferenceNodeFactory(); + @OriginalMember(owner = "client!uh", name = "ab", descriptor = "Lclient!q;") + public static final ReferenceNodeFactory SOFT_REFERENCE_NODE_FACTORY = createSoftReferenceNodeFactory(); - @OriginalMember(owner = "client!dh", name = "b", descriptor = "(I)Lclient!q;") - public static ReferenceNodeFactory createSoftReferenceNodeFactory() { - try { - return new SoftReferenceNodeFactory(); - } catch (@Pc(15) Throwable local15) { - return null; - } - } + @OriginalMember(owner = "client!dh", name = "b", descriptor = "(I)Lclient!q;") + public static ReferenceNodeFactory createSoftReferenceNodeFactory() { + try { + return new SoftReferenceNodeFactory(); + } catch (@Pc(15) Throwable local15) { + return null; + } + } - @OriginalMember(owner = "client!q", name = "a", descriptor = "(Lclient!gf;I)Lclient!gf;") + @OriginalMember(owner = "client!q", name = "a", descriptor = "(Lclient!gf;I)Lclient!gf;") public abstract ReferenceNode create(@OriginalArg(0) ReferenceNode arg0); } diff --git a/client/src/main/java/rt4/ReflectionCheck.java b/client/src/main/java/rt4/ReflectionCheck.java index d45dd13..0d0d1b5 100644 --- a/client/src/main/java/rt4/ReflectionCheck.java +++ b/client/src/main/java/rt4/ReflectionCheck.java @@ -13,9 +13,9 @@ import java.lang.reflect.Method; @OriginalClass("client!ed") public final class ReflectionCheck extends Node { - @OriginalMember(owner = "client!qi", name = "u", descriptor = "Lclient!ih;") - public static LinkedList aClass69_113 = new LinkedList(); - @OriginalMember(owner = "client!ed", name = "p", descriptor = "I") + @OriginalMember(owner = "client!qi", name = "u", descriptor = "Lclient!ih;") + public static LinkedList aClass69_113 = new LinkedList(); + @OriginalMember(owner = "client!ed", name = "p", descriptor = "I") public int anInt1725; @OriginalMember(owner = "client!ed", name = "u", descriptor = "[Lsignlink!im;") @@ -39,124 +39,124 @@ public final class ReflectionCheck extends Node { @OriginalMember(owner = "client!ed", name = "F", descriptor = "I") public int anInt1732; - @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(); - 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; - } - if (local18.aClass212Array2[local25].status == 0) { - local23 = true; - } - } - if (local18.aClass212Array1[local25] != null) { - if (local18.aClass212Array1[local25].status == 2) { - local18.anIntArray138[local25] = -6; - } - if (local18.aClass212Array1[local25].status == 0) { - local23 = true; - } - } - } - if (local23) { - return; - } - 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) { - try { - @Pc(151) int local151 = local18.anIntArray139[local121]; - @Pc(168) Field local168; - @Pc(195) int local195; - if (local151 == 0) { - local168 = (Field) local18.aClass212Array2[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]); - arg0.p1(0); - } else if (local151 == 2) { - local168 = (Field) local18.aClass212Array2[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]; - @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])); - local243[local245] = local259.readObject(); - } - @Pc(272) Object local272 = local234.invoke(null, local243); - if (local272 == null) { - arg0.p1(0); - } else if (local272 instanceof Number) { - arg0.p1(1); - arg0.p8(((Number) local272).longValue()); - } else if (local272 instanceof JagString) { - arg0.p1(2); - arg0.pjstr((JagString) local272); - } else { - arg0.p1(4); - } - } else if (local151 == 4) { - local234 = (Method) local18.aClass212Array1[local121].result; - local195 = local234.getModifiers(); - arg0.p1(0); - arg0.p4(local195); - } - } catch (@Pc(338) ClassNotFoundException local338) { - arg0.p1(-10); - } catch (@Pc(344) InvalidClassException local344) { - arg0.p1(-11); - } catch (@Pc(350) StreamCorruptedException local350) { - arg0.p1(-12); - } catch (@Pc(356) OptionalDataException local356) { - arg0.p1(-13); - } catch (@Pc(362) IllegalAccessException local362) { - arg0.p1(-14); - } catch (@Pc(368) IllegalArgumentException local368) { - arg0.p1(-15); - } catch (@Pc(374) InvocationTargetException local374) { - arg0.p1(-16); - } catch (@Pc(380) SecurityException local380) { - arg0.p1(-17); - } catch (@Pc(386) IOException local386) { - arg0.p1(-18); - } catch (@Pc(392) NullPointerException local392) { - arg0.p1(-19); - } catch (@Pc(398) Exception local398) { - arg0.p1(-20); - } catch (@Pc(404) Throwable local404) { - arg0.p1(-21); - } - } else { - arg0.p1(local18.anIntArray138[local121]); - } - } - arg0.addcrc(local25); - arg0.psize1(arg0.offset - local25); - local18.unlink(); - } - } + @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(); + 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; + } + if (local18.aClass212Array2[local25].status == 0) { + local23 = true; + } + } + if (local18.aClass212Array1[local25] != null) { + if (local18.aClass212Array1[local25].status == 2) { + local18.anIntArray138[local25] = -6; + } + if (local18.aClass212Array1[local25].status == 0) { + local23 = true; + } + } + } + if (local23) { + return; + } + 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) { + try { + @Pc(151) int local151 = local18.anIntArray139[local121]; + @Pc(168) Field local168; + @Pc(195) int local195; + if (local151 == 0) { + local168 = (Field) local18.aClass212Array2[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]); + arg0.p1(0); + } else if (local151 == 2) { + local168 = (Field) local18.aClass212Array2[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]; + @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])); + local243[local245] = local259.readObject(); + } + @Pc(272) Object local272 = local234.invoke(null, local243); + if (local272 == null) { + arg0.p1(0); + } else if (local272 instanceof Number) { + arg0.p1(1); + arg0.p8(((Number) local272).longValue()); + } else if (local272 instanceof JagString) { + arg0.p1(2); + arg0.pjstr((JagString) local272); + } else { + arg0.p1(4); + } + } else if (local151 == 4) { + local234 = (Method) local18.aClass212Array1[local121].result; + local195 = local234.getModifiers(); + arg0.p1(0); + arg0.p4(local195); + } + } catch (@Pc(338) ClassNotFoundException local338) { + arg0.p1(-10); + } catch (@Pc(344) InvalidClassException local344) { + arg0.p1(-11); + } catch (@Pc(350) StreamCorruptedException local350) { + arg0.p1(-12); + } catch (@Pc(356) OptionalDataException local356) { + arg0.p1(-13); + } catch (@Pc(362) IllegalAccessException local362) { + arg0.p1(-14); + } catch (@Pc(368) IllegalArgumentException local368) { + arg0.p1(-15); + } catch (@Pc(374) InvocationTargetException local374) { + arg0.p1(-16); + } catch (@Pc(380) SecurityException local380) { + arg0.p1(-17); + } catch (@Pc(386) IOException local386) { + arg0.p1(-18); + } catch (@Pc(392) NullPointerException local392) { + arg0.p1(-19); + } catch (@Pc(398) Exception local398) { + arg0.p1(-20); + } catch (@Pc(404) Throwable local404) { + arg0.p1(-21); + } + } else { + arg0.p1(local18.anIntArray138[local121]); + } + } + arg0.addcrc(local25); + arg0.psize1(arg0.offset - local25); + local18.unlink(); + } + } - @OriginalMember(owner = "client!qg", name = "a", descriptor = "(Lsignlink!ll;Lclient!wa;IB)V") + @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(); @@ -223,31 +223,31 @@ public final class ReflectionCheck extends Node { aClass69_113.addTail(local17); } - @OriginalMember(owner = "client!j", name = "c", descriptor = "(I)V") - public static void method4625() { - aClass69_113 = new LinkedList(); - } + @OriginalMember(owner = "client!j", name = "c", descriptor = "(I)V") + public static void method4625() { + aClass69_113 = 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")) { - return Byte.TYPE; - } else if (arg0.equals("I")) { - return Integer.TYPE; - } else if (arg0.equals("S")) { - return Short.TYPE; - } else if (arg0.equals("J")) { - return Long.TYPE; - } else if (arg0.equals("Z")) { - return Boolean.TYPE; - } else if (arg0.equals("F")) { - return Float.TYPE; - } else if (arg0.equals("D")) { - return Double.TYPE; - } else if (arg0.equals("C")) { - return Character.TYPE; - } else { - return Class.forName(arg0); - } - } + @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")) { + return Byte.TYPE; + } else if (arg0.equals("I")) { + return Integer.TYPE; + } else if (arg0.equals("S")) { + return Short.TYPE; + } else if (arg0.equals("J")) { + return Long.TYPE; + } else if (arg0.equals("Z")) { + return Boolean.TYPE; + } else if (arg0.equals("F")) { + return Float.TYPE; + } else if (arg0.equals("D")) { + return Double.TYPE; + } else if (arg0.equals("C")) { + return Character.TYPE; + } else { + return Class.forName(arg0); + } + } } diff --git a/client/src/main/java/rt4/SceneGraph.java b/client/src/main/java/rt4/SceneGraph.java index f7b9e0c..e0f9c71 100644 --- a/client/src/main/java/rt4/SceneGraph.java +++ b/client/src/main/java/rt4/SceneGraph.java @@ -6,2304 +6,2304 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class SceneGraph { - @OriginalMember(owner = "client!bb", name = "g", descriptor = "[[[B") - public static final byte[][][] tileFlags = new byte[4][104][104]; - @OriginalMember(owner = "client!mi", name = "Y", descriptor = "[[[Lclient!ih;") - public static final LinkedList[][][] objStacks = new LinkedList[4][104][104]; - @OriginalMember(owner = "client!te", name = "B", descriptor = "[I") - public static final int[] anIntArray469 = new int[]{0, -1, 0, 1}; - @OriginalMember(owner = "client!fb", name = "q", descriptor = "[I") - public static final int[] anIntArray154 = new int[]{-1, -1, 1, 1}; - @OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;") - public static Tile[][][] tiles; + @OriginalMember(owner = "client!bb", name = "g", descriptor = "[[[B") + public static final byte[][][] tileFlags = new byte[4][104][104]; + @OriginalMember(owner = "client!mi", name = "Y", descriptor = "[[[Lclient!ih;") + public static final LinkedList[][][] objStacks = new LinkedList[4][104][104]; + @OriginalMember(owner = "client!te", name = "B", descriptor = "[I") + public static final int[] anIntArray469 = new int[]{0, -1, 0, 1}; + @OriginalMember(owner = "client!fb", name = "q", descriptor = "[I") + public static final int[] anIntArray154 = new int[]{-1, -1, 1, 1}; + @OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;") + public static Tile[][][] tiles; - @OriginalMember(owner = "client!gj", name = "m", descriptor = "[[[I") - public static int[][][] tileHeights; - @OriginalMember(owner = "client!id", name = "i", descriptor = "[[[I") - public static int[][][] surfaceTileHeights; - @OriginalMember(owner = "client!tg", name = "g", descriptor = "[[[B") - public static byte[][][] tileOverlays; - @OriginalMember(owner = "client!n", name = "h", descriptor = "[[[B") - public static byte[][][] tileShapes; - @OriginalMember(owner = "client!ac", name = "e", descriptor = "[[[B") - public static byte[][][] tileAngles; - @OriginalMember(owner = "client!ui", name = "eb", descriptor = "[[[B") - public static byte[][][] tileUnderlays; - @OriginalMember(owner = "client!em", name = "t", descriptor = "[[[I") - public static int[][][] anIntArrayArrayArray6; - @OriginalMember(owner = "client!ka", name = "r", descriptor = "[I") - public static int[] rowCount; - @OriginalMember(owner = "client!lg", name = "k", descriptor = "I") - public static int firstVisibleLevel = 99; - @OriginalMember(owner = "client!ug", name = "d", descriptor = "[I") - public static int[] rowChroma; - @OriginalMember(owner = "client!l", name = "l", descriptor = "[I") - public static int[] rowSaturation; - @OriginalMember(owner = "client!s", name = "i", descriptor = "[I") - public static int[] rowWeightedHue; - @OriginalMember(owner = "client!jd", name = "d", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray9; - @OriginalMember(owner = "client!wk", name = "v", descriptor = "[I") - public static int[] rowLightness; - @OriginalMember(owner = "client!ub", name = "h", descriptor = "[Lclient!pe;") - public static SceneGraph_Class120[] aClass120Array2; - @OriginalMember(owner = "client!rh", name = "k", descriptor = "I") - public static int anInt4870 = 0; - @OriginalMember(owner = "client!bl", name = "T", descriptor = "I") - public static int sceneryLen = 0; - @OriginalMember(owner = "client!pm", name = "cb", descriptor = "[[[Lclient!bj;") - public static Tile[][][] surfaceGroundTiles; - @OriginalMember(owner = "client!client", name = "kb", descriptor = "[[Lclient!hg;") - public static GlTile[][] surfaceHdTiles; - @OriginalMember(owner = "client!wh", name = "c", descriptor = "[[[Lclient!bj;") - public static Tile[][][] underWaterGroundTiles; - @OriginalMember(owner = "client!pk", name = "R", descriptor = "[[Lclient!hg;") - public static GlTile[][] underWaterHdTiles; - @OriginalMember(owner = "client!hc", name = "O", descriptor = "[Lclient!pe;") - public static SceneGraph_Class120[] aClass120Array1; - @OriginalMember(owner = "client!ma", name = "i", descriptor = "I") - public static int width; - @OriginalMember(owner = "client!hk", name = "Y", descriptor = "I") - public static int length; - @OriginalMember(owner = "client!cd", name = "s", descriptor = "I") - public static int anInt917; - @OriginalMember(owner = "client!tk", name = "D", descriptor = "[Lclient!ec;") - public static Scenery[] scenery; - @OriginalMember(owner = "client!c", name = "bb", descriptor = "[Lclient!ec;") - public static Scenery[] aClass31Array2; - @OriginalMember(owner = "client!gf", name = "O", descriptor = "[[[I") - public static int[][][] underwaterTileHeights; - @OriginalMember(owner = "client!oj", name = "E", descriptor = "[[Lclient!hg;") - public static GlTile[][] underwaterHdTiles; - @OriginalMember(owner = "client!jm", name = "r", descriptor = "I") - public static int levels; - @OriginalMember(owner = "client!sm", name = "e", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray13; - @OriginalMember(owner = "client!wi", name = "db", descriptor = "I") - public static int visibility; - @OriginalMember(owner = "client!f", name = "ab", descriptor = "[[I") - public static int[][] anIntArrayArray11; - @OriginalMember(owner = "client!la", name = "i", descriptor = "[[[I") - public static int[][][] anIntArrayArrayArray12; - @OriginalMember(owner = "client!dl", name = "h", descriptor = "[[Z") - public static boolean[][] aBooleanArrayArray1; - @OriginalMember(owner = "client!ha", name = "k", descriptor = "[[Z") - public static boolean[][] aBooleanArrayArray3; - @OriginalMember(owner = "client!og", name = "b", descriptor = "I") - public static int currentChunkZ; - @OriginalMember(owner = "client!ja", name = "q", descriptor = "I") - public static int currentChunkX; - @OriginalMember(owner = "client!gm", name = "R", descriptor = "I") - 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!gj", name = "m", descriptor = "[[[I") + public static int[][][] tileHeights; + @OriginalMember(owner = "client!id", name = "i", descriptor = "[[[I") + public static int[][][] surfaceTileHeights; + @OriginalMember(owner = "client!tg", name = "g", descriptor = "[[[B") + public static byte[][][] tileOverlays; + @OriginalMember(owner = "client!n", name = "h", descriptor = "[[[B") + public static byte[][][] tileShapes; + @OriginalMember(owner = "client!ac", name = "e", descriptor = "[[[B") + public static byte[][][] tileAngles; + @OriginalMember(owner = "client!ui", name = "eb", descriptor = "[[[B") + public static byte[][][] tileUnderlays; + @OriginalMember(owner = "client!em", name = "t", descriptor = "[[[I") + public static int[][][] anIntArrayArrayArray6; + @OriginalMember(owner = "client!ka", name = "r", descriptor = "[I") + public static int[] rowCount; + @OriginalMember(owner = "client!lg", name = "k", descriptor = "I") + public static int firstVisibleLevel = 99; + @OriginalMember(owner = "client!ug", name = "d", descriptor = "[I") + public static int[] rowChroma; + @OriginalMember(owner = "client!l", name = "l", descriptor = "[I") + public static int[] rowSaturation; + @OriginalMember(owner = "client!s", name = "i", descriptor = "[I") + public static int[] rowWeightedHue; + @OriginalMember(owner = "client!jd", name = "d", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray9; + @OriginalMember(owner = "client!wk", name = "v", descriptor = "[I") + public static int[] rowLightness; + @OriginalMember(owner = "client!ub", name = "h", descriptor = "[Lclient!pe;") + public static SceneGraph_Class120[] aClass120Array2; + @OriginalMember(owner = "client!rh", name = "k", descriptor = "I") + public static int anInt4870 = 0; + @OriginalMember(owner = "client!bl", name = "T", descriptor = "I") + public static int sceneryLen = 0; + @OriginalMember(owner = "client!pm", name = "cb", descriptor = "[[[Lclient!bj;") + public static Tile[][][] surfaceGroundTiles; + @OriginalMember(owner = "client!client", name = "kb", descriptor = "[[Lclient!hg;") + public static GlTile[][] surfaceHdTiles; + @OriginalMember(owner = "client!wh", name = "c", descriptor = "[[[Lclient!bj;") + public static Tile[][][] underWaterGroundTiles; + @OriginalMember(owner = "client!pk", name = "R", descriptor = "[[Lclient!hg;") + public static GlTile[][] underWaterHdTiles; + @OriginalMember(owner = "client!hc", name = "O", descriptor = "[Lclient!pe;") + public static SceneGraph_Class120[] aClass120Array1; + @OriginalMember(owner = "client!ma", name = "i", descriptor = "I") + public static int width; + @OriginalMember(owner = "client!hk", name = "Y", descriptor = "I") + public static int length; + @OriginalMember(owner = "client!cd", name = "s", descriptor = "I") + public static int anInt917; + @OriginalMember(owner = "client!tk", name = "D", descriptor = "[Lclient!ec;") + public static Scenery[] scenery; + @OriginalMember(owner = "client!c", name = "bb", descriptor = "[Lclient!ec;") + public static Scenery[] aClass31Array2; + @OriginalMember(owner = "client!gf", name = "O", descriptor = "[[[I") + public static int[][][] underwaterTileHeights; + @OriginalMember(owner = "client!oj", name = "E", descriptor = "[[Lclient!hg;") + public static GlTile[][] underwaterHdTiles; + @OriginalMember(owner = "client!jm", name = "r", descriptor = "I") + public static int levels; + @OriginalMember(owner = "client!sm", name = "e", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray13; + @OriginalMember(owner = "client!wi", name = "db", descriptor = "I") + public static int visibility; + @OriginalMember(owner = "client!f", name = "ab", descriptor = "[[I") + public static int[][] anIntArrayArray11; + @OriginalMember(owner = "client!la", name = "i", descriptor = "[[[I") + public static int[][][] anIntArrayArrayArray12; + @OriginalMember(owner = "client!dl", name = "h", descriptor = "[[Z") + public static boolean[][] aBooleanArrayArray1; + @OriginalMember(owner = "client!ha", name = "k", descriptor = "[[Z") + public static boolean[][] aBooleanArrayArray3; + @OriginalMember(owner = "client!og", name = "b", descriptor = "I") + public static int currentChunkZ; + @OriginalMember(owner = "client!ja", name = "q", descriptor = "I") + public static int currentChunkX; + @OriginalMember(owner = "client!gm", name = "R", descriptor = "I") + 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!km", name = "f", descriptor = "(I)Z") - public static boolean allLevelsAreVisible() { - return GlRenderer.enabled || Preferences.allLevelsVisible; - } + @OriginalMember(owner = "client!km", name = "f", descriptor = "(I)Z") + public static boolean allLevelsAreVisible() { + return GlRenderer.enabled || Preferences.allLevelsVisible; + } - @OriginalMember(owner = "client!ql", name = "a", descriptor = "(IIII)I") - public static int getTileHeight(@OriginalArg(0) int level, @OriginalArg(2) int xFine, @OriginalArg(3) int zFine) { - if (tileHeights == null) { - return 0; - } - @Pc(12) int x = xFine >> 7; - @Pc(16) int z = zFine >> 7; - if (x < 0 || z < 0 || x > 103 || z > 103) { - return 0; - } - @Pc(36) int xFine2 = xFine & 0x7F; - @Pc(40) int zFine2 = zFine & 0x7F; - @Pc(42) int virtualLevel = level; - if (level < 3 && (tileFlags[1][x][z] & 0x2) == 2) { - virtualLevel = level + 1; - } - @Pc(91) int heightZ0 = xFine2 * tileHeights[virtualLevel][x + 1][z + 1] + tileHeights[virtualLevel][x][z + 1] * (128 - xFine2) >> 7; - @Pc(118) int heightZ1 = xFine2 * tileHeights[virtualLevel][x + 1][z] + (128 - xFine2) * tileHeights[virtualLevel][x][z] >> 7; - return zFine2 * heightZ0 + (128 - zFine2) * heightZ1 >> 7; - } + @OriginalMember(owner = "client!ql", name = "a", descriptor = "(IIII)I") + public static int getTileHeight(@OriginalArg(0) int level, @OriginalArg(2) int xFine, @OriginalArg(3) int zFine) { + if (tileHeights == null) { + return 0; + } + @Pc(12) int x = xFine >> 7; + @Pc(16) int z = zFine >> 7; + if (x < 0 || z < 0 || x > 103 || z > 103) { + return 0; + } + @Pc(36) int xFine2 = xFine & 0x7F; + @Pc(40) int zFine2 = zFine & 0x7F; + @Pc(42) int virtualLevel = level; + if (level < 3 && (tileFlags[1][x][z] & 0x2) == 2) { + virtualLevel = level + 1; + } + @Pc(91) int heightZ0 = xFine2 * tileHeights[virtualLevel][x + 1][z + 1] + tileHeights[virtualLevel][x][z + 1] * (128 - xFine2) >> 7; + @Pc(118) int heightZ1 = xFine2 * tileHeights[virtualLevel][x + 1][z] + (128 - xFine2) * tileHeights[virtualLevel][x][z] >> 7; + return zFine2 * heightZ0 + (128 - zFine2) * heightZ1 >> 7; + } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(III)Lclient!jh;") - public static Wall removeWall(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; - if (local7 == null) { - return null; - } else { - @Pc(14) Wall local14 = local7.wall; - local7.wall = null; - return local14; - } - } + @OriginalMember(owner = "client!ih", name = "a", descriptor = "(III)Lclient!jh;") + public static Wall removeWall(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; + if (local7 == null) { + return null; + } else { + @Pc(14) Wall local14 = local7.wall; + local7.wall = null; + return local14; + } + } - @OriginalMember(owner = "client!fc", name = "a", descriptor = "()V") - public static void clear() { - @Pc(3) int local3; - @Pc(9) int local9; - @Pc(14) int local14; - if (surfaceGroundTiles != null) { - for (local3 = 0; local3 < surfaceGroundTiles.length; local3++) { - for (local9 = 0; local9 < width; local9++) { - for (local14 = 0; local14 < length; local14++) { - surfaceGroundTiles[local3][local9][local14] = null; - } - } - } - } - surfaceHdTiles = null; - if (underWaterGroundTiles != null) { - for (local3 = 0; local3 < underWaterGroundTiles.length; local3++) { - for (local9 = 0; local9 < width; local9++) { - for (local14 = 0; local14 < length; local14++) { - underWaterGroundTiles[local3][local9][local14] = null; - } - } - } - } - underWaterHdTiles = null; - anInt917 = 0; - if (aClass120Array1 != null) { - for (local3 = 0; local3 < anInt917; local3++) { - aClass120Array1[local3] = null; - } - } - if (scenery != null) { - for (local3 = 0; local3 < sceneryLen; local3++) { - scenery[local3] = null; - } - sceneryLen = 0; - } - if (aClass31Array2 != null) { - for (local3 = 0; local3 < aClass31Array2.length; local3++) { - aClass31Array2[local3] = null; - } - } - } + @OriginalMember(owner = "client!fc", name = "a", descriptor = "()V") + public static void clear() { + @Pc(3) int local3; + @Pc(9) int local9; + @Pc(14) int local14; + if (surfaceGroundTiles != null) { + for (local3 = 0; local3 < surfaceGroundTiles.length; local3++) { + for (local9 = 0; local9 < width; local9++) { + for (local14 = 0; local14 < length; local14++) { + surfaceGroundTiles[local3][local9][local14] = null; + } + } + } + } + surfaceHdTiles = null; + if (underWaterGroundTiles != null) { + for (local3 = 0; local3 < underWaterGroundTiles.length; local3++) { + for (local9 = 0; local9 < width; local9++) { + for (local14 = 0; local14 < length; local14++) { + underWaterGroundTiles[local3][local9][local14] = null; + } + } + } + } + underWaterHdTiles = null; + anInt917 = 0; + if (aClass120Array1 != null) { + for (local3 = 0; local3 < anInt917; local3++) { + aClass120Array1[local3] = null; + } + } + if (scenery != null) { + for (local3 = 0; local3 < sceneryLen; local3++) { + scenery[local3] = null; + } + sceneryLen = 0; + } + if (aClass31Array2 != null) { + for (local3 = 0; local3 < aClass31Array2.length; local3++) { + aClass31Array2[local3] = null; + } + } + } - @OriginalMember(owner = "client!vf", name = "a", descriptor = "(III)Lclient!jh;") - public static Wall getWall(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - return tile == null ? null : tile.wall; - } + @OriginalMember(owner = "client!vf", name = "a", descriptor = "(III)Lclient!jh;") + public static Wall getWall(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + return tile == null ? null : tile.wall; + } - @OriginalMember(owner = "client!gj", name = "a", descriptor = "(III)Lclient!df;") - public static WallDecor getWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - return tile == null ? null : tile.wallDecor; - } + @OriginalMember(owner = "client!gj", name = "a", descriptor = "(III)Lclient!df;") + public static WallDecor getWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + return tile == null ? null : tile.wallDecor; + } - @OriginalMember(owner = "client!kf", name = "b", descriptor = "(III)Lclient!ec;") - public static Scenery getScenery(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - if (tile == null) { - return null; - } - for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { - @Pc(22) Scenery scenery = tile.scenery[i]; - if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { - return scenery; - } - } - return null; - } + @OriginalMember(owner = "client!kf", name = "b", descriptor = "(III)Lclient!ec;") + public static Scenery getScenery(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + if (tile == null) { + return null; + } + for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { + @Pc(22) Scenery scenery = tile.scenery[i]; + if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { + return scenery; + } + } + return null; + } - @OriginalMember(owner = "client!wa", name = "a", descriptor = "(III)Lclient!bm;") - public static GroundDecor getGroundDecor(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; - return local7 == null || local7.groundDecor == null ? null : local7.groundDecor; - } + @OriginalMember(owner = "client!wa", name = "a", descriptor = "(III)Lclient!bm;") + public static GroundDecor getGroundDecor(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; + return local7 == null || local7.groundDecor == null ? null : local7.groundDecor; + } - @OriginalMember(owner = "client!v", name = "a", descriptor = "(IIIJ)Z") - public static boolean isLocValid(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) long arg3) { - @Pc(7) Tile tile = tiles[arg0][arg1][arg2]; - if (tile == null) { - return false; - } else if (tile.wall != null && tile.wall.key == arg3) { - return true; - } else if (tile.wallDecor != null && tile.wallDecor.key == arg3) { - return true; - } else if (tile.groundDecor != null && tile.groundDecor.key == arg3) { - return true; - } else { - for (@Pc(46) int local46 = 0; local46 < tile.sceneryLen; local46++) { - if (tile.scenery[local46].key == arg3) { - return true; - } - } - return false; - } - } + @OriginalMember(owner = "client!v", name = "a", descriptor = "(IIIJ)Z") + public static boolean isLocValid(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) long arg3) { + @Pc(7) Tile tile = tiles[arg0][arg1][arg2]; + if (tile == null) { + return false; + } else if (tile.wall != null && tile.wall.key == arg3) { + return true; + } else if (tile.wallDecor != null && tile.wallDecor.key == arg3) { + return true; + } else if (tile.groundDecor != null && tile.groundDecor.key == arg3) { + return true; + } else { + for (@Pc(46) int local46 = 0; local46 < tile.sceneryLen; local46++) { + if (tile.scenery[local46].key == arg3) { + return true; + } + } + return false; + } + } - @OriginalMember(owner = "client!pl", name = "a", descriptor = "(ZI)V") - public static void load(@OriginalArg(0) boolean underwater) { - rowWeightedHue = new int[104]; - rowSaturation = new int[104]; - firstVisibleLevel = 99; - rowChroma = new int[104]; - @Pc(14) byte plane; - if (underwater) { - plane = 1; - } else { - plane = 4; - } - tileShapes = new byte[plane][104][104]; - rowCount = new int[104]; - anIntArrayArrayArray6 = new int[plane][105][105]; - aByteArrayArrayArray9 = new byte[plane][105][105]; - tileOverlays = new byte[plane][104][104]; - rowLightness = new int[104]; - tileAngles = new byte[plane][104][104]; - tileUnderlays = new byte[plane][104][104]; - } + @OriginalMember(owner = "client!pl", name = "a", descriptor = "(ZI)V") + public static void load(@OriginalArg(0) boolean underwater) { + rowWeightedHue = new int[104]; + rowSaturation = new int[104]; + firstVisibleLevel = 99; + rowChroma = new int[104]; + @Pc(14) byte plane; + if (underwater) { + plane = 1; + } else { + plane = 4; + } + tileShapes = new byte[plane][104][104]; + rowCount = new int[104]; + anIntArrayArrayArray6 = new int[plane][105][105]; + aByteArrayArrayArray9 = new byte[plane][105][105]; + tileOverlays = new byte[plane][104][104]; + rowLightness = new int[104]; + tileAngles = new byte[plane][104][104]; + tileUnderlays = new byte[plane][104][104]; + } - @OriginalMember(owner = "client!ib", name = "b", descriptor = "(I)V") - public static void unload() { - rowChroma = null; - anIntArrayArrayArray6 = null; - rowCount = null; - tileShapes = null; - tileAngles = null; - aByteArrayArrayArray9 = null; - tileOverlays = null; - tileUnderlays = null; - rowSaturation = null; - rowWeightedHue = null; - rowLightness = null; - } + @OriginalMember(owner = "client!ib", name = "b", descriptor = "(I)V") + public static void unload() { + rowChroma = null; + anIntArrayArrayArray6 = null; + rowCount = null; + tileShapes = null; + tileAngles = null; + aByteArrayArrayArray9 = null; + tileOverlays = null; + tileUnderlays = null; + rowSaturation = null; + rowWeightedHue = null; + rowLightness = null; + } - @OriginalMember(owner = "client!um", name = "c", descriptor = "(III)Z") - public static boolean method4394(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - for (@Pc(1) int local1 = 0; local1 < anInt4870; local1++) { - @Pc(8) SceneGraph_Class120 local8 = aClass120Array2[local1]; - @Pc(17) int local17; - @Pc(29) int local29; - @Pc(39) int local39; - @Pc(49) int local49; - @Pc(59) int local59; - if (local8.anInt4462 == 1) { - local17 = local8.anInt4460 - arg0; - if (local17 > 0) { - local29 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); - local39 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); - local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); - local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); - if (arg2 >= local29 && arg2 <= local39 && arg1 >= local49 && arg1 <= local59) { - return true; - } - } - } else if (local8.anInt4462 == 2) { - local17 = arg0 - local8.anInt4460; - if (local17 > 0) { - local29 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); - local39 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); - local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); - local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); - if (arg2 >= local29 && arg2 <= local39 && arg1 >= local49 && arg1 <= local59) { - return true; - } - } - } else if (local8.anInt4462 == 3) { - local17 = local8.anInt4458 - arg2; - if (local17 > 0) { - local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); - local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); - local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); - local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); - if (arg0 >= local29 && arg0 <= local39 && arg1 >= local49 && arg1 <= local59) { - return true; - } - } - } else if (local8.anInt4462 == 4) { - local17 = arg2 - local8.anInt4458; - if (local17 > 0) { - local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); - local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); - local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); - local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); - if (arg0 >= local29 && arg0 <= local39 && arg1 >= local49 && arg1 <= local59) { - return true; - } - } - } else if (local8.anInt4462 == 5) { - local17 = arg1 - local8.anInt4444; - if (local17 > 0) { - local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); - local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); - local49 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); - local59 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); - if (arg0 >= local29 && arg0 <= local39 && arg2 >= local49 && arg2 <= local59) { - return true; - } - } - } - } - return false; - } + @OriginalMember(owner = "client!um", name = "c", descriptor = "(III)Z") + public static boolean method4394(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + for (@Pc(1) int local1 = 0; local1 < anInt4870; local1++) { + @Pc(8) SceneGraph_Class120 local8 = aClass120Array2[local1]; + @Pc(17) int local17; + @Pc(29) int local29; + @Pc(39) int local39; + @Pc(49) int local49; + @Pc(59) int local59; + if (local8.anInt4462 == 1) { + local17 = local8.anInt4460 - arg0; + if (local17 > 0) { + local29 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); + local39 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); + local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); + local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); + if (arg2 >= local29 && arg2 <= local39 && arg1 >= local49 && arg1 <= local59) { + return true; + } + } + } else if (local8.anInt4462 == 2) { + local17 = arg0 - local8.anInt4460; + if (local17 > 0) { + local29 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); + local39 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); + local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); + local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); + if (arg2 >= local29 && arg2 <= local39 && arg1 >= local49 && arg1 <= local59) { + return true; + } + } + } else if (local8.anInt4462 == 3) { + local17 = local8.anInt4458 - arg2; + if (local17 > 0) { + local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); + local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); + local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); + local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); + if (arg0 >= local29 && arg0 <= local39 && arg1 >= local49 && arg1 <= local59) { + return true; + } + } + } else if (local8.anInt4462 == 4) { + local17 = arg2 - local8.anInt4458; + if (local17 > 0) { + local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); + local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); + local49 = local8.anInt4444 + (local8.anInt4459 * local17 >> 8); + local59 = local8.anInt4447 + (local8.anInt4463 * local17 >> 8); + if (arg0 >= local29 && arg0 <= local39 && arg1 >= local49 && arg1 <= local59) { + return true; + } + } + } else if (local8.anInt4462 == 5) { + local17 = arg1 - local8.anInt4444; + if (local17 > 0) { + local29 = local8.anInt4460 + (local8.anInt4448 * local17 >> 8); + local39 = local8.anInt4445 + (local8.anInt4456 * local17 >> 8); + local49 = local8.anInt4458 + (local8.anInt4454 * local17 >> 8); + local59 = local8.anInt4449 + (local8.anInt4450 * local17 >> 8); + if (arg0 >= local29 && arg0 <= local39 && arg2 >= local49 && arg2 <= local59) { + return true; + } + } + } + } + return false; + } - @OriginalMember(owner = "client!bj", name = "a", descriptor = "(III)J") - public static long getGroundDecorKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - return tile == null || tile.groundDecor == null ? 0L : tile.groundDecor.key; - } + @OriginalMember(owner = "client!bj", name = "a", descriptor = "(III)J") + public static long getGroundDecorKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + return tile == null || tile.groundDecor == null ? 0L : tile.groundDecor.key; + } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(Z)V") - public static void setUnderwater(@OriginalArg(0) boolean underwater) { - if (underwater) { - tiles = underWaterGroundTiles; - tileHeights = underwaterTileHeights; - underwaterHdTiles = underWaterHdTiles; - } else { - tiles = surfaceGroundTiles; - tileHeights = surfaceTileHeights; - underwaterHdTiles = surfaceHdTiles; - } - levels = tiles.length; - } + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(Z)V") + public static void setUnderwater(@OriginalArg(0) boolean underwater) { + if (underwater) { + tiles = underWaterGroundTiles; + tileHeights = underwaterTileHeights; + underwaterHdTiles = underWaterHdTiles; + } else { + tiles = surfaceGroundTiles; + tileHeights = surfaceTileHeights; + underwaterHdTiles = surfaceHdTiles; + } + levels = tiles.length; + } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIZLclient!wa;IIBII)V") - public static void readTile(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) Buffer buffer, @OriginalArg(4) int z, @OriginalArg(5) int x, @OriginalArg(7) int angle, @OriginalArg(8) int level) { - @Pc(32) int opcode; - if (x < 0 || x >= 104 || z < 0 || z >= 104) { - while (true) { - opcode = buffer.g1(); - if (opcode == 0) { - break; - } - if (opcode == 1) { - buffer.g1(); - break; - } - if (opcode <= 49) { - buffer.g1(); - } - } - return; - } - if (!arg2) { - tileFlags[level][x][z] = 0; - } - while (true) { - opcode = buffer.g1(); - if (opcode == 0) { - if (arg2) { - tileHeights[0][x][z] = surfaceTileHeights[0][x][z]; - } else if (level == 0) { - tileHeights[0][x][z] = -PerlinNoise.getTileHeight(z + arg1 + 556238, arg0 + x + 932731) * 8; - } else { - tileHeights[level][x][z] = tileHeights[level - 1][x][z] - 240; - } - break; - } - if (opcode == 1) { - @Pc(111) int height = buffer.g1(); - if (arg2) { - tileHeights[0][x][z] = surfaceTileHeights[0][x][z] + height * 8; - } else { - if (height == 1) { - height = 0; - } - if (level == 0) { - tileHeights[0][x][z] = -height * 8; - } else { - tileHeights[level][x][z] = tileHeights[level - 1][x][z] - height * 8; - } - } - break; - } - if (opcode <= 49) { - tileOverlays[level][x][z] = buffer.g1b(); - tileShapes[level][x][z] = (byte) ((opcode - 2) / 4); - tileAngles[level][x][z] = (byte) (opcode + angle - 2 & 0x3); - } else if (opcode > 81) { - tileUnderlays[level][x][z] = (byte) (opcode - 81); - } else if (!arg2) { - tileFlags[level][x][z] = (byte) (opcode - 49); - } - } - } + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIZLclient!wa;IIBII)V") + public static void readTile(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) Buffer buffer, @OriginalArg(4) int z, @OriginalArg(5) int x, @OriginalArg(7) int angle, @OriginalArg(8) int level) { + @Pc(32) int opcode; + if (x < 0 || x >= 104 || z < 0 || z >= 104) { + while (true) { + opcode = buffer.g1(); + if (opcode == 0) { + break; + } + if (opcode == 1) { + buffer.g1(); + break; + } + if (opcode <= 49) { + buffer.g1(); + } + } + return; + } + if (!arg2) { + tileFlags[level][x][z] = 0; + } + while (true) { + opcode = buffer.g1(); + if (opcode == 0) { + if (arg2) { + tileHeights[0][x][z] = surfaceTileHeights[0][x][z]; + } else if (level == 0) { + tileHeights[0][x][z] = -PerlinNoise.getTileHeight(z + arg1 + 556238, arg0 + x + 932731) * 8; + } else { + tileHeights[level][x][z] = tileHeights[level - 1][x][z] - 240; + } + break; + } + if (opcode == 1) { + @Pc(111) int height = buffer.g1(); + if (arg2) { + tileHeights[0][x][z] = surfaceTileHeights[0][x][z] + height * 8; + } else { + if (height == 1) { + height = 0; + } + if (level == 0) { + tileHeights[0][x][z] = -height * 8; + } else { + tileHeights[level][x][z] = tileHeights[level - 1][x][z] - height * 8; + } + } + break; + } + if (opcode <= 49) { + tileOverlays[level][x][z] = buffer.g1b(); + tileShapes[level][x][z] = (byte) ((opcode - 2) / 4); + tileAngles[level][x][z] = (byte) (opcode + angle - 2 & 0x3); + } else if (opcode > 81) { + tileUnderlays[level][x][z] = (byte) (opcode - 81); + } else if (!arg2) { + tileFlags[level][x][z] = (byte) (opcode - 49); + } + } + } - @OriginalMember(owner = "client!hd", name = "a", descriptor = "(IIIIIIII)V") - public static void method1881(@OriginalArg(0) int level, @OriginalArg(2) int arg1, @OriginalArg(3) int shape, @OriginalArg(4) int z, @OriginalArg(5) int layer, @OriginalArg(6) int x, @OriginalArg(7) int arg6) { - if (x < 0 || z < 0 || x >= 103 || z >= 103) { - return; - } - @Pc(38) int locId; - if (layer == 0) { - @Pc(28) Wall wall = getWall(level, x, z); - if (wall != null) { - locId = Integer.MAX_VALUE & (int) (wall.key >>> 32); - if (shape == 2) { - wall.primary = new Loc(locId, 2, arg1 + 4, level, x, z, arg6, false, wall.primary); - wall.secondary = new Loc(locId, 2, arg1 + 1 & 0x3, level, x, z, arg6, false, wall.secondary); - } else { - wall.primary = new Loc(locId, shape, arg1, level, x, z, arg6, false, wall.primary); - } - } - } - if (layer == 1) { - @Pc(106) WallDecor wallDecor = getWallDecor(level, x, z); - if (wallDecor != null) { - locId = (int) (wallDecor.key >>> 32) & Integer.MAX_VALUE; - if (shape == 4 || shape == 5) { - wallDecor.primary = new Loc(locId, 4, arg1, level, x, z, arg6, false, wallDecor.primary); - } else if (shape == 6) { - wallDecor.primary = new Loc(locId, 4, arg1 + 4, level, x, z, arg6, false, wallDecor.primary); - } else if (shape == 7) { - wallDecor.primary = new Loc(locId, 4, (arg1 + 2 & 0x3) + 4, level, x, z, arg6, false, wallDecor.primary); - } else if (shape == 8) { - wallDecor.primary = new Loc(locId, 4, arg1 + 4, level, x, z, arg6, false, wallDecor.primary); - wallDecor.secondary = new Loc(locId, 4, (arg1 + 2 & 0x3) + 4, level, x, z, arg6, false, wallDecor.secondary); - } - } - } - if (layer == 2) { - if (shape == 11) { - shape = 10; - } - @Pc(255) Scenery scenery = getScenery(level, x, z); - if (scenery != null) { - scenery.entity = new Loc((int) (scenery.key >>> 32) & Integer.MAX_VALUE, shape, arg1, level, x, z, arg6, false, scenery.entity); - } - } - if (layer == 3) { - @Pc(290) GroundDecor groundDecor = getGroundDecor(level, x, z); - if (groundDecor != null) { - groundDecor.entity = new Loc(Integer.MAX_VALUE & (int) (groundDecor.key >>> 32), 22, arg1, level, x, z, arg6, false, groundDecor.entity); - } - } - } + @OriginalMember(owner = "client!hd", name = "a", descriptor = "(IIIIIIII)V") + public static void method1881(@OriginalArg(0) int level, @OriginalArg(2) int arg1, @OriginalArg(3) int shape, @OriginalArg(4) int z, @OriginalArg(5) int layer, @OriginalArg(6) int x, @OriginalArg(7) int arg6) { + if (x < 0 || z < 0 || x >= 103 || z >= 103) { + return; + } + @Pc(38) int locId; + if (layer == 0) { + @Pc(28) Wall wall = getWall(level, x, z); + if (wall != null) { + locId = Integer.MAX_VALUE & (int) (wall.key >>> 32); + if (shape == 2) { + wall.primary = new Loc(locId, 2, arg1 + 4, level, x, z, arg6, false, wall.primary); + wall.secondary = new Loc(locId, 2, arg1 + 1 & 0x3, level, x, z, arg6, false, wall.secondary); + } else { + wall.primary = new Loc(locId, shape, arg1, level, x, z, arg6, false, wall.primary); + } + } + } + if (layer == 1) { + @Pc(106) WallDecor wallDecor = getWallDecor(level, x, z); + if (wallDecor != null) { + locId = (int) (wallDecor.key >>> 32) & Integer.MAX_VALUE; + if (shape == 4 || shape == 5) { + wallDecor.primary = new Loc(locId, 4, arg1, level, x, z, arg6, false, wallDecor.primary); + } else if (shape == 6) { + wallDecor.primary = new Loc(locId, 4, arg1 + 4, level, x, z, arg6, false, wallDecor.primary); + } else if (shape == 7) { + wallDecor.primary = new Loc(locId, 4, (arg1 + 2 & 0x3) + 4, level, x, z, arg6, false, wallDecor.primary); + } else if (shape == 8) { + wallDecor.primary = new Loc(locId, 4, arg1 + 4, level, x, z, arg6, false, wallDecor.primary); + wallDecor.secondary = new Loc(locId, 4, (arg1 + 2 & 0x3) + 4, level, x, z, arg6, false, wallDecor.secondary); + } + } + } + if (layer == 2) { + if (shape == 11) { + shape = 10; + } + @Pc(255) Scenery scenery = getScenery(level, x, z); + if (scenery != null) { + scenery.entity = new Loc((int) (scenery.key >>> 32) & Integer.MAX_VALUE, shape, arg1, level, x, z, arg6, false, scenery.entity); + } + } + if (layer == 3) { + @Pc(290) GroundDecor groundDecor = getGroundDecor(level, x, z); + if (groundDecor != null) { + groundDecor.entity = new Loc(Integer.MAX_VALUE & (int) (groundDecor.key >>> 32), 22, arg1, level, x, z, arg6, false, groundDecor.entity); + } + } + } - @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIILclient!th;JZ)V") - public static void setGroundDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity entity, @OriginalArg(5) long key, @OriginalArg(6) boolean arg6) { - if (entity == null) { - return; - } - @Pc(6) GroundDecor groundDecor = new GroundDecor(); - groundDecor.entity = entity; - groundDecor.xFine = x * 128 + 64; - groundDecor.zFine = z * 128 + 64; - groundDecor.anInt733 = arg3; - groundDecor.key = key; - groundDecor.aBoolean49 = arg6; - if (tiles[level][x][z] == null) { - tiles[level][x][z] = new Tile(level, x, z); - } - tiles[level][x][z].groundDecor = groundDecor; - } + @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIILclient!th;JZ)V") + public static void setGroundDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity entity, @OriginalArg(5) long key, @OriginalArg(6) boolean arg6) { + if (entity == null) { + return; + } + @Pc(6) GroundDecor groundDecor = new GroundDecor(); + groundDecor.entity = entity; + groundDecor.xFine = x * 128 + 64; + groundDecor.zFine = z * 128 + 64; + groundDecor.anInt733 = arg3; + groundDecor.key = key; + groundDecor.aBoolean49 = arg6; + if (tiles[level][x][z] == null) { + tiles[level][x][z] = new Tile(level, x, z); + } + tiles[level][x][z].groundDecor = groundDecor; + } - @OriginalMember(owner = "client!ia", name = "a", descriptor = "(IB)I") - public static int method2251(@OriginalArg(0) int arg0) { - @Pc(11) int local11 = arg0 & 0x3F; - @Pc(17) int local17 = arg0 >> 6 & 0x3; - if (local11 == 18) { - if (local17 == 0) { - return 1; - } - if (local17 == 1) { - return 2; - } - if (local17 == 2) { - return 4; - } - if (local17 == 3) { - return 8; - } - } else if (local11 == 19 || local11 == 21) { - if (local17 == 0) { - return 16; - } - if (local17 == 1) { - return 32; - } - if (local17 == 2) { - return 64; - } - if (local17 == 3) { - return 128; - } - } - return 0; - } + @OriginalMember(owner = "client!ia", name = "a", descriptor = "(IB)I") + public static int method2251(@OriginalArg(0) int arg0) { + @Pc(11) int local11 = arg0 & 0x3F; + @Pc(17) int local17 = arg0 >> 6 & 0x3; + if (local11 == 18) { + if (local17 == 0) { + return 1; + } + if (local17 == 1) { + return 2; + } + if (local17 == 2) { + return 4; + } + if (local17 == 3) { + return 8; + } + } else if (local11 == 19 || local11 == 21) { + if (local17 == 0) { + return 16; + } + if (local17 == 1) { + return 32; + } + if (local17 == 2) { + return 64; + } + if (local17 == 3) { + return 128; + } + } + return 0; + } - @OriginalMember(owner = "client!vf", name = "a", descriptor = "(IIIILclient!th;Lclient!th;IIJ)V") - public static void setWall(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity primary, @OriginalArg(5) Entity secondary, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) long key) { - if (primary == null && secondary == null) { - return; - } - @Pc(8) Wall wall = new Wall(); - wall.key = key; - wall.xFine = x * 128 + 64; - wall.zFine = z * 128 + 64; - wall.anInt3051 = arg3; - wall.primary = primary; - wall.secondary = secondary; - wall.anInt3049 = arg6; - wall.anInt3052 = arg7; - for (@Pc(42) int level0 = level; level0 >= 0; level0--) { - if (tiles[level0][x][z] == null) { - tiles[level0][x][z] = new Tile(level0, x, z); - } - } - tiles[level][x][z].wall = wall; - } + @OriginalMember(owner = "client!vf", name = "a", descriptor = "(IIIILclient!th;Lclient!th;IIJ)V") + public static void setWall(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity primary, @OriginalArg(5) Entity secondary, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) long key) { + if (primary == null && secondary == null) { + return; + } + @Pc(8) Wall wall = new Wall(); + wall.key = key; + wall.xFine = x * 128 + 64; + wall.zFine = z * 128 + 64; + wall.anInt3051 = arg3; + wall.primary = primary; + wall.secondary = secondary; + wall.anInt3049 = arg6; + wall.anInt3052 = arg7; + for (@Pc(42) int level0 = level; level0 >= 0; level0--) { + if (tiles[level0][x][z] == null) { + tiles[level0][x][z] = new Tile(level0, x, z); + } + } + tiles[level][x][z].wall = wall; + } - @OriginalMember(owner = "client!cd", name = "a", descriptor = "(IIIIZ)V") - public static void init(@OriginalArg(3) int tileVisibility, @OriginalArg(4) boolean hasUnderWaterMap) { - width = 104; - length = 104; - visibility = tileVisibility; - surfaceGroundTiles = new Tile[4][width][length]; - surfaceTileHeights = new int[4][width + 1][length + 1]; - if (GlRenderer.enabled) { - surfaceHdTiles = new GlTile[4][]; - } - if (hasUnderWaterMap) { - underWaterGroundTiles = new Tile[1][width][length]; - anIntArrayArray11 = new int[width][length]; - underwaterTileHeights = new int[1][width + 1][length + 1]; - if (GlRenderer.enabled) { - underWaterHdTiles = new GlTile[1][]; - } - } else { - underWaterGroundTiles = null; - anIntArrayArray11 = null; - underwaterTileHeights = null; - underWaterHdTiles = null; - } - setUnderwater(false); - aClass120Array1 = new SceneGraph_Class120[500]; - anInt917 = 0; - aClass120Array2 = new SceneGraph_Class120[500]; - anInt4870 = 0; - anIntArrayArrayArray12 = new int[4][width + 1][length + 1]; - scenery = new Scenery[5000]; - sceneryLen = 0; - aClass31Array2 = new Scenery[100]; - aBooleanArrayArray1 = new boolean[visibility + visibility + 1][visibility + visibility + 1]; - aBooleanArrayArray3 = new boolean[visibility + visibility + 2][visibility + visibility + 2]; - aByteArrayArrayArray13 = new byte[4][width][length]; - } + @OriginalMember(owner = "client!cd", name = "a", descriptor = "(IIIIZ)V") + public static void init(@OriginalArg(3) int tileVisibility, @OriginalArg(4) boolean hasUnderWaterMap) { + width = 104; + length = 104; + visibility = tileVisibility; + surfaceGroundTiles = new Tile[4][width][length]; + surfaceTileHeights = new int[4][width + 1][length + 1]; + if (GlRenderer.enabled) { + surfaceHdTiles = new GlTile[4][]; + } + if (hasUnderWaterMap) { + underWaterGroundTiles = new Tile[1][width][length]; + anIntArrayArray11 = new int[width][length]; + underwaterTileHeights = new int[1][width + 1][length + 1]; + if (GlRenderer.enabled) { + underWaterHdTiles = new GlTile[1][]; + } + } else { + underWaterGroundTiles = null; + anIntArrayArray11 = null; + underwaterTileHeights = null; + underWaterHdTiles = null; + } + setUnderwater(false); + aClass120Array1 = new SceneGraph_Class120[500]; + anInt917 = 0; + aClass120Array2 = new SceneGraph_Class120[500]; + anInt4870 = 0; + anIntArrayArrayArray12 = new int[4][width + 1][length + 1]; + scenery = new Scenery[5000]; + sceneryLen = 0; + aClass31Array2 = new Scenery[100]; + aBooleanArrayArray1 = new boolean[visibility + visibility + 1][visibility + visibility + 1]; + aBooleanArrayArray3 = new boolean[visibility + visibility + 2][visibility + visibility + 2]; + aByteArrayArrayArray13 = new byte[4][width][length]; + } - @OriginalMember(owner = "client!vj", name = "a", descriptor = "(III)J") - public static long getWallKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - return tile == null || tile.wall == null ? 0L : tile.wall.key; - } + @OriginalMember(owner = "client!vj", name = "a", descriptor = "(III)J") + public static long getWallKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + return tile == null || tile.wall == null ? 0L : tile.wall.key; + } - @OriginalMember(owner = "client!l", name = "a", descriptor = "(III)J") - public static long getWallDecorKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - return tile == null || tile.wallDecor == null ? 0L : tile.wallDecor.key; - } + @OriginalMember(owner = "client!l", name = "a", descriptor = "(III)J") + public static long getWallDecorKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + return tile == null || tile.wallDecor == null ? 0L : tile.wallDecor.key; + } - @OriginalMember(owner = "client!cl", name = "a", descriptor = "(III)J") - public static long getSceneryKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - if (tile == null) { - return 0L; - } - for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { - @Pc(22) Scenery scenery = tile.scenery[i]; - if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { - return scenery.key; - } - } - return 0L; - } + @OriginalMember(owner = "client!cl", name = "a", descriptor = "(III)J") + public static long getSceneryKey(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + if (tile == null) { + return 0L; + } + for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { + @Pc(22) Scenery scenery = tile.scenery[i]; + if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { + return scenery.key; + } + } + return 0L; + } - @OriginalMember(owner = "client!g", name = "a", descriptor = "(III)Lclient!df;") - public static WallDecor removeWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - if (tile == null) { - return null; - } else { - @Pc(14) WallDecor wallDecor = tile.wallDecor; - tile.wallDecor = null; - return wallDecor; - } - } + @OriginalMember(owner = "client!g", name = "a", descriptor = "(III)Lclient!df;") + public static WallDecor removeWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + if (tile == null) { + return null; + } else { + @Pc(14) WallDecor wallDecor = tile.wallDecor; + tile.wallDecor = null; + return wallDecor; + } + } - @OriginalMember(owner = "client!dk", name = "a", descriptor = "(III)Lclient!ec;") - public static Scenery removeScenery(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - if (tile == null) { - return null; - } - for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { - @Pc(22) Scenery scenery = tile.scenery[i]; - if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { - removeScenery(scenery); - return scenery; - } - } - return null; - } + @OriginalMember(owner = "client!dk", name = "a", descriptor = "(III)Lclient!ec;") + public static Scenery removeScenery(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + if (tile == null) { + return null; + } + for (@Pc(13) int i = 0; i < tile.sceneryLen; i++) { + @Pc(22) Scenery scenery = tile.scenery[i]; + if ((scenery.key >> 29 & 0x3L) == 2L && scenery.xMin == x && scenery.zMin == z) { + removeScenery(scenery); + return scenery; + } + } + return null; + } - @OriginalMember(owner = "client!vl", name = "a", descriptor = "(III)Lclient!bm;") - public static GroundDecor removeGroundDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { - @Pc(7) Tile tile = tiles[level][x][z]; - if (tile == null) { - return null; - } else { - @Pc(14) GroundDecor groundDecor = tile.groundDecor; - tile.groundDecor = null; - return groundDecor; - } - } + @OriginalMember(owner = "client!vl", name = "a", descriptor = "(III)Lclient!bm;") + public static GroundDecor removeGroundDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z) { + @Pc(7) Tile tile = tiles[level][x][z]; + if (tile == null) { + return null; + } else { + @Pc(14) GroundDecor groundDecor = tile.groundDecor; + tile.groundDecor = null; + return groundDecor; + } + } - @OriginalMember(owner = "client!vk", name = "a", descriptor = "(Lclient!ec;)V") - public static void removeScenery(@OriginalArg(0) Scenery scenery) { - for (@Pc(2) int x = scenery.xMin; x <= scenery.xMax; x++) { - for (@Pc(9) int z = scenery.zMin; z <= scenery.zMax; z++) { - @Pc(22) Tile tile = tiles[scenery.level][x][z]; - if (tile != null) { - @Pc(26) int i; - for (i = 0; i < tile.sceneryLen; i++) { - if (tile.scenery[i] == scenery) { - tile.sceneryLen--; - for (@Pc(44) int j = i; j < tile.sceneryLen; j++) { - tile.scenery[j] = tile.scenery[j + 1]; - tile.interiorFlags[j] = tile.interiorFlags[j + 1]; - } - tile.scenery[tile.sceneryLen] = null; - break; - } - } - tile.allInteriorFlags = 0; - for (i = 0; i < tile.sceneryLen; i++) { - tile.allInteriorFlags |= tile.interiorFlags[i]; - } - } - } - } - } + @OriginalMember(owner = "client!vk", name = "a", descriptor = "(Lclient!ec;)V") + public static void removeScenery(@OriginalArg(0) Scenery scenery) { + for (@Pc(2) int x = scenery.xMin; x <= scenery.xMax; x++) { + for (@Pc(9) int z = scenery.zMin; z <= scenery.zMax; z++) { + @Pc(22) Tile tile = tiles[scenery.level][x][z]; + if (tile != null) { + @Pc(26) int i; + for (i = 0; i < tile.sceneryLen; i++) { + if (tile.scenery[i] == scenery) { + tile.sceneryLen--; + for (@Pc(44) int j = i; j < tile.sceneryLen; j++) { + tile.scenery[j] = tile.scenery[j + 1]; + tile.interiorFlags[j] = tile.interiorFlags[j + 1]; + } + tile.scenery[tile.sceneryLen] = null; + break; + } + } + tile.allInteriorFlags = 0; + for (i = 0; i < tile.sceneryLen; i++) { + tile.allInteriorFlags |= tile.interiorFlags[i]; + } + } + } + } + } - @OriginalMember(owner = "client!di", name = "a", descriptor = "([Lclient!mj;ZI)V") - public static void method1169(@OriginalArg(0) CollisionMap[] collisionMaps, @OriginalArg(1) boolean underwater) { - @Pc(10) int level; - @Pc(15) int x; - if (!underwater) { - for (level = 0; level < 4; level++) { - for (x = 0; x < 104; x++) { - for (@Pc(22) int z = 0; z < 104; z++) { - if ((tileFlags[level][x][z] & 0x1) == 1) { - @Pc(43) int transformedLevel = level; - if ((tileFlags[1][x][z] & 0x2) == 2) { - transformedLevel = level - 1; - } - if (transformedLevel >= 0) { - collisionMaps[transformedLevel].flagTile(z, x); - } - } - } - } - } - anInt4272 += (int) (Math.random() * 5.0D) - 2; - if (anInt4272 < -16) { - anInt4272 = -16; - } - if (anInt4272 > 16) { - anInt4272 = 16; - } - anInt2293 += (int) (Math.random() * 5.0D) - 2; - if (anInt2293 < -8) { - anInt2293 = -8; - } - if (anInt2293 > 8) { - anInt2293 = 8; - } - } - @Pc(128) byte levels; - if (underwater) { - levels = 1; - } else { - levels = 4; - } - level = anInt2293 >> 2 << 10; - @Pc(142) int[][] local142 = new int[104][104]; - @Pc(146) int[][] local146 = new int[104][104]; - x = anInt4272 >> 1; - @Pc(152) int local152; - @Pc(168) int local168; - @Pc(173) int local173; - @Pc(178) int local178; - @Pc(194) int overlay; - @Pc(200) int local200; - @Pc(202) int local202; - @Pc(209) int local209; - @Pc(349) int local349; - @Pc(234) int local234; - @Pc(254) int local254; - @Pc(267) int local267; - for (local152 = 0; local152 < levels; local152++) { - @Pc(159) byte[][] local159 = aByteArrayArrayArray9[local152]; - @Pc(273) int local273; - @Pc(326) int local326; - @Pc(332) int local332; - @Pc(322) int local322; - if (!GlRenderer.enabled) { - local168 = (int) Math.sqrt(5100.0D); - local173 = local168 * 768 >> 8; - for (local178 = 1; local178 < 103; local178++) { - for (overlay = 1; overlay < 103; overlay++) { - local209 = tileHeights[local152][overlay][local178 + 1] - tileHeights[local152][overlay][local178 - 1]; - local202 = tileHeights[local152][overlay + 1][local178] - tileHeights[local152][overlay - 1][local178]; - local349 = (int) Math.sqrt(local202 * local202 + local209 * local209 + 65536); - local267 = (local209 << 8) / local349; - local254 = -65536 / local349; - local234 = (local202 << 8) / local349; - local273 = (local159[overlay][local178] >> 1) + (local159[overlay][local178 - 1] >> 2) + (local159[overlay - -1][local178] >> 3) + (local159[overlay - 1][local178] >> 2) + (local159[overlay][local178 + 1] >> 3); - local200 = (local267 * -50 + local234 * -50 + local254 * -10) / local173 + 74; - local146[overlay][local178] = local200 - local273; - } - } - } else if (Preferences.highDetailLighting) { - for (local168 = 1; local168 < 103; local168++) { - for (local173 = 1; local173 < 103; local173++) { - overlay = (local159[local173 + 1][local168] >> 3) + (local159[local173 - 1][local168] >> 2) + (local159[local173][local168 + -1] >> 2) + (local159[local173][local168 + 1] >> 3) + (local159[local173][local168] >> 1); - local146[local173][local168] = 74 - overlay; - } - } - } else { - local168 = (int) FogManager.aFloatArray18[0]; - local173 = (int) FogManager.aFloatArray18[1]; - local178 = (int) FogManager.aFloatArray18[2]; - overlay = (int) Math.sqrt(local173 * local173 + local168 * local168 + local178 * local178); - local200 = overlay * 1024 >> 8; - for (local202 = 1; local202 < 103; local202++) { - for (local209 = 1; local209 < 103; local209++) { - local234 = tileHeights[local152][local209 + 1][local202] - tileHeights[local152][local209 - 1][local202]; - local254 = tileHeights[local152][local209][local202 + 1] - tileHeights[local152][local209][local202 - 1]; - local267 = (int) Math.sqrt(local234 * local234 + local254 * local254 + 65536); - local273 = (local234 << 8) / local267; - local322 = (local159[local209][local202 + 1] >> 3) + (local159[local209][local202 - 1] >> 2) + (local159[local209 - 1][local202] >> 2) + (local159[local209 + 1][local202] >> 3) + (local159[local209][local202] >> 1); - local326 = -65536 / local267; - local332 = (local254 << 8) / local267; - local349 = (local178 * local332 + local168 * local273 + local326 * local173) / local200 + 96; - local146[local209][local202] = local349 - (int) ((float) local322 * 1.7F); - } - } - } - for (local168 = 0; local168 < 104; local168++) { - rowWeightedHue[local168] = 0; - rowSaturation[local168] = 0; - rowLightness[local168] = 0; - rowChroma[local168] = 0; - rowCount[local168] = 0; - } - for (local168 = -5; local168 < 104; local168++) { - for (local173 = 0; local173 < 104; local173++) { - local178 = local168 + 5; - @Pc(729) int local729; - if (local178 < 104) { - overlay = tileUnderlays[local152][local178][local173] & 0xFF; - if (overlay > 0) { - @Pc(693) FluType type = FluTypeList.get(overlay - 1); - rowWeightedHue[local173] += type.weightedHue; - rowSaturation[local173] += type.saturation; - rowLightness[local173] += type.lightness; - rowChroma[local173] += type.chroma; - local729 = rowCount[local173]++; - } - } - overlay = local168 - 5; - if (overlay >= 0) { - local200 = tileUnderlays[local152][overlay][local173] & 0xFF; - if (local200 > 0) { - @Pc(758) FluType local758 = FluTypeList.get(local200 - 1); - rowWeightedHue[local173] -= local758.weightedHue; - rowSaturation[local173] -= local758.saturation; - rowLightness[local173] -= local758.lightness; - rowChroma[local173] -= local758.chroma; - local729 = rowCount[local173]--; - } - } - } - if (local168 >= 0) { - local173 = 0; - overlay = 0; - local178 = 0; - local200 = 0; - local202 = 0; - for (local209 = -5; local209 < 104; local209++) { - local349 = local209 + 5; - if (local349 < 104) { - local178 += rowSaturation[local349]; - local202 += rowCount[local349]; - local173 += rowWeightedHue[local349]; - local200 += rowChroma[local349]; - overlay += rowLightness[local349]; - } - local234 = local209 - 5; - if (local234 >= 0) { - local178 -= rowSaturation[local234]; - local200 -= rowChroma[local234]; - local173 -= rowWeightedHue[local234]; - local202 -= rowCount[local234]; - overlay -= rowLightness[local234]; - } - if (local209 >= 0 && local202 > 0) { - local142[local168][local209] = method1309(overlay / local202, local178 / local202, local173 * 256 / local200); - } - } - } - } - 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 (firstVisibleLevel > local152) { - firstVisibleLevel = local152; - } - local178 = tileUnderlays[local152][local168][local173] & 0xFF; - overlay = tileOverlays[local152][local168][local173] & 0xFF; - if (local178 > 0 || overlay > 0) { - local202 = tileHeights[local152][local168 + 1][local173]; - local200 = tileHeights[local152][local168][local173]; - local349 = tileHeights[local152][local168][local173 + 1]; - local209 = tileHeights[local152][local168 + 1][local173 + 1]; - if (local152 > 0) { - @Pc(1067) boolean local1067 = local178 != 0 || tileShapes[local152][local168][local173] == 0; - if (overlay > 0 && !FloTypeList.method4395(overlay - 1).aBoolean312) { - local1067 = false; - } - if (local1067 && local200 == local202 && local200 == local209 && local349 == local200) { - anIntArrayArrayArray6[local152][local168][local173] |= 0x4; - } - } - if (local178 <= 0) { - local234 = -1; - local254 = 0; - } else { - local234 = local142[local168][local173]; - local267 = (local234 & 0x7F) + x; - if (local267 < 0) { - local267 = 0; - } else if (local267 > 127) { - local267 = 127; - } - local273 = (local234 & 0x380) + (local234 + level & 0xFC00) + local267; - local254 = Rasteriser.palette[ColorUtils.multiplyLightnessSafe(96, local273)]; - } - local267 = local146[local168][local173]; - local332 = local146[local168][local173 + 1]; - local273 = local146[local168 + 1][local173]; - local326 = local146[local168 + 1][local173 + 1]; - if (overlay == 0) { - setTile(local152, local168, local173, 0, 0, -1, local200, local202, local209, local349, ColorUtils.multiplyLightnessSafe(local267, local234), ColorUtils.multiplyLightnessSafe(local273, local234), ColorUtils.multiplyLightnessSafe(local326, local234), ColorUtils.multiplyLightnessSafe(local332, local234), 0, 0, 0, 0, local254, 0); - if (GlRenderer.enabled && local152 > 0 && local234 != -1 && FluTypeList.get(local178 - 1).aBoolean198) { - ShadowManager.method4197(0, 0, true, false, local168, local173, local200 - tileHeights[0][local168][local173], -tileHeights[0][local168 + 1][local173] + local202, local209 - tileHeights[0][local168 + 1][local173 + 1], local349 - tileHeights[0][local168][local173 + 1]); - } - if (GlRenderer.enabled && !underwater && anIntArrayArray11 != null && local152 == 0) { - for (local322 = local168 - 1; local322 <= local168 + 1; local322++) { - for (@Pc(1794) int local1794 = local173 - 1; local1794 <= local173 + 1; local1794++) { - if ((local322 != local168 || local173 != local1794) && local322 >= 0 && local322 < 104 && local1794 >= 0 && local1794 < 104) { - @Pc(1834) int local1834 = tileOverlays[local152][local322][local1794] & 0xFF; - if (local1834 != 0) { - @Pc(1842) FloType local1842 = FloTypeList.method4395(local1834 - 1); - if (local1842.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1842.texture) == MaterialManager.WATER) { - anIntArrayArray11[local168][local173] = local1842.anInt5889 + (local1842.anInt5898 << 24); - continue label771; - } - } - } - } - } - } - } else { - local322 = tileShapes[local152][local168][local173] + 1; - @Pc(1242) byte local1242 = tileAngles[local152][local168][local173]; - @Pc(1248) FloType local1248 = FloTypeList.method4395(overlay - 1); - @Pc(1301) int local1301; - @Pc(1353) int local1353; - @Pc(1288) int texture; - if (GlRenderer.enabled && !underwater && anIntArrayArray11 != null && local152 == 0) { - if (local1248.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1248.texture) == MaterialManager.WATER) { - anIntArrayArray11[local168][local173] = (local1248.anInt5898 << 24) + local1248.anInt5889; - } else { - label737: - for (texture = local168 - 1; texture <= local168 + 1; texture++) { - for (local1301 = local173 - 1; local1301 <= local173 + 1; local1301++) { - if ((local168 != texture || local1301 != local173) && texture >= 0 && texture < 104 && local1301 >= 0 && local1301 < 104) { - local1353 = tileOverlays[local152][texture][local1301] & 0xFF; - if (local1353 != 0) { - @Pc(1366) FloType local1366 = FloTypeList.method4395(local1353 - 1); - if (local1366.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1366.texture) == MaterialManager.WATER) { - anIntArrayArray11[local168][local173] = local1366.anInt5889 + (local1366.anInt5898 << 24); - break label737; - } - } - } - } - } - } - } - texture = local1248.texture; - if (texture >= 0 && !Rasteriser.textureProvider.method3236(texture)) { - texture = -1; - } - @Pc(1458) int local1458; - @Pc(1429) int local1429; - if (texture >= 0) { - local1301 = -1; - local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(Rasteriser.textureProvider.getAverageColor(texture), 96)]; - } else if (local1248.anInt5899 == -1) { - local1301 = -2; - local1353 = 0; - } else { - local1301 = local1248.anInt5899; - local1429 = x + (local1301 & 0x7F); - if (local1429 < 0) { - local1429 = 0; - } else if (local1429 > 127) { - local1429 = 127; - } - local1458 = (local1301 & 0x380) + ((local1301 + level & 0xFC00) + local1429); - local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local1458, 96)]; - } - if (local1248.anInt5894 >= 0) { - local1429 = local1248.anInt5894; - local1458 = x + (local1429 & 0x7F); - if (local1458 < 0) { - local1458 = 0; - } else if (local1458 > 127) { - local1458 = 127; - } - @Pc(1529) int local1529 = (local1429 & 0x380) + ((local1429 + level & 0xFC00) + local1458); - local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local1529, 96)]; - } - setTile(local152, local168, local173, local322, local1242, texture, local200, local202, local209, local349, ColorUtils.multiplyLightnessSafe(local267, local234), ColorUtils.multiplyLightnessSafe(local273, local234), ColorUtils.multiplyLightnessSafe(local326, local234), ColorUtils.multiplyLightnessSafe(local332, local234), ColorUtils.multiplyLightnessGrayscale(local1301, local267), ColorUtils.multiplyLightnessGrayscale(local1301, local273), ColorUtils.multiplyLightnessGrayscale(local1301, local326), ColorUtils.multiplyLightnessGrayscale(local1301, local332), local254, local1353); - if (GlRenderer.enabled && local152 > 0) { - ShadowManager.method4197(local322, local1242, local1301 == -2 || !local1248.aBoolean311, local234 == -1 || !FluTypeList.get(local178 - 1).aBoolean198, local168, local173, local200 - tileHeights[0][local168][local173], local202 - tileHeights[0][local168 + 1][local173], local209 - tileHeights[0][local168 + 1][local173 + 1], -tileHeights[0][local168][local173 + 1] + local349); - } - } - } - } - } - } - if (GlRenderer.enabled) { - @Pc(1888) float[][] local1888 = new float[105][105]; - @Pc(1892) int[][] local1892 = tileHeights[local152]; - @Pc(1896) float[][] local1896 = new float[105][105]; - @Pc(1900) float[][] local1900 = new float[105][105]; - local200 = 1; - while (true) { - 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]); - 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); - @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++) { - local2057[local349] = local2025[local349]; - } - for (local349 = 0; local349 < local2049.length; local349++) { - local2057[local2025.length + local349] = local2049[local349]; - } - method2280(local152, local2057); - Static221.method3393(local1900, tileUnderlays[local152], tileAngles[local152], LightingManager.lights, local152, LightingManager.lightCount, local1896, tileShapes[local152], tileOverlays[local152], tileHeights[local152], local1888); - break; - } - for (local202 = 1; local202 <= 103; local202++) { - local349 = local1892[local202][local200 + 1] - local1892[local202][local200 - 1]; - local209 = local1892[local202 + 1][local200] - local1892[local202 - 1][local200]; - @Pc(1962) float local1962 = (float) Math.sqrt(local209 * local209 + local349 * local349 + 65536); - local1888[local202][local200] = (float) local209 / local1962; - local1896[local202][local200] = -256.0F / local1962; - local1900[local202][local200] = (float) local349 / local1962; - } - local200++; - } - } - tileUnderlays[local152] = null; - tileOverlays[local152] = null; - tileShapes[local152] = null; - tileAngles[local152] = null; - aByteArrayArrayArray9[local152] = null; - } - method3801(); - if (underwater) { - return; - } - @Pc(2204) int local2204; - for (local152 = 0; local152 < 104; local152++) { - for (local2204 = 0; local2204 < 104; local2204++) { - if ((tileFlags[1][local152][local2204] & 0x2) == 2) { - method3884(local152, local2204); - } - } - } - for (local152 = 0; local152 < 4; local152++) { - for (local2204 = 0; local2204 <= 104; local2204++) { - for (local168 = 0; local168 <= 104; local168++) { - if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x1) != 0) { - local200 = local152; - for (local173 = local2204; local173 > 0 && (anIntArrayArrayArray6[local152][local168][local173 - 1] & 0x1) != 0; local173--) { - } - overlay = local152; - for (local178 = local2204; local178 < 104 && (anIntArrayArrayArray6[local152][local168][local178 + 1] & 0x1) != 0; local178++) { - } - label454: - while (overlay > 0) { - for (local202 = local173; local202 <= local178; local202++) { - if ((anIntArrayArrayArray6[overlay - 1][local168][local202] & 0x1) == 0) { - break label454; - } - } - overlay--; - } - label443: - while (local200 < 3) { - for (local202 = local173; local202 <= local178; local202++) { - if ((anIntArrayArrayArray6[local200 + 1][local168][local202] & 0x1) == 0) { - break label443; - } - } - local200++; - } - local202 = (local200 + 1 - overlay) * (-local173 + (local178 - -1)); - if (local202 >= 8) { - local349 = tileHeights[local200][local168][local173] - 240; - local234 = tileHeights[overlay][local168][local173]; - SceneGraph_Class120.method4647(1, local168 * 128, local168 * 128, local173 * 128, local178 * 128 + 128, local349, local234); - for (local254 = overlay; local254 <= local200; local254++) { - for (local267 = local173; local267 <= local178; local267++) { - anIntArrayArrayArray6[local254][local168][local267] &= 0xFFFFFFFE; - } - } - } - } - if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x2) != 0) { - for (local173 = local168; local173 > 0 && (anIntArrayArrayArray6[local152][local173 - 1][local2204] & 0x2) != 0; local173--) { - } - local200 = local152; - overlay = local152; - for (local178 = local168; local178 < 104 && (anIntArrayArrayArray6[local152][local178 + 1][local2204] & 0x2) != 0; local178++) { - } - label508: - while (overlay > 0) { - for (local202 = local173; local202 <= local178; local202++) { - if ((anIntArrayArrayArray6[overlay - 1][local202][local2204] & 0x2) == 0) { - break label508; - } - } - overlay--; - } - label497: - while (local200 < 3) { - for (local202 = local173; local202 <= local178; local202++) { - if ((anIntArrayArrayArray6[local200 + 1][local202][local2204] & 0x2) == 0) { - break label497; - } - } - local200++; - } - local202 = (local178 + 1 - local173) * (-overlay + local200 - -1); - if (local202 >= 8) { - local349 = tileHeights[local200][local173][local2204] - 240; - local234 = tileHeights[overlay][local173][local2204]; - SceneGraph_Class120.method4647(2, local173 * 128, local178 * 128 + 128, local2204 * 128, local2204 * 128, local349, local234); - for (local254 = overlay; local254 <= local200; local254++) { - for (local267 = local173; local267 <= local178; local267++) { - anIntArrayArrayArray6[local254][local267][local2204] &= 0xFFFFFFFD; - } - } - } - } - if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x4) != 0) { - local173 = local168; - local178 = local168; - for (overlay = local2204; overlay > 0 && (anIntArrayArrayArray6[local152][local168][overlay - 1] & 0x4) != 0; overlay--) { - } - for (local200 = local2204; local200 < 104 && (anIntArrayArrayArray6[local152][local168][local200 + 1] & 0x4) != 0; local200++) { - } - label562: - while (local173 > 0) { - for (local202 = overlay; local202 <= local200; local202++) { - if ((anIntArrayArrayArray6[local152][local173 - 1][local202] & 0x4) == 0) { - break label562; - } - } - local173--; - } - label551: - while (local178 < 104) { - for (local202 = overlay; local202 <= local200; local202++) { - if ((anIntArrayArrayArray6[local152][local178 + 1][local202] & 0x4) == 0) { - break label551; - } - } - local178++; - } - if ((local178 + 1 - local173) * (local200 - (overlay - 1)) >= 4) { - local202 = tileHeights[local152][local173][overlay]; - SceneGraph_Class120.method4647(4, local173 * 128, local178 * 128 + 128, overlay * 128, local200 * 128 + 128, local202, local202); - for (local209 = local173; local209 <= local178; local209++) { - for (local349 = overlay; local349 <= local200; local349++) { - anIntArrayArrayArray6[local152][local209][local349] &= 0xFFFFFFFB; - } - } - } - } - } - } - } - } + @OriginalMember(owner = "client!di", name = "a", descriptor = "([Lclient!mj;ZI)V") + public static void method1169(@OriginalArg(0) CollisionMap[] collisionMaps, @OriginalArg(1) boolean underwater) { + @Pc(10) int level; + @Pc(15) int x; + if (!underwater) { + for (level = 0; level < 4; level++) { + for (x = 0; x < 104; x++) { + for (@Pc(22) int z = 0; z < 104; z++) { + if ((tileFlags[level][x][z] & 0x1) == 1) { + @Pc(43) int transformedLevel = level; + if ((tileFlags[1][x][z] & 0x2) == 2) { + transformedLevel = level - 1; + } + if (transformedLevel >= 0) { + collisionMaps[transformedLevel].flagTile(z, x); + } + } + } + } + } + anInt4272 += (int) (Math.random() * 5.0D) - 2; + if (anInt4272 < -16) { + anInt4272 = -16; + } + if (anInt4272 > 16) { + anInt4272 = 16; + } + anInt2293 += (int) (Math.random() * 5.0D) - 2; + if (anInt2293 < -8) { + anInt2293 = -8; + } + if (anInt2293 > 8) { + anInt2293 = 8; + } + } + @Pc(128) byte levels; + if (underwater) { + levels = 1; + } else { + levels = 4; + } + level = anInt2293 >> 2 << 10; + @Pc(142) int[][] local142 = new int[104][104]; + @Pc(146) int[][] local146 = new int[104][104]; + x = anInt4272 >> 1; + @Pc(152) int local152; + @Pc(168) int local168; + @Pc(173) int local173; + @Pc(178) int local178; + @Pc(194) int overlay; + @Pc(200) int local200; + @Pc(202) int local202; + @Pc(209) int local209; + @Pc(349) int local349; + @Pc(234) int local234; + @Pc(254) int local254; + @Pc(267) int local267; + for (local152 = 0; local152 < levels; local152++) { + @Pc(159) byte[][] local159 = aByteArrayArrayArray9[local152]; + @Pc(273) int local273; + @Pc(326) int local326; + @Pc(332) int local332; + @Pc(322) int local322; + if (!GlRenderer.enabled) { + local168 = (int) Math.sqrt(5100.0D); + local173 = local168 * 768 >> 8; + for (local178 = 1; local178 < 103; local178++) { + for (overlay = 1; overlay < 103; overlay++) { + local209 = tileHeights[local152][overlay][local178 + 1] - tileHeights[local152][overlay][local178 - 1]; + local202 = tileHeights[local152][overlay + 1][local178] - tileHeights[local152][overlay - 1][local178]; + local349 = (int) Math.sqrt(local202 * local202 + local209 * local209 + 65536); + local267 = (local209 << 8) / local349; + local254 = -65536 / local349; + local234 = (local202 << 8) / local349; + local273 = (local159[overlay][local178] >> 1) + (local159[overlay][local178 - 1] >> 2) + (local159[overlay - -1][local178] >> 3) + (local159[overlay - 1][local178] >> 2) + (local159[overlay][local178 + 1] >> 3); + local200 = (local267 * -50 + local234 * -50 + local254 * -10) / local173 + 74; + local146[overlay][local178] = local200 - local273; + } + } + } else if (Preferences.highDetailLighting) { + for (local168 = 1; local168 < 103; local168++) { + for (local173 = 1; local173 < 103; local173++) { + overlay = (local159[local173 + 1][local168] >> 3) + (local159[local173 - 1][local168] >> 2) + (local159[local173][local168 + -1] >> 2) + (local159[local173][local168 + 1] >> 3) + (local159[local173][local168] >> 1); + local146[local173][local168] = 74 - overlay; + } + } + } else { + local168 = (int) FogManager.aFloatArray18[0]; + local173 = (int) FogManager.aFloatArray18[1]; + local178 = (int) FogManager.aFloatArray18[2]; + overlay = (int) Math.sqrt(local173 * local173 + local168 * local168 + local178 * local178); + local200 = overlay * 1024 >> 8; + for (local202 = 1; local202 < 103; local202++) { + for (local209 = 1; local209 < 103; local209++) { + local234 = tileHeights[local152][local209 + 1][local202] - tileHeights[local152][local209 - 1][local202]; + local254 = tileHeights[local152][local209][local202 + 1] - tileHeights[local152][local209][local202 - 1]; + local267 = (int) Math.sqrt(local234 * local234 + local254 * local254 + 65536); + local273 = (local234 << 8) / local267; + local322 = (local159[local209][local202 + 1] >> 3) + (local159[local209][local202 - 1] >> 2) + (local159[local209 - 1][local202] >> 2) + (local159[local209 + 1][local202] >> 3) + (local159[local209][local202] >> 1); + local326 = -65536 / local267; + local332 = (local254 << 8) / local267; + local349 = (local178 * local332 + local168 * local273 + local326 * local173) / local200 + 96; + local146[local209][local202] = local349 - (int) ((float) local322 * 1.7F); + } + } + } + for (local168 = 0; local168 < 104; local168++) { + rowWeightedHue[local168] = 0; + rowSaturation[local168] = 0; + rowLightness[local168] = 0; + rowChroma[local168] = 0; + rowCount[local168] = 0; + } + for (local168 = -5; local168 < 104; local168++) { + for (local173 = 0; local173 < 104; local173++) { + local178 = local168 + 5; + @Pc(729) int local729; + if (local178 < 104) { + overlay = tileUnderlays[local152][local178][local173] & 0xFF; + if (overlay > 0) { + @Pc(693) FluType type = FluTypeList.get(overlay - 1); + rowWeightedHue[local173] += type.weightedHue; + rowSaturation[local173] += type.saturation; + rowLightness[local173] += type.lightness; + rowChroma[local173] += type.chroma; + local729 = rowCount[local173]++; + } + } + overlay = local168 - 5; + if (overlay >= 0) { + local200 = tileUnderlays[local152][overlay][local173] & 0xFF; + if (local200 > 0) { + @Pc(758) FluType local758 = FluTypeList.get(local200 - 1); + rowWeightedHue[local173] -= local758.weightedHue; + rowSaturation[local173] -= local758.saturation; + rowLightness[local173] -= local758.lightness; + rowChroma[local173] -= local758.chroma; + local729 = rowCount[local173]--; + } + } + } + if (local168 >= 0) { + local173 = 0; + overlay = 0; + local178 = 0; + local200 = 0; + local202 = 0; + for (local209 = -5; local209 < 104; local209++) { + local349 = local209 + 5; + if (local349 < 104) { + local178 += rowSaturation[local349]; + local202 += rowCount[local349]; + local173 += rowWeightedHue[local349]; + local200 += rowChroma[local349]; + overlay += rowLightness[local349]; + } + local234 = local209 - 5; + if (local234 >= 0) { + local178 -= rowSaturation[local234]; + local200 -= rowChroma[local234]; + local173 -= rowWeightedHue[local234]; + local202 -= rowCount[local234]; + overlay -= rowLightness[local234]; + } + if (local209 >= 0 && local202 > 0) { + local142[local168][local209] = method1309(overlay / local202, local178 / local202, local173 * 256 / local200); + } + } + } + } + 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 (firstVisibleLevel > local152) { + firstVisibleLevel = local152; + } + local178 = tileUnderlays[local152][local168][local173] & 0xFF; + overlay = tileOverlays[local152][local168][local173] & 0xFF; + if (local178 > 0 || overlay > 0) { + local202 = tileHeights[local152][local168 + 1][local173]; + local200 = tileHeights[local152][local168][local173]; + local349 = tileHeights[local152][local168][local173 + 1]; + local209 = tileHeights[local152][local168 + 1][local173 + 1]; + if (local152 > 0) { + @Pc(1067) boolean local1067 = local178 != 0 || tileShapes[local152][local168][local173] == 0; + if (overlay > 0 && !FloTypeList.method4395(overlay - 1).aBoolean312) { + local1067 = false; + } + if (local1067 && local200 == local202 && local200 == local209 && local349 == local200) { + anIntArrayArrayArray6[local152][local168][local173] |= 0x4; + } + } + if (local178 <= 0) { + local234 = -1; + local254 = 0; + } else { + local234 = local142[local168][local173]; + local267 = (local234 & 0x7F) + x; + if (local267 < 0) { + local267 = 0; + } else if (local267 > 127) { + local267 = 127; + } + local273 = (local234 & 0x380) + (local234 + level & 0xFC00) + local267; + local254 = Rasteriser.palette[ColorUtils.multiplyLightnessSafe(96, local273)]; + } + local267 = local146[local168][local173]; + local332 = local146[local168][local173 + 1]; + local273 = local146[local168 + 1][local173]; + local326 = local146[local168 + 1][local173 + 1]; + if (overlay == 0) { + setTile(local152, local168, local173, 0, 0, -1, local200, local202, local209, local349, ColorUtils.multiplyLightnessSafe(local267, local234), ColorUtils.multiplyLightnessSafe(local273, local234), ColorUtils.multiplyLightnessSafe(local326, local234), ColorUtils.multiplyLightnessSafe(local332, local234), 0, 0, 0, 0, local254, 0); + if (GlRenderer.enabled && local152 > 0 && local234 != -1 && FluTypeList.get(local178 - 1).aBoolean198) { + ShadowManager.method4197(0, 0, true, false, local168, local173, local200 - tileHeights[0][local168][local173], -tileHeights[0][local168 + 1][local173] + local202, local209 - tileHeights[0][local168 + 1][local173 + 1], local349 - tileHeights[0][local168][local173 + 1]); + } + if (GlRenderer.enabled && !underwater && anIntArrayArray11 != null && local152 == 0) { + for (local322 = local168 - 1; local322 <= local168 + 1; local322++) { + for (@Pc(1794) int local1794 = local173 - 1; local1794 <= local173 + 1; local1794++) { + if ((local322 != local168 || local173 != local1794) && local322 >= 0 && local322 < 104 && local1794 >= 0 && local1794 < 104) { + @Pc(1834) int local1834 = tileOverlays[local152][local322][local1794] & 0xFF; + if (local1834 != 0) { + @Pc(1842) FloType local1842 = FloTypeList.method4395(local1834 - 1); + if (local1842.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1842.texture) == MaterialManager.WATER) { + anIntArrayArray11[local168][local173] = local1842.anInt5889 + (local1842.anInt5898 << 24); + continue label771; + } + } + } + } + } + } + } else { + local322 = tileShapes[local152][local168][local173] + 1; + @Pc(1242) byte local1242 = tileAngles[local152][local168][local173]; + @Pc(1248) FloType local1248 = FloTypeList.method4395(overlay - 1); + @Pc(1301) int local1301; + @Pc(1353) int local1353; + @Pc(1288) int texture; + if (GlRenderer.enabled && !underwater && anIntArrayArray11 != null && local152 == 0) { + if (local1248.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1248.texture) == MaterialManager.WATER) { + anIntArrayArray11[local168][local173] = (local1248.anInt5898 << 24) + local1248.anInt5889; + } else { + label737: + for (texture = local168 - 1; texture <= local168 + 1; texture++) { + for (local1301 = local173 - 1; local1301 <= local173 + 1; local1301++) { + if ((local168 != texture || local1301 != local173) && texture >= 0 && texture < 104 && local1301 >= 0 && local1301 < 104) { + local1353 = tileOverlays[local152][texture][local1301] & 0xFF; + if (local1353 != 0) { + @Pc(1366) FloType local1366 = FloTypeList.method4395(local1353 - 1); + if (local1366.texture != -1 && Rasteriser.textureProvider.getMaterialType(local1366.texture) == MaterialManager.WATER) { + anIntArrayArray11[local168][local173] = local1366.anInt5889 + (local1366.anInt5898 << 24); + break label737; + } + } + } + } + } + } + } + texture = local1248.texture; + if (texture >= 0 && !Rasteriser.textureProvider.method3236(texture)) { + texture = -1; + } + @Pc(1458) int local1458; + @Pc(1429) int local1429; + if (texture >= 0) { + local1301 = -1; + local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(Rasteriser.textureProvider.getAverageColor(texture), 96)]; + } else if (local1248.anInt5899 == -1) { + local1301 = -2; + local1353 = 0; + } else { + local1301 = local1248.anInt5899; + local1429 = x + (local1301 & 0x7F); + if (local1429 < 0) { + local1429 = 0; + } else if (local1429 > 127) { + local1429 = 127; + } + local1458 = (local1301 & 0x380) + ((local1301 + level & 0xFC00) + local1429); + local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local1458, 96)]; + } + if (local1248.anInt5894 >= 0) { + local1429 = local1248.anInt5894; + local1458 = x + (local1429 & 0x7F); + if (local1458 < 0) { + local1458 = 0; + } else if (local1458 > 127) { + local1458 = 127; + } + @Pc(1529) int local1529 = (local1429 & 0x380) + ((local1429 + level & 0xFC00) + local1458); + local1353 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local1529, 96)]; + } + setTile(local152, local168, local173, local322, local1242, texture, local200, local202, local209, local349, ColorUtils.multiplyLightnessSafe(local267, local234), ColorUtils.multiplyLightnessSafe(local273, local234), ColorUtils.multiplyLightnessSafe(local326, local234), ColorUtils.multiplyLightnessSafe(local332, local234), ColorUtils.multiplyLightnessGrayscale(local1301, local267), ColorUtils.multiplyLightnessGrayscale(local1301, local273), ColorUtils.multiplyLightnessGrayscale(local1301, local326), ColorUtils.multiplyLightnessGrayscale(local1301, local332), local254, local1353); + if (GlRenderer.enabled && local152 > 0) { + ShadowManager.method4197(local322, local1242, local1301 == -2 || !local1248.aBoolean311, local234 == -1 || !FluTypeList.get(local178 - 1).aBoolean198, local168, local173, local200 - tileHeights[0][local168][local173], local202 - tileHeights[0][local168 + 1][local173], local209 - tileHeights[0][local168 + 1][local173 + 1], -tileHeights[0][local168][local173 + 1] + local349); + } + } + } + } + } + } + if (GlRenderer.enabled) { + @Pc(1888) float[][] local1888 = new float[105][105]; + @Pc(1892) int[][] local1892 = tileHeights[local152]; + @Pc(1896) float[][] local1896 = new float[105][105]; + @Pc(1900) float[][] local1900 = new float[105][105]; + local200 = 1; + while (true) { + 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]); + 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); + @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++) { + local2057[local349] = local2025[local349]; + } + for (local349 = 0; local349 < local2049.length; local349++) { + local2057[local2025.length + local349] = local2049[local349]; + } + method2280(local152, local2057); + Static221.method3393(local1900, tileUnderlays[local152], tileAngles[local152], LightingManager.lights, local152, LightingManager.lightCount, local1896, tileShapes[local152], tileOverlays[local152], tileHeights[local152], local1888); + break; + } + for (local202 = 1; local202 <= 103; local202++) { + local349 = local1892[local202][local200 + 1] - local1892[local202][local200 - 1]; + local209 = local1892[local202 + 1][local200] - local1892[local202 - 1][local200]; + @Pc(1962) float local1962 = (float) Math.sqrt(local209 * local209 + local349 * local349 + 65536); + local1888[local202][local200] = (float) local209 / local1962; + local1896[local202][local200] = -256.0F / local1962; + local1900[local202][local200] = (float) local349 / local1962; + } + local200++; + } + } + tileUnderlays[local152] = null; + tileOverlays[local152] = null; + tileShapes[local152] = null; + tileAngles[local152] = null; + aByteArrayArrayArray9[local152] = null; + } + method3801(); + if (underwater) { + return; + } + @Pc(2204) int local2204; + for (local152 = 0; local152 < 104; local152++) { + for (local2204 = 0; local2204 < 104; local2204++) { + if ((tileFlags[1][local152][local2204] & 0x2) == 2) { + method3884(local152, local2204); + } + } + } + for (local152 = 0; local152 < 4; local152++) { + for (local2204 = 0; local2204 <= 104; local2204++) { + for (local168 = 0; local168 <= 104; local168++) { + if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x1) != 0) { + local200 = local152; + for (local173 = local2204; local173 > 0 && (anIntArrayArrayArray6[local152][local168][local173 - 1] & 0x1) != 0; local173--) { + } + overlay = local152; + for (local178 = local2204; local178 < 104 && (anIntArrayArrayArray6[local152][local168][local178 + 1] & 0x1) != 0; local178++) { + } + label454: + while (overlay > 0) { + for (local202 = local173; local202 <= local178; local202++) { + if ((anIntArrayArrayArray6[overlay - 1][local168][local202] & 0x1) == 0) { + break label454; + } + } + overlay--; + } + label443: + while (local200 < 3) { + for (local202 = local173; local202 <= local178; local202++) { + if ((anIntArrayArrayArray6[local200 + 1][local168][local202] & 0x1) == 0) { + break label443; + } + } + local200++; + } + local202 = (local200 + 1 - overlay) * (-local173 + (local178 - -1)); + if (local202 >= 8) { + local349 = tileHeights[local200][local168][local173] - 240; + local234 = tileHeights[overlay][local168][local173]; + SceneGraph_Class120.method4647(1, local168 * 128, local168 * 128, local173 * 128, local178 * 128 + 128, local349, local234); + for (local254 = overlay; local254 <= local200; local254++) { + for (local267 = local173; local267 <= local178; local267++) { + anIntArrayArrayArray6[local254][local168][local267] &= 0xFFFFFFFE; + } + } + } + } + if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x2) != 0) { + for (local173 = local168; local173 > 0 && (anIntArrayArrayArray6[local152][local173 - 1][local2204] & 0x2) != 0; local173--) { + } + local200 = local152; + overlay = local152; + for (local178 = local168; local178 < 104 && (anIntArrayArrayArray6[local152][local178 + 1][local2204] & 0x2) != 0; local178++) { + } + label508: + while (overlay > 0) { + for (local202 = local173; local202 <= local178; local202++) { + if ((anIntArrayArrayArray6[overlay - 1][local202][local2204] & 0x2) == 0) { + break label508; + } + } + overlay--; + } + label497: + while (local200 < 3) { + for (local202 = local173; local202 <= local178; local202++) { + if ((anIntArrayArrayArray6[local200 + 1][local202][local2204] & 0x2) == 0) { + break label497; + } + } + local200++; + } + local202 = (local178 + 1 - local173) * (-overlay + local200 - -1); + if (local202 >= 8) { + local349 = tileHeights[local200][local173][local2204] - 240; + local234 = tileHeights[overlay][local173][local2204]; + SceneGraph_Class120.method4647(2, local173 * 128, local178 * 128 + 128, local2204 * 128, local2204 * 128, local349, local234); + for (local254 = overlay; local254 <= local200; local254++) { + for (local267 = local173; local267 <= local178; local267++) { + anIntArrayArrayArray6[local254][local267][local2204] &= 0xFFFFFFFD; + } + } + } + } + if ((anIntArrayArrayArray6[local152][local168][local2204] & 0x4) != 0) { + local173 = local168; + local178 = local168; + for (overlay = local2204; overlay > 0 && (anIntArrayArrayArray6[local152][local168][overlay - 1] & 0x4) != 0; overlay--) { + } + for (local200 = local2204; local200 < 104 && (anIntArrayArrayArray6[local152][local168][local200 + 1] & 0x4) != 0; local200++) { + } + label562: + while (local173 > 0) { + for (local202 = overlay; local202 <= local200; local202++) { + if ((anIntArrayArrayArray6[local152][local173 - 1][local202] & 0x4) == 0) { + break label562; + } + } + local173--; + } + label551: + while (local178 < 104) { + for (local202 = overlay; local202 <= local200; local202++) { + if ((anIntArrayArrayArray6[local152][local178 + 1][local202] & 0x4) == 0) { + break label551; + } + } + local178++; + } + if ((local178 + 1 - local173) * (local200 - (overlay - 1)) >= 4) { + local202 = tileHeights[local152][local173][overlay]; + SceneGraph_Class120.method4647(4, local173 * 128, local178 * 128 + 128, overlay * 128, local200 * 128 + 128, local202, local202); + for (local209 = local173; local209 <= local178; local209++) { + for (local349 = overlay; local349 <= local200; local349++) { + anIntArrayArrayArray6[local152][local209][local349] &= 0xFFFFFFFB; + } + } + } + } + } + } + } + } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(I[Lclient!hg;)V") - public static void method2280(@OriginalArg(0) int arg0, @OriginalArg(1) GlTile[] arg1) { - underwaterHdTiles[arg0] = arg1; - } + @OriginalMember(owner = "client!ih", name = "a", descriptor = "(I[Lclient!hg;)V") + public static void method2280(@OriginalArg(0) int arg0, @OriginalArg(1) GlTile[] arg1) { + underwaterHdTiles[arg0] = arg1; + } - @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IIIIIIIIIIIIIIIIIIII)V") - public static void setTile(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9, @OriginalArg(10) int arg10, @OriginalArg(11) int arg11, @OriginalArg(12) int arg12, @OriginalArg(13) int arg13, @OriginalArg(14) int arg14, @OriginalArg(15) int arg15, @OriginalArg(16) int arg16, @OriginalArg(17) int arg17, @OriginalArg(18) int arg18, @OriginalArg(19) int arg19) { - @Pc(12) PlainTile tile; - @Pc(14) int level0; - if (arg3 == 0) { - tile = new PlainTile(arg10, arg11, arg12, arg13, -1, arg18, false); - for (level0 = level; level0 >= 0; level0--) { - if (tiles[level0][x][z] == null) { - tiles[level0][x][z] = new Tile(level0, x, z); - } - } - tiles[level][x][z].plainTile = tile; - } else if (arg3 == 1) { - tile = new PlainTile(arg14, arg15, arg16, arg17, arg5, arg19, arg6 == arg7 && arg6 == arg8 && arg6 == arg9); - for (level0 = level; level0 >= 0; level0--) { - if (tiles[level0][x][z] == null) { - tiles[level0][x][z] = new Tile(level0, x, z); - } - } - tiles[level][x][z].plainTile = tile; - } else { - @Pc(134) ShapedTile local134 = new ShapedTile(arg3, arg4, arg5, x, z, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); - for (level0 = level; level0 >= 0; level0--) { - if (tiles[level0][x][z] == null) { - tiles[level0][x][z] = new Tile(level0, x, z); - } - } - tiles[level][x][z].shapedTile = local134; - } - } + @OriginalMember(owner = "client!ob", name = "a", descriptor = "(IIIIIIIIIIIIIIIIIIII)V") + public static void setTile(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9, @OriginalArg(10) int arg10, @OriginalArg(11) int arg11, @OriginalArg(12) int arg12, @OriginalArg(13) int arg13, @OriginalArg(14) int arg14, @OriginalArg(15) int arg15, @OriginalArg(16) int arg16, @OriginalArg(17) int arg17, @OriginalArg(18) int arg18, @OriginalArg(19) int arg19) { + @Pc(12) PlainTile tile; + @Pc(14) int level0; + if (arg3 == 0) { + tile = new PlainTile(arg10, arg11, arg12, arg13, -1, arg18, false); + for (level0 = level; level0 >= 0; level0--) { + if (tiles[level0][x][z] == null) { + tiles[level0][x][z] = new Tile(level0, x, z); + } + } + tiles[level][x][z].plainTile = tile; + } else if (arg3 == 1) { + tile = new PlainTile(arg14, arg15, arg16, arg17, arg5, arg19, arg6 == arg7 && arg6 == arg8 && arg6 == arg9); + for (level0 = level; level0 >= 0; level0--) { + if (tiles[level0][x][z] == null) { + tiles[level0][x][z] = new Tile(level0, x, z); + } + } + tiles[level][x][z].plainTile = tile; + } else { + @Pc(134) ShapedTile local134 = new ShapedTile(arg3, arg4, arg5, x, z, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); + for (level0 = level; level0 >= 0; level0--) { + if (tiles[level0][x][z] == null) { + tiles[level0][x][z] = new Tile(level0, x, z); + } + } + tiles[level][x][z].shapedTile = local134; + } + } - @OriginalMember(owner = "client!rm", name = "a", descriptor = "(III)V") - public static void method3801() { - for (@Pc(1) int level = 0; level < levels; level++) { - for (@Pc(6) int x = 0; x < width; x++) { - for (@Pc(11) int z = 0; z < length; z++) { - @Pc(22) Tile local22 = tiles[level][x][z]; - if (local22 != null) { - @Pc(27) Wall local27 = local22.wall; - if (local27 != null && local27.primary.method4543()) { - method1544(local27.primary, level, x, z, 1, 1); - if (local27.secondary != null && local27.secondary.method4543()) { - method1544(local27.secondary, level, x, z, 1, 1); - local27.primary.method4544(local27.secondary, 0, 0, 0, false); - local27.secondary = local27.secondary.createModel(); - } - local27.primary = local27.primary.createModel(); - } - for (@Pc(83) int local83 = 0; local83 < local22.sceneryLen; local83++) { - @Pc(92) Scenery local92 = local22.scenery[local83]; - if (local92 != null && local92.entity.method4543()) { - method1544(local92.entity, level, x, z, local92.xMax + 1 - local92.xMin, local92.zMax - local92.zMin + 1); - local92.entity = local92.entity.createModel(); - } - } - @Pc(131) GroundDecor local131 = local22.groundDecor; - if (local131 != null && local131.entity.method4543()) { - method3574(local131.entity, level, x, z); - local131.entity = local131.entity.createModel(); - } - } - } - } - } - } + @OriginalMember(owner = "client!rm", name = "a", descriptor = "(III)V") + public static void method3801() { + for (@Pc(1) int level = 0; level < levels; level++) { + for (@Pc(6) int x = 0; x < width; x++) { + for (@Pc(11) int z = 0; z < length; z++) { + @Pc(22) Tile local22 = tiles[level][x][z]; + if (local22 != null) { + @Pc(27) Wall local27 = local22.wall; + if (local27 != null && local27.primary.method4543()) { + method1544(local27.primary, level, x, z, 1, 1); + if (local27.secondary != null && local27.secondary.method4543()) { + method1544(local27.secondary, level, x, z, 1, 1); + local27.primary.method4544(local27.secondary, 0, 0, 0, false); + local27.secondary = local27.secondary.createModel(); + } + local27.primary = local27.primary.createModel(); + } + for (@Pc(83) int local83 = 0; local83 < local22.sceneryLen; local83++) { + @Pc(92) Scenery local92 = local22.scenery[local83]; + if (local92 != null && local92.entity.method4543()) { + method1544(local92.entity, level, x, z, local92.xMax + 1 - local92.xMin, local92.zMax - local92.zMin + 1); + local92.entity = local92.entity.createModel(); + } + } + @Pc(131) GroundDecor local131 = local22.groundDecor; + if (local131 != null && local131.entity.method4543()) { + method3574(local131.entity, level, x, z); + local131.entity = local131.entity.createModel(); + } + } + } + } + } + } - @OriginalMember(owner = "client!ib", name = "a", descriptor = "(IIIIIIIILclient!th;IZJ)Z") - public static boolean method2256(@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) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) Entity arg8, @OriginalArg(9) int arg9, @OriginalArg(10) boolean arg10, @OriginalArg(11) long arg11) { - @Pc(6) boolean local6 = tileHeights == underwaterTileHeights; - @Pc(8) int local8 = 0; - @Pc(17) int local17; - for (@Pc(10) int local10 = arg1; local10 < arg1 + arg3; local10++) { - for (local17 = arg2; local17 < arg2 + arg4; local17++) { - if (local10 < 0 || local17 < 0 || local10 >= width || local17 >= length) { - return false; - } - @Pc(42) Tile local42 = tiles[arg0][local10][local17]; - if (local42 != null && local42.sceneryLen >= 5) { - return false; - } - } - } - @Pc(58) Scenery local58 = new Scenery(); - local58.key = arg11; - local58.level = arg0; - local58.anInt1699 = arg5; - local58.anInt1703 = arg6; - local58.anInt1706 = arg7; - local58.entity = arg8; - local58.anInt1714 = arg9; - local58.xMin = arg1; - local58.zMin = arg2; - local58.xMax = arg1 + arg3 - 1; - local58.zMax = arg2 + arg4 - 1; - @Pc(108) int local108; - for (local17 = arg1; local17 < arg1 + arg3; local17++) { - for (local108 = arg2; local108 < arg2 + arg4; local108++) { - @Pc(115) int local115 = 0; - if (local17 > arg1) { - local115++; - } - if (local17 < arg1 + arg3 - 1) { - local115 += 4; - } - if (local108 > arg2) { - local115 += 8; - } - if (local108 < arg2 + arg4 - 1) { - local115 += 2; - } - for (@Pc(141) int local141 = arg0; local141 >= 0; local141--) { - if (tiles[local141][local17][local108] == null) { - tiles[local141][local17][local108] = new Tile(local141, local17, local108); - } - } - @Pc(174) Tile local174 = tiles[arg0][local17][local108]; - local174.scenery[local174.sceneryLen] = local58; - local174.interiorFlags[local174.sceneryLen] = local115; - local174.allInteriorFlags |= local115; - local174.sceneryLen++; - if (local6 && anIntArrayArray11[local17][local108] != 0) { - local8 = anIntArrayArray11[local17][local108]; - } - } - } - if (local6 && local8 != 0) { - for (local17 = arg1; local17 < arg1 + arg3; local17++) { - for (local108 = arg2; local108 < arg2 + arg4; local108++) { - if (anIntArrayArray11[local17][local108] == 0) { - anIntArrayArray11[local17][local108] = local8; - } - } - } - } - if (arg10) { - scenery[sceneryLen++] = local58; - } - return true; - } + @OriginalMember(owner = "client!ib", name = "a", descriptor = "(IIIIIIIILclient!th;IZJ)Z") + public static boolean method2256(@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) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) Entity arg8, @OriginalArg(9) int arg9, @OriginalArg(10) boolean arg10, @OriginalArg(11) long arg11) { + @Pc(6) boolean local6 = tileHeights == underwaterTileHeights; + @Pc(8) int local8 = 0; + @Pc(17) int local17; + for (@Pc(10) int local10 = arg1; local10 < arg1 + arg3; local10++) { + for (local17 = arg2; local17 < arg2 + arg4; local17++) { + if (local10 < 0 || local17 < 0 || local10 >= width || local17 >= length) { + return false; + } + @Pc(42) Tile local42 = tiles[arg0][local10][local17]; + if (local42 != null && local42.sceneryLen >= 5) { + return false; + } + } + } + @Pc(58) Scenery local58 = new Scenery(); + local58.key = arg11; + local58.level = arg0; + local58.anInt1699 = arg5; + local58.anInt1703 = arg6; + local58.anInt1706 = arg7; + local58.entity = arg8; + local58.anInt1714 = arg9; + local58.xMin = arg1; + local58.zMin = arg2; + local58.xMax = arg1 + arg3 - 1; + local58.zMax = arg2 + arg4 - 1; + @Pc(108) int local108; + for (local17 = arg1; local17 < arg1 + arg3; local17++) { + for (local108 = arg2; local108 < arg2 + arg4; local108++) { + @Pc(115) int local115 = 0; + if (local17 > arg1) { + local115++; + } + if (local17 < arg1 + arg3 - 1) { + local115 += 4; + } + if (local108 > arg2) { + local115 += 8; + } + if (local108 < arg2 + arg4 - 1) { + local115 += 2; + } + for (@Pc(141) int local141 = arg0; local141 >= 0; local141--) { + if (tiles[local141][local17][local108] == null) { + tiles[local141][local17][local108] = new Tile(local141, local17, local108); + } + } + @Pc(174) Tile local174 = tiles[arg0][local17][local108]; + local174.scenery[local174.sceneryLen] = local58; + local174.interiorFlags[local174.sceneryLen] = local115; + local174.allInteriorFlags |= local115; + local174.sceneryLen++; + if (local6 && anIntArrayArray11[local17][local108] != 0) { + local8 = anIntArrayArray11[local17][local108]; + } + } + } + if (local6 && local8 != 0) { + for (local17 = arg1; local17 < arg1 + arg3; local17++) { + for (local108 = arg2; local108 < arg2 + arg4; local108++) { + if (anIntArrayArray11[local17][local108] == 0) { + anIntArrayArray11[local17][local108] = local8; + } + } + } + } + if (arg10) { + scenery[sceneryLen++] = local58; + } + return true; + } - @OriginalMember(owner = "client!dg", name = "a", descriptor = "(IIIIILclient!th;IJZ)Z") - public static boolean method1141(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) Entity arg5, @OriginalArg(6) int arg6, @OriginalArg(7) long arg7, @OriginalArg(8) boolean arg8) { - if (arg5 == null) { - return true; - } - @Pc(7) int local7 = arg1 - arg4; - @Pc(11) int local11 = arg2 - arg4; - @Pc(15) int local15 = arg1 + arg4; - @Pc(19) int local19 = arg2 + arg4; - if (arg8) { - if (arg6 > 640 && arg6 < 1408) { - local19 += 128; - } - if (arg6 > 1152 && arg6 < 1920) { - local15 += 128; - } - if (arg6 > 1664 || arg6 < 384) { - local11 -= 128; - } - if (arg6 > 128 && arg6 < 896) { - local7 -= 128; - } - } - local7 /= 128; - local11 /= 128; - local15 /= 128; - local19 /= 128; - return method2256(arg0, local7, local11, local15 + 1 - local7, local19 - local11 + 1, arg1, arg2, arg3, arg5, arg6, true, arg7); - } + @OriginalMember(owner = "client!dg", name = "a", descriptor = "(IIIIILclient!th;IJZ)Z") + public static boolean method1141(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) Entity arg5, @OriginalArg(6) int arg6, @OriginalArg(7) long arg7, @OriginalArg(8) boolean arg8) { + if (arg5 == null) { + return true; + } + @Pc(7) int local7 = arg1 - arg4; + @Pc(11) int local11 = arg2 - arg4; + @Pc(15) int local15 = arg1 + arg4; + @Pc(19) int local19 = arg2 + arg4; + if (arg8) { + if (arg6 > 640 && arg6 < 1408) { + local19 += 128; + } + if (arg6 > 1152 && arg6 < 1920) { + local15 += 128; + } + if (arg6 > 1664 || arg6 < 384) { + local11 -= 128; + } + if (arg6 > 128 && arg6 < 896) { + local7 -= 128; + } + } + local7 /= 128; + local11 /= 128; + local15 /= 128; + local19 /= 128; + return method2256(arg0, local7, local11, local15 + 1 - local7, local19 - local11 + 1, arg1, arg2, arg3, arg5, arg6, true, arg7); + } - @OriginalMember(owner = "client!dg", name = "a", descriptor = "(IIIIIILclient!mj;)V") - public static void method1144(@OriginalArg(1) int z, @OriginalArg(2) int x, @OriginalArg(3) int level, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) CollisionMap collision) { - @Pc(9) long key = 0L; - if (arg3 == 0) { - key = getWallKey(level, x, z); - } else if (arg3 == 1) { - key = getWallDecorKey(level, x, z); - } else if (arg3 == 2) { - key = getSceneryKey(level, x, z); - } else if (arg3 == 3) { - key = getGroundDecorKey(level, x, z); - } - @Pc(57) int shape = (int) key >> 14 & 0x1F; - @Pc(70) int id = (int) (key >>> 32) & Integer.MAX_VALUE; - @Pc(74) LocType type = LocTypeList.get(id); - if (type.hasAreaSound()) { - AreaSoundManager.remove(x, type, z, level); - } - @Pc(92) int angle = (int) key >> 20 & 0x3; - if (key == 0L) { - return; - } - @Pc(100) Entity local100 = null; - @Pc(102) Entity local102 = null; - if (arg3 == 0) { - @Pc(110) Wall wall = removeWall(level, x, z); - if (wall != null) { - local100 = wall.primary; - local102 = wall.secondary; - } - if (type.anInt4435 != 0) { - collision.unflagWall(angle, type.aBoolean207, z, shape, x); - } - } else if (arg3 == 1) { - @Pc(233) WallDecor wallDecor = removeWallDecor(level, x, z); - if (wallDecor != null) { - local100 = wallDecor.primary; - local102 = wallDecor.secondary; - } - } else if (arg3 == 2) { - @Pc(148) Scenery scenery = removeScenery(level, x, z); - if (scenery != null) { - local100 = scenery.entity; - } - if (type.anInt4435 != 0 && type.width + x < 104 && type.width + z < 104 && x + type.length < 104 && z + type.length < 104) { - collision.unflagScenery(x, type.width, type.aBoolean207, angle, type.length, z); - } - } else if (arg3 == 3) { - @Pc(211) GroundDecor groundDecor = removeGroundDecor(level, x, z); - if (groundDecor != null) { - local100 = groundDecor.entity; - } - if (type.anInt4435 == 1) { - collision.unflagGroundDecor(z, x); - } - } - if (!GlRenderer.enabled || !type.aBoolean212) { - return; - } - if (shape == 2) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, 0, angle + 4, 0, shape, x, z, arg4); - } - if (local102 instanceof Loc) { - ((Loc) local102).method1046(); - } else { - Loc.method181(type, 0, angle + 1 & 0x3, 0, shape, x, z, arg4); - } - } else if (shape == 5) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, anIntArray469[angle] * 8, angle, Static34.anIntArray80[angle] * 8, 4, x, z, arg4); - } - } else if (shape == 6) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); - } - } else if (shape == 7) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, 0, (angle + 2 & 0x3) + 4, 0, 4, x, z, arg4); - } - } else if (shape == 8) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); - } - if (local102 instanceof Loc) { - ((Loc) local102).method1046(); - } else { - Loc.method181(type, anIntArray154[angle] * 8, (angle + 2 & 0x3) + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); - } - } else if (shape == 11) { - if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, 0, angle + 4, 0, 10, x, z, arg4); - } - } else if (local100 instanceof Loc) { - ((Loc) local100).method1046(); - } else { - Loc.method181(type, 0, angle, 0, shape, x, z, arg4); - } - } + @OriginalMember(owner = "client!dg", name = "a", descriptor = "(IIIIIILclient!mj;)V") + public static void method1144(@OriginalArg(1) int z, @OriginalArg(2) int x, @OriginalArg(3) int level, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) CollisionMap collision) { + @Pc(9) long key = 0L; + if (arg3 == 0) { + key = getWallKey(level, x, z); + } else if (arg3 == 1) { + key = getWallDecorKey(level, x, z); + } else if (arg3 == 2) { + key = getSceneryKey(level, x, z); + } else if (arg3 == 3) { + key = getGroundDecorKey(level, x, z); + } + @Pc(57) int shape = (int) key >> 14 & 0x1F; + @Pc(70) int id = (int) (key >>> 32) & Integer.MAX_VALUE; + @Pc(74) LocType type = LocTypeList.get(id); + if (type.hasAreaSound()) { + AreaSoundManager.remove(x, type, z, level); + } + @Pc(92) int angle = (int) key >> 20 & 0x3; + if (key == 0L) { + return; + } + @Pc(100) Entity local100 = null; + @Pc(102) Entity local102 = null; + if (arg3 == 0) { + @Pc(110) Wall wall = removeWall(level, x, z); + if (wall != null) { + local100 = wall.primary; + local102 = wall.secondary; + } + if (type.anInt4435 != 0) { + collision.unflagWall(angle, type.aBoolean207, z, shape, x); + } + } else if (arg3 == 1) { + @Pc(233) WallDecor wallDecor = removeWallDecor(level, x, z); + if (wallDecor != null) { + local100 = wallDecor.primary; + local102 = wallDecor.secondary; + } + } else if (arg3 == 2) { + @Pc(148) Scenery scenery = removeScenery(level, x, z); + if (scenery != null) { + local100 = scenery.entity; + } + if (type.anInt4435 != 0 && type.width + x < 104 && type.width + z < 104 && x + type.length < 104 && z + type.length < 104) { + collision.unflagScenery(x, type.width, type.aBoolean207, angle, type.length, z); + } + } else if (arg3 == 3) { + @Pc(211) GroundDecor groundDecor = removeGroundDecor(level, x, z); + if (groundDecor != null) { + local100 = groundDecor.entity; + } + if (type.anInt4435 == 1) { + collision.unflagGroundDecor(z, x); + } + } + if (!GlRenderer.enabled || !type.aBoolean212) { + return; + } + if (shape == 2) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, 0, angle + 4, 0, shape, x, z, arg4); + } + if (local102 instanceof Loc) { + ((Loc) local102).method1046(); + } else { + Loc.method181(type, 0, angle + 1 & 0x3, 0, shape, x, z, arg4); + } + } else if (shape == 5) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, anIntArray469[angle] * 8, angle, Static34.anIntArray80[angle] * 8, 4, x, z, arg4); + } + } else if (shape == 6) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); + } + } else if (shape == 7) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, 0, (angle + 2 & 0x3) + 4, 0, 4, x, z, arg4); + } + } else if (shape == 8) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); + } + if (local102 instanceof Loc) { + ((Loc) local102).method1046(); + } else { + Loc.method181(type, anIntArray154[angle] * 8, (angle + 2 & 0x3) + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4); + } + } else if (shape == 11) { + if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, 0, angle + 4, 0, 10, x, z, arg4); + } + } else if (local100 instanceof Loc) { + ((Loc) local100).method1046(); + } else { + Loc.method181(type, 0, angle, 0, shape, x, z, arg4); + } + } - @OriginalMember(owner = "client!ed", name = "a", descriptor = "(IIII)I") - public static int method1309(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - if (arg0 > 243) { - arg1 >>= 0x4; - } else if (arg0 > 217) { - arg1 >>= 0x3; - } else if (arg0 > 192) { - arg1 >>= 0x2; - } else if (arg0 > 179) { - arg1 >>= 0x1; - } - return (arg0 >> 1) + (arg1 >> 5 << 7) + (arg2 >> 2 << 10); - } + @OriginalMember(owner = "client!ed", name = "a", descriptor = "(IIII)I") + public static int method1309(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + if (arg0 > 243) { + arg1 >>= 0x4; + } else if (arg0 > 217) { + arg1 >>= 0x3; + } else if (arg0 > 192) { + arg1 >>= 0x2; + } else if (arg0 > 179) { + arg1 >>= 0x1; + } + return (arg0 >> 1) + (arg1 >> 5 << 7) + (arg2 >> 2 << 10); + } - @OriginalMember(owner = "client!sd", name = "c", descriptor = "(II)V") - public static void method3884(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(7) Tile local7 = tiles[0][arg0][arg1]; - for (@Pc(9) int local9 = 0; local9 < 3; local9++) { - @Pc(30) Tile local30 = tiles[local9][arg0][arg1] = tiles[local9 + 1][arg0][arg1]; - if (local30 != null) { - local30.anInt672--; - for (@Pc(40) int local40 = 0; local40 < local30.sceneryLen; local40++) { - @Pc(49) Scenery local49 = local30.scenery[local40]; - if ((local49.key >> 29 & 0x3L) == 2L && local49.xMin == arg0 && local49.zMin == arg1) { - local49.level--; - } - } - } - } - if (tiles[0][arg0][arg1] == null) { - tiles[0][arg0][arg1] = new Tile(0, arg0, arg1); - } - tiles[0][arg0][arg1].aClass3_Sub5_1 = local7; - tiles[3][arg0][arg1] = null; - } + @OriginalMember(owner = "client!sd", name = "c", descriptor = "(II)V") + public static void method3884(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(7) Tile local7 = tiles[0][arg0][arg1]; + for (@Pc(9) int local9 = 0; local9 < 3; local9++) { + @Pc(30) Tile local30 = tiles[local9][arg0][arg1] = tiles[local9 + 1][arg0][arg1]; + if (local30 != null) { + local30.anInt672--; + for (@Pc(40) int local40 = 0; local40 < local30.sceneryLen; local40++) { + @Pc(49) Scenery local49 = local30.scenery[local40]; + if ((local49.key >> 29 & 0x3L) == 2L && local49.xMin == arg0 && local49.zMin == arg1) { + local49.level--; + } + } + } + } + if (tiles[0][arg0][arg1] == null) { + tiles[0][arg0][arg1] = new Tile(0, arg0, arg1); + } + tiles[0][arg0][arg1].aClass3_Sub5_1 = local7; + tiles[3][arg0][arg1] = null; + } - @OriginalMember(owner = "client!fm", name = "a", descriptor = "(IIIIII)Z") - public static boolean method1599(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { - @Pc(16) int local16; - @Pc(20) int local20; - if (arg1 != arg2 || arg3 != arg4) { - for (local16 = arg1; local16 <= arg2; local16++) { - for (local20 = arg3; local20 <= arg4; local20++) { - if (anIntArrayArrayArray12[arg0][local16][local20] == -Static156.anInt437) { - return false; - } - } - } - local16 = (arg1 << 7) + 1; - local20 = (arg3 << 7) + 2; - @Pc(156) int local156 = tileHeights[arg0][arg1][arg3] + arg5; - if (!method4394(local16, local156, local20)) { - return false; - } - @Pc(169) int local169 = (arg2 << 7) - 1; - if (!method4394(local169, local156, local20)) { - return false; - } - @Pc(182) int local182 = (arg4 << 7) - 1; - if (!method4394(local16, local156, local182)) { - return false; - } else return method4394(local169, local156, local182); - } else if (Static9.method187(arg0, arg1, arg3)) { - local16 = arg1 << 7; - local20 = arg3 << 7; - return method4394(local16 + 1, tileHeights[arg0][arg1][arg3] + arg5, local20 + 1) && method4394(local16 + 128 - 1, tileHeights[arg0][arg1 + 1][arg3] + arg5, local20 + 1) && method4394(local16 + 128 - 1, tileHeights[arg0][arg1 + 1][arg3 + 1] + arg5, local20 + 128 - 1) && method4394(local16 + 1, tileHeights[arg0][arg1][arg3 + 1] + arg5, local20 + 128 - 1); - } else { - return false; - } - } + @OriginalMember(owner = "client!fm", name = "a", descriptor = "(IIIIII)Z") + public static boolean method1599(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { + @Pc(16) int local16; + @Pc(20) int local20; + if (arg1 != arg2 || arg3 != arg4) { + for (local16 = arg1; local16 <= arg2; local16++) { + for (local20 = arg3; local20 <= arg4; local20++) { + if (anIntArrayArrayArray12[arg0][local16][local20] == -Static156.anInt437) { + return false; + } + } + } + local16 = (arg1 << 7) + 1; + local20 = (arg3 << 7) + 2; + @Pc(156) int local156 = tileHeights[arg0][arg1][arg3] + arg5; + if (!method4394(local16, local156, local20)) { + return false; + } + @Pc(169) int local169 = (arg2 << 7) - 1; + if (!method4394(local169, local156, local20)) { + return false; + } + @Pc(182) int local182 = (arg4 << 7) - 1; + if (!method4394(local16, local156, local182)) { + return false; + } else return method4394(local169, local156, local182); + } else if (Static9.method187(arg0, arg1, arg3)) { + local16 = arg1 << 7; + local20 = arg3 << 7; + return method4394(local16 + 1, tileHeights[arg0][arg1][arg3] + arg5, local20 + 1) && method4394(local16 + 128 - 1, tileHeights[arg0][arg1 + 1][arg3] + arg5, local20 + 1) && method4394(local16 + 128 - 1, tileHeights[arg0][arg1 + 1][arg3 + 1] + arg5, local20 + 128 - 1) && method4394(local16 + 1, tileHeights[arg0][arg1][arg3 + 1] + arg5, local20 + 128 - 1); + } else { + return false; + } + } - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(IIIILclient!th;Lclient!th;IIIIJ)V") - public static void setWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity primary, @OriginalArg(5) Entity secondary, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int xOffset, @OriginalArg(9) int zOffset, @OriginalArg(10) long key) { - if (primary == null) { - return; - } - @Pc(6) WallDecor wallDecor = new WallDecor(); - wallDecor.key = key; - wallDecor.xFine = x * 128 + 64; - wallDecor.zFine = z * 128 + 64; - wallDecor.anInt1391 = arg3; - wallDecor.primary = primary; - wallDecor.secondary = secondary; - wallDecor.anInt1395 = arg6; - wallDecor.anInt1388 = arg7; - wallDecor.xOffset = xOffset; - wallDecor.zOffset = zOffset; - for (@Pc(46) int level0 = level; level0 >= 0; level0--) { - if (tiles[level0][x][z] == null) { - tiles[level0][x][z] = new Tile(level0, x, z); - } - } - tiles[level][x][z].wallDecor = wallDecor; - } + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(IIIILclient!th;Lclient!th;IIIIJ)V") + public static void setWallDecor(@OriginalArg(0) int level, @OriginalArg(1) int x, @OriginalArg(2) int z, @OriginalArg(3) int arg3, @OriginalArg(4) Entity primary, @OriginalArg(5) Entity secondary, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int xOffset, @OriginalArg(9) int zOffset, @OriginalArg(10) long key) { + if (primary == null) { + return; + } + @Pc(6) WallDecor wallDecor = new WallDecor(); + wallDecor.key = key; + wallDecor.xFine = x * 128 + 64; + wallDecor.zFine = z * 128 + 64; + wallDecor.anInt1391 = arg3; + wallDecor.primary = primary; + wallDecor.secondary = secondary; + wallDecor.anInt1395 = arg6; + wallDecor.anInt1388 = arg7; + wallDecor.xOffset = xOffset; + wallDecor.zOffset = zOffset; + for (@Pc(46) int level0 = level; level0 >= 0; level0--) { + if (tiles[level0][x][z] == null) { + tiles[level0][x][z] = new Tile(level0, x, z); + } + } + tiles[level][x][z].wallDecor = wallDecor; + } - @OriginalMember(owner = "client!pb", name = "b", descriptor = "(III)Lclient!jj;") - public static ObjStackEntity method3420(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; - if (local7 == null) { - return null; - } else { - @Pc(14) ObjStackEntity local14 = local7.aClass79_1; - local7.aClass79_1 = null; - return local14; - } - } + @OriginalMember(owner = "client!pb", name = "b", descriptor = "(III)Lclient!jj;") + public static ObjStackEntity method3420(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; + if (local7 == null) { + return null; + } else { + @Pc(14) ObjStackEntity local14 = local7.aClass79_1; + local7.aClass79_1 = null; + return local14; + } + } - @OriginalMember(owner = "client!ub", name = "a", descriptor = "(Lclient!bj;Z)V") - public static void method4245(@OriginalArg(0) Tile arg0, @OriginalArg(1) boolean arg1) { - Static7.aClass69_32.addTail(arg0); - while (true) { - @Pc(8) Tile local8; - @Pc(18) int local18; - @Pc(21) int local21; - @Pc(24) int local24; - @Pc(27) int local27; - @Pc(31) Tile[][] local31; - @Pc(65) int local65; - @Pc(115) int local115; - @Pc(894) int local894; - @Pc(899) int local899; - @Pc(904) int local904; - @Pc(153) Tile local153; - @Pc(1332) int local1332; - do { - do { - do { - do { - do { - do { - while (true) { - @Pc(44) int var9; - @Pc(48) int var10; - @Pc(907) int var17; - @Pc(916) int var18; - @Pc(363) Wall var22; - @Pc(469) boolean var24; - @Pc(425) Scenery var25; - @Pc(1179) Tile var32; - while (true) { - do { - local8 = (Tile) Static7.aClass69_32.removeHead(); - if (local8 == null) { - return; - } - } while (!local8.aBoolean46); - local18 = local8.anInt669; - local21 = local8.anInt666; - local24 = local8.anInt672; - local27 = local8.anInt668; - local31 = tiles[local24]; - @Pc(33) float local33 = 0.0F; - if (GlRenderer.enabled) { - if (underwaterTileHeights == tileHeights) { - var9 = anIntArrayArray11[local18][local21]; - var10 = var9 & 0xFFFFFF; - if (var10 != Static152.anInt3604) { - Static152.anInt3604 = var10; - WaterMaterialRenderer.method619(var10); - FogManager.method3066(WaterMaterialRenderer.method2422()); - } - local65 = var9 >>> 24 << 3; - if (local65 != Static247.anInt730) { - Static247.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; - MaterialManager.setMaterial(-local115, 3); - local33 = 201.5F; - GlRenderer.method4159(local33); - } else { - local33 = 201.5F - (float) (local27 + 1) * 50.0F; - GlRenderer.method4159(local33); - } - } - if (!local8.aBoolean45) { - break; - } - if (arg1) { - if (local24 > 0) { - local153 = tiles[local24 - 1][local18][local21]; - if (local153 != null && local153.aBoolean46) { - continue; - } - } - if (local18 <= Static123.anInt4069 && local18 > LightingManager.anInt987) { - local153 = local31[local18 - 1][local21]; - if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x1) == 0)) { - continue; - } - } - if (local18 >= Static123.anInt4069 && local18 < LightingManager.anInt15 - 1) { - local153 = local31[local18 + 1][local21]; - if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x4) == 0)) { - continue; - } - } - if (local21 <= Static193.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) { - local153 = local31[local18][local21 + 1]; - if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x2) == 0)) { - continue; - } - } - } else { - arg1 = true; - } - local8.aBoolean45 = false; - if (local8.aClass3_Sub5_1 != null) { - local153 = local8.aClass3_Sub5_1; - if (GlRenderer.enabled) { - GlRenderer.method4159(201.5F - (float) (local153.anInt668 + 1) * 50.0F); - } - 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)); - } - } else - Static247.method2610(local153.plainTile, 0, Static160.anInt2886, Static121.anInt3038, Static231.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); - } else { - LightingManager.method2388(var22.anInt3049, Static123.anInt3555, Static123.anInt3947, Static217.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); - } - 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); - } - 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); - } - } - if (GlRenderer.enabled) { - GlRenderer.method4159(local33); - } - } - var24 = false; - 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); - } else { - var24 = true; - Static147.method2762(local8.shapedTile, Static160.anInt2886, Static121.anInt3038, Static231.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); - } 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); - } - } - if (var24) { - @Pc(549) GroundDecor local549 = local8.groundDecor; - if (local549 != null && (local549.key & 0x80000000L) != 0L) { - if (GlRenderer.enabled && local549.aBoolean49) { - GlRenderer.method4159(local33 + 50.0F - 1.5F); - } - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - if (GlRenderer.enabled && local549.aBoolean49) { - GlRenderer.method4159(local33); - } - } - } - var10 = 0; - local65 = 0; - @Pc(616) Wall local616 = local8.wall; - @Pc(619) WallDecor local619 = local8.wallDecor; - if (local616 != null || local619 != null) { - if (Static123.anInt4069 == local18) { - var10++; - } else if (Static123.anInt4069 < local18) { - var10 += 2; - } - if (Static193.anInt4539 == local21) { - var10 += 3; - } else if (Static193.anInt4539 > local21) { - var10 += 6; - } - local65 = Static247.anIntArray324[var10]; - local8.anInt670 = Static191.anIntArray386[var10]; - } - if (local616 != null) { - if ((local616.anInt3049 & Static247.anIntArray215[var10]) == 0) { - local8.anInt663 = 0; - } else if (local616.anInt3049 == 16) { - local8.anInt663 = 3; - local8.anInt665 = Static247.anIntArray294[var10]; - local8.anInt667 = 3 - local8.anInt665; - } else if (local616.anInt3049 == 32) { - local8.anInt663 = 6; - local8.anInt665 = Static247.anIntArray489[var10]; - local8.anInt667 = 6 - local8.anInt665; - } else if (local616.anInt3049 == 64) { - local8.anInt663 = 12; - local8.anInt665 = Static247.anIntArray211[var10]; - local8.anInt667 = 12 - local8.anInt665; - } else { - local8.anInt663 = 9; - local8.anInt665 = Static247.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); - } - 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); - } - 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); - } - 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); - } - } - if (local619 != null && !method4611(local27, local18, local21, local619.primary.getMinY())) { - if (GlRenderer.enabled) { - GlRenderer.method4159(local33 - 0.5F); - } - if ((local619.anInt1395 & local65) != 0) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - } else if (local619.anInt1395 == 256) { - local894 = local619.xFine - Static123.anInt3555; - local899 = local619.anInt1391 - Static123.anInt3947; - local904 = local619.zFine - Static217.anInt4903; - var17 = local619.anInt1388; - if (var17 == 1 || var17 == 2) { - var18 = -local894; - } else { - var18 = local894; - } - @Pc(928) int local928; - if (var17 == 2 || var17 == 3) { - local928 = -local904; - } else { - local928 = local904; - } - if (local928 < var18) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - } else if (local619.secondary != null) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); - } - local619.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local894, local899, local904, local619.key, local24, null); - } - } - if (GlRenderer.enabled) { - GlRenderer.method4159(local33); - } - } - if (var24) { - @Pc(1001) GroundDecor local1001 = local8.groundDecor; - if (local1001 != null && (local1001.key & 0x80000000L) == 0L) { - if (GlRenderer.enabled && local1001.aBoolean49) { - GlRenderer.method4159(local33 + 50.0F - 1.5F); - } - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - if (GlRenderer.enabled && local1001.aBoolean49) { - GlRenderer.method4159(local33); - } - } - @Pc(1064) ObjStackEntity local1064 = local8.aClass79_1; - if (local1064 != null && local1064.anInt3063 == 0) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); - } - if (local1064.aClass8_7 != null) { - local1064.aClass8_7.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); - } - if (local1064.aClass8_8 != null) { - local1064.aClass8_8.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); - } - if (local1064.aClass8_9 != null) { - local1064.aClass8_9.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); - } - } - } - local894 = local8.allInteriorFlags; - if (local894 != 0) { - if (local18 < Static123.anInt4069 && (local894 & 0x4) != 0) { - var32 = local31[local18 + 1][local21]; - if (var32 != null && var32.aBoolean46) { - Static7.aClass69_32.addTail(var32); - } - } - if (local21 < Static193.anInt4539 && (local894 & 0x2) != 0) { - var32 = local31[local18][local21 + 1]; - if (var32 != null && var32.aBoolean46) { - Static7.aClass69_32.addTail(var32); - } - } - if (local18 > Static123.anInt4069 && (local894 & 0x1) != 0) { - var32 = local31[local18 - 1][local21]; - if (var32 != null && var32.aBoolean46) { - Static7.aClass69_32.addTail(var32); - } - } - if (local21 > Static193.anInt4539 && (local894 & 0x8) != 0) { - var32 = local31[local18][local21 - 1]; - if (var32 != null && var32.aBoolean46) { - Static7.aClass69_32.addTail(var32); - } - } - } - break; - } - if (local8.anInt663 != 0) { - var24 = true; - for (var10 = 0; var10 < local8.sceneryLen; var10++) { - if (local8.scenery[var10].anInt1707 != Static156.anInt437 && (local8.interiorFlags[var10] & local8.anInt663) == local8.anInt665) { - var24 = false; - break; - } - } - if (var24) { - var22 = local8.wall; - if (!method3850(local27, local18, local21, var22.anInt3049)) { - if (GlRenderer.enabled) { - label882: - { - if ((var22.key & 0xFC000L) == 16384L) { - local65 = var22.xFine - Static123.anInt3555; - local115 = var22.zFine - Static217.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); - 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); - 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); - 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); - break label882; - } - } - } - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - } - local8.anInt663 = 0; - } - } - if (!local8.aBoolean47) { - break; - } - try { - var9 = local8.sceneryLen; - local8.aBoolean47 = false; - var10 = 0; - label767: - for (local65 = 0; local65 < var9; local65++) { - var25 = local8.scenery[local65]; - if (var25.anInt1707 != Static156.anInt437) { - for (local1332 = var25.xMin; local1332 <= var25.xMax; local1332++) { - for (local894 = var25.zMin; local894 <= var25.zMax; local894++) { - var32 = local31[local1332][local894]; - if (var32.aBoolean45) { - local8.aBoolean47 = true; - continue label767; - } - if (var32.anInt663 != 0) { - local904 = 0; - if (local1332 > var25.xMin) { - local904++; - } - if (local1332 < var25.xMax) { - local904 += 4; - } - if (local894 > var25.zMin) { - local904 += 8; - } - if (local894 < var25.zMax) { - local904 += 2; - } - if ((local904 & var32.anInt663) == local8.anInt667) { - local8.aBoolean47 = true; - continue label767; - } - } - } - } - aClass31Array2[var10++] = var25; - local1332 = Static123.anInt4069 - var25.xMin; - local894 = var25.xMax - Static123.anInt4069; - if (local894 > local1332) { - local1332 = local894; - } - local899 = Static193.anInt4539 - var25.zMin; - local904 = var25.zMax - Static193.anInt4539; - if (local904 > local899) { - var25.anInt1705 = local1332 + local904; - } else { - var25.anInt1705 = local1332 + local899; - } - } - } - while (var10 > 0) { - local65 = -50; - local115 = -1; - for (local1332 = 0; local1332 < var10; local1332++) { - @Pc(1628) Scenery local1628 = aClass31Array2[local1332]; - if (local1628.anInt1707 != Static156.anInt437) { - if (local1628.anInt1705 > local65) { - local65 = local1628.anInt1705; - local115 = local1332; - } else if (local1628.anInt1705 == local65) { - local899 = local1628.anInt1699 - Static123.anInt3555; - local904 = local1628.anInt1703 - Static217.anInt4903; - var17 = aClass31Array2[local115].anInt1699 - Static123.anInt3555; - var18 = aClass31Array2[local115].anInt1703 - Static217.anInt4903; - if (local899 * local899 + local904 * local904 > var17 * var17 + var18 * var18) { - local115 = local1332; - } - } - } - } - if (local115 == -1) { - break; - } - @Pc(1697) Scenery local1697 = aClass31Array2[local115]; - local1697.anInt1707 = Static156.anInt437; - 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); - local894 = local1697.anInt1699 - Static123.anInt3555; - local899 = local1697.anInt1703 - Static217.anInt4903; - local904 = (int) (local1697.key >> 20 & 0x3L); - if (local904 == 1 || local904 == 3) { - if (local899 > -local894) { - LightingManager.method2397(local24, local18, local21 - 1, local18 - 1, local21); - } else { - LightingManager.method2397(local24, local18, local21 + 1, local18 + 1, local21); - } - } else if (local899 > local894) { - LightingManager.method2397(local24, local18, local21 - 1, local18 + 1, local21); - } else { - 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); - } - } - 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); - } - for (local894 = local1697.xMin; local894 <= local1697.xMax; local894++) { - for (local899 = local1697.zMin; local899 <= local1697.zMax; local899++) { - @Pc(1863) Tile local1863 = local31[local894][local899]; - if (local1863.anInt663 != 0) { - Static7.aClass69_32.addTail(local1863); - } else if ((local894 != local18 || local899 != local21) && local1863.aBoolean46) { - Static7.aClass69_32.addTail(local1863); - } - } - } - } - if (!local8.aBoolean47) { - break; - } - } catch (@Pc(1895) Exception local1895) { - local8.aBoolean47 = false; - break; - } - } - } while (!local8.aBoolean46); - } while (local8.anInt663 != 0); - if (local18 > Static123.anInt4069 || local18 <= LightingManager.anInt987) { - break; - } - local153 = local31[local18 - 1][local21]; - } while (local153 != null && local153.aBoolean46); - if (local18 < Static123.anInt4069 || local18 >= LightingManager.anInt15 - 1) { - break; - } - local153 = local31[local18 + 1][local21]; - } while (local153 != null && local153.aBoolean46); - if (local21 > Static193.anInt4539 || local21 <= LightingManager.anInt4698) { - break; - } - local153 = local31[local18][local21 - 1]; - } while (local153 != null && local153.aBoolean46); - if (local21 < Static193.anInt4539 || local21 >= LightingManager.anInt4866 - 1) { - break; - } - local153 = local31[local18][local21 + 1]; - } while (local153 != null && local153.aBoolean46); - local8.aBoolean46 = false; - Static156.anInt1142--; - @Pc(1999) ObjStackEntity local1999 = local8.aClass79_1; - if (local1999 != null && local1999.anInt3063 != 0) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); - } - if (local1999.aClass8_7 != null) { - local1999.aClass8_7.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); - } - if (local1999.aClass8_8 != null) { - local1999.aClass8_8.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); - } - if (local1999.aClass8_9 != null) { - local1999.aClass8_9.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); - } - } - if (local8.anInt670 != 0) { - @Pc(2109) WallDecor local2109 = local8.wallDecor; - 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); - } - 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); - } else if (local2109.anInt1395 == 256) { - local65 = local2109.xFine - Static123.anInt3555; - local115 = local2109.anInt1391 - Static123.anInt3947; - local1332 = local2109.zFine - Static217.anInt4903; - local894 = local2109.anInt1388; - if (local894 == 1 || local894 == 2) { - local899 = -local65; - } else { - local899 = local65; - } - if (local894 == 2 || local894 == 3) { - local904 = -local1332; - } else { - local904 = local1332; - } - if (local904 >= local899) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); - } else if (local2109.secondary != null) { - if (GlRenderer.enabled) { - LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); - } - local2109.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local65, local115, local1332, local2109.key, local24, null); - } - } - } - @Pc(2275) Wall local2275 = local8.wall; - 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); - } - 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); - } - 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); - } - 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); - } - } - } - @Pc(2388) Tile local2388; - if (local24 < levels - 1) { - local2388 = tiles[local24 + 1][local18][local21]; - if (local2388 != null && local2388.aBoolean46) { - Static7.aClass69_32.addTail(local2388); - } - } - if (local18 < Static123.anInt4069) { - local2388 = local31[local18 + 1][local21]; - if (local2388 != null && local2388.aBoolean46) { - Static7.aClass69_32.addTail(local2388); - } - } - if (local21 < Static193.anInt4539) { - local2388 = local31[local18][local21 + 1]; - if (local2388 != null && local2388.aBoolean46) { - Static7.aClass69_32.addTail(local2388); - } - } - if (local18 > Static123.anInt4069) { - local2388 = local31[local18 - 1][local21]; - if (local2388 != null && local2388.aBoolean46) { - Static7.aClass69_32.addTail(local2388); - } - } - if (local21 > Static193.anInt4539) { - local2388 = local31[local18][local21 - 1]; - if (local2388 != null && local2388.aBoolean46) { - Static7.aClass69_32.addTail(local2388); - } - } - } - } + @OriginalMember(owner = "client!ub", name = "a", descriptor = "(Lclient!bj;Z)V") + public static void method4245(@OriginalArg(0) Tile arg0, @OriginalArg(1) boolean arg1) { + Static7.aClass69_32.addTail(arg0); + while (true) { + @Pc(8) Tile local8; + @Pc(18) int local18; + @Pc(21) int local21; + @Pc(24) int local24; + @Pc(27) int local27; + @Pc(31) Tile[][] local31; + @Pc(65) int local65; + @Pc(115) int local115; + @Pc(894) int local894; + @Pc(899) int local899; + @Pc(904) int local904; + @Pc(153) Tile local153; + @Pc(1332) int local1332; + do { + do { + do { + do { + do { + do { + while (true) { + @Pc(44) int var9; + @Pc(48) int var10; + @Pc(907) int var17; + @Pc(916) int var18; + @Pc(363) Wall var22; + @Pc(469) boolean var24; + @Pc(425) Scenery var25; + @Pc(1179) Tile var32; + while (true) { + do { + local8 = (Tile) Static7.aClass69_32.removeHead(); + if (local8 == null) { + return; + } + } while (!local8.aBoolean46); + local18 = local8.anInt669; + local21 = local8.anInt666; + local24 = local8.anInt672; + local27 = local8.anInt668; + local31 = tiles[local24]; + @Pc(33) float local33 = 0.0F; + if (GlRenderer.enabled) { + if (underwaterTileHeights == tileHeights) { + var9 = anIntArrayArray11[local18][local21]; + var10 = var9 & 0xFFFFFF; + if (var10 != Static152.anInt3604) { + Static152.anInt3604 = var10; + WaterMaterialRenderer.method619(var10); + FogManager.method3066(WaterMaterialRenderer.method2422()); + } + local65 = var9 >>> 24 << 3; + if (local65 != Static247.anInt730) { + Static247.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; + MaterialManager.setMaterial(-local115, 3); + local33 = 201.5F; + GlRenderer.method4159(local33); + } else { + local33 = 201.5F - (float) (local27 + 1) * 50.0F; + GlRenderer.method4159(local33); + } + } + if (!local8.aBoolean45) { + break; + } + if (arg1) { + if (local24 > 0) { + local153 = tiles[local24 - 1][local18][local21]; + if (local153 != null && local153.aBoolean46) { + continue; + } + } + if (local18 <= Static123.anInt4069 && local18 > LightingManager.anInt987) { + local153 = local31[local18 - 1][local21]; + if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x1) == 0)) { + continue; + } + } + if (local18 >= Static123.anInt4069 && local18 < LightingManager.anInt15 - 1) { + local153 = local31[local18 + 1][local21]; + if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x4) == 0)) { + continue; + } + } + if (local21 <= Static193.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) { + local153 = local31[local18][local21 + 1]; + if (local153 != null && local153.aBoolean46 && (local153.aBoolean45 || (local8.allInteriorFlags & 0x2) == 0)) { + continue; + } + } + } else { + arg1 = true; + } + local8.aBoolean45 = false; + if (local8.aClass3_Sub5_1 != null) { + local153 = local8.aClass3_Sub5_1; + if (GlRenderer.enabled) { + GlRenderer.method4159(201.5F - (float) (local153.anInt668 + 1) * 50.0F); + } + 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)); + } + } else + Static247.method2610(local153.plainTile, 0, Static160.anInt2886, Static121.anInt3038, Static231.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); + } else { + LightingManager.method2388(var22.anInt3049, Static123.anInt3555, Static123.anInt3947, Static217.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); + } + 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); + } + 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); + } + } + if (GlRenderer.enabled) { + GlRenderer.method4159(local33); + } + } + var24 = false; + 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); + } else { + var24 = true; + Static147.method2762(local8.shapedTile, Static160.anInt2886, Static121.anInt3038, Static231.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); + } 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); + } + } + if (var24) { + @Pc(549) GroundDecor local549 = local8.groundDecor; + if (local549 != null && (local549.key & 0x80000000L) != 0L) { + if (GlRenderer.enabled && local549.aBoolean49) { + GlRenderer.method4159(local33 + 50.0F - 1.5F); + } + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + if (GlRenderer.enabled && local549.aBoolean49) { + GlRenderer.method4159(local33); + } + } + } + var10 = 0; + local65 = 0; + @Pc(616) Wall local616 = local8.wall; + @Pc(619) WallDecor local619 = local8.wallDecor; + if (local616 != null || local619 != null) { + if (Static123.anInt4069 == local18) { + var10++; + } else if (Static123.anInt4069 < local18) { + var10 += 2; + } + if (Static193.anInt4539 == local21) { + var10 += 3; + } else if (Static193.anInt4539 > local21) { + var10 += 6; + } + local65 = Static247.anIntArray324[var10]; + local8.anInt670 = Static191.anIntArray386[var10]; + } + if (local616 != null) { + if ((local616.anInt3049 & Static247.anIntArray215[var10]) == 0) { + local8.anInt663 = 0; + } else if (local616.anInt3049 == 16) { + local8.anInt663 = 3; + local8.anInt665 = Static247.anIntArray294[var10]; + local8.anInt667 = 3 - local8.anInt665; + } else if (local616.anInt3049 == 32) { + local8.anInt663 = 6; + local8.anInt665 = Static247.anIntArray489[var10]; + local8.anInt667 = 6 - local8.anInt665; + } else if (local616.anInt3049 == 64) { + local8.anInt663 = 12; + local8.anInt665 = Static247.anIntArray211[var10]; + local8.anInt667 = 12 - local8.anInt665; + } else { + local8.anInt663 = 9; + local8.anInt665 = Static247.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); + } + 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); + } + 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); + } + 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); + } + } + if (local619 != null && !method4611(local27, local18, local21, local619.primary.getMinY())) { + if (GlRenderer.enabled) { + GlRenderer.method4159(local33 - 0.5F); + } + if ((local619.anInt1395 & local65) != 0) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + } else if (local619.anInt1395 == 256) { + local894 = local619.xFine - Static123.anInt3555; + local899 = local619.anInt1391 - Static123.anInt3947; + local904 = local619.zFine - Static217.anInt4903; + var17 = local619.anInt1388; + if (var17 == 1 || var17 == 2) { + var18 = -local894; + } else { + var18 = local894; + } + @Pc(928) int local928; + if (var17 == 2 || var17 == 3) { + local928 = -local904; + } else { + local928 = local904; + } + if (local928 < var18) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + } else if (local619.secondary != null) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + } + local619.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local894, local899, local904, local619.key, local24, null); + } + } + if (GlRenderer.enabled) { + GlRenderer.method4159(local33); + } + } + if (var24) { + @Pc(1001) GroundDecor local1001 = local8.groundDecor; + if (local1001 != null && (local1001.key & 0x80000000L) == 0L) { + if (GlRenderer.enabled && local1001.aBoolean49) { + GlRenderer.method4159(local33 + 50.0F - 1.5F); + } + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + if (GlRenderer.enabled && local1001.aBoolean49) { + GlRenderer.method4159(local33); + } + } + @Pc(1064) ObjStackEntity local1064 = local8.aClass79_1; + if (local1064 != null && local1064.anInt3063 == 0) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + } + if (local1064.aClass8_7 != null) { + local1064.aClass8_7.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); + } + if (local1064.aClass8_8 != null) { + local1064.aClass8_8.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); + } + if (local1064.aClass8_9 != null) { + local1064.aClass8_9.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1064.anInt3064 - Static123.anInt3555, local1064.anInt3057 - Static123.anInt3947, local1064.anInt3061 - Static217.anInt4903, local1064.aLong108, local24, null); + } + } + } + local894 = local8.allInteriorFlags; + if (local894 != 0) { + if (local18 < Static123.anInt4069 && (local894 & 0x4) != 0) { + var32 = local31[local18 + 1][local21]; + if (var32 != null && var32.aBoolean46) { + Static7.aClass69_32.addTail(var32); + } + } + if (local21 < Static193.anInt4539 && (local894 & 0x2) != 0) { + var32 = local31[local18][local21 + 1]; + if (var32 != null && var32.aBoolean46) { + Static7.aClass69_32.addTail(var32); + } + } + if (local18 > Static123.anInt4069 && (local894 & 0x1) != 0) { + var32 = local31[local18 - 1][local21]; + if (var32 != null && var32.aBoolean46) { + Static7.aClass69_32.addTail(var32); + } + } + if (local21 > Static193.anInt4539 && (local894 & 0x8) != 0) { + var32 = local31[local18][local21 - 1]; + if (var32 != null && var32.aBoolean46) { + Static7.aClass69_32.addTail(var32); + } + } + } + break; + } + if (local8.anInt663 != 0) { + var24 = true; + for (var10 = 0; var10 < local8.sceneryLen; var10++) { + if (local8.scenery[var10].anInt1707 != Static156.anInt437 && (local8.interiorFlags[var10] & local8.anInt663) == local8.anInt665) { + var24 = false; + break; + } + } + if (var24) { + var22 = local8.wall; + if (!method3850(local27, local18, local21, var22.anInt3049)) { + if (GlRenderer.enabled) { + label882: + { + if ((var22.key & 0xFC000L) == 16384L) { + local65 = var22.xFine - Static123.anInt3555; + local115 = var22.zFine - Static217.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); + 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); + 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); + 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); + break label882; + } + } + } + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + } + local8.anInt663 = 0; + } + } + if (!local8.aBoolean47) { + break; + } + try { + var9 = local8.sceneryLen; + local8.aBoolean47 = false; + var10 = 0; + label767: + for (local65 = 0; local65 < var9; local65++) { + var25 = local8.scenery[local65]; + if (var25.anInt1707 != Static156.anInt437) { + for (local1332 = var25.xMin; local1332 <= var25.xMax; local1332++) { + for (local894 = var25.zMin; local894 <= var25.zMax; local894++) { + var32 = local31[local1332][local894]; + if (var32.aBoolean45) { + local8.aBoolean47 = true; + continue label767; + } + if (var32.anInt663 != 0) { + local904 = 0; + if (local1332 > var25.xMin) { + local904++; + } + if (local1332 < var25.xMax) { + local904 += 4; + } + if (local894 > var25.zMin) { + local904 += 8; + } + if (local894 < var25.zMax) { + local904 += 2; + } + if ((local904 & var32.anInt663) == local8.anInt667) { + local8.aBoolean47 = true; + continue label767; + } + } + } + } + aClass31Array2[var10++] = var25; + local1332 = Static123.anInt4069 - var25.xMin; + local894 = var25.xMax - Static123.anInt4069; + if (local894 > local1332) { + local1332 = local894; + } + local899 = Static193.anInt4539 - var25.zMin; + local904 = var25.zMax - Static193.anInt4539; + if (local904 > local899) { + var25.anInt1705 = local1332 + local904; + } else { + var25.anInt1705 = local1332 + local899; + } + } + } + while (var10 > 0) { + local65 = -50; + local115 = -1; + for (local1332 = 0; local1332 < var10; local1332++) { + @Pc(1628) Scenery local1628 = aClass31Array2[local1332]; + if (local1628.anInt1707 != Static156.anInt437) { + if (local1628.anInt1705 > local65) { + local65 = local1628.anInt1705; + local115 = local1332; + } else if (local1628.anInt1705 == local65) { + local899 = local1628.anInt1699 - Static123.anInt3555; + local904 = local1628.anInt1703 - Static217.anInt4903; + var17 = aClass31Array2[local115].anInt1699 - Static123.anInt3555; + var18 = aClass31Array2[local115].anInt1703 - Static217.anInt4903; + if (local899 * local899 + local904 * local904 > var17 * var17 + var18 * var18) { + local115 = local1332; + } + } + } + } + if (local115 == -1) { + break; + } + @Pc(1697) Scenery local1697 = aClass31Array2[local115]; + local1697.anInt1707 = Static156.anInt437; + 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); + local894 = local1697.anInt1699 - Static123.anInt3555; + local899 = local1697.anInt1703 - Static217.anInt4903; + local904 = (int) (local1697.key >> 20 & 0x3L); + if (local904 == 1 || local904 == 3) { + if (local899 > -local894) { + LightingManager.method2397(local24, local18, local21 - 1, local18 - 1, local21); + } else { + LightingManager.method2397(local24, local18, local21 + 1, local18 + 1, local21); + } + } else if (local899 > local894) { + LightingManager.method2397(local24, local18, local21 - 1, local18 + 1, local21); + } else { + 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); + } + } + 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); + } + for (local894 = local1697.xMin; local894 <= local1697.xMax; local894++) { + for (local899 = local1697.zMin; local899 <= local1697.zMax; local899++) { + @Pc(1863) Tile local1863 = local31[local894][local899]; + if (local1863.anInt663 != 0) { + Static7.aClass69_32.addTail(local1863); + } else if ((local894 != local18 || local899 != local21) && local1863.aBoolean46) { + Static7.aClass69_32.addTail(local1863); + } + } + } + } + if (!local8.aBoolean47) { + break; + } + } catch (@Pc(1895) Exception local1895) { + local8.aBoolean47 = false; + break; + } + } + } while (!local8.aBoolean46); + } while (local8.anInt663 != 0); + if (local18 > Static123.anInt4069 || local18 <= LightingManager.anInt987) { + break; + } + local153 = local31[local18 - 1][local21]; + } while (local153 != null && local153.aBoolean46); + if (local18 < Static123.anInt4069 || local18 >= LightingManager.anInt15 - 1) { + break; + } + local153 = local31[local18 + 1][local21]; + } while (local153 != null && local153.aBoolean46); + if (local21 > Static193.anInt4539 || local21 <= LightingManager.anInt4698) { + break; + } + local153 = local31[local18][local21 - 1]; + } while (local153 != null && local153.aBoolean46); + if (local21 < Static193.anInt4539 || local21 >= LightingManager.anInt4866 - 1) { + break; + } + local153 = local31[local18][local21 + 1]; + } while (local153 != null && local153.aBoolean46); + local8.aBoolean46 = false; + Static156.anInt1142--; + @Pc(1999) ObjStackEntity local1999 = local8.aClass79_1; + if (local1999 != null && local1999.anInt3063 != 0) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + } + if (local1999.aClass8_7 != null) { + local1999.aClass8_7.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); + } + if (local1999.aClass8_8 != null) { + local1999.aClass8_8.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); + } + if (local1999.aClass8_9 != null) { + local1999.aClass8_9.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local1999.anInt3064 - Static123.anInt3555, local1999.anInt3057 - Static123.anInt3947 - local1999.anInt3063, local1999.anInt3061 - Static217.anInt4903, local1999.aLong108, local24, null); + } + } + if (local8.anInt670 != 0) { + @Pc(2109) WallDecor local2109 = local8.wallDecor; + 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); + } + 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); + } else if (local2109.anInt1395 == 256) { + local65 = local2109.xFine - Static123.anInt3555; + local115 = local2109.anInt1391 - Static123.anInt3947; + local1332 = local2109.zFine - Static217.anInt4903; + local894 = local2109.anInt1388; + if (local894 == 1 || local894 == 2) { + local899 = -local65; + } else { + local899 = local65; + } + if (local894 == 2 || local894 == 3) { + local904 = -local1332; + } else { + local904 = local1332; + } + if (local904 >= local899) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.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); + } else if (local2109.secondary != null) { + if (GlRenderer.enabled) { + LightingManager.method2393(Static123.anInt3555, Static123.anInt3947, Static217.anInt4903, local24, local18, local21); + } + local2109.secondary.render(0, Static160.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local65, local115, local1332, local2109.key, local24, null); + } + } + } + @Pc(2275) Wall local2275 = local8.wall; + 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); + } + 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); + } + 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); + } + 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); + } + } + } + @Pc(2388) Tile local2388; + if (local24 < levels - 1) { + local2388 = tiles[local24 + 1][local18][local21]; + if (local2388 != null && local2388.aBoolean46) { + Static7.aClass69_32.addTail(local2388); + } + } + if (local18 < Static123.anInt4069) { + local2388 = local31[local18 + 1][local21]; + if (local2388 != null && local2388.aBoolean46) { + Static7.aClass69_32.addTail(local2388); + } + } + if (local21 < Static193.anInt4539) { + local2388 = local31[local18][local21 + 1]; + if (local2388 != null && local2388.aBoolean46) { + Static7.aClass69_32.addTail(local2388); + } + } + if (local18 > Static123.anInt4069) { + local2388 = local31[local18 - 1][local21]; + if (local2388 != null && local2388.aBoolean46) { + Static7.aClass69_32.addTail(local2388); + } + } + if (local21 > Static193.anInt4539) { + local2388 = local31[local18][local21 - 1]; + if (local2388 != null && local2388.aBoolean46) { + Static7.aClass69_32.addTail(local2388); + } + } + } + } - @OriginalMember(owner = "client!wh", name = "a", descriptor = "(IIII)Z") - public static boolean method4611(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - if (Static9.method187(arg0, arg1, arg2)) { - @Pc(10) int local10 = arg1 << 7; - @Pc(14) int local14 = arg2 << 7; - return method4394(local10 + 1, tileHeights[arg0][arg1][arg2] + arg3, local14 + 1) && method4394(local10 + 128 - 1, tileHeights[arg0][arg1 + 1][arg2] + arg3, local14 + 1) && method4394(local10 + 128 - 1, tileHeights[arg0][arg1 + 1][arg2 + 1] + arg3, local14 + 128 - 1) && method4394(local10 + 1, tileHeights[arg0][arg1][arg2 + 1] + arg3, local14 + 128 - 1); - } else { - return false; - } - } + @OriginalMember(owner = "client!wh", name = "a", descriptor = "(IIII)Z") + public static boolean method4611(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + if (Static9.method187(arg0, arg1, arg2)) { + @Pc(10) int local10 = arg1 << 7; + @Pc(14) int local14 = arg2 << 7; + return method4394(local10 + 1, tileHeights[arg0][arg1][arg2] + arg3, local14 + 1) && method4394(local10 + 128 - 1, tileHeights[arg0][arg1 + 1][arg2] + arg3, local14 + 1) && method4394(local10 + 128 - 1, tileHeights[arg0][arg1 + 1][arg2 + 1] + arg3, local14 + 128 - 1) && method4394(local10 + 1, tileHeights[arg0][arg1][arg2 + 1] + arg3, local14 + 128 - 1); + } else { + return false; + } + } - @OriginalMember(owner = "client!vd", name = "b", descriptor = "(IIII)Z") - public static boolean method3850(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - if (!Static9.method187(arg0, arg1, arg2)) { - return false; - } - @Pc(10) int local10 = arg1 << 7; - @Pc(14) int local14 = arg2 << 7; - @Pc(24) int local24 = tileHeights[arg0][arg1][arg2] - 1; - @Pc(28) int local28 = local24 - 120; - @Pc(32) int local32 = local24 - 230; - @Pc(36) int local36 = local24 - 238; - if (arg3 < 16) { - if (arg3 == 1) { - if (local10 > Static123.anInt3555) { - if (!method4394(local10, local24, local14)) { - return false; - } - if (!method4394(local10, local24, local14 + 128)) { - return false; - } - } - if (arg0 > 0) { - if (!method4394(local10, local28, local14)) { - return false; - } - if (!method4394(local10, local28, local14 + 128)) { - return false; - } - } - if (!method4394(local10, local32, local14)) { - return false; - } - return method4394(local10, local32, local14 + 128); - } - if (arg3 == 2) { - if (local14 < Static217.anInt4903) { - if (!method4394(local10, local24, local14 + 128)) { - return false; - } - if (!method4394(local10 + 128, local24, local14 + 128)) { - return false; - } - } - if (arg0 > 0) { - if (!method4394(local10, local28, local14 + 128)) { - return false; - } - if (!method4394(local10 + 128, local28, local14 + 128)) { - return false; - } - } - if (!method4394(local10, local32, local14 + 128)) { - return false; - } - return method4394(local10 + 128, local32, local14 + 128); - } - if (arg3 == 4) { - if (local10 < Static123.anInt3555) { - if (!method4394(local10 + 128, local24, local14)) { - return false; - } - if (!method4394(local10 + 128, local24, local14 + 128)) { - return false; - } - } - if (arg0 > 0) { - if (!method4394(local10 + 128, local28, local14)) { - return false; - } - if (!method4394(local10 + 128, local28, local14 + 128)) { - return false; - } - } - if (!method4394(local10 + 128, local32, local14)) { - return false; - } - return method4394(local10 + 128, local32, local14 + 128); - } - if (arg3 == 8) { - if (local14 > Static217.anInt4903) { - if (!method4394(local10, local24, local14)) { - return false; - } - if (!method4394(local10 + 128, local24, local14)) { - return false; - } - } - if (arg0 > 0) { - if (!method4394(local10, local28, local14)) { - return false; - } - if (!method4394(local10 + 128, local28, local14)) { - return false; - } - } - if (!method4394(local10, local32, local14)) { - return false; - } - return method4394(local10 + 128, local32, local14); - } - } - if (!method4394(local10 + 64, local36, local14 + 64)) { - return false; - } else if (arg3 == 16) { - return method4394(local10, local32, local14 + 128); - } else if (arg3 == 32) { - return method4394(local10 + 128, local32, local14 + 128); - } else if (arg3 == 64) { - return method4394(local10 + 128, local32, local14); - } else if (arg3 == 128) { - return method4394(local10, local32, local14); - } else { - return true; - } - } + @OriginalMember(owner = "client!vd", name = "b", descriptor = "(IIII)Z") + public static boolean method3850(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + if (!Static9.method187(arg0, arg1, arg2)) { + return false; + } + @Pc(10) int local10 = arg1 << 7; + @Pc(14) int local14 = arg2 << 7; + @Pc(24) int local24 = tileHeights[arg0][arg1][arg2] - 1; + @Pc(28) int local28 = local24 - 120; + @Pc(32) int local32 = local24 - 230; + @Pc(36) int local36 = local24 - 238; + if (arg3 < 16) { + if (arg3 == 1) { + if (local10 > Static123.anInt3555) { + if (!method4394(local10, local24, local14)) { + return false; + } + if (!method4394(local10, local24, local14 + 128)) { + return false; + } + } + if (arg0 > 0) { + if (!method4394(local10, local28, local14)) { + return false; + } + if (!method4394(local10, local28, local14 + 128)) { + return false; + } + } + if (!method4394(local10, local32, local14)) { + return false; + } + return method4394(local10, local32, local14 + 128); + } + if (arg3 == 2) { + if (local14 < Static217.anInt4903) { + if (!method4394(local10, local24, local14 + 128)) { + return false; + } + if (!method4394(local10 + 128, local24, local14 + 128)) { + return false; + } + } + if (arg0 > 0) { + if (!method4394(local10, local28, local14 + 128)) { + return false; + } + if (!method4394(local10 + 128, local28, local14 + 128)) { + return false; + } + } + if (!method4394(local10, local32, local14 + 128)) { + return false; + } + return method4394(local10 + 128, local32, local14 + 128); + } + if (arg3 == 4) { + if (local10 < Static123.anInt3555) { + if (!method4394(local10 + 128, local24, local14)) { + return false; + } + if (!method4394(local10 + 128, local24, local14 + 128)) { + return false; + } + } + if (arg0 > 0) { + if (!method4394(local10 + 128, local28, local14)) { + return false; + } + if (!method4394(local10 + 128, local28, local14 + 128)) { + return false; + } + } + if (!method4394(local10 + 128, local32, local14)) { + return false; + } + return method4394(local10 + 128, local32, local14 + 128); + } + if (arg3 == 8) { + if (local14 > Static217.anInt4903) { + if (!method4394(local10, local24, local14)) { + return false; + } + if (!method4394(local10 + 128, local24, local14)) { + return false; + } + } + if (arg0 > 0) { + if (!method4394(local10, local28, local14)) { + return false; + } + if (!method4394(local10 + 128, local28, local14)) { + return false; + } + } + if (!method4394(local10, local32, local14)) { + return false; + } + return method4394(local10 + 128, local32, local14); + } + } + if (!method4394(local10 + 64, local36, local14 + 64)) { + return false; + } else if (arg3 == 16) { + return method4394(local10, local32, local14 + 128); + } else if (arg3 == 32) { + return method4394(local10 + 128, local32, local14 + 128); + } else if (arg3 == 64) { + return method4394(local10 + 128, local32, local14); + } else if (arg3 == 128) { + return method4394(local10, local32, local14); + } else { + return true; + } + } - @OriginalMember(owner = "client!p", name = "a", descriptor = "(IZIZLclient!mj;IIIBII)V") + @OriginalMember(owner = "client!p", name = "a", descriptor = "(IZIZLclient!mj;IIIBII)V") public static void method3397(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) int arg2, @OriginalArg(3) boolean arg3, @OriginalArg(4) CollisionMap arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9) { if (arg1 && !allLevelsAreVisible() && (tileFlags[0][arg7][arg8] & 0x2) == 0) { if ((tileFlags[arg2][arg7][arg8] & 0x10) != 0) { @@ -2358,7 +2358,7 @@ public class SceneGraph { local201 = local199 - (local213[local112][local133] + local213[local112][local129] + local213[local103][local129] + local213[local103][local133] >> 2); } local213 = null; - @Pc(261) long local261 = (long) (arg7 | 0x40000000 | arg8 << 7 | arg6 << 14 | arg9 << 20); + @Pc(261) long local261 = arg7 | 0x40000000 | arg8 << 7 | arg6 << 14 | arg9 << 20; if (arg3) { local213 = surfaceTileHeights[0]; } else if (arg0 < 3) { @@ -2697,88 +2697,88 @@ public class SceneGraph { } } - @OriginalMember(owner = "client!ch", name = "c", descriptor = "(I)V") - public static void method846() { - if (!allLevelsAreVisible() && LoginManager.centralPlane != Player.level) { - LoginManager.method2463(Player.level, LoginManager.centralZoneZ, LoginManager.centralZoneX, PlayerList.self.movementQueueZ[0], false, PlayerList.self.movementQueueX[0]); - } else if (Player.level != LightingManager.anInt2875 && MiniMap.renderMap(Player.level)) { - LightingManager.anInt2875 = Player.level; - ScriptRunner.method2218(); - } - } + @OriginalMember(owner = "client!ch", name = "c", descriptor = "(I)V") + public static void method846() { + if (!allLevelsAreVisible() && LoginManager.centralPlane != Player.level) { + LoginManager.method2463(Player.level, LoginManager.centralZoneZ, LoginManager.centralZoneX, PlayerList.self.movementQueueZ[0], false, PlayerList.self.movementQueueX[0]); + } else if (Player.level != LightingManager.anInt2875 && MiniMap.renderMap(Player.level)) { + LightingManager.anInt2875 = Player.level; + ScriptRunner.method2218(); + } + } - @OriginalMember(owner = "client!jk", name = "a", descriptor = "(IZ[BII[Lclient!mj;)V") - public static void method2437(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) byte[] arg2, @OriginalArg(3) int arg3, @OriginalArg(5) CollisionMap[] arg4) { - @Pc(10) Buffer local10 = new Buffer(arg2); - @Pc(12) int local12 = -1; - while (true) { - @Pc(16) int local16 = local10.gVarSmart(); - if (local16 == 0) { - return; - } - local12 += local16; - @Pc(27) int local27 = 0; - while (true) { - @Pc(31) int local31 = local10.gsmarts(); - if (local31 == 0) { - break; - } - local27 += local31 - 1; - @Pc(46) int local46 = local27 & 0x3F; - @Pc(50) int local50 = local27 >> 12; - @Pc(56) int local56 = local27 >> 6 & 0x3F; - @Pc(60) int local60 = local10.g1(); - @Pc(64) int local64 = local60 >> 2; - @Pc(68) int local68 = local60 & 0x3; - @Pc(72) int local72 = arg0 + local56; - @Pc(76) int local76 = local46 + arg3; - if (local72 > 0 && local76 > 0 && local72 < 103 && local76 < 103) { - @Pc(90) CollisionMap local90 = null; - if (!arg1) { - @Pc(95) int local95 = local50; - if ((tileFlags[1][local72][local76] & 0x2) == 2) { - local95 = local50 - 1; - } - if (local95 >= 0) { - local90 = arg4[local95]; - } - } - method3397(local50, !arg1, local50, arg1, local90, local12, local64, local72, local76, local68); - } - } - } - } + @OriginalMember(owner = "client!jk", name = "a", descriptor = "(IZ[BII[Lclient!mj;)V") + public static void method2437(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) byte[] arg2, @OriginalArg(3) int arg3, @OriginalArg(5) CollisionMap[] arg4) { + @Pc(10) Buffer local10 = new Buffer(arg2); + @Pc(12) int local12 = -1; + while (true) { + @Pc(16) int local16 = local10.gVarSmart(); + if (local16 == 0) { + return; + } + local12 += local16; + @Pc(27) int local27 = 0; + while (true) { + @Pc(31) int local31 = local10.gsmarts(); + if (local31 == 0) { + break; + } + local27 += local31 - 1; + @Pc(46) int local46 = local27 & 0x3F; + @Pc(50) int local50 = local27 >> 12; + @Pc(56) int local56 = local27 >> 6 & 0x3F; + @Pc(60) int local60 = local10.g1(); + @Pc(64) int local64 = local60 >> 2; + @Pc(68) int local68 = local60 & 0x3; + @Pc(72) int local72 = arg0 + local56; + @Pc(76) int local76 = local46 + arg3; + if (local72 > 0 && local76 > 0 && local72 < 103 && local76 < 103) { + @Pc(90) CollisionMap local90 = null; + if (!arg1) { + @Pc(95) int local95 = local50; + if ((tileFlags[1][local72][local76] & 0x2) == 2) { + local95 = local50 - 1; + } + if (local95 >= 0) { + local90 = arg4[local95]; + } + } + method3397(local50, !arg1, local50, arg1, local90, local12, local64, local72, local76, local68); + } + } + } + } - @OriginalMember(owner = "client!vh", name = "a", descriptor = "(Lclient!th;III)V") - public static void method3574(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - @Pc(12) Tile local12; - if (arg2 < width) { - local12 = tiles[arg1][arg2 + 1][arg3]; - if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { - arg0.method4544(local12.groundDecor.entity, 128, 0, 0, true); - } - } - if (arg3 < width) { - local12 = tiles[arg1][arg2][arg3 + 1]; - if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { - arg0.method4544(local12.groundDecor.entity, 0, 0, 128, true); - } - } - if (arg2 < width && arg3 < length) { - local12 = tiles[arg1][arg2 + 1][arg3 + 1]; - if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { - arg0.method4544(local12.groundDecor.entity, 128, 0, 128, true); - } - } - if (arg2 < width && arg3 > 0) { - local12 = tiles[arg1][arg2 + 1][arg3 - 1]; - if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { - arg0.method4544(local12.groundDecor.entity, 128, 0, -128, true); - } - } - } + @OriginalMember(owner = "client!vh", name = "a", descriptor = "(Lclient!th;III)V") + public static void method3574(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + @Pc(12) Tile local12; + if (arg2 < width) { + local12 = tiles[arg1][arg2 + 1][arg3]; + if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { + arg0.method4544(local12.groundDecor.entity, 128, 0, 0, true); + } + } + if (arg3 < width) { + local12 = tiles[arg1][arg2][arg3 + 1]; + if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { + arg0.method4544(local12.groundDecor.entity, 0, 0, 128, true); + } + } + if (arg2 < width && arg3 < length) { + local12 = tiles[arg1][arg2 + 1][arg3 + 1]; + if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { + arg0.method4544(local12.groundDecor.entity, 128, 0, 128, true); + } + } + if (arg2 < width && arg3 > 0) { + local12 = tiles[arg1][arg2 + 1][arg3 - 1]; + if (local12 != null && local12.groundDecor != null && local12.groundDecor.entity.method4543()) { + arg0.method4544(local12.groundDecor.entity, 128, 0, -128, true); + } + } + } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "(IIIII[[[B[I[I[I[I[IIBII)V") + @OriginalMember(owner = "client!mf", name = "a", descriptor = "(IIIII[[[B[I[I[I[I[IIBII)V") public static void method2954(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) byte[][][] arg5, @OriginalArg(6) int[] arg6, @OriginalArg(7) int[] arg7, @OriginalArg(8) int[] arg8, @OriginalArg(9) int[] arg9, @OriginalArg(10) int[] arg10, @OriginalArg(11) int arg11, @OriginalArg(12) byte arg12, @OriginalArg(13) int arg13, @OriginalArg(14) int arg14) { if (arg0 < 0) { arg0 = 0; @@ -2817,7 +2817,7 @@ public class SceneGraph { } @Pc(99) short local99; if (GlRenderer.enabled) { - local99 = (short)GlobalConfig.VIEW_DISTANCE; + local99 = (short) GlobalConfig.VIEW_DISTANCE; } else { local99 = 3500; } @@ -2868,314 +2868,310 @@ public class SceneGraph { method3292(arg0, arg1, arg2, arg5, arg11, arg12, arg13, arg14); } - @OriginalMember(owner = "client!uc", name = "a", descriptor = "(III[[[BIBII)V") - public static void method3292(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) byte[][][] arg3, @OriginalArg(4) int arg4, @OriginalArg(5) byte arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7) { - Static156.anInt437++; - Static156.anInt1142 = 0; - @Pc(9) int local9 = arg6 - 16; - @Pc(13) int local13 = arg6 + 16; - @Pc(17) int local17 = arg7 - 16; - @Pc(21) int local21 = arg7 + 16; - @Pc(32) int local32; - @Pc(37) int local37; - @Pc(183) int local183; - for (@Pc(23) int local23 = Static156.anInt5276; local23 < levels; local23++) { - @Pc(30) Tile[][] local30 = tiles[local23]; - for (local32 = LightingManager.anInt987; local32 < LightingManager.anInt15; local32++) { - 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)) { - local46.aBoolean45 = true; - local46.aBoolean46 = true; - if (local46.sceneryLen > 0) { - local46.aBoolean47 = true; - } else { - local46.aBoolean47 = false; - } - Static156.anInt1142++; - } else { - local46.aBoolean45 = false; - local46.aBoolean46 = false; - local46.anInt663 = 0; - if (local32 >= local9 && local32 <= local13 && local37 >= local17 && local37 <= local21) { - if (local46.wall != null) { - @Pc(103) Wall local103 = local46.wall; - local103.primary.method4545(0, local23, local103.anInt3051, local103.xFine, local103.zFine); - if (local103.secondary != null) { - local103.secondary.method4545(0, local23, local103.anInt3051, local103.xFine, local103.zFine); - } - } - if (local46.wallDecor != null) { - @Pc(134) WallDecor local134 = local46.wallDecor; - local134.primary.method4545(local134.anInt1388, local23, local134.anInt1391, local134.xFine, local134.zFine); - if (local134.secondary != null) { - local134.secondary.method4545(local134.anInt1388, local23, local134.anInt1391, local134.xFine, local134.zFine); - } - } - if (local46.groundDecor != null) { - @Pc(167) GroundDecor local167 = local46.groundDecor; - local167.entity.method4545(0, local23, local167.anInt733, local167.xFine, local167.zFine); - } - if (local46.scenery != null) { - for (local183 = 0; local183 < local46.sceneryLen; local183++) { - @Pc(192) Scenery local192 = local46.scenery[local183]; - local192.entity.method4545(local192.anInt1714, local23, local192.anInt1706, local192.anInt1699, local192.anInt1703); - } - } - } - } - } - } - } - } - @Pc(240) boolean local240 = tileHeights == underwaterTileHeights; - if (GlRenderer.enabled) { - @Pc(244) GL2 gl = GlRenderer.gl; - gl.glPushMatrix(); - gl.glTranslatef((float) -arg0, (float) -arg1, (float) -arg2); - if (local240) { - UnderwaterMaterialRenderer.applyFogFade(); - MaterialManager.setMaterial(-1, 3); - MaterialManager.renderingUnderwater = true; - UnderwaterMaterialRenderer.method4609(); - Static152.anInt3604 = -1; - Static247.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; - WaterMaterialRenderer.method619(local285.underwaterColor); - FogManager.method3066(WaterMaterialRenderer.method2422()); - } - local285.method1944(tiles, local294, false); - } - UnderwaterMaterialRenderer.method4608(); - } else { - local32 = Static156.anInt5276; - while (true) { - if (local32 >= levels) { - LightingManager.method2402(Static123.anInt4069, Static193.anInt4539, tiles); - break; - } - for (local37 = 0; local37 < underwaterHdTiles[local32].length; local37++) { - @Pc(336) GlTile local336 = underwaterHdTiles[local32][local37]; - @Pc(350) float local350 = 201.5F - (float) local32 * 50.0F - (local336.blend ? 1.0F : 0.5F); - if (local336.texture != -1 && Rasteriser.textureProvider.getMaterialType(local336.texture) == MaterialManager.WATER && Preferences.highWaterDetail) { - WaterMaterialRenderer.method619(local336.underwaterColor); - } - local336.method1944(tiles, local350, false); - } - if (local32 == 0 && Preferences.sceneryShadowsType > 0) { - GlRenderer.method4159(101.5F); - ShadowManager.method4198(Static123.anInt4069, Static193.anInt4539, visibility, arg1, aBooleanArrayArray1, tileHeights[0]); - } - local32++; - } - } - gl.glPopMatrix(); - } - @Pc(434) int local434; - @Pc(438) int local438; - @Pc(450) Tile local450; - @Pc(399) int local399; - @Pc(406) Tile[][] local406; - @Pc(415) int local415; - @Pc(428) int local428; - for (local399 = Static156.anInt5276; local399 < levels; local399++) { - local406 = tiles[local399]; - for (local37 = -visibility; local37 <= 0; local37++) { - local415 = Static123.anInt4069 + local37; - 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; - if (local415 >= LightingManager.anInt987) { - if (local434 >= LightingManager.anInt4698) { - local450 = local406[local415][local434]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, true); - } - } - if (local438 < LightingManager.anInt4866) { - local450 = local406[local415][local438]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, true); - } - } - } - if (local183 < LightingManager.anInt15) { - if (local434 >= LightingManager.anInt4698) { - local450 = local406[local183][local434]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, true); - } - } - if (local438 < LightingManager.anInt4866) { - local450 = local406[local183][local438]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, true); - } - } - } - if (Static156.anInt1142 == 0) { - if (!local240) { - MiniMenu.aBoolean187 = false; - } - return; - } - } - } - } - } - for (local399 = Static156.anInt5276; local399 < levels; local399++) { - local406 = tiles[local399]; - for (local37 = -visibility; local37 <= 0; local37++) { - local415 = Static123.anInt4069 + local37; - 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; - if (local415 >= LightingManager.anInt987) { - if (local434 >= LightingManager.anInt4698) { - local450 = local406[local415][local434]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, false); - } - } - if (local438 < LightingManager.anInt4866) { - local450 = local406[local415][local438]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, false); - } - } - } - if (local183 < LightingManager.anInt15) { - if (local434 >= LightingManager.anInt4698) { - local450 = local406[local183][local434]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, false); - } - } - if (local438 < LightingManager.anInt4866) { - local450 = local406[local183][local438]; - if (local450 != null && local450.aBoolean45) { - method4245(local450, false); - } - } - } - if (Static156.anInt1142 == 0) { - if (!local240) { - MiniMenu.aBoolean187 = false; - } - return; - } - } - } - } - } - MiniMenu.aBoolean187 = false; - } + @OriginalMember(owner = "client!uc", name = "a", descriptor = "(III[[[BIBII)V") + public static void method3292(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) byte[][][] arg3, @OriginalArg(4) int arg4, @OriginalArg(5) byte arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7) { + Static156.anInt437++; + Static156.anInt1142 = 0; + @Pc(9) int local9 = arg6 - 16; + @Pc(13) int local13 = arg6 + 16; + @Pc(17) int local17 = arg7 - 16; + @Pc(21) int local21 = arg7 + 16; + @Pc(32) int local32; + @Pc(37) int local37; + @Pc(183) int local183; + for (@Pc(23) int local23 = Static156.anInt5276; local23 < levels; local23++) { + @Pc(30) Tile[][] local30 = tiles[local23]; + for (local32 = LightingManager.anInt987; local32 < LightingManager.anInt15; local32++) { + 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)) { + local46.aBoolean45 = true; + local46.aBoolean46 = true; + local46.aBoolean47 = local46.sceneryLen > 0; + Static156.anInt1142++; + } else { + local46.aBoolean45 = false; + local46.aBoolean46 = false; + local46.anInt663 = 0; + if (local32 >= local9 && local32 <= local13 && local37 >= local17 && local37 <= local21) { + if (local46.wall != null) { + @Pc(103) Wall local103 = local46.wall; + local103.primary.method4545(0, local23, local103.anInt3051, local103.xFine, local103.zFine); + if (local103.secondary != null) { + local103.secondary.method4545(0, local23, local103.anInt3051, local103.xFine, local103.zFine); + } + } + if (local46.wallDecor != null) { + @Pc(134) WallDecor local134 = local46.wallDecor; + local134.primary.method4545(local134.anInt1388, local23, local134.anInt1391, local134.xFine, local134.zFine); + if (local134.secondary != null) { + local134.secondary.method4545(local134.anInt1388, local23, local134.anInt1391, local134.xFine, local134.zFine); + } + } + if (local46.groundDecor != null) { + @Pc(167) GroundDecor local167 = local46.groundDecor; + local167.entity.method4545(0, local23, local167.anInt733, local167.xFine, local167.zFine); + } + if (local46.scenery != null) { + for (local183 = 0; local183 < local46.sceneryLen; local183++) { + @Pc(192) Scenery local192 = local46.scenery[local183]; + local192.entity.method4545(local192.anInt1714, local23, local192.anInt1706, local192.anInt1699, local192.anInt1703); + } + } + } + } + } + } + } + } + @Pc(240) boolean local240 = tileHeights == underwaterTileHeights; + if (GlRenderer.enabled) { + @Pc(244) GL2 gl = GlRenderer.gl; + gl.glPushMatrix(); + gl.glTranslatef((float) -arg0, (float) -arg1, (float) -arg2); + if (local240) { + UnderwaterMaterialRenderer.applyFogFade(); + MaterialManager.setMaterial(-1, 3); + MaterialManager.renderingUnderwater = true; + UnderwaterMaterialRenderer.method4609(); + Static152.anInt3604 = -1; + Static247.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; + WaterMaterialRenderer.method619(local285.underwaterColor); + FogManager.method3066(WaterMaterialRenderer.method2422()); + } + local285.method1944(tiles, local294, false); + } + UnderwaterMaterialRenderer.method4608(); + } else { + local32 = Static156.anInt5276; + while (true) { + if (local32 >= levels) { + LightingManager.method2402(Static123.anInt4069, Static193.anInt4539, tiles); + break; + } + for (local37 = 0; local37 < underwaterHdTiles[local32].length; local37++) { + @Pc(336) GlTile local336 = underwaterHdTiles[local32][local37]; + @Pc(350) float local350 = 201.5F - (float) local32 * 50.0F - (local336.blend ? 1.0F : 0.5F); + if (local336.texture != -1 && Rasteriser.textureProvider.getMaterialType(local336.texture) == MaterialManager.WATER && Preferences.highWaterDetail) { + WaterMaterialRenderer.method619(local336.underwaterColor); + } + local336.method1944(tiles, local350, false); + } + if (local32 == 0 && Preferences.sceneryShadowsType > 0) { + GlRenderer.method4159(101.5F); + ShadowManager.method4198(Static123.anInt4069, Static193.anInt4539, visibility, arg1, aBooleanArrayArray1, tileHeights[0]); + } + local32++; + } + } + gl.glPopMatrix(); + } + @Pc(434) int local434; + @Pc(438) int local438; + @Pc(450) Tile local450; + @Pc(399) int local399; + @Pc(406) Tile[][] local406; + @Pc(415) int local415; + @Pc(428) int local428; + for (local399 = Static156.anInt5276; local399 < levels; local399++) { + local406 = tiles[local399]; + for (local37 = -visibility; local37 <= 0; local37++) { + local415 = Static123.anInt4069 + local37; + 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; + if (local415 >= LightingManager.anInt987) { + if (local434 >= LightingManager.anInt4698) { + local450 = local406[local415][local434]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, true); + } + } + if (local438 < LightingManager.anInt4866) { + local450 = local406[local415][local438]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, true); + } + } + } + if (local183 < LightingManager.anInt15) { + if (local434 >= LightingManager.anInt4698) { + local450 = local406[local183][local434]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, true); + } + } + if (local438 < LightingManager.anInt4866) { + local450 = local406[local183][local438]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, true); + } + } + } + if (Static156.anInt1142 == 0) { + if (!local240) { + MiniMenu.aBoolean187 = false; + } + return; + } + } + } + } + } + for (local399 = Static156.anInt5276; local399 < levels; local399++) { + local406 = tiles[local399]; + for (local37 = -visibility; local37 <= 0; local37++) { + local415 = Static123.anInt4069 + local37; + 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; + if (local415 >= LightingManager.anInt987) { + if (local434 >= LightingManager.anInt4698) { + local450 = local406[local415][local434]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, false); + } + } + if (local438 < LightingManager.anInt4866) { + local450 = local406[local415][local438]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, false); + } + } + } + if (local183 < LightingManager.anInt15) { + if (local434 >= LightingManager.anInt4698) { + local450 = local406[local183][local434]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, false); + } + } + if (local438 < LightingManager.anInt4866) { + local450 = local406[local183][local438]; + if (local450 != null && local450.aBoolean45) { + method4245(local450, false); + } + } + } + if (Static156.anInt1142 == 0) { + if (!local240) { + MiniMenu.aBoolean187 = false; + } + return; + } + } + } + } + } + MiniMenu.aBoolean187 = false; + } - @OriginalMember(owner = "client!lg", name = "a", descriptor = "(I)V") - public static void method2750(@OriginalArg(0) int arg0) { - Static156.anInt5276 = arg0; - for (@Pc(3) int local3 = 0; local3 < width; local3++) { - for (@Pc(8) int local8 = 0; local8 < length; local8++) { - if (tiles[arg0][local3][local8] == null) { - tiles[arg0][local3][local8] = new Tile(arg0, local3, local8); - } - } - } - } + @OriginalMember(owner = "client!lg", name = "a", descriptor = "(I)V") + public static void method2750(@OriginalArg(0) int arg0) { + Static156.anInt5276 = arg0; + for (@Pc(3) int local3 = 0; local3 < width; local3++) { + for (@Pc(8) int local8 = 0; local8 < length; local8++) { + if (tiles[arg0][local3][local8] == null) { + tiles[arg0][local3][local8] = new Tile(arg0, local3, local8); + } + } + } + } - @OriginalMember(owner = "client!fh", name = "a", descriptor = "(IIIILclient!th;JLclient!th;Lclient!th;)V") - public static void method1543(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) Entity arg4, @OriginalArg(5) long arg5, @OriginalArg(6) Entity arg6, @OriginalArg(7) Entity arg7) { - @Pc(3) ObjStackEntity local3 = new ObjStackEntity(); - local3.aClass8_9 = arg4; - local3.anInt3064 = arg1 * 128 + 64; - local3.anInt3061 = arg2 * 128 + 64; - local3.anInt3057 = arg3; - local3.aLong108 = arg5; - local3.aClass8_7 = arg6; - local3.aClass8_8 = arg7; - @Pc(34) int local34 = 0; - @Pc(42) Tile local42 = tiles[arg0][arg1][arg2]; - if (local42 != null) { - for (@Pc(46) int local46 = 0; local46 < local42.sceneryLen; local46++) { - @Pc(55) Scenery local55 = local42.scenery[local46]; - if ((local55.key & 0x400000L) == 4194304L) { - @Pc(66) int local66 = local55.entity.getMinY(); - if (local66 != -32768 && local66 < local34) { - local34 = local66; - } - } - } - } - local3.anInt3063 = -local34; - if (tiles[arg0][arg1][arg2] == null) { - tiles[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); - } - tiles[arg0][arg1][arg2].aClass79_1 = local3; - } + @OriginalMember(owner = "client!fh", name = "a", descriptor = "(IIIILclient!th;JLclient!th;Lclient!th;)V") + public static void method1543(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) Entity arg4, @OriginalArg(5) long arg5, @OriginalArg(6) Entity arg6, @OriginalArg(7) Entity arg7) { + @Pc(3) ObjStackEntity local3 = new ObjStackEntity(); + local3.aClass8_9 = arg4; + local3.anInt3064 = arg1 * 128 + 64; + local3.anInt3061 = arg2 * 128 + 64; + local3.anInt3057 = arg3; + local3.aLong108 = arg5; + local3.aClass8_7 = arg6; + local3.aClass8_8 = arg7; + @Pc(34) int local34 = 0; + @Pc(42) Tile local42 = tiles[arg0][arg1][arg2]; + if (local42 != null) { + for (@Pc(46) int local46 = 0; local46 < local42.sceneryLen; local46++) { + @Pc(55) Scenery local55 = local42.scenery[local46]; + if ((local55.key & 0x400000L) == 4194304L) { + @Pc(66) int local66 = local55.entity.getMinY(); + if (local66 != -32768 && local66 < local34) { + local34 = local66; + } + } + } + } + local3.anInt3063 = -local34; + if (tiles[arg0][arg1][arg2] == null) { + tiles[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); + } + tiles[arg0][arg1][arg2].aClass79_1 = local3; + } - @OriginalMember(owner = "client!fh", name = "a", descriptor = "(Lclient!th;IIIII)V") - public static void method1544(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { - @Pc(1) boolean local1 = true; - @Pc(3) int local3 = arg2; - @Pc(7) int local7 = arg2 + arg4; - @Pc(11) int local11 = arg3 - 1; - @Pc(15) int local15 = arg3 + arg5; - for (@Pc(17) int local17 = arg1; local17 <= arg1 + 1; local17++) { - if (local17 != levels) { - for (@Pc(28) int local28 = local3; local28 <= local7; local28++) { - if (local28 >= 0 && local28 < width) { - for (@Pc(39) int local39 = local11; local39 <= local15; local39++) { - if (local39 >= 0 && local39 < length && (!local1 || local28 >= local7 || local39 >= local15 || local39 < arg3 && local28 != arg2)) { - @Pc(71) Tile local71 = tiles[local17][local28][local39]; - if (local71 != null) { - @Pc(158) int local158 = (tileHeights[local17][local28][local39] + tileHeights[local17][local28 + 1][local39] + tileHeights[local17][local28][local39 + 1] + tileHeights[local17][local28 + 1][local39 + 1]) / 4 - (tileHeights[arg1][arg2][arg3] + tileHeights[arg1][arg2 + 1][arg3] + tileHeights[arg1][arg2][arg3 + 1] + tileHeights[arg1][arg2 + 1][arg3 + 1]) / 4; - @Pc(161) Wall local161 = local71.wall; - if (local161 != null) { - if (local161.primary.method4543()) { - arg0.method4544(local161.primary, (local28 - arg2) * 128 + (1 - arg4) * 64, local158, (local39 - arg3) * 128 + (1 - arg5) * 64, local1); - } - if (local161.secondary != null && local161.secondary.method4543()) { - arg0.method4544(local161.secondary, (local28 - arg2) * 128 + (1 - arg4) * 64, local158, (local39 - arg3) * 128 + (1 - arg5) * 64, local1); - } - } - for (@Pc(232) int local232 = 0; local232 < local71.sceneryLen; local232++) { - @Pc(241) Scenery local241 = local71.scenery[local232]; - if (local241 != null && local241.entity.method4543() && (local28 == local241.xMin || local28 == local3) && (local39 == local241.zMin || local39 == local11)) { - @Pc(270) int local270 = local241.xMax + 1 - local241.xMin; - @Pc(278) int local278 = local241.zMax + 1 - local241.zMin; - arg0.method4544(local241.entity, (local241.xMin - arg2) * 128 + (local270 - arg4) * 64, local158, (local241.zMin - arg3) * 128 + (local278 - arg5) * 64, local1); - } - } - } - } - } - } - } - local3--; - local1 = false; - } - } - } + @OriginalMember(owner = "client!fh", name = "a", descriptor = "(Lclient!th;IIIII)V") + public static void method1544(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { + @Pc(1) boolean local1 = true; + @Pc(3) int local3 = arg2; + @Pc(7) int local7 = arg2 + arg4; + @Pc(11) int local11 = arg3 - 1; + @Pc(15) int local15 = arg3 + arg5; + for (@Pc(17) int local17 = arg1; local17 <= arg1 + 1; local17++) { + if (local17 != levels) { + for (@Pc(28) int local28 = local3; local28 <= local7; local28++) { + if (local28 >= 0 && local28 < width) { + for (@Pc(39) int local39 = local11; local39 <= local15; local39++) { + if (local39 >= 0 && local39 < length && (!local1 || local28 >= local7 || local39 >= local15 || local39 < arg3 && local28 != arg2)) { + @Pc(71) Tile local71 = tiles[local17][local28][local39]; + if (local71 != null) { + @Pc(158) int local158 = (tileHeights[local17][local28][local39] + tileHeights[local17][local28 + 1][local39] + tileHeights[local17][local28][local39 + 1] + tileHeights[local17][local28 + 1][local39 + 1]) / 4 - (tileHeights[arg1][arg2][arg3] + tileHeights[arg1][arg2 + 1][arg3] + tileHeights[arg1][arg2][arg3 + 1] + tileHeights[arg1][arg2 + 1][arg3 + 1]) / 4; + @Pc(161) Wall local161 = local71.wall; + if (local161 != null) { + if (local161.primary.method4543()) { + arg0.method4544(local161.primary, (local28 - arg2) * 128 + (1 - arg4) * 64, local158, (local39 - arg3) * 128 + (1 - arg5) * 64, local1); + } + if (local161.secondary != null && local161.secondary.method4543()) { + arg0.method4544(local161.secondary, (local28 - arg2) * 128 + (1 - arg4) * 64, local158, (local39 - arg3) * 128 + (1 - arg5) * 64, local1); + } + } + for (@Pc(232) int local232 = 0; local232 < local71.sceneryLen; local232++) { + @Pc(241) Scenery local241 = local71.scenery[local232]; + if (local241 != null && local241.entity.method4543() && (local28 == local241.xMin || local28 == local3) && (local39 == local241.zMin || local39 == local11)) { + @Pc(270) int local270 = local241.xMax + 1 - local241.xMin; + @Pc(278) int local278 = local241.zMax + 1 - local241.zMin; + arg0.method4544(local241.entity, (local241.xMin - arg2) * 128 + (local270 - arg4) * 64, local158, (local241.zMin - arg3) * 128 + (local278 - arg5) * 64, local1); + } + } + } + } + } + } + } + local3--; + local1 = false; + } + } + } - @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IIII)V") - public static void method559(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; - if (local7 == null) { - return; - } - @Pc(13) WallDecor local13 = local7.wallDecor; - if (local13 != null) { - local13.xOffset = local13.xOffset * arg3 / 16; - local13.zOffset = local13.zOffset * arg3 / 16; - } - } + @OriginalMember(owner = "client!bh", name = "a", descriptor = "(IIII)V") + public static void method559(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { + @Pc(7) Tile local7 = tiles[arg0][arg1][arg2]; + if (local7 == null) { + return; + } + @Pc(13) WallDecor local13 = local7.wallDecor; + if (local13 != null) { + local13.xOffset = local13.xOffset * arg3 / 16; + local13.zOffset = local13.zOffset * arg3 / 16; + } + } } diff --git a/client/src/main/java/rt4/SceneGraph_Class120.java b/client/src/main/java/rt4/SceneGraph_Class120.java index 502a45c..6118dde 100644 --- a/client/src/main/java/rt4/SceneGraph_Class120.java +++ b/client/src/main/java/rt4/SceneGraph_Class120.java @@ -62,7 +62,7 @@ public final class SceneGraph_Class120 { @OriginalMember(owner = "client!pe", name = "y", descriptor = "I") public int anInt4464; - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIIIIII)V") + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIIIIII)V") public static void method4647(@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) int arg6) { @Pc(3) SceneGraph_Class120 local3 = new SceneGraph_Class120(); local3.anInt4452 = arg1 / 128; diff --git a/client/src/main/java/rt4/ScriptRunner.java b/client/src/main/java/rt4/ScriptRunner.java index d36c917..d61faad 100644 --- a/client/src/main/java/rt4/ScriptRunner.java +++ b/client/src/main/java/rt4/ScriptRunner.java @@ -1,11 +1,12 @@ package rt4; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.nio.charset.StandardCharsets; import java.util.Calendar; import java.util.Date; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class ScriptRunner { @@ -21,7 +22,7 @@ public final class ScriptRunner { public static final JagString EVENT_OPBASE = JagString.parse("event_opbase"); @OriginalMember(owner = "client!da", name = "O", descriptor = "Lclient!na;") public static final JagString aClass100_253 = JagString.parse("(U0a )2 via: "); - @OriginalMember(owner = "client!fl", name = "H", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!fl", name = "H", descriptor = "Lclient!na;") public static final JagString aClass100_446 = JagString.parse(""); @OriginalMember(owner = "client!nd", name = "b", descriptor = "Lclient!na;") public static final JagString aClass100_780 = JagString.parse("Clientscript error in: "); @@ -40,28 +41,28 @@ public final class ScriptRunner { @OriginalMember(owner = "client!rl", name = "eb", descriptor = "Lclient!na;") public static final JagString aClass100_928 = JagString.parse("(U0a )2 in: "); @OriginalMember(owner = "client!bf", name = "I", descriptor = "[I") - public static final int[] anIntArray52 = new int[] { 16776960, 16711680, 65280, 65535, 16711935, 16777215 }; + public static final int[] anIntArray52 = new int[]{16776960, 16711680, 65280, 65535, 16711935, 16777215}; @OriginalMember(owner = "client!fe", name = "I", descriptor = "Lclient!na;") public static final JagString aClass100_639 = JagString.parse(" "); - @OriginalMember(owner = "client!dc", name = "M", descriptor = "Lclient!na;") - public static final JagString aClass100_268 = JagString.parse(")4"); - @OriginalMember(owner = "client!he", name = "gb", descriptor = "Lclient!na;") - public static final JagString aClass100_518 = JagString.parse("www"); - @OriginalMember(owner = "client!e", name = "Tc", descriptor = "Lclient!na;") - public static final JagString aClass100_365 = JagString.parse("www)2wtqa"); - @OriginalMember(owner = "client!lk", name = "J", descriptor = "Lclient!na;") - public static final JagString aClass100_687 = JagString.parse(")4p="); - @OriginalMember(owner = "client!en", name = "x", descriptor = "Lclient!na;") - public static final JagString aClass100_424 = JagString.parse("http:)4)4"); - @OriginalMember(owner = "client!gf", name = "I", descriptor = "Lclient!na;") - public static final JagString aClass100_886 = JagString.parse(")3runescape)3com)4l="); - @OriginalMember(owner = "client!v", name = "a", descriptor = "Lclient!na;") - public static final JagString aClass100_98 = JagString.parse(")4a="); - @OriginalMember(owner = "client!ch", name = "C", descriptor = "[[I") - public static final int[][] anIntArrayArray6 = new int[104][104]; - @OriginalMember(owner = "client!n", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_767 = JagString.parse(")2"); - @OriginalMember(owner = "client!jh", name = "n", descriptor = "Lclient!bd;") + @OriginalMember(owner = "client!dc", name = "M", descriptor = "Lclient!na;") + public static final JagString aClass100_268 = JagString.parse(")4"); + @OriginalMember(owner = "client!he", name = "gb", descriptor = "Lclient!na;") + public static final JagString aClass100_518 = JagString.parse("www"); + @OriginalMember(owner = "client!e", name = "Tc", descriptor = "Lclient!na;") + public static final JagString aClass100_365 = JagString.parse("www)2wtqa"); + @OriginalMember(owner = "client!lk", name = "J", descriptor = "Lclient!na;") + public static final JagString aClass100_687 = JagString.parse(")4p="); + @OriginalMember(owner = "client!en", name = "x", descriptor = "Lclient!na;") + public static final JagString aClass100_424 = JagString.parse("http:)4)4"); + @OriginalMember(owner = "client!gf", name = "I", descriptor = "Lclient!na;") + public static final JagString aClass100_886 = JagString.parse(")3runescape)3com)4l="); + @OriginalMember(owner = "client!v", name = "a", descriptor = "Lclient!na;") + public static final JagString aClass100_98 = JagString.parse(")4a="); + @OriginalMember(owner = "client!ch", name = "C", descriptor = "[[I") + public static final int[][] anIntArrayArray6 = new int[104][104]; + @OriginalMember(owner = "client!n", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_767 = JagString.parse(")2"); + @OriginalMember(owner = "client!jh", name = "n", descriptor = "Lclient!bd;") public static QuickChatPhrase activePhrase; @OriginalMember(owner = "client!wf", name = "j", descriptor = "Lclient!be;") public static Component staticActiveComponent1; @@ -73,28 +74,28 @@ public final class ScriptRunner { public static int[] intLocals; @OriginalMember(owner = "client!km", name = "ad", descriptor = "I") public static int fp = 0; - @OriginalMember(owner = "client!od", name = "g", descriptor = "S") - public static short aShort25 = 256; - @OriginalMember(owner = "client!an", name = "db", descriptor = "S") - public static short aShort9 = 205; - @OriginalMember(owner = "client!mc", name = "tb", descriptor = "S") - public static short aShort22 = 1; - @OriginalMember(owner = "client!ac", name = "k", descriptor = "S") - public static short aShort1 = 32767; - @OriginalMember(owner = "client!nc", name = "n", descriptor = "I") - public static int anInt4055 = 0; - @OriginalMember(owner = "client!tm", name = "i", descriptor = "I") - public static int anInt5377 = 0; - @OriginalMember(owner = "client!bn", name = "eb", descriptor = "I") - public static int anInt773 = 0; - @OriginalMember(owner = "client!ah", name = "n", descriptor = "I") - public static int anInt983 = 0; - @OriginalMember(owner = "client!sc", name = "p", descriptor = "I") - public static int anInt5029 = 0; - @OriginalMember(owner = "client!kd", name = "yb", descriptor = "S") - public static short aShort21 = 32767; - @OriginalMember(owner = "client!ee", name = "f", descriptor = "S") - public static short aShort12 = 1; + @OriginalMember(owner = "client!od", name = "g", descriptor = "S") + public static short aShort25 = 256; + @OriginalMember(owner = "client!an", name = "db", descriptor = "S") + public static short aShort9 = 205; + @OriginalMember(owner = "client!mc", name = "tb", descriptor = "S") + public static short aShort22 = 1; + @OriginalMember(owner = "client!ac", name = "k", descriptor = "S") + public static short aShort1 = 32767; + @OriginalMember(owner = "client!nc", name = "n", descriptor = "I") + public static int anInt4055 = 0; + @OriginalMember(owner = "client!tm", name = "i", descriptor = "I") + public static int anInt5377 = 0; + @OriginalMember(owner = "client!bn", name = "eb", descriptor = "I") + public static int anInt773 = 0; + @OriginalMember(owner = "client!ah", name = "n", descriptor = "I") + public static int anInt983 = 0; + @OriginalMember(owner = "client!sc", name = "p", descriptor = "I") + public static int anInt5029 = 0; + @OriginalMember(owner = "client!kd", name = "yb", descriptor = "S") + public static short aShort21 = 32767; + @OriginalMember(owner = "client!ee", name = "f", descriptor = "S") + public static short aShort12 = 1; @OriginalMember(owner = "client!kk", name = "j", descriptor = "I") public static int anInt3325 = 0; @OriginalMember(owner = "client!bi", name = "jb", descriptor = "Z") @@ -121,22 +122,22 @@ public final class ScriptRunner { public static int[] anIntArray134 = new int[2]; @OriginalMember(owner = "client!ge", name = "k", descriptor = "[I") public static int[] anIntArray205 = new int[2]; - @OriginalMember(owner = "client!d", name = "db", descriptor = "Z") - public static boolean aBoolean77 = false; - @OriginalMember(owner = "client!nm", name = "W", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!d", name = "db", descriptor = "Z") + public static boolean aBoolean77 = false; + @OriginalMember(owner = "client!nm", name = "W", descriptor = "Lclient!na;") public static JagString url; @OriginalMember(owner = "client!bf", name = "B", descriptor = "I") public static int anInt548 = -1; @OriginalMember(owner = "client!pb", name = "rb", descriptor = "S") public static short aShort27 = 320; - @OriginalMember(owner = "client!fc", name = "a", descriptor = "I") - public static int anInt1951 = -1; + @OriginalMember(owner = "client!fc", name = "a", descriptor = "I") + public static int anInt1951 = -1; @OriginalMember(owner = "client!em", name = "w", descriptor = "I") public static int anInt1892; - @OriginalMember(owner = "client!me", name = "nb", descriptor = "I") - public static int anInt3751; + @OriginalMember(owner = "client!me", name = "nb", descriptor = "I") + public static int anInt3751; - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIIZ)V") + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIIZ)V") public static void method2314(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) boolean arg4) { if (arg0 < 1) { arg0 = 1; @@ -224,8 +225,8 @@ public final class ScriptRunner { @Pc(59) int local59; @Pc(57) int local57; if (Camera.cameraType == 1) { - local57 = Camera.anInt5161 + (int)Camera.yawTarget & 0x7FF; - local59 = (int)Camera.pitchTarget; + local57 = Camera.anInt5161 + (int) Camera.yawTarget & 0x7FF; + local59 = (int) Camera.pitchTarget; if (local59 < Camera.anInt5245 / 256) { local59 = Camera.anInt5245 / 256; } @@ -458,11 +459,11 @@ public final class ScriptRunner { @Pc(512) Sprite local512 = Sprites.hitbars[1]; if (local17 instanceof Npc) { @Pc(518) Npc local518 = (Npc) local17; - @Pc(528) Sprite[] local528 = (Sprite[]) HitBarList.hitBars.get((long) local518.type.hitBarId); + @Pc(528) Sprite[] local528 = (Sprite[]) HitBarList.hitBars.get(local518.type.hitBarId); if (local528 == null) { local528 = SpriteLoader.loadAlphaSprites(local518.type.hitBarId, client.js5Archive8); if (local528 != null) { - HitBarList.hitBars.put(local528, (long) local518.type.hitBarId); + HitBarList.hitBars.put(local528, local518.type.hitBarId); } } if (local528 != null && local528.length == 2) { @@ -713,7 +714,8 @@ public final class ScriptRunner { } } } - label220: for (local28 = 0; local28 < local3; local28++) { + label220: + for (local28 = 0; local28 < local3; local28++) { @Pc(272) long local272; if (arg0) { local39 = PlayerList.self; @@ -723,10 +725,7 @@ public final class ScriptRunner { local272 = (long) PlayerList.ids[local28] << 32; } if (local39 != null && local39.method2682()) { - local39.aBoolean98 = false; - if ((Preferences.manyIdleAnimations && PlayerList.size > 200 || PlayerList.size > 50) && !arg0 && local39.movementSeqId == local39.getBasType().idleAnimationId) { - local39.aBoolean98 = true; - } + local39.aBoolean98 = (Preferences.manyIdleAnimations && PlayerList.size > 200 || PlayerList.size > 50) && !arg0 && local39.movementSeqId == local39.getBasType().idleAnimationId; local82 = local39.getSize(); if (local82 == 1) { if ((local39.xFine & 0x7F) == 64 && (local39.zFine & 0x7F) == 64) { @@ -841,7 +840,8 @@ public final class ScriptRunner { } } } - label200: for (local7 = 0; local7 < NpcList.size; local7++) { + label200: + for (local7 = 0; local7 < NpcList.size; local7++) { local16 = NpcList.npcs[NpcList.ids[local7]]; @Pc(262) long local262 = (long) NpcList.ids[local7] << 32 | 0x20000000L; if (local16 != null && local16.method2682() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) { @@ -1060,7 +1060,8 @@ public final class ScriptRunner { } @Pc(150) int local150; @Pc(191) int local191; - label238: for (local150 = Player.level + 1; local150 <= 3; local150++) { + label238: + for (local150 = Player.level + 1; local150 <= 3; local150++) { if ((SceneGraph.tileFlags[local150][local108][local122] & 0x8) == 0) { @Pc(227) int local227; @Pc(358) int local358; @@ -1200,27 +1201,27 @@ public final class ScriptRunner { } } - @OriginalMember(owner = "client!nf", name = "a", descriptor = "(Lclient!na;BZ)V") - public static void openUrl(@OriginalArg(0) JagString arg0, @OriginalArg(2) boolean arg1) { - if (!arg1) { - try { - GameShell.instance.getAppletContext().showDocument(arg0.method3127(GameShell.instance.getCodeBase()), "_top"); - } catch (@Pc(22) Exception local22) { - } - return; - } - if (GlRenderer.enabled && GameShell.openWindowJavaScript) { - try { - BrowserControl.call(GameShell.signLink.applet, "openjs", new Object[] { arg0.method3127(GameShell.instance.getCodeBase()).toString() }); - return; - } catch (@Pc(48) Throwable local48) { - } - } - try { - GameShell.instance.getAppletContext().showDocument(arg0.method3127(GameShell.instance.getCodeBase()), "_blank"); - } catch (@Pc(59) Exception local59) { - } - } + @OriginalMember(owner = "client!nf", name = "a", descriptor = "(Lclient!na;BZ)V") + public static void openUrl(@OriginalArg(0) JagString arg0, @OriginalArg(2) boolean arg1) { + if (!arg1) { + try { + GameShell.instance.getAppletContext().showDocument(arg0.method3127(GameShell.instance.getCodeBase()), "_top"); + } catch (@Pc(22) Exception local22) { + } + return; + } + if (GlRenderer.enabled && GameShell.openWindowJavaScript) { + try { + BrowserControl.call(GameShell.signLink.applet, "openjs", new Object[]{arg0.method3127(GameShell.instance.getCodeBase()).toString()}); + return; + } catch (@Pc(48) Throwable local48) { + } + } + try { + GameShell.instance.getAppletContext().showDocument(arg0.method3127(GameShell.instance.getCodeBase()), "_blank"); + } catch (@Pc(59) Exception local59) { + } + } @OriginalMember(owner = "client!og", name = "a", descriptor = "(BIILclient!fe;III)V") public static void method3326(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) PathingEntity arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { @@ -1261,33 +1262,33 @@ public final class ScriptRunner { } } - @OriginalMember(owner = "client!ed", name = "b", descriptor = "(II)Lclient!ba;") - public static World getWorld(@OriginalArg(1) int arg0) { - return WorldList.loaded && arg0 >= WorldList.minId && arg0 <= WorldList.maxId ? WorldList.worlds[arg0 - WorldList.minId] : null; - } + @OriginalMember(owner = "client!ed", name = "b", descriptor = "(II)Lclient!ba;") + public static World getWorld(@OriginalArg(1) int arg0) { + return WorldList.loaded && arg0 >= WorldList.minId && arg0 <= WorldList.maxId ? WorldList.worlds[arg0 - WorldList.minId] : null; + } - @OriginalMember(owner = "client!sc", name = "a", descriptor = "()V") - public static void method3858() { - for (@Pc(1) int local1 = 0; local1 < SceneGraph.sceneryLen; local1++) { - @Pc(8) Scenery local8 = SceneGraph.scenery[local1]; - SceneGraph.removeScenery(local8); - SceneGraph.scenery[local1] = null; - } - SceneGraph.sceneryLen = 0; - } + @OriginalMember(owner = "client!sc", name = "a", descriptor = "()V") + public static void method3858() { + for (@Pc(1) int local1 = 0; local1 < SceneGraph.sceneryLen; local1++) { + @Pc(8) Scenery local8 = SceneGraph.scenery[local1]; + SceneGraph.removeScenery(local8); + SceneGraph.scenery[local1] = null; + } + SceneGraph.sceneryLen = 0; + } - @OriginalMember(owner = "client!be", name = "a", descriptor = "(Z)Lclient!na;") - public static JagString method479() { - @Pc(8) JagString local8 = aClass100_518; - @Pc(10) JagString local10 = JagString.EMPTY; - if (client.modeWhere != 0) { - local8 = aClass100_365; - } - if (client.settings != null) { - local10 = JagString.concatenate(new JagString[] { aClass100_687, client.settings}); - } - return JagString.concatenate(new JagString[] { aClass100_424, local8, aClass100_886, JagString.parseInt(client.language), aClass100_98, JagString.parseInt(client.affiliate), local10, aClass100_268 }); - } + @OriginalMember(owner = "client!be", name = "a", descriptor = "(Z)Lclient!na;") + public static JagString method479() { + @Pc(8) JagString local8 = aClass100_518; + @Pc(10) JagString local10 = JagString.EMPTY; + if (client.modeWhere != 0) { + local8 = aClass100_365; + } + if (client.settings != null) { + local10 = JagString.concatenate(new JagString[]{aClass100_687, client.settings}); + } + return JagString.concatenate(new JagString[]{aClass100_424, local8, aClass100_886, JagString.parseInt(client.language), aClass100_98, JagString.parseInt(client.affiliate), local10, aClass100_268}); + } @OriginalMember(owner = "client!ol", name = "a", descriptor = "(IIIILclient!th;IJIIII)Z") public static boolean method3387(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) Entity arg4, @OriginalArg(5) int arg5, @OriginalArg(6) long arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9, @OriginalArg(10) int arg10) { @@ -1675,7 +1676,8 @@ public final class ScriptRunner { } } cycles = 0; - nextOp: while (true) { + nextOp: + while (true) { cycles++; if (maxCycles < cycles) { throw new RuntimeException("slow"); @@ -1913,7 +1915,7 @@ public final class ScriptRunner { if (opcode == 51) { @Pc(992) HashTable local992 = script.switchTables[intOperands[pc]]; isp--; - @Pc(1002) IntNode local1002 = (IntNode) local992.get((long) intStack[isp]); + @Pc(1002) IntNode local1002 = (IntNode) local992.get(intStack[isp]); if (local1002 != null) { pc += local1002.value; } @@ -1921,11 +1923,7 @@ public final class ScriptRunner { } } @Pc(1020) boolean local1020; - if (intOperands[pc] == 1) { - local1020 = true; - } else { - local1020 = false; - } + local1020 = intOperands[pc] == 1; @Pc(1182) Component component; @Pc(1052) int int2; @Pc(1063) Component local1063; @@ -2310,11 +2308,7 @@ public final class ScriptRunner { } else if (component.baseWidth > 0) { component.modelZoom = component.modelZoom * 32 / component.baseWidth; } - if (opcode == Cs2Opcodes.setItemNoNum) { - component.objDrawText = false; - } else { - component.objDrawText = true; - } + component.objDrawText = opcode != Cs2Opcodes.setItemNoNum; } continue; } @@ -2759,7 +2753,7 @@ public final class ScriptRunner { if (opcode == Cs2Opcodes.hasChild) { isp--; int1 = intStack[isp]; - @Pc(12566) ComponentPointer local12566 = (ComponentPointer) InterfaceList.openInterfaces.get((long) int1); + @Pc(12566) ComponentPointer local12566 = (ComponentPointer) InterfaceList.openInterfaces.get(int1); if (local12566 == null) { intStack[isp++] = 0; } else { @@ -2788,7 +2782,7 @@ public final class ScriptRunner { isp -= 2; int1 = intStack[isp]; int3 = intStack[isp + 1]; - @Pc(12663) ComponentPointer local12663 = (ComponentPointer) InterfaceList.openInterfaces.get((long) int1); + @Pc(12663) ComponentPointer local12663 = (ComponentPointer) InterfaceList.openInterfaces.get(int1); if (local12663 != null && local12663.anInt5878 == int3) { intStack[isp++] = 1; continue; @@ -3631,7 +3625,7 @@ public final class ScriptRunner { isp -= 3; local4892 = intStack[isp]; local4899 = intStack[isp + 1]; - @Pc(5251) long local5251 = (long) intStack[isp + 2]; + @Pc(5251) long local5251 = intStack[isp + 2]; intStack[isp++] = (int) (local4892 * local5251 / local4899); continue; } @@ -4528,8 +4522,8 @@ public final class ScriptRunner { @Pc(8108) int local8108 = intStack[isp + 6]; local1087 = intStack[isp + 5]; if (int1 >= 0 && int1 < 2 && Camera.anIntArrayArrayArray9[int1] != null && int3 >= 0 && Camera.anIntArrayArrayArray9[int1].length > int3) { - Camera.anIntArrayArrayArray9[int1][int3] = new int[] { (int2 >> 14 & 0x3FFF) * 128, local652, (int2 & 0x3FFF) * 128, local8108 }; - Camera.anIntArrayArrayArray9[int1][int3 + 1] = new int[] { (c >> 14 & 0x3FFF) * 128, local1087, (c & 0x3FFF) * 128 }; + Camera.anIntArrayArrayArray9[int1][int3] = new int[]{(int2 >> 14 & 0x3FFF) * 128, local652, (int2 & 0x3FFF) * 128, local8108}; + Camera.anIntArrayArrayArray9[int1][int3 + 1] = new int[]{(c >> 14 & 0x3FFF) * 128, local1087, (c & 0x3FFF) * 128}; } continue; } @@ -4574,7 +4568,7 @@ public final class ScriptRunner { local1552 = intStack[isp] == 1; ssp--; string = stringStack[ssp]; - @Pc(8356) JagString local8356 = JagString.concatenate(new JagString[] { method479(), string }); + @Pc(8356) JagString local8356 = JagString.concatenate(new JagString[]{method479(), string}); if (GameShell.frame != null || local1552 && SignLink.anInt5928 != 3 && SignLink.osName.startsWith("win") && !client.haveIe6) { Static164.newTab = local1552; url = local8356; @@ -4702,18 +4696,18 @@ public final class ScriptRunner { Camera.pitchTarget = intStack[isp]; Camera.yawTarget = intStack[isp + 1]; if (Camera.cameraType == 2) { - Camera.cameraYaw = (int)Camera.yawTarget; - Camera.cameraPitch = (int)Camera.pitchTarget; + Camera.cameraYaw = (int) Camera.yawTarget; + Camera.cameraPitch = (int) Camera.pitchTarget; } Camera.clampCameraAngle(); continue; } if (opcode == Cs2Opcodes.cameraGetVrot) { - intStack[isp++] = (int)Camera.pitchTarget; + intStack[isp++] = (int) Camera.pitchTarget; continue; } if (opcode == Cs2Opcodes.cameraGetHrot) { - intStack[isp++] = (int)Camera.yawTarget; + intStack[isp++] = (int) Camera.yawTarget; continue; } } else if (opcode < 5700) { @@ -5414,14 +5408,14 @@ public final class ScriptRunner { string = stringStack[ssp]; isp--; int3 = intStack[isp]; - stringStack[ssp++] = JagString.concatenate(new JagString[] { string, JagString.parseInt(int3) }); + stringStack[ssp++] = JagString.concatenate(new JagString[]{string, JagString.parseInt(int3)}); continue; } if (opcode == Cs2Opcodes.concatString) { ssp -= 2; str1 = stringStack[ssp + 1]; string = stringStack[ssp]; - stringStack[ssp++] = JagString.concatenate(new JagString[] { string, str1 }); + stringStack[ssp++] = JagString.concatenate(new JagString[]{string, str1}); continue; } if (opcode == Cs2Opcodes.concatSignedInt) { @@ -5429,7 +5423,7 @@ public final class ScriptRunner { string = stringStack[ssp]; isp--; int3 = intStack[isp]; - stringStack[ssp++] = JagString.concatenate(new JagString[] { string, JagString.parseIntTrue(int3) }); + stringStack[ssp++] = JagString.concatenate(new JagString[]{string, JagString.parseIntTrue(int3)}); continue; } if (opcode == Cs2Opcodes.toLowerStr) { @@ -5446,7 +5440,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, Static34.aClass100Array40[c], aClass100_767, JagString.parseInt(local1087)}); continue; } if (opcode == Cs2Opcodes.strForGender) { @@ -5615,7 +5609,7 @@ public final class ScriptRunner { local12388 = intStack[isp] != 0; isp--; int3 = intStack[isp]; - stringStack[ssp++] = StringUtils.formatNumber(client.language, local12388, 0, (long) int3); + stringStack[ssp++] = StringUtils.formatNumber(client.language, local12388, 0, int3); continue; } } @@ -5730,14 +5724,14 @@ public final class ScriptRunner { str.method3113(Static176.aClass100_802).method3113(JagString.parseInt(cycles)); } if (client.modeWhere != 0) { - Chat.add(EMPTY_STRING, 0, JagString.concatenate(new JagString[] { aClass100_780, script.name})); + Chat.add(EMPTY_STRING, 0, JagString.concatenate(new JagString[]{aClass100_780, script.name})); } TracingException.report("CS2 - scr:" + script.key + " op:" + op + new String(str.method3148()), ex); } } } - @OriginalMember(owner = "client!gi", name = "a", descriptor = "(ILclient!jl;)V") + @OriginalMember(owner = "client!gi", name = "a", descriptor = "(ILclient!jl;)V") public static void run(@OriginalArg(1) HookRequest request) { run(200000, request); } diff --git a/client/src/main/java/rt4/SecondaryLinkedList.java b/client/src/main/java/rt4/SecondaryLinkedList.java index 7656b9b..108102d 100644 --- a/client/src/main/java/rt4/SecondaryLinkedList.java +++ b/client/src/main/java/rt4/SecondaryLinkedList.java @@ -20,18 +20,18 @@ public final class SecondaryLinkedList { this.sentinel.secondaryPrev = this.sentinel; } - @OriginalMember(owner = "client!gk", name = "a", descriptor = "(Lclient!rg;Lclient!rg;B)V") - public static void insertAfter(@OriginalArg(0) SecondaryNode arg0, @OriginalArg(1) SecondaryNode arg1) { - if (arg1.secondaryPrev != null) { - arg1.unlinkSecondary(); - } - arg1.secondaryPrev = arg0; - arg1.secondaryNext = arg0.secondaryNext; - arg1.secondaryPrev.secondaryNext = arg1; - arg1.secondaryNext.secondaryPrev = arg1; - } + @OriginalMember(owner = "client!gk", name = "a", descriptor = "(Lclient!rg;Lclient!rg;B)V") + public static void insertAfter(@OriginalArg(0) SecondaryNode arg0, @OriginalArg(1) SecondaryNode arg1) { + if (arg1.secondaryPrev != null) { + arg1.unlinkSecondary(); + } + arg1.secondaryPrev = arg0; + arg1.secondaryNext = arg0.secondaryNext; + arg1.secondaryPrev.secondaryNext = arg1; + arg1.secondaryNext.secondaryPrev = arg1; + } - @OriginalMember(owner = "client!ce", name = "a", descriptor = "(I)I") + @OriginalMember(owner = "client!ce", name = "a", descriptor = "(I)I") public final int size() { @Pc(3) int local3 = 0; @Pc(7) SecondaryNode local7 = this.sentinel.secondaryNext; diff --git a/client/src/main/java/rt4/SeqTypeList.java b/client/src/main/java/rt4/SeqTypeList.java index ebb6d7a..009a081 100644 --- a/client/src/main/java/rt4/SeqTypeList.java +++ b/client/src/main/java/rt4/SeqTypeList.java @@ -5,79 +5,79 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class SeqTypeList { - @OriginalMember(owner = "client!lc", name = "e", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!vl", name = "a", descriptor = "Lclient!n;") - public static final SoftLruHashTable animFramesets = new SoftLruHashTable(100); - @OriginalMember(owner = "client!tk", name = "s", descriptor = "Lclient!ve;") - public static Js5 archive; - @OriginalMember(owner = "client!af", name = "a", descriptor = "Lclient!ve;") - public static Js5 basesArchive; - @OriginalMember(owner = "client!se", name = "l", descriptor = "Lclient!ve;") - public static Js5 animsArchive; + @OriginalMember(owner = "client!lc", name = "e", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!vl", name = "a", descriptor = "Lclient!n;") + public static final SoftLruHashTable animFramesets = new SoftLruHashTable(100); + @OriginalMember(owner = "client!tk", name = "s", descriptor = "Lclient!ve;") + public static Js5 archive; + @OriginalMember(owner = "client!af", name = "a", descriptor = "Lclient!ve;") + public static Js5 basesArchive; + @OriginalMember(owner = "client!se", name = "l", descriptor = "Lclient!ve;") + public static Js5 animsArchive; - @OriginalMember(owner = "client!client", name = "a", descriptor = "(IB)Lclient!tk;") - public static SeqType get(@OriginalArg(0) int id) { - @Pc(17) SeqType local17 = (SeqType) types.get((long) id); - if (local17 != null) { - return local17; - } - @Pc(32) byte[] local32 = archive.fetchFile(getGroupId(id), getFileId(id)); - local17 = new SeqType(); - local17.id = id; - if (local32 != null) { - local17.decode(new Buffer(local32)); - } - local17.postDecode(); - types.put(local17, (long) id); - return local17; - } + @OriginalMember(owner = "client!client", name = "a", descriptor = "(IB)Lclient!tk;") + public static SeqType get(@OriginalArg(0) int id) { + @Pc(17) SeqType local17 = (SeqType) types.get(id); + if (local17 != null) { + return local17; + } + @Pc(32) byte[] local32 = archive.fetchFile(getGroupId(id), getFileId(id)); + local17 = new SeqType(); + local17.id = id; + if (local32 != null) { + local17.decode(new Buffer(local32)); + } + local17.postDecode(); + types.put(local17, id); + return local17; + } - @OriginalMember(owner = "client!s", name = "a", descriptor = "(II)I") - public static int getGroupId(@OriginalArg(0) int arg0) { - return arg0 >>> 7; - } + @OriginalMember(owner = "client!s", name = "a", descriptor = "(II)I") + public static int getGroupId(@OriginalArg(0) int arg0) { + return arg0 >>> 7; + } - @OriginalMember(owner = "client!jd", name = "a", descriptor = "(II)I") - public static int getFileId(@OriginalArg(1) int arg0) { - return arg0 & 0x7F; - } + @OriginalMember(owner = "client!jd", name = "a", descriptor = "(II)I") + public static int getFileId(@OriginalArg(1) int arg0) { + return arg0 & 0x7F; + } - @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Lclient!ve;Lclient!ve;ILclient!ve;)V") - public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1, @OriginalArg(3) Js5 arg2) { - archive = arg1; - basesArchive = arg0; - animsArchive = arg2; - } + @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Lclient!ve;Lclient!ve;ILclient!ve;)V") + public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1, @OriginalArg(3) Js5 arg2) { + archive = arg1; + basesArchive = arg0; + animsArchive = arg2; + } - @OriginalMember(owner = "client!an", name = "a", descriptor = "(Z)V") - public static void method350() { - types.clear(); - animFramesets.clear(); - } + @OriginalMember(owner = "client!an", name = "a", descriptor = "(Z)V") + public static void method350() { + types.clear(); + animFramesets.clear(); + } - @OriginalMember(owner = "client!sg", name = "a", descriptor = "(B)V") - public static void method3903() { - types.removeSoft(); - animFramesets.removeSoft(); - } + @OriginalMember(owner = "client!sg", name = "a", descriptor = "(B)V") + public static void method3903() { + types.removeSoft(); + animFramesets.removeSoft(); + } - @OriginalMember(owner = "client!fl", name = "a", descriptor = "(IB)V") - public static void clean() { - types.clean(5); - animFramesets.clean(5); - } + @OriginalMember(owner = "client!fl", name = "a", descriptor = "(IB)V") + public static void clean() { + types.clean(5); + animFramesets.clean(5); + } - @OriginalMember(owner = "client!fl", name = "b", descriptor = "(II)Lclient!cl;") - public static AnimFrameset getAnimFrameset(@OriginalArg(0) int id) { - @Pc(19) AnimFrameset frameset = (AnimFrameset) animFramesets.get((long) id); - if (frameset != null) { - return frameset; - } - frameset = AnimFrameset.create(animsArchive, basesArchive, id); - if (frameset != null) { - animFramesets.put(frameset, (long) id); - } - return frameset; - } + @OriginalMember(owner = "client!fl", name = "b", descriptor = "(II)Lclient!cl;") + public static AnimFrameset getAnimFrameset(@OriginalArg(0) int id) { + @Pc(19) AnimFrameset frameset = (AnimFrameset) animFramesets.get(id); + if (frameset != null) { + return frameset; + } + frameset = AnimFrameset.create(animsArchive, basesArchive, id); + if (frameset != null) { + animFramesets.put(frameset, id); + } + return frameset; + } } diff --git a/client/src/main/java/rt4/ServerActiveProperties.java b/client/src/main/java/rt4/ServerActiveProperties.java index 1bf0da0..b67709d 100644 --- a/client/src/main/java/rt4/ServerActiveProperties.java +++ b/client/src/main/java/rt4/ServerActiveProperties.java @@ -19,12 +19,12 @@ public final class ServerActiveProperties extends Node { this.events = arg0; } - @OriginalMember(owner = "client!qc", name = "a", descriptor = "(BI)I") + @OriginalMember(owner = "client!qc", name = "a", descriptor = "(BI)I") public static int method3594(@OriginalArg(1) int arg0) { return arg0 >> 11 & 0x7F; } - @OriginalMember(owner = "client!bf", name = "a", descriptor = "(IB)Z") + @OriginalMember(owner = "client!bf", name = "a", descriptor = "(IB)Z") public final boolean method503(@OriginalArg(0) int arg0) { return (this.events >> arg0 + 1 & 0x1) != 0; } diff --git a/client/src/main/java/rt4/ServerProt.java b/client/src/main/java/rt4/ServerProt.java index c4d9c34..1ec5289 100644 --- a/client/src/main/java/rt4/ServerProt.java +++ b/client/src/main/java/rt4/ServerProt.java @@ -1,126 +1,126 @@ package rt4; public class ServerProt { - /// map - public static final int UPDATE_CURRENT_LOCATION = 26; - public static final int CLEAR_GROUND_ITEMS = 112; - public static final int UPDATE_SCENE_GRAPH = 162; - public static final int DYNAMIC_SCENE_GRAPH = 214; - public static final int BATCH_LOCATION_PACKET = 230; + /// map + public static final int UPDATE_CURRENT_LOCATION = 26; + public static final int CLEAR_GROUND_ITEMS = 112; + public static final int UPDATE_SCENE_GRAPH = 162; + public static final int DYNAMIC_SCENE_GRAPH = 214; + public static final int BATCH_LOCATION_PACKET = 230; - // TODO: these are the batched packets that modify projectiles, locs, etc. - public static final int LOCATION_PACKET_14 = 14; - public static final int LOCATION_PACKET_16 = 16; - public static final int LOCATION_PACKET_17 = 17; - public static final int LOCATION_PACKET_20 = 20; - public static final int LOCATION_PACKET_33 = 33; - public static final int LOCATION_PACKET_97 = 97; - public static final int LOCATION_PACKET_104 = 104; - public static final int LOCATION_PACKET_121 = 121; - public static final int LOCATION_PACKET_135 = 135; - public static final int LOCATION_PACKET_179 = 179; - public static final int LOCATION_PACKET_195 = 195; - public static final int LOCATION_PACKET_202 = 202; - public static final int LOCATION_PACKET_240 = 240; + // TODO: these are the batched packets that modify projectiles, locs, etc. + public static final int LOCATION_PACKET_14 = 14; + public static final int LOCATION_PACKET_16 = 16; + public static final int LOCATION_PACKET_17 = 17; + public static final int LOCATION_PACKET_20 = 20; + public static final int LOCATION_PACKET_33 = 33; + public static final int LOCATION_PACKET_97 = 97; + public static final int LOCATION_PACKET_104 = 104; + public static final int LOCATION_PACKET_121 = 121; + public static final int LOCATION_PACKET_135 = 135; + public static final int LOCATION_PACKET_179 = 179; + public static final int LOCATION_PACKET_195 = 195; + public static final int LOCATION_PACKET_202 = 202; + public static final int LOCATION_PACKET_240 = 240; - /// updates - public static final int NPC_INFO = 32; // NXT naming - public static final int PLAYER_INFO = 225; // NXT naming + /// updates + public static final int NPC_INFO = 32; // NXT naming + public static final int PLAYER_INFO = 225; // NXT naming - /// var{p,c,bit} - public static final int VARBIT_SMALL = 37; // NXT naming - public static final int VARBIT_LARGE = 84; // NXT naming - public static final int VARP_SMALL = 60; // NXT naming - public static final int VARP_LARGE = 226; // NXT naming - public static final int CLIENT_SETVARC_SMALL = 65; // NXT naming - public static final int CLIENT_SETVARC_LARGE = 69; // NXT naming - public static final int RESET_CLIENT_VARCACHE = 89; // NXT naming (?) - public static final int FORCE_VARP_REFRESH = 128; + /// var{p,c,bit} + public static final int VARBIT_SMALL = 37; // NXT naming + public static final int VARBIT_LARGE = 84; // NXT naming + public static final int VARP_SMALL = 60; // NXT naming + public static final int VARP_LARGE = 226; // NXT naming + public static final int CLIENT_SETVARC_SMALL = 65; // NXT naming + public static final int CLIENT_SETVARC_LARGE = 69; // NXT naming + public static final int RESET_CLIENT_VARCACHE = 89; // NXT naming (?) + public static final int FORCE_VARP_REFRESH = 128; - /// chat - public static final int MESSAGE_GAME = 70; // NXT naming - public static final int IF_SETCOLOUR = 2; // NXT naming - public static final int CHAT_FILTER_SETTINGS = 232; // NXT naming + /// chat + public static final int MESSAGE_GAME = 70; // NXT naming + public static final int IF_SETCOLOUR = 2; // NXT naming + public static final int CHAT_FILTER_SETTINGS = 232; // NXT naming - public static final int MESSAGE_PRIVATE = 0; // NXT naming - public static final int MESSAGE_QUICKCHAT_PRIVATE = 247; // NXT naming + public static final int MESSAGE_PRIVATE = 0; // NXT naming + public static final int MESSAGE_QUICKCHAT_PRIVATE = 247; // NXT naming - public static final int MESSAGE_PRIVATE_ECHO = 71; // NXT naming - public static final int MESSAGE_QUICKCHAT_PRIVATE_ECHO = 141; // NXT naming + public static final int MESSAGE_PRIVATE_ECHO = 71; // NXT naming + public static final int MESSAGE_QUICKCHAT_PRIVATE_ECHO = 141; // NXT naming - public static final int MESSAGE_CLANCHANNEL = 54; // NXT naming - public static final int CLAN_QUICK_CHAT = 81; + public static final int MESSAGE_CLANCHANNEL = 54; // NXT naming + public static final int CLAN_QUICK_CHAT = 81; - /// {friends,ignore,clan} packets - public static final int JOIN_CLAN_CHAT = 55; - public static final int FRIENDLIST_LOADED = 197; // NXT naming (?) + /// {friends,ignore,clan} packets + public static final int JOIN_CLAN_CHAT = 55; + public static final int FRIENDLIST_LOADED = 197; // NXT naming (?) - public static final int UPDATE_FRIENDLIST = 62; // NXT naming (?) - public static final int UPDATE_IGNORELIST = 126; // NXT naming + public static final int UPDATE_FRIENDLIST = 62; // NXT naming (?) + public static final int UPDATE_IGNORELIST = 126; // NXT naming - /// interfaces - public static final int IF_SETHIDE = 21; // NXT naming (?) - public static final int IF_SETANIM = 36; // NXT naming (?) - public static final int IF_SETOBJECT = 50; // NXT naming - public static final int IF_SETPLAYERHEAD = 66; // NXT naming (?) - double check if this is correct or if it's IF_SETPLAYERMODEL_SELF etc - public static final int IF_SETNPCHEAD = 73; // NXT naming - public static final int IF_SETMODEL = 130; // NXT naming - public static final int IF_SETPOSITION = 119; // NXT naming - public static final int IF_SETANGLE = 132; // NXT naming - public static final int IF_OPENSUB = 145; // NXT naming (?) - public static final int IF_CLOSESUB = 149; // NXT naming (?) - public static final int IF_OPENTOP = 155; // NXT naming (?) - public static final int SET_INTERFACE_SETTINGS = 165; - public static final int IF_SETSCROLLPOS = 220; // NXT naming - // none of these are exactly NXT naming, need to identify differences and when one would be used over the other - public static final int IF_SETTEXT1 = 171; - public static final int IF_SETTEXT2 = 48; - public static final int IF_SETTEXT3 = 123; - // no clue on original names... yet - public static final int WIDGETSTRUCT_SETTING = 9; - public static final int INTERFACE_ANIMATE_ROTATE = 207; - public static final int GAME_FRAME_UNK = 209; - public static final int DELETE_INVENTORY = 191; - public static final int SWITCH_WIDGET = 176; - public static final int GENERATE_CHAT_HEAD_FROM_BODY = 111; + /// interfaces + public static final int IF_SETHIDE = 21; // NXT naming (?) + public static final int IF_SETANIM = 36; // NXT naming (?) + public static final int IF_SETOBJECT = 50; // NXT naming + public static final int IF_SETPLAYERHEAD = 66; // NXT naming (?) - double check if this is correct or if it's IF_SETPLAYERMODEL_SELF etc + public static final int IF_SETNPCHEAD = 73; // NXT naming + public static final int IF_SETMODEL = 130; // NXT naming + public static final int IF_SETPOSITION = 119; // NXT naming + public static final int IF_SETANGLE = 132; // NXT naming + public static final int IF_OPENSUB = 145; // NXT naming (?) + public static final int IF_CLOSESUB = 149; // NXT naming (?) + public static final int IF_OPENTOP = 155; // NXT naming (?) + public static final int SET_INTERFACE_SETTINGS = 165; + public static final int IF_SETSCROLLPOS = 220; // NXT naming + // none of these are exactly NXT naming, need to identify differences and when one would be used over the other + public static final int IF_SETTEXT1 = 171; + public static final int IF_SETTEXT2 = 48; + public static final int IF_SETTEXT3 = 123; + // no clue on original names... yet + public static final int WIDGETSTRUCT_SETTING = 9; + public static final int INTERFACE_ANIMATE_ROTATE = 207; + public static final int GAME_FRAME_UNK = 209; + public static final int DELETE_INVENTORY = 191; + public static final int SWITCH_WIDGET = 176; + public static final int GENERATE_CHAT_HEAD_FROM_BODY = 111; - /// inventory - public static final int INTERFACE_ITEMS_CLEAR = 144; - public static final int UPDATE_INV_PARTIAL = 22; // NXT naming - public static final int UPDATE_INV_FULL = 105; // NXT naming + /// inventory + public static final int INTERFACE_ITEMS_CLEAR = 144; + public static final int UPDATE_INV_PARTIAL = 22; // NXT naming + public static final int UPDATE_INV_FULL = 105; // NXT naming - /// misc - public static final int LOGOUT = 86; // NXT naming - public static final int UPDATE_RUNENERGY = 234; // NXT naming - public static final int UPDATE_RUNWEIGHT = 159; // NXT naming (?) - public static final int UPDATE_REBOOT_TIMER = 85; // NXT naming - public static final int UPDATE_STAT = 38; // NXT naming - public static final int MIDI_SONG = 4; // NXT naming - public static final int MIDI_JINGLE = 208; // NXT naming - public static final int SYNTH_SOUND = 172; // NXT naming - public static final int HINT_ARROW = 217; // NXT naming (?) - public static final int UPDATE_UID192 = 169; // NXT naming (?) - public static final int URL_OPEN = 42; // NXT naming - public static final int CAM_RESET = 24; // NXT naming - public static final int CAM_SHAKE = 27; // NXT naming - public static final int SPOTANIM_SPECIFIC = 56; // NXT naming - public static final int NPC_ANIM_SPECIFIC = 102; // NXT naming - public static final int CAM_LOOKAT = 125; // NXT naming - public static final int RESET_ANIMS = 131; // NXT naming - public static final int LAST_LOGIN_INFO = 164; // NXT naming (?) - public static final int CAM_FORCEANGLE = 187; // NXT naming - public static final int LOC_ANIM_SPECIFIC = 235; // NXT naming + /// misc + public static final int LOGOUT = 86; // NXT naming + public static final int UPDATE_RUNENERGY = 234; // NXT naming + public static final int UPDATE_RUNWEIGHT = 159; // NXT naming (?) + public static final int UPDATE_REBOOT_TIMER = 85; // NXT naming + public static final int UPDATE_STAT = 38; // NXT naming + public static final int MIDI_SONG = 4; // NXT naming + public static final int MIDI_JINGLE = 208; // NXT naming + public static final int SYNTH_SOUND = 172; // NXT naming + public static final int HINT_ARROW = 217; // NXT naming (?) + public static final int UPDATE_UID192 = 169; // NXT naming (?) + public static final int URL_OPEN = 42; // NXT naming + public static final int CAM_RESET = 24; // NXT naming + public static final int CAM_SHAKE = 27; // NXT naming + public static final int SPOTANIM_SPECIFIC = 56; // NXT naming + public static final int NPC_ANIM_SPECIFIC = 102; // NXT naming + public static final int CAM_LOOKAT = 125; // NXT naming + public static final int RESET_ANIMS = 131; // NXT naming + public static final int LAST_LOGIN_INFO = 164; // NXT naming (?) + public static final int CAM_FORCEANGLE = 187; // NXT naming + public static final int LOC_ANIM_SPECIFIC = 235; // NXT naming - // TODO: - public static final int RUN_CS2 = 115; - public static final int SET_INTERACTION = 44; - public static final int GRAND_EXCHANGE_OFFERS = 116; - public static final int CLEAR_MINIMAP_FLAG = 153; - public static final int SET_MINIMAP_STATE = 192; - public static final int REFLECTION_CHEAT_CHECK = 114; - public static final int TELEPORT_LOCAL_PLAYER = 13; - public static final int SET_SETTINGS_STRING = 142; - public static final int SET_WALK_TEXT = 160; - public static final int CAMERA_DETACH = 154; - public static final int UPDATE_CLAN = 196; + // TODO: + public static final int RUN_CS2 = 115; + public static final int SET_INTERACTION = 44; + public static final int GRAND_EXCHANGE_OFFERS = 116; + public static final int CLEAR_MINIMAP_FLAG = 153; + public static final int SET_MINIMAP_STATE = 192; + public static final int REFLECTION_CHEAT_CHECK = 114; + public static final int TELEPORT_LOCAL_PLAYER = 13; + public static final int SET_SETTINGS_STRING = 142; + public static final int SET_WALK_TEXT = 160; + public static final int CAMERA_DETACH = 154; + public static final int UPDATE_CLAN = 196; } \ No newline at end of file diff --git a/client/src/main/java/rt4/Shadow.java b/client/src/main/java/rt4/Shadow.java index 4d76c61..9cbafd8 100644 --- a/client/src/main/java/rt4/Shadow.java +++ b/client/src/main/java/rt4/Shadow.java @@ -1,19 +1,20 @@ package rt4; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + @OriginalClass("client!wm") public final class Shadow { - @OriginalMember(owner = "client!wm", name = "g", descriptor = "[B") - public static final byte[] pixels = new byte[16384]; - @OriginalMember(owner = "client!wm", name = "a", descriptor = "Lclient!vi;") + @OriginalMember(owner = "client!wm", name = "g", descriptor = "[B") + public static final byte[] pixels = new byte[16384]; + @OriginalMember(owner = "client!wm", name = "a", descriptor = "Lclient!vi;") private GlVertexBufferObject aClass155_6; @OriginalMember(owner = "client!wm", name = "c", descriptor = "Ljava/nio/ByteBuffer;") diff --git a/client/src/main/java/rt4/ShadowManager.java b/client/src/main/java/rt4/ShadowManager.java index b640b63..edab34e 100644 --- a/client/src/main/java/rt4/ShadowManager.java +++ b/client/src/main/java/rt4/ShadowManager.java @@ -1,6 +1,6 @@ package rt4; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -128,7 +128,8 @@ public final class ShadowManager { MaterialManager.setMaterial(0, 0); local1.glDepthMask(false); for (@Pc(17) int local17 = 0; local17 < anInt5346; local17++) { - label52: for (@Pc(22) int local22 = 0; local22 < anInt5345; local22++) { + label52: + for (@Pc(22) int local22 = 0; local22 < anInt5345; local22++) { for (@Pc(29) int local29 = local17 * 8; local29 < local17 * 8 + 8; local29++) { if (local29 - arg0 >= -arg2 && local29 - arg0 <= arg2) { for (@Pc(51) int local51 = local22 * 8; local51 < local22 * 8 + 8; local51++) { diff --git a/client/src/main/java/rt4/ShadowModelList.java b/client/src/main/java/rt4/ShadowModelList.java index 3836a8e..7f1076f 100644 --- a/client/src/main/java/rt4/ShadowModelList.java +++ b/client/src/main/java/rt4/ShadowModelList.java @@ -5,149 +5,149 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ShadowModelList { - @OriginalMember(owner = "client!di", name = "I", descriptor = "Lclient!n;") - public static final SoftLruHashTable SHADOWS = new SoftLruHashTable(32); + @OriginalMember(owner = "client!di", name = "I", descriptor = "Lclient!n;") + public static final SoftLruHashTable SHADOWS = new SoftLruHashTable(32); - @OriginalMember(owner = "client!kh", name = "a", descriptor = "(II)V") - public static void clean() { - SHADOWS.clean(5); - } + @OriginalMember(owner = "client!kh", name = "a", descriptor = "(II)V") + public static void clean() { + SHADOWS.clean(5); + } - @OriginalMember(owner = "client!ug", name = "b", descriptor = "(B)V") - public static void method4276() { - SHADOWS.removeSoft(); - } + @OriginalMember(owner = "client!ug", name = "b", descriptor = "(B)V") + public static void method4276() { + SHADOWS.removeSoft(); + } - @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IZLclient!tk;IIIIILclient!ak;IIIIB)Lclient!ak;") - public static Model method1043(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) SeqType arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) Model arg8, @OriginalArg(9) int arg9, @OriginalArg(10) int arg10, @OriginalArg(11) int arg11, @OriginalArg(12) int arg12) { - @Pc(23) long local23 = ((long) arg4 << 48) + (long) (arg7 + (arg0 << 16) + (arg12 << 24)) + ((long) arg6 << 32); - @Pc(33) Model local33 = (Model) SHADOWS.get(local23); - @Pc(109) int local109; - @Pc(115) int local115; - @Pc(126) int local126; - @Pc(130) int local130; - @Pc(162) int local162; - if (local33 == null) { - @Pc(41) byte local41; - if (arg7 == 1) { - local41 = 9; - } else if (arg7 == 2) { - local41 = 12; - } else if (arg7 == 3) { - local41 = 15; - } else if (arg7 == 4) { - local41 = 18; - } else { - local41 = 21; - } - @Pc(83) int[] local83 = new int[] { 64, 96, 128 }; - @Pc(103) RawModel local103 = new RawModel(local41 * 3 + 1, -local41 + local41 * 3 * 2, 0); - local109 = local103.method1685(0, 0); - @Pc(113) int[][] local113 = new int[3][local41]; - for (local115 = 0; local115 < 3; local115++) { - local126 = local83[local115]; - local130 = local83[local115]; - for (@Pc(132) int local132 = 0; local132 < local41; local132++) { - @Pc(141) int local141 = (local132 << 11) / local41; - @Pc(152) int local152 = arg5 + MathUtils.cos[local141] * local130 >> 16; - local162 = arg3 + MathUtils.sin[local141] * local126 >> 16; - local113[local115][local132] = local103.method1685(local162, local152); - } - } - for (local115 = 0; local115 < 3; local115++) { - local126 = (local115 * 256 + 128) / 3; - local130 = 256 - local126; - @Pc(207) byte local207 = (byte) (arg12 * local126 + arg0 * local130 >> 8); - @Pc(252) short local252 = (short) (((arg6 & 0x7F) * local130 + (arg4 & 0x7F) * local126 & 0x7F00) + (local130 * (arg6 & 0x380) + local126 * (arg4 & 0x380) & 0x38000) + (local126 * (arg4 & 0xFC00) + (arg6 & 0xFC00) * local130 & 0xFC0000) >> 8); - for (local162 = 0; local162 < local41; local162++) { - if (local115 == 0) { - local103.addTriangle(local109, local113[0][(local162 + 1) % local41], local113[0][local162], local252, local207); - } else { - local103.addTriangle(local113[local115 - 1][local162], local113[local115 - 1][(local162 + 1) % local41], local113[local115][(local162 + 1) % local41], local252, local207); - local103.addTriangle(local113[local115 - 1][local162], local113[local115][(local162 + 1) % local41], local113[local115][local162], local252, local207); - } - } - } - local33 = local103.createModel(64, 768, -50, -10, -50); - SHADOWS.put(local33, local23); - } - @Pc(367) int local367 = arg7 * 64 - 1; - @Pc(376) int local376 = -local367; - @Pc(379) int local379 = -local367; - @Pc(381) int local381 = local367; - @Pc(384) int local384 = arg8.getMinX(); - @Pc(386) AnimFrameset local386 = null; - local115 = arg8.getMaxX(); - local126 = arg8.getMinZ(); - local130 = arg8.getMaxZ(); - if (arg2 != null) { - @Pc(403) int local403 = arg2.frames[arg10]; - local386 = SeqTypeList.getAnimFrameset(local403 >> 16); - arg10 = local403 & 0xFFFF; - } - local109 = local367; - if (arg1) { - if (arg9 > 1664 || arg9 < 384) { - local379 -= 128; - } - if (arg9 > 1152 && arg9 < 1920) { - local381 = local367 + 128; - } - if (arg9 > 640 && arg9 < 1408) { - local109 = local367 + 128; - } - if (arg9 > 128 && arg9 < 896) { - local376 -= 128; - } - } - if (local109 < local130) { - local130 = local109; - } - if (local376 > local384) { - local384 = local376; - } - if (local126 < local379) { - local126 = local379; - } - if (local381 < local115) { - local115 = local381; - } - if (local386 == null) { - local33 = local33.method4560(true, true, true); - local33.resize((local115 - local384) / 2, 128, (local130 - local126) / 2); - local33.translate((local384 + local115) / 2, 0, (local126 + local130) / 2); - } else { - local33 = local33.method4560(!local386.isAlphaTransformed(arg10), !local386.isColorTransformed(arg10), true); - local33.resize((local115 - local384) / 2, 128, (local130 - local126) / 2); - local33.translate((local384 + local115) / 2, 0, (local126 + local130) / 2); - local33.method4555(local386, arg10); - } - if (arg9 != 0) { - local33.method4554(arg9); - } - if (GlRenderer.enabled) { - @Pc(650) GlModel local650 = (GlModel) local33; - if (SceneGraph.getTileHeight(Player.level, arg3 + local384, local126 + arg5) != arg11 || SceneGraph.getTileHeight(Player.level, local115 + arg3, arg5 - -local130) != arg11) { - 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; - } - } else { - @Pc(574) SoftwareModel local574 = (SoftwareModel) local33; - if (SceneGraph.getTileHeight(Player.level, arg3 + local384, arg5 - -local126) != arg11 || arg11 != SceneGraph.getTileHeight(Player.level, arg3 + local115, arg5 - -local130)) { - for (local162 = 0; local162 < local574.vertexCount; local162++) { - local574.vertexY[local162] += SceneGraph.getTileHeight(Player.level, arg3 + local574.vertexX[local162], arg5 + local574.vertexZ[local162]) - arg11; - } - local574.boundsValid = false; - } - } - return local33; - } + @OriginalMember(owner = "client!dc", name = "a", descriptor = "(IZLclient!tk;IIIIILclient!ak;IIIIB)Lclient!ak;") + public static Model method1043(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) SeqType arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) Model arg8, @OriginalArg(9) int arg9, @OriginalArg(10) int arg10, @OriginalArg(11) int arg11, @OriginalArg(12) int arg12) { + @Pc(23) long local23 = ((long) arg4 << 48) + (long) (arg7 + (arg0 << 16) + (arg12 << 24)) + ((long) arg6 << 32); + @Pc(33) Model local33 = (Model) SHADOWS.get(local23); + @Pc(109) int local109; + @Pc(115) int local115; + @Pc(126) int local126; + @Pc(130) int local130; + @Pc(162) int local162; + if (local33 == null) { + @Pc(41) byte local41; + if (arg7 == 1) { + local41 = 9; + } else if (arg7 == 2) { + local41 = 12; + } else if (arg7 == 3) { + local41 = 15; + } else if (arg7 == 4) { + local41 = 18; + } else { + local41 = 21; + } + @Pc(83) int[] local83 = new int[]{64, 96, 128}; + @Pc(103) RawModel local103 = new RawModel(local41 * 3 + 1, -local41 + local41 * 3 * 2, 0); + local109 = local103.method1685(0, 0); + @Pc(113) int[][] local113 = new int[3][local41]; + for (local115 = 0; local115 < 3; local115++) { + local126 = local83[local115]; + local130 = local83[local115]; + for (@Pc(132) int local132 = 0; local132 < local41; local132++) { + @Pc(141) int local141 = (local132 << 11) / local41; + @Pc(152) int local152 = arg5 + MathUtils.cos[local141] * local130 >> 16; + local162 = arg3 + MathUtils.sin[local141] * local126 >> 16; + local113[local115][local132] = local103.method1685(local162, local152); + } + } + for (local115 = 0; local115 < 3; local115++) { + local126 = (local115 * 256 + 128) / 3; + local130 = 256 - local126; + @Pc(207) byte local207 = (byte) (arg12 * local126 + arg0 * local130 >> 8); + @Pc(252) short local252 = (short) (((arg6 & 0x7F) * local130 + (arg4 & 0x7F) * local126 & 0x7F00) + (local130 * (arg6 & 0x380) + local126 * (arg4 & 0x380) & 0x38000) + (local126 * (arg4 & 0xFC00) + (arg6 & 0xFC00) * local130 & 0xFC0000) >> 8); + for (local162 = 0; local162 < local41; local162++) { + if (local115 == 0) { + local103.addTriangle(local109, local113[0][(local162 + 1) % local41], local113[0][local162], local252, local207); + } else { + local103.addTriangle(local113[local115 - 1][local162], local113[local115 - 1][(local162 + 1) % local41], local113[local115][(local162 + 1) % local41], local252, local207); + local103.addTriangle(local113[local115 - 1][local162], local113[local115][(local162 + 1) % local41], local113[local115][local162], local252, local207); + } + } + } + local33 = local103.createModel(64, 768, -50, -10, -50); + SHADOWS.put(local33, local23); + } + @Pc(367) int local367 = arg7 * 64 - 1; + @Pc(376) int local376 = -local367; + @Pc(379) int local379 = -local367; + @Pc(381) int local381 = local367; + @Pc(384) int local384 = arg8.getMinX(); + @Pc(386) AnimFrameset local386 = null; + local115 = arg8.getMaxX(); + local126 = arg8.getMinZ(); + local130 = arg8.getMaxZ(); + if (arg2 != null) { + @Pc(403) int local403 = arg2.frames[arg10]; + local386 = SeqTypeList.getAnimFrameset(local403 >> 16); + arg10 = local403 & 0xFFFF; + } + local109 = local367; + if (arg1) { + if (arg9 > 1664 || arg9 < 384) { + local379 -= 128; + } + if (arg9 > 1152 && arg9 < 1920) { + local381 = local367 + 128; + } + if (arg9 > 640 && arg9 < 1408) { + local109 = local367 + 128; + } + if (arg9 > 128 && arg9 < 896) { + local376 -= 128; + } + } + if (local109 < local130) { + local130 = local109; + } + if (local376 > local384) { + local384 = local376; + } + if (local126 < local379) { + local126 = local379; + } + if (local381 < local115) { + local115 = local381; + } + if (local386 == null) { + local33 = local33.method4560(true, true, true); + local33.resize((local115 - local384) / 2, 128, (local130 - local126) / 2); + local33.translate((local384 + local115) / 2, 0, (local126 + local130) / 2); + } else { + local33 = local33.method4560(!local386.isAlphaTransformed(arg10), !local386.isColorTransformed(arg10), true); + local33.resize((local115 - local384) / 2, 128, (local130 - local126) / 2); + local33.translate((local384 + local115) / 2, 0, (local126 + local130) / 2); + local33.method4555(local386, arg10); + } + if (arg9 != 0) { + local33.method4554(arg9); + } + if (GlRenderer.enabled) { + @Pc(650) GlModel local650 = (GlModel) local33; + if (SceneGraph.getTileHeight(Player.level, arg3 + local384, local126 + arg5) != arg11 || SceneGraph.getTileHeight(Player.level, local115 + arg3, arg5 - -local130) != arg11) { + 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; + } + } else { + @Pc(574) SoftwareModel local574 = (SoftwareModel) local33; + if (SceneGraph.getTileHeight(Player.level, arg3 + local384, arg5 - -local126) != arg11 || arg11 != SceneGraph.getTileHeight(Player.level, arg3 + local115, arg5 - -local130)) { + for (local162 = 0; local162 < local574.vertexCount; local162++) { + local574.vertexY[local162] += SceneGraph.getTileHeight(Player.level, arg3 + local574.vertexX[local162], arg5 + local574.vertexZ[local162]) - arg11; + } + local574.boundsValid = false; + } + } + return local33; + } - @OriginalMember(owner = "client!hb", name = "a", descriptor = "(Z)V") - public static void method1857() { - SHADOWS.clear(); - } + @OriginalMember(owner = "client!hb", name = "a", descriptor = "(Z)V") + public static void method1857() { + SHADOWS.clear(); + } } diff --git a/client/src/main/java/rt4/ShapedTile.java b/client/src/main/java/rt4/ShapedTile.java index 679d77c..98e5659 100644 --- a/client/src/main/java/rt4/ShapedTile.java +++ b/client/src/main/java/rt4/ShapedTile.java @@ -9,9 +9,9 @@ import org.openrs2.deob.annotation.Pc; public final class ShapedTile { @OriginalMember(owner = "client!fg", name = "i", descriptor = "[[I") - public static final int[][] anIntArrayArray12 = new int[][] { { 1, 3, 5, 7 }, { 1, 3, 5, 7 }, { 1, 3, 5, 7 }, { 1, 3, 5, 7, 6 }, { 1, 3, 5, 7, 6 }, { 1, 3, 5, 7, 6 }, { 1, 3, 5, 7, 6 }, { 1, 3, 5, 7, 2, 6 }, { 1, 3, 5, 7, 2, 8 }, { 1, 3, 5, 7, 2, 8 }, { 1, 3, 5, 7, 11, 12 }, { 1, 3, 5, 7, 11, 12 }, { 1, 3, 5, 7, 13, 14 } }; + public static final int[][] anIntArrayArray12 = new int[][]{{1, 3, 5, 7}, {1, 3, 5, 7}, {1, 3, 5, 7}, {1, 3, 5, 7, 6}, {1, 3, 5, 7, 6}, {1, 3, 5, 7, 6}, {1, 3, 5, 7, 6}, {1, 3, 5, 7, 2, 6}, {1, 3, 5, 7, 2, 8}, {1, 3, 5, 7, 2, 8}, {1, 3, 5, 7, 11, 12}, {1, 3, 5, 7, 11, 12}, {1, 3, 5, 7, 13, 14}}; @OriginalMember(owner = "client!fg", name = "j", descriptor = "[[I") - public static final int[][] anIntArrayArray13 = new int[][] { { 0, 1, 2, 3, 0, 0, 1, 3 }, { 1, 1, 2, 3, 1, 0, 1, 3 }, { 0, 1, 2, 3, 1, 0, 1, 3 }, { 0, 0, 1, 2, 0, 0, 2, 4, 1, 0, 4, 3 }, { 0, 0, 1, 4, 0, 0, 4, 3, 1, 1, 2, 4 }, { 0, 0, 4, 3, 1, 0, 1, 2, 1, 0, 2, 4 }, { 0, 1, 2, 4, 1, 0, 1, 4, 1, 0, 4, 3 }, { 0, 4, 1, 2, 0, 4, 2, 5, 1, 0, 4, 5, 1, 0, 5, 3 }, { 0, 4, 1, 2, 0, 4, 2, 3, 0, 4, 3, 5, 1, 0, 4, 5 }, { 0, 0, 4, 5, 1, 4, 1, 2, 1, 4, 2, 3, 1, 4, 3, 5 }, { 0, 0, 1, 5, 0, 1, 4, 5, 0, 1, 2, 4, 1, 0, 5, 3, 1, 5, 4, 3, 1, 4, 2, 3 }, { 1, 0, 1, 5, 1, 1, 4, 5, 1, 1, 2, 4, 0, 0, 5, 3, 0, 5, 4, 3, 0, 4, 2, 3 }, { 1, 0, 5, 4, 1, 0, 1, 5, 0, 0, 4, 3, 0, 4, 5, 3, 0, 5, 2, 3, 0, 1, 2, 5 } }; + public static final int[][] anIntArrayArray13 = new int[][]{{0, 1, 2, 3, 0, 0, 1, 3}, {1, 1, 2, 3, 1, 0, 1, 3}, {0, 1, 2, 3, 1, 0, 1, 3}, {0, 0, 1, 2, 0, 0, 2, 4, 1, 0, 4, 3}, {0, 0, 1, 4, 0, 0, 4, 3, 1, 1, 2, 4}, {0, 0, 4, 3, 1, 0, 1, 2, 1, 0, 2, 4}, {0, 1, 2, 4, 1, 0, 1, 4, 1, 0, 4, 3}, {0, 4, 1, 2, 0, 4, 2, 5, 1, 0, 4, 5, 1, 0, 5, 3}, {0, 4, 1, 2, 0, 4, 2, 3, 0, 4, 3, 5, 1, 0, 4, 5}, {0, 0, 4, 5, 1, 4, 1, 2, 1, 4, 2, 3, 1, 4, 3, 5}, {0, 0, 1, 5, 0, 1, 4, 5, 0, 1, 2, 4, 1, 0, 5, 3, 1, 5, 4, 3, 1, 4, 2, 3}, {1, 0, 1, 5, 1, 1, 4, 5, 1, 1, 2, 4, 0, 0, 5, 3, 0, 5, 4, 3, 0, 4, 2, 3}, {1, 0, 5, 4, 1, 0, 1, 5, 0, 0, 4, 3, 0, 4, 5, 3, 0, 5, 2, 3, 0, 1, 2, 5}}; @OriginalMember(owner = "client!fg", name = "s", descriptor = "Z") public boolean aBoolean113 = true; @@ -260,10 +260,8 @@ public final class ShapedTile { local146 = arg7; } if (arg8 < local144) { - ; } if (arg8 > local146) { - ; } } } diff --git a/client/src/main/java/rt4/SignLinkAudioChannel.java b/client/src/main/java/rt4/SignLinkAudioChannel.java index 8d7e9f8..e4d5583 100644 --- a/client/src/main/java/rt4/SignLinkAudioChannel.java +++ b/client/src/main/java/rt4/SignLinkAudioChannel.java @@ -1,10 +1,11 @@ package rt4; -import java.awt.Component; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.awt.Component; + @OriginalClass("client!hl") public final class SignLinkAudioChannel extends AudioChannel { diff --git a/client/src/main/java/rt4/SoftReferenceNode.java b/client/src/main/java/rt4/SoftReferenceNode.java index 24dfa61..8c2c175 100644 --- a/client/src/main/java/rt4/SoftReferenceNode.java +++ b/client/src/main/java/rt4/SoftReferenceNode.java @@ -1,10 +1,11 @@ package rt4; -import java.lang.ref.SoftReference; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.lang.ref.SoftReference; + @OriginalClass("client!qd") public final class SoftReferenceNode extends ReferenceNode { diff --git a/client/src/main/java/rt4/SoftwareFont.java b/client/src/main/java/rt4/SoftwareFont.java index 8a06e95..ad15b1f 100644 --- a/client/src/main/java/rt4/SoftwareFont.java +++ b/client/src/main/java/rt4/SoftwareFont.java @@ -126,7 +126,7 @@ public final class SoftwareFont extends Font { } } - @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IILclient!ve;Lclient!ve;I)Lclient!dd;") + @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IILclient!ve;Lclient!ve;I)Lclient!dd;") public static SoftwareFont method2412(@OriginalArg(0) int arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) Js5 arg2) { return SpriteLoader.decode(arg2, 0, arg0) ? method4635(arg1.fetchFile(arg0, 0)) : null; } diff --git a/client/src/main/java/rt4/SoftwareModel.java b/client/src/main/java/rt4/SoftwareModel.java index 0e48359..d8d5337 100644 --- a/client/src/main/java/rt4/SoftwareModel.java +++ b/client/src/main/java/rt4/SoftwareModel.java @@ -49,7 +49,7 @@ public final class SoftwareModel extends Model { @OriginalMember(owner = "client!w", name = "Wb", descriptor = "[I") public static final int[] anIntArray561 = new int[8192]; @OriginalMember(owner = "client!w", name = "vb", descriptor = "[[I") - public static int[][] anIntArrayArray43; + public static int[][] anIntArrayArray43; @OriginalMember(owner = "client!w", name = "Ob", descriptor = "Z") public static boolean aBoolean307 = false; @OriginalMember(owner = "client!w", name = "Lb", descriptor = "[I") @@ -243,7 +243,7 @@ public final class SoftwareModel extends Model { this.anIntArrayArray42 = arg0.boneTriangles; this.aShortArray90 = arg0.aShortArray22; this.aShortArray91 = arg0.vertexSources; - @Pc(102) int local102 = (int) Math.sqrt((double) (arg3 * arg3 + arg4 * arg4 + arg5 * arg5)); + @Pc(102) int local102 = (int) Math.sqrt(arg3 * arg3 + arg4 * arg4 + arg5 * arg5); @Pc(108) int local108 = arg2 * local102 >> 8; this.anIntArray533 = new int[this.triangleCount]; this.anIntArray523 = new int[this.triangleCount]; @@ -527,16 +527,16 @@ public final class SoftwareModel extends Model { anIntArrayArray43 = null; } - @OriginalMember(owner = "client!w", name = "o", descriptor = "()V") - public static void method4583() { - aBoolean307 = false; - anIntArray550 = null; - anIntArray549 = null; - anIntArray558 = new int[1600]; - anIntArrayArray44 = new int[1600][64]; - anIntArray552 = new int[32]; - anIntArrayArray43 = new int[32][512]; - } + @OriginalMember(owner = "client!w", name = "o", descriptor = "()V") + public static void method4583() { + aBoolean307 = false; + anIntArray550 = null; + anIntArray549 = null; + anIntArray558 = new int[1600]; + anIntArrayArray44 = new int[1600][64]; + anIntArray552 = new int[32]; + anIntArrayArray43 = new int[32][512]; + } @OriginalMember(owner = "client!w", name = "f", descriptor = "(I)I") public static int method4582(@OriginalArg(0) int arg0) { @@ -559,38 +559,38 @@ public final class SoftwareModel extends Model { return (arg0 & 0xFF80) + arg1; } - @OriginalMember(owner = "client!nj", name = "a", descriptor = "(IIZ[I[I)V") - public static void method3223(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int[] arg2, @OriginalArg(4) int[] arg3) { - if (arg0 >= arg1) { - return; - } - @Pc(22) int local22 = (arg1 + arg0) / 2; - @Pc(24) int local24 = arg0; - @Pc(28) int local28 = arg2[local22]; - arg2[local22] = arg2[arg1]; - arg2[arg1] = local28; - @Pc(42) int local42 = arg3[local22]; - arg3[local22] = arg3[arg1]; - arg3[arg1] = local42; - for (@Pc(54) int local54 = arg0; local54 < arg1; local54++) { - if (arg2[local54] > (local54 & 0x1) + local28) { - @Pc(79) int local79 = arg2[local54]; - arg2[local54] = arg2[local24]; - arg2[local24] = local79; - @Pc(93) int local93 = arg3[local54]; - arg3[local54] = arg3[local24]; - arg3[local24++] = local93; - } - } - arg2[arg1] = arg2[local24]; - arg2[local24] = local28; - arg3[arg1] = arg3[local24]; - arg3[local24] = local42; - method3223(arg0, local24 - 1, arg2, arg3); - method3223(local24 + 1, arg1, arg2, arg3); - } + @OriginalMember(owner = "client!nj", name = "a", descriptor = "(IIZ[I[I)V") + public static void method3223(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int[] arg2, @OriginalArg(4) int[] arg3) { + if (arg0 >= arg1) { + return; + } + @Pc(22) int local22 = (arg1 + arg0) / 2; + @Pc(24) int local24 = arg0; + @Pc(28) int local28 = arg2[local22]; + arg2[local22] = arg2[arg1]; + arg2[arg1] = local28; + @Pc(42) int local42 = arg3[local22]; + arg3[local22] = arg3[arg1]; + arg3[arg1] = local42; + for (@Pc(54) int local54 = arg0; local54 < arg1; local54++) { + if (arg2[local54] > (local54 & 0x1) + local28) { + @Pc(79) int local79 = arg2[local54]; + arg2[local54] = arg2[local24]; + arg2[local24] = local79; + @Pc(93) int local93 = arg3[local54]; + arg3[local54] = arg3[local24]; + arg3[local24++] = local93; + } + } + arg2[arg1] = arg2[local24]; + arg2[local24] = local28; + arg3[arg1] = arg3[local24]; + arg3[local24] = local42; + method3223(arg0, local24 - 1, arg2, arg3); + method3223(local24 + 1, arg1, arg2, arg3); + } - @OriginalMember(owner = "client!w", name = "e", descriptor = "(I)V") + @OriginalMember(owner = "client!w", name = "e", descriptor = "(I)V") private void method4579(@OriginalArg(0) int arg0) { if (aBooleanArray132[arg0]) { this.method4587(arg0); @@ -853,9 +853,9 @@ public final class SoftwareModel extends Model { local208 = -999999; local223 = 999999; local227 = -999999; - @Pc(299) int[] local299 = new int[] { this.minX, this.maxX, this.minX, this.maxX, this.minX, this.maxX, this.minX, this.maxX}; - @Pc(342) int[] local342 = new int[] { this.minZ, this.minZ, this.maxZ, this.maxZ, this.minZ, this.minZ, this.maxZ, this.maxZ}; - @Pc(385) int[] local385 = new int[] { this.minY, this.minY, this.minY, this.minY, this.maxY, this.maxY, this.maxY, this.maxY}; + @Pc(299) int[] local299 = new int[]{this.minX, this.maxX, this.minX, this.maxX, this.minX, this.maxX, this.minX, this.maxX}; + @Pc(342) int[] local342 = new int[]{this.minZ, this.minZ, this.maxZ, this.maxZ, this.minZ, this.minZ, this.maxZ, this.maxZ}; + @Pc(385) int[] local385 = new int[]{this.minY, this.minY, this.minY, this.minY, this.maxY, this.maxY, this.maxY, this.maxY}; for (@Pc(387) int local387 = 0; local387 < 8; local387++) { @Pc(394) int local394 = local299[local387]; @Pc(398) int local398 = local385[local387]; @@ -1356,7 +1356,7 @@ public final class SoftwareModel extends Model { @OriginalMember(owner = "client!w", name = "a", descriptor = "(Lclient!ak;)Lclient!ak;") public final Model method4588(@OriginalArg(0) Model arg0) { - return new SoftwareModel(new SoftwareModel[] { this, (SoftwareModel) arg0 }, 2); + return new SoftwareModel(new SoftwareModel[]{this, (SoftwareModel) arg0}, 2); } @OriginalMember(owner = "client!w", name = "g", descriptor = "()I") @@ -1664,11 +1664,7 @@ public final class SoftwareModel extends Model { } if ((local65 - local69) * (anIntArray551[local61] - anIntArray551[local56]) - (anIntArray551[local51] - anIntArray551[local56]) * (local73 - local69) > 0) { aBooleanArray132[local11] = false; - if (local65 >= 0 && local69 >= 0 && local73 >= 0 && local65 <= Rasteriser.width && local69 <= Rasteriser.width && local73 <= Rasteriser.width) { - aBooleanArray133[local11] = false; - } else { - aBooleanArray133[local11] = true; - } + aBooleanArray133[local11] = local65 < 0 || local69 < 0 || local73 < 0 || local65 > Rasteriser.width || local69 > Rasteriser.width || local73 > Rasteriser.width; if (aBoolean307) { anIntArray550[local5] = (anIntArray543[local51] + anIntArray543[local56] + anIntArray543[local61]) / 3; anIntArray549[local5++] = local11; @@ -2002,8 +1998,8 @@ public final class SoftwareModel extends Model { this.maxY = (short) local9; this.minZ = (short) local5; this.maxZ = (short) local11; - this.aShort34 = (short) (Math.sqrt((double) local13) + 0.99D); - this.aShort35 = (short) (Math.sqrt((double) local15) + 0.99D); + this.aShort34 = (short) (Math.sqrt(local13) + 0.99D); + this.aShort35 = (short) (Math.sqrt(local15) + 0.99D); this.boundsValid = true; } @@ -2292,7 +2288,7 @@ public final class SoftwareModel extends Model { local410 = local392 + anInt5793; local418 = local398 + anInt5791; local426 = local404 + anInt5792; - @Pc(1481) int[] local1481 = new int[] { local307 * arg7[0] + 16384 >> 15, local307 * arg7[3] + 16384 >> 15, local307 * arg7[6] + 16384 >> 15, local329 * arg7[1] + 16384 >> 15, local329 * arg7[4] + 16384 >> 15, local329 * arg7[7] + 16384 >> 15, local351 * arg7[2] + 16384 >> 15, local351 * arg7[5] + 16384 >> 15, local351 * arg7[8] + 16384 >> 15 }; + @Pc(1481) int[] local1481 = new int[]{local307 * arg7[0] + 16384 >> 15, local307 * arg7[3] + 16384 >> 15, local307 * arg7[6] + 16384 >> 15, local329 * arg7[1] + 16384 >> 15, local329 * arg7[4] + 16384 >> 15, local329 * arg7[7] + 16384 >> 15, local351 * arg7[2] + 16384 >> 15, local351 * arg7[5] + 16384 >> 15, local351 * arg7[8] + 16384 >> 15}; local579 = local307 * local206 + 16384 >> 15; local604 = local329 * local33 + 16384 >> 15; local608 = local351 * local41 + 16384 >> 15; diff --git a/client/src/main/java/rt4/SoftwareRaster.java b/client/src/main/java/rt4/SoftwareRaster.java index 996ffae..073c6eb 100644 --- a/client/src/main/java/rt4/SoftwareRaster.java +++ b/client/src/main/java/rt4/SoftwareRaster.java @@ -33,10 +33,10 @@ public final class SoftwareRaster { @OriginalMember(owner = "client!kb", name = "h", descriptor = "I") public static int clipBottom = 0; - @OriginalMember(owner = "client!vd", name = "w", descriptor = "Lclient!vk;") - public static FrameBuffer frameBuffer; + @OriginalMember(owner = "client!vd", name = "w", descriptor = "Lclient!vk;") + public static FrameBuffer frameBuffer; - @OriginalMember(owner = "client!kb", name = "a", descriptor = "()V") + @OriginalMember(owner = "client!kb", name = "a", descriptor = "()V") public static void method2482() { anIntArray295 = null; anIntArray296 = null; diff --git a/client/src/main/java/rt4/SoftwareSprite.java b/client/src/main/java/rt4/SoftwareSprite.java index 60dad86..b52b428 100644 --- a/client/src/main/java/rt4/SoftwareSprite.java +++ b/client/src/main/java/rt4/SoftwareSprite.java @@ -202,10 +202,10 @@ public class SoftwareSprite extends Sprite { } } - @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lclient!ve;IIB)Lclient!mm;") - public static SoftwareSprite loadSoftwareAlphaSprite(@OriginalArg(0) Js5 arg0, @OriginalArg(2) int arg1) { - return SpriteLoader.decode(arg0, 0, arg1) ? method2071() : null; - } + @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Lclient!ve;IIB)Lclient!mm;") + public static SoftwareSprite loadSoftwareAlphaSprite(@OriginalArg(0) Js5 arg0, @OriginalArg(2) int arg1) { + return SpriteLoader.decode(arg0, 0, arg1) ? method2071() : null; + } @OriginalMember(owner = "client!hn", name = "d", descriptor = "(I)Lclient!mm;") public static SoftwareSprite method2071() { diff --git a/client/src/main/java/rt4/Song.java b/client/src/main/java/rt4/Song.java index 3ede953..b04ac29 100644 --- a/client/src/main/java/rt4/Song.java +++ b/client/src/main/java/rt4/Song.java @@ -178,7 +178,8 @@ public final class Song extends Node { @Pc(542) int local542 = 0; @Pc(545) int[] values = new int[128]; controller = 0; - track: for (@Pc(549) int local549 = 0; local549 < tracks; local549++) { + track: + for (@Pc(549) int local549 = 0; local549 < tracks; local549++) { out.p4(1297379947); out.offset += 4; @Pc(565) int local565 = out.offset; @@ -299,13 +300,13 @@ public final class Song extends Node { } } - @OriginalMember(owner = "client!rf", name = "a", descriptor = "(Lclient!ve;II)Lclient!rf;") - public static Song create(@OriginalArg(0) Js5 archive, @OriginalArg(1) int group, @OriginalArg(2) int file) { - @Pc(5) byte[] bytes = archive.fetchFile(group, file); - return bytes == null ? null : new Song(new Buffer(bytes)); - } + @OriginalMember(owner = "client!rf", name = "a", descriptor = "(Lclient!ve;II)Lclient!rf;") + public static Song create(@OriginalArg(0) Js5 archive, @OriginalArg(1) int group, @OriginalArg(2) int file) { + @Pc(5) byte[] bytes = archive.fetchFile(group, file); + return bytes == null ? null : new Song(new Buffer(bytes)); + } - @OriginalMember(owner = "client!rf", name = "a", descriptor = "()V") + @OriginalMember(owner = "client!rf", name = "a", descriptor = "()V") public final void releasePrograms() { this.programs = null; } @@ -327,7 +328,8 @@ public final class Song extends Node { song.addDeltaTime(track); song.saveTrackPosition(track); } - label53: do { + label53: + do { while (true) { track = song.getNextTrack(); @Pc(56) int local56 = song.times[track]; @@ -365,10 +367,10 @@ public final class Song extends Node { local104 = event >> 16 & 0x7F; if (local104 > 0) { @Pc(179) int program = programs[controller]; - @Pc(187) ByteArrayNode node = (ByteArrayNode) this.programs.get((long) program); + @Pc(187) ByteArrayNode node = (ByteArrayNode) this.programs.get(program); if (node == null) { node = new ByteArrayNode(new byte[128]); - this.programs.put(node, (long) program); + this.programs.put(node, program); } node.value[local98] = 1; } diff --git a/client/src/main/java/rt4/SoundPcmStream.java b/client/src/main/java/rt4/SoundPcmStream.java index 9e00772..6a8fc91 100644 --- a/client/src/main/java/rt4/SoundPcmStream.java +++ b/client/src/main/java/rt4/SoundPcmStream.java @@ -79,10 +79,10 @@ public final class SoundPcmStream extends PcmStream { this.method416(); } - @OriginalMember(owner = "client!b", name = "a", descriptor = "(Lclient!kj;II)Lclient!b;") - public static SoundPcmStream create(@OriginalArg(0) PcmSound sound, @OriginalArg(2) int volume) { - return sound.samples == null || sound.samples.length == 0 ? null : new SoundPcmStream(sound, (int) ((long) sound.rate * 256L * (long) 100 / (AudioChannel.sampleRate * 100L)), volume << 6); - } + @OriginalMember(owner = "client!b", name = "a", descriptor = "(Lclient!kj;II)Lclient!b;") + public static SoundPcmStream create(@OriginalArg(0) PcmSound sound, @OriginalArg(2) int volume) { + return sound.samples == null || sound.samples.length == 0 ? null : new SoundPcmStream(sound, (int) ((long) sound.rate * 256L * (long) 100 / (AudioChannel.sampleRate * 100L)), volume << 6); + } @OriginalMember(owner = "client!b", name = "a", descriptor = "(I[B[IIIIIIIILclient!b;)I") public static int method387(@OriginalArg(1) byte[] arg0, @OriginalArg(2) int[] arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(8) int arg6, @OriginalArg(9) int arg7, @OriginalArg(10) SoundPcmStream arg8) { @@ -855,7 +855,8 @@ public final class SoundPcmStream extends PcmStream { if (this.anInt350 >= 0) { if (this.anInt350 > 0) { if (this.aBoolean14) { - label131: { + label131: + { if (this.anInt342 < 0) { local40 = this.method403(arg0, arg1, local18, local44, local13.samples[this.start]); if (this.anInt346 >= local18) { @@ -1195,7 +1196,8 @@ public final class SoundPcmStream extends PcmStream { if (this.anInt350 >= 0) { if (this.anInt350 > 0) { if (this.aBoolean14) { - label121: { + label121: + { if (this.anInt342 < 0) { if (this.anInt346 >= local76) { return; @@ -1223,7 +1225,8 @@ public final class SoundPcmStream extends PcmStream { } while (--this.anInt350 != 0); } } else { - label153: { + label153: + { @Pc(362) int local362; if (this.anInt342 < 0) { if (this.anInt346 >= local76) { diff --git a/client/src/main/java/rt4/SoundPlayer.java b/client/src/main/java/rt4/SoundPlayer.java index 52ef64e..e61a2f6 100644 --- a/client/src/main/java/rt4/SoundPlayer.java +++ b/client/src/main/java/rt4/SoundPlayer.java @@ -5,132 +5,132 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class SoundPlayer { - @OriginalMember(owner = "client!qe", name = "t", descriptor = "[I") + @OriginalMember(owner = "client!qe", name = "t", descriptor = "[I") public static final int[] ids = new int[50]; - @OriginalMember(owner = "client!wh", name = "g", descriptor = "[I") - public static final int[] loops = new int[50]; - @OriginalMember(owner = "client!na", name = "mb", descriptor = "[I") - public static final int[] delays = new int[50]; - @OriginalMember(owner = "client!nk", name = "n", descriptor = "[Lclient!sl;") - public static final SynthSound[] sounds = new SynthSound[50]; - @OriginalMember(owner = "client!ca", name = "fb", descriptor = "[I") - public static final int[] positions = new int[50]; - @OriginalMember(owner = "client!pe", name = "j", descriptor = "I") - public static int size = 0; + @OriginalMember(owner = "client!wh", name = "g", descriptor = "[I") + public static final int[] loops = new int[50]; + @OriginalMember(owner = "client!na", name = "mb", descriptor = "[I") + public static final int[] delays = new int[50]; + @OriginalMember(owner = "client!nk", name = "n", descriptor = "[Lclient!sl;") + public static final SynthSound[] sounds = new SynthSound[50]; + @OriginalMember(owner = "client!ca", name = "fb", descriptor = "[I") + public static final int[] positions = new int[50]; + @OriginalMember(owner = "client!pe", name = "j", descriptor = "I") + public static int size = 0; - @OriginalMember(owner = "client!ma", name = "a", descriptor = "(ILclient!tk;IIZI)V") - public static void playSeqSound(@OriginalArg(0) int zFine, @OriginalArg(1) SeqType seqType, @OriginalArg(3) int xFine, @OriginalArg(4) boolean self, @OriginalArg(5) int index) { - if (size >= 50 || (seqType.sounds == null || index >= seqType.sounds.length || seqType.sounds[index] == null)) { - return; - } - @Pc(36) int sound = seqType.sounds[index][0]; - @Pc(40) int id = sound >> 8; - if (seqType.sounds[index].length > 1) { - int alternativeIdIndex = (int) ((double) seqType.sounds[index].length * Math.random()); - if (alternativeIdIndex > 0) { - id = seqType.sounds[index][alternativeIdIndex]; - } - } - @Pc(73) int loops = sound >> 5 & 0x7; - @Pc(77) int minDistance = sound & 0x1F; - if (minDistance == 0) { - if (self) { - play(loops, id, 0); - } - } else if (Preferences.ambientSoundsVolume != 0) { - ids[size] = id; - SoundPlayer.loops[size] = loops; - @Pc(111) int z = (zFine - 64) / 128; - int x = (xFine - 64) / 128; - delays[size] = 0; - sounds[size] = null; - positions[size] = minDistance + (x << 16) + (z << 8); - size++; - } - } + @OriginalMember(owner = "client!ma", name = "a", descriptor = "(ILclient!tk;IIZI)V") + public static void playSeqSound(@OriginalArg(0) int zFine, @OriginalArg(1) SeqType seqType, @OriginalArg(3) int xFine, @OriginalArg(4) boolean self, @OriginalArg(5) int index) { + if (size >= 50 || (seqType.sounds == null || index >= seqType.sounds.length || seqType.sounds[index] == null)) { + return; + } + @Pc(36) int sound = seqType.sounds[index][0]; + @Pc(40) int id = sound >> 8; + if (seqType.sounds[index].length > 1) { + int alternativeIdIndex = (int) ((double) seqType.sounds[index].length * Math.random()); + if (alternativeIdIndex > 0) { + id = seqType.sounds[index][alternativeIdIndex]; + } + } + @Pc(73) int loops = sound >> 5 & 0x7; + @Pc(77) int minDistance = sound & 0x1F; + if (minDistance == 0) { + if (self) { + play(loops, id, 0); + } + } else if (Preferences.ambientSoundsVolume != 0) { + ids[size] = id; + SoundPlayer.loops[size] = loops; + @Pc(111) int z = (zFine - 64) / 128; + int x = (xFine - 64) / 128; + delays[size] = 0; + sounds[size] = null; + positions[size] = minDistance + (x << 16) + (z << 8); + size++; + } + } - @OriginalMember(owner = "client!ca", name = "a", descriptor = "(IIII)V") - public static void play(@OriginalArg(0) int loops, @OriginalArg(1) int id, @OriginalArg(2) int delay) { - if (Preferences.soundEffectVolume == 0 || loops == 0 || size >= 50 || id == -1) { - return; - } - ids[size] = id; - SoundPlayer.loops[size] = loops; - delays[size] = delay; - sounds[size] = null; - positions[size] = 0; - size++; - } + @OriginalMember(owner = "client!ca", name = "a", descriptor = "(IIII)V") + public static void play(@OriginalArg(0) int loops, @OriginalArg(1) int id, @OriginalArg(2) int delay) { + if (Preferences.soundEffectVolume == 0 || loops == 0 || size >= 50 || id == -1) { + return; + } + ids[size] = id; + SoundPlayer.loops[size] = loops; + delays[size] = delay; + sounds[size] = null; + positions[size] = 0; + size++; + } - @OriginalMember(owner = "client!ed", name = "d", descriptor = "(B)V") - public static void loop() { - for (@Pc(5) int i = 0; i < size; i++) { - @Pc(12) int local12 = delays[i]--; - if (delays[i] >= -10) { - @Pc(79) SynthSound sound = sounds[i]; - if (sound == null) { - sound = SynthSound.create(client.js5Archive4, ids[i], 0); - if (sound == null) { - continue; - } - delays[i] += sound.getStart(); - sounds[i] = sound; - } - if (delays[i] < 0) { - @Pc(209) int volume; - if (positions[i] == 0) { - volume = Preferences.soundEffectVolume; - } else { - @Pc(125) int minDistance = (positions[i] & 0xFF) * 128; - @Pc(133) int z = positions[i] >> 8 & 0xFF; - @Pc(141) int x = positions[i] >> 16 & 0xFF; - @Pc(151) int zFine = z * 128 + 64 - PlayerList.self.zFine; - if (zFine < 0) { - zFine = -zFine; - } - @Pc(167) int xFine = x * 128 + 64 - PlayerList.self.xFine; - if (xFine < 0) { - xFine = -xFine; - } - @Pc(180) int distance = xFine + zFine - 128; - if (minDistance < distance) { - delays[i] = -100; - continue; - } - if (distance < 0) { - distance = 0; - } - volume = Preferences.ambientSoundsVolume * (minDistance - distance) / minDistance; - } - if (volume > 0) { - @Pc(223) PcmSound pcmSound = sound.toPcmSound().resample(client.resampler); - @Pc(228) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); - stream.setLoops(loops[i] - 1); - client.soundStream.addSubStream(stream); - } - delays[i] = -100; - } - } else { - size--; - for (@Pc(28) int j = i; j < size; j++) { - ids[j] = ids[j + 1]; - sounds[j] = sounds[j + 1]; - loops[j] = loops[j + 1]; - delays[j] = delays[j + 1]; - positions[j] = positions[j + 1]; - } - i--; - } - } - if (MidiPlayer.jingle && !MidiPlayer.isPlaying()) { - if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1) { - MidiPlayer.playImmediate(client.js5Archive6, MusicPlayer.groupId, Preferences.musicVolume); - } - MidiPlayer.jingle = false; - } else if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1 && !MidiPlayer.isPlaying()) { - Protocol.outboundBuffer.p1isaac(137); - Protocol.outboundBuffer.p4(MusicPlayer.groupId); - MusicPlayer.groupId = -1; - } - } + @OriginalMember(owner = "client!ed", name = "d", descriptor = "(B)V") + public static void loop() { + for (@Pc(5) int i = 0; i < size; i++) { + @Pc(12) int local12 = delays[i]--; + if (delays[i] >= -10) { + @Pc(79) SynthSound sound = sounds[i]; + if (sound == null) { + sound = SynthSound.create(client.js5Archive4, ids[i], 0); + if (sound == null) { + continue; + } + delays[i] += sound.getStart(); + sounds[i] = sound; + } + if (delays[i] < 0) { + @Pc(209) int volume; + if (positions[i] == 0) { + volume = Preferences.soundEffectVolume; + } else { + @Pc(125) int minDistance = (positions[i] & 0xFF) * 128; + @Pc(133) int z = positions[i] >> 8 & 0xFF; + @Pc(141) int x = positions[i] >> 16 & 0xFF; + @Pc(151) int zFine = z * 128 + 64 - PlayerList.self.zFine; + if (zFine < 0) { + zFine = -zFine; + } + @Pc(167) int xFine = x * 128 + 64 - PlayerList.self.xFine; + if (xFine < 0) { + xFine = -xFine; + } + @Pc(180) int distance = xFine + zFine - 128; + if (minDistance < distance) { + delays[i] = -100; + continue; + } + if (distance < 0) { + distance = 0; + } + volume = Preferences.ambientSoundsVolume * (minDistance - distance) / minDistance; + } + if (volume > 0) { + @Pc(223) PcmSound pcmSound = sound.toPcmSound().resample(client.resampler); + @Pc(228) SoundPcmStream stream = SoundPcmStream.create(pcmSound, volume); + stream.setLoops(loops[i] - 1); + client.soundStream.addSubStream(stream); + } + delays[i] = -100; + } + } else { + size--; + for (@Pc(28) int j = i; j < size; j++) { + ids[j] = ids[j + 1]; + sounds[j] = sounds[j + 1]; + loops[j] = loops[j + 1]; + delays[j] = delays[j + 1]; + positions[j] = positions[j + 1]; + } + i--; + } + } + if (MidiPlayer.jingle && !MidiPlayer.isPlaying()) { + if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1) { + MidiPlayer.playImmediate(client.js5Archive6, MusicPlayer.groupId, Preferences.musicVolume); + } + MidiPlayer.jingle = false; + } else if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1 && !MidiPlayer.isPlaying()) { + Protocol.outboundBuffer.p1isaac(137); + Protocol.outboundBuffer.p4(MusicPlayer.groupId); + MusicPlayer.groupId = -1; + } + } } diff --git a/client/src/main/java/rt4/SpecularMaterialRenderer.java b/client/src/main/java/rt4/SpecularMaterialRenderer.java index deac5ca..2443c17 100644 --- a/client/src/main/java/rt4/SpecularMaterialRenderer.java +++ b/client/src/main/java/rt4/SpecularMaterialRenderer.java @@ -1,12 +1,13 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!vm") public final class SpecularMaterialRenderer implements MaterialRenderer { @@ -180,7 +181,7 @@ public final class SpecularMaterialRenderer implements MaterialRenderer { for (@Pc(39) int local39 = 0; local39 < 64; local39++) { @Pc(51) float local51 = (float) local39 * 2.0F / 64.0F - 1.0F; @Pc(60) float local60 = (float) local34 * 2.0F / 64.0F - 1.0F; - @Pc(75) float local75 = (float) (1.0D / Math.sqrt((double) (local51 * local51 + local60 * local60 + 1.0F))); + @Pc(75) float local75 = (float) (1.0D / Math.sqrt(local51 * local51 + local60 * local60 + 1.0F)); @Pc(79) float local79 = local51 * local75; @Pc(83) float local83 = local60 * local75; @Pc(88) float local88; @@ -201,9 +202,9 @@ public final class SpecularMaterialRenderer implements MaterialRenderer { @Pc(137) int local137; @Pc(145) int local145; if (local88 > 0.0F) { - local129 = (int) (Math.pow((double) local88, 96.0D) * 255.0D); - local137 = (int) (Math.pow((double) local88, 36.0D) * 255.0D); - local145 = (int) (Math.pow((double) local88, 12.0D) * 255.0D); + local129 = (int) (Math.pow(local88, 96.0D) * 255.0D); + local137 = (int) (Math.pow(local88, 36.0D) * 255.0D); + local145 = (int) (Math.pow(local88, 12.0D) * 255.0D); } else { local145 = 0; local137 = 0; diff --git a/client/src/main/java/rt4/SpotAnim.java b/client/src/main/java/rt4/SpotAnim.java index eecbc58..011a345 100644 --- a/client/src/main/java/rt4/SpotAnim.java +++ b/client/src/main/java/rt4/SpotAnim.java @@ -73,7 +73,7 @@ public final class SpotAnim extends Entity { } else { local26 = local8.constructModel(this.anInt602, this.anInt593, this.anInt607); } - return local26 == null ? null : local26; + return local26; } @OriginalMember(owner = "client!bh", name = "b", descriptor = "()I") diff --git a/client/src/main/java/rt4/SpotAnimType.java b/client/src/main/java/rt4/SpotAnimType.java index 887c642..617cb27 100644 --- a/client/src/main/java/rt4/SpotAnimType.java +++ b/client/src/main/java/rt4/SpotAnimType.java @@ -101,7 +101,7 @@ public final class SpotAnimType { @OriginalMember(owner = "client!eg", name = "a", descriptor = "(IBII)Lclient!ak;") public final Model constructModel(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(13) Model local13 = (Model) SpotAnimTypeList.models.get((long) this.id); + @Pc(13) Model local13 = (Model) SpotAnimTypeList.models.get(this.id); if (local13 == null) { @Pc(28) RawModel local28 = RawModel.create(SpotAnimTypeList.modelsArchive, this.modelId); if (local28 == null) { @@ -119,7 +119,7 @@ public final class SpotAnimType { } } local13 = local28.createModel(this.anInt1749 + 64, this.anInt1748 + 850, -30, -50, -30); - SpotAnimTypeList.models.put(local13, (long) this.id); + SpotAnimTypeList.models.put(local13, this.id); } @Pc(118) Model local118; if (this.seqId == -1 || arg1 == -1) { diff --git a/client/src/main/java/rt4/SpotAnimTypeList.java b/client/src/main/java/rt4/SpotAnimTypeList.java index 82b7edb..a3a53e9 100644 --- a/client/src/main/java/rt4/SpotAnimTypeList.java +++ b/client/src/main/java/rt4/SpotAnimTypeList.java @@ -22,7 +22,7 @@ public class SpotAnimTypeList { @OriginalMember(owner = "client!ck", name = "a", descriptor = "(BI)Lclient!eg;") public static SpotAnimType get(@OriginalArg(1) int arg0) { - @Pc(10) SpotAnimType local10 = (SpotAnimType) types.get((long) arg0); + @Pc(10) SpotAnimType local10 = (SpotAnimType) types.get(arg0); if (local10 != null) { return local10; } @@ -32,7 +32,7 @@ public class SpotAnimTypeList { if (local26 != null) { local10.decode(new Buffer(local26)); } - types.put(local10, (long) arg0); + types.put(local10, arg0); return local10; } diff --git a/client/src/main/java/rt4/SpriteLoader.java b/client/src/main/java/rt4/SpriteLoader.java index 59dd63a..99b31c6 100644 --- a/client/src/main/java/rt4/SpriteLoader.java +++ b/client/src/main/java/rt4/SpriteLoader.java @@ -5,343 +5,344 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class SpriteLoader { - @OriginalMember(owner = "client!uj", name = "x", descriptor = "[I") - public static int[] innerWidths; - @OriginalMember(owner = "client!wa", name = "z", descriptor = "[I") - public static int[] yOffsets; - @OriginalMember(owner = "client!ca", name = "Y", descriptor = "[I") - public static int[] innerHeights; - @OriginalMember(owner = "client!ah", name = "l", descriptor = "[[B") - public static byte[][] pixels; - @OriginalMember(owner = "client!wf", name = "b", descriptor = "[I") - public static int[] xOffsets; - @OriginalMember(owner = "client!vc", name = "R", descriptor = "[I") - public static int[] palette; - @OriginalMember(owner = "client!nb", name = "h", descriptor = "I") - public static int frames; - @OriginalMember(owner = "client!fb", name = "n", descriptor = "[[B") - public static byte[][] alpha; - @OriginalMember(owner = "client!mi", name = "W", descriptor = "[Z") - public static boolean[] hasAlpha; - @OriginalMember(owner = "client!jk", name = "x", descriptor = "I") - public static int width; - @OriginalMember(owner = "client!sg", name = "h", descriptor = "I") - public static int height; + @OriginalMember(owner = "client!uj", name = "x", descriptor = "[I") + public static int[] innerWidths; + @OriginalMember(owner = "client!wa", name = "z", descriptor = "[I") + public static int[] yOffsets; + @OriginalMember(owner = "client!ca", name = "Y", descriptor = "[I") + public static int[] innerHeights; + @OriginalMember(owner = "client!ah", name = "l", descriptor = "[[B") + public static byte[][] pixels; + @OriginalMember(owner = "client!wf", name = "b", descriptor = "[I") + public static int[] xOffsets; + @OriginalMember(owner = "client!vc", name = "R", descriptor = "[I") + public static int[] palette; + @OriginalMember(owner = "client!nb", name = "h", descriptor = "I") + public static int frames; + @OriginalMember(owner = "client!fb", name = "n", descriptor = "[[B") + public static byte[][] alpha; + @OriginalMember(owner = "client!mi", name = "W", descriptor = "[Z") + public static boolean[] hasAlpha; + @OriginalMember(owner = "client!jk", name = "x", descriptor = "I") + public static int width; + @OriginalMember(owner = "client!sg", name = "h", descriptor = "I") + public static int height; - @OriginalMember(owner = "client!cg", name = "a", descriptor = "(ZILclient!ve;I)[Lclient!ek;") - static SoftwareIndexedSprite[] loadSoftwareIndexedSprites(@OriginalArg(1) int arg0, @OriginalArg(2) Js5 arg1) { - return decode(arg1, 0, arg0) ? createSoftwareIndexedSprites() : null; - } + @OriginalMember(owner = "client!cg", name = "a", descriptor = "(ZILclient!ve;I)[Lclient!ek;") + static SoftwareIndexedSprite[] loadSoftwareIndexedSprites(@OriginalArg(1) int arg0, @OriginalArg(2) Js5 arg1) { + return decode(arg1, 0, arg0) ? createSoftwareIndexedSprites() : null; + } - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(Lclient!ve;III)Z") - public static boolean decode(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(9) byte[] local9 = arg0.fetchFile(arg2, arg1); - if (local9 == null) { - return false; - } else { - decode(local9); - return true; - } - } + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(Lclient!ve;III)Z") + public static boolean decode(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(9) byte[] local9 = arg0.fetchFile(arg2, arg1); + if (local9 == null) { + return false; + } else { + decode(local9); + return true; + } + } - @OriginalMember(owner = "client!jg", name = "a", descriptor = "(I)[Lclient!ek;") - public static SoftwareIndexedSprite[] createSoftwareIndexedSprites() { - @Pc(2) SoftwareIndexedSprite[] sprites = new SoftwareIndexedSprite[frames]; - for (@Pc(8) int local8 = 0; local8 < frames; local8++) { - sprites[local8] = new SoftwareIndexedSprite(width, height, xOffsets[local8], yOffsets[local8], innerWidths[local8], innerHeights[local8], pixels[local8], palette); - } - clear(); - return sprites; - } + @OriginalMember(owner = "client!jg", name = "a", descriptor = "(I)[Lclient!ek;") + public static SoftwareIndexedSprite[] createSoftwareIndexedSprites() { + @Pc(2) SoftwareIndexedSprite[] sprites = new SoftwareIndexedSprite[frames]; + for (@Pc(8) int local8 = 0; local8 < frames; local8++) { + sprites[local8] = new SoftwareIndexedSprite(width, height, xOffsets[local8], yOffsets[local8], innerWidths[local8], innerHeights[local8], pixels[local8], palette); + } + clear(); + return sprites; + } - @OriginalMember(owner = "client!gk", name = "a", descriptor = "([BI)V") - public static void decode(@OriginalArg(0) byte[] arg0) { - @Pc(4) Buffer buffer = new Buffer(arg0); - buffer.offset = arg0.length - 2; - frames = buffer.g2(); - innerHeights = new int[frames]; - innerWidths = new int[frames]; - xOffsets = new int[frames]; - hasAlpha = new boolean[frames]; - alpha = new byte[frames][]; - yOffsets = new int[frames]; - pixels = new byte[frames][]; - buffer.offset = arg0.length - frames * 8 - 7; - width = buffer.g2(); - height = buffer.g2(); - @Pc(66) int paletteSize = (buffer.g1() & 0xFF) + 1; - @Pc(68) int i; - for (i = 0; i < frames; i++) { - xOffsets[i] = buffer.g2(); - } - for (i = 0; i < frames; i++) { - yOffsets[i] = buffer.g2(); - } - for (i = 0; i < frames; i++) { - innerWidths[i] = buffer.g2(); - } - for (i = 0; i < frames; i++) { - innerHeights[i] = buffer.g2(); - } - buffer.offset = arg0.length + 3 - frames * 8 - paletteSize * 3 - 7; - palette = new int[paletteSize]; - for (i = 1; i < paletteSize; i++) { - palette[i] = buffer.g3(); - if (palette[i] == 0) { - palette[i] = 1; - } - } - buffer.offset = 0; - for (i = 0; i < frames; i++) { - @Pc(195) int local195 = innerWidths[i]; - @Pc(199) int local199 = innerHeights[i]; - @Pc(203) int local203 = local195 * local199; - @Pc(206) byte[] local206 = new byte[local203]; - @Pc(208) boolean local208 = false; - pixels[i] = local206; - @Pc(215) byte[] local215 = new byte[local203]; - alpha[i] = local215; - @Pc(223) int local223 = buffer.g1(); - @Pc(232) int local232; - if ((local223 & 0x1) == 0) { - for (local232 = 0; local232 < local203; local232++) { - local206[local232] = buffer.g1b(); - } - if ((local223 & 0x2) != 0) { - for (local232 = 0; local232 < local203; local232++) { - @Pc(343) byte local343 = local215[local232] = buffer.g1b(); - local208 |= local343 != -1; - } - } - } else { - local232 = 0; - label88: while (true) { - @Pc(241) int local241; - if (local232 >= local195) { - if ((local223 & 0x2) == 0) { - break; - } - local232 = 0; - while (true) { - if (local232 >= local195) { - break label88; - } - for (local241 = 0; local241 < local199; local241++) { - @Pc(291) byte local291 = local215[local195 * local241 + local232] = buffer.g1b(); - local208 |= local291 != -1; - } - local232++; - } - } - for (local241 = 0; local241 < local199; local241++) { - local206[local232 + local241 * local195] = buffer.g1b(); - } - local232++; - } - } - hasAlpha[i] = local208; - } - } + @OriginalMember(owner = "client!gk", name = "a", descriptor = "([BI)V") + public static void decode(@OriginalArg(0) byte[] arg0) { + @Pc(4) Buffer buffer = new Buffer(arg0); + buffer.offset = arg0.length - 2; + frames = buffer.g2(); + innerHeights = new int[frames]; + innerWidths = new int[frames]; + xOffsets = new int[frames]; + hasAlpha = new boolean[frames]; + alpha = new byte[frames][]; + yOffsets = new int[frames]; + pixels = new byte[frames][]; + buffer.offset = arg0.length - frames * 8 - 7; + width = buffer.g2(); + height = buffer.g2(); + @Pc(66) int paletteSize = (buffer.g1() & 0xFF) + 1; + @Pc(68) int i; + for (i = 0; i < frames; i++) { + xOffsets[i] = buffer.g2(); + } + for (i = 0; i < frames; i++) { + yOffsets[i] = buffer.g2(); + } + for (i = 0; i < frames; i++) { + innerWidths[i] = buffer.g2(); + } + for (i = 0; i < frames; i++) { + innerHeights[i] = buffer.g2(); + } + buffer.offset = arg0.length + 3 - frames * 8 - paletteSize * 3 - 7; + palette = new int[paletteSize]; + for (i = 1; i < paletteSize; i++) { + palette[i] = buffer.g3(); + if (palette[i] == 0) { + palette[i] = 1; + } + } + buffer.offset = 0; + for (i = 0; i < frames; i++) { + @Pc(195) int local195 = innerWidths[i]; + @Pc(199) int local199 = innerHeights[i]; + @Pc(203) int local203 = local195 * local199; + @Pc(206) byte[] local206 = new byte[local203]; + @Pc(208) boolean local208 = false; + pixels[i] = local206; + @Pc(215) byte[] local215 = new byte[local203]; + alpha[i] = local215; + @Pc(223) int local223 = buffer.g1(); + @Pc(232) int local232; + if ((local223 & 0x1) == 0) { + for (local232 = 0; local232 < local203; local232++) { + local206[local232] = buffer.g1b(); + } + if ((local223 & 0x2) != 0) { + for (local232 = 0; local232 < local203; local232++) { + @Pc(343) byte local343 = local215[local232] = buffer.g1b(); + local208 |= local343 != -1; + } + } + } else { + local232 = 0; + label88: + while (true) { + @Pc(241) int local241; + if (local232 >= local195) { + if ((local223 & 0x2) == 0) { + break; + } + local232 = 0; + while (true) { + if (local232 >= local195) { + break label88; + } + for (local241 = 0; local241 < local199; local241++) { + @Pc(291) byte local291 = local215[local195 * local241 + local232] = buffer.g1b(); + local208 |= local291 != -1; + } + local232++; + } + } + for (local241 = 0; local241 < local199; local241++) { + local206[local232 + local241 * local195] = buffer.g1b(); + } + local232++; + } + } + hasAlpha[i] = local208; + } + } - @OriginalMember(owner = "client!g", name = "a", descriptor = "(B)V") - public static void clear() { - innerWidths = null; - yOffsets = null; - innerHeights = null; - pixels = null; - xOffsets = null; - palette = null; - } + @OriginalMember(owner = "client!g", name = "a", descriptor = "(B)V") + public static void clear() { + innerWidths = null; + yOffsets = null; + innerHeights = null; + pixels = null; + xOffsets = null; + palette = null; + } - @OriginalMember(owner = "client!ra", name = "a", descriptor = "(IBILclient!ve;)[Lclient!qf;") - public static Sprite[] loadAlphaSprites(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { - return decode(arg1, 0, arg0) ? method3730() : null; - } + @OriginalMember(owner = "client!ra", name = "a", descriptor = "(IBILclient!ve;)[Lclient!qf;") + public static Sprite[] loadAlphaSprites(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { + return decode(arg1, 0, arg0) ? method3730() : null; + } - @OriginalMember(owner = "client!vj", name = "a", descriptor = "(IIILclient!ve;)[Lclient!mm;") - public static SoftwareSprite[] loadSoftwareSprites(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { - return decode(arg1, 0, arg0) ? method474() : null; - } + @OriginalMember(owner = "client!vj", name = "a", descriptor = "(IIILclient!ve;)[Lclient!mm;") + public static SoftwareSprite[] loadSoftwareSprites(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { + return decode(arg1, 0, arg0) ? method474() : null; + } - @OriginalMember(owner = "client!gd", name = "a", descriptor = "(ILclient!ve;II)Lclient!mm;") - public static SoftwareSprite loadSoftwareSprite(@OriginalArg(0) int arg0, @OriginalArg(1) Js5 arg1, @OriginalArg(3) int arg2) { - return decode(arg1, arg0, arg2) ? method3537() : null; - } + @OriginalMember(owner = "client!gd", name = "a", descriptor = "(ILclient!ve;II)Lclient!mm;") + public static SoftwareSprite loadSoftwareSprite(@OriginalArg(0) int arg0, @OriginalArg(1) Js5 arg1, @OriginalArg(3) int arg2) { + return decode(arg1, arg0, arg2) ? method3537() : null; + } - @OriginalMember(owner = "client!lg", name = "a", descriptor = "(Lclient!ve;BII)[Lclient!ok;") - public static IndexedSprite[] loadIndexedSprites(@OriginalArg(0) Js5 arg0, @OriginalArg(3) int arg1) { - return decode(arg0, 0, arg1) ? method4331() : null; - } + @OriginalMember(owner = "client!lg", name = "a", descriptor = "(Lclient!ve;BII)[Lclient!ok;") + public static IndexedSprite[] loadIndexedSprites(@OriginalArg(0) Js5 arg0, @OriginalArg(3) int arg1) { + return decode(arg0, 0, arg1) ? method4331() : null; + } - @OriginalMember(owner = "client!kd", name = "a", descriptor = "(IIILclient!ve;)[Lclient!qf;") - public static Sprite[] method2580(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { - return decode(arg1, 0, arg0) ? method870() : null; - } + @OriginalMember(owner = "client!kd", name = "a", descriptor = "(IIILclient!ve;)[Lclient!qf;") + public static Sprite[] method2580(@OriginalArg(2) int arg0, @OriginalArg(3) Js5 arg1) { + return decode(arg1, 0, arg0) ? method870() : null; + } - @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIBLclient!ve;)Lclient!qf;") - public static Sprite loadSprites(@OriginalArg(1) int arg0, @OriginalArg(3) Js5 arg1) { - return decode(arg1, 0, arg0) ? method1764() : null; - } + @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIBLclient!ve;)Lclient!qf;") + public static Sprite loadSprites(@OriginalArg(1) int arg0, @OriginalArg(3) Js5 arg1) { + return decode(arg1, 0, arg0) ? method1764() : null; + } - @OriginalMember(owner = "client!re", name = "b", descriptor = "(I)[Lclient!qf;") - public static Sprite[] method3730() { - @Pc(14) Sprite[] local14 = new Sprite[frames]; - for (@Pc(16) int local16 = 0; local16 < frames; local16++) { - @Pc(23) byte[] local23 = pixels[local16]; - @Pc(31) int local31 = innerHeights[local16] * innerWidths[local16]; - if (hasAlpha[local16]) { - @Pc(38) int[] local38 = new int[local31]; - @Pc(42) byte[] local42 = alpha[local16]; - for (@Pc(44) int local44 = 0; local44 < local31; local44++) { - local38[local44] = palette[local23[local44] & 0xFF] | (local42[local44] & 0xFF) << 24; - } - if (GlRenderer.enabled) { - local14[local16] = new GlAlphaSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local38); - } else { - local14[local16] = new SoftwareAlphaSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local38); - } - } else { - @Pc(119) int[] local119 = new int[local31]; - for (@Pc(121) int local121 = 0; local121 < local31; local121++) { - local119[local121] = palette[local23[local121] & 0xFF]; - } - if (GlRenderer.enabled) { - local14[local16] = new GlSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local119); - } else { - local14[local16] = new SoftwareSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local119); - } - } - } - clear(); - return local14; - } + @OriginalMember(owner = "client!re", name = "b", descriptor = "(I)[Lclient!qf;") + public static Sprite[] method3730() { + @Pc(14) Sprite[] local14 = new Sprite[frames]; + for (@Pc(16) int local16 = 0; local16 < frames; local16++) { + @Pc(23) byte[] local23 = pixels[local16]; + @Pc(31) int local31 = innerHeights[local16] * innerWidths[local16]; + if (hasAlpha[local16]) { + @Pc(38) int[] local38 = new int[local31]; + @Pc(42) byte[] local42 = alpha[local16]; + for (@Pc(44) int local44 = 0; local44 < local31; local44++) { + local38[local44] = palette[local23[local44] & 0xFF] | (local42[local44] & 0xFF) << 24; + } + if (GlRenderer.enabled) { + local14[local16] = new GlAlphaSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local38); + } else { + local14[local16] = new SoftwareAlphaSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local38); + } + } else { + @Pc(119) int[] local119 = new int[local31]; + for (@Pc(121) int local121 = 0; local121 < local31; local121++) { + local119[local121] = palette[local23[local121] & 0xFF]; + } + if (GlRenderer.enabled) { + local14[local16] = new GlSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local119); + } else { + local14[local16] = new SoftwareSprite(width, height, xOffsets[local16], yOffsets[local16], innerWidths[local16], innerHeights[local16], local119); + } + } + } + clear(); + return local14; + } - @OriginalMember(owner = "client!bd", name = "a", descriptor = "(Z)[Lclient!mm;") - public static SoftwareSprite[] method474() { - @Pc(4) SoftwareSprite[] local4 = new SoftwareSprite[frames]; - for (@Pc(12) int local12 = 0; local12 < frames; local12++) { - @Pc(27) int local27 = innerHeights[local12] * innerWidths[local12]; - @Pc(31) byte[] local31 = pixels[local12]; - @Pc(34) int[] local34 = new int[local27]; - for (@Pc(36) int local36 = 0; local36 < local27; local36++) { - local34[local36] = palette[local31[local36] & 0xFF]; - } - local4[local12] = new SoftwareSprite(width, height, xOffsets[local12], yOffsets[local12], innerWidths[local12], innerHeights[local12], local34); - } - clear(); - return local4; - } + @OriginalMember(owner = "client!bd", name = "a", descriptor = "(Z)[Lclient!mm;") + public static SoftwareSprite[] method474() { + @Pc(4) SoftwareSprite[] local4 = new SoftwareSprite[frames]; + for (@Pc(12) int local12 = 0; local12 < frames; local12++) { + @Pc(27) int local27 = innerHeights[local12] * innerWidths[local12]; + @Pc(31) byte[] local31 = pixels[local12]; + @Pc(34) int[] local34 = new int[local27]; + for (@Pc(36) int local36 = 0; local36 < local27; local36++) { + local34[local36] = palette[local31[local36] & 0xFF]; + } + local4[local12] = new SoftwareSprite(width, height, xOffsets[local12], yOffsets[local12], innerWidths[local12], innerHeights[local12], local34); + } + clear(); + return local4; + } - @OriginalMember(owner = "client!pl", name = "a", descriptor = "(I)Lclient!mm;") - public static SoftwareSprite method3537() { - @Pc(13) int local13 = innerWidths[0] * innerHeights[0]; - @Pc(17) byte[] local17 = pixels[0]; - @Pc(20) int[] local20 = new int[local13]; - for (@Pc(22) int local22 = 0; local22 < local13; local22++) { - local20[local22] = palette[local17[local22] & 0xFF]; - } - @Pc(57) SoftwareSprite local57 = new SoftwareSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); - clear(); - return local57; - } + @OriginalMember(owner = "client!pl", name = "a", descriptor = "(I)Lclient!mm;") + public static SoftwareSprite method3537() { + @Pc(13) int local13 = innerWidths[0] * innerHeights[0]; + @Pc(17) byte[] local17 = pixels[0]; + @Pc(20) int[] local20 = new int[local13]; + for (@Pc(22) int local22 = 0; local22 < local13; local22++) { + local20[local22] = palette[local17[local22] & 0xFF]; + } + @Pc(57) SoftwareSprite local57 = new SoftwareSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); + clear(); + return local57; + } - @OriginalMember(owner = "client!ui", name = "h", descriptor = "(I)[Lclient!ok;") - public static IndexedSprite[] method4331() { - @Pc(8) IndexedSprite[] local8 = new IndexedSprite[frames]; - for (@Pc(10) int local10 = 0; local10 < frames; local10++) { - if (GlRenderer.enabled) { - local8[local10] = new GlIndexedSprite(width, height, xOffsets[local10], yOffsets[local10], innerWidths[local10], innerHeights[local10], pixels[local10], palette); - } else { - local8[local10] = new SoftwareIndexedSprite(width, height, xOffsets[local10], yOffsets[local10], innerWidths[local10], innerHeights[local10], pixels[local10], palette); - } - } - clear(); - return local8; - } + @OriginalMember(owner = "client!ui", name = "h", descriptor = "(I)[Lclient!ok;") + public static IndexedSprite[] method4331() { + @Pc(8) IndexedSprite[] local8 = new IndexedSprite[frames]; + for (@Pc(10) int local10 = 0; local10 < frames; local10++) { + if (GlRenderer.enabled) { + local8[local10] = new GlIndexedSprite(width, height, xOffsets[local10], yOffsets[local10], innerWidths[local10], innerHeights[local10], pixels[local10], palette); + } else { + local8[local10] = new SoftwareIndexedSprite(width, height, xOffsets[local10], yOffsets[local10], innerWidths[local10], innerHeights[local10], pixels[local10], palette); + } + } + clear(); + return local8; + } - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(I)[Lclient!qf;") - public static Sprite[] method870() { - @Pc(6) Sprite[] local6 = new Sprite[frames]; - for (@Pc(15) int local15 = 0; local15 < frames; local15++) { - @Pc(30) int local30 = innerWidths[local15] * innerHeights[local15]; - @Pc(34) byte[] local34 = pixels[local15]; - @Pc(37) int[] local37 = new int[local30]; - for (@Pc(39) int local39 = 0; local39 < local30; local39++) { - local37[local39] = palette[local34[local39] & 0xFF]; - } - if (GlRenderer.enabled) { - local6[local15] = new GlSprite(width, height, xOffsets[local15], yOffsets[local15], innerWidths[local15], innerHeights[local15], local37); - } else { - local6[local15] = new SoftwareSprite(width, height, xOffsets[local15], yOffsets[local15], innerWidths[local15], innerHeights[local15], local37); - } - } - clear(); - return local6; - } + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(I)[Lclient!qf;") + public static Sprite[] method870() { + @Pc(6) Sprite[] local6 = new Sprite[frames]; + for (@Pc(15) int local15 = 0; local15 < frames; local15++) { + @Pc(30) int local30 = innerWidths[local15] * innerHeights[local15]; + @Pc(34) byte[] local34 = pixels[local15]; + @Pc(37) int[] local37 = new int[local30]; + for (@Pc(39) int local39 = 0; local39 < local30; local39++) { + local37[local39] = palette[local34[local39] & 0xFF]; + } + if (GlRenderer.enabled) { + local6[local15] = new GlSprite(width, height, xOffsets[local15], yOffsets[local15], innerWidths[local15], innerHeights[local15], local37); + } else { + local6[local15] = new SoftwareSprite(width, height, xOffsets[local15], yOffsets[local15], innerWidths[local15], innerHeights[local15], local37); + } + } + clear(); + return local6; + } - @OriginalMember(owner = "client!gi", name = "b", descriptor = "(I)Lclient!qf;") - public static Sprite method1764() { - @Pc(9) byte[] local9 = pixels[0]; - @Pc(17) int local17 = innerWidths[0] * innerHeights[0]; - @Pc(20) int[] local20 = new int[local17]; - for (@Pc(28) int local28 = 0; local28 < local17; local28++) { - local20[local28] = palette[local9[local28] & 0xFF]; - } - @Pc(69) Sprite local69; - if (GlRenderer.enabled) { - local69 = new GlSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); - } else { - local69 = new SoftwareSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); - } - clear(); - return local69; - } + @OriginalMember(owner = "client!gi", name = "b", descriptor = "(I)Lclient!qf;") + public static Sprite method1764() { + @Pc(9) byte[] local9 = pixels[0]; + @Pc(17) int local17 = innerWidths[0] * innerHeights[0]; + @Pc(20) int[] local20 = new int[local17]; + for (@Pc(28) int local28 = 0; local28 < local17; local28++) { + local20[local28] = palette[local9[local28] & 0xFF]; + } + @Pc(69) Sprite local69; + if (GlRenderer.enabled) { + local69 = new GlSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); + } else { + local69 = new SoftwareSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], local20); + } + clear(); + return local69; + } - @OriginalMember(owner = "client!uj", name = "a", descriptor = "(BLclient!ve;I)Z") - public static boolean decode(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) { - @Pc(13) byte[] local13 = arg0.fetchFile(arg1); - if (local13 == null) { - return false; - } else { - decode(local13); - return true; - } - } + @OriginalMember(owner = "client!uj", name = "a", descriptor = "(BLclient!ve;I)Z") + public static boolean decode(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) { + @Pc(13) byte[] local13 = arg0.fetchFile(arg1); + if (local13 == null) { + return false; + } else { + decode(local13); + return true; + } + } - @OriginalMember(owner = "client!ml", name = "a", descriptor = "(BILclient!ve;)[Lclient!ek;") - public static SoftwareIndexedSprite[] method3088(@OriginalArg(1) int arg0, @OriginalArg(2) Js5 arg1) { - return decode(arg1, arg0) ? createSoftwareIndexedSprites() : null; - } + @OriginalMember(owner = "client!ml", name = "a", descriptor = "(BILclient!ve;)[Lclient!ek;") + public static SoftwareIndexedSprite[] method3088(@OriginalArg(1) int arg0, @OriginalArg(2) Js5 arg1) { + return decode(arg1, arg0) ? createSoftwareIndexedSprites() : null; + } - @OriginalMember(owner = "client!da", name = "a", descriptor = "(ILclient!ve;Z)Lclient!ok;") - public static IndexedSprite loadIndexedSpriteAutoDetect(@OriginalArg(0) int arg0, @OriginalArg(1) Js5 arg1) { - return decode(arg1, arg0) ? method4614() : null; - } + @OriginalMember(owner = "client!da", name = "a", descriptor = "(ILclient!ve;Z)Lclient!ok;") + public static IndexedSprite loadIndexedSpriteAutoDetect(@OriginalArg(0) int arg0, @OriginalArg(1) Js5 arg1) { + return decode(arg1, arg0) ? method4614() : null; + } - @OriginalMember(owner = "client!kc", name = "a", descriptor = "(ILclient!ve;I)Lclient!qf;") - public static Sprite loadSpriteAutoDetect(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) { - return decode(arg0, arg1) ? method1764() : null; - } + @OriginalMember(owner = "client!kc", name = "a", descriptor = "(ILclient!ve;I)Lclient!qf;") + public static Sprite loadSpriteAutoDetect(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) { + return decode(arg0, arg1) ? method1764() : null; + } - @OriginalMember(owner = "client!wh", name = "b", descriptor = "(B)Lclient!ok;") - public static IndexedSprite method4614() { - @Pc(27) IndexedSprite local27; - if (GlRenderer.enabled) { - local27 = new GlIndexedSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], pixels[0], palette); - } else { - local27 = new SoftwareIndexedSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], pixels[0], palette); - } - clear(); - return local27; - } + @OriginalMember(owner = "client!wh", name = "b", descriptor = "(B)Lclient!ok;") + public static IndexedSprite method4614() { + @Pc(27) IndexedSprite local27; + if (GlRenderer.enabled) { + local27 = new GlIndexedSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], pixels[0], palette); + } else { + local27 = new SoftwareIndexedSprite(width, height, xOffsets[0], yOffsets[0], innerWidths[0], innerHeights[0], pixels[0], palette); + } + clear(); + return local27; + } - @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; - } + @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; + } - @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!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; + } } diff --git a/client/src/main/java/rt4/Sprites.java b/client/src/main/java/rt4/Sprites.java index f353281..04749b2 100644 --- a/client/src/main/java/rt4/Sprites.java +++ b/client/src/main/java/rt4/Sprites.java @@ -5,305 +5,305 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class Sprites { - @OriginalMember(owner = "client!bh", name = "s", descriptor = "Lclient!na;") - public static final JagString P11_FULL = JagString.parse("p11_full"); + @OriginalMember(owner = "client!bh", name = "s", descriptor = "Lclient!na;") + public static final JagString P11_FULL = JagString.parse("p11_full"); - @OriginalMember(owner = "client!ee", name = "e", descriptor = "Lclient!na;") - public static final JagString P12_FULL = JagString.parse("p12_full"); + @OriginalMember(owner = "client!ee", name = "e", descriptor = "Lclient!na;") + public static final JagString P12_FULL = JagString.parse("p12_full"); - @OriginalMember(owner = "client!fm", name = "eb", descriptor = "Lclient!na;") - public static final JagString B12_FULL = JagString.parse("b12_full"); + @OriginalMember(owner = "client!fm", name = "eb", descriptor = "Lclient!na;") + public static final JagString B12_FULL = JagString.parse("b12_full"); - @OriginalMember(owner = "client!bg", name = "N", descriptor = "Lclient!na;") - public static final JagString MAPFUNCTION = JagString.parse("mapfunction"); + @OriginalMember(owner = "client!bg", name = "N", descriptor = "Lclient!na;") + public static final JagString MAPFUNCTION = JagString.parse("mapfunction"); - @OriginalMember(owner = "client!rl", name = "S", descriptor = "Lclient!na;") - public static final JagString HITMARKS = JagString.parse("hitmarks"); + @OriginalMember(owner = "client!rl", name = "S", descriptor = "Lclient!na;") + public static final JagString HITMARKS = JagString.parse("hitmarks"); - @OriginalMember(owner = "client!vd", name = "v", descriptor = "Lclient!na;") - public static final JagString HITBAR_DEFAULT = JagString.parse("hitbar_default"); + @OriginalMember(owner = "client!vd", name = "v", descriptor = "Lclient!na;") + public static final JagString HITBAR_DEFAULT = JagString.parse("hitbar_default"); - @OriginalMember(owner = "client!jj", name = "d", descriptor = "Lclient!na;") - public static final JagString HEADICONS_PK = JagString.parse("headicons_pk"); + @OriginalMember(owner = "client!jj", name = "d", descriptor = "Lclient!na;") + public static final JagString HEADICONS_PK = JagString.parse("headicons_pk"); - @OriginalMember(owner = "client!sh", name = "j", descriptor = "Lclient!na;") - public static final JagString HEADICONS_PRAYER = JagString.parse("headicons_prayer"); + @OriginalMember(owner = "client!sh", name = "j", descriptor = "Lclient!na;") + public static final JagString HEADICONS_PRAYER = JagString.parse("headicons_prayer"); - @OriginalMember(owner = "client!hj", name = "d", descriptor = "Lclient!na;") - public static final JagString HINT_HEADICONS = JagString.parse("hint_headicons"); + @OriginalMember(owner = "client!hj", name = "d", descriptor = "Lclient!na;") + public static final JagString HINT_HEADICONS = JagString.parse("hint_headicons"); - @OriginalMember(owner = "client!pe", name = "n", descriptor = "Lclient!na;") - public static final JagString HINT_MAPMARKERS = JagString.parse("hint_mapmarkers"); + @OriginalMember(owner = "client!pe", name = "n", descriptor = "Lclient!na;") + public static final JagString HINT_MAPMARKERS = JagString.parse("hint_mapmarkers"); - @OriginalMember(owner = "client!vc", name = "ab", descriptor = "Lclient!na;") - public static final JagString MAPFLAG = JagString.parse("mapflag"); + @OriginalMember(owner = "client!vc", name = "ab", descriptor = "Lclient!na;") + public static final JagString MAPFLAG = JagString.parse("mapflag"); - @OriginalMember(owner = "client!gm", name = "db", descriptor = "Lclient!na;") - public static final JagString CROSS = JagString.parse("cross"); + @OriginalMember(owner = "client!gm", name = "db", descriptor = "Lclient!na;") + public static final JagString CROSS = JagString.parse("cross"); - @OriginalMember(owner = "client!pe", name = "z", descriptor = "Lclient!na;") - public static final JagString MAPDOTS = JagString.parse("mapdots"); + @OriginalMember(owner = "client!pe", name = "z", descriptor = "Lclient!na;") + public static final JagString MAPDOTS = JagString.parse("mapdots"); - @OriginalMember(owner = "client!uf", name = "o", descriptor = "Lclient!na;") - public static final JagString SCROLLBAR = JagString.parse("scrollbar"); + @OriginalMember(owner = "client!uf", name = "o", descriptor = "Lclient!na;") + public static final JagString SCROLLBAR = JagString.parse("scrollbar"); - @OriginalMember(owner = "client!cb", name = "eb", descriptor = "Lclient!na;") - public static final JagString NAME_ICONS = JagString.parse("name_icons"); + @OriginalMember(owner = "client!cb", name = "eb", descriptor = "Lclient!na;") + public static final JagString NAME_ICONS = JagString.parse("name_icons"); - @OriginalMember(owner = "client!bh", name = "v", descriptor = "Lclient!na;") - public static final JagString FLOORSHADOWS = JagString.parse("floorshadows"); + @OriginalMember(owner = "client!bh", name = "v", descriptor = "Lclient!na;") + public static final JagString FLOORSHADOWS = JagString.parse("floorshadows"); - @OriginalMember(owner = "client!wl", name = "d", descriptor = "Lclient!na;") - public static final JagString COMPASS = JagString.parse("compass"); + @OriginalMember(owner = "client!wl", name = "d", descriptor = "Lclient!na;") + public static final JagString COMPASS = JagString.parse("compass"); - @OriginalMember(owner = "client!af", name = "g", descriptor = "Lclient!na;") - public static final JagString HINT_MAPEDGE = JagString.parse("hint_mapedge"); + @OriginalMember(owner = "client!af", name = "g", descriptor = "Lclient!na;") + public static final JagString HINT_MAPEDGE = JagString.parse("hint_mapedge"); - @OriginalMember(owner = "client!nc", name = "h", descriptor = "I") - public static int p11FullId; + @OriginalMember(owner = "client!nc", name = "h", descriptor = "I") + public static int p11FullId; - @OriginalMember(owner = "client!kc", name = "t", descriptor = "I") - public static int p12FullId; + @OriginalMember(owner = "client!kc", name = "t", descriptor = "I") + public static int p12FullId; - @OriginalMember(owner = "client!fm", name = "V", descriptor = "I") - public static int b12FullId; + @OriginalMember(owner = "client!fm", name = "V", descriptor = "I") + public static int b12FullId; - @OriginalMember(owner = "client!wl", name = "A", descriptor = "I") - public static int mapfunctionId; + @OriginalMember(owner = "client!wl", name = "A", descriptor = "I") + public static int mapfunctionId; - @OriginalMember(owner = "client!kd", name = "Cb", descriptor = "I") - public static int hitmarksId; + @OriginalMember(owner = "client!kd", name = "Cb", descriptor = "I") + public static int hitmarksId; - @OriginalMember(owner = "client!client", name = "W", descriptor = "I") - public static int hitbarId; + @OriginalMember(owner = "client!client", name = "W", descriptor = "I") + public static int hitbarId; - @OriginalMember(owner = "client!rg", name = "C", descriptor = "I") - public static int headiconsPkId; + @OriginalMember(owner = "client!rg", name = "C", descriptor = "I") + public static int headiconsPkId; - @OriginalMember(owner = "client!ck", name = "F", descriptor = "I") - public static int headiconsPrayerId; + @OriginalMember(owner = "client!ck", name = "F", descriptor = "I") + public static int headiconsPrayerId; - @OriginalMember(owner = "client!qg", name = "R", descriptor = "I") - public static int hintHeadId; + @OriginalMember(owner = "client!qg", name = "R", descriptor = "I") + public static int hintHeadId; - @OriginalMember(owner = "client!lj", name = "s", descriptor = "I") - public static int hintMapMarkId; + @OriginalMember(owner = "client!lj", name = "s", descriptor = "I") + public static int hintMapMarkId; - @OriginalMember(owner = "client!bi", name = "fb", descriptor = "I") - public static int mapflagId; + @OriginalMember(owner = "client!bi", name = "fb", descriptor = "I") + public static int mapflagId; - @OriginalMember(owner = "client!ci", name = "t", descriptor = "I") - public static int crossId; + @OriginalMember(owner = "client!ci", name = "t", descriptor = "I") + public static int crossId; - @OriginalMember(owner = "client!gd", name = "l", descriptor = "I") - public static int mapdotsId; + @OriginalMember(owner = "client!gd", name = "l", descriptor = "I") + public static int mapdotsId; - @OriginalMember(owner = "client!jk", name = "J", descriptor = "I") - public static int scrollbarId; + @OriginalMember(owner = "client!jk", name = "J", descriptor = "I") + public static int scrollbarId; - @OriginalMember(owner = "client!sd", name = "I", descriptor = "I") - public static int nameIconsId; + @OriginalMember(owner = "client!sd", name = "I", descriptor = "I") + public static int nameIconsId; - @OriginalMember(owner = "client!gk", name = "j", descriptor = "I") - public static int floorShadowsId; + @OriginalMember(owner = "client!gk", name = "j", descriptor = "I") + public static int floorShadowsId; - @OriginalMember(owner = "client!n", name = "b", descriptor = "I") - public static int compassId; + @OriginalMember(owner = "client!n", name = "b", descriptor = "I") + public static int compassId; - @OriginalMember(owner = "client!ka", name = "u", descriptor = "I") - public static int hintMapEdgeId; - @OriginalMember(owner = "client!tj", name = "d", descriptor = "[Lclient!ek;") - public static SoftwareIndexedSprite[] floorShadows; - @OriginalMember(owner = "client!nk", name = "L", descriptor = "[Lclient!mm;") - public static SoftwareSprite[] mapfunctions; - @OriginalMember(owner = "client!re", name = "w", descriptor = "[Lclient!qf;") - public static Sprite[] hitmarks; - @OriginalMember(owner = "client!jb", name = "k", descriptor = "[Lclient!qf;") - public static Sprite[] hitbars; - @OriginalMember(owner = "client!rl", name = "V", descriptor = "[Lclient!qf;") - public static Sprite[] headiconPks; - @OriginalMember(owner = "client!km", name = "sc", descriptor = "[Lclient!qf;") - public static Sprite[] headiconPrayers; - @OriginalMember(owner = "client!wh", name = "l", descriptor = "[Lclient!qf;") - public static Sprite[] headhints; - @OriginalMember(owner = "client!lj", name = "t", descriptor = "[Lclient!qf;") + @OriginalMember(owner = "client!ka", name = "u", descriptor = "I") + public static int hintMapEdgeId; + @OriginalMember(owner = "client!tj", name = "d", descriptor = "[Lclient!ek;") + public static SoftwareIndexedSprite[] floorShadows; + @OriginalMember(owner = "client!nk", name = "L", descriptor = "[Lclient!mm;") + public static SoftwareSprite[] mapfunctions; + @OriginalMember(owner = "client!re", name = "w", descriptor = "[Lclient!qf;") + public static Sprite[] hitmarks; + @OriginalMember(owner = "client!jb", name = "k", descriptor = "[Lclient!qf;") + public static Sprite[] hitbars; + @OriginalMember(owner = "client!rl", name = "V", descriptor = "[Lclient!qf;") + public static Sprite[] headiconPks; + @OriginalMember(owner = "client!km", name = "sc", descriptor = "[Lclient!qf;") + public static Sprite[] headiconPrayers; + @OriginalMember(owner = "client!wh", name = "l", descriptor = "[Lclient!qf;") + public static Sprite[] headhints; + @OriginalMember(owner = "client!lj", name = "t", descriptor = "[Lclient!qf;") public static Sprite[] mapmarkhints; - @OriginalMember(owner = "client!tg", name = "d", descriptor = "[Lclient!qf;") - public static Sprite[] crosses; - @OriginalMember(owner = "client!gk", name = "l", descriptor = "Lclient!qf;") - public static Sprite mapflags; - @OriginalMember(owner = "client!l", name = "j", descriptor = "[Lclient!qf;") - public static Sprite[] mapdots; - @OriginalMember(owner = "client!mi", name = "T", descriptor = "[Lclient!ok;") - public static IndexedSprite[] nameIcons; - @OriginalMember(owner = "client!th", name = "f", descriptor = "[Lclient!ok;") - public static IndexedSprite[] scrollbars; - @OriginalMember(owner = "client!ic", name = "a", descriptor = "Lclient!qf;") - public static Sprite compass; - @OriginalMember(owner = "client!wi", name = "R", descriptor = "[Lclient!qf;") - public static Sprite[] hintMapEdge; - @OriginalMember(owner = "client!fe", name = "lc", descriptor = "[Lclient!qf;") - public static Sprite[] mapfuncs; + @OriginalMember(owner = "client!tg", name = "d", descriptor = "[Lclient!qf;") + public static Sprite[] crosses; + @OriginalMember(owner = "client!gk", name = "l", descriptor = "Lclient!qf;") + public static Sprite mapflags; + @OriginalMember(owner = "client!l", name = "j", descriptor = "[Lclient!qf;") + public static Sprite[] mapdots; + @OriginalMember(owner = "client!mi", name = "T", descriptor = "[Lclient!ok;") + public static IndexedSprite[] nameIcons; + @OriginalMember(owner = "client!th", name = "f", descriptor = "[Lclient!ok;") + public static IndexedSprite[] scrollbars; + @OriginalMember(owner = "client!ic", name = "a", descriptor = "Lclient!qf;") + public static Sprite compass; + @OriginalMember(owner = "client!wi", name = "R", descriptor = "[Lclient!qf;") + public static Sprite[] hintMapEdge; + @OriginalMember(owner = "client!fe", name = "lc", descriptor = "[Lclient!qf;") + public static Sprite[] mapfuncs; - @OriginalMember(owner = "client!g", name = "a", descriptor = "(ILclient!ve;)V") - public static void init(@OriginalArg(1) Js5 archive) { - p11FullId = archive.getGroupId(P11_FULL); - p12FullId = archive.getGroupId(P12_FULL); - b12FullId = archive.getGroupId(B12_FULL); - mapfunctionId = archive.getGroupId(MAPFUNCTION); - hitmarksId = archive.getGroupId(HITMARKS); - hitbarId = archive.getGroupId(HITBAR_DEFAULT); - headiconsPkId = archive.getGroupId(HEADICONS_PK); - headiconsPrayerId = archive.getGroupId(HEADICONS_PRAYER); - hintHeadId = archive.getGroupId(HINT_HEADICONS); - hintMapMarkId = archive.getGroupId(HINT_MAPMARKERS); - mapflagId = archive.getGroupId(MAPFLAG); - crossId = archive.getGroupId(CROSS); - mapdotsId = archive.getGroupId(MAPDOTS); - scrollbarId = archive.getGroupId(SCROLLBAR); - nameIconsId = archive.getGroupId(NAME_ICONS); - floorShadowsId = archive.getGroupId(FLOORSHADOWS); - compassId = archive.getGroupId(COMPASS); - hintMapEdgeId = archive.getGroupId(HINT_MAPEDGE); - } + @OriginalMember(owner = "client!g", name = "a", descriptor = "(ILclient!ve;)V") + public static void init(@OriginalArg(1) Js5 archive) { + p11FullId = archive.getGroupId(P11_FULL); + p12FullId = archive.getGroupId(P12_FULL); + b12FullId = archive.getGroupId(B12_FULL); + mapfunctionId = archive.getGroupId(MAPFUNCTION); + hitmarksId = archive.getGroupId(HITMARKS); + hitbarId = archive.getGroupId(HITBAR_DEFAULT); + headiconsPkId = archive.getGroupId(HEADICONS_PK); + headiconsPrayerId = archive.getGroupId(HEADICONS_PRAYER); + hintHeadId = archive.getGroupId(HINT_HEADICONS); + hintMapMarkId = archive.getGroupId(HINT_MAPMARKERS); + mapflagId = archive.getGroupId(MAPFLAG); + crossId = archive.getGroupId(CROSS); + mapdotsId = archive.getGroupId(MAPDOTS); + scrollbarId = archive.getGroupId(SCROLLBAR); + nameIconsId = archive.getGroupId(NAME_ICONS); + floorShadowsId = archive.getGroupId(FLOORSHADOWS); + compassId = archive.getGroupId(COMPASS); + hintMapEdgeId = archive.getGroupId(HINT_MAPEDGE); + } - @OriginalMember(owner = "client!cd", name = "a", descriptor = "(Lclient!ve;B)I") - public static int getReady(@OriginalArg(0) Js5 archive) { - @Pc(5) int ready = 0; - if (archive.isFileReady(mapfunctionId)) { - ready++; - } - if (archive.isFileReady(hitmarksId)) { - ready++; - } - if (archive.isFileReady(hitbarId)) { - ready++; - } - if (archive.isFileReady(headiconsPkId)) { - ready++; - } - if (archive.isFileReady(headiconsPrayerId)) { - ready++; - } - if (archive.isFileReady(hintHeadId)) { - ready++; - } - if (archive.isFileReady(hintMapMarkId)) { - ready++; - } - if (archive.isFileReady(mapflagId)) { - ready++; - } - if (archive.isFileReady(crossId)) { - ready++; - } - if (archive.isFileReady(mapdotsId)) { - ready++; - } - if (archive.isFileReady(scrollbarId)) { - ready++; - } - if (archive.isFileReady(nameIconsId)) { - ready++; - } - if (archive.isFileReady(floorShadowsId)) { - ready++; - } - if (archive.isFileReady(compassId)) { - ready++; - } - if (archive.isFileReady(hintMapEdgeId)) { - ready++; - } - return ready; - } + @OriginalMember(owner = "client!cd", name = "a", descriptor = "(Lclient!ve;B)I") + public static int getReady(@OriginalArg(0) Js5 archive) { + @Pc(5) int ready = 0; + if (archive.isFileReady(mapfunctionId)) { + ready++; + } + if (archive.isFileReady(hitmarksId)) { + ready++; + } + if (archive.isFileReady(hitbarId)) { + ready++; + } + if (archive.isFileReady(headiconsPkId)) { + ready++; + } + if (archive.isFileReady(headiconsPrayerId)) { + ready++; + } + if (archive.isFileReady(hintHeadId)) { + ready++; + } + if (archive.isFileReady(hintMapMarkId)) { + ready++; + } + if (archive.isFileReady(mapflagId)) { + ready++; + } + if (archive.isFileReady(crossId)) { + ready++; + } + if (archive.isFileReady(mapdotsId)) { + ready++; + } + if (archive.isFileReady(scrollbarId)) { + ready++; + } + if (archive.isFileReady(nameIconsId)) { + ready++; + } + if (archive.isFileReady(floorShadowsId)) { + ready++; + } + if (archive.isFileReady(compassId)) { + ready++; + } + if (archive.isFileReady(hintMapEdgeId)) { + ready++; + } + return ready; + } - @OriginalMember(owner = "client!cg", name = "a", descriptor = "(ILclient!ve;)V") - public static void load(@OriginalArg(1) Js5 archive) { - mapfunctions = SpriteLoader.loadSoftwareSprites(mapfunctionId, archive); - hitmarks = SpriteLoader.loadAlphaSprites(hitmarksId, archive); - hitbars = SpriteLoader.loadAlphaSprites(hitbarId, archive); - headiconPks = SpriteLoader.loadAlphaSprites(headiconsPkId, archive); - headiconPrayers = SpriteLoader.loadAlphaSprites(headiconsPrayerId, archive); - headhints = SpriteLoader.loadAlphaSprites(hintHeadId, archive); - mapmarkhints = SpriteLoader.loadAlphaSprites(hintMapMarkId, archive); - mapflags = SpriteLoader.loadSprites(mapflagId, archive); - crosses = SpriteLoader.method2580(crossId, archive); - mapdots = SpriteLoader.method2580(mapdotsId, archive); - scrollbars = SpriteLoader.loadIndexedSprites(archive, scrollbarId); - nameIcons = SpriteLoader.loadIndexedSprites(archive, nameIconsId); - Fonts.p11Full.setNameIcons(nameIcons, null); - Fonts.p12Full.setNameIcons(nameIcons, null); - Fonts.b12Full.setNameIcons(nameIcons, null); - if (GlRenderer.enabled) { - floorShadows = SpriteLoader.loadSoftwareIndexedSprites(floorShadowsId, archive); - for (@Pc(101) int local101 = 0; local101 < floorShadows.length; local101++) { - floorShadows[local101].trim(); - } - } - @Pc(124) SoftwareSprite newCompass = SpriteLoader.loadSoftwareSprite(0, archive, compassId); - newCompass.trim(); - if (GlRenderer.enabled) { - compass = new GlSprite(newCompass); - } else { - compass = newCompass; - } - @Pc(143) SoftwareSprite[] local143 = SpriteLoader.loadSoftwareSprites(hintMapEdgeId, archive); - @Pc(145) int local145; - for (local145 = 0; local145 < local143.length; local145++) { - local143[local145].trim(); - } - if (GlRenderer.enabled) { - hintMapEdge = new Sprite[local143.length]; - for (local145 = 0; local145 < local143.length; local145++) { - hintMapEdge[local145] = new GlSprite(local143[local145]); - } - } else { - hintMapEdge = local143; - } - @Pc(196) int local196 = (int) ((double) 21 * Math.random()) - 10; - local145 = (int) (Math.random() * 21.0D) - 10; - @Pc(210) int local210 = (int) (Math.random() * 21.0D) - 10; - @Pc(217) int local217 = (int) (Math.random() * 41.0D) - 20; - @Pc(219) int local219; - for (local219 = 0; local219 < mapfunctions.length; local219++) { - mapfunctions[local219].method315(local145 + local217, local217 + local196, local217 + local210); - } - if (GlRenderer.enabled) { - mapfuncs = new Sprite[mapfunctions.length]; - for (local219 = 0; local219 < mapfunctions.length; local219++) { - mapfuncs[local219] = new GlSprite(mapfunctions[local219]); - } - } else { - mapfuncs = mapfunctions; - } - } + @OriginalMember(owner = "client!cg", name = "a", descriptor = "(ILclient!ve;)V") + public static void load(@OriginalArg(1) Js5 archive) { + mapfunctions = SpriteLoader.loadSoftwareSprites(mapfunctionId, archive); + hitmarks = SpriteLoader.loadAlphaSprites(hitmarksId, archive); + hitbars = SpriteLoader.loadAlphaSprites(hitbarId, archive); + headiconPks = SpriteLoader.loadAlphaSprites(headiconsPkId, archive); + headiconPrayers = SpriteLoader.loadAlphaSprites(headiconsPrayerId, archive); + headhints = SpriteLoader.loadAlphaSprites(hintHeadId, archive); + mapmarkhints = SpriteLoader.loadAlphaSprites(hintMapMarkId, archive); + mapflags = SpriteLoader.loadSprites(mapflagId, archive); + crosses = SpriteLoader.method2580(crossId, archive); + mapdots = SpriteLoader.method2580(mapdotsId, archive); + scrollbars = SpriteLoader.loadIndexedSprites(archive, scrollbarId); + nameIcons = SpriteLoader.loadIndexedSprites(archive, nameIconsId); + Fonts.p11Full.setNameIcons(nameIcons, null); + Fonts.p12Full.setNameIcons(nameIcons, null); + Fonts.b12Full.setNameIcons(nameIcons, null); + if (GlRenderer.enabled) { + floorShadows = SpriteLoader.loadSoftwareIndexedSprites(floorShadowsId, archive); + for (@Pc(101) int local101 = 0; local101 < floorShadows.length; local101++) { + floorShadows[local101].trim(); + } + } + @Pc(124) SoftwareSprite newCompass = SpriteLoader.loadSoftwareSprite(0, archive, compassId); + newCompass.trim(); + if (GlRenderer.enabled) { + compass = new GlSprite(newCompass); + } else { + compass = newCompass; + } + @Pc(143) SoftwareSprite[] local143 = SpriteLoader.loadSoftwareSprites(hintMapEdgeId, archive); + @Pc(145) int local145; + for (local145 = 0; local145 < local143.length; local145++) { + local143[local145].trim(); + } + if (GlRenderer.enabled) { + hintMapEdge = new Sprite[local143.length]; + for (local145 = 0; local145 < local143.length; local145++) { + hintMapEdge[local145] = new GlSprite(local143[local145]); + } + } else { + hintMapEdge = local143; + } + @Pc(196) int local196 = (int) ((double) 21 * Math.random()) - 10; + local145 = (int) (Math.random() * 21.0D) - 10; + @Pc(210) int local210 = (int) (Math.random() * 21.0D) - 10; + @Pc(217) int local217 = (int) (Math.random() * 41.0D) - 20; + @Pc(219) int local219; + for (local219 = 0; local219 < mapfunctions.length; local219++) { + mapfunctions[local219].method315(local145 + local217, local217 + local196, local217 + local210); + } + if (GlRenderer.enabled) { + mapfuncs = new Sprite[mapfunctions.length]; + for (local219 = 0; local219 < mapfunctions.length; local219++) { + mapfuncs[local219] = new GlSprite(mapfunctions[local219]); + } + } else { + mapfuncs = mapfunctions; + } + } - @OriginalMember(owner = "client!f", name = "h", descriptor = "(I)I") - public static int total() { - return 15; - } + @OriginalMember(owner = "client!f", name = "h", descriptor = "(I)I") + public static int total() { + return 15; + } - @OriginalMember(owner = "client!ja", name = "a", descriptor = "(Z)V") - public static void clear() { - Fonts.p12Full = null; - hitmarks = null; - crosses = null; - nameIcons = null; - Fonts.p11FullSoftware = null; - mapfunctions = null; - mapfuncs = null; - mapmarkhints = null; - headiconPrayers = null; - Fonts.b12Full = null; - compass = null; - mapdots = null; - Fonts.p11Full = null; - mapflags = null; - hitbars = null; - hintMapEdge = null; - headhints = null; - headiconPks = null; - scrollbars = null; - } + @OriginalMember(owner = "client!ja", name = "a", descriptor = "(Z)V") + public static void clear() { + Fonts.p12Full = null; + hitmarks = null; + crosses = null; + nameIcons = null; + Fonts.p11FullSoftware = null; + mapfunctions = null; + mapfuncs = null; + mapmarkhints = null; + headiconPrayers = null; + Fonts.b12Full = null; + compass = null; + mapdots = null; + Fonts.p11Full = null; + mapflags = null; + hitbars = null; + hintMapEdge = null; + headhints = null; + headiconPks = null; + scrollbars = null; + } } diff --git a/client/src/main/java/rt4/Static1.java b/client/src/main/java/rt4/Static1.java index 7bf9e63..c38205c 100644 --- a/client/src/main/java/rt4/Static1.java +++ b/client/src/main/java/rt4/Static1.java @@ -6,14 +6,14 @@ import org.openrs2.deob.annotation.Pc; public final class Static1 { - @OriginalMember(owner = "client!wi", name = "hb", descriptor = "[[Z") - public static final boolean[][] aBooleanArrayArray4 = new boolean[][] { { true, true, true }, { false, false }, { false, true }, { true, false }, { false, true, true }, { true, false, true }, { false, true, false }, { true, false, false } }; - @OriginalMember(owner = "client!kc", name = "s", descriptor = "[I") - public static final int[] anIntArray300 = new int[] { 1, 1, 1, 1, 4, 1, 1, 5, 6, 1, 5, 0, 7, 0, 4, 1, 7, 2, 1, 1, 6, 1, 1, 3, 6, 1, 7, 0, 0, 6, 7, 0, 1, 7, 6, 1, 1, 1, 5, 4, 3, 2, 1, 1, 0, 4, 1, 5 }; - @OriginalMember(owner = "client!sh", name = "i", descriptor = "[[I") - public static final int[][] anIntArrayArray35 = new int[][] { { 0, 128, 0, 0, 128, 0, 128, 128 }, { 0, 128, 0, 0, 128, 0 }, { 0, 0, 64, 128, 0, 128 }, { 128, 128, 64, 128, 128, 0 }, { 0, 0, 128, 0, 128, 128, 64, 128 }, { 0, 128, 0, 0, 128, 0, 64, 128 }, { 64, 128, 0, 128, 0, 0, 64, 0 }, { 0, 0, 64, 0, 0, 64 }, { 128, 0, 128, 128, 0, 128, 0, 64, 64, 0 }, { 0, 128, 0, 0, 32, 64, 64, 96, 128, 128 }, { 0, 0, 128, 0, 128, 128, 64, 96, 32, 64 }, { 0, 0, 128, 0, 96, 32, 32, 32 } }; + @OriginalMember(owner = "client!wi", name = "hb", descriptor = "[[Z") + public static final boolean[][] aBooleanArrayArray4 = new boolean[][]{{true, true, true}, {false, false}, {false, true}, {true, false}, {false, true, true}, {true, false, true}, {false, true, false}, {true, false, false}}; + @OriginalMember(owner = "client!kc", name = "s", descriptor = "[I") + public static final int[] anIntArray300 = new int[]{1, 1, 1, 1, 4, 1, 1, 5, 6, 1, 5, 0, 7, 0, 4, 1, 7, 2, 1, 1, 6, 1, 1, 3, 6, 1, 7, 0, 0, 6, 7, 0, 1, 7, 6, 1, 1, 1, 5, 4, 3, 2, 1, 1, 0, 4, 1, 5}; + @OriginalMember(owner = "client!sh", name = "i", descriptor = "[[I") + public static final int[][] anIntArrayArray35 = new int[][]{{0, 128, 0, 0, 128, 0, 128, 128}, {0, 128, 0, 0, 128, 0}, {0, 0, 64, 128, 0, 128}, {128, 128, 64, 128, 128, 0}, {0, 0, 128, 0, 128, 128, 64, 128}, {0, 128, 0, 0, 128, 0, 64, 128}, {64, 128, 0, 128, 0, 0, 64, 0}, {0, 0, 64, 0, 0, 64}, {128, 0, 128, 128, 0, 128, 0, 64, 64, 0}, {0, 128, 0, 0, 32, 64, 64, 96, 128, 128}, {0, 0, 128, 0, 128, 128, 64, 96, 32, 64}, {0, 0, 128, 0, 96, 32, 32, 32}}; @OriginalMember(owner = "client!gf", name = "S", descriptor = "[I") - public static final int[] anIntArray419 = new int[] { 0, 2, 2, 2, 1, 1, 2, 2, 1, 3, 1, 1 }; + public static final int[] anIntArray419 = new int[]{0, 2, 2, 2, 1, 1, 2, 2, 1, 3, 1, 1}; @OriginalMember(owner = "client!a", name = "h", descriptor = "I") public static int anInt5; @@ -22,14 +22,14 @@ public final class Static1 { @OriginalMember(owner = "client!a", name = "i", descriptor = "I") public static int anInt6 = 0; - @OriginalMember(owner = "client!ig", name = "b", descriptor = "I") - public static int anInt2882; - @OriginalMember(owner = "client!ig", name = "f", descriptor = "I") - public static int anInt2884; - @OriginalMember(owner = "client!hc", name = "P", descriptor = "I") + @OriginalMember(owner = "client!ig", name = "b", descriptor = "I") + public static int anInt2882; + @OriginalMember(owner = "client!ig", name = "f", descriptor = "I") + public static int anInt2884; + @OriginalMember(owner = "client!hc", name = "P", descriptor = "I") public static int anInt2428; - @OriginalMember(owner = "client!a", name = "a", descriptor = "([[F[[F[[II[[F[[B[[II[[B[[B[[B[[[B)[Lclient!hg;") + @OriginalMember(owner = "client!a", name = "a", descriptor = "([[F[[F[[II[[F[[B[[II[[B[[B[[B[[[B)[Lclient!hg;") public static GlTile[] method2(@OriginalArg(0) float[][] arg0, @OriginalArg(1) float[][] arg1, @OriginalArg(2) int[][] arg2, @OriginalArg(3) int arg3, @OriginalArg(4) float[][] arg4, @OriginalArg(5) byte[][] arg5, @OriginalArg(6) int[][] arg6, @OriginalArg(8) byte[][] arg7, @OriginalArg(9) byte[][] arg8, @OriginalArg(10) byte[][] arg9, @OriginalArg(11) byte[][][] arg10) { @Pc(10) HashTable local10 = new HashTable(128); @Pc(12) int local12; @@ -600,59 +600,59 @@ public final class Static1 { } } - @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Lclient!sc;ZLclient!wl;)Lclient!hg;") - public static GlTile method4212(@OriginalArg(0) HashTable arg0, @OriginalArg(2) FloType arg1) { - @Pc(23) long local23 = (long) ((arg1.texture + 1 << 16) + arg1.anInt5885) + ((long) arg1.anInt5897 << 56) + ((long) arg1.anInt5889 << 32); - @Pc(38) GlTile local38 = (GlTile) arg0.get(local23); - if (local38 == null) { - local38 = new GlTile(arg1.texture, (float) arg1.anInt5885, true, false, arg1.anInt5889); - arg0.put(local38, local23); - } - return local38; - } + @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Lclient!sc;ZLclient!wl;)Lclient!hg;") + public static GlTile method4212(@OriginalArg(0) HashTable arg0, @OriginalArg(2) FloType arg1) { + @Pc(23) long local23 = (long) ((arg1.texture + 1 << 16) + arg1.anInt5885) + ((long) arg1.anInt5897 << 56) + ((long) arg1.anInt5889 << 32); + @Pc(38) GlTile local38 = (GlTile) arg0.get(local23); + if (local38 == null) { + local38 = new GlTile(arg1.texture, (float) arg1.anInt5885, true, false, arg1.anInt5889); + arg0.put(local38, local23); + } + return local38; + } - @OriginalMember(owner = "client!bi", name = "a", descriptor = "(IIBI)I") - public static int method588(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { - @Pc(19) int local19 = Rasteriser.palette[SoftwareModel.method4585(arg1, arg2)]; - if (arg0 > 0) { - @Pc(31) int local31 = Rasteriser.textureProvider.method3238(arg0 & 0xFFFF); - @Pc(49) int local49; - @Pc(73) int local73; - if (local31 != 0) { - if (arg2 < 0) { - local49 = 0; - } else if (arg2 > 127) { - local49 = 16777215; - } else { - local49 = arg2 * 131586; - } - if (local31 == 256) { - local19 = local49; - } else { - local73 = 256 - local31; - local19 = ((local49 & 0xFF00) * local31 + local73 * (local19 & 0xFF00) & 0xFF0000) + (local31 * (local49 & 0xFF00FF) + ((local19 & 0xFF00FF) * local73) & 0xFF00FF00) >> 8; - } - } - local49 = Rasteriser.textureProvider.method3229(arg0 & 0xFFFF); - if (local49 != 0) { - local49 += 256; - @Pc(125) int local125 = (local19 >> 16 & 0xFF) * local49; - if (local125 > 65535) { - local125 = 65535; - } - local73 = (local19 >> 8 & 0xFF) * local49; - if (local73 > 65535) { - local73 = 65535; - } - @Pc(150) int local150 = local49 * (local19 & 0xFF); - if (local150 > 65535) { - local150 = 65535; - } - local19 = (local150 >> 8) + (local73 & 0xFF00) + (local125 << 8 & 0xFF001F); - } - } - return local19; - } + @OriginalMember(owner = "client!bi", name = "a", descriptor = "(IIBI)I") + public static int method588(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { + @Pc(19) int local19 = Rasteriser.palette[SoftwareModel.method4585(arg1, arg2)]; + if (arg0 > 0) { + @Pc(31) int local31 = Rasteriser.textureProvider.method3238(arg0 & 0xFFFF); + @Pc(49) int local49; + @Pc(73) int local73; + if (local31 != 0) { + if (arg2 < 0) { + local49 = 0; + } else if (arg2 > 127) { + local49 = 16777215; + } else { + local49 = arg2 * 131586; + } + if (local31 == 256) { + local19 = local49; + } else { + local73 = 256 - local31; + local19 = ((local49 & 0xFF00) * local31 + local73 * (local19 & 0xFF00) & 0xFF0000) + (local31 * (local49 & 0xFF00FF) + ((local19 & 0xFF00FF) * local73) & 0xFF00FF00) >> 8; + } + } + local49 = Rasteriser.textureProvider.method3229(arg0 & 0xFFFF); + if (local49 != 0) { + local49 += 256; + @Pc(125) int local125 = (local19 >> 16 & 0xFF) * local49; + if (local125 > 65535) { + local125 = 65535; + } + local73 = (local19 >> 8 & 0xFF) * local49; + if (local73 > 65535) { + local73 = 65535; + } + @Pc(150) int local150 = local49 * (local19 & 0xFF); + if (local150 > 65535) { + local150 = 65535; + } + local19 = (local150 >> 8) + (local73 & 0xFF00) + (local125 << 8 & 0xFF001F); + } + } + return local19; + } @OriginalMember(owner = "client!eh", name = "a", descriptor = "(I[[I[[FI[[FIBIIBZBI[[FILclient!hg;)V") public static void method1324(@OriginalArg(0) int arg0, @OriginalArg(1) int[][] arg1, @OriginalArg(2) float[][] arg2, @OriginalArg(3) int arg3, @OriginalArg(4) float[][] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) byte arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(10) boolean arg9, @OriginalArg(11) byte arg10, @OriginalArg(12) int arg11, @OriginalArg(13) float[][] arg12, @OriginalArg(14) int arg13, @OriginalArg(15) GlTile arg14) { @@ -672,7 +672,7 @@ public final class Static1 { if (arg10 == 1) { local41 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 64, arg4, 128); local191 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 128, arg4, 64); - local87 = new int[] { local191, local41, local39[2], local41, local39[0], local39[2] }; + local87 = new int[]{local191, local41, local39[2], local41, local39[0], local39[2]}; } else if (arg10 == 2) { local87 = new int[6]; local41 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 128, arg4, 128); @@ -735,7 +735,7 @@ public final class Static1 { local41 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 128, arg4, 64); local191 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 96, arg4, 32); @Pc(715) int local715 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 64, arg4, 0); - local87 = new int[] { local191, local41, local39[4], local191, local39[4], local39[3], local191, local39[3], local39[2], local191, local39[2], local39[1], local191, local39[1], local715 }; + local87 = new int[]{local191, local41, local39[4], local191, local39[4], local39[3], local191, local39[3], local39[2], local191, local39[2], local39[1], local191, local39[1], local715}; } else if (arg10 == 10) { local87 = new int[9]; local41 = method3683(local29, 0.0F, local11, local17, null, arg1, arg3, arg12, local23, arg6, true, arg14, arg2, arg11, 0, arg4, 128); @@ -769,70 +769,70 @@ public final class Static1 { arg14.method1945(arg7, arg3, arg11, local39, local87, false); } - @OriginalMember(owner = "client!ql", name = "a", descriptor = "(IFII[[I[[II[[FIBIZLclient!hg;[[FII[[FI)I") - public static int method3683(@OriginalArg(0) int arg0, @OriginalArg(1) float arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int[][] arg4, @OriginalArg(5) int[][] arg5, @OriginalArg(6) int arg6, @OriginalArg(7) float[][] arg7, @OriginalArg(8) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) boolean arg10, @OriginalArg(12) GlTile arg11, @OriginalArg(13) float[][] arg12, @OriginalArg(14) int arg13, @OriginalArg(15) int arg14, @OriginalArg(16) float[][] arg15, @OriginalArg(17) int arg16) { - @Pc(20) int local20; - if (arg9 == 1) { - local20 = arg14; - arg14 = arg16; - arg16 = 128 - local20; - } else if (arg9 == 2) { - arg16 = 128 - arg16; - arg14 = 128 - arg14; - } else if (arg9 == 3) { - local20 = arg14; - arg14 = 128 - arg16; - arg16 = local20; - } - @Pc(66) float local66; - @Pc(72) float local72; - @Pc(80) int local80; - @Pc(78) float local78; - if (arg14 == 0 && arg16 == 0) { - local66 = arg15[arg6][arg13]; - local72 = arg7[arg6][arg13]; - local78 = arg12[arg6][arg13]; - local80 = arg2; - } else if (arg14 == 128 && arg16 == 0) { - local80 = arg3; - local66 = arg15[arg6 + 1][arg13]; - local72 = arg7[arg6 + 1][arg13]; - local78 = arg12[arg6 + 1][arg13]; - } else if (arg14 == 128 && arg16 == 128) { - local72 = arg7[arg6 + 1][arg13 + 1]; - local78 = arg12[arg6 + 1][arg13 + 1]; - local66 = arg15[arg6 + 1][arg13 + 1]; - local80 = arg8; - } else if (arg14 == 0 && arg16 == 128) { - local72 = arg7[arg6][arg13 + 1]; - local66 = arg15[arg6][arg13 + 1]; - local78 = arg12[arg6][arg13 + 1]; - local80 = arg0; - } else { - local78 = arg12[arg6][arg13]; - local66 = arg15[arg6][arg13]; - @Pc(219) float local219 = (float) arg16 / 128.0F; - @Pc(224) float local224 = (float) arg14 / 128.0F; - @Pc(238) float local238 = local78 + (arg12[arg6 + 1][arg13] - local78) * local224; - @Pc(253) float local253 = local66 + (arg15[arg6 + 1][arg13] - local66) * local224; - @Pc(261) float local261 = arg12[arg6][arg13 + 1]; - @Pc(269) float local269 = arg15[arg6][arg13 + 1]; - @Pc(286) float local286 = local269 + (arg15[arg6 + 1][arg13 + 1] - local269) * local224; - local72 = arg7[arg6][arg13]; - local66 = local253 + local219 * (local286 - local253); - @Pc(309) float local309 = arg7[arg6][arg13 + 1]; - @Pc(326) float local326 = local261 + (arg12[arg6 + 1][arg13 + 1] - local261) * local224; - local78 = local238 + local219 * (local326 - local238); - @Pc(352) float local352 = local309 + (arg7[arg6 + 1][arg13 + 1] - local309) * local224; - @Pc(367) float local367 = local72 + (arg7[arg6 + 1][arg13] - local72) * local224; - local72 = local367 + (local352 - local367) * local219; - @Pc(382) int local382 = Static69.method1540(arg14, arg2, arg3); - @Pc(388) int local388 = Static69.method1540(arg14, arg0, arg8); - 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(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); - } + @OriginalMember(owner = "client!ql", name = "a", descriptor = "(IFII[[I[[II[[FIBIZLclient!hg;[[FII[[FI)I") + public static int method3683(@OriginalArg(0) int arg0, @OriginalArg(1) float arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int[][] arg4, @OriginalArg(5) int[][] arg5, @OriginalArg(6) int arg6, @OriginalArg(7) float[][] arg7, @OriginalArg(8) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) boolean arg10, @OriginalArg(12) GlTile arg11, @OriginalArg(13) float[][] arg12, @OriginalArg(14) int arg13, @OriginalArg(15) int arg14, @OriginalArg(16) float[][] arg15, @OriginalArg(17) int arg16) { + @Pc(20) int local20; + if (arg9 == 1) { + local20 = arg14; + arg14 = arg16; + arg16 = 128 - local20; + } else if (arg9 == 2) { + arg16 = 128 - arg16; + arg14 = 128 - arg14; + } else if (arg9 == 3) { + local20 = arg14; + arg14 = 128 - arg16; + arg16 = local20; + } + @Pc(66) float local66; + @Pc(72) float local72; + @Pc(80) int local80; + @Pc(78) float local78; + if (arg14 == 0 && arg16 == 0) { + local66 = arg15[arg6][arg13]; + local72 = arg7[arg6][arg13]; + local78 = arg12[arg6][arg13]; + local80 = arg2; + } else if (arg14 == 128 && arg16 == 0) { + local80 = arg3; + local66 = arg15[arg6 + 1][arg13]; + local72 = arg7[arg6 + 1][arg13]; + local78 = arg12[arg6 + 1][arg13]; + } else if (arg14 == 128 && arg16 == 128) { + local72 = arg7[arg6 + 1][arg13 + 1]; + local78 = arg12[arg6 + 1][arg13 + 1]; + local66 = arg15[arg6 + 1][arg13 + 1]; + local80 = arg8; + } else if (arg14 == 0 && arg16 == 128) { + local72 = arg7[arg6][arg13 + 1]; + local66 = arg15[arg6][arg13 + 1]; + local78 = arg12[arg6][arg13 + 1]; + local80 = arg0; + } else { + local78 = arg12[arg6][arg13]; + local66 = arg15[arg6][arg13]; + @Pc(219) float local219 = (float) arg16 / 128.0F; + @Pc(224) float local224 = (float) arg14 / 128.0F; + @Pc(238) float local238 = local78 + (arg12[arg6 + 1][arg13] - local78) * local224; + @Pc(253) float local253 = local66 + (arg15[arg6 + 1][arg13] - local66) * local224; + @Pc(261) float local261 = arg12[arg6][arg13 + 1]; + @Pc(269) float local269 = arg15[arg6][arg13 + 1]; + @Pc(286) float local286 = local269 + (arg15[arg6 + 1][arg13 + 1] - local269) * local224; + local72 = arg7[arg6][arg13]; + local66 = local253 + local219 * (local286 - local253); + @Pc(309) float local309 = arg7[arg6][arg13 + 1]; + @Pc(326) float local326 = local261 + (arg12[arg6 + 1][arg13 + 1] - local261) * local224; + local78 = local238 + local219 * (local326 - local238); + @Pc(352) float local352 = local309 + (arg7[arg6 + 1][arg13 + 1] - local309) * local224; + @Pc(367) float local367 = local72 + (arg7[arg6 + 1][arg13] - local72) * local224; + local72 = local367 + (local352 - local367) * local219; + @Pc(382) int local382 = Static69.method1540(arg14, arg2, arg3); + @Pc(388) int local388 = Static69.method1540(arg14, arg0, arg8); + 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(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); + } } diff --git a/client/src/main/java/rt4/Static103.java b/client/src/main/java/rt4/Static103.java index 3f116c8..677b6e0 100644 --- a/client/src/main/java/rt4/Static103.java +++ b/client/src/main/java/rt4/Static103.java @@ -50,7 +50,7 @@ public final class Static103 { @OriginalMember(owner = "client!sa", name = "W", descriptor = "Z") public static boolean instantScreenFade = true; - @OriginalMember(owner = "client!i", name = "b", descriptor = "(IIIII)I") + @OriginalMember(owner = "client!i", name = "b", descriptor = "(IIIII)I") public static int method2235(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { if (instantScreenFade) { arg0 = 1000000; diff --git a/client/src/main/java/rt4/Static112.java b/client/src/main/java/rt4/Static112.java index 2382e37..2a7bbf7 100644 --- a/client/src/main/java/rt4/Static112.java +++ b/client/src/main/java/rt4/Static112.java @@ -5,16 +5,16 @@ import org.openrs2.deob.annotation.Pc; public final class Static112 { - @OriginalMember(owner = "client!hd", name = "e", descriptor = "Lclient!qf;") - public static Sprite aClass3_Sub2_Sub1_6; - @OriginalMember(owner = "client!d", name = "ib", descriptor = "Lclient!qf;") + @OriginalMember(owner = "client!hd", name = "e", descriptor = "Lclient!qf;") + public static Sprite aClass3_Sub2_Sub1_6; + @OriginalMember(owner = "client!d", name = "ib", descriptor = "Lclient!qf;") public static Sprite aClass3_Sub2_Sub1_1; - @OriginalMember(owner = "client!oi", name = "h", descriptor = "Lclient!qf;") - public static Sprite aClass3_Sub2_Sub1_9; - @OriginalMember(owner = "client!qi", name = "z", descriptor = "Lclient!qf;") - public static Sprite aClass3_Sub2_Sub1_10; + @OriginalMember(owner = "client!oi", name = "h", descriptor = "Lclient!qf;") + public static Sprite aClass3_Sub2_Sub1_9; + @OriginalMember(owner = "client!qi", name = "z", descriptor = "Lclient!qf;") + public static Sprite aClass3_Sub2_Sub1_10; - @OriginalMember(owner = "client!ij", name = "a", descriptor = "(B)V") + @OriginalMember(owner = "client!ij", name = "a", descriptor = "(B)V") public static void method2297() { @Pc(3) int local3 = InterfaceList.anInt4271; @Pc(9) int local9 = InterfaceList.anInt5138; diff --git a/client/src/main/java/rt4/Static114.java b/client/src/main/java/rt4/Static114.java index 3b002f7..0ec8662 100644 --- a/client/src/main/java/rt4/Static114.java +++ b/client/src/main/java/rt4/Static114.java @@ -1,14 +1,15 @@ package rt4; -import java.awt.Graphics; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.*; + public final class Static114 { - @OriginalMember(owner = "client!j", name = "O", descriptor = "[I") - public static final int[] anIntArray565 = new int[] { 1, -1, -1, 1 }; + @OriginalMember(owner = "client!j", name = "O", descriptor = "[I") + public static final int[] anIntArray565 = new int[]{1, -1, -1, 1}; @OriginalMember(owner = "client!j", name = "a", descriptor = "(BZLclient!na;)V") public static void drawTextOnScreen(@OriginalArg(1) boolean arg0, @OriginalArg(2) JagString arg1) { diff --git a/client/src/main/java/rt4/Static121.java b/client/src/main/java/rt4/Static121.java index 3f0ab07..24ae396 100644 --- a/client/src/main/java/rt4/Static121.java +++ b/client/src/main/java/rt4/Static121.java @@ -9,7 +9,7 @@ public final class Static121 { @OriginalMember(owner = "client!jg", name = "a", descriptor = "I") public static int anInt3038; - @OriginalMember(owner = "client!jg", name = "e", descriptor = "Z") + @OriginalMember(owner = "client!jg", name = "e", descriptor = "Z") public static boolean qaOpTest = false; @OriginalMember(owner = "client!jg", name = "a", descriptor = "(IBIII)V") diff --git a/client/src/main/java/rt4/Static123.java b/client/src/main/java/rt4/Static123.java index aad342d..0e9949f 100644 --- a/client/src/main/java/rt4/Static123.java +++ b/client/src/main/java/rt4/Static123.java @@ -10,23 +10,23 @@ public final class Static123 { @OriginalMember(owner = "client!jj", name = "e", descriptor = "I") public static int anInt3058 = 0; - @OriginalMember(owner = "client!jj", name = "j", descriptor = "Z") + @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") - public static int[] anIntArray292; - @OriginalMember(owner = "client!ta", name = "o", descriptor = "[I") - public static int[] anIntArray454; - @OriginalMember(owner = "client!nd", name = "s", descriptor = "I") - public static int anInt4069; + @OriginalMember(owner = "client!k", name = "l", descriptor = "[I") + public static int[] anIntArray292; + @OriginalMember(owner = "client!ta", name = "o", descriptor = "[I") + public static int[] anIntArray454; + @OriginalMember(owner = "client!nd", name = "s", descriptor = "I") + public static int anInt4069; @OriginalMember(owner = "client!qk", name = "c", descriptor = "[I") public static int[] anIntArray427; - @OriginalMember(owner = "client!lj", name = "B", descriptor = "I") - public static int anInt3555; + @OriginalMember(owner = "client!lj", name = "B", descriptor = "I") + public static int anInt3555; - @OriginalMember(owner = "client!jj", name = "a", descriptor = "(Z)V") + @OriginalMember(owner = "client!jj", name = "a", descriptor = "(Z)V") public static void topBannerRefresh() { if (!client.advertSuppressed && client.modeWhere != 2) { try { @@ -39,7 +39,8 @@ public final class Static123 { @OriginalMember(owner = "client!jj", name = "a", descriptor = "()V") public static void method2419() { SceneGraph.anInt4870 = 0; - label194: for (@Pc(3) int local3 = 0; local3 < SceneGraph.anInt917; local3++) { + label194: + 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) { @@ -146,7 +147,8 @@ public final class Static123 { local158 = SceneGraph.visibility + SceneGraph.visibility; } @Pc(430) boolean local430 = false; - label166: for (@Pc(432) int local432 = local408; local432 <= local158; local432++) { + label166: + for (@Pc(432) int local432 = local408; local432 <= local158; local432++) { for (@Pc(437) int local437 = local115; local437 <= local126; local437++) { if (SceneGraph.aBooleanArrayArray1[local432][local437]) { local430 = true; diff --git a/client/src/main/java/rt4/Static126.java b/client/src/main/java/rt4/Static126.java index 187be8e..027e441 100644 --- a/client/src/main/java/rt4/Static126.java +++ b/client/src/main/java/rt4/Static126.java @@ -5,12 +5,12 @@ import org.openrs2.deob.annotation.Pc; public final class Static126 { - @OriginalMember(owner = "client!sc", name = "z", descriptor = "[Z") + @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!rg", name = "s", descriptor = "I") + public static int anInt5574 = -1; - @OriginalMember(owner = "client!jm", name = "a", descriptor = "(Z)V") + @OriginalMember(owner = "client!jm", name = "a", descriptor = "(Z)V") public static void method2460() { if (InterfaceList.topLevelInterface != -1) { Static96.method1949(InterfaceList.topLevelInterface); diff --git a/client/src/main/java/rt4/Static131.java b/client/src/main/java/rt4/Static131.java index 1dcca35..c68ee01 100644 --- a/client/src/main/java/rt4/Static131.java +++ b/client/src/main/java/rt4/Static131.java @@ -1,16 +1,17 @@ package rt4; -import java.awt.Component; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; + public final class Static131 { - @OriginalMember(owner = "client!kd", name = "ob", descriptor = "I") + @OriginalMember(owner = "client!kd", name = "ob", descriptor = "I") public static int anInt3251 = 0; - @OriginalMember(owner = "client!kd", name = "Bb", descriptor = "I") + @OriginalMember(owner = "client!kd", name = "Bb", descriptor = "I") public static int anInt3260 = -1; @OriginalMember(owner = "client!kd", name = "a", descriptor = "([[F[[II[[FI[ILclient!fj;BLclient!gi;[[FI)V") diff --git a/client/src/main/java/rt4/Static139.java b/client/src/main/java/rt4/Static139.java index 40a3b12..6893e58 100644 --- a/client/src/main/java/rt4/Static139.java +++ b/client/src/main/java/rt4/Static139.java @@ -1,19 +1,16 @@ package rt4; -import java.awt.Color; -import java.awt.Container; -import java.awt.Graphics; -import java.awt.Insets; - import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +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") + @OriginalMember(owner = "client!l", name = "b", descriptor = "(I)V") public static void method2704() { @Pc(7) int local7 = GameShell.topMargin; @Pc(9) int local9 = GameShell.leftMargin; diff --git a/client/src/main/java/rt4/Static145.java b/client/src/main/java/rt4/Static145.java index 6949a73..1f89bfe 100644 --- a/client/src/main/java/rt4/Static145.java +++ b/client/src/main/java/rt4/Static145.java @@ -8,12 +8,12 @@ public final class Static145 { @OriginalMember(owner = "client!lf", name = "k", descriptor = "I") public static int anInt3502 = -1; - @OriginalMember(owner = "client!vg", name = "e", descriptor = "[I") - public static int[] anIntArray516; - @OriginalMember(owner = "client!ri", name = "d", descriptor = "[I") - public static int[] anIntArray188; + @OriginalMember(owner = "client!vg", name = "e", descriptor = "[I") + public static int[] anIntArray516; + @OriginalMember(owner = "client!ri", name = "d", descriptor = "[I") + public static int[] anIntArray188; - @OriginalMember(owner = "client!lf", name = "a", descriptor = "(I)V") + @OriginalMember(owner = "client!lf", name = "a", descriptor = "(I)V") public static void method2742() { if (client.gameState == 10 && GlRenderer.enabled) { client.setGameState(28); diff --git a/client/src/main/java/rt4/Static147.java b/client/src/main/java/rt4/Static147.java index a302a67..354e87d 100644 --- a/client/src/main/java/rt4/Static147.java +++ b/client/src/main/java/rt4/Static147.java @@ -6,20 +6,20 @@ import org.openrs2.deob.annotation.Pc; public final class Static147 { - @OriginalMember(owner = "client!lh", name = "z", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!lh", name = "z", descriptor = "Lclient!na;") public static final JagString aClass100_672 = JagString.parse("(U (X"); - @OriginalMember(owner = "client!fg", name = "d", descriptor = "[I") - public static final int[] anIntArray159 = new int[6]; - @OriginalMember(owner = "client!fg", name = "l", descriptor = "[I") - public static final int[] anIntArray164 = new int[6]; - @OriginalMember(owner = "client!fg", name = "m", descriptor = "[I") - public static final int[] anIntArray165 = new int[6]; - @OriginalMember(owner = "client!fg", name = "r", descriptor = "[I") - public static final int[] anIntArray169 = new int[6]; - @OriginalMember(owner = "client!fg", name = "t", descriptor = "[I") - public static final int[] anIntArray170 = new int[6]; + @OriginalMember(owner = "client!fg", name = "d", descriptor = "[I") + public static final int[] anIntArray159 = new int[6]; + @OriginalMember(owner = "client!fg", name = "l", descriptor = "[I") + public static final int[] anIntArray164 = new int[6]; + @OriginalMember(owner = "client!fg", name = "m", descriptor = "[I") + public static final int[] anIntArray165 = new int[6]; + @OriginalMember(owner = "client!fg", name = "r", descriptor = "[I") + public static final int[] anIntArray169 = new int[6]; + @OriginalMember(owner = "client!fg", name = "t", descriptor = "[I") + public static final int[] anIntArray170 = new int[6]; - @OriginalMember(owner = "client!lh", name = "b", descriptor = "(II)V") + @OriginalMember(owner = "client!lh", name = "b", descriptor = "(II)V") public static void method2761(@OriginalArg(0) int arg0) { UnderwaterMaterialRenderer.anInt3241 = arg0; MaterialManager.resetArgument(3); @@ -71,10 +71,7 @@ public final class Static147 { MiniMenu.anInt2954 = arg6; } if (!GlRenderer.enabled && !arg7) { - Rasteriser.testX = false; - if (local39 < 0 || local148 < 0 || local152 < 0 || local39 > Rasteriser.width || local148 > Rasteriser.width || local152 > Rasteriser.width) { - Rasteriser.testX = true; - } + Rasteriser.testX = local39 < 0 || local148 < 0 || local152 < 0 || local39 > Rasteriser.width || local148 > Rasteriser.width || local152 > Rasteriser.width; if (arg0.anIntArray161 == null || arg0.anIntArray161[local5] == -1) { if (arg0.anIntArray167[local5] != 12345678) { Rasteriser.fillGouraudTriangle(local156, local160, local164, local39, local148, local152, arg0.anIntArray167[local5], arg0.anIntArray172[local5], arg0.anIntArray171[local5]); @@ -99,7 +96,7 @@ public final class Static147 { Component.fonts.clear(); } - @OriginalMember(owner = "client!bi", name = "a", descriptor = "(IIIIIIII)Z") + @OriginalMember(owner = "client!bi", name = "a", descriptor = "(IIIIIIII)Z") public static boolean method583(@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) int arg6, @OriginalArg(7) int arg7) { if (arg1 < arg2 && arg1 < arg3 && arg1 < arg4) { return false; @@ -117,14 +114,14 @@ public final class Static147 { } } - @OriginalMember(owner = "client!ri", name = "a", descriptor = "(II)I") - public static int method1640(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - arg1 = arg1 * (arg0 & 0x7F) >> 7; - if (arg1 < 2) { - arg1 = 2; - } else if (arg1 > 126) { - arg1 = 126; - } - return (arg0 & 0xFF80) + arg1; - } + @OriginalMember(owner = "client!ri", name = "a", descriptor = "(II)I") + public static int method1640(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + arg1 = arg1 * (arg0 & 0x7F) >> 7; + if (arg1 < 2) { + arg1 = 2; + } else if (arg1 > 126) { + arg1 = 126; + } + return (arg0 & 0xFF80) + arg1; + } } diff --git a/client/src/main/java/rt4/Static152.java b/client/src/main/java/rt4/Static152.java index 375b5d4..deb1671 100644 --- a/client/src/main/java/rt4/Static152.java +++ b/client/src/main/java/rt4/Static152.java @@ -6,7 +6,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static152 { - @OriginalMember(owner = "client!ma", name = "z", descriptor = "I") + @OriginalMember(owner = "client!ma", name = "z", descriptor = "I") public static int anInt3604 = -1; @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IBIIIII)V") diff --git a/client/src/main/java/rt4/Static156.java b/client/src/main/java/rt4/Static156.java index eb31c4f..95d63d0 100644 --- a/client/src/main/java/rt4/Static156.java +++ b/client/src/main/java/rt4/Static156.java @@ -4,13 +4,13 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static156 { - @OriginalMember(owner = "client!mf", name = "X", descriptor = "I") + @OriginalMember(owner = "client!mf", name = "X", descriptor = "I") public static int loginScreenId; - @OriginalMember(owner = "client!tb", name = "Q", descriptor = "I") + @OriginalMember(owner = "client!tb", name = "Q", descriptor = "I") public static int anInt5276 = 0; - @OriginalMember(owner = "client!bc", name = "Z", descriptor = "I") - public static int anInt437; - @OriginalMember(owner = "client!rc", name = "p", descriptor = "I") - public static int anInt1142 = 0; + @OriginalMember(owner = "client!bc", name = "Z", descriptor = "I") + public static int anInt437; + @OriginalMember(owner = "client!rc", name = "p", descriptor = "I") + public static int anInt1142 = 0; } diff --git a/client/src/main/java/rt4/Static158.java b/client/src/main/java/rt4/Static158.java index bf2ca98..3619424 100644 --- a/client/src/main/java/rt4/Static158.java +++ b/client/src/main/java/rt4/Static158.java @@ -7,10 +7,10 @@ public final class Static158 { @OriginalMember(owner = "client!mh", name = "X", descriptor = "I") public static int anInt3851 = -1; - @OriginalMember(owner = "client!mg", name = "Q", descriptor = "I") - public static int anInt3811 = 0; + @OriginalMember(owner = "client!mg", name = "Q", descriptor = "I") + public static int anInt3811 = 0; - @OriginalMember(owner = "client!mh", name = "h", descriptor = "(B)V") + @OriginalMember(owner = "client!mh", name = "h", descriptor = "(B)V") public static void decodeNpcFiles() { @Pc(10) int local10 = LoginManager.npcSpawnsFilesBuffer.length; for (@Pc(16) int local16 = 0; local16 < local10; local16++) { diff --git a/client/src/main/java/rt4/Static160.java b/client/src/main/java/rt4/Static160.java index f452ef2..08a6962 100644 --- a/client/src/main/java/rt4/Static160.java +++ b/client/src/main/java/rt4/Static160.java @@ -6,10 +6,10 @@ import org.openrs2.deob.annotation.Pc; public final class Static160 { - @OriginalMember(owner = "client!ig", name = "i", descriptor = "I") - public static int anInt2886; + @OriginalMember(owner = "client!ig", name = "i", descriptor = "I") + public static int anInt2886; - @OriginalMember(owner = "client!mj", name = "a", descriptor = "(IILclient!be;IB)V") + @OriginalMember(owner = "client!mj", name = "a", descriptor = "(IILclient!be;IB)V") public static void method3047(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) Component arg2, @OriginalArg(3) int arg3) { if (GlRenderer.enabled) { GlRaster.setClip(arg0, arg1, arg2.width + arg0, arg2.height + arg1); @@ -24,9 +24,9 @@ public final class Static160 { SoftwareRaster.method2504(arg0, arg1, arg2.anIntArray37, arg2.anIntArray45); } } else if (GlRenderer.enabled) { - ((GlSprite) Sprites.compass).renderRotatedTransparent(arg0, arg1, arg2.width, arg2.height, Sprites.compass.width / 2, Sprites.compass.height / 2, (int)Camera.yawTarget, 256, (GlSprite) arg2.method489(false)); + ((GlSprite) Sprites.compass).renderRotatedTransparent(arg0, arg1, arg2.width, arg2.height, Sprites.compass.width / 2, Sprites.compass.height / 2, (int) Camera.yawTarget, 256, (GlSprite) arg2.method489(false)); } else { - ((SoftwareSprite) Sprites.compass).renderRotated(arg0, arg1, arg2.width, arg2.height, Sprites.compass.width / 2, Sprites.compass.height / 2, (int)Camera.yawTarget, arg2.anIntArray37, arg2.anIntArray45); + ((SoftwareSprite) Sprites.compass).renderRotated(arg0, arg1, arg2.width, arg2.height, Sprites.compass.width / 2, Sprites.compass.height / 2, (int) Camera.yawTarget, arg2.anIntArray37, arg2.anIntArray45); } InterfaceList.rectangleRedraw[arg3] = true; } diff --git a/client/src/main/java/rt4/Static164.java b/client/src/main/java/rt4/Static164.java index f02de9b..98e83d7 100644 --- a/client/src/main/java/rt4/Static164.java +++ b/client/src/main/java/rt4/Static164.java @@ -11,7 +11,7 @@ public final class Static164 { @OriginalMember(owner = "client!na", name = "W", descriptor = "Z") public static boolean newTab; - @OriginalMember(owner = "client!na", name = "cb", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!na", name = "cb", descriptor = "Lclient!na;") public static final JagString aClass100_770 = JagString.parse(":allyreq:"); @OriginalMember(owner = "client!na", name = "a", descriptor = "(IIIIIIIZ)Z") @@ -132,9 +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); - if (local586.mapSceneId != -1 && !Static33.method867(arg0, local586, arg2, local28)) { - return false; - } + return local586.mapSceneId == -1 || Static33.method867(arg0, local586, arg2, local28); } return true; } @@ -152,46 +150,46 @@ public final class Static164 { } } - @OriginalMember(owner = "client!wb", name = "a", descriptor = "(Lclient!ba;IILclient!ba;Z)I") - public static int method4595(@OriginalArg(0) World arg0, @OriginalArg(1) int arg1, @OriginalArg(3) World arg2, @OriginalArg(4) boolean arg3) { - if (arg1 == 1) { - @Pc(11) int local11 = arg0.players; - @Pc(14) int local14 = arg2.players; - if (!arg3) { - if (local14 == -1) { - local14 = 2001; - } - if (local11 == -1) { - local11 = 2001; - } - } - return local11 - local14; - } else if (arg1 == 2) { - return arg0.getWorldInfo().name.compare(arg2.getWorldInfo().name); - } else if (arg1 == 3) { - if (arg0.activity.strEquals(aClass100_570)) { - if (arg2.activity.strEquals(aClass100_570)) { - return 0; - } else if (arg3) { - return -1; - } else { - return 1; - } - } else if (arg2.activity.strEquals(aClass100_570)) { - return arg3 ? 1 : -1; - } else { - return arg0.activity.compare(arg2.activity); - } - } else if (arg1 == 4) { - return arg0.isLootShare() ? (arg2.isLootShare() ? 0 : 1) : arg2.isLootShare() ? -1 : 0; - } else if (arg1 == 5) { - return arg0.isQuickChat() ? (arg2.isQuickChat() ? 0 : 1) : (arg2.isQuickChat() ? -1 : 0); - } else if (arg1 == 6) { - return arg0.isPvp() ? (arg2.isPvp() ? 0 : 1) : (arg2.isPvp() ? -1 : 0); - } else if (arg1 == 7) { - return arg0.isMembers() ? (arg2.isMembers() ? 0 : 1) : (arg2.isMembers() ? -1 : 0); - } else { - return arg0.id - arg2.id; - } - } + @OriginalMember(owner = "client!wb", name = "a", descriptor = "(Lclient!ba;IILclient!ba;Z)I") + public static int method4595(@OriginalArg(0) World arg0, @OriginalArg(1) int arg1, @OriginalArg(3) World arg2, @OriginalArg(4) boolean arg3) { + if (arg1 == 1) { + @Pc(11) int local11 = arg0.players; + @Pc(14) int local14 = arg2.players; + if (!arg3) { + if (local14 == -1) { + local14 = 2001; + } + if (local11 == -1) { + local11 = 2001; + } + } + return local11 - local14; + } else if (arg1 == 2) { + return arg0.getWorldInfo().name.compare(arg2.getWorldInfo().name); + } else if (arg1 == 3) { + if (arg0.activity.strEquals(aClass100_570)) { + if (arg2.activity.strEquals(aClass100_570)) { + return 0; + } else if (arg3) { + return -1; + } else { + return 1; + } + } else if (arg2.activity.strEquals(aClass100_570)) { + return arg3 ? 1 : -1; + } else { + return arg0.activity.compare(arg2.activity); + } + } else if (arg1 == 4) { + return arg0.isLootShare() ? (arg2.isLootShare() ? 0 : 1) : arg2.isLootShare() ? -1 : 0; + } else if (arg1 == 5) { + return arg0.isQuickChat() ? (arg2.isQuickChat() ? 0 : 1) : (arg2.isQuickChat() ? -1 : 0); + } else if (arg1 == 6) { + return arg0.isPvp() ? (arg2.isPvp() ? 0 : 1) : (arg2.isPvp() ? -1 : 0); + } else if (arg1 == 7) { + return arg0.isMembers() ? (arg2.isMembers() ? 0 : 1) : (arg2.isMembers() ? -1 : 0); + } else { + return arg0.id - arg2.id; + } + } } diff --git a/client/src/main/java/rt4/Static165.java b/client/src/main/java/rt4/Static165.java index 8124b80..3139bd0 100644 --- a/client/src/main/java/rt4/Static165.java +++ b/client/src/main/java/rt4/Static165.java @@ -9,7 +9,7 @@ public final class Static165 { @OriginalMember(owner = "client!nb", name = "i", descriptor = "Lclient!qf;") public static Sprite aClass3_Sub2_Sub1_8; - @OriginalMember(owner = "client!nb", name = "n", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!nb", name = "n", descriptor = "Lclient!na;") public static final JagString DETAILS = JagString.parse("details"); @OriginalMember(owner = "client!nb", name = "a", descriptor = "(IIIIIIIIII)V") diff --git a/client/src/main/java/rt4/Static173.java b/client/src/main/java/rt4/Static173.java index d8a00ce..e1dc8d7 100644 --- a/client/src/main/java/rt4/Static173.java +++ b/client/src/main/java/rt4/Static173.java @@ -63,34 +63,34 @@ public final class Static173 { } } - @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!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 index 1c799d4..201b971 100644 --- a/client/src/main/java/rt4/Static176.java +++ b/client/src/main/java/rt4/Static176.java @@ -8,19 +8,19 @@ 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!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!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;") + @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"); @@ -55,13 +55,13 @@ public final class Static176 { } else { @Pc(62) JagString local62 = aClass100_230; if (client.modeWhere != 0) { - local62 = JagString.concatenate(new JagString[] { aClass100_193, JagString.parseInt(local3.id + 7000) }); + 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}); + 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 }); + @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; diff --git a/client/src/main/java/rt4/Static182.java b/client/src/main/java/rt4/Static182.java index 6b48f52..cf06e76 100644 --- a/client/src/main/java/rt4/Static182.java +++ b/client/src/main/java/rt4/Static182.java @@ -6,20 +6,20 @@ 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") + @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") + @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 = "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") + @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; diff --git a/client/src/main/java/rt4/Static191.java b/client/src/main/java/rt4/Static191.java index 439fb17..b8cd1ec 100644 --- a/client/src/main/java/rt4/Static191.java +++ b/client/src/main/java/rt4/Static191.java @@ -4,7 +4,7 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static191 { - @OriginalMember(owner = "client!pg", name = "fb", descriptor = "I") + @OriginalMember(owner = "client!pg", name = "fb", descriptor = "I") public static final int anInt4506 = 50; @OriginalMember(owner = "client!pg", name = "P", descriptor = "[Lclient!na;") @@ -16,8 +16,8 @@ public final class Static191 { @OriginalMember(owner = "client!pg", name = "R", descriptor = "[I") public static final int[] anIntArray385 = new int[anInt4506]; - @OriginalMember(owner = "client!pg", name = "T", descriptor = "[I") - public static final int[] anIntArray386 = new int[] { 76, 8, 137, 4, 0, 1, 38, 2, 19 }; + @OriginalMember(owner = "client!pg", name = "T", descriptor = "[I") + public static final int[] anIntArray386 = new int[]{76, 8, 137, 4, 0, 1, 38, 2, 19}; @OriginalMember(owner = "client!pg", name = "V", descriptor = "I") public static final int anInt4504 = 50; diff --git a/client/src/main/java/rt4/Static193.java b/client/src/main/java/rt4/Static193.java index f6af03b..40c2783 100644 --- a/client/src/main/java/rt4/Static193.java +++ b/client/src/main/java/rt4/Static193.java @@ -6,9 +6,9 @@ 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") + @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;") @@ -235,19 +235,19 @@ public final class Static193 { 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!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 index c03ad6e..cb0cdb1 100644 --- a/client/src/main/java/rt4/Static217.java +++ b/client/src/main/java/rt4/Static217.java @@ -9,7 +9,7 @@ public final class Static217 { @OriginalMember(owner = "client!rj", name = "R", descriptor = "I") public static int anInt4903; - @OriginalMember(owner = "client!rj", name = "U", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!rj", name = "U", descriptor = "Lclient!ih;") public static final LinkedList aClass69_116 = new LinkedList(); @OriginalMember(owner = "client!rj", name = "Z", descriptor = "[I") diff --git a/client/src/main/java/rt4/Static221.java b/client/src/main/java/rt4/Static221.java index 8f27267..787e610 100644 --- a/client/src/main/java/rt4/Static221.java +++ b/client/src/main/java/rt4/Static221.java @@ -6,9 +6,9 @@ import org.openrs2.deob.annotation.Pc; public final class Static221 { - @OriginalMember(owner = "client!cl", name = "ab", descriptor = "[I") - public static final int[] anIntArray83 = new int[256]; - @OriginalMember(owner = "client!s", name = "a", descriptor = "[I") + @OriginalMember(owner = "client!cl", name = "ab", descriptor = "[I") + public static final int[] anIntArray83 = new int[256]; + @OriginalMember(owner = "client!s", name = "a", descriptor = "[I") public static int[] tt; @OriginalMember(owner = "client!nd", name = "y", descriptor = "Lclient!mm;") public static SoftwareSprite aClass3_Sub2_Sub1_Sub1_3; diff --git a/client/src/main/java/rt4/Static226.java b/client/src/main/java/rt4/Static226.java index c215f9a..9b374a7 100644 --- a/client/src/main/java/rt4/Static226.java +++ b/client/src/main/java/rt4/Static226.java @@ -5,14 +5,14 @@ import org.openrs2.deob.annotation.Pc; public final class Static226 { - @OriginalMember(owner = "client!sf", name = "i", descriptor = "I") + @OriginalMember(owner = "client!sf", name = "i", descriptor = "I") public static int anInt5084 = 0; - @OriginalMember(owner = "client!ml", name = "Q", descriptor = "I") - public static int anInt3953 = 0; - @OriginalMember(owner = "client!wl", name = "u", descriptor = "I") - public static int anInt5895 = 0; + @OriginalMember(owner = "client!ml", name = "Q", descriptor = "I") + public static int anInt3953 = 0; + @OriginalMember(owner = "client!wl", name = "u", descriptor = "I") + public static int anInt5895 = 0; - @OriginalMember(owner = "client!sf", name = "b", descriptor = "(B)V") + @OriginalMember(owner = "client!sf", name = "b", descriptor = "(B)V") public static void method3901() { @Pc(16) int local16 = Fonts.b12Full.getStringWidth(LocalizedText.CHOOSE_OPTION); @Pc(18) int local18; diff --git a/client/src/main/java/rt4/Static231.java b/client/src/main/java/rt4/Static231.java index 6df6927..a8b7179 100644 --- a/client/src/main/java/rt4/Static231.java +++ b/client/src/main/java/rt4/Static231.java @@ -93,7 +93,7 @@ public final class Static231 { } } - @OriginalMember(owner = "client!ed", name = "a", descriptor = "(ZIIII)V") + @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); diff --git a/client/src/main/java/rt4/Static232.java b/client/src/main/java/rt4/Static232.java index 9572b49..908350f 100644 --- a/client/src/main/java/rt4/Static232.java +++ b/client/src/main/java/rt4/Static232.java @@ -4,7 +4,7 @@ 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(); + @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 56cff7d..4e66f22 100644 --- a/client/src/main/java/rt4/Static233.java +++ b/client/src/main/java/rt4/Static233.java @@ -18,7 +18,7 @@ public final class Static233 { @OriginalMember(owner = "client!t", name = "y", descriptor = "I") public static int loadingScreenState = 0; - @OriginalMember(owner = "client!t", name = "a", descriptor = "(IIIZIII)V") + @OriginalMember(owner = "client!t", name = "a", descriptor = "(IIIZIII)V") public static void method4000(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { @Pc(3) int local3 = 0; @Pc(5) MapMarker[] local5 = MiniMap.hintMapMarkers; diff --git a/client/src/main/java/rt4/Static241.java b/client/src/main/java/rt4/Static241.java index f3afbf4..903c3bb 100644 --- a/client/src/main/java/rt4/Static241.java +++ b/client/src/main/java/rt4/Static241.java @@ -6,16 +6,16 @@ import org.openrs2.deob.annotation.Pc; public final class Static241 { - @OriginalMember(owner = "client!th", name = "m", descriptor = "[Lclient!be;") + @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") + @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") + @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; @@ -34,7 +34,7 @@ public final class Static241 { } } - @OriginalMember(owner = "client!th", name = "a", descriptor = "(BIIIII)V") + @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; @@ -101,10 +101,10 @@ public final class Static241 { } } - @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!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 index cf84b5e..a0a3f76 100644 --- a/client/src/main/java/rt4/Static247.java +++ b/client/src/main/java/rt4/Static247.java @@ -7,21 +7,21 @@ 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 }; + 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 }; + 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 }; + 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 }; + 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 }; + 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 }; + 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") + @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) { @@ -37,113 +37,107 @@ public final class Static247 { } @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 = false; - if (local307 < 0 || local323 < 0 || local291 < 0 || local307 > Rasteriser.width || local323 > Rasteriser.width || local291 > Rasteriser.width) { - Rasteriser.testX = true; - } - 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 = false; - if (local275 < 0 || local291 < 0 || local323 < 0 || local275 > Rasteriser.width || local291 > Rasteriser.width || local323 > Rasteriser.width) { - Rasteriser.testX = true; - } - 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)); - } - } + 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) { diff --git a/client/src/main/java/rt4/Static267.java b/client/src/main/java/rt4/Static267.java index d274e88..1a351a5 100644 --- a/client/src/main/java/rt4/Static267.java +++ b/client/src/main/java/rt4/Static267.java @@ -7,16 +7,16 @@ import org.openrs2.deob.annotation.Pc; public final class Static267 { @OriginalMember(owner = "client!vl", name = "e", descriptor = "[I") - public static final int[] anIntArray517 = new int[] { 1, 2, 4, 8 }; + public static final int[] anIntArray517 = new int[]{1, 2, 4, 8}; @OriginalMember(owner = "client!je", name = "U", descriptor = "Lclient!na;") public static final JagString aClass100_588 = JagString.parse("showingVideoAd"); - @OriginalMember(owner = "client!vl", name = "l", descriptor = "I") + @OriginalMember(owner = "client!vl", name = "l", descriptor = "I") public static int anInt5776 = 0; - @OriginalMember(owner = "client!wb", name = "b", descriptor = "[I") - public static int[] anIntArray562; + @OriginalMember(owner = "client!wb", name = "b", descriptor = "[I") + public static int[] anIntArray562; - @OriginalMember(owner = "client!vl", name = "a", descriptor = "(I)Z") + @OriginalMember(owner = "client!vl", name = "a", descriptor = "(I)Z") public static boolean isShowingVideoAd() { if (client.objectTag) { try { diff --git a/client/src/main/java/rt4/Static34.java b/client/src/main/java/rt4/Static34.java index f814087..3ae9f0b 100644 --- a/client/src/main/java/rt4/Static34.java +++ b/client/src/main/java/rt4/Static34.java @@ -5,7 +5,7 @@ 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 }; + 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"); @@ -44,12 +44,12 @@ public final class Static34 { 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 }; + 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") + @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 ff6d6ef..1a56c3d 100644 --- a/client/src/main/java/rt4/Static36.java +++ b/client/src/main/java/rt4/Static36.java @@ -7,21 +7,21 @@ import org.openrs2.deob.annotation.Pc; public final class Static36 { @OriginalMember(owner = "client!fk", name = "e", descriptor = "I") - public static int anInt1885; + public static int anInt1885; @OriginalMember(owner = "client!bj", name = "s", descriptor = "I") public static int anInt660 = -1; - @OriginalMember(owner = "client!kl", name = "s", descriptor = "I") - public static int anInt3337 = 0; + @OriginalMember(owner = "client!kl", name = "s", descriptor = "I") + public static int anInt3337 = 0; @OriginalMember(owner = "client!jk", name = "p", descriptor = "I") public static int anInt3075 = -1; @OriginalMember(owner = "client!df", name = "n", descriptor = "I") public static int anInt1396 = 0; @OriginalMember(owner = "client!di", name = "H", descriptor = "Z") - public static boolean aBoolean84 = false; - @OriginalMember(owner = "client!pm", name = "hb", descriptor = "I") - public static int anInt4620; + public static boolean aBoolean84 = false; + @OriginalMember(owner = "client!pm", name = "hb", descriptor = "I") + public static int anInt4620; - @OriginalMember(owner = "client!client", name = "a", descriptor = "(Lclient!be;)Lclient!be;") + @OriginalMember(owner = "client!client", name = "a", descriptor = "(Lclient!be;)Lclient!be;") public static Component method938(@OriginalArg(0) Component arg0) { @Pc(4) int local4 = InterfaceList.getServerActiveProperties(arg0).method505(); if (local4 == 0) { diff --git a/client/src/main/java/rt4/Static38.java b/client/src/main/java/rt4/Static38.java index 6337afd..1081301 100644 --- a/client/src/main/java/rt4/Static38.java +++ b/client/src/main/java/rt4/Static38.java @@ -6,9 +6,9 @@ import org.openrs2.deob.annotation.Pc; public final class Static38 { - @OriginalMember(owner = "client!di", name = "q", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array53 = new JagString[5]; - @OriginalMember(owner = "client!cn", name = "B", descriptor = "I") + @OriginalMember(owner = "client!di", name = "q", descriptor = "[Lclient!na;") + public static final JagString[] aClass100Array53 = new JagString[5]; + @OriginalMember(owner = "client!cn", name = "B", descriptor = "I") public static int anInt1196 = 1; @OriginalMember(owner = "client!cn", name = "L", descriptor = "I") @@ -88,7 +88,7 @@ public final class Static38 { } } - @OriginalMember(owner = "client!cn", name = "a", descriptor = "(IIIIIIIIII)V") + @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); diff --git a/client/src/main/java/rt4/Static4.java b/client/src/main/java/rt4/Static4.java index dcecd32..5a5cdfb 100644 --- a/client/src/main/java/rt4/Static4.java +++ b/client/src/main/java/rt4/Static4.java @@ -9,10 +9,10 @@ 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") + @OriginalMember(owner = "client!ac", name = "n", descriptor = "I") public static int mouseOverInventoryObjectIndex = 0; - @OriginalMember(owner = "client!ac", name = "a", descriptor = "(IIII)I") + @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; @@ -26,34 +26,34 @@ public final class Static4 { 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!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/Static40.java b/client/src/main/java/rt4/Static40.java index 70a60c1..487a21e 100644 --- a/client/src/main/java/rt4/Static40.java +++ b/client/src/main/java/rt4/Static40.java @@ -66,7 +66,7 @@ public final class Static40 { anInt4035 = arg0; } - @OriginalMember(owner = "client!da", name = "h", descriptor = "(B)V") + @OriginalMember(owner = "client!da", name = "h", descriptor = "(B)V") public static void method1019() { Component.sprites.removeSoft(); Component.models.removeSoft(); diff --git a/client/src/main/java/rt4/Static44.java b/client/src/main/java/rt4/Static44.java index 3092fe2..32d720b 100644 --- a/client/src/main/java/rt4/Static44.java +++ b/client/src/main/java/rt4/Static44.java @@ -9,7 +9,7 @@ public final class Static44 { @OriginalMember(owner = "client!dh", name = "a", descriptor = "Z") public static boolean aBoolean83 = false; - @OriginalMember(owner = "client!dh", name = "i", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!dh", name = "i", descriptor = "Lclient!na;") public static final JagString IMG1 = JagString.parse(""); @OriginalMember(owner = "client!d", name = "R", descriptor = "Lclient!be;") public static Component aClass13_10 = null; @@ -19,7 +19,7 @@ public final class Static44 { @Pc(9) ComponentPointer local9 = new ComponentPointer(); local9.anInt5879 = arg2; local9.anInt5878 = arg0; - InterfaceList.openInterfaces.put(local9, (long) arg1); + InterfaceList.openInterfaces.put(local9, arg1); InterfaceList.method1753(arg0); @Pc(28) Component local28 = InterfaceList.getComponent(arg1); if (local28 != null) { diff --git a/client/src/main/java/rt4/Static49.java b/client/src/main/java/rt4/Static49.java index c6cc084..f4aa869 100644 --- a/client/src/main/java/rt4/Static49.java +++ b/client/src/main/java/rt4/Static49.java @@ -9,14 +9,15 @@ public final class Static49 { @OriginalMember(owner = "client!e", name = "pc", descriptor = "[I") public static final int[] anIntArray132 = new int[4]; @OriginalMember(owner = "client!em", name = "D", descriptor = "I") - public static int gregorianDateSeed; + public static int gregorianDateSeed; - @OriginalMember(owner = "client!dm", name = "a", descriptor = "(BII[B)Z") + @OriginalMember(owner = "client!dm", name = "a", descriptor = "(BII[B)Z") public static boolean method1201(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) byte[] arg2) { @Pc(15) boolean local15 = true; @Pc(17) int local17 = -1; @Pc(22) Buffer local22 = new Buffer(arg2); - label70: while (true) { + label70: + while (true) { @Pc(26) int local26 = local22.gVarSmart(); if (local26 == 0) { return local15; diff --git a/client/src/main/java/rt4/Static5.java b/client/src/main/java/rt4/Static5.java index 0abf552..a117b79 100644 --- a/client/src/main/java/rt4/Static5.java +++ b/client/src/main/java/rt4/Static5.java @@ -6,8 +6,8 @@ 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 = "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("
"); diff --git a/client/src/main/java/rt4/Static59.java b/client/src/main/java/rt4/Static59.java index 5a2b982..5ac1c9c 100644 --- a/client/src/main/java/rt4/Static59.java +++ b/client/src/main/java/rt4/Static59.java @@ -4,7 +4,7 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static59 { - @OriginalMember(owner = "client!ej", name = "h", descriptor = "(I)V") + @OriginalMember(owner = "client!ej", name = "h", descriptor = "(I)V") public static void method1372() { if (Static226.anInt3953 == 2) { if (ScriptRunner.anInt3751 == Mouse.anInt5850 && ScriptRunner.anInt1892 == Static226.anInt5895) { diff --git a/client/src/main/java/rt4/Static69.java b/client/src/main/java/rt4/Static69.java index 96f5b33..a1416c1 100644 --- a/client/src/main/java/rt4/Static69.java +++ b/client/src/main/java/rt4/Static69.java @@ -9,8 +9,8 @@ public final class Static69 { @OriginalMember(owner = "client!fh", name = "cb", descriptor = "Lsignlink!ll;") public static SignLink signLink; - @OriginalMember(owner = "client!fh", name = "U", descriptor = "[[Z") - public static final boolean[][] aBooleanArrayArray2 = new boolean[][] { new boolean[0], { true, false, true }, { true, false, false, true }, { false, false, true, true }, { true, true, false }, { false, true, true }, { true, false, false, true }, { false, false, false, true, true }, { false, true, true }, { true, false, true, true, true }, { false, true, true, true, true }, { false, true, true, true, true, false } }; + @OriginalMember(owner = "client!fh", name = "U", descriptor = "[[Z") + public static final boolean[][] aBooleanArrayArray2 = new boolean[][]{new boolean[0], {true, false, true}, {true, false, false, true}, {false, false, true, true}, {true, true, false}, {false, true, true}, {true, false, false, true}, {false, false, false, true, true}, {false, true, true}, {true, false, true, true, true}, {false, true, true, true, true}, {false, true, true, true, true, false}}; @OriginalMember(owner = "client!fh", name = "a", descriptor = "(IIII)I") public static int method1540(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { diff --git a/client/src/main/java/rt4/Static7.java b/client/src/main/java/rt4/Static7.java index 61401c1..32fed9d 100644 --- a/client/src/main/java/rt4/Static7.java +++ b/client/src/main/java/rt4/Static7.java @@ -5,10 +5,10 @@ import org.openrs2.deob.annotation.Pc; public final class Static7 { - @OriginalMember(owner = "client!ah", name = "t", descriptor = "I") + @OriginalMember(owner = "client!ah", name = "t", descriptor = "I") public static int anInt986; - @OriginalMember(owner = "client!ah", name = "p", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!ah", name = "p", descriptor = "Lclient!ih;") public static final LinkedList aClass69_32 = new LinkedList(); @OriginalMember(owner = "client!ah", name = "b", descriptor = "(I)V") diff --git a/client/src/main/java/rt4/Static70.java b/client/src/main/java/rt4/Static70.java index cb1b61d..e37de3e 100644 --- a/client/src/main/java/rt4/Static70.java +++ b/client/src/main/java/rt4/Static70.java @@ -16,21 +16,21 @@ public final class Static70 { public static final JagString aClass100_760 = JagString.parse(")1"); @OriginalMember(owner = "client!sj", name = "w", descriptor = "Lclient!na;") public static final JagString aClass100_978 = JagString.parse("<)4col>"); - @OriginalMember(owner = "client!jb", name = "c", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!jb", name = "c", descriptor = "Lclient!na;") public static final JagString aClass100_583 = JagString.parse("(Y<)4col>"); @OriginalMember(owner = "client!fi", name = "a", descriptor = "(BI)Lclient!na;") public static JagString method1548(@OriginalArg(1) int arg0) { @Pc(9) JagString local9 = JagString.parseInt(arg0); for (@Pc(21) int local21 = local9.length() - 3; local21 > 0; local21 -= 3) { - local9 = JagString.concatenate(new JagString[] { local9.substring(local21, 0), aClass100_760, local9.substring(local21) }); + local9 = JagString.concatenate(new JagString[]{local9.substring(local21, 0), aClass100_760, local9.substring(local21)}); } if (local9.length() > 9) { - return JagString.concatenate(new JagString[] { aClass100_1043, local9.substring(local9.length() - 8, 0), LocalizedText.MILLION_SHORT, MiniMenu.OPEN_PARENTHESIS, local9, aClass100_583 }); + return JagString.concatenate(new JagString[]{aClass100_1043, local9.substring(local9.length() - 8, 0), LocalizedText.MILLION_SHORT, MiniMenu.OPEN_PARENTHESIS, local9, aClass100_583}); } else if (local9.length() > 6) { - return JagString.concatenate(new JagString[] { aClass100_589, local9.substring(local9.length() - 4, 0), LocalizedText.THOUSAND_SHORT, MiniMenu.OPEN_PARENTHESIS, local9, aClass100_583 }); + return JagString.concatenate(new JagString[]{aClass100_589, local9.substring(local9.length() - 4, 0), LocalizedText.THOUSAND_SHORT, MiniMenu.OPEN_PARENTHESIS, local9, aClass100_583}); } else { - return JagString.concatenate(new JagString[] { aClass100_1101, local9, aClass100_978 }); + return JagString.concatenate(new JagString[]{aClass100_1101, local9, aClass100_978}); } } diff --git a/client/src/main/java/rt4/Static73.java b/client/src/main/java/rt4/Static73.java index 6f024e9..6f1b0f0 100644 --- a/client/src/main/java/rt4/Static73.java +++ b/client/src/main/java/rt4/Static73.java @@ -13,7 +13,7 @@ public final class Static73 { @OriginalMember(owner = "client!ph", name = "b", descriptor = "[[Lclient!li;") public static final Environment[][] aClass92ArrayArray1 = new Environment[13][13]; @OriginalMember(owner = "client!li", name = "t", descriptor = "I") - public static int anInt3534; + public static int anInt3534; @OriginalMember(owner = "client!mi", name = "Z", descriptor = "I") public static int anInt3893; @OriginalMember(owner = "client!gl", name = "f", descriptor = "I") diff --git a/client/src/main/java/rt4/Static79.java b/client/src/main/java/rt4/Static79.java index da814b4..1511520 100644 --- a/client/src/main/java/rt4/Static79.java +++ b/client/src/main/java/rt4/Static79.java @@ -6,7 +6,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static79 { - @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IIIIIIII)V") + @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; diff --git a/client/src/main/java/rt4/Static8.java b/client/src/main/java/rt4/Static8.java index fc3ffba..1d527c6 100644 --- a/client/src/main/java/rt4/Static8.java +++ b/client/src/main/java/rt4/Static8.java @@ -6,7 +6,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static8 { - @OriginalMember(owner = "client!aj", name = "Z", descriptor = "[I") + @OriginalMember(owner = "client!aj", name = "Z", descriptor = "[I") public static int[] anIntArray8; @OriginalMember(owner = "client!aj", name = "a", descriptor = "(IIIZIII)V") diff --git a/client/src/main/java/rt4/Static81.java b/client/src/main/java/rt4/Static81.java index 25a32fb..904ccf9 100644 --- a/client/src/main/java/rt4/Static81.java +++ b/client/src/main/java/rt4/Static81.java @@ -1,11 +1,11 @@ package rt4; -import java.awt.Point; - import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.*; + public final class Static81 { @OriginalMember(owner = "client!gg", name = "Z", descriptor = "I") @@ -13,10 +13,10 @@ public final class Static81 { @OriginalMember(owner = "client!gg", name = "db", descriptor = "I") public static int anInt2225 = -1; - @OriginalMember(owner = "client!ja", name = "r", descriptor = "I") + @OriginalMember(owner = "client!ja", name = "r", descriptor = "I") public static int anInt2941 = -1; - @OriginalMember(owner = "client!gg", name = "c", descriptor = "(II)V") + @OriginalMember(owner = "client!gg", name = "c", descriptor = "(II)V") public static void method1750(@OriginalArg(0) int arg0) { if (!Preferences.cursorsEnabled) { arg0 = -1; diff --git a/client/src/main/java/rt4/Static87.java b/client/src/main/java/rt4/Static87.java index d818b61..1e9f375 100644 --- a/client/src/main/java/rt4/Static87.java +++ b/client/src/main/java/rt4/Static87.java @@ -6,8 +6,8 @@ import org.openrs2.deob.annotation.Pc; public final class Static87 { - @OriginalMember(owner = "client!bj", name = "V", descriptor = "I") - public static final int anInt671 = 0x332d25; + @OriginalMember(owner = "client!bj", name = "V", descriptor = "I") + public static final int anInt671 = 0x332d25; @OriginalMember(owner = "client!rl", name = "Z", descriptor = "I") public static final int anInt4938 = 0x766654; @@ -17,30 +17,30 @@ public final class Static87 { @OriginalMember(owner = "client!oj", name = "p", descriptor = "I") public static final int anInt4306 = 0x23201b; - @OriginalMember(owner = "client!wa", name = "pb", descriptor = "Lclient!na;") - public static final JagString aClass100_556 = JagString.parse("
"); + @OriginalMember(owner = "client!wa", name = "pb", descriptor = "Lclient!na;") + public static final JagString aClass100_556 = JagString.parse("
"); @OriginalMember(owner = "client!ed", name = "H", descriptor = "Lclient!na;") public static final JagString aClass100_375 = JagString.parse("<)4col> x"); - @OriginalMember(owner = "client!bd", name = "b", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!bd", name = "b", descriptor = "Lclient!na;") public static final JagString aClass100_80 = JagString.parse("(U(Y"); - @OriginalMember(owner = "client!gn", name = "d", descriptor = "Z") + @OriginalMember(owner = "client!gn", name = "d", descriptor = "Z") public static boolean aBoolean130 = false; @OriginalMember(owner = "client!gn", name = "v", descriptor = "Lclient!na;") public static final JagString NULL = JagString.parse("null"); @OriginalMember(owner = "client!k", name = "j", descriptor = "I") public static int anInt3126; - @OriginalMember(owner = "client!ld", name = "c", descriptor = "I") - public static int anInt3484 = -1; - @OriginalMember(owner = "client!qf", name = "X", descriptor = "Lclient!be;") - public static Component aClass13_13 = null; - @OriginalMember(owner = "client!gf", name = "K", descriptor = "I") - public static int anInt4696; - @OriginalMember(owner = "client!hi", name = "a", descriptor = "I") - public static int anInt2503 = -1; + @OriginalMember(owner = "client!ld", name = "c", descriptor = "I") + public static int anInt3484 = -1; + @OriginalMember(owner = "client!qf", name = "X", descriptor = "Lclient!be;") + public static Component aClass13_13 = null; + @OriginalMember(owner = "client!gf", name = "K", descriptor = "I") + public static int anInt4696; + @OriginalMember(owner = "client!hi", name = "a", descriptor = "I") + public static int anInt2503 = -1; - @OriginalMember(owner = "client!gn", name = "a", descriptor = "(Z)Z") + @OriginalMember(owner = "client!gn", name = "a", descriptor = "(Z)Z") public static boolean showVideoAd() { if (client.objectTag) { try { @@ -234,7 +234,7 @@ public final class Static87 { continue; } local276 -= component.height / 2; - memory = (int)Camera.yawTarget + MiniMap.anInt1814 & 0x7FF; + memory = (int) Camera.yawTarget + MiniMap.anInt1814 & 0x7FF; local270 -= component.width / 2; color = MathUtils.sin[memory]; cardMemory = MathUtils.cos[memory]; @@ -306,7 +306,7 @@ public final class Static87 { } local270 = component.width + local123; local276 = local114 + 15; - Fonts.p12Full.renderRight(JagString.concatenate(new JagString[] { Cheat.DEBUG_FPS2, JagString.parseInt((int)GameShell.framesPerSecond) }), local270, local276, 16776960, 0); + Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_FPS2, JagString.parseInt((int) GameShell.framesPerSecond)}), local270, local276, 16776960, 0); local276 += 15; @Pc(795) Runtime runtime = Runtime.getRuntime(); memory = (int) ((runtime.totalMemory() - runtime.freeMemory()) / 1024L / 1024L); @@ -314,7 +314,7 @@ public final class Static87 { if (memory > 128) { color = 16711680; } - Fonts.p12Full.renderRight(JagString.concatenate(new JagString[] { Cheat.DEBUG_MEM, JagString.parseInt(memory), Cheat.DEBUG_MEM_UNIT}), local270, local276, color, 0); + Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_MEM, JagString.parseInt(memory), Cheat.DEBUG_MEM_UNIT}), local270, local276, color, 0); local276 += 15; if (GlRenderer.enabled) { color = 16776960; @@ -322,7 +322,7 @@ public final class Static87 { if (cardMemory > 64) { color = 16711680; } - Fonts.p12Full.renderRight(JagString.concatenate(new JagString[] { Cheat.DEBUG_CARD, JagString.parseInt(cardMemory), Cheat.DEBUG_MEM_UNIT}), local270, local276, color, 0); + Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_CARD, JagString.parseInt(cardMemory), Cheat.DEBUG_MEM_UNIT}), local270, local276, color, 0); local276 += 15; } cardMemory = 0; @@ -335,7 +335,7 @@ public final class Static87 { } local571 = local556 * 10000 / cardMemory; local563 = objId * 100 / cardMemory; - @Pc(968) JagString local968 = JagString.concatenate(new JagString[] { Cheat.DEBUG_CAHE, StringUtils.formatNumber(0, true, 2, (long) local571), Static147.aClass100_672, JagString.parseInt(local563), aClass100_80 }); + @Pc(968) JagString local968 = JagString.concatenate(new JagString[]{Cheat.DEBUG_CAHE, StringUtils.formatNumber(0, true, 2, local571), Static147.aClass100_672, JagString.parseInt(local563), aClass100_80}); Fonts.p11Full.renderRight(local968, local270, local276, 16776960, 0); local276 += 12; InterfaceList.aBooleanArray100[rectangle] = true; @@ -377,7 +377,7 @@ public final class Static87 { if (component.createdComponents != null) { method1809(local166, local114 - component.scrollY, -component.scrollX + local123, component.createdComponents, local302, component.id, local164, local291, rectangle); } - @Pc(1186) ComponentPointer local1186 = (ComponentPointer) InterfaceList.openInterfaces.get((long) component.id); + @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) { MiniMenu.ops[0] = LocalizedText.CANCEL; @@ -574,7 +574,7 @@ public final class Static87 { local1934 = MiniMenu.NULL; } if ((local1989.stackable == 1 || component.objCount != 1) && component.objCount != -1) { - local1934 = JagString.concatenate(new JagString[] { MiniMenu.aClass100_32, local1934, aClass100_375, Static70.method1548(component.objCount) }); + local1934 = JagString.concatenate(new JagString[]{MiniMenu.aClass100_32, local1934, aClass100_375, Static70.method1548(component.objCount)}); } } if (Static44.aClass13_10 == component) { @@ -753,7 +753,7 @@ public final class Static87 { GlRenderer.method4182(local556, objId, component.modelZoom, component.aShort11, color, cardMemory); } else { GlRenderer.method4148(local556, objId, color, cardMemory); - GlRenderer.method4152((float) component.aShort10, (float) component.aShort11 * 1.5F); + GlRenderer.method4152(component.aShort10, (float) component.aShort11 * 1.5F); } GlRenderer.restoreLighting(); GlRenderer.setDepthTestEnabled(true); @@ -808,9 +808,9 @@ public final class Static87 { local2611 = ObjTypeList.get(component.objTypes[local276] - 1); @Pc(3159) JagString local3159; if (local2611.stackable != 1 && component.objCounts[local276] == 1) { - local3159 = JagString.concatenate(new JagString[] { MiniMenu.aClass100_32, local2611.name, Static70.aClass100_978 }); + local3159 = JagString.concatenate(new JagString[]{MiniMenu.aClass100_32, local2611.name, Static70.aClass100_978}); } else { - local3159 = JagString.concatenate(new JagString[] { MiniMenu.aClass100_32, local2611.name, aClass100_375, Static70.method1548(component.objCounts[local276]) }); + local3159 = JagString.concatenate(new JagString[]{MiniMenu.aClass100_32, local2611.name, aClass100_375, Static70.method1548(component.objCounts[local276])}); } local556 = local123 + memory * (component.anInt512 + 115); objId = (component.anInt516 + 12) * local468 + local114; @@ -1078,8 +1078,10 @@ public final class Static87 { @Pc(515) int local515; if (GlRenderer.enabled && !arg1) { @Pc(490) Environment local490 = null; - label270: while (true) { - label263: do { + label270: + while (true) { + label263: + do { while (local95.offset < local95.data.length) { local117 = local95.g1(); if (local117 != 0) { @@ -1139,20 +1141,20 @@ public final class Static87 { } } - @OriginalMember(owner = "client!ag", name = "a", descriptor = "(IIIIIIIII)V") - public static void method86(@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) { - if (InterfaceList.load(arg0)) { - method1809(arg1, arg7, arg3, InterfaceList.components[arg0], arg2, -1, arg6, arg5, arg4); - } else if (arg4 == -1) { - for (@Pc(27) int local27 = 0; local27 < 100; local27++) { - InterfaceList.aBooleanArray100[local27] = true; - } - } else { - InterfaceList.aBooleanArray100[arg4] = true; - } - } + @OriginalMember(owner = "client!ag", name = "a", descriptor = "(IIIIIIIII)V") + public static void method86(@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) { + if (InterfaceList.load(arg0)) { + method1809(arg1, arg7, arg3, InterfaceList.components[arg0], arg2, -1, arg6, arg5, arg4); + } else if (arg4 == -1) { + for (@Pc(27) int local27 = 0; local27 < 100; local27++) { + InterfaceList.aBooleanArray100[local27] = true; + } + } else { + InterfaceList.aBooleanArray100[arg4] = true; + } + } - @OriginalMember(owner = "client!bm", name = "a", descriptor = "(IBIIII)V") + @OriginalMember(owner = "client!bm", name = "a", descriptor = "(IBIIII)V") public static void method645(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { @Pc(3) int local3; @Pc(10) int local10; diff --git a/client/src/main/java/rt4/Static89.java b/client/src/main/java/rt4/Static89.java index 32276bd..7d31619 100644 --- a/client/src/main/java/rt4/Static89.java +++ b/client/src/main/java/rt4/Static89.java @@ -1,10 +1,11 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + public final class Static89 { @OriginalMember(owner = "client!ec", name = "d", descriptor = "Lclient!gn;") @@ -53,9 +54,9 @@ public final class Static89 { @OriginalMember(owner = "client!ha", name = "a", descriptor = "(II)[B") public static byte[] method1837(@OriginalArg(1) int arg0) { - @Pc(10) ByteArrayNodeSecondary local10 = (ByteArrayNodeSecondary) aClass54_5.get((long) arg0); + @Pc(10) ByteArrayNodeSecondary local10 = (ByteArrayNodeSecondary) aClass54_5.get(arg0); if (local10 == null) { - @Pc(24) Random local24 = new Random((long) arg0); + @Pc(24) Random local24 = new Random(arg0); @Pc(27) byte[] local27 = new byte[512]; @Pc(29) int local29; for (local29 = 0; local29 < 255; local29++) { @@ -69,7 +70,7 @@ public final class Static89 { local27[local53] = local27[511 - local29] = local62; } local10 = new ByteArrayNodeSecondary(local27); - aClass54_5.put(local10, (long) arg0); + aClass54_5.put(local10, arg0); } return local10.value; } @@ -330,8 +331,10 @@ public final class Static89 { @Pc(497) int local497; if (GlRenderer.enabled && !arg9) { @Pc(472) Environment local472 = null; - label207: while (true) { - label200: do { + label207: + while (true) { + label200: + do { while (local96.data.length > local96.offset) { local108 = local96.g1(); if (local108 != 0) { @@ -387,33 +390,33 @@ public final class Static89 { return Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && MiniMenu.size > 2 ? MiniMenu.cursors[MiniMenu.size - 2] : MiniMenu.cursors[MiniMenu.size - 1]; } - @OriginalMember(owner = "client!rg", name = "a", descriptor = "(IZII)I") - public static int method4360(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(3) int local3 = arg0 & 0x3; - if (local3 == 0) { - return arg2; - } else if (local3 == 1) { - return arg1; - } else if (local3 == 2) { - return 7 - arg2; - } else { - return 7 - arg1; - } - } + @OriginalMember(owner = "client!rg", name = "a", descriptor = "(IZII)I") + public static int method4360(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + @Pc(3) int local3 = arg0 & 0x3; + if (local3 == 0) { + return arg2; + } else if (local3 == 1) { + return arg1; + } else if (local3 == 2) { + return 7 - arg2; + } else { + return 7 - arg1; + } + } - @OriginalMember(owner = "client!qg", name = "a", descriptor = "(IBII)I") - public static int method3659(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { - @Pc(3) int local3 = arg0 & 0x3; - if (local3 == 0) { - return arg2; - } else if (local3 == 1) { - return 7 - arg1; - } else if (local3 == 2) { - return 7 - arg2; - } else { - return arg1; - } - } + @OriginalMember(owner = "client!qg", name = "a", descriptor = "(IBII)I") + public static int method3659(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) { + @Pc(3) int local3 = arg0 & 0x3; + if (local3 == 0) { + return arg2; + } else if (local3 == 1) { + return 7 - arg1; + } else if (local3 == 2) { + return 7 - arg2; + } else { + return arg1; + } + } @OriginalMember(owner = "client!qi", name = "a", descriptor = "(IIBI)I") public static int method3675(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { diff --git a/client/src/main/java/rt4/Static96.java b/client/src/main/java/rt4/Static96.java index 2f6ebdc..350d407 100644 --- a/client/src/main/java/rt4/Static96.java +++ b/client/src/main/java/rt4/Static96.java @@ -9,76 +9,76 @@ public final class Static96 { @OriginalMember(owner = "client!hh", name = "p", descriptor = "[I") public static int[] anIntArray234; - @OriginalMember(owner = "client!hh", name = "a", descriptor = "(II)V") + @OriginalMember(owner = "client!hh", name = "a", descriptor = "(II)V") public static void method1949(@OriginalArg(1) int arg0) { if (InterfaceList.load(arg0)) { method2354(-1, InterfaceList.components[arg0]); } } - @OriginalMember(owner = "client!jd", name = "a", descriptor = "(II[Lclient!be;)V") - public static void method2354(@OriginalArg(1) int arg0, @OriginalArg(2) Component[] arg1) { - for (@Pc(7) int local7 = 0; local7 < arg1.length; local7++) { - @Pc(15) Component local15 = arg1[local7]; - if (local15 != null && local15.layer == arg0 && (!local15.if3 || !Static36.method947(local15))) { - if (local15.type == 0) { - if (!local15.if3 && Static36.method947(local15) && local15 != InterfaceList.aClass13_22) { - continue; - } - method2354(local15.id, arg1); - if (local15.createdComponents != null) { - method2354(local15.id, local15.createdComponents); - } - @Pc(73) ComponentPointer local73 = (ComponentPointer) InterfaceList.openInterfaces.get((long) local15.id); - if (local73 != null) { - method1949(local73.anInt5878); - } - } - if (local15.type == 6) { - @Pc(105) int local105; - if (local15.modelSeqId != -1 || local15.anInt462 != -1) { - @Pc(100) boolean local100 = Static87.method2926(local15); - if (local100) { - local105 = local15.anInt462; - } else { - local105 = local15.modelSeqId; - } - if (local105 != -1) { - @Pc(118) SeqType local118 = SeqTypeList.get(local105); - if (local118 != null) { - local15.anInt500 += Protocol.anInt4247; - while (local15.anInt500 > local118.anIntArray474[local15.anInt510]) { - local15.anInt500 -= local118.anIntArray474[local15.anInt510]; - local15.anInt510++; - if (local118.frames.length <= local15.anInt510) { - local15.anInt510 -= local118.anInt5362; - if (local15.anInt510 < 0 || local118.frames.length <= local15.anInt510) { - local15.anInt510 = 0; - } - } - local15.anInt496 = local15.anInt510 + 1; - if (local118.frames.length <= local15.anInt496) { - local15.anInt496 -= local118.anInt5362; - if (local15.anInt496 < 0 || local118.frames.length <= local15.anInt496) { - local15.anInt496 = -1; - } - } - InterfaceList.redraw(local15); - } - } - } - } - if (local15.modelRotationSpeed != 0 && !local15.if3) { - @Pc(239) int local239 = local15.modelRotationSpeed >> 16; - @Pc(243) int local243 = local239 * Protocol.anInt4247; - local105 = local15.modelRotationSpeed << 16 >> 16; - local15.modelXAngle = local243 + local15.modelXAngle & 0x7FF; - local105 *= Protocol.anInt4247; - local15.modelYAngle = local15.modelYAngle + local105 & 0x7FF; - InterfaceList.redraw(local15); - } - } - } - } - } + @OriginalMember(owner = "client!jd", name = "a", descriptor = "(II[Lclient!be;)V") + public static void method2354(@OriginalArg(1) int arg0, @OriginalArg(2) Component[] arg1) { + for (@Pc(7) int local7 = 0; local7 < arg1.length; local7++) { + @Pc(15) Component local15 = arg1[local7]; + if (local15 != null && local15.layer == arg0 && (!local15.if3 || !Static36.method947(local15))) { + if (local15.type == 0) { + if (!local15.if3 && Static36.method947(local15) && local15 != InterfaceList.aClass13_22) { + continue; + } + method2354(local15.id, arg1); + if (local15.createdComponents != null) { + method2354(local15.id, local15.createdComponents); + } + @Pc(73) ComponentPointer local73 = (ComponentPointer) InterfaceList.openInterfaces.get(local15.id); + if (local73 != null) { + method1949(local73.anInt5878); + } + } + if (local15.type == 6) { + @Pc(105) int local105; + if (local15.modelSeqId != -1 || local15.anInt462 != -1) { + @Pc(100) boolean local100 = Static87.method2926(local15); + if (local100) { + local105 = local15.anInt462; + } else { + local105 = local15.modelSeqId; + } + if (local105 != -1) { + @Pc(118) SeqType local118 = SeqTypeList.get(local105); + if (local118 != null) { + local15.anInt500 += Protocol.anInt4247; + while (local15.anInt500 > local118.anIntArray474[local15.anInt510]) { + local15.anInt500 -= local118.anIntArray474[local15.anInt510]; + local15.anInt510++; + if (local118.frames.length <= local15.anInt510) { + local15.anInt510 -= local118.anInt5362; + if (local15.anInt510 < 0 || local118.frames.length <= local15.anInt510) { + local15.anInt510 = 0; + } + } + local15.anInt496 = local15.anInt510 + 1; + if (local118.frames.length <= local15.anInt496) { + local15.anInt496 -= local118.anInt5362; + if (local15.anInt496 < 0 || local118.frames.length <= local15.anInt496) { + local15.anInt496 = -1; + } + } + InterfaceList.redraw(local15); + } + } + } + } + if (local15.modelRotationSpeed != 0 && !local15.if3) { + @Pc(239) int local239 = local15.modelRotationSpeed >> 16; + @Pc(243) int local243 = local239 * Protocol.anInt4247; + local105 = local15.modelRotationSpeed << 16 >> 16; + local15.modelXAngle = local243 + local15.modelXAngle & 0x7FF; + local105 *= Protocol.anInt4247; + local15.modelYAngle = local15.modelYAngle + local105 & 0x7FF; + InterfaceList.redraw(local15); + } + } + } + } + } } diff --git a/client/src/main/java/rt4/StockMarketManager.java b/client/src/main/java/rt4/StockMarketManager.java index fe92d73..02019cb 100644 --- a/client/src/main/java/rt4/StockMarketManager.java +++ b/client/src/main/java/rt4/StockMarketManager.java @@ -3,8 +3,8 @@ package rt4; import org.openrs2.deob.annotation.OriginalMember; public class StockMarketManager { - @OriginalMember(owner = "client!si", name = "X", descriptor = "[Lclient!sg;") - public static final StockMarketOffer[] offers = new StockMarketOffer[6]; - @OriginalMember(owner = "client!ql", name = "d", descriptor = "I") + @OriginalMember(owner = "client!si", name = "X", descriptor = "[Lclient!sg;") + public static final StockMarketOffer[] offers = new StockMarketOffer[6]; + @OriginalMember(owner = "client!ql", name = "d", descriptor = "I") public static int transmitAt = 0; } diff --git a/client/src/main/java/rt4/StringUtils.java b/client/src/main/java/rt4/StringUtils.java index d437ec0..c692b65 100644 --- a/client/src/main/java/rt4/StringUtils.java +++ b/client/src/main/java/rt4/StringUtils.java @@ -44,23 +44,23 @@ public class StringUtils { } } - @OriginalMember(owner = "client!vf", name = "a", descriptor = "(IB)Lclient!na;") - public static JagString method4510(@OriginalArg(0) int arg0) { - return arg0 >= 999999999 ? aClass100_930 : JagString.parseInt(arg0); - } + @OriginalMember(owner = "client!vf", name = "a", descriptor = "(IB)Lclient!na;") + public static JagString method4510(@OriginalArg(0) int arg0) { + return arg0 >= 999999999 ? aClass100_930 : JagString.parseInt(arg0); + } - @OriginalMember(owner = "client!ld", name = "a", descriptor = "(IB)I") - public static int toUpperCase(@OriginalArg(0) int c) { - if (c >= 97 && c <= 122 || c >= 224 && c <= 254 && c != 247) { - return c - 32; - } else if (c == 255) { - return 159; - } else if (c == 156) { - return 140; - } else { - return c; - } - } + @OriginalMember(owner = "client!ld", name = "a", descriptor = "(IB)I") + public static int toUpperCase(@OriginalArg(0) int c) { + if (c >= 97 && c <= 122 || c >= 224 && c <= 254 && c != 247) { + return c - 32; + } else if (c == 255) { + return 159; + } else if (c == 156) { + return 140; + } else { + return c; + } + } @OriginalMember(owner = "client!sk", name = "c", descriptor = "(II)I") public static int toLowerCase(@OriginalArg(1) int c) { @@ -121,6 +121,6 @@ public class StringUtils { if (local59.length() > 0) { local59.method3113(local28); } - return JagString.concatenate(new JagString[] { local9, local137.method3124(), local59.method3124() }); + return JagString.concatenate(new JagString[]{local9, local137.method3124(), local59.method3124()}); } } diff --git a/client/src/main/java/rt4/StructType.java b/client/src/main/java/rt4/StructType.java index 2525399..38280ec 100644 --- a/client/src/main/java/rt4/StructType.java +++ b/client/src/main/java/rt4/StructType.java @@ -16,7 +16,7 @@ public final class StructType extends SecondaryNode { if (this.params == null) { return arg1; } else { - @Pc(29) IntNode local29 = (IntNode) this.params.get((long) arg0); + @Pc(29) IntNode local29 = (IntNode) this.params.get(arg0); return local29 == null ? arg1 : local29.value; } } @@ -41,7 +41,7 @@ public final class StructType extends SecondaryNode { } else { local58 = new IntNode(arg0.g4()); } - this.params.put(local58, (long) local49); + this.params.put(local58, local49); } } @@ -50,7 +50,7 @@ public final class StructType extends SecondaryNode { if (this.params == null) { return arg0; } else { - @Pc(16) StringNode local16 = (StringNode) this.params.get((long) arg1); + @Pc(16) StringNode local16 = (StringNode) this.params.get(arg1); return local16 == null ? arg0 : local16.value; } } diff --git a/client/src/main/java/rt4/StructTypeList.java b/client/src/main/java/rt4/StructTypeList.java index af4794b..c001023 100644 --- a/client/src/main/java/rt4/StructTypeList.java +++ b/client/src/main/java/rt4/StructTypeList.java @@ -5,28 +5,28 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class StructTypeList { - @OriginalMember(owner = "client!sk", name = "bb", descriptor = "Lclient!gn;") - public static final LruHashTable types = new LruHashTable(64); - @OriginalMember(owner = "client!bm", name = "e", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!sk", name = "bb", descriptor = "Lclient!gn;") + public static final LruHashTable types = new LruHashTable(64); + @OriginalMember(owner = "client!bm", name = "e", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!eh", name = "a", descriptor = "(Lclient!ve;I)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!eh", name = "a", descriptor = "(Lclient!ve;I)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!jj", name = "a", descriptor = "(BI)Lclient!lk;") - public static StructType get(@OriginalArg(1) int arg0) { - @Pc(10) StructType local10 = (StructType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(26) byte[] local26 = archive.fetchFile(26, arg0); - local10 = new StructType(); - if (local26 != null) { - local10.decode(new Buffer(local26)); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!jj", name = "a", descriptor = "(BI)Lclient!lk;") + public static StructType get(@OriginalArg(1) int arg0) { + @Pc(10) StructType local10 = (StructType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(26) byte[] local26 = archive.fetchFile(26, arg0); + local10 = new StructType(); + if (local26 != null) { + local10.decode(new Buffer(local26)); + } + types.put(local10, arg0); + return local10; + } } diff --git a/client/src/main/java/rt4/SynthFilter.java b/client/src/main/java/rt4/SynthFilter.java index f9828d8..8b88448 100644 --- a/client/src/main/java/rt4/SynthFilter.java +++ b/client/src/main/java/rt4/SynthFilter.java @@ -30,7 +30,7 @@ public final class SynthFilter { @OriginalMember(owner = "client!nl", name = "a", descriptor = "(F)F") public static float getOctavePhase(@OriginalArg(0) float arg0) { - @Pc(7) float local7 = (float) Math.pow(2.0D, (double) arg0) * 32.703197F; + @Pc(7) float local7 = (float) Math.pow(2.0D, arg0) * 32.703197F; return local7 * 3.1415927F / 11025.0F; } @@ -76,19 +76,19 @@ public final class SynthFilter { if (arg0 == 0) { local20 = (float) this.inverseGain[0] + (float) (this.inverseGain[1] - this.inverseGain[0]) * arg1; @Pc(24) float local24 = local20 * 0.0030517578F; - floatingInverseA0 = (float) Math.pow(0.1D, (double) (local24 / 20.0F)); + floatingInverseA0 = (float) Math.pow(0.1D, local24 / 20.0F); inverseA0 = (int) (floatingInverseA0 * 65536.0F); } if (this.pairs[arg0] == 0) { return 0; } local20 = this.getAmplitude(arg0, 0, arg1); - floatingCoefficients[arg0][0] = -2.0F * local20 * (float) Math.cos((double) this.method3254(arg0, 0, arg1)); + floatingCoefficients[arg0][0] = -2.0F * local20 * (float) Math.cos(this.method3254(arg0, 0, arg1)); floatingCoefficients[arg0][1] = local20 * local20; @Pc(77) int local77; for (local77 = 1; local77 < this.pairs[arg0]; local77++) { local20 = this.getAmplitude(arg0, local77, arg1); - @Pc(102) float local102 = -2.0F * local20 * (float) Math.cos((double) this.method3254(arg0, local77, arg1)); + @Pc(102) float local102 = -2.0F * local20 * (float) Math.cos(this.method3254(arg0, local77, arg1)); @Pc(106) float local106 = local20 * local20; floatingCoefficients[arg0][local77 * 2 + 1] = floatingCoefficients[arg0][local77 * 2 - 1] * local106; floatingCoefficients[arg0][local77 * 2] = floatingCoefficients[arg0][local77 * 2 - 1] * local102 + floatingCoefficients[arg0][local77 * 2 - 2] * local106; @@ -113,7 +113,7 @@ public final class SynthFilter { private float getAmplitude(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) float arg2) { @Pc(30) float local30 = (float) this.gain[arg0][0][arg1] + arg2 * (float) (this.gain[arg0][1][arg1] - this.gain[arg0][0][arg1]); @Pc(34) float local34 = local30 * 0.0015258789F; - return 1.0F - (float) Math.pow(10.0D, (double) (-local34 / 20.0F)); + return 1.0F - (float) Math.pow(10.0D, -local34 / 20.0F); } @OriginalMember(owner = "client!nl", name = "b", descriptor = "(IIF)F") diff --git a/client/src/main/java/rt4/SynthInstrument.java b/client/src/main/java/rt4/SynthInstrument.java index 45e32c5..9172a83 100644 --- a/client/src/main/java/rt4/SynthInstrument.java +++ b/client/src/main/java/rt4/SynthInstrument.java @@ -1,27 +1,28 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!pj") public final class SynthInstrument { - @OriginalMember(owner = "client!pj", name = "o", descriptor = "[I") - public static final int[] samples = new int[220500]; - @OriginalMember(owner = "client!pj", name = "p", descriptor = "[I") - public static final int[] oscillatorIntervalRanges = new int[5]; - @OriginalMember(owner = "client!pj", name = "q", descriptor = "[I") - public static final int[] oscillatorMinIntervals = new int[5]; - @OriginalMember(owner = "client!pj", name = "r", descriptor = "[I") - public static final int[] oscillatorTimes = new int[5]; - @OriginalMember(owner = "client!pj", name = "s", descriptor = "[I") - public static final int[] oscillatorStartSamples = new int[5]; - @OriginalMember(owner = "client!pj", name = "t", descriptor = "[I") - public static final int[] scaledOscillatorAmplitudes = new int[5]; - @OriginalMember(owner = "client!pj", name = "k", descriptor = "[I") + @OriginalMember(owner = "client!pj", name = "o", descriptor = "[I") + public static final int[] samples = new int[220500]; + @OriginalMember(owner = "client!pj", name = "p", descriptor = "[I") + public static final int[] oscillatorIntervalRanges = new int[5]; + @OriginalMember(owner = "client!pj", name = "q", descriptor = "[I") + public static final int[] oscillatorMinIntervals = new int[5]; + @OriginalMember(owner = "client!pj", name = "r", descriptor = "[I") + public static final int[] oscillatorTimes = new int[5]; + @OriginalMember(owner = "client!pj", name = "s", descriptor = "[I") + public static final int[] oscillatorStartSamples = new int[5]; + @OriginalMember(owner = "client!pj", name = "t", descriptor = "[I") + public static final int[] scaledOscillatorAmplitudes = new int[5]; + @OriginalMember(owner = "client!pj", name = "k", descriptor = "[I") private static final int[] NOISE = new int[32768]; @OriginalMember(owner = "client!pj", name = "h", descriptor = "[I") @@ -67,16 +68,16 @@ public final class SynthInstrument { public int start = 0; @OriginalMember(owner = "client!pj", name = "m", descriptor = "[I") - private final int[] harmonicVolume = new int[] { 0, 0, 0, 0, 0 }; + private final int[] harmonicVolume = new int[]{0, 0, 0, 0, 0}; @OriginalMember(owner = "client!pj", name = "n", descriptor = "[I") - private final int[] harmonicDelay = new int[] { 0, 0, 0, 0, 0 }; + private final int[] harmonicDelay = new int[]{0, 0, 0, 0, 0}; @OriginalMember(owner = "client!pj", name = "u", descriptor = "I") private int reverbVolume = 100; @OriginalMember(owner = "client!pj", name = "v", descriptor = "[I") - private final int[] harmonicSemitone = new int[] { 0, 0, 0, 0, 0 }; + private final int[] harmonicSemitone = new int[]{0, 0, 0, 0, 0}; static { @Pc(7) Random rand = new Random(0L); @@ -138,7 +139,7 @@ public final class SynthInstrument { oscillatorTimes[local102] = 0; oscillatorStartSamples[local102] = (int) ((double) this.harmonicDelay[local102] * local16); scaledOscillatorAmplitudes[local102] = (this.harmonicVolume[local102] << 14) / 100; - oscillatorIntervalRanges[local102] = (int) ((double) (this.phaseEnvelope.maxInterval - this.phaseEnvelope.minInterval) * 32.768D * Math.pow(1.0057929410678534D, (double) this.harmonicSemitone[local102]) / local16); + oscillatorIntervalRanges[local102] = (int) ((double) (this.phaseEnvelope.maxInterval - this.phaseEnvelope.minInterval) * 32.768D * Math.pow(1.0057929410678534D, this.harmonicSemitone[local102]) / local16); oscillatorMinIntervals[local102] = (int) ((double) this.phaseEnvelope.minInterval * 32.768D / local16); } } diff --git a/client/src/main/java/rt4/SynthSound.java b/client/src/main/java/rt4/SynthSound.java index a4f7c76..f55337a 100644 --- a/client/src/main/java/rt4/SynthSound.java +++ b/client/src/main/java/rt4/SynthSound.java @@ -31,13 +31,13 @@ public final class SynthSound { this.end = arg0.g2(); } - @OriginalMember(owner = "client!sl", name = "a", descriptor = "(Lclient!ve;II)Lclient!sl;") - public static SynthSound create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(5) byte[] local5 = arg0.fetchFile(arg1, arg2); - return local5 == null ? null : new SynthSound(new Buffer(local5)); - } + @OriginalMember(owner = "client!sl", name = "a", descriptor = "(Lclient!ve;II)Lclient!sl;") + public static SynthSound create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + @Pc(5) byte[] local5 = arg0.fetchFile(arg1, arg2); + return local5 == null ? null : new SynthSound(new Buffer(local5)); + } - @OriginalMember(owner = "client!sl", name = "a", descriptor = "()[B") + @OriginalMember(owner = "client!sl", name = "a", descriptor = "()[B") private byte[] getSamples() { @Pc(1) int local1 = 0; @Pc(3) int local3; diff --git a/client/src/main/java/rt4/Texture.java b/client/src/main/java/rt4/Texture.java index ee50f6b..780b5e7 100644 --- a/client/src/main/java/rt4/Texture.java +++ b/client/src/main/java/rt4/Texture.java @@ -10,16 +10,16 @@ import java.util.Random; @OriginalClass("client!lc") public final class Texture { - @OriginalMember(owner = "client!i", name = "ac", descriptor = "[I") - public static final int[] brightnessMap = new int[256]; - @OriginalMember(owner = "client!rh", name = "g", descriptor = "I") - public static final int spriteGroupId = -1; - @OriginalMember(owner = "client!jh", name = "f", descriptor = "D") + @OriginalMember(owner = "client!i", name = "ac", descriptor = "[I") + public static final int[] brightnessMap = new int[256]; + @OriginalMember(owner = "client!rh", name = "g", descriptor = "I") + public static final int spriteGroupId = -1; + @OriginalMember(owner = "client!jh", name = "f", descriptor = "D") public static double brightness = -1.0D; - @OriginalMember(owner = "client!cm", name = "a", descriptor = "Lclient!m;") - public static TextureProvider provider; - @OriginalMember(owner = "client!pe", name = "r", descriptor = "I") - public static int width; + @OriginalMember(owner = "client!cm", name = "a", descriptor = "Lclient!m;") + public static TextureProvider provider; + @OriginalMember(owner = "client!pe", name = "r", descriptor = "I") + public static int width; @OriginalMember(owner = "client!ob", name = "f", descriptor = "Lclient!ve;") public static Js5 spritesArchive; @OriginalMember(owner = "client!nj", name = "k", descriptor = "I") @@ -240,21 +240,21 @@ public final class Texture { heightMask = height - 1; } - @OriginalMember(owner = "client!ni", name = "a", descriptor = "(BILjava/util/Random;)I") - public static int method3219(@OriginalArg(1) int arg0, @OriginalArg(2) Random arg1) { - if (arg0 <= 0) { - throw new IllegalArgumentException(); - } else if (method3702(arg0)) { - return (int) (((long) arg1.nextInt() & 0xFFFFFFFFL) * (long) arg0 >> 32); - } else { - @Pc(38) int local38 = Integer.MIN_VALUE - (int) (0x100000000L % (long) arg0); - @Pc(41) int local41; - do { - local41 = arg1.nextInt(); - } while (local38 <= local41); - return method990(local41, arg0); - } - } + @OriginalMember(owner = "client!ni", name = "a", descriptor = "(BILjava/util/Random;)I") + public static int method3219(@OriginalArg(1) int arg0, @OriginalArg(2) Random arg1) { + if (arg0 <= 0) { + throw new IllegalArgumentException(); + } else if (method3702(arg0)) { + return (int) (((long) arg1.nextInt() & 0xFFFFFFFFL) * (long) arg0 >> 32); + } else { + @Pc(38) int local38 = Integer.MIN_VALUE - (int) (0x100000000L % (long) arg0); + @Pc(41) int local41; + do { + local41 = arg1.nextInt(); + } while (local38 <= local41); + return method990(local41, arg0); + } + } @OriginalMember(owner = "client!d", name = "c", descriptor = "(III)I") public static int method990(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { @@ -263,9 +263,9 @@ public final class Texture { } @OriginalMember(owner = "client!ra", name = "a", descriptor = "(BI)Z") - public static boolean method3702(@OriginalArg(1) int arg0) { - return arg0 == (-arg0 & arg0); - } + public static boolean method3702(@OriginalArg(1) int arg0) { + return arg0 == (-arg0 & arg0); + } @OriginalMember(owner = "client!lc", name = "a", descriptor = "(IZIDILclient!ve;Lclient!m;Z)[I") public final int[] method2725(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) int arg2, @OriginalArg(3) double arg3, @OriginalArg(5) Js5 arg4, @OriginalArg(6) TextureProvider arg5, @OriginalArg(7) boolean arg6) { diff --git a/client/src/main/java/rt4/TextureOp.java b/client/src/main/java/rt4/TextureOp.java index 67f18a7..c17448a 100644 --- a/client/src/main/java/rt4/TextureOp.java +++ b/client/src/main/java/rt4/TextureOp.java @@ -8,8 +8,8 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!j") public abstract class TextureOp extends Node { - @OriginalMember(owner = "client!kc", name = "p", descriptor = "[I") - public static int[] COSINE; + @OriginalMember(owner = "client!kc", name = "p", descriptor = "[I") + public static int[] COSINE; @OriginalMember(owner = "client!je", name = "eb", descriptor = "[I") public static int[] SINE; @OriginalMember(owner = "client!j", name = "t", descriptor = "Lclient!nd;") @@ -100,7 +100,7 @@ public abstract class TextureOp extends Node { protected final int[][] getChildColorOutput(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { if (this.aClass3_Sub1Array42[arg1].monochrome) { @Pc(32) int[] local32 = this.aClass3_Sub1Array42[arg1].getMonochromeOutput(arg0); - return new int[][] { local32, local32, local32 }; + return new int[][]{local32, local32, local32}; } else { return this.aClass3_Sub1Array42[arg1].getColorOutput(arg0); } diff --git a/client/src/main/java/rt4/TextureOp12.java b/client/src/main/java/rt4/TextureOp12.java index 947e611..111c261 100644 --- a/client/src/main/java/rt4/TextureOp12.java +++ b/client/src/main/java/rt4/TextureOp12.java @@ -37,7 +37,7 @@ public final class TextureOp12 extends TextureOp { local68 = (local35 - local20) * this.anInt104; } else { @Pc(58) int local58 = local41 * local41 + local26 * local26 >> 12; - local68 = (int) (Math.sqrt((double) ((float) local58 / 4096.0F)) * 4096.0D); + local68 = (int) (Math.sqrt((float) local58 / 4096.0F) * 4096.0D); local68 = (int) ((double) (local68 * this.anInt104) * 3.141592653589793D); } local68 -= local68 & 0xFFFFF000; diff --git a/client/src/main/java/rt4/TextureOp15.java b/client/src/main/java/rt4/TextureOp15.java index 5253805..58180a3 100644 --- a/client/src/main/java/rt4/TextureOp15.java +++ b/client/src/main/java/rt4/TextureOp15.java @@ -1,17 +1,18 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!hm") public final class TextureOp15 extends TextureOp { - @OriginalMember(owner = "client!ui", name = "Q", descriptor = "I") - public static int anInt5526; - @OriginalMember(owner = "client!uf", name = "p", descriptor = "I") + @OriginalMember(owner = "client!ui", name = "Q", descriptor = "I") + public static int anInt5526; + @OriginalMember(owner = "client!uf", name = "p", descriptor = "I") public static int anInt5443; @OriginalMember(owner = "client!cl", name = "X", descriptor = "I") public static int anInt1091; @@ -48,7 +49,7 @@ public final class TextureOp15 extends TextureOp { @OriginalMember(owner = "client!hm", name = "f", descriptor = "(B)V") private void method2052() { - @Pc(12) Random local12 = new Random((long) this.anInt2639); + @Pc(12) Random local12 = new Random(this.anInt2639); this.aShortArray35 = new short[512]; if (this.anInt2636 > 0) { for (@Pc(26) int local26 = 0; local26 < 512; local26++) { @@ -98,18 +99,18 @@ public final class TextureOp15 extends TextureOp { local162 = local162 >= 0 ? local162 : -local162; local201 = local162 >= local151 ? local162 : local151; } else if (local165 == 4) { - local151 = (int) (Math.sqrt((double) ((float) (local151 < 0 ? -local151 : local151) / 4096.0F)) * 4096.0D); - local162 = (int) (Math.sqrt((double) ((float) (local162 >= 0 ? local162 : -local162) / 4096.0F)) * 4096.0D); + local151 = (int) (Math.sqrt((float) (local151 < 0 ? -local151 : local151) / 4096.0F) * 4096.0D); + local162 = (int) (Math.sqrt((float) (local162 >= 0 ? local162 : -local162) / 4096.0F) * 4096.0D); local201 = local162 + local151; local201 = local201 * local201 >> 12; } else if (local165 == 5) { local151 *= local151; local162 *= local162; - local201 = (int) (Math.sqrt(Math.sqrt((double) ((float) (local162 + local151) / 1.6777216E7F))) * 4096.0D); + local201 = (int) (Math.sqrt(Math.sqrt((float) (local162 + local151) / 1.6777216E7F)) * 4096.0D); } else if (local165 == 2) { local201 = (local151 >= 0 ? local151 : -local151) + (local162 < 0 ? -local162 : local162); } else { - local201 = (int) (Math.sqrt((double) ((float) (local162 * local162 + local151 * local151) / 1.6777216E7F)) * 4096.0D); + local201 = (int) (Math.sqrt((float) (local162 * local162 + local151 * local151) / 1.6777216E7F) * 4096.0D); } if (local201 < anInt1091) { anInt5526 = anInt5443; diff --git a/client/src/main/java/rt4/TextureOp23.java b/client/src/main/java/rt4/TextureOp23.java index a41daaa..0f7d782 100644 --- a/client/src/main/java/rt4/TextureOp23.java +++ b/client/src/main/java/rt4/TextureOp23.java @@ -8,10 +8,10 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!je") public final class TextureOp23 extends TextureOp { - @OriginalMember(owner = "client!hd", name = "i", descriptor = "I") - public static int anInt2433 = 0; + @OriginalMember(owner = "client!hd", name = "i", descriptor = "I") + public static int anInt2433 = 0; - @OriginalMember(owner = "client!je", name = "", descriptor = "()V") + @OriginalMember(owner = "client!je", name = "", descriptor = "()V") public TextureOp23() { super(1, false); } @@ -20,7 +20,7 @@ public final class TextureOp23 extends TextureOp { private void method2382(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { @Pc(13) int local13 = Texture.widthFractions[arg1]; @Pc(17) int local17 = Texture.heightFractions[arg0]; - @Pc(28) float local28 = (float) Math.atan2((double) (local13 - 2048), (double) (local17 - 2048)); + @Pc(28) float local28 = (float) Math.atan2(local13 - 2048, local17 - 2048); if ((double) local28 >= -3.141592653589793D && -2.356194490192345D >= (double) local28) { anInt2433 = arg0; Static267.anInt5776 = arg1; diff --git a/client/src/main/java/rt4/TextureOp28.java b/client/src/main/java/rt4/TextureOp28.java index d02b1ee..68a00c0 100644 --- a/client/src/main/java/rt4/TextureOp28.java +++ b/client/src/main/java/rt4/TextureOp28.java @@ -1,11 +1,12 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!ol") public final class TextureOp28 extends TextureOp { @@ -77,7 +78,7 @@ public final class TextureOp28 extends TextureOp { this.anInt4356 = Texture.width / 8 * this.anInt4347 >> 12; @Pc(102) int[][] local102 = new int[local88][3]; @Pc(106) int[][] local106 = new int[local88][3]; - @Pc(113) Random local113 = new Random((long) this.anInt4354); + @Pc(113) Random local113 = new Random(this.anInt4354); while (true) { while (true) { @Pc(123) int local123 = local54 + Texture.method3219(local61 - local54, local113); diff --git a/client/src/main/java/rt4/TextureOp29SubOp3.java b/client/src/main/java/rt4/TextureOp29SubOp3.java index 59c4cfd..51f9964 100644 --- a/client/src/main/java/rt4/TextureOp29SubOp3.java +++ b/client/src/main/java/rt4/TextureOp29SubOp3.java @@ -45,10 +45,10 @@ public final class TextureOp29SubOp3 extends TextureOp29SubOp { this.anInt4854 = arg2; } - @OriginalMember(owner = "client!bk", name = "a", descriptor = "(BLclient!wa;)Lclient!re;") - public static TextureOp29SubOp3 create(@OriginalArg(1) Buffer arg0) { - return new TextureOp29SubOp3(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g1()); - } + @OriginalMember(owner = "client!bk", name = "a", descriptor = "(BLclient!wa;)Lclient!re;") + public static TextureOp29SubOp3 create(@OriginalArg(1) Buffer arg0) { + return new TextureOp29SubOp3(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g1()); + } @OriginalMember(owner = "client!oi", name = "a", descriptor = "(IIIIIIIIII)V") public static void method3340(@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) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8) { diff --git a/client/src/main/java/rt4/TextureOp29SubOp4.java b/client/src/main/java/rt4/TextureOp29SubOp4.java index 4ccce98..d501514 100644 --- a/client/src/main/java/rt4/TextureOp29SubOp4.java +++ b/client/src/main/java/rt4/TextureOp29SubOp4.java @@ -142,12 +142,12 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { } } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "(BLclient!wa;)Lclient!ta;") + @OriginalMember(owner = "client!mf", name = "a", descriptor = "(BLclient!wa;)Lclient!ta;") public static TextureOp29SubOp4 method2960(@OriginalArg(1) Buffer arg0) { return new TextureOp29SubOp4(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g3(), arg0.g1()); } - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZI)V") + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZI)V") @Override public final void method4009(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { @Pc(10) int local10 = arg1 * this.anInt5238 >> 12; diff --git a/client/src/main/java/rt4/TextureOp32.java b/client/src/main/java/rt4/TextureOp32.java index 0e6b7a9..9755fee 100644 --- a/client/src/main/java/rt4/TextureOp32.java +++ b/client/src/main/java/rt4/TextureOp32.java @@ -84,14 +84,14 @@ public final class TextureOp32 extends TextureOp { @OriginalMember(owner = "client!pk", name = "g", descriptor = "(B)V") private void method3533() { - @Pc(7) double local7 = Math.cos((double) ((float) this.anInt4584 / 4096.0F)); - this.anIntArray406[0] = (int) (local7 * 4096.0D * Math.sin((double) ((float) this.anInt4577 / 4096.0F))); - this.anIntArray406[1] = (int) (Math.cos((double) ((float) this.anInt4577 / 4096.0F)) * local7 * 4096.0D); - this.anIntArray406[2] = (int) (Math.sin((double) ((float) this.anInt4584 / 4096.0F)) * 4096.0D); + @Pc(7) double local7 = Math.cos((float) this.anInt4584 / 4096.0F); + this.anIntArray406[0] = (int) (local7 * 4096.0D * Math.sin((float) this.anInt4577 / 4096.0F)); + this.anIntArray406[1] = (int) (Math.cos((float) this.anInt4577 / 4096.0F) * local7 * 4096.0D); + this.anIntArray406[2] = (int) (Math.sin((float) this.anInt4584 / 4096.0F) * 4096.0D); @Pc(73) int local73 = this.anIntArray406[2] * this.anIntArray406[2] >> 12; @Pc(85) int local85 = this.anIntArray406[1] * this.anIntArray406[1] >> 12; @Pc(97) int local97 = this.anIntArray406[0] * this.anIntArray406[0] >> 12; - @Pc(111) int local111 = (int) (Math.sqrt((double) (local97 + local85 + local73 >> 12)) * 4096.0D); + @Pc(111) int local111 = (int) (Math.sqrt(local97 + local85 + local73 >> 12) * 4096.0D); if (local111 != 0) { this.anIntArray406[2] = (this.anIntArray406[2] << 12) / local111; this.anIntArray406[0] = (this.anIntArray406[0] << 12) / local111; diff --git a/client/src/main/java/rt4/TextureOp33.java b/client/src/main/java/rt4/TextureOp33.java index 6ddfa17..dce8971 100644 --- a/client/src/main/java/rt4/TextureOp33.java +++ b/client/src/main/java/rt4/TextureOp33.java @@ -47,7 +47,7 @@ public final class TextureOp33 extends TextureOp { @Pc(98) int local98 = local90 >> 12; @Pc(104) int local104 = local94 * local94 >> 12; @Pc(110) int local110 = local98 * local98 >> 12; - @Pc(124) int local124 = (int) (Math.sqrt((double) ((float) (local110 + local104 + 4096) / 4096.0F)) * 4096.0D); + @Pc(124) int local124 = (int) (Math.sqrt((float) (local110 + local104 + 4096) / 4096.0F) * 4096.0D); @Pc(131) int local131; @Pc(133) int local133; @Pc(129) int local129; diff --git a/client/src/main/java/rt4/TextureOp34.java b/client/src/main/java/rt4/TextureOp34.java index 37925e6..785925e 100644 --- a/client/src/main/java/rt4/TextureOp34.java +++ b/client/src/main/java/rt4/TextureOp34.java @@ -189,13 +189,13 @@ public final class TextureOp34 extends TextureOp { this.aShortArray4 = new short[this.anInt642]; this.aShortArray3 = new short[this.anInt642]; for (local21 = 0; local21 < this.anInt642; local21++) { - this.aShortArray4[local21] = (short) (Math.pow((double) ((float) this.anInt648 / 4096.0F), (double) local21) * 4096.0D); - this.aShortArray3[local21] = (short) Math.pow(2.0D, (double) local21); + this.aShortArray4[local21] = (short) (Math.pow((float) this.anInt648 / 4096.0F, local21) * 4096.0D); + this.aShortArray3[local21] = (short) Math.pow(2.0D, local21); } } else if (this.aShortArray4 != null && this.aShortArray4.length == this.anInt642) { this.aShortArray3 = new short[this.anInt642]; for (local21 = 0; local21 < this.anInt642; local21++) { - this.aShortArray3[local21] = (short) Math.pow(2.0D, (double) local21); + this.aShortArray3[local21] = (short) Math.pow(2.0D, local21); } } } diff --git a/client/src/main/java/rt4/TextureOp35.java b/client/src/main/java/rt4/TextureOp35.java index e8f5bf9..6c7154e 100644 --- a/client/src/main/java/rt4/TextureOp35.java +++ b/client/src/main/java/rt4/TextureOp35.java @@ -31,7 +31,7 @@ public final class TextureOp35 extends TextureOp { @Pc(95) int local95 = local67 >> 12; @Pc(101) int local101 = local91 * local91 >> 12; @Pc(107) int local107 = local95 * local95 >> 12; - @Pc(121) int local121 = (int) (Math.sqrt((double) ((float) (local107 + local101 + 4096) / 4096.0F)) * 4096.0D); + @Pc(121) int local121 = (int) (Math.sqrt((float) (local107 + local101 + 4096) / 4096.0F) * 4096.0D); @Pc(130) int local130 = local121 == 0 ? 0 : 16777216 / local121; local19[local52] = 4096 - local130; } diff --git a/client/src/main/java/rt4/TextureOp38.java b/client/src/main/java/rt4/TextureOp38.java index 68ab19f..d201301 100644 --- a/client/src/main/java/rt4/TextureOp38.java +++ b/client/src/main/java/rt4/TextureOp38.java @@ -1,11 +1,12 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!vc") public final class TextureOp38 extends TextureOp { @@ -58,7 +59,7 @@ public final class TextureOp38 extends TextureOp { if (this.monochromeImageCache.invalid) { @Pc(28) int local28 = this.anInt5714 >> 1; @Pc(33) int[][] local33 = this.monochromeImageCache.method3446(); - @Pc(40) Random local40 = new Random((long) this.anInt5716); + @Pc(40) Random local40 = new Random(this.anInt5716); for (@Pc(42) int local42 = 0; local42 < this.anInt5712; local42++) { @Pc(64) int local64 = this.anInt5714 > 0 ? this.anInt5709 + Texture.method3219(this.anInt5714, local40) - local28 : this.anInt5709; @Pc(69) int local69 = Texture.method3219(Texture.width, local40); diff --git a/client/src/main/java/rt4/TextureOp4.java b/client/src/main/java/rt4/TextureOp4.java index 2d5775c..6def450 100644 --- a/client/src/main/java/rt4/TextureOp4.java +++ b/client/src/main/java/rt4/TextureOp4.java @@ -1,11 +1,12 @@ package rt4; -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.Random; + @OriginalClass("client!mc") public final class TextureOp4 extends TextureOp { @@ -86,7 +87,7 @@ public final class TextureOp4 extends TextureOp { @OriginalMember(owner = "client!mc", name = "i", descriptor = "(I)V") private void method2908() { - @Pc(8) Random local8 = new Random((long) this.anInt3677); + @Pc(8) Random local8 = new Random(this.anInt3677); this.anInt3670 = 4096 / this.anInt3677; this.anInt3671 = this.anInt3672 / 2; this.anIntArrayArray26 = new int[this.anInt3677][this.anInt3685 + 1]; diff --git a/client/src/main/java/rt4/TextureOpCurve.java b/client/src/main/java/rt4/TextureOpCurve.java index a42a3d8..8e64f44 100644 --- a/client/src/main/java/rt4/TextureOpCurve.java +++ b/client/src/main/java/rt4/TextureOpCurve.java @@ -131,7 +131,7 @@ public final class TextureOpCurve extends TextureOp { @Override public final void postDecode() { if (this.markers == null) { - this.markers = new int[][] { { 0, 0 }, { 4096, 4096 } }; + this.markers = new int[][]{{0, 0}, {4096, 4096}}; } if (this.markers.length < 2) { throw new RuntimeException("Curve operation requires at least two markers"); @@ -149,8 +149,8 @@ public final class TextureOpCurve extends TextureOp { @Pc(20) int[] local20 = this.markers[1]; @Pc(29) int[] local29 = this.markers[this.markers.length - 2]; @Pc(38) int[] local38 = this.markers[this.markers.length - 1]; - this.lastMarker = new int[] { local8[0] + local8[0] - local20[0], -local20[1] + local8[1] + local8[1] }; - this.firstMarker = new int[] { local29[0] + local29[0] - local38[0], -local38[1] - -local29[1] + local29[1] }; + this.lastMarker = new int[]{local8[0] + local8[0] - local20[0], -local20[1] + local8[1] + local8[1]}; + this.firstMarker = new int[]{local29[0] + local29[0] - local38[0], -local38[1] - -local29[1] + local29[1]}; } @OriginalMember(owner = "client!wi", name = "a", descriptor = "(ILclient!wa;Z)V") diff --git a/client/src/main/java/rt4/ThreadUtils.java b/client/src/main/java/rt4/ThreadUtils.java index 55f9ec2..ae4c3cf 100644 --- a/client/src/main/java/rt4/ThreadUtils.java +++ b/client/src/main/java/rt4/ThreadUtils.java @@ -5,24 +5,24 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class ThreadUtils { - @OriginalMember(owner = "client!sk", name = "a", descriptor = "(JI)V") - public static void sleep(@OriginalArg(0) long arg0) { - if (arg0 <= 0L) { - return; - } - if (arg0 % 10L == 0L) { - sleepUninterruptibly(arg0 - 1L); - sleepUninterruptibly(1L); - } else { - sleepUninterruptibly(arg0); - } - } + @OriginalMember(owner = "client!sk", name = "a", descriptor = "(JI)V") + public static void sleep(@OriginalArg(0) long arg0) { + if (arg0 <= 0L) { + return; + } + if (arg0 % 10L == 0L) { + sleepUninterruptibly(arg0 - 1L); + sleepUninterruptibly(1L); + } else { + sleepUninterruptibly(arg0); + } + } - @OriginalMember(owner = "client!rm", name = "a", descriptor = "(JB)V") - public static void sleepUninterruptibly(@OriginalArg(0) long arg0) { - try { - Thread.sleep(arg0); - } catch (@Pc(11) InterruptedException local11) { - } - } + @OriginalMember(owner = "client!rm", name = "a", descriptor = "(JB)V") + public static void sleepUninterruptibly(@OriginalArg(0) long arg0) { + try { + Thread.sleep(arg0); + } catch (@Pc(11) InterruptedException local11) { + } + } } diff --git a/client/src/main/java/rt4/TitleScreen.java b/client/src/main/java/rt4/TitleScreen.java index ac5fc15..39b7683 100644 --- a/client/src/main/java/rt4/TitleScreen.java +++ b/client/src/main/java/rt4/TitleScreen.java @@ -5,72 +5,72 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class TitleScreen { - @OriginalMember(owner = "client!cb", name = "cb", descriptor = "Lclient!na;") - public static final JagString TITLEBG = JagString.parse("titlebg"); - @OriginalMember(owner = "client!nb", name = "m", descriptor = "Lclient!na;") - public static final JagString LOGO = JagString.parse("logo"); + @OriginalMember(owner = "client!cb", name = "cb", descriptor = "Lclient!na;") + public static final JagString TITLEBG = JagString.parse("titlebg"); + @OriginalMember(owner = "client!nb", name = "m", descriptor = "Lclient!na;") + public static final JagString LOGO = JagString.parse("logo"); - @OriginalMember(owner = "client!bh", name = "M", descriptor = "Z") - public static boolean loaded; - @OriginalMember(owner = "client!gd", name = "n", descriptor = "Lclient!qf;") - public static Sprite titleBg; - @OriginalMember(owner = "client!tk", name = "o", descriptor = "Lclient!ok;") + @OriginalMember(owner = "client!bh", name = "M", descriptor = "Z") + public static boolean loaded; + @OriginalMember(owner = "client!gd", name = "n", descriptor = "Lclient!qf;") + public static Sprite titleBg; + @OriginalMember(owner = "client!tk", name = "o", descriptor = "Lclient!ok;") public static IndexedSprite logo; - @OriginalMember(owner = "client!vf", name = "m", descriptor = "I") - public static int bgId = -1; - @OriginalMember(owner = "client!kk", name = "g", descriptor = "I") - public static int logoId = -1; + @OriginalMember(owner = "client!vf", name = "m", descriptor = "I") + public static int bgId = -1; + @OriginalMember(owner = "client!kk", name = "g", descriptor = "I") + public static int logoId = -1; - @OriginalMember(owner = "client!oi", name = "a", descriptor = "(Lclient!ve;B)V") - public static void load(@OriginalArg(0) Js5 archive) { - if (loaded) { - return; - } + @OriginalMember(owner = "client!oi", name = "a", descriptor = "(Lclient!ve;B)V") + public static void load(@OriginalArg(0) Js5 archive) { + if (loaded) { + return; + } - if (GlRenderer.enabled) { - GlRaster.clear(); - } else { - SoftwareRaster.clear(); - } + if (GlRenderer.enabled) { + GlRaster.clear(); + } else { + SoftwareRaster.clear(); + } - @Pc(20) int height = GameShell.canvasHeight; - @Pc(26) int width = height * 956 / 503; - titleBg = SpriteLoader.loadSpriteAutoDetect(archive, bgId); - titleBg.renderResized((GameShell.canvasWidth - width) / 2, 0, width, height); - logo = SpriteLoader.loadIndexedSpriteAutoDetect(logoId, archive); - logo.renderTransparent(GameShell.canvasWidth / 2 - logo.width / 2, 18); - loaded = true; - } + @Pc(20) int height = GameShell.canvasHeight; + @Pc(26) int width = height * 956 / 503; + titleBg = SpriteLoader.loadSpriteAutoDetect(archive, bgId); + titleBg.renderResized((GameShell.canvasWidth - width) / 2, 0, width, height); + logo = SpriteLoader.loadIndexedSpriteAutoDetect(logoId, archive); + logo.renderTransparent(GameShell.canvasWidth / 2 - logo.width / 2, 18); + loaded = true; + } - @OriginalMember(owner = "client!je", name = "f", descriptor = "(B)V") - public static void clear() { - if (loaded) { - logo = null; - loaded = false; - titleBg = null; - } - } + @OriginalMember(owner = "client!je", name = "f", descriptor = "(B)V") + public static void clear() { + if (loaded) { + logo = null; + loaded = false; + titleBg = null; + } + } - @OriginalMember(owner = "client!nd", name = "a", descriptor = "(ILclient!ve;)V") - public static void init(@OriginalArg(1) Js5 archive) { - bgId = archive.getGroupId(TITLEBG); - logoId = archive.getGroupId(LOGO); - } + @OriginalMember(owner = "client!nd", name = "a", descriptor = "(ILclient!ve;)V") + public static void init(@OriginalArg(1) Js5 archive) { + bgId = archive.getGroupId(TITLEBG); + logoId = archive.getGroupId(LOGO); + } - @OriginalMember(owner = "client!lk", name = "a", descriptor = "(ILclient!ve;)I") - public static int getReady(@OriginalArg(1) Js5 archive) { - @Pc(1) int ready = 0; - if (archive.isFileReady(bgId)) { - ready++; - } - if (archive.isFileReady(logoId)) { - ready++; - } - return ready; - } + @OriginalMember(owner = "client!lk", name = "a", descriptor = "(ILclient!ve;)I") + public static int getReady(@OriginalArg(1) Js5 archive) { + @Pc(1) int ready = 0; + if (archive.isFileReady(bgId)) { + ready++; + } + if (archive.isFileReady(logoId)) { + ready++; + } + return ready; + } - @OriginalMember(owner = "client!ia", name = "a", descriptor = "(I)I") - public static int getTotal() { - return 2; - } + @OriginalMember(owner = "client!ia", name = "a", descriptor = "(I)I") + public static int getTotal() { + return 2; + } } diff --git a/client/src/main/java/rt4/TracingException.java b/client/src/main/java/rt4/TracingException.java index f9e0f5c..08ab589 100644 --- a/client/src/main/java/rt4/TracingException.java +++ b/client/src/main/java/rt4/TracingException.java @@ -17,86 +17,86 @@ public final class TracingException extends RuntimeException { @OriginalMember(owner = "client!ld", name = "f", descriptor = "Ljava/lang/Throwable;") public Throwable aThrowable1; - @OriginalMember(owner = "client!ha", name = "a", descriptor = "(Ljava/lang/String;Ljava/lang/Throwable;B)V") - public static void report(@OriginalArg(0) String arg0, @OriginalArg(1) Throwable arg1) { - try { - @Pc(13) String local13 = ""; - if (arg1 != null) { - local13 = method1961(arg1); - } - if (arg0 != null) { - if (arg1 != null) { - local13 = local13 + " | "; - } - local13 = local13 + arg0; - } - method31(local13); - local13 = Static40.method1014(":", "%3a", local13); - local13 = Static40.method1014("@", "%40", local13); - local13 = Static40.method1014("&", "%26", local13); - local13 = Static40.method1014("#", "%23", local13); - if (Static69.signLink.applet == null) { - return; - } - @Pc(109) PrivilegedRequest local109 = Static69.signLink.openUrlStream(new URL(Static69.signLink.applet.getCodeBase(), "clienterror.ws?c=" + GameShell.clientBuild + "&u=" + Player.name37 + "&v1=" + SignLink.javaVendor + "&v2=" + SignLink.javaVersion + "&e=" + local13)); - while (local109.status == 0) { - ThreadUtils.sleep(1L); - } - if (local109.status == 1) { - @Pc(128) DataInputStream local128 = (DataInputStream) local109.result; - local128.read(); - local128.close(); - } - } catch (@Pc(135) Exception local135) { - } - } + @OriginalMember(owner = "client!ha", name = "a", descriptor = "(Ljava/lang/String;Ljava/lang/Throwable;B)V") + public static void report(@OriginalArg(0) String arg0, @OriginalArg(1) Throwable arg1) { + try { + @Pc(13) String local13 = ""; + if (arg1 != null) { + local13 = method1961(arg1); + } + if (arg0 != null) { + if (arg1 != null) { + local13 = local13 + " | "; + } + local13 = local13 + arg0; + } + method31(local13); + local13 = Static40.method1014(":", "%3a", local13); + local13 = Static40.method1014("@", "%40", local13); + local13 = Static40.method1014("&", "%26", local13); + local13 = Static40.method1014("#", "%23", local13); + if (Static69.signLink.applet == null) { + return; + } + @Pc(109) PrivilegedRequest local109 = Static69.signLink.openUrlStream(new URL(Static69.signLink.applet.getCodeBase(), "clienterror.ws?c=" + GameShell.clientBuild + "&u=" + Player.name37 + "&v1=" + SignLink.javaVendor + "&v2=" + SignLink.javaVersion + "&e=" + local13)); + while (local109.status == 0) { + ThreadUtils.sleep(1L); + } + if (local109.status == 1) { + @Pc(128) DataInputStream local128 = (DataInputStream) local109.result; + local128.read(); + local128.close(); + } + } catch (@Pc(135) Exception local135) { + } + } - @OriginalMember(owner = "client!af", name = "a", descriptor = "(ILjava/lang/String;)V") - public static void method31(@OriginalArg(1) String arg0) { - System.out.println("Error: " + Static40.method1014("%0a", "\n", arg0)); - } + @OriginalMember(owner = "client!af", name = "a", descriptor = "(ILjava/lang/String;)V") + public static void method31(@OriginalArg(1) String arg0) { + System.out.println("Error: " + Static40.method1014("%0a", "\n", arg0)); + } - @OriginalMember(owner = "client!hi", name = "a", descriptor = "(ILjava/lang/Throwable;)Ljava/lang/String;") - public static String method1961(@OriginalArg(1) Throwable arg0) throws IOException { - @Pc(24) String local24; - if (arg0 instanceof TracingException) { - @Pc(11) TracingException local11 = (TracingException) arg0; - arg0 = local11.aThrowable1; - local24 = local11.aString3 + " | "; - } else { - local24 = ""; - } - @Pc(32) StringWriter local32 = new StringWriter(); - @Pc(37) PrintWriter local37 = new PrintWriter(local32); - arg0.printStackTrace(local37); - local37.close(); - @Pc(45) String local45 = local32.toString(); - @Pc(53) BufferedReader local53 = new BufferedReader(new StringReader(local45)); - @Pc(56) String local56 = local53.readLine(); - while (true) { - @Pc(59) String local59 = local53.readLine(); - if (local59 == null) { - return local24 + "| " + local56; - } - @Pc(65) int local65 = local59.indexOf(40); - @Pc(72) int local72 = local59.indexOf(41, local65 + 1); - @Pc(79) String local79; - if (local65 == -1) { - local79 = local59; - } else { - local79 = local59.substring(0, local65); - } - local79 = local79.trim(); - local79 = local79.substring(local79.lastIndexOf(32) + 1); - local79 = local79.substring(local79.lastIndexOf(9) + 1); - local24 = local24 + local79; - if (local65 != -1 && local72 != -1) { - @Pc(126) int local126 = local59.indexOf(".java:", local65); - if (local126 >= 0) { - local24 = local24 + local59.substring(local126 + 5, local72); - } - } - local24 = local24 + ' '; - } - } + @OriginalMember(owner = "client!hi", name = "a", descriptor = "(ILjava/lang/Throwable;)Ljava/lang/String;") + public static String method1961(@OriginalArg(1) Throwable arg0) throws IOException { + @Pc(24) String local24; + if (arg0 instanceof TracingException) { + @Pc(11) TracingException local11 = (TracingException) arg0; + arg0 = local11.aThrowable1; + local24 = local11.aString3 + " | "; + } else { + local24 = ""; + } + @Pc(32) StringWriter local32 = new StringWriter(); + @Pc(37) PrintWriter local37 = new PrintWriter(local32); + arg0.printStackTrace(local37); + local37.close(); + @Pc(45) String local45 = local32.toString(); + @Pc(53) BufferedReader local53 = new BufferedReader(new StringReader(local45)); + @Pc(56) String local56 = local53.readLine(); + while (true) { + @Pc(59) String local59 = local53.readLine(); + if (local59 == null) { + return local24 + "| " + local56; + } + @Pc(65) int local65 = local59.indexOf(40); + @Pc(72) int local72 = local59.indexOf(41, local65 + 1); + @Pc(79) String local79; + if (local65 == -1) { + local79 = local59; + } else { + local79 = local59.substring(0, local65); + } + local79 = local79.trim(); + local79 = local79.substring(local79.lastIndexOf(32) + 1); + local79 = local79.substring(local79.lastIndexOf(9) + 1); + local24 = local24 + local79; + if (local65 != -1 && local72 != -1) { + @Pc(126) int local126 = local59.indexOf(".java:", local65); + if (local126 >= 0) { + local24 = local24 + local59.substring(local126 + 5, local72); + } + } + local24 = local24 + ' '; + } + } } diff --git a/client/src/main/java/rt4/TriangleNormal.java b/client/src/main/java/rt4/TriangleNormal.java index 56da9fc..d3e563a 100644 --- a/client/src/main/java/rt4/TriangleNormal.java +++ b/client/src/main/java/rt4/TriangleNormal.java @@ -21,7 +21,7 @@ public final class TriangleNormal { static { for (@Pc(4) int local4 = 0; local4 < 256; local4++) { - @Pc(10) long local10 = (long) local4; + @Pc(10) long local10 = local4; for (@Pc(12) int local12 = 0; local12 < 8; local12++) { if ((local10 & 0x1L) == 1L) { local10 = local10 >>> 1 ^ 0xC96C5795D7870F42L; diff --git a/client/src/main/java/rt4/UnderwaterMaterialRenderer.java b/client/src/main/java/rt4/UnderwaterMaterialRenderer.java index 1e72ed7..1373e6c 100644 --- a/client/src/main/java/rt4/UnderwaterMaterialRenderer.java +++ b/client/src/main/java/rt4/UnderwaterMaterialRenderer.java @@ -1,20 +1,21 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!wg") public final class UnderwaterMaterialRenderer implements MaterialRenderer { - @OriginalMember(owner = "client!wg", name = "b", descriptor = "Z") - public static boolean aBoolean308 = false; - @OriginalMember(owner = "client!nh", name = "Z", descriptor = "I") + @OriginalMember(owner = "client!wg", name = "b", descriptor = "Z") + public static boolean aBoolean308 = false; + @OriginalMember(owner = "client!nh", name = "Z", descriptor = "I") public static int anInt3241 = 128; - @OriginalMember(owner = "client!wg", name = "c", descriptor = "I") + @OriginalMember(owner = "client!wg", name = "c", descriptor = "I") private int anInt5805 = -1; @OriginalMember(owner = "client!wg", name = "a", descriptor = "[F") @@ -66,33 +67,34 @@ public final class UnderwaterMaterialRenderer implements MaterialRenderer { local1.glClientActiveTexture(GL2.GL_TEXTURE0); } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "()V") - public static void applyFogFade() { - @Pc(1) GL2 gl = GlRenderer.gl; - gl.glDisableClientState(GL2.GL_COLOR_ARRAY); - GlRenderer.setLightingEnabled(false); - gl.glDisable(GL2.GL_DEPTH_TEST); - gl.glPushAttrib(GL2.GL_FOG_BIT); - gl.glFogf(GL2.GL_FOG_START, (float) GlobalConfig.VIEW_DISTANCE - (GlobalConfig.VIEW_FADE_DISTANCE * 2.0f)); - GlRenderer.disableDepthMask(); - try { - for (@Pc(19) int i = 0; i < SceneGraph.surfaceHdTiles[0].length; i++) { - @Pc(31) GlTile tile = SceneGraph.surfaceHdTiles[0][i]; - if (tile.texture >= 0 && Rasteriser.textureProvider.getMaterialType(tile.texture) == MaterialManager.WATER) { - gl.glColor4fv(ColorUtils.getRgbFloat(tile.underwaterColor), 0); - @Pc(57) float f = 201.5F - (tile.blend ? 1.0F : 0.5F); - tile.method1944(SceneGraph.tiles, f, true); - } - } - } catch (Exception ignored) {} - gl.glEnableClientState(GL2.GL_COLOR_ARRAY); - GlRenderer.restoreLighting(); - gl.glEnable(GL2.GL_DEPTH_TEST); - gl.glPopAttrib(); - GlRenderer.enableDepthMask(); - } + @OriginalMember(owner = "client!mf", name = "a", descriptor = "()V") + public static void applyFogFade() { + @Pc(1) GL2 gl = GlRenderer.gl; + gl.glDisableClientState(GL2.GL_COLOR_ARRAY); + GlRenderer.setLightingEnabled(false); + gl.glDisable(GL2.GL_DEPTH_TEST); + gl.glPushAttrib(GL2.GL_FOG_BIT); + gl.glFogf(GL2.GL_FOG_START, (float) GlobalConfig.VIEW_DISTANCE - (GlobalConfig.VIEW_FADE_DISTANCE * 2.0f)); + GlRenderer.disableDepthMask(); + try { + for (@Pc(19) int i = 0; i < SceneGraph.surfaceHdTiles[0].length; i++) { + @Pc(31) GlTile tile = SceneGraph.surfaceHdTiles[0][i]; + if (tile.texture >= 0 && Rasteriser.textureProvider.getMaterialType(tile.texture) == MaterialManager.WATER) { + gl.glColor4fv(ColorUtils.getRgbFloat(tile.underwaterColor), 0); + @Pc(57) float f = 201.5F - (tile.blend ? 1.0F : 0.5F); + tile.method1944(SceneGraph.tiles, f, true); + } + } + } catch (Exception ignored) { + } + gl.glEnableClientState(GL2.GL_COLOR_ARRAY); + GlRenderer.restoreLighting(); + gl.glEnable(GL2.GL_DEPTH_TEST); + gl.glPopAttrib(); + GlRenderer.enableDepthMask(); + } - @OriginalMember(owner = "client!wg", name = "d", descriptor = "()V") + @OriginalMember(owner = "client!wg", name = "d", descriptor = "()V") private void method4606() { @Pc(1) GL2 local1 = GlRenderer.gl; this.anInt5806 = local1.glGenLists(2); @@ -108,7 +110,7 @@ public final class UnderwaterMaterialRenderer implements MaterialRenderer { local1.glTexGeni(GL2.GL_R, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_EYE_LINEAR); local1.glTexGeni(GL2.GL_T, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_EYE_LINEAR); local1.glTexGeni(GL2.GL_Q, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR); - local1.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, new float[] { 0.0F, 0.0F, 0.0F, 1.0F }, 0); + local1.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, new float[]{0.0F, 0.0F, 0.0F, 1.0F}, 0); local1.glEnable(GL2.GL_TEXTURE_GEN_S); local1.glEnable(GL2.GL_TEXTURE_GEN_T); local1.glEnable(GL2.GL_TEXTURE_GEN_R); @@ -143,7 +145,7 @@ public final class UnderwaterMaterialRenderer implements MaterialRenderer { local1.glActiveTexture(GL2.GL_TEXTURE2); local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE); } - local1.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, new float[] { 0.0F, 1.0F, 0.0F, 1.0F }, 0); + local1.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, new float[]{0.0F, 1.0F, 0.0F, 1.0F}, 0); local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_MODULATE); local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_TEXTURE); local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC2_RGB, GL2.GL_CONSTANT); diff --git a/client/src/main/java/rt4/VarbitTypeList.java b/client/src/main/java/rt4/VarbitTypeList.java index 77e76dc..33f653f 100644 --- a/client/src/main/java/rt4/VarbitTypeList.java +++ b/client/src/main/java/rt4/VarbitTypeList.java @@ -5,53 +5,53 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class VarbitTypeList { - @OriginalMember(owner = "client!jl", name = "G", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!nj", name = "c", descriptor = "Lclient!ve;") - public static Js5 archive; + @OriginalMember(owner = "client!jl", name = "G", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!nj", name = "c", descriptor = "Lclient!ve;") + public static Js5 archive; - @OriginalMember(owner = "client!og", name = "a", descriptor = "(Lclient!ve;I)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - } + @OriginalMember(owner = "client!og", name = "a", descriptor = "(Lclient!ve;I)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + } - @OriginalMember(owner = "client!jl", name = "a", descriptor = "(IB)Lclient!kk;") - public static VarbitType get(@OriginalArg(0) int arg0) { - @Pc(10) VarbitType local10 = (VarbitType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(31) byte[] local31 = archive.fetchFile(method4349(arg0), method3845(arg0)); - local10 = new VarbitType(); - if (local31 != null) { - local10.decode(new Buffer(local31)); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!jl", name = "a", descriptor = "(IB)Lclient!kk;") + public static VarbitType get(@OriginalArg(0) int arg0) { + @Pc(10) VarbitType local10 = (VarbitType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(31) byte[] local31 = archive.fetchFile(method4349(arg0), method3845(arg0)); + local10 = new VarbitType(); + if (local31 != null) { + local10.decode(new Buffer(local31)); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!wa", name = "d", descriptor = "(BI)V") - public static void clean() { - types.clean(5); - } + @OriginalMember(owner = "client!wa", name = "d", descriptor = "(BI)V") + public static void clean() { + types.clean(5); + } - @OriginalMember(owner = "client!gd", name = "a", descriptor = "(I)V") - public static void method1694() { - types.removeSoft(); - } + @OriginalMember(owner = "client!gd", name = "a", descriptor = "(I)V") + public static void method1694() { + types.removeSoft(); + } - @OriginalMember(owner = "client!ec", name = "b", descriptor = "(I)V") - public static void method1295() { - types.clear(); - } + @OriginalMember(owner = "client!ec", name = "b", descriptor = "(I)V") + public static void method1295() { + types.clear(); + } - @OriginalMember(owner = "client!wf", name = "a", descriptor = "(II)I") - public static int method3845(@OriginalArg(0) int arg0) { - return arg0 & 0x3FF; - } + @OriginalMember(owner = "client!wf", name = "a", descriptor = "(II)I") + public static int method3845(@OriginalArg(0) int arg0) { + return arg0 & 0x3FF; + } - @OriginalMember(owner = "client!uj", name = "a", descriptor = "(II)I") - public static int method4349(@OriginalArg(0) int arg0) { - return arg0 >>> 10; - } + @OriginalMember(owner = "client!uj", name = "a", descriptor = "(II)I") + public static int method4349(@OriginalArg(0) int arg0) { + return arg0 >>> 10; + } } diff --git a/client/src/main/java/rt4/VarcDomain.java b/client/src/main/java/rt4/VarcDomain.java index b251b2e..9906c42 100644 --- a/client/src/main/java/rt4/VarcDomain.java +++ b/client/src/main/java/rt4/VarcDomain.java @@ -3,16 +3,16 @@ package rt4; import org.openrs2.deob.annotation.OriginalMember; public class VarcDomain { - @OriginalMember(owner = "client!t", name = "E", descriptor = "[I") - public static final int[] updatedVarcstrs = new int[32]; - @OriginalMember(owner = "client!km", name = "Bc", descriptor = "[I") - public static final int[] updatedVarcs = new int[32]; - @OriginalMember(owner = "client!me", name = "P", descriptor = "[I") - public static final int[] varcs = new int[2000]; - @OriginalMember(owner = "client!sf", name = "h", descriptor = "[Lclient!na;") - public static final JagString[] varcstrs = new JagString[1000]; - @OriginalMember(owner = "client!fl", name = "B", descriptor = "I") - public static int updatedVarcstrsWriterIndex = 0; - @OriginalMember(owner = "client!ac", name = "o", descriptor = "I") - public static int updatedVarcsWriterIndex = 0; + @OriginalMember(owner = "client!t", name = "E", descriptor = "[I") + public static final int[] updatedVarcstrs = new int[32]; + @OriginalMember(owner = "client!km", name = "Bc", descriptor = "[I") + public static final int[] updatedVarcs = new int[32]; + @OriginalMember(owner = "client!me", name = "P", descriptor = "[I") + public static final int[] varcs = new int[2000]; + @OriginalMember(owner = "client!sf", name = "h", descriptor = "[Lclient!na;") + public static final JagString[] varcstrs = new JagString[1000]; + @OriginalMember(owner = "client!fl", name = "B", descriptor = "I") + public static int updatedVarcstrsWriterIndex = 0; + @OriginalMember(owner = "client!ac", name = "o", descriptor = "I") + public static int updatedVarcsWriterIndex = 0; } diff --git a/client/src/main/java/rt4/VarpDomain.java b/client/src/main/java/rt4/VarpDomain.java index c8269ab..865a2b2 100644 --- a/client/src/main/java/rt4/VarpDomain.java +++ b/client/src/main/java/rt4/VarpDomain.java @@ -5,20 +5,20 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class VarpDomain { - @OriginalMember(owner = "client!gj", name = "q", descriptor = "[I") - public static final int[] updatedVarps = new int[32]; - @OriginalMember(owner = "client!ic", name = "e", descriptor = "[I") + @OriginalMember(owner = "client!gj", name = "q", descriptor = "[I") + public static final int[] updatedVarps = new int[32]; + @OriginalMember(owner = "client!ic", name = "e", descriptor = "[I") public static final int[] varp = new int[3500]; - @OriginalMember(owner = "client!ah", name = "j", descriptor = "[I") - public static final int[] activeVarps = new int[3500]; - @OriginalMember(owner = "client!uj", name = "s", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!ah", name = "j", descriptor = "[I") + public static final int[] activeVarps = new int[3500]; + @OriginalMember(owner = "client!uj", name = "s", descriptor = "Lclient!na;") public static final JagString aClass100_1061 = JagString.parse("null"); - @OriginalMember(owner = "client!ea", name = "s", descriptor = "[I") - public static final int[] anIntArray135 = new int[32]; - @OriginalMember(owner = "client!fi", name = "n", descriptor = "I") - public static int updatedVarpsWriterIndex = 0; - @OriginalMember(owner = "client!qc", name = "K", descriptor = "Lclient!sc;") - public static HashTable aClass133_20 = new HashTable(16); + @OriginalMember(owner = "client!ea", name = "s", descriptor = "[I") + public static final int[] anIntArray135 = new int[32]; + @OriginalMember(owner = "client!fi", name = "n", descriptor = "I") + public static int updatedVarpsWriterIndex = 0; + @OriginalMember(owner = "client!qc", name = "K", descriptor = "Lclient!sc;") + public static HashTable aClass133_20 = new HashTable(16); @OriginalMember(owner = "client!ge", name = "m", descriptor = "I") public static int anInt2157 = 0; @OriginalMember(owner = "client!jb", name = "n", descriptor = "I") @@ -35,42 +35,42 @@ public class VarpDomain { } @OriginalMember(owner = "client!nh", name = "a", descriptor = "(BII)V") - public static void set(@OriginalArg(1) int value, @OriginalArg(2) int id) { - varp[id] = value; - @Pc(20) LongNode local20 = (LongNode) aClass133_20.get((long) id); - if (local20 == null) { - local20 = new LongNode(4611686018427387905L); - aClass133_20.put(local20, (long) id); - } else if (local20.value != 4611686018427387905L) { - local20.value = MonotonicClock.currentTimeMillis() + 500L | 0x4000000000000000L; - } - } + public static void set(@OriginalArg(1) int value, @OriginalArg(2) int id) { + varp[id] = value; + @Pc(20) LongNode local20 = (LongNode) aClass133_20.get(id); + if (local20 == null) { + local20 = new LongNode(4611686018427387905L); + aClass133_20.put(local20, id); + } else if (local20.value != 4611686018427387905L) { + local20.value = MonotonicClock.currentTimeMillis() + 500L | 0x4000000000000000L; + } + } - @OriginalMember(owner = "client!aj", name = "i", descriptor = "(I)V") - public static void reset() { - for (@Pc(3) int local3 = 0; local3 < VarpTypeList.anInt4043; local3++) { - @Pc(19) VarpType local19 = VarpTypeList.get(local3); - if (local19 != null && local19.clientCode == 0) { - varp[local3] = 0; - activeVarps[local3] = 0; - } - } - aClass133_20 = new HashTable(16); - } + @OriginalMember(owner = "client!aj", name = "i", descriptor = "(I)V") + public static void reset() { + for (@Pc(3) int local3 = 0; local3 < VarpTypeList.anInt4043; local3++) { + @Pc(19) VarpType local19 = VarpTypeList.get(local3); + if (local19 != null && local19.clientCode == 0) { + varp[local3] = 0; + activeVarps[local3] = 0; + } + } + aClass133_20 = new HashTable(16); + } - @OriginalMember(owner = "client!li", name = "a", descriptor = "(III)V") + @OriginalMember(owner = "client!li", name = "a", descriptor = "(III)V") public static void method2766(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { activeVarps[arg0] = arg1; - @Pc(21) LongNode local21 = (LongNode) aClass133_20.get((long) arg0); + @Pc(21) LongNode local21 = (LongNode) aClass133_20.get(arg0); if (local21 == null) { local21 = new LongNode(MonotonicClock.currentTimeMillis() + 500L); - aClass133_20.put(local21, (long) arg0); + aClass133_20.put(local21, arg0); } else { local21.value = MonotonicClock.currentTimeMillis() + 500L; } } - @OriginalMember(owner = "client!me", name = "a", descriptor = "(II)I") + @OriginalMember(owner = "client!me", name = "a", descriptor = "(II)I") public static int getVarbit(@OriginalArg(1) int arg0) { @Pc(13) VarbitType local13 = VarbitTypeList.get(arg0); @Pc(16) int local16 = local13.baseVar; @@ -80,21 +80,21 @@ public class VarpDomain { return activeVarps[local16] >> local22 & local29; } - @OriginalMember(owner = "client!qg", name = "a", descriptor = "(IZI)V") - public static void setVarbitClient(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(7) VarbitType local7 = VarbitTypeList.get(arg0); - @Pc(10) int local10 = local7.endBit; - @Pc(16) int local16 = local7.startBit; - @Pc(19) int local19 = local7.baseVar; - @Pc(25) int local25 = anIntArray135[local10 - local16]; - if (arg1 < 0 || arg1 > local25) { - arg1 = 0; - } - local25 <<= local16; - method2766(local19, local25 & arg1 << local16 | activeVarps[local19] & ~local25); - } + @OriginalMember(owner = "client!qg", name = "a", descriptor = "(IZI)V") + public static void setVarbitClient(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(7) VarbitType local7 = VarbitTypeList.get(arg0); + @Pc(10) int local10 = local7.endBit; + @Pc(16) int local16 = local7.startBit; + @Pc(19) int local19 = local7.baseVar; + @Pc(25) int local25 = anIntArray135[local10 - local16]; + if (arg1 < 0 || arg1 > local25) { + arg1 = 0; + } + local25 <<= local16; + method2766(local19, local25 & arg1 << local16 | activeVarps[local19] & ~local25); + } - @OriginalMember(owner = "client!wd", name = "a", descriptor = "(BII)V") + @OriginalMember(owner = "client!wd", name = "a", descriptor = "(BII)V") public static void setVarbit(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { @Pc(14) VarbitType local14 = VarbitTypeList.get(arg1); @Pc(17) int local17 = local14.baseVar; @@ -108,7 +108,7 @@ public class VarpDomain { set(arg0 << local23 & local29 | ~local29 & varp[local17], local17); } - @OriginalMember(owner = "client!gl", name = "a", descriptor = "(II)V") + @OriginalMember(owner = "client!gl", name = "a", descriptor = "(II)V") public static void refreshMagicVarp(@OriginalArg(1) int arg0) { InterfaceList.redrawActiveInterfaces(); AreaSoundManager.updateMulti(); diff --git a/client/src/main/java/rt4/VarpTypeList.java b/client/src/main/java/rt4/VarpTypeList.java index b5b469d..93903d7 100644 --- a/client/src/main/java/rt4/VarpTypeList.java +++ b/client/src/main/java/rt4/VarpTypeList.java @@ -5,46 +5,46 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class VarpTypeList { - @OriginalMember(owner = "client!sm", name = "c", descriptor = "Lclient!n;") - public static final SoftLruHashTable types = new SoftLruHashTable(64); - @OriginalMember(owner = "client!gg", name = "ab", descriptor = "Lclient!ve;") - public static Js5 archive; - @OriginalMember(owner = "client!nb", name = "p", descriptor = "I") - public static int anInt4043; + @OriginalMember(owner = "client!sm", name = "c", descriptor = "Lclient!n;") + public static final SoftLruHashTable types = new SoftLruHashTable(64); + @OriginalMember(owner = "client!gg", name = "ab", descriptor = "Lclient!ve;") + public static Js5 archive; + @OriginalMember(owner = "client!nb", name = "p", descriptor = "I") + public static int anInt4043; - @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Lclient!ve;B)V") - public static void init(@OriginalArg(0) Js5 arg0) { - archive = arg0; - anInt4043 = archive.getGroupCapacity(16); - } + @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Lclient!ve;B)V") + public static void init(@OriginalArg(0) Js5 arg0) { + archive = arg0; + anInt4043 = archive.getGroupCapacity(16); + } - @OriginalMember(owner = "client!ub", name = "a", descriptor = "(II)Lclient!eh;") - public static VarpType get(@OriginalArg(1) int arg0) { - @Pc(10) VarpType local10 = (VarpType) types.get((long) arg0); - if (local10 != null) { - return local10; - } - @Pc(20) byte[] local20 = archive.fetchFile(16, arg0); - local10 = new VarpType(); - if (local20 != null) { - local10.decode(new Buffer(local20)); - } - types.put(local10, (long) arg0); - return local10; - } + @OriginalMember(owner = "client!ub", name = "a", descriptor = "(II)Lclient!eh;") + public static VarpType get(@OriginalArg(1) int arg0) { + @Pc(10) VarpType local10 = (VarpType) types.get(arg0); + if (local10 != null) { + return local10; + } + @Pc(20) byte[] local20 = archive.fetchFile(16, arg0); + local10 = new VarpType(); + if (local20 != null) { + local10.decode(new Buffer(local20)); + } + types.put(local10, arg0); + return local10; + } - @OriginalMember(owner = "client!ud", name = "d", descriptor = "(I)V") - public static void method4266() { - types.clear(); - } + @OriginalMember(owner = "client!ud", name = "d", descriptor = "(I)V") + public static void method4266() { + types.clear(); + } - @OriginalMember(owner = "client!ab", name = "b", descriptor = "(B)V") - public static void method4657() { - types.removeSoft(); - } + @OriginalMember(owner = "client!ab", name = "b", descriptor = "(B)V") + public static void method4657() { + types.removeSoft(); + } - @OriginalMember(owner = "client!bn", name = "c", descriptor = "(II)V") - public static void clean() { - types.clean(5); - } + @OriginalMember(owner = "client!bn", name = "c", descriptor = "(II)V") + public static void clean() { + types.clean(5); + } } diff --git a/client/src/main/java/rt4/VorbisCodebook.java b/client/src/main/java/rt4/VorbisCodebook.java index 3408409..789282a 100644 --- a/client/src/main/java/rt4/VorbisCodebook.java +++ b/client/src/main/java/rt4/VorbisCodebook.java @@ -109,13 +109,13 @@ public final class VorbisCodebook { } } - @OriginalMember(owner = "client!ji", name = "a", descriptor = "(II)I") - public static int lookup1Values(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(10) int returnValue; - for (returnValue = (int) Math.pow((double) arg0, 1.0D / (double) arg1) + 1; IntUtils.pow(arg1, returnValue) > arg0; returnValue--) { - } - return returnValue; - } + @OriginalMember(owner = "client!ji", name = "a", descriptor = "(II)I") + public static int lookup1Values(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(10) int returnValue; + for (returnValue = (int) Math.pow(arg0, 1.0D / (double) arg1) + 1; IntUtils.pow(arg1, returnValue) > arg0; returnValue--) { + } + return returnValue; + } @OriginalMember(owner = "client!ji", name = "a", descriptor = "()[F") public final float[] decodeVq() { diff --git a/client/src/main/java/rt4/VorbisFloor.java b/client/src/main/java/rt4/VorbisFloor.java index 4dec563..2f8b34c 100644 --- a/client/src/main/java/rt4/VorbisFloor.java +++ b/client/src/main/java/rt4/VorbisFloor.java @@ -8,10 +8,10 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ie") public final class VorbisFloor { - @OriginalMember(owner = "client!ie", name = "k", descriptor = "[I") - public static final int[] RANGES = new int[] { 256, 128, 86, 64 }; + @OriginalMember(owner = "client!ie", name = "k", descriptor = "[I") + public static final int[] RANGES = new int[]{256, 128, 86, 64}; @OriginalMember(owner = "client!ie", name = "l", descriptor = "[F") - public static final float[] INVERSE_DB_TABLE = new float[] { 1.0649863E-7F, 1.1341951E-7F, 1.2079015E-7F, 1.2863978E-7F, 1.369995E-7F, 1.459025E-7F, 1.5538409E-7F, 1.6548181E-7F, 1.7623574E-7F, 1.8768856E-7F, 1.998856E-7F, 2.128753E-7F, 2.2670913E-7F, 2.4144197E-7F, 2.5713223E-7F, 2.7384212E-7F, 2.9163792E-7F, 3.1059022E-7F, 3.307741E-7F, 3.5226967E-7F, 3.7516213E-7F, 3.995423E-7F, 4.255068E-7F, 4.5315863E-7F, 4.8260745E-7F, 5.1397E-7F, 5.4737063E-7F, 5.829419E-7F, 6.208247E-7F, 6.611694E-7F, 7.041359E-7F, 7.4989464E-7F, 7.98627E-7F, 8.505263E-7F, 9.057983E-7F, 9.646621E-7F, 1.0273513E-6F, 1.0941144E-6F, 1.1652161E-6F, 1.2409384E-6F, 1.3215816E-6F, 1.4074654E-6F, 1.4989305E-6F, 1.5963394E-6F, 1.7000785E-6F, 1.8105592E-6F, 1.9282195E-6F, 2.053526E-6F, 2.1869757E-6F, 2.3290977E-6F, 2.4804558E-6F, 2.6416496E-6F, 2.813319E-6F, 2.9961443E-6F, 3.1908505E-6F, 3.39821E-6F, 3.619045E-6F, 3.8542307E-6F, 4.1047006E-6F, 4.371447E-6F, 4.6555283E-6F, 4.958071E-6F, 5.280274E-6F, 5.623416E-6F, 5.988857E-6F, 6.3780467E-6F, 6.7925284E-6F, 7.2339453E-6F, 7.704048E-6F, 8.2047E-6F, 8.737888E-6F, 9.305725E-6F, 9.910464E-6F, 1.0554501E-5F, 1.1240392E-5F, 1.1970856E-5F, 1.2748789E-5F, 1.3577278E-5F, 1.4459606E-5F, 1.5399271E-5F, 1.6400005E-5F, 1.7465769E-5F, 1.8600793E-5F, 1.9809577E-5F, 2.1096914E-5F, 2.2467912E-5F, 2.3928002E-5F, 2.5482977E-5F, 2.7139005E-5F, 2.890265E-5F, 3.078091E-5F, 3.2781227E-5F, 3.4911533E-5F, 3.718028E-5F, 3.9596467E-5F, 4.2169668E-5F, 4.491009E-5F, 4.7828602E-5F, 5.0936775E-5F, 5.424693E-5F, 5.7772202E-5F, 6.152657E-5F, 6.552491E-5F, 6.9783084E-5F, 7.4317984E-5F, 7.914758E-5F, 8.429104E-5F, 8.976875E-5F, 9.560242E-5F, 1.0181521E-4F, 1.0843174E-4F, 1.1547824E-4F, 1.2298267E-4F, 1.3097477E-4F, 1.3948625E-4F, 1.4855085E-4F, 1.5820454E-4F, 1.6848555E-4F, 1.7943469E-4F, 1.9109536E-4F, 2.0351382E-4F, 2.167393E-4F, 2.3082423E-4F, 2.4582449E-4F, 2.6179955E-4F, 2.7881275E-4F, 2.9693157E-4F, 3.1622787E-4F, 3.3677815E-4F, 3.5866388E-4F, 3.8197188E-4F, 4.0679457E-4F, 4.3323037E-4F, 4.613841E-4F, 4.913675E-4F, 5.2329927E-4F, 5.573062E-4F, 5.935231E-4F, 6.320936E-4F, 6.731706E-4F, 7.16917E-4F, 7.635063E-4F, 8.1312325E-4F, 8.6596457E-4F, 9.2223985E-4F, 9.821722E-4F, 0.0010459992F, 0.0011139743F, 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 0.0019632196F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 0.0025254795F, 0.0026895993F, 0.0028643848F, 0.0030505287F, 0.003248769F, 0.0034598925F, 0.0036847359F, 0.0039241905F, 0.0041792067F, 0.004450795F, 0.004740033F, 0.005048067F, 0.0053761187F, 0.005725489F, 0.0060975635F, 0.0064938175F, 0.0069158226F, 0.0073652514F, 0.007843887F, 0.008353627F, 0.008896492F, 0.009474637F, 0.010090352F, 0.01074608F, 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 0.014722068F, 0.015678791F, 0.016697686F, 0.017782796F, 0.018938422F, 0.020169148F, 0.021479854F, 0.022875736F, 0.02436233F, 0.025945531F, 0.027631618F, 0.029427277F, 0.031339627F, 0.03337625F, 0.035545226F, 0.037855156F, 0.0403152F, 0.042935107F, 0.045725275F, 0.048696756F, 0.05186135F, 0.05523159F, 0.05882085F, 0.062643364F, 0.06671428F, 0.07104975F, 0.075666964F, 0.08058423F, 0.08582105F, 0.09139818F, 0.097337745F, 0.1036633F, 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 0.14201812F, 0.15124726F, 0.16107617F, 0.1715438F, 0.18269168F, 0.19456401F, 0.20720787F, 0.22067343F, 0.23501402F, 0.25028655F, 0.26655158F, 0.28387362F, 0.3023213F, 0.32196787F, 0.34289113F, 0.36517414F, 0.3889052F, 0.41417846F, 0.44109413F, 0.4697589F, 0.50028646F, 0.53279793F, 0.5674221F, 0.6042964F, 0.64356697F, 0.6853896F, 0.72993004F, 0.777365F, 0.8278826F, 0.88168305F, 0.9389798F, 1.0F }; + public static final float[] INVERSE_DB_TABLE = new float[]{1.0649863E-7F, 1.1341951E-7F, 1.2079015E-7F, 1.2863978E-7F, 1.369995E-7F, 1.459025E-7F, 1.5538409E-7F, 1.6548181E-7F, 1.7623574E-7F, 1.8768856E-7F, 1.998856E-7F, 2.128753E-7F, 2.2670913E-7F, 2.4144197E-7F, 2.5713223E-7F, 2.7384212E-7F, 2.9163792E-7F, 3.1059022E-7F, 3.307741E-7F, 3.5226967E-7F, 3.7516213E-7F, 3.995423E-7F, 4.255068E-7F, 4.5315863E-7F, 4.8260745E-7F, 5.1397E-7F, 5.4737063E-7F, 5.829419E-7F, 6.208247E-7F, 6.611694E-7F, 7.041359E-7F, 7.4989464E-7F, 7.98627E-7F, 8.505263E-7F, 9.057983E-7F, 9.646621E-7F, 1.0273513E-6F, 1.0941144E-6F, 1.1652161E-6F, 1.2409384E-6F, 1.3215816E-6F, 1.4074654E-6F, 1.4989305E-6F, 1.5963394E-6F, 1.7000785E-6F, 1.8105592E-6F, 1.9282195E-6F, 2.053526E-6F, 2.1869757E-6F, 2.3290977E-6F, 2.4804558E-6F, 2.6416496E-6F, 2.813319E-6F, 2.9961443E-6F, 3.1908505E-6F, 3.39821E-6F, 3.619045E-6F, 3.8542307E-6F, 4.1047006E-6F, 4.371447E-6F, 4.6555283E-6F, 4.958071E-6F, 5.280274E-6F, 5.623416E-6F, 5.988857E-6F, 6.3780467E-6F, 6.7925284E-6F, 7.2339453E-6F, 7.704048E-6F, 8.2047E-6F, 8.737888E-6F, 9.305725E-6F, 9.910464E-6F, 1.0554501E-5F, 1.1240392E-5F, 1.1970856E-5F, 1.2748789E-5F, 1.3577278E-5F, 1.4459606E-5F, 1.5399271E-5F, 1.6400005E-5F, 1.7465769E-5F, 1.8600793E-5F, 1.9809577E-5F, 2.1096914E-5F, 2.2467912E-5F, 2.3928002E-5F, 2.5482977E-5F, 2.7139005E-5F, 2.890265E-5F, 3.078091E-5F, 3.2781227E-5F, 3.4911533E-5F, 3.718028E-5F, 3.9596467E-5F, 4.2169668E-5F, 4.491009E-5F, 4.7828602E-5F, 5.0936775E-5F, 5.424693E-5F, 5.7772202E-5F, 6.152657E-5F, 6.552491E-5F, 6.9783084E-5F, 7.4317984E-5F, 7.914758E-5F, 8.429104E-5F, 8.976875E-5F, 9.560242E-5F, 1.0181521E-4F, 1.0843174E-4F, 1.1547824E-4F, 1.2298267E-4F, 1.3097477E-4F, 1.3948625E-4F, 1.4855085E-4F, 1.5820454E-4F, 1.6848555E-4F, 1.7943469E-4F, 1.9109536E-4F, 2.0351382E-4F, 2.167393E-4F, 2.3082423E-4F, 2.4582449E-4F, 2.6179955E-4F, 2.7881275E-4F, 2.9693157E-4F, 3.1622787E-4F, 3.3677815E-4F, 3.5866388E-4F, 3.8197188E-4F, 4.0679457E-4F, 4.3323037E-4F, 4.613841E-4F, 4.913675E-4F, 5.2329927E-4F, 5.573062E-4F, 5.935231E-4F, 6.320936E-4F, 6.731706E-4F, 7.16917E-4F, 7.635063E-4F, 8.1312325E-4F, 8.6596457E-4F, 9.2223985E-4F, 9.821722E-4F, 0.0010459992F, 0.0011139743F, 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 0.0019632196F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 0.0025254795F, 0.0026895993F, 0.0028643848F, 0.0030505287F, 0.003248769F, 0.0034598925F, 0.0036847359F, 0.0039241905F, 0.0041792067F, 0.004450795F, 0.004740033F, 0.005048067F, 0.0053761187F, 0.005725489F, 0.0060975635F, 0.0064938175F, 0.0069158226F, 0.0073652514F, 0.007843887F, 0.008353627F, 0.008896492F, 0.009474637F, 0.010090352F, 0.01074608F, 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 0.014722068F, 0.015678791F, 0.016697686F, 0.017782796F, 0.018938422F, 0.020169148F, 0.021479854F, 0.022875736F, 0.02436233F, 0.025945531F, 0.027631618F, 0.029427277F, 0.031339627F, 0.03337625F, 0.035545226F, 0.037855156F, 0.0403152F, 0.042935107F, 0.045725275F, 0.048696756F, 0.05186135F, 0.05523159F, 0.05882085F, 0.062643364F, 0.06671428F, 0.07104975F, 0.075666964F, 0.08058423F, 0.08582105F, 0.09139818F, 0.097337745F, 0.1036633F, 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 0.14201812F, 0.15124726F, 0.16107617F, 0.1715438F, 0.18269168F, 0.19456401F, 0.20720787F, 0.22067343F, 0.23501402F, 0.25028655F, 0.26655158F, 0.28387362F, 0.3023213F, 0.32196787F, 0.34289113F, 0.36517414F, 0.3889052F, 0.41417846F, 0.44109413F, 0.4697589F, 0.50028646F, 0.53279793F, 0.5674221F, 0.6042964F, 0.64356697F, 0.6853896F, 0.72993004F, 0.777365F, 0.8278826F, 0.88168305F, 0.9389798F, 1.0F}; @OriginalMember(owner = "client!ie", name = "b", descriptor = "[Z") public static boolean[] step2Flag; @OriginalMember(owner = "client!ie", name = "h", descriptor = "[I") diff --git a/client/src/main/java/rt4/VorbisSound.java b/client/src/main/java/rt4/VorbisSound.java index 5b8a0aa..64d6b05 100644 --- a/client/src/main/java/rt4/VorbisSound.java +++ b/client/src/main/java/rt4/VorbisSound.java @@ -8,49 +8,49 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!jc") public final class VorbisSound extends Node { - @OriginalMember(owner = "client!jc", name = "p", descriptor = "[F") - public static float[] trigB1; - @OriginalMember(owner = "client!jc", name = "q", descriptor = "[F") - public static float[] trigC1; - @OriginalMember(owner = "client!jc", name = "t", descriptor = "[I") - public static int[] bitReverse0; - @OriginalMember(owner = "client!jc", name = "u", descriptor = "[Lclient!vb;") - public static VorbisResidue[] residues; - @OriginalMember(owner = "client!jc", name = "v", descriptor = "[Z") - public static boolean[] modeBlockFlags; - @OriginalMember(owner = "client!jc", name = "y", descriptor = "I") - public static int blockSize1; - @OriginalMember(owner = "client!jc", name = "A", descriptor = "[Lclient!uk;") - public static VorbisMapping[] mappings; - @OriginalMember(owner = "client!jc", name = "B", descriptor = "[F") - public static float[] trigA1; - @OriginalMember(owner = "client!jc", name = "C", descriptor = "[F") - public static float[] trigA0; - @OriginalMember(owner = "client!jc", name = "E", descriptor = "I") - public static int blockSize0; - @OriginalMember(owner = "client!jc", name = "F", descriptor = "[F") - public static float[] vector; - @OriginalMember(owner = "client!jc", name = "I", descriptor = "[Lclient!ji;") - public static VorbisCodebook[] codebooks; - @OriginalMember(owner = "client!jc", name = "J", descriptor = "[Lclient!ie;") - public static VorbisFloor[] floors; - @OriginalMember(owner = "client!jc", name = "L", descriptor = "[I") - public static int[] bitReverse1; - @OriginalMember(owner = "client!jc", name = "P", descriptor = "[F") - public static float[] trigB0; - @OriginalMember(owner = "client!jc", name = "S", descriptor = "[F") - public static float[] trigC0; - @OriginalMember(owner = "client!jc", name = "W", descriptor = "[I") - public static int[] modeMappings; - @OriginalMember(owner = "client!jc", name = "G", descriptor = "I") - private static int position; - @OriginalMember(owner = "client!jc", name = "Q", descriptor = "I") - private static int bitPosition; - @OriginalMember(owner = "client!jc", name = "T", descriptor = "[B") - private static byte[] bytes; - @OriginalMember(owner = "client!jc", name = "H", descriptor = "Z") - private static boolean aBoolean149 = false; - @OriginalMember(owner = "client!jc", name = "r", descriptor = "I") + @OriginalMember(owner = "client!jc", name = "p", descriptor = "[F") + public static float[] trigB1; + @OriginalMember(owner = "client!jc", name = "q", descriptor = "[F") + public static float[] trigC1; + @OriginalMember(owner = "client!jc", name = "t", descriptor = "[I") + public static int[] bitReverse0; + @OriginalMember(owner = "client!jc", name = "u", descriptor = "[Lclient!vb;") + public static VorbisResidue[] residues; + @OriginalMember(owner = "client!jc", name = "v", descriptor = "[Z") + public static boolean[] modeBlockFlags; + @OriginalMember(owner = "client!jc", name = "y", descriptor = "I") + public static int blockSize1; + @OriginalMember(owner = "client!jc", name = "A", descriptor = "[Lclient!uk;") + public static VorbisMapping[] mappings; + @OriginalMember(owner = "client!jc", name = "B", descriptor = "[F") + public static float[] trigA1; + @OriginalMember(owner = "client!jc", name = "C", descriptor = "[F") + public static float[] trigA0; + @OriginalMember(owner = "client!jc", name = "E", descriptor = "I") + public static int blockSize0; + @OriginalMember(owner = "client!jc", name = "F", descriptor = "[F") + public static float[] vector; + @OriginalMember(owner = "client!jc", name = "I", descriptor = "[Lclient!ji;") + public static VorbisCodebook[] codebooks; + @OriginalMember(owner = "client!jc", name = "J", descriptor = "[Lclient!ie;") + public static VorbisFloor[] floors; + @OriginalMember(owner = "client!jc", name = "L", descriptor = "[I") + public static int[] bitReverse1; + @OriginalMember(owner = "client!jc", name = "P", descriptor = "[F") + public static float[] trigB0; + @OriginalMember(owner = "client!jc", name = "S", descriptor = "[F") + public static float[] trigC0; + @OriginalMember(owner = "client!jc", name = "W", descriptor = "[I") + public static int[] modeMappings; + @OriginalMember(owner = "client!jc", name = "G", descriptor = "I") + private static int position; + @OriginalMember(owner = "client!jc", name = "Q", descriptor = "I") + private static int bitPosition; + @OriginalMember(owner = "client!jc", name = "T", descriptor = "[B") + private static byte[] bytes; + @OriginalMember(owner = "client!jc", name = "H", descriptor = "Z") + private static boolean aBoolean149 = false; + @OriginalMember(owner = "client!jc", name = "r", descriptor = "I") private int prevN; @OriginalMember(owner = "client!jc", name = "s", descriptor = "I") @@ -94,161 +94,161 @@ public final class VorbisSound extends Node { this.decode(bytes); } - @OriginalMember(owner = "client!jc", name = "c", descriptor = "(I)F") - public static float float32Unpack(@OriginalArg(0) int x) { - @Pc(3) int mantissa = x & 0x1FFFFF; - @Pc(7) int sign = x & Integer.MIN_VALUE; - @Pc(13) int exponent = x >> 21 & 0x3FF; - if (sign != 0) { - mantissa = -mantissa; - } - return (float) ((double) mantissa * Math.pow(2.0D, exponent - 788)); - } + @OriginalMember(owner = "client!jc", name = "c", descriptor = "(I)F") + public static float float32Unpack(@OriginalArg(0) int x) { + @Pc(3) int mantissa = x & 0x1FFFFF; + @Pc(7) int sign = x & Integer.MIN_VALUE; + @Pc(13) int exponent = x >> 21 & 0x3FF; + if (sign != 0) { + mantissa = -mantissa; + } + return (float) ((double) mantissa * Math.pow(2.0D, exponent - 788)); + } - @OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;)Z") - private static boolean method2344(@OriginalArg(0) Js5 arg0) { - if (!aBoolean149) { - @Pc(7) byte[] local7 = arg0.fetchFile(0, 0); - if (local7 == null) { - return false; - } - method2349(local7); - aBoolean149 = true; - } - return true; - } + @OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;)Z") + private static boolean method2344(@OriginalArg(0) Js5 arg0) { + if (!aBoolean149) { + @Pc(7) byte[] local7 = arg0.fetchFile(0, 0); + if (local7 == null) { + return false; + } + method2349(local7); + aBoolean149 = true; + } + return true; + } - @OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;II)Lclient!jc;") - public static VorbisSound create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - if (method2344(arg0)) { - @Pc(16) byte[] local16 = arg0.fetchFile(arg1, arg2); - return local16 == null ? null : new VorbisSound(local16); - } else { - arg0.isFileReady(arg2, arg1); - return null; - } - } + @OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;II)Lclient!jc;") + public static VorbisSound create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { + if (method2344(arg0)) { + @Pc(16) byte[] local16 = arg0.fetchFile(arg1, arg2); + return local16 == null ? null : new VorbisSound(local16); + } else { + arg0.isFileReady(arg2, arg1); + return null; + } + } - @OriginalMember(owner = "client!jc", name = "b", descriptor = "()I") - public static int readBit() { - @Pc(7) int local7 = bytes[position] >> bitPosition & 0x1; - bitPosition++; - position += bitPosition >> 3; - bitPosition &= 0x7; - return local7; - } + @OriginalMember(owner = "client!jc", name = "b", descriptor = "()I") + public static int readBit() { + @Pc(7) int local7 = bytes[position] >> bitPosition & 0x1; + bitPosition++; + position += bitPosition >> 3; + bitPosition &= 0x7; + return local7; + } - @OriginalMember(owner = "client!jc", name = "a", descriptor = "([BI)V") - public static void setBytes(@OriginalArg(0) byte[] arg0) { - bytes = arg0; - position = 0; - bitPosition = 0; - } + @OriginalMember(owner = "client!jc", name = "a", descriptor = "([BI)V") + public static void setBytes(@OriginalArg(0) byte[] arg0) { + bytes = arg0; + position = 0; + bitPosition = 0; + } - @OriginalMember(owner = "client!jc", name = "b", descriptor = "([B)V") - private static void method2349(@OriginalArg(0) byte[] arg0) { - setBytes(arg0); - blockSize0 = 0x1 << readBits(4); - blockSize1 = 0x1 << readBits(4); - vector = new float[blockSize1]; - @Pc(17) int local17; - @Pc(26) int local26; - @Pc(30) int local30; - @Pc(34) int local34; - @Pc(38) int local38; - for (local17 = 0; local17 < 2; local17++) { - local26 = local17 == 0 ? blockSize0 : blockSize1; - local30 = local26 >> 1; - local34 = local26 >> 2; - local38 = local26 >> 3; - @Pc(41) float[] local41 = new float[local30]; - for (@Pc(43) int local43 = 0; local43 < local34; local43++) { - local41[local43 * 2] = (float) Math.cos((double) (local43 * 4) * 3.141592653589793D / (double) local26); - local41[local43 * 2 + 1] = -((float) Math.sin((double) (local43 * 4) * 3.141592653589793D / (double) local26)); - } - @Pc(86) float[] local86 = new float[local30]; - for (@Pc(88) int local88 = 0; local88 < local34; local88++) { - local86[local88 * 2] = (float) Math.cos((double) (local88 * 2 + 1) * 3.141592653589793D / (double) (local26 * 2)); - local86[local88 * 2 + 1] = (float) Math.sin((double) (local88 * 2 + 1) * 3.141592653589793D / (double) (local26 * 2)); - } - @Pc(138) float[] local138 = new float[local34]; - for (@Pc(140) int local140 = 0; local140 < local38; local140++) { - local138[local140 * 2] = (float) Math.cos((double) (local140 * 4 + 2) * 3.141592653589793D / (double) local26); - local138[local140 * 2 + 1] = -((float) Math.sin((double) (local140 * 4 + 2) * 3.141592653589793D / (double) local26)); - } - @Pc(187) int[] local187 = new int[local38]; - @Pc(193) int local193 = IntUtils.bitCount(local38 - 1); - for (@Pc(195) int local195 = 0; local195 < local38; local195++) { - local187[local195] = method667(local193, local195); - } - if (local17 == 0) { - trigA0 = local41; - trigB0 = local86; - trigC0 = local138; - bitReverse0 = local187; - } else { - trigA1 = local41; - trigB1 = local86; - trigC1 = local138; - bitReverse1 = local187; - } - } - local17 = readBits(8) + 1; + @OriginalMember(owner = "client!jc", name = "b", descriptor = "([B)V") + private static void method2349(@OriginalArg(0) byte[] arg0) { + setBytes(arg0); + blockSize0 = 0x1 << readBits(4); + blockSize1 = 0x1 << readBits(4); + vector = new float[blockSize1]; + @Pc(17) int local17; + @Pc(26) int local26; + @Pc(30) int local30; + @Pc(34) int local34; + @Pc(38) int local38; + for (local17 = 0; local17 < 2; local17++) { + local26 = local17 == 0 ? blockSize0 : blockSize1; + local30 = local26 >> 1; + local34 = local26 >> 2; + local38 = local26 >> 3; + @Pc(41) float[] local41 = new float[local30]; + for (@Pc(43) int local43 = 0; local43 < local34; local43++) { + local41[local43 * 2] = (float) Math.cos((double) (local43 * 4) * 3.141592653589793D / (double) local26); + local41[local43 * 2 + 1] = -((float) Math.sin((double) (local43 * 4) * 3.141592653589793D / (double) local26)); + } + @Pc(86) float[] local86 = new float[local30]; + for (@Pc(88) int local88 = 0; local88 < local34; local88++) { + local86[local88 * 2] = (float) Math.cos((double) (local88 * 2 + 1) * 3.141592653589793D / (double) (local26 * 2)); + local86[local88 * 2 + 1] = (float) Math.sin((double) (local88 * 2 + 1) * 3.141592653589793D / (double) (local26 * 2)); + } + @Pc(138) float[] local138 = new float[local34]; + for (@Pc(140) int local140 = 0; local140 < local38; local140++) { + local138[local140 * 2] = (float) Math.cos((double) (local140 * 4 + 2) * 3.141592653589793D / (double) local26); + local138[local140 * 2 + 1] = -((float) Math.sin((double) (local140 * 4 + 2) * 3.141592653589793D / (double) local26)); + } + @Pc(187) int[] local187 = new int[local38]; + @Pc(193) int local193 = IntUtils.bitCount(local38 - 1); + for (@Pc(195) int local195 = 0; local195 < local38; local195++) { + local187[local195] = method667(local193, local195); + } + if (local17 == 0) { + trigA0 = local41; + trigB0 = local86; + trigC0 = local138; + bitReverse0 = local187; + } else { + trigA1 = local41; + trigB1 = local86; + trigC1 = local138; + bitReverse1 = local187; + } + } + local17 = readBits(8) + 1; codebooks = new VorbisCodebook[local17]; - for (local26 = 0; local26 < local17; local26++) { - codebooks[local26] = new VorbisCodebook(); - } - local26 = readBits(6) + 1; - for (local30 = 0; local30 < local26; local30++) { - readBits(16); - } - local26 = readBits(6) + 1; - floors = new VorbisFloor[local26]; - for (local30 = 0; local30 < local26; local30++) { - floors[local30] = new VorbisFloor(); - } - local30 = readBits(6) + 1; - residues = new VorbisResidue[local30]; - for (local34 = 0; local34 < local30; local34++) { - residues[local34] = new VorbisResidue(); - } - local34 = readBits(6) + 1; - mappings = new VorbisMapping[local34]; - for (local38 = 0; local38 < local34; local38++) { - mappings[local38] = new VorbisMapping(); - } - local38 = readBits(6) + 1; - modeBlockFlags = new boolean[local38]; - modeMappings = new int[local38]; - for (@Pc(340) int local340 = 0; local340 < local38; local340++) { - modeBlockFlags[local340] = readBit() != 0; - readBits(16); - readBits(16); - modeMappings[local340] = readBits(8); - } - } + for (local26 = 0; local26 < local17; local26++) { + codebooks[local26] = new VorbisCodebook(); + } + local26 = readBits(6) + 1; + for (local30 = 0; local30 < local26; local30++) { + readBits(16); + } + local26 = readBits(6) + 1; + floors = new VorbisFloor[local26]; + for (local30 = 0; local30 < local26; local30++) { + floors[local30] = new VorbisFloor(); + } + local30 = readBits(6) + 1; + residues = new VorbisResidue[local30]; + for (local34 = 0; local34 < local30; local34++) { + residues[local34] = new VorbisResidue(); + } + local34 = readBits(6) + 1; + mappings = new VorbisMapping[local34]; + for (local38 = 0; local38 < local34; local38++) { + mappings[local38] = new VorbisMapping(); + } + local38 = readBits(6) + 1; + modeBlockFlags = new boolean[local38]; + modeMappings = new int[local38]; + for (@Pc(340) int local340 = 0; local340 < local38; local340++) { + modeBlockFlags[local340] = readBit() != 0; + readBits(16); + readBits(16); + modeMappings[local340] = readBits(8); + } + } - @OriginalMember(owner = "client!jc", name = "e", descriptor = "(I)I") - public static int readBits(@OriginalArg(0) int len) { - @Pc(1) int local1 = 0; - @Pc(3) int local3 = 0; - @Pc(12) int local12; - while (len >= 8 - bitPosition) { - local12 = 8 - bitPosition; - @Pc(18) int local18 = (0x1 << local12) - 1; - local1 += (bytes[position] >> bitPosition & local18) << local3; - bitPosition = 0; - position++; - local3 += local12; - len -= local12; - } - if (len > 0) { - local12 = (0x1 << len) - 1; - local1 += (bytes[position] >> bitPosition & local12) << local3; - bitPosition += len; - } - return local1; - } + @OriginalMember(owner = "client!jc", name = "e", descriptor = "(I)I") + public static int readBits(@OriginalArg(0) int len) { + @Pc(1) int local1 = 0; + @Pc(3) int local3 = 0; + @Pc(12) int local12; + while (len >= 8 - bitPosition) { + local12 = 8 - bitPosition; + @Pc(18) int local18 = (0x1 << local12) - 1; + local1 += (bytes[position] >> bitPosition & local18) << local3; + bitPosition = 0; + position++; + local3 += local12; + len -= local12; + } + if (len > 0) { + local12 = (0x1 << len) - 1; + local1 += (bytes[position] >> bitPosition & local12) << local3; + bitPosition += len; + } + return local1; + } @OriginalMember(owner = "client!bn", name = "a", descriptor = "(III)I") public static int method667(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { diff --git a/client/src/main/java/rt4/WaterMaterialRenderer.java b/client/src/main/java/rt4/WaterMaterialRenderer.java index 41918b7..41e8418 100644 --- a/client/src/main/java/rt4/WaterMaterialRenderer.java +++ b/client/src/main/java/rt4/WaterMaterialRenderer.java @@ -1,19 +1,21 @@ package rt4; -import java.nio.ByteBuffer; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; +import com.jogamp.opengl.GL2GL3; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.nio.ByteBuffer; + @OriginalClass("client!pd") public final class WaterMaterialRenderer implements MaterialRenderer { - @OriginalMember(owner = "client!v", name = "c", descriptor = "[F") - public static final float[] aFloatArray2 = new float[] { 0.073F, 0.169F, 0.24F, 1.0F }; + @OriginalMember(owner = "client!v", name = "c", descriptor = "[F") + public static final float[] aFloatArray2 = new float[]{0.073F, 0.169F, 0.24F, 1.0F}; @OriginalMember(owner = "client!pd", name = "b", descriptor = "[F") - public static final float[] aFloatArray22 = new float[] { 0.1F, 0.1F, 0.15F, 0.1F }; + public static final float[] aFloatArray22 = new float[]{0.1F, 0.1F, 0.15F, 0.1F}; @OriginalMember(owner = "client!pd", name = "a", descriptor = "I") private int anInt4440 = -1; @@ -47,18 +49,18 @@ public final class WaterMaterialRenderer implements MaterialRenderer { return ColorUtils.aFloatArray28; } - @OriginalMember(owner = "client!bk", name = "a", descriptor = "(BI)V") - public static void method619(@OriginalArg(1) int color) { - aFloatArray2[0] = (float) (color >> 16 & 0xFF) / 255.0F; - aFloatArray2[1] = (float) (color >> 8 & 0xFF) / 255.0F; - aFloatArray2[2] = (float) (color & 0xFF) / 255.0F; - MaterialManager.resetArgument(3); - MaterialManager.resetArgument(4); - } + @OriginalMember(owner = "client!bk", name = "a", descriptor = "(BI)V") + public static void method619(@OriginalArg(1) int color) { + aFloatArray2[0] = (float) (color >> 16 & 0xFF) / 255.0F; + aFloatArray2[1] = (float) (color >> 8 & 0xFF) / 255.0F; + aFloatArray2[2] = (float) (color & 0xFF) / 255.0F; + MaterialManager.resetArgument(3); + MaterialManager.resetArgument(4); + } - @OriginalMember(owner = "client!pd", name = "d", descriptor = "()V") + @OriginalMember(owner = "client!pd", name = "d", descriptor = "()V") private void method3435() { - @Pc(2) byte[] local2 = new byte[] { 0, -1 }; + @Pc(2) byte[] local2 = new byte[]{0, -1}; @Pc(12) GL2 local12 = GlRenderer.gl; @Pc(15) int[] local15 = new int[1]; local12.glGenTextures(1, local15, 0); @@ -81,15 +83,15 @@ public final class WaterMaterialRenderer implements MaterialRenderer { local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2GL3.GL_SRC1_ALPHA, GL2.GL_CONSTANT); local1.glTexGeni(GL2.GL_S, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR); local1.glTexGeni(GL2.GL_T, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR); - local1.glTexGenfv(GL2.GL_S, GL2.GL_OBJECT_PLANE, new float[] { 9.765625E-4F, 0.0F, 0.0F, 0.0F }, 0); - local1.glTexGenfv(GL2.GL_T, GL2.GL_OBJECT_PLANE, new float[] { 0.0F, 0.0F, 9.765625E-4F, 0.0F }, 0); + local1.glTexGenfv(GL2.GL_S, GL2.GL_OBJECT_PLANE, new float[]{9.765625E-4F, 0.0F, 0.0F, 0.0F}, 0); + local1.glTexGenfv(GL2.GL_T, GL2.GL_OBJECT_PLANE, new float[]{0.0F, 0.0F, 9.765625E-4F, 0.0F}, 0); local1.glEnable(GL2.GL_TEXTURE_GEN_S); local1.glEnable(GL2.GL_TEXTURE_GEN_T); if (MaterialManager.allows3DTextureMapping) { local1.glBindTexture(GL2.GL_TEXTURE_3D, MaterialManager.texture3D); local1.glTexGeni(GL2.GL_R, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR); local1.glTexGeni(GL2.GL_Q, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR); - local1.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, new float[] { 0.0F, 0.0F, 0.0F, 1.0F }, 0); + local1.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, new float[]{0.0F, 0.0F, 0.0F, 1.0F}, 0); local1.glEnable(GL2.GL_TEXTURE_GEN_R); local1.glEnable(GL2.GL_TEXTURE_GEN_Q); local1.glEnable(GL2.GL_TEXTURE_3D); diff --git a/client/src/main/java/rt4/WaterfallMaterialRenderer.java b/client/src/main/java/rt4/WaterfallMaterialRenderer.java index 7826aba..d72000a 100644 --- a/client/src/main/java/rt4/WaterfallMaterialRenderer.java +++ b/client/src/main/java/rt4/WaterfallMaterialRenderer.java @@ -1,6 +1,6 @@ package rt4; -import com.jogamp.opengl.*; +import com.jogamp.opengl.GL2; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; diff --git a/client/src/main/java/rt4/WordPack.java b/client/src/main/java/rt4/WordPack.java index e28388b..442c698 100644 --- a/client/src/main/java/rt4/WordPack.java +++ b/client/src/main/java/rt4/WordPack.java @@ -5,17 +5,17 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class WordPack { - @OriginalMember(owner = "client!vl", name = "f", descriptor = "Lclient!na;") - public static final JagString CABBAGE = JagString.parse("Cabbage"); - @OriginalMember(owner = "client!f", name = "W", descriptor = "Lclient!fi;") - public static HuffmanCodec codec; + @OriginalMember(owner = "client!vl", name = "f", descriptor = "Lclient!na;") + public static final JagString CABBAGE = JagString.parse("Cabbage"); + @OriginalMember(owner = "client!f", name = "W", descriptor = "Lclient!fi;") + public static HuffmanCodec codec; - @OriginalMember(owner = "client!a", name = "a", descriptor = "(Lclient!fi;I)V") - public static void init(@OriginalArg(0) HuffmanCodec arg0) { - codec = arg0; - } + @OriginalMember(owner = "client!a", name = "a", descriptor = "(Lclient!fi;I)V") + public static void init(@OriginalArg(0) HuffmanCodec arg0) { + codec = arg0; + } - @OriginalMember(owner = "client!lg", name = "a", descriptor = "(ZLclient!wa;Lclient!na;)I") + @OriginalMember(owner = "client!lg", name = "a", descriptor = "(ZLclient!wa;Lclient!na;)I") public static int encode(@OriginalArg(1) Buffer arg0, @OriginalArg(2) JagString arg1) { @Pc(6) int local6 = arg0.offset; @Pc(14) byte[] local14 = arg1.method3148(); diff --git a/client/src/main/java/rt4/WorldList.java b/client/src/main/java/rt4/WorldList.java index 43d6ca3..1a18730 100644 --- a/client/src/main/java/rt4/WorldList.java +++ b/client/src/main/java/rt4/WorldList.java @@ -8,231 +8,231 @@ import java.io.IOException; import java.net.Socket; public class WorldList { - @OriginalMember(owner = "client!gi", name = "c", descriptor = "I") - public static int step = 0; - @OriginalMember(owner = "client!be", name = "kc", descriptor = "J") - public static long openTime = 0L; - @OriginalMember(owner = "client!sk", name = "gb", descriptor = "J") + @OriginalMember(owner = "client!gi", name = "c", descriptor = "I") + public static int step = 0; + @OriginalMember(owner = "client!be", name = "kc", descriptor = "J") + public static long openTime = 0L; + @OriginalMember(owner = "client!sk", name = "gb", descriptor = "J") public static long closeTime = 0L; - @OriginalMember(owner = "client!en", name = "A", descriptor = "Z") - public static boolean loaded = false; - @OriginalMember(owner = "client!jb", name = "y", descriptor = "I") - public static int bufferLen = 0; - @OriginalMember(owner = "client!si", name = "cb", descriptor = "[B") - public static byte[] buffer; - @OriginalMember(owner = "client!lb", name = "u", descriptor = "I") - public static int bufferOff = 0; - @OriginalMember(owner = "client!hm", name = "fb", descriptor = "[Lclient!ba;") - public static World[] sorted = new World[0]; - @OriginalMember(owner = "client!ic", name = "n", descriptor = "I") - public static int size; - @OriginalMember(owner = "client!gf", name = "T", descriptor = "I") - public static int checksum; - @OriginalMember(owner = "client!qh", name = "e", descriptor = "[Lclient!ee;") - public static WorldInfo[] countries; - @OriginalMember(owner = "client!bi", name = "R", descriptor = "I") - public static int minId; - @OriginalMember(owner = "client!ni", name = "q", descriptor = "I") + @OriginalMember(owner = "client!en", name = "A", descriptor = "Z") + public static boolean loaded = false; + @OriginalMember(owner = "client!jb", name = "y", descriptor = "I") + public static int bufferLen = 0; + @OriginalMember(owner = "client!si", name = "cb", descriptor = "[B") + public static byte[] buffer; + @OriginalMember(owner = "client!lb", name = "u", descriptor = "I") + public static int bufferOff = 0; + @OriginalMember(owner = "client!hm", name = "fb", descriptor = "[Lclient!ba;") + public static World[] sorted = new World[0]; + @OriginalMember(owner = "client!ic", name = "n", descriptor = "I") + public static int size; + @OriginalMember(owner = "client!gf", name = "T", descriptor = "I") + public static int checksum; + @OriginalMember(owner = "client!qh", name = "e", descriptor = "[Lclient!ee;") + public static WorldInfo[] countries; + @OriginalMember(owner = "client!bi", name = "R", descriptor = "I") + public static int minId; + @OriginalMember(owner = "client!ni", name = "q", descriptor = "I") public static int maxId; - @OriginalMember(owner = "client!pl", name = "a", descriptor = "[Lclient!ba;") - public static World[] worlds; - @OriginalMember(owner = "client!k", name = "t", descriptor = "I") - public static int errors = 0; - @OriginalMember(owner = "client!ea", name = "w", descriptor = "I") - public static int worldPos = 1; + @OriginalMember(owner = "client!pl", name = "a", descriptor = "[Lclient!ba;") + public static World[] worlds; + @OriginalMember(owner = "client!k", name = "t", descriptor = "I") + public static int errors = 0; + @OriginalMember(owner = "client!ea", name = "w", descriptor = "I") + public static int worldPos = 1; - @OriginalMember(owner = "client!ql", name = "b", descriptor = "(I)I") - public static int fetch() { - try { - if (step == 0) { - if (MonotonicClock.currentTimeMillis() - 5000L < closeTime) { - return 0; - } + @OriginalMember(owner = "client!ql", name = "b", descriptor = "(I)I") + public static int fetch() { + try { + if (step == 0) { + if (MonotonicClock.currentTimeMillis() - 5000L < closeTime) { + return 0; + } if (GlobalJsonConfig.instance != null) { client.worldListHostname = GlobalJsonConfig.instance.ip_management; client.worldListPort = GlobalJsonConfig.instance.wl_port; } - Protocol.socketRequest = GameShell.signLink.openSocket(client.worldListHostname, client.worldListPort); - openTime = MonotonicClock.currentTimeMillis(); - step = 1; - } - if (openTime + 30000L < MonotonicClock.currentTimeMillis()) { - return close(1000); - } - @Pc(82) int local82; - @Pc(124) int local124; - if (step == 1) { - if (Protocol.socketRequest.status == 2) { - return close(1001); - } - if (Protocol.socketRequest.status != 1) { - return -1; - } - Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); - Protocol.outboundBuffer.offset = 0; - Protocol.socketRequest = null; - local82 = 0; - if (loaded) { - local82 = checksum; - } - Protocol.outboundBuffer.p1(255); - Protocol.outboundBuffer.p4(local82); - Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - local124 = Protocol.socket.read(); - if (client.musicChannel != null) { - client.musicChannel.method3571(); - } - if (client.soundChannel != null) { - client.soundChannel.method3571(); - } - if (local124 != 0) { - return close(local124); - } - step = 2; - } - if (step == 2) { - if (Protocol.socket.available() < 2) { - return -1; - } - bufferLen = Protocol.socket.read(); - bufferLen <<= 0x8; - bufferLen += Protocol.socket.read(); - step = 3; - bufferOff = 0; - buffer = new byte[bufferLen]; - } - if (step != 3) { - return -1; - } - local82 = Protocol.socket.available(); - if (local82 < 1) { - return -1; - } - if (local82 > bufferLen - bufferOff) { - local82 = bufferLen - bufferOff; - } - Protocol.socket.read(bufferOff, local82, buffer); - bufferOff += local82; - if (bufferOff < bufferLen) { - return -1; - } else if (decode(buffer)) { - sorted = new World[size]; - local124 = 0; - for (@Pc(240) int local240 = minId; local240 <= maxId; local240++) { - @Pc(247) World local247 = ScriptRunner.getWorld(local240); - if (local247 != null) { - sorted[local124++] = local247; - } - } - Protocol.socket.close(); - Protocol.socket = null; - errors = 0; - step = 0; - buffer = null; - closeTime = MonotonicClock.currentTimeMillis(); - return 0; - } else { - return close(1002); - } - } catch (@Pc(277) IOException local277) { - return close(1003); - } - } + Protocol.socketRequest = GameShell.signLink.openSocket(client.worldListHostname, client.worldListPort); + openTime = MonotonicClock.currentTimeMillis(); + step = 1; + } + if (openTime + 30000L < MonotonicClock.currentTimeMillis()) { + return close(1000); + } + @Pc(82) int local82; + @Pc(124) int local124; + if (step == 1) { + if (Protocol.socketRequest.status == 2) { + return close(1001); + } + if (Protocol.socketRequest.status != 1) { + return -1; + } + Protocol.socket = new BufferedSocket((Socket) Protocol.socketRequest.result, GameShell.signLink); + Protocol.outboundBuffer.offset = 0; + Protocol.socketRequest = null; + local82 = 0; + if (loaded) { + local82 = checksum; + } + Protocol.outboundBuffer.p1(255); + Protocol.outboundBuffer.p4(local82); + Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + local124 = Protocol.socket.read(); + if (client.musicChannel != null) { + client.musicChannel.method3571(); + } + if (client.soundChannel != null) { + client.soundChannel.method3571(); + } + if (local124 != 0) { + return close(local124); + } + step = 2; + } + if (step == 2) { + if (Protocol.socket.available() < 2) { + return -1; + } + bufferLen = Protocol.socket.read(); + bufferLen <<= 0x8; + bufferLen += Protocol.socket.read(); + step = 3; + bufferOff = 0; + buffer = new byte[bufferLen]; + } + if (step != 3) { + return -1; + } + local82 = Protocol.socket.available(); + if (local82 < 1) { + return -1; + } + if (local82 > bufferLen - bufferOff) { + local82 = bufferLen - bufferOff; + } + Protocol.socket.read(bufferOff, local82, buffer); + bufferOff += local82; + if (bufferOff < bufferLen) { + return -1; + } else if (decode(buffer)) { + sorted = new World[size]; + local124 = 0; + for (@Pc(240) int local240 = minId; local240 <= maxId; local240++) { + @Pc(247) World local247 = ScriptRunner.getWorld(local240); + if (local247 != null) { + sorted[local124++] = local247; + } + } + Protocol.socket.close(); + Protocol.socket = null; + errors = 0; + step = 0; + buffer = null; + closeTime = MonotonicClock.currentTimeMillis(); + return 0; + } else { + return close(1002); + } + } catch (@Pc(277) IOException local277) { + return close(1003); + } + } - @OriginalMember(owner = "client!an", name = "a", descriptor = "(BI)I") - public static int close(@OriginalArg(1) int arg0) { - if (Protocol.socket != null) { - Protocol.socket.close(); - Protocol.socket = null; - } - errors++; - if (errors > 4) { - step = 0; - errors = 0; - return arg0; - } - step = 0; - if (client.worldListPort == client.worldListDefaultPort) { - client.worldListPort = client.worldListAlternatePort; - } else { - client.worldListPort = client.worldListDefaultPort; - } - return -1; - } + @OriginalMember(owner = "client!an", name = "a", descriptor = "(BI)I") + public static int close(@OriginalArg(1) int arg0) { + if (Protocol.socket != null) { + Protocol.socket.close(); + Protocol.socket = null; + } + errors++; + if (errors > 4) { + step = 0; + errors = 0; + return arg0; + } + step = 0; + if (client.worldListPort == client.worldListDefaultPort) { + client.worldListPort = client.worldListAlternatePort; + } else { + client.worldListPort = client.worldListDefaultPort; + } + return -1; + } - @OriginalMember(owner = "client!hi", name = "a", descriptor = "(Lclient!wa;I)V") - public static void decodeWorlds(@OriginalArg(0) Buffer buffer) { - @Pc(9) int countryCount = buffer.gsmarts(); - countries = new WorldInfo[countryCount]; - @Pc(14) int i; - for (i = 0; i < countryCount; i++) { - countries[i] = new WorldInfo(); - countries[i].flag = buffer.gsmarts(); - countries[i].name = buffer.gjstr2(); - } - minId = buffer.gsmarts(); - maxId = buffer.gsmarts(); - size = buffer.gsmarts(); - worlds = new World[maxId + 1 - minId]; - for (i = 0; i < size; i++) { - @Pc(77) int offset = buffer.gsmarts(); - @Pc(85) World world = worlds[offset] = new World(); - world.country = buffer.g1(); - world.flags = buffer.g4(); - world.id = offset + minId; - world.activity = buffer.gjstr2(); - world.hostname = buffer.gjstr2(); - } - checksum = buffer.g4(); - loaded = true; - } + @OriginalMember(owner = "client!hi", name = "a", descriptor = "(Lclient!wa;I)V") + public static void decodeWorlds(@OriginalArg(0) Buffer buffer) { + @Pc(9) int countryCount = buffer.gsmarts(); + countries = new WorldInfo[countryCount]; + @Pc(14) int i; + for (i = 0; i < countryCount; i++) { + countries[i] = new WorldInfo(); + countries[i].flag = buffer.gsmarts(); + countries[i].name = buffer.gjstr2(); + } + minId = buffer.gsmarts(); + maxId = buffer.gsmarts(); + size = buffer.gsmarts(); + worlds = new World[maxId + 1 - minId]; + for (i = 0; i < size; i++) { + @Pc(77) int offset = buffer.gsmarts(); + @Pc(85) World world = worlds[offset] = new World(); + world.country = buffer.g1(); + world.flags = buffer.g4(); + world.id = offset + minId; + world.activity = buffer.gjstr2(); + world.hostname = buffer.gjstr2(); + } + checksum = buffer.g4(); + loaded = true; + } - @OriginalMember(owner = "client!nh", name = "a", descriptor = "(I[B)Z") - public static boolean decode(@OriginalArg(1) byte[] arg0) { - @Pc(13) Buffer local13 = new Buffer(arg0); - @Pc(17) int local17 = local13.g1(); - if (local17 != 1) { - return false; - } - @Pc(33) boolean local33 = local13.g1() == 1; - if (local33) { - decodeWorlds(local13); - } - decodePlayers(local13); - return true; - } + @OriginalMember(owner = "client!nh", name = "a", descriptor = "(I[B)Z") + public static boolean decode(@OriginalArg(1) byte[] arg0) { + @Pc(13) Buffer local13 = new Buffer(arg0); + @Pc(17) int local17 = local13.g1(); + if (local17 != 1) { + return false; + } + @Pc(33) boolean local33 = local13.g1() == 1; + if (local33) { + decodeWorlds(local13); + } + decodePlayers(local13); + return true; + } - @OriginalMember(owner = "client!fh", name = "a", descriptor = "(Lclient!wa;I)V") - public static void decodePlayers(@OriginalArg(0) Buffer arg0) { - for (@Pc(7) int local7 = 0; local7 < size; local7++) { - @Pc(18) int local18 = arg0.gsmarts(); - @Pc(22) int local22 = arg0.g2(); - if (local22 == 65535) { - local22 = -1; - } - if (worlds[local18] != null) { - worlds[local18].players = local22; - } - } - } + @OriginalMember(owner = "client!fh", name = "a", descriptor = "(Lclient!wa;I)V") + public static void decodePlayers(@OriginalArg(0) Buffer arg0) { + for (@Pc(7) int local7 = 0; local7 < size; local7++) { + @Pc(18) int local18 = arg0.gsmarts(); + @Pc(22) int local22 = arg0.g2(); + if (local22 == 65535) { + local22 = -1; + } + if (worlds[local18] != null) { + worlds[local18].players = local22; + } + } + } - @OriginalMember(owner = "client!h", name = "a", descriptor = "(I)Lclient!ba;") - public static World getNextWorld() { - return sorted.length > worldPos ? sorted[worldPos++] : null; - } + @OriginalMember(owner = "client!h", name = "a", descriptor = "(I)Lclient!ba;") + public static World getNextWorld() { + return sorted.length > worldPos ? sorted[worldPos++] : null; + } - @OriginalMember(owner = "client!sh", name = "a", descriptor = "(IZBIZ)V") - public static void sortWorldList(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) boolean arg3) { - method1697(arg0, arg2, sorted.length - 1, arg3, 0, arg1); - } + @OriginalMember(owner = "client!sh", name = "a", descriptor = "(IZBIZ)V") + public static void sortWorldList(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) boolean arg3) { + method1697(arg0, arg2, sorted.length - 1, arg3, 0, arg1); + } - @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IIIZIZZ)V") + @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IIIZIZZ)V") public static void method1697(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) boolean arg3, @OriginalArg(4) int arg4, @OriginalArg(5) boolean arg5) { if (arg2 <= arg4) { return; @@ -255,9 +255,9 @@ public class WorldList { method1697(arg0, arg1, arg2, arg3, local15 + 1, arg5); } - @OriginalMember(owner = "client!bh", name = "a", descriptor = "(B)Lclient!ba;") - public static World getFirstWorld() { - worldPos = 0; - return getNextWorld(); - } + @OriginalMember(owner = "client!bh", name = "a", descriptor = "(B)Lclient!ba;") + public static World getFirstWorld() { + worldPos = 0; + return getNextWorld(); + } } diff --git a/client/src/main/java/rt4/WorldMap.java b/client/src/main/java/rt4/WorldMap.java index d321f1d..1dbe393 100644 --- a/client/src/main/java/rt4/WorldMap.java +++ b/client/src/main/java/rt4/WorldMap.java @@ -5,938 +5,941 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class WorldMap { - @OriginalMember(owner = "client!nc", name = "e", descriptor = "Lclient!na;") - public static final JagString UNDERLAY = JagString.parse("underlay"); - @OriginalMember(owner = "client!vj", name = "m", descriptor = "Lclient!na;") - public static final JagString LABELS = JagString.parse("_labels"); - @OriginalMember(owner = "client!ac", name = "m", descriptor = "Lclient!na;") - public static final JagString OVERLAY = JagString.parse("overlay"); - @OriginalMember(owner = "client!fm", name = "gb", descriptor = "Lclient!na;") - public static final JagString OVERLAY2 = JagString.parse("overlay2"); - @OriginalMember(owner = "client!df", name = "c", descriptor = "Lclient!na;") - public static final JagString LOC = JagString.parse("loc"); - @OriginalMember(owner = "client!vk", name = "h", descriptor = "I") - public static final int anInt5338 = (int) (Math.random() * 33.0D) - 16; - @OriginalMember(owner = "client!kd", name = "rb", descriptor = "I") - public static final int anInt3254 = (int) (Math.random() * 17.0D) - 8; - @OriginalMember(owner = "client!lf", name = "c", descriptor = "Lclient!ih;") - public static final LinkedList mapElements = new LinkedList(); - @OriginalMember(owner = "client!he", name = "db", descriptor = "Lclient!na;") - public static final JagString aClass100_517 = JagString.parse(""); - @OriginalMember(owner = "client!hm", name = "T", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!nc", name = "e", descriptor = "Lclient!na;") + public static final JagString UNDERLAY = JagString.parse("underlay"); + @OriginalMember(owner = "client!vj", name = "m", descriptor = "Lclient!na;") + public static final JagString LABELS = JagString.parse("_labels"); + @OriginalMember(owner = "client!ac", name = "m", descriptor = "Lclient!na;") + public static final JagString OVERLAY = JagString.parse("overlay"); + @OriginalMember(owner = "client!fm", name = "gb", descriptor = "Lclient!na;") + public static final JagString OVERLAY2 = JagString.parse("overlay2"); + @OriginalMember(owner = "client!df", name = "c", descriptor = "Lclient!na;") + public static final JagString LOC = JagString.parse("loc"); + @OriginalMember(owner = "client!vk", name = "h", descriptor = "I") + public static final int anInt5338 = (int) (Math.random() * 33.0D) - 16; + @OriginalMember(owner = "client!kd", name = "rb", descriptor = "I") + public static final int anInt3254 = (int) (Math.random() * 17.0D) - 8; + @OriginalMember(owner = "client!lf", name = "c", descriptor = "Lclient!ih;") + public static final LinkedList mapElements = new LinkedList(); + @OriginalMember(owner = "client!he", name = "db", descriptor = "Lclient!na;") + public static final JagString aClass100_517 = JagString.parse(""); + @OriginalMember(owner = "client!hm", name = "T", descriptor = "Lclient!na;") 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!wa", name = "ub", descriptor = "Lclient!bn;") - public static Map currentMap; - @OriginalMember(owner = "client!dc", name = "O", descriptor = "I") - public static int loadPercentage = 0; - @OriginalMember(owner = "client!gj", name = "r", descriptor = "F") - public static float zoom; - @OriginalMember(owner = "client!km", name = "uc", descriptor = "F") - public static float targetZoom; - @OriginalMember(owner = "client!mh", name = "S", descriptor = "I") - public static int originX; - @OriginalMember(owner = "client!aa", name = "j", descriptor = "I") - public static int originZ; - @OriginalMember(owner = "client!oi", name = "m", descriptor = "I") - public static int length; - @OriginalMember(owner = "client!dl", name = "e", descriptor = "I") + @OriginalMember(owner = "client!pm", name = "Y", descriptor = "Lclient!na;") + public static final JagString aClass100_872 = JagString.parse("
"); + @OriginalMember(owner = "client!wa", name = "ub", descriptor = "Lclient!bn;") + public static Map currentMap; + @OriginalMember(owner = "client!dc", name = "O", descriptor = "I") + public static int loadPercentage = 0; + @OriginalMember(owner = "client!gj", name = "r", descriptor = "F") + public static float zoom; + @OriginalMember(owner = "client!km", name = "uc", descriptor = "F") + public static float targetZoom; + @OriginalMember(owner = "client!mh", name = "S", descriptor = "I") + public static int originX; + @OriginalMember(owner = "client!aa", name = "j", descriptor = "I") + public static int originZ; + @OriginalMember(owner = "client!oi", name = "m", descriptor = "I") + public static int length; + @OriginalMember(owner = "client!dl", name = "e", descriptor = "I") public static int width; - @OriginalMember(owner = "client!lf", name = "b", descriptor = "[I") - public static int[] overlayColors; - @OriginalMember(owner = "client!wb", name = "l", descriptor = "Lclient!fd;") - public static WorldMapFont font26; - @OriginalMember(owner = "client!mj", name = "n", descriptor = "Lclient!fd;") - public static WorldMapFont font30; - @OriginalMember(owner = "client!kc", name = "C", descriptor = "Lclient!fd;") - public static WorldMapFont font22; - @OriginalMember(owner = "client!qh", name = "d", descriptor = "Lclient!fd;") - public static WorldMapFont font19; - @OriginalMember(owner = "client!kc", name = "n", descriptor = "Lclient!fd;") - public static WorldMapFont font17; - @OriginalMember(owner = "client!nf", name = "d", descriptor = "Lclient!fd;") - public static WorldMapFont font14; - @OriginalMember(owner = "client!ma", name = "q", descriptor = "Lclient!fd;") - public static WorldMapFont font12; - @OriginalMember(owner = "client!we", name = "v", descriptor = "Lclient!fd;") - public static WorldMapFont font11; - @OriginalMember(owner = "client!bc", name = "W", descriptor = "I") - public static int anInt435; - @OriginalMember(owner = "client!rj", name = "P", descriptor = "I") - public static int anInt4901 = -1; - @OriginalMember(owner = "client!lc", name = "l", descriptor = "I") - public static int anInt3482 = -1; - @OriginalMember(owner = "client!cd", name = "u", descriptor = "I") - public static int anInt919; - @OriginalMember(owner = "client!qh", name = "a", descriptor = "Lclient!se;") - public static MapElementList labels; - @OriginalMember(owner = "client!ck", name = "J", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray3; - @OriginalMember(owner = "client!fi", name = "m", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray7; - @OriginalMember(owner = "client!hb", name = "v", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray8; - @OriginalMember(owner = "client!si", name = "R", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray12; - @OriginalMember(owner = "client!jl", name = "I", descriptor = "[[[B") - public static byte[][][] aByteArrayArrayArray10; - @OriginalMember(owner = "client!eh", name = "g", descriptor = "[[[I") - public static int[][][] scenery; - @OriginalMember(owner = "client!gj", name = "i", descriptor = "[[[I") - public static int[][][] underlayColors; - @OriginalMember(owner = "client!uc", name = "d", descriptor = "[[[I") - public static int[][][] anIntArrayArrayArray17; - @OriginalMember(owner = "client!bn", name = "N", descriptor = "Lclient!be;") - public static Component component; - @OriginalMember(owner = "client!mc", name = "Q", descriptor = "Lclient!na;") - public static JagString aClass100_724; - @OriginalMember(owner = "client!fi", name = "j", descriptor = "Lclient!qf;") - public static Sprite aClass3_Sub2_Sub1_2; - @OriginalMember(owner = "client!mc", name = "S", descriptor = "Lclient!mm;") - public static SoftwareSprite aClass3_Sub2_Sub1_Sub1_2; - @OriginalMember(owner = "client!ha", name = "o", descriptor = "I") - public static int anInt2387; - @OriginalMember(owner = "client!cm", name = "c", descriptor = "I") - public static int anInt1176; - @OriginalMember(owner = "client!sm", name = "m", descriptor = "I") - public static int anInt5212; - @OriginalMember(owner = "client!qf", name = "S", descriptor = "I") - public static int anInt1864; + @OriginalMember(owner = "client!lf", name = "b", descriptor = "[I") + public static int[] overlayColors; + @OriginalMember(owner = "client!wb", name = "l", descriptor = "Lclient!fd;") + public static WorldMapFont font26; + @OriginalMember(owner = "client!mj", name = "n", descriptor = "Lclient!fd;") + public static WorldMapFont font30; + @OriginalMember(owner = "client!kc", name = "C", descriptor = "Lclient!fd;") + public static WorldMapFont font22; + @OriginalMember(owner = "client!qh", name = "d", descriptor = "Lclient!fd;") + public static WorldMapFont font19; + @OriginalMember(owner = "client!kc", name = "n", descriptor = "Lclient!fd;") + public static WorldMapFont font17; + @OriginalMember(owner = "client!nf", name = "d", descriptor = "Lclient!fd;") + public static WorldMapFont font14; + @OriginalMember(owner = "client!ma", name = "q", descriptor = "Lclient!fd;") + public static WorldMapFont font12; + @OriginalMember(owner = "client!we", name = "v", descriptor = "Lclient!fd;") + public static WorldMapFont font11; + @OriginalMember(owner = "client!bc", name = "W", descriptor = "I") + public static int anInt435; + @OriginalMember(owner = "client!rj", name = "P", descriptor = "I") + public static int anInt4901 = -1; + @OriginalMember(owner = "client!lc", name = "l", descriptor = "I") + public static int anInt3482 = -1; + @OriginalMember(owner = "client!cd", name = "u", descriptor = "I") + public static int anInt919; + @OriginalMember(owner = "client!qh", name = "a", descriptor = "Lclient!se;") + public static MapElementList labels; + @OriginalMember(owner = "client!ck", name = "J", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray3; + @OriginalMember(owner = "client!fi", name = "m", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray7; + @OriginalMember(owner = "client!hb", name = "v", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray8; + @OriginalMember(owner = "client!si", name = "R", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray12; + @OriginalMember(owner = "client!jl", name = "I", descriptor = "[[[B") + public static byte[][][] aByteArrayArrayArray10; + @OriginalMember(owner = "client!eh", name = "g", descriptor = "[[[I") + public static int[][][] scenery; + @OriginalMember(owner = "client!gj", name = "i", descriptor = "[[[I") + public static int[][][] underlayColors; + @OriginalMember(owner = "client!uc", name = "d", descriptor = "[[[I") + public static int[][][] anIntArrayArrayArray17; + @OriginalMember(owner = "client!bn", name = "N", descriptor = "Lclient!be;") + public static Component component; + @OriginalMember(owner = "client!mc", name = "Q", descriptor = "Lclient!na;") + public static JagString aClass100_724; + @OriginalMember(owner = "client!fi", name = "j", descriptor = "Lclient!qf;") + public static Sprite aClass3_Sub2_Sub1_2; + @OriginalMember(owner = "client!mc", name = "S", descriptor = "Lclient!mm;") + public static SoftwareSprite aClass3_Sub2_Sub1_Sub1_2; + @OriginalMember(owner = "client!ha", name = "o", descriptor = "I") + public static int anInt2387; + @OriginalMember(owner = "client!cm", name = "c", descriptor = "I") + public static int anInt1176; + @OriginalMember(owner = "client!sm", name = "m", descriptor = "I") + public static int anInt5212; + @OriginalMember(owner = "client!qf", name = "S", descriptor = "I") + public static int anInt1864; - @OriginalMember(owner = "client!pa", name = "d", descriptor = "(I)V") - public static void load() { - if (currentMap == null) { - return; - } + @OriginalMember(owner = "client!pa", name = "d", descriptor = "(I)V") + public static void load() { + if (currentMap == null) { + return; + } - if (loadPercentage < 10) { - if (!MapList.archive.isGroupReady(currentMap.group)) { - loadPercentage = client.js5Archive23.getPercentageComplete(currentMap.group) / 10; - return; - } + if (loadPercentage < 10) { + if (!MapList.archive.isGroupReady(currentMap.group)) { + loadPercentage = client.js5Archive23.getPercentageComplete(currentMap.group) / 10; + return; + } - client.method84(); - loadPercentage = 10; - } + client.method84(); + loadPercentage = 10; + } - if (loadPercentage == 10) { - originX = currentMap.displayMinX >> 6 << 6; - originZ = currentMap.displayMaxX >> 6 << 6; - length = (currentMap.displayMinZ >> 6 << 6) + 64 - originZ; - width = (currentMap.displayMaxZ >> 6 << 6) + 64 - originX; - if (currentMap.defaultZoom == 37) { - zoom = 3.0F; - targetZoom = 3.0F; - } else if (currentMap.defaultZoom == 50) { - zoom = 4.0F; - targetZoom = 4.0F; - } else if (currentMap.defaultZoom == 75) { - zoom = 6.0F; - targetZoom = 6.0F; - } else if (currentMap.defaultZoom == 100) { - zoom = 8.0F; - targetZoom = 8.0F; - } else if (currentMap.defaultZoom == 200) { - zoom = 16.0F; - targetZoom = 16.0F; - } else { - zoom = 8.0F; - targetZoom = 8.0F; - } + if (loadPercentage == 10) { + originX = currentMap.displayMinX >> 6 << 6; + originZ = currentMap.displayMaxX >> 6 << 6; + length = (currentMap.displayMinZ >> 6 << 6) + 64 - originZ; + width = (currentMap.displayMaxZ >> 6 << 6) + 64 - originX; + if (currentMap.defaultZoom == 37) { + zoom = 3.0F; + targetZoom = 3.0F; + } else if (currentMap.defaultZoom == 50) { + zoom = 4.0F; + targetZoom = 4.0F; + } else if (currentMap.defaultZoom == 75) { + zoom = 6.0F; + targetZoom = 6.0F; + } else if (currentMap.defaultZoom == 100) { + zoom = 8.0F; + targetZoom = 8.0F; + } else if (currentMap.defaultZoom == 200) { + zoom = 16.0F; + targetZoom = 16.0F; + } else { + zoom = 8.0F; + targetZoom = 8.0F; + } - @Pc(144) int local144 = (PlayerList.self.xFine >> 7) + Camera.originX - originX; - @Pc(153) int local153 = local144 + (int) (Math.random() * 10.0D) - 5; - @Pc(168) int local168 = originZ + length - Camera.originZ - (PlayerList.self.zFine >> 7) - 1; - @Pc(177) int local177 = local168 + (int) (Math.random() * 10.0D) - 5; - if (local153 >= 0 && width > local153 && local177 >= 0 && local177 < length) { - anInt435 = local153; - anInt919 = local177; - } else { - anInt919 = originZ + length - currentMap.anInt764 * 64 - 1; - anInt435 = currentMap.anInt769 * 64 - originX; - } + @Pc(144) int local144 = (PlayerList.self.xFine >> 7) + Camera.originX - originX; + @Pc(153) int local153 = local144 + (int) (Math.random() * 10.0D) - 5; + @Pc(168) int local168 = originZ + length - Camera.originZ - (PlayerList.self.zFine >> 7) - 1; + @Pc(177) int local177 = local168 + (int) (Math.random() * 10.0D) - 5; + if (local153 >= 0 && width > local153 && local177 >= 0 && local177 < length) { + anInt435 = local153; + anInt919 = local177; + } else { + anInt919 = originZ + length - currentMap.anInt764 * 64 - 1; + anInt435 = currentMap.anInt769 * 64 - originX; + } - method965(); - overlayColors = new int[FloTypeList.capacity + 1]; - @Pc(235) int length = WorldMap.length >> 6; - @Pc(239) int width = WorldMap.width >> 6; - aByteArrayArrayArray8 = new byte[width][length][]; - @Pc(249) int local249 = SceneGraph.anInt2293 >> 2 << 10; - aByteArrayArrayArray7 = new byte[width][length][]; - underlayColors = new int[width][length][]; - aByteArrayArrayArray3 = new byte[width][length][]; - anIntArrayArrayArray17 = new int[width][length][]; - aByteArrayArrayArray12 = new byte[width][length][]; - @Pc(273) int local273 = SceneGraph.anInt4272 >> 1; - aByteArrayArrayArray10 = new byte[width][length][]; - scenery = new int[width][length][]; - loadOverlayColors(local273, local249); - loadPercentage = 20; - } else if (loadPercentage == 20) { - readUnderlay(new Buffer(MapList.archive.fetchFile(UNDERLAY, currentMap.group))); - loadPercentage = 30; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 30) { - readOverlay(new Buffer(MapList.archive.fetchFile(OVERLAY, currentMap.group))); - loadPercentage = 40; - GameShell.resetTimer(); - } else if (loadPercentage == 40) { - readOverlay2(new Buffer(MapList.archive.fetchFile(OVERLAY2, currentMap.group))); - loadPercentage = 50; - GameShell.resetTimer(); - } else if (loadPercentage == 50) { - readLocs(new Buffer(MapList.archive.fetchFile(LOC, currentMap.group))); - loadPercentage = 60; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 60) { - if (MapList.archive.isGroupNameValid(JagString.concatenate(new JagString[] { currentMap.group, LABELS}))) { - if (!MapList.archive.isGroupReady(JagString.concatenate(new JagString[] { currentMap.group, LABELS}))) { - return; - } - labels = MapElementList.create(JagString.concatenate(new JagString[] { currentMap.group, LABELS}), MapList.archive); - } else { - labels = new MapElementList(0); - } - loadPercentage = 70; - GameShell.resetTimer(); - } else if (loadPercentage == 70) { - font11 = new WorldMapFont(11, true, GameShell.canvas); - loadPercentage = 73; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 73) { - font12 = new WorldMapFont(12, true, GameShell.canvas); - loadPercentage = 76; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 76) { - font14 = new WorldMapFont(14, true, GameShell.canvas); - loadPercentage = 79; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 79) { - font17 = new WorldMapFont(17, true, GameShell.canvas); - loadPercentage = 82; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 82) { - font19 = new WorldMapFont(19, true, GameShell.canvas); - loadPercentage = 85; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 85) { - font22 = new WorldMapFont(22, true, GameShell.canvas); - loadPercentage = 88; - ClientProt.ping(true); - GameShell.resetTimer(); - } else if (loadPercentage == 88) { - font26 = new WorldMapFont(26, true, GameShell.canvas); - loadPercentage = 91; - ClientProt.ping(true); - GameShell.resetTimer(); - } else { - font30 = new WorldMapFont(30, true, GameShell.canvas); - loadPercentage = 100; - ClientProt.ping(true); - GameShell.resetTimer(); - System.gc(); - } - } + method965(); + overlayColors = new int[FloTypeList.capacity + 1]; + @Pc(235) int length = WorldMap.length >> 6; + @Pc(239) int width = WorldMap.width >> 6; + aByteArrayArrayArray8 = new byte[width][length][]; + @Pc(249) int local249 = SceneGraph.anInt2293 >> 2 << 10; + aByteArrayArrayArray7 = new byte[width][length][]; + underlayColors = new int[width][length][]; + aByteArrayArrayArray3 = new byte[width][length][]; + anIntArrayArrayArray17 = new int[width][length][]; + aByteArrayArrayArray12 = new byte[width][length][]; + @Pc(273) int local273 = SceneGraph.anInt4272 >> 1; + aByteArrayArrayArray10 = new byte[width][length][]; + scenery = new int[width][length][]; + loadOverlayColors(local273, local249); + loadPercentage = 20; + } else if (loadPercentage == 20) { + readUnderlay(new Buffer(MapList.archive.fetchFile(UNDERLAY, currentMap.group))); + loadPercentage = 30; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 30) { + readOverlay(new Buffer(MapList.archive.fetchFile(OVERLAY, currentMap.group))); + loadPercentage = 40; + GameShell.resetTimer(); + } else if (loadPercentage == 40) { + readOverlay2(new Buffer(MapList.archive.fetchFile(OVERLAY2, currentMap.group))); + loadPercentage = 50; + GameShell.resetTimer(); + } else if (loadPercentage == 50) { + readLocs(new Buffer(MapList.archive.fetchFile(LOC, currentMap.group))); + loadPercentage = 60; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 60) { + if (MapList.archive.isGroupNameValid(JagString.concatenate(new JagString[]{currentMap.group, LABELS}))) { + if (!MapList.archive.isGroupReady(JagString.concatenate(new JagString[]{currentMap.group, LABELS}))) { + return; + } + labels = MapElementList.create(JagString.concatenate(new JagString[]{currentMap.group, LABELS}), MapList.archive); + } else { + labels = new MapElementList(0); + } + loadPercentage = 70; + GameShell.resetTimer(); + } else if (loadPercentage == 70) { + font11 = new WorldMapFont(11, true, GameShell.canvas); + loadPercentage = 73; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 73) { + font12 = new WorldMapFont(12, true, GameShell.canvas); + loadPercentage = 76; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 76) { + font14 = new WorldMapFont(14, true, GameShell.canvas); + loadPercentage = 79; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 79) { + font17 = new WorldMapFont(17, true, GameShell.canvas); + loadPercentage = 82; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 82) { + font19 = new WorldMapFont(19, true, GameShell.canvas); + loadPercentage = 85; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 85) { + font22 = new WorldMapFont(22, true, GameShell.canvas); + loadPercentage = 88; + ClientProt.ping(true); + GameShell.resetTimer(); + } else if (loadPercentage == 88) { + font26 = new WorldMapFont(26, true, GameShell.canvas); + loadPercentage = 91; + ClientProt.ping(true); + GameShell.resetTimer(); + } else { + font30 = new WorldMapFont(30, true, GameShell.canvas); + loadPercentage = 100; + ClientProt.ping(true); + GameShell.resetTimer(); + System.gc(); + } + } - @OriginalMember(owner = "client!cn", name = "e", descriptor = "(B)V") - public static void method965() { - if (anInt435 < 0) { - anInt4901 = -1; - anInt435 = 0; - anInt3482 = -1; - } - if (anInt435 > width) { - anInt4901 = -1; - anInt435 = width; - anInt3482 = -1; - } - if (anInt919 < 0) { - anInt3482 = -1; - anInt4901 = -1; - anInt919 = 0; - } - if (length < anInt919) { - anInt919 = length; - anInt4901 = -1; - anInt3482 = -1; - } - } + @OriginalMember(owner = "client!cn", name = "e", descriptor = "(B)V") + public static void method965() { + if (anInt435 < 0) { + anInt4901 = -1; + anInt435 = 0; + anInt3482 = -1; + } + if (anInt435 > width) { + anInt4901 = -1; + anInt435 = width; + anInt3482 = -1; + } + if (anInt919 < 0) { + anInt3482 = -1; + anInt4901 = -1; + anInt919 = 0; + } + if (length < anInt919) { + anInt919 = length; + anInt4901 = -1; + anInt3482 = -1; + } + } - @OriginalMember(owner = "client!cj", name = "a", descriptor = "(BLclient!wa;)V") - public static void readUnderlay(@OriginalArg(1) Buffer data) { - @Pc(13) int local13 = anInt5338 >> 1; - @Pc(19) int local19 = anInt3254 >> 2 << 10; - @Pc(23) byte[][] underlays = new byte[width][length]; - @Pc(33) int local33; - @Pc(102) int local102; - @Pc(114) int local114; - while (data.offset < data.data.length) { - @Pc(31) int local31 = 0; - local33 = 0; - @Pc(35) boolean local35 = false; - if (data.g1() == 1) { - local33 = data.g1(); - local31 = data.g1(); - local35 = true; - } - @Pc(57) int local57 = data.g1(); - @Pc(61) int local61 = data.g1(); - @Pc(68) int local68 = local57 * 64 - originX; - @Pc(78) int local78 = length + originZ - local61 * 64 - 1; - if (local68 >= 0 && local78 - 63 >= 0 && width > local68 + 63 && length > local78) { - for (local102 = 0; local102 < 64; local102++) { - @Pc(112) byte[] underlay = underlays[local68 + local102]; - for (local114 = 0; local114 < 64; local114++) { - if (!local35 || local102 >= local33 * 8 && local33 * 8 + 8 > local102 && local114 >= local31 * 8 && local114 < local31 * 8 + 8) { - underlay[local78 - local114] = data.g1b(); - } - } - } - } else if (local35) { - data.offset += 64; - } else { - data.offset += 4096; - } - } - @Pc(175) int local175 = width; - local33 = length; - @Pc(180) int[] local180 = new int[local33]; - @Pc(183) int[] local183 = new int[local33]; - @Pc(186) int[] local186 = new int[local33]; - @Pc(189) int[] local189 = new int[local33]; - @Pc(192) int[] local192 = new int[local33]; - for (local102 = -5; local102 < local175; local102++) { - @Pc(225) int local225; - @Pc(293) int local293; - for (@Pc(203) int local203 = 0; local203 < local33; local203++) { - local114 = local102 + 5; - @Pc(272) int local272; - if (local175 > local114) { - local225 = underlays[local114][local203] & 0xFF; - if (local225 > 0) { - @Pc(236) FluType local236 = FluTypeList.get(local225 - 1); - local183[local203] += local236.weightedHue; - local180[local203] += local236.saturation; - local186[local203] += local236.lightness; - local189[local203] += local236.chroma; - local272 = local192[local203]++; - } - } - local225 = local102 - 5; - if (local225 >= 0) { - local293 = underlays[local225][local203] & 0xFF; - if (local293 > 0) { - @Pc(302) FluType local302 = FluTypeList.get(local293 - 1); - local183[local203] -= local302.weightedHue; - local180[local203] -= local302.saturation; - local186[local203] -= local302.lightness; - local189[local203] -= local302.chroma; - local272 = local192[local203]--; - } - } - } - if (local102 >= 0) { - @Pc(355) int[][] local355 = anIntArrayArrayArray17[local102 >> 6]; - local114 = 0; - local225 = 0; - @Pc(361) int local361 = 0; - @Pc(363) int local363 = 0; - local293 = 0; - for (@Pc(367) int local367 = -5; local367 < local33; local367++) { - @Pc(378) int local378 = local367 + 5; - if (local33 > local378) { - local363 += local192[local378]; - local225 += local180[local378]; - local293 += local186[local378]; - local114 += local183[local378]; - local361 += local189[local378]; - } - @Pc(415) int local415 = local367 - 5; - if (local415 >= 0) { - local293 -= local186[local415]; - local361 -= local189[local415]; - local114 -= local183[local415]; - local363 -= local192[local415]; - local225 -= local180[local415]; - } - if (local367 >= 0 && local363 > 0) { - @Pc(462) int[] local462 = local355[local367 >> 6]; - @Pc(480) int local480 = local361 == 0 ? 0 : SceneGraph.method1309(local293 / local363, local225 / local363, local114 * 256 / local361); - if (underlays[local102][local367] != 0) { - if (local462 == null) { - local462 = local355[local367 >> 6] = new int[4096]; - } - @Pc(519) int local519 = local13 + (local480 & 0x7F); - if (local519 < 0) { - local519 = 0; - } else if (local519 > 127) { - local519 = 127; - } - @Pc(541) int local541 = local519 + (local480 & 0x380) + (local480 + local19 & 0xFC00); - local462[((local367 & 0x3F) << 6) + (local102 & 0x3F)] = Rasteriser.palette[ColorUtils.multiplyLightnessSafe(96, local541)]; - } else if (local462 != null) { - local462[((local367 & 0x3F) << 6) + (local102 & 0x3F)] = 0; - } - } - } - } - } - } + @OriginalMember(owner = "client!cj", name = "a", descriptor = "(BLclient!wa;)V") + public static void readUnderlay(@OriginalArg(1) Buffer data) { + @Pc(13) int local13 = anInt5338 >> 1; + @Pc(19) int local19 = anInt3254 >> 2 << 10; + @Pc(23) byte[][] underlays = new byte[width][length]; + @Pc(33) int local33; + @Pc(102) int local102; + @Pc(114) int local114; + while (data.offset < data.data.length) { + @Pc(31) int local31 = 0; + local33 = 0; + @Pc(35) boolean local35 = false; + if (data.g1() == 1) { + local33 = data.g1(); + local31 = data.g1(); + local35 = true; + } + @Pc(57) int local57 = data.g1(); + @Pc(61) int local61 = data.g1(); + @Pc(68) int local68 = local57 * 64 - originX; + @Pc(78) int local78 = length + originZ - local61 * 64 - 1; + if (local68 >= 0 && local78 - 63 >= 0 && width > local68 + 63 && length > local78) { + for (local102 = 0; local102 < 64; local102++) { + @Pc(112) byte[] underlay = underlays[local68 + local102]; + for (local114 = 0; local114 < 64; local114++) { + if (!local35 || local102 >= local33 * 8 && local33 * 8 + 8 > local102 && local114 >= local31 * 8 && local114 < local31 * 8 + 8) { + underlay[local78 - local114] = data.g1b(); + } + } + } + } else if (local35) { + data.offset += 64; + } else { + data.offset += 4096; + } + } + @Pc(175) int local175 = width; + local33 = length; + @Pc(180) int[] local180 = new int[local33]; + @Pc(183) int[] local183 = new int[local33]; + @Pc(186) int[] local186 = new int[local33]; + @Pc(189) int[] local189 = new int[local33]; + @Pc(192) int[] local192 = new int[local33]; + for (local102 = -5; local102 < local175; local102++) { + @Pc(225) int local225; + @Pc(293) int local293; + for (@Pc(203) int local203 = 0; local203 < local33; local203++) { + local114 = local102 + 5; + @Pc(272) int local272; + if (local175 > local114) { + local225 = underlays[local114][local203] & 0xFF; + if (local225 > 0) { + @Pc(236) FluType local236 = FluTypeList.get(local225 - 1); + local183[local203] += local236.weightedHue; + local180[local203] += local236.saturation; + local186[local203] += local236.lightness; + local189[local203] += local236.chroma; + local272 = local192[local203]++; + } + } + local225 = local102 - 5; + if (local225 >= 0) { + local293 = underlays[local225][local203] & 0xFF; + if (local293 > 0) { + @Pc(302) FluType local302 = FluTypeList.get(local293 - 1); + local183[local203] -= local302.weightedHue; + local180[local203] -= local302.saturation; + local186[local203] -= local302.lightness; + local189[local203] -= local302.chroma; + local272 = local192[local203]--; + } + } + } + if (local102 >= 0) { + @Pc(355) int[][] local355 = anIntArrayArrayArray17[local102 >> 6]; + local114 = 0; + local225 = 0; + @Pc(361) int local361 = 0; + @Pc(363) int local363 = 0; + local293 = 0; + for (@Pc(367) int local367 = -5; local367 < local33; local367++) { + @Pc(378) int local378 = local367 + 5; + if (local33 > local378) { + local363 += local192[local378]; + local225 += local180[local378]; + local293 += local186[local378]; + local114 += local183[local378]; + local361 += local189[local378]; + } + @Pc(415) int local415 = local367 - 5; + if (local415 >= 0) { + local293 -= local186[local415]; + local361 -= local189[local415]; + local114 -= local183[local415]; + local363 -= local192[local415]; + local225 -= local180[local415]; + } + if (local367 >= 0 && local363 > 0) { + @Pc(462) int[] local462 = local355[local367 >> 6]; + @Pc(480) int local480 = local361 == 0 ? 0 : SceneGraph.method1309(local293 / local363, local225 / local363, local114 * 256 / local361); + if (underlays[local102][local367] != 0) { + if (local462 == null) { + local462 = local355[local367 >> 6] = new int[4096]; + } + @Pc(519) int local519 = local13 + (local480 & 0x7F); + if (local519 < 0) { + local519 = 0; + } else if (local519 > 127) { + local519 = 127; + } + @Pc(541) int local541 = local519 + (local480 & 0x380) + (local480 + local19 & 0xFC00); + local462[((local367 & 0x3F) << 6) + (local102 & 0x3F)] = Rasteriser.palette[ColorUtils.multiplyLightnessSafe(96, local541)]; + } else if (local462 != null) { + local462[((local367 & 0x3F) << 6) + (local102 & 0x3F)] = 0; + } + } + } + } + } + } - @OriginalMember(owner = "client!dk", name = "a", descriptor = "(Lclient!wa;Z)V") - public static void readOverlay(@OriginalArg(0) Buffer arg0) { - label87: while (true) { - if (arg0.offset < arg0.data.length) { - @Pc(22) int local22 = 0; - @Pc(24) boolean local24 = false; - @Pc(26) int local26 = 0; - if (arg0.g1() == 1) { - local24 = true; - local22 = arg0.g1(); - local26 = arg0.g1(); - } - @Pc(46) int local46 = arg0.g1(); - @Pc(50) int local50 = arg0.g1(); - @Pc(62) int local62 = originZ + length - local50 * 64 - 1; - @Pc(69) int local69 = local46 * 64 - originX; - @Pc(147) byte local147; - @Pc(91) int local91; - if (local69 >= 0 && local62 - 63 >= 0 && local69 + 63 < width && local62 < length) { - local91 = local69 >> 6; - @Pc(95) int local95 = local62 >> 6; - @Pc(97) int local97 = 0; - while (true) { - if (local97 >= 64) { - continue label87; - } - for (@Pc(104) int local104 = 0; local104 < 64; local104++) { - if (!local24 || local97 >= local22 * 8 && local97 < local22 * 8 + 8 && local104 >= local26 * 8 && local104 < local26 * 8 + 8) { - local147 = arg0.g1b(); - if (local147 != 0) { - if (aByteArrayArrayArray3[local91][local95] == null) { - aByteArrayArrayArray3[local91][local95] = new byte[4096]; - } - aByteArrayArrayArray3[local91][local95][local97 + (63 - local104 << 6)] = local147; - @Pc(186) byte local186 = arg0.g1b(); - if (aByteArrayArrayArray8[local91][local95] == null) { - aByteArrayArrayArray8[local91][local95] = new byte[4096]; - } - aByteArrayArrayArray8[local91][local95][local97 + (63 - local104 << 6)] = local186; - } - } - } - local97++; - } - } - local91 = 0; - while (true) { - if ((local24 ? 64 : 4096) <= local91) { - continue label87; - } - local147 = arg0.g1b(); - if (local147 != 0) { - arg0.offset++; - } - local91++; - } - } - return; - } - } + @OriginalMember(owner = "client!dk", name = "a", descriptor = "(Lclient!wa;Z)V") + public static void readOverlay(@OriginalArg(0) Buffer arg0) { + label87: + while (true) { + if (arg0.offset < arg0.data.length) { + @Pc(22) int local22 = 0; + @Pc(24) boolean local24 = false; + @Pc(26) int local26 = 0; + if (arg0.g1() == 1) { + local24 = true; + local22 = arg0.g1(); + local26 = arg0.g1(); + } + @Pc(46) int local46 = arg0.g1(); + @Pc(50) int local50 = arg0.g1(); + @Pc(62) int local62 = originZ + length - local50 * 64 - 1; + @Pc(69) int local69 = local46 * 64 - originX; + @Pc(147) byte local147; + @Pc(91) int local91; + if (local69 >= 0 && local62 - 63 >= 0 && local69 + 63 < width && local62 < length) { + local91 = local69 >> 6; + @Pc(95) int local95 = local62 >> 6; + @Pc(97) int local97 = 0; + while (true) { + if (local97 >= 64) { + continue label87; + } + for (@Pc(104) int local104 = 0; local104 < 64; local104++) { + if (!local24 || local97 >= local22 * 8 && local97 < local22 * 8 + 8 && local104 >= local26 * 8 && local104 < local26 * 8 + 8) { + local147 = arg0.g1b(); + if (local147 != 0) { + if (aByteArrayArrayArray3[local91][local95] == null) { + aByteArrayArrayArray3[local91][local95] = new byte[4096]; + } + aByteArrayArrayArray3[local91][local95][local97 + (63 - local104 << 6)] = local147; + @Pc(186) byte local186 = arg0.g1b(); + if (aByteArrayArrayArray8[local91][local95] == null) { + aByteArrayArrayArray8[local91][local95] = new byte[4096]; + } + aByteArrayArrayArray8[local91][local95][local97 + (63 - local104 << 6)] = local186; + } + } + } + local97++; + } + } + local91 = 0; + while (true) { + if ((local24 ? 64 : 4096) <= local91) { + continue label87; + } + local147 = arg0.g1b(); + if (local147 != 0) { + arg0.offset++; + } + local91++; + } + } + return; + } + } - @OriginalMember(owner = "client!sk", name = "a", descriptor = "(ILclient!wa;)V") - public static void readOverlay2(@OriginalArg(1) Buffer arg0) { - label83: while (true) { - if (arg0.offset < arg0.data.length) { - @Pc(23) int local23 = 0; - @Pc(25) boolean local25 = false; - @Pc(27) int local27 = 0; - if (arg0.g1() == 1) { - local25 = true; - local23 = arg0.g1(); - local27 = arg0.g1(); - } - @Pc(46) int local46 = arg0.g1(); - @Pc(50) int local50 = arg0.g1(); - @Pc(57) int local57 = local46 * 64 - originX; - @Pc(68) int local68 = length + originZ - local50 * 64 - 1; - @Pc(146) byte local146; - @Pc(96) int local96; - if (local57 >= 0 && local68 - 63 >= 0 && width > local57 + 63 && local68 < length) { - local96 = local57 >> 6; - @Pc(100) int local100 = local68 >> 6; - @Pc(102) int local102 = 0; - while (true) { - if (local102 >= 64) { - continue label83; - } - for (@Pc(107) int local107 = 0; local107 < 64; local107++) { - if (!local25 || local23 * 8 <= local102 && local23 * 8 + 8 > local102 && local107 >= local27 * 8 && local27 * 8 + 8 > local107) { - local146 = arg0.g1b(); - if (local146 != 0) { - if (aByteArrayArrayArray12[local96][local100] == null) { - aByteArrayArrayArray12[local96][local100] = new byte[4096]; - } - aByteArrayArrayArray12[local96][local100][(63 - local107 << 6) + local102] = local146; - @Pc(182) byte local182 = arg0.g1b(); - if (aByteArrayArrayArray10[local96][local100] == null) { - aByteArrayArrayArray10[local96][local100] = new byte[4096]; - } - aByteArrayArrayArray10[local96][local100][local102 + (63 - local107 << 6)] = local182; - } - } - } - local102++; - } - } - local96 = 0; - while (true) { - if (local96 >= (local25 ? 64 : 4096)) { - continue label83; - } - local146 = arg0.g1b(); - if (local146 != 0) { - arg0.offset++; - } - local96++; - } - } - return; - } - } + @OriginalMember(owner = "client!sk", name = "a", descriptor = "(ILclient!wa;)V") + public static void readOverlay2(@OriginalArg(1) Buffer arg0) { + label83: + while (true) { + if (arg0.offset < arg0.data.length) { + @Pc(23) int local23 = 0; + @Pc(25) boolean local25 = false; + @Pc(27) int local27 = 0; + if (arg0.g1() == 1) { + local25 = true; + local23 = arg0.g1(); + local27 = arg0.g1(); + } + @Pc(46) int local46 = arg0.g1(); + @Pc(50) int local50 = arg0.g1(); + @Pc(57) int local57 = local46 * 64 - originX; + @Pc(68) int local68 = length + originZ - local50 * 64 - 1; + @Pc(146) byte local146; + @Pc(96) int local96; + if (local57 >= 0 && local68 - 63 >= 0 && width > local57 + 63 && local68 < length) { + local96 = local57 >> 6; + @Pc(100) int local100 = local68 >> 6; + @Pc(102) int local102 = 0; + while (true) { + if (local102 >= 64) { + continue label83; + } + for (@Pc(107) int local107 = 0; local107 < 64; local107++) { + if (!local25 || local23 * 8 <= local102 && local23 * 8 + 8 > local102 && local107 >= local27 * 8 && local27 * 8 + 8 > local107) { + local146 = arg0.g1b(); + if (local146 != 0) { + if (aByteArrayArrayArray12[local96][local100] == null) { + aByteArrayArrayArray12[local96][local100] = new byte[4096]; + } + aByteArrayArrayArray12[local96][local100][(63 - local107 << 6) + local102] = local146; + @Pc(182) byte local182 = arg0.g1b(); + if (aByteArrayArrayArray10[local96][local100] == null) { + aByteArrayArrayArray10[local96][local100] = new byte[4096]; + } + aByteArrayArrayArray10[local96][local100][local102 + (63 - local107 << 6)] = local182; + } + } + } + local102++; + } + } + local96 = 0; + while (true) { + if (local96 >= (local25 ? 64 : 4096)) { + continue label83; + } + local146 = arg0.g1b(); + if (local146 != 0) { + arg0.offset++; + } + local96++; + } + } + return; + } + } - @OriginalMember(owner = "client!nc", name = "a", descriptor = "(BLclient!wa;)V") - public static void readLocs(@OriginalArg(1) Buffer arg0) { - label123: while (true) { - if (arg0.data.length > arg0.offset) { - @Pc(17) boolean local17 = false; - @Pc(19) int local19 = 0; - @Pc(21) int local21 = 0; - if (arg0.g1() == 1) { - local19 = arg0.g1(); - local17 = true; - local21 = arg0.g1(); - } - @Pc(42) int local42 = arg0.g1(); - @Pc(46) int local46 = arg0.g1(); - @Pc(53) int local53 = local42 * 64 - originX; - @Pc(65) int local65 = originZ + length - local46 * 64 - 1; - @Pc(84) int local84; - @Pc(95) int local95; - if (local53 >= 0 && local65 - 63 >= 0 && width > local53 + 63 && local65 < length) { - local84 = local53 >> 6; - local95 = local65 >> 6; - @Pc(150) int local150 = 0; - while (true) { - if (local150 >= 64) { - continue label123; - } - for (@Pc(155) int local155 = 0; local155 < 64; local155++) { - if (!local17 || local19 * 8 <= local150 && local150 < local19 * 8 + 8 && local155 >= local21 * 8 && local155 < local21 * 8 + 8) { - @Pc(202) int local202 = arg0.g1(); - if (local202 != 0) { - @Pc(214) int id; - if ((local202 & 0x1) == 1) { - id = arg0.g1(); - if (aByteArrayArrayArray7[local84][local95] == null) { - aByteArrayArrayArray7[local84][local95] = new byte[4096]; - } - aByteArrayArrayArray7[local84][local95][local150 + (63 - local155 << 6)] = (byte) id; - } - if ((local202 & 0x2) == 2) { - id = arg0.g3(); - if (scenery[local84][local95] == null) { - scenery[local84][local95] = new int[4096]; - } - scenery[local84][local95][(63 - local155 << 6) + local150] = id; - } - if ((local202 & 0x4) == 4) { - id = arg0.g3(); - if (underlayColors[local84][local95] == null) { - underlayColors[local84][local95] = new int[4096]; - } - id--; - @Pc(312) LocType local312 = LocTypeList.get(id); - if (local312.multiLocs != null) { - local312 = local312.getMultiLoc(); - if (local312 == null || local312.mapElement == -1) { - continue; - } - } - underlayColors[local84][local95][(63 - local155 << 6) + local150] = local312.id + 1; - @Pc(353) MapElement element = new MapElement(); - element.id = local312.mapElement; - element.anInt4307 = local53; - element.anInt4314 = local65; - mapElements.addTail(element); - } - } - } - } - local150++; - } - } - local84 = 0; - while (true) { - if (local84 >= (local17 ? 64 : 4096)) { - continue label123; - } - local95 = arg0.g1(); - if (local95 != 0) { - if ((local95 & 0x1) == 1) { - arg0.offset++; - } - if ((local95 & 0x2) == 2) { - arg0.offset += 2; - } - if ((local95 & 0x4) == 4) { - arg0.offset += 3; - } - } - local84++; - } - } - return; - } - } + @OriginalMember(owner = "client!nc", name = "a", descriptor = "(BLclient!wa;)V") + public static void readLocs(@OriginalArg(1) Buffer arg0) { + label123: + while (true) { + if (arg0.data.length > arg0.offset) { + @Pc(17) boolean local17 = false; + @Pc(19) int local19 = 0; + @Pc(21) int local21 = 0; + if (arg0.g1() == 1) { + local19 = arg0.g1(); + local17 = true; + local21 = arg0.g1(); + } + @Pc(42) int local42 = arg0.g1(); + @Pc(46) int local46 = arg0.g1(); + @Pc(53) int local53 = local42 * 64 - originX; + @Pc(65) int local65 = originZ + length - local46 * 64 - 1; + @Pc(84) int local84; + @Pc(95) int local95; + if (local53 >= 0 && local65 - 63 >= 0 && width > local53 + 63 && local65 < length) { + local84 = local53 >> 6; + local95 = local65 >> 6; + @Pc(150) int local150 = 0; + while (true) { + if (local150 >= 64) { + continue label123; + } + for (@Pc(155) int local155 = 0; local155 < 64; local155++) { + if (!local17 || local19 * 8 <= local150 && local150 < local19 * 8 + 8 && local155 >= local21 * 8 && local155 < local21 * 8 + 8) { + @Pc(202) int local202 = arg0.g1(); + if (local202 != 0) { + @Pc(214) int id; + if ((local202 & 0x1) == 1) { + id = arg0.g1(); + if (aByteArrayArrayArray7[local84][local95] == null) { + aByteArrayArrayArray7[local84][local95] = new byte[4096]; + } + aByteArrayArrayArray7[local84][local95][local150 + (63 - local155 << 6)] = (byte) id; + } + if ((local202 & 0x2) == 2) { + id = arg0.g3(); + if (scenery[local84][local95] == null) { + scenery[local84][local95] = new int[4096]; + } + scenery[local84][local95][(63 - local155 << 6) + local150] = id; + } + if ((local202 & 0x4) == 4) { + id = arg0.g3(); + if (underlayColors[local84][local95] == null) { + underlayColors[local84][local95] = new int[4096]; + } + id--; + @Pc(312) LocType local312 = LocTypeList.get(id); + if (local312.multiLocs != null) { + local312 = local312.getMultiLoc(); + if (local312 == null || local312.mapElement == -1) { + continue; + } + } + underlayColors[local84][local95][(63 - local155 << 6) + local150] = local312.id + 1; + @Pc(353) MapElement element = new MapElement(); + element.id = local312.mapElement; + element.anInt4307 = local53; + element.anInt4314 = local65; + mapElements.addTail(element); + } + } + } + } + local150++; + } + } + local84 = 0; + while (true) { + if (local84 >= (local17 ? 64 : 4096)) { + continue label123; + } + local95 = arg0.g1(); + if (local95 != 0) { + if ((local95 & 0x1) == 1) { + arg0.offset++; + } + if ((local95 & 0x2) == 2) { + arg0.offset += 2; + } + if ((local95 & 0x4) == 4) { + arg0.offset += 3; + } + } + local84++; + } + } + return; + } + } - @OriginalMember(owner = "client!le", name = "a", descriptor = "(IIIIIIIIIII)V") - public static void method2735(@OriginalArg(0) 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) { - @Pc(9) int local9 = arg3 - arg5; - @Pc(14) int local14 = arg1 - arg2; - if (width > arg3) { - local9++; - } - if (length > arg1) { - local14++; - } - @Pc(32) int local32; - @Pc(47) int local47; - @Pc(57) int local57; - @Pc(62) int local62; - @Pc(71) int local71; - @Pc(104) int local104; - @Pc(145) int local145; - @Pc(157) int local157; - @Pc(162) int local162; - @Pc(211) int local211; - @Pc(222) int mapScene; - @Pc(233) int mapSceneId; - @Pc(254) int angle; - @Pc(270) int local270; - @Pc(276) int local276; - @Pc(312) int local312; - @Pc(372) int local372; - @Pc(185) int[][] local185; - for (local32 = 0; local32 < local9; local32++) { - local47 = local32 * arg7 >> 16; - local57 = (local32 + 1) * arg7 >> 16; - local62 = local57 - local47; - if (local62 > 0) { - local71 = local32 + arg5 >> 6; - if (local71 >= 0 && anIntArrayArrayArray17.length - 1 >= local71) { - local47 += arg4; - local185 = anIntArrayArrayArray17[local71]; - @Pc(189) byte[][] local189 = aByteArrayArrayArray3[local71]; - @Pc(193) byte[][] local193 = aByteArrayArrayArray8[local71]; - @Pc(197) byte[][] local197 = aByteArrayArrayArray7[local71]; - @Pc(201) byte[][] local201 = aByteArrayArrayArray10[local71]; - local57 += arg4; - @Pc(209) byte[][] local209 = aByteArrayArrayArray12[local71]; - for (local211 = 0; local211 < local14; local211++) { - mapScene = arg6 * local211 >> 16; - mapSceneId = (local211 + 1) * arg6 >> 16; - @Pc(238) int local238 = mapSceneId - mapScene; - if (local238 > 0) { - mapSceneId += arg0; - angle = arg2 + local211 >> 6; - @Pc(260) int local260 = arg2 + local211 & 0x3F; - mapScene += arg0; - 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; - } else if ((local211 + arg2 & 0x4) == (arg5 + local32 & 0x4)) { - local312 = overlayColors[FloType.anInt865 + 1]; - } else { - local312 = 4936552; - } - if (angle < 0 || angle > local185.length - 1) { - if (local312 == 0) { - local312 = 1; - } - SoftwareRaster.fillRect(local47, mapScene, local62, local238, local312); - continue; - } - } else { - local312 = local185[angle][local276]; - } - local372 = local189[angle] == null ? 0 : overlayColors[local189[angle][local276] & 0xFF]; - if (local312 == 0) { - local312 = 1; - } - @Pc(395) int local395 = local209[angle] == null ? 0 : overlayColors[local209[angle][local276] & 0xFF]; - @Pc(437) int local437; - if (local372 == 0 && local395 == 0) { - SoftwareRaster.fillRect(local47, mapScene, local62, local238, local312); - } else { - @Pc(433) byte local433; - if (local372 != 0) { - if (local372 == -1) { - local372 = 1; - } - local433 = local193[angle] == null ? 0 : local193[angle][local276]; - local437 = local433 & 0xFC; - if (local437 == 0 || local62 <= 1 || local238 <= 1) { - SoftwareRaster.fillRect(local47, mapScene, local62, local238, local372); - } else { - method4667(SoftwareRaster.pixels, local372, local47, local433 & 0x3, local312, local437 >> 2, local238, local62, mapScene, true); - } - } - if (local395 != 0) { - if (local395 == -1) { - local395 = local312; - } - local433 = local201[angle][local276]; - local437 = local433 & 0xFC; - if (local437 == 0 || local62 <= 1 || local238 <= 1) { - SoftwareRaster.fillRect(local47, mapScene, local62, local238, local395); - } - method4667(SoftwareRaster.pixels, local395, local47, local433 & 0x3, 0, local437 >> 2, local238, local62, mapScene, local372 == 0); - } - } - if (local197[angle] != null) { - @Pc(546) int local546 = local197[angle][local276] & 0xFF; - if (local546 != 0) { - if (local62 == 1) { - local437 = local47; - } else { - local437 = local57 - 1; - } - @Pc(569) int local569; - if (local238 == 1) { - local569 = mapScene; - } else { - local569 = mapSceneId - 1; - } - @Pc(575) int local575 = 13421772; - if (local546 >= 5 && local546 <= 8 || local546 >= 13 && local546 <= 16 || local546 >= 21 && local546 <= 24 || local546 == 27 || local546 == 28) { - local575 = 13369344; - local546 -= 4; - } - if (local546 == 1) { - SoftwareRaster.drawVerticalLine(local47, mapScene, local238, local575); - } else if (local546 == 2) { - SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); - } else if (local546 == 3) { - SoftwareRaster.drawVerticalLine(local437, mapScene, local238, local575); - } else if (local546 == 4) { - SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); - } else if (local546 == 9) { - SoftwareRaster.drawVerticalLine(local47, mapScene, local238, 16777215); - SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); - } else if (local546 == 10) { - SoftwareRaster.drawVerticalLine(local437, mapScene, local238, 16777215); - SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); - } else if (local546 == 11) { - SoftwareRaster.drawVerticalLine(local437, mapScene, local238, 16777215); - SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); - } else if (local546 == 12) { - SoftwareRaster.drawVerticalLine(local47, mapScene, local238, 16777215); - SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); - } else if (local546 == 17) { - SoftwareRaster.drawHorizontalLine(local47, mapScene, 1, local575); - } else if (local546 == 18) { - SoftwareRaster.drawHorizontalLine(local437, mapScene, 1, local575); - } else if (local546 == 19) { - SoftwareRaster.drawHorizontalLine(local437, local569, 1, local575); - } else if (local546 == 20) { - SoftwareRaster.drawHorizontalLine(local47, local569, 1, local575); - } else { - @Pc(705) int local705; - if (local546 == 25) { - for (local705 = 0; local705 < local238; local705++) { - SoftwareRaster.drawHorizontalLine(local705 + local47, -local705 + local569, 1, local575); - } - } else if (local546 == 26) { - for (local705 = 0; local705 < local238; local705++) { - SoftwareRaster.drawHorizontalLine(local705 + local47, mapScene + local705, 1, local575); - } - } - } - } - } - } - } - } else { - local47 += arg4; - for (@Pc(90) int local90 = 0; local90 < local14; local90++) { - if (currentMap.anInt759 != -1) { - local104 = currentMap.anInt759; - } else if ((local32 + arg5 & 0x4) == (local90 + arg2 & 0x4)) { - local104 = overlayColors[FloType.anInt865 + 1]; - } else { - local104 = 0x4b5368; - } - if (local104 == 0) { - local104 = 1; - } - local145 = (arg6 * local90 >> 16) + arg0; - local157 = arg0 + ((local90 + 1) * arg6 >> 16); - local162 = local157 - local145; - SoftwareRaster.fillRect(local47, local145, local62, local162, local104); - } - } - } - } - for (local32 = -2; local32 < local9 + 2; local32++) { - local47 = local32 * arg7 >> 16; - local57 = arg7 * (local32 + 1) >> 16; - local62 = local57 - local47; - if (local62 > 0) { - local47 += arg4; - local71 = arg5 + local32 >> 6; - if (local71 >= 0 && scenery.length - 1 >= local71) { - local185 = scenery[local71]; - for (local104 = -2; local104 < local14 + 2; local104++) { - local145 = local104 * arg6 >> 16; - local157 = (local104 + 1) * arg6 >> 16; - local162 = local157 - local145; - if (local162 > 0) { - local145 += arg0; - @Pc(931) int local931 = local104 + arg2 >> 6; - if (local931 >= 0 && local931 <= local185.length - 1) { - local211 = ((arg2 + local104 & 0x3F) << 6) + (local32 + arg5 & 0x3F); - if (local185[local931] != null) { - mapScene = local185[local931][local211]; - mapSceneId = mapScene & 0x3FFF; - if (mapSceneId != 0) { - angle = mapScene >> 14 & 0x3; - @Pc(998) MsiType type = MsiTypeList.get(mapSceneId - 1); - @Pc(1003) SoftwareIndexedSprite sprite = type.getSprite(angle); - if (sprite != null) { - local276 = local162 * sprite.height / 4; - local270 = local62 * sprite.width / 4; - if (type.aBoolean2) { - local312 = mapScene >> 16 & 0xF; - local372 = mapScene >> 20 & 0xF; - if ((angle & 0x1) == 1) { - angle = local312; - local312 = local372; - local372 = angle; - } - local270 = local62 * local312; - local276 = local162 * local372; - } - if (local270 != 0 && local276 != 0) { - if (type.anInt11 == 0) { - sprite.method1398(local47, local145 + local162 - local276, local270, local276); - } else { - sprite.method1390(local47, local145 + local162 - local276, local270, local276, type.anInt11); - } - } - } - } - } - } - } - } - } - } - } - } + @OriginalMember(owner = "client!le", name = "a", descriptor = "(IIIIIIIIIII)V") + public static void method2735(@OriginalArg(0) 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) { + @Pc(9) int local9 = arg3 - arg5; + @Pc(14) int local14 = arg1 - arg2; + if (width > arg3) { + local9++; + } + if (length > arg1) { + local14++; + } + @Pc(32) int local32; + @Pc(47) int local47; + @Pc(57) int local57; + @Pc(62) int local62; + @Pc(71) int local71; + @Pc(104) int local104; + @Pc(145) int local145; + @Pc(157) int local157; + @Pc(162) int local162; + @Pc(211) int local211; + @Pc(222) int mapScene; + @Pc(233) int mapSceneId; + @Pc(254) int angle; + @Pc(270) int local270; + @Pc(276) int local276; + @Pc(312) int local312; + @Pc(372) int local372; + @Pc(185) int[][] local185; + for (local32 = 0; local32 < local9; local32++) { + local47 = local32 * arg7 >> 16; + local57 = (local32 + 1) * arg7 >> 16; + local62 = local57 - local47; + if (local62 > 0) { + local71 = local32 + arg5 >> 6; + if (local71 >= 0 && anIntArrayArrayArray17.length - 1 >= local71) { + local47 += arg4; + local185 = anIntArrayArrayArray17[local71]; + @Pc(189) byte[][] local189 = aByteArrayArrayArray3[local71]; + @Pc(193) byte[][] local193 = aByteArrayArrayArray8[local71]; + @Pc(197) byte[][] local197 = aByteArrayArrayArray7[local71]; + @Pc(201) byte[][] local201 = aByteArrayArrayArray10[local71]; + local57 += arg4; + @Pc(209) byte[][] local209 = aByteArrayArrayArray12[local71]; + for (local211 = 0; local211 < local14; local211++) { + mapScene = arg6 * local211 >> 16; + mapSceneId = (local211 + 1) * arg6 >> 16; + @Pc(238) int local238 = mapSceneId - mapScene; + if (local238 > 0) { + mapSceneId += arg0; + angle = arg2 + local211 >> 6; + @Pc(260) int local260 = arg2 + local211 & 0x3F; + mapScene += arg0; + 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; + } else if ((local211 + arg2 & 0x4) == (arg5 + local32 & 0x4)) { + local312 = overlayColors[FloType.anInt865 + 1]; + } else { + local312 = 4936552; + } + if (angle < 0 || angle > local185.length - 1) { + if (local312 == 0) { + local312 = 1; + } + SoftwareRaster.fillRect(local47, mapScene, local62, local238, local312); + continue; + } + } else { + local312 = local185[angle][local276]; + } + local372 = local189[angle] == null ? 0 : overlayColors[local189[angle][local276] & 0xFF]; + if (local312 == 0) { + local312 = 1; + } + @Pc(395) int local395 = local209[angle] == null ? 0 : overlayColors[local209[angle][local276] & 0xFF]; + @Pc(437) int local437; + if (local372 == 0 && local395 == 0) { + SoftwareRaster.fillRect(local47, mapScene, local62, local238, local312); + } else { + @Pc(433) byte local433; + if (local372 != 0) { + if (local372 == -1) { + local372 = 1; + } + local433 = local193[angle] == null ? 0 : local193[angle][local276]; + local437 = local433 & 0xFC; + if (local437 == 0 || local62 <= 1 || local238 <= 1) { + SoftwareRaster.fillRect(local47, mapScene, local62, local238, local372); + } else { + method4667(SoftwareRaster.pixels, local372, local47, local433 & 0x3, local312, local437 >> 2, local238, local62, mapScene, true); + } + } + if (local395 != 0) { + if (local395 == -1) { + local395 = local312; + } + local433 = local201[angle][local276]; + local437 = local433 & 0xFC; + if (local437 == 0 || local62 <= 1 || local238 <= 1) { + SoftwareRaster.fillRect(local47, mapScene, local62, local238, local395); + } + method4667(SoftwareRaster.pixels, local395, local47, local433 & 0x3, 0, local437 >> 2, local238, local62, mapScene, local372 == 0); + } + } + if (local197[angle] != null) { + @Pc(546) int local546 = local197[angle][local276] & 0xFF; + if (local546 != 0) { + if (local62 == 1) { + local437 = local47; + } else { + local437 = local57 - 1; + } + @Pc(569) int local569; + if (local238 == 1) { + local569 = mapScene; + } else { + local569 = mapSceneId - 1; + } + @Pc(575) int local575 = 13421772; + if (local546 >= 5 && local546 <= 8 || local546 >= 13 && local546 <= 16 || local546 >= 21 && local546 <= 24 || local546 == 27 || local546 == 28) { + local575 = 13369344; + local546 -= 4; + } + if (local546 == 1) { + SoftwareRaster.drawVerticalLine(local47, mapScene, local238, local575); + } else if (local546 == 2) { + SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); + } else if (local546 == 3) { + SoftwareRaster.drawVerticalLine(local437, mapScene, local238, local575); + } else if (local546 == 4) { + SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); + } else if (local546 == 9) { + SoftwareRaster.drawVerticalLine(local47, mapScene, local238, 16777215); + SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); + } else if (local546 == 10) { + SoftwareRaster.drawVerticalLine(local437, mapScene, local238, 16777215); + SoftwareRaster.drawHorizontalLine(local47, mapScene, local62, local575); + } else if (local546 == 11) { + SoftwareRaster.drawVerticalLine(local437, mapScene, local238, 16777215); + SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); + } else if (local546 == 12) { + SoftwareRaster.drawVerticalLine(local47, mapScene, local238, 16777215); + SoftwareRaster.drawHorizontalLine(local47, local569, local62, local575); + } else if (local546 == 17) { + SoftwareRaster.drawHorizontalLine(local47, mapScene, 1, local575); + } else if (local546 == 18) { + SoftwareRaster.drawHorizontalLine(local437, mapScene, 1, local575); + } else if (local546 == 19) { + SoftwareRaster.drawHorizontalLine(local437, local569, 1, local575); + } else if (local546 == 20) { + SoftwareRaster.drawHorizontalLine(local47, local569, 1, local575); + } else { + @Pc(705) int local705; + if (local546 == 25) { + for (local705 = 0; local705 < local238; local705++) { + SoftwareRaster.drawHorizontalLine(local705 + local47, -local705 + local569, 1, local575); + } + } else if (local546 == 26) { + for (local705 = 0; local705 < local238; local705++) { + SoftwareRaster.drawHorizontalLine(local705 + local47, mapScene + local705, 1, local575); + } + } + } + } + } + } + } + } else { + local47 += arg4; + for (@Pc(90) int local90 = 0; local90 < local14; local90++) { + if (currentMap.anInt759 != -1) { + local104 = currentMap.anInt759; + } else if ((local32 + arg5 & 0x4) == (local90 + arg2 & 0x4)) { + local104 = overlayColors[FloType.anInt865 + 1]; + } else { + local104 = 0x4b5368; + } + if (local104 == 0) { + local104 = 1; + } + local145 = (arg6 * local90 >> 16) + arg0; + local157 = arg0 + ((local90 + 1) * arg6 >> 16); + local162 = local157 - local145; + SoftwareRaster.fillRect(local47, local145, local62, local162, local104); + } + } + } + } + for (local32 = -2; local32 < local9 + 2; local32++) { + local47 = local32 * arg7 >> 16; + local57 = arg7 * (local32 + 1) >> 16; + local62 = local57 - local47; + if (local62 > 0) { + local47 += arg4; + local71 = arg5 + local32 >> 6; + if (local71 >= 0 && scenery.length - 1 >= local71) { + local185 = scenery[local71]; + for (local104 = -2; local104 < local14 + 2; local104++) { + local145 = local104 * arg6 >> 16; + local157 = (local104 + 1) * arg6 >> 16; + local162 = local157 - local145; + if (local162 > 0) { + local145 += arg0; + @Pc(931) int local931 = local104 + arg2 >> 6; + if (local931 >= 0 && local931 <= local185.length - 1) { + local211 = ((arg2 + local104 & 0x3F) << 6) + (local32 + arg5 & 0x3F); + if (local185[local931] != null) { + mapScene = local185[local931][local211]; + mapSceneId = mapScene & 0x3FFF; + if (mapSceneId != 0) { + angle = mapScene >> 14 & 0x3; + @Pc(998) MsiType type = MsiTypeList.get(mapSceneId - 1); + @Pc(1003) SoftwareIndexedSprite sprite = type.getSprite(angle); + if (sprite != null) { + local276 = local162 * sprite.height / 4; + local270 = local62 * sprite.width / 4; + if (type.aBoolean2) { + local312 = mapScene >> 16 & 0xF; + local372 = mapScene >> 20 & 0xF; + if ((angle & 0x1) == 1) { + angle = local312; + local312 = local372; + local372 = angle; + } + local270 = local62 * local312; + local276 = local162 * local372; + } + if (local270 != 0 && local276 != 0) { + if (type.anInt11 == 0) { + sprite.method1398(local47, local145 + local162 - local276, local270, local276); + } else { + sprite.method1390(local47, local145 + local162 - local276, local270, local276, type.anInt11); + } + } + } + } + } + } + } + } + } + } + } + } - @OriginalMember(owner = "client!jb", name = "a", descriptor = "(IZ)V") - public static void clear(@OriginalArg(1) boolean arg0) { - aByteArrayArrayArray8 = null; - underlayColors = null; - component = null; - aByteArrayArrayArray3 = null; - overlayColors = null; - aByteArrayArrayArray10 = null; - if (arg0 && currentMap != null) { - aClass100_724 = currentMap.group; - } else { - aClass100_724 = null; - } - aByteArrayArrayArray7 = null; - aByteArrayArrayArray12 = null; - scenery = null; - anIntArrayArrayArray17 = null; - loadPercentage = 0; - currentMap = null; - mapElements.clear(); - labels = null; - anInt4901 = -1; - font22 = null; - font30 = null; - font12 = null; - font26 = null; - font11 = null; - font14 = null; - font17 = null; - font19 = null; - aClass3_Sub2_Sub1_2 = null; - anInt3482 = -1; - aClass3_Sub2_Sub1_Sub1_2 = null; - } + @OriginalMember(owner = "client!jb", name = "a", descriptor = "(IZ)V") + public static void clear(@OriginalArg(1) boolean arg0) { + aByteArrayArrayArray8 = null; + underlayColors = null; + component = null; + aByteArrayArrayArray3 = null; + overlayColors = null; + aByteArrayArrayArray10 = null; + if (arg0 && currentMap != null) { + aClass100_724 = currentMap.group; + } else { + aClass100_724 = null; + } + aByteArrayArrayArray7 = null; + aByteArrayArrayArray12 = null; + scenery = null; + anIntArrayArrayArray17 = null; + loadPercentage = 0; + currentMap = null; + mapElements.clear(); + labels = null; + anInt4901 = -1; + font22 = null; + font30 = null; + font12 = null; + font26 = null; + font11 = null; + font14 = null; + font17 = null; + font19 = null; + aClass3_Sub2_Sub1_2 = null; + anInt3482 = -1; + aClass3_Sub2_Sub1_Sub1_2 = null; + } - @OriginalMember(owner = "client!je", name = "a", descriptor = "(IIIII)V") - public static void method2387(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - anInt435 = width * arg2 / arg0; - anInt919 = length * arg1 / arg3; - anInt3482 = -1; - anInt4901 = -1; - method965(); - } + @OriginalMember(owner = "client!je", name = "a", descriptor = "(IIIII)V") + public static void method2387(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + anInt435 = width * arg2 / arg0; + anInt919 = length * arg1 / arg3; + anInt3482 = -1; + anInt4901 = -1; + method965(); + } - @OriginalMember(owner = "client!wi", name = "d", descriptor = "(II)V") - public static void method4641(@OriginalArg(1) int arg0) { - anInt4901 = -1; - anInt4901 = -1; - anInt919 = arg0; - method965(); - } + @OriginalMember(owner = "client!wi", name = "d", descriptor = "(II)V") + public static void method4641(@OriginalArg(1) int arg0) { + anInt4901 = -1; + anInt4901 = -1; + anInt919 = arg0; + method965(); + } - @OriginalMember(owner = "client!hj", name = "a", descriptor = "(II)V") - public static void method1964(@OriginalArg(0) int arg0) { - anInt4901 = -1; - anInt3482 = -1; - anInt435 = arg0; - method965(); - } + @OriginalMember(owner = "client!hj", name = "a", descriptor = "(II)V") + public static void method1964(@OriginalArg(0) int arg0) { + anInt4901 = -1; + anInt3482 = -1; + anInt435 = arg0; + method965(); + } - @OriginalMember(owner = "client!hc", name = "d", descriptor = "(I)I") - public static int getTargetZoom() { - if ((double) targetZoom == 3.0D) { - return 37; - } else if ((double) targetZoom == 4.0D) { - return 50; - } else if ((double) targetZoom == 6.0D) { - return 75; - } else if ((double) targetZoom == 8.0D) { - return 100; - } else { - return 200; - } - } + @OriginalMember(owner = "client!hc", name = "d", descriptor = "(I)I") + public static int getTargetZoom() { + if ((double) targetZoom == 3.0D) { + return 37; + } else if ((double) targetZoom == 4.0D) { + return 50; + } else if ((double) targetZoom == 6.0D) { + return 75; + } else if ((double) targetZoom == 8.0D) { + return 100; + } else { + return 200; + } + } - @OriginalMember(owner = "client!hb", name = "b", descriptor = "(Lclient!na;I)V") - public static void method1853(@OriginalArg(0) JagString arg0) { - clear(false); - method4011(arg0); - } + @OriginalMember(owner = "client!hb", name = "b", descriptor = "(Lclient!na;I)V") + public static void method1853(@OriginalArg(0) JagString arg0) { + clear(false); + method4011(arg0); + } - @OriginalMember(owner = "client!kf", name = "a", descriptor = "(Lclient!na;I)V") + @OriginalMember(owner = "client!kf", name = "a", descriptor = "(Lclient!na;I)V") public static void method4011(@OriginalArg(0) JagString arg0) { for (@Pc(15) Map local15 = (Map) MapList.aClass69_120.head(); local15 != null; local15 = (Map) MapList.aClass69_120.next()) { if (local15.group.strEquals(arg0)) { @@ -946,7 +949,7 @@ public class WorldMap { } } - @OriginalMember(owner = "client!me", name = "a", descriptor = "(IB)V") + @OriginalMember(owner = "client!me", name = "a", descriptor = "(IB)V") public static void setTargetZoom(@OriginalArg(0) int arg0) { anInt4901 = -1; if (arg0 == 37) { @@ -963,133 +966,133 @@ public class WorldMap { anInt4901 = -1; } - @OriginalMember(owner = "client!af", name = "b", descriptor = "(B)V") - public static void reset() { - clear(false); - System.gc(); - client.setGameState(25); - } + @OriginalMember(owner = "client!af", name = "b", descriptor = "(B)V") + public static void reset() { + clear(false); + System.gc(); + client.setGameState(25); + } - @OriginalMember(owner = "client!bb", name = "a", descriptor = "(I)V") - public static void method447() { - if (zoom < targetZoom) { - zoom = (float) ((double) zoom + (double) zoom / 30.0D); - if (targetZoom < zoom) { - zoom = targetZoom; - } - method965(); - } else if (targetZoom < zoom) { - zoom = (float) ((double) zoom - (double) zoom / 30.0D); - if (targetZoom > zoom) { - zoom = targetZoom; - } - method965(); - } - if (anInt3482 == -1 || anInt4901 == -1) { - return; - } - @Pc(60) int local60 = anInt3482 - anInt435; - if (local60 < 2 || local60 > 2) { - local60 >>= 0x4; - } - @Pc(78) int local78 = anInt4901 - anInt919; - if (local78 < 2 || local78 > 2) { - local78 >>= 0x4; - } - anInt919 -= -local78; - anInt435 += local60; - if (local60 == 0 && local78 == 0) { - anInt3482 = -1; - anInt4901 = -1; - } - method965(); - } + @OriginalMember(owner = "client!bb", name = "a", descriptor = "(I)V") + public static void method447() { + if (zoom < targetZoom) { + zoom = (float) ((double) zoom + (double) zoom / 30.0D); + if (targetZoom < zoom) { + zoom = targetZoom; + } + method965(); + } else if (targetZoom < zoom) { + zoom = (float) ((double) zoom - (double) zoom / 30.0D); + if (targetZoom > zoom) { + zoom = targetZoom; + } + method965(); + } + if (anInt3482 == -1 || anInt4901 == -1) { + return; + } + @Pc(60) int local60 = anInt3482 - anInt435; + if (local60 < 2 || local60 > 2) { + local60 >>= 0x4; + } + @Pc(78) int local78 = anInt4901 - anInt919; + if (local78 < 2 || local78 > 2) { + local78 >>= 0x4; + } + anInt919 -= -local78; + anInt435 += local60; + if (local60 == 0 && local78 == 0) { + anInt3482 = -1; + anInt4901 = -1; + } + method965(); + } - @OriginalMember(owner = "client!lb", name = "d", descriptor = "(B)V") - public static void method2720() { - if (aClass100_724 != null) { - method1853(aClass100_724); - aClass100_724 = null; - } - } + @OriginalMember(owner = "client!lb", name = "d", descriptor = "(B)V") + public static void method2720() { + if (aClass100_724 != null) { + method1853(aClass100_724); + aClass100_724 = null; + } + } - @OriginalMember(owner = "client!va", name = "c", descriptor = "(BI)V") - public static void method4444(@OriginalArg(1) int arg0) { - Static9.anInt172 = arg0; - Static1.anInt2428 = 20; - anInt1864 = 3; - } + @OriginalMember(owner = "client!va", name = "c", descriptor = "(BI)V") + public static void method4444(@OriginalArg(1) int arg0) { + Static9.anInt172 = arg0; + Static1.anInt2428 = 20; + anInt1864 = 3; + } - @OriginalMember(owner = "client!ab", name = "a", descriptor = "(Lclient!na;I)V") - public static void method4656(@OriginalArg(0) JagString arg0) { - @Pc(9) int local9 = method3218(arg0); - if (local9 != -1) { - method3616(labels.aShortArray73[local9], labels.aShortArray72[local9]); - } - } + @OriginalMember(owner = "client!ab", name = "a", descriptor = "(Lclient!na;I)V") + public static void method4656(@OriginalArg(0) JagString arg0) { + @Pc(9) int local9 = method3218(arg0); + if (local9 != -1) { + method3616(labels.aShortArray73[local9], labels.aShortArray72[local9]); + } + } - @OriginalMember(owner = "client!rc", name = "a", descriptor = "(Lclient!na;Z)Lclient!na;") - public static JagString method923(@OriginalArg(0) JagString arg0) { - @Pc(12) int local12 = method3218(arg0); - return local12 == -1 ? aClass100_517 : labels.aClass100Array153[local12].method3140(aClass100_538, aClass100_872); - } + @OriginalMember(owner = "client!rc", name = "a", descriptor = "(Lclient!na;Z)Lclient!na;") + public static JagString method923(@OriginalArg(0) JagString arg0) { + @Pc(12) int local12 = method3218(arg0); + return local12 == -1 ? aClass100_517 : labels.aClass100Array153[local12].method3140(aClass100_538, aClass100_872); + } - @OriginalMember(owner = "client!rg", name = "d", descriptor = "(B)Lclient!bn;") - public static Map method4361() { - return currentMap; - } + @OriginalMember(owner = "client!rg", name = "d", descriptor = "(B)Lclient!bn;") + public static Map method4361() { + return currentMap; + } - @OriginalMember(owner = "client!jd", name = "a", descriptor = "(B)I") + @OriginalMember(owner = "client!jd", name = "a", descriptor = "(B)I") public static int method2352() { anInt5212 = 0; return method2385(); } - @OriginalMember(owner = "client!je", name = "j", descriptor = "(I)I") - public static int method2385() { - if (labels == null) { - return -1; - } - while (anInt5212 < labels.anInt5074) { - if (labels.method3897(anInt5212)) { - return anInt5212++; - } - anInt5212++; - } - return -1; - } + @OriginalMember(owner = "client!je", name = "j", descriptor = "(I)I") + public static int method2385() { + if (labels == null) { + return -1; + } + while (anInt5212 < labels.anInt5074) { + if (labels.method3897(anInt5212)) { + return anInt5212++; + } + anInt5212++; + } + return -1; + } - @OriginalMember(owner = "client!gf", name = "a", descriptor = "(BII)V") - public static void method3616(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - anInt3482 = arg0 - originX; - @Pc(24) int local24 = anInt3482 - (int) ((float) component.width / zoom); - @Pc(33) int local33 = anInt3482 + (int) ((float) component.width / zoom); - if (local24 < 0) { - anInt3482 = (int) ((float) component.width / zoom); - } - anInt4901 = length + originZ - arg1 - 1; - @Pc(61) int local61 = (int) ((float) component.height / zoom) + anInt4901; - @Pc(70) int local70 = anInt4901 - (int) ((float) component.height / zoom); - if (local33 > width) { - anInt3482 = width - (int) ((float) component.width / zoom); - } - if (local70 < 0) { - anInt4901 = (int) ((float) component.height / zoom); - } - if (length < local61) { - anInt4901 = length - (int) ((float) component.height / zoom); - } - } + @OriginalMember(owner = "client!gf", name = "a", descriptor = "(BII)V") + public static void method3616(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + anInt3482 = arg0 - originX; + @Pc(24) int local24 = anInt3482 - (int) ((float) component.width / zoom); + @Pc(33) int local33 = anInt3482 + (int) ((float) component.width / zoom); + if (local24 < 0) { + anInt3482 = (int) ((float) component.width / zoom); + } + anInt4901 = length + originZ - arg1 - 1; + @Pc(61) int local61 = (int) ((float) component.height / zoom) + anInt4901; + @Pc(70) int local70 = anInt4901 - (int) ((float) component.height / zoom); + if (local33 > width) { + anInt3482 = width - (int) ((float) component.width / zoom); + } + if (local70 < 0) { + anInt4901 = (int) ((float) component.height / zoom); + } + if (length < local61) { + anInt4901 = length - (int) ((float) component.height / zoom); + } + } - @OriginalMember(owner = "client!dh", name = "a", descriptor = "(Lclient!na;I)V") - public static void method1149(@OriginalArg(0) JagString arg0) { - @Pc(7) int local7 = method1879(arg0); - if (local7 != -1) { - method3616(labels.aShortArray73[local7], labels.aShortArray72[local7]); - } - } + @OriginalMember(owner = "client!dh", name = "a", descriptor = "(Lclient!na;I)V") + public static void method1149(@OriginalArg(0) JagString arg0) { + @Pc(7) int local7 = method1879(arg0); + if (local7 != -1) { + method3616(labels.aShortArray73[local7], labels.aShortArray72[local7]); + } + } - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!na;Z)I") + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!na;Z)I") public static int method1879(@OriginalArg(0) JagString arg0) { if (labels == null || arg0.length() == 0) { return -1; @@ -1102,588 +1105,588 @@ public class WorldMap { return -1; } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "([IIIIIIIIIZB)V") - public static void method4667(@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) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) boolean arg9) { - @Pc(7) int local7 = arg2; - if (SoftwareRaster.clipRight <= arg2) { - return; - } - if (arg2 < SoftwareRaster.clipLeft) { - local7 = SoftwareRaster.clipLeft; - } - @Pc(30) int local30 = arg7 + arg2; - if (SoftwareRaster.clipLeft >= local30) { - return; - } - if (SoftwareRaster.clipRight < local30) { - local30 = SoftwareRaster.clipRight; - } - @Pc(43) int local43 = arg8; - if (SoftwareRaster.clipBottom <= arg8) { - return; - } - @Pc(56) int local56 = arg8 + arg6; - if (arg8 < SoftwareRaster.clipTop) { - local43 = SoftwareRaster.clipTop; - } - if (local56 <= SoftwareRaster.clipTop) { - return; - } - @Pc(79) int local79 = local7 + SoftwareRaster.width * local43; - if (arg5 == 9) { - arg3 = arg3 + 1 & 0x3; - arg5 = 1; - } - @Pc(99) int local99 = local7 + SoftwareRaster.width - local30; - local43 -= arg8; - @Pc(108) int local108 = arg6 - local43; - if (SoftwareRaster.clipBottom < local56) { - local56 = SoftwareRaster.clipBottom; - } - if (arg5 == 10) { - arg3 = arg3 + 3 & 0x3; - arg5 = 1; - } - local7 -= arg2; - @Pc(136) int local136 = arg7 - local7; - if (arg5 == 11) { - arg3 = arg3 + 3 & 0x3; - arg5 = 8; - } - local30 -= arg2; - @Pc(157) int local157 = arg7 - local30; - local56 -= arg8; - @Pc(165) int local165 = arg6 - local56; - @Pc(175) int local175; - @Pc(184) int local184; - if (arg5 == 1) { - if (arg3 == 0) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 <= local175) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 1) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 >= local175) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 3) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 >= local175) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } - } else if (arg5 == 2) { - if (arg3 == 0) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 >> 1 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 1) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local79 >= 0 && local79 < arg0.length) { - if (local175 << 1 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } else { - local79++; - } - } - local79 += local99; - } - } else if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 >> 1 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 3) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 << 1 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } - } else if (arg5 == 3) { - if (arg3 == 0) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 >> 1 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 1) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 >= local175 << 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 <= local175 >> 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 3) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 << 1 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } - } else if (arg5 == 4) { - if (arg3 == 0) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 >> 1 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 1) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 << 1 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local184 >= local175 >> 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 3) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local184 <= local175 << 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } - } else if (arg5 != 5) { - if (arg5 == 6) { - if (arg3 == 0) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 <= arg7 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 1) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 <= arg6 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 >= arg7 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 3) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 >= arg6 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - } - if (arg5 == 7) { - if (arg3 == 0) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 <= local175 - arg6 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 1) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 - arg6 / 2 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 2) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local184 <= local175 - arg6 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 3) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 - arg6 / 2 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - } - if (arg5 == 8) { - if (arg3 == 0) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 - arg6 / 2 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 1) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local175 - arg6 / 2 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 2) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local184 >= local175 - arg6 / 2) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - if (arg3 == 3) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 - arg6 / 2 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - return; - } - } - } else if (arg3 == 0) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 >> 1 <= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 1) { - for (local175 = local108 - 1; local175 >= local165; local175--) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 <= local175 << 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 2) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local7; local184 < local30; local184++) { - if (local184 >= local175 >> 1) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } else if (arg3 == 3) { - for (local175 = local43; local175 < local56; local175++) { - for (local184 = local136 - 1; local184 >= local157; local184--) { - if (local175 << 1 >= local184) { - arg0[local79] = arg1; - } else if (arg9) { - arg0[local79] = arg4; - } - local79++; - } - local79 += local99; - } - } - } + @OriginalMember(owner = "client!wl", name = "a", descriptor = "([IIIIIIIIIZB)V") + public static void method4667(@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) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) boolean arg9) { + @Pc(7) int local7 = arg2; + if (SoftwareRaster.clipRight <= arg2) { + return; + } + if (arg2 < SoftwareRaster.clipLeft) { + local7 = SoftwareRaster.clipLeft; + } + @Pc(30) int local30 = arg7 + arg2; + if (SoftwareRaster.clipLeft >= local30) { + return; + } + if (SoftwareRaster.clipRight < local30) { + local30 = SoftwareRaster.clipRight; + } + @Pc(43) int local43 = arg8; + if (SoftwareRaster.clipBottom <= arg8) { + return; + } + @Pc(56) int local56 = arg8 + arg6; + if (arg8 < SoftwareRaster.clipTop) { + local43 = SoftwareRaster.clipTop; + } + if (local56 <= SoftwareRaster.clipTop) { + return; + } + @Pc(79) int local79 = local7 + SoftwareRaster.width * local43; + if (arg5 == 9) { + arg3 = arg3 + 1 & 0x3; + arg5 = 1; + } + @Pc(99) int local99 = local7 + SoftwareRaster.width - local30; + local43 -= arg8; + @Pc(108) int local108 = arg6 - local43; + if (SoftwareRaster.clipBottom < local56) { + local56 = SoftwareRaster.clipBottom; + } + if (arg5 == 10) { + arg3 = arg3 + 3 & 0x3; + arg5 = 1; + } + local7 -= arg2; + @Pc(136) int local136 = arg7 - local7; + if (arg5 == 11) { + arg3 = arg3 + 3 & 0x3; + arg5 = 8; + } + local30 -= arg2; + @Pc(157) int local157 = arg7 - local30; + local56 -= arg8; + @Pc(165) int local165 = arg6 - local56; + @Pc(175) int local175; + @Pc(184) int local184; + if (arg5 == 1) { + if (arg3 == 0) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 <= local175) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 1) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 >= local175) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 3) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 >= local175) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } + } else if (arg5 == 2) { + if (arg3 == 0) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 >> 1 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 1) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local79 >= 0 && local79 < arg0.length) { + if (local175 << 1 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } else { + local79++; + } + } + local79 += local99; + } + } else if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 >> 1 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 3) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 << 1 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } + } else if (arg5 == 3) { + if (arg3 == 0) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 >> 1 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 1) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 >= local175 << 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 <= local175 >> 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 3) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 << 1 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } + } else if (arg5 == 4) { + if (arg3 == 0) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 >> 1 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 1) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 << 1 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local184 >= local175 >> 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 3) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local184 <= local175 << 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } + } else if (arg5 != 5) { + if (arg5 == 6) { + if (arg3 == 0) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 <= arg7 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 1) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 <= arg6 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 >= arg7 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 3) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 >= arg6 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + } + if (arg5 == 7) { + if (arg3 == 0) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 <= local175 - arg6 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 1) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 - arg6 / 2 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 2) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local184 <= local175 - arg6 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 3) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 - arg6 / 2 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + } + if (arg5 == 8) { + if (arg3 == 0) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 - arg6 / 2 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 1) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local175 - arg6 / 2 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 2) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local184 >= local175 - arg6 / 2) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + if (arg3 == 3) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 - arg6 / 2 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + return; + } + } + } else if (arg3 == 0) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 >> 1 <= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 1) { + for (local175 = local108 - 1; local175 >= local165; local175--) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 <= local175 << 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 2) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local7; local184 < local30; local184++) { + if (local184 >= local175 >> 1) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } else if (arg3 == 3) { + for (local175 = local43; local175 < local56; local175++) { + for (local184 = local136 - 1; local184 >= local157; local184--) { + if (local175 << 1 >= local184) { + arg0[local79] = arg1; + } else if (arg9) { + arg0[local79] = arg4; + } + local79++; + } + local79 += local99; + } + } + } - @OriginalMember(owner = "client!rg", name = "a", descriptor = "(IIIIIIIII)V") - public static void method4364(@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, @OriginalArg(8) int arg7) { - @Pc(7) int local7 = arg2 - arg7; - @Pc(16) int local16 = (arg0 - arg4 << 16) / local7; - @Pc(21) int local21 = arg5 - arg3; - @Pc(30) int local30 = (arg6 - arg1 << 16) / local21; - method2735(arg1, arg5, arg3, arg2, arg4, arg7, local30, local16); - } + @OriginalMember(owner = "client!rg", name = "a", descriptor = "(IIIIIIIII)V") + public static void method4364(@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, @OriginalArg(8) int arg7) { + @Pc(7) int local7 = arg2 - arg7; + @Pc(16) int local16 = (arg0 - arg4 << 16) / local7; + @Pc(21) int local21 = arg5 - arg3; + @Pc(30) int local30 = (arg6 - arg1 << 16) / local21; + method2735(arg1, arg5, arg3, arg2, arg4, arg7, local30, local16); + } - @OriginalMember(owner = "client!wa", name = "a", descriptor = "(IIIII)V") - public static void method2225(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (loadPercentage < 100) { - load(); - } - if (GlRenderer.enabled) { - GlRaster.setClip(arg0, arg1, arg0 + arg3, arg2 + arg1); - } else { - SoftwareRaster.setClip(arg0, arg1, arg0 + arg3, arg2 + arg1); - } - @Pc(50) int local50; - @Pc(61) int local61; - if (loadPercentage < 100) { - local50 = arg0 + arg3 / 2; - local61 = arg2 / 2 + arg1 - 18 - 20; - if (GlRenderer.enabled) { - GlRaster.method1186(arg0, arg1, arg3, arg2, 0); - GlRaster.method1179(local50 - 152, local61, 304, 34, 9179409); - GlRaster.method1179(local50 - 151, local61 + 1, 302, 32, 0); - GlRaster.method1186(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409); - GlRaster.method1186(local50 + loadPercentage * 3 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0); - } else { - SoftwareRaster.fillRect(arg0, arg1, arg3, arg2, 0); - SoftwareRaster.drawRect(local50 - 152, local61, 304, 34, 9179409); - SoftwareRaster.drawRect(local50 - 151, local61 + 1, 302, 32, 0); - SoftwareRaster.fillRect(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409); - SoftwareRaster.fillRect(loadPercentage * 3 + local50 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0); - } - Fonts.b12Full.renderCenter(LocalizedText.LOADINGDOTDOTDOT, local50, local61 + 20, 16777215, -1); - return; - } - anInt1176 = (int) ((float) (arg2 * 2) / zoom); - Static1.anInt2882 = anInt435 - (int) ((float) arg3 / zoom); - @Pc(211) int local211 = anInt435 - (int) ((float) arg3 / zoom); - local50 = anInt919 - (int) ((float) arg2 / zoom); - Static1.anInt2884 = anInt919 - (int) ((float) arg2 / zoom); - @Pc(236) int local236 = anInt919 + (int) ((float) arg2 / zoom); - local61 = (int) ((float) arg3 / zoom) + anInt435; - anInt2387 = (int) ((float) (arg3 * 2) / zoom); - if (GlRenderer.enabled) { - if (aClass3_Sub2_Sub1_Sub1_2 == null || aClass3_Sub2_Sub1_Sub1_2.width != arg3 || aClass3_Sub2_Sub1_Sub1_2.height != arg2) { - aClass3_Sub2_Sub1_Sub1_2 = null; - aClass3_Sub2_Sub1_Sub1_2 = new SoftwareSprite(arg3, arg2); - } - SoftwareRaster.setSize(aClass3_Sub2_Sub1_Sub1_2.pixels, arg3, arg2); - method4364(arg3, 0, local61, local50, 0, local236, arg2, local211); - method1195(arg3, 0, local61, local236, arg2, 0, local211, local50); - Static38.method959(0, 0, local211, arg3, local236, local50, local61, arg2); - GlRaster.method1178(aClass3_Sub2_Sub1_Sub1_2.pixels, arg0, arg1, arg3, arg2); - SoftwareRaster.pixels = null; - } else { - method4364(arg3 + arg0, arg1, local61, local50, arg0, local236, arg1 + arg2, local211); - method1195(arg0 + arg3, arg0, local61, local236, arg2 + arg1, arg1, local211, local50); - Static38.method959(arg0, arg1, local211, arg0 + arg3, local236, local50, local61, arg2 + arg1); - } - if (anInt1864 > 0) { - Static1.anInt2428--; - if (Static1.anInt2428 == 0) { - Static1.anInt2428 = 20; - anInt1864--; - } - } + @OriginalMember(owner = "client!wa", name = "a", descriptor = "(IIIII)V") + public static void method2225(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + if (loadPercentage < 100) { + load(); + } + if (GlRenderer.enabled) { + GlRaster.setClip(arg0, arg1, arg0 + arg3, arg2 + arg1); + } else { + SoftwareRaster.setClip(arg0, arg1, arg0 + arg3, arg2 + arg1); + } + @Pc(50) int local50; + @Pc(61) int local61; + if (loadPercentage < 100) { + local50 = arg0 + arg3 / 2; + local61 = arg2 / 2 + arg1 - 18 - 20; + if (GlRenderer.enabled) { + GlRaster.method1186(arg0, arg1, arg3, arg2, 0); + GlRaster.method1179(local50 - 152, local61, 304, 34, 9179409); + GlRaster.method1179(local50 - 151, local61 + 1, 302, 32, 0); + GlRaster.method1186(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409); + GlRaster.method1186(local50 + loadPercentage * 3 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0); + } else { + SoftwareRaster.fillRect(arg0, arg1, arg3, arg2, 0); + SoftwareRaster.drawRect(local50 - 152, local61, 304, 34, 9179409); + SoftwareRaster.drawRect(local50 - 151, local61 + 1, 302, 32, 0); + SoftwareRaster.fillRect(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409); + SoftwareRaster.fillRect(loadPercentage * 3 + local50 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0); + } + Fonts.b12Full.renderCenter(LocalizedText.LOADINGDOTDOTDOT, local50, local61 + 20, 16777215, -1); + return; + } + anInt1176 = (int) ((float) (arg2 * 2) / zoom); + Static1.anInt2882 = anInt435 - (int) ((float) arg3 / zoom); + @Pc(211) int local211 = anInt435 - (int) ((float) arg3 / zoom); + local50 = anInt919 - (int) ((float) arg2 / zoom); + Static1.anInt2884 = anInt919 - (int) ((float) arg2 / zoom); + @Pc(236) int local236 = anInt919 + (int) ((float) arg2 / zoom); + local61 = (int) ((float) arg3 / zoom) + anInt435; + anInt2387 = (int) ((float) (arg3 * 2) / zoom); + if (GlRenderer.enabled) { + if (aClass3_Sub2_Sub1_Sub1_2 == null || aClass3_Sub2_Sub1_Sub1_2.width != arg3 || aClass3_Sub2_Sub1_Sub1_2.height != arg2) { + aClass3_Sub2_Sub1_Sub1_2 = null; + aClass3_Sub2_Sub1_Sub1_2 = new SoftwareSprite(arg3, arg2); + } + SoftwareRaster.setSize(aClass3_Sub2_Sub1_Sub1_2.pixels, arg3, arg2); + method4364(arg3, 0, local61, local50, 0, local236, arg2, local211); + method1195(arg3, 0, local61, local236, arg2, 0, local211, local50); + Static38.method959(0, 0, local211, arg3, local236, local50, local61, arg2); + GlRaster.method1178(aClass3_Sub2_Sub1_Sub1_2.pixels, arg0, arg1, arg3, arg2); + SoftwareRaster.pixels = null; + } else { + method4364(arg3 + arg0, arg1, local61, local50, arg0, local236, arg1 + arg2, local211); + method1195(arg0 + arg3, arg0, local61, local236, arg2 + arg1, arg1, local211, local50); + Static38.method959(arg0, arg1, local211, arg0 + arg3, local236, local50, local61, arg2 + arg1); + } + if (anInt1864 > 0) { + Static1.anInt2428--; + if (Static1.anInt2428 == 0) { + Static1.anInt2428 = 20; + anInt1864--; + } + } - if (Cheat.displayFps) { - @Pc(405) int local405 = arg1 + arg2 - 8; - @Pc(412) int local412 = arg0 + arg3 - 5; - Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_FPS, JagString.parseInt((int)GameShell.framesPerSecond)}), local412, local405, 16776960, -1); - @Pc(434) Runtime runtime = Runtime.getRuntime(); - @Pc(443) int memory = (int) ((runtime.totalMemory() - runtime.freeMemory()) / 1024L / 1024L); - @Pc(445) int color = 16776960; - @Pc(446) int local446 = local405 - 15; - if (memory > 95) { - color = 16711680; - } - Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_MEMORY, JagString.parseInt(memory), Cheat.DEBUG_MEMORY_UNIT}), local412, local446, color, -1); - local405 = local446 - 15; - } - } + if (Cheat.displayFps) { + @Pc(405) int local405 = arg1 + arg2 - 8; + @Pc(412) int local412 = arg0 + arg3 - 5; + Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_FPS, JagString.parseInt((int) GameShell.framesPerSecond)}), local412, local405, 16776960, -1); + @Pc(434) Runtime runtime = Runtime.getRuntime(); + @Pc(443) int memory = (int) ((runtime.totalMemory() - runtime.freeMemory()) / 1024L / 1024L); + @Pc(445) int color = 16776960; + @Pc(446) int local446 = local405 - 15; + if (memory > 95) { + color = 16711680; + } + Fonts.p12Full.renderRight(JagString.concatenate(new JagString[]{Cheat.DEBUG_MEMORY, JagString.parseInt(memory), Cheat.DEBUG_MEMORY_UNIT}), local412, local446, color, -1); + local405 = local446 - 15; + } + } - @OriginalMember(owner = "client!dl", name = "a", descriptor = "(IIIIIIIII)V") - public static void method1195(@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(7) int arg6, @OriginalArg(8) int arg7) { - @Pc(13) int local13 = arg2 - arg6; - @Pc(17) int local17 = arg3 - arg7; - @Pc(26) int local26 = (arg0 - arg1 << 16) / local13; - @Pc(35) int local35 = (arg4 - arg5 << 16) / local17; - method3991(arg1, arg3, arg2, local35, arg6, local26, arg7, arg5); - } + @OriginalMember(owner = "client!dl", name = "a", descriptor = "(IIIIIIIII)V") + public static void method1195(@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(7) int arg6, @OriginalArg(8) int arg7) { + @Pc(13) int local13 = arg2 - arg6; + @Pc(17) int local17 = arg3 - arg7; + @Pc(26) int local26 = (arg0 - arg1 << 16) / local13; + @Pc(35) int local35 = (arg4 - arg5 << 16) / local17; + method3991(arg1, arg3, arg2, local35, arg6, local26, arg7, arg5); + } - @OriginalMember(owner = "client!sm", name = "a", descriptor = "(IIIIIIIIIII)V") + @OriginalMember(owner = "client!sm", name = "a", descriptor = "(IIIIIIIIIII)V") public static void method3991(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(8) int arg5, @OriginalArg(9) int arg6, @OriginalArg(10) int arg7) { @Pc(9) int local9 = arg2 - arg4; @Pc(11) int local11 = -1; @@ -1746,50 +1749,50 @@ public class WorldMap { Static232.aClass69_97.clear(); } - @OriginalMember(owner = "client!fi", name = "a", descriptor = "(III)V") - public static void loadOverlayColors(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - for (@Pc(11) int local11 = 0; local11 < FloTypeList.capacity; local11++) { - @Pc(18) FloType local18 = FloTypeList.method4395(local11); - if (local18 != null) { - @Pc(24) int local24 = local18.texture; - if (local24 >= 0 && !Rasteriser.textureProvider.method3236(local24)) { - local24 = -1; - } - @Pc(53) int local53; - @Pc(66) int local66; - @Pc(72) int local72; - @Pc(95) int local95; - if (local18.anInt5894 >= 0) { - local66 = local18.anInt5894; - local72 = (local66 & 0x7F) + arg0; - if (local72 < 0) { - local72 = 0; - } else if (local72 > 127) { - local72 = 127; - } - local95 = (local66 & 0x380) + (arg1 + local66 & 0xFC00) + local72; - local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local95, 96)]; - } else if (local24 >= 0) { - local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(Rasteriser.textureProvider.getAverageColor(local24), 96)]; - } else if (local18.anInt5899 == -1) { - local53 = -1; - } else { - local66 = local18.anInt5899; - local72 = arg0 + (local66 & 0x7F); - if (local72 < 0) { - local72 = 0; - } else if (local72 > 127) { - local72 = 127; - } - local95 = local72 + (local66 & 0x380) + (local66 + arg1 & 0xFC00); - local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local95, 96)]; - } - overlayColors[local11 + 1] = local53; - } - } - } + @OriginalMember(owner = "client!fi", name = "a", descriptor = "(III)V") + public static void loadOverlayColors(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + for (@Pc(11) int local11 = 0; local11 < FloTypeList.capacity; local11++) { + @Pc(18) FloType local18 = FloTypeList.method4395(local11); + if (local18 != null) { + @Pc(24) int local24 = local18.texture; + if (local24 >= 0 && !Rasteriser.textureProvider.method3236(local24)) { + local24 = -1; + } + @Pc(53) int local53; + @Pc(66) int local66; + @Pc(72) int local72; + @Pc(95) int local95; + if (local18.anInt5894 >= 0) { + local66 = local18.anInt5894; + local72 = (local66 & 0x7F) + arg0; + if (local72 < 0) { + local72 = 0; + } else if (local72 > 127) { + local72 = 127; + } + local95 = (local66 & 0x380) + (arg1 + local66 & 0xFC00) + local72; + local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local95, 96)]; + } else if (local24 >= 0) { + local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(Rasteriser.textureProvider.getAverageColor(local24), 96)]; + } else if (local18.anInt5899 == -1) { + local53 = -1; + } else { + local66 = local18.anInt5899; + local72 = arg0 + (local66 & 0x7F); + if (local72 < 0) { + local72 = 0; + } else if (local72 > 127) { + local72 = 127; + } + local95 = local72 + (local66 & 0x380) + (local66 + arg1 & 0xFC00); + local53 = Rasteriser.palette[ColorUtils.multiplyLightnessGrayscale(local95, 96)]; + } + overlayColors[local11 + 1] = local53; + } + } + } - @OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;)I") + @OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;)I") public static int method3218(@OriginalArg(1) JagString arg0) { if (labels == null || arg0.length() == 0) { return -1; diff --git a/client/src/main/java/rt4/WorldMapFont.java b/client/src/main/java/rt4/WorldMapFont.java index 153b457..f6e09e0 100644 --- a/client/src/main/java/rt4/WorldMapFont.java +++ b/client/src/main/java/rt4/WorldMapFont.java @@ -1,27 +1,25 @@ package rt4; -import java.awt.Color; -import java.awt.Component; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.image.PixelGrabber; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.Component; +import java.awt.Font; +import java.awt.*; +import java.awt.image.PixelGrabber; + @OriginalClass("client!fd") public final class WorldMapFont { @OriginalMember(owner = "client!fd", name = "d", descriptor = "Ljava/lang/String;") - public static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"£$%^&*()-_=+[{]};:'@#~,<.>/?\\| " + String.valueOf('Ä') + 'Ë' + 'Ï' + 'Ö' + 'Ü' + 'ä' + 'ë' + 'ï' + 'ö' + 'ü' + 'ÿ' + 'ß' + 'Á' + 'À' + 'É' + 'È' + 'Í' + 'Ì' + 'Ó' + 'Ò' + 'Ú' + 'Ù' + 'á' + 'à' + 'é' + 'è' + 'í' + 'ì' + 'ó' + 'ò' + 'ú' + 'ù' + 'Â' + 'Ê' + 'Î' + 'Ô' + 'Û' + 'â' + 'ê' + 'î' + 'ô' + 'û' + 'Æ' + 'æ'; + public static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"£$%^&*()-_=+[{]};:'@#~,<.>/?\\| " + 'Ä' + 'Ë' + 'Ï' + 'Ö' + 'Ü' + 'ä' + 'ë' + 'ï' + 'ö' + 'ü' + 'ÿ' + 'ß' + 'Á' + 'À' + 'É' + 'È' + 'Í' + 'Ì' + 'Ó' + 'Ò' + 'Ú' + 'Ù' + 'á' + 'à' + 'é' + 'è' + 'í' + 'ì' + 'ó' + 'ò' + 'ú' + 'ù' + 'Â' + 'Ê' + 'Î' + 'Ô' + 'Û' + 'â' + 'ê' + 'î' + 'ô' + 'û' + 'Æ' + 'æ'; - @OriginalMember(owner = "client!fd", name = "e", descriptor = "I") - public static final int ALPHABET_SIZE = ALPHABET.length(); + @OriginalMember(owner = "client!fd", name = "e", descriptor = "I") + public static final int ALPHABET_SIZE = ALPHABET.length(); - @OriginalMember(owner = "client!fd", name = "f", descriptor = "[I") + @OriginalMember(owner = "client!fd", name = "f", descriptor = "[I") private static final int[] CHAR_INDEXES = new int[256]; @OriginalMember(owner = "client!fd", name = "c", descriptor = "I") @@ -253,7 +251,8 @@ public final class WorldMapFont { @Pc(142) int local142; @Pc(147) int local147; @Pc(158) int local158; - label135: for (local142 = 0; local142 < local54; local142++) { + label135: + for (local142 = 0; local142 < local54; local142++) { for (local147 = 0; local147 < local3; local147++) { local158 = local111[local147 + local142 * local3]; if ((local158 & 0xFFFFFF) != 0) { @@ -262,7 +261,8 @@ public final class WorldMapFont { } } } - label123: for (local142 = 0; local142 < local3; local142++) { + label123: + for (local142 = 0; local142 < local3; local142++) { for (local147 = 0; local147 < local54; local147++) { local158 = local111[local142 + local147 * local3]; if ((local158 & 0xFFFFFF) != 0) { @@ -271,7 +271,8 @@ public final class WorldMapFont { } } } - label111: for (local142 = local54 - 1; local142 >= 0; local142--) { + label111: + for (local142 = local54 - 1; local142 >= 0; local142--) { for (local147 = 0; local147 < local3; local147++) { local158 = local111[local147 + local142 * local3]; if ((local158 & 0xFFFFFF) != 0) { @@ -280,7 +281,8 @@ public final class WorldMapFont { } } } - label99: for (local142 = local3 - 1; local142 >= 0; local142--) { + label99: + for (local142 = local3 - 1; local142 >= 0; local142--) { for (local147 = 0; local147 < local54; local147++) { local158 = local111[local142 + local147 * local3]; if ((local158 & 0xFFFFFF) != 0) { diff --git a/client/src/main/java/rt4/client.java b/client/src/main/java/rt4/client.java index 52355c6..23e8252 100644 --- a/client/src/main/java/rt4/client.java +++ b/client/src/main/java/rt4/client.java @@ -1,8 +1,11 @@ package rt4; -import java.awt.Container; -import java.awt.Graphics; -import java.awt.Insets; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + +import java.awt.*; import java.io.IOException; import java.net.Socket; import java.nio.charset.StandardCharsets; @@ -10,22 +13,17 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Random; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - @OriginalClass("client!client") public final class client extends GameShell { @OriginalMember(owner = "client!dk", name = "j", descriptor = "[Lclient!en;") public static final BufferedFile[] cacheIndexes = new BufferedFile[28]; - @OriginalMember(owner = "client!wa", name = "Eb", descriptor = "[Lclient!bg;") - public static final Js5CachedResourceProvider[] js5Providers = new Js5CachedResourceProvider[28]; - @OriginalMember(owner = "client!d", name = "S", descriptor = "Ljava/util/Random;") - public static final Random aRandom1 = new Random(); + @OriginalMember(owner = "client!wa", name = "Eb", descriptor = "[Lclient!bg;") + public static final Js5CachedResourceProvider[] js5Providers = new Js5CachedResourceProvider[28]; + @OriginalMember(owner = "client!d", name = "S", descriptor = "Ljava/util/Random;") + public static final Random aRandom1 = new Random(); @OriginalMember(owner = "client!nh", name = "fb", descriptor = "[I") - public static final int[] JS5_ARCHIVE_WEIGHTS = new int[] { 4, 4, 1, 2, 6, 4, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + public static final int[] JS5_ARCHIVE_WEIGHTS = new int[]{4, 4, 1, 2, 6, 4, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; @OriginalMember(owner = "client!si", name = "gb", descriptor = "Lclient!na;") public static final JagString aClass100_974 = JagString.parse("
(X"); @OriginalMember(owner = "client!sg", name = "e", descriptor = "Lclient!na;") @@ -39,7 +37,7 @@ public final class client extends GameShell { @OriginalMember(owner = "client!jm", name = "z", descriptor = "Lclient!na;") public static JagString mainLoadSecondaryText = aClass100_603; @OriginalMember(owner = "client!sg", name = "k", descriptor = "Lclient!ve;") - public static Js5 js5Archive23; + public static Js5 js5Archive23; @OriginalMember(owner = "client!pb", name = "Q", descriptor = "I") public static int worldListId = 1; @OriginalMember(owner = "client!gj", name = "b", descriptor = "I") @@ -86,18 +84,18 @@ public final class client extends GameShell { public static int gameState = 0; @OriginalMember(owner = "client!id", name = "f", descriptor = "Z") public static boolean clean = false; - @OriginalMember(owner = "client!bl", name = "P", descriptor = "I") - public static int js5ConnectDelay = 0; + @OriginalMember(owner = "client!bl", name = "P", descriptor = "I") + public static int js5ConnectDelay = 0; @OriginalMember(owner = "client!wc", name = "c", descriptor = "I") public static int defaultPort; @OriginalMember(owner = "client!ee", name = "g", descriptor = "I") public static int alternatePort; @OriginalMember(owner = "client!ra", name = "s", descriptor = "I") public static int port; - @OriginalMember(owner = "client!ud", name = "K", descriptor = "I") - public static int worldListDefaultPort; - @OriginalMember(owner = "client!r", name = "f", descriptor = "I") - public static int worldListPort; + @OriginalMember(owner = "client!ud", name = "K", descriptor = "I") + public static int worldListDefaultPort; + @OriginalMember(owner = "client!r", name = "f", descriptor = "I") + public static int worldListPort; @OriginalMember(owner = "client!v", name = "f", descriptor = "Lclient!al;") public static Js5MasterIndex js5MasterIndex; @OriginalMember(owner = "client!re", name = "B", descriptor = "Lclient!ve;") @@ -194,14 +192,14 @@ public final class client extends GameShell { public static long firstGc = 0L; @OriginalMember(owner = "client!mj", name = "A", descriptor = "J") public static long prevGc = 0L; - @OriginalMember(owner = "client!gj", name = "d", descriptor = "I") + @OriginalMember(owner = "client!gj", name = "d", descriptor = "I") public static int loop = 0; - @OriginalMember(owner = "client!wj", name = "e", descriptor = "Lclient!na;") - public static JagString mainLoadPrimaryText = null; - @OriginalMember(owner = "client!sj", name = "p", descriptor = "I") - public static int anInt5150 = 1; + @OriginalMember(owner = "client!wj", name = "e", descriptor = "Lclient!na;") + public static JagString mainLoadPrimaryText = null; + @OriginalMember(owner = "client!sj", name = "p", descriptor = "I") + public static int anInt5150 = 1; - @OriginalMember(owner = "client!client", name = "main", descriptor = "([Ljava/lang/String;)V") + @OriginalMember(owner = "client!client", name = "main", descriptor = "([Ljava/lang/String;)V") public static void main(@OriginalArg(0) String[] arg0) { try { GlobalJsonConfig.load(GlobalConfig.EXTENDED_CONFIG_PATH); @@ -301,58 +299,58 @@ public final class client extends GameShell { FontMetricsList.fontMetrics.clean(5); } - @OriginalMember(owner = "client!pl", name = "a", descriptor = "(II)V") - public static void setGameState(@OriginalArg(0) int arg0) { - if (gameState == arg0) { - return; - } - if (gameState == 0) { - LoadingBarAwt.clear(); - } - if (arg0 == 40) { - LoginManager.clear(); - } - @Pc(37) boolean local37 = arg0 == 5 || arg0 == 10 || arg0 == 28; - if (arg0 != 40 && Protocol.aClass95_4 != null) { - Protocol.aClass95_4.close(); - Protocol.aClass95_4 = null; - } - if (arg0 == 25 || arg0 == 28) { - ClientProt.anInt5804 = 0; - anInt5150 = 1; - Static233.loadingScreenState = 0; - Static38.anInt1196 = 1; - ClientProt.mapFilesMissingCount = 0; - WorldMap.clear(true); - } - if (arg0 == 25 || arg0 == 10) { - Static123.topBannerRefresh(); - } - if (arg0 == 5) { - TitleScreen.load(js5Archive8); - } else { - TitleScreen.clear(); - } - @Pc(106) boolean local106 = gameState == 5 || gameState == 10 || gameState == 28; - if (local106 != local37) { - if (local37) { - MusicPlayer.groupId = MusicPlayer.titleSong; - if (Preferences.musicVolume == 0) { - MidiPlayer.playFadeOut(); - } else { - MidiPlayer.playFadeOut(MusicPlayer.titleSong, js5Archive6, 255); - } - js5NetQueue.writeLoggedIn(false); - } else { - MidiPlayer.playFadeOut(); - js5NetQueue.writeLoggedIn(true); - } - } - if (GlRenderer.enabled && (arg0 == 25 || arg0 == 28 || arg0 == 40)) { - GlRenderer.draw(); - } - gameState = arg0; - } + @OriginalMember(owner = "client!pl", name = "a", descriptor = "(II)V") + public static void setGameState(@OriginalArg(0) int arg0) { + if (gameState == arg0) { + return; + } + if (gameState == 0) { + LoadingBarAwt.clear(); + } + if (arg0 == 40) { + LoginManager.clear(); + } + @Pc(37) boolean local37 = arg0 == 5 || arg0 == 10 || arg0 == 28; + if (arg0 != 40 && Protocol.aClass95_4 != null) { + Protocol.aClass95_4.close(); + Protocol.aClass95_4 = null; + } + if (arg0 == 25 || arg0 == 28) { + ClientProt.anInt5804 = 0; + anInt5150 = 1; + Static233.loadingScreenState = 0; + Static38.anInt1196 = 1; + ClientProt.mapFilesMissingCount = 0; + WorldMap.clear(true); + } + if (arg0 == 25 || arg0 == 10) { + Static123.topBannerRefresh(); + } + if (arg0 == 5) { + TitleScreen.load(js5Archive8); + } else { + TitleScreen.clear(); + } + @Pc(106) boolean local106 = gameState == 5 || gameState == 10 || gameState == 28; + if (local106 != local37) { + if (local37) { + MusicPlayer.groupId = MusicPlayer.titleSong; + if (Preferences.musicVolume == 0) { + MidiPlayer.playFadeOut(); + } else { + MidiPlayer.playFadeOut(MusicPlayer.titleSong, js5Archive6, 255); + } + js5NetQueue.writeLoggedIn(false); + } else { + MidiPlayer.playFadeOut(); + js5NetQueue.writeLoggedIn(true); + } + } + if (GlRenderer.enabled && (arg0 == 25 || arg0 == 28 || arg0 == 40)) { + GlRenderer.draw(); + } + gameState = arg0; + } @OriginalMember(owner = "client!al", name = "a", descriptor = "(ZZZIZ)Lclient!ve;") public static Js5 createJs5(@OriginalArg(0) boolean discardPacked, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean discardUnpacked, @OriginalArg(3) int archive) { @@ -468,176 +466,176 @@ public final class client extends GameShell { arg0.pdata(local15, 24); } - @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Z)V") - public static void method2721() { - SceneGraph.clear(); - MiniMap.sprite = null; - LightingManager.anInt2875 = -1; - method3768(); - DeadClass.cache.clear(); - LocType.aClass139_1 = new Loc_Class139(); - ((Js5GlTextureProvider) Rasteriser.textureProvider).clear(); - LightingManager.lightCount = 0; - LightingManager.lights = new Light[255]; - GlModel.method4120(); - ShadowManager.method4203(); - Sprites.clear(); - WorldMap.clear(false); - TitleScreen.clear(); - for (@Pc(39) int local39 = 0; local39 < 2048; local39++) { - @Pc(46) Player player = PlayerList.players[local39]; - if (player != null) { - player.attachment = null; - } - } - if (GlRenderer.enabled) { - ShadowManager.method4201(); - ParticleSystem.load(); - } - Fonts.load(js5Archive13, js5Archive8); - Sprites.load(js5Archive8); - Static112.aClass3_Sub2_Sub1_10 = null; - Static112.aClass3_Sub2_Sub1_1 = null; - Static112.aClass3_Sub2_Sub1_6 = null; - Static165.aClass3_Sub2_Sub1_8 = null; - Static112.aClass3_Sub2_Sub1_9 = null; - if (gameState == 5) { - TitleScreen.load(js5Archive8); - } - if (gameState == 10) { - InterfaceList.method1596(false); - } - if (gameState == 30) { - setGameState(25); - } - } + @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Z)V") + public static void method2721() { + SceneGraph.clear(); + MiniMap.sprite = null; + LightingManager.anInt2875 = -1; + method3768(); + DeadClass.cache.clear(); + LocType.aClass139_1 = new Loc_Class139(); + ((Js5GlTextureProvider) Rasteriser.textureProvider).clear(); + LightingManager.lightCount = 0; + LightingManager.lights = new Light[255]; + GlModel.method4120(); + ShadowManager.method4203(); + Sprites.clear(); + WorldMap.clear(false); + TitleScreen.clear(); + for (@Pc(39) int local39 = 0; local39 < 2048; local39++) { + @Pc(46) Player player = PlayerList.players[local39]; + if (player != null) { + player.attachment = null; + } + } + if (GlRenderer.enabled) { + ShadowManager.method4201(); + ParticleSystem.load(); + } + Fonts.load(js5Archive13, js5Archive8); + Sprites.load(js5Archive8); + Static112.aClass3_Sub2_Sub1_10 = null; + Static112.aClass3_Sub2_Sub1_1 = null; + Static112.aClass3_Sub2_Sub1_6 = null; + Static165.aClass3_Sub2_Sub1_8 = null; + Static112.aClass3_Sub2_Sub1_9 = null; + if (gameState == 5) { + TitleScreen.load(js5Archive8); + } + if (gameState == 10) { + InterfaceList.method1596(false); + } + if (gameState == 30) { + setGameState(25); + } + } - @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Z)V") - public static void method4221() { - Protocol.anInt4762 = 0; - Protocol.prevFocus = true; - Mouse.prevClickTime = 0L; - MouseRecorder.instance.samples = 0; - focus = true; - ReflectionCheck.method4625(); - Protocol.opcode4 = -1; - Protocol.opcode3 = -1; - Protocol.opcode = -1; - Protocol.anInt5775 = 0; - Player.rebootTimer = 0; - Protocol.outboundBuffer.offset = 0; - Protocol.opcode2 = -1; - LoginManager.anInt1862 = 0; - Protocol.inboundBuffer.offset = 0; - @Pc(3506) int local3506; - for (local3506 = 0; local3506 < MiniMap.hintMapMarkers.length; local3506++) { - MiniMap.hintMapMarkers[local3506] = null; - } - MiniMenu.size = 0; - Static40.aBoolean108 = false; - Mouse.setIdleLoops(0); - for (local3506 = 0; local3506 < 100; local3506++) { - Chat.messages[local3506] = null; - } - MiniMenu.anInt5014 = 0; - Camera.anInt3291 = (int) (Math.random() * 100.0D) - 50; - LoginManager.mapFlagZ = 0; - Camera.yawTarget = (int) (Math.random() * 20.0D) - 10 & 0x7FF; - LightingManager.anInt2875 = -1; - PlayerList.size = 0; - MiniMap.state = 0; - Camera.anInt4774 = (int) (Math.random() * 110.0D) - 55; - MiniMenu.aBoolean302 = false; - MiniMap.anInt4130 = (int) (Math.random() * 30.0D) - 20; - SoundPlayer.size = 0; - LoginManager.mapFlagX = 0; - MiniMap.anInt1814 = (int) (Math.random() * 120.0D) - 60; - Chat.size = 0; - Camera.anInt5161 = (int) (Math.random() * 80.0D) - 40; - NpcList.size = 0; - for (local3506 = 0; local3506 < 2048; local3506++) { - PlayerList.players[local3506] = null; - PlayerList.appearanceCache[local3506] = null; - } - for (local3506 = 0; local3506 < 32768; local3506++) { - NpcList.npcs[local3506] = null; - } - PlayerList.self = PlayerList.players[2047] = new Player(); - Static217.aClass69_116.clear(); - LoginManager.aClass69_64.clear(); - if (SceneGraph.objStacks != null) { - for (local3506 = 0; local3506 < 4; local3506++) { - for (@Pc(3663) int local3663 = 0; local3663 < 104; local3663++) { - for (@Pc(3670) int local3670 = 0; local3670 < 104; local3670++) { - SceneGraph.objStacks[local3506][local3663][local3670] = null; - } - } - } - } - ChangeLocRequest.queue = new LinkedList(); - FriendsList.state = 0; - FriendsList.size = 0; - VarpDomain.reset(); - DelayedStateChange.clear(); - Camera.anInt5230 = 0; - Static233.anInt5217 = 0; - Camera.anInt5765 = 0; - Static231.anInt5203 = 0; - Camera.anInt4232 = 0; - Camera.anInt5375 = 0; - Camera.anInt1744 = 0; - Camera.anInt5449 = 0; - Camera.anInt4612 = 0; - Static233.anInt5225 = 0; - for (local3506 = 0; local3506 < VarcDomain.varcs.length; local3506++) { - VarcDomain.varcs[local3506] = -1; - } - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.method2275(InterfaceList.topLevelInterface); - } - for (@Pc(3755) ComponentPointer local3755 = (ComponentPointer) InterfaceList.openInterfaces.head(); local3755 != null; local3755 = (ComponentPointer) InterfaceList.openInterfaces.next()) { - InterfaceList.closeInterface(true, local3755); - } - InterfaceList.topLevelInterface = -1; - InterfaceList.openInterfaces = new HashTable(8); - InterfaceList.method1287(); - Static44.aClass13_10 = null; - Static40.aBoolean108 = false; - MiniMenu.size = 0; - PlayerAppearance.DEFAULT.method1950(new int[] { 0, 0, 0, 0, 0 }, -1, false, null, -1); - for (local3506 = 0; local3506 < 8; local3506++) { - Player.options[local3506] = null; - Player.secondaryOptions[local3506] = false; - Player.cursors[local3506] = -1; - } - Inv.method2073(); - ScriptRunner.aBoolean43 = true; - for (local3506 = 0; local3506 < 100; local3506++) { - InterfaceList.aBooleanArray100[local3506] = true; - } - ClanChat.size = 0; - ClanChat.members = null; - ClanChat.name = null; - for (local3506 = 0; local3506 < 6; local3506++) { - StockMarketManager.offers[local3506] = new StockMarketOffer(); - } - for (local3506 = 0; local3506 < 25; local3506++) { - PlayerSkillXpTable.boostedLevels[local3506] = 0; - PlayerSkillXpTable.baseLevels[local3506] = 0; - PlayerSkillXpTable.experience[local3506] = 0; - } - if (GlRenderer.enabled) { - Static103.setInstantFade(); - } - Protocol.aBoolean228 = true; - Protocol.verifyId = 0; - MiniMenu.walkText = LocalizedText.WALKHERE; - ScriptRunner.neverRemoveRoofs = false; - aShortArray88 = aShortArray19 = aShortArray74 = aShortArray87 = new short[256]; - Static40.method4637(); - Static40.aBoolean298 = false; - ClientProt.method1373(); - } + @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Z)V") + public static void method4221() { + Protocol.anInt4762 = 0; + Protocol.prevFocus = true; + Mouse.prevClickTime = 0L; + MouseRecorder.instance.samples = 0; + focus = true; + ReflectionCheck.method4625(); + Protocol.opcode4 = -1; + Protocol.opcode3 = -1; + Protocol.opcode = -1; + Protocol.anInt5775 = 0; + Player.rebootTimer = 0; + Protocol.outboundBuffer.offset = 0; + Protocol.opcode2 = -1; + LoginManager.anInt1862 = 0; + Protocol.inboundBuffer.offset = 0; + @Pc(3506) int local3506; + for (local3506 = 0; local3506 < MiniMap.hintMapMarkers.length; local3506++) { + MiniMap.hintMapMarkers[local3506] = null; + } + MiniMenu.size = 0; + Static40.aBoolean108 = false; + Mouse.setIdleLoops(0); + for (local3506 = 0; local3506 < 100; local3506++) { + Chat.messages[local3506] = null; + } + MiniMenu.anInt5014 = 0; + Camera.anInt3291 = (int) (Math.random() * 100.0D) - 50; + LoginManager.mapFlagZ = 0; + Camera.yawTarget = (int) (Math.random() * 20.0D) - 10 & 0x7FF; + LightingManager.anInt2875 = -1; + PlayerList.size = 0; + MiniMap.state = 0; + Camera.anInt4774 = (int) (Math.random() * 110.0D) - 55; + MiniMenu.aBoolean302 = false; + MiniMap.anInt4130 = (int) (Math.random() * 30.0D) - 20; + SoundPlayer.size = 0; + LoginManager.mapFlagX = 0; + MiniMap.anInt1814 = (int) (Math.random() * 120.0D) - 60; + Chat.size = 0; + Camera.anInt5161 = (int) (Math.random() * 80.0D) - 40; + NpcList.size = 0; + for (local3506 = 0; local3506 < 2048; local3506++) { + PlayerList.players[local3506] = null; + PlayerList.appearanceCache[local3506] = null; + } + for (local3506 = 0; local3506 < 32768; local3506++) { + NpcList.npcs[local3506] = null; + } + PlayerList.self = PlayerList.players[2047] = new Player(); + Static217.aClass69_116.clear(); + LoginManager.aClass69_64.clear(); + if (SceneGraph.objStacks != null) { + for (local3506 = 0; local3506 < 4; local3506++) { + for (@Pc(3663) int local3663 = 0; local3663 < 104; local3663++) { + for (@Pc(3670) int local3670 = 0; local3670 < 104; local3670++) { + SceneGraph.objStacks[local3506][local3663][local3670] = null; + } + } + } + } + ChangeLocRequest.queue = new LinkedList(); + FriendsList.state = 0; + FriendsList.size = 0; + VarpDomain.reset(); + DelayedStateChange.clear(); + Camera.anInt5230 = 0; + Static233.anInt5217 = 0; + Camera.anInt5765 = 0; + Static231.anInt5203 = 0; + Camera.anInt4232 = 0; + Camera.anInt5375 = 0; + Camera.anInt1744 = 0; + Camera.anInt5449 = 0; + Camera.anInt4612 = 0; + Static233.anInt5225 = 0; + for (local3506 = 0; local3506 < VarcDomain.varcs.length; local3506++) { + VarcDomain.varcs[local3506] = -1; + } + if (InterfaceList.topLevelInterface != -1) { + InterfaceList.method2275(InterfaceList.topLevelInterface); + } + for (@Pc(3755) ComponentPointer local3755 = (ComponentPointer) InterfaceList.openInterfaces.head(); local3755 != null; local3755 = (ComponentPointer) InterfaceList.openInterfaces.next()) { + InterfaceList.closeInterface(true, local3755); + } + InterfaceList.topLevelInterface = -1; + InterfaceList.openInterfaces = new HashTable(8); + InterfaceList.method1287(); + Static44.aClass13_10 = null; + Static40.aBoolean108 = false; + MiniMenu.size = 0; + PlayerAppearance.DEFAULT.method1950(new int[]{0, 0, 0, 0, 0}, -1, false, null, -1); + for (local3506 = 0; local3506 < 8; local3506++) { + Player.options[local3506] = null; + Player.secondaryOptions[local3506] = false; + Player.cursors[local3506] = -1; + } + Inv.method2073(); + ScriptRunner.aBoolean43 = true; + for (local3506 = 0; local3506 < 100; local3506++) { + InterfaceList.aBooleanArray100[local3506] = true; + } + ClanChat.size = 0; + ClanChat.members = null; + ClanChat.name = null; + for (local3506 = 0; local3506 < 6; local3506++) { + StockMarketManager.offers[local3506] = new StockMarketOffer(); + } + for (local3506 = 0; local3506 < 25; local3506++) { + PlayerSkillXpTable.boostedLevels[local3506] = 0; + PlayerSkillXpTable.baseLevels[local3506] = 0; + PlayerSkillXpTable.experience[local3506] = 0; + } + if (GlRenderer.enabled) { + Static103.setInstantFade(); + } + Protocol.aBoolean228 = true; + Protocol.verifyId = 0; + MiniMenu.walkText = LocalizedText.WALKHERE; + ScriptRunner.neverRemoveRoofs = false; + aShortArray88 = aShortArray19 = aShortArray74 = aShortArray87 = new short[256]; + Static40.method4637(); + Static40.aBoolean298 = false; + ClientProt.method1373(); + } @OriginalMember(owner = "client!rc", name = "d", descriptor = "(I)V") public static void method930() { @@ -654,16 +652,16 @@ public final class client extends GameShell { soundChannel.setStream(soundStream); } - @OriginalMember(owner = "client!ag", name = "j", descriptor = "(I)V") - public static void method84() { - SceneGraph.clear(); - for (@Pc(9) int local9 = 0; local9 < 4; local9++) { - PathFinder.collisionMaps[local9].clear(); - } - System.gc(); - } + @OriginalMember(owner = "client!ag", name = "j", descriptor = "(I)V") + public static void method84() { + SceneGraph.clear(); + for (@Pc(9) int local9 = 0; local9 < 4; local9++) { + PathFinder.collisionMaps[local9].clear(); + } + System.gc(); + } - @OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V") + @OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V") @Override protected final void mainRedraw() { if (gameState == 1000) { @@ -727,20 +725,20 @@ public final class client extends GameShell { anInt5150 = ClientProt.mapFilesMissingCount; } local80 = (anInt5150 - ClientProt.mapFilesMissingCount) * 50 / anInt5150; - Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80 })); + Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80})); } else if (Static233.loadingScreenState == 2) { if (Static38.anInt1196 < ClientProt.anInt5804) { Static38.anInt1196 = ClientProt.anInt5804; } local80 = (Static38.anInt1196 - ClientProt.anInt5804) * 50 / Static38.anInt1196 + 50; - Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80 })); + Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80})); } else { Static114.drawTextOnScreen(false, LocalizedText.LOADING); } } else if (gameState == 30) { Static89.method1841(); } else if (gameState == 40) { - Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.CONLOST, Static87.aClass100_556, LocalizedText.ATTEMPT_TO_REESTABLISH})); + Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.CONLOST, Static87.aClass100_556, LocalizedText.ATTEMPT_TO_REESTABLISH})); } if (GlRenderer.enabled && gameState != 0) { GlRenderer.swapBuffers(); @@ -856,11 +854,7 @@ public final class client extends GameShell { modeWhat = 0; } @Pc(50) String local50 = this.getParameter("advertsuppressed"); - if (local50 != null && local50.equals("1")) { - advertSuppressed = true; - } else { - advertSuppressed = false; - } + advertSuppressed = local50 != null && local50.equals("1"); try { language = Integer.parseInt(this.getParameter("lang")); } catch (@Pc(69) Exception local69) { @@ -868,17 +862,9 @@ public final class client extends GameShell { } LocalizedText.setLanguage(language); @Pc(78) String local78 = this.getParameter("objecttag"); - if (local78 != null && local78.equals("1")) { - javaScript = true; - } else { - javaScript = false; - } + javaScript = local78 != null && local78.equals("1"); @Pc(94) String local94 = this.getParameter("js"); - if (local94 != null && local94.equals("1")) { - objectTag = true; - } else { - objectTag = false; - } + objectTag = local94 != null && local94.equals("1"); @Pc(111) String local111 = this.getParameter("game"); if (local111 != null && local111.equals("1")) { game = 1; @@ -903,11 +889,7 @@ public final class client extends GameShell { } } @Pc(159) String local159 = this.getParameter("haveie6"); - if (local159 != null && local159.equals("1")) { - haveIe6 = true; - } else { - haveIe6 = false; - } + haveIe6 = local159 != null && local159.equals("1"); instance = this; this.startApplet(modeWhat + 32); } @@ -1237,7 +1219,8 @@ public final class client extends GameShell { @OriginalMember(owner = "client!client", name = "i", descriptor = "(I)V") private void mainLoad() { if (!Preferences.safeMode) { - noSafeMode: while (true) { + noSafeMode: + while (true) { do { if (!Keyboard.nextKey()) { break noSafeMode; @@ -1332,7 +1315,7 @@ public final class client extends GameShell { mainLoadState = 45; } else { if (percentage != 0) { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.CHECKING_FOR_UPDATES, JagString.parseInt(percentage), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.CHECKING_FOR_UPDATES, JagString.parseInt(percentage), JagString.PERCENT_SIGN}); } mainLoadPercentage = 20; } @@ -1359,7 +1342,7 @@ public final class client extends GameShell { mainLoadPercentage = 35; mainLoadState = 60; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD50, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD50, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); mainLoadPercentage = 35; } } else if (mainLoadState == 60) { @@ -1370,7 +1353,7 @@ public final class client extends GameShell { mainLoadState = 65; mainLoadPercentage = 40; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD60, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD60, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); mainLoadPercentage = 40; } } else if (mainLoadState == 65) { @@ -1429,14 +1412,14 @@ public final class client extends GameShell { Equipment.init(); mainLoadState = 80; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD70, JagString.parseInt(percentage / 11), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD70, JagString.parseInt(percentage / 11), JagString.PERCENT_SIGN}); mainLoadPercentage = 50; } } else if (mainLoadState == 80) { percentage = Sprites.getReady(js5Archive8); i = Sprites.total(); if (i > percentage) { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD80, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD80, JagString.parseInt(percentage * 100 / i), JagString.PERCENT_SIGN}); mainLoadPercentage = 60; } else { Sprites.load(js5Archive8); @@ -1464,7 +1447,7 @@ public final class client extends GameShell { mainLoadState = 100; mainLoadPercentage = 70; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD90, JagString.parseInt(js5Archive26.getPercentageComplete()), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD90, JagString.parseInt(js5Archive26.getPercentageComplete()), JagString.PERCENT_SIGN}); mainLoadPercentage = 70; } } else if (mainLoadState == 100) { @@ -1485,18 +1468,18 @@ public final class client extends GameShell { mainLoadState = 130; mainLoadPercentage = 80; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD120, aClass100_899 }); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD120, aClass100_899}); mainLoadPercentage = 80; } } else if (mainLoadState == 130) { if (!js5Archive3.fetchAll()) { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive3.getPercentageComplete() * 3 / 4), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive3.getPercentageComplete() * 3 / 4), JagString.PERCENT_SIGN}); mainLoadPercentage = 85; } else if (!js5Archive12.fetchAll()) { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive12.getPercentageComplete() / 10 + 75), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive12.getPercentageComplete() / 10 + 75), JagString.PERCENT_SIGN}); mainLoadPercentage = 85; } else if (!js5Archive13.fetchAll()) { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive13.getPercentageComplete() / 20 + 85), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive13.getPercentageComplete() / 20 + 85), JagString.PERCENT_SIGN}); mainLoadPercentage = 85; } else if (js5Archive23.isGroupReady(Static165.DETAILS)) { MapList.init(Sprites.mapfunctions, js5Archive23); @@ -1504,7 +1487,7 @@ public final class client extends GameShell { mainLoadSecondaryText = LocalizedText.MAINLOAD130B; mainLoadState = 135; } else { - mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive23.getPercentageComplete(Static165.DETAILS) / 10 + 90), JagString.PERCENT_SIGN}); + mainLoadSecondaryText = JagString.concatenate(new JagString[]{LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive23.getPercentageComplete(Static165.DETAILS) / 10 + 90), JagString.PERCENT_SIGN}); mainLoadPercentage = 85; } } else if (mainLoadState == 135) { diff --git a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalArg.java b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalArg.java index 3dac78e..646c166 100644 --- a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalArg.java +++ b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalArg.java @@ -3,7 +3,7 @@ package org.openrs2.deob.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ ElementType.PARAMETER }) +@Target({ElementType.PARAMETER}) public @interface OriginalArg { int value(); } diff --git a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalClass.java b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalClass.java index 0b85e3c..0f00ebf 100644 --- a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalClass.java +++ b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalClass.java @@ -3,7 +3,7 @@ package org.openrs2.deob.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) public @interface OriginalClass { String value(); } diff --git a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalMember.java b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalMember.java index db3d0dd..e25058b 100644 --- a/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalMember.java +++ b/deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalMember.java @@ -3,9 +3,11 @@ package org.openrs2.deob.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD }) +@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD}) public @interface OriginalMember { String owner(); + String name(); + String descriptor(); } diff --git a/deob-annotations/src/main/java/org/openrs2/deob/annotation/Pc.java b/deob-annotations/src/main/java/org/openrs2/deob/annotation/Pc.java index c05f99f..26aa0bd 100644 --- a/deob-annotations/src/main/java/org/openrs2/deob/annotation/Pc.java +++ b/deob-annotations/src/main/java/org/openrs2/deob/annotation/Pc.java @@ -3,7 +3,7 @@ package org.openrs2.deob.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ ElementType.LOCAL_VARIABLE, ElementType.PARAMETER }) +@Target({ElementType.LOCAL_VARIABLE, ElementType.PARAMETER}) public @interface Pc { int value(); } diff --git a/playground/src/main/java/com/itspazaz/rt4/Playground.java b/playground/src/main/java/com/itspazaz/rt4/Playground.java index 1358fd2..0586c95 100644 --- a/playground/src/main/java/com/itspazaz/rt4/Playground.java +++ b/playground/src/main/java/com/itspazaz/rt4/Playground.java @@ -3,8 +3,8 @@ package com.itspazaz.rt4; import com.jogamp.opengl.GL2; import com.jogamp.opengl.GLContext; import com.jogamp.opengl.util.GLBuffers; -import rt4.*; import rt4.DisplayMode; +import rt4.*; import javax.imageio.ImageIO; import java.awt.*; @@ -20,313 +20,314 @@ import java.nio.file.Paths; import java.nio.file.StandardOpenOption; public class Playground extends GameShell { - public static Playground instance; + public static Playground instance; - public static BufferedFile cacheMasterIndex; - public static BufferedFile cacheData; - public static BufferedFile uid; - public static BufferedFile[] cacheIndexes = new BufferedFile[28]; + public static BufferedFile cacheMasterIndex; + public static BufferedFile cacheData; + public static BufferedFile uid; + public static BufferedFile[] cacheIndexes = new BufferedFile[28]; - public static Cache[] cacheArchives = new Cache[28]; - public static Cache masterCache; + public static Cache[] cacheArchives = new Cache[28]; + public static Cache masterCache; - public static Js5MasterIndex js5MasterIndex; - public static Js5CachedResourceProvider[] js5Providers = new Js5CachedResourceProvider[28]; - public static Js5[] archives = new Js5[28]; - public static Js5NetQueue js5NetQueue; - public static Js5CacheQueue js5CacheQueue; - private static PrivilegedRequest js5SocketRequest; - private static BufferedSocket js5Socket; - private static long js5ConnectTime; + public static Js5MasterIndex js5MasterIndex; + public static Js5CachedResourceProvider[] js5Providers = new Js5CachedResourceProvider[28]; + public static Js5[] archives = new Js5[28]; + public static Js5NetQueue js5NetQueue; + public static Js5CacheQueue js5CacheQueue; + private static PrivilegedRequest js5SocketRequest; + private static BufferedSocket js5Socket; + private static long js5ConnectTime; - public static void main(String[] args) { - instance = new Playground(); - instance.startApplication(32, "runescape"); - GameShell.frame.setLocation(40, 40); - } + public static void main(String[] args) { + instance = new Playground(); + instance.startApplication(32, "runescape"); + GameShell.frame.setLocation(40, 40); + } - @Override - public void init() { - instance = this; - this.startApplet(32); - } + @Override + public void init() { + instance = this; + this.startApplet(32); + } - @Override - protected void mainInit() { - Keyboard.init(); - Keyboard.start(GameShell.canvas); - Mouse.start(GameShell.canvas); - SoftwareRaster.frameBuffer.makeTarget(); + @Override + protected void mainInit() { + Keyboard.init(); + Keyboard.start(GameShell.canvas); + Mouse.start(GameShell.canvas); + SoftwareRaster.frameBuffer.makeTarget(); - try { - if (GameShell.signLink.cacheData != null) { - cacheData = new BufferedFile(GameShell.signLink.cacheData, 5200, 0); - for (int i = 0; i < 28; i++) { - cacheIndexes[i] = new BufferedFile(GameShell.signLink.cacheIndexes[i], 6000, 0); - cacheArchives[i] = new Cache(i, cacheData, cacheIndexes[i], 1000000); - } - cacheMasterIndex = new BufferedFile(GameShell.signLink.cacheMasterIndex, 6000, 0); - masterCache = new Cache(255, cacheData, cacheMasterIndex, 500000); - uid = new BufferedFile(GameShell.signLink.uid, 24, 0); - GameShell.signLink.cacheIndexes = null; - GameShell.signLink.cacheMasterIndex = null; - GameShell.signLink.uid = null; - GameShell.signLink.cacheData = null; - } - } catch (Exception ex) { - ex.printStackTrace(); - System.exit(1); - } + try { + if (GameShell.signLink.cacheData != null) { + cacheData = new BufferedFile(GameShell.signLink.cacheData, 5200, 0); + for (int i = 0; i < 28; i++) { + cacheIndexes[i] = new BufferedFile(GameShell.signLink.cacheIndexes[i], 6000, 0); + cacheArchives[i] = new Cache(i, cacheData, cacheIndexes[i], 1000000); + } + cacheMasterIndex = new BufferedFile(GameShell.signLink.cacheMasterIndex, 6000, 0); + masterCache = new Cache(255, cacheData, cacheMasterIndex, 500000); + uid = new BufferedFile(GameShell.signLink.uid, 24, 0); + GameShell.signLink.cacheIndexes = null; + GameShell.signLink.cacheMasterIndex = null; + GameShell.signLink.uid = null; + GameShell.signLink.cacheData = null; + } + } catch (Exception ex) { + ex.printStackTrace(); + System.exit(1); + } - js5NetQueue = new Js5NetQueue(); - js5CacheQueue = new Js5CacheQueue(); + js5NetQueue = new Js5NetQueue(); + js5CacheQueue = new Js5CacheQueue(); - Preferences.characterShadowsOn = false; - Preferences.highDetailLighting = false; - } + Preferences.characterShadowsOn = false; + Preferences.highDetailLighting = false; + } - public int percentage = 0; - public int state = 0; + public int percentage = 0; + public int state = 0; - public NpcType npcType; - public Npc npc; + public NpcType npcType; + public Npc npc; - public void stateLoop() { - if (state == 0) { - LoadingBarAwt.render(null, true, JagString.parse("Connecting to update server"), 1); + public void stateLoop() { + if (state == 0) { + LoadingBarAwt.render(null, true, JagString.parse("Connecting to update server"), 1); - if (js5MasterIndex == null) { - js5MasterIndex = new Js5MasterIndex(js5NetQueue, js5CacheQueue); - } + if (js5MasterIndex == null) { + js5MasterIndex = new Js5MasterIndex(js5NetQueue, js5CacheQueue); + } - if (js5MasterIndex.isReady()) { - for (int i = 0; i < 28; i++) { - js5Providers[i] = js5MasterIndex.getResourceProvider(i, masterCache, cacheArchives[i]); - archives[i] = new Js5(js5Providers[i], false, false); - } - state++; - } - } else if (state == 1) { - LoadingBarAwt.render(null, true, JagString.parse("Initializing sprites"), 1); - percentage = 0; - for (int i = 0; i < 28; i++) { - percentage += js5Providers[i].getIndexPercentageComplete() * client.JS5_ARCHIVE_WEIGHTS[i] / 100; - } - if (percentage == 100) { - Sprites.init(archives[8]); - TitleScreen.init(archives[8]); - Flames.init(archives[8]); - state++; - } - } else if (state == 2) { - LoadingBarAwt.render(null, true, JagString.parse("Preparing fonts"), 1); - int ready = Fonts.getReady(archives[8], archives[13]); - int total = Fonts.getTotal(); - if (ready >= total) { - state++; - } - } else if (state == 3) { - LoadingBarAwt.render(null, true, JagString.parse("Preparing title screen"), 1); - int ready = TitleScreen.getReady(archives[8]); - int total = TitleScreen.getTotal(); - if (ready >= total) { - state++; - } - } else if (state == 4) { - LoadingBarAwt.render(null, true, JagString.parse("Loading fonts"), 1); - Fonts.load(archives[13], archives[8]); - state++; - } else if (state == 5) { - LoadingBarAwt.render(null, true, JagString.parse("Loading configs"), 1); + if (js5MasterIndex.isReady()) { + for (int i = 0; i < 28; i++) { + js5Providers[i] = js5MasterIndex.getResourceProvider(i, masterCache, cacheArchives[i]); + archives[i] = new Js5(js5Providers[i], false, false); + } + state++; + } + } else if (state == 1) { + LoadingBarAwt.render(null, true, JagString.parse("Initializing sprites"), 1); + percentage = 0; + for (int i = 0; i < 28; i++) { + percentage += js5Providers[i].getIndexPercentageComplete() * client.JS5_ARCHIVE_WEIGHTS[i] / 100; + } + if (percentage == 100) { + Sprites.init(archives[8]); + TitleScreen.init(archives[8]); + Flames.init(archives[8]); + state++; + } + } else if (state == 2) { + LoadingBarAwt.render(null, true, JagString.parse("Preparing fonts"), 1); + int ready = Fonts.getReady(archives[8], archives[13]); + int total = Fonts.getTotal(); + if (ready >= total) { + state++; + } + } else if (state == 3) { + LoadingBarAwt.render(null, true, JagString.parse("Preparing title screen"), 1); + int ready = TitleScreen.getReady(archives[8]); + int total = TitleScreen.getTotal(); + if (ready >= total) { + state++; + } + } else if (state == 4) { + LoadingBarAwt.render(null, true, JagString.parse("Loading fonts"), 1); + Fonts.load(archives[13], archives[8]); + state++; + } else if (state == 5) { + LoadingBarAwt.render(null, true, JagString.parse("Loading configs"), 1); // percentage = 0; // for (int i = 0; i < 28; ++i) { // archives[i].fetchAll(); // percentage += archives[i].getPercentageComplete(); // } // if (percentage > 2700) { - ParamTypeList.init(archives[2]); - FloTypeList.init(archives[2]); - FluTypeList.init(archives[2]); - IdkTypeList.init(archives[7], archives[2]); - LocTypeList.init(archives[16], archives[7]); - NpcTypeList.init(archives[7], archives[18]); - ObjTypeList.init(archives[19], Fonts.p11FullSoftware, archives[7]); - StructTypeList.init(archives[2]); - SeqTypeList.init(archives[1], archives[20], archives[0]); - BasTypeList.init(archives[2]); - SpotAnimTypeList.init(archives[7], archives[21]); - VarbitTypeList.init(archives[22]); - VarpTypeList.init(archives[2]); - InterfaceList.init(archives[13], archives[8], archives[3], archives[7]); - InvTypeList.init(archives[2]); - EnumTypeList.init(archives[17]); - QuickChatPhraseTypeList.init(archives[25], archives[24], new Js5QuickChatCommandDecoder()); - QuickChatCatTypeList.init(archives[25], archives[24]); - LightTypeList.init(archives[2]); - CursorTypeList.init(archives[2], archives[8]); - MsiTypeList.init(archives[2], archives[8]); - Equipment.init(); - state++; + ParamTypeList.init(archives[2]); + FloTypeList.init(archives[2]); + FluTypeList.init(archives[2]); + IdkTypeList.init(archives[7], archives[2]); + LocTypeList.init(archives[16], archives[7]); + NpcTypeList.init(archives[7], archives[18]); + ObjTypeList.init(archives[19], Fonts.p11FullSoftware, archives[7]); + StructTypeList.init(archives[2]); + SeqTypeList.init(archives[1], archives[20], archives[0]); + BasTypeList.init(archives[2]); + SpotAnimTypeList.init(archives[7], archives[21]); + VarbitTypeList.init(archives[22]); + VarpTypeList.init(archives[2]); + InterfaceList.init(archives[13], archives[8], archives[3], archives[7]); + InvTypeList.init(archives[2]); + EnumTypeList.init(archives[17]); + QuickChatPhraseTypeList.init(archives[25], archives[24], new Js5QuickChatCommandDecoder()); + QuickChatCatTypeList.init(archives[25], archives[24]); + LightTypeList.init(archives[2]); + CursorTypeList.init(archives[2], archives[8]); + MsiTypeList.init(archives[2], archives[8]); + Equipment.init(); + state++; // } - } else if (state == 6) { - LoadingBarAwt.render(null, true, JagString.parse("Loading sprites"), 1); - int ready = Sprites.getReady(archives[8]); - int total = Sprites.total(); - if (ready >= total) { - Sprites.load(archives[8]); - state++; - } - } else if (state == 7) { - if (useGl) { - initGl(); - } - state++; - } else if (state == 8) { - Js5GlTextureProvider textureProvider = new Js5GlTextureProvider(archives[9], archives[26], archives[8], 20, false); - Rasteriser.unpackTextures(textureProvider); - Rasteriser.setBrightness(0.8F); - Rasteriser.setBounds(GameShell.canvasWidth, GameShell.canvasHeight); - Rasteriser.prepare(); - Rasteriser.prepareOffsets(); - loadItem(995, 10000); - try { - //loadNpc(exportCounter); - } catch (Exception ex) { - npc = null; - npcType = null; - } - state++; - } - } + } else if (state == 6) { + LoadingBarAwt.render(null, true, JagString.parse("Loading sprites"), 1); + int ready = Sprites.getReady(archives[8]); + int total = Sprites.total(); + if (ready >= total) { + Sprites.load(archives[8]); + state++; + } + } else if (state == 7) { + if (useGl) { + initGl(); + } + state++; + } else if (state == 8) { + Js5GlTextureProvider textureProvider = new Js5GlTextureProvider(archives[9], archives[26], archives[8], 20, false); + Rasteriser.unpackTextures(textureProvider); + Rasteriser.setBrightness(0.8F); + Rasteriser.setBounds(GameShell.canvasWidth, GameShell.canvasHeight); + Rasteriser.prepare(); + Rasteriser.prepareOffsets(); + loadItem(995, 10000); + try { + //loadNpc(exportCounter); + } catch (Exception ex) { + npc = null; + npcType = null; + } + state++; + } + } - Sprite sprite; + Sprite sprite; - public void loadItem(int id, int count) { - sprite = Inv.getObjectSprite(0, id, false, count, 0); + public void loadItem(int id, int count) { + sprite = Inv.getObjectSprite(0, id, false, count, 0); - try { - Files.write( - Paths.get("items.csv"), - "id,name,cost\n".getBytes(), - StandardOpenOption.CREATE_NEW); - } catch (Exception ex) { - ex.printStackTrace(); - }; - for (int i = 0; i < 14657; ++i) { - try { - ObjType obj = ObjTypeList.get(i); - if (obj == null) { - break; - } - Files.write( - Paths.get("items.csv"), - (i + "," + obj.name + "," + obj.cost + "\n").getBytes(), - StandardOpenOption.APPEND); - } catch (Exception ex) { - break; - } - } - } + try { + Files.write( + Paths.get("items.csv"), + "id,name,cost\n".getBytes(), + StandardOpenOption.CREATE_NEW); + } catch (Exception ex) { + ex.printStackTrace(); + } + ; + for (int i = 0; i < 14657; ++i) { + try { + ObjType obj = ObjTypeList.get(i); + if (obj == null) { + break; + } + Files.write( + Paths.get("items.csv"), + (i + "," + obj.name + "," + obj.cost + "\n").getBytes(), + StandardOpenOption.APPEND); + } catch (Exception ex) { + break; + } + } + } - public void loadNpc(int id) { - npcType = NpcTypeList.get(id); - npc = new Npc(); - BasType basType = BasTypeList.get(npcType.basId); - npc.seqId = basType.idleAnimationId; - npc.setNpcType(npcType); - GameShell.frame.setTitle(npcType.name + " - " + id); - } + public void loadNpc(int id) { + npcType = NpcTypeList.get(id); + npc = new Npc(); + BasType basType = BasTypeList.get(npcType.basId); + npc.seqId = basType.idleAnimationId; + npc.setNpcType(npcType); + GameShell.frame.setTitle(npcType.name + " - " + id); + } - float yaw = 0.4f; - float pitch = -0.4f; - int zoom2d = 471; - int zoom3d = 471; + float yaw = 0.4f; + float pitch = -0.4f; + int zoom2d = 471; + int zoom3d = 471; - public void initGl() { - GlRenderer.init(GameShell.canvas, 0); - if (GlRenderer.enabled) { - GlRenderer.setCanvasSize(GameShell.canvasWidth, GameShell.canvasHeight); - GlRenderer.restoreLighting(); - float yaw1 = yaw * 360.0F / 6.2831855F; - float pitch1 = pitch * 360.0F / 6.2831855F; - GlRenderer.method4171(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2, yaw1, pitch1, zoom2d, zoom3d); - GlRenderer.setViewportBounds(0, 0, GameShell.canvasWidth, GameShell.canvasHeight); - GlRenderer.setDepthTestEnabled(true); - GlRenderer.enableDepthMask(); - GlRenderer.setFogEnabled(true); - DisplayMode.setWindowMode(false, 2, GameShell.canvasWidth, GameShell.canvasHeight); - orientation = 292; - x = 100; - z = 218; - y = 236; - if (GameShell.canvasWidth >= 2500) { - x = 56; - z = 176; - y = 120; - orientation = 128; - } - } - } + public void initGl() { + GlRenderer.init(GameShell.canvas, 0); + if (GlRenderer.enabled) { + GlRenderer.setCanvasSize(GameShell.canvasWidth, GameShell.canvasHeight); + GlRenderer.restoreLighting(); + float yaw1 = yaw * 360.0F / 6.2831855F; + float pitch1 = pitch * 360.0F / 6.2831855F; + GlRenderer.method4171(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2, yaw1, pitch1, zoom2d, zoom3d); + GlRenderer.setViewportBounds(0, 0, GameShell.canvasWidth, GameShell.canvasHeight); + GlRenderer.setDepthTestEnabled(true); + GlRenderer.enableDepthMask(); + GlRenderer.setFogEnabled(true); + DisplayMode.setWindowMode(false, 2, GameShell.canvasWidth, GameShell.canvasHeight); + orientation = 292; + x = 100; + z = 218; + y = 236; + if (GameShell.canvasWidth >= 2500) { + x = 56; + z = 176; + y = 120; + orientation = 128; + } + } + } - public static boolean useGl = false; + public static boolean useGl = false; - private void exportGlImage(String filename) { - GL2 gl = GLContext.getCurrentGL().getGL2(); - ByteBuffer buffer = GLBuffers.newDirectByteBuffer(GameShell.canvasWidth * GameShell.canvasHeight * 4); + private void exportGlImage(String filename) { + GL2 gl = GLContext.getCurrentGL().getGL2(); + ByteBuffer buffer = GLBuffers.newDirectByteBuffer(GameShell.canvasWidth * GameShell.canvasHeight * 4); - gl.glReadBuffer(GL2.GL_BACK); - gl.glReadPixels(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GL2.GL_BGRA, GL2.GL_UNSIGNED_BYTE, buffer); + gl.glReadBuffer(GL2.GL_BACK); + gl.glReadPixels(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GL2.GL_BGRA, GL2.GL_UNSIGNED_BYTE, buffer); - int[] pixels = new int[GameShell.canvasWidth * GameShell.canvasHeight]; - for (int y = GameShell.canvasHeight - 1; y > 0; --y) { - for (int x = 0; x < GameShell.canvasWidth; ++x) { - int r = buffer.get() & 0xFF; - int g = buffer.get() & 0xFF; - int b = buffer.get() & 0xFF; - buffer.get(); - int a = 0xFF; - if (r == 0x33 && g == 0x33 && b == 0x33) { - a = 0x7F; - } - pixels[x + y * GameShell.canvasWidth] = r | (g << 8) | (b << 16) | (a << 24); - } - } - // erase first line (black) - for (int x = 0; x < GameShell.canvasWidth; ++x) { - pixels[x] = 0x7F000000; - } + int[] pixels = new int[GameShell.canvasWidth * GameShell.canvasHeight]; + for (int y = GameShell.canvasHeight - 1; y > 0; --y) { + for (int x = 0; x < GameShell.canvasWidth; ++x) { + int r = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int b = buffer.get() & 0xFF; + buffer.get(); + int a = 0xFF; + if (r == 0x33 && g == 0x33 && b == 0x33) { + a = 0x7F; + } + pixels[x + y * GameShell.canvasWidth] = r | (g << 8) | (b << 16) | (a << 24); + } + } + // erase first line (black) + for (int x = 0; x < GameShell.canvasWidth; ++x) { + pixels[x] = 0x7F000000; + } - exportImage(pixels, filename); - } + exportImage(pixels, filename); + } - private void exportImage(int[] pixels, String filename) { - byte[] raw = new byte[pixels.length * 4]; - int offset = 0; - for (int rgb : pixels) { - raw[offset++] = (byte) (rgb >> 16); // red - raw[offset++] = (byte) (rgb >> 8); // green - raw[offset++] = (byte) (rgb); // blue + private void exportImage(int[] pixels, String filename) { + byte[] raw = new byte[pixels.length * 4]; + int offset = 0; + for (int rgb : pixels) { + raw[offset++] = (byte) (rgb >> 16); // red + raw[offset++] = (byte) (rgb >> 8); // green + raw[offset++] = (byte) (rgb); // blue - // set transparency for background color - if (rgb >> 24 == 0x7F) { - raw[offset++] = (byte) 0; - } else { - raw[offset++] = (byte) 0xFF; - } - } + // set transparency for background color + if (rgb >> 24 == 0x7F) { + raw[offset++] = (byte) 0; + } else { + raw[offset++] = (byte) 0xFF; + } + } - try { - DataBuffer buffer = new DataBufferByte(raw, raw.length); - int samplesPerPixel = 4; - int[] bandOffsets = { 0, 1, 2, 3 }; - ColorModel colorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, Transparency.TRANSLUCENT, DataBuffer.TYPE_BYTE); - WritableRaster raster = Raster.createInterleavedRaster(buffer, GameShell.canvasWidth, GameShell.canvasHeight, samplesPerPixel * GameShell.canvasWidth, samplesPerPixel, bandOffsets, null); - BufferedImage image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null); - ImageIO.write(image, "PNG", new File(filename + ".png")); - } catch (Exception ex) { - ex.printStackTrace(); - } - } + try { + DataBuffer buffer = new DataBufferByte(raw, raw.length); + int samplesPerPixel = 4; + int[] bandOffsets = {0, 1, 2, 3}; + ColorModel colorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, Transparency.TRANSLUCENT, DataBuffer.TYPE_BYTE); + WritableRaster raster = Raster.createInterleavedRaster(buffer, GameShell.canvasWidth, GameShell.canvasHeight, samplesPerPixel * GameShell.canvasWidth, samplesPerPixel, bandOffsets, null); + BufferedImage image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null); + ImageIO.write(image, "PNG", new File(filename + ".png")); + } catch (Exception ex) { + ex.printStackTrace(); + } + } /* NPC_NORMAL.xan2d = 96; NPC_NORMAL.yan2d = 128; @@ -336,283 +337,284 @@ public class Playground extends GameShell { CHATHEAD.xan2d = 40; CHATHEAD.yan2d = 1882;*/ - int exportCounter = 8105; - int orientation = 378; - int x = 112; - int z = 180; - int y = 116; - int modifier = 2; - int chatheadOrientation = 1882; - int chatheadX = -34; - int chatheadZ = 97; - int chatheadY = 592; + int exportCounter = 8105; + int orientation = 378; + int x = 112; + int z = 180; + int y = 116; + int modifier = 2; + int chatheadOrientation = 1882; + int chatheadX = -34; + int chatheadZ = 97; + int chatheadY = 592; - boolean renderHead = false; - boolean perspectiveChanged = false; + boolean renderHead = false; + boolean perspectiveChanged = false; - long lastInputTime = 0; + long lastInputTime = 0; - public void inputLoop() { - if (Keyboard.getKey(KeyEvent.VK_W)) { - y += modifier; - } else if (Keyboard.getKey(KeyEvent.VK_S)) { - y -= modifier; - } + public void inputLoop() { + if (Keyboard.getKey(KeyEvent.VK_W)) { + y += modifier; + } else if (Keyboard.getKey(KeyEvent.VK_S)) { + y -= modifier; + } - if (Keyboard.getKey(KeyEvent.VK_Q)) { - z += modifier; - } else if (Keyboard.getKey(KeyEvent.VK_E)) { - z -= modifier; - } + if (Keyboard.getKey(KeyEvent.VK_Q)) { + z += modifier; + } else if (Keyboard.getKey(KeyEvent.VK_E)) { + z -= modifier; + } - if (Keyboard.getKey(KeyEvent.VK_SHIFT) && Keyboard.getKey(KeyEvent.VK_A)) { - orientation += modifier; - orientation &= 2047; - } else if (Keyboard.getKey(KeyEvent.VK_SHIFT) && Keyboard.getKey(KeyEvent.VK_D)) { - orientation -= modifier; - orientation &= 2047; - } else if (Keyboard.getKey(KeyEvent.VK_A)) { - x -= modifier; - } else if (Keyboard.getKey(KeyEvent.VK_D)) { - x += modifier; - } + if (Keyboard.getKey(KeyEvent.VK_SHIFT) && Keyboard.getKey(KeyEvent.VK_A)) { + orientation += modifier; + orientation &= 2047; + } else if (Keyboard.getKey(KeyEvent.VK_SHIFT) && Keyboard.getKey(KeyEvent.VK_D)) { + orientation -= modifier; + orientation &= 2047; + } else if (Keyboard.getKey(KeyEvent.VK_A)) { + x -= modifier; + } else if (Keyboard.getKey(KeyEvent.VK_D)) { + x += modifier; + } - if (Keyboard.getKey(KeyEvent.VK_UP)) { - yaw -= 0.01f; - perspectiveChanged = true; - } else if (Keyboard.getKey(KeyEvent.VK_DOWN)) { - yaw += 0.01f; - perspectiveChanged = true; - } + if (Keyboard.getKey(KeyEvent.VK_UP)) { + yaw -= 0.01f; + perspectiveChanged = true; + } else if (Keyboard.getKey(KeyEvent.VK_DOWN)) { + yaw += 0.01f; + perspectiveChanged = true; + } - if (Keyboard.getKey(KeyEvent.VK_LEFT)) { - pitch += 0.01f; - perspectiveChanged = true; - } else if (Keyboard.getKey(KeyEvent.VK_RIGHT)) { - pitch -= 0.01f; - perspectiveChanged = true; - } + if (Keyboard.getKey(KeyEvent.VK_LEFT)) { + pitch += 0.01f; + perspectiveChanged = true; + } else if (Keyboard.getKey(KeyEvent.VK_RIGHT)) { + pitch -= 0.01f; + perspectiveChanged = true; + } - if (Keyboard.getKey(KeyEvent.VK_F)) { - zoom2d -= modifier; - perspectiveChanged = true; - } else if (Keyboard.getKey(KeyEvent.VK_G)) { - zoom2d += modifier; - perspectiveChanged = true; - } + if (Keyboard.getKey(KeyEvent.VK_F)) { + zoom2d -= modifier; + perspectiveChanged = true; + } else if (Keyboard.getKey(KeyEvent.VK_G)) { + zoom2d += modifier; + perspectiveChanged = true; + } - if (Keyboard.getKey(KeyEvent.VK_OPEN_BRACKET)) { - modifier--; - } else if (Keyboard.getKey(KeyEvent.VK_CLOSE_BRACKET)) { - modifier++; - } + if (Keyboard.getKey(KeyEvent.VK_OPEN_BRACKET)) { + modifier--; + } else if (Keyboard.getKey(KeyEvent.VK_CLOSE_BRACKET)) { + modifier++; + } - // rate limited input events - long currentTime = System.currentTimeMillis(); - if (currentTime - lastInputTime < 100) { - return; - } - lastInputTime = currentTime; + // rate limited input events + long currentTime = System.currentTimeMillis(); + if (currentTime - lastInputTime < 100) { + return; + } + lastInputTime = currentTime; - if (Keyboard.getKey(KeyEvent.VK_H)) { - renderHead = !renderHead; - if (renderHead) { - x = chatheadX; - z = chatheadZ; - y = chatheadY; - orientation = chatheadOrientation; - yaw = 0.17f; - pitch = 0.09f; - perspectiveChanged = true; - zoom2d = 796; - zoom3d = 512; - } else { - x = 56; - z = 176; - y = 120; - orientation = 128; - yaw = 0.4f; - pitch = -0.4f; - perspectiveChanged = true; - zoom2d = 471; - zoom3d = 471; - } - } + if (Keyboard.getKey(KeyEvent.VK_H)) { + renderHead = !renderHead; + if (renderHead) { + x = chatheadX; + z = chatheadZ; + y = chatheadY; + orientation = chatheadOrientation; + yaw = 0.17f; + pitch = 0.09f; + perspectiveChanged = true; + zoom2d = 796; + zoom3d = 512; + } else { + x = 56; + z = 176; + y = 120; + orientation = 128; + yaw = 0.4f; + pitch = -0.4f; + perspectiveChanged = true; + zoom2d = 471; + zoom3d = 471; + } + } - if (Keyboard.getKey(KeyEvent.VK_BACK_SLASH)) { - if (GlRenderer.enabled) { - exportGlImage("dump/" + exportCounter++); - } else { - exportImage(SoftwareRaster.pixels, "dump/" + exportCounter++); - } - } + if (Keyboard.getKey(KeyEvent.VK_BACK_SLASH)) { + if (GlRenderer.enabled) { + exportGlImage("dump/" + exportCounter++); + } else { + exportImage(SoftwareRaster.pixels, "dump/" + exportCounter++); + } + } - if (Keyboard.getKey(KeyEvent.VK_1)) { - exportCounter--; - } else if (Keyboard.getKey(KeyEvent.VK_2)) { - exportCounter++; - } + if (Keyboard.getKey(KeyEvent.VK_1)) { + exportCounter--; + } else if (Keyboard.getKey(KeyEvent.VK_2)) { + exportCounter++; + } - if (Keyboard.getKey(KeyEvent.VK_P)) { - System.out.println("cam: " + orientation + ", " + x + ", " + z + ", " + y); - System.out.println("per: " + yaw + ", " + pitch); - System.out.println("zoom: " + zoom2d + ", " + zoom3d); - System.out.println(); - } - } + if (Keyboard.getKey(KeyEvent.VK_P)) { + System.out.println("cam: " + orientation + ", " + x + ", " + z + ", " + y); + System.out.println("per: " + yaw + ", " + pitch); + System.out.println("zoom: " + zoom2d + ", " + zoom3d); + System.out.println(); + } + } - int lastExportCounter = -1; + int lastExportCounter = -1; - @Override - protected void mainLoop() { - Keyboard.loop(); - Mouse.loop(); + @Override + protected void mainLoop() { + Keyboard.loop(); + Mouse.loop(); - js5NetLoop(); - stateLoop(); - inputLoop(); + js5NetLoop(); + stateLoop(); + inputLoop(); - if (state == 9) { - if (lastExportCounter != exportCounter) { - try { - //loadNpc(exportCounter); - } catch (Exception ex) { - npc = null; - npcType = null; - } - } - } - } + if (state == 9) { + if (lastExportCounter != exportCounter) { + try { + //loadNpc(exportCounter); + } catch (Exception ex) { + npc = null; + npcType = null; + } + } + } + } - public int js5ConnectState = 0; + public int js5ConnectState = 0; - public void js5NetLoop() { - boolean idle = js5NetQueue.loop(); - if (!idle) { - js5Connect(); - } - } + public void js5NetLoop() { + boolean idle = js5NetQueue.loop(); + if (!idle) { + js5Connect(); + } + } - public void js5Connect() { - try { - if (js5ConnectState == 0) { - js5SocketRequest = GameShell.signLink.openSocket(GlobalConfig.DEFAULT_HOSTNAME, GlobalConfig.DEFAULT_PORT + 1); - js5ConnectState++; - } - if (js5ConnectState == 1) { - if (js5SocketRequest.status == 2) { - setJs5Response(1000); - return; - } - if (js5SocketRequest.status == 1) { - js5ConnectState++; - } - } - if (js5ConnectState == 2) { - js5Socket = new BufferedSocket((Socket) js5SocketRequest.result, GameShell.signLink); - Buffer buffer = new Buffer(5); - buffer.p1(15); - buffer.p4(530); - js5Socket.write(buffer.data, 5); - js5ConnectState++; - js5ConnectTime = MonotonicClock.currentTimeMillis(); - } - if (js5ConnectState == 3) { - if (js5Socket.available() > 0) { - int response = js5Socket.read(); - if (response != 0) { - setJs5Response(response); - return; - } - js5ConnectState++; - } else if (MonotonicClock.currentTimeMillis() - js5ConnectTime > GlobalConfig.JS5_RESPONSE_TIMEOUT) { - setJs5Response(1001); - return; - } - } - if (js5ConnectState == 4) { - js5NetQueue.start(true, js5Socket); - js5SocketRequest = null; - js5ConnectState = 0; - js5Socket = null; - } - } catch (IOException ex) { - setJs5Response(1002); - } - } + public void js5Connect() { + try { + if (js5ConnectState == 0) { + js5SocketRequest = GameShell.signLink.openSocket(GlobalConfig.DEFAULT_HOSTNAME, GlobalConfig.DEFAULT_PORT + 1); + js5ConnectState++; + } + if (js5ConnectState == 1) { + if (js5SocketRequest.status == 2) { + setJs5Response(1000); + return; + } + if (js5SocketRequest.status == 1) { + js5ConnectState++; + } + } + if (js5ConnectState == 2) { + js5Socket = new BufferedSocket((Socket) js5SocketRequest.result, GameShell.signLink); + Buffer buffer = new Buffer(5); + buffer.p1(15); + buffer.p4(530); + js5Socket.write(buffer.data, 5); + js5ConnectState++; + js5ConnectTime = MonotonicClock.currentTimeMillis(); + } + if (js5ConnectState == 3) { + if (js5Socket.available() > 0) { + int response = js5Socket.read(); + if (response != 0) { + setJs5Response(response); + return; + } + js5ConnectState++; + } else if (MonotonicClock.currentTimeMillis() - js5ConnectTime > GlobalConfig.JS5_RESPONSE_TIMEOUT) { + setJs5Response(1001); + return; + } + } + if (js5ConnectState == 4) { + js5NetQueue.start(true, js5Socket); + js5SocketRequest = null; + js5ConnectState = 0; + js5Socket = null; + } + } catch (IOException ex) { + setJs5Response(1002); + } + } - private void setJs5Response(int response) { - js5NetQueue.response = response; - js5Socket = null; - js5NetQueue.errors++; - js5ConnectState = 0; - js5SocketRequest = null; - } + private void setJs5Response(int response) { + js5NetQueue.response = response; + js5Socket = null; + js5NetQueue.errors++; + js5ConnectState = 0; + js5SocketRequest = null; + } - @Override - protected void mainRedraw() { - try { - if (state == 9) { - if (!GlRenderer.enabled) { - SoftwareRaster.clear(0x7F666666); - } else { - GlRenderer.clearColorAndDepthBuffers(0x333333); - } + @Override + protected void mainRedraw() { + try { + if (state == 9) { + if (!GlRenderer.enabled) { + SoftwareRaster.clear(0x7F666666); + } else { + GlRenderer.clearColorAndDepthBuffers(0x333333); + } - if (perspectiveChanged) { - float yaw1 = yaw * 360.0F / 6.2831855F; - float pitch1 = pitch * 360.0F / 6.2831855F; - GlRenderer.method4171(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2, yaw1, pitch1, zoom2d, zoom2d); - perspectiveChanged = false; - } + if (perspectiveChanged) { + float yaw1 = yaw * 360.0F / 6.2831855F; + float pitch1 = pitch * 360.0F / 6.2831855F; + GlRenderer.method4171(0, 0, GameShell.canvasWidth, GameShell.canvasHeight, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2, yaw1, pitch1, zoom2d, zoom2d); + perspectiveChanged = false; + } - if (npc != null) { - SeqType seqType = SeqTypeList.get(9804); - Model head = npcType.getHeadModel(seqType, 0, 0, 0); - if (renderHead && head != null) { - head.render(orientation, 25079, 60547, -44308, 48222, x, z, y, 0L, 0, null); - } else { - npc.render(orientation, 25079, 60547, -44308, 48222, x, z, y, 0L, 0, null); - } - } + if (npc != null) { + SeqType seqType = SeqTypeList.get(9804); + Model head = npcType.getHeadModel(seqType, 0, 0, 0); + if (renderHead && head != null) { + head.render(orientation, 25079, 60547, -44308, 48222, x, z, y, 0L, 0, null); + } else { + npc.render(orientation, 25079, 60547, -44308, 48222, x, z, y, 0L, 0, null); + } + } - if (sprite != null) { - sprite.render(canvasWidth / 2 - 144, canvasHeight / 2 - 128); - } + if (sprite != null) { + sprite.render(canvasWidth / 2 - 144, canvasHeight / 2 - 128); + } - if (!GlRenderer.enabled) { - SoftwareRaster.frameBuffer.draw(GameShell.canvas.getGraphics()); - } else { - GlRenderer.draw(); - GlRenderer.swapBuffers(); - } + if (!GlRenderer.enabled) { + SoftwareRaster.frameBuffer.draw(GameShell.canvas.getGraphics()); + } else { + GlRenderer.draw(); + GlRenderer.swapBuffers(); + } - if (lastExportCounter != exportCounter) { - // exportGlImage("dump/" + exportCounter); - lastExportCounter = exportCounter; - // exportCounter++; - } - } - } catch (Exception ex) {} - } + if (lastExportCounter != exportCounter) { + // exportGlImage("dump/" + exportCounter); + lastExportCounter = exportCounter; + // exportCounter++; + } + } + } catch (Exception ex) { + } + } - @Override - protected void mainQuit() { - Keyboard.stop(GameShell.canvas); - Mouse.stop(GameShell.canvas); - Keyboard.quit(); - Mouse.quit(); + @Override + protected void mainQuit() { + Keyboard.stop(GameShell.canvas); + Mouse.stop(GameShell.canvas); + Keyboard.quit(); + Mouse.quit(); - if (GlRenderer.enabled) { - GlRenderer.quit(); - } + if (GlRenderer.enabled) { + GlRenderer.quit(); + } - if (GameShell.signLink != null) { - GameShell.signLink.unloadGlNatives(this.getClass()); - } - } + if (GameShell.signLink != null) { + GameShell.signLink.unloadGlNatives(this.getClass()); + } + } - @Override - protected void reset() { - } + @Override + protected void reset() { + } } diff --git a/signlink/src/main/java/rt4/AudioSource.java b/signlink/src/main/java/rt4/AudioSource.java index bdfcfcc..4a3155c 100644 --- a/signlink/src/main/java/rt4/AudioSource.java +++ b/signlink/src/main/java/rt4/AudioSource.java @@ -1,10 +1,11 @@ package rt4; -import java.awt.Component; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; +import java.awt.*; + @OriginalClass("signlink!ai") public interface AudioSource { diff --git a/signlink/src/main/java/rt4/CursorManager.java b/signlink/src/main/java/rt4/CursorManager.java index 8060152..8478676 100644 --- a/signlink/src/main/java/rt4/CursorManager.java +++ b/signlink/src/main/java/rt4/CursorManager.java @@ -1,14 +1,13 @@ package rt4; -import java.awt.Component; -import java.awt.Point; -import java.awt.Robot; -import java.awt.image.BufferedImage; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.*; +import java.awt.image.BufferedImage; + @OriginalClass("signlink!g") public final class CursorManager { diff --git a/signlink/src/main/java/rt4/FileOnDisk.java b/signlink/src/main/java/rt4/FileOnDisk.java index 071b29d..8585d70 100644 --- a/signlink/src/main/java/rt4/FileOnDisk.java +++ b/signlink/src/main/java/rt4/FileOnDisk.java @@ -1,13 +1,14 @@ package rt4; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.io.EOFException; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; @OriginalClass("signlink!qm") public final class FileOnDisk { diff --git a/signlink/src/main/java/rt4/FullScreenManager.java b/signlink/src/main/java/rt4/FullScreenManager.java index 577dbab..d7111f4 100644 --- a/signlink/src/main/java/rt4/FullScreenManager.java +++ b/signlink/src/main/java/rt4/FullScreenManager.java @@ -1,15 +1,13 @@ package rt4; -import java.awt.DisplayMode; -import java.awt.Frame; -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.lang.reflect.Field; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.awt.*; +import java.lang.reflect.Field; + @OriginalClass("signlink!e") public final class FullScreenManager { diff --git a/signlink/src/main/java/rt4/SignLink.java b/signlink/src/main/java/rt4/SignLink.java index 01270b1..36f4786 100644 --- a/signlink/src/main/java/rt4/SignLink.java +++ b/signlink/src/main/java/rt4/SignLink.java @@ -1,12 +1,13 @@ package rt4; +import com.jogamp.opengl.GLProfile; +import org.openrs2.deob.annotation.OriginalArg; +import org.openrs2.deob.annotation.OriginalClass; +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + import java.applet.Applet; -import java.awt.Color; -import java.awt.Component; -import java.awt.EventQueue; -import java.awt.Frame; -import java.awt.Point; -import java.awt.Toolkit; +import java.awt.*; import java.io.DataInputStream; import java.io.File; import java.io.IOException; @@ -19,12 +20,6 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Hashtable; -import com.jogamp.opengl.*; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalClass; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - @OriginalClass("signlink!ll") public final class SignLink implements Runnable { @@ -111,7 +106,7 @@ public final class SignLink implements Runnable { @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "(ZLjava/lang/String;)Lsignlink!qm;") private static FileOnDisk openPreferencesInternal(@OriginalArg(1) String cacheSubDir) { - @Pc(41) String[] cacheLocations = new String[] { "c:/rscache/", "/rscache/", homeDir, "c:/windows/", "c:/winnt/", "c:/", "/tmp/", "" }; + @Pc(41) String[] cacheLocations = new String[]{"c:/rscache/", "/rscache/", homeDir, "c:/windows/", "c:/winnt/", "c:/", "/tmp/", ""}; for (@Pc(43) int i = 0; i < cacheLocations.length; i++) { @Pc(51) String cacheLocation = cacheLocations[i]; if (cacheLocation.length() <= 0 || (new File(cacheLocation)).exists()) { @@ -130,8 +125,8 @@ public final class SignLink implements Runnable { if (cachedFile != null) { return cachedFile; } - @Pc(53) String[] cacheLocations = new String[] { homeDir, "c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", "/tmp/", "" }; - @Pc(78) String[] cacheDirs = new String[] { "cache", ".runite_rs", ".530file_store_" + storeId, ".jagex_cache_" + storeId, ".file_store_" + storeId }; + @Pc(53) String[] cacheLocations = new String[]{homeDir, "c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", "/tmp/", ""}; + @Pc(78) String[] cacheDirs = new String[]{"cache", ".runite_rs", ".530file_store_" + storeId, ".jagex_cache_" + storeId, ".file_store_" + storeId}; for (@Pc(80) int attempt = 0; attempt < 2; attempt++) { for (@Pc(87) int i = 0; i < cacheDirs.length; i++) { for (@Pc(93) int j = 0; j < cacheLocations.length; j++) { @@ -203,13 +198,13 @@ public final class SignLink implements Runnable { if (homeDir != null) { homeDir = homeDir + "/"; // 2009scape-specific behavior - if (osName.startsWith("linux")) { - File oldCache = new File(homeDir + "/.runite_rs"); - homeDir = homeDir + ".local/share/2009scape/"; - File newCache = new File(homeDir + "cache"); - if (oldCache.isDirectory() && !newCache.exists()) { - Files.move(oldCache.toPath(), newCache.toPath(), StandardCopyOption.REPLACE_EXISTING); - } + if (osName.startsWith("linux")) { + File oldCache = new File(homeDir + "/.runite_rs"); + homeDir = homeDir + ".local/share/2009scape/"; + File newCache = new File(homeDir + "cache"); + if (oldCache.isDirectory() && !newCache.exists()) { + Files.move(oldCache.toPath(), newCache.toPath(), StandardCopyOption.REPLACE_EXISTING); + } } } } catch (@Pc(86) Exception ex) { @@ -296,7 +291,7 @@ public final class SignLink implements Runnable { @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "([IIILjava/awt/Component;Ljava/awt/Point;I)Lsignlink!im;") public final PrivilegedRequest setCursor(@OriginalArg(0) int[] pixels, @OriginalArg(2) int width, @OriginalArg(3) Component component, @OriginalArg(4) Point hotSpot, @OriginalArg(5) int height) { - return this.enqueue(17, height, new Object[] { component, pixels, hotSpot }, width); + return this.enqueue(17, height, new Object[]{component, pixels, hotSpot}, width); } @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "(IILjava/lang/Object;II)Lsignlink!im;") @@ -341,7 +336,7 @@ public final class SignLink implements Runnable { @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "(Ljava/lang/Class;[Ljava/lang/Class;ILjava/lang/String;)Lsignlink!im;") public final PrivilegedRequest getDeclaredMethod(@OriginalArg(0) Class targetClass, @OriginalArg(1) Class[] parameterTypes, @OriginalArg(3) String name) { - return this.enqueue(8, 0, new Object[] { targetClass, name, parameterTypes }, 0); + return this.enqueue(8, 0, new Object[]{targetClass, name, parameterTypes}, 0); } @OriginalMember(owner = "signlink!ll", name = "run", descriptor = "()V") @@ -518,7 +513,7 @@ public final class SignLink implements Runnable { @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "(ILjava/lang/String;Ljava/lang/Class;)Lsignlink!im;") public final PrivilegedRequest getDeclaredField(@OriginalArg(1) String name, @OriginalArg(2) Class targetClass) { - return this.enqueue(9, 0, new Object[] { targetClass, name }, 0); + return this.enqueue(9, 0, new Object[]{targetClass, name}, 0); } @OriginalMember(owner = "signlink!ll", name = "a", descriptor = "(II)Lsignlink!im;")