From ef6a5d73853a417570a49f39faf1b30dd20fd13f Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 25 Apr 2022 04:02:02 -0400 Subject: [PATCH] Started organizing CS2/Protocol-related functions --- client/src/main/java/AreaSoundManager.java | 72 +- client/src/main/java/AttachLocRequest.java | 98 + client/src/main/java/AudioChannel.java | 44 +- client/src/main/java/Base37.java | 2 +- client/src/main/java/Camera.java | 13 +- client/src/main/java/ChangeLocRequest.java | 30 + client/src/main/java/Chat.java | 40 +- client/src/main/java/Cheat.java | 147 +- client/src/main/java/ClanChat.java | 47 + client/src/main/java/Class3_Sub22.java | 6 +- client/src/main/java/ClientScriptList.java | 66 + client/src/main/java/Component.java | 56 +- client/src/main/java/CreateManager.java | 2 +- client/src/main/java/Cross.java | 12 + client/src/main/java/DelayedStateChange.java | 76 + client/src/main/java/Find.java | 47 + client/src/main/java/Font.java | 432 +-- client/src/main/java/FontMetricsList.java | 15 + client/src/main/java/FriendsList.java | 103 + client/src/main/java/GameShell.java | 8 - client/src/main/java/GlFont.java | 21 +- client/src/main/java/GlModel.java | 767 ++++-- client/src/main/java/GlSprite.java | 2 +- client/src/main/java/GlTile.java | 70 +- client/src/main/java/HashTable.java | 2 +- client/src/main/java/IgnoreList.java | 71 + client/src/main/java/InterfaceList.java | 6 + client/src/main/java/Inv.java | 87 + client/src/main/java/JagString.java | 8 +- client/src/main/java/Js5.java | 25 +- .../main/java/Js5CachedResourceProvider.java | 19 +- client/src/main/java/Keyboard.java | 5 + client/src/main/java/LightingManager.java | 8 + client/src/main/java/LoadingBarAwt.java | 13 +- client/src/main/java/Loc.java | 2 +- client/src/main/java/LoginManager.java | 42 +- client/src/main/java/MapList.java | 20 + client/src/main/java/MidiDecoder.java | 6 +- client/src/main/java/MidiPlayer.java | 20 +- client/src/main/java/MiniMap.java | 204 ++ client/src/main/java/Mouse.java | 135 +- client/src/main/java/MusicPlayer.java | 19 + client/src/main/java/NpcList.java | 6 + client/src/main/java/NpcType.java | 6 +- client/src/main/java/ObjType.java | 2 +- client/src/main/java/OverheadChat.java | 34 + client/src/main/java/PathingEntity.java | 4 +- client/src/main/java/Player.java | 20 +- client/src/main/java/PlayerAppearance.java | 30 +- client/src/main/java/PlayerSkillXpTable.java | 6 + client/src/main/java/Protocol.java | 1226 +++++++-- client/src/main/java/QuickChatCatType.java | 60 +- .../src/main/java/QuickChatCatTypeList.java | 2 +- client/src/main/java/QuickChatPhrase.java | 2 +- client/src/main/java/QuickChatPhraseType.java | 28 +- client/src/main/java/ReflectionCheck.java | 124 + client/src/main/java/SceneGraph.java | 59 + .../java/{Static88.java => ScriptRunner.java} | 2386 +++++++++-------- client/src/main/java/SeqType.java | 10 +- .../src/main/java/ServerActiveProperties.java | 4 +- client/src/main/java/SoftwareAlphaSprite.java | 36 +- client/src/main/java/SoftwareSprite.java | 88 +- client/src/main/java/SoundPlayer.java | 72 + client/src/main/java/Static1.java | 4 +- client/src/main/java/Static10.java | 16 +- client/src/main/java/Static103.java | 241 +- client/src/main/java/Static104.java | 3 - client/src/main/java/Static105.java | 11 +- client/src/main/java/Static106.java | 6 - client/src/main/java/Static107.java | 9 - client/src/main/java/Static108.java | 3 - client/src/main/java/Static109.java | 2 +- client/src/main/java/Static11.java | 19 - client/src/main/java/Static110.java | 14 +- client/src/main/java/Static111.java | 5 +- client/src/main/java/Static115.java | 8 +- client/src/main/java/Static118.java | 4 +- client/src/main/java/Static12.java | 3 - client/src/main/java/Static120.java | 34 +- client/src/main/java/Static122.java | 72 +- client/src/main/java/Static124.java | 10 - client/src/main/java/Static125.java | 3 - client/src/main/java/Static127.java | 138 +- client/src/main/java/Static13.java | 2 +- client/src/main/java/Static130.java | 3 - client/src/main/java/Static132.java | 21 +- client/src/main/java/Static133.java | 19 +- client/src/main/java/Static134.java | 8 - client/src/main/java/Static135.java | 7 - client/src/main/java/Static136.java | 11 +- client/src/main/java/Static137.java | 123 - client/src/main/java/Static138.java | 15 - client/src/main/java/Static139.java | 2 +- client/src/main/java/Static14.java | 5 +- client/src/main/java/Static140.java | 34 - client/src/main/java/Static141.java | 52 +- client/src/main/java/Static142.java | 11 +- client/src/main/java/Static143.java | 3 - client/src/main/java/Static145.java | 5 +- client/src/main/java/Static146.java | 4 +- client/src/main/java/Static147.java | 5 +- client/src/main/java/Static148.java | 22 - client/src/main/java/Static15.java | 15 - client/src/main/java/Static150.java | 7 +- client/src/main/java/Static152.java | 63 +- client/src/main/java/Static153.java | 28 - client/src/main/java/Static155.java | 36 +- client/src/main/java/Static156.java | 10 +- client/src/main/java/Static158.java | 8 +- client/src/main/java/Static16.java | 2 +- client/src/main/java/Static160.java | 3 - client/src/main/java/Static163.java | 8 +- client/src/main/java/Static164.java | 6 +- client/src/main/java/Static165.java | 5 +- client/src/main/java/Static166.java | 3 - client/src/main/java/Static169.java | 3 - client/src/main/java/Static17.java | 5 +- client/src/main/java/Static170.java | 6 +- client/src/main/java/Static171.java | 6 - client/src/main/java/Static172.java | 8 +- client/src/main/java/Static173.java | 30 +- client/src/main/java/Static175.java | 3 - client/src/main/java/Static176.java | 30 +- client/src/main/java/Static178.java | 45 - client/src/main/java/Static18.java | 4 +- client/src/main/java/Static181.java | 2 +- client/src/main/java/Static185.java | 9 +- client/src/main/java/Static187.java | 2 +- client/src/main/java/Static19.java | 30 - client/src/main/java/Static190.java | 7 - client/src/main/java/Static192.java | 95 - client/src/main/java/Static193.java | 33 +- client/src/main/java/Static195.java | 9 +- client/src/main/java/Static197.java | 6 +- client/src/main/java/Static199.java | 6 - client/src/main/java/Static2.java | 6 +- client/src/main/java/Static20.java | 2 +- client/src/main/java/Static204.java | 11 +- client/src/main/java/Static205.java | 6 +- client/src/main/java/Static209.java | 3 - client/src/main/java/Static21.java | 3 - client/src/main/java/Static214.java | 10 +- client/src/main/java/Static217.java | 12 +- client/src/main/java/Static218.java | 173 -- client/src/main/java/Static22.java | 14 +- client/src/main/java/Static220.java | 2 +- client/src/main/java/Static221.java | 11 +- client/src/main/java/Static222.java | 5 +- client/src/main/java/Static223.java | 5 +- client/src/main/java/Static224.java | 17 +- client/src/main/java/Static225.java | 36 - client/src/main/java/Static226.java | 5 +- client/src/main/java/Static227.java | 5 +- client/src/main/java/Static23.java | 14 +- client/src/main/java/Static230.java | 32 +- client/src/main/java/Static231.java | 76 +- client/src/main/java/Static233.java | 133 +- client/src/main/java/Static234.java | 112 +- client/src/main/java/Static235.java | 2 +- client/src/main/java/Static236.java | 2 +- client/src/main/java/Static237.java | 317 --- client/src/main/java/Static238.java | 13 - client/src/main/java/Static24.java | 35 - client/src/main/java/Static240.java | 6 - client/src/main/java/Static241.java | 14 +- client/src/main/java/Static243.java | 126 - client/src/main/java/Static244.java | 26 - client/src/main/java/Static245.java | 5 +- client/src/main/java/Static246.java | 7 +- client/src/main/java/Static247.java | 34 +- client/src/main/java/Static248.java | 21 +- client/src/main/java/Static25.java | 3 - client/src/main/java/Static250.java | 4 - client/src/main/java/Static251.java | 34 +- client/src/main/java/Static252.java | 12 +- client/src/main/java/Static254.java | 5 +- client/src/main/java/Static257.java | 2 +- client/src/main/java/Static258.java | 14 +- client/src/main/java/Static260.java | 2 +- client/src/main/java/Static261.java | 10 - client/src/main/java/Static262.java | 8 +- client/src/main/java/Static263.java | 5 +- client/src/main/java/Static264.java | 8 +- client/src/main/java/Static265.java | 2 +- client/src/main/java/Static266.java | 2 +- client/src/main/java/Static267.java | 5 +- client/src/main/java/Static269.java | 6 +- client/src/main/java/Static27.java | 5 +- client/src/main/java/Static270.java | 5 +- client/src/main/java/Static271.java | 3 - client/src/main/java/Static272.java | 5 +- client/src/main/java/Static273.java | 16 +- client/src/main/java/Static276.java | 7 +- client/src/main/java/Static278.java | 89 +- client/src/main/java/Static280.java | 60 +- client/src/main/java/Static29.java | 9 - client/src/main/java/Static3.java | 5 +- client/src/main/java/Static31.java | 2 +- client/src/main/java/Static32.java | 3 - client/src/main/java/Static34.java | 3 - client/src/main/java/Static35.java | 21 +- client/src/main/java/Static36.java | 18 +- client/src/main/java/Static37.java | 2 +- client/src/main/java/Static39.java | 4 - client/src/main/java/Static4.java | 6 +- client/src/main/java/Static40.java | 2 +- client/src/main/java/Static41.java | 5 +- client/src/main/java/Static43.java | 2 +- client/src/main/java/Static44.java | 8 +- client/src/main/java/Static45.java | 2 +- client/src/main/java/Static46.java | 21 +- client/src/main/java/Static47.java | 2 +- client/src/main/java/Static48.java | 6 +- client/src/main/java/Static49.java | 70 +- client/src/main/java/Static50.java | 3 - client/src/main/java/Static54.java | 109 +- client/src/main/java/Static56.java | 11 +- client/src/main/java/Static57.java | 5 +- client/src/main/java/Static59.java | 7 +- client/src/main/java/Static6.java | 2 +- client/src/main/java/Static60.java | 8 +- client/src/main/java/Static61.java | 3 - client/src/main/java/Static64.java | 40 - client/src/main/java/Static65.java | 44 - client/src/main/java/Static66.java | 7 - client/src/main/java/Static67.java | 3 - client/src/main/java/Static69.java | 33 +- client/src/main/java/Static7.java | 6 +- client/src/main/java/Static70.java | 3 - client/src/main/java/Static72.java | 5 +- client/src/main/java/Static74.java | 8 +- client/src/main/java/Static75.java | 4 +- client/src/main/java/Static78.java | 2 +- client/src/main/java/Static8.java | 2 +- client/src/main/java/Static80.java | 6 - client/src/main/java/Static81.java | 626 +---- client/src/main/java/Static82.java | 4 +- client/src/main/java/Static83.java | 2 +- client/src/main/java/Static84.java | 3 - client/src/main/java/Static86.java | 28 - client/src/main/java/Static87.java | 32 +- client/src/main/java/Static89.java | 29 +- client/src/main/java/Static9.java | 3 - client/src/main/java/Static90.java | 8 +- client/src/main/java/Static91.java | 95 +- client/src/main/java/Static92.java | 6 - client/src/main/java/Static93.java | 12 - client/src/main/java/Static95.java | 25 - client/src/main/java/Static96.java | 6 - client/src/main/java/Static97.java | 2 +- client/src/main/java/Static98.java | 18 - client/src/main/java/Static99.java | 2 - client/src/main/java/StockMarketManager.java | 2 +- client/src/main/java/StockMarketOffer.java | 24 +- client/src/main/java/Texture.java | 32 +- client/src/main/java/TextureOp15.java | 27 +- client/src/main/java/TextureOp29.java | 18 +- client/src/main/java/TextureOp29SubOp4.java | 57 +- client/src/main/java/TextureOpSprite.java | 2 +- client/src/main/java/Tile.java | 4 +- client/src/main/java/TitleScreen.java | 5 +- client/src/main/java/VarcDomain.java | 4 + client/src/main/java/VorbisFloor.java | 6 + client/src/main/java/VorbisRange.java | 6 +- client/src/main/java/WorldList.java | 5 + client/src/main/java/WorldMap.java | 48 + client/src/main/java/WorldMapFont.java | 16 +- client/src/main/java/client.java | 194 +- 268 files changed, 5936 insertions(+), 6093 deletions(-) create mode 100644 client/src/main/java/AttachLocRequest.java create mode 100644 client/src/main/java/ChangeLocRequest.java create mode 100644 client/src/main/java/ClientScriptList.java create mode 100644 client/src/main/java/Cross.java create mode 100644 client/src/main/java/Find.java create mode 100644 client/src/main/java/LightingManager.java create mode 100644 client/src/main/java/MiniMap.java create mode 100644 client/src/main/java/NpcList.java create mode 100644 client/src/main/java/OverheadChat.java rename client/src/main/java/{Static88.java => ScriptRunner.java} (55%) delete mode 100644 client/src/main/java/Static135.java delete mode 100644 client/src/main/java/Static21.java delete mode 100644 client/src/main/java/Static218.java delete mode 100644 client/src/main/java/Static237.java delete mode 100644 client/src/main/java/Static32.java delete mode 100644 client/src/main/java/Static66.java delete mode 100644 client/src/main/java/Static95.java create mode 100644 client/src/main/java/VorbisFloor.java diff --git a/client/src/main/java/AreaSoundManager.java b/client/src/main/java/AreaSoundManager.java index f38e2ea..6c426a1 100644 --- a/client/src/main/java/AreaSoundManager.java +++ b/client/src/main/java/AreaSoundManager.java @@ -3,9 +3,12 @@ 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 aClass133_7 = new HashTable(16); + @OriginalMember(owner = "client!wc", name = "a", descriptor = "(Lclient!e;I)V") public static void remove(@OriginalArg(0) Player arg0) { - @Pc(10) AreaSound local10 = (AreaSound) Static93.aClass133_7.get(arg0.username.encode37()); + @Pc(10) AreaSound local10 = (AreaSound) aClass133_7.get(arg0.username.encode37()); if (local10 == null) { return; } @@ -15,4 +18,71 @@ public class AreaSoundManager { } local10.unlink(); } + + @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IZLclient!pb;ILclient!km;IILclient!e;)V") + public static void add(@OriginalArg(0) int arg0, @OriginalArg(2) LocType arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Npc arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) Player arg6) { + @Pc(13) AreaSound local13 = new AreaSound(); + local13.anInt2029 = arg0 * 128; + local13.anInt2041 = arg4 * 128; + local13.anInt2033 = arg5; + if (arg1 != null) { + local13.sounds = arg1.anIntArray381; + local13.radius = arg1.soundRadius * 128; + local13.anInt2040 = arg1.anInt4414; + local13.locType = arg1; + local13.sound = arg1.sound; + local13.anInt2032 = arg1.anInt4419; + @Pc(57) int local57 = arg1.width; + @Pc(60) int local60 = arg1.length; + if (arg2 == 1 || arg2 == 3) { + local57 = arg1.length; + local60 = arg1.width; + } + local13.anInt2028 = (local60 + arg0) * 128; + local13.anInt2037 = (arg4 + local57) * 128; + if (arg1.multiLocs != null) { + local13.multiLocOrNpc = true; + local13.update(); + } + if (local13.sounds != null) { + local13.anInt2034 = local13.anInt2032 + (int) (Math.random() * (double) (local13.anInt2040 - local13.anInt2032)); + } + Static3.aClass69_135.addTail(local13); + } else if (arg3 != null) { + local13.npc = arg3; + @Pc(138) NpcType local138 = arg3.type; + if (local138.multiNpcs != null) { + local13.multiLocOrNpc = true; + local138 = local138.getMultiNpc(); + } + if (local138 != null) { + local13.anInt2028 = (local138.soze + arg0) * 128; + local13.anInt2037 = (arg4 + local138.soze) * 128; + local13.sound = Static112.getSound(arg3); + local13.radius = local138.soundRadius * 128; + } + Static152.aClass69_87.addTail(local13); + } else if (arg6 != null) { + local13.player = arg6; + local13.anInt2037 = (arg6.getSize() + arg4) * 128; + local13.anInt2028 = (arg6.getSize() + arg0) * 128; + local13.sound = Static140.getSound(arg6); + local13.radius = arg6.soundRadius * 128; + aClass133_7.put(local13, arg6.username.encode37()); + } + } + + @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!km;Z)V") + public static void remove(@OriginalArg(0) Npc arg0) { + for (@Pc(13) AreaSound local13 = (AreaSound) Static152.aClass69_87.method2289(); local13 != null; local13 = (AreaSound) Static152.aClass69_87.method2288()) { + if (arg0 == local13.npc) { + if (local13.primaryStream != null) { + client.soundStream.removeSubStream(local13.primaryStream); + local13.primaryStream = null; + } + local13.unlink(); + return; + } + } + } } diff --git a/client/src/main/java/AttachLocRequest.java b/client/src/main/java/AttachLocRequest.java new file mode 100644 index 0000000..0d24c6d --- /dev/null +++ b/client/src/main/java/AttachLocRequest.java @@ -0,0 +1,98 @@ +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + +public class AttachLocRequest { + @OriginalMember(owner = "client!ph", name = "a", descriptor = "(B)V") + public static void loop() { + while (true) { + @Pc(17) Class3_Sub8 local17 = (Class3_Sub8) Static128.aClass69_77.removeHead(); + if (local17 == null) { + return; + } + @Pc(40) PathingEntity local40; + @Pc(29) int local29; + if (local17.anInt1192 < 0) { + local29 = -local17.anInt1192 - 1; + if (local29 == PlayerList.selfId) { + local40 = PlayerList.self; + } else { + local40 = PlayerList.players[local29]; + } + } else { + local29 = local17.anInt1192 - 1; + local40 = NpcList.npcs[local29]; + } + if (local40 != null) { + @Pc(63) LocType local63 = LocTypeList.get(local17.anInt1189); + if (Player.level < 3) { + } + @Pc(86) int local86; + @Pc(83) int local83; + if (local17.anInt1206 == 1 || local17.anInt1206 == 3) { + local83 = local63.width; + local86 = local63.length; + } else { + local86 = local63.width; + local83 = local63.length; + } + @Pc(103) int local103 = (local86 + 1 >> 1) + local17.anInt1190; + @Pc(110) int local110 = (local86 >> 1) + local17.anInt1190; + @Pc(117) int local117 = (local83 >> 1) + local17.anInt1204; + @Pc(126) int local126 = (local83 + 1 >> 1) + local17.anInt1204; + @Pc(130) int[][] local130 = Static83.activeTileHeightMap[Player.level]; + @Pc(157) int local157 = local130[local103][local126] + local130[local110][local126] + local130[local110][local117] + local130[local103][local117] >> 2; + @Pc(159) Entity local159 = null; + @Pc(164) int local164 = Static133.anIntArray453[local17.anInt1198]; + if (local164 == 0) { + @Pc(176) Wall local176 = Static262.method4509(Player.level, local17.anInt1190, local17.anInt1204); + if (local176 != null) { + local159 = local176.aClass8_5; + } + } else if (local164 == 1) { + @Pc(231) WallDecor local231 = Static83.method435(Player.level, local17.anInt1190, local17.anInt1204); + if (local231 != null) { + local159 = local231.aClass8_3; + } + } else if (local164 == 2) { + @Pc(198) Scenery local198 = Static133.method4008(Player.level, local17.anInt1190, local17.anInt1204); + if (local198 != null) { + local159 = local198.aClass8_4; + } + } else if (local164 == 3) { + @Pc(216) GroundDecor local216 = Static269.method2210(Player.level, local17.anInt1190, local17.anInt1204); + if (local216 != null) { + local159 = local216.aClass8_1; + } + } + if (local159 != null) { + Static29.method800(Player.level, local17.anInt1204, 0, local17.anInt1190, local17.anInt1205 + 1, -1, local164, 0, local17.anInt1187 + 1); + local40.anInt3375 = local17.anInt1205 + client.loop; + local40.anInt3426 = local83 * 64 + local17.anInt1204 * 128; + local40.anInt3379 = local86 * 64 + local17.anInt1190 * 128; + local40.attachment = local159; + @Pc(292) int local292 = local17.anInt1188; + local40.anInt3406 = local157; + local40.anInt3390 = client.loop + local17.anInt1187; + @Pc(304) int local304 = local17.anInt1191; + @Pc(307) int local307 = local17.anInt1197; + @Pc(310) int local310 = local17.anInt1200; + @Pc(316) int local316; + if (local292 > local304) { + local316 = local292; + local292 = local304; + local304 = local316; + } + local40.anInt3411 = local17.anInt1190 + local304; + if (local307 > local310) { + local316 = local307; + local307 = local310; + local310 = local316; + } + local40.anInt3374 = local17.anInt1204 + local307; + local40.anInt3410 = local310 + local17.anInt1204; + local40.anInt3384 = local17.anInt1190 + local292; + } + } + } + } +} diff --git a/client/src/main/java/AudioChannel.java b/client/src/main/java/AudioChannel.java index 74d039e..9043dce 100644 --- a/client/src/main/java/AudioChannel.java +++ b/client/src/main/java/AudioChannel.java @@ -11,6 +11,8 @@ public class AudioChannel { 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!vh", name = "h", descriptor = "Lclient!qb;") private PcmStream stream; @@ -82,16 +84,16 @@ public class AudioChannel { local33.bufferCapacity = 16384; } local33.open(local33.bufferCapacity); - if (threadPriority > 0 && Static60.thread == null) { - Static60.thread = new AudioThread(); - Static60.thread.signLink = arg1; - arg1.startThread(threadPriority, Static60.thread); + if (threadPriority > 0 && thread == null) { + thread = new AudioThread(); + thread.signLink = arg1; + arg1.startThread(threadPriority, thread); } - if (Static60.thread != null) { - if (Static60.thread.channels[arg3] != null) { + if (thread != null) { + if (thread.channels[arg3] != null) { throw new IllegalArgumentException(); } - Static60.thread.channels[arg3] = local33; + thread.channels[arg3] = local33; } return local33; } catch (@Pc(109) Throwable local109) { @@ -102,16 +104,16 @@ public class AudioChannel { local120.init(arg2); local120.bufferCapacity = 16384; local120.open(local120.bufferCapacity); - if (threadPriority > 0 && Static60.thread == null) { - Static60.thread = new AudioThread(); - Static60.thread.signLink = arg1; - arg1.startThread(threadPriority, Static60.thread); + if (threadPriority > 0 && thread == null) { + thread = new AudioThread(); + thread.signLink = arg1; + arg1.startThread(threadPriority, thread); } - if (Static60.thread != null) { - if (Static60.thread.channels[arg3] != null) { + if (thread != null) { + if (thread.channels[arg3] != null) { throw new IllegalArgumentException(); } - Static60.thread.channels[arg3] = local120; + thread.channels[arg3] = local120; } return local120; } catch (@Pc(186) Throwable local186) { @@ -359,22 +361,22 @@ public class AudioChannel { @OriginalMember(owner = "client!vh", name = "a", descriptor = "(Z)V") public final synchronized void quit() { - if (Static60.thread != null) { + if (thread != null) { @Pc(6) boolean local6 = true; for (@Pc(8) int local8 = 0; local8 < 2; local8++) { - if (Static60.thread.channels[local8] == this) { - Static60.thread.channels[local8] = null; + if (thread.channels[local8] == this) { + thread.channels[local8] = null; } - if (Static60.thread.channels[local8] != null) { + if (thread.channels[local8] != null) { local6 = false; } } if (local6) { - Static60.thread.stop = true; - while (Static60.thread.running) { + thread.stop = true; + while (thread.running) { ThreadUtils.sleep(50L); } - Static60.thread = null; + thread = null; } } this.flush(); diff --git a/client/src/main/java/Base37.java b/client/src/main/java/Base37.java index 2b1f5fb..ac83281 100644 --- a/client/src/main/java/Base37.java +++ b/client/src/main/java/Base37.java @@ -4,7 +4,7 @@ import org.openrs2.deob.annotation.Pc; public class Base37 { @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IJ)Lclient!na;") - public static JagString decodeLowerCase(@OriginalArg(1) long arg0) { + public static JagString decode37(@OriginalArg(1) long arg0) { if (arg0 <= 0L || arg0 >= 6582952005840035281L) { return null; } else if (arg0 % 37L == 0L) { diff --git a/client/src/main/java/Camera.java b/client/src/main/java/Camera.java index 0ec442b..2da3987 100644 --- a/client/src/main/java/Camera.java +++ b/client/src/main/java/Camera.java @@ -8,17 +8,8 @@ public class Camera { @OriginalMember(owner = "client!eg", name = "d", descriptor = "I") public static double yawTarget = 0; - public static int pitchDirection = -1; - - public static int yawDirection = -1; - - public static int getPitch() { - return pitchDirection == 1 ? (int)Math.ceil(pitchTarget) : (int)pitchTarget; - } - - public static int getYaw() { - return yawDirection == 1 ? (int)Math.floor(yawTarget) : (int)yawTarget; - } + @OriginalMember(owner = "client!ef", name = "i", descriptor = "I") + public static double pitchAccel = 0; public static double mod(double a, double b) { return ((a % b) + b) % b; diff --git a/client/src/main/java/ChangeLocRequest.java b/client/src/main/java/ChangeLocRequest.java new file mode 100644 index 0000000..10f011e --- /dev/null +++ b/client/src/main/java/ChangeLocRequest.java @@ -0,0 +1,30 @@ +import org.openrs2.deob.annotation.OriginalMember; +import org.openrs2.deob.annotation.Pc; + +public class ChangeLocRequest { + @OriginalMember(owner = "client!ug", name = "a", descriptor = "(B)V") + public static void loop() { + for (@Pc(10) Class3_Sub7 local10 = (Class3_Sub7) Static26.aClass69_27.method2289(); local10 != null; local10 = (Class3_Sub7) Static26.aClass69_27.method2288()) { + if (local10.anInt924 > 0) { + local10.anInt924--; + } + if (local10.anInt924 != 0) { + if (local10.anInt925 > 0) { + local10.anInt925--; + } + if (local10.anInt925 == 0 && local10.anInt928 >= 1 && local10.anInt916 >= 1 && local10.anInt928 <= 102 && local10.anInt916 <= 102 && (local10.anInt929 < 0 || Static113.method3557(local10.anInt929, local10.anInt926))) { + Static79.method1698(local10.anInt929, local10.anInt928, local10.anInt918, local10.anInt922, local10.anInt916, local10.anInt926, local10.anInt927); + local10.anInt925 = -1; + if (local10.anInt921 == local10.anInt929 && local10.anInt921 == -1) { + local10.unlink(); + } else if (local10.anInt929 == local10.anInt921 && local10.anInt922 == local10.anInt923 && local10.anInt920 == local10.anInt926) { + local10.unlink(); + } + } + } else if (local10.anInt921 < 0 || Static113.method3557(local10.anInt921, local10.anInt920)) { + Static79.method1698(local10.anInt921, local10.anInt928, local10.anInt918, local10.anInt923, local10.anInt916, local10.anInt920, local10.anInt927); + local10.unlink(); + } + } + } +} diff --git a/client/src/main/java/Chat.java b/client/src/main/java/Chat.java index 650e7c4..8866f9c 100644 --- a/client/src/main/java/Chat.java +++ b/client/src/main/java/Chat.java @@ -4,36 +4,42 @@ import org.openrs2.deob.annotation.Pc; public class Chat { @OriginalMember(owner = "client!ca", name = "eb", descriptor = "[I") - public static final int[] anIntArray67 = new int[100]; + public static final int[] types = new int[100]; @OriginalMember(owner = "client!fb", name = "l", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array62 = new JagString[100]; + public static final JagString[] clans = new JagString[100]; @OriginalMember(owner = "client!sj", name = "q", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array158 = new JagString[100]; + public static final JagString[] messages = new JagString[100]; @OriginalMember(owner = "client!th", name = "l", descriptor = "[I") - public static final int[] anIntArray521 = new int[100]; + public static final int[] phraseIds = new int[100]; @OriginalMember(owner = "client!mc", name = "Y", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array112 = new JagString[100]; + public static final JagString[] names = new JagString[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 anInt1941 = 0; + 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!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--) { - anIntArray67[local14] = anIntArray67[local14 - 1]; - aClass100Array112[local14] = aClass100Array112[local14 - 1]; - aClass100Array158[local14] = aClass100Array158[local14 - 1]; - aClass100Array62[local14] = aClass100Array62[local14 - 1]; - anIntArray521[local14] = anIntArray521[local14 - 1]; + 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]; } - anInt1941++; - anIntArray67[0] = arg1; - aClass100Array112[0] = arg4; + size++; + types[0] = arg1; + names[0] = arg4; transmitAt = InterfaceList.transmitTimer; - anIntArray521[0] = arg0; - aClass100Array158[0] = arg2; - aClass100Array62[0] = arg3; + phraseIds[0] = arg0; + messages[0] = arg2; + clans[0] = arg3; } @OriginalMember(owner = "client!i", name = "a", descriptor = "(Lclient!na;ILclient!na;I)V") diff --git a/client/src/main/java/Cheat.java b/client/src/main/java/Cheat.java index e616767..6d326d0 100644 --- a/client/src/main/java/Cheat.java +++ b/client/src/main/java/Cheat.java @@ -27,13 +27,154 @@ public class Cheat { public static final JagString aClass100_1088 = JagString.parse("::setparticles"); @OriginalMember(owner = "client!rc", name = "K", descriptor = "Lclient!na;") public static final JagString aClass100_232 = 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 aClass100_522 = JagString.parse("::wm0"); + @OriginalMember(owner = "client!tg", name = "i", descriptor = "Lclient!na;") + public static final JagString aClass100_1009 = JagString.parse("::pcachesize"); + @OriginalMember(owner = "client!fh", name = "ab", descriptor = "Lclient!na;") + public static final JagString aClass100_443 = JagString.parse("::noclip"); + @OriginalMember(owner = "client!en", name = "e", descriptor = "Lclient!na;") + public static final JagString aClass100_422 = JagString.parse("::fpsoff"); @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 = false; @OriginalMember(owner = "client!en", name = "a", descriptor = "(IIIB)V") public static void teleport(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(66) JagString local66 = JagString.concatenate(new JagString[] { Static96.aClass100_521, Static123.parseInt(arg2), Static159.aClass100_760, Static123.parseInt(arg0 >> 6), Static159.aClass100_760, Static123.parseInt(arg1 >> 6), Static159.aClass100_760, Static123.parseInt(arg0 & 0x3F), Static159.aClass100_760, Static123.parseInt(arg1 & 0x3F) }); - local66.method3129(); - Static127.method2470(local66); + @Pc(66) JagString local66 = JagString.concatenate(new JagString[] { aClass100_521, Static123.parseInt(arg2), Static159.aClass100_760, Static123.parseInt(arg0 >> 6), Static159.aClass100_760, Static123.parseInt(arg1 >> 6), Static159.aClass100_760, Static123.parseInt(arg0 & 0x3F), Static159.aClass100_760, Static123.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(Static81.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[] { Static202.aClass100_892, Static123.parseInt(local38), Static17.aClass100_101 })); + } + @Pc(117) int local117; + if (arg0.equalsIgnoreCase(Static154.aClass100_735)) { + 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[] { Static203.aClass100_893, Static123.parseInt(local38), Static17.aClass100_101 })); + Static16.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, Static123.parseInt(local38), Static17.aClass100_101 })); + } + if (arg0.equalsIgnoreCase(aClass100_1009)) { + Chat.add(null, 0, JagString.concatenate(new JagString[] { Static44.aClass100_335, Static123.parseInt(Static198.method1029()) })); + } + if (GlRenderer.enabled && arg0.equalsIgnoreCase(Static201.aClass100_406)) { + System.out.println("oncard_geometry:" + GlCleaner.anInt1945); + System.out.println("oncard_2d:" + GlCleaner.onCard2d); + System.out.println("oncard_texture:" + GlCleaner.onCardTexture); + } + if (arg0.equalsIgnoreCase(CLIENTDROP)) { + Static175.method3279(); + } + if (arg0.equalsIgnoreCase(Static279.aClass100_1106)) { + client.js5NetQueue.quit(); + } + if (arg0.equalsIgnoreCase(JS5DROP)) { + client.js5NetQueue.method2319(); + } + if (arg0.equalsIgnoreCase(aClass100_775)) { + GameShell.signLink.breakConnection(); + Protocol.socket.breakConnection(); + client.js5NetQueue.method2323(); + } + if (arg0.equalsIgnoreCase(Static114.aClass100_1100)) { + GameShell.replaceCanvas = true; + } + if (arg0.equalsIgnoreCase(Static148.aClass100_677)) { + client.setGameState(25); + } + if (arg0.equalsIgnoreCase(Static107.aClass100_566)) { + displayFps = true; + } + if (arg0.equalsIgnoreCase(aClass100_422)) { + displayFps = false; + } + if (arg0.equalsIgnoreCase(aClass100_522)) { + Static241.setWindowMode(false, 0, -1, -1); + } + if (arg0.equalsIgnoreCase(Static181.aClass100_811)) { + Static241.setWindowMode(false, 1, -1, -1); + } + if (arg0.equalsIgnoreCase(Static207.aClass100_904)) { + Static241.setWindowMode(false, 2, -1, -1); + } + if (arg0.equalsIgnoreCase(Static99.aClass100_529)) { + Static241.setWindowMode(false, 3, 1024, 768); + } + if (arg0.equalsIgnoreCase(aClass100_443)) { + for (local18 = 0; local18 < 4; local18++) { + for (local38 = 1; local38 < 103; local38++) { + for (local117 = 1; local117 < 103; local117++) { + PathFinder.collisionMaps[local18].anIntArrayArray30[local38][local117] = 0; + } + } + } + } + if (arg0.startsWith(aClass100_1088)) { + Preferences.setParticles(arg0.substring(15).parseInt()); + Preferences.write(GameShell.signLink); + Preferences.sentToServer = false; + } + if (arg0.startsWith(aClass100_623) && client.modeWhere != 0) { + Static115.method2312(arg0.substring(6).parseInt()); + } + if (arg0.equalsIgnoreCase(aClass100_990)) { + throw new RuntimeException(); + } + if (arg0.startsWith(aClass100_232)) { + Static199.rectDebug = arg0.substring(12).trim().parseInt(); + Chat.add(null, 0, JagString.concatenate(new JagString[] { Static276.aClass100_1096, Static123.parseInt(Static199.rectDebug) })); + } + if (arg0.equalsIgnoreCase(Static181.aClass100_810)) { + Static121.aBoolean154 = true; + } + if (arg0.equalsIgnoreCase(Static124.aClass100_596)) { + if (client.applyTweening) { + client.applyTweening = false; + Chat.add(null, 0, aClass100_943); + } else { + client.applyTweening = true; + Chat.add(null, 0, Static50.aClass100_362); + } + } + if (arg0.equalsIgnoreCase(Static114.aClass100_1099)) { + if (shiftClick) { + Static154.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/ClanChat.java b/client/src/main/java/ClanChat.java index 86a1447..eeb9f69 100644 --- a/client/src/main/java/ClanChat.java +++ b/client/src/main/java/ClanChat.java @@ -1,6 +1,53 @@ +import org.openrs2.deob.annotation.OriginalArg; 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 Class3_Sub22[] 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!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") + public static void kick(@OriginalArg(1) JagString arg0) { + if (members == null) { + return; + } + @Pc(22) long local22 = arg0.encode37(); + @Pc(24) int local24 = 0; + if (local22 == 0L) { + return; + } + while (members.length > local24 && members[local24].key != local22) { + local24++; + } + if (local24 < members.length && members[local24] != null) { + Protocol.outboundBuffer.p1isaac(162); + Protocol.outboundBuffer.p8(members[local24].key); + } + } } diff --git a/client/src/main/java/Class3_Sub22.java b/client/src/main/java/Class3_Sub22.java index 6028125..40399f4 100644 --- a/client/src/main/java/Class3_Sub22.java +++ b/client/src/main/java/Class3_Sub22.java @@ -5,14 +5,14 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Class3_Sub22 extends Node { @OriginalMember(owner = "client!kl", name = "p", descriptor = "B") - public byte aByte9; + public byte rank; @OriginalMember(owner = "client!kl", name = "q", descriptor = "Lclient!na;") public JagString aClass100_635; @OriginalMember(owner = "client!kl", name = "t", descriptor = "Lclient!na;") - public JagString aClass100_636; + public JagString username; @OriginalMember(owner = "client!kl", name = "x", descriptor = "I") - public int anInt3340; + public int world; } diff --git a/client/src/main/java/ClientScriptList.java b/client/src/main/java/ClientScriptList.java new file mode 100644 index 0000000..4efb0f6 --- /dev/null +++ b/client/src/main/java/ClientScriptList.java @@ -0,0 +1,66 @@ +import org.openrs2.deob.annotation.OriginalArg; +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!hc", name = "a", descriptor = "(IB)Lclient!qc;") + public static ClientScript get(@OriginalArg(0) int id) { + @Pc(12) ClientScript local12 = (ClientScript) scripts.get((long) id); + if (local12 != null) { + return local12; + } + @Pc(22) byte[] local22 = client.js5Archive12.getFile(id, 0); + if (local22 == null) { + return null; + } + local12 = new ClientScript(); + @Pc(42) Buffer local42 = new Buffer(local22); + local42.offset = local42.data.length - 2; + @Pc(53) int local53 = local42.g2(); + @Pc(63) int local63 = local42.data.length - local53 - 12 - 2; + local42.offset = local63; + @Pc(70) int local70 = local42.g4(); + local12.anInt4667 = local42.g2(); + local12.anInt4671 = local42.g2(); + local12.anInt4665 = local42.g2(); + local12.anInt4669 = local42.g2(); + @Pc(98) int local98 = local42.g1(); + @Pc(107) int local107; + @Pc(114) int local114; + if (local98 > 0) { + local12.aClass133Array1 = new HashTable[local98]; + for (local107 = 0; local107 < local98; local107++) { + local114 = local42.g2(); + @Pc(121) HashTable local121 = new HashTable(Static165.clp2(local114)); + local12.aClass133Array1[local107] = local121; + while (local114-- > 0) { + @Pc(136) int local136 = local42.g4(); + @Pc(140) int local140 = local42.g4(); + local121.put(new IntNode(local140), (long) local136); + } + } + } + local42.offset = 0; + local12.name = local42.gjstrFast(); + local12.opcodes = new int[local70]; + local12.stringOperands = new JagString[local70]; + local107 = 0; + local12.intOperands = new int[local70]; + while (local63 > local42.offset) { + local114 = local42.g2(); + if (local114 == 3) { + local12.stringOperands[local107] = local42.gjstr(); + } else if (local114 >= 100 || local114 == 21 || local114 == 38 || local114 == 39) { + local12.intOperands[local107] = local42.g1(); + } else { + local12.intOperands[local107] = local42.g4(); + } + local12.opcodes[local107++] = local114; + } + scripts.put(local12, (long) id); + return local12; + } +} diff --git a/client/src/main/java/Component.java b/client/src/main/java/Component.java index 142b1bf..602fd8c 100644 --- a/client/src/main/java/Component.java +++ b/client/src/main/java/Component.java @@ -31,7 +31,7 @@ public final class Component { public Object[] anObjectArray6; @OriginalMember(owner = "client!be", name = "q", descriptor = "[Lclient!na;") - public JagString[] aClass100Array18; + public JagString[] ops; @OriginalMember(owner = "client!be", name = "s", descriptor = "[Lclient!na;") public JagString[] aClass100Array19; @@ -301,7 +301,7 @@ public final class Component { public int anInt492 = 0; @OriginalMember(owner = "client!be", name = "Gb", descriptor = "Lclient!na;") - public JagString aClass100_84 = Static176.aClass100_800; + public JagString text = Static176.aClass100_800; @OriginalMember(owner = "client!be", name = "n", descriptor = "I") public int anInt445 = 0; @@ -331,7 +331,7 @@ public final class Component { public int modelZOffset = 0; @OriginalMember(owner = "client!be", name = "Dc", descriptor = "Lclient!na;") - public JagString aClass100_88 = Static176.aClass100_800; + public JagString opBase = Static176.aClass100_800; @OriginalMember(owner = "client!be", name = "Lc", descriptor = "I") public int updatedVarcsReaderIndex = 0; @@ -412,7 +412,7 @@ public final class Component { public int anInt521 = 0; @OriginalMember(owner = "client!be", name = "id", descriptor = "I") - public int anInt522 = -1; + public int modelSeqId = -1; @OriginalMember(owner = "client!be", name = "Rc", descriptor = "Lclient!na;") public JagString aClass100_89 = LocalizedText.OK; @@ -478,7 +478,7 @@ public final class Component { public int updatedVarpsReaderIndex = 0; @OriginalMember(owner = "client!be", name = "rb", descriptor = "I") - public int anInt474 = 0; + public int color = 0; @OriginalMember(owner = "client!be", name = "xd", descriptor = "I") public int anInt530 = 0; @@ -544,16 +544,16 @@ public final class Component { @OriginalMember(owner = "client!be", name = "a", descriptor = "(BLclient!na;I)V") public final void method480(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { - if (this.aClass100Array18 == null || this.aClass100Array18.length <= arg1) { + if (this.ops == null || this.ops.length <= arg1) { @Pc(23) JagString[] local23 = new JagString[arg1 + 1]; - if (this.aClass100Array18 != null) { - for (@Pc(30) int local30 = 0; local30 < this.aClass100Array18.length; local30++) { - local23[local30] = this.aClass100Array18[local30]; + if (this.ops != null) { + for (@Pc(30) int local30 = 0; local30 < this.ops.length; local30++) { + local23[local30] = this.ops[local30]; } } - this.aClass100Array18 = local23; + this.ops = local23; } - this.aClass100Array18[arg1] = arg0; + this.ops[arg1] = arg0; } @OriginalMember(owner = "client!be", name = "a", descriptor = "(ILclient!wa;)V") @@ -677,11 +677,11 @@ public final class Component { this.aBoolean28 = arg0.g1() == 1; } if (this.type == 4) { - this.aClass100_84 = arg0.gjstr(); + this.text = arg0.gjstr(); this.aClass100_82 = arg0.gjstr(); } if (this.type == 1 || this.type == 3 || this.type == 4) { - this.anInt474 = arg0.g4(); + this.color = arg0.g4(); } if (this.type == 3 || this.type == 4) { this.anInt492 = arg0.g4(); @@ -703,9 +703,9 @@ public final class Component { if (this.anInt461 == 65535) { this.anInt461 = -1; } - this.anInt522 = arg0.g2(); - if (this.anInt522 == 65535) { - this.anInt522 = -1; + this.modelSeqId = arg0.g2(); + if (this.modelSeqId == 65535) { + this.modelSeqId = -1; } this.anInt462 = arg0.g2(); if (this.anInt462 == 65535) { @@ -726,7 +726,7 @@ public final class Component { this.anInt502 = -1; } this.aBoolean28 = arg0.g1() == 1; - this.anInt474 = arg0.g4(); + this.color = arg0.g4(); this.anInt512 = arg0.g2s(); this.anInt516 = arg0.g2s(); local175 = arg0.g1(); @@ -743,7 +743,7 @@ public final class Component { } } if (this.type == 8) { - this.aClass100_84 = arg0.gjstr(); + this.text = arg0.gjstr(); } if (this.anInt530 == 2 || this.type == 2) { this.aClass100_86 = arg0.gjstr(); @@ -1041,9 +1041,9 @@ public final class Component { this.modelYAngle = arg0.g2(); this.modelYOffset = arg0.g2(); this.modelZoom = arg0.g2(); - this.anInt522 = arg0.g2(); - if (this.anInt522 == 65535) { - this.anInt522 = -1; + this.modelSeqId = arg0.g2(); + if (this.modelSeqId == 65535) { + this.modelSeqId = -1; } this.aBoolean22 = arg0.g1() == 1; this.aShort11 = (short) arg0.g2(); @@ -1061,21 +1061,21 @@ public final class Component { if (this.anInt502 == 65535) { this.anInt502 = -1; } - this.aClass100_84 = arg0.gjstr(); + this.text = arg0.gjstr(); this.anInt467 = arg0.g1(); this.anInt460 = arg0.g1(); this.anInt478 = arg0.g1(); this.aBoolean28 = arg0.g1() == 1; - this.anInt474 = arg0.g4(); + this.color = arg0.g4(); } if (this.type == 3) { - this.anInt474 = arg0.g4(); + this.color = arg0.g4(); this.aBoolean30 = arg0.g1() == 1; this.anInt476 = arg0.g1(); } if (this.type == 9) { this.anInt490 = arg0.g1(); - this.anInt474 = arg0.g4(); + this.color = arg0.g4(); this.aBoolean20 = arg0.g1() == 1; } local175 = arg0.g3(); @@ -1099,14 +1099,14 @@ public final class Component { local471 = arg0.g1(); } } - this.aClass100_88 = arg0.gjstr(); + this.opBase = arg0.gjstr(); local497 = arg0.g1(); @Pc(557) int local557 = local497 & 0xF; @Pc(567) int local567; if (local557 > 0) { - this.aClass100Array18 = new JagString[local557]; + this.ops = new JagString[local557]; for (local567 = 0; local567 < local557; local567++) { - this.aClass100Array18[local567] = arg0.gjstr(); + this.ops[local567] = arg0.gjstr(); } } @Pc(584) int local584 = local497 >> 4; diff --git a/client/src/main/java/CreateManager.java b/client/src/main/java/CreateManager.java index e2ef66a..127d5a2 100644 --- a/client/src/main/java/CreateManager.java +++ b/client/src/main/java/CreateManager.java @@ -92,7 +92,7 @@ public class CreateManager { Protocol.inboundBuffer.offset = 0; Protocol.socket.read(0, suggestedNames.length * 8, Protocol.inboundBuffer.data); for (local120 = 0; local120 < suggestedNames.length; local120++) { - suggestedNames[local120] = Base37.decodeLowerCase(Protocol.inboundBuffer.g8()); + suggestedNames[local120] = Base37.decode37(Protocol.inboundBuffer.g8()); } reply = 21; step = 0; diff --git a/client/src/main/java/Cross.java b/client/src/main/java/Cross.java new file mode 100644 index 0000000..3b63aa7 --- /dev/null +++ b/client/src/main/java/Cross.java @@ -0,0 +1,12 @@ +import org.openrs2.deob.annotation.OriginalMember; + +public class Cross { + @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; +} diff --git a/client/src/main/java/DelayedStateChange.java b/client/src/main/java/DelayedStateChange.java index 841f72a..6566d20 100644 --- a/client/src/main/java/DelayedStateChange.java +++ b/client/src/main/java/DelayedStateChange.java @@ -1,6 +1,7 @@ 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!da") public final class DelayedStateChange extends SecondaryNode { @@ -35,6 +36,81 @@ public final class DelayedStateChange extends SecondaryNode { 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 = Static238.method4143(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) { + @Pc(10) DelayedStateChange local10 = Static238.method4143(2, arg1); + local10.pushServer(); + local10.stringArg = arg0; + } + + @OriginalMember(owner = "client!mc", name = "c", descriptor = "(III)V") + public static void method2905(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(14) DelayedStateChange local14 = Static238.method4143(7, arg0); + local14.pushServer(); + local14.intArg1 = arg1; + } + + @OriginalMember(owner = "client!ke", name = "c", descriptor = "(III)V") + public static void method2606(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(8) DelayedStateChange local8 = Static238.method4143(1, arg0); + local8.pushServer(); + local8.intArg1 = arg1; + } + + @OriginalMember(owner = "client!ke", name = "a", descriptor = "(IIIBI)V") + public static void method2607(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { + @Pc(8) DelayedStateChange local8 = Static238.method4143(4, arg2); + local8.pushServer(); + local8.intArg3 = arg3; + local8.intArg2 = arg0; + local8.intArg1 = arg1; + } + + @OriginalMember(owner = "client!se", name = "a", descriptor = "(III)V") + public static void method3893(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(14) DelayedStateChange local14 = Static238.method4143(5, arg0); + local14.pushServer(); + local14.intArg1 = arg1; + } + + @OriginalMember(owner = "client!ve", name = "a", descriptor = "(BIIII)V") + public static void method4505(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { + @Pc(8) DelayedStateChange local8 = Static238.method4143(8, arg1); + local8.pushServer(); + local8.intArg2 = arg0; + local8.intArg1 = arg3; + local8.intArg3 = arg2; + } + + @OriginalMember(owner = "client!kk", name = "a", descriptor = "(IIB)V") + public static void method2649(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { + @Pc(4) DelayedStateChange local4 = Static238.method4143(6, arg1); + local4.pushServer(); + local4.intArg1 = arg0; + } + + @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIII)V") + public static void method4666(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { + @Pc(18) DelayedStateChange local18 = Static238.method4143(11, arg1); + local18.pushServer(); + local18.intArg3 = arg2; + 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 = Static238.method4143(3, arg1); + local6.pushServer(); + local6.stringArg = arg0; + } + @OriginalMember(owner = "client!da", name = "a", descriptor = "(Z)V") public final void pushClient() { this.secondaryKey = MonotonicClock.currentTimeMillis() + 500L | Long.MIN_VALUE & this.secondaryKey; diff --git a/client/src/main/java/Find.java b/client/src/main/java/Find.java new file mode 100644 index 0000000..23a8442 --- /dev/null +++ b/client/src/main/java/Find.java @@ -0,0 +1,47 @@ +import org.openrs2.deob.annotation.OriginalArg; +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") + 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(); + } + Static202.method3656(local113, results); + } +} diff --git a/client/src/main/java/Font.java b/client/src/main/java/Font.java index 3c71d21..e3e9a92 100644 --- a/client/src/main/java/Font.java +++ b/client/src/main/java/Font.java @@ -7,6 +7,80 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!rk") public abstract class Font extends SecondaryNode { + @OriginalMember(owner = "client!rk", name = "K", descriptor = "Lclient!na;") + public static final JagString TAG_GT = JagString.parse("gt"); + @OriginalMember(owner = "client!rk", name = "L", descriptor = "Lclient!na;") + public static final JagString TAG_LT = JagString.parse("lt"); + @OriginalMember(owner = "client!rk", name = "M", descriptor = "Lclient!na;") + public static final JagString TAG_SHAD1 = JagString.parse("shad="); + @OriginalMember(owner = "client!rk", name = "N", descriptor = "Lclient!na;") + public static final JagString TAB_SHY = JagString.parse("shy"); + @OriginalMember(owner = "client!rk", name = "O", descriptor = "Lclient!na;") + public static final JagString TAG_TRANS1 = JagString.parse("trans="); + @OriginalMember(owner = "client!rk", name = "P", descriptor = "Lclient!na;") + public static final JagString TAG_U1 = JagString.parse("u="); + @OriginalMember(owner = "client!rk", name = "Q", descriptor = "Lclient!na;") + public static final JagString TAG_STR1 = JagString.parse("str="); + @OriginalMember(owner = "client!rk", name = "R", descriptor = "Lclient!na;") + public static final JagString TAB_EURO = JagString.parse("euro"); + @OriginalMember(owner = "client!rk", name = "T", descriptor = "Lclient!na;") + public static final JagString TAG_COL2 = JagString.parse(")4col"); + @OriginalMember(owner = "client!rk", name = "X", descriptor = "Lclient!na;") + public static final JagString TAG_SHAD3 = JagString.parse(")4shad"); + @OriginalMember(owner = "client!rk", name = "Y", descriptor = "Lclient!na;") + public static final JagString TAG_COL1 = JagString.parse("col="); + @OriginalMember(owner = "client!rk", name = "bb", descriptor = "Lclient!na;") + public static final JagString TAG_U2 = JagString.parse("u"); + @OriginalMember(owner = "client!rk", name = "cb", descriptor = "Lclient!na;") + public static final JagString TAB_TIMES = JagString.parse("times"); + @OriginalMember(owner = "client!rk", name = "eb", descriptor = "Lclient!na;") + public static final JagString TAG_TRANS2 = JagString.parse(")4trans"); + @OriginalMember(owner = "client!rk", name = "fb", descriptor = "Lclient!na;") + public static final JagString TAG_NBSP = JagString.parse("nbsp"); + @OriginalMember(owner = "client!rk", name = "ib", descriptor = "Lclient!na;") + public static final JagString TAG_U3 = JagString.parse(")4u"); + @OriginalMember(owner = "client!rk", name = "kb", descriptor = "Lclient!na;") + public static final JagString TAG_BR = JagString.parse("br"); + @OriginalMember(owner = "client!rk", name = "lb", descriptor = "Lclient!na;") + public static final JagString TAG_SHAD2 = JagString.parse("shad"); + @OriginalMember(owner = "client!rk", name = "mb", descriptor = "Lclient!na;") + public static final JagString TAG_IMG = JagString.parse("img="); + @OriginalMember(owner = "client!rk", name = "ob", descriptor = "Lclient!na;") + public static final JagString TAB_COPY = JagString.parse("copy"); + @OriginalMember(owner = "client!rk", name = "pb", descriptor = "Lclient!na;") + public static final JagString TAG_STR3 = JagString.parse(")4str"); + @OriginalMember(owner = "client!rk", name = "qb", descriptor = "Lclient!na;") + public static final JagString TAG_REG = JagString.parse("reg"); + @OriginalMember(owner = "client!rk", name = "rb", descriptor = "Lclient!na;") + public static final JagString TAG_STR2 = JagString.parse("str"); + @OriginalMember(owner = "client!rk", name = "sb", descriptor = "Lclient!na;") + public static final JagString buffer = Static87.allocate(100); + @OriginalMember(owner = "client!rk", name = "Ab", descriptor = "[Lclient!na;") + public static final JagString[] lines = new JagString[100]; + @OriginalMember(owner = "client!rk", name = "Z", descriptor = "Lclient!na;") + private static final JagString aClass100_706 = JagString.parse(""); + @OriginalMember(owner = "client!rk", name = "hb", descriptor = "Lclient!na;") + private static final JagString aClass100_711 = JagString.parse(""); + @OriginalMember(owner = "client!rk", name = "tb", descriptor = "I") + public static int strikethroughColor = -1; + @OriginalMember(owner = "client!rk", name = "ub", descriptor = "I") + public static int underlineColor = -1; + @OriginalMember(owner = "client!rk", name = "vb", descriptor = "I") + public static int anInt3629 = 0; + @OriginalMember(owner = "client!rk", name = "wb", descriptor = "I") + public static int color = 0; + @OriginalMember(owner = "client!rk", name = "xb", descriptor = "I") + public static int alphaOverride = 256; + @OriginalMember(owner = "client!rk", name = "yb", descriptor = "I") + public static int alpha = 256; + @OriginalMember(owner = "client!rk", name = "zb", descriptor = "I") + public static int shadowColor = -1; + @OriginalMember(owner = "client!rk", name = "Bb", descriptor = "I") + public static int shadowColorOverride = -1; + @OriginalMember(owner = "client!rk", name = "Cb", descriptor = "I") + public static int colorOverride = 0; + @OriginalMember(owner = "client!rk", name = "Db", descriptor = "I") + public static int spaceWidth = 0; @OriginalMember(owner = "client!rk", name = "W", descriptor = "[I") private int[] nameIconHeights; @@ -66,6 +140,62 @@ public abstract class Font extends SecondaryNode { this.decode(arg0); } + @OriginalMember(owner = "client!rk", name = "c", descriptor = "(Lclient!na;)Lclient!na;") + public static JagString escape(@OriginalArg(0) JagString arg0) { + @Pc(3) int local3 = arg0.length(); + @Pc(5) int local5 = 0; + @Pc(15) int local15; + for (@Pc(7) int local7 = 0; local7 < local3; local7++) { + local15 = arg0.charAt(local7); + if (local15 == 60 || local15 == 62) { + local5 += 3; + } + } + @Pc(30) JagString local30 = Static87.allocate(local3 + local5); + for (local15 = 0; local15 < local3; local15++) { + @Pc(40) int local40 = arg0.charAt(local15); + if (local40 == 60) { + local30.method3113(aClass100_711); + } else if (local40 == 62) { + local30.method3113(aClass100_706); + } else { + local30.append(local40); + } + } + return local30; + } + + @OriginalMember(owner = "client!rk", name = "a", descriptor = "([[B[[B[I[I[III)I") + public static int method2870(@OriginalArg(0) byte[][] arg0, @OriginalArg(1) byte[][] arg1, @OriginalArg(2) int[] arg2, @OriginalArg(3) int[] arg3, @OriginalArg(4) int[] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) { + @Pc(3) int local3 = arg2[arg5]; + @Pc(9) int local9 = local3 + arg4[arg5]; + @Pc(13) int local13 = arg2[arg6]; + @Pc(19) int local19 = local13 + arg4[arg6]; + @Pc(21) int local21 = local3; + if (local13 > local3) { + local21 = local13; + } + @Pc(28) int local28 = local9; + if (local19 < local9) { + local28 = local19; + } + @Pc(37) int local37 = arg3[arg5]; + if (arg3[arg6] < local37) { + local37 = arg3[arg6]; + } + @Pc(50) byte[] local50 = arg1[arg5]; + @Pc(54) byte[] local54 = arg0[arg6]; + @Pc(58) int local58 = local21 - local3; + @Pc(62) int local62 = local21 - local13; + for (@Pc(64) int local64 = local21; local64 < local28; local64++) { + @Pc(77) int local77 = local50[local58++] + local54[local62++]; + if (local77 < local37) { + local37 = local77; + } + } + return -local37; + } + @OriginalMember(owner = "client!rk", name = "a", descriptor = "(Lclient!na;IIIIIIIII)I") public final int method2852(@OriginalArg(0) JagString 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) int arg9) { return this.renderParagraphAlpha(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); @@ -86,31 +216,31 @@ public abstract class Font extends SecondaryNode { if (local22 == 62 && local6 != -1) { @Pc(42) JagString local42 = arg0.substring(local14, local6 + 1); local6 = -1; - if (local42.strEquals(Static218.TAG_LT)) { + if (local42.strEquals(TAG_LT)) { local22 = 60; - } else if (local42.strEquals(Static218.TAG_GT)) { + } else if (local42.strEquals(TAG_GT)) { local22 = 62; - } else if (local42.strEquals(Static218.TAG_NBSP)) { + } else if (local42.strEquals(TAG_NBSP)) { local22 = 160; - } else if (local42.strEquals(Static218.TAB_SHY)) { + } else if (local42.strEquals(TAB_SHY)) { local22 = 173; - } else if (local42.strEquals(Static218.TAB_TIMES)) { + } else if (local42.strEquals(TAB_TIMES)) { local22 = 215; - } else if (local42.strEquals(Static218.TAB_EURO)) { + } else if (local42.strEquals(TAB_EURO)) { local22 = 128; - } else if (local42.strEquals(Static218.TAB_COPY)) { + } else if (local42.strEquals(TAB_COPY)) { local22 = 169; } else { - if (!local42.strEquals(Static218.TAG_REG)) { - if (local42.startsWith(Static218.TAG_IMG)) { + if (!local42.strEquals(TAG_REG)) { + if (local42.startsWith(TAG_IMG)) { try { local120 = local42.substring(4).parseInt(); @Pc(125) IndexedSprite local125 = this.nameIcons[local120]; @Pc(136) int local136 = this.nameIconHeights == null ? local125.innerHeight : this.nameIconHeights[local120]; - if (Static218.alphaOverride == 256) { + if (alphaOverride == 256) { local125.renderTransparent(arg1, local4 + this.lineHeight - local136); } else { - local125.method3335(arg1, local4 + this.lineHeight - local136, Static218.alphaOverride); + local125.method3335(arg1, local4 + this.lineHeight - local136, alphaOverride); } arg1 += local125.innerWidth; local8 = 0; @@ -131,35 +261,35 @@ public abstract class Font extends SecondaryNode { @Pc(197) int local197 = this.spriteInnerWidths[local22]; local120 = this.spriteInnerHeights[local22]; if (local22 == 32) { - if (Static218.spaceWidth > 0) { - Static218.anInt3629 += Static218.spaceWidth; - arg1 += Static218.anInt3629 >> 8; - Static218.anInt3629 &= 0xFF; + if (spaceWidth > 0) { + anInt3629 += spaceWidth; + arg1 += anInt3629 >> 8; + anInt3629 &= 0xFF; } - } else if (Static218.alphaOverride == 256) { - if (Static218.shadowColorOverride != -1) { - this.renderGlyph(local22, arg1 + this.spriteXOffsets[local22] + 1, local4 + this.spriteYOffsets[local22] + 1, local197, local120, Static218.shadowColorOverride); + } else if (alphaOverride == 256) { + if (shadowColorOverride != -1) { + this.renderGlyph(local22, arg1 + this.spriteXOffsets[local22] + 1, local4 + this.spriteYOffsets[local22] + 1, local197, local120, shadowColorOverride); } - this.renderGlyph(local22, arg1 + this.spriteXOffsets[local22], local4 + this.spriteYOffsets[local22], local197, local120, Static218.colorOverride); + this.renderGlyph(local22, arg1 + this.spriteXOffsets[local22], local4 + this.spriteYOffsets[local22], local197, local120, colorOverride); } else { - if (Static218.shadowColorOverride != -1) { - this.renderGlyphTransparent(local22, arg1 + this.spriteXOffsets[local22] + 1, local4 + this.spriteYOffsets[local22] + 1, local197, local120, Static218.shadowColorOverride, Static218.alphaOverride); + if (shadowColorOverride != -1) { + this.renderGlyphTransparent(local22, arg1 + this.spriteXOffsets[local22] + 1, local4 + this.spriteYOffsets[local22] + 1, local197, local120, shadowColorOverride, alphaOverride); } - this.renderGlyphTransparent(local22, arg1 + this.spriteXOffsets[local22], local4 + this.spriteYOffsets[local22], local197, local120, Static218.colorOverride, Static218.alphaOverride); + this.renderGlyphTransparent(local22, arg1 + this.spriteXOffsets[local22], local4 + this.spriteYOffsets[local22], local197, local120, colorOverride, alphaOverride); } @Pc(323) int local323 = this.glyphWidths[local22]; - if (Static218.strikethroughColor != -1) { + if (strikethroughColor != -1) { if (GlRenderer.enabled) { - Static46.method1174(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local323, Static218.strikethroughColor); + Static46.method1174(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local323, strikethroughColor); } else { - SoftwareRaster.drawHorizontalLine(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local323, Static218.strikethroughColor); + SoftwareRaster.drawHorizontalLine(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local323, strikethroughColor); } } - if (Static218.underlineColor != -1) { + if (underlineColor != -1) { if (GlRenderer.enabled) { - Static46.method1174(arg1, local4 + this.lineHeight + 1, local323, Static218.underlineColor); + Static46.method1174(arg1, local4 + this.lineHeight + 1, local323, underlineColor); } else { - SoftwareRaster.drawHorizontalLine(arg1, local4 + this.lineHeight + 1, local323, Static218.underlineColor); + SoftwareRaster.drawHorizontalLine(arg1, local4 + this.lineHeight + 1, local323, underlineColor); } } arg1 += local323; @@ -177,10 +307,10 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "b", descriptor = "(Lclient!na;I)I") public final int method2856(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1) { - @Pc(10) int local10 = this.splitParagraph(arg0, new int[] { arg1 }, Static218.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(Static218.lines[local14]); + @Pc(23) int local23 = this.getStringWidth(lines[local14]); if (local23 > local12) { local12 = local23; } @@ -213,23 +343,23 @@ public abstract class Font extends SecondaryNode { if (local23 == 62 && local5 != -1) { @Pc(43) JagString local43 = arg0.substring(local15, local5 + 1); local5 = -1; - if (local43.strEquals(Static218.TAG_LT)) { + if (local43.strEquals(TAG_LT)) { local23 = 60; - } else if (local43.strEquals(Static218.TAG_GT)) { + } else if (local43.strEquals(TAG_GT)) { local23 = 62; - } else if (local43.strEquals(Static218.TAG_NBSP)) { + } else if (local43.strEquals(TAG_NBSP)) { local23 = 160; - } else if (local43.strEquals(Static218.TAB_SHY)) { + } else if (local43.strEquals(TAB_SHY)) { local23 = 173; - } else if (local43.strEquals(Static218.TAB_TIMES)) { + } else if (local43.strEquals(TAB_TIMES)) { local23 = 215; - } else if (local43.strEquals(Static218.TAB_EURO)) { + } else if (local43.strEquals(TAB_EURO)) { local23 = 128; - } else if (local43.strEquals(Static218.TAB_COPY)) { + } else if (local43.strEquals(TAB_COPY)) { local23 = 169; } else { - if (!local43.strEquals(Static218.TAG_REG)) { - if (local43.startsWith(Static218.TAG_IMG)) { + if (!local43.strEquals(TAG_REG)) { + if (local43.startsWith(TAG_IMG)) { try { @Pc(121) int local121 = local43.substring(4).parseInt(); local9 += this.nameIcons[local121].innerWidth; @@ -276,40 +406,40 @@ 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 }, Static218.lines); + return this.splitParagraph(arg0, new int[] { arg1 }, lines); } @OriginalMember(owner = "client!rk", name = "b", descriptor = "(Lclient!na;)V") private void parseTag(@OriginalArg(0) JagString arg0) { try { - if (arg0.startsWith(Static218.TAG_COL1)) { - Static218.colorOverride = arg0.substring(4).parseHexString(16); - } else if (arg0.strEquals(Static218.TAG_COL2)) { - Static218.colorOverride = Static218.color; - } else if (arg0.startsWith(Static218.TAG_TRANS1)) { - Static218.alphaOverride = arg0.substring(6).parseInt(); - } else if (arg0.strEquals(Static218.TAG_TRANS2)) { - Static218.alphaOverride = Static218.alpha; - } else if (arg0.startsWith(Static218.TAG_STR1)) { - Static218.strikethroughColor = arg0.substring(4).parseHexString(16); - } else if (arg0.strEquals(Static218.TAG_STR2)) { - Static218.strikethroughColor = 0x800000; - } else if (arg0.strEquals(Static218.TAG_STR3)) { - Static218.strikethroughColor = -1; - } else if (arg0.startsWith(Static218.TAG_U1)) { - Static218.underlineColor = arg0.substring(2).parseHexString(16); - } else if (arg0.strEquals(Static218.TAG_U2)) { - Static218.underlineColor = 0; - } else if (arg0.strEquals(Static218.TAG_U3)) { - Static218.underlineColor = -1; - } else if (arg0.startsWith(Static218.TAG_SHAD1)) { - Static218.shadowColorOverride = arg0.substring(5).parseHexString(16); - } else if (arg0.strEquals(Static218.TAG_SHAD2)) { - Static218.shadowColorOverride = 0; - } else if (arg0.strEquals(Static218.TAG_SHAD3)) { - Static218.shadowColorOverride = Static218.shadowColor; - } else if (arg0.strEquals(Static218.TAG_BR)) { - this.setColors(Static218.color, Static218.shadowColor, Static218.alpha); + if (arg0.startsWith(TAG_COL1)) { + colorOverride = arg0.substring(4).parseHexString(16); + } else if (arg0.strEquals(TAG_COL2)) { + colorOverride = color; + } else if (arg0.startsWith(TAG_TRANS1)) { + alphaOverride = arg0.substring(6).parseInt(); + } else if (arg0.strEquals(TAG_TRANS2)) { + alphaOverride = alpha; + } else if (arg0.startsWith(TAG_STR1)) { + strikethroughColor = arg0.substring(4).parseHexString(16); + } else if (arg0.strEquals(TAG_STR2)) { + strikethroughColor = 0x800000; + } else if (arg0.strEquals(TAG_STR3)) { + strikethroughColor = -1; + } else if (arg0.startsWith(TAG_U1)) { + underlineColor = arg0.substring(2).parseHexString(16); + } else if (arg0.strEquals(TAG_U2)) { + underlineColor = 0; + } else if (arg0.strEquals(TAG_U3)) { + underlineColor = -1; + } else if (arg0.startsWith(TAG_SHAD1)) { + shadowColorOverride = arg0.substring(5).parseHexString(16); + } else if (arg0.strEquals(TAG_SHAD2)) { + shadowColorOverride = 0; + } else if (arg0.strEquals(TAG_SHAD3)) { + shadowColorOverride = shadowColor; + } else if (arg0.strEquals(TAG_BR)) { + this.setColors(color, shadowColor, alpha); } } catch (@Pc(144) Exception local144) { } @@ -344,7 +474,7 @@ public abstract class Font extends SecondaryNode { } } if (local1 > 0) { - Static218.spaceWidth = (arg1 - this.getStringWidth(arg0) << 8) / local1; + spaceWidth = (arg1 - this.getStringWidth(arg0) << 8) / local1; } } @@ -353,7 +483,7 @@ public abstract class Font extends SecondaryNode { if (arg0 == null) { return 0; } - Static218.buffer.method3133(0); + buffer.method3133(0); @Pc(9) int local9 = 0; @Pc(11) int local11 = 0; @Pc(13) int local13 = -1; @@ -371,70 +501,70 @@ public abstract class Font extends SecondaryNode { if (local37 == 62 && local19 != -1) { @Pc(57) JagString local57 = arg0.substring(local29, local19 + 1); local19 = -1; - Static218.buffer.append(60); - Static218.buffer.method3113(local57); - Static218.buffer.append(62); - if (local57.strEquals(Static218.TAG_BR)) { + buffer.append(60); + buffer.method3113(local57); + buffer.append(62); + if (local57.strEquals(TAG_BR)) { if (arg2[local23] == null) { - arg2[local23] = Static218.buffer.asString().substring(Static218.buffer.length(), local11); + arg2[local23] = buffer.asString().substring(buffer.length(), local11); } else { arg2[local23].method3133(0); - arg2[local23].method3122(Static218.buffer, local11, Static218.buffer.length()); + arg2[local23].method3122(buffer, local11, buffer.length()); } local23++; - local11 = Static218.buffer.length(); + local11 = buffer.length(); local9 = 0; local13 = -1; local21 = 0; - } else if (local57.strEquals(Static218.TAG_LT)) { + } else if (local57.strEquals(TAG_LT)) { local9 += this.getGlyphWidth(60); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 60]; } local21 = 60; - } else if (local57.strEquals(Static218.TAG_GT)) { + } else if (local57.strEquals(TAG_GT)) { local9 += this.getGlyphWidth(62); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 62]; } local21 = 62; - } else if (local57.strEquals(Static218.TAG_NBSP)) { + } else if (local57.strEquals(TAG_NBSP)) { local9 += this.getGlyphWidth(160); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 160]; } local21 = 160; - } else if (local57.strEquals(Static218.TAB_SHY)) { + } else if (local57.strEquals(TAB_SHY)) { local9 += this.getGlyphWidth(173); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 173]; } local21 = 173; - } else if (local57.strEquals(Static218.TAB_TIMES)) { + } else if (local57.strEquals(TAB_TIMES)) { local9 += this.getGlyphWidth(215); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 215]; } local21 = 215; - } else if (local57.strEquals(Static218.TAB_EURO)) { + } else if (local57.strEquals(TAB_EURO)) { local9 += this.getGlyphWidth(128); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 128]; } local21 = 128; - } else if (local57.strEquals(Static218.TAB_COPY)) { + } else if (local57.strEquals(TAB_COPY)) { local9 += this.getGlyphWidth(169); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 169]; } local21 = 169; - } else if (local57.strEquals(Static218.TAG_REG)) { + } else if (local57.strEquals(TAG_REG)) { local9 += this.getGlyphWidth(174); if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + 174]; } local21 = 174; - } else if (local57.startsWith(Static218.TAG_IMG)) { + } else if (local57.startsWith(TAG_IMG)) { try { @Pc(377) int local377 = local57.substring(4).parseInt(); local9 += this.nameIcons[local377].innerWidth; @@ -446,7 +576,7 @@ public abstract class Font extends SecondaryNode { } if (local19 == -1) { if (local37 != 0) { - Static218.buffer.append(local37); + buffer.append(local37); local9 += this.glyphWidths[local37]; if (this.kerning != null && local21 != 0) { local9 += this.kerning[(local21 << 8) + local37]; @@ -454,16 +584,16 @@ public abstract class Font extends SecondaryNode { local21 = local37; } if (local37 == 32) { - local13 = Static218.buffer.length(); + local13 = buffer.length(); local15 = local9; local17 = 1; } if (arg1 != null && local9 > arg1[local23 < arg1.length ? local23 : arg1.length - 1] && local13 >= 0) { if (arg2[local23] == null) { - arg2[local23] = Static218.buffer.asString().substring(local13 - local17, local11); + arg2[local23] = buffer.asString().substring(local13 - local17, local11); } else { arg2[local23].method3133(0); - arg2[local23] = arg2[local23].method3122(Static218.buffer, local11, local13 - local17); + arg2[local23] = arg2[local23].method3122(buffer, local11, local13 - local17); } local23++; local11 = local13; @@ -472,19 +602,19 @@ public abstract class Font extends SecondaryNode { local21 = 0; } if (local37 == 45) { - local13 = Static218.buffer.length(); + local13 = buffer.length(); local15 = local9; local17 = 0; } } } } - if (Static218.buffer.length() > local11) { + if (buffer.length() > local11) { if (arg2[local23] == null) { - arg2[local23] = Static218.buffer.asString().substring(Static218.buffer.length(), local11); + arg2[local23] = buffer.asString().substring(buffer.length(), local11); } else { arg2[local23].method3133(0); - arg2[local23] = arg2[local23].method3122(Static218.buffer, local11, Static218.buffer.length()); + arg2[local23] = arg2[local23].method3122(buffer, local11, buffer.length()); } local23++; } @@ -522,7 +652,7 @@ public abstract class Font extends SecondaryNode { if (arg4 < this.paragraphTopPadding + this.paragraphBottomPadding + arg9 && arg4 < arg9 + arg9) { local20 = null; } - @Pc(42) int local42 = this.splitParagraph(arg0, local20, Static218.lines); + @Pc(42) int local42 = this.splitParagraph(arg0, local20, lines); if (arg8 == 3 && local42 == 1) { arg8 = 1; } @@ -544,17 +674,17 @@ public abstract class Font extends SecondaryNode { } for (local118 = 0; local118 < local42; local118++) { if (arg7 == 0) { - this.render(Static218.lines[local118], arg1, local57); + this.render(lines[local118], arg1, local57); } else if (arg7 == 1) { - this.render(Static218.lines[local118], arg1 + (arg3 - this.getStringWidth(Static218.lines[local118])) / 2, local57); + this.render(lines[local118], arg1 + (arg3 - this.getStringWidth(lines[local118])) / 2, local57); } else if (arg7 == 2) { - this.render(Static218.lines[local118], arg1 + arg3 - this.getStringWidth(Static218.lines[local118]), local57); + this.render(lines[local118], arg1 + arg3 - this.getStringWidth(lines[local118]), local57); } else if (local118 == local42 - 1) { - this.render(Static218.lines[local118], arg1, local57); + this.render(lines[local118], arg1, local57); } else { - this.justify(Static218.lines[local118], arg3); - this.render(Static218.lines[local118], arg1, local57); - Static218.spaceWidth = 0; + this.justify(lines[local118], arg3); + this.render(lines[local118], arg1, local57); + spaceWidth = 0; } local57 += arg9; } @@ -602,16 +732,16 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "c", descriptor = "(II)V") private void setColors(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - Static218.strikethroughColor = -1; - Static218.underlineColor = -1; - Static218.shadowColor = arg1; - Static218.shadowColorOverride = arg1; - Static218.color = arg0; - Static218.colorOverride = arg0; - Static218.alpha = 256; - Static218.alphaOverride = 256; - Static218.spaceWidth = 0; - Static218.anInt3629 = 0; + strikethroughColor = -1; + underlineColor = -1; + shadowColor = arg1; + shadowColorOverride = arg1; + color = arg0; + colorOverride = arg0; + alpha = 256; + alphaOverride = 256; + spaceWidth = 0; + anInt3629 = 0; } @OriginalMember(owner = "client!rk", name = "c", descriptor = "(Lclient!na;IIII)V") @@ -671,7 +801,7 @@ public abstract class Font extends SecondaryNode { if (local138 != 32 && local138 != 160) { for (local109 = 0; local109 < 256; local109++) { if (local109 != 32 && local109 != 160) { - this.kerning[(local138 << 8) + local109] = (byte) Static218.method2870(local93, local136, local58, this.glyphWidths, local55, local138, local109); + this.kerning[(local138 << 8) + local109] = (byte) method2870(local93, local136, local58, this.glyphWidths, local55, local138, local109); } } } @@ -681,16 +811,16 @@ public abstract class Font extends SecondaryNode { @OriginalMember(owner = "client!rk", name = "a", descriptor = "(III)V") private void setColors(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - Static218.strikethroughColor = -1; - Static218.underlineColor = -1; - Static218.shadowColor = arg1; - Static218.shadowColorOverride = arg1; - Static218.color = arg0; - Static218.colorOverride = arg0; - Static218.alpha = arg2; - Static218.alphaOverride = arg2; - Static218.spaceWidth = 0; - Static218.anInt3629 = 0; + strikethroughColor = -1; + underlineColor = -1; + shadowColor = arg1; + shadowColorOverride = arg1; + color = arg0; + colorOverride = arg0; + alpha = arg2; + alphaOverride = arg2; + spaceWidth = 0; + anInt3629 = 0; } @OriginalMember(owner = "client!rk", name = "a", descriptor = "(Lclient!na;IIIIIIIILjava/util/Random;I[I)I") @@ -756,23 +886,23 @@ public abstract class Font extends SecondaryNode { if (local24 == 62 && local6 != -1) { @Pc(44) JagString local44 = arg0.substring(local16, local6 + 1); local6 = -1; - if (local44.strEquals(Static218.TAG_LT)) { + if (local44.strEquals(TAG_LT)) { local24 = 60; - } else if (local44.strEquals(Static218.TAG_GT)) { + } else if (local44.strEquals(TAG_GT)) { local24 = 62; - } else if (local44.strEquals(Static218.TAG_NBSP)) { + } else if (local44.strEquals(TAG_NBSP)) { local24 = 160; - } else if (local44.strEquals(Static218.TAB_SHY)) { + } else if (local44.strEquals(TAB_SHY)) { local24 = 173; - } else if (local44.strEquals(Static218.TAB_TIMES)) { + } else if (local44.strEquals(TAB_TIMES)) { local24 = 215; - } else if (local44.strEquals(Static218.TAB_EURO)) { + } else if (local44.strEquals(TAB_EURO)) { local24 = 128; - } else if (local44.strEquals(Static218.TAB_COPY)) { + } else if (local44.strEquals(TAB_COPY)) { local24 = 169; } else { - if (!local44.strEquals(Static218.TAG_REG)) { - if (local44.startsWith(Static218.TAG_IMG)) { + if (!local44.strEquals(TAG_REG)) { + if (local44.startsWith(TAG_IMG)) { try { if (arg3 == null) { local121 = 0; @@ -788,10 +918,10 @@ public abstract class Font extends SecondaryNode { local141 = local44.substring(4).parseInt(); @Pc(146) IndexedSprite local146 = this.nameIcons[local141]; @Pc(157) int local157 = this.nameIconHeights == null ? local146.innerHeight : this.nameIconHeights[local141]; - if (Static218.alphaOverride == 256) { + if (alphaOverride == 256) { local146.renderTransparent(arg1 + local121, local4 + this.lineHeight - local157 + local130); } else { - local146.method3335(arg1 + local121, local4 + this.lineHeight - local157 + local130, Static218.alphaOverride); + local146.method3335(arg1 + local121, local4 + this.lineHeight - local157 + local130, alphaOverride); } arg1 += local146.innerWidth; local8 = 0; @@ -823,35 +953,35 @@ public abstract class Font extends SecondaryNode { } local10++; if (local24 == 32) { - if (Static218.spaceWidth > 0) { - Static218.anInt3629 += Static218.spaceWidth; - arg1 += Static218.anInt3629 >> 8; - Static218.anInt3629 &= 0xFF; + if (spaceWidth > 0) { + anInt3629 += spaceWidth; + arg1 += anInt3629 >> 8; + anInt3629 &= 0xFF; } - } else if (Static218.alphaOverride == 256) { - if (Static218.shadowColorOverride != -1) { - this.renderGlyph(local24, arg1 + this.spriteXOffsets[local24] + local130 + 1, local4 + this.spriteYOffsets[local24] + 1 + local141, local226, local121, Static218.shadowColorOverride); + } else if (alphaOverride == 256) { + if (shadowColorOverride != -1) { + this.renderGlyph(local24, arg1 + this.spriteXOffsets[local24] + local130 + 1, local4 + this.spriteYOffsets[local24] + 1 + local141, local226, local121, shadowColorOverride); } - this.renderGlyph(local24, arg1 + this.spriteXOffsets[local24] + local130, local4 + this.spriteYOffsets[local24] + local141, local226, local121, Static218.colorOverride); + this.renderGlyph(local24, arg1 + this.spriteXOffsets[local24] + local130, local4 + this.spriteYOffsets[local24] + local141, local226, local121, colorOverride); } else { - if (Static218.shadowColorOverride != -1) { - this.renderGlyphTransparent(local24, arg1 + this.spriteXOffsets[local24] + local130 + 1, local4 + this.spriteYOffsets[local24] + 1 + local141, local226, local121, Static218.shadowColorOverride, Static218.alphaOverride); + if (shadowColorOverride != -1) { + this.renderGlyphTransparent(local24, arg1 + this.spriteXOffsets[local24] + local130 + 1, local4 + this.spriteYOffsets[local24] + 1 + local141, local226, local121, shadowColorOverride, alphaOverride); } - this.renderGlyphTransparent(local24, arg1 + this.spriteXOffsets[local24] + local130, local4 + this.spriteYOffsets[local24] + local141, local226, local121, Static218.colorOverride, Static218.alphaOverride); + this.renderGlyphTransparent(local24, arg1 + this.spriteXOffsets[local24] + local130, local4 + this.spriteYOffsets[local24] + local141, local226, local121, colorOverride, alphaOverride); } @Pc(387) int local387 = this.glyphWidths[local24]; - if (Static218.strikethroughColor != -1) { + if (strikethroughColor != -1) { if (GlRenderer.enabled) { - Static46.method1174(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local387, Static218.strikethroughColor); + Static46.method1174(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local387, strikethroughColor); } else { - SoftwareRaster.drawHorizontalLine(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local387, Static218.strikethroughColor); + SoftwareRaster.drawHorizontalLine(arg1, local4 + (int) ((double) this.lineHeight * 0.7D), local387, strikethroughColor); } } - if (Static218.underlineColor != -1) { + if (underlineColor != -1) { if (GlRenderer.enabled) { - Static46.method1174(arg1, local4 + this.lineHeight, local387, Static218.underlineColor); + Static46.method1174(arg1, local4 + this.lineHeight, local387, underlineColor); } else { - SoftwareRaster.drawHorizontalLine(arg1, local4 + this.lineHeight, local387, Static218.underlineColor); + SoftwareRaster.drawHorizontalLine(arg1, local4 + this.lineHeight, local387, underlineColor); } } arg1 += local387; diff --git a/client/src/main/java/FontMetricsList.java b/client/src/main/java/FontMetricsList.java index 151d3e3..a134c1c 100644 --- a/client/src/main/java/FontMetricsList.java +++ b/client/src/main/java/FontMetricsList.java @@ -1,6 +1,21 @@ +import org.openrs2.deob.annotation.OriginalArg; 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!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.getFile(arg0, 0); + local16 = new SoftwareFont(local26); + local16.setNameIcons(Sprites.nameIcons, null); + fontMetrics.put(local16, (long) arg0); + return local16; + } } diff --git a/client/src/main/java/FriendsList.java b/client/src/main/java/FriendsList.java index 9fcbfa6..427381c 100644 --- a/client/src/main/java/FriendsList.java +++ b/client/src/main/java/FriendsList.java @@ -1,6 +1,109 @@ +import org.openrs2.deob.annotation.OriginalArg; 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;") + public static final JagString[] usernames = new JagString[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") + public static int size = 0; + + @OriginalMember(owner = "client!hj", name = "a", descriptor = "(Lclient!na;B)Z") + public static boolean contains(@OriginalArg(0) JagString arg0) { + if (arg0 == null) { + return false; + } + for (@Pc(12) int local12 = 0; local12 < size; local12++) { + if (arg0.equalsIgnoreCase(usernames[local12])) { + return true; + } + } + if (arg0.equalsIgnoreCase(PlayerList.self.username)) { + return true; + } else { + return false; + } + } + + @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; + Static3.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]; + Static3.aBooleanArray135[local41] = Static3.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.p1a(arg1); + Protocol.outboundBuffer.p8(arg0.encode37()); + } } diff --git a/client/src/main/java/GameShell.java b/client/src/main/java/GameShell.java index e800ea3..40d8962 100644 --- a/client/src/main/java/GameShell.java +++ b/client/src/main/java/GameShell.java @@ -451,24 +451,16 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene if (Keyboard.pressedKeys[Keyboard.KEY_UP] || Keyboard.pressedKeys[Keyboard.KEY_DOWN] || Keyboard.pressedKeys[Keyboard.KEY_LEFT] || Keyboard.pressedKeys[Keyboard.KEY_RIGHT]) { double vertical = calcRenderDelta(18.0d); if (Keyboard.pressedKeys[Keyboard.KEY_UP]) { - Camera.pitchDirection = 0; Camera.pitchTarget += vertical; } else if (Keyboard.pressedKeys[Keyboard.KEY_DOWN]) { - Camera.pitchDirection = 1; Camera.pitchTarget -= vertical; - } else { - Camera.pitchDirection = -1; } double horizontal = calcRenderDelta(24.0d); if (Keyboard.pressedKeys[Keyboard.KEY_LEFT]) { - Camera.yawDirection = 1; Camera.yawTarget -= horizontal; } else if (Keyboard.pressedKeys[Keyboard.KEY_RIGHT]) { - Camera.yawDirection = 0; Camera.yawTarget += horizontal; - } else { - Camera.yawDirection = -1; } Camera.clampCameraAngle(); diff --git a/client/src/main/java/GlFont.java b/client/src/main/java/GlFont.java index ee6aca6..3a1ae88 100644 --- a/client/src/main/java/GlFont.java +++ b/client/src/main/java/GlFont.java @@ -8,7 +8,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!mb") public final class GlFont extends Font { - @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") @@ -30,6 +32,19 @@ public final class GlFont extends Font { this.createLists(); } + @OriginalMember(owner = "client!dj", name = "a", descriptor = "()V") + public static void method1173() { + masked = null; + } + + @OriginalMember(owner = "client!dj", name = "a", descriptor = "(Lclient!cf;)V") + public static void method1188(@OriginalArg(0) GlSprite arg0) { + if (arg0.anInt1859 != Static46.anInt1441 - Static46.clipY) { + throw new IllegalArgumentException(); + } + masked = arg0; + } + @OriginalMember(owner = "client!mb", name = "finalize", descriptor = "()V") @Override protected void finalize() throws Throwable { @@ -51,7 +66,7 @@ public final class GlFont extends Font { @Override protected final void renderGlyph(@OriginalArg(0) int glyph, @OriginalArg(1) int x, @OriginalArg(2) int y, @OriginalArg(3) int width, @OriginalArg(4) int height, @OriginalArg(5) int color) { @Pc(4) GL2 gl; - if (Static46.mask == null) { + if (masked == null) { GlRenderer.method4151(); gl = GlRenderer.gl; GlRenderer.setTextureId(this.textureId); @@ -70,7 +85,7 @@ public final class GlFont extends Font { @Pc(51) float s1 = s0 + (float) this.spriteInnerWidths[glyph] / (float) this.powerOfTwoSize; @Pc(63) float t1 = t0 + (float) this.spriteInnerHeights[glyph] / (float) this.powerOfTwoSize; GlRenderer.setTextureId(this.textureId); - @Pc(68) GlSprite mask = Static46.mask; + @Pc(68) GlSprite mask = masked; gl.glActiveTexture(GL2.GL_TEXTURE1); gl.glEnable(GL2.GL_TEXTURE_2D); gl.glBindTexture(GL2.GL_TEXTURE_2D, mask.textureId); diff --git a/client/src/main/java/GlModel.java b/client/src/main/java/GlModel.java index 547fe26..4ed4820 100644 --- a/client/src/main/java/GlModel.java +++ b/client/src/main/java/GlModel.java @@ -10,8 +10,50 @@ 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!td", name = "bb", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_1 = new GlModel(); + @OriginalMember(owner = "client!td", name = "jb", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_2 = new GlModel(); + @OriginalMember(owner = "client!td", name = "mb", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_3 = new GlModel(); + @OriginalMember(owner = "client!td", name = "nb", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_4 = new GlModel(); + @OriginalMember(owner = "client!td", name = "ob", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_5 = new GlModel(); + @OriginalMember(owner = "client!td", name = "pb", descriptor = "Lclient!td;") + public static GlModel aClass8_Sub1_Sub1_6 = new GlModel(); + @OriginalMember(owner = "client!td", name = "qb", descriptor = "[I") + public static int[] anIntArray467 = new int[1]; + @OriginalMember(owner = "client!td", name = "ub", descriptor = "[I") + public static int[] anIntArray468 = new int[1]; + @OriginalMember(owner = "client!td", name = "Bb", descriptor = "Z") + public static boolean aBoolean260 = false; + @OriginalMember(owner = "client!td", name = "Ab", descriptor = "F") + public static float aFloat29; + @OriginalMember(owner = "client!td", name = "G", descriptor = "[J") + public static long[] aLongArray10; + @OriginalMember(owner = "client!td", name = "T", descriptor = "Ljava/nio/ByteBuffer;") + public static ByteBuffer aByteBuffer9; + @OriginalMember(owner = "client!td", name = "rb", descriptor = "F") + public static float aFloat24; + @OriginalMember(owner = "client!td", name = "sb", descriptor = "I") + public static int anInt5298; + @OriginalMember(owner = "client!td", name = "tb", descriptor = "F") + public static float aFloat25; + @OriginalMember(owner = "client!td", name = "vb", descriptor = "I") + public static int anInt5299; + @OriginalMember(owner = "client!td", name = "wb", descriptor = "F") + public static float aFloat26; + @OriginalMember(owner = "client!td", name = "xb", descriptor = "F") + public static float aFloat27; + @OriginalMember(owner = "client!td", name = "yb", descriptor = "I") + public static int anInt5300; + @OriginalMember(owner = "client!td", name = "zb", descriptor = "F") + public static float aFloat28; - @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") @@ -216,7 +258,7 @@ public final class GlModel extends Model { this.aShort29 = (short) arg1; this.aShort28 = (short) arg2; this.aShortArray81 = new short[local117]; - Static237.aLongArray10 = new long[local117]; + aLongArray10 = new long[local117]; local125 = 0; for (local127 = 0; local127 < arg0.anInt2139; local127++) { local226 = this.anIntArray462[local127]; @@ -319,7 +361,7 @@ public final class GlModel extends Model { local714 = (float) arg0.aShortArray25[local459] / 1024.0F; local685 = (float) arg0.aShortArray21[local459] / 1024.0F; } - local433[local459] = Static237.method4097(arg0.aShortArray26[local459], arg0.aShortArray20[local459], arg0.aShortArray28[local459], arg0.aByteArray27[local459] & 0xFF, local683, local714, local685); + local433[local459] = method4097(arg0.aShortArray26[local459], arg0.aShortArray20[local459], arg0.aShortArray28[local459], arg0.aByteArray27[local459] & 0xFF, local683, local714, local685); } } } @@ -435,15 +477,15 @@ public final class GlModel extends Model { local952 = (float) arg0.aByteArray34[local833] / 256.0F; if (local902 == 1) { local960 = (float) (arg0.aShortArray21[local833] & 0xFFFF) / 1024.0F; - Static237.method4095(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local1288, local960, local1293, local952); - local854 = Static237.aFloat26; - local856 = Static237.aFloat28; - Static237.method4095(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local1288, local960, local1293, local952); - local858 = Static237.aFloat26; - local683 = Static237.aFloat28; - Static237.method4095(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local1288, local960, local1293, local952); - local714 = Static237.aFloat26; - local685 = Static237.aFloat28; + method4095(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local1288, local960, local1293, local952); + local854 = aFloat26; + local856 = aFloat28; + method4095(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local1288, local960, local1293, local952); + local858 = aFloat26; + local683 = aFloat28; + method4095(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local1288, local960, local1293, local952); + local714 = aFloat26; + local685 = aFloat28; local968 = local960 / 2.0F; if ((local1293 & 0x1) == 0) { if (local858 - local854 > local968) { @@ -494,26 +536,26 @@ public final class GlModel extends Model { local1072 = ((float) local1583 * local1288[0] + (float) local1591 * local1288[1] + (float) local1599 * local1288[2]) / local1048; local1080 = ((float) local1583 * local1288[3] + (float) local1591 * local1288[4] + (float) local1599 * local1288[5]) / local1056; local1088 = ((float) local1583 * local1288[6] + (float) local1591 * local1288[7] + (float) local1599 * local1288[8]) / local1064; - local553 = Static237.method4092(local1072, local1080, local1088); - Static237.method4104(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); - local854 = Static237.aFloat27; - local856 = Static237.aFloat24; - Static237.method4104(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); - local858 = Static237.aFloat27; - local683 = Static237.aFloat24; - Static237.method4104(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); - local714 = Static237.aFloat27; - local685 = Static237.aFloat24; + local553 = method4092(local1072, local1080, local1088); + method4104(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); + local854 = aFloat27; + local856 = aFloat24; + method4104(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); + local858 = aFloat27; + local683 = aFloat24; + method4104(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local553, local1288, local1293, local952, local960, local968); + local714 = aFloat27; + local685 = aFloat24; } else if (local902 == 3) { - Static237.method4101(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local1288, local1293, local952); - local854 = Static237.aFloat29; - local856 = Static237.aFloat25; - Static237.method4101(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local1288, local1293, local952); - local858 = Static237.aFloat29; - local683 = Static237.aFloat25; - Static237.method4101(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local1288, local1293, local952); - local714 = Static237.aFloat29; - local685 = Static237.aFloat25; + method4101(arg0.anIntArray202[local909], arg0.anIntArray201[local909], arg0.anIntArray203[local909], local1276, local1280, local1284, local1288, local1293, local952); + local854 = aFloat29; + local856 = aFloat25; + method4101(arg0.anIntArray202[local914], arg0.anIntArray201[local914], arg0.anIntArray203[local914], local1276, local1280, local1284, local1288, local1293, local952); + local858 = aFloat29; + local683 = aFloat25; + method4101(arg0.anIntArray202[local919], arg0.anIntArray201[local919], arg0.anIntArray203[local919], local1276, local1280, local1284, local1288, local1293, local952); + local714 = aFloat29; + local685 = aFloat25; if ((local1293 & 0x1) == 0) { if (local858 - local854 > 0.5F) { local858--; @@ -609,19 +651,266 @@ public final class GlModel extends Model { } } this.anIntArray463[local439] = this.anInt5297; - Static237.aLongArray10 = null; - this.aShortArray76 = Static237.method4119(this.aShortArray76, this.anInt5296); - this.aShortArray79 = Static237.method4119(this.aShortArray79, this.anInt5296); - this.aShortArray85 = Static237.method4119(this.aShortArray85, this.anInt5296); - this.aShortArray86 = Static237.method4119(this.aShortArray86, this.anInt5296); - this.aFloatArray25 = Static237.method4112(this.aFloatArray25, this.anInt5296); - this.aFloatArray26 = Static237.method4112(this.aFloatArray26, this.anInt5296); + aLongArray10 = null; + this.aShortArray76 = method4119(this.aShortArray76, this.anInt5296); + this.aShortArray79 = method4119(this.aShortArray79, this.anInt5296); + this.aShortArray85 = method4119(this.aShortArray85, this.anInt5296); + this.aShortArray86 = method4119(this.aShortArray86, this.anInt5296); + this.aFloatArray25 = method4112(this.aFloatArray25, this.anInt5296); + this.aFloatArray26 = method4112(this.aFloatArray26, this.anInt5296); + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(FFF)I") + public static int method4092(@OriginalArg(0) float arg0, @OriginalArg(1) float arg1, @OriginalArg(2) float arg2) { + @Pc(8) float local8 = arg0 < 0.0F ? -arg0 : arg0; + @Pc(17) float local17 = arg1 < 0.0F ? -arg1 : arg1; + @Pc(26) float local26 = arg2 < 0.0F ? -arg2 : arg2; + if (local17 > local8 && local17 > local26) { + return arg1 > 0.0F ? 0 : 1; + } else if (local26 > local8 && local26 > local17) { + return arg2 > 0.0F ? 2 : 3; + } else if (arg0 > 0.0F) { + return 4; + } else { + return 5; + } + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIII[FFIF)V") + public static void method4095(@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) float[] arg6, @OriginalArg(7) float arg7, @OriginalArg(8) int arg8, @OriginalArg(9) float arg9) { + @Pc(3) int local3 = arg0 - arg3; + @Pc(7) int local7 = arg1 - arg4; + @Pc(11) int local11 = arg2 - arg5; + @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; + if (arg7 != 1.0F) { + local85 *= arg7; + } + @Pc(99) float local99 = local53 + arg9 + 0.5F; + @Pc(104) float local104; + if (arg8 == 1) { + local104 = local85; + local85 = -local99; + local99 = local104; + } else if (arg8 == 2) { + local85 = -local85; + local99 = -local99; + } else if (arg8 == 3) { + local104 = local85; + local85 = local99; + local99 = -local104; + } + aFloat26 = local85; + aFloat28 = local99; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(ISIB)I") + public static int method4096(@OriginalArg(0) int arg0, @OriginalArg(1) short arg1, @OriginalArg(2) int arg2, @OriginalArg(3) byte arg3) { + @Pc(5) int local5 = Rasteriser.palette[Static268.method4585(arg0, arg2)]; + if (arg1 != -1) { + @Pc(15) int local15 = Rasteriser.textureProvider.method3238(arg1 & 0xFFFF); + @Pc(21) int local21; + @Pc(44) int local44; + if (local15 != 0) { + if (arg2 < 0) { + local21 = 0; + } else if (arg2 > 127) { + local21 = 16777215; + } else { + local21 = arg2 * 131586; + } + if (local15 == 256) { + local5 = local21; + } else { + local44 = 256 - local15; + local5 = ((local21 & 0xFF00FF) * local15 + (local5 & 0xFF00FF) * local44 & 0xFF00FF00) + ((local21 & 0xFF00) * local15 + (local5 & 0xFF00) * local44 & 0xFF0000) >> 8; + } + } + local21 = Rasteriser.textureProvider.method3229(arg1 & 0xFFFF); + if (local21 != 0) { + local21 += 256; + @Pc(92) int local92 = (local5 >> 16 & 0xFF) * local21; + if (local92 > 65535) { + local92 = 65535; + } + local44 = (local5 >> 8 & 0xFF) * local21; + if (local44 > 65535) { + local44 = 65535; + } + @Pc(116) int local116 = (local5 & 0xFF) * local21; + if (local116 > 65535) { + local116 = 65535; + } + local5 = ((local92 & 0xFF00) << 8) + (local44 & 0xFF00) + (local116 >> 8); + } + } + return (local5 << 8) + (255 - (arg3 & 0xFF)); + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIFFF)[F") + 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)); + local2[0] = local13; + local2[1] = 0.0F; + local2[2] = local21; + local2[3] = 0.0F; + local2[4] = 1.0F; + local2[5] = 0.0F; + local2[6] = -local21; + local2[7] = 0.0F; + local2[8] = local13; + @Pc(65) float[] local65 = new float[9]; + @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(88) float local88 = 1.0F - local74; + @Pc(99) float local99 = (float) Math.sqrt((double) (arg0 * arg0 + arg2 * arg2)); + if (local99 == 0.0F && local74 == 0.0F) { + local5 = local2; + } else { + if (local99 != 0.0F) { + local67 = (float) -arg2 / local99; + local69 = (float) arg0 / local99; + } + local65[0] = local74 + local67 * local67 * local88; + local65[1] = local69 * local84; + local65[2] = local69 * local67 * local88; + local65[3] = -local69 * local84; + local65[4] = local74; + local65[5] = local67 * local84; + local65[6] = local67 * local69 * local88; + local65[7] = -local67 * local84; + local65[8] = local74 + local69 * local69 * local88; + local5[0] = local2[0] * local65[0] + local2[1] * local65[3] + local2[2] * local65[6]; + local5[1] = local2[0] * local65[1] + local2[1] * local65[4] + local2[2] * local65[7]; + local5[2] = local2[0] * local65[2] + local2[1] * local65[5] + local2[2] * local65[8]; + local5[3] = local2[3] * local65[0] + local2[4] * local65[3] + local2[5] * local65[6]; + local5[4] = local2[3] * local65[1] + local2[4] * local65[4] + local2[5] * local65[7]; + local5[5] = local2[3] * local65[2] + local2[4] * local65[5] + local2[5] * local65[8]; + local5[6] = local2[6] * local65[0] + local2[7] * local65[3] + local2[8] * local65[6]; + local5[7] = local2[6] * local65[1] + local2[7] * local65[4] + local2[8] * local65[7]; + local5[8] = local2[6] * local65[2] + local2[7] * local65[5] + local2[8] * local65[8]; + } + local5[0] *= arg4; + local5[1] *= arg4; + local5[2] *= arg4; + local5[3] *= arg5; + local5[4] *= arg5; + local5[5] *= arg5; + local5[6] *= arg6; + local5[7] *= arg6; + local5[8] *= arg6; + return local5; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIII[FIF)V") + public static void method4101(@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) float[] arg6, @OriginalArg(7) int arg7, @OriginalArg(8) float arg8) { + @Pc(3) int local3 = arg0 - arg3; + @Pc(7) int local7 = arg1 - arg4; + @Pc(11) int local11 = arg2 - arg5; + @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(118) float local118; + if (arg7 == 1) { + local118 = local100; + local100 = -local113; + local113 = local118; + } else if (arg7 == 2) { + local100 = -local100; + local113 = -local113; + } else if (arg7 == 3) { + local118 = local100; + local100 = local113; + local113 = -local118; + } + aFloat29 = local100; + aFloat25 = local113; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIII[FIFFF)V") + public static void method4104(@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) float[] arg7, @OriginalArg(8) int arg8, @OriginalArg(9) float arg9, @OriginalArg(10) float arg10, @OriginalArg(11) float arg11) { + @Pc(3) int local3 = arg0 - arg3; + @Pc(7) int local7 = arg1 - arg4; + @Pc(11) int local11 = arg2 - arg5; + @Pc(32) float local32 = (float) local3 * arg7[0] + (float) local7 * arg7[1] + (float) local11 * arg7[2]; + @Pc(53) float local53 = (float) local3 * arg7[3] + (float) local7 * arg7[4] + (float) local11 * arg7[5]; + @Pc(74) float local74 = (float) local3 * arg7[6] + (float) local7 * arg7[7] + (float) local11 * arg7[8]; + @Pc(82) float local82; + @Pc(89) float local89; + if (arg6 == 0) { + local82 = local32 + arg9 + 0.5F; + local89 = arg11 + 0.5F - local74; + } else if (arg6 == 1) { + local82 = local32 + arg9 + 0.5F; + local89 = local74 + arg11 + 0.5F; + } else if (arg6 == 2) { + local82 = arg9 + 0.5F - local32; + local89 = arg10 + 0.5F - local53; + } else if (arg6 == 3) { + local82 = local32 + arg9 + 0.5F; + local89 = arg10 + 0.5F - local53; + } else if (arg6 == 4) { + local82 = local74 + arg11 + 0.5F; + local89 = arg10 + 0.5F - local53; + } else { + local82 = arg11 + 0.5F - local74; + local89 = arg10 + 0.5F - local53; + } + @Pc(177) float local177; + if (arg8 == 1) { + local177 = local82; + local82 = -local89; + local89 = local177; + } else if (arg8 == 2) { + local82 = -local82; + local89 = -local89; + } else if (arg8 == 3) { + local177 = local82; + local82 = local89; + local89 = -local177; + } + aFloat27 = local82; + aFloat24 = local89; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "([FI)[F") + public static float[] method4112(@OriginalArg(0) float[] arg0, @OriginalArg(1) int arg1) { + @Pc(2) float[] local2 = new float[arg1]; + Static289.method2615(arg0, 0, local2, 0, arg1); + return local2; + } + + @OriginalMember(owner = "client!td", name = "a", descriptor = "([SI)[S") + public static short[] method4119(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1) { + @Pc(2) short[] local2 = new short[arg1]; + Static289.method2616(arg0, 0, local2, 0, arg1); + return local2; + } + + @OriginalMember(owner = "client!td", name = "v", descriptor = "()V") + public static void method4120() { + aClass8_Sub1_Sub1_1 = new GlModel(); + aClass8_Sub1_Sub1_2 = new GlModel(); + aClass8_Sub1_Sub1_3 = new GlModel(); + aClass8_Sub1_Sub1_4 = new GlModel(); + aClass8_Sub1_Sub1_5 = new GlModel(); + aClass8_Sub1_Sub1_6 = new GlModel(); } @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, Static237.aClass8_Sub1_Sub1_4, Static237.aClass8_Sub1_Sub1_3); + return this.method4114(arg0, arg1, arg2, aClass8_Sub1_Sub1_4, aClass8_Sub1_Sub1_3); } @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIIIIJILclient!ga;)V") @@ -746,9 +1035,9 @@ public final class GlModel extends Model { if (this.aBoolean303) { Static259.aLongArray11[Static2.anInt7++] = arg8; } else { - if (Static237.anIntArray468.length < this.anInt5296) { - Static237.anIntArray468 = new int[this.anInt5296]; - Static237.anIntArray467 = new int[this.anInt5296]; + if (anIntArray468.length < this.anInt5296) { + anIntArray468 = new int[this.anInt5296]; + anIntArray467 = new int[this.anInt5296]; } local362 = 0; label118: while (true) { @@ -761,7 +1050,7 @@ public final class GlModel extends Model { @Pc(698) short local698 = this.aShortArray77[local362]; @Pc(703) short local703 = this.aShortArray82[local362]; @Pc(708) short local708 = this.aShortArray83[local362]; - if (this.method4118(Static150.anInt3582, Static34.anInt1053, Static237.anIntArray467[local698], Static237.anIntArray467[local703], Static237.anIntArray467[local708], Static237.anIntArray468[local698], Static237.anIntArray468[local703], Static237.anIntArray468[local708])) { + if (this.method4118(Static150.anInt3582, Static34.anInt1053, anIntArray467[local698], anIntArray467[local703], anIntArray467[local708], anIntArray468[local698], anIntArray468[local703], anIntArray468[local708])) { Static259.aLongArray11[Static2.anInt7++] = arg8; break label118; } @@ -796,8 +1085,8 @@ public final class GlModel extends Model { if (local671 == -1) { break; } - Static237.anIntArray468[local671] = local465; - Static237.anIntArray467[local671] = local471; + anIntArray468[local671] = local465; + anIntArray467[local671] = local471; } local362++; } @@ -906,7 +1195,7 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "b", descriptor = "(ZZZ)Lclient!ak;") @Override public final Model method4568(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2) { - return this.method4114(arg0, arg1, arg2, Static237.aClass8_Sub1_Sub1_6, Static237.aClass8_Sub1_Sub1_5); + return this.method4114(arg0, arg1, arg2, aClass8_Sub1_Sub1_6, aClass8_Sub1_Sub1_5); } @OriginalMember(owner = "client!td", name = "a", descriptor = "(Lclient!th;IIIZ)V") @@ -1090,12 +1379,12 @@ public final class GlModel extends Model { local13 = local15; break; } - if (Static237.aLongArray10[local15] == arg2) { + if (aLongArray10[local15] == arg2) { return (short) (local23 - 1); } } this.aShortArray81[local13] = (short) (this.anInt5296 + 1); - Static237.aLongArray10[local13] = arg2; + aLongArray10[local13] = arg2; this.aShortArray76[this.anInt5296] = (short) arg3; this.aShortArray79[this.anInt5296] = (short) arg4; this.aShortArray85[this.anInt5296] = (short) arg5; @@ -1133,9 +1422,9 @@ public final class GlModel extends Model { arg3 <<= 0x4; arg4 <<= 0x4; local18 = 0; - Static237.anInt5298 = 0; - Static237.anInt5300 = 0; - Static237.anInt5299 = 0; + anInt5298 = 0; + anInt5300 = 0; + anInt5299 = 0; for (local26 = 0; local26 < local2; local26++) { local33 = arg1[local26]; if (local33 < this.anIntArrayArray36.length) { @@ -1143,23 +1432,23 @@ public final class GlModel extends Model { for (local45 = 0; local45 < local43.length; local45++) { local53 = local43[local45]; if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local53]) != 0) { - Static237.anInt5298 += this.anIntArray461[local53]; - Static237.anInt5300 += this.anIntArray465[local53]; - Static237.anInt5299 += this.anIntArray466[local53]; + anInt5298 += this.anIntArray461[local53]; + anInt5300 += this.anIntArray465[local53]; + anInt5299 += this.anIntArray466[local53]; local18++; } } } } if (local18 > 0) { - Static237.anInt5298 = Static237.anInt5298 / local18 + arg2; - Static237.anInt5300 = Static237.anInt5300 / local18 + arg3; - Static237.anInt5299 = Static237.anInt5299 / local18 + arg4; - Static237.aBoolean260 = true; + anInt5298 = anInt5298 / local18 + arg2; + anInt5300 = anInt5300 / local18 + arg3; + anInt5299 = anInt5299 / local18 + arg4; + aBoolean260 = true; } else { - Static237.anInt5298 = arg2; - Static237.anInt5300 = arg3; - Static237.anInt5299 = arg4; + anInt5298 = arg2; + anInt5300 = arg3; + anInt5299 = arg4; } return; } @@ -1224,9 +1513,9 @@ public final class GlModel extends Model { for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { - this.anIntArray461[local45] -= Static237.anInt5298; - this.anIntArray465[local45] -= Static237.anInt5300; - this.anIntArray466[local45] -= Static237.anInt5299; + this.anIntArray461[local45] -= anInt5298; + this.anIntArray465[local45] -= anInt5300; + this.anIntArray466[local45] -= anInt5299; if (arg4 != 0) { local53 = MathUtils.sin[arg4]; local343 = MathUtils.cos[arg4]; @@ -1248,9 +1537,9 @@ public final class GlModel extends Model { this.anIntArray466[local45] = this.anIntArray466[local45] * local343 + 32767 - this.anIntArray461[local45] * local53 >> 16; this.anIntArray461[local45] = local365; } - this.anIntArray461[local45] += Static237.anInt5298; - this.anIntArray465[local45] += Static237.anInt5300; - this.anIntArray466[local45] += Static237.anInt5299; + this.anIntArray461[local45] += anInt5298; + this.anIntArray465[local45] += anInt5300; + this.anIntArray466[local45] += anInt5299; } } } @@ -1307,17 +1596,17 @@ public final class GlModel extends Model { local230 = arg7[12] << 4; local45 = arg7[13] << 4; local53 = arg7[14] << 4; - if (Static237.aBoolean260) { - local343 = arg7[0] * Static237.anInt5298 + arg7[3] * Static237.anInt5300 + arg7[6] * Static237.anInt5299 + 16384 >> 15; - local365 = arg7[1] * Static237.anInt5298 + arg7[4] * Static237.anInt5300 + arg7[7] * Static237.anInt5299 + 16384 >> 15; - local387 = arg7[2] * Static237.anInt5298 + arg7[5] * Static237.anInt5300 + arg7[8] * Static237.anInt5299 + 16384 >> 15; + if (aBoolean260) { + local343 = arg7[0] * anInt5298 + arg7[3] * anInt5300 + arg7[6] * anInt5299 + 16384 >> 15; + local365 = arg7[1] * anInt5298 + arg7[4] * anInt5300 + arg7[7] * anInt5299 + 16384 >> 15; + local387 = arg7[2] * anInt5298 + arg7[5] * anInt5300 + arg7[8] * anInt5299 + 16384 >> 15; local343 += local230; local365 += local45; local387 += local53; - Static237.anInt5298 = local343; - Static237.anInt5300 = local365; - Static237.anInt5299 = local387; - Static237.aBoolean260 = false; + anInt5298 = local343; + anInt5300 = local365; + anInt5299 = local387; + aBoolean260 = false; } @Pc(410) int[] local410 = new int[9]; local365 = MathUtils.cos[arg2] >> 1; @@ -1337,12 +1626,12 @@ public final class GlModel extends Model { local410[6] = -local434 * local440 + local428 * local462 + 16384 >> 15; local410[7] = local434 * local446 + local428 * local454 + 16384 >> 15; local410[8] = local428 * local365 + 16384 >> 15; - @Pc(590) int local590 = local410[0] * -Static237.anInt5298 + local410[1] * -Static237.anInt5300 + local410[2] * -Static237.anInt5299 + 16384 >> 15; - local615 = local410[3] * -Static237.anInt5298 + local410[4] * -Static237.anInt5300 + local410[5] * -Static237.anInt5299 + 16384 >> 15; - local640 = local410[6] * -Static237.anInt5298 + local410[7] * -Static237.anInt5300 + local410[8] * -Static237.anInt5299 + 16384 >> 15; - local644 = local590 + Static237.anInt5298; - @Pc(648) int local648 = local615 + Static237.anInt5300; - local652 = local640 + Static237.anInt5299; + @Pc(590) int local590 = local410[0] * -anInt5298 + local410[1] * -anInt5300 + local410[2] * -anInt5299 + 16384 >> 15; + local615 = local410[3] * -anInt5298 + local410[4] * -anInt5300 + local410[5] * -anInt5299 + 16384 >> 15; + local640 = local410[6] * -anInt5298 + local410[7] * -anInt5300 + local410[8] * -anInt5299 + 16384 >> 15; + local644 = local590 + anInt5298; + @Pc(648) int local648 = local615 + anInt5300; + local652 = local640 + anInt5299; @Pc(655) int[] local655 = new int[9]; for (local657 = 0; local657 < 3; local657++) { for (local662 = 0; local662 < 3; local662++) { @@ -1405,15 +1694,15 @@ public final class GlModel extends Model { for (local230 = 0; local230 < local228.length; local230++) { local45 = local228[local230]; if (this.aShortArray84 == null || (arg6 & this.aShortArray84[local45]) != 0) { - this.anIntArray461[local45] -= Static237.anInt5298; - this.anIntArray465[local45] -= Static237.anInt5300; - this.anIntArray466[local45] -= Static237.anInt5299; + this.anIntArray461[local45] -= anInt5298; + this.anIntArray465[local45] -= anInt5300; + this.anIntArray466[local45] -= anInt5299; this.anIntArray461[local45] = this.anIntArray461[local45] * arg2 >> 7; this.anIntArray465[local45] = this.anIntArray465[local45] * arg3 >> 7; this.anIntArray466[local45] = this.anIntArray466[local45] * arg4 >> 7; - this.anIntArray461[local45] += Static237.anInt5298; - this.anIntArray465[local45] += Static237.anInt5300; - this.anIntArray466[local45] += Static237.anInt5299; + this.anIntArray461[local45] += anInt5298; + this.anIntArray465[local45] += anInt5300; + this.anIntArray466[local45] += anInt5299; } } } @@ -1425,27 +1714,27 @@ public final class GlModel extends Model { local230 = arg7[12] << 4; local45 = arg7[13] << 4; local53 = arg7[14] << 4; - if (Static237.aBoolean260) { - local343 = arg7[0] * Static237.anInt5298 + arg7[3] * Static237.anInt5300 + arg7[6] * Static237.anInt5299 + 16384 >> 15; - local365 = arg7[1] * Static237.anInt5298 + arg7[4] * Static237.anInt5300 + arg7[7] * Static237.anInt5299 + 16384 >> 15; - local387 = arg7[2] * Static237.anInt5298 + arg7[5] * Static237.anInt5300 + arg7[8] * Static237.anInt5299 + 16384 >> 15; + if (aBoolean260) { + local343 = arg7[0] * anInt5298 + arg7[3] * anInt5300 + arg7[6] * anInt5299 + 16384 >> 15; + local365 = arg7[1] * anInt5298 + arg7[4] * anInt5300 + arg7[7] * anInt5299 + 16384 >> 15; + local387 = arg7[2] * anInt5298 + arg7[5] * anInt5300 + arg7[8] * anInt5299 + 16384 >> 15; local343 += local230; local365 += local45; local387 += local53; - Static237.anInt5298 = local343; - Static237.anInt5300 = local365; - Static237.anInt5299 = local387; - Static237.aBoolean260 = false; + anInt5298 = local343; + anInt5300 = local365; + anInt5299 = local387; + aBoolean260 = false; } local343 = arg2 << 15 >> 7; local365 = arg3 << 15 >> 7; local387 = arg4 << 15 >> 7; - local428 = local343 * -Static237.anInt5298 + 16384 >> 15; - local434 = local365 * -Static237.anInt5300 + 16384 >> 15; - local440 = local387 * -Static237.anInt5299 + 16384 >> 15; - local446 = local428 + Static237.anInt5298; - local454 = local434 + Static237.anInt5300; - local462 = local440 + Static237.anInt5299; + local428 = local343 * -anInt5298 + 16384 >> 15; + local434 = local365 * -anInt5300 + 16384 >> 15; + local440 = local387 * -anInt5299 + 16384 >> 15; + 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 }; local615 = local343 * local230 + 16384 >> 15; local640 = local365 * local45 + 16384 >> 15; @@ -1659,7 +1948,7 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "c", descriptor = "(ZZZ)Lclient!ak;") @Override public final Model method4572(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2) { - return this.method4114(arg0, arg1, arg2, Static237.aClass8_Sub1_Sub1_2, Static237.aClass8_Sub1_Sub1_1); + return this.method4114(arg0, arg1, arg2, aClass8_Sub1_Sub1_2, aClass8_Sub1_Sub1_1); } @OriginalMember(owner = "client!td", name = "e", descriptor = "()V") @@ -1675,28 +1964,28 @@ public final class GlModel extends Model { @OriginalMember(owner = "client!td", name = "q", descriptor = "()V") private void method4103() { - if (Static237.aClass3_Sub15_8.data.length < this.anInt5296 * 12) { - Static237.aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * 12); + if (aClass3_Sub15_8.data.length < this.anInt5296 * 12) { + aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * 12); } else { - Static237.aClass3_Sub15_8.offset = 0; + aClass3_Sub15_8.offset = 0; } @Pc(25) int local25; if (GlRenderer.bigEndian) { for (local25 = 0; local25 < this.anInt5297; local25++) { - Static237.aClass3_Sub15_8.p4(this.aShortArray77[local25]); - Static237.aClass3_Sub15_8.p4(this.aShortArray82[local25]); - Static237.aClass3_Sub15_8.p4(this.aShortArray83[local25]); + aClass3_Sub15_8.p4(this.aShortArray77[local25]); + aClass3_Sub15_8.p4(this.aShortArray82[local25]); + aClass3_Sub15_8.p4(this.aShortArray83[local25]); } } else { for (local25 = 0; local25 < this.anInt5297; local25++) { - Static237.aClass3_Sub15_8.p4le(this.aShortArray77[local25]); - Static237.aClass3_Sub15_8.p4le(this.aShortArray82[local25]); - Static237.aClass3_Sub15_8.p4le(this.aShortArray83[local25]); + aClass3_Sub15_8.p4le(this.aShortArray77[local25]); + aClass3_Sub15_8.p4le(this.aShortArray82[local25]); + aClass3_Sub15_8.p4le(this.aShortArray83[local25]); } } if (!GlRenderer.arbVboSupported) { - @Pc(115) ByteBuffer local115 = ByteBuffer.allocateDirect(Static237.aClass3_Sub15_8.offset); - local115.put(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); + @Pc(115) ByteBuffer local115 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset); + local115.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); local115.flip(); this.aClass127_5.valid = true; this.aClass127_5.aByteBuffer8 = local115; @@ -1704,7 +1993,7 @@ public final class GlModel extends Model { return; } @Pc(88) GlVertexBufferObject local88 = new GlVertexBufferObject(); - @Pc(95) ByteBuffer local95 = ByteBuffer.wrap(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); + @Pc(95) ByteBuffer local95 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); local88.method4519(local95); this.aClass127_5.valid = true; this.aClass127_5.aByteBuffer8 = null; @@ -1728,9 +2017,9 @@ public final class GlModel extends Model { this.anIntArray465[local6] <<= 0x4; this.anIntArray466[local6] <<= 0x4; } - Static237.anInt5298 = 0; - Static237.anInt5300 = 0; - Static237.anInt5299 = 0; + anInt5298 = 0; + anInt5300 = 0; + anInt5299 = 0; return true; } @@ -2024,10 +2313,10 @@ public final class GlModel extends Model { if (local1 == 0) { return; } - if (Static237.aClass3_Sub15_8.data.length < this.anInt5296 * local1) { - Static237.aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * local1); + if (aClass3_Sub15_8.data.length < this.anInt5296 * local1) { + aClass3_Sub15_8 = new Buffer((this.anInt5296 + 100) * local1); } else { - Static237.aClass3_Sub15_8.offset = 0; + aClass3_Sub15_8.offset = 0; } @Pc(60) int local60; @Pc(71) int local71; @@ -2050,10 +2339,10 @@ public final class GlModel extends Model { if (local109 == -1) { break; } - Static237.aClass3_Sub15_8.offset = local109 * local1; - Static237.aClass3_Sub15_8.p4(local71); - Static237.aClass3_Sub15_8.p4(local78); - Static237.aClass3_Sub15_8.p4(local85); + aClass3_Sub15_8.offset = local109 * local1; + aClass3_Sub15_8.p4(local71); + aClass3_Sub15_8.p4(local78); + aClass3_Sub15_8.p4(local85); } } } else { @@ -2068,10 +2357,10 @@ public final class GlModel extends Model { if (local109 == -1) { break; } - Static237.aClass3_Sub15_8.offset = local109 * local1; - Static237.aClass3_Sub15_8.p4le(local71); - Static237.aClass3_Sub15_8.p4le(local78); - Static237.aClass3_Sub15_8.p4le(local85); + aClass3_Sub15_8.offset = local109 * local1; + aClass3_Sub15_8.p4le(local71); + aClass3_Sub15_8.p4le(local78); + aClass3_Sub15_8.p4le(local85); } } } @@ -2079,13 +2368,13 @@ public final class GlModel extends Model { if (arg2) { if (Preferences.highDetailLighting) { for (local60 = 0; local60 < this.anInt5297; local60++) { - local71 = Static237.method4096(this.aShortArray75[local60], this.aShortArray80[local60], this.aShort29, this.aByteArray71[local60]); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray77[local60] * local1; - Static237.aClass3_Sub15_8.p4(local71); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray82[local60] * local1; - Static237.aClass3_Sub15_8.p4(local71); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray83[local60] * local1; - Static237.aClass3_Sub15_8.p4(local71); + local71 = method4096(this.aShortArray75[local60], this.aShortArray80[local60], this.aShort29, this.aByteArray71[local60]); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray77[local60] * local1; + aClass3_Sub15_8.p4(local71); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray82[local60] * local1; + aClass3_Sub15_8.p4(local71); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + this.aShortArray83[local60] * local1; + aClass3_Sub15_8.p4(local71); } } else { local60 = (int) Static161.aFloatArray18[0]; @@ -2149,15 +2438,15 @@ public final class GlModel extends Model { } this.aShortArray86[local458] = (short) (-local469 - 1); } - @Pc(562) int local562 = Static237.method4096(this.aShortArray75[local99], this.aShortArray80[local99], local281, this.aByteArray71[local99]); - @Pc(577) int local577 = Static237.method4096(this.aShortArray75[local99], this.aShortArray80[local99], local375, this.aByteArray71[local99]); - @Pc(592) int local592 = Static237.method4096(this.aShortArray75[local99], this.aShortArray80[local99], local469, this.aByteArray71[local99]); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local270 * local1; - Static237.aClass3_Sub15_8.p4(local562); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local364 * local1; - Static237.aClass3_Sub15_8.p4(local577); - Static237.aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local458 * local1; - Static237.aClass3_Sub15_8.p4(local592); + @Pc(562) int local562 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local281, this.aByteArray71[local99]); + @Pc(577) int local577 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local375, this.aByteArray71[local99]); + @Pc(592) int local592 = method4096(this.aShortArray75[local99], this.aShortArray80[local99], local469, this.aByteArray71[local99]); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local270 * local1; + aClass3_Sub15_8.p4(local562); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local364 * local1; + aClass3_Sub15_8.p4(local577); + aClass3_Sub15_8.offset = this.aClass127_1.anInt4777 + local458 * local1; + aClass3_Sub15_8.p4(local592); } this.aShortArray76 = null; this.aShortArray79 = null; @@ -2167,62 +2456,62 @@ public final class GlModel extends Model { if (arg3) { @Pc(723) float local723 = 3.0F / (float) this.aShort28; @Pc(734) float local734 = 3.0F / (float) (this.aShort28 + this.aShort28 / 2); - Static237.aClass3_Sub15_8.offset = this.aClass127_2.anInt4777; + aClass3_Sub15_8.offset = this.aClass127_2.anInt4777; @Pc(752) short local752; @Pc(790) float local790; if (GlRenderer.bigEndian) { for (local78 = 0; local78 < this.anInt5296; local78++) { local752 = this.aShortArray86[local78]; if (local752 == 0) { - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local734); - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local734); - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local734); + aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local734); + aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local734); + aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local734); } else { local790 = local723 / (float) local752; - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local790); - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local790); - Static237.aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local790); + aClass3_Sub15_8.pFloat((float) this.aShortArray76[local78] * local790); + aClass3_Sub15_8.pFloat((float) this.aShortArray79[local78] * local790); + aClass3_Sub15_8.pFloat((float) this.aShortArray85[local78] * local790); } - Static237.aClass3_Sub15_8.offset += local1 - 12; + aClass3_Sub15_8.offset += local1 - 12; } } else { for (local78 = 0; local78 < this.anInt5296; local78++) { local752 = this.aShortArray86[local78]; if (local752 == 0) { - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local734); - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local734); - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local734); + aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local734); + aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local734); + aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local734); } else { local790 = local723 / (float) local752; - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local790); - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local790); - Static237.aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local790); + aClass3_Sub15_8.gFloat((float) this.aShortArray76[local78] * local790); + aClass3_Sub15_8.gFloat((float) this.aShortArray79[local78] * local790); + aClass3_Sub15_8.gFloat((float) this.aShortArray85[local78] * local790); } - Static237.aClass3_Sub15_8.offset += local1 - 12; + aClass3_Sub15_8.offset += local1 - 12; } } } if (arg4) { - Static237.aClass3_Sub15_8.offset = this.aClass127_3.anInt4777; + aClass3_Sub15_8.offset = this.aClass127_3.anInt4777; if (GlRenderer.bigEndian) { for (local60 = 0; local60 < this.anInt5296; local60++) { - Static237.aClass3_Sub15_8.pFloat(this.aFloatArray25[local60]); - Static237.aClass3_Sub15_8.pFloat(this.aFloatArray26[local60]); - Static237.aClass3_Sub15_8.offset += local1 - 8; + aClass3_Sub15_8.pFloat(this.aFloatArray25[local60]); + aClass3_Sub15_8.pFloat(this.aFloatArray26[local60]); + aClass3_Sub15_8.offset += local1 - 8; } } else { for (local60 = 0; local60 < this.anInt5296; local60++) { - Static237.aClass3_Sub15_8.gFloat(this.aFloatArray25[local60]); - Static237.aClass3_Sub15_8.gFloat(this.aFloatArray26[local60]); - Static237.aClass3_Sub15_8.offset += local1 - 8; + aClass3_Sub15_8.gFloat(this.aFloatArray25[local60]); + aClass3_Sub15_8.gFloat(this.aFloatArray26[local60]); + aClass3_Sub15_8.offset += local1 - 8; } } } - Static237.aClass3_Sub15_8.offset = local1 * this.anInt5296; + aClass3_Sub15_8.offset = local1 * this.anInt5296; @Pc(1007) ByteBuffer local1007; if (arg0) { if (arbVboSupported) { - local1007 = ByteBuffer.wrap(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); + local1007 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); if (this.aClass155_5 == null) { this.aClass155_5 = new GlVertexBufferObject(true); this.aClass155_5.method4519(local1007); @@ -2254,41 +2543,41 @@ public final class GlModel extends Model { this.aClass127_3.anInt4782 = local1; } } else { - if (Static237.aByteBuffer9 == null || Static237.aByteBuffer9.capacity() < Static237.aClass3_Sub15_8.offset) { - Static237.aByteBuffer9 = ByteBuffer.allocateDirect(Static237.aClass3_Sub15_8.offset + local1 * 100); + if (aByteBuffer9 == null || aByteBuffer9.capacity() < aClass3_Sub15_8.offset) { + aByteBuffer9 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset + local1 * 100); } else { - Static237.aByteBuffer9.clear(); + aByteBuffer9.clear(); } - Static237.aByteBuffer9.put(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); - Static237.aByteBuffer9.flip(); + aByteBuffer9.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); + aByteBuffer9.flip(); if (arg1) { this.bounds.valid = true; - this.bounds.aByteBuffer8 = Static237.aByteBuffer9; + this.bounds.aByteBuffer8 = aByteBuffer9; this.bounds.aClass155_4 = null; this.bounds.anInt4782 = local1; } if (arg2) { this.aClass127_1.valid = true; - this.aClass127_1.aByteBuffer8 = Static237.aByteBuffer9; + this.aClass127_1.aByteBuffer8 = aByteBuffer9; this.bounds.aClass155_4 = null; this.aClass127_1.anInt4782 = local1; } if (arg3) { this.aClass127_2.valid = true; - this.aClass127_2.aByteBuffer8 = Static237.aByteBuffer9; + this.aClass127_2.aByteBuffer8 = aByteBuffer9; this.aClass127_2.aClass155_4 = null; this.aClass127_2.anInt4782 = local1; } if (arg4) { this.aClass127_3.valid = true; - this.aClass127_3.aByteBuffer8 = Static237.aByteBuffer9; + this.aClass127_3.aByteBuffer8 = aByteBuffer9; this.aClass127_3.aClass155_4 = null; this.aClass127_3.anInt4782 = local1; } } } else if (GlRenderer.arbVboSupported) { @Pc(1211) GlVertexBufferObject local1211 = new GlVertexBufferObject(); - @Pc(1218) ByteBuffer local1218 = ByteBuffer.wrap(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); + @Pc(1218) ByteBuffer local1218 = ByteBuffer.wrap(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); local1211.method4519(local1218); if (arg1) { this.bounds.valid = true; @@ -2315,8 +2604,8 @@ public final class GlModel extends Model { this.aClass127_3.anInt4782 = local1; } } else { - local1007 = ByteBuffer.allocateDirect(Static237.aClass3_Sub15_8.offset); - local1007.put(Static237.aClass3_Sub15_8.data, 0, Static237.aClass3_Sub15_8.offset); + local1007 = ByteBuffer.allocateDirect(aClass3_Sub15_8.offset); + local1007.put(aClass3_Sub15_8.data, 0, aClass3_Sub15_8.offset); local1007.flip(); if (arg1) { this.bounds.valid = true; @@ -2637,30 +2926,30 @@ public final class GlModel extends Model { local12 = arg3 << 4; local16 = arg4 << 4; local18 = 0; - Static237.anInt5298 = 0; - Static237.anInt5300 = 0; - Static237.anInt5299 = 0; + anInt5298 = 0; + anInt5300 = 0; + anInt5299 = 0; for (local26 = 0; local26 < local2; local26++) { @Pc(33) int local33 = arg1[local26]; if (local33 < this.anIntArrayArray36.length) { @Pc(43) int[] local43 = this.anIntArrayArray36[local33]; for (local45 = 0; local45 < local43.length; local45++) { local53 = local43[local45]; - Static237.anInt5298 += this.anIntArray461[local53]; - Static237.anInt5300 += this.anIntArray465[local53]; - Static237.anInt5299 += this.anIntArray466[local53]; + anInt5298 += this.anIntArray461[local53]; + anInt5300 += this.anIntArray465[local53]; + anInt5299 += this.anIntArray466[local53]; local18++; } } } if (local18 > 0) { - Static237.anInt5298 = Static237.anInt5298 / local18 + local8; - Static237.anInt5300 = Static237.anInt5300 / local18 + local12; - Static237.anInt5299 = Static237.anInt5299 / local18 + local16; + anInt5298 = anInt5298 / local18 + local8; + anInt5300 = anInt5300 / local18 + local12; + anInt5299 = anInt5299 / local18 + local16; } else { - Static237.anInt5298 = local8; - Static237.anInt5300 = local12; - Static237.anInt5299 = local16; + anInt5298 = local8; + anInt5300 = local12; + anInt5299 = local16; } return; } @@ -2694,9 +2983,9 @@ public final class GlModel extends Model { local141 = this.anIntArrayArray36[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; - this.anIntArray461[local45] -= Static237.anInt5298; - this.anIntArray465[local45] -= Static237.anInt5300; - this.anIntArray466[local45] -= Static237.anInt5299; + this.anIntArray461[local45] -= anInt5298; + this.anIntArray465[local45] -= anInt5300; + this.anIntArray466[local45] -= anInt5299; if (arg4 != 0) { local53 = MathUtils.sin[arg4]; local246 = MathUtils.cos[arg4]; @@ -2718,9 +3007,9 @@ public final class GlModel extends Model { this.anIntArray466[local45] = this.anIntArray466[local45] * local246 + 32767 - this.anIntArray461[local45] * local53 >> 16; this.anIntArray461[local45] = local264; } - this.anIntArray461[local45] += Static237.anInt5298; - this.anIntArray465[local45] += Static237.anInt5300; - this.anIntArray466[local45] += Static237.anInt5299; + this.anIntArray461[local45] += anInt5298; + this.anIntArray465[local45] += anInt5300; + this.anIntArray466[local45] += anInt5299; } } } @@ -2777,15 +3066,15 @@ public final class GlModel extends Model { local141 = this.anIntArrayArray36[local26]; for (local143 = 0; local143 < local141.length; local143++) { local45 = local141[local143]; - this.anIntArray461[local45] -= Static237.anInt5298; - this.anIntArray465[local45] -= Static237.anInt5300; - this.anIntArray466[local45] -= Static237.anInt5299; + this.anIntArray461[local45] -= anInt5298; + this.anIntArray465[local45] -= anInt5300; + this.anIntArray466[local45] -= anInt5299; this.anIntArray461[local45] = this.anIntArray461[local45] * arg2 >> 7; this.anIntArray465[local45] = this.anIntArray465[local45] * arg3 >> 7; this.anIntArray466[local45] = this.anIntArray466[local45] * arg4 >> 7; - this.anIntArray461[local45] += Static237.anInt5298; - this.anIntArray465[local45] += Static237.anInt5300; - this.anIntArray466[local45] += Static237.anInt5299; + this.anIntArray461[local45] += anInt5298; + this.anIntArray465[local45] += anInt5300; + this.anIntArray466[local45] += anInt5299; } } } @@ -2852,23 +3141,23 @@ public final class GlModel extends Model { @Pc(11) int local11; if (arg0 == 0) { local3 = 0; - Static237.anInt5298 = 0; - Static237.anInt5300 = 0; - Static237.anInt5299 = 0; + anInt5298 = 0; + anInt5300 = 0; + anInt5299 = 0; for (local11 = 0; local11 < this.vertexCount; local11++) { - Static237.anInt5298 += this.anIntArray461[local11]; - Static237.anInt5300 += this.anIntArray465[local11]; - Static237.anInt5299 += this.anIntArray466[local11]; + anInt5298 += this.anIntArray461[local11]; + anInt5300 += this.anIntArray465[local11]; + anInt5299 += this.anIntArray466[local11]; local3++; } if (local3 > 0) { - Static237.anInt5298 = Static237.anInt5298 / local3 + arg1; - Static237.anInt5300 = Static237.anInt5300 / local3 + arg2; - Static237.anInt5299 = Static237.anInt5299 / local3 + arg3; + anInt5298 = anInt5298 / local3 + arg1; + anInt5300 = anInt5300 / local3 + arg2; + anInt5299 = anInt5299 / local3 + arg3; } else { - Static237.anInt5298 = arg1; - Static237.anInt5300 = arg2; - Static237.anInt5299 = arg3; + anInt5298 = arg1; + anInt5300 = arg2; + anInt5299 = arg3; } } else if (arg0 == 1) { for (local3 = 0; local3 < this.vertexCount; local3++) { @@ -2881,9 +3170,9 @@ public final class GlModel extends Model { @Pc(164) int local164; if (arg0 == 2) { for (local3 = 0; local3 < this.vertexCount; local3++) { - this.anIntArray461[local3] -= Static237.anInt5298; - this.anIntArray465[local3] -= Static237.anInt5300; - this.anIntArray466[local3] -= Static237.anInt5299; + this.anIntArray461[local3] -= anInt5298; + this.anIntArray465[local3] -= anInt5300; + this.anIntArray466[local3] -= anInt5299; if (arg3 != 0) { local11 = MathUtils.sin[arg3]; local146 = MathUtils.cos[arg3]; @@ -2905,21 +3194,21 @@ public final class GlModel extends Model { this.anIntArray466[local3] = this.anIntArray466[local3] * local146 + 32767 - this.anIntArray461[local3] * local11 >> 16; this.anIntArray461[local3] = local164; } - this.anIntArray461[local3] += Static237.anInt5298; - this.anIntArray465[local3] += Static237.anInt5300; - this.anIntArray466[local3] += Static237.anInt5299; + this.anIntArray461[local3] += anInt5298; + this.anIntArray465[local3] += anInt5300; + this.anIntArray466[local3] += anInt5299; } } else if (arg0 == 3) { for (local3 = 0; local3 < this.vertexCount; local3++) { - this.anIntArray461[local3] -= Static237.anInt5298; - this.anIntArray465[local3] -= Static237.anInt5300; - this.anIntArray466[local3] -= Static237.anInt5299; + this.anIntArray461[local3] -= anInt5298; + this.anIntArray465[local3] -= anInt5300; + this.anIntArray466[local3] -= anInt5299; this.anIntArray461[local3] = this.anIntArray461[local3] * arg1 / 128; this.anIntArray465[local3] = this.anIntArray465[local3] * arg2 / 128; this.anIntArray466[local3] = this.anIntArray466[local3] * arg3 / 128; - this.anIntArray461[local3] += Static237.anInt5298; - this.anIntArray465[local3] += Static237.anInt5300; - this.anIntArray466[local3] += Static237.anInt5299; + this.anIntArray461[local3] += anInt5298; + this.anIntArray465[local3] += anInt5300; + this.anIntArray466[local3] += anInt5299; } } else if (arg0 == 5) { for (local3 = 0; local3 < this.anInt5297; local3++) { @@ -3199,9 +3488,9 @@ public final class GlModel extends Model { } local151.anInt4280 = local26; local151.anInt4273 = local85; - if (Static237.anIntArray468.length < this.anInt5296) { - Static237.anIntArray468 = new int[this.anInt5296]; - Static237.anIntArray467 = new int[this.anInt5296]; + if (anIntArray468.length < this.anInt5296) { + anIntArray468 = new int[this.anInt5296]; + anIntArray467 = new int[this.anInt5296]; } @Pc(194) int local194; @Pc(246) int local246; @@ -3217,8 +3506,8 @@ public final class GlModel extends Model { if (local258 == -1) { break; } - Static237.anIntArray468[local258] = local216; - Static237.anIntArray467[local258] = local234; + anIntArray468[local258] = local216; + anIntArray467[local258] = local234; } } for (local194 = 0; local194 < this.anInt5297; local194++) { @@ -3226,12 +3515,12 @@ public final class GlModel extends Model { @Pc(292) short local292 = this.aShortArray77[local194]; @Pc(297) short local297 = this.aShortArray82[local194]; @Pc(302) short local302 = this.aShortArray83[local194]; - local246 = Static237.anIntArray468[local292]; - local248 = Static237.anIntArray468[local297]; - local258 = Static237.anIntArray468[local302]; - @Pc(318) int local318 = Static237.anIntArray467[local292]; - @Pc(322) int local322 = Static237.anIntArray467[local297]; - @Pc(326) int local326 = Static237.anIntArray467[local302]; + local246 = anIntArray468[local292]; + local248 = anIntArray468[local297]; + local258 = anIntArray468[local302]; + @Pc(318) int local318 = anIntArray467[local292]; + @Pc(322) int local322 = anIntArray467[local297]; + @Pc(326) int local326 = anIntArray467[local302]; if ((local246 - local248) * (local322 - local326) - (local322 - local318) * (local258 - local248) > 0) { Rasteriser.fillSpriteTriangle(local151.aByteArray18, local318, local322, local326, local246, local248, local258, local134); } diff --git a/client/src/main/java/GlSprite.java b/client/src/main/java/GlSprite.java index 610d431..809b424 100644 --- a/client/src/main/java/GlSprite.java +++ b/client/src/main/java/GlSprite.java @@ -49,7 +49,7 @@ public class GlSprite extends Sprite { this.anInt1861 = arg0.anInt1861; this.anInt1867 = arg0.anInt1867; this.anInt1859 = arg0.anInt1859; - this.method1430(arg0.anIntArray20); + this.method1430(arg0.pixels); this.method1431(); } diff --git a/client/src/main/java/GlTile.java b/client/src/main/java/GlTile.java index f09a947..9e8a3c6 100644 --- a/client/src/main/java/GlTile.java +++ b/client/src/main/java/GlTile.java @@ -9,6 +9,14 @@ import org.openrs2.deob.annotation.Pc; @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 = "U", descriptor = "Lclient!wa;") + public static Buffer aClass3_Sub15_3; + @OriginalMember(owner = "client!hg", name = "K", descriptor = "Lclient!wa;") + public static Buffer aClass3_Sub15_2; + @OriginalMember(owner = "client!hg", name = "Q", descriptor = "Ljava/nio/ByteBuffer;") + public static ByteBuffer aByteBuffer5; @OriginalMember(owner = "client!hg", name = "s", descriptor = "Ljava/nio/ByteBuffer;") private ByteBuffer aByteBuffer3; @@ -102,6 +110,14 @@ public final class GlTile extends Node { this.anInt2486 = arg4; } + @OriginalMember(owner = "client!hg", name = "a", descriptor = "()V") + public static void method1939() { + aClass3_Sub15_3 = null; + aClass3_Sub15_2 = null; + aByteBuffer5 = null; + aByteBuffer4 = null; + } + @OriginalMember(owner = "client!hg", name = "b", descriptor = "()V") public final void method1940() { this.anIntArray232 = new int[this.anInt2482]; @@ -208,15 +224,15 @@ public final class GlTile extends Node { @OriginalMember(owner = "client!hg", name = "a", descriptor = "([[[Lclient!bj;FZ)V") public final void method1944(@OriginalArg(0) Tile[][][] arg0, @OriginalArg(1) float arg1, @OriginalArg(2) boolean arg2) { - if (Static95.aClass3_Sub15_3 == null || Static95.aClass3_Sub15_3.data.length < this.anInt2488 * 4) { - Static95.aClass3_Sub15_3 = new Buffer(this.anInt2488 * 4); + if (aClass3_Sub15_3 == null || aClass3_Sub15_3.data.length < this.anInt2488 * 4) { + aClass3_Sub15_3 = new Buffer(this.anInt2488 * 4); } else { - Static95.aClass3_Sub15_3.offset = 0; + aClass3_Sub15_3.offset = 0; } - if (Static95.aClass3_Sub15_2 == null || Static95.aClass3_Sub15_2.data.length < this.anInt2487 * 4) { - Static95.aClass3_Sub15_2 = new Buffer(this.anInt2487 * 4); + if (aClass3_Sub15_2 == null || aClass3_Sub15_2.data.length < this.anInt2487 * 4) { + aClass3_Sub15_2 = new Buffer(this.anInt2487 * 4); } else { - Static95.aClass3_Sub15_2.offset = 0; + aClass3_Sub15_2.offset = 0; } @Pc(47) int local47; @Pc(68) Tile local68; @@ -234,12 +250,12 @@ public final class GlTile extends Node { local86 = this.anIntArrayArray18[local47]; if (local86 != null) { for (local90 = 0; local90 < local86.length; local90++) { - Static95.aClass3_Sub15_2.p4(local86[local90]); + aClass3_Sub15_2.p4(local86[local90]); } } - local111 = this.aBooleanArray54[local47] ? Static95.aClass3_Sub15_2 : Static95.aClass3_Sub15_3; + local111 = this.aBooleanArray54[local47] ? aClass3_Sub15_2 : aClass3_Sub15_3; } else { - local111 = Static95.aClass3_Sub15_3; + local111 = aClass3_Sub15_3; } for (local116 = 1; local116 < local78.length - 1; local116++) { local111.p4(local78[0]); @@ -257,12 +273,12 @@ public final class GlTile extends Node { local86 = this.anIntArrayArray18[local47]; if (local86 != null) { for (local90 = 0; local90 < local86.length; local90++) { - Static95.aClass3_Sub15_2.p4le(local86[local90]); + aClass3_Sub15_2.p4le(local86[local90]); } } - local111 = this.aBooleanArray54[local47] ? Static95.aClass3_Sub15_2 : Static95.aClass3_Sub15_3; + local111 = this.aBooleanArray54[local47] ? aClass3_Sub15_2 : aClass3_Sub15_3; } else { - local111 = Static95.aClass3_Sub15_3; + local111 = aClass3_Sub15_3; } for (local116 = 1; local116 < local78.length - 1; local116++) { local111.p4le(local78[0]); @@ -272,7 +288,7 @@ public final class GlTile extends Node { } } } - if (Static95.aClass3_Sub15_3.offset == 0 && Static95.aClass3_Sub15_2.offset == 0) { + if (aClass3_Sub15_3.offset == 0 && aClass3_Sub15_2.offset == 0) { return; } @Pc(257) GL2 local257 = GlRenderer.gl; @@ -320,30 +336,30 @@ public final class GlTile extends Node { if (GlRenderer.arbVboSupported) { local257.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, 0); } - if (Static95.aClass3_Sub15_3.offset != 0) { - if (Static95.aByteBuffer5 == null || Static95.aByteBuffer5.capacity() < Static95.aClass3_Sub15_3.offset) { - Static95.aByteBuffer5 = ByteBuffer.allocateDirect(Static95.aClass3_Sub15_3.offset).order(ByteOrder.nativeOrder()); + if (aClass3_Sub15_3.offset != 0) { + if (aByteBuffer5 == null || aByteBuffer5.capacity() < aClass3_Sub15_3.offset) { + aByteBuffer5 = ByteBuffer.allocateDirect(aClass3_Sub15_3.offset).order(ByteOrder.nativeOrder()); } else { - Static95.aByteBuffer5.clear(); + aByteBuffer5.clear(); } - Static95.aByteBuffer5.put(Static95.aClass3_Sub15_3.data, 0, Static95.aClass3_Sub15_3.offset); - Static95.aByteBuffer5.flip(); + aByteBuffer5.put(aClass3_Sub15_3.data, 0, aClass3_Sub15_3.offset); + aByteBuffer5.flip(); GlRenderer.method4159(arg1); - local257.glDrawElements(GL2.GL_TRIANGLES, Static95.aClass3_Sub15_3.offset / 4, GL2.GL_UNSIGNED_INT, Static95.aByteBuffer5); + local257.glDrawElements(GL2.GL_TRIANGLES, aClass3_Sub15_3.offset / 4, GL2.GL_UNSIGNED_INT, aByteBuffer5); } - if (Static95.aClass3_Sub15_2.offset == 0) { + if (aClass3_Sub15_2.offset == 0) { return; } - if (Static95.aByteBuffer4 == null || Static95.aByteBuffer4.capacity() < Static95.aClass3_Sub15_2.offset) { - Static95.aByteBuffer4 = ByteBuffer.allocateDirect(Static95.aClass3_Sub15_2.offset).order(ByteOrder.nativeOrder()); + if (aByteBuffer4 == null || aByteBuffer4.capacity() < aClass3_Sub15_2.offset) { + aByteBuffer4 = ByteBuffer.allocateDirect(aClass3_Sub15_2.offset).order(ByteOrder.nativeOrder()); } else { - Static95.aByteBuffer4.clear(); + aByteBuffer4.clear(); } - Static95.aByteBuffer4.put(Static95.aClass3_Sub15_2.data, 0, Static95.aClass3_Sub15_2.offset); - Static95.aByteBuffer4.flip(); + aByteBuffer4.put(aClass3_Sub15_2.data, 0, aClass3_Sub15_2.offset); + aByteBuffer4.flip(); GlRenderer.method4159(arg1 - 100.0F); GlRenderer.disableDepthMask(); - local257.glDrawElements(GL2.GL_TRIANGLES, Static95.aClass3_Sub15_2.offset / 4, GL2.GL_UNSIGNED_INT, Static95.aByteBuffer4); + local257.glDrawElements(GL2.GL_TRIANGLES, aClass3_Sub15_2.offset / 4, GL2.GL_UNSIGNED_INT, aByteBuffer4); GlRenderer.enableDepthMask(); } diff --git a/client/src/main/java/HashTable.java b/client/src/main/java/HashTable.java index b4b2b6a..a03c2bf 100644 --- a/client/src/main/java/HashTable.java +++ b/client/src/main/java/HashTable.java @@ -104,7 +104,7 @@ public final class HashTable { } @OriginalMember(owner = "client!sc", name = "e", descriptor = "(I)I") - public final int method3864() { + public final int size() { @Pc(15) int local15 = 0; for (@Pc(17) int local17 = 0; local17 < this.anInt5023; local17++) { @Pc(26) Node local26 = this.aClass3Array1[local17]; diff --git a/client/src/main/java/IgnoreList.java b/client/src/main/java/IgnoreList.java index bccb07a..0a723d8 100644 --- a/client/src/main/java/IgnoreList.java +++ b/client/src/main/java/IgnoreList.java @@ -1,6 +1,77 @@ +import org.openrs2.deob.annotation.OriginalArg; 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!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(Static193.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; + Static193.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]; + Static193.aClass100Array134[local36] = Static193.aClass100Array134[local36 + 1]; + } + FriendsList.transmitAt = InterfaceList.transmitTimer; + Protocol.outboundBuffer.p1isaac(213); + Protocol.outboundBuffer.p8(arg0); + break; + } + } + } } diff --git a/client/src/main/java/InterfaceList.java b/client/src/main/java/InterfaceList.java index eacf469..72455fd 100644 --- a/client/src/main/java/InterfaceList.java +++ b/client/src/main/java/InterfaceList.java @@ -150,4 +150,10 @@ public class InterfaceList { } return components[interfaceId][componentId]; } + + @OriginalMember(owner = "client!client", name = "b", descriptor = "(Lclient!be;)Lclient!bf;") + public static ServerActiveProperties getServerActiveProperties(@OriginalArg(0) Component arg0) { + @Pc(13) ServerActiveProperties local13 = (ServerActiveProperties) Static210.aClass133_21.get(((long) arg0.id << 32) + (long) arg0.createdComponentId); + return local13 == null ? arg0.aClass3_Sub4_1 : local13; + } } diff --git a/client/src/main/java/Inv.java b/client/src/main/java/Inv.java index e5ff72a..cb58f3c 100644 --- a/client/src/main/java/Inv.java +++ b/client/src/main/java/Inv.java @@ -1,5 +1,7 @@ +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!qe") public final class Inv extends Node { @@ -11,4 +13,89 @@ public final class Inv extends Node { @OriginalMember(owner = "client!qe", name = "u", descriptor = "[I") 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) Static20.objectContainerCache.get((long) arg0); + if (local17 == null) { + return InvTypeList.list(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.list(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) Static20.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!wj", name = "a", descriptor = "(BII)I") + public static int getSlotTotal(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(8) Inv local8 = (Inv) Static20.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!bm", name = "a", descriptor = "(III)I") + public static int getItemCount(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + @Pc(10) Inv local10 = (Inv) Static20.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!be", name = "a", descriptor = "(III)I") + public static int getItemType(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { + @Pc(10) Inv local10 = (Inv) Static20.objectContainerCache.get((long) arg0); + if (local10 == null) { + return -1; + } else if (arg1 >= 0 && arg1 < local10.objectIds.length) { + return local10.objectIds[arg1]; + } else { + return -1; + } + } } diff --git a/client/src/main/java/JagString.java b/client/src/main/java/JagString.java index 2baa861..1af86b6 100644 --- a/client/src/main/java/JagString.java +++ b/client/src/main/java/JagString.java @@ -124,7 +124,7 @@ public final class JagString implements StringInterface { return local13.method3151(); } - @OriginalMember(owner = "client!na", name = "a", descriptor = "(Z)Ljava/net/URL;") + @OriginalMember(owner = "client!na", name = "a", descriptor = "(Z)Ljava/net/URL;") public final URL method3107() throws MalformedURLException { return new URL(new String(this.chars, 0, this.length)); } @@ -343,7 +343,7 @@ public final class JagString implements StringInterface { } @OriginalMember(owner = "client!na", name = "a", descriptor = "(B)Lclient!na;") - public final JagString method3125() { + public final JagString toTitleCase() { @Pc(9) JagString local9 = new JagString(); local9.length = this.length; local9.chars = new byte[this.length]; @@ -438,7 +438,7 @@ public final class JagString implements StringInterface { } @OriginalMember(owner = "client!na", name = "c", descriptor = "(Z)V") - public final void method3129() { + public final void print() { @Pc(16) String local16; try { local16 = new String(this.chars, 0, this.length, "ISO-8859-1"); @@ -911,7 +911,7 @@ public final class JagString implements StringInterface { @OriginalMember(owner = "client!na", name = "k", descriptor = "(I)Lclient!na;") public final JagString method3159() { - @Pc(9) JagString local9 = Base37.decodeLowerCase(this.encode37()); + @Pc(9) JagString local9 = Base37.decode37(this.encode37()); return local9 == null ? Static228.aClass100_967 : local9; } diff --git a/client/src/main/java/Js5.java b/client/src/main/java/Js5.java index 58e4568..150a383 100644 --- a/client/src/main/java/Js5.java +++ b/client/src/main/java/Js5.java @@ -31,7 +31,22 @@ public final class Js5 { this.aBoolean297 = arg2; } - @OriginalMember(owner = "client!ve", name = "a", descriptor = "(B)Z") + @OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B") + public static byte[] method2696(@OriginalArg(1) Object arg0, @OriginalArg(2) boolean arg1) { + if (arg0 == null) { + return null; + } else if (arg0 instanceof byte[]) { + @Pc(14) byte[] local14 = (byte[]) arg0; + return arg1 ? Static23.method648(local14) : local14; + } else if (arg0 instanceof ByteArray) { + @Pc(34) ByteArray local34 = (ByteArray) arg0; + return local34.get(); + } else { + throw new IllegalArgumentException(); + } + } + + @OriginalMember(owner = "client!ve", name = "a", descriptor = "(B)Z") public final boolean fetchAll() { if (!this.method4484()) { return false; @@ -187,7 +202,7 @@ public final class Js5 { } } } - @Pc(64) byte[] local64 = Static138.method2696(this.anObjectArrayArray1[arg0][arg2], false); + @Pc(64) byte[] local64 = method2696(this.anObjectArrayArray1[arg0][arg2], false); if (this.aBoolean297) { this.anObjectArrayArray1[arg0][arg2] = null; if (this.aClass70_2.anIntArray270[arg0] == 1) { @@ -278,9 +293,9 @@ public final class Js5 { } @Pc(114) byte[] local114; if (arg1 == null || arg1[0] == 0 && arg1[1] == 0 && arg1[2] == 0 && arg1[3] == 0) { - local114 = Static138.method2696(this.anObjectArray32[arg0], false); + local114 = method2696(this.anObjectArray32[arg0], false); } else { - local114 = Static138.method2696(this.anObjectArray32[arg0], true); + local114 = method2696(this.anObjectArray32[arg0], true); @Pc(128) Buffer local128 = new Buffer(local114); local128.decryptXtea(arg1, local128.data.length); } @@ -456,7 +471,7 @@ public final class Js5 { } } } - return Static138.method2696(this.anObjectArrayArray1[arg1][arg0], false); + return method2696(this.anObjectArrayArray1[arg1][arg0], false); } @OriginalMember(owner = "client!ve", name = "a", descriptor = "(BI)[I") diff --git a/client/src/main/java/Js5CachedResourceProvider.java b/client/src/main/java/Js5CachedResourceProvider.java index 32b0d45..4ffd072 100644 --- a/client/src/main/java/Js5CachedResourceProvider.java +++ b/client/src/main/java/Js5CachedResourceProvider.java @@ -3,10 +3,15 @@ import org.openrs2.deob.annotation.OriginalClass; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; +import java.util.zip.CRC32; + @OriginalClass("client!bg") public final class Js5CachedResourceProvider extends Js5ResourceProvider { - @OriginalMember(owner = "client!bg", name = "m", descriptor = "Lclient!ii;") + @OriginalMember(owner = "client!fn", name = "X", descriptor = "Ljava/util/zip/CRC32;") + public static final CRC32 aCRC32_1 = new CRC32(); + + @OriginalMember(owner = "client!bg", name = "m", descriptor = "Lclient!ii;") private Js5Index aClass70_1; @OriginalMember(owner = "client!bg", name = "w", descriptor = "[B") @@ -356,9 +361,9 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { if (local161 == null || local161.length <= 2) { throw new RuntimeException(); } - Static74.aCRC32_1.reset(); - Static74.aCRC32_1.update(local161, 0, local161.length - 2); - local199 = (int) Static74.aCRC32_1.getValue(); + aCRC32_1.reset(); + aCRC32_1.update(local161, 0, local161.length - 2); + local199 = (int) aCRC32_1.getValue(); if (this.aClass70_1.anIntArray268[arg1] != local199) { throw new RuntimeException(); } @@ -391,9 +396,9 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider { if (local161 == null || local161.length <= 2) { throw new RuntimeException(); } - Static74.aCRC32_1.reset(); - Static74.aCRC32_1.update(local161, 0, local161.length - 2); - local199 = (int) Static74.aCRC32_1.getValue(); + aCRC32_1.reset(); + aCRC32_1.update(local161, 0, local161.length - 2); + local199 = (int) aCRC32_1.getValue(); if (this.aClass70_1.anIntArray268[arg1] != local199) { throw new RuntimeException(); } diff --git a/client/src/main/java/Keyboard.java b/client/src/main/java/Keyboard.java index 14c6295..593afd8 100644 --- a/client/src/main/java/Keyboard.java +++ b/client/src/main/java/Keyboard.java @@ -285,6 +285,11 @@ public final class Keyboard implements KeyListener, FocusListener { } } + @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") @Override public final synchronized void keyPressed(@OriginalArg(0) KeyEvent event) { diff --git a/client/src/main/java/LightingManager.java b/client/src/main/java/LightingManager.java new file mode 100644 index 0000000..fa26260 --- /dev/null +++ b/client/src/main/java/LightingManager.java @@ -0,0 +1,8 @@ +import org.openrs2.deob.annotation.OriginalMember; + +public class LightingManager { + @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; +} diff --git a/client/src/main/java/LoadingBarAwt.java b/client/src/main/java/LoadingBarAwt.java index b79f444..5bbdd4f 100644 --- a/client/src/main/java/LoadingBarAwt.java +++ b/client/src/main/java/LoadingBarAwt.java @@ -6,13 +6,16 @@ import java.awt.*; import java.awt.Font; public class LoadingBarAwt { + @OriginalMember(owner = "client!tg", name = "a", descriptor = "Ljava/awt/FontMetrics;") + public static FontMetrics aFontMetrics1; + @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 (Static222.aFont1 == null) { Static222.aFont1 = new Font("Helvetica", 1, 13); - Static240.aFontMetrics1 = GameShell.canvas.getFontMetrics(Static222.aFont1); + aFontMetrics1 = GameShell.canvas.getFontMetrics(Static222.aFont1); } if (arg1) { local6.setColor(Color.black); @@ -34,7 +37,7 @@ public class LoadingBarAwt { local56.fillRect(arg3 * 3 + 2, 2, 300 - arg3 * 3, 30); local56.setFont(Static222.aFont1); local56.setColor(Color.white); - arg2.method3112(22, (304 - arg2.method3155(Static240.aFontMetrics1)) / 2, local56); + arg2.method3112(22, (304 - arg2.method3155(aFontMetrics1)) / 2, local56); local6.drawImage(Static149.anImage3, GameShell.canvasWidth / 2 - 152, GameShell.canvasHeight / 2 + -18, null); } catch (@Pc(134) Exception local134) { @Pc(140) int local140 = GameShell.canvasWidth / 2 - 152; @@ -47,12 +50,12 @@ public class LoadingBarAwt { local6.fillRect(arg3 * 3 + local140 + 2, local146 + 2, 300 - arg3 * 3, 30); local6.setFont(Static222.aFont1); local6.setColor(Color.white); - arg2.method3112(local146 + 22, local140 + (-arg2.method3155(Static240.aFontMetrics1) + 304) / 2, local6); + arg2.method3112(local146 + 22, local140 + (-arg2.method3155(aFontMetrics1) + 304) / 2, local6); } if (Static278.mainLoadPrimaryText != null) { local6.setFont(Static222.aFont1); local6.setColor(Color.white); - Static278.mainLoadPrimaryText.method3112(GameShell.canvasHeight / 2 - 26, GameShell.canvasWidth / 2 - Static278.mainLoadPrimaryText.method3155(Static240.aFontMetrics1) / 2, local6); + Static278.mainLoadPrimaryText.method3112(GameShell.canvasHeight / 2 - 26, GameShell.canvasWidth / 2 - Static278.mainLoadPrimaryText.method3155(aFontMetrics1) / 2, local6); } } catch (@Pc(252) Exception local252) { GameShell.canvas.repaint(); @@ -61,7 +64,7 @@ public class LoadingBarAwt { @OriginalMember(owner = "client!n", name = "a", descriptor = "(B)V") public static void clear() { - Static240.aFontMetrics1 = null; + aFontMetrics1 = null; Static222.aFont1 = null; Static149.anImage3 = null; } diff --git a/client/src/main/java/Loc.java b/client/src/main/java/Loc.java index ed8f22b..ab496c6 100644 --- a/client/src/main/java/Loc.java +++ b/client/src/main/java/Loc.java @@ -271,7 +271,7 @@ public final class Loc extends Entity { @Pc(192) int local192 = (local157 >> 1) + this.anInt1300; @Pc(201) int local201 = (local157 + 1 >> 1) + this.anInt1300; this.method1047(local192 * 128, local185 * 128); - @Pc(256) boolean local256 = !local12 && local19.aBoolean212 && (local19.id != this.anInt1321 || (this.anInt1297 != this.anInt1322 || this.aClass144_2 != null && (this.aClass144_2.aBoolean280 || Static204.applyTweening) && this.anInt1297 != this.anInt1304) && Preferences.sceneryShadowsType >= 2); + @Pc(256) boolean local256 = !local12 && local19.aBoolean212 && (local19.id != this.anInt1321 || (this.anInt1297 != this.anInt1322 || this.aClass144_2 != null && (this.aClass144_2.aBoolean280 || client.applyTweening) && this.anInt1297 != this.anInt1304) && Preferences.sceneryShadowsType >= 2); if (arg0 && !local256) { return null; } diff --git a/client/src/main/java/LoginManager.java b/client/src/main/java/LoginManager.java index b31bac9..07134e1 100644 --- a/client/src/main/java/LoginManager.java +++ b/client/src/main/java/LoginManager.java @@ -1,3 +1,4 @@ +import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -131,7 +132,7 @@ public class LoginManager { } local126 = Protocol.socket.read() << 8 | Protocol.socket.read(); Static176.hopWorld(local126); - if (Static125.worldId == -1) { + if (Player.worldId == -1) { anInt4937 = 0; reply = 6; Protocol.socket.close(); @@ -428,7 +429,7 @@ public class LoginManager { Protocol.socket.read(0, Protocol.length, Protocol.inboundBuffer.data); reply = 2; step = 0; - Static243.method4221(); + client.method4221(); Static80.centralZoneX = -1; Protocol.readRebuildPacket(false); Protocol.opcode = -1; @@ -454,4 +455,41 @@ public class LoginManager { } } } + + @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.encryptRsa(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); + Protocol.outboundBuffer.offset = 0; + Protocol.outboundBuffer.p1(210); + Protocol.outboundBuffer.p1(local43.offset); + Protocol.outboundBuffer.pBytes(local43.data, local43.offset); + } else { + clear(); + } + } } diff --git a/client/src/main/java/MapList.java b/client/src/main/java/MapList.java index f026375..db90859 100644 --- a/client/src/main/java/MapList.java +++ b/client/src/main/java/MapList.java @@ -24,4 +24,24 @@ public class MapList { aClass69_120.addTail(Map.create(new Buffer(archive.getFile(local25, local30[local32])))); } } + + @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.method2289(); local15 != null; local15 = (Map) aClass69_120.method2288()) { + if (local15.group.strEquals(arg0)) { + return local15; + } + } + return null; + } + + @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.method2289(); local10 != null; local10 = (Map) aClass69_120.method2288()) { + if (local10.aBoolean50 && local10.method664(arg1, arg0)) { + return local10; + } + } + return null; + } } diff --git a/client/src/main/java/MidiDecoder.java b/client/src/main/java/MidiDecoder.java index 8973303..467d3ab 100644 --- a/client/src/main/java/MidiDecoder.java +++ b/client/src/main/java/MidiDecoder.java @@ -6,7 +6,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!ki") public final class MidiDecoder { - @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[] anIntArray310; @OriginalMember(owner = "client!ki", name = "c", descriptor = "[I") @@ -98,7 +100,7 @@ public final class MidiDecoder { private int method2633(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { @Pc(12) int local12; if (arg1 != 255) { - @Pc(78) byte local78 = Static135.aByteArray46[arg1 - 128]; + @Pc(78) byte local78 = STATUS_LENGTHS[arg1 - 128]; local12 = arg1; if (local78 >= 1) { local12 = arg1 | this.aClass3_Sub15_6.g1() << 8; diff --git a/client/src/main/java/MidiPlayer.java b/client/src/main/java/MidiPlayer.java index 74d6a02..2a693be 100644 --- a/client/src/main/java/MidiPlayer.java +++ b/client/src/main/java/MidiPlayer.java @@ -7,11 +7,13 @@ public class MidiPlayer { public static boolean jingle = false; @OriginalMember(owner = "client!cb", name = "hb", descriptor = "Lclient!le;") public static SoundBank aClass89_1; + @OriginalMember(owner = "client!bd", name = "i", descriptor = "I") + public static int anInt441 = 0; @OriginalMember(owner = "client!km", name = "c", descriptor = "(Z)Z") public static boolean method2699() { try { - if (Static14.anInt441 == 2) { + if (anInt441 == 2) { if (Static144.aClass3_Sub29_1 == null) { Static144.aClass3_Sub29_1 = Song.create(Static172.aClass153_70, Static277.anInt5853, Static226.anInt5085); if (Static144.aClass3_Sub29_1 == null) { @@ -25,7 +27,7 @@ public class MidiPlayer { Static172.aClass3_Sub3_Sub4_2.method4412(); Static172.aClass3_Sub3_Sub4_2.method4447(Static253.anInt5527); Static172.aClass3_Sub3_Sub4_2.method4431(Static72.aBoolean116, Static144.aClass3_Sub29_1); - Static14.anInt441 = 0; + anInt441 = 0; Static144.aClass3_Sub29_1 = null; aClass89_1 = null; Static172.aClass153_70 = null; @@ -37,7 +39,7 @@ public class MidiPlayer { Static172.aClass3_Sub3_Sub4_2.method4446(); Static172.aClass153_70 = null; Static144.aClass3_Sub29_1 = null; - Static14.anInt441 = 0; + anInt441 = 0; aClass89_1 = null; } return false; @@ -47,7 +49,7 @@ public class MidiPlayer { public static void method801() { Static253.anInt5527 = 0; Static226.anInt5085 = -1; - Static14.anInt441 = 1; + anInt441 = 1; Static57.anInt1757 = 2; Static72.aBoolean116 = false; Static172.aClass153_70 = null; @@ -60,7 +62,7 @@ public class MidiPlayer { Static226.anInt5085 = 0; Static277.anInt5853 = arg0; Static72.aBoolean116 = false; - Static14.anInt441 = 1; + anInt441 = 1; Static57.anInt1757 = 2; Static253.anInt5527 = arg2; } @@ -77,7 +79,7 @@ public class MidiPlayer { @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Z)V") public static void loop() { try { - if (Static14.anInt441 == 1) { + if (anInt441 == 1) { @Pc(16) int local16 = Static172.aClass3_Sub3_Sub4_2.method4440(); if (local16 > 0 && Static172.aClass3_Sub3_Sub4_2.method4414()) { local16 -= Static57.anInt1757; @@ -92,9 +94,9 @@ public class MidiPlayer { Static144.aClass3_Sub29_1 = null; aClass89_1 = null; if (Static172.aClass153_70 == null) { - Static14.anInt441 = 0; + anInt441 = 0; } else { - Static14.anInt441 = 2; + anInt441 = 2; } } } catch (@Pc(62) Exception local62) { @@ -102,7 +104,7 @@ public class MidiPlayer { Static172.aClass3_Sub3_Sub4_2.method4446(); Static172.aClass153_70 = null; Static144.aClass3_Sub29_1 = null; - Static14.anInt441 = 0; + anInt441 = 0; aClass89_1 = null; } } diff --git a/client/src/main/java/MiniMap.java b/client/src/main/java/MiniMap.java new file mode 100644 index 0000000..7d76e35 --- /dev/null +++ b/client/src/main/java/MiniMap.java @@ -0,0 +1,204 @@ +import org.openrs2.deob.annotation.OriginalArg; +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!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!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 ((Static12.tileSettings[arg0][local80][local37] & 0x18) == 0) { + renderTile(local32, local76, arg0, local80, local37); + } + if (arg0 < 3 && (Static12.tileSettings[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 = Static20.method602(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].anIntArrayArray30; + 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 ((Static12.tileSettings[arg0][local76][local37] & 0x18) == 0 && !Static164.method3109(local76, local455, local37, local35, arg0)) { + if (GlRenderer.enabled) { + SoftwareRaster.pixels = null; + } else { + client.frameBuffer.makeTarget(); + } + return false; + } + if (arg0 < 3 && (Static12.tileSettings[arg0 + 1][local76][local37] & 0x8) != 0 && !Static164.method3109(local76, local455, local37, local35, arg0 + 1)) { + if (GlRenderer.enabled) { + SoftwareRaster.pixels = null; + } else { + client.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 { + client.frameBuffer.makeTarget(); + } + softwareSprite = null; + return true; + } +} diff --git a/client/src/main/java/Mouse.java b/client/src/main/java/Mouse.java index d6e608e..2ccaefb 100644 --- a/client/src/main/java/Mouse.java +++ b/client/src/main/java/Mouse.java @@ -22,65 +22,94 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis public static int anInt5032 = 0; @OriginalMember(owner = "client!rh", name = "o", descriptor = "I") public static int anInt4873 = 0; + @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!bl", name = "Q", descriptor = "I") + public static int pressedButton = 0; + @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!eg", name = "w", descriptor = "I") + public static volatile int anInt1759 = 0; + @OriginalMember(owner = "client!kf", name = "c", descriptor = "J") + public static long clickTime = 0L; + @OriginalMember(owner = "client!dc", name = "W", descriptor = "I") + public static volatile int anInt1313 = 0; + @OriginalMember(owner = "client!nb", name = "j", descriptor = "I") + public static volatile int anInt4039 = -1; + @OriginalMember(owner = "client!lh", name = "u", descriptor = "I") + public static volatile int anInt3521 = -1; + @OriginalMember(owner = "client!sa", name = "Y", descriptor = "I") + public static volatile int anInt4973 = 0; 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(Static93.instance); - arg0.removeMouseMotionListener(Static93.instance); - arg0.removeFocusListener(Static93.instance); - Static57.anInt1759 = 0; + arg0.removeMouseListener(instance); + arg0.removeMouseMotionListener(instance); + arg0.removeFocusListener(instance); + anInt1759 = 0; } @OriginalMember(owner = "client!ug", name = "a", descriptor = "(I)V") public static void quit() { - if (Static93.instance != null) { - @Pc(5) Mouse local5 = Static93.instance; - synchronized (Static93.instance) { - Static93.instance = null; + if (instance != null) { + @Pc(5) Mouse local5 = instance; + synchronized (instance) { + instance = null; } } } @OriginalMember(owner = "client!ii", name = "b", descriptor = "(I)V") public static void loop() { - @Pc(2) Mouse local2 = Static93.instance; - synchronized (Static93.instance) { - Static22.anInt723 = Static57.anInt1759; - anInt4873 = Static147.anInt3521; - anInt5032 = Static165.anInt4039; - Static150.clickButton = Static41.anInt1313; - clickX = Static34.anInt1034; - Static93.anInt2467++; - clickY = Static222.anInt4973; - Static133.clickTime = Static209.aLong161; - Static41.anInt1313 = 0; + @Pc(2) Mouse local2 = instance; + synchronized (instance) { + pressedButton = anInt1759; + anInt4873 = anInt3521; + anInt5032 = 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(Static93.instance); - arg0.addMouseMotionListener(Static93.instance); - arg0.addFocusListener(Static93.instance); + 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!ug", name = "mouseMoved", descriptor = "(Ljava/awt/event/MouseEvent;)V") @Override public final synchronized void mouseMoved(@OriginalArg(0) MouseEvent arg0) { - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static147.anInt3521 = arg0.getX(); - Static165.anInt4039 = arg0.getY(); + if (instance != null) { + anInt2467 = 0; + anInt3521 = arg0.getX(); + anInt4039 = arg0.getY(); } } @OriginalMember(owner = "client!ug", name = "focusLost", descriptor = "(Ljava/awt/event/FocusEvent;)V") @Override public final synchronized void focusLost(@OriginalArg(0) FocusEvent arg0) { - if (Static93.instance != null) { - Static57.anInt1759 = 0; + if (instance != null) { + anInt1759 = 0; } } @@ -94,27 +123,25 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis int accelY = this.mouseWheelY - y; this.mouseWheelX = x; this.mouseWheelY = y; - Camera.yawDirection = -1; Camera.yawTarget += accelX * 2; - Camera.pitchDirection = -1; Camera.pitchTarget -= accelY * 2; Camera.clampCameraAngle(); return; } - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static147.anInt3521 = x; - Static165.anInt4039 = y; + if (instance != null) { + anInt2467 = 0; + anInt3521 = x; + anInt4039 = y; } } @OriginalMember(owner = "client!ug", name = "mouseReleased", descriptor = "(Ljava/awt/event/MouseEvent;)V") @Override public final synchronized void mouseReleased(@OriginalArg(0) MouseEvent arg0) { - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static57.anInt1759 = 0; + if (instance != null) { + anInt2467 = 0; + anInt1759 = 0; @Pc(14) int local14 = arg0.getModifiers(); if ((local14 & 0x10) == 0) { } @@ -150,17 +177,17 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis return; } - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static34.anInt1034 = event.getX(); - Static222.anInt4973 = event.getY(); - Static209.aLong161 = MonotonicClock.currentTimeMillis(); + if (instance != null) { + anInt2467 = 0; + anInt1034 = event.getX(); + anInt4973 = event.getY(); + aLong161 = MonotonicClock.currentTimeMillis(); if ((event.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == 0) { - Static41.anInt1313 = 1; - Static57.anInt1759 = 1; + anInt1313 = 1; + anInt1759 = 1; } else { - Static41.anInt1313 = 2; - Static57.anInt1759 = 2; + anInt1313 = 2; + anInt1759 = 2; } @Pc(29) int local29 = event.getModifiers(); if ((local29 & 0x10) == 0) { @@ -178,20 +205,20 @@ public final class Mouse implements MouseListener, MouseMotionListener, FocusLis @OriginalMember(owner = "client!ug", name = "mouseExited", descriptor = "(Ljava/awt/event/MouseEvent;)V") @Override public final synchronized void mouseExited(@OriginalArg(0) MouseEvent arg0) { - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static147.anInt3521 = -1; - Static165.anInt4039 = -1; + if (instance != null) { + anInt2467 = 0; + anInt3521 = -1; + anInt4039 = -1; } } @OriginalMember(owner = "client!ug", name = "mouseEntered", descriptor = "(Ljava/awt/event/MouseEvent;)V") @Override public final synchronized void mouseEntered(@OriginalArg(0) MouseEvent arg0) { - if (Static93.instance != null) { - Static93.anInt2467 = 0; - Static147.anInt3521 = arg0.getX(); - Static165.anInt4039 = arg0.getY(); + if (instance != null) { + anInt2467 = 0; + anInt3521 = arg0.getX(); + anInt4039 = arg0.getY(); } } } diff --git a/client/src/main/java/MusicPlayer.java b/client/src/main/java/MusicPlayer.java index d953b61..2ab1ef5 100644 --- a/client/src/main/java/MusicPlayer.java +++ b/client/src/main/java/MusicPlayer.java @@ -1,3 +1,4 @@ +import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public class MusicPlayer { @@ -5,4 +6,22 @@ public class MusicPlayer { 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) { + Static241.method4548(); + } else if (arg0 != -1 && (groupId != arg0 || !Static136.method2655()) && 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) { + Static122.method2410(client.js5Archive11, arg1, Preferences.musicVolume); + MidiPlayer.jingle = true; + } + } } diff --git a/client/src/main/java/NpcList.java b/client/src/main/java/NpcList.java new file mode 100644 index 0000000..8192447 --- /dev/null +++ b/client/src/main/java/NpcList.java @@ -0,0 +1,6 @@ +import org.openrs2.deob.annotation.OriginalMember; + +public class NpcList { + @OriginalMember(owner = "client!nm", name = "S", descriptor = "[Lclient!km;") + public static final Npc[] npcs = new Npc[32768]; +} diff --git a/client/src/main/java/NpcType.java b/client/src/main/java/NpcType.java index 7f6bd9e..47f4bdf 100644 --- a/client/src/main/java/NpcType.java +++ b/client/src/main/java/NpcType.java @@ -358,7 +358,7 @@ public final class NpcType { local721 |= Static6.aClass3_Sub2_Sub7Array1[local235].isAlphaTransformed(local214); local725 |= local753.aBoolean278; } - if ((local753.tween || Static204.applyTweening) && local207 != -1 && local753.frames.length > local207) { + if ((local753.tween || client.applyTweening) && local207 != -1 && local753.frames.length > local207) { Static71.anIntArray147[local235] = local753.anIntArray474[local200]; Static214.anIntArray492[local235] = arg0[local235].anInt5404; local228 = local753.frames[local207]; @@ -401,7 +401,7 @@ public final class NpcType { local721 |= local962.isAlphaTransformed(local235); local725 |= arg8.aBoolean278; } - if ((arg8.tween || Static204.applyTweening) && arg3 != -1 && arg8.frames.length > arg3) { + if ((arg8.tween || client.applyTweening) && arg3 != -1 && arg8.frames.length > arg3) { local200 = arg8.anIntArray474[arg5]; local221 = arg8.frames[arg3]; local1040 = local221 >>> 16; @@ -432,7 +432,7 @@ public final class NpcType { local721 |= local1088.isAlphaTransformed(local228); local725 |= arg6.aBoolean278; } - if ((arg6.tween || Static204.applyTweening) && arg1 != -1 && arg1 < arg6.frames.length) { + if ((arg6.tween || client.applyTweening) && arg1 != -1 && arg1 < arg6.frames.length) { local300 = arg6.anIntArray474[arg2]; local1040 = arg6.frames[arg1]; local318 = local1040 >>> 16; diff --git a/client/src/main/java/ObjType.java b/client/src/main/java/ObjType.java index 48f2346..53a8d02 100644 --- a/client/src/main/java/ObjType.java +++ b/client/src/main/java/ObjType.java @@ -203,7 +203,7 @@ public final class ObjType { } @OriginalMember(owner = "client!h", name = "a", descriptor = "(ILclient!na;I)Lclient!na;") - public final JagString method1819(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { + public final JagString getParam(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { if (this.params == null) { return arg0; } else { diff --git a/client/src/main/java/OverheadChat.java b/client/src/main/java/OverheadChat.java new file mode 100644 index 0000000..e11b278 --- /dev/null +++ b/client/src/main/java/OverheadChat.java @@ -0,0 +1,34 @@ +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 < Static272.anInt5214; local11++) { + @Pc(68) int local68 = Static33.anIntArray79[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/PathingEntity.java b/client/src/main/java/PathingEntity.java index 3b0e76f..267dc51 100644 --- a/client/src/main/java/PathingEntity.java +++ b/client/src/main/java/PathingEntity.java @@ -6,7 +6,9 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!fe") public abstract class PathingEntity extends Entity { - @OriginalMember(owner = "client!fe", name = "A", descriptor = "I") + @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!fe", name = "A", descriptor = "I") public int spotAnimStart; @OriginalMember(owner = "client!fe", name = "S", descriptor = "I") diff --git a/client/src/main/java/Player.java b/client/src/main/java/Player.java index 6d2dda2..10de48e 100644 --- a/client/src/main/java/Player.java +++ b/client/src/main/java/Player.java @@ -14,6 +14,14 @@ public final class Player extends PathingEntity { 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!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!e", name = "Bc", descriptor = "Lclient!hh;") public PlayerAppearance appearance; @@ -30,7 +38,7 @@ public final class Player extends PathingEntity { public int anInt1650 = 0; @OriginalMember(owner = "client!e", name = "yc", descriptor = "I") - public int anInt1652 = 0; + public int combatLevel = 0; @OriginalMember(owner = "client!e", name = "Fc", descriptor = "I") public int anInt1656 = 0; @@ -209,11 +217,11 @@ public final class Player extends PathingEntity { } this.anInt3365 = arg0.g2(); @Pc(236) long local236 = arg0.g8(); - this.username = Base37.decodeLowerCase(local236).method3125(); - this.anInt1652 = arg0.g1(); + this.username = Base37.decode37(local236).toTitleCase(); + this.combatLevel = arg0.g1(); if (local37) { this.anInt1671 = arg0.g2(); - this.anInt1656 = this.anInt1652; + this.anInt1656 = this.combatLevel; this.anInt1667 = -1; } else { this.anInt1671 = 0; @@ -304,8 +312,8 @@ public final class Player extends PathingEntity { if (local245 != null && local245.anInt4052 != -1) { @Pc(291) int local291; @Pc(302) int local302; - if (local245.anInt4058 == 1 && local245.anInt4057 >= 0 && Static175.npcs.length > local245.anInt4057) { - @Pc(278) Npc local278 = Static175.npcs[local245.anInt4057]; + if (local245.anInt4058 == 1 && local245.anInt4057 >= 0 && NpcList.npcs.length > local245.anInt4057) { + @Pc(278) Npc local278 = NpcList.npcs[local245.anInt4057]; if (local278 != null) { local291 = local278.xFine / 32 - PlayerList.self.xFine / 32; local302 = local278.zFine / 32 - PlayerList.self.zFine / 32; diff --git a/client/src/main/java/PlayerAppearance.java b/client/src/main/java/PlayerAppearance.java index 11f8301..8284ec5 100644 --- a/client/src/main/java/PlayerAppearance.java +++ b/client/src/main/java/PlayerAppearance.java @@ -32,7 +32,11 @@ public final class PlayerAppearance { 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!cj", name = "e", descriptor = "[[S") + @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!cj", name = "e", descriptor = "[[S") public static short[][] aShortArrayArray2; @OriginalMember(owner = "client!nj", name = "m", descriptor = "[[S") public static short[][] aShortArrayArray7; @@ -62,7 +66,7 @@ public final class PlayerAppearance { private int[][] anIntArrayArray19; @OriginalMember(owner = "client!hh", name = "x", descriptor = "Z") - public boolean aBoolean141; + public boolean gender; @OriginalMember(owner = "client!wk", name = "b", descriptor = "(II)V") public static void clean() { @@ -128,7 +132,7 @@ public final class PlayerAppearance { for (local53 = 0; local53 < 5; local53++) { this.aLong88 = local13[(int) (((long) this.anIntArray236[local53] ^ this.aLong88) & 0xFFL)] ^ this.aLong88 >>> 8; } - this.aLong88 = local13[(int) (((long) (this.aBoolean141 ? 1 : 0) ^ this.aLong88) & 0xFFL)] ^ this.aLong88 >>> 8; + this.aLong88 = local13[(int) (((long) (this.gender ? 1 : 0) ^ this.aLong88) & 0xFFL)] ^ this.aLong88 >>> 8; if (local8 != 0L && this.aLong88 != local8) { aClass99_33.method3098(local8); } @@ -136,7 +140,7 @@ public final class PlayerAppearance { @OriginalMember(owner = "client!hh", name = "a", descriptor = "(ZZ)V") public final void method1948(@OriginalArg(0) boolean arg0) { - this.aBoolean141 = arg0; + this.gender = arg0; this.method1947(); } @@ -151,7 +155,7 @@ public final class PlayerAppearance { for (@Pc(24) int local24 = 0; local24 < 8; local24++) { for (@Pc(31) int local31 = 0; local31 < IdkTypeList.anInt1716; local31++) { @Pc(38) IdkType local38 = IdkTypeList.get(local31); - if (local38 != null && !local38.aBoolean85 && local38.feature == (arg2 ? Static153.anIntArray351[local24] : Static204.anIntArray425[local24])) { + if (local38 != null && !local38.aBoolean85 && local38.feature == (arg2 ? Static153.anIntArray351[local24] : MALE_FEATURES[local24])) { arg3[anIntArray451[local24]] = Integer.MIN_VALUE | local31; break; } @@ -159,7 +163,7 @@ public final class PlayerAppearance { } } this.anInt2492 = arg1; - this.aBoolean141 = arg2; + this.gender = arg2; this.anIntArray236 = arg0; this.anIntArray233 = arg3; this.method1947(); @@ -238,7 +242,7 @@ public final class PlayerAppearance { if ((local169 & Integer.MIN_VALUE) != 0 && !IdkTypeList.get(local169 & 0x3FFFFFFF).isBodyModelReady()) { local158 = true; } - } else if (!ObjTypeList.get(local169 & 0x3FFFFFFF).method1822(this.aBoolean141)) { + } else if (!ObjTypeList.get(local169 & 0x3FFFFFFF).method1822(this.gender)) { local158 = true; } } @@ -257,7 +261,7 @@ public final class PlayerAppearance { local250 = local38[local169]; @Pc(272) RawModel local272; if ((local250 & 0x40000000) != 0) { - local272 = ObjTypeList.get(local250 & 0x3FFFFFFF).getBodyModel(this.aBoolean141); + local272 = ObjTypeList.get(local250 & 0x3FFFFFFF).getBodyModel(this.gender); if (local272 != null) { local239[local169] = local272; } @@ -366,7 +370,7 @@ public final class PlayerAppearance { local827 |= Static276.aClass3_Sub2_Sub7Array8[local353].isAlphaTransformed(local381); local838 |= local858.aBoolean278; } - if ((local858.tween || Static204.applyTweening) && local367 != -1 && local367 < local858.frames.length) { + if ((local858.tween || client.applyTweening) && local367 != -1 && local367 < local858.frames.length) { Static262.anIntArray515[local353] = local858.anIntArray474[local374]; Static73.anIntArray183[local353] = arg0[local353].anInt5404; local979 = local858.frames[local367]; @@ -404,7 +408,7 @@ public final class PlayerAppearance { local827 |= local1042.isAlphaTransformed(local353); local838 |= arg3.aBoolean278; } - if ((arg3.tween || Static204.applyTweening) && arg1 != -1 && arg3.frames.length > arg1) { + if ((arg3.tween || client.applyTweening) && arg1 != -1 && arg3.frames.length > arg1) { local360 = arg3.frames[arg1]; local451 = local360 >>> 16; local360 &= 0xFFFF; @@ -435,7 +439,7 @@ public final class PlayerAppearance { local827 |= local1154.isAlphaTransformed(local979); local838 |= arg2.aBoolean278; } - if ((arg2.tween || Static204.applyTweening) && arg5 != -1 && arg2.frames.length > arg5) { + if ((arg2.tween || client.applyTweening) && arg5 != -1 && arg2.frames.length > arg5) { local457 = arg2.anIntArray474[arg8]; local451 = arg2.frames[arg5]; local481 = local451 >>> 16; @@ -491,7 +495,7 @@ public final class PlayerAppearance { if ((local52 & Integer.MIN_VALUE) != 0 && !IdkTypeList.get(local52 & 0x3FFFFFFF).isHeadModelReady()) { local42 = true; } - } else if (!ObjTypeList.get(local52 & 0x3FFFFFFF).method1816(this.aBoolean141)) { + } else if (!ObjTypeList.get(local52 & 0x3FFFFFFF).method1816(this.gender)) { local42 = true; } } @@ -505,7 +509,7 @@ public final class PlayerAppearance { local114 = this.anIntArray233[local104]; @Pc(134) RawModel local134; if ((local114 & 0x40000000) != 0) { - local134 = ObjTypeList.get(local114 & 0x3FFFFFFF).getHeadModel(this.aBoolean141); + local134 = ObjTypeList.get(local114 & 0x3FFFFFFF).getHeadModel(this.gender); if (local134 != null) { local100[local52++] = local134; } diff --git a/client/src/main/java/PlayerSkillXpTable.java b/client/src/main/java/PlayerSkillXpTable.java index e25d47b..c07cfd2 100644 --- a/client/src/main/java/PlayerSkillXpTable.java +++ b/client/src/main/java/PlayerSkillXpTable.java @@ -3,6 +3,12 @@ import org.openrs2.deob.annotation.OriginalMember; public class PlayerSkillXpTable { @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!hk", name = "fb", descriptor = "[I") + public static final int[] boostedLevels = new int[25]; + @OriginalMember(owner = "client!sg", name = "b", descriptor = "[I") + public static final int[] experience = new int[25]; @OriginalMember(owner = "client!ha", name = "m", descriptor = "I") public static int updatedStatsWriterIndex = 0; } diff --git a/client/src/main/java/Protocol.java b/client/src/main/java/Protocol.java index addb90d..27713c3 100644 --- a/client/src/main/java/Protocol.java +++ b/client/src/main/java/Protocol.java @@ -31,6 +31,8 @@ public class Protocol { 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!g", name = "a", descriptor = "(IZ)V") public static void readRebuildPacket(@OriginalArg(1) boolean arg0) { @@ -187,7 +189,7 @@ public class Protocol { if (!local35 && (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat)) { ignore = true; } else { - for (@Pc(69) int local69 = 0; local69 < Static35.anInt1093; local69++) { + for (@Pc(69) int local69 = 0; local69 < IgnoreList.size; local69++) { if (IgnoreList.encodedUsernames[local69] == local48) { ignore = true; break; @@ -207,7 +209,7 @@ public class Protocol { local106 = phrase.id; message = phrase.type.decodeMessage(chatBuffer); } else { - message = Static218.escape(Static65.formatChatMessage(chatBuffer).encodeMessage()); + message = Font.escape(Static65.formatChatMessage(chatBuffer).encodeMessage()); } player.chatMessage = message.trim(); player.chatEffect = int1 & 0xFF; @@ -494,7 +496,7 @@ public class Protocol { extendedIds[extendedCount++] = local20; } @Pc(92) int local92 = inboundBuffer.gBits(5); - @Pc(99) int local99 = Static56.anIntArray141[inboundBuffer.gBits(3)]; + @Pc(99) int local99 = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; if (local92 > 15) { local92 -= 32; } @@ -592,7 +594,7 @@ public class Protocol { } } local163[0] = Integer.valueOf(inboundBuffer.g4()); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { @Pc(226) HookRequest local226 = new HookRequest(); local226.arguments = local163; Static82.method1767(local226); @@ -610,7 +612,7 @@ public class Protocol { local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local275 = local156.encode37(); local262 = false; - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (IgnoreList.encodedUsernames[local277] == local275) { local262 = true; break; @@ -623,7 +625,7 @@ public class Protocol { local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local275 = local156.encode37(); local262 = false; - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (IgnoreList.encodedUsernames[local277] == local275) { local262 = true; break; @@ -637,7 +639,7 @@ public class Protocol { local262 = false; local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local275 = local156.encode37(); - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (local275 == IgnoreList.encodedUsernames[local277]) { local262 = true; break; @@ -663,7 +665,7 @@ public class Protocol { local262 = false; local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local275 = local156.encode37(); - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (local275 == IgnoreList.encodedUsernames[local277]) { local262 = true; break; @@ -676,7 +678,7 @@ public class Protocol { local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local262 = false; local275 = local156.encode37(); - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (IgnoreList.encodedUsernames[local277] == local275) { local262 = true; break; @@ -689,7 +691,7 @@ public class Protocol { local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local275 = local156.encode37(); local262 = false; - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (local275 == IgnoreList.encodedUsernames[local277]) { local262 = true; break; @@ -702,7 +704,7 @@ public class Protocol { local156 = local245.substring(local245.indexOf(Static264.aClass100_875), 0); local262 = false; local275 = local156.encode37(); - for (local277 = 0; local277 < Static35.anInt1093; local277++) { + for (local277 = 0; local277 < IgnoreList.size; local277++) { if (IgnoreList.encodedUsernames[local277] == local275) { local262 = true; break; @@ -724,8 +726,8 @@ public class Protocol { local133 = inboundBuffer.g2le(); local786 = inboundBuffer.g2sub(); local790 = inboundBuffer.gjstr(); - if (Static248.method3288(local786)) { - Static193.method3498(local790, local133); + if (setVerifyId(local786)) { + DelayedStateChange.method3498(local790, local133); } opcode = -1; return true; @@ -748,7 +750,7 @@ public class Protocol { local133 = inboundBuffer.p4rme(); local786 = inboundBuffer.g2le(); local864 = inboundBuffer.g2(); - if (Static248.method3288(local864)) { + if (setVerifyId(local864)) { Static229.method3938(local786, local133); } opcode = -1; @@ -780,7 +782,7 @@ public class Protocol { break; } if (local908 <= 1) { - for (local924 = 0; local924 < Static35.anInt1093; local924++) { + for (local924 = 0; local924 < IgnoreList.size; local924++) { if (IgnoreList.encodedUsernames[local924] == local884) { local910 = true; break label1320; @@ -794,11 +796,11 @@ public class Protocol { Static251.anInt5447 = (Static251.anInt5447 + 1) % 100; @Pc(999) JagString local999 = QuickChatPhraseTypeList.get(local916).decodeMessage(inboundBuffer); if (local908 == 2 || local908 == 3) { - Chat.add(local916, 20, local999, Base37.decodeLowerCase(local275).method3125(), JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decodeLowerCase(local884).method3125() })); + Chat.add(local916, 20, local999, Base37.decode37(local275).toTitleCase(), JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decode37(local884).toTitleCase() })); } else if (local908 == 1) { - Chat.add(local916, 20, local999, Base37.decodeLowerCase(local275).method3125(), JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decodeLowerCase(local884).method3125() })); + Chat.add(local916, 20, local999, Base37.decode37(local275).toTitleCase(), JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decode37(local884).toTitleCase() })); } else { - Chat.add(local916, 20, local999, Base37.decodeLowerCase(local275).method3125(), Base37.decodeLowerCase(local884).method3125()); + Chat.add(local916, 20, local999, Base37.decode37(local275).toTitleCase(), Base37.decode37(local884).toTitleCase()); } } opcode = -1; @@ -811,41 +813,41 @@ public class Protocol { ClanChat.transmitAt = InterfaceList.transmitTimer; local884 = inboundBuffer.g8(); if (local884 == 0L) { - Static270.aClass100_1094 = null; + ClanChat.owner = null; opcode = -1; - Static15.aClass100_87 = null; - Static199.aClass3_Sub22Array1 = null; - Static214.anInt5577 = 0; + ClanChat.name = null; + ClanChat.members = null; + ClanChat.size = 0; return true; } local275 = inboundBuffer.g8(); - Static15.aClass100_87 = Base37.decodeLowerCase(local275); - Static270.aClass100_1094 = Base37.decodeLowerCase(local884); - Static50.aByte6 = inboundBuffer.g1s(); + ClanChat.name = Base37.decode37(local275); + ClanChat.owner = Base37.decode37(local884); + ClanChat.minKick = inboundBuffer.g1s(); local1146 = inboundBuffer.g1(); if (local1146 == 255) { opcode = -1; return true; } - Static214.anInt5577 = local1146; + ClanChat.size = local1146; @Pc(1158) Class3_Sub22[] local1158 = new Class3_Sub22[100]; - for (local1160 = 0; local1160 < Static214.anInt5577; local1160++) { + for (local1160 = 0; local1160 < ClanChat.size; local1160++) { local1158[local1160] = new Class3_Sub22(); local1158[local1160].key = inboundBuffer.g8(); - local1158[local1160].aClass100_636 = Base37.decodeLowerCase(local1158[local1160].key); - local1158[local1160].anInt3340 = inboundBuffer.g2(); - local1158[local1160].aByte9 = inboundBuffer.g1s(); + local1158[local1160].username = Base37.decode37(local1158[local1160].key); + local1158[local1160].world = inboundBuffer.g2(); + local1158[local1160].rank = inboundBuffer.g1s(); local1158[local1160].aClass100_635 = inboundBuffer.gjstr(); if (Static101.aLong98 == local1158[local1160].key) { - Static160.aByte14 = local1158[local1160].aByte9; + ClanChat.rank = local1158[local1160].rank; } } - local908 = Static214.anInt5577; + local908 = ClanChat.size; while (local908 > 0) { local1245 = true; local908--; for (local916 = 0; local916 < local908; local916++) { - if (local1158[local916].aClass100_636.method3139(local1158[local916 + 1].aClass100_636) > 0) { + if (local1158[local916].username.method3139(local1158[local916 + 1].username) > 0) { local1245 = false; @Pc(1279) Class3_Sub22 local1279 = local1158[local916]; local1158[local916] = local1158[local916 + 1]; @@ -856,7 +858,7 @@ public class Protocol { break; } } - Static199.aClass3_Sub22Array1 = local1158; + ClanChat.members = local1158; opcode = -1; return true; } else if (opcode == 164) { @@ -872,15 +874,15 @@ public class Protocol { local133 = inboundBuffer.g2(); local156 = inboundBuffer.gjstr(); local864 = inboundBuffer.g2leadd(); - if (Static248.method3288(local133)) { - Static193.method3498(local156, local864); + if (setVerifyId(local133)) { + DelayedStateChange.method3498(local156, local864); } opcode = -1; return true; } else if (opcode == 232) { - Static59.anInt1812 = inboundBuffer.g1(); - Static49.anInt1459 = inboundBuffer.g1(); - Static84.anInt2256 = inboundBuffer.g1(); + Chat.publicFilter = inboundBuffer.g1(); + Chat.privateFilter = inboundBuffer.g1(); + Chat.tradeFilter = inboundBuffer.g1(); opcode = -1; return true; } else { @@ -913,8 +915,8 @@ public class Protocol { local133 = inboundBuffer.p1neg(); local786 = inboundBuffer.g2(); local864 = inboundBuffer.g4me(); - if (Static248.method3288(local786)) { - Static153.method2905(local864, local133); + if (setVerifyId(local786)) { + DelayedStateChange.method2905(local864, local133); } opcode = -1; return true; @@ -922,7 +924,7 @@ public class Protocol { local133 = inboundBuffer.g2leadd(); local786 = inboundBuffer.g1add(); local864 = inboundBuffer.g2leadd(); - if (Static248.method3288(local864)) { + if (setVerifyId(local864)) { if (local786 == 2) { Static5.method34(); } @@ -940,8 +942,8 @@ public class Protocol { local133 = inboundBuffer.g2leadd(); local786 = inboundBuffer.g4(); local864 = inboundBuffer.g2sub(); - if (Static248.method3288(local133)) { - Static132.method2606(local864, local786); + if (setVerifyId(local133)) { + DelayedStateChange.method2606(local864, local786); } opcode = -1; return true; @@ -949,7 +951,7 @@ public class Protocol { local884 = inboundBuffer.g8(); local864 = inboundBuffer.g2(); local1409 = QuickChatPhraseTypeList.get(local864).decodeMessage(inboundBuffer); - Chat.add(local864, 19, local1409, null, Base37.decodeLowerCase(local884).method3125()); + Chat.add(local864, 19, local1409, null, Base37.decode37(local884).toTitleCase()); opcode = -1; return true; } else if (opcode == 169) { @@ -969,7 +971,7 @@ public class Protocol { local171 = inboundBuffer.g2(); local1146 = inboundBuffer.g1(); local277 = inboundBuffer.g1(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { Static260.method3849(local171, local864, local1146, local786, local277); } opcode = -1; @@ -978,8 +980,8 @@ public class Protocol { local133 = inboundBuffer.p4rme(); local786 = inboundBuffer.g2les(); local864 = inboundBuffer.g2sub(); - if (Static248.method3288(local864)) { - Static225.method3893(local133, local786); + if (setVerifyId(local864)) { + DelayedStateChange.method3893(local133, local786); } opcode = -1; return true; @@ -998,7 +1000,7 @@ public class Protocol { if (local1146 == 65535) { local1146 = -1; } - if (Static248.method3288(local864)) { + if (setVerifyId(local864)) { for (local277 = local1146; local277 <= local171; local277++) { local904 = (long) local277 + ((long) local786 << 32); local1804 = (ServerActiveProperties) Static210.aClass133_21.get(local904); @@ -1026,7 +1028,7 @@ public class Protocol { @Pc(1994) SeqType local1994; if (local864 >> 29 != 0) { local1146 = local864 & 0xFFFF; - @Pc(1894) Npc local1894 = Static175.npcs[local1146]; + @Pc(1894) Npc local1894 = NpcList.npcs[local1146]; if (local1894 != null) { if (local171 == 65535) { local171 = -1; @@ -1115,8 +1117,8 @@ public class Protocol { local786 = inboundBuffer.g2sub(); local864 = inboundBuffer.g2(); local171 = inboundBuffer.g2sub(); - if (Static248.method3288(local786)) { - Static190.method3444(local171 + (local864 << 16), local133); + if (setVerifyId(local786)) { + DelayedStateChange.setComponentModelRotationSpeedServer(local171 + (local864 << 16), local133); } opcode = -1; return true; @@ -1125,12 +1127,12 @@ public class Protocol { local133 = inboundBuffer.g1add(); local786 = inboundBuffer.g4rme(); local864 = inboundBuffer.g1(); - Static227.anIntArray446[local864] = local786; - Static99.anIntArray240[local864] = local133; - Static141.anIntArray326[local864] = 1; + PlayerSkillXpTable.experience[local864] = local786; + PlayerSkillXpTable.boostedLevels[local864] = local133; + PlayerSkillXpTable.baseLevels[local864] = 1; for (local171 = 0; local171 < 98; local171++) { if (ObjType.anIntArray213[local171] <= local786) { - Static141.anIntArray326[local864] = local171 + 2; + PlayerSkillXpTable.baseLevels[local864] = local171 + 2; } } PlayerSkillXpTable.updatedStats[PlayerSkillXpTable.updatedStatsWriterIndex++ & 0x1F] = local864; @@ -1143,7 +1145,7 @@ public class Protocol { } else if (opcode == 149) { local133 = inboundBuffer.g2(); local786 = inboundBuffer.g4(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { @Pc(2441) Class3_Sub31 local2441 = (Class3_Sub31) Static119.aClass133_9.get((long) local786); if (local2441 != null) { Static132.method2605(true, local2441); @@ -1159,7 +1161,7 @@ public class Protocol { local133 = inboundBuffer.g2le(); local786 = inboundBuffer.g2(); local864 = inboundBuffer.g2(); - if (Static248.method3288(local786)) { + if (setVerifyId(local786)) { Camera.yawTarget = local133; Camera.pitchTarget = local864; if (Static227.cameraType == 2) { @@ -1176,8 +1178,8 @@ public class Protocol { local864 = inboundBuffer.g2leadd(); local171 = inboundBuffer.g2leadd(); local1146 = inboundBuffer.g4(); - if (Static248.method3288(local786)) { - Static261.method4505(local864, local1146, local171, local133); + if (setVerifyId(local786)) { + DelayedStateChange.method4505(local864, local1146, local171, local133); } opcode = -1; return true; @@ -1216,8 +1218,8 @@ public class Protocol { if (local864 == 65535) { local864 = -1; } - if (Static248.method3288(local786)) { - Static132.method2607(-1, 1, local133, local864); + if (setVerifyId(local786)) { + DelayedStateChange.method2607(-1, 1, local133, local864); } opcode = -1; return true; @@ -1250,11 +1252,11 @@ public class Protocol { if (local864 > 0) { local506 = inboundBuffer.gjstr(); } - @Pc(2834) JagString local2834 = Base37.decodeLowerCase(local884).method3125(); - for (local1986 = 0; local1986 < Static9.anInt178; local1986++) { - if (local884 == Static92.aLongArray3[local1986]) { - if (local864 != Static104.anIntArray255[local1986]) { - Static104.anIntArray255[local1986] = local864; + @Pc(2834) JagString local2834 = Base37.decode37(local884).toTitleCase(); + for (local1986 = 0; local1986 < FriendsList.size; local1986++) { + if (local884 == FriendsList.encodedUsernames[local1986]) { + if (local864 != FriendsList.worlds[local1986]) { + FriendsList.worlds[local1986] = local864; if (local864 > 0) { Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[] { local2834, LocalizedText.FRIENDLOGIN})); } @@ -1262,45 +1264,45 @@ public class Protocol { Chat.add(JagString.EMPTY, 5, JagString.concatenate(new JagString[] { local2834, LocalizedText.FRIENDLOGOUT})); } } - Static214.aClass100Array170[local1986] = local506; - Static106.anIntArray258[local1986] = local171; + FriendsList.worldNames[local1986] = local506; + FriendsList.ranks[local1986] = local171; local2834 = null; Static3.aBooleanArray135[local1986] = local262; break; } } - if (local2834 != null && Static9.anInt178 < 200) { - Static92.aLongArray3[Static9.anInt178] = local884; - Static122.aClass100Array92[Static9.anInt178] = local2834; - Static104.anIntArray255[Static9.anInt178] = local864; - Static214.aClass100Array170[Static9.anInt178] = local506; - Static106.anIntArray258[Static9.anInt178] = local171; - Static3.aBooleanArray135[Static9.anInt178] = local262; - Static9.anInt178++; + if (local2834 != null && FriendsList.size < 200) { + FriendsList.encodedUsernames[FriendsList.size] = local884; + FriendsList.usernames[FriendsList.size] = local2834; + FriendsList.worlds[FriendsList.size] = local864; + FriendsList.worldNames[FriendsList.size] = local506; + FriendsList.ranks[FriendsList.size] = local171; + Static3.aBooleanArray135[FriendsList.size] = local262; + FriendsList.size++; } FriendsList.transmitAt = InterfaceList.transmitTimer; - local908 = Static9.anInt178; + local908 = FriendsList.size; while (local908 > 0) { local908--; @Pc(2961) boolean local2961 = true; for (local916 = 0; local916 < local908; local916++) { - if (Static104.anIntArray255[local916] != Static125.worldId && Static125.worldId == Static104.anIntArray255[local916 + 1] || Static104.anIntArray255[local916] == 0 && Static104.anIntArray255[local916 + 1] != 0) { + if (FriendsList.worlds[local916] != Player.worldId && Player.worldId == FriendsList.worlds[local916 + 1] || FriendsList.worlds[local916] == 0 && FriendsList.worlds[local916 + 1] != 0) { local2961 = false; - local3002 = Static104.anIntArray255[local916]; - Static104.anIntArray255[local916] = Static104.anIntArray255[local916 + 1]; - Static104.anIntArray255[local916 + 1] = local3002; - local3020 = Static214.aClass100Array170[local916]; - Static214.aClass100Array170[local916] = Static214.aClass100Array170[local916 + 1]; - Static214.aClass100Array170[local916 + 1] = local3020; - local3038 = Static122.aClass100Array92[local916]; - Static122.aClass100Array92[local916] = Static122.aClass100Array92[local916 + 1]; - Static122.aClass100Array92[local916 + 1] = local3038; - @Pc(3056) long local3056 = Static92.aLongArray3[local916]; - Static92.aLongArray3[local916] = Static92.aLongArray3[local916 + 1]; - Static92.aLongArray3[local916 + 1] = local3056; - @Pc(3074) int local3074 = Static106.anIntArray258[local916]; - Static106.anIntArray258[local916] = Static106.anIntArray258[local916 + 1]; - Static106.anIntArray258[local916 + 1] = local3074; + local3002 = FriendsList.worlds[local916]; + FriendsList.worlds[local916] = FriendsList.worlds[local916 + 1]; + FriendsList.worlds[local916 + 1] = local3002; + local3020 = FriendsList.worldNames[local916]; + FriendsList.worldNames[local916] = FriendsList.worldNames[local916 + 1]; + FriendsList.worldNames[local916 + 1] = local3020; + local3038 = FriendsList.usernames[local916]; + FriendsList.usernames[local916] = FriendsList.usernames[local916 + 1]; + FriendsList.usernames[local916 + 1] = local3038; + @Pc(3056) long local3056 = FriendsList.encodedUsernames[local916]; + FriendsList.encodedUsernames[local916] = FriendsList.encodedUsernames[local916 + 1]; + FriendsList.encodedUsernames[local916 + 1] = local3056; + @Pc(3074) int local3074 = FriendsList.ranks[local916]; + FriendsList.ranks[local916] = FriendsList.ranks[local916 + 1]; + FriendsList.ranks[local916 + 1] = local3074; @Pc(3092) boolean local3092 = Static3.aBooleanArray135[local916]; Static3.aBooleanArray135[local916] = Static3.aBooleanArray135[local916 + 1]; Static3.aBooleanArray135[local916 + 1] = local3092; @@ -1337,7 +1339,7 @@ public class Protocol { local171 = inboundBuffer.g2(); local1146 = inboundBuffer.g1(); local277 = inboundBuffer.g1(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { Static141.method2722(true, local1146, local171, local277, local864, local786); } opcode = -1; @@ -1361,7 +1363,7 @@ public class Protocol { break; } if (local1160 <= 1) { - for (local3272 = 0; local3272 < Static35.anInt1093; local3272++) { + for (local3272 = 0; local3272 < IgnoreList.size; local3272++) { if (local884 == IgnoreList.encodedUsernames[local3272]) { local3263 = true; break label1402; @@ -1375,11 +1377,11 @@ public class Protocol { Static251.anInt5447 = (Static251.anInt5447 + 1) % 100; local3020 = QuickChatPhraseTypeList.get(local1986).decodeMessage(inboundBuffer); if (local1160 == 2) { - Chat.add(local1986, 18, local3020, null, JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decodeLowerCase(local884).method3125() })); + Chat.add(local1986, 18, local3020, null, JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decode37(local884).toTitleCase() })); } else if (local1160 == 1) { - Chat.add(local1986, 18, local3020, null, JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decodeLowerCase(local884).method3125() })); + Chat.add(local1986, 18, local3020, null, JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decode37(local884).toTitleCase() })); } else { - Chat.add(local1986, 18, local3020, null, Base37.decodeLowerCase(local884).method3125()); + Chat.add(local1986, 18, local3020, null, Base37.decode37(local884).toTitleCase()); } } opcode = -1; @@ -1390,7 +1392,7 @@ public class Protocol { local133 = inboundBuffer.g4rme(); local786 = inboundBuffer.g2sub(); local864 = inboundBuffer.g4rme(); - if (Static248.method3288(local786)) { + if (setVerifyId(local786)) { @Pc(3449) Class3_Sub31 local3449 = (Class3_Sub31) Static119.aClass133_9.get((long) local133); local3456 = (Class3_Sub31) Static119.aClass133_9.get((long) local864); if (local3456 != null) { @@ -1422,7 +1424,7 @@ public class Protocol { local171 = inboundBuffer.g1(); local1146 = inboundBuffer.g1(); local277 = inboundBuffer.g2(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { Static176.aBooleanArray95[local786] = true; Static222.anIntArray437[local786] = local864; Static276.anIntArray564[local786] = local171; @@ -1435,13 +1437,13 @@ public class Protocol { local133 = inboundBuffer.g4rme(); local786 = inboundBuffer.g2sub(); local864 = inboundBuffer.g2leadd(); - if (Static248.method3288(local786)) { - Static136.method2649(local864, local133); + if (setVerifyId(local786)) { + DelayedStateChange.method2649(local864, local133); } opcode = -1; return true; } else if (opcode == 85) { - Static60.rebootTimer = inboundBuffer.g2() * 30; + Player.rebootTimer = inboundBuffer.g2() * 30; opcode = -1; InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; return true; @@ -1453,14 +1455,14 @@ public class Protocol { local133 = inboundBuffer.g2le(); local786 = inboundBuffer.p1neg(); local864 = inboundBuffer.g2leadd(); - if (Static248.method3288(local133)) { - Static132.method2606(local864, local786); + if (setVerifyId(local133)) { + DelayedStateChange.method2606(local864, local786); } opcode = -1; return true; } else if (opcode == 234) { InterfaceList.method2245(); - Static12.anInt400 = inboundBuffer.g1(); + Player.runEnergy = inboundBuffer.g1(); InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; opcode = -1; return true; @@ -1480,7 +1482,7 @@ public class Protocol { local133 = inboundBuffer.g2le(); local786 = inboundBuffer.g1ssub(); local864 = inboundBuffer.g2(); - @Pc(3766) Npc local3766 = Static175.npcs[local133]; + @Pc(3766) Npc local3766 = NpcList.npcs[local133]; if (local3766 != null) { Static223.method3855(local786, local864, local3766); } @@ -1488,14 +1490,14 @@ public class Protocol { return true; } else if (opcode == 159) { InterfaceList.method2245(); - Static251.anInt5456 = inboundBuffer.g2s(); + Player.weight = inboundBuffer.g2s(); InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; opcode = -1; return true; } else if (opcode == 71) { local884 = inboundBuffer.g8(); - local790 = Static218.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); - Chat.add(Base37.decodeLowerCase(local884).method3125(), 6, local790); + local790 = Font.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); + Chat.add(Base37.decode37(local884).toTitleCase(), 6, local790); opcode = -1; return true; } else if (opcode == 42) { @@ -1520,8 +1522,8 @@ public class Protocol { local864 = inboundBuffer.g2leadd(); local171 = inboundBuffer.g2le(); local1146 = inboundBuffer.g2leadd(); - if (Static248.method3288(local133)) { - Static132.method2607(local864, 7, local786, local171 << 16 | local1146); + if (setVerifyId(local133)) { + DelayedStateChange.method2607(local864, 7, local786, local171 << 16 | local1146); } opcode = -1; return true; @@ -1536,7 +1538,7 @@ public class Protocol { local786 = inboundBuffer.p4rme(); local864 = inboundBuffer.g2sub(); local171 = inboundBuffer.g2(); - if (Static248.method3288(local864)) { + if (setVerifyId(local864)) { local3456 = (Class3_Sub31) Static119.aClass133_9.get((long) local786); if (local3456 != null) { Static132.method2605(local3456.anInt5878 != local171, local3456); @@ -1551,9 +1553,9 @@ public class Protocol { PlayerList.players[local133].seqId = -1; } } - for (local133 = 0; local133 < Static175.npcs.length; local133++) { - if (Static175.npcs[local133] != null) { - Static175.npcs[local133].seqId = -1; + for (local133 = 0; local133 < NpcList.npcs.length; local133++) { + if (NpcList.npcs[local133] != null) { + NpcList.npcs[local133].seqId = -1; } } opcode = -1; @@ -1603,16 +1605,16 @@ public class Protocol { opcode = -1; return true; } else if (opcode == 126) { - Static35.anInt1093 = length / 8; - for (local133 = 0; local133 < Static35.anInt1093; local133++) { + IgnoreList.size = length / 8; + for (local133 = 0; local133 < IgnoreList.size; local133++) { IgnoreList.encodedUsernames[local133] = inboundBuffer.g8(); - Static193.aClass100Array134[local133] = Base37.decodeLowerCase(IgnoreList.encodedUsernames[local133]); + Static193.aClass100Array134[local133] = Base37.decode37(IgnoreList.encodedUsernames[local133]); } FriendsList.transmitAt = InterfaceList.transmitTimer; opcode = -1; return true; } else if (opcode == 32) { - Static86.method1800(); + method1800(); opcode = -1; return true; } else if (opcode == 119) { @@ -1620,8 +1622,8 @@ public class Protocol { local786 = inboundBuffer.g4me(); local864 = inboundBuffer.g2s(); local171 = inboundBuffer.g2sadd(); - if (Static248.method3288(local133)) { - Static280.method4666(local864, local786, local171); + if (setVerifyId(local133)) { + DelayedStateChange.method4666(local864, local786, local171); } opcode = -1; return true; @@ -1657,7 +1659,7 @@ public class Protocol { if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { local4425 = true; } else { - for (local3002 = 0; local3002 < Static35.anInt1093; local3002++) { + for (local3002 = 0; local3002 < IgnoreList.size; local3002++) { if (local884 == IgnoreList.encodedUsernames[local3002]) { local4425 = true; break label1450; @@ -1676,13 +1678,13 @@ public class Protocol { if (!local4425 && Player.inTutorialIsland == 0) { Static233.aLongArray9[Static251.anInt5447] = local4431; Static251.anInt5447 = (Static251.anInt5447 + 1) % 100; - @Pc(4518) JagString local4518 = Static218.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); + @Pc(4518) JagString local4518 = Font.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); if (local1160 == 2 || local1160 == 3) { - Chat.add(JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decodeLowerCase(local884).method3125() }), 7, local4518); + Chat.add(JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decode37(local884).toTitleCase() }), 7, local4518); } else if (local1160 == 1) { - Chat.add(JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decodeLowerCase(local884).method3125() }), 7, local4518); + Chat.add(JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decode37(local884).toTitleCase() }), 7, local4518); } else { - Chat.add(Base37.decodeLowerCase(local884).method3125(), 3, local4518); + Chat.add(Base37.decode37(local884).toTitleCase(), 3, local4518); } } opcode = -1; @@ -1703,7 +1705,7 @@ public class Protocol { if (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat) { local4632 = true; } else { - for (local4634 = 0; local4634 < Static35.anInt1093; local4634++) { + for (local4634 = 0; local4634 < IgnoreList.size; local4634++) { if (IgnoreList.encodedUsernames[local4634] == local884) { local4632 = true; break label1575; @@ -1722,13 +1724,13 @@ public class Protocol { if (!local4632 && Player.inTutorialIsland == 0) { Static233.aLongArray9[Static251.anInt5447] = local4626; Static251.anInt5447 = (Static251.anInt5447 + 1) % 100; - local3038 = Static218.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); + local3038 = Font.escape(Static65.formatChatMessage(inboundBuffer).encodeMessage()); if (local908 == 2 || local908 == 3) { - Static73.method1598(local3038, JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decodeLowerCase(local884).method3125() }), Base37.decodeLowerCase(local275).method3125()); + Static73.method1598(local3038, JagString.concatenate(new JagString[] { Static44.aClass100_336, Base37.decode37(local884).toTitleCase() }), Base37.decode37(local275).toTitleCase()); } else if (local908 == 1) { - Static73.method1598(local3038, JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decodeLowerCase(local884).method3125() }), Base37.decodeLowerCase(local275).method3125()); + Static73.method1598(local3038, JagString.concatenate(new JagString[] { Static65.aClass100_435, Base37.decode37(local884).toTitleCase() }), Base37.decode37(local275).toTitleCase()); } else { - Static73.method1598(local3038, Base37.decodeLowerCase(local884).method3125(), Base37.decodeLowerCase(local275).method3125()); + Static73.method1598(local3038, Base37.decode37(local884).toTitleCase(), Base37.decode37(local275).toTitleCase()); } } opcode = -1; @@ -1750,12 +1752,12 @@ public class Protocol { } else if (opcode == 66) { local133 = inboundBuffer.g2leadd(); local786 = inboundBuffer.g4rme(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { local864 = 0; if (PlayerList.self.appearance != null) { local864 = PlayerList.self.appearance.method1952(); } - Static132.method2607(-1, 3, local786, local864); + DelayedStateChange.method2607(-1, 3, local786, local864); } opcode = -1; return true; @@ -1763,8 +1765,8 @@ public class Protocol { local133 = inboundBuffer.p4rme(); local156 = inboundBuffer.gjstr(); local864 = inboundBuffer.g2sub(); - if (Static248.method3288(local864)) { - Static80.method3617(local156, local133); + if (setVerifyId(local864)) { + DelayedStateChange.method3617(local156, local133); } opcode = -1; return true; @@ -1812,7 +1814,7 @@ public class Protocol { return true; } else if (opcode == 24) { local133 = inboundBuffer.g2(); - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { Static35.resetCameraEffects(); } opcode = -1; @@ -1824,10 +1826,10 @@ public class Protocol { } else if (opcode == 116) { local133 = inboundBuffer.g1(); if (inboundBuffer.g1() == 0) { - StockMarketManager.aClass136Array1[local133] = new StockMarketOffer(); + StockMarketManager.offers[local133] = new StockMarketOffer(); } else { inboundBuffer.offset--; - StockMarketManager.aClass136Array1[local133] = new StockMarketOffer(inboundBuffer); + StockMarketManager.offers[local133] = new StockMarketOffer(inboundBuffer); } opcode = -1; StockMarketManager.transmitAt = InterfaceList.transmitTimer; @@ -1839,8 +1841,8 @@ public class Protocol { local133 = -1; } local864 = inboundBuffer.g2le(); - if (Static248.method3288(local864)) { - Static132.method2607(-1, 2, local786, local133); + if (setVerifyId(local864)) { + DelayedStateChange.method2607(-1, 2, local786, local133); } opcode = -1; return true; @@ -1860,7 +1862,7 @@ public class Protocol { if (local171 == 65535) { local171 = -1; } - if (Static248.method3288(local133)) { + if (setVerifyId(local133)) { for (local277 = local171; local277 <= local786; local277++) { local904 = ((long) local864 << 32) + ((long) local277); local1804 = (ServerActiveProperties) Static210.aClass133_21.get(local904); @@ -1878,7 +1880,7 @@ public class Protocol { opcode = -1; return true; } else if (opcode == 197) { - Static166.anInt4054 = inboundBuffer.g1(); + FriendsList.state = inboundBuffer.g1(); FriendsList.transmitAt = InterfaceList.transmitTimer; opcode = -1; return true; @@ -1891,37 +1893,37 @@ public class Protocol { local262 = true; } if (local262) { - if (Static214.anInt5577 == 0) { + if (ClanChat.size == 0) { opcode = -1; return true; } local884 &= Long.MAX_VALUE; - for (local277 = 0; Static214.anInt5577 > local277 && (local884 != Static199.aClass3_Sub22Array1[local277].key || local864 != Static199.aClass3_Sub22Array1[local277].anInt3340); local277++) { + for (local277 = 0; ClanChat.size > local277 && (local884 != ClanChat.members[local277].key || local864 != ClanChat.members[local277].world); local277++) { } - if (local277 < Static214.anInt5577) { - while (Static214.anInt5577 - 1 > local277) { - Static199.aClass3_Sub22Array1[local277] = Static199.aClass3_Sub22Array1[local277 + 1]; + if (local277 < ClanChat.size) { + while (ClanChat.size - 1 > local277) { + ClanChat.members[local277] = ClanChat.members[local277 + 1]; local277++; } - Static214.anInt5577--; - Static199.aClass3_Sub22Array1[Static214.anInt5577] = null; + ClanChat.size--; + ClanChat.members[ClanChat.size] = null; } } else { local506 = inboundBuffer.gjstr(); @Pc(5347) Class3_Sub22 local5347 = new Class3_Sub22(); local5347.key = local884; - local5347.aClass100_636 = Base37.decodeLowerCase(local5347.key); - local5347.aByte9 = local5325; + local5347.username = Base37.decode37(local5347.key); + local5347.rank = local5325; local5347.aClass100_635 = local506; - local5347.anInt3340 = local864; - for (local1986 = Static214.anInt5577 - 1; local1986 >= 0; local1986--) { - local908 = Static199.aClass3_Sub22Array1[local1986].aClass100_636.method3139(local5347.aClass100_636); + local5347.world = local864; + for (local1986 = ClanChat.size - 1; local1986 >= 0; local1986--) { + local908 = ClanChat.members[local1986].username.method3139(local5347.username); if (local908 == 0) { - Static199.aClass3_Sub22Array1[local1986].anInt3340 = local864; - Static199.aClass3_Sub22Array1[local1986].aByte9 = local5325; - Static199.aClass3_Sub22Array1[local1986].aClass100_635 = local506; + ClanChat.members[local1986].world = local864; + ClanChat.members[local1986].rank = local5325; + ClanChat.members[local1986].aClass100_635 = local506; if (local884 == Static101.aLong98) { - Static160.aByte14 = local5325; + ClanChat.rank = local5325; } ClanChat.transmitAt = InterfaceList.transmitTimer; opcode = -1; @@ -1931,21 +1933,21 @@ public class Protocol { break; } } - if (Static199.aClass3_Sub22Array1.length <= Static214.anInt5577) { + if (ClanChat.members.length <= ClanChat.size) { opcode = -1; return true; } - for (local908 = Static214.anInt5577 - 1; local908 > local1986; local908--) { - Static199.aClass3_Sub22Array1[local908 + 1] = Static199.aClass3_Sub22Array1[local908]; + for (local908 = ClanChat.size - 1; local908 > local1986; local908--) { + ClanChat.members[local908 + 1] = ClanChat.members[local908]; } - if (Static214.anInt5577 == 0) { - Static199.aClass3_Sub22Array1 = new Class3_Sub22[100]; + if (ClanChat.size == 0) { + ClanChat.members = new Class3_Sub22[100]; } - Static199.aClass3_Sub22Array1[local1986 + 1] = local5347; + ClanChat.members[local1986 + 1] = local5347; if (Static101.aLong98 == local884) { - Static160.aByte14 = local5325; + ClanChat.rank = local5325; } - Static214.anInt5577++; + ClanChat.size++; } opcode = -1; ClanChat.transmitAt = InterfaceList.transmitTimer; @@ -1958,13 +1960,13 @@ public class Protocol { local864 = -1; } local171 = inboundBuffer.g2le(); - if (Static248.method3288(local171)) { + if (setVerifyId(local171)) { @Pc(5603) Component local5603 = InterfaceList.getComponent(local786); @Pc(5615) ObjType local5615; if (local5603.aBoolean32) { Static209.method3707(local786, local133, local864); local5615 = ObjTypeList.get(local864); - Static261.method4505(local5615.zoom2d, local786, local5615.yAngle2d, local5615.xAngle2d); + DelayedStateChange.method4505(local5615.zoom2d, local786, local5615.yAngle2d, local5615.xAngle2d); Static145.method2745(local786, local5615.zAngle2d, local5615.yOffset2d, local5615.xOffset2d); } else if (local864 == -1) { local5603.modelType = 0; @@ -2034,7 +2036,7 @@ public class Protocol { if (local133 == 65535) { local133 = -1; } - Static148.method2765(local133); + MusicPlayer.playSong(local133); opcode = -1; return true; } else if (opcode == 208) { @@ -2043,7 +2045,7 @@ public class Protocol { if (local786 == 65535) { local786 = -1; } - Static278.method4650(local133, local786); + MusicPlayer.playJingle(local133, local786); opcode = -1; return true; } else { @@ -2076,4 +2078,884 @@ public class Protocol { return true; } } + + @OriginalMember(owner = "client!gg", name = "a", descriptor = "(Z)V") + public static void method1756() { + // todo: consolidate/rename static classes + if (Static267.anInt5775 > 0) { + Static267.anInt5775--; + } + if (Player.rebootTimer > 1) { + Player.rebootTimer--; + InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; + } + if (LoginManager.aBoolean247) { + LoginManager.aBoolean247 = false; + Static175.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 (Static264.mouseRecorderPrevX != x || y != Static179.mouseRecorderPrevY) { + dx = x - Static264.mouseRecorderPrevX; + Static264.mouseRecorderPrevX = x; + dy = y - Static179.mouseRecorderPrevY; + Static179.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.p1len(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 - Static183.prevClickTime) / 50L; + type = Mouse.clickY; + if (type < 0) { + type = 0; + } else if (type > 65535) { + type = 65535; + } + if (loops > 32767L) { + loops = 32767L; + } + i = Mouse.clickX; + Static183.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.p2leadd(button << 15 | x); + outboundBuffer.p4me(i | type << 16); + } + if (Static16.anInt551 > 0) { + Static16.anInt551--; + } + if (Preferences.aBoolean63) { + for (i = 0; i < InterfaceList.keyQueueSize; i++) { + offset = InterfaceList.keyCodes[i]; + if (offset == 98 || offset == 99 || offset == 96 || offset == 97) { + Static197.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]) { + Static197.aBoolean228 = true; + } + if (Static197.aBoolean228 && Static16.anInt551 <= 0) { + Static16.anInt551 = 20; + Static197.aBoolean228 = false; + outboundBuffer.p1isaac(21); + outboundBuffer.p2add((int)Camera.pitchTarget); + outboundBuffer.p2le((int)Camera.yawTarget); + } + if (GameShell.focus && !Static67.prevFocus) { + Static67.prevFocus = true; + outboundBuffer.p1isaac(22); + outboundBuffer.p1(1); + } + if (!GameShell.focus && Static67.prevFocus) { + Static67.prevFocus = false; + outboundBuffer.p1isaac(22); + outboundBuffer.p1(0); + } + if (!Preferences.sentToServer) { + outboundBuffer.p1isaac(98); + outboundBuffer.p4(Preferences.toInt()); + Preferences.sentToServer = true; + } + Static31.method846(); + if (client.gameState != 30) { + return; + } + ChangeLocRequest.loop(); + AttachLocRequest.loop(); + SoundPlayer.loop(); + Static201.anInt1862++; + if (Static201.anInt1862 > 750) { + Static175.method3279(); + return; + } + Static71.method1444(); + Static109.method2274(); + OverheadChat.loop(); + if (WorldMap.component != null) { + Static12.method447(); + } + // VarpDomain + for (i = Static38.poll(true); i != -1; i = Static38.poll(false)) { + Static85.method1775(i); + VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; + } + @Pc(782) int modelId; + // DelayedStateChange + for (@Pc(709) DelayedStateChange change = Static127.poll(); change != null; change = Static127.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; + Static43.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; + Static43.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; + Static43.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; + Static43.redraw(local1189); + } + } else if (type == 7) { + component = InterfaceList.getComponent(i); + // todo: this should not be necessary, data/server-related? + if (component != null) { + @Pc(1145) boolean hidden = change.intArg1 == 1; + if (hidden != component.hidden) { + component.hidden = hidden; + Static43.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; + } + } + Static43.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; + Static43.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; + Static43.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; + Static43.redraw(component); + } else if (type == 12) { + component = InterfaceList.getComponent(i); + x = change.intArg1; + if (component != null && component.type == 0) { + if (x > component.anInt491 - component.anInt459) { + x = component.anInt491 - component.anInt459; + } + if (x < 0) { + x = 0; + } + if (x != component.scrollY) { + component.scrollY = x; + Static43.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; + } + } + Static178.anInt4247++; + if (Static257.aClass13_7 != null) { + Static72.anInt2043++; + if (Static72.anInt2043 >= 15) { + Static43.redraw(Static257.aClass13_7); + Static257.aClass13_7 = null; + } + } + @Pc(1361) Component local1361; + if (Static118.aClass13_15 != null) { + Static43.redraw(Static118.aClass13_15); + if (Static149.anInt3554 + 5 < Mouse.anInt4873 || Mouse.anInt4873 < Static149.anInt3554 - 5 || Static206.anInt4773 + 5 < Mouse.anInt5032 || Static206.anInt4773 - 5 > Mouse.anInt5032) { + Static123.aBoolean155 = true; + } + Static78.anInt2145++; + if (Mouse.pressedButton == 0) { + if (Static123.aBoolean155 && Static78.anInt2145 >= 5) { + if (Static118.aClass13_15 == Static169.aClass13_18 && Static4.anInt36 != Static18.anInt588) { + local1361 = Static118.aClass13_15; + @Pc(1363) byte local1363 = 0; + if (Static179.anInt4254 == 1 && local1361.anInt453 == 206) { + local1363 = 1; + } + if (local1361.objTypes[Static18.anInt588] <= 0) { + local1363 = 0; + } + if (InterfaceList.getServerActiveProperties(local1361).isObjReplaceEnabled()) { + y = Static4.anInt36; + x = Static18.anInt588; + local1361.objTypes[x] = local1361.objTypes[y]; + local1361.objCounts[x] = local1361.objCounts[y]; + local1361.objTypes[y] = -1; + local1361.objCounts[y] = 0; + } else if (local1363 == 1) { + x = Static18.anInt588; + y = Static4.anInt36; + while (x != y) { + if (y > x) { + local1361.swapObjs(y - 1, y); + y--; + } else if (x > y) { + local1361.swapObjs(y + 1, y); + y++; + } + } + } else { + local1361.swapObjs(Static18.anInt588, Static4.anInt36); + } + outboundBuffer.p1isaac(231); + outboundBuffer.p2(Static4.anInt36); + outboundBuffer.p4le2(Static118.aClass13_15.id); + outboundBuffer.p2add(Static18.anInt588); + outboundBuffer.p1sub(local1363); + } + } else if ((Static116.anInt2952 == 1 || Static277.method4640(Static231.anInt5204 - 1)) && Static231.anInt5204 > 2) { + Static226.method3901(); + } else if (Static231.anInt5204 > 0) { + Static59.method1372(); + } + Mouse.clickButton = 0; + Static72.anInt2043 = 10; + Static118.aClass13_15 = null; + } + } + Static146.aBoolean174 = false; + Static56.aClass13_12 = null; + Static44.aBoolean83 = false; + InterfaceList.keyQueueSize = 0; + local1361 = Static180.aClass13_22; + Static180.aClass13_22 = null; + @Pc(1508) Component local1508 = Static43.aClass13_11; + Static43.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) { + Static57.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) Static115.mediumPriorityRequests.removeHead(); + if (priorityRequest == null) { + while (true) { + do { + priorityRequest = (HookRequest) InterfaceList.lowPriorityRequests.removeHead(); + if (priorityRequest == null) { + if (WorldMap.component == null) { + Static137.anInt3337 = 0; + } + if (Static105.aClass13_14 != null) { + Static4.method28(); + } + if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static58.wheelRotation != 0) { + y = Player.level - Static58.wheelRotation; + if (y < 0) { + y = 0; + } else if (y > 3) { + y = 3; + } + // Cheat + Cheat.teleport(PlayerList.self.movementQueueX[0] + Static225.originX, PlayerList.self.movementQueueZ[0] + Static142.originZ, y); + } + if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { + if (Static56.anInt1742 != -1) { + Cheat.teleport(Static225.originX + Static56.anInt1742, Static142.originZ - -Static116.anInt2954, Player.level); + } + Static187.anInt4422 = 0; + Static125.anInt3096 = 0; + } else if (Static125.anInt3096 == 2) { + if (Static56.anInt1742 != -1) { + outboundBuffer.p1isaac(131); + outboundBuffer.p4me(Static98.anInt2512); + outboundBuffer.p2add(Static225.originX + Static56.anInt1742); + outboundBuffer.p2leadd(Static15.anInt506); + outboundBuffer.p2add(Static116.anInt2954 + Static142.originZ); + Cross.type = 1; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + } + Static125.anInt3096 = 0; + } else if (Static187.anInt4422 == 2) { + if (Static56.anInt1742 != -1) { + outboundBuffer.p1isaac(179); + outboundBuffer.p2(Static142.originZ + Static116.anInt2954); + outboundBuffer.p2(Static56.anInt1742 + Static225.originX); + Cross.milliseconds = 0; + Cross.type = 1; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + } + Static187.anInt4422 = 0; + } else if (Static56.anInt1742 != -1 && Static125.anInt3096 == 0 && Static187.anInt4422 == 0) { + @Pc(1871) boolean local1871 = Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, Static56.anInt1742, 0, 0, 0, Static116.anInt2954, PlayerList.self.movementQueueX[0]); + if (local1871) { + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 1; + } + } + Static56.anInt1742 = -1; + Static7.method843(); + if (Static180.aClass13_22 != local1361) { + if (local1361 != null) { + Static43.redraw(local1361); + } + if (Static180.aClass13_22 != null) { + Static43.redraw(Static180.aClass13_22); + } + } + if (local1508 != Static43.aClass13_11 && Static191.anInt4504 == Static133.anInt5235) { + if (local1508 != null) { + Static43.redraw(local1508); + } + if (Static43.aClass13_11 != null) { + Static43.redraw(Static43.aClass13_11); + } + } + if (Static43.aClass13_11 == null) { + if (Static133.anInt5235 > 0) { + Static133.anInt5235--; + } + } else if (Static133.anInt5235 < Static191.anInt4504) { + Static133.anInt5235++; + if (Static191.anInt4504 == Static133.anInt5235) { + Static43.redraw(Static43.aClass13_11); + } + } + if (Static227.cameraType == 1) { + Static250.method4273(); + } else if (Static227.cameraType == 2) { + Static125.updateLockedCamera(); + } else { + Static40.updateLoginScreenCamera(); + } + for (y = 0; y < 5; y++) { + @Pc(2001) int local2001 = Static31.anIntArray76[y]++; + } + y = Mouse.getIdleLoops(); + x = Keyboard.getIdleLoops(); + if (y > 15000 && x > 15000) { + Static267.anInt5775 = 250; + Static48.setIdleLoops(14500); + outboundBuffer.p1isaac(245); + } + if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { + if (Static33.openUrlRequest.result != null) { + Static169.openUrl(Static175.url, Static164.newTab); + } + Static175.url = null; + Static33.openUrlRequest = null; + Static164.newTab = false; + } + Static131.anInt3251++; + Static82.anInt2252++; + Static143.anInt3486++; + if (Static143.anInt3486 > 500) { + Static143.anInt3486 = 0; + modelId = (int) (Math.random() * 8.0D); + if ((modelId & 0x4) == 4) { + Static230.anInt5161 += Static220.anInt4941; + } + if ((modelId & 0x2) == 2) { + Static206.anInt4774 += Static20.anInt659; + } + if ((modelId & 0x1) == 1) { + Static132.anInt3291 += Static248.anInt4229; + } + } + if (Static82.anInt2252 > 500) { + Static82.anInt2252 = 0; + modelId = (int) (Math.random() * 8.0D); + if ((modelId & 0x1) == 1) { + Static59.anInt1814 += Static263.anInt5755; + } + if ((modelId & 0x2) == 2) { + Static273.anInt4130 += Static179.anInt4262; + } + } + if (Static132.anInt3291 < -50) { + Static248.anInt4229 = 2; + } + if (Static59.anInt1814 < -60) { + Static263.anInt5755 = 2; + } + if (Static273.anInt4130 < -20) { + Static179.anInt4262 = 1; + } + if (Static206.anInt4774 < -55) { + Static20.anInt659 = 2; + } + if (Static206.anInt4774 > 55) { + Static20.anInt659 = -2; + } + if (Static230.anInt5161 < -40) { + Static220.anInt4941 = 1; + } + if (Static132.anInt3291 > 50) { + Static248.anInt4229 = -2; + } + if (Static230.anInt5161 > 40) { + Static220.anInt4941 = -1; + } + if (Static273.anInt4130 > 10) { + Static179.anInt4262 = -1; + } + if (Static59.anInt1814 > 60) { + Static263.anInt5755 = -2; + } + if (Static131.anInt3251 > 50) { + outboundBuffer.p1isaac(93); + } + if (Static34.verifyIdChanged) { + Static71.transmitVerifyId(); + Static34.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) { + Static175.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]); + Static82.method1767(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); + Static82.method1767(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); + Static82.method1767(priorityRequest); + } + } + + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(I)V") + public static void method4014() { + for (@Pc(3) int local3 = 0; local3 < extendedCount; local3++) { + @Pc(10) int local10 = extendedIds[local3]; + @Pc(14) Npc local14 = NpcList.npcs[local10]; + @Pc(18) int local18 = inboundBuffer.g1(); + if ((local18 & 0x8) != 0) { + local18 += inboundBuffer.g1() << 8; + } + @Pc(43) int local43; + @Pc(47) int local47; + if ((local18 & 0x40) != 0) { + local43 = inboundBuffer.g1(); + local47 = inboundBuffer.p1neg(); + local14.addHit(local47, client.loop, local43); + local14.hitpointsBarVisibleUntil = client.loop + 300; + local14.hitpointsBar = inboundBuffer.g1ssub(); + } + if ((local18 & 0x2) != 0) { + local43 = inboundBuffer.p1neg(); + local47 = inboundBuffer.g1ssub(); + local14.addHit(local47, client.loop, local43); + } + if ((local18 & 0x10) != 0) { + local43 = inboundBuffer.g2(); + local47 = inboundBuffer.g1(); + if (local43 == 65535) { + local43 = -1; + } + Static223.method3855(local47, local43, local14); + } + if ((local18 & 0x4) != 0) { + local14.faceEntity = inboundBuffer.g2sub(); + if (local14.faceEntity == 65535) { + local14.faceEntity = -1; + } + } + if ((local18 & 0x80) != 0) { + local43 = inboundBuffer.g2sub(); + if (local43 == 65535) { + local43 = -1; + } + local47 = inboundBuffer.g4me(); + @Pc(147) boolean local147 = true; + if (local43 != -1 && local14.spotAnimId != -1 && SeqTypeList.get(SpotAnimTypeList.get(local43).seqId).anInt5355 < SeqTypeList.get(SpotAnimTypeList.get(local14.spotAnimId).seqId).anInt5355) { + local147 = false; + } + if (local147) { + local14.spotAnimId = local43; + local14.spotAnimStart = (local47 & 0xFFFF) + client.loop; + local14.anInt3361 = 0; + local14.anInt3399 = 0; + local14.spotAnimY = local47 >> 16; + local14.anInt3418 = 1; + if (local14.spotAnimStart > client.loop) { + local14.anInt3399 = -1; + } + if (local14.spotAnimId != -1 && local14.spotAnimStart == client.loop) { + @Pc(227) int local227 = SpotAnimTypeList.get(local14.spotAnimId).seqId; + if (local227 != -1) { + @Pc(236) SeqType local236 = SeqTypeList.get(local227); + if (local236 != null && local236.frames != null) { + SoundPlayer.playSeqSound(local14.zFine, local236, local14.xFine, false, 0); + } + } + } + } + } + if ((local18 & 0x1) != 0) { + if (local14.type.hasAreaSound()) { + AreaSoundManager.remove(local14); + } + local14.method2698(NpcTypeList.get(inboundBuffer.g2le())); + local14.method2692(local14.type.soze); + local14.anInt3365 = local14.type.basId; + if (local14.type.hasAreaSound()) { + AreaSoundManager.add(local14.movementQueueZ[0], null, 0, local14, local14.movementQueueX[0], Player.level, null); + } + } + if ((local18 & 0x20) != 0) { + local14.chatMessage = inboundBuffer.gjstr(); + local14.chatLoops = 100; + } + if ((local18 & 0x100) != 0) { + local43 = inboundBuffer.p1neg(); + @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 local339 = 0; local339 < local43; local339++) { + @Pc(350) int local350 = inboundBuffer.g2le(); + if (local350 == 65535) { + local350 = -1; + } + local331[local339] = local350; + local334[local339] = inboundBuffer.g1ssub(); + local337[local339] = inboundBuffer.g2(); + } + Static159.method3037(local337, local14, local334, local331); + } + if ((local18 & 0x200) != 0) { + local14.faceX = inboundBuffer.g2sub(); + local14.faceY = inboundBuffer.g2(); + } + } + } + + @OriginalMember(owner = "client!gm", name = "h", descriptor = "(I)V") + public static void method1800() { + extendedCount = 0; + removedCount = 0; + method1202(); + method4645(); + method4014(); + @Pc(19) int local19; + for (local19 = 0; local19 < removedCount; local19++) { + @Pc(30) int local30 = removedIds[local19]; + if (NpcList.npcs[local30].lastSeenLoop != client.loop) { + if (NpcList.npcs[local30].type.hasAreaSound()) { + AreaSoundManager.remove(NpcList.npcs[local30]); + } + NpcList.npcs[local30].method2698(null); + NpcList.npcs[local30] = null; + } + } + if (length != inboundBuffer.offset) { + throw new RuntimeException("gnp1 pos:" + inboundBuffer.offset + " psize:" + length); + } + for (local19 = 0; local19 < Static272.anInt5214; local19++) { + if (NpcList.npcs[Static33.anIntArray79[local19]] == null) { + throw new RuntimeException("gnp2 pos:" + local19 + " size:" + Static272.anInt5214); + } + } + } + + @OriginalMember(owner = "client!dm", name = "a", descriptor = "(B)V") + public static void method1202() { + inboundBuffer.accessBits(); + @Pc(13) int local13 = inboundBuffer.gBits(8); + @Pc(22) int local22; + if (Static272.anInt5214 > local13) { + for (local22 = local13; local22 < Static272.anInt5214; local22++) { + removedIds[removedCount++] = Static33.anIntArray79[local22]; + } + } + if (Static272.anInt5214 < local13) { + throw new RuntimeException("gnpov1"); + } + Static272.anInt5214 = 0; + for (local22 = 0; local22 < local13; local22++) { + @Pc(61) int local61 = Static33.anIntArray79[local22]; + @Pc(65) Npc local65 = NpcList.npcs[local61]; + @Pc(70) int local70 = inboundBuffer.gBits(1); + if (local70 == 0) { + Static33.anIntArray79[Static272.anInt5214++] = local61; + local65.lastSeenLoop = client.loop; + } else { + @Pc(92) int local92 = inboundBuffer.gBits(2); + if (local92 == 0) { + Static33.anIntArray79[Static272.anInt5214++] = local61; + local65.lastSeenLoop = client.loop; + extendedIds[extendedCount++] = local61; + } else { + @Pc(139) int local139; + @Pc(149) int local149; + if (local92 == 1) { + Static33.anIntArray79[Static272.anInt5214++] = local61; + local65.lastSeenLoop = client.loop; + local139 = inboundBuffer.gBits(3); + local65.move(1, local139); + local149 = inboundBuffer.gBits(1); + if (local149 == 1) { + extendedIds[extendedCount++] = local61; + } + } else if (local92 == 2) { + Static33.anIntArray79[Static272.anInt5214++] = local61; + local65.lastSeenLoop = client.loop; + if (inboundBuffer.gBits(1) == 1) { + local139 = inboundBuffer.gBits(3); + local65.move(2, local139); + local149 = inboundBuffer.gBits(3); + local65.move(2, local149); + } else { + local139 = inboundBuffer.gBits(3); + local65.move(0, local139); + } + local139 = inboundBuffer.gBits(1); + if (local139 == 1) { + extendedIds[extendedCount++] = local61; + } + } else if (local92 == 3) { + removedIds[removedCount++] = local61; + } + } + } + } + } + + @OriginalMember(owner = "client!wj", name = "a", descriptor = "(I)V") + public static void method4645() { + while (true) { + if (inboundBuffer.method2241(length) >= 27) { + @Pc(14) int local14 = inboundBuffer.gBits(15); + if (local14 != 32767) { + @Pc(19) boolean local19 = false; + if (NpcList.npcs[local14] == null) { + local19 = true; + NpcList.npcs[local14] = new Npc(); + } + @Pc(37) Npc local37 = NpcList.npcs[local14]; + Static33.anIntArray79[Static272.anInt5214++] = local14; + local37.lastSeenLoop = client.loop; + if (local37.type != null && local37.type.hasAreaSound()) { + AreaSoundManager.remove(local37); + } + @Pc(66) int local66 = inboundBuffer.gBits(1); + @Pc(73) int local73 = PathingEntity.ANGLES[inboundBuffer.gBits(3)]; + if (local19) { + local37.anInt3400 = local37.anInt3381 = local73; + } + @Pc(86) int local86 = inboundBuffer.gBits(1); + if (local86 == 1) { + extendedIds[extendedCount++] = local14; + } + @Pc(105) int local105 = inboundBuffer.gBits(5); + local37.method2698(NpcTypeList.get(inboundBuffer.gBits(14))); + if (local105 > 15) { + local105 -= 32; + } + @Pc(124) int local124 = inboundBuffer.gBits(5); + if (local124 > 15) { + local124 -= 32; + } + local37.method2692(local37.type.soze); + local37.anInt3365 = local37.type.basId; + local37.anInt3376 = local37.type.anInt3733; + if (local37.anInt3376 == 0) { + local37.anInt3381 = 0; + } + local37.method2683(local37.getSize(), PlayerList.self.movementQueueX[0] + local124, local105 + PlayerList.self.movementQueueZ[0], local66 == 1); + if (local37.type.hasAreaSound()) { + AreaSoundManager.add(local37.movementQueueZ[0], null, 0, local37, local37.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; + Static34.verifyIdChanged = true; + return true; + } } diff --git a/client/src/main/java/QuickChatCatType.java b/client/src/main/java/QuickChatCatType.java index 3ccd372..a55ef3d 100644 --- a/client/src/main/java/QuickChatCatType.java +++ b/client/src/main/java/QuickChatCatType.java @@ -7,43 +7,43 @@ import org.openrs2.deob.annotation.Pc; public final class QuickChatCatType extends SecondaryNode { @OriginalMember(owner = "client!bc", name = "O", descriptor = "[I") - public int[] anIntArray29; + public int[] phraseShortcuts; @OriginalMember(owner = "client!bc", name = "P", descriptor = "[I") - public int[] anIntArray30; + public int[] subcategories; @OriginalMember(owner = "client!bc", name = "T", descriptor = "[I") - public int[] anIntArray31; + public int[] subcategoryShortcuts; @OriginalMember(owner = "client!bc", name = "Y", descriptor = "Lclient!na;") - public JagString aClass100_79; + public JagString description; @OriginalMember(owner = "client!bc", name = "ab", descriptor = "[I") - public int[] anIntArray32; + public int[] phrases; @OriginalMember(owner = "client!bc", name = "d", descriptor = "(I)V") public final void method465() { @Pc(8) int local8; - if (this.anIntArray32 != null) { - for (local8 = 0; local8 < this.anIntArray32.length; local8++) { - this.anIntArray32[local8] |= 0x8000; + if (this.phrases != null) { + for (local8 = 0; local8 < this.phrases.length; local8++) { + this.phrases[local8] |= 0x8000; } } - if (this.anIntArray30 != null) { - for (local8 = 0; local8 < this.anIntArray30.length; local8++) { - this.anIntArray30[local8] |= 0x8000; + if (this.subcategories != null) { + for (local8 = 0; local8 < this.subcategories.length; local8++) { + this.subcategories[local8] |= 0x8000; } } } @OriginalMember(owner = "client!bc", name = "c", descriptor = "(II)I") - public final int method466(@OriginalArg(0) int arg0) { - if (this.anIntArray32 == null) { + public final int getPhraseByShortcut(@OriginalArg(0) int arg0) { + if (this.phrases == null) { return -1; } - for (@Pc(13) int local13 = 0; local13 < this.anIntArray32.length; local13++) { - if (arg0 == this.anIntArray29[local13]) { - return this.anIntArray32[local13]; + for (@Pc(13) int local13 = 0; local13 < this.phrases.length; local13++) { + if (arg0 == this.phraseShortcuts[local13]) { + return this.phrases[local13]; } } return -1; @@ -52,39 +52,39 @@ public final class QuickChatCatType extends SecondaryNode { @OriginalMember(owner = "client!bc", name = "a", descriptor = "(Lclient!wa;II)V") private void method467(@OriginalArg(0) Buffer arg0, @OriginalArg(2) int arg1) { if (arg1 == 1) { - this.aClass100_79 = arg0.gjstr(); + this.description = arg0.gjstr(); return; } @Pc(28) int local28; @Pc(38) int local38; if (arg1 == 2) { local28 = arg0.g1(); - this.anIntArray30 = new int[local28]; - this.anIntArray31 = new int[local28]; + this.subcategories = new int[local28]; + this.subcategoryShortcuts = new int[local28]; for (local38 = 0; local38 < local28; local38++) { - this.anIntArray30[local38] = arg0.g2(); - this.anIntArray31[local38] = Static229.method3933(arg0.g1s()); + this.subcategories[local38] = arg0.g2(); + this.subcategoryShortcuts[local38] = Static229.method3933(arg0.g1s()); } } else if (arg1 == 3) { local28 = arg0.g1(); - this.anIntArray32 = new int[local28]; - this.anIntArray29 = new int[local28]; + this.phrases = new int[local28]; + this.phraseShortcuts = new int[local28]; for (local38 = 0; local38 < local28; local38++) { - this.anIntArray32[local38] = arg0.g2(); - this.anIntArray29[local38] = Static229.method3933(arg0.g1s()); + this.phrases[local38] = arg0.g2(); + this.phraseShortcuts[local38] = Static229.method3933(arg0.g1s()); } } else if (arg1 == 4) { } } @OriginalMember(owner = "client!bc", name = "a", descriptor = "(BI)I") - public final int method469(@OriginalArg(1) int arg0) { - if (this.anIntArray30 == null) { + public final int getSubcategoryByShortcut(@OriginalArg(1) int arg0) { + if (this.subcategories == null) { return -1; } - for (@Pc(21) int local21 = 0; local21 < this.anIntArray30.length; local21++) { - if (this.anIntArray31[local21] == arg0) { - return this.anIntArray30[local21]; + for (@Pc(21) int local21 = 0; local21 < this.subcategories.length; local21++) { + if (this.subcategoryShortcuts[local21] == arg0) { + return this.subcategories[local21]; } } return -1; diff --git a/client/src/main/java/QuickChatCatTypeList.java b/client/src/main/java/QuickChatCatTypeList.java index 7a31736..fed1314 100644 --- a/client/src/main/java/QuickChatCatTypeList.java +++ b/client/src/main/java/QuickChatCatTypeList.java @@ -17,7 +17,7 @@ public class QuickChatCatTypeList { } @OriginalMember(owner = "client!tb", name = "b", descriptor = "(IB)Lclient!bc;") - public static QuickChatCatType method4045(@OriginalArg(0) int arg0) { + public static QuickChatCatType get(@OriginalArg(0) int arg0) { @Pc(10) QuickChatCatType local10 = (QuickChatCatType) types.get((long) arg0); if (local10 != null) { return local10; diff --git a/client/src/main/java/QuickChatPhrase.java b/client/src/main/java/QuickChatPhrase.java index a51d12c..0ada648 100644 --- a/client/src/main/java/QuickChatPhrase.java +++ b/client/src/main/java/QuickChatPhrase.java @@ -11,5 +11,5 @@ public final class QuickChatPhrase { public QuickChatPhraseType type; @OriginalMember(owner = "client!bd", name = "h", descriptor = "[I") - public int[] anIntArray33; + public int[] values; } diff --git a/client/src/main/java/QuickChatPhraseType.java b/client/src/main/java/QuickChatPhraseType.java index f9d2241..d1cc62c 100644 --- a/client/src/main/java/QuickChatPhraseType.java +++ b/client/src/main/java/QuickChatPhraseType.java @@ -6,11 +6,13 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!cb") public final class QuickChatPhraseType extends SecondaryNode { - @OriginalMember(owner = "client!cb", name = "L", descriptor = "[I") + @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!cb", name = "L", descriptor = "[I") private int[] anIntArray71; @OriginalMember(owner = "client!cb", name = "M", descriptor = "[I") - public int[] anIntArray72; + public int[] automaticResponses; @OriginalMember(owner = "client!cb", name = "U", descriptor = "[[I") private int[][] anIntArrayArray5; @@ -22,12 +24,12 @@ public final class QuickChatPhraseType extends SecondaryNode { public boolean aBoolean60 = true; @OriginalMember(owner = "client!cb", name = "a", descriptor = "(Lclient!wa;[IZ)V") - public final void method760(@OriginalArg(0) Buffer arg0, @OriginalArg(1) int[] arg1) { + public final void encodeMessage(@OriginalArg(0) Buffer arg0, @OriginalArg(1) int[] arg1) { if (this.anIntArray71 == null) { return; } for (@Pc(14) int local14 = 0; this.anIntArray71.length > local14 && local14 < arg1.length; local14++) { - @Pc(38) int local38 = Static143.anIntArray329[this.method765(local14)]; + @Pc(38) int local38 = DYNAMIC_COMMAND_ENCODE_BYTES[this.getDynamicCommand(local14)]; if (local38 > 0) { arg0.pVarLong(local38, (long) arg1[local14]); } @@ -47,15 +49,15 @@ public final class QuickChatPhraseType extends SecondaryNode { @OriginalMember(owner = "client!cb", name = "e", descriptor = "(I)V") public final void method763() { - if (this.anIntArray72 != null) { - for (@Pc(7) int local7 = 0; local7 < this.anIntArray72.length; local7++) { - this.anIntArray72[local7] |= 0x8000; + if (this.automaticResponses != null) { + for (@Pc(7) int local7 = 0; local7 < this.automaticResponses.length; local7++) { + this.automaticResponses[local7] |= 0x8000; } } } @OriginalMember(owner = "client!cb", name = "a", descriptor = "(III)I") - public final int method764(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { + public final int getDynamicCommandParam(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { if (this.anIntArray71 == null || arg1 < 0 || arg1 > this.anIntArray71.length) { return -1; } else if (this.anIntArrayArray5[arg1] == null || arg0 < 0 || arg0 > this.anIntArrayArray5[arg1].length) { @@ -66,12 +68,12 @@ public final class QuickChatPhraseType extends SecondaryNode { } @OriginalMember(owner = "client!cb", name = "c", descriptor = "(II)I") - public final int method765(@OriginalArg(1) int arg0) { + public final int getDynamicCommand(@OriginalArg(1) int arg0) { return this.anIntArray71 == null || arg0 < 0 || arg0 > this.anIntArray71.length ? -1 : this.anIntArray71[arg0]; } @OriginalMember(owner = "client!cb", name = "a", descriptor = "(Z)I") - public final int method767() { + public final int getDynamicCommandCount() { return this.anIntArray71 == null ? 0 : this.anIntArray71.length; } @@ -85,9 +87,9 @@ public final class QuickChatPhraseType extends SecondaryNode { @Pc(42) int local42; if (arg1 == 2) { local32 = arg0.g1(); - this.anIntArray72 = new int[local32]; + this.automaticResponses = new int[local32]; for (local42 = 0; local42 < local32; local42++) { - this.anIntArray72[local42] = arg0.g2(); + this.automaticResponses[local42] = arg0.g2(); } } else if (arg1 == 3) { local32 = arg0.g1(); @@ -107,7 +109,7 @@ public final class QuickChatPhraseType extends SecondaryNode { } @OriginalMember(owner = "client!cb", name = "f", descriptor = "(I)Lclient!na;") - public final JagString method769() { + public final JagString getText() { @Pc(15) JagString local15 = Static87.allocate(80); if (this.aClass100Array35 == null) { return Static202.aClass100_891; diff --git a/client/src/main/java/ReflectionCheck.java b/client/src/main/java/ReflectionCheck.java index 6ad659a..5d28f89 100644 --- a/client/src/main/java/ReflectionCheck.java +++ b/client/src/main/java/ReflectionCheck.java @@ -1,5 +1,12 @@ +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.*; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; @OriginalClass("client!ed") public final class ReflectionCheck extends Node { @@ -27,4 +34,121 @@ 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) Static204.aClass69_113.method2289(); + 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.pCrc32(local25); + arg0.p1len(arg0.offset - local25); + local18.unlink(); + } + } } diff --git a/client/src/main/java/SceneGraph.java b/client/src/main/java/SceneGraph.java index 81f6bed..0543acc 100644 --- a/client/src/main/java/SceneGraph.java +++ b/client/src/main/java/SceneGraph.java @@ -3,6 +3,9 @@ import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public class SceneGraph { + @OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;") + public static Tile[][][] tiles; + @OriginalMember(owner = "client!km", name = "f", descriptor = "(I)Z") public static boolean allLevelsAreVisible() { return GlRenderer.enabled || Preferences.allLevelsVisible; @@ -28,4 +31,60 @@ public class SceneGraph { @Pc(118) int local118 = local36 * Static83.activeTileHeightMap[local42][local12 + 1][local16] + (128 - local36) * Static83.activeTileHeightMap[local42][local12][local16] >> 7; return local40 * local91 + (128 - local40) * local118 >> 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.aClass77_1; + local7.aClass77_1 = 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 (Static197.surfaceGroundTiles != null) { + for (local3 = 0; local3 < Static197.surfaceGroundTiles.length; local3++) { + for (local9 = 0; local9 < Static152.mapSizeX; local9++) { + for (local14 = 0; local14 < Static99.mapSizeZ; local14++) { + Static197.surfaceGroundTiles[local3][local9][local14] = null; + } + } + } + } + Static36.surfaceHdTiles = null; + if (Static276.underWaterGroundTiles != null) { + for (local3 = 0; local3 < Static276.underWaterGroundTiles.length; local3++) { + for (local9 = 0; local9 < Static152.mapSizeX; local9++) { + for (local14 = 0; local14 < Static99.mapSizeZ; local14++) { + Static276.underWaterGroundTiles[local3][local9][local14] = null; + } + } + } + } + Static195.underWaterHdTiles = null; + Static28.anInt917 = 0; + if (Static91.aClass120Array1 != null) { + for (local3 = 0; local3 < Static28.anInt917; local3++) { + Static91.aClass120Array1[local3] = null; + } + } + if (Static243.aClass31Array3 != null) { + for (local3 = 0; local3 < Static22.anInt726; local3++) { + Static243.aClass31Array3[local3] = null; + } + Static22.anInt726 = 0; + } + if (Static25.aClass31Array2 != null) { + for (local3 = 0; local3 < Static25.aClass31Array2.length; local3++) { + Static25.aClass31Array2[local3] = null; + } + } + } } diff --git a/client/src/main/java/Static88.java b/client/src/main/java/ScriptRunner.java similarity index 55% rename from client/src/main/java/Static88.java rename to client/src/main/java/ScriptRunner.java index 668f3ab..3ff4142 100644 --- a/client/src/main/java/Static88.java +++ b/client/src/main/java/ScriptRunner.java @@ -4,13 +4,22 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; -public final class Static88 { +public final class ScriptRunner { + + @OriginalMember(owner = "client!ab", name = "j", descriptor = "[Lclient!na;") + public static final JagString[] stringStack = new JagString[1000]; + @OriginalMember(owner = "client!uj", name = "t", descriptor = "[I") + public static final int[] intStack = new int[1000]; + @OriginalMember(owner = "client!fl", name = "Q", descriptor = "Lclient!na;") + public static final JagString EMPTY_STRING = JagString.parse(""); + @OriginalMember(owner = "client!jh", name = "n", descriptor = "Lclient!bd;") + public static QuickChatPhrase activePhrase; @OriginalMember(owner = "client!h", name = "a", descriptor = "(BILclient!jl;)V") - public static void method1818(@OriginalArg(1) int maxCycles, @OriginalArg(2) HookRequest request) { + public static void run(@OriginalArg(1) int maxCycles, @OriginalArg(2) HookRequest request) { @Pc(4) Object[] local4 = request.arguments; @Pc(10) int sid = (Integer) local4[0]; - @Pc(14) ClientScript script = Static91.getCs2ById(sid); + @Pc(14) ClientScript script = ClientScriptList.get(sid); if (script == null) { return; } @@ -76,28 +85,28 @@ public final class Static88 { } pc++; @Pc(226) int opcode = opcodes[pc]; - @Pc(803) int local803; + @Pc(803) int int3; @Pc(652) int local652; - @Pc(809) int type; + @Pc(809) int int1; @Pc(609) JagString string; if (opcode < 100) { if (opcode == 0) { - Static254.intStack[isp++] = intOperands[pc]; + intStack[isp++] = intOperands[pc]; continue; } if (opcode == 1) { id = intOperands[pc]; - Static254.intStack[isp++] = Static7.varps[id]; + intStack[isp++] = Static7.varps[id]; continue; } if (opcode == 2) { id = intOperands[pc]; isp--; - Static148.method2766(id, Static254.intStack[isp]); + Static148.method2766(id, intStack[isp]); continue; } if (opcode == 3) { - Static3.stringStack[ssp++] = script.stringOperands[pc]; + stringStack[ssp++] = script.stringOperands[pc]; continue; } if (opcode == 6) { @@ -106,28 +115,28 @@ public final class Static88 { } if (opcode == 7) { isp -= 2; - if (Static254.intStack[isp] != Static254.intStack[isp + 1]) { + if (intStack[isp] != intStack[isp + 1]) { pc += intOperands[pc]; } continue; } if (opcode == 8) { isp -= 2; - if (Static254.intStack[isp + 1] == Static254.intStack[isp]) { + if (intStack[isp + 1] == intStack[isp]) { pc += intOperands[pc]; } continue; } if (opcode == 9) { isp -= 2; - if (Static254.intStack[isp] < Static254.intStack[isp + 1]) { + if (intStack[isp] < intStack[isp + 1]) { pc += intOperands[pc]; } continue; } if (opcode == 10) { isp -= 2; - if (Static254.intStack[isp + 1] < Static254.intStack[isp]) { + if (intStack[isp + 1] < intStack[isp]) { pc += intOperands[pc]; } continue; @@ -147,55 +156,55 @@ public final class Static88 { } if (opcode == 25) { id = intOperands[pc]; - Static254.intStack[isp++] = Static155.getVarbit(id); + intStack[isp++] = Static155.getVarbit(id); continue; } if (opcode == 27) { id = intOperands[pc]; isp--; - Static202.setVarbitClient(id, Static254.intStack[isp]); + Static202.setVarbitClient(id, intStack[isp]); continue; } if (opcode == 31) { isp -= 2; - if (Static254.intStack[isp + 1] >= Static254.intStack[isp]) { + if (intStack[isp + 1] >= intStack[isp]) { pc += intOperands[pc]; } continue; } if (opcode == 32) { isp -= 2; - if (Static254.intStack[isp] >= Static254.intStack[isp + 1]) { + if (intStack[isp] >= intStack[isp + 1]) { pc += intOperands[pc]; } continue; } if (opcode == 33) { - Static254.intStack[isp++] = Static215.intLocals[intOperands[pc]]; + intStack[isp++] = Static215.intLocals[intOperands[pc]]; continue; } @Pc(555) int local; if (opcode == 34) { local = intOperands[pc]; isp--; - Static215.intLocals[local] = Static254.intStack[isp]; + Static215.intLocals[local] = intStack[isp]; continue; } if (opcode == 35) { - Static3.stringStack[ssp++] = Static180.stringLocals[intOperands[pc]]; + stringStack[ssp++] = Static180.stringLocals[intOperands[pc]]; continue; } if (opcode == 36) { local = intOperands[pc]; ssp--; - Static180.stringLocals[local] = Static3.stringStack[ssp]; + Static180.stringLocals[local] = stringStack[ssp]; continue; } if (opcode == 37) { id = intOperands[pc]; ssp -= id; - string = JagString.method2355(ssp, id, Static3.stringStack); - Static3.stringStack[ssp++] = string; + string = JagString.method2355(ssp, id, stringStack); + stringStack[ssp++] = string; continue; } if (opcode == 38) { @@ -208,14 +217,14 @@ public final class Static88 { } if (opcode == 40) { id = intOperands[pc]; - @Pc(642) ClientScript local642 = Static91.getCs2ById(id); + @Pc(642) ClientScript local642 = ClientScriptList.get(id); @Pc(646) int[] local646 = new int[local642.anInt4667]; @Pc(650) JagString[] local650 = new JagString[local642.anInt4671]; for (local652 = 0; local652 < local642.anInt4665; local652++) { - local646[local652] = Static254.intStack[local652 + isp - local642.anInt4665]; + local646[local652] = intStack[local652 + isp - local642.anInt4665]; } for (local652 = 0; local652 < local642.anInt4669; local652++) { - local650[local652] = Static3.stringStack[local652 + ssp - local642.anInt4669]; + local650[local652] = stringStack[local652 + ssp - local642.anInt4669]; } isp -= local642.anInt4665; ssp -= local642.anInt4669; @@ -237,30 +246,30 @@ public final class Static88 { continue; } if (opcode == 42) { - Static254.intStack[isp++] = Static155.varcs[intOperands[pc]]; + intStack[isp++] = VarcDomain.varcs[intOperands[pc]]; continue; } if (opcode == 43) { id = intOperands[pc]; isp--; - Static155.varcs[id] = Static254.intStack[isp]; + VarcDomain.varcs[id] = intStack[isp]; Static4.method24(id); continue; } if (opcode == 44) { id = intOperands[pc] >> 16; isp--; - local803 = Static254.intStack[isp]; - type = intOperands[pc] & 0xFFFF; - if (local803 >= 0 && local803 <= 5000) { - Static55.anIntArray140[id] = local803; + int3 = intStack[isp]; + int1 = intOperands[pc] & 0xFFFF; + if (int3 >= 0 && int3 <= 5000) { + Static55.anIntArray140[id] = int3; @Pc(828) byte local828 = -1; - if (type == 105) { + if (int1 == 105) { local828 = 0; } local652 = 0; while (true) { - if (local803 <= local652) { + if (int3 <= local652) { continue nextOp; } Static179.anIntArrayArray33[id][local652] = local828; @@ -272,9 +281,9 @@ public final class Static88 { if (opcode == 45) { id = intOperands[pc]; isp--; - type = Static254.intStack[isp]; - if (type >= 0 && type < Static55.anIntArray140[id]) { - Static254.intStack[isp++] = Static179.anIntArrayArray33[id][type]; + int1 = intStack[isp]; + if (int1 >= 0 && int1 < Static55.anIntArray140[id]) { + intStack[isp++] = Static179.anIntArrayArray33[id][int1]; continue; } throw new RuntimeException(); @@ -282,32 +291,32 @@ public final class Static88 { if (opcode == 46) { id = intOperands[pc]; isp -= 2; - type = Static254.intStack[isp]; - if (type >= 0 && type < Static55.anIntArray140[id]) { - Static179.anIntArrayArray33[id][type] = Static254.intStack[isp + 1]; + int1 = intStack[isp]; + if (int1 >= 0 && int1 < Static55.anIntArray140[id]) { + Static179.anIntArrayArray33[id][int1] = intStack[isp + 1]; continue; } throw new RuntimeException(); } if (opcode == 47) { - value = Static226.varcstrs[intOperands[pc]]; + value = VarcDomain.varcstrs[intOperands[pc]]; if (value == null) { value = Static254.aClass100_1061; } - Static3.stringStack[ssp++] = value; + stringStack[ssp++] = value; continue; } if (opcode == 48) { id = intOperands[pc]; ssp--; - Static226.varcstrs[id] = Static3.stringStack[ssp]; + VarcDomain.varcstrs[id] = stringStack[ssp]; Static89.method1840(id); continue; } if (opcode == 51) { @Pc(992) HashTable local992 = script.aClass133Array1[intOperands[pc]]; isp--; - @Pc(1002) IntNode local1002 = (IntNode) local992.get((long) Static254.intStack[isp]); + @Pc(1002) IntNode local1002 = (IntNode) local992.get((long) intStack[isp]); if (local1002 != null) { pc += local1002.value; } @@ -321,37 +330,37 @@ public final class Static88 { local1020 = false; } @Pc(1182) Component component; - @Pc(1052) int local1052; + @Pc(1052) int int2; @Pc(1063) Component local1063; @Pc(1087) int local1087; @Pc(1256) Component local1256; if (opcode < 300) { if (opcode == 100) { isp -= 3; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local1052 = Static254.intStack[isp + 2]; - if (local803 != 0) { - local1063 = InterfaceList.getComponent(type); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + int2 = intStack[isp + 2]; + if (int3 != 0) { + local1063 = InterfaceList.getComponent(int1); if (local1063.createdComponents == null) { - local1063.createdComponents = new Component[local1052 + 1]; + local1063.createdComponents = new Component[int2 + 1]; } - if (local1052 >= local1063.createdComponents.length) { - @Pc(1085) Component[] local1085 = new Component[local1052 + 1]; + if (int2 >= local1063.createdComponents.length) { + @Pc(1085) Component[] local1085 = new Component[int2 + 1]; for (local1087 = 0; local1087 < local1063.createdComponents.length; local1087++) { local1085[local1087] = local1063.createdComponents[local1087]; } local1063.createdComponents = local1085; } - if (local1052 > 0 && local1063.createdComponents[local1052 - 1] == null) { - throw new RuntimeException("Gap at:" + (local1052 - 1)); + if (int2 > 0 && local1063.createdComponents[int2 - 1] == null) { + throw new RuntimeException("Gap at:" + (int2 - 1)); } @Pc(1137) Component local1137 = new Component(); local1137.aBoolean32 = true; - local1137.createdComponentId = local1052; + local1137.createdComponentId = int2; local1137.layer = local1137.id = local1063.id; - local1137.type = local803; - local1063.createdComponents[local1052] = local1137; + local1137.type = int3; + local1063.createdComponents[int2] = local1137; if (local1020) { Static274.staticActiveComponent1 = local1137; } else { @@ -378,18 +387,18 @@ public final class Static88 { } if (opcode == 102) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); component.createdComponents = null; Static43.redraw(component); continue; } if (opcode == 200) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local1256 = Static201.method1418(type, local803); - if (local1256 != null && local803 != -1) { - Static254.intStack[isp++] = 1; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local1256 = Static201.method1418(int1, int3); + if (local1256 != null && int3 != -1) { + intStack[isp++] = 1; if (local1020) { Static274.staticActiveComponent1 = local1256; } else { @@ -397,17 +406,17 @@ public final class Static88 { } continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 201) { isp--; - type = Static254.intStack[isp]; - local1204 = InterfaceList.getComponent(type); + int1 = intStack[isp]; + local1204 = InterfaceList.getComponent(int1); if (local1204 == null) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; if (local1020) { Static274.staticActiveComponent1 = local1204; } else { @@ -421,36 +430,36 @@ public final class Static88 { if (opcode < 500) { if (opcode == 403) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - for (local1052 = 0; local1052 < Static204.anIntArray425.length; local1052++) { - if (type == Static204.anIntArray425[local1052]) { - PlayerList.self.appearance.method1953(local1052, local803); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + for (int2 = 0; int2 < PlayerAppearance.MALE_FEATURES.length; int2++) { + if (int1 == PlayerAppearance.MALE_FEATURES[int2]) { + PlayerList.self.appearance.method1953(int2, int3); continue nextOp; } } - local1052 = 0; + int2 = 0; while (true) { - if (local1052 >= Static153.anIntArray351.length) { + if (int2 >= Static153.anIntArray351.length) { continue nextOp; } - if (type == Static153.anIntArray351[local1052]) { - PlayerList.self.appearance.method1953(local1052, local803); + if (int1 == Static153.anIntArray351[int2]) { + PlayerList.self.appearance.method1953(int2, int3); continue nextOp; } - local1052++; + int2++; } } if (opcode == 404) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - PlayerList.self.appearance.method1951(type, local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + PlayerList.self.appearance.method1951(int1, int3); continue; } if (opcode == 410) { isp--; - local12388 = Static254.intStack[isp] != 0; + local12388 = intStack[isp] != 0; PlayerList.self.appearance.method1948(local12388); continue; } @@ -464,18 +473,18 @@ public final class Static88 { } else { opcode -= 1000; isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); } if (opcode == 1100) { isp -= 2; - component.anInt489 = Static254.intStack[isp]; + component.anInt489 = intStack[isp]; if (component.anInt489 > component.anInt486 - component.anInt445) { component.anInt489 = component.anInt486 - component.anInt445; } if (component.anInt489 < 0) { component.anInt489 = 0; } - component.scrollY = Static254.intStack[isp + 1]; + component.scrollY = intStack[isp + 1]; if (component.scrollY > component.anInt491 - component.anInt459) { component.scrollY = component.anInt491 - component.anInt459; } @@ -490,7 +499,7 @@ public final class Static88 { } if (opcode == 1101) { isp--; - component.anInt474 = Static254.intStack[isp]; + component.color = intStack[isp]; Static43.redraw(component); if (component.createdComponentId == -1) { Static245.method4224(component.id); @@ -499,44 +508,44 @@ public final class Static88 { } if (opcode == 1102) { isp--; - component.aBoolean30 = Static254.intStack[isp] == 1; + component.aBoolean30 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1103) { isp--; - component.anInt476 = Static254.intStack[isp]; + component.anInt476 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1104) { isp--; - component.anInt490 = Static254.intStack[isp]; + component.anInt490 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1105) { isp--; - component.anInt477 = Static254.intStack[isp]; + component.anInt477 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1106) { isp--; - component.anInt521 = Static254.intStack[isp]; + component.anInt521 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1107) { isp--; - component.aBoolean23 = Static254.intStack[isp] == 1; + component.aBoolean23 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1108) { component.modelType = 1; isp--; - component.modelId = Static254.intStack[isp]; + component.modelId = intStack[isp]; Static43.redraw(component); if (component.createdComponentId == -1) { Static271.method4600(component.id); @@ -545,12 +554,12 @@ public final class Static88 { } if (opcode == 1109) { isp -= 6; - component.modelXOffset = Static254.intStack[isp]; - component.modelZOffset = Static254.intStack[isp + 1]; - component.modelXAngle = Static254.intStack[isp + 2]; - component.modelYAngle = Static254.intStack[isp + 3]; - component.modelYOffset = Static254.intStack[isp + 4]; - component.modelZoom = Static254.intStack[isp + 5]; + component.modelXOffset = intStack[isp]; + component.modelZOffset = intStack[isp + 1]; + component.modelXAngle = intStack[isp + 2]; + component.modelYAngle = intStack[isp + 3]; + component.modelYOffset = intStack[isp + 4]; + component.modelZoom = intStack[isp + 5]; Static43.redraw(component); if (component.createdComponentId == -1) { Static153.method2910(component.id); @@ -560,9 +569,9 @@ public final class Static88 { } if (opcode == 1110) { isp--; - local803 = Static254.intStack[isp]; - if (component.anInt522 != local803) { - component.anInt522 = local803; + int3 = intStack[isp]; + if (component.modelSeqId != int3) { + component.modelSeqId = int3; component.anInt510 = 0; component.anInt500 = 0; component.anInt496 = 1; @@ -575,15 +584,15 @@ public final class Static88 { } if (opcode == 1111) { isp--; - component.aBoolean22 = Static254.intStack[isp] == 1; + component.aBoolean22 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1112) { ssp--; - local2522 = Static3.stringStack[ssp]; - if (!local2522.strEquals(component.aClass100_84)) { - component.aClass100_84 = local2522; + local2522 = stringStack[ssp]; + if (!local2522.strEquals(component.text)) { + component.text = local2522; Static43.redraw(component); } if (component.createdComponentId == -1) { @@ -593,52 +602,52 @@ public final class Static88 { } if (opcode == 1113) { isp--; - component.anInt502 = Static254.intStack[isp]; + component.anInt502 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1114) { isp -= 3; - component.anInt460 = Static254.intStack[isp]; - component.anInt478 = Static254.intStack[isp + 1]; - component.anInt467 = Static254.intStack[isp + 2]; + component.anInt460 = intStack[isp]; + component.anInt478 = intStack[isp + 1]; + component.anInt467 = intStack[isp + 2]; Static43.redraw(component); continue; } if (opcode == 1115) { isp--; - component.aBoolean28 = Static254.intStack[isp] == 1; + component.aBoolean28 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1116) { isp--; - component.anInt514 = Static254.intStack[isp]; + component.anInt514 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1117) { isp--; - component.anInt513 = Static254.intStack[isp]; + component.anInt513 = intStack[isp]; Static43.redraw(component); continue; } if (opcode == 1118) { isp--; - component.aBoolean21 = Static254.intStack[isp] == 1; + component.aBoolean21 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1119) { isp--; - component.aBoolean26 = Static254.intStack[isp] == 1; + component.aBoolean26 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1120) { isp -= 2; - component.anInt486 = Static254.intStack[isp]; - component.anInt491 = Static254.intStack[isp + 1]; + component.anInt486 = intStack[isp]; + component.anInt491 = intStack[isp + 1]; Static43.redraw(component); if (component.type == 0) { Static17.method531(component, false); @@ -647,20 +656,20 @@ public final class Static88 { } if (opcode == 1121) { isp -= 2; - component.aShort11 = (short) Static254.intStack[isp]; - component.aShort10 = (short) Static254.intStack[isp + 1]; + component.aShort11 = (short) intStack[isp]; + component.aShort10 = (short) intStack[isp + 1]; Static43.redraw(component); continue; } if (opcode == 1122) { isp--; - component.aBoolean18 = Static254.intStack[isp] == 1; + component.aBoolean18 = intStack[isp] == 1; Static43.redraw(component); continue; } if (opcode == 1123) { isp--; - component.modelZoom = Static254.intStack[isp]; + component.modelZoom = intStack[isp]; Static43.redraw(component); if (component.createdComponentId == -1) { Static153.method2910(component.id); @@ -672,27 +681,27 @@ public final class Static88 { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; } else { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); opcode -= 1000; } Static43.redraw(component); if (opcode == 1200 || opcode == 1205) { isp -= 2; - local1052 = Static254.intStack[isp + 1]; - local803 = Static254.intStack[isp]; + int2 = intStack[isp + 1]; + int3 = intStack[isp]; if (component.createdComponentId == -1) { Static251.method4279(component.id); Static153.method2910(component.id); Static180.method3328(component.id); } - if (local803 == -1) { + if (int3 == -1) { component.modelId = -1; component.modelType = 1; component.objId = -1; } else { - component.objId = local803; - component.objCount = local1052; - @Pc(13416) ObjType local13416 = ObjTypeList.get(local803); + component.objId = int3; + component.objCount = int2; + @Pc(13416) ObjType local13416 = ObjTypeList.get(int3); component.modelYOffset = local13416.zAngle2d; component.modelXOffset = local13416.xOffset2d; component.modelXAngle = local13416.xAngle2d; @@ -715,7 +724,7 @@ public final class Static88 { if (opcode == 1201) { component.modelType = 2; isp--; - component.modelId = Static254.intStack[isp]; + component.modelId = intStack[isp]; if (component.createdComponentId == -1) { Static271.method4600(component.id); } @@ -732,7 +741,7 @@ public final class Static88 { if (opcode == 1203) { component.modelType = 6; isp--; - component.modelId = Static254.intStack[isp]; + component.modelId = intStack[isp]; if (component.createdComponentId == -1) { Static271.method4600(component.id); } @@ -741,7 +750,7 @@ public final class Static88 { if (opcode == 1204) { component.modelType = 5; isp--; - component.modelId = Static254.intStack[isp]; + component.modelId = intStack[isp]; if (component.createdComponentId == -1) { Static271.method4600(component.id); } @@ -750,17 +759,17 @@ public final class Static88 { } else if (opcode >= 1300 && opcode < 1400 || opcode >= 2300 && opcode < 2400) { if (opcode >= 2000) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); opcode -= 1000; } else { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; } if (opcode == 1300) { isp--; - local803 = Static254.intStack[isp] - 1; - if (local803 >= 0 && local803 <= 9) { + int3 = intStack[isp] - 1; + if (int3 >= 0 && int3 <= 9) { ssp--; - component.method480(Static3.stringStack[ssp], local803); + component.method480(stringStack[ssp], int3); continue; } ssp--; @@ -768,54 +777,54 @@ public final class Static88 { } if (opcode == 1301) { isp -= 2; - local1052 = Static254.intStack[isp + 1]; - local803 = Static254.intStack[isp]; - component.aClass13_5 = Static201.method1418(local803, local1052); + int2 = intStack[isp + 1]; + int3 = intStack[isp]; + component.aClass13_5 = Static201.method1418(int3, int2); continue; } if (opcode == 1302) { isp--; - component.aBoolean27 = Static254.intStack[isp] == 1; + component.aBoolean27 = intStack[isp] == 1; continue; } if (opcode == 1303) { isp--; - component.anInt472 = Static254.intStack[isp]; + component.anInt472 = intStack[isp]; continue; } if (opcode == 1304) { isp--; - component.anInt447 = Static254.intStack[isp]; + component.anInt447 = intStack[isp]; continue; } if (opcode == 1305) { ssp--; - component.aClass100_88 = Static3.stringStack[ssp]; + component.opBase = stringStack[ssp]; continue; } if (opcode == 1306) { ssp--; - component.aClass100_86 = Static3.stringStack[ssp]; + component.aClass100_86 = stringStack[ssp]; continue; } if (opcode == 1307) { - component.aClass100Array18 = null; + component.ops = null; continue; } if (opcode == 1308) { isp--; - component.anInt484 = Static254.intStack[isp]; + component.anInt484 = intStack[isp]; isp--; - component.anInt499 = Static254.intStack[isp]; + component.anInt499 = intStack[isp]; continue; } if (opcode == 1309) { isp--; - local803 = Static254.intStack[isp]; + int3 = intStack[isp]; isp--; - local1052 = Static254.intStack[isp]; - if (local1052 >= 1 && local1052 <= 10) { - component.method477(local1052 - 1, local803); + int2 = intStack[isp]; + if (int2 >= 1 && int2 <= 10) { + component.method477(int2 - 1, int3); } continue; } @@ -827,19 +836,19 @@ public final class Static88 { } else { opcode -= 1000; isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); } @Pc(12937) int[] local12937 = null; ssp--; - local2522 = Static3.stringStack[ssp]; + local2522 = stringStack[ssp]; if (local2522.length() > 0 && local2522.charAt(local2522.length() - 1) == 89) { isp--; - local652 = Static254.intStack[isp]; + local652 = intStack[isp]; if (local652 > 0) { local12937 = new int[local652]; while (local652-- > 0) { isp--; - local12937[local652] = Static254.intStack[isp]; + local12937[local652] = intStack[isp]; } } local2522 = local2522.substring(local2522.length() - 1, 0); @@ -848,14 +857,14 @@ public final class Static88 { for (c = local13000.length - 1; c >= 1; c--) { if (local2522.charAt(c - 1) == 115) { ssp--; - local13000[c] = Static3.stringStack[ssp]; + local13000[c] = stringStack[ssp]; } else { isp--; - local13000[c] = Integer.valueOf(Static254.intStack[isp]); + local13000[c] = Integer.valueOf(intStack[isp]); } } isp--; - c = Static254.intStack[isp]; + c = intStack[isp]; if (c == -1) { local13000 = null; } else { @@ -931,301 +940,301 @@ public final class Static88 { if (opcode < 1600) { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; if (opcode == 1500) { - Static254.intStack[isp++] = component.x; + intStack[isp++] = component.x; continue; } if (opcode == 1501) { - Static254.intStack[isp++] = component.y; + intStack[isp++] = component.y; continue; } if (opcode == 1502) { - Static254.intStack[isp++] = component.anInt445; + intStack[isp++] = component.anInt445; continue; } if (opcode == 1503) { - Static254.intStack[isp++] = component.anInt459; + intStack[isp++] = component.anInt459; continue; } if (opcode == 1504) { - Static254.intStack[isp++] = component.hidden ? 1 : 0; + intStack[isp++] = component.hidden ? 1 : 0; continue; } if (opcode == 1505) { - Static254.intStack[isp++] = component.layer; + intStack[isp++] = component.layer; continue; } } else if (opcode < 1700) { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; if (opcode == 1600) { - Static254.intStack[isp++] = component.anInt489; + intStack[isp++] = component.anInt489; continue; } if (opcode == 1601) { - Static254.intStack[isp++] = component.scrollY; + intStack[isp++] = component.scrollY; continue; } if (opcode == 1602) { - Static3.stringStack[ssp++] = component.aClass100_84; + stringStack[ssp++] = component.text; continue; } if (opcode == 1603) { - Static254.intStack[isp++] = component.anInt486; + intStack[isp++] = component.anInt486; continue; } if (opcode == 1604) { - Static254.intStack[isp++] = component.anInt491; + intStack[isp++] = component.anInt491; continue; } if (opcode == 1605) { - Static254.intStack[isp++] = component.modelZoom; + intStack[isp++] = component.modelZoom; continue; } if (opcode == 1606) { - Static254.intStack[isp++] = component.modelXAngle; + intStack[isp++] = component.modelXAngle; continue; } if (opcode == 1607) { - Static254.intStack[isp++] = component.modelYOffset; + intStack[isp++] = component.modelYOffset; continue; } if (opcode == 1608) { - Static254.intStack[isp++] = component.modelYAngle; + intStack[isp++] = component.modelYAngle; continue; } if (opcode == 1609) { - Static254.intStack[isp++] = component.anInt476; + intStack[isp++] = component.anInt476; continue; } if (opcode == 1610) { - Static254.intStack[isp++] = component.modelXOffset; + intStack[isp++] = component.modelXOffset; continue; } if (opcode == 1611) { - Static254.intStack[isp++] = component.modelZOffset; + intStack[isp++] = component.modelZOffset; continue; } if (opcode == 1612) { - Static254.intStack[isp++] = component.anInt477; + intStack[isp++] = component.anInt477; continue; } } else if (opcode < 1800) { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; if (opcode == 1700) { - Static254.intStack[isp++] = component.objId; + intStack[isp++] = component.objId; continue; } if (opcode == 1701) { if (component.objId == -1) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = component.objCount; + intStack[isp++] = component.objCount; } continue; } if (opcode == 1702) { - Static254.intStack[isp++] = component.createdComponentId; + intStack[isp++] = component.createdComponentId; continue; } } else if (opcode < 1900) { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; if (opcode == 1800) { - Static254.intStack[isp++] = Static36.method940(component).method512(); + intStack[isp++] = InterfaceList.getServerActiveProperties(component).getTargetMask(); continue; } if (opcode == 1801) { isp--; - local803 = Static254.intStack[isp]; - local803--; - if (component.aClass100Array18 != null && local803 < component.aClass100Array18.length && component.aClass100Array18[local803] != null) { - Static3.stringStack[ssp++] = component.aClass100Array18[local803]; + int3 = intStack[isp]; + int3--; + if (component.ops != null && int3 < component.ops.length && component.ops[int3] != null) { + stringStack[ssp++] = component.ops[int3]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 1802) { - if (component.aClass100_88 == null) { - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + if (component.opBase == null) { + stringStack[ssp++] = EMPTY_STRING; } else { - Static3.stringStack[ssp++] = component.aClass100_88; + stringStack[ssp++] = component.opBase; } continue; } } else if (opcode < 2600) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); if (opcode == 2500) { - Static254.intStack[isp++] = component.x; + intStack[isp++] = component.x; continue; } if (opcode == 2501) { - Static254.intStack[isp++] = component.y; + intStack[isp++] = component.y; continue; } if (opcode == 2502) { - Static254.intStack[isp++] = component.anInt445; + intStack[isp++] = component.anInt445; continue; } if (opcode == 2503) { - Static254.intStack[isp++] = component.anInt459; + intStack[isp++] = component.anInt459; continue; } if (opcode == 2504) { - Static254.intStack[isp++] = component.hidden ? 1 : 0; + intStack[isp++] = component.hidden ? 1 : 0; continue; } if (opcode == 2505) { - Static254.intStack[isp++] = component.layer; + intStack[isp++] = component.layer; continue; } } else if (opcode < 2700) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); if (opcode == 2600) { - Static254.intStack[isp++] = component.anInt489; + intStack[isp++] = component.anInt489; continue; } if (opcode == 2601) { - Static254.intStack[isp++] = component.scrollY; + intStack[isp++] = component.scrollY; continue; } if (opcode == 2602) { - Static3.stringStack[ssp++] = component.aClass100_84; + stringStack[ssp++] = component.text; continue; } if (opcode == 2603) { - Static254.intStack[isp++] = component.anInt486; + intStack[isp++] = component.anInt486; continue; } if (opcode == 2604) { - Static254.intStack[isp++] = component.anInt491; + intStack[isp++] = component.anInt491; continue; } if (opcode == 2605) { - Static254.intStack[isp++] = component.modelZoom; + intStack[isp++] = component.modelZoom; continue; } if (opcode == 2606) { - Static254.intStack[isp++] = component.modelXAngle; + intStack[isp++] = component.modelXAngle; continue; } if (opcode == 2607) { - Static254.intStack[isp++] = component.modelYOffset; + intStack[isp++] = component.modelYOffset; continue; } if (opcode == 2608) { - Static254.intStack[isp++] = component.modelYAngle; + intStack[isp++] = component.modelYAngle; continue; } if (opcode == 2609) { - Static254.intStack[isp++] = component.anInt476; + intStack[isp++] = component.anInt476; continue; } if (opcode == 2610) { - Static254.intStack[isp++] = component.modelXOffset; + intStack[isp++] = component.modelXOffset; continue; } if (opcode == 2611) { - Static254.intStack[isp++] = component.modelZOffset; + intStack[isp++] = component.modelZOffset; continue; } if (opcode == 2612) { - Static254.intStack[isp++] = component.anInt477; + intStack[isp++] = component.anInt477; continue; } } else if (opcode < 2800) { if (opcode == 2700) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); - Static254.intStack[isp++] = component.objId; + component = InterfaceList.getComponent(intStack[isp]); + intStack[isp++] = component.objId; continue; } if (opcode == 2701) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); if (component.objId == -1) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = component.objCount; + intStack[isp++] = component.objCount; } continue; } if (opcode == 2702) { isp--; - type = Static254.intStack[isp]; - @Pc(12566) Class3_Sub31 local12566 = (Class3_Sub31) Static119.aClass133_9.get((long) type); + int1 = intStack[isp]; + @Pc(12566) Class3_Sub31 local12566 = (Class3_Sub31) Static119.aClass133_9.get((long) int1); if (local12566 == null) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; } continue; } if (opcode == 2703) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); if (component.createdComponents == null) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } - local803 = component.createdComponents.length; - for (local1052 = 0; local1052 < component.createdComponents.length; local1052++) { - if (component.createdComponents[local1052] == null) { - local803 = local1052; + int3 = component.createdComponents.length; + for (int2 = 0; int2 < component.createdComponents.length; int2++) { + if (component.createdComponents[int2] == null) { + int3 = int2; break; } } - Static254.intStack[isp++] = local803; + intStack[isp++] = int3; continue; } if (opcode == 2704 || opcode == 2705) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - @Pc(12663) Class3_Sub31 local12663 = (Class3_Sub31) Static119.aClass133_9.get((long) type); - if (local12663 != null && local12663.anInt5878 == local803) { - Static254.intStack[isp++] = 1; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + @Pc(12663) Class3_Sub31 local12663 = (Class3_Sub31) Static119.aClass133_9.get((long) int1); + if (local12663 != null && local12663.anInt5878 == int3) { + intStack[isp++] = 1; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } } else if (opcode < 2900) { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); if (opcode == 2800) { - Static254.intStack[isp++] = Static36.method940(component).method512(); + intStack[isp++] = InterfaceList.getServerActiveProperties(component).getTargetMask(); continue; } if (opcode == 2801) { isp--; - local803 = Static254.intStack[isp]; - local803--; - if (component.aClass100Array18 != null && component.aClass100Array18.length > local803 && component.aClass100Array18[local803] != null) { - Static3.stringStack[ssp++] = component.aClass100Array18[local803]; + int3 = intStack[isp]; + int3--; + if (component.ops != null && component.ops.length > int3 && component.ops[int3] != null) { + stringStack[ssp++] = component.ops[int3]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 2802) { - if (component.aClass100_88 == null) { - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + if (component.opBase == null) { + stringStack[ssp++] = EMPTY_STRING; } else { - Static3.stringStack[ssp++] = component.aClass100_88; + stringStack[ssp++] = component.opBase; } continue; } } else if (opcode < 3200) { if (opcode == 3100) { ssp--; - string = Static3.stringStack[ssp]; - Chat.add(Static72.EMPTY_STRING, 0, string); + string = stringStack[ssp]; + Chat.add(EMPTY_STRING, 0, string); continue; } if (opcode == 3101) { isp -= 2; - Player.animate(Static254.intStack[isp + 1], Static254.intStack[isp], PlayerList.self); + Player.animate(intStack[isp + 1], intStack[isp], PlayerList.self); continue; } if (opcode == 3103) { @@ -1234,25 +1243,25 @@ public final class Static88 { } if (opcode == 3104) { ssp--; - string = Static3.stringStack[ssp]; - local803 = 0; + string = stringStack[ssp]; + int3 = 0; if (string.isInt()) { - local803 = string.parseInt(); + int3 = string.parseInt(); } Protocol.outboundBuffer.p1isaac(23); - Protocol.outboundBuffer.p4(local803); + Protocol.outboundBuffer.p4(int3); continue; } if (opcode == 3105) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; Protocol.outboundBuffer.p1isaac(244); Protocol.outboundBuffer.p8(string.encode37()); continue; } if (opcode == 3106) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; Protocol.outboundBuffer.p1isaac(65); Protocol.outboundBuffer.p1(string.length() + 1); Protocol.outboundBuffer.pjstr(string); @@ -1260,280 +1269,280 @@ public final class Static88 { } if (opcode == 3107) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; ssp--; - local2522 = Static3.stringStack[ssp]; - Static276.method4613(type, local2522); + local2522 = stringStack[ssp]; + Static276.method4613(int1, local2522); continue; } if (opcode == 3108) { isp -= 3; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - local1052 = Static254.intStack[isp + 2]; - local1063 = InterfaceList.getComponent(local1052); - Static40.method1015(local803, type, local1063); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + int2 = intStack[isp + 2]; + local1063 = InterfaceList.getComponent(int2); + Static40.method1015(int3, int1, local1063); continue; } if (opcode == 3109) { isp -= 2; - type = Static254.intStack[isp]; + int1 = intStack[isp]; local1256 = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; - local803 = Static254.intStack[isp + 1]; - Static40.method1015(local803, type, local1256); + int3 = intStack[isp + 1]; + Static40.method1015(int3, int1, local1256); continue; } if (opcode == 3110) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; Protocol.outboundBuffer.p1isaac(111); - Protocol.outboundBuffer.p2(type); + Protocol.outboundBuffer.p2(int1); continue; } } else if (opcode < 3300) { if (opcode == 3200) { isp -= 3; - SoundPlayer.play(Static254.intStack[isp + 1], Static254.intStack[isp], Static254.intStack[isp + 2]); + SoundPlayer.play(intStack[isp + 1], intStack[isp], intStack[isp + 2]); continue; } if (opcode == 3201) { isp--; - Static148.method2765(Static254.intStack[isp]); + MusicPlayer.playSong(intStack[isp]); continue; } if (opcode == 3202) { isp -= 2; - Static278.method4650(Static254.intStack[isp + 1], Static254.intStack[isp]); + MusicPlayer.playJingle(intStack[isp + 1], intStack[isp]); continue; } } else if (opcode < 3400) { if (opcode == 3300) { - Static254.intStack[isp++] = client.loop; + intStack[isp++] = client.loop; continue; } if (opcode == 3301) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = Static15.method484(type, local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = Inv.getItemType(int1, int3); continue; } if (opcode == 3302) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static23.method647(type, local803); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = Inv.getItemCount(int1, int3); continue; } if (opcode == 3303) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static278.method4652(type, local803); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = Inv.getSlotTotal(int1, int3); continue; } if (opcode == 3304) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = InvTypeList.list(type).size; + int1 = intStack[isp]; + intStack[isp++] = InvTypeList.list(int1).size; continue; } if (opcode == 3305) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static99.anIntArray240[type]; + int1 = intStack[isp]; + intStack[isp++] = PlayerSkillXpTable.boostedLevels[int1]; continue; } if (opcode == 3306) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static141.anIntArray326[type]; + int1 = intStack[isp]; + intStack[isp++] = PlayerSkillXpTable.baseLevels[int1]; continue; } if (opcode == 3307) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static227.anIntArray446[type]; + int1 = intStack[isp]; + intStack[isp++] = PlayerSkillXpTable.experience[int1]; continue; } if (opcode == 3308) { - type = Player.level; - local803 = Static225.originX + (PlayerList.self.xFine >> 7); - local1052 = (PlayerList.self.zFine >> 7) + Static142.originZ; - Static254.intStack[isp++] = (type << 28) - (-(local803 << 14) - local1052); + int1 = Player.level; + int3 = Static225.originX + (PlayerList.self.xFine >> 7); + int2 = (PlayerList.self.zFine >> 7) + Static142.originZ; + intStack[isp++] = (int1 << 28) - (-(int3 << 14) - int2); continue; } if (opcode == 3309) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = type >> 14 & 0x3FFF; + int1 = intStack[isp]; + intStack[isp++] = int1 >> 14 & 0x3FFF; continue; } if (opcode == 3310) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = type >> 28; + int1 = intStack[isp]; + intStack[isp++] = int1 >> 28; continue; } if (opcode == 3311) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = type & 0x3FFF; + int1 = intStack[isp]; + intStack[isp++] = int1 & 0x3FFF; continue; } if (opcode == 3312) { - Static254.intStack[isp++] = LoginManager.mapMembers ? 1 : 0; + intStack[isp++] = LoginManager.mapMembers ? 1 : 0; continue; } if (opcode == 3313) { isp -= 2; - type = Static254.intStack[isp] + 32768; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = Static15.method484(type, local803); + int1 = intStack[isp] + 32768; + int3 = intStack[isp + 1]; + intStack[isp++] = Inv.getItemType(int1, int3); continue; } if (opcode == 3314) { isp -= 2; - type = Static254.intStack[isp] + 32768; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = Static23.method647(type, local803); + int1 = intStack[isp] + 32768; + int3 = intStack[isp + 1]; + intStack[isp++] = Inv.getItemCount(int1, int3); continue; } if (opcode == 3315) { isp -= 2; - type = Static254.intStack[isp] + 32768; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = Static278.method4652(type, local803); + int1 = intStack[isp] + 32768; + int3 = intStack[isp + 1]; + intStack[isp++] = Inv.getSlotTotal(int1, int3); continue; } if (opcode == 3316) { if (LoginManager.staffModLevel < 2) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = LoginManager.staffModLevel; + intStack[isp++] = LoginManager.staffModLevel; } continue; } if (opcode == 3317) { - Static254.intStack[isp++] = Static60.rebootTimer; + intStack[isp++] = Player.rebootTimer; continue; } if (opcode == 3318) { - Static254.intStack[isp++] = Static125.worldId; + intStack[isp++] = Player.worldId; continue; } if (opcode == 3321) { - Static254.intStack[isp++] = Static12.anInt400; + intStack[isp++] = Player.runEnergy; continue; } if (opcode == 3322) { - Static254.intStack[isp++] = Static251.anInt5456; + intStack[isp++] = Player.weight; continue; } if (opcode == 3323) { if (LoginManager.playerModLevel >= 5 && LoginManager.playerModLevel <= 9) { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3324) { if (LoginManager.playerModLevel >= 5 && LoginManager.playerModLevel <= 9) { - Static254.intStack[isp++] = LoginManager.playerModLevel; + intStack[isp++] = LoginManager.playerModLevel; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3325) { - Static254.intStack[isp++] = LoginManager.playerMember ? 1 : 0; + intStack[isp++] = LoginManager.playerMember ? 1 : 0; continue; } if (opcode == 3326) { - Static254.intStack[isp++] = PlayerList.self.anInt1652; + intStack[isp++] = PlayerList.self.combatLevel; continue; } if (opcode == 3327) { - Static254.intStack[isp++] = PlayerList.self.appearance.aBoolean141 ? 1 : 0; + intStack[isp++] = PlayerList.self.appearance.gender ? 1 : 0; continue; } if (opcode == 3328) { - Static254.intStack[isp++] = LoginManager.playerUnderage && !LoginManager.parentalChatConsent ? 1 : 0; + intStack[isp++] = LoginManager.playerUnderage && !LoginManager.parentalChatConsent ? 1 : 0; continue; } if (opcode == 3329) { - Static254.intStack[isp++] = LoginManager.mapQuickChat ? 1 : 0; + intStack[isp++] = LoginManager.mapQuickChat ? 1 : 0; continue; } if (opcode == 3330) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static11.getFreeSpaces(type); + int1 = intStack[isp]; + intStack[isp++] = Inv.getFreeSpace(int1); continue; } if (opcode == 3331) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static178.getTotalParam(false, type, local803); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = Inv.getTotalParam(false, int1, int3); continue; } if (opcode == 3332) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = Static178.getTotalParam(true, type, local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = Inv.getTotalParam(true, int1, int3); continue; } if (opcode == 3333) { - Static254.intStack[isp++] = LoginManager.anInt39; + intStack[isp++] = LoginManager.anInt39; continue; } if (opcode == 3335) { - Static254.intStack[isp++] = client.language; + intStack[isp++] = client.language; continue; } if (opcode == 3336) { isp -= 4; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - type += local803 << 14; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - type += local1052 << 28; - type += local652; - Static254.intStack[isp++] = type; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + int1 += int3 << 14; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + int1 += int2 << 28; + int1 += local652; + intStack[isp++] = int1; continue; } if (opcode == 3337) { - Static254.intStack[isp++] = client.affiliate; + intStack[isp++] = client.affiliate; continue; } } else if (opcode < 3500) { @Pc(3422) EnumType local3422; if (opcode == 3400) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local3422 = EnumTypeList.get(type); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local3422 = EnumTypeList.get(int1); if (local3422.valueType == 115) { } - Static3.stringStack[ssp++] = local3422.getString(local803); + stringStack[ssp++] = local3422.getString(int3); continue; } if (opcode == 3408) { isp -= 4; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - @Pc(3469) EnumType local3469 = EnumTypeList.get(local1052); - if (local3469.keyType == type && local3469.valueType == local803) { - if (local803 == 115) { - Static3.stringStack[ssp++] = local3469.getString(local652); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + @Pc(3469) EnumType local3469 = EnumTypeList.get(int2); + if (local3469.keyType == int1 && local3469.valueType == int3) { + if (int3 == 115) { + stringStack[ssp++] = local3469.getString(local652); } else { - Static254.intStack[isp++] = local3469.getInt(local652); + intStack[isp++] = local3469.getInt(local652); } continue; } @@ -1541,492 +1550,492 @@ public final class Static88 { } if (opcode == 3409) { isp -= 3; - local803 = Static254.intStack[isp + 1]; - local1052 = Static254.intStack[isp + 2]; - type = Static254.intStack[isp]; - if (local803 == -1) { + int3 = intStack[isp + 1]; + int2 = intStack[isp + 2]; + int1 = intStack[isp]; + if (int3 == -1) { throw new RuntimeException("C3409-2"); } - @Pc(3549) EnumType local3549 = EnumTypeList.get(local803); - if (local3549.valueType != type) { + @Pc(3549) EnumType local3549 = EnumTypeList.get(int3); + if (local3549.valueType != int1) { throw new RuntimeException("C3409-1"); } - Static254.intStack[isp++] = local3549.containsValue(local1052) ? 1 : 0; + intStack[isp++] = local3549.containsValue(int2) ? 1 : 0; continue; } if (opcode == 3410) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; ssp--; - local2522 = Static3.stringStack[ssp]; - if (type == -1) { + local2522 = stringStack[ssp]; + if (int1 == -1) { throw new RuntimeException("C3410-2"); } - local3422 = EnumTypeList.get(type); + local3422 = EnumTypeList.get(int1); if (local3422.valueType != 115) { throw new RuntimeException("C3410-1"); } - Static254.intStack[isp++] = local3422.containsValue(local2522) ? 1 : 0; + intStack[isp++] = local3422.containsValue(local2522) ? 1 : 0; continue; } if (opcode == 3411) { isp--; - type = Static254.intStack[isp]; - @Pc(3645) EnumType local3645 = EnumTypeList.get(type); - Static254.intStack[isp++] = local3645.table.method3864(); + int1 = intStack[isp]; + @Pc(3645) EnumType local3645 = EnumTypeList.get(int1); + intStack[isp++] = local3645.table.size(); continue; } } else if (opcode < 3700) { if (opcode == 3600) { - if (Static166.anInt4054 == 0) { - Static254.intStack[isp++] = -2; - } else if (Static166.anInt4054 == 1) { - Static254.intStack[isp++] = -1; + if (FriendsList.state == 0) { + intStack[isp++] = -2; + } else if (FriendsList.state == 1) { + intStack[isp++] = -1; } else { - Static254.intStack[isp++] = Static9.anInt178; + intStack[isp++] = FriendsList.size; } continue; } if (opcode == 3601) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 == 2 && type < Static9.anInt178) { - Static3.stringStack[ssp++] = Static122.aClass100Array92[type]; + int1 = intStack[isp]; + if (FriendsList.state == 2 && int1 < FriendsList.size) { + stringStack[ssp++] = FriendsList.usernames[int1]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 3602) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 == 2 && Static9.anInt178 > type) { - Static254.intStack[isp++] = Static104.anIntArray255[type]; + int1 = intStack[isp]; + if (FriendsList.state == 2 && FriendsList.size > int1) { + intStack[isp++] = FriendsList.worlds[int1]; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3603) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 == 2 && Static9.anInt178 > type) { - Static254.intStack[isp++] = Static106.anIntArray258[type]; + int1 = intStack[isp]; + if (FriendsList.state == 2 && FriendsList.size > int1) { + intStack[isp++] = FriendsList.ranks[int1]; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3604) { isp--; - local803 = Static254.intStack[isp]; + int3 = intStack[isp]; ssp--; - string = Static3.stringStack[ssp]; - Static171.method3221(string, local803); + string = stringStack[ssp]; + FriendsList.setRank(string, int3); continue; } if (opcode == 3605) { ssp--; - string = Static3.stringStack[ssp]; - Static64.method1496(string.encode37()); + string = stringStack[ssp]; + FriendsList.add(string.encode37()); continue; } if (opcode == 3606) { ssp--; - string = Static3.stringStack[ssp]; - Static193.method3500(string.encode37()); + string = stringStack[ssp]; + FriendsList.remove(string.encode37()); continue; } if (opcode == 3607) { ssp--; - string = Static3.stringStack[ssp]; - Static140.method2707(string.encode37()); + string = stringStack[ssp]; + IgnoreList.add(string.encode37()); continue; } if (opcode == 3608) { ssp--; - string = Static3.stringStack[ssp]; - Static69.method1542(string.encode37()); + string = stringStack[ssp]; + IgnoreList.remove(string.encode37()); continue; } if (opcode == 3609) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; if (string.startsWith(Static72.aClass100_446) || string.startsWith(Static101.aClass100_537)) { string = string.substring(7); } - Static254.intStack[isp++] = Static98.method1965(string) ? 1 : 0; + intStack[isp++] = FriendsList.contains(string) ? 1 : 0; continue; } if (opcode == 3610) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 == 2 && Static9.anInt178 > type) { - Static3.stringStack[ssp++] = Static214.aClass100Array170[type]; + int1 = intStack[isp]; + if (FriendsList.state == 2 && FriendsList.size > int1) { + stringStack[ssp++] = FriendsList.worldNames[int1]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 3611) { - if (Static15.aClass100_87 == null) { - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + if (ClanChat.name == null) { + stringStack[ssp++] = EMPTY_STRING; } else { - Static3.stringStack[ssp++] = Static15.aClass100_87.method3125(); + stringStack[ssp++] = ClanChat.name.toTitleCase(); } continue; } if (opcode == 3612) { - if (Static15.aClass100_87 == null) { - Static254.intStack[isp++] = 0; + if (ClanChat.name == null) { + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = Static214.anInt5577; + intStack[isp++] = ClanChat.size; } continue; } if (opcode == 3613) { isp--; - type = Static254.intStack[isp]; - if (Static15.aClass100_87 != null && Static214.anInt5577 > type) { - Static3.stringStack[ssp++] = Static199.aClass3_Sub22Array1[type].aClass100_636.method3125(); + int1 = intStack[isp]; + if (ClanChat.name != null && ClanChat.size > int1) { + stringStack[ssp++] = ClanChat.members[int1].username.toTitleCase(); continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 3614) { isp--; - type = Static254.intStack[isp]; - if (Static15.aClass100_87 != null && type < Static214.anInt5577) { - Static254.intStack[isp++] = Static199.aClass3_Sub22Array1[type].anInt3340; + int1 = intStack[isp]; + if (ClanChat.name != null && int1 < ClanChat.size) { + intStack[isp++] = ClanChat.members[int1].world; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3615) { isp--; - type = Static254.intStack[isp]; - if (Static15.aClass100_87 != null && Static214.anInt5577 > type) { - Static254.intStack[isp++] = Static199.aClass3_Sub22Array1[type].aByte9; + int1 = intStack[isp]; + if (ClanChat.name != null && ClanChat.size > int1) { + intStack[isp++] = ClanChat.members[int1].rank; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3616) { - Static254.intStack[isp++] = Static50.aByte6; + intStack[isp++] = ClanChat.minKick; continue; } if (opcode == 3617) { ssp--; - string = Static3.stringStack[ssp]; - Static178.method3318(string); + string = stringStack[ssp]; + ClanChat.kick(string); continue; } if (opcode == 3618) { - Static254.intStack[isp++] = Static160.aByte14; + intStack[isp++] = ClanChat.rank; continue; } if (opcode == 3619) { ssp--; - string = Static3.stringStack[ssp]; - Static156.method2956(string.encode37()); + string = stringStack[ssp]; + ClanChat.join(string.encode37()); continue; } if (opcode == 3620) { - Static134.method2623(); + ClanChat.leave(); continue; } if (opcode == 3621) { - if (Static166.anInt4054 == 0) { - Static254.intStack[isp++] = -1; + if (FriendsList.state == 0) { + intStack[isp++] = -1; } else { - Static254.intStack[isp++] = Static35.anInt1093; + intStack[isp++] = IgnoreList.size; } continue; } if (opcode == 3622) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 != 0 && Static35.anInt1093 > type) { - Static3.stringStack[ssp++] = Base37.decodeLowerCase(IgnoreList.encodedUsernames[type]).method3125(); + int1 = intStack[isp]; + if (FriendsList.state != 0 && IgnoreList.size > int1) { + stringStack[ssp++] = Base37.decode37(IgnoreList.encodedUsernames[int1]).toTitleCase(); continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 3623) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; if (string.startsWith(Static72.aClass100_446) || string.startsWith(Static101.aClass100_537)) { string = string.substring(7); } - Static254.intStack[isp++] = Static238.method4144(string) ? 1 : 0; + intStack[isp++] = IgnoreList.contains(string) ? 1 : 0; continue; } if (opcode == 3624) { isp--; - type = Static254.intStack[isp]; - if (Static199.aClass3_Sub22Array1 != null && Static214.anInt5577 > type && Static199.aClass3_Sub22Array1[type].aClass100_636.equalsIgnoreCase(PlayerList.self.username)) { - Static254.intStack[isp++] = 1; + int1 = intStack[isp]; + if (ClanChat.members != null && ClanChat.size > int1 && ClanChat.members[int1].username.equalsIgnoreCase(PlayerList.self.username)) { + intStack[isp++] = 1; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3625) { - if (Static270.aClass100_1094 == null) { - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + if (ClanChat.owner == null) { + stringStack[ssp++] = EMPTY_STRING; } else { - Static3.stringStack[ssp++] = Static270.aClass100_1094.method3125(); + stringStack[ssp++] = ClanChat.owner.toTitleCase(); } continue; } if (opcode == 3626) { isp--; - type = Static254.intStack[isp]; - if (Static15.aClass100_87 != null && Static214.anInt5577 > type) { - Static3.stringStack[ssp++] = Static199.aClass3_Sub22Array1[type].aClass100_635; + int1 = intStack[isp]; + if (ClanChat.name != null && ClanChat.size > int1) { + stringStack[ssp++] = ClanChat.members[int1].aClass100_635; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 3627) { isp--; - type = Static254.intStack[isp]; - if (Static166.anInt4054 == 2 && type >= 0 && type < Static9.anInt178) { - Static254.intStack[isp++] = Static3.aBooleanArray135[type] ? 1 : 0; + int1 = intStack[isp]; + if (FriendsList.state == 2 && int1 >= 0 && int1 < FriendsList.size) { + intStack[isp++] = Static3.aBooleanArray135[int1] ? 1 : 0; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 3628) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; if (string.startsWith(Static72.aClass100_446) || string.startsWith(Static101.aClass100_537)) { string = string.substring(7); } - Static254.intStack[isp++] = Static4.method25(string); + intStack[isp++] = Static4.method25(string); continue; } if (opcode == 3629) { - Static254.intStack[isp++] = client.country; + intStack[isp++] = client.country; continue; } } else if (opcode < 4000) { if (opcode == 3903) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].method3905(); + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].getType(); continue; } if (opcode == 3904) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].anInt5094; + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].item; continue; } if (opcode == 3905) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].anInt5099; + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].price; continue; } if (opcode == 3906) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].anInt5090; + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].count; continue; } if (opcode == 3907) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].anInt5089; + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].completedCount; continue; } if (opcode == 3908) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = StockMarketManager.aClass136Array1[type].anInt5092; + int1 = intStack[isp]; + intStack[isp++] = StockMarketManager.offers[int1].completedGold; continue; } if (opcode == 3910) { isp--; - type = Static254.intStack[isp]; - local803 = StockMarketManager.aClass136Array1[type].method3904(); - Static254.intStack[isp++] = local803 == 0 ? 1 : 0; + int1 = intStack[isp]; + int3 = StockMarketManager.offers[int1].getStatus(); + intStack[isp++] = int3 == 0 ? 1 : 0; continue; } if (opcode == 3911) { isp--; - type = Static254.intStack[isp]; - local803 = StockMarketManager.aClass136Array1[type].method3904(); - Static254.intStack[isp++] = local803 == 2 ? 1 : 0; + int1 = intStack[isp]; + int3 = StockMarketManager.offers[int1].getStatus(); + intStack[isp++] = int3 == 2 ? 1 : 0; continue; } if (opcode == 3912) { isp--; - type = Static254.intStack[isp]; - local803 = StockMarketManager.aClass136Array1[type].method3904(); - Static254.intStack[isp++] = local803 == 5 ? 1 : 0; + int1 = intStack[isp]; + int3 = StockMarketManager.offers[int1].getStatus(); + intStack[isp++] = int3 == 5 ? 1 : 0; continue; } if (opcode == 3913) { isp--; - type = Static254.intStack[isp]; - local803 = StockMarketManager.aClass136Array1[type].method3904(); - Static254.intStack[isp++] = local803 == 1 ? 1 : 0; + int1 = intStack[isp]; + int3 = StockMarketManager.offers[int1].getStatus(); + intStack[isp++] = int3 == 1 ? 1 : 0; continue; } } else if (opcode < 4100) { if (opcode == 4000) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = local803 + type; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int3 + int1; continue; } if (opcode == 4001) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = type - local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int1 - int3; continue; } if (opcode == 4002) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = local803 * type; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int3 * int1; continue; } if (opcode == 4003) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = type / local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int1 / int3; continue; } if (opcode == 4004) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = (int) ((double) type * Math.random()); + int1 = intStack[isp]; + intStack[isp++] = (int) ((double) int1 * Math.random()); continue; } if (opcode == 4005) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = (int) (Math.random() * (double) (type + 1)); + int1 = intStack[isp]; + intStack[isp++] = (int) (Math.random() * (double) (int1 + 1)); continue; } if (opcode == 4006) { isp -= 5; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - c = Static254.intStack[isp + 4]; - Static254.intStack[isp++] = (local803 - type) * (c + -local1052) / (local652 - local1052) + type; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + c = intStack[isp + 4]; + intStack[isp++] = (int3 - int1) * (c + -int2) / (local652 - int2) + int1; continue; } @Pc(4899) long local4899; @Pc(4892) long local4892; if (opcode == 4007) { isp -= 2; - local4892 = Static254.intStack[isp]; - local4899 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = (int) (local4892 * local4899 / 100L + local4892); + local4892 = intStack[isp]; + local4899 = intStack[isp + 1]; + intStack[isp++] = (int) (local4892 * local4899 / 100L + local4892); continue; } if (opcode == 4008) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = type | 0x1 << local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int1 | 0x1 << int3; continue; } if (opcode == 4009) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = -(0x1 << local803) - 1 & type; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = -(0x1 << int3) - 1 & int1; continue; } if (opcode == 4010) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = (type & 0x1 << local803) == 0 ? 0 : 1; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = (int1 & 0x1 << int3) == 0 ? 0 : 1; continue; } if (opcode == 4011) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = type % local803; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = int1 % int3; continue; } if (opcode == 4012) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - if (type == 0) { - Static254.intStack[isp++] = 0; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + if (int1 == 0) { + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = (int) Math.pow((double) type, (double) local803); + intStack[isp++] = (int) Math.pow((double) int1, (double) int3); } continue; } if (opcode == 4013) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - if (type == 0) { - Static254.intStack[isp++] = 0; - } else if (local803 == 0) { - Static254.intStack[isp++] = Integer.MAX_VALUE; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + if (int1 == 0) { + intStack[isp++] = 0; + } else if (int3 == 0) { + intStack[isp++] = Integer.MAX_VALUE; } else { - Static254.intStack[isp++] = (int) Math.pow((double) type, 1.0D / (double) local803); + intStack[isp++] = (int) Math.pow((double) int1, 1.0D / (double) int3); } continue; } if (opcode == 4014) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = local803 & type; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = int3 & int1; continue; } if (opcode == 4015) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = type | local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int1 | int3; continue; } if (opcode == 4016) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = type < local803 ? type : local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + intStack[isp++] = int1 < int3 ? int1 : int3; continue; } if (opcode == 4017) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = local803 >= type ? local803 : type; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = int3 >= int1 ? int3 : int1; continue; } if (opcode == 4018) { isp -= 3; - local4892 = Static254.intStack[isp]; - local4899 = Static254.intStack[isp + 1]; - @Pc(5251) long local5251 = (long) Static254.intStack[isp + 2]; - Static254.intStack[isp++] = (int) (local4892 * local5251 / local4899); + local4892 = intStack[isp]; + local4899 = intStack[isp + 1]; + @Pc(5251) long local5251 = (long) intStack[isp + 2]; + intStack[isp++] = (int) (local4892 * local5251 / local4899); continue; } } else if (opcode >= 4200) { @@ -2034,119 +2043,119 @@ public final class Static88 { if (opcode < 4300) { if (opcode == 4200) { isp--; - type = Static254.intStack[isp]; - Static3.stringStack[ssp++] = ObjTypeList.get(type).name; + int1 = intStack[isp]; + stringStack[ssp++] = ObjTypeList.get(int1).name; continue; } @Pc(11269) ObjType local11269; if (opcode == 4201) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local11269 = ObjTypeList.get(type); - if (local803 >= 1 && local803 <= 5 && local11269.ops[local803 - 1] != null) { - Static3.stringStack[ssp++] = local11269.ops[local803 - 1]; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local11269 = ObjTypeList.get(int1); + if (int3 >= 1 && int3 <= 5 && local11269.ops[int3 - 1] != null) { + stringStack[ssp++] = local11269.ops[int3 - 1]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 4202) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local11269 = ObjTypeList.get(type); - if (local803 >= 1 && local803 <= 5 && local11269.inventoryOps[local803 - 1] != null) { - Static3.stringStack[ssp++] = local11269.inventoryOps[local803 - 1]; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local11269 = ObjTypeList.get(int1); + if (int3 >= 1 && int3 <= 5 && local11269.inventoryOps[int3 - 1] != null) { + stringStack[ssp++] = local11269.inventoryOps[int3 - 1]; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 4203) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = ObjTypeList.get(type).cost; + int1 = intStack[isp]; + intStack[isp++] = ObjTypeList.get(int1).cost; continue; } if (opcode == 4204) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = ObjTypeList.get(type).stackable == 1 ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = ObjTypeList.get(int1).stackable == 1 ? 1 : 0; continue; } @Pc(11417) ObjType local11417; if (opcode == 4205) { isp--; - type = Static254.intStack[isp]; - local11417 = ObjTypeList.get(type); + int1 = intStack[isp]; + local11417 = ObjTypeList.get(int1); if (local11417.certificateTemplate == -1 && local11417.certificateLink >= 0) { - Static254.intStack[isp++] = local11417.certificateLink; + intStack[isp++] = local11417.certificateLink; continue; } - Static254.intStack[isp++] = type; + intStack[isp++] = int1; continue; } if (opcode == 4206) { isp--; - type = Static254.intStack[isp]; - local11417 = ObjTypeList.get(type); + int1 = intStack[isp]; + local11417 = ObjTypeList.get(int1); if (local11417.certificateTemplate >= 0 && local11417.certificateLink >= 0) { - Static254.intStack[isp++] = local11417.certificateLink; + intStack[isp++] = local11417.certificateLink; continue; } - Static254.intStack[isp++] = type; + intStack[isp++] = int1; continue; } if (opcode == 4207) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = ObjTypeList.get(type).members ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = ObjTypeList.get(int1).members ? 1 : 0; continue; } if (opcode == 4208) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local5294 = ParamTypeList.get(local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local5294 = ParamTypeList.get(int3); if (local5294.isString()) { - Static3.stringStack[ssp++] = ObjTypeList.get(type).method1819(local5294.defaultString, local803); + stringStack[ssp++] = ObjTypeList.get(int1).getParam(local5294.defaultString, int3); } else { - Static254.intStack[isp++] = ObjTypeList.get(type).getParam(local5294.defaultInt, local803); + intStack[isp++] = ObjTypeList.get(int1).getParam(local5294.defaultInt, int3); } continue; } if (opcode == 4210) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp--; - local803 = Static254.intStack[isp]; - Static155.method2941(local803 == 1, string); - Static254.intStack[isp++] = Static111.anInt2905; + int3 = intStack[isp]; + Static155.method2941(int3 == 1, string); + intStack[isp++] = Find.index; continue; } if (opcode == 4211) { - if (Static169.aShortArray52 != null && Static67.anInt3356 < Static111.anInt2905) { - Static254.intStack[isp++] = Static169.aShortArray52[Static67.anInt3356++] & 0xFFFF; + if (Find.results != null && Find.size < Find.index) { + intStack[isp++] = Find.results[Find.size++] & 0xFFFF; continue; } - Static254.intStack[isp++] = -1; + intStack[isp++] = -1; continue; } if (opcode == 4212) { - Static67.anInt3356 = 0; + Find.size = 0; continue; } } else if (opcode < 4400) { if (opcode == 4300) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local5294 = ParamTypeList.get(local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local5294 = ParamTypeList.get(int3); if (local5294.isString()) { - Static3.stringStack[ssp++] = NpcTypeList.get(type).getParam(local803, local5294.defaultString); + stringStack[ssp++] = NpcTypeList.get(int1).getParam(int3, local5294.defaultString); } else { - Static254.intStack[isp++] = NpcTypeList.get(type).getParam(local803, local5294.defaultInt); + intStack[isp++] = NpcTypeList.get(int1).getParam(int3, local5294.defaultInt); } continue; } @@ -2154,62 +2163,62 @@ public final class Static88 { if (opcode >= 4600) { if (opcode < 5100) { if (opcode == 5000) { - Static254.intStack[isp++] = Static59.anInt1812; + intStack[isp++] = Chat.publicFilter; continue; } if (opcode == 5001) { isp -= 3; - Static59.anInt1812 = Static254.intStack[isp]; - Static49.anInt1459 = Static254.intStack[isp + 1]; - Static84.anInt2256 = Static254.intStack[isp + 2]; + Chat.publicFilter = intStack[isp]; + Chat.privateFilter = intStack[isp + 1]; + Chat.tradeFilter = intStack[isp + 2]; Protocol.outboundBuffer.p1isaac(157); - Protocol.outboundBuffer.p1(Static59.anInt1812); - Protocol.outboundBuffer.p1(Static49.anInt1459); - Protocol.outboundBuffer.p1(Static84.anInt2256); + Protocol.outboundBuffer.p1(Chat.publicFilter); + Protocol.outboundBuffer.p1(Chat.privateFilter); + Protocol.outboundBuffer.p1(Chat.tradeFilter); continue; } if (opcode == 5002) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp -= 2; - local803 = Static254.intStack[isp]; - local1052 = Static254.intStack[isp + 1]; + int3 = intStack[isp]; + int2 = intStack[isp + 1]; Protocol.outboundBuffer.p1isaac(99); Protocol.outboundBuffer.p8(string.encode37()); - Protocol.outboundBuffer.p1(local803 - 1); - Protocol.outboundBuffer.p1(local1052); + Protocol.outboundBuffer.p1(int3 - 1); + Protocol.outboundBuffer.p1(int2); continue; } if (opcode == 5003) { local2522 = null; isp--; - type = Static254.intStack[isp]; - if (type < 100) { - local2522 = Chat.aClass100Array158[type]; + int1 = intStack[isp]; + if (int1 < 100) { + local2522 = Chat.messages[int1]; } if (local2522 == null) { - local2522 = Static72.EMPTY_STRING; + local2522 = EMPTY_STRING; } - Static3.stringStack[ssp++] = local2522; + stringStack[ssp++] = local2522; continue; } if (opcode == 5004) { isp--; - type = Static254.intStack[isp]; - local803 = -1; - if (type < 100 && Chat.aClass100Array158[type] != null) { - local803 = Chat.anIntArray67[type]; + int1 = intStack[isp]; + int3 = -1; + if (int1 < 100 && Chat.messages[int1] != null) { + int3 = Chat.types[int1]; } - Static254.intStack[isp++] = local803; + intStack[isp++] = int3; continue; } if (opcode == 5005) { - Static254.intStack[isp++] = Static49.anInt1459; + intStack[isp++] = Chat.privateFilter; continue; } if (opcode == 5008) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; if (!string.startsWith(Static12.aClass100_74)) { if (LoginManager.staffModLevel == 0 && (LoginManager.playerUnderage && !LoginManager.parentalChatConsent || LoginManager.mapQuickChat)) { continue; @@ -2335,57 +2344,57 @@ public final class Static88 { Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - c); continue; } - Static127.method2470(string); + Cheat.execute(string); continue; } if (opcode == 5009) { ssp -= 2; - local2522 = Static3.stringStack[ssp + 1]; - string = Static3.stringStack[ssp]; + local2522 = stringStack[ssp + 1]; + string = stringStack[ssp]; if (LoginManager.staffModLevel != 0 || (!LoginManager.playerUnderage || LoginManager.parentalChatConsent) && !LoginManager.mapQuickChat) { Protocol.outboundBuffer.p1isaac(201); Protocol.outboundBuffer.p1(0); - local1052 = Protocol.outboundBuffer.offset; + int2 = Protocol.outboundBuffer.offset; Protocol.outboundBuffer.p8(string.encode37()); Static146.method2748(Protocol.outboundBuffer, local2522); - Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - local1052); + Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - int2); } continue; } if (opcode == 5010) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; local2522 = null; - if (type < 100) { - local2522 = Chat.aClass100Array112[type]; + if (int1 < 100) { + local2522 = Chat.names[int1]; } if (local2522 == null) { - local2522 = Static72.EMPTY_STRING; + local2522 = EMPTY_STRING; } - Static3.stringStack[ssp++] = local2522; + stringStack[ssp++] = local2522; continue; } if (opcode == 5011) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; local2522 = null; - if (type < 100) { - local2522 = Chat.aClass100Array62[type]; + if (int1 < 100) { + local2522 = Chat.clans[int1]; } if (local2522 == null) { - local2522 = Static72.EMPTY_STRING; + local2522 = EMPTY_STRING; } - Static3.stringStack[ssp++] = local2522; + stringStack[ssp++] = local2522; continue; } if (opcode == 5012) { isp--; - type = Static254.intStack[isp]; - local803 = -1; - if (type < 100) { - local803 = Chat.anIntArray521[type]; + int1 = intStack[isp]; + int3 = -1; + if (int1 < 100) { + int3 = Chat.phraseIds[int1]; } - Static254.intStack[isp++] = local803; + intStack[isp++] = int3; continue; } if (opcode == 5015) { @@ -2394,245 +2403,245 @@ public final class Static88 { } else { string = PlayerList.self.getName(); } - Static3.stringStack[ssp++] = string; + stringStack[ssp++] = string; continue; } if (opcode == 5016) { - Static254.intStack[isp++] = Static84.anInt2256; + intStack[isp++] = Chat.tradeFilter; continue; } if (opcode == 5017) { - Static254.intStack[isp++] = Chat.anInt1941; + intStack[isp++] = Chat.size; continue; } if (opcode == 5050) { isp--; - type = Static254.intStack[isp]; - Static3.stringStack[ssp++] = QuickChatCatTypeList.method4045(type).aClass100_79; + int1 = intStack[isp]; + stringStack[ssp++] = QuickChatCatTypeList.get(int1).description; continue; } @Pc(6378) QuickChatCatType local6378; if (opcode == 5051) { isp--; - type = Static254.intStack[isp]; - local6378 = QuickChatCatTypeList.method4045(type); - if (local6378.anIntArray30 == null) { - Static254.intStack[isp++] = 0; + int1 = intStack[isp]; + local6378 = QuickChatCatTypeList.get(int1); + if (local6378.subcategories == null) { + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local6378.anIntArray30.length; + intStack[isp++] = local6378.subcategories.length; } continue; } if (opcode == 5052) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - @Pc(6416) QuickChatCatType local6416 = QuickChatCatTypeList.method4045(type); - local652 = local6416.anIntArray30[local803]; - Static254.intStack[isp++] = local652; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + @Pc(6416) QuickChatCatType local6416 = QuickChatCatTypeList.get(int1); + local652 = local6416.subcategories[int3]; + intStack[isp++] = local652; continue; } if (opcode == 5053) { isp--; - type = Static254.intStack[isp]; - local6378 = QuickChatCatTypeList.method4045(type); - if (local6378.anIntArray32 == null) { - Static254.intStack[isp++] = 0; + int1 = intStack[isp]; + local6378 = QuickChatCatTypeList.get(int1); + if (local6378.phrases == null) { + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local6378.anIntArray32.length; + intStack[isp++] = local6378.phrases.length; } continue; } if (opcode == 5054) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = QuickChatCatTypeList.method4045(type).anIntArray32[local803]; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = QuickChatCatTypeList.get(int1).phrases[int3]; continue; } if (opcode == 5055) { isp--; - type = Static254.intStack[isp]; - Static3.stringStack[ssp++] = QuickChatPhraseTypeList.get(type).method769(); + int1 = intStack[isp]; + stringStack[ssp++] = QuickChatPhraseTypeList.get(int1).getText(); continue; } if (opcode == 5056) { isp--; - type = Static254.intStack[isp]; - @Pc(6527) QuickChatPhraseType local6527 = QuickChatPhraseTypeList.get(type); - if (local6527.anIntArray72 == null) { - Static254.intStack[isp++] = 0; + int1 = intStack[isp]; + @Pc(6527) QuickChatPhraseType local6527 = QuickChatPhraseTypeList.get(int1); + if (local6527.automaticResponses == null) { + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local6527.anIntArray72.length; + intStack[isp++] = local6527.automaticResponses.length; } continue; } if (opcode == 5057) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = QuickChatPhraseTypeList.get(type).anIntArray72[local803]; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = QuickChatPhraseTypeList.get(int1).automaticResponses[int3]; continue; } if (opcode == 5058) { - Static122.aClass12_1 = new QuickChatPhrase(); + activePhrase = new QuickChatPhrase(); isp--; - Static122.aClass12_1.id = Static254.intStack[isp]; - Static122.aClass12_1.type = QuickChatPhraseTypeList.get(Static122.aClass12_1.id); - Static122.aClass12_1.anIntArray33 = new int[Static122.aClass12_1.type.method767()]; + activePhrase.id = intStack[isp]; + activePhrase.type = QuickChatPhraseTypeList.get(activePhrase.id); + activePhrase.values = new int[activePhrase.type.getDynamicCommandCount()]; continue; } if (opcode == 5059) { Protocol.outboundBuffer.p1isaac(167); Protocol.outboundBuffer.p1(0); - type = Protocol.outboundBuffer.offset; + int1 = Protocol.outboundBuffer.offset; Protocol.outboundBuffer.p1(0); - Protocol.outboundBuffer.p2(Static122.aClass12_1.id); - Static122.aClass12_1.type.method760(Protocol.outboundBuffer, Static122.aClass12_1.anIntArray33); - Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - type); + Protocol.outboundBuffer.p2(activePhrase.id); + activePhrase.type.encodeMessage(Protocol.outboundBuffer, activePhrase.values); + Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - int1); continue; } if (opcode == 5060) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; Protocol.outboundBuffer.p1isaac(178); Protocol.outboundBuffer.p1(0); - local803 = Protocol.outboundBuffer.offset; + int3 = Protocol.outboundBuffer.offset; Protocol.outboundBuffer.p8(string.encode37()); - Protocol.outboundBuffer.p2(Static122.aClass12_1.id); - Static122.aClass12_1.type.method760(Protocol.outboundBuffer, Static122.aClass12_1.anIntArray33); - Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - local803); + Protocol.outboundBuffer.p2(activePhrase.id); + activePhrase.type.encodeMessage(Protocol.outboundBuffer, activePhrase.values); + Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - int3); continue; } if (opcode == 5061) { Protocol.outboundBuffer.p1isaac(167); Protocol.outboundBuffer.p1(0); - type = Protocol.outboundBuffer.offset; + int1 = Protocol.outboundBuffer.offset; Protocol.outboundBuffer.p1(1); - Protocol.outboundBuffer.p2(Static122.aClass12_1.id); - Static122.aClass12_1.type.method760(Protocol.outboundBuffer, Static122.aClass12_1.anIntArray33); - Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - type); + Protocol.outboundBuffer.p2(activePhrase.id); + activePhrase.type.encodeMessage(Protocol.outboundBuffer, activePhrase.values); + Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - int1); continue; } if (opcode == 5062) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = QuickChatCatTypeList.method4045(type).anIntArray31[local803]; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = QuickChatCatTypeList.get(int1).subcategoryShortcuts[int3]; continue; } if (opcode == 5063) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = QuickChatCatTypeList.method4045(type).anIntArray29[local803]; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + intStack[isp++] = QuickChatCatTypeList.get(int1).phraseShortcuts[int3]; continue; } if (opcode == 5064) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - if (local803 == -1) { - Static254.intStack[isp++] = -1; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + if (int3 == -1) { + intStack[isp++] = -1; } else { - Static254.intStack[isp++] = QuickChatCatTypeList.method4045(type).method469(local803); + intStack[isp++] = QuickChatCatTypeList.get(int1).getSubcategoryByShortcut(int3); } continue; } if (opcode == 5065) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - if (local803 == -1) { - Static254.intStack[isp++] = -1; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + if (int3 == -1) { + intStack[isp++] = -1; } else { - Static254.intStack[isp++] = QuickChatCatTypeList.method4045(type).method466(local803); + intStack[isp++] = QuickChatCatTypeList.get(int1).getPhraseByShortcut(int3); } continue; } if (opcode == 5066) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = QuickChatPhraseTypeList.get(type).method767(); + int1 = intStack[isp]; + intStack[isp++] = QuickChatPhraseTypeList.get(int1).getDynamicCommandCount(); continue; } if (opcode == 5067) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - local1052 = QuickChatPhraseTypeList.get(type).method765(local803); - Static254.intStack[isp++] = local1052; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + int2 = QuickChatPhraseTypeList.get(int1).getDynamicCommand(int3); + intStack[isp++] = int2; continue; } if (opcode == 5068) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static122.aClass12_1.anIntArray33[type] = local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + activePhrase.values[int1] = int3; continue; } if (opcode == 5069) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - Static122.aClass12_1.anIntArray33[type] = local803; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + activePhrase.values[int1] = int3; continue; } if (opcode == 5070) { isp -= 3; - type = Static254.intStack[isp]; - local1052 = Static254.intStack[isp + 2]; - local803 = Static254.intStack[isp + 1]; - @Pc(6996) QuickChatPhraseType local6996 = QuickChatPhraseTypeList.get(type); - if (local6996.method765(local803) != 0) { + int1 = intStack[isp]; + int2 = intStack[isp + 2]; + int3 = intStack[isp + 1]; + @Pc(6996) QuickChatPhraseType type = QuickChatPhraseTypeList.get(int1); + if (type.getDynamicCommand(int3) != 0) { throw new RuntimeException("bad command"); } - Static254.intStack[isp++] = local6996.method764(local1052, local803); + intStack[isp++] = type.getDynamicCommandParam(int2, int3); continue; } if (opcode == 5071) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp--; - local1552 = Static254.intStack[isp] == 1; - Static24.method668(local1552, string); - Static254.intStack[isp++] = Static111.anInt2905; + local1552 = intStack[isp] == 1; + Find.findQuickChatPhrases(local1552, string); + intStack[isp++] = Find.index; continue; } if (opcode == 5072) { - if (Static169.aShortArray52 != null && Static67.anInt3356 < Static111.anInt2905) { - Static254.intStack[isp++] = Static169.aShortArray52[Static67.anInt3356++] & 0xFFFF; + if (Find.results != null && Find.size < Find.index) { + intStack[isp++] = Find.results[Find.size++] & 0xFFFF; continue; } - Static254.intStack[isp++] = -1; + intStack[isp++] = -1; continue; } if (opcode == 5073) { - Static67.anInt3356 = 0; + Find.size = 0; continue; } } else if (opcode < 5200) { if (opcode == 5100) { if (Keyboard.pressedKeys[Keyboard.KEY_ALT]) { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } if (opcode == 5101) { if (Keyboard.pressedKeys[Keyboard.KEY_CTRL]) { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } if (opcode == 5102) { if (Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } @@ -2641,127 +2650,127 @@ public final class Static88 { if (opcode < 5300) { if (opcode == 5200) { isp--; - Static155.method2940(Static254.intStack[isp]); + WorldMap.setTargetZoom(intStack[isp]); continue; } if (opcode == 5201) { - Static254.intStack[isp++] = Static91.method1874(); + intStack[isp++] = WorldMap.getTargetZoom(); continue; } if (opcode == 5202) { isp--; - Static258.method4444(Static254.intStack[isp]); + Static258.method4444(intStack[isp]); continue; } if (opcode == 5203) { ssp--; - Static3.method4656(Static3.stringStack[ssp]); + Static3.method4656(stringStack[ssp]); continue; } if (opcode == 5204) { - Static3.stringStack[ssp - 1] = Static211.method923(Static3.stringStack[ssp - 1]); + stringStack[ssp - 1] = Static211.method923(stringStack[ssp - 1]); continue; } if (opcode == 5205) { ssp--; - Static90.method1853(Static3.stringStack[ssp]); + WorldMap.method1853(stringStack[ssp]); continue; } if (opcode == 5206) { isp--; - type = Static254.intStack[isp]; - @Pc(7264) Map local7264 = Static29.method803(type >> 14 & 0x3FFF, type & 0x3FFF); + int1 = intStack[isp]; + @Pc(7264) Map local7264 = MapList.getContainingSource(int1 >> 14 & 0x3FFF, int1 & 0x3FFF); if (local7264 == null) { - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; } else { - Static3.stringStack[ssp++] = local7264.group; + stringStack[ssp++] = local7264.group; } continue; } @Pc(7293) Map local7293; if (opcode == 5207) { ssp--; - local7293 = Static124.method2434(Static3.stringStack[ssp]); + local7293 = MapList.get(stringStack[ssp]); if (local7293 != null && local7293.aClass100_137 != null) { - Static3.stringStack[ssp++] = local7293.aClass100_137; + stringStack[ssp++] = local7293.aClass100_137; continue; } - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; + stringStack[ssp++] = EMPTY_STRING; continue; } if (opcode == 5208) { - Static254.intStack[isp++] = Static89.anInt2387; - Static254.intStack[isp++] = Static37.anInt1176; + intStack[isp++] = Static89.anInt2387; + intStack[isp++] = Static37.anInt1176; continue; } if (opcode == 5209) { - Static254.intStack[isp++] = WorldMap.originX + WorldMap.anInt435; - Static254.intStack[isp++] = WorldMap.originZ + WorldMap.length - WorldMap.anInt919 - 1; + intStack[isp++] = WorldMap.originX + WorldMap.anInt435; + intStack[isp++] = WorldMap.originZ + WorldMap.length - WorldMap.anInt919 - 1; continue; } if (opcode == 5210) { local7293 = Static214.method4361(); if (local7293 == null) { - Static254.intStack[isp++] = 0; - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local7293.anInt769 * 64; - Static254.intStack[isp++] = local7293.anInt764 * 64; + intStack[isp++] = local7293.anInt769 * 64; + intStack[isp++] = local7293.anInt764 * 64; } continue; } if (opcode == 5211) { local7293 = Static214.method4361(); if (local7293 == null) { - Static254.intStack[isp++] = 0; - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local7293.anInt770 - local7293.anInt763; - Static254.intStack[isp++] = local7293.anInt758 - local7293.anInt771; + intStack[isp++] = local7293.anInt770 - local7293.anInt763; + intStack[isp++] = local7293.anInt758 - local7293.anInt771; } continue; } if (opcode == 5212) { - type = Static118.method2352(); - local1052 = 0; - if (type == -1) { - local2522 = Static72.EMPTY_STRING; + int1 = Static118.method2352(); + int2 = 0; + if (int1 == -1) { + local2522 = EMPTY_STRING; } else { - local2522 = WorldMap.labels.aClass100Array153[type]; - local1052 = WorldMap.labels.method3894(type); + local2522 = WorldMap.labels.aClass100Array153[int1]; + int2 = WorldMap.labels.method3894(int1); } local2522 = local2522.method3140(Static67.aClass100_639, Static5.aClass100_10); - Static3.stringStack[ssp++] = local2522; - Static254.intStack[isp++] = local1052; + stringStack[ssp++] = local2522; + intStack[isp++] = int2; continue; } if (opcode == 5213) { - local1052 = 0; - type = Static119.method2385(); - if (type == -1) { - local2522 = Static72.EMPTY_STRING; + int2 = 0; + int1 = Static119.method2385(); + if (int1 == -1) { + local2522 = EMPTY_STRING; } else { - local2522 = WorldMap.labels.aClass100Array153[type]; - local1052 = WorldMap.labels.method3894(type); + local2522 = WorldMap.labels.aClass100Array153[int1]; + int2 = WorldMap.labels.method3894(int1); } local2522 = local2522.method3140(Static67.aClass100_639, Static5.aClass100_10); - Static3.stringStack[ssp++] = local2522; - Static254.intStack[isp++] = local1052; + stringStack[ssp++] = local2522; + intStack[isp++] = int2; continue; } if (opcode == 5214) { isp--; - type = Static254.intStack[isp]; - Static80.method3616(type >> 14 & 0x3FFF, type & 0x3FFF); + int1 = intStack[isp]; + Static80.method3616(int1 >> 14 & 0x3FFF, int1 & 0x3FFF); continue; } if (opcode == 5215) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; ssp--; - local2522 = Static3.stringStack[ssp]; + local2522 = stringStack[ssp]; local7566 = false; - @Pc(7577) SecondaryLinkedList local7577 = Static183.method3333(type >> 14 & 0x3FFF, type & 0x3FFF); + @Pc(7577) SecondaryLinkedList local7577 = Static183.method3333(int1 >> 14 & 0x3FFF, int1 & 0x3FFF); for (@Pc(7582) Map local7582 = (Map) local7577.method795(); local7582 != null; local7582 = (Map) local7577.method797()) { if (local7582.group.equalsIgnoreCase(local2522)) { local7566 = true; @@ -2769,53 +2778,53 @@ public final class Static88 { } } if (local7566) { - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } if (opcode == 5216) { isp--; - type = Static254.intStack[isp]; - Static253.method4332(type); + int1 = intStack[isp]; + Static253.method4332(int1); continue; } if (opcode == 5217) { isp--; - type = Static254.intStack[isp]; - if (Static90.method1855(type)) { - Static254.intStack[isp++] = 1; + int1 = intStack[isp]; + if (Static90.method1855(int1)) { + intStack[isp++] = 1; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } if (opcode == 5218) { local7293 = Static214.method4361(); if (local7293 == null) { - Static254.intStack[isp++] = -1; + intStack[isp++] = -1; } else { - Static254.intStack[isp++] = local7293.defaultZoom; + intStack[isp++] = local7293.defaultZoom; } continue; } if (opcode == 5219) { ssp--; - Static44.method1149(Static3.stringStack[ssp]); + Static44.method1149(stringStack[ssp]); continue; } if (opcode == 5220) { - Static254.intStack[isp++] = WorldMap.loadPercentage == 100 ? 1 : 0; + intStack[isp++] = WorldMap.loadPercentage == 100 ? 1 : 0; continue; } } else if (opcode < 5400) { if (opcode == 5300) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - Static241.setWindowMode(false, 3, type, local803); - Static254.intStack[isp++] = GameShell.fullScreenFrame == null ? 0 : 1; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + Static241.setWindowMode(false, 3, int1, int3); + intStack[isp++] = GameShell.fullScreenFrame == null ? 0 : 1; continue; } if (opcode == 5301) { @@ -2826,76 +2835,76 @@ public final class Static88 { } if (opcode == 5302) { @Pc(7780) Class114[] local7780 = Static3.method4660(); - Static254.intStack[isp++] = local7780.length; + intStack[isp++] = local7780.length; continue; } if (opcode == 5303) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; @Pc(7800) Class114[] local7800 = Static3.method4660(); - Static254.intStack[isp++] = local7800[type].anInt4248; - Static254.intStack[isp++] = local7800[type].anInt4250; + intStack[isp++] = local7800[int1].anInt4248; + intStack[isp++] = local7800[int1].anInt4250; continue; } if (opcode == 5305) { - local803 = Preferences.fullScreenHeight; - type = Preferences.fullScreenWidth; - local1052 = -1; + int3 = Preferences.fullScreenHeight; + int1 = Preferences.fullScreenWidth; + int2 = -1; @Pc(7833) Class114[] local7833 = Static3.method4660(); for (c = 0; c < local7833.length; c++) { @Pc(7843) Class114 local7843 = local7833[c]; - if (type == local7843.anInt4248 && local7843.anInt4250 == local803) { - local1052 = c; + if (int1 == local7843.anInt4248 && local7843.anInt4250 == int3) { + int2 = c; break; } } - Static254.intStack[isp++] = local1052; + intStack[isp++] = int2; continue; } if (opcode == 5306) { - Static254.intStack[isp++] = Static144.getWindowMode(); + intStack[isp++] = Static144.getWindowMode(); continue; } if (opcode == 5307) { isp--; - type = Static254.intStack[isp]; - if (type < 0 || type > 2) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0 || int1 > 2) { + int1 = 0; } - Static241.setWindowMode(false, type, -1, -1); + Static241.setWindowMode(false, int1, -1, -1); continue; } if (opcode == 5308) { - Static254.intStack[isp++] = Preferences.favoriteWorlds; + intStack[isp++] = Preferences.favoriteWorlds; continue; } if (opcode == 5309) { isp--; - type = Static254.intStack[isp]; - if (type < 0 || type > 2) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0 || int1 > 2) { + int1 = 0; } - Preferences.favoriteWorlds = type; + Preferences.favoriteWorlds = int1; Preferences.write(GameShell.signLink); continue; } } else if (opcode < 5500) { if (opcode == 5400) { ssp -= 2; - string = Static3.stringStack[ssp]; - local2522 = Static3.stringStack[ssp + 1]; + string = stringStack[ssp]; + local2522 = stringStack[ssp + 1]; isp--; - local1052 = Static254.intStack[isp]; + int2 = intStack[isp]; Protocol.outboundBuffer.p1isaac(117); Protocol.outboundBuffer.p1(Buffer.getStringLength(string) + Buffer.getStringLength(local2522) + 1); Protocol.outboundBuffer.pjstr(string); Protocol.outboundBuffer.pjstr(local2522); - Protocol.outboundBuffer.p1(local1052); + Protocol.outboundBuffer.p1(int2); continue; } if (opcode == 5401) { isp -= 2; - client.aShortArray88[Static254.intStack[isp]] = (short) Static105.method2253(Static254.intStack[isp + 1]); + client.aShortArray88[intStack[isp]] = (short) Static105.method2253(intStack[isp + 1]); Static211.method924(); Static269.clearObjectSpriteCache(); Static278.method4649(); @@ -2905,32 +2914,32 @@ public final class Static88 { } if (opcode == 5405) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - if (type >= 0 && type < 2) { - Static107.anIntArrayArrayArray9[type] = new int[local803 << 1][4]; + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + if (int1 >= 0 && int1 < 2) { + Static107.anIntArrayArrayArray9[int1] = new int[int3 << 1][4]; } continue; } if (opcode == 5406) { isp -= 7; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1] << 1; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - c = Static254.intStack[isp + 4]; - @Pc(8108) int local8108 = Static254.intStack[isp + 6]; - local1087 = Static254.intStack[isp + 5]; - if (type >= 0 && type < 2 && Static107.anIntArrayArrayArray9[type] != null && local803 >= 0 && Static107.anIntArrayArrayArray9[type].length > local803) { - Static107.anIntArrayArrayArray9[type][local803] = new int[] { (local1052 >> 14 & 0x3FFF) * 128, local652, (local1052 & 0x3FFF) * 128, local8108 }; - Static107.anIntArrayArrayArray9[type][local803 + 1] = new int[] { (c >> 14 & 0x3FFF) * 128, local1087, (c & 0x3FFF) * 128 }; + int1 = intStack[isp]; + int3 = intStack[isp + 1] << 1; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + c = intStack[isp + 4]; + @Pc(8108) int local8108 = intStack[isp + 6]; + local1087 = intStack[isp + 5]; + if (int1 >= 0 && int1 < 2 && Static107.anIntArrayArrayArray9[int1] != null && int3 >= 0 && Static107.anIntArrayArrayArray9[int1].length > int3) { + Static107.anIntArrayArrayArray9[int1][int3] = new int[] { (int2 >> 14 & 0x3FFF) * 128, local652, (int2 & 0x3FFF) * 128, local8108 }; + Static107.anIntArrayArrayArray9[int1][int3 + 1] = new int[] { (c >> 14 & 0x3FFF) * 128, local1087, (c & 0x3FFF) * 128 }; } continue; } if (opcode == 5407) { isp--; - type = Static107.anIntArrayArrayArray9[Static254.intStack[isp]].length >> 1; - Static254.intStack[isp++] = type; + int1 = Static107.anIntArrayArrayArray9[intStack[isp]].length >> 1; + intStack[isp++] = int1; continue; } if (opcode == 5411) { @@ -2945,7 +2954,7 @@ public final class Static88 { continue; } if (opcode == 5419) { - string = Static72.EMPTY_STRING; + string = EMPTY_STRING; if (Static232.aClass212_5 != null) { string = Static181.method3341(Static232.aClass212_5.intArg2); try { @@ -2956,11 +2965,11 @@ public final class Static88 { } catch (@Pc(8290) UnsupportedEncodingException local8290) { } } - Static3.stringStack[ssp++] = string; + stringStack[ssp++] = string; continue; } if (opcode == 5420) { - Static254.intStack[isp++] = SignLink.anInt5928 == 3 ? 1 : 0; + intStack[isp++] = SignLink.anInt5928 == 3 ? 1 : 0; continue; } if (opcode == 5421) { @@ -2968,9 +2977,9 @@ public final class Static88 { Static241.setWindowMode(false, Preferences.favoriteWorlds, -1, -1); } isp--; - local1552 = Static254.intStack[isp] == 1; + local1552 = intStack[isp] == 1; ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; @Pc(8356) JagString local8356 = JagString.concatenate(new JagString[] { Static15.method479(), string }); if (GameShell.frame != null || local1552 && SignLink.anInt5928 != 3 && SignLink.osName.startsWith("win") && !client.haveIe6) { Static164.newTab = local1552; @@ -2983,42 +2992,42 @@ public final class Static88 { } if (opcode == 5422) { isp--; - local1052 = Static254.intStack[isp]; + int2 = intStack[isp]; ssp -= 2; - local2522 = Static3.stringStack[ssp + 1]; - string = Static3.stringStack[ssp]; + local2522 = stringStack[ssp + 1]; + string = stringStack[ssp]; if (string.length() > 0) { if (Static103.aClass100Array88 == null) { Static103.aClass100Array88 = new JagString[Static132.anIntArray309[client.game]]; } - Static103.aClass100Array88[local1052] = string; + Static103.aClass100Array88[int2] = string; } if (local2522.length() > 0) { if (Static263.aClass100Array174 == null) { Static263.aClass100Array174 = new JagString[Static132.anIntArray309[client.game]]; } - Static263.aClass100Array174[local1052] = local2522; + Static263.aClass100Array174[int2] = local2522; } continue; } if (opcode == 5423) { ssp--; - Static3.stringStack[ssp].method3129(); + stringStack[ssp].print(); continue; } if (opcode == 5424) { isp -= 11; - Static40.anInt1275 = Static254.intStack[isp]; - Static111.anInt2910 = Static254.intStack[isp + 1]; - Static251.anInt5457 = Static254.intStack[isp + 2]; - Static232.anInt5208 = Static254.intStack[isp + 3]; - Static55.anInt1736 = Static254.intStack[isp + 4]; - Static169.anInt4073 = Static254.intStack[isp + 5]; - Static85.anInt2261 = Static254.intStack[isp + 6]; - Static136.anInt3324 = Static254.intStack[isp + 7]; - Static254.anInt5556 = Static254.intStack[isp + 8]; - Static195.anInt4581 = Static254.intStack[isp + 9]; - Static262.anInt5752 = Static254.intStack[isp + 10]; + Static40.anInt1275 = intStack[isp]; + Static111.anInt2910 = intStack[isp + 1]; + Static251.anInt5457 = intStack[isp + 2]; + Static232.anInt5208 = intStack[isp + 3]; + Static55.anInt1736 = intStack[isp + 4]; + Static169.anInt4073 = intStack[isp + 5]; + Static85.anInt2261 = intStack[isp + 6]; + Static136.anInt3324 = intStack[isp + 7]; + Static254.anInt5556 = intStack[isp + 8]; + Static195.anInt4581 = intStack[isp + 9]; + Static262.anInt5752 = intStack[isp + 10]; client.js5Archive8.isFileReady(Static55.anInt1736); client.js5Archive8.isFileReady(Static169.anInt4073); client.js5Archive8.isFileReady(Static85.anInt2261); @@ -3034,55 +3043,55 @@ public final class Static88 { } if (opcode == 5426) { isp--; - Static270.anInt5794 = Static254.intStack[isp]; + Static270.anInt5794 = intStack[isp]; continue; } if (opcode == 5427) { isp -= 2; - Static169.anInt4075 = Static254.intStack[isp]; - Static225.anInt5073 = Static254.intStack[isp + 1]; + Static169.anInt4075 = intStack[isp]; + Static225.anInt5073 = intStack[isp + 1]; continue; } } else if (opcode < 5600) { if (opcode == 5500) { isp -= 4; - type = Static254.intStack[isp]; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - local803 = Static254.intStack[isp + 1]; - Static141.method2722(false, local1052, local803, local652, (type & 0x3FFF) - Static142.originZ, (type >> 14 & 0x3FFF) - Static225.originX); + int1 = intStack[isp]; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + int3 = intStack[isp + 1]; + Static141.method2722(false, int2, int3, local652, (int1 & 0x3FFF) - Static142.originZ, (int1 >> 14 & 0x3FFF) - Static225.originX); continue; } if (opcode == 5501) { isp -= 4; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - local652 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 2]; - Static260.method3849(local803, (type & 0x3FFF) - Static142.originZ, local1052, (type >> 14 & 0x3FFF) - Static225.originX, local652); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + local652 = intStack[isp + 3]; + int2 = intStack[isp + 2]; + Static260.method3849(int3, (int1 & 0x3FFF) - Static142.originZ, int2, (int1 >> 14 & 0x3FFF) - Static225.originX, local652); continue; } if (opcode == 5502) { isp -= 6; - type = Static254.intStack[isp]; - if (type >= 2) { + int1 = intStack[isp]; + if (int1 >= 2) { throw new RuntimeException(); } - Static155.anInt3718 = type; - local803 = Static254.intStack[isp + 1]; - if (Static107.anIntArrayArrayArray9[Static155.anInt3718].length >> 1 <= local803 + 1) { + Static155.anInt3718 = int1; + int3 = intStack[isp + 1]; + if (Static107.anIntArrayArrayArray9[Static155.anInt3718].length >> 1 <= int3 + 1) { throw new RuntimeException(); } - Static127.anInt3125 = local803; + Static127.anInt3125 = int3; Static233.anInt5224 = 0; - Static228.anInt5101 = Static254.intStack[isp + 2]; - Static114.anInt5843 = Static254.intStack[isp + 3]; - local1052 = Static254.intStack[isp + 4]; - if (local1052 >= 2) { + Static228.anInt5101 = intStack[isp + 2]; + Static114.anInt5843 = intStack[isp + 3]; + int2 = intStack[isp + 4]; + if (int2 >= 2) { throw new RuntimeException(); } - Static52.anInt1694 = local1052; - local652 = Static254.intStack[isp + 5]; + Static52.anInt1694 = int2; + local652 = intStack[isp + 5]; if (Static107.anIntArrayArrayArray9[Static52.anInt1694].length >> 1 <= local652 + 1) { throw new RuntimeException(); } @@ -3096,8 +3105,8 @@ public final class Static88 { } if (opcode == 5504) { isp -= 2; - Camera.pitchTarget = Static254.intStack[isp]; - Camera.yawTarget = Static254.intStack[isp + 1]; + Camera.pitchTarget = intStack[isp]; + Camera.yawTarget = intStack[isp + 1]; if (Static227.cameraType == 2) { Static184.cameraYaw = (int)Camera.yawTarget; Static240.cameraPitch = (int)Camera.pitchTarget; @@ -3106,27 +3115,27 @@ public final class Static88 { continue; } if (opcode == 5505) { - Static254.intStack[isp++] = (int)Camera.pitchTarget; + intStack[isp++] = (int)Camera.pitchTarget; continue; } if (opcode == 5506) { - Static254.intStack[isp++] = (int)Camera.yawTarget; + intStack[isp++] = (int)Camera.yawTarget; continue; } } else if (opcode < 5700) { if (opcode == 5600) { ssp -= 2; - string = Static3.stringStack[ssp]; - local2522 = Static3.stringStack[ssp + 1]; + string = stringStack[ssp]; + local2522 = stringStack[ssp + 1]; isp--; - local1052 = Static254.intStack[isp]; + int2 = intStack[isp]; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0 && WorldList.step == 0) { - Static225.method3896(string, local2522, local1052); + LoginManager.method3896(string, local2522, int2); } continue; } if (opcode == 5601) { - Static185.method3395(); + LoginManager.method3395(); continue; } if (opcode == 5602) { @@ -3138,14 +3147,14 @@ public final class Static88 { if (opcode == 5603) { isp -= 4; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0 && WorldList.step == 0) { - Static125.method2448(Static254.intStack[isp + 2], Static254.intStack[isp + 3], Static254.intStack[isp], Static254.intStack[isp + 1]); + Static125.method2448(intStack[isp + 2], intStack[isp + 3], intStack[isp], intStack[isp + 1]); } continue; } if (opcode == 5604) { ssp--; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0 && WorldList.step == 0) { - Static78.method1691(Static3.stringStack[ssp].encode37()); + Static78.method1691(stringStack[ssp].encode37()); } continue; } @@ -3153,7 +3162,7 @@ public final class Static88 { isp -= 4; ssp -= 2; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0 && WorldList.step == 0) { - Static40.method1016(Static254.intStack[isp], Static254.intStack[isp + 3], Static254.intStack[isp + 1], Static3.stringStack[ssp + 1], Static3.stringStack[ssp].encode37(), Static254.intStack[isp + 2]); + Static40.method1016(intStack[isp], intStack[isp + 3], intStack[isp + 1], stringStack[ssp + 1], stringStack[ssp].encode37(), intStack[isp + 2]); } continue; } @@ -3164,39 +3173,39 @@ public final class Static88 { continue; } if (opcode == 5607) { - Static254.intStack[isp++] = LoginManager.reply; + intStack[isp++] = LoginManager.reply; continue; } if (opcode == 5608) { - Static254.intStack[isp++] = LoginManager.hopTime; + intStack[isp++] = LoginManager.hopTime; continue; } if (opcode == 5609) { - Static254.intStack[isp++] = CreateManager.reply; + intStack[isp++] = CreateManager.reply; continue; } if (opcode == 5610) { - for (type = 0; type < 5; type++) { - Static3.stringStack[ssp++] = CreateManager.suggestedNames.length > type ? CreateManager.suggestedNames[type].method3125() : Static72.EMPTY_STRING; + for (int1 = 0; int1 < 5; int1++) { + stringStack[ssp++] = CreateManager.suggestedNames.length > int1 ? CreateManager.suggestedNames[int1].toTitleCase() : EMPTY_STRING; } CreateManager.suggestedNames = null; continue; } if (opcode == 5611) { - Static254.intStack[isp++] = LoginManager.disallowResult; + intStack[isp++] = LoginManager.disallowResult; continue; } } else if (opcode < 6100) { if (opcode == 6001) { isp--; - type = Static254.intStack[isp]; - if (type < 1) { - type = 1; + int1 = intStack[isp]; + if (int1 < 1) { + int1 = 1; } - if (type > 4) { - type = 4; + if (int1 > 4) { + int1 = 4; } - Preferences.brightness = type; + Preferences.brightness = int1; if (!GlRenderer.enabled || !Preferences.highDetailLighting) { if (Preferences.brightness == 1) { Rasteriser.setBrightness(0.9F); @@ -3224,7 +3233,7 @@ public final class Static88 { } if (opcode == 6002) { isp--; - Preferences.setAllVisibleLevels(Static254.intStack[isp] == 1); + Preferences.setAllVisibleLevels(intStack[isp] == 1); LocTypeList.clear(); Static145.method2742(); Static269.method2218(); @@ -3234,7 +3243,7 @@ public final class Static88 { } if (opcode == 6003) { isp--; - Preferences.removeRoofsSelectively = Static254.intStack[isp] == 1; + Preferences.removeRoofsSelectively = intStack[isp] == 1; Static269.method2218(); Preferences.write(GameShell.signLink); Preferences.sentToServer = false; @@ -3242,7 +3251,7 @@ public final class Static88 { } if (opcode == 6005) { isp--; - Preferences.showGroundDecorations = Static254.intStack[isp] == 1; + Preferences.showGroundDecorations = intStack[isp] == 1; Static145.method2742(); Preferences.write(GameShell.signLink); Preferences.sentToServer = false; @@ -3250,7 +3259,7 @@ public final class Static88 { } if (opcode == 6006) { isp--; - Preferences.highDetailTextures = Static254.intStack[isp] == 1; + Preferences.highDetailTextures = intStack[isp] == 1; ((Js5GlTextureProvider) Rasteriser.textureProvider).method3245(!Preferences.highDetailTextures); Preferences.write(GameShell.signLink); Preferences.sentToServer = false; @@ -3258,39 +3267,39 @@ public final class Static88 { } if (opcode == 6007) { isp--; - Preferences.manyIdleAnimations = Static254.intStack[isp] == 1; + Preferences.manyIdleAnimations = intStack[isp] == 1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6008) { isp--; - Preferences.flickeringEffectsOn = Static254.intStack[isp] == 1; + Preferences.flickeringEffectsOn = intStack[isp] == 1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6009) { isp--; - Preferences.manyGroundTextures = Static254.intStack[isp] == 1; + Preferences.manyGroundTextures = intStack[isp] == 1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6010) { isp--; - Preferences.characterShadowsOn = Static254.intStack[isp] == 1; + Preferences.characterShadowsOn = intStack[isp] == 1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6011) { isp--; - type = Static254.intStack[isp]; - if (type < 0 || type > 2) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0 || int1 > 2) { + int1 = 0; } - Preferences.sceneryShadowsType = type; + Preferences.sceneryShadowsType = int1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; @@ -3300,7 +3309,7 @@ public final class Static88 { MaterialManager.setMaterial(0, 0); } isp--; - Preferences.highDetailLighting = Static254.intStack[isp] == 1; + Preferences.highDetailLighting = intStack[isp] == 1; if (GlRenderer.enabled && Preferences.highDetailLighting) { Rasteriser.setBrightness(0.7F); } else { @@ -3324,7 +3333,7 @@ public final class Static88 { } if (opcode == 6014) { isp--; - Preferences.highWaterDetail = Static254.intStack[isp] == 1; + Preferences.highWaterDetail = intStack[isp] == 1; if (GlRenderer.enabled) { Static145.method2742(); } @@ -3334,7 +3343,7 @@ public final class Static88 { } if (opcode == 6015) { isp--; - Preferences.fogEnabled = Static254.intStack[isp] == 1; + Preferences.fogEnabled = intStack[isp] == 1; if (GlRenderer.enabled) { Static86.setInstantFade(); } @@ -3344,19 +3353,19 @@ public final class Static88 { } if (opcode == 6016) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; if (GlRenderer.enabled) { GameShell.replaceCanvas = true; } - if (type < 0 || type > 2) { - type = 0; + if (int1 < 0 || int1 > 2) { + int1 = 0; } - Preferences.antiAliasingMode = type; + Preferences.antiAliasingMode = int1; continue; } if (opcode == 6017) { isp--; - Preferences.stereo = Static254.intStack[isp] == 1; + Preferences.stereo = intStack[isp] == 1; Static211.method930(); Preferences.write(GameShell.signLink); Preferences.sentToServer = false; @@ -3364,38 +3373,38 @@ public final class Static88 { } if (opcode == 6018) { isp--; - type = Static254.intStack[isp]; - if (type < 0) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0) { + int1 = 0; } - if (type > 127) { - type = 127; + if (int1 > 127) { + int1 = 127; } - Preferences.soundEffectVolume = type; + Preferences.soundEffectVolume = int1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6019) { isp--; - type = Static254.intStack[isp]; - if (type < 0) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0) { + int1 = 0; } - if (type > 255) { - type = 255; + if (int1 > 255) { + int1 = 255; } - if (type != Preferences.musicVolume) { + if (int1 != Preferences.musicVolume) { if (Preferences.musicVolume == 0 && MusicPlayer.groupId != -1) { - Static122.method2410(client.js5Archive6, MusicPlayer.groupId, type); + Static122.method2410(client.js5Archive6, MusicPlayer.groupId, int1); MidiPlayer.jingle = false; - } else if (type == 0) { + } else if (int1 == 0) { Static241.method4548(); MidiPlayer.jingle = false; } else { - Static230.method3956(type); + Static230.method3956(int1); } - Preferences.musicVolume = type; + Preferences.musicVolume = int1; } Preferences.write(GameShell.signLink); Preferences.sentToServer = false; @@ -3403,161 +3412,161 @@ public final class Static88 { } if (opcode == 6020) { isp--; - type = Static254.intStack[isp]; - if (type < 0) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0) { + int1 = 0; } - if (type > 127) { - type = 127; + if (int1 > 127) { + int1 = 127; } - Preferences.ambientSoundsVolume = type; + Preferences.ambientSoundsVolume = int1; Preferences.write(GameShell.signLink); Preferences.sentToServer = false; continue; } if (opcode == 6021) { isp--; - Static127.neverRemoveRoofs = Static254.intStack[isp] == 1; + Static127.neverRemoveRoofs = intStack[isp] == 1; Static269.method2218(); continue; } if (opcode == 6023) { isp--; - type = Static254.intStack[isp]; - if (type < 0) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0) { + int1 = 0; } - if (type > 2) { - type = 2; + if (int1 > 2) { + int1 = 2; } local1552 = false; if (GameShell.maxMemory < 96) { local1552 = true; - type = 0; + int1 = 0; } - Preferences.setParticles(type); + Preferences.setParticles(int1); Preferences.write(GameShell.signLink); Preferences.sentToServer = false; - Static254.intStack[isp++] = local1552 ? 0 : 1; + intStack[isp++] = local1552 ? 0 : 1; continue; } if (opcode == 6024) { isp--; - type = Static254.intStack[isp]; - if (type < 0 || type > 2) { - type = 0; + int1 = intStack[isp]; + if (int1 < 0 || int1 > 2) { + int1 = 0; } - Preferences.windowMode = type; + Preferences.windowMode = int1; Preferences.write(GameShell.signLink); continue; } if (opcode == 6028) { isp--; - Preferences.cursorsEnabled = Static254.intStack[isp] != 0; + Preferences.cursorsEnabled = intStack[isp] != 0; Preferences.write(GameShell.signLink); continue; } } else if (opcode < 6200) { if (opcode == 6101) { - Static254.intStack[isp++] = Preferences.brightness; + intStack[isp++] = Preferences.brightness; continue; } if (opcode == 6102) { - Static254.intStack[isp++] = SceneGraph.allLevelsAreVisible() ? 1 : 0; + intStack[isp++] = SceneGraph.allLevelsAreVisible() ? 1 : 0; continue; } if (opcode == 6103) { - Static254.intStack[isp++] = Preferences.removeRoofsSelectively ? 1 : 0; + intStack[isp++] = Preferences.removeRoofsSelectively ? 1 : 0; continue; } if (opcode == 6105) { - Static254.intStack[isp++] = Preferences.showGroundDecorations ? 1 : 0; + intStack[isp++] = Preferences.showGroundDecorations ? 1 : 0; continue; } if (opcode == 6106) { - Static254.intStack[isp++] = Preferences.highDetailTextures ? 1 : 0; + intStack[isp++] = Preferences.highDetailTextures ? 1 : 0; continue; } if (opcode == 6107) { - Static254.intStack[isp++] = Preferences.manyIdleAnimations ? 1 : 0; + intStack[isp++] = Preferences.manyIdleAnimations ? 1 : 0; continue; } if (opcode == 6108) { - Static254.intStack[isp++] = Preferences.flickeringEffectsOn ? 1 : 0; + intStack[isp++] = Preferences.flickeringEffectsOn ? 1 : 0; continue; } if (opcode == 6109) { - Static254.intStack[isp++] = Preferences.manyGroundTextures ? 1 : 0; + intStack[isp++] = Preferences.manyGroundTextures ? 1 : 0; continue; } if (opcode == 6110) { - Static254.intStack[isp++] = Preferences.characterShadowsOn ? 1 : 0; + intStack[isp++] = Preferences.characterShadowsOn ? 1 : 0; continue; } if (opcode == 6111) { - Static254.intStack[isp++] = Preferences.sceneryShadowsType; + intStack[isp++] = Preferences.sceneryShadowsType; continue; } if (opcode == 6112) { - Static254.intStack[isp++] = Preferences.highDetailLighting ? 1 : 0; + intStack[isp++] = Preferences.highDetailLighting ? 1 : 0; continue; } if (opcode == 6114) { - Static254.intStack[isp++] = Preferences.highWaterDetail ? 1 : 0; + intStack[isp++] = Preferences.highWaterDetail ? 1 : 0; continue; } if (opcode == 6115) { - Static254.intStack[isp++] = Preferences.fogEnabled ? 1 : 0; + intStack[isp++] = Preferences.fogEnabled ? 1 : 0; continue; } if (opcode == 6116) { - Static254.intStack[isp++] = Preferences.antiAliasingMode; + intStack[isp++] = Preferences.antiAliasingMode; continue; } if (opcode == 6117) { - Static254.intStack[isp++] = Preferences.stereo ? 1 : 0; + intStack[isp++] = Preferences.stereo ? 1 : 0; continue; } if (opcode == 6118) { - Static254.intStack[isp++] = Preferences.soundEffectVolume; + intStack[isp++] = Preferences.soundEffectVolume; continue; } if (opcode == 6119) { - Static254.intStack[isp++] = Preferences.musicVolume; + intStack[isp++] = Preferences.musicVolume; continue; } if (opcode == 6120) { - Static254.intStack[isp++] = Preferences.ambientSoundsVolume; + intStack[isp++] = Preferences.ambientSoundsVolume; continue; } if (opcode == 6121) { if (GlRenderer.enabled) { - Static254.intStack[isp++] = GlRenderer.arbMultisampleSupported ? 1 : 0; + intStack[isp++] = GlRenderer.arbMultisampleSupported ? 1 : 0; } else { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } continue; } if (opcode == 6123) { - Static254.intStack[isp++] = Preferences.getParticleSetting(); + intStack[isp++] = Preferences.getParticleSetting(); continue; } if (opcode == 6124) { - Static254.intStack[isp++] = Preferences.windowMode; + intStack[isp++] = Preferences.windowMode; continue; } if (opcode == 6128) { - Static254.intStack[isp++] = Preferences.cursorsEnabled ? 1 : 0; + intStack[isp++] = Preferences.cursorsEnabled ? 1 : 0; continue; } } else if (opcode < 6300) { if (opcode == 6200) { isp -= 2; - Static178.aShort25 = (short) Static254.intStack[isp]; + Static178.aShort25 = (short) intStack[isp]; if (Static178.aShort25 <= 0) { Static178.aShort25 = 256; } - Static10.aShort9 = (short) Static254.intStack[isp + 1]; + Static10.aShort9 = (short) intStack[isp + 1]; if (Static10.aShort9 <= 0) { Static10.aShort9 = 205; } @@ -3565,11 +3574,11 @@ public final class Static88 { } if (opcode == 6201) { isp -= 2; - Static263.aShort30 = (short) Static254.intStack[isp]; + Static263.aShort30 = (short) intStack[isp]; if (Static263.aShort30 <= 0) { Static263.aShort30 = 256; } - Static187.aShort27 = (short) Static254.intStack[isp + 1]; + Static187.aShort27 = (short) intStack[isp + 1]; if (Static187.aShort27 <= 0) { Static187.aShort27 = 320; } @@ -3577,21 +3586,21 @@ public final class Static88 { } if (opcode == 6202) { isp -= 4; - Static153.aShort22 = (short) Static254.intStack[isp]; + Static153.aShort22 = (short) intStack[isp]; if (Static153.aShort22 <= 0) { Static153.aShort22 = 1; } - Static4.aShort1 = (short) Static254.intStack[isp + 1]; + Static4.aShort1 = (short) intStack[isp + 1]; if (Static4.aShort1 <= 0) { Static4.aShort1 = 32767; } else if (Static153.aShort22 > Static4.aShort1) { Static4.aShort1 = Static153.aShort22; } - Static55.aShort12 = (short) Static254.intStack[isp + 2]; + Static55.aShort12 = (short) intStack[isp + 2]; if (Static55.aShort12 <= 0) { Static55.aShort12 = 1; } - Static131.aShort21 = (short) Static254.intStack[isp + 3]; + Static131.aShort21 = (short) intStack[isp + 3]; if (Static131.aShort21 <= 0) { Static131.aShort21 = 32767; } else if (Static131.aShort21 < Static55.aShort12) { @@ -3601,80 +3610,80 @@ public final class Static88 { } if (opcode == 6203) { Static115.method2314(Static280.aClass13_26.anInt445, 0, Static280.aClass13_26.anInt459, 0, false); - Static254.intStack[isp++] = Static166.anInt4055; - Static254.intStack[isp++] = Static245.anInt5377; + intStack[isp++] = Static166.anInt4055; + intStack[isp++] = Static245.anInt5377; continue; } if (opcode == 6204) { - Static254.intStack[isp++] = Static263.aShort30; - Static254.intStack[isp++] = Static187.aShort27; + intStack[isp++] = Static263.aShort30; + intStack[isp++] = Static187.aShort27; continue; } if (opcode == 6205) { - Static254.intStack[isp++] = Static178.aShort25; - Static254.intStack[isp++] = Static10.aShort9; + intStack[isp++] = Static178.aShort25; + intStack[isp++] = Static10.aShort9; continue; } } else if (opcode < 6400) { if (opcode == 6300) { - Static254.intStack[isp++] = (int) (MonotonicClock.currentTimeMillis() / 60000L); + intStack[isp++] = (int) (MonotonicClock.currentTimeMillis() / 60000L); continue; } if (opcode == 6301) { - Static254.intStack[isp++] = (int) (MonotonicClock.currentTimeMillis() / 86400000L) - 11745; + intStack[isp++] = (int) (MonotonicClock.currentTimeMillis() / 86400000L) - 11745; continue; } if (opcode == 6302) { isp -= 3; - local1052 = Static254.intStack[isp + 2]; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; + int2 = intStack[isp + 2]; + int3 = intStack[isp + 1]; + int1 = intStack[isp]; Static102.aCalendar2.clear(); Static102.aCalendar2.set(11, 12); - Static102.aCalendar2.set(local1052, local803, type); - Static254.intStack[isp++] = (int) (Static102.aCalendar2.getTime().getTime() / 86400000L) - 11745; + Static102.aCalendar2.set(int2, int3, int1); + intStack[isp++] = (int) (Static102.aCalendar2.getTime().getTime() / 86400000L) - 11745; continue; } if (opcode == 6303) { Static102.aCalendar2.clear(); Static102.aCalendar2.setTime(new Date(MonotonicClock.currentTimeMillis())); - Static254.intStack[isp++] = Static102.aCalendar2.get(1); + intStack[isp++] = Static102.aCalendar2.get(1); continue; } if (opcode == 6304) { local1552 = true; isp--; - type = Static254.intStack[isp]; - if (type < 0) { - local1552 = (type + 1) % 4 == 0; - } else if (type < 1582) { - local1552 = type % 4 == 0; - } else if (type % 4 != 0) { + int1 = intStack[isp]; + if (int1 < 0) { + local1552 = (int1 + 1) % 4 == 0; + } else if (int1 < 1582) { + local1552 = int1 % 4 == 0; + } else if (int1 % 4 != 0) { local1552 = false; - } else if (type % 100 != 0) { + } else if (int1 % 100 != 0) { local1552 = true; - } else if (type % 400 != 0) { + } else if (int1 % 400 != 0) { local1552 = false; } - Static254.intStack[isp++] = local1552 ? 1 : 0; + intStack[isp++] = local1552 ? 1 : 0; continue; } } else if (opcode < 6500) { if (opcode == 6405) { - Static254.intStack[isp++] = Static87.showVideoAd() ? 1 : 0; + intStack[isp++] = Static87.showVideoAd() ? 1 : 0; continue; } if (opcode == 6406) { - Static254.intStack[isp++] = Static267.isShowingVideoAd() ? 1 : 0; + intStack[isp++] = Static267.isShowingVideoAd() ? 1 : 0; continue; } } else if (opcode < 6600) { if (opcode == 6500) { if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0) { - Static254.intStack[isp++] = WorldList.fetch() == -1 ? 0 : 1; + intStack[isp++] = WorldList.fetch() == -1 ? 0 : 1; continue; } - Static254.intStack[isp++] = 1; + intStack[isp++] = 1; continue; } @Pc(10247) Class32 local10247; @@ -3682,285 +3691,285 @@ public final class Static88 { if (opcode == 6501) { world = Static18.getFirstWorld(); if (world == null) { - Static254.intStack[isp++] = -1; - Static254.intStack[isp++] = 0; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; + intStack[isp++] = -1; + intStack[isp++] = 0; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = world.id; - Static254.intStack[isp++] = world.flags; - Static3.stringStack[ssp++] = world.activity; + intStack[isp++] = world.id; + intStack[isp++] = world.flags; + stringStack[ssp++] = world.activity; local10247 = world.getWorldInfo(); - Static254.intStack[isp++] = local10247.flag; - Static3.stringStack[ssp++] = local10247.name; - Static254.intStack[isp++] = world.players; + intStack[isp++] = local10247.flag; + stringStack[ssp++] = local10247.name; + intStack[isp++] = world.players; } continue; } if (opcode == 6502) { - world = getNextWorld(); + world = WorldList.getNextWorld(); if (world == null) { - Static254.intStack[isp++] = -1; - Static254.intStack[isp++] = 0; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; + intStack[isp++] = -1; + intStack[isp++] = 0; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = world.id; - Static254.intStack[isp++] = world.flags; - Static3.stringStack[ssp++] = world.activity; + intStack[isp++] = world.id; + intStack[isp++] = world.flags; + stringStack[ssp++] = world.activity; local10247 = world.getWorldInfo(); - Static254.intStack[isp++] = local10247.flag; - Static3.stringStack[ssp++] = local10247.name; - Static254.intStack[isp++] = world.players; + intStack[isp++] = local10247.flag; + stringStack[ssp++] = local10247.name; + intStack[isp++] = world.players; } continue; } if (opcode == 6503) { isp--; - type = Static254.intStack[isp]; + int1 = intStack[isp]; if (client.gameState == 10 && LoginManager.anInt4937 == 0 && LoginManager.step == 0 && CreateManager.step == 0) { - Static254.intStack[isp++] = Static176.hopWorld(type) ? 1 : 0; + intStack[isp++] = Static176.hopWorld(int1) ? 1 : 0; continue; } - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; continue; } if (opcode == 6504) { isp--; - Preferences.lastWorldId = Static254.intStack[isp]; + Preferences.lastWorldId = intStack[isp]; Preferences.write(GameShell.signLink); continue; } if (opcode == 6505) { - Static254.intStack[isp++] = Preferences.lastWorldId; + intStack[isp++] = Preferences.lastWorldId; continue; } if (opcode == 6506) { isp--; - type = Static254.intStack[isp]; - @Pc(10440) World local10440 = Static54.getWorld(type); + int1 = intStack[isp]; + @Pc(10440) World local10440 = Static54.getWorld(int1); if (local10440 == null) { - Static254.intStack[isp++] = -1; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; - Static3.stringStack[ssp++] = Static72.EMPTY_STRING; - Static254.intStack[isp++] = 0; + intStack[isp++] = -1; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; + stringStack[ssp++] = EMPTY_STRING; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = local10440.flags; - Static3.stringStack[ssp++] = local10440.activity; + intStack[isp++] = local10440.flags; + stringStack[ssp++] = local10440.activity; @Pc(10458) Class32 local10458 = local10440.getWorldInfo(); - Static254.intStack[isp++] = local10458.flag; - Static3.stringStack[ssp++] = local10458.name; - Static254.intStack[isp++] = local10440.players; + intStack[isp++] = local10458.flag; + stringStack[ssp++] = local10458.name; + intStack[isp++] = local10440.players; } continue; } if (opcode == 6507) { isp -= 4; - local1052 = Static254.intStack[isp + 2]; - type = Static254.intStack[isp]; - local7566 = Static254.intStack[isp + 3] == 1; - local1552 = Static254.intStack[isp + 1] == 1; - Static228.sortWorldList(local1052, local1552, type, local7566); + int2 = intStack[isp + 2]; + int1 = intStack[isp]; + local7566 = intStack[isp + 3] == 1; + local1552 = intStack[isp + 1] == 1; + Static228.sortWorldList(int2, local1552, int1, local7566); continue; } } else if (opcode < 6700) { if (opcode == 6600) { isp--; - Preferences.aBoolean63 = Static254.intStack[isp] == 1; + Preferences.aBoolean63 = intStack[isp] == 1; Preferences.write(GameShell.signLink); continue; } if (opcode == 6601) { - Static254.intStack[isp++] = Preferences.aBoolean63 ? 1 : 0; + intStack[isp++] = Preferences.aBoolean63 ? 1 : 0; continue; } } } } else if (opcode == 4500) { isp -= 2; - type = Static254.intStack[isp]; - local803 = Static254.intStack[isp + 1]; - local5294 = ParamTypeList.get(local803); + int1 = intStack[isp]; + int3 = intStack[isp + 1]; + local5294 = ParamTypeList.get(int3); if (local5294.isString()) { - Static3.stringStack[ssp++] = StructTypeList.get(type).getParam(local5294.defaultString, local803); + stringStack[ssp++] = StructTypeList.get(int1).getParam(local5294.defaultString, int3); } else { - Static254.intStack[isp++] = StructTypeList.get(type).getParam(local803, local5294.defaultInt); + intStack[isp++] = StructTypeList.get(int1).getParam(int3, local5294.defaultInt); } continue; } } else if (opcode == 4400) { isp -= 2; - local803 = Static254.intStack[isp + 1]; - type = Static254.intStack[isp]; - local5294 = ParamTypeList.get(local803); + int3 = intStack[isp + 1]; + int1 = intStack[isp]; + local5294 = ParamTypeList.get(int3); if (local5294.isString()) { - Static3.stringStack[ssp++] = LocTypeList.get(type).method3430(local5294.defaultString, local803); + stringStack[ssp++] = LocTypeList.get(int1).method3430(local5294.defaultString, int3); } else { - Static254.intStack[isp++] = LocTypeList.get(type).getParam(local5294.defaultInt, local803); + intStack[isp++] = LocTypeList.get(int1).getParam(local5294.defaultInt, int3); } continue; } } else { if (opcode == 4100) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp--; - local803 = Static254.intStack[isp]; - Static3.stringStack[ssp++] = JagString.concatenate(new JagString[] { string, Static123.parseInt(local803) }); + int3 = intStack[isp]; + stringStack[ssp++] = JagString.concatenate(new JagString[] { string, Static123.parseInt(int3) }); continue; } if (opcode == 4101) { ssp -= 2; - local2522 = Static3.stringStack[ssp + 1]; - string = Static3.stringStack[ssp]; - Static3.stringStack[ssp++] = JagString.concatenate(new JagString[] { string, local2522 }); + local2522 = stringStack[ssp + 1]; + string = stringStack[ssp]; + stringStack[ssp++] = JagString.concatenate(new JagString[] { string, local2522 }); continue; } if (opcode == 4102) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp--; - local803 = Static254.intStack[isp]; - Static3.stringStack[ssp++] = JagString.concatenate(new JagString[] { string, Static110.method2285(local803) }); + int3 = intStack[isp]; + stringStack[ssp++] = JagString.concatenate(new JagString[] { string, Static110.method2285(int3) }); continue; } if (opcode == 4103) { ssp--; - string = Static3.stringStack[ssp]; - Static3.stringStack[ssp++] = string.toLowerCase(); + string = stringStack[ssp]; + stringStack[ssp++] = string.toLowerCase(); continue; } if (opcode == 4104) { isp--; - type = Static254.intStack[isp]; - @Pc(11770) long local11770 = (long) type * 86400000L + 1014768000000L; + int1 = intStack[isp]; + @Pc(11770) long local11770 = (long) int1 * 86400000L + 1014768000000L; Static102.aCalendar2.setTime(new Date(local11770)); local652 = Static102.aCalendar2.get(5); c = Static102.aCalendar2.get(2); local1087 = Static102.aCalendar2.get(1); - Static3.stringStack[ssp++] = JagString.concatenate(new JagString[] { Static123.parseInt(local652), Static163.aClass100_767, Static34.aClass100Array40[c], Static163.aClass100_767, Static123.parseInt(local1087) }); + stringStack[ssp++] = JagString.concatenate(new JagString[] { Static123.parseInt(local652), Static163.aClass100_767, Static34.aClass100Array40[c], Static163.aClass100_767, Static123.parseInt(local1087) }); continue; } if (opcode == 4105) { ssp -= 2; - local2522 = Static3.stringStack[ssp + 1]; - string = Static3.stringStack[ssp]; - if (PlayerList.self.appearance != null && PlayerList.self.appearance.aBoolean141) { - Static3.stringStack[ssp++] = local2522; + local2522 = stringStack[ssp + 1]; + string = stringStack[ssp]; + if (PlayerList.self.appearance != null && PlayerList.self.appearance.gender) { + stringStack[ssp++] = local2522; continue; } - Static3.stringStack[ssp++] = string; + stringStack[ssp++] = string; continue; } if (opcode == 4106) { isp--; - type = Static254.intStack[isp]; - Static3.stringStack[ssp++] = Static123.parseInt(type); + int1 = intStack[isp]; + stringStack[ssp++] = Static123.parseInt(int1); continue; } if (opcode == 4107) { ssp -= 2; - Static254.intStack[isp++] = Static3.stringStack[ssp].method3126(Static3.stringStack[ssp + 1]); + intStack[isp++] = stringStack[ssp].method3126(stringStack[ssp + 1]); continue; } if (opcode == 4108) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp -= 2; - local1052 = Static254.intStack[isp + 1]; - local803 = Static254.intStack[isp]; - Static254.intStack[isp++] = Static148.method2768(local1052).getParagraphLineCount(string, local803); + int2 = intStack[isp + 1]; + int3 = intStack[isp]; + intStack[isp++] = FontMetricsList.get(int2).getParagraphLineCount(string, int3); continue; } if (opcode == 4109) { isp -= 2; ssp--; - string = Static3.stringStack[ssp]; - local1052 = Static254.intStack[isp + 1]; - local803 = Static254.intStack[isp]; - Static254.intStack[isp++] = Static148.method2768(local1052).method2856(string, local803); + string = stringStack[ssp]; + int2 = intStack[isp + 1]; + int3 = intStack[isp]; + intStack[isp++] = FontMetricsList.get(int2).method2856(string, int3); continue; } if (opcode == 4110) { ssp -= 2; - string = Static3.stringStack[ssp]; - local2522 = Static3.stringStack[ssp + 1]; + string = stringStack[ssp]; + local2522 = stringStack[ssp + 1]; isp--; - if (Static254.intStack[isp] == 1) { - Static3.stringStack[ssp++] = string; + if (intStack[isp] == 1) { + stringStack[ssp++] = string; } else { - Static3.stringStack[ssp++] = local2522; + stringStack[ssp++] = local2522; } continue; } if (opcode == 4111) { ssp--; - string = Static3.stringStack[ssp]; - Static3.stringStack[ssp++] = Static218.escape(string); + string = stringStack[ssp]; + stringStack[ssp++] = Font.escape(string); continue; } if (opcode == 4112) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; isp--; - local803 = Static254.intStack[isp]; - if (local803 == -1) { + int3 = intStack[isp]; + if (int3 == -1) { throw new RuntimeException("null char"); } - Static3.stringStack[ssp++] = string.method3128(local803); + stringStack[ssp++] = string.method3128(int3); continue; } if (opcode == 4113) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static273.method3213(type) ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = Static273.method3213(int1) ? 1 : 0; continue; } if (opcode == 4114) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static83.method433(type) ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = Static83.method433(int1) ? 1 : 0; continue; } if (opcode == 4115) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static258.method4428(type) ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = Static258.method4428(int1) ? 1 : 0; continue; } if (opcode == 4116) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static24.method671(type) ? 1 : 0; + int1 = intStack[isp]; + intStack[isp++] = Static24.method671(int1) ? 1 : 0; continue; } if (opcode == 4117) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; if (string == null) { - Static254.intStack[isp++] = 0; + intStack[isp++] = 0; } else { - Static254.intStack[isp++] = string.length(); + intStack[isp++] = string.length(); } continue; } if (opcode == 4118) { isp -= 2; ssp--; - string = Static3.stringStack[ssp]; - local803 = Static254.intStack[isp]; - local1052 = Static254.intStack[isp + 1]; - Static3.stringStack[ssp++] = string.substring(local1052, local803); + string = stringStack[ssp]; + int3 = intStack[isp]; + int2 = intStack[isp + 1]; + stringStack[ssp++] = string.substring(int2, int3); continue; } if (opcode == 4119) { ssp--; - string = Static3.stringStack[ssp]; + string = stringStack[ssp]; local2522 = Static87.allocate(string.length()); @Pc(12220) boolean local12220 = false; for (local652 = 0; local652 < string.length(); local652++) { @@ -3974,45 +3983,45 @@ public final class Static88 { } } local2522.method3156(); - Static3.stringStack[ssp++] = local2522; + stringStack[ssp++] = local2522; continue; } if (opcode == 4120) { isp -= 2; ssp--; - string = Static3.stringStack[ssp]; - local803 = Static254.intStack[isp]; - local1052 = Static254.intStack[isp + 1]; - Static254.intStack[isp++] = string.indexOf(local803, local1052); + string = stringStack[ssp]; + int3 = intStack[isp]; + int2 = intStack[isp + 1]; + intStack[isp++] = string.indexOf(int3, int2); continue; } if (opcode == 4121) { ssp -= 2; - string = Static3.stringStack[ssp]; - local2522 = Static3.stringStack[ssp + 1]; + string = stringStack[ssp]; + local2522 = stringStack[ssp + 1]; isp--; - local1052 = Static254.intStack[isp]; - Static254.intStack[isp++] = string.indexOf(local2522, local1052); + int2 = intStack[isp]; + intStack[isp++] = string.indexOf(local2522, int2); continue; } if (opcode == 4122) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static231.toLowerCase(type); + int1 = intStack[isp]; + intStack[isp++] = Static231.toLowerCase(int1); continue; } if (opcode == 4123) { isp--; - type = Static254.intStack[isp]; - Static254.intStack[isp++] = Static143.toUpperCase(type); + int1 = intStack[isp]; + intStack[isp++] = Static143.toUpperCase(int1); continue; } if (opcode == 4124) { isp--; - local12388 = Static254.intStack[isp] != 0; + local12388 = intStack[isp] != 0; isp--; - local803 = Static254.intStack[isp]; - Static3.stringStack[ssp++] = Static182.valueToBase10String(client.language, local12388, 0, (long) local803); + int3 = intStack[isp]; + stringStack[ssp++] = Static182.valueToBase10String(client.language, local12388, 0, (long) int3); continue; } } @@ -4022,27 +4031,27 @@ public final class Static88 { component = local1020 ? Static274.staticActiveComponent1 : Static227.staticActiveComponent2; } else { isp--; - component = InterfaceList.getComponent(Static254.intStack[isp]); + component = InterfaceList.getComponent(intStack[isp]); opcode -= 1000; } if (opcode == 1000) { isp -= 4; - component.baseX = Static254.intStack[isp]; - component.baseY = Static254.intStack[isp + 1]; - local1052 = Static254.intStack[isp + 3]; - if (local1052 < 0) { - local1052 = 0; - } else if (local1052 > 5) { - local1052 = 5; + component.baseX = intStack[isp]; + component.baseY = intStack[isp + 1]; + int2 = intStack[isp + 3]; + if (int2 < 0) { + int2 = 0; + } else if (int2 > 5) { + int2 = 5; } - local803 = Static254.intStack[isp + 2]; - if (local803 < 0) { - local803 = 0; - } else if (local803 > 5) { - local803 = 5; + int3 = intStack[isp + 2]; + if (int3 < 0) { + int3 = 0; + } else if (int3 > 5) { + int3 = 5; } - component.xMode = (byte) local1052; - component.yMode = (byte) local803; + component.xMode = (byte) int2; + component.yMode = (byte) int3; Static43.redraw(component); Static74.update(component); if (component.createdComponentId == -1) { @@ -4052,24 +4061,24 @@ public final class Static88 { } if (opcode == 1001) { isp -= 4; - component.baseWidth = Static254.intStack[isp]; - component.baseHeight = Static254.intStack[isp + 1]; + component.baseWidth = intStack[isp]; + component.baseHeight = intStack[isp + 1]; component.anInt451 = 0; component.anInt526 = 0; - local803 = Static254.intStack[isp + 2]; - local1052 = Static254.intStack[isp + 3]; - if (local1052 < 0) { - local1052 = 0; - } else if (local1052 > 4) { - local1052 = 4; + int3 = intStack[isp + 2]; + int2 = intStack[isp + 3]; + if (int2 < 0) { + int2 = 0; + } else if (int2 > 4) { + int2 = 4; } - component.dynamicHeightValue = (byte) local1052; - if (local803 < 0) { - local803 = 0; - } else if (local803 > 4) { - local803 = 4; + component.dynamicHeightValue = (byte) int2; + if (int3 < 0) { + int3 = 0; + } else if (int3 > 4) { + int3 = 4; } - component.dynamicWidthValue = (byte) local803; + component.dynamicWidthValue = (byte) int3; Static43.redraw(component); Static74.update(component); if (component.type == 0) { @@ -4079,7 +4088,7 @@ public final class Static88 { } if (opcode == 1003) { isp--; - local1552 = Static254.intStack[isp] == 1; + local1552 = intStack[isp] == 1; if (local1552 != component.hidden) { component.hidden = local1552; Static43.redraw(component); @@ -4091,8 +4100,8 @@ public final class Static88 { } if (opcode == 1004) { isp -= 2; - component.aspectWidth = Static254.intStack[isp]; - component.aspectHeight = Static254.intStack[isp + 1]; + component.aspectWidth = intStack[isp]; + component.aspectHeight = intStack[isp + 1]; Static43.redraw(component); Static74.update(component); if (component.type == 0) { @@ -4102,7 +4111,7 @@ public final class Static88 { } if (opcode == 1005) { isp--; - component.noClickThrough = Static254.intStack[isp] == 1; + component.noClickThrough = intStack[isp] == 1; continue; } } @@ -4113,7 +4122,7 @@ public final class Static88 { } catch (@Pc(14378) Exception ex) { if (script.name == null) { if (client.modeWhere != 0) { - Chat.add(Static72.EMPTY_STRING, 0, Static136.CS_ERROR); + Chat.add(EMPTY_STRING, 0, Static136.CS_ERROR); } TracingException.report("CS2 - scr:" + script.key + " op:" + op, ex); } else { @@ -4127,16 +4136,11 @@ public final class Static88 { str.method3113(Static176.aClass100_802).method3113(Static123.parseInt(cycles)); } if (client.modeWhere != 0) { - Chat.add(Static72.EMPTY_STRING, 0, JagString.concatenate(new JagString[] { Static167.aClass100_780, script.name})); + Chat.add(EMPTY_STRING, 0, JagString.concatenate(new JagString[] { Static167.aClass100_780, script.name})); } TracingException.report("CS2 - scr:" + script.key + " op:" + op + new String(str.method3148()), ex); } } } - @OriginalMember(owner = "client!h", name = "a", descriptor = "(I)Lclient!ba;") - public static World getNextWorld() { - return WorldList.sorted.length > Static51.worldPos ? WorldList.sorted[Static51.worldPos++] : null; - } - } diff --git a/client/src/main/java/SeqType.java b/client/src/main/java/SeqType.java index da149aa..2d0246f 100644 --- a/client/src/main/java/SeqType.java +++ b/client/src/main/java/SeqType.java @@ -82,7 +82,7 @@ public final class SeqType { } @Pc(39) int local39 = arg3 & 0x3; @Pc(41) AnimFrameset local41 = null; - if ((this.tween || Static204.applyTweening) && arg1 != -1 && this.frames.length > arg1) { + if ((this.tween || client.applyTweening) && arg1 != -1 && this.frames.length > arg1) { @Pc(69) int local69 = this.frames[arg1]; local41 = Static72.getAnimFrameset(local69 >> 16); arg1 = local69 & 0xFFFF; @@ -137,7 +137,7 @@ public final class SeqType { return arg0.method4572(true, true, true); } @Pc(34) AnimFrameset local34 = null; - if ((this.tween || Static204.applyTweening) && arg1 != -1 && arg1 < this.frames.length) { + if ((this.tween || client.applyTweening) && arg1 != -1 && arg1 < this.frames.length) { @Pc(59) int local59 = this.frames[arg1]; local34 = Static72.getAnimFrameset(local59 >> 16); arg1 = local59 & 0xFFFF; @@ -154,7 +154,7 @@ public final class SeqType { local83 &= 0xFFFF; } } - if ((this.tween || Static204.applyTweening) && arg1 != -1 && this.anIntArray475.length > arg1) { + if ((this.tween || client.applyTweening) && arg1 != -1 && this.anIntArray475.length > arg1) { local85 = this.anIntArray475[arg1]; if (local85 != 65535) { local81 = Static72.getAnimFrameset(local85 >> 16); @@ -195,7 +195,7 @@ public final class SeqType { } @Pc(40) int local40 = arg3 & 0x3; @Pc(42) AnimFrameset local42 = null; - if ((this.tween || Static204.applyTweening) && arg0 != -1 && arg0 < this.frames.length) { + if ((this.tween || client.applyTweening) && arg0 != -1 && arg0 < this.frames.length) { @Pc(66) int local66 = this.frames[arg0]; local42 = Static72.getAnimFrameset(local66 >> 16); arg0 = local66 & 0xFFFF; @@ -269,7 +269,7 @@ public final class SeqType { return arg3.method4560(true, true, true); } @Pc(42) AnimFrameset local42 = null; - if ((this.tween || Static204.applyTweening) && arg0 != -1 && this.frames.length > arg0) { + if ((this.tween || client.applyTweening) && arg0 != -1 && this.frames.length > arg0) { @Pc(65) int local65 = this.frames[arg0]; local42 = Static72.getAnimFrameset(local65 >> 16); arg0 = local65 & 0xFFFF; diff --git a/client/src/main/java/ServerActiveProperties.java b/client/src/main/java/ServerActiveProperties.java index 18229e2..eb6fafa 100644 --- a/client/src/main/java/ServerActiveProperties.java +++ b/client/src/main/java/ServerActiveProperties.java @@ -23,7 +23,7 @@ public final class ServerActiveProperties extends Node { } @OriginalMember(owner = "client!bf", name = "d", descriptor = "(I)Z") - public final boolean method504() { + public final boolean isObjReplaceEnabled() { return (this.anInt546 >> 29 & 0x1) != 0; } @@ -63,7 +63,7 @@ public final class ServerActiveProperties extends Node { } @OriginalMember(owner = "client!bf", name = "i", descriptor = "(I)I") - public final int method512() { + public final int getTargetMask() { return Static199.method3594(this.anInt546); } } diff --git a/client/src/main/java/SoftwareAlphaSprite.java b/client/src/main/java/SoftwareAlphaSprite.java index e5045fa..ac16f6d 100644 --- a/client/src/main/java/SoftwareAlphaSprite.java +++ b/client/src/main/java/SoftwareAlphaSprite.java @@ -27,7 +27,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { @Pc(72) int local72 = local45; @Pc(74) int local74 = local57; for (@Pc(77) int local77 = -20; local77 < 0; local77++) { - @Pc(93) int local93 = this.anIntArray20[(local72 >> 16) + (local74 >> 16) * this.anInt1867]; + @Pc(93) int local93 = this.pixels[(local72 >> 16) + (local74 >> 16) * this.anInt1867]; @Pc(97) int local97 = SoftwareRaster.pixels[local70]; @Pc(101) int local101 = local93 >>> 24; @Pc(105) int local105 = 256 - local101; @@ -81,7 +81,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static283.method319(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29); + Static283.method319(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29); } } @@ -123,7 +123,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static283.method319(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29); + Static283.method319(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29); } } @@ -259,7 +259,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local853; } while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -304,7 +304,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local1049; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -349,7 +349,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local1253; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -382,7 +382,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local1412; } while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -426,7 +426,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local1610; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -470,7 +470,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local1816; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local802 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -492,7 +492,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local166; if (local368 >= 0 && local378 >= 0 && local368 - (this.anInt1867 << 12) < 0 && local378 - (this.anInt1859 << 12) < 0) { while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local368 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -522,7 +522,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local553; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local368 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -553,7 +553,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local394 = local702; } while (local394 < 0) { - local432 = this.anIntArray20[(local504 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local504 >> 12) * this.anInt1867 + (local368 >> 12)]; local436 = SoftwareRaster.pixels[local388]; local440 = local432 >>> 24; local444 = 256 - local440; @@ -588,7 +588,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { @Pc(88) int local88 = local51 + local39 * local78; @Pc(94) int local94 = local63 - local33 * local78; for (@Pc(99) int local99 = -arg9[local71]; local99 < 0; local99++) { - @Pc(115) int local115 = this.anIntArray20[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; + @Pc(115) int local115 = this.pixels[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; @Pc(119) int local119 = SoftwareRaster.pixels[local82]; @Pc(123) int local123 = local115 >>> 24; @Pc(127) int local127 = 256 - local123; @@ -623,7 +623,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { @Pc(88) int local88 = local51 + local39 * local78; @Pc(94) int local94 = local63 - local33 * local78; for (@Pc(99) int local99 = -arg8[local71]; local99 < 0; local99++) { - @Pc(115) int local115 = this.anIntArray20[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; + @Pc(115) int local115 = this.pixels[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; @Pc(119) int local119 = SoftwareRaster.pixels[local82]; @Pc(123) int local123 = local115 >>> 24; @Pc(127) int local127 = 256 - local123; @@ -694,7 +694,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local12 += local26 * local150; local130 += local150; } - Static283.method317(SoftwareRaster.pixels, this.anIntArray20, local12, local14, local46, local130, arg2, arg3, local26, local32, local7, arg4); + Static283.method317(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7, arg4); } @OriginalMember(owner = "client!am", name = "a", descriptor = "(IIII)V") @@ -752,7 +752,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local12 += local26 * local150; local130 += local150; } - Static283.method321(SoftwareRaster.pixels, this.anIntArray20, local12, local14, local46, local130, arg2, arg3, local26, local32, local7); + Static283.method321(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7); } @OriginalMember(owner = "client!am", name = "d", descriptor = "(II)V") @@ -793,7 +793,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local36 += local47; } if (local32 > 0 && local29 > 0) { - Static283.method318(SoftwareRaster.pixels, this.anIntArray20, local26, local21, local32, local29, local36, local40); + Static283.method318(SoftwareRaster.pixels, this.pixels, local26, local21, local32, local29, local36, local40); } } @@ -835,7 +835,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static283.method320(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29, arg2); + Static283.method320(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, arg2); } } } diff --git a/client/src/main/java/SoftwareSprite.java b/client/src/main/java/SoftwareSprite.java index 73c4c37..d77245a 100644 --- a/client/src/main/java/SoftwareSprite.java +++ b/client/src/main/java/SoftwareSprite.java @@ -7,7 +7,7 @@ import org.openrs2.deob.annotation.Pc; public class SoftwareSprite extends Sprite { @OriginalMember(owner = "client!mm", name = "L", descriptor = "[I") - public int[] anIntArray20; + public int[] pixels; @OriginalMember(owner = "client!mm", name = "", descriptor = "(IIIIII[I)V") public SoftwareSprite(@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) { @@ -17,12 +17,12 @@ public class SoftwareSprite extends Sprite { this.anInt1861 = arg3; this.anInt1867 = arg4; this.anInt1859 = arg5; - this.anIntArray20 = arg6; + this.pixels = arg6; } @OriginalMember(owner = "client!mm", name = "", descriptor = "(II)V") public SoftwareSprite(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - this.anIntArray20 = new int[arg0 * arg1]; + this.pixels = new int[arg0 * arg1]; this.anInt1867 = this.anInt1860 = arg0; this.anInt1859 = this.anInt1866 = arg1; this.anInt1863 = this.anInt1861 = 0; @@ -54,10 +54,10 @@ public class SoftwareSprite extends Sprite { @Pc(89) int[] local89 = new int[local77 * local84]; for (@Pc(91) int local91 = 0; local91 < this.anInt1859; local91++) { for (@Pc(97) int local97 = 0; local97 < this.anInt1867; local97++) { - local89[(local91 + local42) * local77 + local97 + local12] = this.anIntArray20[local91 * this.anInt1867 + local97]; + local89[(local91 + local42) * local77 + local97 + local12] = this.pixels[local91 * this.anInt1867 + local97]; } } - this.anIntArray20 = local89; + this.pixels = local89; this.anInt1867 = local77; this.anInt1859 = local84; this.anInt1863 -= local12; @@ -70,10 +70,10 @@ public class SoftwareSprite extends Sprite { @Pc(8) int local8 = 0; for (@Pc(10) int local10 = 0; local10 < this.anInt1859; local10++) { for (@Pc(19) int local19 = this.anInt1867 - 1; local19 >= 0; local19--) { - local6[local8++] = this.anIntArray20[local19 + local10 * this.anInt1867]; + local6[local8++] = this.pixels[local19 + local10 * this.anInt1867]; } } - this.anIntArray20 = local6; + this.pixels = local6; this.anInt1863 = this.anInt1860 - this.anInt1867 - this.anInt1863; } @@ -115,7 +115,7 @@ public class SoftwareSprite extends Sprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static290.method305(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29); + Static290.method305(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29); } } @@ -126,7 +126,7 @@ public class SoftwareSprite extends Sprite { @Pc(17) int local17 = local8 * this.anInt1867; @Pc(28) int local28 = this.anInt1863 + (local8 + this.anInt1861) * this.anInt1860; for (@Pc(30) int local30 = 0; local30 < this.anInt1867; local30++) { - @Pc(40) int local40 = this.anIntArray20[local17++]; + @Pc(40) int local40 = this.pixels[local17++]; local6[local28++] = local40 == 0 ? 0 : local40 | 0xFF000000; } } @@ -262,7 +262,7 @@ public class SoftwareSprite extends Sprite { local394 = local745; } while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -308,7 +308,7 @@ public class SoftwareSprite extends Sprite { local394 = local905; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -354,7 +354,7 @@ public class SoftwareSprite extends Sprite { local394 = local1073; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -388,7 +388,7 @@ public class SoftwareSprite extends Sprite { local394 = local1196; } while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -433,7 +433,7 @@ public class SoftwareSprite extends Sprite { local394 = local1358; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -478,7 +478,7 @@ public class SoftwareSprite extends Sprite { local394 = local1528; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local694 >> 12)]; if (local432 == 0) { local388++; } else { @@ -501,7 +501,7 @@ public class SoftwareSprite extends Sprite { local394 = local166; if (local368 >= 0 && local378 >= 0 && local368 - (this.anInt1867 << 12) < 0 && local378 - (this.anInt1859 << 12) < 0) { while (local394 < 0) { - local432 = this.anIntArray20[(local378 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local378 >> 12) * this.anInt1867 + (local368 >> 12)]; if (local432 == 0) { local388++; } else { @@ -532,7 +532,7 @@ public class SoftwareSprite extends Sprite { local394 = local517; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local368 >> 12)]; if (local432 == 0) { local388++; } else { @@ -564,7 +564,7 @@ public class SoftwareSprite extends Sprite { local394 = local630; } while (local394 < 0) { - local432 = this.anIntArray20[(local468 >> 12) * this.anInt1867 + (local368 >> 12)]; + local432 = this.pixels[(local468 >> 12) * this.anInt1867 + (local368 >> 12)]; if (local432 == 0) { local388++; } else { @@ -587,27 +587,27 @@ public class SoftwareSprite extends Sprite { @Pc(8) int local8 = 0; for (@Pc(10) int local10 = 0; local10 < this.anInt1859; local10++) { for (@Pc(16) int local16 = 0; local16 < this.anInt1867; local16++) { - @Pc(25) int local25 = this.anIntArray20[local8]; + @Pc(25) int local25 = this.pixels[local8]; if (local25 == 0) { - if (local16 > 0 && this.anIntArray20[local8 - 1] != 0) { + if (local16 > 0 && this.pixels[local8 - 1] != 0) { local25 = arg0; - } else if (local10 > 0 && this.anIntArray20[local8 - this.anInt1867] != 0) { + } else if (local10 > 0 && this.pixels[local8 - this.anInt1867] != 0) { local25 = arg0; - } else if (local16 < this.anInt1867 - 1 && this.anIntArray20[local8 + 1] != 0) { + } else if (local16 < this.anInt1867 - 1 && this.pixels[local8 + 1] != 0) { local25 = arg0; - } else if (local10 < this.anInt1859 - 1 && this.anIntArray20[local8 + this.anInt1867] != 0) { + } else if (local10 < this.anInt1859 - 1 && this.pixels[local8 + this.anInt1867] != 0) { local25 = arg0; } } local6[local8++] = local25; } } - this.anIntArray20 = local6; + this.pixels = local6; } @OriginalMember(owner = "client!mm", name = "c", descriptor = "()V") - public final void method304() { - SoftwareRaster.method2491(this.anIntArray20, this.anInt1867, this.anInt1859); + public final void makeTarget() { + SoftwareRaster.method2491(this.pixels, this.anInt1867, this.anInt1859); } @OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIIIIIDI)V") @@ -625,7 +625,7 @@ public class SoftwareSprite extends Sprite { @Pc(72) int local72 = local45; @Pc(74) int local74 = local57; for (@Pc(77) int local77 = -20; local77 < 0; local77++) { - @Pc(93) int local93 = this.anIntArray20[(local72 >> 16) + (local74 >> 16) * this.anInt1867]; + @Pc(93) int local93 = this.pixels[(local72 >> 16) + (local74 >> 16) * this.anInt1867]; if (local93 == 0) { local70++; } else { @@ -680,7 +680,7 @@ public class SoftwareSprite extends Sprite { local36 += local47; } if (local32 > 0 && local29 > 0) { - Static290.method302(SoftwareRaster.pixels, this.anIntArray20, local26, local21, local32, local29, local36, local40); + Static290.method302(SoftwareRaster.pixels, this.pixels, local26, local21, local32, local29, local36, local40); } } @@ -722,7 +722,7 @@ public class SoftwareSprite extends Sprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static290.method308(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29, arg2); + Static290.method308(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, arg2); } } @@ -764,7 +764,7 @@ public class SoftwareSprite extends Sprite { local27 += local36; } if (local23 > 0 && local20 > 0) { - Static290.method300(SoftwareRaster.pixels, this.anIntArray20, local17, local15, local23, local20, local27, local29); + Static290.method300(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29); } } @@ -774,10 +774,10 @@ public class SoftwareSprite extends Sprite { @Pc(8) int local8 = 0; for (@Pc(13) int local13 = this.anInt1859 - 1; local13 >= 0; local13--) { for (@Pc(17) int local17 = 0; local17 < this.anInt1867; local17++) { - local6[local8++] = this.anIntArray20[local17 + local13 * this.anInt1867]; + local6[local8++] = this.pixels[local17 + local13 * this.anInt1867]; } } - this.anIntArray20 = local6; + this.pixels = local6; this.anInt1861 = this.anInt1866 - this.anInt1859 - this.anInt1861; } @@ -799,7 +799,7 @@ public class SoftwareSprite extends Sprite { @Pc(88) int local88 = local51 + local39 * local78; @Pc(94) int local94 = local63 - local33 * local78; for (@Pc(99) int local99 = -arg9[local71]; local99 < 0; local99++) { - SoftwareRaster.pixels[local82++] = this.anIntArray20[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; + SoftwareRaster.pixels[local82++] = this.pixels[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; local88 += local39; local94 -= local33; } @@ -819,10 +819,10 @@ public class SoftwareSprite extends Sprite { @Pc(17) int[] local17 = new int[this.anInt1860 * this.anInt1866]; for (@Pc(19) int local19 = 0; local19 < this.anInt1859; local19++) { for (@Pc(25) int local25 = 0; local25 < this.anInt1867; local25++) { - local17[(local19 + this.anInt1861) * this.anInt1860 + local25 + this.anInt1863] = this.anIntArray20[local19 * this.anInt1867 + local25]; + local17[(local19 + this.anInt1861) * this.anInt1860 + local25 + this.anInt1863] = this.pixels[local19 * this.anInt1867 + local25]; } } - this.anIntArray20 = local17; + this.pixels = local17; this.anInt1867 = this.anInt1860; this.anInt1859 = this.anInt1866; this.anInt1863 = 0; @@ -904,7 +904,7 @@ public class SoftwareSprite extends Sprite { local166 = local159 - local157; } for (@Pc(234) int local234 = -local157; local234 < 0; local234++) { - @Pc(242) int local242 = this.anIntArray20[local21++]; + @Pc(242) int local242 = this.pixels[local21++]; if (local242 == 0) { local39++; } else { @@ -934,7 +934,7 @@ public class SoftwareSprite extends Sprite { @Pc(88) int local88 = local51 + local39 * local78; @Pc(94) int local94 = local63 - local33 * local78; for (@Pc(99) int local99 = -arg8[local71]; local99 < 0; local99++) { - @Pc(115) int local115 = this.anIntArray20[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; + @Pc(115) int local115 = this.pixels[(local88 >> 16) + (local94 >> 16) * this.anInt1867]; if (local115 == 0) { local82++; } else { @@ -956,8 +956,8 @@ public class SoftwareSprite extends Sprite { for (@Pc(4) int local4 = this.anInt1859 - 1; local4 > 0; local4--) { @Pc(11) int local11 = local4 * this.anInt1867; for (@Pc(16) int local16 = this.anInt1867 - 1; local16 > 0; local16--) { - if (this.anIntArray20[local16 + local11] == 0 && this.anIntArray20[local16 + local11 - this.anInt1867 - 1] != 0) { - this.anIntArray20[local16 + local11] = arg0; + if (this.pixels[local16 + local11] == 0 && this.pixels[local16 + local11 - this.anInt1867 - 1] != 0) { + this.pixels[local16 + local11] = arg0; } } } @@ -1018,13 +1018,13 @@ public class SoftwareSprite extends Sprite { local12 += local26 * local150; local130 += local150; } - Static290.method307(SoftwareRaster.pixels, this.anIntArray20, local12, local14, local46, local130, arg2, arg3, local26, local32, local7, arg4); + Static290.method307(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7, arg4); } @OriginalMember(owner = "client!mm", name = "b", descriptor = "(III)V") public final void method315(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - for (@Pc(1) int local1 = 0; local1 < this.anIntArray20.length; local1++) { - @Pc(11) int local11 = this.anIntArray20[local1]; + for (@Pc(1) int local1 = 0; local1 < this.pixels.length; local1++) { + @Pc(11) int local11 = this.pixels[local1]; if (local11 != 0) { @Pc(19) int local19 = local11 >> 16 & 0xFF; local19 += arg0; @@ -1047,7 +1047,7 @@ public class SoftwareSprite extends Sprite { } else if (local59 > 255) { local59 = 255; } - this.anIntArray20[local1] = (local19 << 16) + (local40 << 8) + local59; + this.pixels[local1] = (local19 << 16) + (local40 << 8) + local59; } } } @@ -1107,6 +1107,6 @@ public class SoftwareSprite extends Sprite { local12 += local26 * local150; local130 += local150; } - Static290.method316(SoftwareRaster.pixels, this.anIntArray20, local12, local14, local46, local130, arg2, arg3, local26, local32, local7); + Static290.method316(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7); } } diff --git a/client/src/main/java/SoundPlayer.java b/client/src/main/java/SoundPlayer.java index 5e2f043..8b3ec3a 100644 --- a/client/src/main/java/SoundPlayer.java +++ b/client/src/main/java/SoundPlayer.java @@ -60,4 +60,76 @@ public class SoundPlayer { anIntArray68[anInt4451] = 0; anInt4451++; } + + @OriginalMember(owner = "client!ed", name = "d", descriptor = "(B)V") + public static void loop() { + for (@Pc(5) int local5 = 0; local5 < anInt4451; local5++) { + @Pc(12) int local12 = anIntArray362[local5]--; + if (anIntArray362[local5] >= -10) { + @Pc(79) SynthSound local79 = aClass138Array1[local5]; + if (local79 == null) { + local79 = SynthSound.create(client.js5Archive4, anIntArray421[local5], 0); + if (local79 == null) { + continue; + } + anIntArray362[local5] += local79.method3990(); + aClass138Array1[local5] = local79; + } + if (anIntArray362[local5] < 0) { + @Pc(209) int local209; + if (anIntArray68[local5] == 0) { + local209 = Preferences.soundEffectVolume; + } else { + @Pc(125) int local125 = (anIntArray68[local5] & 0xFF) * 128; + @Pc(133) int local133 = anIntArray68[local5] >> 8 & 0xFF; + @Pc(141) int local141 = anIntArray68[local5] >> 16 & 0xFF; + @Pc(151) int local151 = local133 * 128 + 64 - PlayerList.self.zFine; + if (local151 < 0) { + local151 = -local151; + } + @Pc(167) int local167 = local141 * 128 + 64 - PlayerList.self.xFine; + if (local167 < 0) { + local167 = -local167; + } + @Pc(180) int local180 = local167 + local151 - 128; + if (local125 < local180) { + anIntArray362[local5] = -100; + continue; + } + if (local180 < 0) { + local180 = 0; + } + local209 = Preferences.ambientSoundsVolume * (local125 - local180) / local125; + } + if (local209 > 0) { + @Pc(223) PcmSound local223 = local79.method3989().method2648(client.resampler); + @Pc(228) SoundPcmStream local228 = Static284.method404(local223, local209); + local228.method396(anIntArray563[local5] - 1); + client.soundStream.method1343(local228); + } + anIntArray362[local5] = -100; + } + } else { + anInt4451--; + for (@Pc(28) int local28 = local5; local28 < anInt4451; local28++) { + anIntArray421[local28] = anIntArray421[local28 + 1]; + aClass138Array1[local28] = aClass138Array1[local28 + 1]; + anIntArray563[local28] = anIntArray563[local28 + 1]; + anIntArray362[local28] = anIntArray362[local28 + 1]; + anIntArray68[local28] = anIntArray68[local28 + 1]; + } + local5--; + } + } + if (MidiPlayer.jingle && !Static136.method2655()) { + if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1) { + Static122.method2410(client.js5Archive6, MusicPlayer.groupId, Preferences.musicVolume); + } + MidiPlayer.jingle = false; + } else if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1 && !Static136.method2655()) { + Protocol.outboundBuffer.p1isaac(137); + Protocol.outboundBuffer.p4(MusicPlayer.groupId); + MusicPlayer.groupId = -1; + } + } } diff --git a/client/src/main/java/Static1.java b/client/src/main/java/Static1.java index b6a1ec6..ee8a159 100644 --- a/client/src/main/java/Static1.java +++ b/client/src/main/java/Static1.java @@ -517,7 +517,7 @@ public final class Static1 { local1161.method1943(); } } - local12 = local10.method3864(); + local12 = local10.size(); @Pc(2823) GlTile[] local2823 = new GlTile[local12]; @Pc(2826) long[] local2826 = new long[local12]; local10.method3865(local2823); @@ -542,7 +542,7 @@ public final class Static1 { } if (WorldMap.aClass3_Sub2_Sub1_2 == null || arg2 != WorldMap.aClass3_Sub2_Sub1_2.anInt1867 || WorldMap.aClass3_Sub2_Sub1_2.anInt1859 != arg1) { @Pc(63) SoftwareSprite local63 = new SoftwareSprite(arg2, arg1); - SoftwareRaster.method2491(local63.anIntArray20, arg2, arg1); + SoftwareRaster.method2491(local63.pixels, arg2, arg1); Static214.method4364(arg2, 0, WorldMap.width, 0, 0, WorldMap.length, arg1, 0); if (GlRenderer.enabled) { WorldMap.aClass3_Sub2_Sub1_2 = new GlSprite(local63); diff --git a/client/src/main/java/Static10.java b/client/src/main/java/Static10.java index 6595488..1f26316 100644 --- a/client/src/main/java/Static10.java +++ b/client/src/main/java/Static10.java @@ -48,12 +48,12 @@ public final class Static10 { @OriginalMember(owner = "client!an", name = "a", descriptor = "(IIIIIII)V") public static void method352(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - @Pc(11) int local11 = Static78.method1690(Static106.anInt2869, arg5, Static267.anInt5773); - @Pc(17) int local17 = Static78.method1690(Static106.anInt2869, arg0, Static267.anInt5773); - @Pc(23) int local23 = Static78.method1690(Static224.anInt5063, arg3, Static172.anInt4164); - @Pc(29) int local29 = Static78.method1690(Static224.anInt5063, arg2, Static172.anInt4164); - @Pc(42) int local42 = Static78.method1690(Static106.anInt2869, arg5 + arg1, Static267.anInt5773); - @Pc(51) int local51 = Static78.method1690(Static106.anInt2869, arg0 - arg1, Static267.anInt5773); + @Pc(11) int local11 = Static78.method1690(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); + @Pc(17) int local17 = Static78.method1690(TextureOp29.anInt2869, arg0, TextureOp29.anInt5773); + @Pc(23) int local23 = Static78.method1690(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); + @Pc(29) int local29 = Static78.method1690(TextureOp29.anInt5063, arg2, TextureOp29.anInt4164); + @Pc(42) int local42 = Static78.method1690(TextureOp29.anInt2869, arg5 + arg1, TextureOp29.anInt5773); + @Pc(51) int local51 = Static78.method1690(TextureOp29.anInt2869, arg0 - arg1, TextureOp29.anInt5773); @Pc(53) int local53; for (local53 = local11; local53 < local42; local53++) { Static131.method2576(Static71.anIntArrayArray10[local53], local23, local29, arg4); @@ -61,8 +61,8 @@ public final class Static10 { for (local53 = local17; local53 > local51; local53--) { Static131.method2576(Static71.anIntArrayArray10[local53], local23, local29, arg4); } - @Pc(95) int local95 = Static78.method1690(Static224.anInt5063, arg1 + arg3, Static172.anInt4164); - @Pc(104) int local104 = Static78.method1690(Static224.anInt5063, arg2 - arg1, Static172.anInt4164); + @Pc(95) int local95 = Static78.method1690(TextureOp29.anInt5063, arg1 + arg3, TextureOp29.anInt4164); + @Pc(104) int local104 = Static78.method1690(TextureOp29.anInt5063, arg2 - arg1, TextureOp29.anInt4164); for (local53 = local42; local53 <= local51; local53++) { @Pc(117) int[] local117 = Static71.anIntArrayArray10[local53]; Static131.method2576(local117, local23, local95, arg4); diff --git a/client/src/main/java/Static103.java b/client/src/main/java/Static103.java index 47f3574..e8a3373 100644 --- a/client/src/main/java/Static103.java +++ b/client/src/main/java/Static103.java @@ -10,9 +10,6 @@ public final class Static103 { @OriginalMember(owner = "client!i", name = "ec", descriptor = "[I") public static int[] anIntArray254; - @OriginalMember(owner = "client!i", name = "ac", descriptor = "[I") - public static final int[] anIntArray253 = new int[256]; - @OriginalMember(owner = "client!i", name = "ic", descriptor = "Lclient!na;") public static final JagString aClass100_558 = JagString.parse("m"); @@ -34,10 +31,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static70.type = 2; - Static17.milliseconds = 0; - Static122.x = Mouse.clickX; - Static25.y = Mouse.clickY; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(71); Protocol.outboundBuffer.p2leadd(local36); } @@ -63,25 +60,25 @@ public final class Static103 { } @Pc(192) Npc local192; if (local23 == 19) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static122.x = Mouse.clickX; - Static70.type = 2; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; + 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 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; - Static70.type = 2; - Static25.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(78); Protocol.outboundBuffer.p2le(local36); } @@ -90,10 +87,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static122.x = Mouse.clickX; - Static70.type = 2; - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(133); Protocol.outboundBuffer.p2le(local36); } @@ -118,13 +115,13 @@ public final class Static103 { Static153.method2909(); } if (local23 == 45) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static122.x = Mouse.clickX; - Static70.type = 2; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(239); Protocol.outboundBuffer.p4le2(Static98.anInt2512); Protocol.outboundBuffer.p2add(Static15.anInt506); @@ -141,10 +138,10 @@ public final class Static103 { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } } - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; - Static70.type = 2; - Static25.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(66); Protocol.outboundBuffer.p2le(Static225.originX + local15); Protocol.outboundBuffer.p2(local36); @@ -158,10 +155,10 @@ public final class Static103 { Protocol.outboundBuffer.p2leadd(local19 + Static142.originZ); } if (local23 == 1002) { - Static70.type = 2; - Static122.x = Mouse.clickX; - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(92); Protocol.outboundBuffer.p2leadd(local36); } @@ -200,11 +197,11 @@ public final class Static103 { } } if (local23 == 1007) { - Static17.milliseconds = 0; - Static70.type = 2; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - local192 = Static175.npcs[local36]; + 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) { @@ -240,10 +237,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static70.type = 2; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(4); Protocol.outboundBuffer.p2le(local36); } @@ -282,10 +279,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static17.milliseconds = 0; - Static70.type = 2; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(114); Protocol.outboundBuffer.p2leadd(local36); } @@ -311,23 +308,23 @@ public final class Static103 { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } } - Static70.type = 2; - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(228); Protocol.outboundBuffer.p2(local36); Protocol.outboundBuffer.p2le(Static225.originX + local15); Protocol.outboundBuffer.p2leadd(Static142.originZ + local19); } if (local23 == 4) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static70.type = 2; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(148); Protocol.outboundBuffer.p2add(local36); } @@ -336,15 +333,15 @@ public final class Static103 { local693 = Static201.method1418(local19, local15); if (local693 != null) { Static53.method1294(); - @Pc(1493) ServerActiveProperties local1493 = Static36.method940(local693); - Static247.method4246(local19, local15, local1493.method512(), local1493.anInt540, local693.anInt499, local693.anInt484); + @Pc(1493) ServerActiveProperties local1493 = InterfaceList.getServerActiveProperties(local693); + Static247.method4246(local19, local15, local1493.getTargetMask(), local1493.anInt540, local693.anInt499, local693.anInt484); Static260.anInt5014 = 0; Static102.aClass100_545 = Static97.method1963(local693); if (Static102.aClass100_545 == null) { Static102.aClass100_545 = Static250.aClass100_1042; } if (local693.aBoolean32) { - Static78.aClass100_466 = JagString.concatenate(new JagString[] { local693.aClass100_88, Static204.aClass100_896 }); + Static78.aClass100_466 = JagString.concatenate(new JagString[] { local693.opBase, Static204.aClass100_896 }); } else { Static78.aClass100_466 = JagString.concatenate(new JagString[] { MiniMenu.COLOR_GREEN, local693.aClass100_85, Static204.aClass100_896 }); } @@ -355,10 +352,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; - Static70.type = 2; - Static122.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(180); Protocol.outboundBuffer.p2leadd(local36); } @@ -376,10 +373,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static17.milliseconds = 0; - Static70.type = 2; - Static122.x = Mouse.clickX; - Static25.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(195); Protocol.outboundBuffer.p2add(Static15.anInt506); Protocol.outboundBuffer.p4le2(Static98.anInt2512); @@ -395,10 +392,10 @@ public final class Static103 { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } } - Static122.x = Mouse.clickX; - Static70.type = 2; - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(109); Protocol.outboundBuffer.p2le(local19 + Static142.originZ); Protocol.outboundBuffer.p2(local15 + Static225.originX); @@ -414,13 +411,13 @@ public final class Static103 { Static250.anInt5444 = local15; } if (local23 == 2) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static25.y = Mouse.clickY; - Static70.type = 2; - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(218); Protocol.outboundBuffer.p2le(local36); } @@ -439,13 +436,13 @@ public final class Static103 { } } if (local23 == 26) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static70.type = 2; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(115); Protocol.outboundBuffer.p4me(Static224.anInt5062); Protocol.outboundBuffer.p2le(Static185.anInt4370); @@ -468,10 +465,10 @@ public final class Static103 { if (!local560) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static70.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; Protocol.outboundBuffer.p1isaac(101); Protocol.outboundBuffer.p2leadd(local15 + Static225.originX); Protocol.outboundBuffer.p2le(Static185.anInt4370); @@ -481,10 +478,10 @@ public final class Static103 { Protocol.outboundBuffer.p4me(Static224.anInt5062); } if (local23 == 1004) { - Static17.milliseconds = 0; - Static122.x = Mouse.clickX; - Static70.type = 2; - Static25.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.y = Mouse.clickY; Protocol.outboundBuffer.p1isaac(94); Protocol.outboundBuffer.p2leadd(local36); } @@ -515,10 +512,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static70.type = 2; - Static122.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(248); Protocol.outboundBuffer.p2leadd(local36); Protocol.outboundBuffer.p2(Static274.anInt4997); @@ -544,10 +541,10 @@ public final class Static103 { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } } - Static70.type = 2; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(48); Protocol.outboundBuffer.p2add(local15 + Static225.originX); Protocol.outboundBuffer.p2leadd(local36); @@ -574,10 +571,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static70.type = 2; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; + Cross.type = 2; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(175); Protocol.outboundBuffer.p2add(local36); } @@ -616,10 +613,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static17.milliseconds = 0; - Static122.x = Mouse.clickX; - Static25.y = Mouse.clickY; - Static70.type = 2; + Cross.milliseconds = 0; + Cross.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.type = 2; Protocol.outboundBuffer.p1isaac(68); Protocol.outboundBuffer.p2leadd(local36); } @@ -638,10 +635,10 @@ public final class Static103 { if (!local560) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - Static70.type = 2; - Static17.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.x = Mouse.clickX; + Cross.type = 2; + Cross.milliseconds = 0; Protocol.outboundBuffer.p1isaac(73); Protocol.outboundBuffer.p4rme(Static98.anInt2512); Protocol.outboundBuffer.p2(Static142.originZ + local19); @@ -672,10 +669,10 @@ public final class Static103 { local43 = PlayerList.players[local36]; if (local43 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local43.movementQueueX[0], 1, 0, 2, local43.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; - Static70.type = 2; - Static122.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; Protocol.outboundBuffer.p1isaac(106); Protocol.outboundBuffer.p2(local36); } @@ -689,23 +686,23 @@ public final class Static103 { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local15, 1, 0, 2, local19, PlayerList.self.movementQueueX[0]); } } - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; - Static122.x = Mouse.clickX; - Static70.type = 2; + 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(Static225.originX + local15); Protocol.outboundBuffer.p2le(Static142.originZ + local19); } if (local23 == 16) { - local192 = Static175.npcs[local36]; + local192 = NpcList.npcs[local36]; if (local192 != null) { Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 1, false, 0, local192.movementQueueX[0], 1, 0, 2, local192.movementQueueZ[0], PlayerList.self.movementQueueX[0]); - Static122.x = Mouse.clickX; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static70.type = 2; + Cross.x = Mouse.clickX; + Cross.milliseconds = 0; + Cross.y = Mouse.clickY; + Cross.type = 2; Protocol.outboundBuffer.p1isaac(3); Protocol.outboundBuffer.p2leadd(local36); } diff --git a/client/src/main/java/Static104.java b/client/src/main/java/Static104.java index 6286da8..0b0ac3b 100644 --- a/client/src/main/java/Static104.java +++ b/client/src/main/java/Static104.java @@ -4,9 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static104 { - @OriginalMember(owner = "client!ia", name = "d", descriptor = "[I") - public static final int[] anIntArray255 = new int[200]; - @OriginalMember(owner = "client!ia", name = "a", descriptor = "(BLclient!fe;)V") public static void method2247(@OriginalArg(1) PathingEntity arg0) { @Pc(9) BasType local9 = arg0.method2681(); diff --git a/client/src/main/java/Static105.java b/client/src/main/java/Static105.java index 1dcaaac..53225b8 100644 --- a/client/src/main/java/Static105.java +++ b/client/src/main/java/Static105.java @@ -10,9 +10,6 @@ public final class Static105 { @OriginalMember(owner = "client!ib", name = "c", descriptor = "Lclient!qi;") public static final ColorImageCacheEntry VALID = new ColorImageCacheEntry(0, 0); - @OriginalMember(owner = "client!ib", name = "d", descriptor = "Lclient!gn;") - public static final LruHashTable aClass54_9 = new LruHashTable(128); - @OriginalMember(owner = "client!ib", name = "e", descriptor = "Lclient!be;") public static Component aClass13_14 = null; @@ -113,7 +110,7 @@ public final class Static105 { if (local10 < 0 || local17 < 0 || local10 >= Static152.mapSizeX || local17 >= Static99.mapSizeZ) { return false; } - @Pc(42) Tile local42 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][local10][local17]; + @Pc(42) Tile local42 = SceneGraph.tiles[arg0][local10][local17]; if (local42 != null && local42.anInt662 >= 5) { return false; } @@ -148,11 +145,11 @@ public final class Static105 { local115 += 2; } for (@Pc(141) int local141 = arg0; local141 >= 0; local141--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local141][local17][local108] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local141][local17][local108] = new Tile(local141, local17, local108); + if (SceneGraph.tiles[local141][local17][local108] == null) { + SceneGraph.tiles[local141][local17][local108] = new Tile(local141, local17, local108); } } - @Pc(174) Tile local174 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][local17][local108]; + @Pc(174) Tile local174 = SceneGraph.tiles[arg0][local17][local108]; local174.aClass31Array1[local174.anInt662] = local58; local174.anIntArray59[local174.anInt662] = local115; local174.anInt664 |= local115; diff --git a/client/src/main/java/Static106.java b/client/src/main/java/Static106.java index f46a3b6..011ef76 100644 --- a/client/src/main/java/Static106.java +++ b/client/src/main/java/Static106.java @@ -8,10 +8,4 @@ public final class Static106 { @OriginalMember(owner = "client!ic", name = "e", descriptor = "[I") public static final int[] anIntArray257 = new int[2500]; - @OriginalMember(owner = "client!ic", name = "j", descriptor = "I") - public static int anInt2869 = 100; - - @OriginalMember(owner = "client!ic", name = "l", descriptor = "[I") - public static final int[] anIntArray258 = new int[200]; - } diff --git a/client/src/main/java/Static107.java b/client/src/main/java/Static107.java index 6156f2a..ef0d410 100644 --- a/client/src/main/java/Static107.java +++ b/client/src/main/java/Static107.java @@ -1,4 +1,3 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public final class Static107 { @@ -21,12 +20,4 @@ public final class Static107 { @OriginalMember(owner = "client!id", name = "e", descriptor = "[I") public static final int[] anIntArray259 = new int[14]; - @OriginalMember(owner = "client!id", name = "a", descriptor = "(IIBII)V") - public static void method2263(@OriginalArg(3) int arg0, @OriginalArg(4) int arg1) { - Static224.anInt5063 = arg1; - Static172.anInt4164 = 0; - Static267.anInt5773 = 0; - Static106.anInt2869 = arg0; - } - } diff --git a/client/src/main/java/Static108.java b/client/src/main/java/Static108.java index 10e2d85..8335200 100644 --- a/client/src/main/java/Static108.java +++ b/client/src/main/java/Static108.java @@ -16,9 +16,6 @@ public final class Static108 { @OriginalMember(owner = "client!ie", name = "k", descriptor = "[I") public static final int[] anIntArray267 = new int[] { 256, 128, 86, 64 }; - @OriginalMember(owner = "client!ie", name = "l", descriptor = "[F") - public static final float[] aFloatArray8 = 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 = "a", descriptor = "([II)I") public static int method2268(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1) { @Pc(3) int local3 = arg0[arg1]; diff --git a/client/src/main/java/Static109.java b/client/src/main/java/Static109.java index ebc0e9f..6f0e31e 100644 --- a/client/src/main/java/Static109.java +++ b/client/src/main/java/Static109.java @@ -19,7 +19,7 @@ public final class Static109 { public static void method2274() { for (@Pc(7) int local7 = 0; local7 < Static272.anInt5214; local7++) { @Pc(18) int local18 = Static33.anIntArray79[local7]; - @Pc(22) Npc local22 = Static175.npcs[local18]; + @Pc(22) Npc local22 = NpcList.npcs[local18]; if (local22 != null) { Static263.method4514(local22.type.soze, local22); } diff --git a/client/src/main/java/Static11.java b/client/src/main/java/Static11.java index 88d1f81..ea4be65 100644 --- a/client/src/main/java/Static11.java +++ b/client/src/main/java/Static11.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static11 { @@ -9,21 +7,4 @@ public final class Static11 { NpcTypeList.headModels.clear(); } - @OriginalMember(owner = "client!ba", name = "a", descriptor = "(IB)I") - public static int getFreeSpaces(@OriginalArg(0) int arg0) { - if (arg0 < 0) { - return 0; - } - @Pc(17) Inv local17 = (Inv) Static20.objectContainerCache.get((long) arg0); - if (local17 == null) { - return InvTypeList.list(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.list(arg0).size - local17.objectIds.length; - } } diff --git a/client/src/main/java/Static110.java b/client/src/main/java/Static110.java index 700f968..835bcdc 100644 --- a/client/src/main/java/Static110.java +++ b/client/src/main/java/Static110.java @@ -4,18 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static110 { - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(III)Lclient!jh;") - public static Wall method2276(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; - if (local7 == null) { - return null; - } else { - @Pc(14) Wall local14 = local7.aClass77_1; - local7.aClass77_1 = null; - return local14; - } - } - @OriginalMember(owner = "client!ih", name = "a", descriptor = "(I[Lclient!hg;)V") public static void method2280(@OriginalArg(0) int arg0, @OriginalArg(1) GlTile[] arg1) { Static182.aClass3_Sub14ArrayArray2[arg0] = arg1; @@ -57,7 +45,7 @@ public final class Static110 { local6.anInt2028 = local6.npc.zFine + local6.npc.getSize() * 64; Static150.method2804(arg1, local6, arg3, arg0, arg2); } - for (local6 = (AreaSound) Static93.aClass133_7.head(); local6 != null; local6 = (AreaSound) Static93.aClass133_7.next()) { + for (local6 = (AreaSound) AreaSoundManager.aClass133_7.head(); local6 != null; local6 = (AreaSound) AreaSoundManager.aClass133_7.next()) { local37 = 1; local42 = local6.player.method2681(); if (local6.player.anInt3366 == local42.idleAnimationId) { diff --git a/client/src/main/java/Static111.java b/client/src/main/java/Static111.java index 676466a..f26bf76 100644 --- a/client/src/main/java/Static111.java +++ b/client/src/main/java/Static111.java @@ -6,9 +6,6 @@ public final class Static111 { @OriginalMember(owner = "client!ii", name = "a", descriptor = "I") public static int cameraZ; - @OriginalMember(owner = "client!ii", name = "l", descriptor = "I") - public static int anInt2905; - @OriginalMember(owner = "client!ii", name = "y", descriptor = "I") public static int anInt2910; @@ -46,7 +43,7 @@ public final class Static111 { } else { arg0.x = arg2 - (arg2 * arg0.baseX >> 14) - arg0.anInt445; } - if (!Static121.aBoolean154 || Static36.method940(arg0).anInt546 == 0 && arg0.type != 0) { + if (!Static121.aBoolean154 || InterfaceList.getServerActiveProperties(arg0).anInt546 == 0 && arg0.type != 0) { return; } if (arg0.y < 0) { diff --git a/client/src/main/java/Static115.java b/client/src/main/java/Static115.java index 0f6c7d5..2116064 100644 --- a/client/src/main/java/Static115.java +++ b/client/src/main/java/Static115.java @@ -53,11 +53,11 @@ public final class Static115 { @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 (Static70.type == 1) { - Sprites.crosses[Static17.milliseconds / 100].method1423(Static122.x - 8, Static25.y + -8); + if (Cross.type == 1) { + Sprites.crosses[Cross.milliseconds / 100].method1423(Cross.x - 8, Cross.y + -8); } - if (Static70.type == 2) { - Sprites.crosses[Static17.milliseconds / 100 + 4].method1423(Static122.x - 8, Static25.y + -8); + if (Cross.type == 2) { + Sprites.crosses[Cross.milliseconds / 100 + 4].method1423(Cross.x - 8, Cross.y + -8); } Static256.method4392(); } diff --git a/client/src/main/java/Static118.java b/client/src/main/java/Static118.java index fd81baa..89dbb47 100644 --- a/client/src/main/java/Static118.java +++ b/client/src/main/java/Static118.java @@ -42,12 +42,12 @@ public final class Static118 { } if (local15.type == 6) { @Pc(105) int local105; - if (local15.anInt522 != -1 || local15.anInt462 != -1) { + if (local15.modelSeqId != -1 || local15.anInt462 != -1) { @Pc(100) boolean local100 = Static154.method2926(local15); if (local100) { local105 = local15.anInt462; } else { - local105 = local15.anInt522; + local105 = local15.modelSeqId; } if (local105 != -1) { @Pc(118) SeqType local118 = SeqTypeList.get(local105); diff --git a/client/src/main/java/Static12.java b/client/src/main/java/Static12.java index f3f92c8..d16443c 100644 --- a/client/src/main/java/Static12.java +++ b/client/src/main/java/Static12.java @@ -15,9 +15,6 @@ public final class Static12 { @OriginalMember(owner = "client!bb", name = "A", descriptor = "Lclient!na;") public static final JagString aClass100_74 = JagString.parse("::"); - @OriginalMember(owner = "client!bb", name = "E", descriptor = "I") - public static int anInt400 = 0; - @OriginalMember(owner = "client!bb", name = "a", descriptor = "(I)V") public static void method447() { if (WorldMap.zoom < WorldMap.targetZoom) { diff --git a/client/src/main/java/Static120.java b/client/src/main/java/Static120.java index dc4e5cd..222d3a9 100644 --- a/client/src/main/java/Static120.java +++ b/client/src/main/java/Static120.java @@ -5,9 +5,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static120 { - @OriginalMember(owner = "client!jf", name = "a", descriptor = "[Lclient!gi;") - public static Light[] lights; - @OriginalMember(owner = "client!jf", name = "c", descriptor = "[I") private static int[] anIntArray283; @@ -50,10 +47,7 @@ public final class Static120 { @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 = "(IIIIIII)V") + @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; @@ -79,10 +73,10 @@ public final class Static120 { @OriginalMember(owner = "client!jf", name = "a", descriptor = "(Lclient!gi;)V") public static void method2389(@OriginalArg(0) Light arg0) { - if (lightCount >= 255) { + if (LightingManager.lightCount >= 255) { System.out.println("Number of lights added exceeds maximum!"); } else { - lights[lightCount++] = arg0; + LightingManager.lights[LightingManager.lightCount++] = arg0; } } @@ -151,7 +145,7 @@ public final class Static120 { if (!aBooleanArray66[local40]) { anIntArray284[local40] = anIntArray283[local35]; aBooleanArray66[local40] = true; - method2403(local40, lights[anIntArray283[local35]], arg0, arg1, arg2); + method2403(local40, LightingManager.lights[anIntArray283[local35]], arg0, arg1, arg2); break; } } @@ -207,7 +201,7 @@ public final class Static120 { if (!aBooleanArray66[local53]) { anIntArray284[local53] = anIntArray283[local47]; aBooleanArray66[local53] = true; - method2403(local53, lights[anIntArray283[local47]], arg0, arg1, arg2); + method2403(local53, LightingManager.lights[anIntArray283[local47]], arg0, arg1, arg2); break; } } @@ -229,8 +223,8 @@ public final class Static120 { @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); + for (@Pc(1) int local1 = 0; local1 < LightingManager.lightCount; local1++) { + LightingManager.lights[local1].method1765(arg1, arg0); } anInt3031 = -1; anInt3033 = -1; @@ -241,8 +235,8 @@ public final class Static120 { @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]; + for (@Pc(1) int local1 = 0; local1 < LightingManager.lightCount; local1++) { + @Pc(8) Light local8 = LightingManager.lights[local1]; @Pc(11) int local11 = local8.anInt2241; if (local8.aBoolean124) { local11 = 0; @@ -331,7 +325,7 @@ public final class Static120 { @OriginalMember(owner = "client!jf", name = "c", descriptor = "()V") public static void method2398() { - lights = null; + LightingManager.lights = null; anIntArray284 = null; aBooleanArray65 = null; anIntArray283 = null; @@ -357,7 +351,7 @@ public final class Static120 { @OriginalMember(owner = "client!jf", name = "f", descriptor = "()V") public static void method2401() { - lights = new Light[255]; + LightingManager.lights = new Light[255]; anIntArray284 = new int[4]; aBooleanArray65 = new boolean[4]; anIntArray283 = new int[4]; @@ -381,8 +375,8 @@ public final class Static120 { local4.glFogfv(GL2.GL_FOG_COLOR, new float[] { 0.0F, 0.0F, 0.0F, 0.0F }, 0); local4.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_CONSTANT); local4.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]; + label71: for (@Pc(56) int local56 = 0; local56 < LightingManager.lightCount; local56++) { + @Pc(63) Light local63 = LightingManager.lights[local56]; @Pc(66) int local66 = local63.anInt2241; if (local63.aBoolean125) { local66--; @@ -450,7 +444,7 @@ public final class Static120 { @OriginalMember(owner = "client!jf", name = "g", descriptor = "()V") public static void method2404() { - lightCount = 0; + LightingManager.lightCount = 0; for (@Pc(3) int local3 = 0; local3 < anInt3032; local3++) { for (@Pc(8) int local8 = 0; local8 < anInt3037; local8++) { for (@Pc(13) int local13 = 0; local13 < anInt3036; local13++) { diff --git a/client/src/main/java/Static122.java b/client/src/main/java/Static122.java index 45e86a3..3341c3b 100644 --- a/client/src/main/java/Static122.java +++ b/client/src/main/java/Static122.java @@ -1,28 +1,15 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static122 { - @OriginalMember(owner = "client!jh", name = "n", descriptor = "Lclient!bd;") - public static QuickChatPhrase aClass12_1; - - @OriginalMember(owner = "client!jh", name = "b", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array92 = new JagString[200]; - - @OriginalMember(owner = "client!jh", name = "f", descriptor = "D") - public static double aDouble1 = -1.0D; - @OriginalMember(owner = "client!jh", name = "g", descriptor = "Lclient!na;") public static final JagString aClass100_591 = JagString.parse("(Udns"); - @OriginalMember(owner = "client!jh", name = "j", descriptor = "I") - public static int x = 0; - - @OriginalMember(owner = "client!jh", name = "a", descriptor = "(Lclient!ve;ZIIZI)V") + @OriginalMember(owner = "client!jh", name = "a", descriptor = "(Lclient!ve;ZIIZI)V") public static void method2410(@OriginalArg(0) Js5 arg0, @OriginalArg(2) int arg1, @OriginalArg(5) int arg2) { Static172.aClass153_70 = arg0; - Static14.anInt441 = 1; + MidiPlayer.anInt441 = 1; Static253.anInt5527 = arg2; Static226.anInt5085 = 0; Static277.anInt5853 = arg1; @@ -30,60 +17,7 @@ public final class Static122 { Static57.anInt1757 = 10000; } - @OriginalMember(owner = "client!jh", name = "a", descriptor = "(IZLclient!pb;ILclient!km;IILclient!e;)V") - public static void method2411(@OriginalArg(0) int arg0, @OriginalArg(2) LocType arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Npc arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) Player arg6) { - @Pc(13) AreaSound local13 = new AreaSound(); - local13.anInt2029 = arg0 * 128; - local13.anInt2041 = arg4 * 128; - local13.anInt2033 = arg5; - if (arg1 != null) { - local13.sounds = arg1.anIntArray381; - local13.radius = arg1.soundRadius * 128; - local13.anInt2040 = arg1.anInt4414; - local13.locType = arg1; - local13.sound = arg1.sound; - local13.anInt2032 = arg1.anInt4419; - @Pc(57) int local57 = arg1.width; - @Pc(60) int local60 = arg1.length; - if (arg2 == 1 || arg2 == 3) { - local57 = arg1.length; - local60 = arg1.width; - } - local13.anInt2028 = (local60 + arg0) * 128; - local13.anInt2037 = (arg4 + local57) * 128; - if (arg1.multiLocs != null) { - local13.multiLocOrNpc = true; - local13.update(); - } - if (local13.sounds != null) { - local13.anInt2034 = local13.anInt2032 + (int) (Math.random() * (double) (local13.anInt2040 - local13.anInt2032)); - } - Static3.aClass69_135.addTail(local13); - } else if (arg3 != null) { - local13.npc = arg3; - @Pc(138) NpcType local138 = arg3.type; - if (local138.multiNpcs != null) { - local13.multiLocOrNpc = true; - local138 = local138.getMultiNpc(); - } - if (local138 != null) { - local13.anInt2028 = (local138.soze + arg0) * 128; - local13.anInt2037 = (arg4 + local138.soze) * 128; - local13.sound = Static112.getSound(arg3); - local13.radius = local138.soundRadius * 128; - } - Static152.aClass69_87.addTail(local13); - } else if (arg6 != null) { - local13.player = arg6; - local13.anInt2037 = (arg6.getSize() + arg4) * 128; - local13.anInt2028 = (arg6.getSize() + arg0) * 128; - local13.sound = Static140.getSound(arg6); - local13.radius = arg6.soundRadius * 128; - Static93.aClass133_7.put(local13, arg6.username.encode37()); - } - } - - @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) ? Static114.method4635(arg1.getFile(arg0, 0)) : null; } diff --git a/client/src/main/java/Static124.java b/client/src/main/java/Static124.java index 84e4e98..0b37292 100644 --- a/client/src/main/java/Static124.java +++ b/client/src/main/java/Static124.java @@ -13,16 +13,6 @@ public final class Static124 { @OriginalMember(owner = "client!jk", name = "F", descriptor = "Lclient!na;") public static final JagString aClass100_596 = JagString.parse("::tween"); - @OriginalMember(owner = "client!jk", name = "a", descriptor = "(ILclient!na;)Lclient!bn;") - public static Map method2434(@OriginalArg(1) JagString arg0) { - for (@Pc(15) Map local15 = (Map) MapList.aClass69_120.method2289(); local15 != null; local15 = (Map) MapList.aClass69_120.method2288()) { - if (local15.group.strEquals(arg0)) { - return local15; - } - } - return null; - } - @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); diff --git a/client/src/main/java/Static125.java b/client/src/main/java/Static125.java index 37e12cb..793fa42 100644 --- a/client/src/main/java/Static125.java +++ b/client/src/main/java/Static125.java @@ -7,9 +7,6 @@ public final class Static125 { @OriginalMember(owner = "client!jl", name = "v", descriptor = "I") public static int anInt3096 = 0; - @OriginalMember(owner = "client!jl", name = "H", descriptor = "I") - public static int worldId = -1; - @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; diff --git a/client/src/main/java/Static127.java b/client/src/main/java/Static127.java index bcb5875..d0f3cd2 100644 --- a/client/src/main/java/Static127.java +++ b/client/src/main/java/Static127.java @@ -43,7 +43,7 @@ public final class Static127 { @Pc(55) int local55 = Static225.originX; Static142.originZ = arg1 * 8 - 48; Static225.originX = (arg2 - 6) * 8; - Static158.aClass3_Sub2_Sub4_3 = Static29.method803(Static80.centralZoneX * 8, Static52.anInt1695 * 8); + Static158.aClass3_Sub2_Sub4_3 = MapList.getContainingSource(Static80.centralZoneX * 8, Static52.anInt1695 * 8); @Pc(81) int local81 = Static142.originZ - local53; @Pc(86) int local86 = Static225.originX - local55; Static235.mapElementList = null; @@ -53,7 +53,7 @@ public final class Static127 { if (arg4) { Static272.anInt5214 = 0; for (local96 = 0; local96 < 32768; local96++) { - local103 = Static175.npcs[local96]; + local103 = NpcList.npcs[local96]; if (local103 != null) { local103.xFine -= local86 * 128; local103.zFine -= local81 * 128; @@ -64,14 +64,14 @@ public final class Static127 { } Static33.anIntArray79[Static272.anInt5214++] = local96; } else { - Static175.npcs[local96].method2698(null); - Static175.npcs[local96] = null; + NpcList.npcs[local96].method2698(null); + NpcList.npcs[local96] = null; } } } } else { for (local96 = 0; local96 < 32768; local96++) { - local103 = Static175.npcs[local96]; + local103 = NpcList.npcs[local96]; if (local103 != null) { for (local109 = 0; local109 < 10; local109++) { local103.movementQueueX[local109] -= local86; @@ -231,132 +231,4 @@ public final class Static127 { } } - @OriginalMember(owner = "client!k", name = "a", descriptor = "(Lclient!na;Z)V") - public static void method2470(@OriginalArg(0) JagString arg0) { - if (LoginManager.staffModLevel >= 2) { - @Pc(18) int local18; - @Pc(38) int local38; - @Pc(29) Runtime local29; - if (arg0.equalsIgnoreCase(Static81.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[] { Static202.aClass100_892, Static123.parseInt(local38), Static17.aClass100_101 })); - } - @Pc(117) int local117; - if (arg0.equalsIgnoreCase(Static154.aClass100_735)) { - 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[] { Static203.aClass100_893, Static123.parseInt(local38), Static17.aClass100_101 })); - Static16.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[] { Cheat.aClass100_1093, Static123.parseInt(local38), Static17.aClass100_101 })); - } - if (arg0.equalsIgnoreCase(Static240.aClass100_1009)) { - Chat.add(null, 0, JagString.concatenate(new JagString[] { Static44.aClass100_335, Static123.parseInt(Static198.method1029()) })); - } - if (GlRenderer.enabled && arg0.equalsIgnoreCase(Static201.aClass100_406)) { - System.out.println("oncard_geometry:" + GlCleaner.anInt1945); - System.out.println("oncard_2d:" + GlCleaner.onCard2d); - System.out.println("oncard_texture:" + GlCleaner.onCardTexture); - } - if (arg0.equalsIgnoreCase(Cheat.CLIENTDROP)) { - Static175.method3279(); - } - if (arg0.equalsIgnoreCase(Static279.aClass100_1106)) { - client.js5NetQueue.quit(); - } - if (arg0.equalsIgnoreCase(Cheat.JS5DROP)) { - client.js5NetQueue.method2319(); - } - if (arg0.equalsIgnoreCase(Cheat.aClass100_775)) { - GameShell.signLink.breakConnection(); - Protocol.socket.breakConnection(); - client.js5NetQueue.method2323(); - } - if (arg0.equalsIgnoreCase(Static114.aClass100_1100)) { - GameShell.replaceCanvas = true; - } - if (arg0.equalsIgnoreCase(Static148.aClass100_677)) { - client.setGameState(25); - } - if (arg0.equalsIgnoreCase(Static107.aClass100_566)) { - Cheat.displayFps = true; - } - if (arg0.equalsIgnoreCase(Static61.aClass100_422)) { - Cheat.displayFps = false; - } - if (arg0.equalsIgnoreCase(Static96.aClass100_522)) { - Static241.setWindowMode(false, 0, -1, -1); - } - if (arg0.equalsIgnoreCase(Static181.aClass100_811)) { - Static241.setWindowMode(false, 1, -1, -1); - } - if (arg0.equalsIgnoreCase(Static207.aClass100_904)) { - Static241.setWindowMode(false, 2, -1, -1); - } - if (arg0.equalsIgnoreCase(Static99.aClass100_529)) { - Static241.setWindowMode(false, 3, 1024, 768); - } - if (arg0.equalsIgnoreCase(Static69.aClass100_443)) { - for (local18 = 0; local18 < 4; local18++) { - for (local38 = 1; local38 < 103; local38++) { - for (local117 = 1; local117 < 103; local117++) { - PathFinder.collisionMaps[local18].anIntArrayArray30[local38][local117] = 0; - } - } - } - } - if (arg0.startsWith(Cheat.aClass100_1088)) { - Preferences.setParticles(arg0.substring(15).parseInt()); - Preferences.write(GameShell.signLink); - Preferences.sentToServer = false; - } - if (arg0.startsWith(Cheat.aClass100_623) && client.modeWhere != 0) { - Static115.method2312(arg0.substring(6).parseInt()); - } - if (arg0.equalsIgnoreCase(Cheat.aClass100_990)) { - throw new RuntimeException(); - } - if (arg0.startsWith(Cheat.aClass100_232)) { - Static199.rectDebug = arg0.substring(12).trim().parseInt(); - Chat.add(null, 0, JagString.concatenate(new JagString[] { Static276.aClass100_1096, Static123.parseInt(Static199.rectDebug) })); - } - if (arg0.equalsIgnoreCase(Static181.aClass100_810)) { - Static121.aBoolean154 = true; - } - if (arg0.equalsIgnoreCase(Static124.aClass100_596)) { - if (Static204.applyTweening) { - Static204.applyTweening = false; - Chat.add(null, 0, Cheat.aClass100_943); - } else { - Static204.applyTweening = true; - Chat.add(null, 0, Static50.aClass100_362); - } - } - if (arg0.equalsIgnoreCase(Static114.aClass100_1099)) { - if (Static172.shiftClick) { - Static154.aClass100_736.method3129(); - Static172.shiftClick = false; - } else { - Cheat.aClass100_333.method3129(); - Static172.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/Static13.java b/client/src/main/java/Static13.java index cb23757..4ace444 100644 --- a/client/src/main/java/Static13.java +++ b/client/src/main/java/Static13.java @@ -23,7 +23,7 @@ public final class Static13 { local32 = JagString.concatenate(new JagString[] { LocalizedText.USE, LocalizedText.MINISEPARATOR, Static34.aClass100_203, Static225.aClass100_961 }); } else if (Static241.aBoolean302 && Static231.anInt5204 < 2) { local32 = JagString.concatenate(new JagString[] { Static102.aClass100_545, LocalizedText.MINISEPARATOR, Static78.aClass100_466, Static225.aClass100_961 }); - } else if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { + } else if (Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { local32 = Static269.method2228(Static231.anInt5204 - 2); } else { local32 = Static269.method2228(Static231.anInt5204 - 1); diff --git a/client/src/main/java/Static130.java b/client/src/main/java/Static130.java index e749b8d..b9127e5 100644 --- a/client/src/main/java/Static130.java +++ b/client/src/main/java/Static130.java @@ -3,9 +3,6 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static130 { - @OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;") - public static Tile[][][] aClass3_Sub5ArrayArrayArray1; - @OriginalMember(owner = "client!kc", name = "p", descriptor = "[I") public static int[] anIntArray299; diff --git a/client/src/main/java/Static132.java b/client/src/main/java/Static132.java index 9a91f77..9026275 100644 --- a/client/src/main/java/Static132.java +++ b/client/src/main/java/Static132.java @@ -4,9 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static132 { - @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!ke", name = "U", descriptor = "I") public static int anInt3291 = 0; @@ -53,28 +50,12 @@ public final class Static132 { } } - @OriginalMember(owner = "client!ke", name = "c", descriptor = "(III)V") - public static void method2606(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(8) DelayedStateChange local8 = Static238.method4143(1, arg0); - local8.pushServer(); - local8.intArg1 = arg1; - } - - @OriginalMember(owner = "client!ke", name = "a", descriptor = "(IIIBI)V") - public static void method2607(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) { - @Pc(8) DelayedStateChange local8 = Static238.method4143(4, arg2); - local8.pushServer(); - local8.intArg3 = arg3; - local8.intArg2 = arg0; - local8.intArg1 = arg1; - } - @OriginalMember(owner = "client!ke", name = "f", descriptor = "(B)V") public static void method2608() { @Pc(7) int local7 = 0; for (@Pc(23) int local23 = 0; local23 < 104; local23++) { for (@Pc(30) int local30 = 0; local30 < 104; local30++) { - if (Static254.method4348(true, local23, local30, Static130.aClass3_Sub5ArrayArrayArray1, local7)) { + if (Static254.method4348(true, local23, local30, SceneGraph.tiles, local7)) { local7++; } if (local7 >= 512) { diff --git a/client/src/main/java/Static133.java b/client/src/main/java/Static133.java index d6168e9..353d83e 100644 --- a/client/src/main/java/Static133.java +++ b/client/src/main/java/Static133.java @@ -7,10 +7,7 @@ public final class Static133 { @OriginalMember(owner = "client!kf", name = "f", descriptor = "I") public static int anInt5230; - @OriginalMember(owner = "client!kf", name = "c", descriptor = "J") - public static long clickTime = 0L; - - @OriginalMember(owner = "client!kf", name = "d", descriptor = "[Lclient!cl;") + @OriginalMember(owner = "client!kf", name = "d", descriptor = "[Lclient!cl;") public static final AnimFrameset[] aClass3_Sub2_Sub7Array7 = new AnimFrameset[14]; @OriginalMember(owner = "client!kf", name = "h", descriptor = "[I") @@ -21,7 +18,7 @@ public final class Static133 { @OriginalMember(owner = "client!kf", name = "b", descriptor = "(III)Lclient!ec;") public static Scenery method4008(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return null; } @@ -34,17 +31,7 @@ public final class Static133 { return null; } - @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.method2289(); local15 != null; local15 = (Map) MapList.aClass69_120.method2288()) { - if (local15.group.strEquals(arg0)) { - WorldMap.currentMap = local15; - return; - } - } - } - - @OriginalMember(owner = "client!kf", name = "a", descriptor = "(IIBII)V") + @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 < InterfaceList.anInt766; local12++) { if (Static224.anIntArray443[local12] + Static264.anIntArray410[local12] > arg0 && arg1 + arg0 > Static264.anIntArray410[local12] && arg2 < Static67.anIntArray320[local12] + Static50.anIntArray133[local12] && Static50.anIntArray133[local12] < arg2 + arg3) { diff --git a/client/src/main/java/Static134.java b/client/src/main/java/Static134.java index 76ee9b8..13f78e4 100644 --- a/client/src/main/java/Static134.java +++ b/client/src/main/java/Static134.java @@ -7,9 +7,6 @@ public final class Static134 { @OriginalMember(owner = "client!kh", name = "f", descriptor = "I") public static int renderZ; - @OriginalMember(owner = "client!kh", name = "g", descriptor = "Lclient!hh;") - public static final PlayerAppearance aClass59_2 = new PlayerAppearance(); - @OriginalMember(owner = "client!kh", name = "a", descriptor = "(B)Lclient!ek;") public static SoftwareIndexedSprite method2619() { @Pc(25) SoftwareIndexedSprite local25 = new SoftwareIndexedSprite(SpriteLoader.width, SpriteLoader.height, SpriteLoader.xOffsets[0], SpriteLoader.yOffsets[0], SpriteLoader.innerWidths[0], SpriteLoader.innerHeights[0], SpriteLoader.pixels[0], SpriteLoader.palette); @@ -29,9 +26,4 @@ public final class Static134 { } } - @OriginalMember(owner = "client!kh", name = "b", descriptor = "(I)V") - public static void method2623() { - Protocol.outboundBuffer.p1isaac(104); - Protocol.outboundBuffer.p8(0L); - } } diff --git a/client/src/main/java/Static135.java b/client/src/main/java/Static135.java deleted file mode 100644 index 679e0dc..0000000 --- a/client/src/main/java/Static135.java +++ /dev/null @@ -1,7 +0,0 @@ -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static135 { - - @OriginalMember(owner = "client!ki", name = "e", descriptor = "[B") - public static final byte[] aByteArray46 = 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 }; -} diff --git a/client/src/main/java/Static136.java b/client/src/main/java/Static136.java index 27beea9..bf9f8cf 100644 --- a/client/src/main/java/Static136.java +++ b/client/src/main/java/Static136.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static136 { @@ -16,15 +14,8 @@ public final class Static136 { @OriginalMember(owner = "client!kk", name = "m", descriptor = "Lclient!na;") public static final JagString CS_ERROR = JagString.parse("Clientscript error )2 check log for details"); - @OriginalMember(owner = "client!kk", name = "a", descriptor = "(IIB)V") - public static void method2649(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(4) DelayedStateChange local4 = Static238.method4143(6, arg1); - local4.pushServer(); - local4.intArg1 = arg0; - } - @OriginalMember(owner = "client!kk", name = "a", descriptor = "(I)Z") public static boolean method2655() { - return Static14.anInt441 == 0 ? Static172.aClass3_Sub3_Sub4_2.method4414() : true; + return MidiPlayer.anInt441 == 0 ? Static172.aClass3_Sub3_Sub4_2.method4414() : true; } } diff --git a/client/src/main/java/Static137.java b/client/src/main/java/Static137.java index 331a304..89b79b0 100644 --- a/client/src/main/java/Static137.java +++ b/client/src/main/java/Static137.java @@ -1,6 +1,5 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static137 { @@ -15,126 +14,4 @@ public final class Static137 { return new TextureOp29SubOp2(arg0.g2s(), arg0.g2s(), arg0.g2s(), arg0.g2s(), arg0.g3(), arg0.g3(), arg0.g1()); } - @OriginalMember(owner = "client!kl", name = "b", descriptor = "(II)Z") - public static boolean method2665(@OriginalArg(1) int arg0) { - @Pc(35) int local35; - @Pc(37) int local37; - @Pc(76) int local76; - @Pc(80) int local80; - if (Static56.aClass3_Sub2_Sub1_Sub1_1 == null) { - if (GlRenderer.enabled || Static89.aClass3_Sub2_Sub1_5 == null) { - Static56.aClass3_Sub2_Sub1_Sub1_1 = new SoftwareSprite(512, 512); - } else { - Static56.aClass3_Sub2_Sub1_Sub1_1 = (SoftwareSprite) Static89.aClass3_Sub2_Sub1_5; - } - @Pc(32) int[] local32 = Static56.aClass3_Sub2_Sub1_Sub1_1.anIntArray20; - 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 ((Static12.tileSettings[arg0][local80][local37] & 0x18) == 0) { - Static152.method2835(local32, local76, arg0, local80, local37); - } - if (arg0 < 3 && (Static12.tileSettings[arg0 + 1][local80][local37] & 0x8) != 0) { - Static152.method2835(local32, local76, arg0 + 1, local80, local37); - } - local76 += 4; - } - } - Static251.anInt5454 = 0; - for (local37 = 0; local37 < 104; local37++) { - for (local76 = 0; local76 < 104; local76++) { - @Pc(169) long local169 = Static20.method602(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].anIntArrayArray30; - 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++; - } - } - } - Static199.anIntArray417[Static251.anInt5454] = local184.id; - Static145.anIntArray331[Static251.anInt5454] = local194; - Static93.anIntArray219[Static251.anInt5454] = local237; - Static251.anInt5454++; - } - } - } - } - } - Static56.aClass3_Sub2_Sub1_Sub1_1.method304(); - @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 ((Static12.tileSettings[arg0][local76][local37] & 0x18) == 0 && !Static164.method3109(local76, local455, local37, local35, arg0)) { - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - client.frameBuffer.makeTarget(); - } - return false; - } - if (arg0 < 3 && (Static12.tileSettings[arg0 + 1][local76][local37] & 0x8) != 0 && !Static164.method3109(local76, local455, local37, local35, arg0 + 1)) { - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - client.frameBuffer.makeTarget(); - } - return false; - } - } - } - if (GlRenderer.enabled) { - @Pc(576) int[] local576 = Static56.aClass3_Sub2_Sub1_Sub1_1.anIntArray20; - local76 = local576.length; - for (local80 = 0; local80 < local76; local80++) { - if (local576[local80] == 0) { - local576[local80] = 1; - } - } - Static89.aClass3_Sub2_Sub1_5 = new GlSprite(Static56.aClass3_Sub2_Sub1_Sub1_1); - } else { - Static89.aClass3_Sub2_Sub1_5 = Static56.aClass3_Sub2_Sub1_Sub1_1; - } - if (GlRenderer.enabled) { - SoftwareRaster.pixels = null; - } else { - client.frameBuffer.makeTarget(); - } - Static56.aClass3_Sub2_Sub1_Sub1_1 = null; - return true; - } - } diff --git a/client/src/main/java/Static138.java b/client/src/main/java/Static138.java index 071799b..5e240c8 100644 --- a/client/src/main/java/Static138.java +++ b/client/src/main/java/Static138.java @@ -69,19 +69,4 @@ public final class Static138 { return local34 >> 19 & 0xFF; } - @OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B") - public static byte[] method2696(@OriginalArg(1) Object arg0, @OriginalArg(2) boolean arg1) { - if (arg0 == null) { - return null; - } else if (arg0 instanceof byte[]) { - @Pc(14) byte[] local14 = (byte[]) arg0; - return arg1 ? Static23.method648(local14) : local14; - } else if (arg0 instanceof ByteArray) { - @Pc(34) ByteArray local34 = (ByteArray) arg0; - return local34.get(); - } else { - throw new IllegalArgumentException(); - } - } - } diff --git a/client/src/main/java/Static139.java b/client/src/main/java/Static139.java index 60d96c3..848a2cb 100644 --- a/client/src/main/java/Static139.java +++ b/client/src/main/java/Static139.java @@ -16,7 +16,7 @@ public final class Static139 { @OriginalMember(owner = "client!l", name = "a", descriptor = "(III)J") public static long method2703(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null || local7.aClass24_1 == null ? 0L : local7.aClass24_1.key; } diff --git a/client/src/main/java/Static14.java b/client/src/main/java/Static14.java index d43b575..eed22ae 100644 --- a/client/src/main/java/Static14.java +++ b/client/src/main/java/Static14.java @@ -7,10 +7,7 @@ public final class Static14 { @OriginalMember(owner = "client!bd", name = "b", descriptor = "Lclient!na;") public static final JagString aClass100_80 = JagString.parse("(U(Y"); - @OriginalMember(owner = "client!bd", name = "i", descriptor = "I") - public static int anInt441 = 0; - - @OriginalMember(owner = "client!bd", name = "a", descriptor = "(BI)V") + @OriginalMember(owner = "client!bd", name = "a", descriptor = "(BI)V") public static void method475(@OriginalArg(1) int arg0) { @Pc(8) Inv local8 = (Inv) Static20.objectContainerCache.get((long) arg0); if (local8 != null) { diff --git a/client/src/main/java/Static140.java b/client/src/main/java/Static140.java index d9f7956..7b85463 100644 --- a/client/src/main/java/Static140.java +++ b/client/src/main/java/Static140.java @@ -21,38 +21,4 @@ public final class Static140 { return local14; } - @OriginalMember(owner = "client!la", name = "a", descriptor = "(IJ)V") - public static void method2707(@OriginalArg(1) long arg0) { - if (arg0 == 0L) { - return; - } - if (Static35.anInt1093 >= 100) { - Chat.add(JagString.EMPTY, 0, LocalizedText.IGNORELISTFULL); - return; - } - @Pc(34) JagString local34 = Base37.decodeLowerCase(arg0).method3125(); - @Pc(36) int local36; - for (local36 = 0; local36 < Static35.anInt1093; local36++) { - if (IgnoreList.encodedUsernames[local36] == arg0) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { local34, LocalizedText.IGNORELISTDUPE})); - return; - } - } - for (local36 = 0; local36 < Static9.anInt178; local36++) { - if (Static92.aLongArray3[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; - } - IgnoreList.encodedUsernames[Static35.anInt1093] = arg0; - Static193.aClass100Array134[Static35.anInt1093++] = Base37.decodeLowerCase(arg0); - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(34); - Protocol.outboundBuffer.p8(arg0); - } - } diff --git a/client/src/main/java/Static141.java b/client/src/main/java/Static141.java index 5a5dc95..25e9dd6 100644 --- a/client/src/main/java/Static141.java +++ b/client/src/main/java/Static141.java @@ -1,70 +1,22 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static141 { @OriginalMember(owner = "client!lb", name = "z", descriptor = "I") public static int anInt3473; - @OriginalMember(owner = "client!lb", name = "p", descriptor = "[I") - public static final int[] anIntArray326 = new int[25]; - - @OriginalMember(owner = "client!lb", name = "s", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!lb", name = "s", descriptor = "Lclient!na;") public static final JagString aClass100_664 = JagString.parse(":clan:"); @OriginalMember(owner = "client!lb", name = "d", descriptor = "(B)V") public static void method2720() { if (WorldMap.aClass100_724 != null) { - Static90.method1853(WorldMap.aClass100_724); + WorldMap.method1853(WorldMap.aClass100_724); WorldMap.aClass100_724 = null; } } - @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Z)V") - public static void method2721() { - Static65.method1500(); - Static89.aClass3_Sub2_Sub1_5 = null; - Static107.anInt2875 = -1; - client.method3768(); - Static255.cache.clear(); - Static171.aClass139_1 = new Class139(); - ((Js5GlTextureProvider) Rasteriser.textureProvider).clear(); - Static120.lightCount = 0; - Static120.lights = new Light[255]; - Static237.method4120(); - Static242.method4203(); - Static115.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) { - Static242.method4201(); - Static76.method1642(); - } - Fonts.load(client.js5Archive13, client.js5Archive8); - Sprites.load(client.js5Archive8); - Static204.aClass3_Sub2_Sub1_10 = null; - Static39.aClass3_Sub2_Sub1_1 = null; - Static92.aClass3_Sub2_Sub1_6 = null; - Static165.aClass3_Sub2_Sub1_8 = null; - Static181.aClass3_Sub2_Sub1_9 = null; - if (client.gameState == 5) { - TitleScreen.load(client.js5Archive8); - } - if (client.gameState == 10) { - Static73.method1596(false); - } - if (client.gameState == 30) { - client.setGameState(25); - } - } - @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) { Static113.anInt4612 = arg3; diff --git a/client/src/main/java/Static142.java b/client/src/main/java/Static142.java index 3eef721..19bebc2 100644 --- a/client/src/main/java/Static142.java +++ b/client/src/main/java/Static142.java @@ -7,9 +7,6 @@ public final class Static142 { @OriginalMember(owner = "client!lc", name = "n", descriptor = "I") public static int originZ; - @OriginalMember(owner = "client!lc", name = "m", descriptor = "Lclient!na;") - public static final JagString aClass100_667 = JagString.parse("settings="); - @OriginalMember(owner = "client!lc", name = "a", descriptor = "(IIIIIII)V") public static void method2726(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { Static277.anInt5854 = 0; @@ -27,7 +24,7 @@ public final class Static142 { } else if (PlayerList.size > local5) { local17 = PlayerList.players[PlayerList.ids[local5]]; } else { - local17 = Static175.npcs[Static33.anIntArray79[local5 - PlayerList.size]]; + local17 = NpcList.npcs[Static33.anIntArray79[local5 - PlayerList.size]]; } if (local17 != null && local17.method2682()) { @Pc(58) NpcType local58; @@ -101,7 +98,7 @@ public final class Static142 { } } } - if (local17.chatMessage != null && (local5 >= PlayerList.size || Static59.anInt1812 == 0 || Static59.anInt1812 == 3 || Static59.anInt1812 == 1 && Static98.method1965(((Player) local17).username))) { + if (local17.chatMessage != null && (local5 >= PlayerList.size || Chat.publicFilter == 0 || Chat.publicFilter == 3 || Chat.publicFilter == 1 && FriendsList.contains(((Player) local17).username))) { Static180.method3326(arg4 >> 1, arg3, local17, arg5, local17.method2691(), arg1 >> 1); if (Static65.anInt1951 > -1 && Static277.anInt5854 < Static191.anInt4506) { Static191.anIntArray389[Static277.anInt5854] = Fonts.b12Full.getStringWidth(local17.chatMessage) / 2; @@ -307,8 +304,4 @@ public final class Static142 { } } - @OriginalMember(owner = "client!lc", name = "a", descriptor = "(B)I") - public static int getIdleLoops() { - return Static93.anInt2467; - } } diff --git a/client/src/main/java/Static143.java b/client/src/main/java/Static143.java index 00a93f6..ed83f71 100644 --- a/client/src/main/java/Static143.java +++ b/client/src/main/java/Static143.java @@ -3,9 +3,6 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static143 { - @OriginalMember(owner = "client!ld", name = "a", descriptor = "[I") - public static final int[] anIntArray329 = new int[] { 2, 2, 4, 0, 1, 8, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 }; - @OriginalMember(owner = "client!ld", name = "b", descriptor = "[Lclient!nc;") public static final Class102[] aClass102Array1 = new Class102[4]; diff --git a/client/src/main/java/Static145.java b/client/src/main/java/Static145.java index 966e667..2b1f2bd 100644 --- a/client/src/main/java/Static145.java +++ b/client/src/main/java/Static145.java @@ -7,10 +7,7 @@ public final class Static145 { @OriginalMember(owner = "client!lf", name = "a", descriptor = "[[I") public static final int[][] anIntArrayArray25 = new int[104][104]; - @OriginalMember(owner = "client!lf", name = "d", descriptor = "[I") - public static final int[] anIntArray331 = new int[1000]; - - @OriginalMember(owner = "client!lf", name = "k", descriptor = "I") + @OriginalMember(owner = "client!lf", name = "k", descriptor = "I") public static int anInt3502 = -1; @OriginalMember(owner = "client!lf", name = "a", descriptor = "(I)V") diff --git a/client/src/main/java/Static146.java b/client/src/main/java/Static146.java index e094de8..c90b36f 100644 --- a/client/src/main/java/Static146.java +++ b/client/src/main/java/Static146.java @@ -30,8 +30,8 @@ public final class Static146 { Static235.anInt5276 = arg0; for (@Pc(3) int local3 = 0; local3 < Static152.mapSizeX; local3++) { for (@Pc(8) int local8 = 0; local8 < Static99.mapSizeZ; local8++) { - if (Static130.aClass3_Sub5ArrayArrayArray1[arg0][local3][local8] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[arg0][local3][local8] = new Tile(arg0, local3, local8); + if (SceneGraph.tiles[arg0][local3][local8] == null) { + SceneGraph.tiles[arg0][local3][local8] = new Tile(arg0, local3, local8); } } } diff --git a/client/src/main/java/Static147.java b/client/src/main/java/Static147.java index 0180127..69a618eb 100644 --- a/client/src/main/java/Static147.java +++ b/client/src/main/java/Static147.java @@ -4,10 +4,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static147 { - @OriginalMember(owner = "client!lh", name = "u", descriptor = "I") - public static volatile int anInt3521 = -1; - - @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!lh", name = "b", descriptor = "(II)V") diff --git a/client/src/main/java/Static148.java b/client/src/main/java/Static148.java index c8eb0ac..881c13d 100644 --- a/client/src/main/java/Static148.java +++ b/client/src/main/java/Static148.java @@ -16,16 +16,6 @@ public final class Static148 { @OriginalMember(owner = "client!li", name = "p", descriptor = "Lclient!na;") public static final JagString aClass100_677 = JagString.parse("::rebuild"); - @OriginalMember(owner = "client!li", name = "a", descriptor = "(ZI)V") - public static void method2765(@OriginalArg(1) int arg0) { - if (arg0 == -1 && !MidiPlayer.jingle) { - Static241.method4548(); - } else if (arg0 != -1 && (MusicPlayer.groupId != arg0 || !Static136.method2655()) && Preferences.musicVolume != 0 && !MidiPlayer.jingle) { - MidiPlayer.playFadeOut(arg0, client.js5Archive6, Preferences.musicVolume); - } - MusicPlayer.groupId = arg0; - } - @OriginalMember(owner = "client!li", name = "a", descriptor = "(III)V") public static void method2766(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { Static7.varps[arg0] = arg1; @@ -38,16 +28,4 @@ public final class Static148 { } } - @OriginalMember(owner = "client!li", name = "a", descriptor = "(II)Lclient!dd;") - public static SoftwareFont method2768(@OriginalArg(1) int arg0) { - @Pc(16) SoftwareFont local16 = (SoftwareFont) FontMetricsList.fontMetrics.get((long) arg0); - if (local16 != null) { - return local16; - } - @Pc(26) byte[] local26 = client.js5Archive13.getFile(arg0, 0); - local16 = new SoftwareFont(local26); - local16.setNameIcons(Sprites.nameIcons, null); - FontMetricsList.fontMetrics.put(local16, (long) arg0); - return local16; - } } diff --git a/client/src/main/java/Static15.java b/client/src/main/java/Static15.java index fc16c30..92da0f4 100644 --- a/client/src/main/java/Static15.java +++ b/client/src/main/java/Static15.java @@ -10,9 +10,6 @@ public final class Static15 { @OriginalMember(owner = "client!be", name = "ib", descriptor = "Lclient!na;") public static final JagString EVENT_OPBASE = JagString.parse("event_opbase"); - @OriginalMember(owner = "client!be", name = "ac", descriptor = "Lclient!na;") - public static JagString aClass100_87 = null; - @OriginalMember(owner = "client!be", name = "Ec", descriptor = "I") public static int anInt506 = -1; @@ -29,18 +26,6 @@ public final class Static15 { return JagString.concatenate(new JagString[] { Static61.aClass100_424, local8, Static80.aClass100_886, Static123.parseInt(client.language), Static257.aClass100_98, Static123.parseInt(client.affiliate), local10, Static41.aClass100_268 }); } - @OriginalMember(owner = "client!be", name = "a", descriptor = "(III)I") - public static int method484(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - @Pc(10) Inv local10 = (Inv) Static20.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 = "(II)I") public static int method492(@OriginalArg(1) int arg0) { return arg0 == 16711935 ? -1 : Static105.method2253(arg0); diff --git a/client/src/main/java/Static150.java b/client/src/main/java/Static150.java index f63597e..32b0699 100644 --- a/client/src/main/java/Static150.java +++ b/client/src/main/java/Static150.java @@ -10,10 +10,7 @@ public final class Static150 { @OriginalMember(owner = "client!lk", name = "V", descriptor = "I") public static int anInt3582 = 0; - @OriginalMember(owner = "client!lk", name = "Z", descriptor = "I") - public static int clickButton = 0; - - @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.anInt445; @Pc(7) int local7 = arg2.anInt459; @@ -49,7 +46,7 @@ public final class Static150 { if (arg2.dynamicHeightValue == 4) { arg2.anInt459 = arg2.aspectHeight * arg2.anInt445 / arg2.aspectWidth; } - if (Static121.aBoolean154 && (Static36.method940(arg2).anInt546 != 0 || arg2.type == 0)) { + if (Static121.aBoolean154 && (InterfaceList.getServerActiveProperties(arg2).anInt546 != 0 || arg2.type == 0)) { if (arg2.anInt459 < 5 && arg2.anInt445 < 5) { arg2.anInt459 = 5; arg2.anInt445 = 5; diff --git a/client/src/main/java/Static152.java b/client/src/main/java/Static152.java index 0e0c772..b26282c 100644 --- a/client/src/main/java/Static152.java +++ b/client/src/main/java/Static152.java @@ -1,6 +1,5 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static152 { @@ -15,71 +14,11 @@ public final class Static152 { @OriginalMember(owner = "client!ma", name = "a", descriptor = "(IIBIIII)V") public static void method2826(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) { - if (arg4 - arg3 >= Static172.anInt4164 && Static224.anInt5063 >= arg4 + arg3 && Static267.anInt5773 <= arg1 - arg3 && Static106.anInt2869 >= arg3 + arg1) { + if (arg4 - arg3 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg4 + arg3 && TextureOp29.anInt5773 <= arg1 - arg3 && TextureOp29.anInt2869 >= arg3 + arg1) { Static8.method120(arg5, arg0, arg1, arg2, arg3, arg4); } else { Static280.method4670(arg2, arg1, arg3, arg5, arg0, arg4); } } - @OriginalMember(owner = "client!ma", name = "a", descriptor = "([IIIIII)V") - public static void method2835(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg2][arg3][arg4]; - if (local7 == null) { - return; - } - @Pc(13) PlainTile local13 = local7.aClass131_1; - @Pc(23) int local23; - if (local13 != null) { - @Pc(18) int local18 = local13.anInt4871; - if (local18 != 0) { - for (local23 = 0; local23 < 4; local23++) { - arg0[arg1] = local18; - arg0[arg1 + 1] = local18; - arg0[arg1 + 2] = local18; - arg0[arg1 + 3] = local18; - arg1 += 512; - } - } - return; - } - @Pc(58) ShapedTile local58 = local7.aClass43_1; - 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 = Static132.anIntArrayArray24[local23]; - @Pc(81) int[] local81 = Static271.anIntArrayArray46[local67]; - @Pc(83) int local83 = 0; - @Pc(87) int local87; - if (local70 != 0) { - for (local87 = 0; local87 < 4; local87++) { - arg0[arg1] = local77[local81[local83++]] == 0 ? local70 : local73; - arg0[arg1 + 1] = local77[local81[local83++]] == 0 ? local70 : local73; - arg0[arg1 + 2] = local77[local81[local83++]] == 0 ? local70 : local73; - arg0[arg1 + 3] = local77[local81[local83++]] == 0 ? local70 : local73; - arg1 += 512; - } - return; - } - for (local87 = 0; local87 < 4; local87++) { - if (local77[local81[local83++]] != 0) { - arg0[arg1] = local73; - } - if (local77[local81[local83++]] != 0) { - arg0[arg1 + 1] = local73; - } - if (local77[local81[local83++]] != 0) { - arg0[arg1 + 2] = local73; - } - if (local77[local81[local83++]] != 0) { - arg0[arg1 + 3] = local73; - } - arg1 += 512; - } - } - } diff --git a/client/src/main/java/Static153.java b/client/src/main/java/Static153.java index bf6fa39..60c19d6 100644 --- a/client/src/main/java/Static153.java +++ b/client/src/main/java/Static153.java @@ -25,34 +25,6 @@ public final class Static153 { @OriginalMember(owner = "client!mc", name = "tb", descriptor = "S") public static short aShort22 = 1; - @OriginalMember(owner = "client!mc", name = "c", descriptor = "(III)V") - public static void method2905(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(14) DelayedStateChange local14 = Static238.method4143(7, arg0); - local14.pushServer(); - local14.intArg1 = arg1; - } - - @OriginalMember(owner = "client!mc", name = "a", descriptor = "(IIIIIIII)V") - public static void method2907(@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(9) int local9 = arg4 + arg1; - @Pc(13) int local13 = arg4 + arg6; - @Pc(15) int local15; - for (local15 = arg1; local15 < local9; local15++) { - Static131.method2576(Static71.anIntArrayArray10[local15], arg6, arg5, arg0); - } - @Pc(34) int local34 = arg2 - arg4; - @Pc(39) int local39 = arg5 - arg4; - for (local15 = arg2; local15 > local34; local15--) { - Static131.method2576(Static71.anIntArrayArray10[local15], arg6, arg5, arg0); - } - for (local15 = local9; local15 <= local34; local15++) { - @Pc(72) int[] local72 = Static71.anIntArrayArray10[local15]; - Static131.method2576(local72, arg6, local13, arg0); - Static131.method2576(local72, local13, local39, arg3); - Static131.method2576(local72, local39, arg5, arg0); - } - } - @OriginalMember(owner = "client!mc", name = "f", descriptor = "(B)V") public static void method2909() { Protocol.outboundBuffer.p1isaac(184); diff --git a/client/src/main/java/Static155.java b/client/src/main/java/Static155.java index 9f31778..56231aa 100644 --- a/client/src/main/java/Static155.java +++ b/client/src/main/java/Static155.java @@ -10,26 +10,6 @@ public final class Static155 { @OriginalMember(owner = "client!me", name = "k", descriptor = "I") public static int anInt3718 = -1; - @OriginalMember(owner = "client!me", name = "P", descriptor = "[I") - public static final int[] varcs = new int[2000]; - - @OriginalMember(owner = "client!me", name = "a", descriptor = "(IB)V") - public static void method2940(@OriginalArg(0) int arg0) { - WorldMap.anInt4901 = -1; - if (arg0 == 37) { - WorldMap.targetZoom = 3.0F; - } else if (arg0 == 50) { - WorldMap.targetZoom = 4.0F; - } else if (arg0 == 75) { - WorldMap.targetZoom = 6.0F; - } else if (arg0 == 100) { - WorldMap.targetZoom = 8.0F; - } else if (arg0 == 200) { - WorldMap.targetZoom = 16.0F; - } - WorldMap.anInt4901 = -1; - } - @OriginalMember(owner = "client!me", name = "a", descriptor = "(ZLclient!na;I)V") public static void method2941(@OriginalArg(0) boolean arg0, @OriginalArg(1) JagString arg1) { @Pc(8) short[] local8 = new short[16]; @@ -39,8 +19,8 @@ public final class Static155 { @Pc(27) ObjType local27 = ObjTypeList.get(local16); if ((!arg0 || local27.stockMarket) && local27.certificateTemplate == -1 && local27.lentTemplate == -1 && local27.dummyItem == 0 && local27.name.toLowerCase().indexOf(local12) != -1) { if (local14 >= 250) { - Static169.aShortArray52 = null; - Static111.anInt2905 = -1; + Find.results = null; + Find.index = -1; return; } if (local14 >= local8.length) { @@ -53,14 +33,14 @@ public final class Static155 { local8[local14++] = (short) local16; } } - Static169.aShortArray52 = local8; - Static67.anInt3356 = 0; - Static111.anInt2905 = local14; - @Pc(117) JagString[] local117 = new JagString[Static111.anInt2905]; - for (@Pc(119) int local119 = 0; local119 < Static111.anInt2905; local119++) { + Find.results = local8; + Find.size = 0; + Find.index = local14; + @Pc(117) JagString[] local117 = new JagString[Find.index]; + for (@Pc(119) int local119 = 0; local119 < Find.index; local119++) { local117[local119] = ObjTypeList.get(local8[local119]).name; } - Static202.method3656(local117, Static169.aShortArray52); + Static202.method3656(local117, Find.results); } @OriginalMember(owner = "client!me", name = "a", descriptor = "(II)I") diff --git a/client/src/main/java/Static156.java b/client/src/main/java/Static156.java index 7bc1eb4..a86e931 100644 --- a/client/src/main/java/Static156.java +++ b/client/src/main/java/Static156.java @@ -101,14 +101,6 @@ public final class Static156 { Static248.method3292(arg0, arg1, arg2, arg5, arg11, arg12, arg13, arg14); } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "(JI)V") - public static void method2956(@OriginalArg(0) long arg0) { - if ((long) 0 != arg0) { - Protocol.outboundBuffer.p1isaac(104); - Protocol.outboundBuffer.p8(arg0); - } - } - @OriginalMember(owner = "client!mf", name = "a", descriptor = "()V") public static void method2959() { @Pc(1) GL2 local1 = GlRenderer.gl; @@ -123,7 +115,7 @@ public final class Static156 { if (local31.anInt2485 >= 0 && Rasteriser.textureProvider.method3237(local31.anInt2485) == 4) { local1.glColor4fv(Static190.method3441(local31.anInt2486), 0); @Pc(57) float local57 = 201.5F - (local31.aBoolean140 ? 1.0F : 0.5F); - local31.method1944(Static130.aClass3_Sub5ArrayArrayArray1, local57, true); + local31.method1944(SceneGraph.tiles, local57, true); } } local1.glEnableClientState(GL2.GL_COLOR_ARRAY); diff --git a/client/src/main/java/Static158.java b/client/src/main/java/Static158.java index 86a316b..4d87041 100644 --- a/client/src/main/java/Static158.java +++ b/client/src/main/java/Static158.java @@ -39,14 +39,14 @@ public final class Static158 { @Pc(129) int local129 = local103 & 0x3F; @Pc(142) int local142 = local129 + (Static238.regionBitPacked[local16] & 0xFF) * 64 - Static142.originZ; @Pc(148) NpcType local148 = NpcTypeList.get(local74.g2()); - if (Static175.npcs[local97] == null && (local148.aByte10 & 0x1) > 0 && local107 == Static41.anInt1316 && local125 >= 0 && local148.soze + local125 < 104 && local142 >= 0 && local142 + local148.soze < 104) { - Static175.npcs[local97] = new Npc(); - @Pc(198) Npc local198 = Static175.npcs[local97]; + if (NpcList.npcs[local97] == null && (local148.aByte10 & 0x1) > 0 && local107 == Static41.anInt1316 && local125 >= 0 && local148.soze + local125 < 104 && local142 >= 0 && local142 + local148.soze < 104) { + NpcList.npcs[local97] = new Npc(); + @Pc(198) Npc local198 = NpcList.npcs[local97]; Static33.anIntArray79[Static272.anInt5214++] = local97; local198.lastSeenLoop = client.loop; local198.method2698(local148); local198.method2692(local198.type.soze); - local198.anInt3400 = local198.anInt3381 = Static56.anIntArray141[local198.type.aByte11]; + local198.anInt3400 = local198.anInt3381 = PathingEntity.ANGLES[local198.type.aByte11]; local198.anInt3376 = local198.type.anInt3733; if (local198.anInt3376 == 0) { local198.anInt3381 = 0; diff --git a/client/src/main/java/Static16.java b/client/src/main/java/Static16.java index 13b6d9b..ca519d9 100644 --- a/client/src/main/java/Static16.java +++ b/client/src/main/java/Static16.java @@ -20,7 +20,7 @@ public final class Static16 { if (!GlRenderer.enabled || Static231.aBoolean252) { return; } - @Pc(14) Tile[][][] local14 = Static130.aClass3_Sub5ArrayArrayArray1; + @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++) { diff --git a/client/src/main/java/Static160.java b/client/src/main/java/Static160.java index e49efed..928efc9 100644 --- a/client/src/main/java/Static160.java +++ b/client/src/main/java/Static160.java @@ -4,9 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static160 { - @OriginalMember(owner = "client!mj", name = "u", descriptor = "B") - public static byte aByte14; - @OriginalMember(owner = "client!mj", name = "d", descriptor = "[Lclient!na;") public static final JagString[] aClass100Array121 = new JagString[8]; diff --git a/client/src/main/java/Static163.java b/client/src/main/java/Static163.java index 6dd1483..f04d746 100644 --- a/client/src/main/java/Static163.java +++ b/client/src/main/java/Static163.java @@ -18,10 +18,10 @@ public final class Static163 { @OriginalMember(owner = "client!n", name = "a", descriptor = "(IIIIII)V") public static void method3105(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - @Pc(11) int local11 = Static78.method1690(Static106.anInt2869, arg2, Static267.anInt5773); - @Pc(17) int local17 = Static78.method1690(Static106.anInt2869, arg4, Static267.anInt5773); - @Pc(23) int local23 = Static78.method1690(Static224.anInt5063, arg3, Static172.anInt4164); - @Pc(35) int local35 = Static78.method1690(Static224.anInt5063, arg1, Static172.anInt4164); + @Pc(11) int local11 = Static78.method1690(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); + @Pc(17) int local17 = Static78.method1690(TextureOp29.anInt2869, arg4, TextureOp29.anInt5773); + @Pc(23) int local23 = Static78.method1690(TextureOp29.anInt5063, arg3, TextureOp29.anInt4164); + @Pc(35) int local35 = Static78.method1690(TextureOp29.anInt5063, arg1, TextureOp29.anInt4164); for (@Pc(37) int local37 = local11; local37 <= local17; local37++) { Static131.method2576(Static71.anIntArrayArray10[local37], local23, local35, arg0); } diff --git a/client/src/main/java/Static164.java b/client/src/main/java/Static164.java index 1d0f9b3..29ecb36 100644 --- a/client/src/main/java/Static164.java +++ b/client/src/main/java/Static164.java @@ -194,7 +194,7 @@ public final class Static164 { @Pc(125) int[] local125 = new int[4]; SoftwareRaster.method2497(local125); @Pc(133) SoftwareSprite local133 = new SoftwareSprite(36, 32); - SoftwareRaster.method2491(local133.anIntArray20, 36, 32); + SoftwareRaster.method2491(local133.pixels, 36, 32); Rasteriser.prepare(); Rasteriser.setBounds(16, 16); @Pc(145) int local145 = local5.zoom2d; @@ -212,7 +212,7 @@ public final class Static164 { if (arg4 >= 2) { local133.method303(16777215); } - SoftwareRaster.method2491(local133.anIntArray20, 36, 32); + SoftwareRaster.method2491(local133.pixels, 36, 32); } if (arg0 != 0) { local133.method314(arg0); @@ -220,7 +220,7 @@ public final class Static164 { if (local5.certificateTemplate != -1) { local71.method1423(0, 0); } else if (local5.lentTemplate != -1) { - SoftwareRaster.method2491(local71.anIntArray20, 36, 32); + SoftwareRaster.method2491(local71.pixels, 36, 32); local133.method1423(0, 0); local133 = local71; } diff --git a/client/src/main/java/Static165.java b/client/src/main/java/Static165.java index 2c559c8..44c2663 100644 --- a/client/src/main/java/Static165.java +++ b/client/src/main/java/Static165.java @@ -16,9 +16,6 @@ public final class Static165 { @OriginalMember(owner = "client!nb", name = "d", descriptor = "I") public static int anInt4035 = 0; - @OriginalMember(owner = "client!nb", name = "j", descriptor = "I") - public static volatile int anInt4039 = -1; - @OriginalMember(owner = "client!nb", name = "m", descriptor = "Lclient!na;") public static final JagString aClass100_776 = JagString.parse("logo"); @@ -66,7 +63,7 @@ public final class Static165 { public static void method3163(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) { if (arg1 == arg4) { Static82.method1760(arg4, arg2, arg0, arg3); - } else if (Static172.anInt4164 <= arg2 - arg4 && arg2 + arg4 <= Static224.anInt5063 && arg3 - arg1 >= Static267.anInt5773 && arg3 + arg1 <= Static106.anInt2869) { + } else if (TextureOp29.anInt4164 <= arg2 - arg4 && arg2 + arg4 <= TextureOp29.anInt5063 && arg3 - arg1 >= TextureOp29.anInt5773 && arg3 + arg1 <= TextureOp29.anInt2869) { Static72.method1568(arg3, arg2, arg4, arg1, arg0); } else { Static35.method898(arg0, arg1, arg4, arg2, arg3); diff --git a/client/src/main/java/Static166.java b/client/src/main/java/Static166.java index 1b9e8e7..35f9c64 100644 --- a/client/src/main/java/Static166.java +++ b/client/src/main/java/Static166.java @@ -5,9 +5,6 @@ public final class Static166 { @OriginalMember(owner = "client!nc", name = "a", descriptor = "I") public static int anInt4044; - @OriginalMember(owner = "client!nc", name = "m", descriptor = "I") - public static int anInt4054 = 0; - @OriginalMember(owner = "client!nc", name = "n", descriptor = "I") public static int anInt4055 = 0; diff --git a/client/src/main/java/Static169.java b/client/src/main/java/Static169.java index 05bf1ba..5118dd7 100644 --- a/client/src/main/java/Static169.java +++ b/client/src/main/java/Static169.java @@ -5,9 +5,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static169 { - @OriginalMember(owner = "client!nf", name = "c", descriptor = "[S") - public static short[] aShortArray52; - @OriginalMember(owner = "client!nf", name = "e", descriptor = "I") public static int anInt4073; diff --git a/client/src/main/java/Static17.java b/client/src/main/java/Static17.java index 9e3bdc9..c5e43e6 100644 --- a/client/src/main/java/Static17.java +++ b/client/src/main/java/Static17.java @@ -7,10 +7,7 @@ public final class Static17 { @OriginalMember(owner = "client!bg", name = "z", descriptor = "Lclient!na;") public static final JagString aClass100_101 = JagString.parse("k"); - @OriginalMember(owner = "client!bg", name = "M", descriptor = "I") - public static int milliseconds = 0; - - @OriginalMember(owner = "client!bg", name = "d", descriptor = "(II)Z") + @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; } diff --git a/client/src/main/java/Static170.java b/client/src/main/java/Static170.java index 470c7d7..80fb7ef 100644 --- a/client/src/main/java/Static170.java +++ b/client/src/main/java/Static170.java @@ -28,10 +28,10 @@ public final class Static170 { local6.anInt733 = arg3; local6.aLong26 = arg5; local6.aBoolean49 = arg6; - if (Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); + if (SceneGraph.tiles[arg0][arg1][arg2] == null) { + SceneGraph.tiles[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass15_1 = local6; + SceneGraph.tiles[arg0][arg1][arg2].aClass15_1 = local6; } @OriginalMember(owner = "client!nh", name = "a", descriptor = "(IIIIIIIIIIIII)V") diff --git a/client/src/main/java/Static171.java b/client/src/main/java/Static171.java index 36b924e..bdec49c 100644 --- a/client/src/main/java/Static171.java +++ b/client/src/main/java/Static171.java @@ -40,10 +40,4 @@ public final class Static171 { } } - @OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;I)V") - public static void method3221(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) { - Protocol.outboundBuffer.p1isaac(188); - Protocol.outboundBuffer.p1a(arg1); - Protocol.outboundBuffer.p8(arg0.encode37()); - } } diff --git a/client/src/main/java/Static172.java b/client/src/main/java/Static172.java index f5b4d98..f73311a 100644 --- a/client/src/main/java/Static172.java +++ b/client/src/main/java/Static172.java @@ -16,15 +16,9 @@ public final class Static172 { @OriginalMember(owner = "client!nj", name = "k", descriptor = "I") public static int anInt4165; - @OriginalMember(owner = "client!nj", name = "a", descriptor = "Z") - public static boolean shiftClick = false; - - @OriginalMember(owner = "client!nj", name = "h", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!nj", name = "h", descriptor = "Lclient!ih;") public static final LinkedList aClass69_97 = new LinkedList(); - @OriginalMember(owner = "client!nj", name = "i", descriptor = "I") - public static int anInt4164 = 0; - @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) { diff --git a/client/src/main/java/Static173.java b/client/src/main/java/Static173.java index e59f8dc..0c38905 100644 --- a/client/src/main/java/Static173.java +++ b/client/src/main/java/Static173.java @@ -18,7 +18,7 @@ public final class Static173 { @Pc(158) int local158; @Pc(171) int local171; for (local7 = 0; local7 < Static272.anInt5214; local7++) { - local16 = Static175.npcs[Static33.anIntArray79[local7]]; + local16 = NpcList.npcs[Static33.anIntArray79[local7]]; if (local16 != null && local16.method2682() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) { @Pc(42) int local42 = local16.getSize(); @Pc(97) int local97; @@ -56,7 +56,7 @@ public final class Static173 { } } label200: for (local7 = 0; local7 < Static272.anInt5214; local7++) { - local16 = Static175.npcs[Static33.anIntArray79[local7]]; + local16 = NpcList.npcs[Static33.anIntArray79[local7]]; @Pc(262) long local262 = (long) Static33.anIntArray79[local7] << 32 | 0x20000000L; if (local16 != null && local16.method2682() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) { local107 = local16.getSize(); @@ -129,38 +129,38 @@ public final class Static173 { @OriginalMember(owner = "client!nk", name = "a", descriptor = "(IIIIIB)V") public static void method3246(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { - if (arg4 > Static106.anInt2869 || arg2 < Static267.anInt5773) { + if (arg4 > TextureOp29.anInt2869 || arg2 < TextureOp29.anInt5773) { return; } @Pc(24) boolean local24; - if (Static172.anInt4164 > arg1) { + if (TextureOp29.anInt4164 > arg1) { local24 = false; - arg1 = Static172.anInt4164; - } else if (Static224.anInt5063 >= arg1) { + arg1 = TextureOp29.anInt4164; + } else if (TextureOp29.anInt5063 >= arg1) { local24 = true; } else { local24 = false; - arg1 = Static224.anInt5063; + arg1 = TextureOp29.anInt5063; } @Pc(43) boolean local43; - if (arg3 < Static172.anInt4164) { - arg3 = Static172.anInt4164; + if (arg3 < TextureOp29.anInt4164) { + arg3 = TextureOp29.anInt4164; local43 = false; - } else if (arg3 > Static224.anInt5063) { - arg3 = Static224.anInt5063; + } else if (arg3 > TextureOp29.anInt5063) { + arg3 = TextureOp29.anInt5063; local43 = false; } else { local43 = true; } - if (Static267.anInt5773 > arg4) { - arg4 = Static267.anInt5773; + if (TextureOp29.anInt5773 > arg4) { + arg4 = TextureOp29.anInt5773; } else { Static131.method2576(Static71.anIntArrayArray10[arg4++], arg1, arg3, arg0); } - if (arg2 <= Static106.anInt2869) { + if (arg2 <= TextureOp29.anInt2869) { Static131.method2576(Static71.anIntArrayArray10[arg2--], arg1, arg3, arg0); } else { - arg2 = Static106.anInt2869; + arg2 = TextureOp29.anInt2869; } @Pc(98) int local98; if (local24 && local43) { diff --git a/client/src/main/java/Static175.java b/client/src/main/java/Static175.java index 9d0913a..d6e9b15 100644 --- a/client/src/main/java/Static175.java +++ b/client/src/main/java/Static175.java @@ -8,9 +8,6 @@ public final class Static175 { @OriginalMember(owner = "client!nm", name = "W", descriptor = "Lclient!na;") public static JagString url; - @OriginalMember(owner = "client!nm", name = "S", descriptor = "[Lclient!km;") - public static final Npc[] npcs = new Npc[32768]; - @OriginalMember(owner = "client!nm", name = "U", descriptor = "I") public static int mapFilesMissingCount = 0; diff --git a/client/src/main/java/Static176.java b/client/src/main/java/Static176.java index b1da26b..796091a 100644 --- a/client/src/main/java/Static176.java +++ b/client/src/main/java/Static176.java @@ -27,11 +27,11 @@ public final class Static176 { } else if (SignLink.anInt5928 == 1 || SignLink.anInt5928 == 2 || client.modeWhere == 2) { @Pc(31) byte[] local31 = local3.hostname.method3148(); client.hostname = new String(local31, 0, local31.length); - Static125.worldId = local3.id; + Player.worldId = local3.id; if (client.modeWhere != 0) { - client.defaultPort = Static125.worldId + 43594; // 40000; + client.defaultPort = Player.worldId + 43594; // 40000; client.port = client.defaultPort; - client.alternatePort = Static125.worldId + 43594; // 50000; + client.alternatePort = Player.worldId + 43594; // 50000; } return true; } else { @@ -148,12 +148,12 @@ public final class Static176 { @Pc(502) Npc local502; @Pc(597) Player local597; if (local133 == 1) { - @Pc(421) Npc local421 = Static175.npcs[local140]; + @Pc(421) Npc local421 = NpcList.npcs[local140]; if ((local421.type.soze & 0x1) == 0 && (local421.xFine & 0x7F) == 0 && (local421.zFine & 0x7F) == 0 || (local421.type.soze & 0x1) == 1 && (local421.xFine & 0x7F) == 64 && (local421.zFine & 0x7F) == 64) { local479 = local421.xFine + 64 - local421.type.soze * 64; local240 = local421.zFine - (local421.type.soze - 1) * 64; for (local493 = 0; local493 < Static272.anInt5214; local493++) { - local502 = Static175.npcs[Static33.anIntArray79[local493]]; + local502 = NpcList.npcs[Static33.anIntArray79[local493]]; local514 = local502.xFine + 64 - local502.type.soze * 64; local526 = local502.zFine + 64 - local502.type.soze * 64; if (local502 != null && local421 != local502 && local514 >= local479 && local421.type.soze - (local514 - local479 >> 7) >= local502.type.soze && local240 <= local526 && local502.type.soze <= local421.type.soze - (local526 - local240 >> 7)) { @@ -177,7 +177,7 @@ public final class Static176 { local479 = local688.xFine - (local688.getSize() - 1) * 64; local240 = local688.zFine + 64 - local688.getSize() * 64; for (local493 = 0; local493 < Static272.anInt5214; local493++) { - local502 = Static175.npcs[Static33.anIntArray79[local493]]; + local502 = NpcList.npcs[Static33.anIntArray79[local493]]; local514 = local502.xFine + 64 - local502.type.soze * 64; local526 = local502.zFine + 64 - local502.type.soze * 64; if (local502 != null && local514 >= local479 && local502.type.soze <= local688.getSize() - (local514 - local479 >> 7) && local526 >= local240 && local502.type.soze <= local688.getSize() - (local526 - local240 >> 7)) { @@ -257,27 +257,27 @@ public final class Static176 { if (arg3 == 0) { local12 = new PlainTile(arg10, arg11, arg12, arg13, -1, arg18, false); for (local14 = arg0; local14 >= 0; local14--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] = new Tile(local14, arg1, arg2); + if (SceneGraph.tiles[local14][arg1][arg2] == null) { + SceneGraph.tiles[local14][arg1][arg2] = new Tile(local14, arg1, arg2); } } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass131_1 = local12; + SceneGraph.tiles[arg0][arg1][arg2].plainTile = local12; } else if (arg3 == 1) { local12 = new PlainTile(arg14, arg15, arg16, arg17, arg5, arg19, arg6 == arg7 && arg6 == arg8 && arg6 == arg9); for (local14 = arg0; local14 >= 0; local14--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] = new Tile(local14, arg1, arg2); + if (SceneGraph.tiles[local14][arg1][arg2] == null) { + SceneGraph.tiles[local14][arg1][arg2] = new Tile(local14, arg1, arg2); } } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass131_1 = local12; + SceneGraph.tiles[arg0][arg1][arg2].plainTile = local12; } else { @Pc(134) ShapedTile local134 = new ShapedTile(arg3, arg4, arg5, arg1, arg2, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); for (local14 = arg0; local14 >= 0; local14--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local14][arg1][arg2] = new Tile(local14, arg1, arg2); + if (SceneGraph.tiles[local14][arg1][arg2] == null) { + SceneGraph.tiles[local14][arg1][arg2] = new Tile(local14, arg1, arg2); } } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass43_1 = local134; + SceneGraph.tiles[arg0][arg1][arg2].shapedTile = local134; } } diff --git a/client/src/main/java/Static178.java b/client/src/main/java/Static178.java index cdaa71e..f5a4c29 100644 --- a/client/src/main/java/Static178.java +++ b/client/src/main/java/Static178.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static178 { @@ -10,47 +8,4 @@ public final class Static178 { @OriginalMember(owner = "client!od", name = "i", descriptor = "I") public static int anInt4247 = 0; - @OriginalMember(owner = "client!od", name = "a", descriptor = "(ILclient!na;)V") - public static void method3318(@OriginalArg(1) JagString arg0) { - if (Static199.aClass3_Sub22Array1 == null) { - return; - } - @Pc(22) long local22 = arg0.encode37(); - @Pc(24) int local24 = 0; - if (local22 == 0L) { - return; - } - while (Static199.aClass3_Sub22Array1.length > local24 && Static199.aClass3_Sub22Array1[local24].key != local22) { - local24++; - } - if (local24 < Static199.aClass3_Sub22Array1.length && Static199.aClass3_Sub22Array1[local24] != null) { - Protocol.outboundBuffer.p1isaac(162); - Protocol.outboundBuffer.p8(Static199.aClass3_Sub22Array1[local24].key); - } - } - - @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) Static20.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; - } } diff --git a/client/src/main/java/Static18.java b/client/src/main/java/Static18.java index 23d8199..ead7210 100644 --- a/client/src/main/java/Static18.java +++ b/client/src/main/java/Static18.java @@ -83,12 +83,12 @@ public final class Static18 { @OriginalMember(owner = "client!bh", name = "a", descriptor = "(B)Lclient!ba;") public static World getFirstWorld() { Static51.worldPos = 0; - return Static88.getNextWorld(); + return WorldList.getNextWorld(); } @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 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return; } diff --git a/client/src/main/java/Static181.java b/client/src/main/java/Static181.java index 70f2c3e..8157a45 100644 --- a/client/src/main/java/Static181.java +++ b/client/src/main/java/Static181.java @@ -15,7 +15,7 @@ public final class Static181 { @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) { - if (arg5 >= Static172.anInt4164 && arg5 <= Static224.anInt5063 && arg0 >= Static172.anInt4164 && arg0 <= Static224.anInt5063 && arg6 >= Static172.anInt4164 && Static224.anInt5063 >= arg6 && Static172.anInt4164 <= arg1 && arg1 <= Static224.anInt5063 && Static267.anInt5773 <= arg4 && arg4 <= Static106.anInt2869 && arg7 >= Static267.anInt5773 && Static106.anInt2869 >= arg7 && arg2 >= Static267.anInt5773 && Static106.anInt2869 >= arg2 && arg3 >= Static267.anInt5773 && arg3 <= Static106.anInt2869) { + if (arg5 >= TextureOp29.anInt4164 && arg5 <= TextureOp29.anInt5063 && arg0 >= TextureOp29.anInt4164 && arg0 <= TextureOp29.anInt5063 && arg6 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg6 && TextureOp29.anInt4164 <= arg1 && arg1 <= TextureOp29.anInt5063 && TextureOp29.anInt5773 <= arg4 && arg4 <= TextureOp29.anInt2869 && arg7 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg7 && arg2 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg2 && arg3 >= TextureOp29.anInt5773 && arg3 <= TextureOp29.anInt2869) { Static38.method962(arg2, arg8, arg7, arg6, arg1, arg3, arg4, arg0, arg5); } else { Static165.method3162(arg5, arg0, arg7, arg8, arg3, arg2, arg1, arg6, arg4); diff --git a/client/src/main/java/Static185.java b/client/src/main/java/Static185.java index 6e47fc4..96a45a1 100644 --- a/client/src/main/java/Static185.java +++ b/client/src/main/java/Static185.java @@ -10,13 +10,6 @@ public final class Static185 { @OriginalMember(owner = "client!p", name = "g", descriptor = "F") public static float aFloat23; - @OriginalMember(owner = "client!p", name = "a", descriptor = "(I)V") - public static void method3395() { - if (LoginManager.step == 5) { - LoginManager.step = 6; - } - } - @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 && !SceneGraph.allLevelsAreVisible() && (Static12.tileSettings[0][arg7][arg8] & 0x2) == 0) { @@ -88,7 +81,7 @@ public final class Static185 { local261 |= 0x80000000L; } if (local62.hasAreaSound()) { - Static122.method2411(arg8, local62, arg9, null, arg7, arg2, null); + AreaSoundManager.add(arg8, local62, arg9, null, arg7, arg2, null); } @Pc(330) boolean local330 = local62.aBoolean212 & !arg3; local261 |= (long) arg5 << 32; diff --git a/client/src/main/java/Static187.java b/client/src/main/java/Static187.java index c0f6e6b..c76f67f 100644 --- a/client/src/main/java/Static187.java +++ b/client/src/main/java/Static187.java @@ -15,7 +15,7 @@ public final class Static187 { @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 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return null; } else { diff --git a/client/src/main/java/Static19.java b/client/src/main/java/Static19.java index ab37f14..436e988 100644 --- a/client/src/main/java/Static19.java +++ b/client/src/main/java/Static19.java @@ -31,36 +31,6 @@ public final class Static19 { } } - @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 < Static272.anInt5214; local11++) { - @Pc(68) int local68 = Static33.anIntArray79[local11]; - @Pc(72) Npc local72 = Static175.npcs[local68]; - if (local72 != null && local72.chatLoops > 0) { - local72.chatLoops--; - if (local72.chatLoops == 0) { - local72.chatMessage = null; - } - } - } - } - @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[Static268.method4585(arg1, arg2)]; diff --git a/client/src/main/java/Static190.java b/client/src/main/java/Static190.java index 6817feb..b822a9f 100644 --- a/client/src/main/java/Static190.java +++ b/client/src/main/java/Static190.java @@ -38,11 +38,4 @@ public final class Static190 { return local43; } - @OriginalMember(owner = "client!pf", name = "a", descriptor = "(III)V") - public static void method3444(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(14) DelayedStateChange local14 = Static238.method4143(13, arg1); - local14.pushServer(); - local14.intArg1 = arg0; - } - } diff --git a/client/src/main/java/Static192.java b/client/src/main/java/Static192.java index 185d35a..1163be0 100644 --- a/client/src/main/java/Static192.java +++ b/client/src/main/java/Static192.java @@ -1,105 +1,10 @@ import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static192 { @OriginalMember(owner = "client!ph", name = "b", descriptor = "[[Lclient!li;") public static final Environment[][] aClass92ArrayArray1 = new Environment[13][13]; - @OriginalMember(owner = "client!ph", name = "a", descriptor = "(B)V") - public static void loop() { - while (true) { - @Pc(17) Class3_Sub8 local17 = (Class3_Sub8) Static128.aClass69_77.removeHead(); - if (local17 == null) { - return; - } - @Pc(40) PathingEntity local40; - @Pc(29) int local29; - if (local17.anInt1192 < 0) { - local29 = -local17.anInt1192 - 1; - if (local29 == PlayerList.selfId) { - local40 = PlayerList.self; - } else { - local40 = PlayerList.players[local29]; - } - } else { - local29 = local17.anInt1192 - 1; - local40 = Static175.npcs[local29]; - } - if (local40 != null) { - @Pc(63) LocType local63 = LocTypeList.get(local17.anInt1189); - if (Player.level < 3) { - } - @Pc(86) int local86; - @Pc(83) int local83; - if (local17.anInt1206 == 1 || local17.anInt1206 == 3) { - local83 = local63.width; - local86 = local63.length; - } else { - local86 = local63.width; - local83 = local63.length; - } - @Pc(103) int local103 = (local86 + 1 >> 1) + local17.anInt1190; - @Pc(110) int local110 = (local86 >> 1) + local17.anInt1190; - @Pc(117) int local117 = (local83 >> 1) + local17.anInt1204; - @Pc(126) int local126 = (local83 + 1 >> 1) + local17.anInt1204; - @Pc(130) int[][] local130 = Static83.activeTileHeightMap[Player.level]; - @Pc(157) int local157 = local130[local103][local126] + local130[local110][local126] + local130[local110][local117] + local130[local103][local117] >> 2; - @Pc(159) Entity local159 = null; - @Pc(164) int local164 = Static133.anIntArray453[local17.anInt1198]; - if (local164 == 0) { - @Pc(176) Wall local176 = Static262.method4509(Player.level, local17.anInt1190, local17.anInt1204); - if (local176 != null) { - local159 = local176.aClass8_5; - } - } else if (local164 == 1) { - @Pc(231) WallDecor local231 = Static83.method435(Player.level, local17.anInt1190, local17.anInt1204); - if (local231 != null) { - local159 = local231.aClass8_3; - } - } else if (local164 == 2) { - @Pc(198) Scenery local198 = Static133.method4008(Player.level, local17.anInt1190, local17.anInt1204); - if (local198 != null) { - local159 = local198.aClass8_4; - } - } else if (local164 == 3) { - @Pc(216) GroundDecor local216 = Static269.method2210(Player.level, local17.anInt1190, local17.anInt1204); - if (local216 != null) { - local159 = local216.aClass8_1; - } - } - if (local159 != null) { - Static29.method800(Player.level, local17.anInt1204, 0, local17.anInt1190, local17.anInt1205 + 1, -1, local164, 0, local17.anInt1187 + 1); - local40.anInt3375 = local17.anInt1205 + client.loop; - local40.anInt3426 = local83 * 64 + local17.anInt1204 * 128; - local40.anInt3379 = local86 * 64 + local17.anInt1190 * 128; - local40.attachment = local159; - @Pc(292) int local292 = local17.anInt1188; - local40.anInt3406 = local157; - local40.anInt3390 = client.loop + local17.anInt1187; - @Pc(304) int local304 = local17.anInt1191; - @Pc(307) int local307 = local17.anInt1197; - @Pc(310) int local310 = local17.anInt1200; - @Pc(316) int local316; - if (local292 > local304) { - local316 = local292; - local292 = local304; - local304 = local316; - } - local40.anInt3411 = local17.anInt1190 + local304; - if (local307 > local310) { - local316 = local307; - local307 = local310; - local310 = local316; - } - local40.anInt3374 = local17.anInt1204 + local307; - local40.anInt3410 = local310 + local17.anInt1204; - local40.anInt3384 = local17.anInt1190 + local292; - } - } - } - } - @OriginalMember(owner = "client!ph", name = "b", descriptor = "(B)V") public static void method3474() { PlayerAppearance.aClass99_33.method3103(); diff --git a/client/src/main/java/Static193.java b/client/src/main/java/Static193.java index 186fa09..7566389 100644 --- a/client/src/main/java/Static193.java +++ b/client/src/main/java/Static193.java @@ -13,37 +13,6 @@ public final class Static193 { @OriginalMember(owner = "client!pi", name = "V", descriptor = "[Lclient!na;") public static final JagString[] aClass100Array134 = new JagString[100]; - @OriginalMember(owner = "client!pi", name = "a", descriptor = "(Lclient!na;BI)V") - public static void method3498(@OriginalArg(0) JagString arg0, @OriginalArg(2) int arg1) { - @Pc(10) DelayedStateChange local10 = Static238.method4143(2, arg1); - local10.pushServer(); - local10.stringArg = arg0; - } - - @OriginalMember(owner = "client!pi", name = "a", descriptor = "(JI)V") - public static void method3500(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - for (@Pc(13) int local13 = 0; local13 < Static9.anInt178; local13++) { - if (Static92.aLongArray3[local13] == arg0) { - Static9.anInt178--; - for (@Pc(41) int local41 = local13; local41 < Static9.anInt178; local41++) { - Static122.aClass100Array92[local41] = Static122.aClass100Array92[local41 + 1]; - Static104.anIntArray255[local41] = Static104.anIntArray255[local41 + 1]; - Static214.aClass100Array170[local41] = Static214.aClass100Array170[local41 + 1]; - Static92.aLongArray3[local41] = Static92.aLongArray3[local41 + 1]; - Static106.anIntArray258[local41] = Static106.anIntArray258[local41 + 1]; - Static3.aBooleanArray135[local41] = Static3.aBooleanArray135[local41 + 1]; - } - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(57); - Protocol.outboundBuffer.p8(arg0); - break; - } - } - } - @OriginalMember(owner = "client!pi", name = "a", descriptor = "([[[B[[B[[B[[I[[F[[I[[B[[B[[FI[[F[[I[[I[[II)[Lclient!hg;") public static GlTile[] method3501(@OriginalArg(0) byte[][][] arg0, @OriginalArg(1) byte[][] arg1, @OriginalArg(2) byte[][] arg2, @OriginalArg(3) int[][] arg3, @OriginalArg(4) float[][] arg4, @OriginalArg(5) int[][] arg5, @OriginalArg(6) byte[][] arg6, @OriginalArg(7) byte[][] arg7, @OriginalArg(8) float[][] arg8, @OriginalArg(9) int arg9, @OriginalArg(10) float[][] arg10, @OriginalArg(11) int[][] arg11, @OriginalArg(12) int[][] arg12, @OriginalArg(13) int[][] arg13) { @Pc(9) int[][] local9 = new int[105][105]; @@ -257,7 +226,7 @@ public final class Static193 { local493.method1943(); } } - local16 = local103.method3864(); + local16 = local103.size(); @Pc(1348) GlTile[] local1348 = new GlTile[local16]; local103.method3865(local1348); @Pc(1358) long[] local1358 = new long[local16]; diff --git a/client/src/main/java/Static195.java b/client/src/main/java/Static195.java index 3f1f77b..8a943b6 100644 --- a/client/src/main/java/Static195.java +++ b/client/src/main/java/Static195.java @@ -12,12 +12,7 @@ public final class Static195 { @OriginalMember(owner = "client!pk", name = "bb", descriptor = "Lclient!na;") public static JagString aClass100_859; - @OriginalMember(owner = "client!pk", name = "f", descriptor = "(B)I") - public static int getIdleLoops() { - return Keyboard.idleLoops; - } - - @OriginalMember(owner = "client!pk", name = "i", descriptor = "(I)V") + @OriginalMember(owner = "client!pk", name = "i", descriptor = "(I)V") public static void method3532() { for (@Pc(16) ProjAnimNode local16 = (ProjAnimNode) Static217.aClass69_116.method2289(); local16 != null; local16 = (ProjAnimNode) Static217.aClass69_116.method2288()) { @Pc(21) ProjAnim local21 = local16.aClass8_Sub6_1; @@ -25,7 +20,7 @@ public final class Static195 { local16.unlink(); } else if (client.loop >= local21.anInt4822) { if (local21.anInt4819 > 0) { - @Pc(54) Npc local54 = Static175.npcs[local21.anInt4819 - 1]; + @Pc(54) Npc local54 = NpcList.npcs[local21.anInt4819 - 1]; if (local54 != null && local54.xFine >= 0 && local54.xFine < 13312 && local54.zFine >= 0 && local54.zFine < 13312) { local21.method3705(local54.zFine, client.loop, SceneGraph.getTileHeight(local21.anInt4810, local54.xFine, local54.zFine) - local21.anInt4805, local54.xFine); } diff --git a/client/src/main/java/Static197.java b/client/src/main/java/Static197.java index e8b668d..71ac76b 100644 --- a/client/src/main/java/Static197.java +++ b/client/src/main/java/Static197.java @@ -122,7 +122,7 @@ public final class Static197 { if (arg2 && arg1 > 0) { GameShell.canvas.setIgnoreRepaint(true); if (!Static211.aBoolean73) { - Static65.method1500(); + SceneGraph.clear(); client.frameBuffer = null; client.frameBuffer = Static131.create(GameShell.canvasHeight, GameShell.canvasWidth, GameShell.canvas); SoftwareRaster.clear(); @@ -187,12 +187,12 @@ public final class Static197 { Rasteriser.setBrightness(0.6F); } } - Static95.method1939(); + GlTile.method1939(); Static114.method4637(); } Static87.aBoolean130 = !SceneGraph.allLevelsAreVisible(); if (arg2) { - Static141.method2721(); + client.method2721(); } if (arg1 >= 2) { Static124.aBoolean156 = true; diff --git a/client/src/main/java/Static199.java b/client/src/main/java/Static199.java index d4381dc..10b7a63 100644 --- a/client/src/main/java/Static199.java +++ b/client/src/main/java/Static199.java @@ -3,9 +3,6 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static199 { - @OriginalMember(owner = "client!qc", name = "bb", descriptor = "[Lclient!kl;") - public static Class3_Sub22[] aClass3_Sub22Array1; - @OriginalMember(owner = "client!qc", name = "cb", descriptor = "I") public static int anInt4675; @@ -15,9 +12,6 @@ public final class Static199 { @OriginalMember(owner = "client!qc", name = "U", descriptor = "I") public static int rectDebug = 0; - @OriginalMember(owner = "client!qc", name = "ab", descriptor = "[I") - public static final int[] anIntArray417 = new int[1000]; - @OriginalMember(owner = "client!qc", name = "a", descriptor = "(BI)I") public static int method3594(@OriginalArg(1) int arg0) { return arg0 >> 11 & 0x7F; diff --git a/client/src/main/java/Static2.java b/client/src/main/java/Static2.java index 6166510..2a970a1 100644 --- a/client/src/main/java/Static2.java +++ b/client/src/main/java/Static2.java @@ -251,7 +251,7 @@ public final class Static2 { Static158.anInt3851 = arg0.anInt477; Static145.anInt3502 = arg0.anInt519; } - if (Static134.aClass59_2.aBoolean141) { + if (PlayerAppearance.DEFAULT.gender) { arg0.anInt477 = Static158.anInt3851; } else { arg0.anInt477 = Static145.anInt3502; @@ -261,7 +261,7 @@ public final class Static2 { Static145.anInt3502 = arg0.anInt519; Static158.anInt3851 = arg0.anInt477; } - if (Static134.aClass59_2.aBoolean141) { + if (PlayerAppearance.DEFAULT.gender) { arg0.anInt477 = Static145.anInt3502; } else { arg0.anInt477 = Static158.anInt3851; @@ -281,7 +281,7 @@ public final class Static2 { arg0.modelId = ((int) PlayerList.self.username.encode37() << 11) + 2047; arg0.anInt496 = PlayerList.self.anInt3388; arg0.anInt500 = 0; - arg0.anInt522 = PlayerList.self.anInt3366; + arg0.modelSeqId = PlayerList.self.anInt3366; arg0.anInt510 = PlayerList.self.anInt3407; } } diff --git a/client/src/main/java/Static20.java b/client/src/main/java/Static20.java index 5c24c1b..d432578 100644 --- a/client/src/main/java/Static20.java +++ b/client/src/main/java/Static20.java @@ -18,7 +18,7 @@ public final class Static20 { @OriginalMember(owner = "client!bj", name = "a", descriptor = "(III)J") public static long method602(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null || local7.aClass15_1 == null ? 0L : local7.aClass15_1.aLong26; } } diff --git a/client/src/main/java/Static204.java b/client/src/main/java/Static204.java index 9b1b37c..f72869f 100644 --- a/client/src/main/java/Static204.java +++ b/client/src/main/java/Static204.java @@ -7,19 +7,10 @@ public final class Static204 { @OriginalMember(owner = "client!qi", name = "z", descriptor = "Lclient!qf;") public static Sprite aClass3_Sub2_Sub1_10; - @OriginalMember(owner = "client!qi", name = "t", descriptor = "I") - public static int anInt4762 = 0; - @OriginalMember(owner = "client!qi", name = "u", descriptor = "Lclient!ih;") public static LinkedList aClass69_113 = new LinkedList(); - @OriginalMember(owner = "client!qi", name = "v", descriptor = "Z") - public static boolean applyTweening = GlobalConfig.USE_TWEENING; - - @OriginalMember(owner = "client!qi", name = "x", descriptor = "[I") - public static final int[] anIntArray425 = new int[] { 0, 1, 2, 3, 4, 5, 6, 14 }; - - @OriginalMember(owner = "client!qi", name = "B", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!qi", name = "B", descriptor = "Lclient!na;") public static final JagString aClass100_896 = JagString.parse(""); @OriginalMember(owner = "client!qi", name = "b", descriptor = "(II)I") diff --git a/client/src/main/java/Static205.java b/client/src/main/java/Static205.java index d266f5d..dbdd22d 100644 --- a/client/src/main/java/Static205.java +++ b/client/src/main/java/Static205.java @@ -5,12 +5,12 @@ public final class Static205 { @OriginalMember(owner = "client!qj", name = "a", descriptor = "(Lclient!be;BI)Lclient!na;") public static JagString method3677(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1) { - if (!Static36.method940(arg0).method503(arg1) && arg0.anObjectArray29 == null) { + if (!InterfaceList.getServerActiveProperties(arg0).method503(arg1) && arg0.anObjectArray29 == null) { return null; - } else if (arg0.aClass100Array18 == null || arg0.aClass100Array18.length <= arg1 || arg0.aClass100Array18[arg1] == null || arg0.aClass100Array18[arg1].trim().length() == 0) { + } else if (arg0.ops == null || arg0.ops.length <= arg1 || arg0.ops[arg1] == null || arg0.ops[arg1].trim().length() == 0) { return Static121.aBoolean154 ? JagString.concatenate(new JagString[] { Static207.aClass100_903, Static123.parseInt(arg1) }) : null; } else { - return arg0.aClass100Array18[arg1]; + return arg0.ops[arg1]; } } } diff --git a/client/src/main/java/Static209.java b/client/src/main/java/Static209.java index aaab0e0..3b89217 100644 --- a/client/src/main/java/Static209.java +++ b/client/src/main/java/Static209.java @@ -4,9 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static209 { - @OriginalMember(owner = "client!ra", name = "jb", descriptor = "J") - public static volatile long aLong161 = 0L; - @OriginalMember(owner = "client!ra", name = "a", descriptor = "(ILclient!pb;BII)V") public static void method3701(@OriginalArg(0) int arg0, @OriginalArg(1) LocType arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { for (@Pc(10) AreaSound local10 = (AreaSound) Static3.aClass69_135.method2289(); local10 != null; local10 = (AreaSound) Static3.aClass69_135.method2288()) { diff --git a/client/src/main/java/Static21.java b/client/src/main/java/Static21.java deleted file mode 100644 index 88f036c..0000000 --- a/client/src/main/java/Static21.java +++ /dev/null @@ -1,3 +0,0 @@ -public final class Static21 { - -} diff --git a/client/src/main/java/Static214.java b/client/src/main/java/Static214.java index 0e7d011..58532c1 100644 --- a/client/src/main/java/Static214.java +++ b/client/src/main/java/Static214.java @@ -4,12 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static214 { - @OriginalMember(owner = "client!rg", name = "y", descriptor = "I") - public static int anInt5577; - - @OriginalMember(owner = "client!rg", name = "r", descriptor = "[Lclient!na;") - public static final JagString[] aClass100Array170 = new JagString[200]; - @OriginalMember(owner = "client!rg", name = "s", descriptor = "I") public static int anInt5574 = -1; @@ -18,9 +12,9 @@ public final class Static214 { @OriginalMember(owner = "client!rg", name = "a", descriptor = "(Lclient!e;I)V") public static void method4359(@OriginalArg(0) Player arg0) { - @Pc(12) AreaSound local12 = (AreaSound) Static93.aClass133_7.get(arg0.username.encode37()); + @Pc(12) AreaSound local12 = (AreaSound) AreaSoundManager.aClass133_7.get(arg0.username.encode37()); if (local12 == null) { - Static122.method2411(arg0.movementQueueZ[0], null, 0, null, arg0.movementQueueX[0], Player.level, arg0); + AreaSoundManager.add(arg0.movementQueueZ[0], null, 0, null, arg0.movementQueueX[0], Player.level, arg0); } else { local12.update(); } diff --git a/client/src/main/java/Static217.java b/client/src/main/java/Static217.java index 04e3d9b..6efc09d 100644 --- a/client/src/main/java/Static217.java +++ b/client/src/main/java/Static217.java @@ -25,10 +25,10 @@ public final class Static217 { if (arg2.anInt1671 == 0) { @Pc(22) boolean local22 = true; if (PlayerList.self.anInt1667 != -1 && arg2.anInt1667 != -1) { - @Pc(43) int local43 = arg2.anInt1652 < PlayerList.self.anInt1652 ? PlayerList.self.anInt1652 : arg2.anInt1652; + @Pc(43) int local43 = arg2.combatLevel < PlayerList.self.combatLevel ? PlayerList.self.combatLevel : arg2.combatLevel; @Pc(58) int local58 = PlayerList.self.anInt1667 < arg2.anInt1667 ? PlayerList.self.anInt1667 : arg2.anInt1667; @Pc(69) int local69 = local43 * 10 / 100 + local58 + 5; - @Pc(76) int local76 = PlayerList.self.anInt1652 - arg2.anInt1652; + @Pc(76) int local76 = PlayerList.self.combatLevel - arg2.combatLevel; if (local76 < 0) { local76 = -local76; } @@ -37,10 +37,10 @@ public final class Static217 { } } @Pc(95) JagString local95 = client.game == 1 ? LocalizedText.RATING : LocalizedText.LEVEL; - if (arg2.anInt1652 < arg2.anInt1656) { - local158 = JagString.concatenate(new JagString[] { arg2.getName(), local22 ? Static123.method2420(arg2.anInt1652, PlayerList.self.anInt1652) : Static204.aClass100_896, Static123.aClass100_593, local95, Static123.parseInt(arg2.anInt1652), Static78.aClass100_465, Static123.parseInt(arg2.anInt1656 - arg2.anInt1652), Static72.aClass100_448 }); + if (arg2.combatLevel < arg2.anInt1656) { + local158 = JagString.concatenate(new JagString[] { arg2.getName(), local22 ? Static123.method2420(arg2.combatLevel, PlayerList.self.combatLevel) : Static204.aClass100_896, Static123.aClass100_593, local95, Static123.parseInt(arg2.combatLevel), Static78.aClass100_465, Static123.parseInt(arg2.anInt1656 - arg2.combatLevel), Static72.aClass100_448 }); } else { - local158 = JagString.concatenate(new JagString[] { arg2.getName(), local22 ? Static123.method2420(arg2.anInt1652, PlayerList.self.anInt1652) : Static204.aClass100_896, Static123.aClass100_593, local95, Static123.parseInt(arg2.anInt1652), Static72.aClass100_448 }); + local158 = JagString.concatenate(new JagString[] { arg2.getName(), local22 ? Static123.method2420(arg2.combatLevel, PlayerList.self.combatLevel) : Static204.aClass100_896, Static123.aClass100_593, local95, Static123.parseInt(arg2.combatLevel), Static72.aClass100_448 }); } } else { local158 = JagString.concatenate(new JagString[] { arg2.getName(), Static123.aClass100_593, LocalizedText.SKILL, Static123.parseInt(arg2.anInt1671), Static72.aClass100_448 }); @@ -53,7 +53,7 @@ public final class Static217 { if (Static160.aClass100Array121[local275] != null) { @Pc(291) short local291 = 0; if (client.game == 0 && Static160.aClass100Array121[local275].equalsIgnoreCase(LocalizedText.ATTACK)) { - if (arg2.anInt1652 > PlayerList.self.anInt1652) { + if (arg2.combatLevel > PlayerList.self.combatLevel) { local291 = 2000; } if (PlayerList.self.anInt1650 != 0 && arg2.anInt1650 != 0) { diff --git a/client/src/main/java/Static218.java b/client/src/main/java/Static218.java deleted file mode 100644 index e80b409..0000000 --- a/client/src/main/java/Static218.java +++ /dev/null @@ -1,173 +0,0 @@ -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static218 { - - @OriginalMember(owner = "client!rk", name = "K", descriptor = "Lclient!na;") - public static final JagString TAG_GT = JagString.parse("gt"); - - @OriginalMember(owner = "client!rk", name = "L", descriptor = "Lclient!na;") - public static final JagString TAG_LT = JagString.parse("lt"); - - @OriginalMember(owner = "client!rk", name = "M", descriptor = "Lclient!na;") - public static final JagString TAG_SHAD1 = JagString.parse("shad="); - - @OriginalMember(owner = "client!rk", name = "N", descriptor = "Lclient!na;") - public static final JagString TAB_SHY = JagString.parse("shy"); - - @OriginalMember(owner = "client!rk", name = "O", descriptor = "Lclient!na;") - public static final JagString TAG_TRANS1 = JagString.parse("trans="); - - @OriginalMember(owner = "client!rk", name = "P", descriptor = "Lclient!na;") - public static final JagString TAG_U1 = JagString.parse("u="); - - @OriginalMember(owner = "client!rk", name = "Q", descriptor = "Lclient!na;") - public static final JagString TAG_STR1 = JagString.parse("str="); - - @OriginalMember(owner = "client!rk", name = "R", descriptor = "Lclient!na;") - public static final JagString TAB_EURO = JagString.parse("euro"); - - @OriginalMember(owner = "client!rk", name = "T", descriptor = "Lclient!na;") - public static final JagString TAG_COL2 = JagString.parse(")4col"); - - @OriginalMember(owner = "client!rk", name = "X", descriptor = "Lclient!na;") - public static final JagString TAG_SHAD3 = JagString.parse(")4shad"); - - @OriginalMember(owner = "client!rk", name = "Y", descriptor = "Lclient!na;") - public static final JagString TAG_COL1 = JagString.parse("col="); - - @OriginalMember(owner = "client!rk", name = "Z", descriptor = "Lclient!na;") - private static final JagString aClass100_706 = JagString.parse(""); - - @OriginalMember(owner = "client!rk", name = "bb", descriptor = "Lclient!na;") - public static final JagString TAG_U2 = JagString.parse("u"); - - @OriginalMember(owner = "client!rk", name = "cb", descriptor = "Lclient!na;") - public static final JagString TAB_TIMES = JagString.parse("times"); - - @OriginalMember(owner = "client!rk", name = "eb", descriptor = "Lclient!na;") - public static final JagString TAG_TRANS2 = JagString.parse(")4trans"); - - @OriginalMember(owner = "client!rk", name = "fb", descriptor = "Lclient!na;") - public static final JagString TAG_NBSP = JagString.parse("nbsp"); - - @OriginalMember(owner = "client!rk", name = "hb", descriptor = "Lclient!na;") - private static final JagString aClass100_711 = JagString.parse(""); - - @OriginalMember(owner = "client!rk", name = "ib", descriptor = "Lclient!na;") - public static final JagString TAG_U3 = JagString.parse(")4u"); - - @OriginalMember(owner = "client!rk", name = "kb", descriptor = "Lclient!na;") - public static final JagString TAG_BR = JagString.parse("br"); - - @OriginalMember(owner = "client!rk", name = "lb", descriptor = "Lclient!na;") - public static final JagString TAG_SHAD2 = JagString.parse("shad"); - - @OriginalMember(owner = "client!rk", name = "mb", descriptor = "Lclient!na;") - public static final JagString TAG_IMG = JagString.parse("img="); - - @OriginalMember(owner = "client!rk", name = "ob", descriptor = "Lclient!na;") - public static final JagString TAB_COPY = JagString.parse("copy"); - - @OriginalMember(owner = "client!rk", name = "pb", descriptor = "Lclient!na;") - public static final JagString TAG_STR3 = JagString.parse(")4str"); - - @OriginalMember(owner = "client!rk", name = "qb", descriptor = "Lclient!na;") - public static final JagString TAG_REG = JagString.parse("reg"); - - @OriginalMember(owner = "client!rk", name = "rb", descriptor = "Lclient!na;") - public static final JagString TAG_STR2 = JagString.parse("str"); - - @OriginalMember(owner = "client!rk", name = "sb", descriptor = "Lclient!na;") - public static final JagString buffer = Static87.allocate(100); - - @OriginalMember(owner = "client!rk", name = "tb", descriptor = "I") - public static int strikethroughColor = -1; - - @OriginalMember(owner = "client!rk", name = "ub", descriptor = "I") - public static int underlineColor = -1; - - @OriginalMember(owner = "client!rk", name = "vb", descriptor = "I") - public static int anInt3629 = 0; - - @OriginalMember(owner = "client!rk", name = "wb", descriptor = "I") - public static int color = 0; - - @OriginalMember(owner = "client!rk", name = "xb", descriptor = "I") - public static int alphaOverride = 256; - - @OriginalMember(owner = "client!rk", name = "yb", descriptor = "I") - public static int alpha = 256; - - @OriginalMember(owner = "client!rk", name = "zb", descriptor = "I") - public static int shadowColor = -1; - - @OriginalMember(owner = "client!rk", name = "Ab", descriptor = "[Lclient!na;") - public static final JagString[] lines = new JagString[100]; - - @OriginalMember(owner = "client!rk", name = "Bb", descriptor = "I") - public static int shadowColorOverride = -1; - - @OriginalMember(owner = "client!rk", name = "Cb", descriptor = "I") - public static int colorOverride = 0; - - @OriginalMember(owner = "client!rk", name = "Db", descriptor = "I") - public static int spaceWidth = 0; - - @OriginalMember(owner = "client!rk", name = "c", descriptor = "(Lclient!na;)Lclient!na;") - public static JagString escape(@OriginalArg(0) JagString arg0) { - @Pc(3) int local3 = arg0.length(); - @Pc(5) int local5 = 0; - @Pc(15) int local15; - for (@Pc(7) int local7 = 0; local7 < local3; local7++) { - local15 = arg0.charAt(local7); - if (local15 == 60 || local15 == 62) { - local5 += 3; - } - } - @Pc(30) JagString local30 = Static87.allocate(local3 + local5); - for (local15 = 0; local15 < local3; local15++) { - @Pc(40) int local40 = arg0.charAt(local15); - if (local40 == 60) { - local30.method3113(aClass100_711); - } else if (local40 == 62) { - local30.method3113(aClass100_706); - } else { - local30.append(local40); - } - } - return local30; - } - - @OriginalMember(owner = "client!rk", name = "a", descriptor = "([[B[[B[I[I[III)I") - public static int method2870(@OriginalArg(0) byte[][] arg0, @OriginalArg(1) byte[][] arg1, @OriginalArg(2) int[] arg2, @OriginalArg(3) int[] arg3, @OriginalArg(4) int[] arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) { - @Pc(3) int local3 = arg2[arg5]; - @Pc(9) int local9 = local3 + arg4[arg5]; - @Pc(13) int local13 = arg2[arg6]; - @Pc(19) int local19 = local13 + arg4[arg6]; - @Pc(21) int local21 = local3; - if (local13 > local3) { - local21 = local13; - } - @Pc(28) int local28 = local9; - if (local19 < local9) { - local28 = local19; - } - @Pc(37) int local37 = arg3[arg5]; - if (arg3[arg6] < local37) { - local37 = arg3[arg6]; - } - @Pc(50) byte[] local50 = arg1[arg5]; - @Pc(54) byte[] local54 = arg0[arg6]; - @Pc(58) int local58 = local21 - local3; - @Pc(62) int local62 = local21 - local13; - for (@Pc(64) int local64 = local21; local64 < local28; local64++) { - @Pc(77) int local77 = local50[local58++] + local54[local62++]; - if (local77 < local37) { - local37 = local77; - } - } - return -local37; - } -} diff --git a/client/src/main/java/Static22.java b/client/src/main/java/Static22.java index ace983b..f7379bb 100644 --- a/client/src/main/java/Static22.java +++ b/client/src/main/java/Static22.java @@ -1,23 +1,11 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; public final class Static22 { - @OriginalMember(owner = "client!bl", name = "Q", descriptor = "I") - public static int anInt723 = 0; - - @OriginalMember(owner = "client!bl", name = "T", descriptor = "I") + @OriginalMember(owner = "client!bl", name = "T", descriptor = "I") public static int anInt726 = 0; @OriginalMember(owner = "client!bl", name = "X", descriptor = "I") public static int anInt730 = -1; - @OriginalMember(owner = "client!bl", name = "a", descriptor = "(IIIIIIII)V") - public static void method644(@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 (Static172.anInt4164 <= arg6 && Static224.anInt5063 >= arg5 && arg4 >= Static267.anInt5773 && arg1 <= Static106.anInt2869) { - Static153.method2907(arg3, arg4, arg1, arg2, arg0, arg5, arg6); - } else { - Static244.method4222(arg5, arg2, arg1, arg0, arg3, arg4, arg6); - } - } } diff --git a/client/src/main/java/Static220.java b/client/src/main/java/Static220.java index af3cf85..4cdf401 100644 --- a/client/src/main/java/Static220.java +++ b/client/src/main/java/Static220.java @@ -58,7 +58,7 @@ public final class Static220 { for (@Pc(1) int local1 = 0; local1 < Static126.anInt3114; local1++) { for (@Pc(6) int local6 = 0; local6 < Static152.mapSizeX; local6++) { for (@Pc(11) int local11 = 0; local11 < Static99.mapSizeZ; local11++) { - @Pc(22) Tile local22 = Static130.aClass3_Sub5ArrayArrayArray1[local1][local6][local11]; + @Pc(22) Tile local22 = SceneGraph.tiles[local1][local6][local11]; if (local22 != null) { @Pc(27) Wall local27 = local22.aClass77_1; if (local27 != null && local27.aClass8_5.method4543()) { diff --git a/client/src/main/java/Static221.java b/client/src/main/java/Static221.java index 5ef8dca..eaddd15 100644 --- a/client/src/main/java/Static221.java +++ b/client/src/main/java/Static221.java @@ -13,9 +13,6 @@ public final class Static221 { @OriginalMember(owner = "client!s", name = "d", descriptor = "I") public static int anInt4364 = 0; - @OriginalMember(owner = "client!s", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_821 = JagString.parse("document)3cookie=(R"); - @OriginalMember(owner = "client!s", name = "b", descriptor = "(III)V") public static void method3392(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { if (Static250.anInt5434 > 0) { @@ -36,7 +33,7 @@ public final class Static221 { @Pc(65) int local65 = SoftwareRaster.pixels[local24++ + arg0]; @Pc(70) int local70 = Static216.anIntArray188[local20++]; if (local70 == 0) { - Static167.aClass3_Sub2_Sub1_Sub1_3.anIntArray20[local26++] = local65; + Static167.aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = local65; } else { @Pc(76) int local76 = local70 + 18; if (local76 > 255) { @@ -47,16 +44,16 @@ public final class Static221 { local89 = 255; } local70 = Static96.anIntArray235[local70]; - Static167.aClass3_Sub2_Sub1_Sub1_3.anIntArray20[local26++] = (local89 * (local65 & 0xFF00FF) + (local70 & 0xFF00FF) * local76 & 0xFF00FF00) + ((local70 & 0xFF00) * local76 + ((local65 & 0xFF00) * local89) & 0xFF0000) >> 8; + Static167.aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = (local89 * (local65 & 0xFF00FF) + (local70 & 0xFF00FF) * local76 & 0xFF00FF00) + ((local70 & 0xFF00) * local76 + ((local65 & 0xFF00) * local89) & 0xFF0000) >> 8; } } for (local55 = 0; local55 < local43; local55++) { - Static167.aClass3_Sub2_Sub1_Sub1_3.anIntArray20[local26++] = SoftwareRaster.pixels[arg0 + local24++]; + Static167.aClass3_Sub2_Sub1_Sub1_3.pixels[local26++] = SoftwareRaster.pixels[arg0 + local24++]; } local24 += SoftwareRaster.width - 128; } if (GlRenderer.enabled) { - Static46.method1178(Static167.aClass3_Sub2_Sub1_Sub1_3.anIntArray20, arg0, arg1, Static167.aClass3_Sub2_Sub1_Sub1_3.anInt1867, Static167.aClass3_Sub2_Sub1_Sub1_3.anInt1859); + Static46.method1178(Static167.aClass3_Sub2_Sub1_Sub1_3.pixels, arg0, arg1, Static167.aClass3_Sub2_Sub1_Sub1_3.anInt1867, Static167.aClass3_Sub2_Sub1_Sub1_3.anInt1859); } else { Static167.aClass3_Sub2_Sub1_Sub1_3.method1415(arg0, arg1); } diff --git a/client/src/main/java/Static222.java b/client/src/main/java/Static222.java index ab03d76..0f44737 100644 --- a/client/src/main/java/Static222.java +++ b/client/src/main/java/Static222.java @@ -14,10 +14,7 @@ public final class Static222 { @OriginalMember(owner = "client!sa", name = "W", descriptor = "Z") public static boolean instantScreenFade = true; - @OriginalMember(owner = "client!sa", name = "Y", descriptor = "I") - public static volatile int anInt4973 = 0; - - @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; diff --git a/client/src/main/java/Static223.java b/client/src/main/java/Static223.java index fce585a..c3e8096 100644 --- a/client/src/main/java/Static223.java +++ b/client/src/main/java/Static223.java @@ -4,10 +4,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static223 { - @OriginalMember(owner = "client!sc", name = "f", descriptor = "Lclient!na;") - public static final JagString aClass100_946 = JagString.parse("(R"); - - @OriginalMember(owner = "client!sc", name = "g", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!sc", name = "g", descriptor = "Lclient!na;") public static final JagString aClass100_947 = JagString.parse(" )2> "); @OriginalMember(owner = "client!sc", name = "p", descriptor = "I") diff --git a/client/src/main/java/Static224.java b/client/src/main/java/Static224.java index cb7c996..b926466 100644 --- a/client/src/main/java/Static224.java +++ b/client/src/main/java/Static224.java @@ -7,10 +7,7 @@ public final class Static224 { @OriginalMember(owner = "client!sd", name = "R", descriptor = "I") public static int anInt5062; - @OriginalMember(owner = "client!sd", name = "S", descriptor = "I") - public static int anInt5063 = 100; - - @OriginalMember(owner = "client!sd", name = "T", descriptor = "I") + @OriginalMember(owner = "client!sd", name = "T", descriptor = "I") public static int anInt5064 = 0; @OriginalMember(owner = "client!sd", name = "V", descriptor = "[I") @@ -18,9 +15,9 @@ public final class Static224 { @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 = Static130.aClass3_Sub5ArrayArrayArray1[0][arg0][arg1]; + @Pc(7) Tile local7 = SceneGraph.tiles[0][arg0][arg1]; for (@Pc(9) int local9 = 0; local9 < 3; local9++) { - @Pc(30) Tile local30 = Static130.aClass3_Sub5ArrayArrayArray1[local9][arg0][arg1] = Static130.aClass3_Sub5ArrayArrayArray1[local9 + 1][arg0][arg1]; + @Pc(30) Tile local30 = SceneGraph.tiles[local9][arg0][arg1] = SceneGraph.tiles[local9 + 1][arg0][arg1]; if (local30 != null) { local30.anInt672--; for (@Pc(40) int local40 = 0; local40 < local30.anInt662; local40++) { @@ -31,11 +28,11 @@ public final class Static224 { } } } - if (Static130.aClass3_Sub5ArrayArrayArray1[0][arg0][arg1] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[0][arg0][arg1] = new Tile(0, arg0, arg1); + if (SceneGraph.tiles[0][arg0][arg1] == null) { + SceneGraph.tiles[0][arg0][arg1] = new Tile(0, arg0, arg1); } - Static130.aClass3_Sub5ArrayArrayArray1[0][arg0][arg1].aClass3_Sub5_1 = local7; - Static130.aClass3_Sub5ArrayArrayArray1[3][arg0][arg1] = null; + SceneGraph.tiles[0][arg0][arg1].aClass3_Sub5_1 = local7; + SceneGraph.tiles[3][arg0][arg1] = null; } } diff --git a/client/src/main/java/Static225.java b/client/src/main/java/Static225.java index b9aa47b..7b1236a 100644 --- a/client/src/main/java/Static225.java +++ b/client/src/main/java/Static225.java @@ -21,40 +21,4 @@ public final class Static225 { return ((local8 & 0x1) == 0 ? local42 : -local42) + ((local8 & 0x2) == 0 ? local29 : -local29); } - @OriginalMember(owner = "client!se", name = "a", descriptor = "(III)V") - public static void method3893(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - @Pc(14) DelayedStateChange local14 = Static238.method4143(5, arg0); - local14.pushServer(); - local14.intArg1 = arg1; - } - - @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; - LoginManager.anInt39 = arg2; - Player.usernameInput = arg0; - if (Player.usernameInput.strEquals(JagString.EMPTY) || Player.password.strEquals(JagString.EMPTY)) { - LoginManager.reply = 3; - } else if (Static125.worldId == -1) { - LoginManager.anInt673 = 0; - LoginManager.anInt4587 = 0; - LoginManager.reply = -3; - LoginManager.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.encryptRsa(GlobalConfig.RSA_EXPONENT, GlobalConfig.RSA_MODULUS); - Protocol.outboundBuffer.offset = 0; - Protocol.outboundBuffer.p1(210); - Protocol.outboundBuffer.p1(local43.offset); - Protocol.outboundBuffer.pBytes(local43.data, local43.offset); - } else { - LoginManager.clear(); - } - } } diff --git a/client/src/main/java/Static226.java b/client/src/main/java/Static226.java index d55d1b5..30a3f40 100644 --- a/client/src/main/java/Static226.java +++ b/client/src/main/java/Static226.java @@ -13,10 +13,7 @@ public final class Static226 { @OriginalMember(owner = "client!sf", name = "g", descriptor = "Lclient!na;") public static final JagString aClass100_965 = JagString.parse(""); - @OriginalMember(owner = "client!sf", name = "h", descriptor = "[Lclient!na;") - public static final JagString[] varcstrs = new JagString[1000]; - - @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; diff --git a/client/src/main/java/Static227.java b/client/src/main/java/Static227.java index 23f5fc4..2dc170a 100644 --- a/client/src/main/java/Static227.java +++ b/client/src/main/java/Static227.java @@ -8,10 +8,7 @@ public final class Static227 { @OriginalMember(owner = "client!sg", name = "o", descriptor = "I") public static int cameraType; - @OriginalMember(owner = "client!sg", name = "b", descriptor = "[I") - public static final int[] anIntArray446 = new int[25]; - - @OriginalMember(owner = "client!sg", name = "e", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!sg", name = "e", descriptor = "Lclient!na;") public static final JagString SETTINGS = JagString.parse("settings"); } diff --git a/client/src/main/java/Static23.java b/client/src/main/java/Static23.java index 7b6d6f2..e05670a 100644 --- a/client/src/main/java/Static23.java +++ b/client/src/main/java/Static23.java @@ -62,19 +62,7 @@ public final class Static23 { } } - @OriginalMember(owner = "client!bm", name = "a", descriptor = "(III)I") - public static int method647(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(10) Inv local10 = (Inv) Static20.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 = "(B[B)[B") + @OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B") public static byte[] method648(@OriginalArg(1) byte[] arg0) { @Pc(6) int local6 = arg0.length; @Pc(9) byte[] local9 = new byte[local6]; diff --git a/client/src/main/java/Static230.java b/client/src/main/java/Static230.java index 184a2d6..1b55dd8 100644 --- a/client/src/main/java/Static230.java +++ b/client/src/main/java/Static230.java @@ -5,6 +5,22 @@ import org.openrs2.deob.annotation.Pc; public final class Static230 { + @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!sj", name = "D", descriptor = "I") public static int anInt5158; @@ -53,7 +69,7 @@ public final class Static230 { @OriginalMember(owner = "client!sj", name = "a", descriptor = "(IIBIII)V") public static void method3950(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4) { - if (arg0 >= Static172.anInt4164 && arg3 <= Static224.anInt5063 && Static267.anInt5773 <= arg4 && Static106.anInt2869 >= arg2) { + if (arg0 >= TextureOp29.anInt4164 && arg3 <= TextureOp29.anInt5063 && TextureOp29.anInt5773 <= arg4 && TextureOp29.anInt2869 >= arg2) { Static176.method3308(arg2, arg3, arg4, arg0, arg1); } else { Static163.method3105(arg1, arg3, arg4, arg0, arg2); @@ -86,22 +102,22 @@ public final class Static230 { return; } try { - @Pc(17) JagString local17 = Static272.aClass100_989.fromParameters(GameShell.signLink.applet); - @Pc(23) JagString local23 = Static246.aClass100_1029.fromParameters(GameShell.signLink.applet); - @Pc(48) JagString local48 = JagString.concatenate(new JagString[] { local17, Static142.aClass100_667, arg0, Static276.aClass100_1095, local23 }); + @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, Static245.aClass100_1018 }); + local48 = JagString.concatenate(new JagString[] { local48, aClass100_1018 }); } else { - local48 = JagString.concatenate(new JagString[] { local48, Static263.aClass100_1082, Static33.method873(MonotonicClock.currentTimeMillis() + 94608000000L), Static64.aClass100_431, Static154.method2929(94608000L) }); + local48 = JagString.concatenate(new JagString[] { local48, aClass100_1082, Static33.method873(MonotonicClock.currentTimeMillis() + 94608000000L), Static64.aClass100_431, Static154.method2929(94608000L) }); } - JagString.concatenate(new JagString[] { Static221.aClass100_821, local48, Static223.aClass100_946 }).method3134(GameShell.signLink.applet); + JagString.concatenate(new JagString[] { aClass100_821, local48, aClass100_946 }).method3134(GameShell.signLink.applet); } catch (@Pc(124) Throwable local124) { } } @OriginalMember(owner = "client!sj", name = "c", descriptor = "(II)V") public static void method3956(@OriginalArg(0) int arg0) { - if (Static14.anInt441 == 0) { + if (MidiPlayer.anInt441 == 0) { Static172.aClass3_Sub3_Sub4_2.method4447(arg0); } else { Static253.anInt5527 = arg0; diff --git a/client/src/main/java/Static231.java b/client/src/main/java/Static231.java index 064743d..6635a9d 100644 --- a/client/src/main/java/Static231.java +++ b/client/src/main/java/Static231.java @@ -54,12 +54,12 @@ public final class Static231 { @Pc(183) int local183; @Pc(192) int local192; @Pc(201) int local201; - if (arg4 >= Static267.anInt5773 && Static106.anInt2869 >= arg4) { + if (arg4 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg4) { @Pc(166) int[] local166 = Static71.anIntArrayArray10[arg4]; - local174 = Static78.method1690(Static224.anInt5063, arg5 - arg0, Static172.anInt4164); - local183 = Static78.method1690(Static224.anInt5063, arg5 + arg0, Static172.anInt4164); - local192 = Static78.method1690(Static224.anInt5063, arg5 - local12, Static172.anInt4164); - local201 = Static78.method1690(Static224.anInt5063, arg5 + local12, Static172.anInt4164); + local174 = Static78.method1690(TextureOp29.anInt5063, arg5 - arg0, TextureOp29.anInt4164); + local183 = Static78.method1690(TextureOp29.anInt5063, arg5 + arg0, TextureOp29.anInt4164); + local192 = Static78.method1690(TextureOp29.anInt5063, arg5 - local12, TextureOp29.anInt4164); + local201 = Static78.method1690(TextureOp29.anInt5063, arg5 + local12, TextureOp29.anInt4164); Static131.method2576(local166, local174, local192, arg2); Static131.method2576(local166, local192, local201, arg1); Static131.method2576(local166, local201, local183, arg2); @@ -111,30 +111,30 @@ public final class Static231 { local16--; local183 = arg4 + local16; local174 = arg4 - local16; - if (Static267.anInt5773 <= local183 && Static106.anInt2869 >= local174) { - local192 = Static78.method1690(Static224.anInt5063, arg5 + local7, Static172.anInt4164); - local201 = Static78.method1690(Static224.anInt5063, arg5 - local7, Static172.anInt4164); + if (TextureOp29.anInt5773 <= local183 && TextureOp29.anInt2869 >= local174) { + local192 = Static78.method1690(TextureOp29.anInt5063, arg5 + local7, TextureOp29.anInt4164); + local201 = Static78.method1690(TextureOp29.anInt5063, arg5 - local7, TextureOp29.anInt4164); if (local255) { - @Pc(404) int local404 = Static78.method1690(Static224.anInt5063, arg5 + local14, Static172.anInt4164); - @Pc(412) int local412 = Static78.method1690(Static224.anInt5063, arg5 - local14, Static172.anInt4164); + @Pc(404) int local404 = Static78.method1690(TextureOp29.anInt5063, arg5 + local14, TextureOp29.anInt4164); + @Pc(412) int local412 = Static78.method1690(TextureOp29.anInt5063, arg5 - local14, TextureOp29.anInt4164); @Pc(420) int[] local420; - if (Static267.anInt5773 <= local174) { + if (TextureOp29.anInt5773 <= local174) { local420 = Static71.anIntArrayArray10[local174]; Static131.method2576(local420, local201, local412, arg2); Static131.method2576(local420, local412, local404, arg1); Static131.method2576(local420, local404, local192, arg2); } - if (local183 <= Static106.anInt2869) { + if (local183 <= TextureOp29.anInt2869) { local420 = Static71.anIntArrayArray10[local183]; Static131.method2576(local420, local201, local412, arg2); Static131.method2576(local420, local412, local404, arg1); Static131.method2576(local420, local404, local192, arg2); } } else { - if (Static267.anInt5773 <= local174) { + if (TextureOp29.anInt5773 <= local174) { Static131.method2576(Static71.anIntArrayArray10[local174], local201, local192, arg2); } - if (Static106.anInt2869 >= local183) { + if (TextureOp29.anInt2869 >= local183) { Static131.method2576(Static71.anIntArrayArray10[local183], local201, local192, arg2); } } @@ -157,41 +157,41 @@ public final class Static231 { @Pc(59) int local59 = arg3 - (local50 * arg2 >> 12); @Pc(68) int local68; @Pc(76) int local76; - if (Static172.anInt4164 > arg2) { - local68 = Static172.anInt4164; - local76 = (Static172.anInt4164 * local50 >> 12) + local59; - } else if (arg2 > Static224.anInt5063) { - local76 = (Static224.anInt5063 * local50 >> 12) + local59; - local68 = Static224.anInt5063; + if (TextureOp29.anInt4164 > arg2) { + local68 = TextureOp29.anInt4164; + local76 = (TextureOp29.anInt4164 * local50 >> 12) + local59; + } else if (arg2 > TextureOp29.anInt5063) { + local76 = (TextureOp29.anInt5063 * local50 >> 12) + local59; + local68 = TextureOp29.anInt5063; } else { local68 = arg2; local76 = arg3; } @Pc(109) int local109; @Pc(118) int local118; - if (arg4 < Static172.anInt4164) { - local109 = Static172.anInt4164; - local118 = local59 + (local50 * Static172.anInt4164 >> 12); - } else if (Static224.anInt5063 < arg4) { - local109 = Static224.anInt5063; - local118 = local59 + (local50 * Static224.anInt5063 >> 12); + if (arg4 < TextureOp29.anInt4164) { + local109 = TextureOp29.anInt4164; + local118 = local59 + (local50 * TextureOp29.anInt4164 >> 12); + } else if (TextureOp29.anInt5063 < arg4) { + local109 = TextureOp29.anInt5063; + local118 = local59 + (local50 * TextureOp29.anInt5063 >> 12); } else { local118 = arg1; local109 = arg4; } - if (Static267.anInt5773 > local118) { - local109 = (Static267.anInt5773 - local59 << 12) / local50; - local118 = Static267.anInt5773; - } else if (local118 > Static106.anInt2869) { - local118 = Static106.anInt2869; - local109 = (Static106.anInt2869 - local59 << 12) / local50; + if (TextureOp29.anInt5773 > local118) { + local109 = (TextureOp29.anInt5773 - local59 << 12) / local50; + local118 = TextureOp29.anInt5773; + } else if (local118 > TextureOp29.anInt2869) { + local118 = TextureOp29.anInt2869; + local109 = (TextureOp29.anInt2869 - local59 << 12) / local50; } - if (local76 < Static267.anInt5773) { - local76 = Static267.anInt5773; - local68 = (Static267.anInt5773 - local59 << 12) / local50; - } else if (Static106.anInt2869 < local76) { - local76 = Static106.anInt2869; - local68 = (Static106.anInt2869 - local59 << 12) / local50; + if (local76 < TextureOp29.anInt5773) { + local76 = TextureOp29.anInt5773; + local68 = (TextureOp29.anInt5773 - local59 << 12) / local50; + } else if (TextureOp29.anInt2869 < local76) { + local76 = TextureOp29.anInt2869; + local68 = (TextureOp29.anInt2869 - local59 << 12) / local50; } Static241.method4547(arg0, local118, local76, local109, local68); } diff --git a/client/src/main/java/Static233.java b/client/src/main/java/Static233.java index 2910449..8fd86fa 100644 --- a/client/src/main/java/Static233.java +++ b/client/src/main/java/Static233.java @@ -1,12 +1,3 @@ -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InvalidClassException; -import java.io.ObjectInputStream; -import java.io.OptionalDataException; -import java.io.StreamCorruptedException; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -116,127 +107,11 @@ public final class Static233 { } else { Static102.method2075(PlayerList.self.movementQueueZ[0], local24, 0, true, 0, arg2, 0, local12 + 1, 2, arg1, PlayerList.self.movementQueueX[0]); } - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; - Static70.type = 2; - Static122.x = Mouse.clickX; + Cross.y = Mouse.clickY; + Cross.milliseconds = 0; + Cross.type = 2; + Cross.x = Mouse.clickX; return true; } - @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) Static204.aClass69_113.method2289(); - 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.pCrc32(local25); - arg0.p1len(arg0.offset - local25); - local18.unlink(); - } - } } diff --git a/client/src/main/java/Static234.java b/client/src/main/java/Static234.java index 46245ad..ca380dc 100644 --- a/client/src/main/java/Static234.java +++ b/client/src/main/java/Static234.java @@ -10,112 +10,6 @@ public final class Static234 { @OriginalMember(owner = "client!ta", name = "B", descriptor = "I") public static int anInt5245 = 0; - @OriginalMember(owner = "client!ta", name = "a", descriptor = "(I)V") - public static void method4014() { - for (@Pc(3) int local3 = 0; local3 < Protocol.extendedCount; local3++) { - @Pc(10) int local10 = Protocol.extendedIds[local3]; - @Pc(14) Npc local14 = Static175.npcs[local10]; - @Pc(18) int local18 = Protocol.inboundBuffer.g1(); - if ((local18 & 0x8) != 0) { - local18 += Protocol.inboundBuffer.g1() << 8; - } - @Pc(43) int local43; - @Pc(47) int local47; - if ((local18 & 0x40) != 0) { - local43 = Protocol.inboundBuffer.g1(); - local47 = Protocol.inboundBuffer.p1neg(); - local14.addHit(local47, client.loop, local43); - local14.hitpointsBarVisibleUntil = client.loop + 300; - local14.hitpointsBar = Protocol.inboundBuffer.g1ssub(); - } - if ((local18 & 0x2) != 0) { - local43 = Protocol.inboundBuffer.p1neg(); - local47 = Protocol.inboundBuffer.g1ssub(); - local14.addHit(local47, client.loop, local43); - } - if ((local18 & 0x10) != 0) { - local43 = Protocol.inboundBuffer.g2(); - local47 = Protocol.inboundBuffer.g1(); - if (local43 == 65535) { - local43 = -1; - } - Static223.method3855(local47, local43, local14); - } - if ((local18 & 0x4) != 0) { - local14.faceEntity = Protocol.inboundBuffer.g2sub(); - if (local14.faceEntity == 65535) { - local14.faceEntity = -1; - } - } - if ((local18 & 0x80) != 0) { - local43 = Protocol.inboundBuffer.g2sub(); - if (local43 == 65535) { - local43 = -1; - } - local47 = Protocol.inboundBuffer.g4me(); - @Pc(147) boolean local147 = true; - if (local43 != -1 && local14.spotAnimId != -1 && SeqTypeList.get(SpotAnimTypeList.get(local43).seqId).anInt5355 < SeqTypeList.get(SpotAnimTypeList.get(local14.spotAnimId).seqId).anInt5355) { - local147 = false; - } - if (local147) { - local14.spotAnimId = local43; - local14.spotAnimStart = (local47 & 0xFFFF) + client.loop; - local14.anInt3361 = 0; - local14.anInt3399 = 0; - local14.spotAnimY = local47 >> 16; - local14.anInt3418 = 1; - if (local14.spotAnimStart > client.loop) { - local14.anInt3399 = -1; - } - if (local14.spotAnimId != -1 && local14.spotAnimStart == client.loop) { - @Pc(227) int local227 = SpotAnimTypeList.get(local14.spotAnimId).seqId; - if (local227 != -1) { - @Pc(236) SeqType local236 = SeqTypeList.get(local227); - if (local236 != null && local236.frames != null) { - SoundPlayer.playSeqSound(local14.zFine, local236, local14.xFine, false, 0); - } - } - } - } - } - if ((local18 & 0x1) != 0) { - if (local14.type.hasAreaSound()) { - Static91.method1877(local14); - } - local14.method2698(NpcTypeList.get(Protocol.inboundBuffer.g2le())); - local14.method2692(local14.type.soze); - local14.anInt3365 = local14.type.basId; - if (local14.type.hasAreaSound()) { - Static122.method2411(local14.movementQueueZ[0], null, 0, local14, local14.movementQueueX[0], Player.level, null); - } - } - if ((local18 & 0x20) != 0) { - local14.chatMessage = Protocol.inboundBuffer.gjstr(); - local14.chatLoops = 100; - } - if ((local18 & 0x100) != 0) { - local43 = Protocol.inboundBuffer.p1neg(); - @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 local339 = 0; local339 < local43; local339++) { - @Pc(350) int local350 = Protocol.inboundBuffer.g2le(); - if (local350 == 65535) { - local350 = -1; - } - local331[local339] = local350; - local334[local339] = Protocol.inboundBuffer.g1ssub(); - local337[local339] = Protocol.inboundBuffer.g2(); - } - Static159.method3037(local337, local14, local334, local331); - } - if ((local18 & 0x200) != 0) { - local14.faceX = Protocol.inboundBuffer.g2sub(); - local14.faceY = Protocol.inboundBuffer.g2(); - } - } - } - @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 (InterfaceList.load(arg2)) { @@ -125,9 +19,9 @@ public final class Static234 { @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IIZII)V") public static void method4019(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - if (arg3 >= Static267.anInt5773 && arg3 <= Static106.anInt2869) { - @Pc(15) int local15 = Static78.method1690(Static224.anInt5063, arg0, Static172.anInt4164); - @Pc(21) int local21 = Static78.method1690(Static224.anInt5063, arg2, Static172.anInt4164); + if (arg3 >= TextureOp29.anInt5773 && arg3 <= TextureOp29.anInt2869) { + @Pc(15) int local15 = Static78.method1690(TextureOp29.anInt5063, arg0, TextureOp29.anInt4164); + @Pc(21) int local21 = Static78.method1690(TextureOp29.anInt5063, arg2, TextureOp29.anInt4164); Static222.method3826(arg1, arg3, local21, local15); } } diff --git a/client/src/main/java/Static235.java b/client/src/main/java/Static235.java index 559be7c..8cc1f95 100644 --- a/client/src/main/java/Static235.java +++ b/client/src/main/java/Static235.java @@ -13,7 +13,7 @@ public final class Static235 { @OriginalMember(owner = "client!tb", name = "h", descriptor = "(I)I") public static int method4044() { - return Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2 ? Static190.anIntArray382[Static231.anInt5204 - 2] : Static190.anIntArray382[Static231.anInt5204 - 1]; + return Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2 ? Static190.anIntArray382[Static231.anInt5204 - 2] : Static190.anIntArray382[Static231.anInt5204 - 1]; } } diff --git a/client/src/main/java/Static236.java b/client/src/main/java/Static236.java index dbbb457..1a7e3f3 100644 --- a/client/src/main/java/Static236.java +++ b/client/src/main/java/Static236.java @@ -27,7 +27,7 @@ public final class Static236 { } Static45.aBoolean84 = false; @Pc(139) int local139; - if (Static22.anInt723 != 0) { + if (Mouse.pressedButton != 0) { if (arg4 <= arg3 && arg4 + 16 > arg3 && arg0 >= arg5 && arg5 + 16 > arg0) { arg2.scrollY -= 4; Static43.redraw(arg2); diff --git a/client/src/main/java/Static237.java b/client/src/main/java/Static237.java deleted file mode 100644 index 7e68eca..0000000 --- a/client/src/main/java/Static237.java +++ /dev/null @@ -1,317 +0,0 @@ -import java.nio.ByteBuffer; -import org.openrs2.deob.annotation.OriginalArg; -import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; - -public final class Static237 { - - @OriginalMember(owner = "client!td", name = "G", descriptor = "[J") - public static long[] aLongArray10; - - @OriginalMember(owner = "client!td", name = "T", descriptor = "Ljava/nio/ByteBuffer;") - public static ByteBuffer aByteBuffer9; - - @OriginalMember(owner = "client!td", name = "rb", descriptor = "F") - public static float aFloat24; - - @OriginalMember(owner = "client!td", name = "sb", descriptor = "I") - public static int anInt5298; - - @OriginalMember(owner = "client!td", name = "tb", descriptor = "F") - public static float aFloat25; - - @OriginalMember(owner = "client!td", name = "vb", descriptor = "I") - public static int anInt5299; - - @OriginalMember(owner = "client!td", name = "wb", descriptor = "F") - public static float aFloat26; - - @OriginalMember(owner = "client!td", name = "xb", descriptor = "F") - public static float aFloat27; - - @OriginalMember(owner = "client!td", name = "yb", descriptor = "I") - public static int anInt5300; - - @OriginalMember(owner = "client!td", name = "zb", descriptor = "F") - public static float aFloat28; - - @OriginalMember(owner = "client!td", name = "Ab", descriptor = "F") - public static float aFloat29; - - @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;") - public static GlModel aClass8_Sub1_Sub1_2 = new GlModel(); - - @OriginalMember(owner = "client!td", name = "mb", descriptor = "Lclient!td;") - public static GlModel aClass8_Sub1_Sub1_3 = new GlModel(); - - @OriginalMember(owner = "client!td", name = "nb", descriptor = "Lclient!td;") - public static GlModel aClass8_Sub1_Sub1_4 = new GlModel(); - - @OriginalMember(owner = "client!td", name = "ob", descriptor = "Lclient!td;") - public static GlModel aClass8_Sub1_Sub1_5 = new GlModel(); - - @OriginalMember(owner = "client!td", name = "pb", descriptor = "Lclient!td;") - public static GlModel aClass8_Sub1_Sub1_6 = new GlModel(); - - @OriginalMember(owner = "client!td", name = "qb", descriptor = "[I") - public static int[] anIntArray467 = new int[1]; - - @OriginalMember(owner = "client!td", name = "ub", descriptor = "[I") - public static int[] anIntArray468 = new int[1]; - - @OriginalMember(owner = "client!td", name = "Bb", descriptor = "Z") - public static boolean aBoolean260 = false; - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(FFF)I") - public static int method4092(@OriginalArg(0) float arg0, @OriginalArg(1) float arg1, @OriginalArg(2) float arg2) { - @Pc(8) float local8 = arg0 < 0.0F ? -arg0 : arg0; - @Pc(17) float local17 = arg1 < 0.0F ? -arg1 : arg1; - @Pc(26) float local26 = arg2 < 0.0F ? -arg2 : arg2; - if (local17 > local8 && local17 > local26) { - return arg1 > 0.0F ? 0 : 1; - } else if (local26 > local8 && local26 > local17) { - return arg2 > 0.0F ? 2 : 3; - } else if (arg0 > 0.0F) { - return 4; - } else { - return 5; - } - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIII[FFIF)V") - public static void method4095(@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) float[] arg6, @OriginalArg(7) float arg7, @OriginalArg(8) int arg8, @OriginalArg(9) float arg9) { - @Pc(3) int local3 = arg0 - arg3; - @Pc(7) int local7 = arg1 - arg4; - @Pc(11) int local11 = arg2 - arg5; - @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; - if (arg7 != 1.0F) { - local85 *= arg7; - } - @Pc(99) float local99 = local53 + arg9 + 0.5F; - @Pc(104) float local104; - if (arg8 == 1) { - local104 = local85; - local85 = -local99; - local99 = local104; - } else if (arg8 == 2) { - local85 = -local85; - local99 = -local99; - } else if (arg8 == 3) { - local104 = local85; - local85 = local99; - local99 = -local104; - } - aFloat26 = local85; - aFloat28 = local99; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(ISIB)I") - public static int method4096(@OriginalArg(0) int arg0, @OriginalArg(1) short arg1, @OriginalArg(2) int arg2, @OriginalArg(3) byte arg3) { - @Pc(5) int local5 = Rasteriser.palette[Static268.method4585(arg0, arg2)]; - if (arg1 != -1) { - @Pc(15) int local15 = Rasteriser.textureProvider.method3238(arg1 & 0xFFFF); - @Pc(21) int local21; - @Pc(44) int local44; - if (local15 != 0) { - if (arg2 < 0) { - local21 = 0; - } else if (arg2 > 127) { - local21 = 16777215; - } else { - local21 = arg2 * 131586; - } - if (local15 == 256) { - local5 = local21; - } else { - local44 = 256 - local15; - local5 = ((local21 & 0xFF00FF) * local15 + (local5 & 0xFF00FF) * local44 & 0xFF00FF00) + ((local21 & 0xFF00) * local15 + (local5 & 0xFF00) * local44 & 0xFF0000) >> 8; - } - } - local21 = Rasteriser.textureProvider.method3229(arg1 & 0xFFFF); - if (local21 != 0) { - local21 += 256; - @Pc(92) int local92 = (local5 >> 16 & 0xFF) * local21; - if (local92 > 65535) { - local92 = 65535; - } - local44 = (local5 >> 8 & 0xFF) * local21; - if (local44 > 65535) { - local44 = 65535; - } - @Pc(116) int local116 = (local5 & 0xFF) * local21; - if (local116 > 65535) { - local116 = 65535; - } - local5 = ((local92 & 0xFF00) << 8) + (local44 & 0xFF00) + (local116 >> 8); - } - } - return (local5 << 8) + (255 - (arg3 & 0xFF)); - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIFFF)[F") - 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)); - local2[0] = local13; - local2[1] = 0.0F; - local2[2] = local21; - local2[3] = 0.0F; - local2[4] = 1.0F; - local2[5] = 0.0F; - local2[6] = -local21; - local2[7] = 0.0F; - local2[8] = local13; - @Pc(65) float[] local65 = new float[9]; - @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(88) float local88 = 1.0F - local74; - @Pc(99) float local99 = (float) Math.sqrt((double) (arg0 * arg0 + arg2 * arg2)); - if (local99 == 0.0F && local74 == 0.0F) { - local5 = local2; - } else { - if (local99 != 0.0F) { - local67 = (float) -arg2 / local99; - local69 = (float) arg0 / local99; - } - local65[0] = local74 + local67 * local67 * local88; - local65[1] = local69 * local84; - local65[2] = local69 * local67 * local88; - local65[3] = -local69 * local84; - local65[4] = local74; - local65[5] = local67 * local84; - local65[6] = local67 * local69 * local88; - local65[7] = -local67 * local84; - local65[8] = local74 + local69 * local69 * local88; - local5[0] = local2[0] * local65[0] + local2[1] * local65[3] + local2[2] * local65[6]; - local5[1] = local2[0] * local65[1] + local2[1] * local65[4] + local2[2] * local65[7]; - local5[2] = local2[0] * local65[2] + local2[1] * local65[5] + local2[2] * local65[8]; - local5[3] = local2[3] * local65[0] + local2[4] * local65[3] + local2[5] * local65[6]; - local5[4] = local2[3] * local65[1] + local2[4] * local65[4] + local2[5] * local65[7]; - local5[5] = local2[3] * local65[2] + local2[4] * local65[5] + local2[5] * local65[8]; - local5[6] = local2[6] * local65[0] + local2[7] * local65[3] + local2[8] * local65[6]; - local5[7] = local2[6] * local65[1] + local2[7] * local65[4] + local2[8] * local65[7]; - local5[8] = local2[6] * local65[2] + local2[7] * local65[5] + local2[8] * local65[8]; - } - local5[0] *= arg4; - local5[1] *= arg4; - local5[2] *= arg4; - local5[3] *= arg5; - local5[4] *= arg5; - local5[5] *= arg5; - local5[6] *= arg6; - local5[7] *= arg6; - local5[8] *= arg6; - return local5; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIII[FIF)V") - public static void method4101(@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) float[] arg6, @OriginalArg(7) int arg7, @OriginalArg(8) float arg8) { - @Pc(3) int local3 = arg0 - arg3; - @Pc(7) int local7 = arg1 - arg4; - @Pc(11) int local11 = arg2 - arg5; - @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(118) float local118; - if (arg7 == 1) { - local118 = local100; - local100 = -local113; - local113 = local118; - } else if (arg7 == 2) { - local100 = -local100; - local113 = -local113; - } else if (arg7 == 3) { - local118 = local100; - local100 = local113; - local113 = -local118; - } - aFloat29 = local100; - aFloat25 = local113; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIII[FIFFF)V") - public static void method4104(@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) float[] arg7, @OriginalArg(8) int arg8, @OriginalArg(9) float arg9, @OriginalArg(10) float arg10, @OriginalArg(11) float arg11) { - @Pc(3) int local3 = arg0 - arg3; - @Pc(7) int local7 = arg1 - arg4; - @Pc(11) int local11 = arg2 - arg5; - @Pc(32) float local32 = (float) local3 * arg7[0] + (float) local7 * arg7[1] + (float) local11 * arg7[2]; - @Pc(53) float local53 = (float) local3 * arg7[3] + (float) local7 * arg7[4] + (float) local11 * arg7[5]; - @Pc(74) float local74 = (float) local3 * arg7[6] + (float) local7 * arg7[7] + (float) local11 * arg7[8]; - @Pc(82) float local82; - @Pc(89) float local89; - if (arg6 == 0) { - local82 = local32 + arg9 + 0.5F; - local89 = arg11 + 0.5F - local74; - } else if (arg6 == 1) { - local82 = local32 + arg9 + 0.5F; - local89 = local74 + arg11 + 0.5F; - } else if (arg6 == 2) { - local82 = arg9 + 0.5F - local32; - local89 = arg10 + 0.5F - local53; - } else if (arg6 == 3) { - local82 = local32 + arg9 + 0.5F; - local89 = arg10 + 0.5F - local53; - } else if (arg6 == 4) { - local82 = local74 + arg11 + 0.5F; - local89 = arg10 + 0.5F - local53; - } else { - local82 = arg11 + 0.5F - local74; - local89 = arg10 + 0.5F - local53; - } - @Pc(177) float local177; - if (arg8 == 1) { - local177 = local82; - local82 = -local89; - local89 = local177; - } else if (arg8 == 2) { - local82 = -local82; - local89 = -local89; - } else if (arg8 == 3) { - local177 = local82; - local82 = local89; - local89 = -local177; - } - aFloat27 = local82; - aFloat24 = local89; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "([FI)[F") - public static float[] method4112(@OriginalArg(0) float[] arg0, @OriginalArg(1) int arg1) { - @Pc(2) float[] local2 = new float[arg1]; - Static289.method2615(arg0, 0, local2, 0, arg1); - return local2; - } - - @OriginalMember(owner = "client!td", name = "a", descriptor = "([SI)[S") - public static short[] method4119(@OriginalArg(0) short[] arg0, @OriginalArg(1) int arg1) { - @Pc(2) short[] local2 = new short[arg1]; - Static289.method2616(arg0, 0, local2, 0, arg1); - return local2; - } - - @OriginalMember(owner = "client!td", name = "v", descriptor = "()V") - public static void method4120() { - aClass8_Sub1_Sub1_1 = new GlModel(); - aClass8_Sub1_Sub1_2 = new GlModel(); - aClass8_Sub1_Sub1_3 = new GlModel(); - aClass8_Sub1_Sub1_4 = new GlModel(); - aClass8_Sub1_Sub1_5 = new GlModel(); - aClass8_Sub1_Sub1_6 = new GlModel(); - } -} diff --git a/client/src/main/java/Static238.java b/client/src/main/java/Static238.java index 29cfd48..95d7763 100644 --- a/client/src/main/java/Static238.java +++ b/client/src/main/java/Static238.java @@ -20,17 +20,4 @@ public final class Static238 { return local13; } - @OriginalMember(owner = "client!te", name = "b", descriptor = "(Lclient!na;I)Z") - public static boolean method4144(@OriginalArg(0) JagString arg0) { - if (arg0 == null) { - return false; - } - for (@Pc(11) int local11 = 0; local11 < Static35.anInt1093; local11++) { - if (arg0.equalsIgnoreCase(Static193.aClass100Array134[local11])) { - return true; - } - } - return false; - } - } diff --git a/client/src/main/java/Static24.java b/client/src/main/java/Static24.java index 2e7c488..71185a7 100644 --- a/client/src/main/java/Static24.java +++ b/client/src/main/java/Static24.java @@ -21,41 +21,6 @@ public final class Static24 { return local8; } - @OriginalMember(owner = "client!bn", name = "a", descriptor = "(BZLclient!na;)V") - public static void method668(@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.method769().toLowerCase().indexOf(local9) != -1) { - if (local11 >= 50) { - Static111.anInt2905 = -1; - Static169.aShortArray52 = 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; - } - } - Static169.aShortArray52 = local22; - Static111.anInt2905 = local11; - Static67.anInt3356 = 0; - @Pc(113) JagString[] local113 = new JagString[Static111.anInt2905]; - for (@Pc(115) int local115 = 0; local115 < Static111.anInt2905; local115++) { - local113[local115] = QuickChatPhraseTypeList.get(local22[local115]).method769(); - } - Static202.method3656(local113, Static169.aShortArray52); - } - @OriginalMember(owner = "client!bn", name = "a", descriptor = "(IIB)I") public static int method670(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { @Pc(47) int local47 = Static138.method2695(arg0 - 1, arg1 + -1) + Static138.method2695(arg0 + 1, arg1 + -1) + Static138.method2695(arg0 + -1, arg1 - -1) + Static138.method2695(arg0 + 1, arg1 - -1); diff --git a/client/src/main/java/Static240.java b/client/src/main/java/Static240.java index 3bede94..9ffb6f4 100644 --- a/client/src/main/java/Static240.java +++ b/client/src/main/java/Static240.java @@ -1,11 +1,7 @@ -import java.awt.FontMetrics; import org.openrs2.deob.annotation.OriginalMember; public final class Static240 { - @OriginalMember(owner = "client!tg", name = "a", descriptor = "Ljava/awt/FontMetrics;") - public static FontMetrics aFontMetrics1; - @OriginalMember(owner = "client!tg", name = "b", descriptor = "I") public static int cameraPitch; @@ -18,6 +14,4 @@ public final class Static240 { @OriginalMember(owner = "client!tg", name = "e", descriptor = "Lclient!na;") public static final JagString aClass100_1008 = JagString.parse(""); - @OriginalMember(owner = "client!tg", name = "i", descriptor = "Lclient!na;") - public static final JagString aClass100_1009 = JagString.parse("::pcachesize"); } diff --git a/client/src/main/java/Static241.java b/client/src/main/java/Static241.java index 3244ee5..8f1c35a 100644 --- a/client/src/main/java/Static241.java +++ b/client/src/main/java/Static241.java @@ -16,18 +16,6 @@ public final class Static241 { @OriginalMember(owner = "client!th", name = "n", descriptor = "Z") public static boolean aBoolean302 = false; - @OriginalMember(owner = "client!th", name = "a", descriptor = "(DI)V") - public static void method4537(@OriginalArg(0) double arg0) { - if (Static122.aDouble1 == arg0) { - return; - } - for (@Pc(12) int local12 = 0; local12 < 256; local12++) { - @Pc(25) int local25 = (int) (Math.pow((double) local12 / 255.0D, arg0) * 255.0D); - Static103.anIntArray253[local12] = local25 > 255 ? 255 : local25; - } - Static122.aDouble1 = arg0; - } - @OriginalMember(owner = "client!th", name = "a", descriptor = "(ZIIII)V") public static void setWindowMode(@OriginalArg(0) boolean arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { Static97.aLong89 = 0L; @@ -134,7 +122,7 @@ public final class Static241 { @OriginalMember(owner = "client!th", name = "a", descriptor = "(Z)V") public static void method4548() { Static172.aClass3_Sub3_Sub4_2.method4446(); - Static14.anInt441 = 1; + MidiPlayer.anInt441 = 1; Static172.aClass153_70 = null; } } diff --git a/client/src/main/java/Static243.java b/client/src/main/java/Static243.java index d5173dd..717204b 100644 --- a/client/src/main/java/Static243.java +++ b/client/src/main/java/Static243.java @@ -24,130 +24,4 @@ public final class Static243 { return local38; } - @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Z)V") - public static void method4221() { - Static204.anInt4762 = 0; - Static67.prevFocus = true; - Static183.prevClickTime = 0L; - MouseRecorder.instance.samples = 0; - GameShell.focus = true; - Static114.method4625(); - Static49.opcode4 = -1; - Static5.opcode3 = -1; - Protocol.opcode = -1; - Static267.anInt5775 = 0; - Static60.rebootTimer = 0; - Protocol.outboundBuffer.offset = 0; - Static230.opcode2 = -1; - Static201.anInt1862 = 0; - Protocol.inboundBuffer.offset = 0; - @Pc(3506) int local3506; - for (local3506 = 0; local3506 < Static143.aClass102Array1.length; local3506++) { - Static143.aClass102Array1[local3506] = null; - } - Static231.anInt5204 = 0; - Static60.aBoolean108 = false; - Static48.setIdleLoops(0); - for (local3506 = 0; local3506 < 100; local3506++) { - Chat.aClass100Array158[local3506] = null; - } - Static260.anInt5014 = 0; - Static132.anInt3291 = (int) (Math.random() * 100.0D) - 50; - Static84.anInt2255 = 0; - Camera.yawTarget = (int) (Math.random() * 20.0D) - 10 & 0x7FF; - Static107.anInt2875 = -1; - PlayerList.size = 0; - Static270.anInt5795 = 0; - Static206.anInt4774 = (int) (Math.random() * 110.0D) - 55; - Static241.aBoolean302 = false; - Static273.anInt4130 = (int) (Math.random() * 30.0D) - 20; - SoundPlayer.anInt4451 = 0; - Static115.anInt2939 = 0; - Static59.anInt1814 = (int) (Math.random() * 120.0D) - 60; - Chat.anInt1941 = 0; - Static230.anInt5161 = (int) (Math.random() * 80.0D) - 40; - Static272.anInt5214 = 0; - for (local3506 = 0; local3506 < 2048; local3506++) { - PlayerList.players[local3506] = null; - PlayerList.appearanceCache[local3506] = null; - } - for (local3506 = 0; local3506 < 32768; local3506++) { - Static175.npcs[local3506] = null; - } - PlayerList.self = PlayerList.players[2047] = new Player(); - Static217.aClass69_116.clear(); - Static99.aClass69_64.clear(); - if (Static159.aClass69ArrayArrayArray1 != 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++) { - Static159.aClass69ArrayArrayArray1[local3506][local3663][local3670] = null; - } - } - } - } - Static26.aClass69_27 = new LinkedList(); - Static166.anInt4054 = 0; - Static9.anInt178 = 0; - Static8.method121(); - DelayedStateChange.clear(); - Static133.anInt5230 = 0; - Static233.anInt5217 = 0; - Static265.anInt5765 = 0; - Static231.anInt5203 = 0; - Static248.anInt4232 = 0; - Static245.anInt5375 = 0; - Static57.anInt1744 = 0; - Static251.anInt5449 = 0; - Static113.anInt4612 = 0; - Static233.anInt5225 = 0; - for (local3506 = 0; local3506 < Static155.varcs.length; local3506++) { - Static155.varcs[local3506] = -1; - } - if (InterfaceList.topLevelInterface != -1) { - InterfaceList.method2275(InterfaceList.topLevelInterface); - } - for (@Pc(3755) Class3_Sub31 local3755 = (Class3_Sub31) Static119.aClass133_9.head(); local3755 != null; local3755 = (Class3_Sub31) Static119.aClass133_9.next()) { - Static132.method2605(true, local3755); - } - InterfaceList.topLevelInterface = -1; - Static119.aClass133_9 = new HashTable(8); - InterfaceList.method1287(); - Static39.aClass13_10 = null; - Static60.aBoolean108 = false; - Static231.anInt5204 = 0; - Static134.aClass59_2.method1950(new int[] { 0, 0, 0, 0, 0 }, -1, false, null, -1); - for (local3506 = 0; local3506 < 8; local3506++) { - Static160.aClass100Array121[local3506] = null; - Static1.aBooleanArray1[local3506] = false; - Static191.anIntArray388[local3506] = -1; - } - Static102.method2073(); - Static19.aBoolean43 = true; - for (local3506 = 0; local3506 < 100; local3506++) { - Static186.aBooleanArray100[local3506] = true; - } - Static214.anInt5577 = 0; - Static199.aClass3_Sub22Array1 = null; - Static15.aClass100_87 = null; - for (local3506 = 0; local3506 < 6; local3506++) { - StockMarketManager.aClass136Array1[local3506] = new StockMarketOffer(); - } - for (local3506 = 0; local3506 < 25; local3506++) { - Static99.anIntArray240[local3506] = 0; - Static141.anIntArray326[local3506] = 0; - Static227.anIntArray446[local3506] = 0; - } - if (GlRenderer.enabled) { - Static86.setInstantFade(); - } - Static197.aBoolean228 = true; - Protocol.verifyId = 0; - Static195.aClass100_859 = LocalizedText.WALKHERE; - Static127.neverRemoveRoofs = false; - client.aShortArray88 = client.aShortArray19 = client.aShortArray74 = client.aShortArray87 = new short[256]; - Static114.method4637(); - Static261.aBoolean298 = false; - Static59.method1373(); - } } diff --git a/client/src/main/java/Static244.java b/client/src/main/java/Static244.java index a3e3a21..28be38f 100644 --- a/client/src/main/java/Static244.java +++ b/client/src/main/java/Static244.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static244 { @@ -11,28 +9,4 @@ public final class Static244 { @OriginalMember(owner = "client!tl", name = "i", descriptor = "Lclient!na;") public static final JagString aClass100_1017 = JagString.parse(")1"); - @OriginalMember(owner = "client!tl", name = "a", descriptor = "(IIIIIIII)V") - public static void method4222(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { - @Pc(11) int local11 = Static78.method1690(Static106.anInt2869, arg5, Static267.anInt5773); - @Pc(17) int local17 = Static78.method1690(Static106.anInt2869, arg2, Static267.anInt5773); - @Pc(23) int local23 = Static78.method1690(Static224.anInt5063, arg6, Static172.anInt4164); - @Pc(29) int local29 = Static78.method1690(Static224.anInt5063, arg0, Static172.anInt4164); - @Pc(37) int local37 = Static78.method1690(Static106.anInt2869, arg3 + arg5, Static267.anInt5773); - @Pc(46) int local46 = Static78.method1690(Static106.anInt2869, arg2 - arg3, Static267.anInt5773); - @Pc(48) int local48; - for (local48 = local11; local48 < local37; local48++) { - Static131.method2576(Static71.anIntArrayArray10[local48], local23, local29, arg4); - } - for (local48 = local17; local48 > local46; local48--) { - Static131.method2576(Static71.anIntArrayArray10[local48], local23, local29, arg4); - } - @Pc(94) int local94 = Static78.method1690(Static224.anInt5063, arg3 + arg6, Static172.anInt4164); - @Pc(103) int local103 = Static78.method1690(Static224.anInt5063, arg0 - arg3, Static172.anInt4164); - for (local48 = local37; local48 <= local46; local48++) { - @Pc(122) int[] local122 = Static71.anIntArrayArray10[local48]; - Static131.method2576(local122, local23, local94, arg4); - Static131.method2576(local122, local94, local103, arg1); - Static131.method2576(local122, local103, local29, arg4); - } - } } diff --git a/client/src/main/java/Static245.java b/client/src/main/java/Static245.java index e7dfc25..1e79ac9 100644 --- a/client/src/main/java/Static245.java +++ b/client/src/main/java/Static245.java @@ -7,10 +7,7 @@ public final class Static245 { @OriginalMember(owner = "client!tm", name = "g", descriptor = "I") public static int anInt5375; - @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!tm", name = "i", descriptor = "I") + @OriginalMember(owner = "client!tm", name = "i", descriptor = "I") public static int anInt5377 = 0; @OriginalMember(owner = "client!tm", name = "a", descriptor = "(II)V") diff --git a/client/src/main/java/Static246.java b/client/src/main/java/Static246.java index 929a53d..8a493f4 100644 --- a/client/src/main/java/Static246.java +++ b/client/src/main/java/Static246.java @@ -10,9 +10,6 @@ public final class Static246 { @OriginalMember(owner = "client!u", name = "a", descriptor = "I") public static int anInt5388 = 0; - @OriginalMember(owner = "client!u", name = "g", descriptor = "Lclient!na;") - public static final JagString aClass100_1029 = JagString.parse("cookiehost"); - @OriginalMember(owner = "client!u", name = "a", descriptor = "(Z)V") public static void method4239() { for (@Pc(9) SpotAnimNode local9 = (SpotAnimNode) Static99.aClass69_64.method2289(); local9 != null; local9 = (SpotAnimNode) Static99.aClass69_64.method2288()) { @@ -44,7 +41,7 @@ public final class Static246 { @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, Static123.method2420(arg0.combatLevel, PlayerList.self.anInt1652), Static123.aClass100_593, local47, Static123.parseInt(arg0.combatLevel), Static72.aClass100_448 }); + local35 = JagString.concatenate(new JagString[] { local35, Static123.method2420(arg0.combatLevel, PlayerList.self.combatLevel), Static123.aClass100_593, local47, Static123.parseInt(arg0.combatLevel), Static72.aClass100_448 }); } if (Static260.anInt5014 == 1) { Static98.method1966(Static169.anInt4075, (long) arg2, JagString.concatenate(new JagString[] { Static34.aClass100_203, Static201.aClass100_407, local35 }), arg1, (short) 26, LocalizedText.USE, arg3); @@ -93,7 +90,7 @@ public final class Static246 { 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.anInt1652) { + if (arg0.combatLevel > PlayerList.self.combatLevel) { local271 = 2000; } @Pc(281) short local281 = 0; diff --git a/client/src/main/java/Static247.java b/client/src/main/java/Static247.java index a06c984..b97800f 100644 --- a/client/src/main/java/Static247.java +++ b/client/src/main/java/Static247.java @@ -12,7 +12,7 @@ public final class Static247 { @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 (Static172.anInt4164 <= arg1 && Static224.anInt5063 >= arg3 && Static267.anInt5773 <= arg2 && arg4 <= Static106.anInt2869) { + if (TextureOp29.anInt4164 <= arg1 && TextureOp29.anInt5063 >= arg3 && TextureOp29.anInt5773 <= arg2 && arg4 <= TextureOp29.anInt2869) { if (arg5 == 1) { Static134.method2622(arg0, arg3, arg2, arg4, arg1); } else { @@ -68,7 +68,7 @@ public final class Static247 { local21 = local8.anInt666; local24 = local8.anInt672; local27 = local8.anInt668; - local31 = Static130.aClass3_Sub5ArrayArrayArray1[local24]; + local31 = SceneGraph.tiles[local24]; @Pc(33) float local33 = 0.0F; if (GlRenderer.enabled) { if (Static80.underWaterTileHeightMap == Static83.activeTileHeightMap) { @@ -98,7 +98,7 @@ public final class Static247 { } if (arg1) { if (local24 > 0) { - local153 = Static130.aClass3_Sub5ArrayArrayArray1[local24 - 1][local18][local21]; + local153 = SceneGraph.tiles[local24 - 1][local18][local21]; if (local153 != null && local153.aBoolean46) { continue; } @@ -136,18 +136,18 @@ public final class Static247 { if (GlRenderer.enabled) { GlRenderer.method4159(201.5F - (float) (local153.anInt668 + 1) * 50.0F); } - if (local153.aClass131_1 == null) { - if (local153.aClass43_1 != null) { + if (local153.plainTile == null) { + if (local153.shapedTile != null) { if (Static9.method187(0, local18, local21)) { - Static147.method2762(local153.aClass43_1, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + Static147.method2762(local153.shapedTile, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); } else { - Static147.method2762(local153.aClass43_1, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + Static147.method2762(local153.shapedTile, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); } } } else if (Static9.method187(0, local18, local21)) { - Static132.method2610(local153.aClass131_1, 0, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + Static132.method2610(local153.plainTile, 0, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); } else { - Static132.method2610(local153.aClass131_1, 0, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + Static132.method2610(local153.plainTile, 0, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); } var22 = local153.aClass77_1; if (var22 != null) { @@ -174,21 +174,21 @@ public final class Static247 { } } var24 = false; - if (local8.aClass131_1 == null) { - if (local8.aClass43_1 != null) { + if (local8.plainTile == null) { + if (local8.shapedTile != null) { if (Static9.method187(local27, local18, local21)) { - Static147.method2762(local8.aClass43_1, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + Static147.method2762(local8.shapedTile, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); } else { var24 = true; - Static147.method2762(local8.aClass43_1, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + Static147.method2762(local8.shapedTile, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); } } } else if (Static9.method187(local27, local18, local21)) { - Static132.method2610(local8.aClass131_1, local27, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); + Static132.method2610(local8.plainTile, local27, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, true); } else { var24 = true; - if (local8.aClass131_1.anInt4865 != 12345678 || Static158.aBoolean187 && local24 <= Static160.anInt3902) { - Static132.method2610(local8.aClass131_1, local27, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); + if (local8.plainTile.anInt4865 != 12345678 || Static158.aBoolean187 && local24 <= Static160.anInt3902) { + Static132.method2610(local8.plainTile, local27, Static109.anInt2886, Static121.anInt3038, Static231.anInt5205, Static81.anInt2222, local18, local21, false); } } if (var24) { @@ -626,7 +626,7 @@ public final class Static247 { } @Pc(2388) Tile local2388; if (local24 < Static126.anInt3114 - 1) { - local2388 = Static130.aClass3_Sub5ArrayArrayArray1[local24 + 1][local18][local21]; + local2388 = SceneGraph.tiles[local24 + 1][local18][local21]; if (local2388 != null && local2388.aBoolean46) { Static7.aClass69_32.addTail(local2388); } diff --git a/client/src/main/java/Static248.java b/client/src/main/java/Static248.java index 6ccd54d..aa263a3 100644 --- a/client/src/main/java/Static248.java +++ b/client/src/main/java/Static248.java @@ -11,14 +11,7 @@ public final class Static248 { @OriginalMember(owner = "client!uc", name = "a", descriptor = "I") public static int anInt4229 = 2; - @OriginalMember(owner = "client!uc", name = "a", descriptor = "(IB)Z") - public static boolean method3288(@OriginalArg(0) int arg0) { - Protocol.verifyId = arg0 + 1 & 0xFFFF; - Static34.verifyIdChanged = true; - return true; - } - - @OriginalMember(owner = "client!uc", name = "a", descriptor = "(II)I") + @OriginalMember(owner = "client!uc", name = "a", descriptor = "(II)I") public static int method3289(@OriginalArg(0) int arg0) { @Pc(9) int local9 = (arg0 >>> 1 & 0xD5555555) + (arg0 & 0x55555555); @Pc(19) int local19 = (local9 >>> 2 & 0x33333333) + (local9 & 0x33333333); @@ -40,7 +33,7 @@ public final class Static248 { @Pc(37) int local37; @Pc(183) int local183; for (@Pc(23) int local23 = Static235.anInt5276; local23 < Static126.anInt3114; local23++) { - @Pc(30) Tile[][] local30 = Static130.aClass3_Sub5ArrayArrayArray1[local23]; + @Pc(30) Tile[][] local30 = SceneGraph.tiles[local23]; for (local32 = Static31.anInt987; local32 < Static2.anInt15; local32++) { for (local37 = Static80.anInt4698; local37 < Static215.anInt4866; local37++) { @Pc(46) Tile local46 = local30[local32][local37]; @@ -109,14 +102,14 @@ public final class Static248 { WaterMaterialRenderer.method619(local285.anInt2486); Static161.method3066(WaterMaterialRenderer.method2422()); } - local285.method1944(Static130.aClass3_Sub5ArrayArrayArray1, local294, false); + local285.method1944(SceneGraph.tiles, local294, false); } UnderwaterMaterialRenderer.method4608(); } else { local32 = Static235.anInt5276; while (true) { if (local32 >= Static126.anInt3114) { - Static120.method2402(Static167.anInt4069, Static193.anInt4539, Static130.aClass3_Sub5ArrayArrayArray1); + Static120.method2402(Static167.anInt4069, Static193.anInt4539, SceneGraph.tiles); break; } for (local37 = 0; local37 < Static182.aClass3_Sub14ArrayArray2[local32].length; local37++) { @@ -125,7 +118,7 @@ public final class Static248 { if (local336.anInt2485 != -1 && Rasteriser.textureProvider.method3237(local336.anInt2485) == 4 && Preferences.highWaterDetail) { WaterMaterialRenderer.method619(local336.anInt2486); } - local336.method1944(Static130.aClass3_Sub5ArrayArrayArray1, local350, false); + local336.method1944(SceneGraph.tiles, local350, false); } if (local32 == 0 && Preferences.sceneryShadowsType > 0) { GlRenderer.method4159(101.5F); @@ -144,7 +137,7 @@ public final class Static248 { @Pc(415) int local415; @Pc(428) int local428; for (local399 = Static235.anInt5276; local399 < Static126.anInt3114; local399++) { - local406 = Static130.aClass3_Sub5ArrayArrayArray1[local399]; + local406 = SceneGraph.tiles[local399]; for (local37 = -Static277.tileVisibilityDistance; local37 <= 0; local37++) { local415 = Static167.anInt4069 + local37; local183 = Static167.anInt4069 - local37; @@ -191,7 +184,7 @@ public final class Static248 { } } for (local399 = Static235.anInt5276; local399 < Static126.anInt3114; local399++) { - local406 = Static130.aClass3_Sub5ArrayArrayArray1[local399]; + local406 = SceneGraph.tiles[local399]; for (local37 = -Static277.tileVisibilityDistance; local37 <= 0; local37++) { local415 = Static167.anInt4069 + local37; local183 = Static167.anInt4069 - local37; diff --git a/client/src/main/java/Static25.java b/client/src/main/java/Static25.java index 22fc8d9..fa4bbac 100644 --- a/client/src/main/java/Static25.java +++ b/client/src/main/java/Static25.java @@ -5,7 +5,4 @@ public final class Static25 { @OriginalMember(owner = "client!c", name = "bb", descriptor = "[Lclient!ec;") public static Scenery[] aClass31Array2; - @OriginalMember(owner = "client!c", name = "eb", descriptor = "I") - public static int y = 0; - } diff --git a/client/src/main/java/Static250.java b/client/src/main/java/Static250.java index 7fd1bc0..443d38b 100644 --- a/client/src/main/java/Static250.java +++ b/client/src/main/java/Static250.java @@ -36,16 +36,12 @@ public final class Static250 { for (@Pc(93) int local93 = 0; local93 < InterfaceList.keyQueueSize; local93++) { @Pc(104) int code = InterfaceList.keyCodes[local93]; if (code == Keyboard.KEY_UP) { - Camera.pitchDirection = 1; Camera.pitchTarget += 47; } else if (code == Keyboard.KEY_DOWN) { - Camera.pitchDirection = 0; Camera.pitchTarget -= 17; } else if (code == Keyboard.KEY_LEFT) { - Camera.yawDirection = 1; Camera.yawTarget -= 65; } else if (code == Keyboard.KEY_RIGHT) { - Camera.yawDirection = 0; Camera.yawTarget += 191; } } diff --git a/client/src/main/java/Static251.java b/client/src/main/java/Static251.java index f056b30..a66263f 100644 --- a/client/src/main/java/Static251.java +++ b/client/src/main/java/Static251.java @@ -19,42 +19,10 @@ public final class Static251 { @OriginalMember(owner = "client!ug", name = "e", descriptor = "I") public static int anInt5447 = 0; - @OriginalMember(owner = "client!ug", name = "m", descriptor = "I") - public static int anInt5454 = 0; - - @OriginalMember(owner = "client!ug", name = "o", descriptor = "I") - public static int anInt5456 = 0; - @OriginalMember(owner = "client!ug", name = "r", descriptor = "I") public static int anInt5459 = 0; - @OriginalMember(owner = "client!ug", name = "a", descriptor = "(B)V") - public static void loop() { - for (@Pc(10) Class3_Sub7 local10 = (Class3_Sub7) Static26.aClass69_27.method2289(); local10 != null; local10 = (Class3_Sub7) Static26.aClass69_27.method2288()) { - if (local10.anInt924 > 0) { - local10.anInt924--; - } - if (local10.anInt924 != 0) { - if (local10.anInt925 > 0) { - local10.anInt925--; - } - if (local10.anInt925 == 0 && local10.anInt928 >= 1 && local10.anInt916 >= 1 && local10.anInt928 <= 102 && local10.anInt916 <= 102 && (local10.anInt929 < 0 || Static113.method3557(local10.anInt929, local10.anInt926))) { - Static79.method1698(local10.anInt929, local10.anInt928, local10.anInt918, local10.anInt922, local10.anInt916, local10.anInt926, local10.anInt927); - local10.anInt925 = -1; - if (local10.anInt921 == local10.anInt929 && local10.anInt921 == -1) { - local10.unlink(); - } else if (local10.anInt929 == local10.anInt921 && local10.anInt922 == local10.anInt923 && local10.anInt920 == local10.anInt926) { - local10.unlink(); - } - } - } else if (local10.anInt921 < 0 || Static113.method3557(local10.anInt921, local10.anInt920)) { - Static79.method1698(local10.anInt921, local10.anInt928, local10.anInt918, local10.anInt923, local10.anInt916, local10.anInt920, local10.anInt927); - local10.unlink(); - } - } - } - - @OriginalMember(owner = "client!ug", name = "a", descriptor = "(II)V") + @OriginalMember(owner = "client!ug", name = "a", descriptor = "(II)V") public static void method4278(@OriginalArg(0) int arg0) { if (Static241.anIntArray522 == null || Static241.anIntArray522.length < arg0) { Static241.anIntArray522 = new int[arg0]; diff --git a/client/src/main/java/Static252.java b/client/src/main/java/Static252.java index 83775d3..69f0ad4 100644 --- a/client/src/main/java/Static252.java +++ b/client/src/main/java/Static252.java @@ -39,12 +39,12 @@ public final class Static252 { if (Static227.cameraType != 1) { local33 = SceneGraph.getTileHeight(Player.level, Static138.renderX, Static134.renderZ); if (local33 - Static5.anInt40 < 800 && (Static12.tileSettings[Player.level][Static138.renderX >> 7][Static134.renderZ >> 7] & 0x4) != 0) { - Static254.method4348(false, Static138.renderX >> 7, Static134.renderZ >> 7, Static130.aClass3_Sub5ArrayArrayArray1, 1); + Static254.method4348(false, Static138.renderX >> 7, Static134.renderZ >> 7, SceneGraph.tiles, 1); } return; } if ((Static12.tileSettings[Player.level][PlayerList.self.xFine >> 7][PlayerList.self.zFine >> 7] & 0x4) != 0) { - Static254.method4348(false, PlayerList.self.xFine >> 7, PlayerList.self.zFine >> 7, Static130.aClass3_Sub5ArrayArrayArray1, 0); + Static254.method4348(false, PlayerList.self.xFine >> 7, PlayerList.self.zFine >> 7, SceneGraph.tiles, 0); } if (Static240.cameraPitch >= 310) { return; @@ -77,7 +77,7 @@ public final class Static252 { local40--; } if ((Static12.tileSettings[Player.level][local33][local40] & 0x4) != 0) { - Static254.method4348(false, local33, local40, Static130.aClass3_Sub5ArrayArrayArray1, 1); + Static254.method4348(false, local33, local40, SceneGraph.tiles, 1); break; } local186 += local192; @@ -89,7 +89,7 @@ public final class Static252 { } local186 -= 65536; if ((Static12.tileSettings[Player.level][local33][local40] & 0x4) != 0) { - Static254.method4348(false, local33, local40, Static130.aClass3_Sub5ArrayArrayArray1, 1); + Static254.method4348(false, local33, local40, SceneGraph.tiles, 1); break; } } @@ -105,7 +105,7 @@ public final class Static252 { local33--; } if ((Static12.tileSettings[Player.level][local33][local40] & 0x4) != 0) { - Static254.method4348(false, local33, local40, Static130.aClass3_Sub5ArrayArrayArray1, 1); + Static254.method4348(false, local33, local40, SceneGraph.tiles, 1); break; } local186 += local192; @@ -117,7 +117,7 @@ public final class Static252 { } local186 -= 65536; if ((Static12.tileSettings[Player.level][local33][local40] & 0x4) != 0) { - Static254.method4348(false, local33, local40, Static130.aClass3_Sub5ArrayArrayArray1, 1); + Static254.method4348(false, local33, local40, SceneGraph.tiles, 1); break; } } diff --git a/client/src/main/java/Static254.java b/client/src/main/java/Static254.java index 35bc0cb..46eb681 100644 --- a/client/src/main/java/Static254.java +++ b/client/src/main/java/Static254.java @@ -13,10 +13,7 @@ public final class Static254 { @OriginalMember(owner = "client!uj", name = "s", descriptor = "Lclient!na;") public static final JagString aClass100_1061 = JagString.parse("null"); - @OriginalMember(owner = "client!uj", name = "t", descriptor = "[I") - public static final int[] intStack = new int[1000]; - - @OriginalMember(owner = "client!uj", name = "A", descriptor = "[I") + @OriginalMember(owner = "client!uj", name = "A", descriptor = "[I") public static final int[] anIntArray489 = new int[] { 2, 0, 0, 2, 0, 0, 0, 4, 4 }; @OriginalMember(owner = "client!uj", name = "C", descriptor = "[Lclient!na;") diff --git a/client/src/main/java/Static257.java b/client/src/main/java/Static257.java index 40cf2f9..98f9c06 100644 --- a/client/src/main/java/Static257.java +++ b/client/src/main/java/Static257.java @@ -12,7 +12,7 @@ public final class Static257 { @OriginalMember(owner = "client!v", name = "a", descriptor = "(IIIJ)Z") public static boolean method523(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) long arg3) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return false; } else if (local7.aClass77_1 != null && local7.aClass77_1.key == arg3) { diff --git a/client/src/main/java/Static258.java b/client/src/main/java/Static258.java index 5cdc8f1..1a3ab2a 100644 --- a/client/src/main/java/Static258.java +++ b/client/src/main/java/Static258.java @@ -44,7 +44,7 @@ public final class Static258 { Static169.aClass13_18 = arg2; Static18.anInt588 = local171; if (arg2.objTypes[local171] > 0) { - @Pc(267) ServerActiveProperties local267 = Static36.method940(arg2); + @Pc(267) ServerActiveProperties local267 = InterfaceList.getServerActiveProperties(arg2); @Pc(276) ObjType local276 = ObjTypeList.get(arg2.objTypes[local171] - 1); if (Static260.anInt5014 == 1 && local267.method510()) { if (Static224.anInt5062 != arg2.id || Static185.anInt4370 != local171) { @@ -136,24 +136,24 @@ public final class Static258 { for (local171 = 9; local171 >= 5; local171--) { @Pc(765) JagString local765 = Static205.method3677(arg2, local171); if (local765 != null) { - Static98.method1966(Static8.method118(local171, arg2), (long) (local171 + 1), arg2.aClass100_88, arg2.createdComponentId, (short) 1003, local765, arg2.id); + Static98.method1966(Static8.method118(local171, arg2), (long) (local171 + 1), arg2.opBase, arg2.createdComponentId, (short) 1003, local765, arg2.id); } } local47 = Static97.method1963(arg2); if (local47 != null) { - Static98.method1966(-1, 0L, arg2.aClass100_88, arg2.createdComponentId, (short) 32, local47, arg2.id); + Static98.method1966(-1, 0L, arg2.opBase, arg2.createdComponentId, (short) 32, local47, arg2.id); } for (local173 = 4; local173 >= 0; local173--) { @Pc(828) JagString local828 = Static205.method3677(arg2, local173); if (local828 != null) { - Static98.method1966(Static8.method118(local173, arg2), (long) (local173 + 1), arg2.aClass100_88, arg2.createdComponentId, (short) 9, local828, arg2.id); + Static98.method1966(Static8.method118(local173, arg2), (long) (local173 + 1), arg2.opBase, arg2.createdComponentId, (short) 9, local828, arg2.id); } } - if (Static36.method940(arg2).method506()) { + if (InterfaceList.getServerActiveProperties(arg2).method506()) { Static98.method1966(-1, 0L, JagString.EMPTY, arg2.createdComponentId, (short) 41, LocalizedText.CONTINUE, arg2.id); } - } else if (Static36.method940(arg2).method508() && (Static274.anInt4999 & 0x20) != 0) { - Static98.method1966(Static246.anInt5393, 0L, JagString.concatenate(new JagString[] { Static78.aClass100_466, Static201.aClass100_408, arg2.aClass100_88 }), arg2.createdComponentId, (short) 12, Static102.aClass100_545, arg2.id); + } else if (InterfaceList.getServerActiveProperties(arg2).method508() && (Static274.anInt4999 & 0x20) != 0) { + Static98.method1966(Static246.anInt5393, 0L, JagString.concatenate(new JagString[] { Static78.aClass100_466, Static201.aClass100_408, arg2.opBase}), arg2.createdComponentId, (short) 12, Static102.aClass100_545, arg2.id); } } diff --git a/client/src/main/java/Static260.java b/client/src/main/java/Static260.java index 9cea55b..d260a28 100644 --- a/client/src/main/java/Static260.java +++ b/client/src/main/java/Static260.java @@ -189,7 +189,7 @@ public final class Static260 { } local14.unlink(); } - for (local14 = (AreaSound) Static93.aClass133_7.head(); local14 != null; local14 = (AreaSound) Static93.aClass133_7.next()) { + for (local14 = (AreaSound) AreaSoundManager.aClass133_7.head(); local14 != null; local14 = (AreaSound) AreaSoundManager.aClass133_7.next()) { if (local14.primaryStream != null) { client.soundStream.removeSubStream(local14.primaryStream); local14.primaryStream = null; diff --git a/client/src/main/java/Static261.java b/client/src/main/java/Static261.java index ed2d71b..3bbbc4a 100644 --- a/client/src/main/java/Static261.java +++ b/client/src/main/java/Static261.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static261 { @@ -10,12 +8,4 @@ public final class Static261 { @OriginalMember(owner = "client!ve", name = "w", descriptor = "Z") public static boolean aBoolean298 = false; - @OriginalMember(owner = "client!ve", name = "a", descriptor = "(BIIII)V") - public static void method4505(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { - @Pc(8) DelayedStateChange local8 = Static238.method4143(8, arg1); - local8.pushServer(); - local8.intArg2 = arg0; - local8.intArg1 = arg3; - local8.intArg3 = arg2; - } } diff --git a/client/src/main/java/Static262.java b/client/src/main/java/Static262.java index d087fcf..7478b3e 100644 --- a/client/src/main/java/Static262.java +++ b/client/src/main/java/Static262.java @@ -28,16 +28,16 @@ public final class Static262 { local8.anInt3049 = arg6; local8.anInt3052 = arg7; for (@Pc(42) int local42 = arg0; local42 >= 0; local42--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local42][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local42][arg1][arg2] = new Tile(local42, arg1, arg2); + if (SceneGraph.tiles[local42][arg1][arg2] == null) { + SceneGraph.tiles[local42][arg1][arg2] = new Tile(local42, arg1, arg2); } } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass77_1 = local8; + SceneGraph.tiles[arg0][arg1][arg2].aClass77_1 = local8; } @OriginalMember(owner = "client!vf", name = "a", descriptor = "(III)Lclient!jh;") public static Wall method4509(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null ? null : local7.aClass77_1; } diff --git a/client/src/main/java/Static263.java b/client/src/main/java/Static263.java index 3d31173..b85dbe2 100644 --- a/client/src/main/java/Static263.java +++ b/client/src/main/java/Static263.java @@ -22,9 +22,6 @@ public final class Static263 { @OriginalMember(owner = "client!vg", name = "f", descriptor = "Lclient!na;") public static final JagString aClass100_1081 = JagString.parse(""); - @OriginalMember(owner = "client!vg", name = "h", descriptor = "Lclient!na;") - public static final JagString aClass100_1082 = JagString.parse("; Expires="); - @OriginalMember(owner = "client!vg", name = "a", descriptor = "(I[S)[S") public static short[] method4511(@OriginalArg(1) short[] arg0) { if (arg0 == null) { @@ -54,7 +51,7 @@ public final class Static263 { if (local8.anInt453 > 0) { local37 = Static249.method4265(local8); } - if (!local37 || !Static36.method940(local8).method503(arg2 - 1)) { + if (!local37 || !InterfaceList.getServerActiveProperties(local8).method503(arg2 - 1)) { return; } if (arg2 == 1) { diff --git a/client/src/main/java/Static264.java b/client/src/main/java/Static264.java index da0bb7a..8a7117b 100644 --- a/client/src/main/java/Static264.java +++ b/client/src/main/java/Static264.java @@ -31,25 +31,25 @@ public final class Static264 { 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 < Static152.mapSizeX) { - local12 = Static130.aClass3_Sub5ArrayArrayArray1[arg1][arg2 + 1][arg3]; + local12 = SceneGraph.tiles[arg1][arg2 + 1][arg3]; if (local12 != null && local12.aClass15_1 != null && local12.aClass15_1.aClass8_1.method4543()) { arg0.method4544(local12.aClass15_1.aClass8_1, 128, 0, 0, true); } } if (arg3 < Static152.mapSizeX) { - local12 = Static130.aClass3_Sub5ArrayArrayArray1[arg1][arg2][arg3 + 1]; + local12 = SceneGraph.tiles[arg1][arg2][arg3 + 1]; if (local12 != null && local12.aClass15_1 != null && local12.aClass15_1.aClass8_1.method4543()) { arg0.method4544(local12.aClass15_1.aClass8_1, 0, 0, 128, true); } } if (arg2 < Static152.mapSizeX && arg3 < Static99.mapSizeZ) { - local12 = Static130.aClass3_Sub5ArrayArrayArray1[arg1][arg2 + 1][arg3 + 1]; + local12 = SceneGraph.tiles[arg1][arg2 + 1][arg3 + 1]; if (local12 != null && local12.aClass15_1 != null && local12.aClass15_1.aClass8_1.method4543()) { arg0.method4544(local12.aClass15_1.aClass8_1, 128, 0, 128, true); } } if (arg2 < Static152.mapSizeX && arg3 > 0) { - local12 = Static130.aClass3_Sub5ArrayArrayArray1[arg1][arg2 + 1][arg3 - 1]; + local12 = SceneGraph.tiles[arg1][arg2 + 1][arg3 - 1]; if (local12 != null && local12.aClass15_1 != null && local12.aClass15_1.aClass8_1.method4543()) { arg0.method4544(local12.aClass15_1.aClass8_1, 128, 0, -128, true); } diff --git a/client/src/main/java/Static265.java b/client/src/main/java/Static265.java index 71d2391..86b9fc7 100644 --- a/client/src/main/java/Static265.java +++ b/client/src/main/java/Static265.java @@ -9,7 +9,7 @@ public final class Static265 { @OriginalMember(owner = "client!vj", name = "a", descriptor = "(III)J") public static long method4521(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null || local7.aClass77_1 == null ? 0L : local7.aClass77_1.key; } diff --git a/client/src/main/java/Static266.java b/client/src/main/java/Static266.java index c7908b2..ba14355 100644 --- a/client/src/main/java/Static266.java +++ b/client/src/main/java/Static266.java @@ -43,7 +43,7 @@ public final class Static266 { public static void method4193(@OriginalArg(0) Scenery arg0) { for (@Pc(2) int local2 = arg0.anInt1701; local2 <= arg0.anInt1713; local2++) { for (@Pc(9) int local9 = arg0.anInt1696; local9 <= arg0.anInt1698; local9++) { - @Pc(22) Tile local22 = Static130.aClass3_Sub5ArrayArrayArray1[arg0.anInt1709][local2][local9]; + @Pc(22) Tile local22 = SceneGraph.tiles[arg0.anInt1709][local2][local9]; if (local22 != null) { @Pc(26) int local26; for (local26 = 0; local26 < local22.anInt662; local26++) { diff --git a/client/src/main/java/Static267.java b/client/src/main/java/Static267.java index 55e44d6..73181f8 100644 --- a/client/src/main/java/Static267.java +++ b/client/src/main/java/Static267.java @@ -7,9 +7,6 @@ public final class Static267 { @OriginalMember(owner = "client!vl", name = "e", descriptor = "[I") public static final int[] anIntArray517 = new int[] { 1, 2, 4, 8 }; - @OriginalMember(owner = "client!vl", name = "h", descriptor = "I") - public static int anInt5773 = 0; - @OriginalMember(owner = "client!vl", name = "i", descriptor = "[I") public static int[] anIntArray518 = new int[2]; @@ -21,7 +18,7 @@ public final class Static267 { @OriginalMember(owner = "client!vl", name = "a", descriptor = "(III)Lclient!bm;") public static GroundDecor method4526(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return null; } else { diff --git a/client/src/main/java/Static269.java b/client/src/main/java/Static269.java index 844b802..154cc85 100644 --- a/client/src/main/java/Static269.java +++ b/client/src/main/java/Static269.java @@ -202,7 +202,7 @@ public final class Static269 { @OriginalMember(owner = "client!wa", name = "a", descriptor = "(III)Lclient!bm;") public static GroundDecor method2210(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null || local7.aClass15_1 == null ? null : local7.aClass15_1; } @@ -266,11 +266,11 @@ public final class Static269 { WorldMap.aClass3_Sub2_Sub1_Sub1_2 = null; WorldMap.aClass3_Sub2_Sub1_Sub1_2 = new SoftwareSprite(arg3, arg2); } - SoftwareRaster.method2491(WorldMap.aClass3_Sub2_Sub1_Sub1_2.anIntArray20, arg3, arg2); + SoftwareRaster.method2491(WorldMap.aClass3_Sub2_Sub1_Sub1_2.pixels, arg3, arg2); Static214.method4364(arg3, 0, local61, local50, 0, local236, arg2, local211); Static48.method1195(arg3, 0, local61, local236, arg2, 0, local211, local50); Static38.method959(0, 0, local211, arg3, local236, local50, local61, arg2); - Static46.method1178(WorldMap.aClass3_Sub2_Sub1_Sub1_2.anIntArray20, arg0, arg1, arg3, arg2); + Static46.method1178(WorldMap.aClass3_Sub2_Sub1_Sub1_2.pixels, arg0, arg1, arg3, arg2); SoftwareRaster.pixels = null; } else { Static214.method4364(arg3 + arg0, arg1, local61, local50, arg0, local236, arg1 + arg2, local211); diff --git a/client/src/main/java/Static27.java b/client/src/main/java/Static27.java index 61ae411..b6d5a7b 100644 --- a/client/src/main/java/Static27.java +++ b/client/src/main/java/Static27.java @@ -5,10 +5,7 @@ public final class Static27 { @OriginalMember(owner = "client!cb", name = "ab", descriptor = "Lclient!na;") public static final JagString aClass100_164 = JagString.parse(" )2> "); - @OriginalMember(owner = "client!cb", name = "cb", descriptor = "Lclient!na;") - public static final JagString aClass100_165 = JagString.parse("titlebg"); - - @OriginalMember(owner = "client!cb", name = "fb", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!cb", name = "fb", descriptor = "Lclient!na;") public static final JagString aClass100_168 = JagString.parse(": "); } diff --git a/client/src/main/java/Static270.java b/client/src/main/java/Static270.java index a614e64..e5d8300 100644 --- a/client/src/main/java/Static270.java +++ b/client/src/main/java/Static270.java @@ -19,10 +19,7 @@ public final class Static270 { @OriginalMember(owner = "client!wb", name = "e", descriptor = "Lclient!na;") public static final JagString aClass100_1090 = JagString.parse("l"); - @OriginalMember(owner = "client!wb", name = "m", descriptor = "Lclient!na;") - public static JagString aClass100_1094 = null; - - @OriginalMember(owner = "client!wb", name = "a", descriptor = "(IIIIIIII)V") + @OriginalMember(owner = "client!wb", name = "a", descriptor = "(IIIIIIII)V") public static void method4594(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { @Pc(7) int local7 = 0; @Pc(9) int local9 = arg5; diff --git a/client/src/main/java/Static271.java b/client/src/main/java/Static271.java index 86f60a6..97e9451 100644 --- a/client/src/main/java/Static271.java +++ b/client/src/main/java/Static271.java @@ -7,9 +7,6 @@ public final class Static271 { @OriginalMember(owner = "client!wc", name = "g", descriptor = "I") public static int anInt5804 = 0; - @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!wc", name = "a", descriptor = "(Lclient!wa;I)V") public static void method4598(@OriginalArg(0) Buffer arg0) { if (client.uid != null) { diff --git a/client/src/main/java/Static272.java b/client/src/main/java/Static272.java index 295c509..3c83fd2 100644 --- a/client/src/main/java/Static272.java +++ b/client/src/main/java/Static272.java @@ -4,10 +4,7 @@ import org.openrs2.deob.annotation.Pc; public final class Static272 { - @OriginalMember(owner = "client!wd", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_989 = JagString.parse("cookieprefix"); - - @OriginalMember(owner = "client!wd", name = "g", descriptor = "I") + @OriginalMember(owner = "client!wd", name = "g", descriptor = "I") public static int anInt5214 = 0; @OriginalMember(owner = "client!wd", name = "a", descriptor = "(BII)V") diff --git a/client/src/main/java/Static273.java b/client/src/main/java/Static273.java index 392b4e1..aa444b3 100644 --- a/client/src/main/java/Static273.java +++ b/client/src/main/java/Static273.java @@ -42,16 +42,16 @@ public final class Static273 { local48 = 2; } if (local46 == 1) { - local41 = Static99.anIntArray240[local33[local39++]]; + local41 = PlayerSkillXpTable.boostedLevels[local33[local39++]]; } if (local46 == 17) { local48 = 3; } if (local46 == 2) { - local41 = Static141.anIntArray326[local33[local39++]]; + local41 = PlayerSkillXpTable.baseLevels[local33[local39++]]; } if (local46 == 3) { - local41 = Static227.anIntArray446[local33[local39++]]; + local41 = PlayerSkillXpTable.experience[local33[local39++]]; } @Pc(124) int local124; @Pc(135) Component local135; @@ -74,18 +74,18 @@ public final class Static273 { local41 = Static7.varps[local33[local39++]]; } if (local46 == 6) { - local41 = ObjType.anIntArray213[Static141.anIntArray326[local33[local39++]] - 1]; + local41 = ObjType.anIntArray213[PlayerSkillXpTable.baseLevels[local33[local39++]] - 1]; } if (local46 == 7) { local41 = Static7.varps[local33[local39++]] * 100 / 46875; } if (local46 == 8) { - local41 = PlayerList.self.anInt1652; + local41 = PlayerList.self.combatLevel; } if (local46 == 9) { for (local124 = 0; local124 < 25; local124++) { if (Static182.aBooleanArray97[local124]) { - local41 += Static141.anIntArray326[local124]; + local41 += PlayerSkillXpTable.baseLevels[local124]; } } } @@ -104,10 +104,10 @@ public final class Static273 { } } if (local46 == 11) { - local41 = Static12.anInt400; + local41 = Player.runEnergy; } if (local46 == 12) { - local41 = Static251.anInt5456; + local41 = Player.weight; } if (local46 == 13) { local124 = Static7.varps[local33[local39++]]; diff --git a/client/src/main/java/Static276.java b/client/src/main/java/Static276.java index 65ad100..e8a24d6 100644 --- a/client/src/main/java/Static276.java +++ b/client/src/main/java/Static276.java @@ -13,10 +13,7 @@ public final class Static276 { @OriginalMember(owner = "client!wh", name = "m", descriptor = "[I") public static final int[] anIntArray564 = new int[5]; - @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!wh", name = "o", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!wh", name = "o", descriptor = "Lclient!na;") public static final JagString aClass100_1096 = JagString.parse("rect_debug="); @OriginalMember(owner = "client!wh", name = "u", descriptor = "Lclient!na;") @@ -35,7 +32,7 @@ public final class Static276 { @OriginalMember(owner = "client!wh", name = "a", descriptor = "(IILclient!na;)V") public static void method4613(@OriginalArg(0) int arg0, @OriginalArg(2) JagString arg1) { - @Pc(7) JagString local7 = arg1.method3159().method3125(); + @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]]; diff --git a/client/src/main/java/Static278.java b/client/src/main/java/Static278.java index c604739..9ff5349 100644 --- a/client/src/main/java/Static278.java +++ b/client/src/main/java/Static278.java @@ -13,59 +13,6 @@ public final class Static278 { @OriginalMember(owner = "client!wj", name = "f", descriptor = "Lclient!na;") public static final JagString aClass100_1103 = JagString.parse("ul"); - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(I)V") - public static void method4645() { - while (true) { - if (Protocol.inboundBuffer.method2241(Protocol.length) >= 27) { - @Pc(14) int local14 = Protocol.inboundBuffer.gBits(15); - if (local14 != 32767) { - @Pc(19) boolean local19 = false; - if (Static175.npcs[local14] == null) { - local19 = true; - Static175.npcs[local14] = new Npc(); - } - @Pc(37) Npc local37 = Static175.npcs[local14]; - Static33.anIntArray79[Static272.anInt5214++] = local14; - local37.lastSeenLoop = client.loop; - if (local37.type != null && local37.type.hasAreaSound()) { - Static91.method1877(local37); - } - @Pc(66) int local66 = Protocol.inboundBuffer.gBits(1); - @Pc(73) int local73 = Static56.anIntArray141[Protocol.inboundBuffer.gBits(3)]; - if (local19) { - local37.anInt3400 = local37.anInt3381 = local73; - } - @Pc(86) int local86 = Protocol.inboundBuffer.gBits(1); - if (local86 == 1) { - Protocol.extendedIds[Protocol.extendedCount++] = local14; - } - @Pc(105) int local105 = Protocol.inboundBuffer.gBits(5); - local37.method2698(NpcTypeList.get(Protocol.inboundBuffer.gBits(14))); - if (local105 > 15) { - local105 -= 32; - } - @Pc(124) int local124 = Protocol.inboundBuffer.gBits(5); - if (local124 > 15) { - local124 -= 32; - } - local37.method2692(local37.type.soze); - local37.anInt3365 = local37.type.basId; - local37.anInt3376 = local37.type.anInt3733; - if (local37.anInt3376 == 0) { - local37.anInt3381 = 0; - } - local37.method2683(local37.getSize(), PlayerList.self.movementQueueX[0] + local124, local105 + PlayerList.self.movementQueueZ[0], local66 == 1); - if (local37.type.hasAreaSound()) { - Static122.method2411(local37.movementQueueZ[0], null, 0, local37, local37.movementQueueX[0], Player.level, null); - } - continue; - } - } - Protocol.inboundBuffer.accessBytes(); - return; - } - } - @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) Class120 local3 = new Class120(); @@ -86,15 +33,15 @@ public final class Static278 { @OriginalMember(owner = "client!wj", name = "a", descriptor = "(Z)V") public static void setRenderTiles(@OriginalArg(0) boolean arg0) { if (arg0) { - Static130.aClass3_Sub5ArrayArrayArray1 = Static276.underWaterGroundTiles; + SceneGraph.tiles = Static276.underWaterGroundTiles; Static83.activeTileHeightMap = Static80.underWaterTileHeightMap; Static182.aClass3_Sub14ArrayArray2 = Static195.underWaterHdTiles; } else { - Static130.aClass3_Sub5ArrayArrayArray1 = Static197.surfaceGroundTiles; + SceneGraph.tiles = Static197.surfaceGroundTiles; Static83.activeTileHeightMap = Static107.surfaceTileHeightMap; Static182.aClass3_Sub14ArrayArray2 = Static36.surfaceHdTiles; } - Static126.anInt3114 = Static130.aClass3_Sub5ArrayArrayArray1.length; + Static126.anInt3114 = SceneGraph.tiles.length; } @OriginalMember(owner = "client!wj", name = "b", descriptor = "(I)V") @@ -102,14 +49,6 @@ public final class Static278 { NpcTypeList.aClass99_18.clear(); } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIB)V") - public static void method4650(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { - if (Preferences.musicVolume != 0 && arg1 != -1) { - Static122.method2410(client.js5Archive11, arg1, Preferences.musicVolume); - MidiPlayer.jingle = true; - } - } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIZLclient!wa;IIBII)V") public static void method4651(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) Buffer arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7) { @Pc(32) int local32; @@ -172,24 +111,6 @@ public final class Static278 { } } - @OriginalMember(owner = "client!wj", name = "a", descriptor = "(BII)I") - public static int method4652(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { - @Pc(8) Inv local8 = (Inv) Static20.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 = "b", descriptor = "(B)V") public static void processLogout() { if (Protocol.socket != null) { @@ -197,7 +118,7 @@ public final class Static278 { Protocol.socket = null; } client.method3768(); - Static65.method1500(); + SceneGraph.clear(); @Pc(19) int local19; for (local19 = 0; local19 < 4; local19++) { PathFinder.collisionMaps[local19].resetFlags(); @@ -223,7 +144,7 @@ public final class Static278 { PlayerList.appearanceCache[local19] = null; } for (local19 = 0; local19 < 32768; local19++) { - Static175.npcs[local19] = null; + NpcList.npcs[local19] = null; } for (local19 = 0; local19 < 4; local19++) { for (@Pc(115) int local115 = 0; local115 < 104; local115++) { diff --git a/client/src/main/java/Static280.java b/client/src/main/java/Static280.java index e2ac34b..9dba3db 100644 --- a/client/src/main/java/Static280.java +++ b/client/src/main/java/Static280.java @@ -38,14 +38,6 @@ public final class Static280 { arg0.anInt3381 = arg0.anInt3400; } - @OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIII)V") - public static void method4666(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2) { - @Pc(18) DelayedStateChange local18 = Static238.method4143(11, arg1); - local18.pushServer(); - local18.intArg3 = arg2; - local18.intArg1 = arg0; - } - @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; @@ -562,12 +554,12 @@ public final class Static280 { @Pc(69) int local69; @Pc(78) int local78; @Pc(87) int local87; - if (arg1 >= Static267.anInt5773 && Static106.anInt2869 >= arg1) { + if (arg1 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg1) { @Pc(52) int[] local52 = Static71.anIntArrayArray10[arg1]; - local61 = Static78.method1690(Static224.anInt5063, arg5 - arg2, Static172.anInt4164); - local69 = Static78.method1690(Static224.anInt5063, arg2 + arg5, Static172.anInt4164); - local78 = Static78.method1690(Static224.anInt5063, arg5 - local18, Static172.anInt4164); - local87 = Static78.method1690(Static224.anInt5063, arg5 + local18, Static172.anInt4164); + local61 = Static78.method1690(TextureOp29.anInt5063, arg5 - arg2, TextureOp29.anInt4164); + local69 = Static78.method1690(TextureOp29.anInt5063, arg2 + arg5, TextureOp29.anInt4164); + local78 = Static78.method1690(TextureOp29.anInt5063, arg5 - local18, TextureOp29.anInt4164); + local87 = Static78.method1690(TextureOp29.anInt5063, arg5 + local18, TextureOp29.anInt4164); Static131.method2576(local52, local61, local78, arg3); Static131.method2576(local52, local78, local87, arg0); Static131.method2576(local52, local87, local69, arg3); @@ -593,29 +585,29 @@ public final class Static280 { local35 -= local32 << 1; local161 = arg1 - local32; local61 = arg1 + local32; - if (Static267.anInt5773 <= local61 && Static106.anInt2869 >= local161) { + if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { if (local32 >= local18) { - local69 = Static78.method1690(Static224.anInt5063, local23 + arg5, Static172.anInt4164); - local78 = Static78.method1690(Static224.anInt5063, arg5 - local23, Static172.anInt4164); - if (Static106.anInt2869 >= local61) { + local69 = Static78.method1690(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); + local78 = Static78.method1690(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { Static131.method2576(Static71.anIntArrayArray10[local61], local78, local69, arg3); } - if (local161 >= Static267.anInt5773) { + if (local161 >= TextureOp29.anInt5773) { Static131.method2576(Static71.anIntArrayArray10[local161], local78, local69, arg3); } } else { local69 = Static241.anIntArray522[local32]; - local78 = Static78.method1690(Static224.anInt5063, local23 + arg5, Static172.anInt4164); - local87 = Static78.method1690(Static224.anInt5063, arg5 - local23, Static172.anInt4164); - local264 = Static78.method1690(Static224.anInt5063, arg5 + local69, Static172.anInt4164); - local273 = Static78.method1690(Static224.anInt5063, arg5 - local69, Static172.anInt4164); - if (Static106.anInt2869 >= local61) { + local78 = Static78.method1690(TextureOp29.anInt5063, local23 + arg5, TextureOp29.anInt4164); + local87 = Static78.method1690(TextureOp29.anInt5063, arg5 - local23, TextureOp29.anInt4164); + local264 = Static78.method1690(TextureOp29.anInt5063, arg5 + local69, TextureOp29.anInt4164); + local273 = Static78.method1690(TextureOp29.anInt5063, arg5 - local69, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { local280 = Static71.anIntArrayArray10[local61]; Static131.method2576(local280, local87, local273, arg3); Static131.method2576(local280, local273, local264, arg0); Static131.method2576(local280, local264, local78, arg3); } - if (local161 >= Static267.anInt5773) { + if (local161 >= TextureOp29.anInt5773) { local280 = Static71.anIntArrayArray10[local161]; Static131.method2576(local280, local87, local273, arg3); Static131.method2576(local280, local273, local264, arg0); @@ -626,33 +618,33 @@ public final class Static280 { } local161 = arg1 - local23; local61 = arg1 + local23; - if (Static267.anInt5773 <= local61 && Static106.anInt2869 >= local161) { + if (TextureOp29.anInt5773 <= local61 && TextureOp29.anInt2869 >= local161) { local69 = arg5 + local32; local78 = arg5 - local32; - if (local69 >= Static172.anInt4164 && Static224.anInt5063 >= local78) { - local69 = Static78.method1690(Static224.anInt5063, local69, Static172.anInt4164); - local78 = Static78.method1690(Static224.anInt5063, local78, Static172.anInt4164); + if (local69 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= local78) { + local69 = Static78.method1690(TextureOp29.anInt5063, local69, TextureOp29.anInt4164); + local78 = Static78.method1690(TextureOp29.anInt5063, local78, TextureOp29.anInt4164); if (local23 < local18) { local87 = local40 >= local23 ? local40 : Static241.anIntArray522[local23]; - local264 = Static78.method1690(Static224.anInt5063, local87 + arg5, Static172.anInt4164); - local273 = Static78.method1690(Static224.anInt5063, arg5 - local87, Static172.anInt4164); - if (Static106.anInt2869 >= local61) { + local264 = Static78.method1690(TextureOp29.anInt5063, local87 + arg5, TextureOp29.anInt4164); + local273 = Static78.method1690(TextureOp29.anInt5063, arg5 - local87, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local61) { local280 = Static71.anIntArrayArray10[local61]; Static131.method2576(local280, local78, local273, arg3); Static131.method2576(local280, local273, local264, arg0); Static131.method2576(local280, local264, local69, arg3); } - if (local161 >= Static267.anInt5773) { + if (local161 >= TextureOp29.anInt5773) { local280 = Static71.anIntArrayArray10[local161]; Static131.method2576(local280, local78, local273, arg3); Static131.method2576(local280, local273, local264, arg0); Static131.method2576(local280, local264, local69, arg3); } } else { - if (Static106.anInt2869 >= local61) { + if (TextureOp29.anInt2869 >= local61) { Static131.method2576(Static71.anIntArrayArray10[local61], local78, local69, arg3); } - if (local161 >= Static267.anInt5773) { + if (local161 >= TextureOp29.anInt5773) { Static131.method2576(Static71.anIntArrayArray10[local161], local78, local69, arg3); } } diff --git a/client/src/main/java/Static29.java b/client/src/main/java/Static29.java index 0c95f4b..514d7c6 100644 --- a/client/src/main/java/Static29.java +++ b/client/src/main/java/Static29.java @@ -44,13 +44,4 @@ public final class Static29 { local9.anInt922 = arg2; } - @OriginalMember(owner = "client!ce", name = "a", descriptor = "(IBI)Lclient!bn;") - public static Map method803(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { - for (@Pc(10) Map local10 = (Map) MapList.aClass69_120.method2289(); local10 != null; local10 = (Map) MapList.aClass69_120.method2288()) { - if (local10.aBoolean50 && local10.method664(arg1, arg0)) { - return local10; - } - } - return null; - } } diff --git a/client/src/main/java/Static3.java b/client/src/main/java/Static3.java index 50b8301..3aa0ebd 100644 --- a/client/src/main/java/Static3.java +++ b/client/src/main/java/Static3.java @@ -10,10 +10,7 @@ public final class Static3 { @OriginalMember(owner = "client!ab", name = "c", descriptor = "[Z") public static final boolean[] aBooleanArray135 = new boolean[200]; - @OriginalMember(owner = "client!ab", name = "j", descriptor = "[Lclient!na;") - public static final JagString[] stringStack = new JagString[1000]; - - @OriginalMember(owner = "client!ab", name = "n", descriptor = "Lclient!ih;") + @OriginalMember(owner = "client!ab", name = "n", descriptor = "Lclient!ih;") public static final LinkedList aClass69_135 = new LinkedList(); @OriginalMember(owner = "client!ab", name = "a", descriptor = "(Lclient!na;I)V") diff --git a/client/src/main/java/Static31.java b/client/src/main/java/Static31.java index 97455cc..105c2e4 100644 --- a/client/src/main/java/Static31.java +++ b/client/src/main/java/Static31.java @@ -21,7 +21,7 @@ public final class Static31 { public static void method846() { if (!SceneGraph.allLevelsAreVisible() && Static41.anInt1316 != Player.level) { Static127.method2463(Player.level, Static52.anInt1695, Static80.centralZoneX, PlayerList.self.movementQueueZ[0], false, PlayerList.self.movementQueueX[0]); - } else if (Player.level != Static107.anInt2875 && Static137.method2665(Player.level)) { + } else if (Player.level != Static107.anInt2875 && MiniMap.renderMap(Player.level)) { Static107.anInt2875 = Player.level; Static269.method2218(); } diff --git a/client/src/main/java/Static32.java b/client/src/main/java/Static32.java deleted file mode 100644 index c8aa2ce..0000000 --- a/client/src/main/java/Static32.java +++ /dev/null @@ -1,3 +0,0 @@ -public final class Static32 { - -} diff --git a/client/src/main/java/Static34.java b/client/src/main/java/Static34.java index 8e8feb2..2e2263a 100644 --- a/client/src/main/java/Static34.java +++ b/client/src/main/java/Static34.java @@ -52,9 +52,6 @@ public final class Static34 { @OriginalMember(owner = "client!ck", name = "f", descriptor = "[Lclient!na;") public static final JagString[] aClass100Array40 = new JagString[] { aClass100_207, aClass100_212, aClass100_211, aClass100_210, aClass100_199, aClass100_204, aClass100_202, aClass100_198, aClass100_208, aClass100_206, aClass100_209, aClass100_205 }; - @OriginalMember(owner = "client!ck", name = "k", descriptor = "I") - public static volatile int anInt1034 = 0; - @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") private static final JagString aClass100_200 = JagString.parse("Loaded world list data"); diff --git a/client/src/main/java/Static35.java b/client/src/main/java/Static35.java index fbba11a..f93c158 100644 --- a/client/src/main/java/Static35.java +++ b/client/src/main/java/Static35.java @@ -18,9 +18,6 @@ public final class Static35 { @OriginalMember(owner = "client!cl", name = "Y", descriptor = "I") public static int anInt1092 = -1; - @OriginalMember(owner = "client!cl", name = "Z", descriptor = "I") - public static int anInt1093 = 0; - @OriginalMember(owner = "client!cl", name = "ab", descriptor = "[I") public static final int[] anIntArray83 = new int[256]; @@ -42,9 +39,9 @@ public final class Static35 { @Pc(81) int local81 = local55; @Pc(95) int local95; @Pc(104) int local104; - if (arg4 >= Static267.anInt5773 && Static106.anInt2869 >= arg4) { - local95 = Static78.method1690(Static224.anInt5063, arg2 + arg3, Static172.anInt4164); - local104 = Static78.method1690(Static224.anInt5063, arg3 - arg2, Static172.anInt4164); + if (arg4 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg4) { + local95 = Static78.method1690(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); + local104 = Static78.method1690(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); Static131.method2576(Static71.anIntArrayArray10[arg4], local104, local95, arg0); } @Pc(118) int local118 = local67 * (arg1 - 1); @@ -71,13 +68,13 @@ public final class Static35 { local75 -= local67; local42 += -local118; local104 = local17 + arg4; - if (Static267.anInt5773 <= local104 && Static106.anInt2869 >= local95) { - @Pc(213) int local213 = Static78.method1690(Static224.anInt5063, local15 + arg3, Static172.anInt4164); - @Pc(222) int local222 = Static78.method1690(Static224.anInt5063, arg3 - local15, Static172.anInt4164); - if (local95 >= Static267.anInt5773) { + if (TextureOp29.anInt5773 <= local104 && TextureOp29.anInt2869 >= local95) { + @Pc(213) int local213 = Static78.method1690(TextureOp29.anInt5063, local15 + arg3, TextureOp29.anInt4164); + @Pc(222) int local222 = Static78.method1690(TextureOp29.anInt5063, arg3 - local15, TextureOp29.anInt4164); + if (local95 >= TextureOp29.anInt5773) { Static131.method2576(Static71.anIntArrayArray10[local95], local222, local213, arg0); } - if (Static106.anInt2869 >= local104) { + if (TextureOp29.anInt2869 >= local104) { Static131.method2576(Static71.anIntArrayArray10[local104], local222, local213, arg0); } } @@ -87,7 +84,7 @@ public final class Static35 { @OriginalMember(owner = "client!cl", name = "a", descriptor = "(III)J") public static long method899(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return 0L; } diff --git a/client/src/main/java/Static36.java b/client/src/main/java/Static36.java index 2ea23b3..dfbacb6 100644 --- a/client/src/main/java/Static36.java +++ b/client/src/main/java/Static36.java @@ -12,7 +12,7 @@ public final class Static36 { @OriginalMember(owner = "client!client", name = "a", descriptor = "(Lclient!be;)Lclient!be;") public static Component method938(@OriginalArg(0) Component arg0) { - @Pc(4) int local4 = method940(arg0).method505(); + @Pc(4) int local4 = InterfaceList.getServerActiveProperties(arg0).method505(); if (local4 == 0) { return null; } @@ -25,17 +25,11 @@ public final class Static36 { return arg0; } - @OriginalMember(owner = "client!client", name = "b", descriptor = "(Lclient!be;)Lclient!bf;") - public static ServerActiveProperties method940(@OriginalArg(0) Component arg0) { - @Pc(13) ServerActiveProperties local13 = (ServerActiveProperties) Static210.aClass133_21.get(((long) arg0.id << 32) + (long) arg0.createdComponentId); - return local13 == null ? arg0.aClass3_Sub4_1 : local13; - } - @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.aBoolean32 || component.type == 0 || component.aBoolean25 || method940(component).anInt546 != 0 || component == Static4.aClass13_1 || component.anInt453 == 1338) && (!component.aBoolean32 || !method947(component))) { + if (component != null && component.layer == arg1 && (!component.aBoolean32 || component.type == 0 || component.aBoolean25 || InterfaceList.getServerActiveProperties(component).anInt546 != 0 || component == Static4.aClass13_1 || component.anInt453 == 1338) && (!component.aBoolean32 || !method947(component))) { @Pc(50) int local50 = component.x + arg6; @Pc(55) int local55 = component.y + arg7; @Pc(61) int local61; @@ -91,11 +85,11 @@ public final class Static36 { local207 = false; } @Pc(212) boolean local212 = false; - if (Static22.anInt723 == 1 && local207) { + if (Mouse.pressedButton == 1 && local207) { local212 = true; } @Pc(221) boolean local221 = false; - if (Static150.clickButton == 1 && Mouse.clickX >= local61 && Mouse.clickY >= local63 && Mouse.clickX < local65 && Mouse.clickY < local67) { + if (Mouse.clickButton == 1 && Mouse.clickX >= local61 && Mouse.clickY >= local63 && Mouse.clickX < local65 && Mouse.clickY < local67) { local221 = true; } @Pc(243) int i; @@ -126,7 +120,7 @@ public final class Static36 { if (local221) { Static40.method1015(Mouse.clickY - local55, Mouse.clickX - local50, component); } - if (Static105.aClass13_14 != null && Static105.aClass13_14 != component && local207 && method940(component).method509()) { + if (Static105.aClass13_14 != null && Static105.aClass13_14 != component && local207 && InterfaceList.getServerActiveProperties(component).method509()) { Static56.aClass13_12 = component; } if (component == Static4.aClass13_1) { @@ -486,7 +480,7 @@ public final class Static36 { @OriginalMember(owner = "client!client", name = "c", descriptor = "(Lclient!be;)Z") public static boolean method947(@OriginalArg(0) Component arg0) { if (Static121.aBoolean154) { - if (method940(arg0).anInt546 != 0) { + if (InterfaceList.getServerActiveProperties(arg0).anInt546 != 0) { return false; } if (arg0.type == 0) { diff --git a/client/src/main/java/Static37.java b/client/src/main/java/Static37.java index c2d5e94..222bd44 100644 --- a/client/src/main/java/Static37.java +++ b/client/src/main/java/Static37.java @@ -19,7 +19,7 @@ public final class Static37 { @Pc(43) int local43; @Pc(36) int local36; if (arg0.faceEntity != -1 && arg0.faceEntity < 32768) { - @Pc(26) Npc local26 = Static175.npcs[arg0.faceEntity]; + @Pc(26) Npc local26 = NpcList.npcs[arg0.faceEntity]; if (local26 != null) { local36 = arg0.zFine - local26.zFine; local43 = arg0.xFine - local26.xFine; diff --git a/client/src/main/java/Static39.java b/client/src/main/java/Static39.java index fa2c0a0..9d65ae6 100644 --- a/client/src/main/java/Static39.java +++ b/client/src/main/java/Static39.java @@ -1,4 +1,3 @@ -import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -11,9 +10,6 @@ public final class Static39 { @OriginalMember(owner = "client!d", name = "R", descriptor = "Lclient!be;") public static Component aClass13_10 = null; - @OriginalMember(owner = "client!d", name = "S", descriptor = "Ljava/util/Random;") - public static final Random aRandom1 = new Random(); - @OriginalMember(owner = "client!d", name = "db", descriptor = "Z") public static boolean aBoolean77 = false; diff --git a/client/src/main/java/Static4.java b/client/src/main/java/Static4.java index 7b60c79..3bee099 100644 --- a/client/src/main/java/Static4.java +++ b/client/src/main/java/Static4.java @@ -47,8 +47,8 @@ public final class Static4 { if (arg0 == null) { return -1; } - for (@Pc(20) int local20 = 0; local20 < Static9.anInt178; local20++) { - if (arg0.equalsIgnoreCase(Static122.aClass100Array92[local20])) { + for (@Pc(20) int local20 = 0; local20 < FriendsList.size; local20++) { + if (arg0.equalsIgnoreCase(FriendsList.usernames[local20])) { return local20; } } @@ -93,7 +93,7 @@ public final class Static4 { local176.mouseY = local130; Static82.method1767(local176); } - if (Static22.anInt723 == 0) { + if (Mouse.pressedButton == 0) { if (Static138.aBoolean172) { if (Static105.aClass13_14.anObjectArray16 != null) { local176 = new HookRequest(); diff --git a/client/src/main/java/Static40.java b/client/src/main/java/Static40.java index 7c41313..48c044b 100644 --- a/client/src/main/java/Static40.java +++ b/client/src/main/java/Static40.java @@ -107,7 +107,7 @@ public final class Static40 { local8.p2((int) (Math.random() * 99999.0D)); local8.p2(530); if (GlobalConfig.LOGIN_USE_STRINGS) { - local8.pjstr(Base37.decodeLowerCase(name)); + local8.pjstr(Base37.decode37(name)); } else { local8.p8(name); } diff --git a/client/src/main/java/Static41.java b/client/src/main/java/Static41.java index b470215..5414759 100644 --- a/client/src/main/java/Static41.java +++ b/client/src/main/java/Static41.java @@ -14,10 +14,7 @@ public final class Static41 { @OriginalMember(owner = "client!dc", name = "R", descriptor = "Lclient!na;") private static final JagString aClass100_269 = JagString.parse("Drop"); - @OriginalMember(owner = "client!dc", name = "W", descriptor = "I") - public static volatile int anInt1313 = 0; - - @OriginalMember(owner = "client!dc", name = "ab", descriptor = "I") + @OriginalMember(owner = "client!dc", name = "ab", descriptor = "I") public static int anInt1316 = 0; @OriginalMember(owner = "client!dc", name = "db", descriptor = "[[B") diff --git a/client/src/main/java/Static43.java b/client/src/main/java/Static43.java index 701e120..fe0d3c1 100644 --- a/client/src/main/java/Static43.java +++ b/client/src/main/java/Static43.java @@ -69,7 +69,7 @@ public final class Static43 { @Pc(100) Entity local100 = null; @Pc(102) Entity local102 = null; if (arg3 == 0) { - @Pc(110) Wall local110 = Static110.method2276(arg2, arg1, arg0); + @Pc(110) Wall local110 = SceneGraph.removeWall(arg2, arg1, arg0); if (local110 != null) { local100 = local110.aClass8_5; local102 = local110.aClass8_6; diff --git a/client/src/main/java/Static44.java b/client/src/main/java/Static44.java index 956e53e..938852e 100644 --- a/client/src/main/java/Static44.java +++ b/client/src/main/java/Static44.java @@ -26,7 +26,7 @@ public final class Static44 { Static231.anInt5204 = 0; Static230.opcode2 = -1; Static270.anInt5795 = 0; - Static60.rebootTimer = 0; + Player.rebootTimer = 0; Static49.opcode4 = -1; Protocol.inboundBuffer.offset = 0; Static201.anInt1862 = 0; @@ -37,9 +37,9 @@ public final class Static44 { PlayerList.players[local35].faceEntity = -1; } } - for (local35 = 0; local35 < Static175.npcs.length; local35++) { - if (Static175.npcs[local35] != null) { - Static175.npcs[local35].faceEntity = -1; + for (local35 = 0; local35 < NpcList.npcs.length; local35++) { + if (NpcList.npcs[local35] != null) { + NpcList.npcs[local35].faceEntity = -1; } } Static102.method2073(); diff --git a/client/src/main/java/Static45.java b/client/src/main/java/Static45.java index eea9d1d..6675dde 100644 --- a/client/src/main/java/Static45.java +++ b/client/src/main/java/Static45.java @@ -341,7 +341,7 @@ public final class Static45 { local2057[local2025.length + local349] = local2049[local349]; } Static110.method2280(local152, local2057); - Static221.method3393(local1900, Static253.aByteArrayArrayArray16[local152], Static4.aByteArrayArrayArray1[local152], Static120.lights, local152, Static120.lightCount, local1896, Static163.aByteArrayArrayArray11[local152], Static240.aByteArrayArrayArray14[local152], Static83.activeTileHeightMap[local152], local1888); + Static221.method3393(local1900, Static253.aByteArrayArrayArray16[local152], Static4.aByteArrayArrayArray1[local152], LightingManager.lights, local152, LightingManager.lightCount, local1896, Static163.aByteArrayArrayArray11[local152], Static240.aByteArrayArrayArray14[local152], Static83.activeTileHeightMap[local152], local1888); break; } for (local202 = 1; local202 <= 103; local202++) { diff --git a/client/src/main/java/Static46.java b/client/src/main/java/Static46.java index b2637d4..6679b8a 100644 --- a/client/src/main/java/Static46.java +++ b/client/src/main/java/Static46.java @@ -6,9 +6,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static46 { - @OriginalMember(owner = "client!dj", name = "a", descriptor = "Lclient!cf;") - public static GlSprite mask = null; - @OriginalMember(owner = "client!dj", name = "b", descriptor = "I") public static int clipY = 0; @@ -21,11 +18,6 @@ public final class Static46 { @OriginalMember(owner = "client!dj", name = "e", descriptor = "I") public static int anInt1441 = 0; - @OriginalMember(owner = "client!dj", name = "a", descriptor = "()V") - public static void method1173() { - mask = null; - } - @OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIII)V") public static void method1174(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { GlRenderer.method4162(); @@ -62,7 +54,7 @@ public final class Static46 { anInt1441 = GlRenderer.canvasHeight; @Pc(9) GL2 local9 = GlRenderer.gl; local9.glDisable(GL2.GL_SCISSOR_TEST); - method1173(); + GlFont.method1173(); } @OriginalMember(owner = "client!dj", name = "a", descriptor = "([IIIII)V") @@ -201,7 +193,7 @@ public final class Static46 { } else { gl.glScissor(0, 0, 0, 0); } - method1173(); + GlFont.method1173(); } @OriginalMember(owner = "client!dj", name = "d", descriptor = "()V") @@ -266,14 +258,7 @@ public final class Static46 { } else { local27.glScissor(0, 0, 0, 0); } - method1173(); + GlFont.method1173(); } - @OriginalMember(owner = "client!dj", name = "a", descriptor = "(Lclient!cf;)V") - public static void method1188(@OriginalArg(0) GlSprite arg0) { - if (arg0.anInt1859 != anInt1441 - clipY) { - throw new IllegalArgumentException(); - } - mask = arg0; - } } diff --git a/client/src/main/java/Static47.java b/client/src/main/java/Static47.java index 4713728..368adc4 100644 --- a/client/src/main/java/Static47.java +++ b/client/src/main/java/Static47.java @@ -6,7 +6,7 @@ public final class Static47 { @OriginalMember(owner = "client!dk", name = "a", descriptor = "(III)Lclient!ec;") public static Scenery method3996(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return null; } diff --git a/client/src/main/java/Static48.java b/client/src/main/java/Static48.java index d920bce..5601e44 100644 --- a/client/src/main/java/Static48.java +++ b/client/src/main/java/Static48.java @@ -18,9 +18,9 @@ public final class Static48 { @OriginalMember(owner = "client!dl", name = "a", descriptor = "(II)V") public static void setIdleLoops(@OriginalArg(1) int arg0) { - @Pc(10) Mouse local10 = Static93.instance; - synchronized (Static93.instance) { - Static93.anInt2467 = arg0; + @Pc(10) Mouse local10 = Mouse.instance; + synchronized (Mouse.instance) { + Mouse.anInt2467 = arg0; } } } diff --git a/client/src/main/java/Static49.java b/client/src/main/java/Static49.java index ee3abce..3549a85 100644 --- a/client/src/main/java/Static49.java +++ b/client/src/main/java/Static49.java @@ -7,9 +7,6 @@ public final class Static49 { @OriginalMember(owner = "client!dm", name = "j", descriptor = "Lclient!na;") public static final JagString aClass100_351 = JagString.parse(" "); - @OriginalMember(owner = "client!dm", name = "m", descriptor = "I") - public static int anInt1459 = 0; - @OriginalMember(owner = "client!dm", name = "n", descriptor = "Lclient!na;") public static final JagString PERCENT_SIGN = JagString.parse("(U"); @@ -72,69 +69,6 @@ public final class Static49 { } } - @OriginalMember(owner = "client!dm", name = "a", descriptor = "(B)V") - public static void method1202() { - Protocol.inboundBuffer.accessBits(); - @Pc(13) int local13 = Protocol.inboundBuffer.gBits(8); - @Pc(22) int local22; - if (Static272.anInt5214 > local13) { - for (local22 = local13; local22 < Static272.anInt5214; local22++) { - Protocol.removedIds[Protocol.removedCount++] = Static33.anIntArray79[local22]; - } - } - if (Static272.anInt5214 < local13) { - throw new RuntimeException("gnpov1"); - } - Static272.anInt5214 = 0; - for (local22 = 0; local22 < local13; local22++) { - @Pc(61) int local61 = Static33.anIntArray79[local22]; - @Pc(65) Npc local65 = Static175.npcs[local61]; - @Pc(70) int local70 = Protocol.inboundBuffer.gBits(1); - if (local70 == 0) { - Static33.anIntArray79[Static272.anInt5214++] = local61; - local65.lastSeenLoop = client.loop; - } else { - @Pc(92) int local92 = Protocol.inboundBuffer.gBits(2); - if (local92 == 0) { - Static33.anIntArray79[Static272.anInt5214++] = local61; - local65.lastSeenLoop = client.loop; - Protocol.extendedIds[Protocol.extendedCount++] = local61; - } else { - @Pc(139) int local139; - @Pc(149) int local149; - if (local92 == 1) { - Static33.anIntArray79[Static272.anInt5214++] = local61; - local65.lastSeenLoop = client.loop; - local139 = Protocol.inboundBuffer.gBits(3); - local65.move(1, local139); - local149 = Protocol.inboundBuffer.gBits(1); - if (local149 == 1) { - Protocol.extendedIds[Protocol.extendedCount++] = local61; - } - } else if (local92 == 2) { - Static33.anIntArray79[Static272.anInt5214++] = local61; - local65.lastSeenLoop = client.loop; - if (Protocol.inboundBuffer.gBits(1) == 1) { - local139 = Protocol.inboundBuffer.gBits(3); - local65.move(2, local139); - local149 = Protocol.inboundBuffer.gBits(3); - local65.move(2, local149); - } else { - local139 = Protocol.inboundBuffer.gBits(3); - local65.move(0, local139); - } - local139 = Protocol.inboundBuffer.gBits(1); - if (local139 == 1) { - Protocol.extendedIds[Protocol.extendedCount++] = local61; - } - } else if (local92 == 3) { - Protocol.removedIds[Protocol.removedCount++] = local61; - } - } - } - } - } - @OriginalMember(owner = "client!dm", name = "a", descriptor = "(IBIII)V") public static void method1206(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) { @Pc(15) int local15 = 0; @@ -172,7 +106,7 @@ public final class Static49 { } @Pc(24) JagString local24 = Static13.method471(); if (arg0 == null) { - @Pc(40) int local40 = Fonts.b12Full.method2859(local24, arg2 + 4, arg1 - -15, Static39.aRandom1, Static60.gregorianDateSeed); + @Pc(40) int local40 = Fonts.b12Full.method2859(local24, arg2 + 4, arg1 - -15, client.aRandom1, Static60.gregorianDateSeed); Static133.method4012(arg2 + 4, Fonts.b12Full.getStringWidth(local24) + local40, arg1, 15); return; } @@ -180,7 +114,7 @@ public final class Static49 { if (local59 == null) { local59 = Fonts.b12Full; } - local59.method2878(local24, arg2, arg1, arg0.anInt445, arg0.anInt459, arg0.anInt474, arg0.anInt513, arg0.anInt460, arg0.anInt478, Static39.aRandom1, Static60.gregorianDateSeed, Static50.anIntArray132); + local59.method2878(local24, arg2, arg1, arg0.anInt445, arg0.anInt459, arg0.color, arg0.anInt513, arg0.anInt460, arg0.anInt478, client.aRandom1, Static60.gregorianDateSeed, Static50.anIntArray132); Static133.method4012(Static50.anIntArray132[0], Static50.anIntArray132[2], Static50.anIntArray132[1], Static50.anIntArray132[3]); } diff --git a/client/src/main/java/Static50.java b/client/src/main/java/Static50.java index 166911e..eb13da9 100644 --- a/client/src/main/java/Static50.java +++ b/client/src/main/java/Static50.java @@ -2,9 +2,6 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static50 { - @OriginalMember(owner = "client!e", name = "rc", descriptor = "B") - public static byte aByte6; - @OriginalMember(owner = "client!e", name = "pc", descriptor = "[I") public static final int[] anIntArray132 = new int[4]; diff --git a/client/src/main/java/Static54.java b/client/src/main/java/Static54.java index 837f460..e1d6bec 100644 --- a/client/src/main/java/Static54.java +++ b/client/src/main/java/Static54.java @@ -25,14 +25,14 @@ public final class Static54 { } else { SoftwareRaster.method2496(arg2, arg1, arg2 + arg3.anInt445, arg1 + arg3.anInt459); } - if (Static270.anInt5795 != 2 && Static270.anInt5795 != 5 && Static89.aClass3_Sub2_Sub1_5 != null) { + if (Static270.anInt5795 != 2 && Static270.anInt5795 != 5 && MiniMap.sprite != null) { @Pc(48) int local48 = Static59.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) Static89.aClass3_Sub2_Sub1_5).method1427(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, Static273.anInt4130 + 256, (GlSprite) arg3.method489(false)); + ((GlSprite) MiniMap.sprite).method1427(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, Static273.anInt4130 + 256, (GlSprite) arg3.method489(false)); } else { - ((SoftwareSprite) Static89.aClass3_Sub2_Sub1_5).method310(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, Static273.anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45); + ((SoftwareSprite) MiniMap.sprite).method310(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, Static273.anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45); } @Pc(146) int local146; @Pc(181) int local181; @@ -68,13 +68,13 @@ public final class Static54 { local271 = Static235.mapElementList.anIntArray444[local117]; } if (GlRenderer.enabled) { - Static46.method1188((GlSprite) arg3.method489(false)); + GlFont.method1188((GlSprite) arg3.method489(false)); } else { SoftwareRaster.method2486(arg3.anIntArray37, arg3.anIntArray45); } local156.renderParagraphAlpha(Static235.mapElementList.aClass100Array153[local117], arg2 + local245 + arg3.anInt445 / 2, arg1 + arg3.anInt459 / 2 + -local200, local239, 50, local271, 0, 1, 0, 0); if (GlRenderer.enabled) { - Static46.method1173(); + GlFont.method1173(); } else { SoftwareRaster.method2482(); } @@ -82,10 +82,10 @@ public final class Static54 { } } } - for (local146 = 0; local146 < Static251.anInt5454; local146++) { - local181 = Static145.anIntArray331[local146] * 4 + 2 - PlayerList.self.xFine / 32; - local150 = Static93.anIntArray219[local146] * 4 + 2 - PlayerList.self.zFine / 32; - @Pc(382) LocType local382 = LocTypeList.get(Static199.anIntArray417[local146]); + for (local146 = 0; local146 < MiniMap.locs; local146++) { + local181 = MiniMap.locX[local146] * 4 + 2 - PlayerList.self.xFine / 32; + local150 = MiniMap.locZ[local146] * 4 + 2 - PlayerList.self.zFine / 32; + @Pc(382) LocType local382 = LocTypeList.get(MiniMap.locId[local146]); if (local382.multiLocs != null) { local382 = local382.getMultiLoc(); if (local382 == null || local382.mapElement == -1) { @@ -105,7 +105,7 @@ public final class Static54 { } } for (local146 = 0; local146 < Static272.anInt5214; local146++) { - @Pc(498) Npc local498 = Static175.npcs[Static33.anIntArray79[local146]]; + @Pc(498) Npc local498 = NpcList.npcs[Static33.anIntArray79[local146]]; if (local498 != null && local498.method2682()) { @Pc(507) NpcType local507 = local498.type; if (local507 != null && local507.multiNpcs != null) { @@ -129,15 +129,15 @@ public final class Static54 { local150 = local591.xFine / 32 - PlayerList.self.xFine / 32; @Pc(624) long local624 = local591.username.encode37(); @Pc(626) boolean local626 = false; - for (local239 = 0; local239 < Static9.anInt178; local239++) { - if (local624 == Static92.aLongArray3[local239] && Static104.anIntArray255[local239] != 0) { + 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 < Static214.anInt5577; local271++) { - if (local624 == Static199.aClass3_Sub22Array1[local271].key) { + for (local271 = 0; local271 < ClanChat.size; local271++) { + if (local624 == ClanChat.members[local271].key) { local660 = true; break; } @@ -161,8 +161,8 @@ public final class Static54 { for (local181 = 0; local181 < local756.length; local181++) { @Pc(770) Class102 local770 = local756[local181]; if (local770 != null && local770.anInt4058 != 0 && client.loop % 20 < 10) { - if (local770.anInt4058 == 1 && local770.anInt4057 >= 0 && local770.anInt4057 < Static175.npcs.length) { - @Pc(804) Npc local804 = Static175.npcs[local770.anInt4057]; + if (local770.anInt4058 == 1 && local770.anInt4057 >= 0 && local770.anInt4057 < NpcList.npcs.length) { + @Pc(804) Npc local804 = NpcList.npcs[local770.anInt4057]; if (local804 != null) { local231 = local804.xFine / 32 - PlayerList.self.xFine / 32; local200 = local804.zFine / 32 - PlayerList.self.zFine / 32; @@ -207,9 +207,9 @@ public final class Static54 { @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 >= Static172.anInt4164 && arg3 <= Static224.anInt5063) { - @Pc(22) int local22 = Static78.method1690(Static106.anInt2869, arg1, Static267.anInt5773); - @Pc(28) int local28 = Static78.method1690(Static106.anInt2869, arg0, Static267.anInt5773); + if (arg3 >= TextureOp29.anInt4164 && arg3 <= TextureOp29.anInt5063) { + @Pc(22) int local22 = Static78.method1690(TextureOp29.anInt2869, arg1, TextureOp29.anInt5773); + @Pc(28) int local28 = Static78.method1690(TextureOp29.anInt2869, arg0, TextureOp29.anInt5773); Static101.method2054(local22, arg3, local28, arg2); } } @@ -264,75 +264,4 @@ public final class Static54 { return WorldList.loaded && arg0 >= WorldList.minId && arg0 <= WorldList.maxId ? WorldList.worlds[arg0 - WorldList.minId] : null; } - @OriginalMember(owner = "client!ed", name = "d", descriptor = "(B)V") - public static void loop() { - for (@Pc(5) int local5 = 0; local5 < SoundPlayer.anInt4451; local5++) { - @Pc(12) int local12 = SoundPlayer.anIntArray362[local5]--; - if (SoundPlayer.anIntArray362[local5] >= -10) { - @Pc(79) SynthSound local79 = SoundPlayer.aClass138Array1[local5]; - if (local79 == null) { - local79 = SynthSound.create(client.js5Archive4, SoundPlayer.anIntArray421[local5], 0); - if (local79 == null) { - continue; - } - SoundPlayer.anIntArray362[local5] += local79.method3990(); - SoundPlayer.aClass138Array1[local5] = local79; - } - if (SoundPlayer.anIntArray362[local5] < 0) { - @Pc(209) int local209; - if (SoundPlayer.anIntArray68[local5] == 0) { - local209 = Preferences.soundEffectVolume; - } else { - @Pc(125) int local125 = (SoundPlayer.anIntArray68[local5] & 0xFF) * 128; - @Pc(133) int local133 = SoundPlayer.anIntArray68[local5] >> 8 & 0xFF; - @Pc(141) int local141 = SoundPlayer.anIntArray68[local5] >> 16 & 0xFF; - @Pc(151) int local151 = local133 * 128 + 64 - PlayerList.self.zFine; - if (local151 < 0) { - local151 = -local151; - } - @Pc(167) int local167 = local141 * 128 + 64 - PlayerList.self.xFine; - if (local167 < 0) { - local167 = -local167; - } - @Pc(180) int local180 = local167 + local151 - 128; - if (local125 < local180) { - SoundPlayer.anIntArray362[local5] = -100; - continue; - } - if (local180 < 0) { - local180 = 0; - } - local209 = Preferences.ambientSoundsVolume * (local125 - local180) / local125; - } - if (local209 > 0) { - @Pc(223) PcmSound local223 = local79.method3989().method2648(client.resampler); - @Pc(228) SoundPcmStream local228 = Static284.method404(local223, local209); - local228.method396(SoundPlayer.anIntArray563[local5] - 1); - client.soundStream.method1343(local228); - } - SoundPlayer.anIntArray362[local5] = -100; - } - } else { - SoundPlayer.anInt4451--; - for (@Pc(28) int local28 = local5; local28 < SoundPlayer.anInt4451; local28++) { - SoundPlayer.anIntArray421[local28] = SoundPlayer.anIntArray421[local28 + 1]; - SoundPlayer.aClass138Array1[local28] = SoundPlayer.aClass138Array1[local28 + 1]; - SoundPlayer.anIntArray563[local28] = SoundPlayer.anIntArray563[local28 + 1]; - SoundPlayer.anIntArray362[local28] = SoundPlayer.anIntArray362[local28 + 1]; - SoundPlayer.anIntArray68[local28] = SoundPlayer.anIntArray68[local28 + 1]; - } - local5--; - } - } - if (MidiPlayer.jingle && !Static136.method2655()) { - if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1) { - Static122.method2410(client.js5Archive6, MusicPlayer.groupId, Preferences.musicVolume); - } - MidiPlayer.jingle = false; - } else if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1 && !Static136.method2655()) { - Protocol.outboundBuffer.p1isaac(137); - Protocol.outboundBuffer.p4(MusicPlayer.groupId); - MusicPlayer.groupId = -1; - } - } } diff --git a/client/src/main/java/Static56.java b/client/src/main/java/Static56.java index 3658fe3..f079002 100644 --- a/client/src/main/java/Static56.java +++ b/client/src/main/java/Static56.java @@ -2,13 +2,7 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static56 { - @OriginalMember(owner = "client!ef", name = "j", descriptor = "Lclient!mm;") - public static SoftwareSprite aClass3_Sub2_Sub1_Sub1_1; - - @OriginalMember(owner = "client!ef", name = "a", descriptor = "[I") - public static final int[] anIntArray141 = new int[] { 768, 1024, 1280, 512, 1536, 256, 0, 1792 }; - - @OriginalMember(owner = "client!ef", name = "c", descriptor = "[I") + @OriginalMember(owner = "client!ef", name = "c", descriptor = "[I") public static final int[] anIntArray142 = new int[500]; @OriginalMember(owner = "client!ef", name = "f", descriptor = "Lclient!na;") @@ -17,9 +11,6 @@ public final class Static56 { @OriginalMember(owner = "client!ef", name = "g", descriptor = "I") public static int anInt1742 = -1; - @OriginalMember(owner = "client!ef", name = "i", descriptor = "I") - public static double pitchAccel = 0; - @OriginalMember(owner = "client!ef", name = "r", descriptor = "Lclient!be;") public static Component aClass13_12 = null; diff --git a/client/src/main/java/Static57.java b/client/src/main/java/Static57.java index badd284..2d27977 100644 --- a/client/src/main/java/Static57.java +++ b/client/src/main/java/Static57.java @@ -9,10 +9,7 @@ public final class Static57 { @OriginalMember(owner = "client!eg", name = "t", descriptor = "I") public static int anInt1757; - @OriginalMember(owner = "client!eg", name = "w", descriptor = "I") - public static volatile int anInt1759 = 0; - - @OriginalMember(owner = "client!eg", name = "a", descriptor = "(IIIIIIII)V") + @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 (InterfaceList.load(arg4)) { Static36.method946(InterfaceList.components[arg4], -1, arg5, arg1, arg3, arg6, arg0, arg2); diff --git a/client/src/main/java/Static59.java b/client/src/main/java/Static59.java index e43d270..83b1e1f 100644 --- a/client/src/main/java/Static59.java +++ b/client/src/main/java/Static59.java @@ -10,9 +10,6 @@ public final class Static59 { @OriginalMember(owner = "client!ej", name = "bb", descriptor = "F") public static float aFloat6; - @OriginalMember(owner = "client!ej", name = "U", descriptor = "I") - public static int anInt1812 = 0; - @OriginalMember(owner = "client!ej", name = "W", descriptor = "I") public static int anInt1814 = 0; @@ -21,7 +18,7 @@ public final class Static59 { if (Static226.anInt3953 == 2) { if (Static155.anInt3751 == Static277.anInt5850 && Static60.anInt1892 == Static280.anInt5895) { Static226.anInt3953 = 0; - if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { + if (Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { Static103.method2232(Static231.anInt5204 - 2); } else { Static103.method2232(Static231.anInt5204 - 1); @@ -29,7 +26,7 @@ public final class Static59 { } } else if (Static155.anInt3751 == Mouse.clickX && Static60.anInt1892 == Mouse.clickY) { Static226.anInt3953 = 0; - if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { + if (Cheat.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) { Static103.method2232(Static231.anInt5204 - 2); } else { Static103.method2232(Static231.anInt5204 - 1); diff --git a/client/src/main/java/Static6.java b/client/src/main/java/Static6.java index cf2e82b..b97e699 100644 --- a/client/src/main/java/Static6.java +++ b/client/src/main/java/Static6.java @@ -15,7 +15,7 @@ public final class Static6 { @OriginalMember(owner = "client!ag", name = "j", descriptor = "(I)V") public static void method84() { - Static65.method1500(); + SceneGraph.clear(); for (@Pc(9) int local9 = 0; local9 < 4; local9++) { PathFinder.collisionMaps[local9].resetFlags(); } diff --git a/client/src/main/java/Static60.java b/client/src/main/java/Static60.java index 127cf1a..cfc9099 100644 --- a/client/src/main/java/Static60.java +++ b/client/src/main/java/Static60.java @@ -10,9 +10,6 @@ public final class Static60 { @OriginalMember(owner = "client!em", name = "w", descriptor = "I") public static int anInt1892; - @OriginalMember(owner = "client!em", name = "x", descriptor = "Lclient!cj;") - public static AudioThread thread; - @OriginalMember(owner = "client!em", name = "D", descriptor = "I") public static int gregorianDateSeed; @@ -22,10 +19,7 @@ public final class Static60 { @OriginalMember(owner = "client!em", name = "z", descriptor = "Z") public static boolean aBoolean108 = false; - @OriginalMember(owner = "client!em", name = "B", descriptor = "I") - public static int rebootTimer = 0; - - @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; diff --git a/client/src/main/java/Static61.java b/client/src/main/java/Static61.java index 26adf4e..a733a18 100644 --- a/client/src/main/java/Static61.java +++ b/client/src/main/java/Static61.java @@ -5,9 +5,6 @@ public final class Static61 { @OriginalMember(owner = "client!en", name = "z", descriptor = "F") public static float aFloat7; - @OriginalMember(owner = "client!en", name = "e", descriptor = "Lclient!na;") - public static final JagString aClass100_422 = JagString.parse("::fpsoff"); - @OriginalMember(owner = "client!en", name = "h", descriptor = "Lclient!na;") public static final JagString aClass100_423 = JagString.parse(":chalreq:"); diff --git a/client/src/main/java/Static64.java b/client/src/main/java/Static64.java index acc8084..f3244bd 100644 --- a/client/src/main/java/Static64.java +++ b/client/src/main/java/Static64.java @@ -1,6 +1,4 @@ -import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static64 { @@ -16,42 +14,4 @@ public final class Static64 { @OriginalMember(owner = "client!fb", name = "q", descriptor = "[I") public static final int[] anIntArray154 = new int[] { -1, -1, 1, 1 }; - @OriginalMember(owner = "client!fb", name = "a", descriptor = "(JB)V") - public static void method1496(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - if (Static9.anInt178 >= 100 && !LoginManager.playerMember || Static9.anInt178 >= 200) { - Chat.add(JagString.EMPTY, 0, LocalizedText.FRIENDLISTFULL); - return; - } - @Pc(35) JagString local35 = Base37.decodeLowerCase(arg0).method3125(); - @Pc(42) int local42; - for (local42 = 0; local42 < Static9.anInt178; local42++) { - if (Static92.aLongArray3[local42] == arg0) { - Chat.add(JagString.EMPTY, 0, JagString.concatenate(new JagString[] { local35, LocalizedText.FRIENDLISTDUPE})); - return; - } - } - for (local42 = 0; local42 < Static35.anInt1093; 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; - } - Static122.aClass100Array92[Static9.anInt178] = local35; - Static92.aLongArray3[Static9.anInt178] = arg0; - Static104.anIntArray255[Static9.anInt178] = 0; - Static214.aClass100Array170[Static9.anInt178] = JagString.EMPTY; - Static106.anIntArray258[Static9.anInt178] = 0; - Static3.aBooleanArray135[Static9.anInt178] = false; - Static9.anInt178++; - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(120); - Protocol.outboundBuffer.p8(arg0); - } } diff --git a/client/src/main/java/Static65.java b/client/src/main/java/Static65.java index b2d5d96..124be5d 100644 --- a/client/src/main/java/Static65.java +++ b/client/src/main/java/Static65.java @@ -27,48 +27,4 @@ public final class Static65 { return local36; } - @OriginalMember(owner = "client!fc", name = "a", descriptor = "()V") - public static void method1500() { - @Pc(3) int local3; - @Pc(9) int local9; - @Pc(14) int local14; - if (Static197.surfaceGroundTiles != null) { - for (local3 = 0; local3 < Static197.surfaceGroundTiles.length; local3++) { - for (local9 = 0; local9 < Static152.mapSizeX; local9++) { - for (local14 = 0; local14 < Static99.mapSizeZ; local14++) { - Static197.surfaceGroundTiles[local3][local9][local14] = null; - } - } - } - } - Static36.surfaceHdTiles = null; - if (Static276.underWaterGroundTiles != null) { - for (local3 = 0; local3 < Static276.underWaterGroundTiles.length; local3++) { - for (local9 = 0; local9 < Static152.mapSizeX; local9++) { - for (local14 = 0; local14 < Static99.mapSizeZ; local14++) { - Static276.underWaterGroundTiles[local3][local9][local14] = null; - } - } - } - } - Static195.underWaterHdTiles = null; - Static28.anInt917 = 0; - if (Static91.aClass120Array1 != null) { - for (local3 = 0; local3 < Static28.anInt917; local3++) { - Static91.aClass120Array1[local3] = null; - } - } - if (Static243.aClass31Array3 != null) { - for (local3 = 0; local3 < Static22.anInt726; local3++) { - Static243.aClass31Array3[local3] = null; - } - Static22.anInt726 = 0; - } - if (Static25.aClass31Array2 != null) { - for (local3 = 0; local3 < Static25.aClass31Array2.length; local3++) { - Static25.aClass31Array2[local3] = null; - } - } - } - } diff --git a/client/src/main/java/Static66.java b/client/src/main/java/Static66.java deleted file mode 100644 index 96a4da6..0000000 --- a/client/src/main/java/Static66.java +++ /dev/null @@ -1,7 +0,0 @@ -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static66 { - - @OriginalMember(owner = "client!fd", name = "e", descriptor = "I") - public static final int ALPHABET_SIZE = WorldMapFont.ALPHABET.length(); -} diff --git a/client/src/main/java/Static67.java b/client/src/main/java/Static67.java index 5f9f13e..f494845 100644 --- a/client/src/main/java/Static67.java +++ b/client/src/main/java/Static67.java @@ -2,9 +2,6 @@ import org.openrs2.deob.annotation.OriginalMember; public final class Static67 { - @OriginalMember(owner = "client!fe", name = "x", descriptor = "I") - public static int anInt3356; - @OriginalMember(owner = "client!fe", name = "lc", descriptor = "[Lclient!qf;") public static Sprite[] mapfuncs; diff --git a/client/src/main/java/Static69.java b/client/src/main/java/Static69.java index 460ccc9..9281fea 100644 --- a/client/src/main/java/Static69.java +++ b/client/src/main/java/Static69.java @@ -10,9 +10,6 @@ public final class Static69 { @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 = "ab", descriptor = "Lclient!na;") - public static final JagString aClass100_443 = JagString.parse("::noclip"); - @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) { if (arg1 == arg2) { @@ -25,26 +22,6 @@ public final class Static69 { } } - @OriginalMember(owner = "client!fh", name = "a", descriptor = "(JI)V") - public static void method1542(@OriginalArg(0) long arg0) { - if (arg0 == 0L) { - return; - } - for (@Pc(12) int local12 = 0; local12 < Static35.anInt1093; local12++) { - if (IgnoreList.encodedUsernames[local12] == arg0) { - Static35.anInt1093--; - for (@Pc(36) int local36 = local12; local36 < Static35.anInt1093; local36++) { - IgnoreList.encodedUsernames[local36] = IgnoreList.encodedUsernames[local36 + 1]; - Static193.aClass100Array134[local36] = Static193.aClass100Array134[local36 + 1]; - } - FriendsList.transmitAt = InterfaceList.transmitTimer; - Protocol.outboundBuffer.p1isaac(213); - Protocol.outboundBuffer.p8(arg0); - break; - } - } - } - @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(); @@ -56,7 +33,7 @@ public final class Static69 { local3.aClass8_7 = arg6; local3.aClass8_8 = arg7; @Pc(34) int local34 = 0; - @Pc(42) Tile local42 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(42) Tile local42 = SceneGraph.tiles[arg0][arg1][arg2]; if (local42 != null) { for (@Pc(46) int local46 = 0; local46 < local42.anInt662; local46++) { @Pc(55) Scenery local55 = local42.aClass31Array1[local46]; @@ -69,10 +46,10 @@ public final class Static69 { } } local3.anInt3063 = -local34; - if (Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); + if (SceneGraph.tiles[arg0][arg1][arg2] == null) { + SceneGraph.tiles[arg0][arg1][arg2] = new Tile(arg0, arg1, arg2); } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass79_1 = local3; + SceneGraph.tiles[arg0][arg1][arg2].aClass79_1 = local3; } @OriginalMember(owner = "client!fh", name = "a", descriptor = "(Lclient!th;IIIII)V") @@ -88,7 +65,7 @@ public final class Static69 { if (local28 >= 0 && local28 < Static152.mapSizeX) { for (@Pc(39) int local39 = local11; local39 <= local15; local39++) { if (local39 >= 0 && local39 < Static99.mapSizeZ && (!local1 || local28 >= local7 || local39 >= local15 || local39 < arg3 && local28 != arg2)) { - @Pc(71) Tile local71 = Static130.aClass3_Sub5ArrayArrayArray1[local17][local28][local39]; + @Pc(71) Tile local71 = SceneGraph.tiles[local17][local28][local39]; if (local71 != null) { @Pc(158) int local158 = (Static83.activeTileHeightMap[local17][local28][local39] + Static83.activeTileHeightMap[local17][local28 + 1][local39] + Static83.activeTileHeightMap[local17][local28][local39 + 1] + Static83.activeTileHeightMap[local17][local28 + 1][local39 + 1]) / 4 - (Static83.activeTileHeightMap[arg1][arg2][arg3] + Static83.activeTileHeightMap[arg1][arg2 + 1][arg3] + Static83.activeTileHeightMap[arg1][arg2][arg3 + 1] + Static83.activeTileHeightMap[arg1][arg2 + 1][arg3 + 1]) / 4; @Pc(161) Wall local161 = local71.aClass77_1; diff --git a/client/src/main/java/Static7.java b/client/src/main/java/Static7.java index 25282c6..a149969 100644 --- a/client/src/main/java/Static7.java +++ b/client/src/main/java/Static7.java @@ -45,7 +45,7 @@ public final class Static7 { if (Static118.aClass13_15 != null || Static105.aClass13_14 != null) { return; } - @Pc(20) int local20 = Static150.clickButton; + @Pc(20) int local20 = Mouse.clickButton; @Pc(93) int local93; @Pc(99) int local99; if (!Static60.aBoolean108) { @@ -55,8 +55,8 @@ public final class Static7 { local93 = Static196.anIntArray408[Static231.anInt5204 - 1]; local99 = Static56.anIntArray142[Static231.anInt5204 - 1]; @Pc(103) Component local103 = InterfaceList.getComponent(local99); - @Pc(106) ServerActiveProperties local106 = Static36.method940(local103); - if (local106.method511() || local106.method504()) { + @Pc(106) ServerActiveProperties local106 = InterfaceList.getServerActiveProperties(local103); + if (local106.method511() || local106.isObjReplaceEnabled()) { Static78.anInt2145 = 0; Static123.aBoolean155 = false; if (Static118.aClass13_15 != null) { diff --git a/client/src/main/java/Static70.java b/client/src/main/java/Static70.java index bdb6651..fc5bdf0 100644 --- a/client/src/main/java/Static70.java +++ b/client/src/main/java/Static70.java @@ -4,9 +4,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static70 { - @OriginalMember(owner = "client!fi", name = "k", descriptor = "I") - public static int type = 0; - @OriginalMember(owner = "client!fi", name = "a", descriptor = "(BI)Lclient!na;") public static JagString method1548(@OriginalArg(1) int arg0) { @Pc(9) JagString local9 = Static123.parseInt(arg0); diff --git a/client/src/main/java/Static72.java b/client/src/main/java/Static72.java index 7c22ada..8420c65 100644 --- a/client/src/main/java/Static72.java +++ b/client/src/main/java/Static72.java @@ -16,10 +16,7 @@ public final class Static72 { @OriginalMember(owner = "client!fl", name = "P", descriptor = "I") public static int anInt2043 = 0; - @OriginalMember(owner = "client!fl", name = "Q", descriptor = "Lclient!na;") - public static final JagString EMPTY_STRING = JagString.parse(""); - - @OriginalMember(owner = "client!fl", name = "V", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!fl", name = "V", descriptor = "Lclient!na;") public static final JagString aClass100_448 = JagString.parse("(Y"); @OriginalMember(owner = "client!fl", name = "b", descriptor = "(II)Lclient!cl;") diff --git a/client/src/main/java/Static74.java b/client/src/main/java/Static74.java index 295d83d..7d63862 100644 --- a/client/src/main/java/Static74.java +++ b/client/src/main/java/Static74.java @@ -1,13 +1,9 @@ -import java.util.zip.CRC32; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; public final class Static74 { - @OriginalMember(owner = "client!fn", name = "X", descriptor = "Ljava/util/zip/CRC32;") - public static final CRC32 aCRC32_1 = new CRC32(); - @OriginalMember(owner = "client!fn", name = "Z", descriptor = "Lclient!na;") public static final JagString aClass100_461 = JagString.parse(")1 "); @@ -15,7 +11,7 @@ public final class Static74 { public static void method1623(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { if (arg3 == arg6) { Static152.method2826(arg0, arg2, arg5, arg6, arg1, arg4); - } else if (arg1 - arg6 >= Static172.anInt4164 && arg6 + arg1 <= Static224.anInt5063 && Static267.anInt5773 <= arg2 - arg3 && Static106.anInt2869 >= arg2 + arg3) { + } else if (arg1 - arg6 >= TextureOp29.anInt4164 && arg6 + arg1 <= TextureOp29.anInt5063 && TextureOp29.anInt5773 <= arg2 - arg3 && TextureOp29.anInt2869 >= arg2 + arg3) { Static270.method4594(arg5, arg1, arg2, arg4, arg6, arg3, arg0); } else { Static231.method3981(arg6, arg5, arg4, arg0, arg2, arg1, arg3); @@ -84,7 +80,7 @@ public final class Static74 { @Pc(50) HookRequest local50 = new HookRequest(); local50.arguments = local41.anObjectArray3; local50.source = local41; - Static88.method1818(2000000, local50); + ScriptRunner.run(2000000, local50); } } } diff --git a/client/src/main/java/Static75.java b/client/src/main/java/Static75.java index c6aaa45..ae0c20f 100644 --- a/client/src/main/java/Static75.java +++ b/client/src/main/java/Static75.java @@ -19,7 +19,7 @@ public final class Static75 { @OriginalMember(owner = "client!g", name = "a", descriptor = "(III)Lclient!df;") public static WallDecor method1633(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; if (local7 == null) { return null; } else { @@ -253,7 +253,7 @@ public final class Static75 { local1184 = local39 - 1; local1188 = local1184 & 0x7FF; local1194 = local1184 >> 11 & 0xF; - local1198 = Static175.npcs[local1188]; + local1198 = NpcList.npcs[local1188]; } else { local1184 = -local39 - 1; local1194 = local1184 >> 11 & 0xF; diff --git a/client/src/main/java/Static78.java b/client/src/main/java/Static78.java index 9c9ade1..c4356cb 100644 --- a/client/src/main/java/Static78.java +++ b/client/src/main/java/Static78.java @@ -35,7 +35,7 @@ public final class Static78 { Protocol.outboundBuffer.offset = 0; Protocol.outboundBuffer.p1(186); if (GlobalConfig.LOGIN_USE_STRINGS) { - Protocol.outboundBuffer.pjstr(Base37.decodeLowerCase(name)); + Protocol.outboundBuffer.pjstr(Base37.decode37(name)); } else { Protocol.outboundBuffer.p8(name); } diff --git a/client/src/main/java/Static8.java b/client/src/main/java/Static8.java index 7540d05..e553071 100644 --- a/client/src/main/java/Static8.java +++ b/client/src/main/java/Static8.java @@ -15,7 +15,7 @@ public final class Static8 { @OriginalMember(owner = "client!aj", name = "a", descriptor = "(BILclient!be;)I") public static int method118(@OriginalArg(1) int arg0, @OriginalArg(2) Component arg1) { - if (!Static36.method940(arg1).method503(arg0) && arg1.anObjectArray29 == null) { + if (!InterfaceList.getServerActiveProperties(arg1).method503(arg0) && arg1.anObjectArray29 == null) { return -1; } else if (arg1.anIntArray39 == null || arg0 >= arg1.anIntArray39.length) { return -1; diff --git a/client/src/main/java/Static80.java b/client/src/main/java/Static80.java index db90b2b..b737308 100644 --- a/client/src/main/java/Static80.java +++ b/client/src/main/java/Static80.java @@ -49,10 +49,4 @@ public final class Static80 { } } - @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 = Static238.method4143(3, arg1); - local6.pushServer(); - local6.stringArg = arg0; - } } diff --git a/client/src/main/java/Static81.java b/client/src/main/java/Static81.java index 01e432c..3f7f296 100644 --- a/client/src/main/java/Static81.java +++ b/client/src/main/java/Static81.java @@ -1,5 +1,5 @@ import java.awt.Point; -import java.io.IOException; + import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; import org.openrs2.deob.annotation.Pc; @@ -66,628 +66,4 @@ public final class Static81 { } } - @OriginalMember(owner = "client!gg", name = "a", descriptor = "(Z)V") - public static void method1756() { - // todo: consolidate/rename static classes - if (Static267.anInt5775 > 0) { - Static267.anInt5775--; - } - if (Static60.rebootTimer > 1) { - Static60.rebootTimer--; - InterfaceList.miscTransmitAt = InterfaceList.transmitTimer; - } - if (LoginManager.aBoolean247) { - LoginManager.aBoolean247 = false; - Static175.method3279(); - return; - } - for (@Pc(34) int i = 0; i < 100 && Protocol.readPacket(); i++) { - } - if (client.gameState != 30) { - return; - } - Static233.loop(Protocol.outboundBuffer); // ReflectionCheck - @Pc(60) Object mouseRecorder = MouseRecorder.instance.lock; - @Pc(86) int offset; - @Pc(79) int samples; - @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 (Static150.clickButton != 0 || MouseRecorder.instance.samples >= 40) { - Protocol.outboundBuffer.p1isaac(123); - samples = 0; - Protocol.outboundBuffer.p1(0); - offset = Protocol.outboundBuffer.offset; - for (i = 0; MouseRecorder.instance.samples > i && Protocol.outboundBuffer.offset - offset < 240; i++) { - samples++; - 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 (Static264.mouseRecorderPrevX != x || y != Static179.mouseRecorderPrevY) { - dx = x - Static264.mouseRecorderPrevX; - Static264.mouseRecorderPrevX = x; - dy = y - Static179.mouseRecorderPrevY; - Static179.mouseRecorderPrevY = y; - if (Static204.anInt4762 < 8 && dx >= -32 && dx <= 31 && dy >= -32 && dy <= 31) { - dy += 32; - dx += 32; - Protocol.outboundBuffer.p2(dy + (Static204.anInt4762 << 12) + (dx << 6)); - Static204.anInt4762 = 0; - } else if (Static204.anInt4762 < 32 && dx >= -128 && dx <= 127 && dy >= -128 && dy <= 127) { - Protocol.outboundBuffer.p1(Static204.anInt4762 + 128); - dy += 128; - dx += 128; - Protocol.outboundBuffer.p2((dx << 8) + dy); - Static204.anInt4762 = 0; - } else if (Static204.anInt4762 < 32) { - Protocol.outboundBuffer.p1(Static204.anInt4762 + 192); - if (outsideWindow) { - Protocol.outboundBuffer.p4(Integer.MIN_VALUE); - } else { - Protocol.outboundBuffer.p4(x | y << 16); - } - Static204.anInt4762 = 0; - } else { - Protocol.outboundBuffer.p2(Static204.anInt4762 + 57344); - if (outsideWindow) { - Protocol.outboundBuffer.p4(Integer.MIN_VALUE); - } else { - Protocol.outboundBuffer.p4(x | y << 16); - } - Static204.anInt4762 = 0; - } - } else if (Static204.anInt4762 < 2047) { - Static204.anInt4762++; - } - } - Protocol.outboundBuffer.p1len(Protocol.outboundBuffer.offset - offset); - if (MouseRecorder.instance.samples > samples) { - MouseRecorder.instance.samples -= samples; - for (i = 0; i < MouseRecorder.instance.samples; i++) { - MouseRecorder.instance.x[i] = MouseRecorder.instance.x[samples + i]; - MouseRecorder.instance.y[i] = MouseRecorder.instance.y[samples + i]; - } - } else { - MouseRecorder.instance.samples = 0; - } - } - } - if (Static150.clickButton != 0) { - @Pc(411) long loops = (Static133.clickTime - Static183.prevClickTime) / 50L; - samples = Mouse.clickY; - if (samples < 0) { - samples = 0; - } else if (samples > 65535) { - samples = 65535; - } - if (loops > 32767L) { - loops = 32767L; - } - i = Mouse.clickX; - Static183.prevClickTime = Static133.clickTime; - @Pc(437) byte button = 0; - if (i < 0) { - i = 0; - } else if (i > 65535) { - i = 65535; - } - x = (int) loops; - if (Static150.clickButton == 2) { - button = 1; - } - Protocol.outboundBuffer.p1isaac(75); - Protocol.outboundBuffer.p2leadd(button << 15 | x); - Protocol.outboundBuffer.p4me(i | samples << 16); - } - if (Static16.anInt551 > 0) { - Static16.anInt551--; - } - if (Preferences.aBoolean63) { - for (i = 0; i < InterfaceList.keyQueueSize; i++) { - offset = InterfaceList.keyCodes[i]; - if (offset == 98 || offset == 99 || offset == 96 || offset == 97) { - Static197.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]) { - Static197.aBoolean228 = true; - } - if (Static197.aBoolean228 && Static16.anInt551 <= 0) { - Static16.anInt551 = 20; - Static197.aBoolean228 = false; - Protocol.outboundBuffer.p1isaac(21); - Protocol.outboundBuffer.p2add((int)Camera.pitchTarget); - Protocol.outboundBuffer.p2le((int)Camera.yawTarget); - } - if (GameShell.focus && !Static67.prevFocus) { - Static67.prevFocus = true; - Protocol.outboundBuffer.p1isaac(22); - Protocol.outboundBuffer.p1(1); - } - if (!GameShell.focus && Static67.prevFocus) { - Static67.prevFocus = false; - Protocol.outboundBuffer.p1isaac(22); - Protocol.outboundBuffer.p1(0); - } - if (!Preferences.sentToServer) { - Protocol.outboundBuffer.p1isaac(98); - Protocol.outboundBuffer.p4(Preferences.toInt()); - Preferences.sentToServer = true; - } - Static31.method846(); - if (client.gameState != 30) { - return; - } - Static251.loop(); // ChangeLocRequest - Static192.loop(); // AttachLocRequest - Static54.loop(); // SoundPlayer - Static201.anInt1862++; - if (Static201.anInt1862 > 750) { - Static175.method3279(); - return; - } - Static71.method1444(); - Static109.method2274(); - Static19.loop(); // OverheadChat - if (WorldMap.component != null) { - Static12.method447(); - } - // VarpDomain - for (i = Static38.poll(true); i != -1; i = Static38.poll(false)) { - Static85.method1775(i); - VarpDomain.updatedVarps[VarpDomain.updatedVarpsWriterIndex++ & 0x1F] = i; - } - @Pc(782) int modelId; - // DelayedStateChange - for (@Pc(709) DelayedStateChange change = Static127.poll(); change != null; change = Static127.poll()) { - samples = change.getType(); - i = change.getId(); - if (samples == 1) { - Static155.varcs[i] = change.intArg1; - VarcDomain.updatedVarcs[VarcDomain.updatedVarcsWriterIndex++ & 0x1F] = i; - } else if (samples == 2) { - Static226.varcstrs[i] = change.stringArg; - VarcDomain.updatedVarcstrs[VarcDomain.updatedVarcstrsWriterIndex++ & 0x1F] = i; - } else { - @Pc(773) Component component; - if (samples == 3) { - component = InterfaceList.getComponent(i); - if (!change.stringArg.strEquals(component.aClass100_84)) { - component.aClass100_84 = change.stringArg; - Static43.redraw(component); - } - } else if (samples == 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; - Static43.redraw(component); - } - } else if (samples == 5) { - component = InterfaceList.getComponent(i); - if (component.anInt522 != change.intArg1 || change.intArg1 == -1) { - component.anInt496 = 1; - component.anInt500 = 0; - component.anInt522 = change.intArg1; - component.anInt510 = 0; - Static43.redraw(component); - } - } else if (samples == 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.anInt474) { - local1189.anInt474 = dy; - Static43.redraw(local1189); - } - } else if (samples == 7) { - component = InterfaceList.getComponent(i); - // todo: this should not be necessary, data/server-related? - if (component != null) { - @Pc(1145) boolean hidden = change.intArg1 == 1; - if (hidden != component.hidden) { - component.hidden = hidden; - Static43.redraw(component); - } - } - } else if (samples == 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; - } - } - Static43.redraw(component); - } - } else if (samples == 9) { - component = InterfaceList.getComponent(i); - if (change.intArg1 != component.objId || component.objCount != change.intArg3) { - component.objId = change.intArg1; - component.objCount = change.intArg3; - Static43.redraw(component); - } - } else if (samples == 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; - Static43.redraw(component); - } - } else if (samples == 11) { - component = InterfaceList.getComponent(i); - component.x = component.baseX = change.intArg1; - component.yMode = 0; - component.xMode = 0; - component.y = component.baseY = change.intArg3; - Static43.redraw(component); - } else if (samples == 12) { - component = InterfaceList.getComponent(i); - x = change.intArg1; - if (component != null && component.type == 0) { - if (x > component.anInt491 - component.anInt459) { - x = component.anInt491 - component.anInt459; - } - if (x < 0) { - x = 0; - } - if (x != component.scrollY) { - component.scrollY = x; - Static43.redraw(component); - } - } - } else if (samples == 13) { - component = InterfaceList.getComponent(i); - component.modelRotationSpeed = change.intArg1; - } - } - } - // Cross - if (Static70.type != 0) { - Static17.milliseconds += 20; - if (Static17.milliseconds >= 400) { - Static70.type = 0; - } - } - Static178.anInt4247++; - if (Static257.aClass13_7 != null) { - Static72.anInt2043++; - if (Static72.anInt2043 >= 15) { - Static43.redraw(Static257.aClass13_7); - Static257.aClass13_7 = null; - } - } - @Pc(1361) Component local1361; - if (Static118.aClass13_15 != null) { - Static43.redraw(Static118.aClass13_15); - if (Static149.anInt3554 + 5 < Mouse.anInt4873 || Mouse.anInt4873 < Static149.anInt3554 - 5 || Static206.anInt4773 + 5 < Mouse.anInt5032 || Static206.anInt4773 - 5 > Mouse.anInt5032) { - Static123.aBoolean155 = true; - } - Static78.anInt2145++; - if (Static22.anInt723 == 0) { - if (Static123.aBoolean155 && Static78.anInt2145 >= 5) { - if (Static118.aClass13_15 == Static169.aClass13_18 && Static4.anInt36 != Static18.anInt588) { - local1361 = Static118.aClass13_15; - @Pc(1363) byte local1363 = 0; - if (Static179.anInt4254 == 1 && local1361.anInt453 == 206) { - local1363 = 1; - } - if (local1361.objTypes[Static18.anInt588] <= 0) { - local1363 = 0; - } - if (Static36.method940(local1361).method504()) { - y = Static4.anInt36; - x = Static18.anInt588; - local1361.objTypes[x] = local1361.objTypes[y]; - local1361.objCounts[x] = local1361.objCounts[y]; - local1361.objTypes[y] = -1; - local1361.objCounts[y] = 0; - } else if (local1363 == 1) { - x = Static18.anInt588; - y = Static4.anInt36; - while (x != y) { - if (y > x) { - local1361.swapObjs(y - 1, y); - y--; - } else if (x > y) { - local1361.swapObjs(y + 1, y); - y++; - } - } - } else { - local1361.swapObjs(Static18.anInt588, Static4.anInt36); - } - Protocol.outboundBuffer.p1isaac(231); - Protocol.outboundBuffer.p2(Static4.anInt36); - Protocol.outboundBuffer.p4le2(Static118.aClass13_15.id); - Protocol.outboundBuffer.p2add(Static18.anInt588); - Protocol.outboundBuffer.p1sub(local1363); - } - } else if ((Static116.anInt2952 == 1 || Static277.method4640(Static231.anInt5204 - 1)) && Static231.anInt5204 > 2) { - Static226.method3901(); - } else if (Static231.anInt5204 > 0) { - Static59.method1372(); - } - Static150.clickButton = 0; - Static72.anInt2043 = 10; - Static118.aClass13_15 = null; - } - } - Static146.aBoolean174 = false; - Static56.aClass13_12 = null; - Static44.aBoolean83 = false; - InterfaceList.keyQueueSize = 0; - local1361 = Static180.aClass13_22; - Static180.aClass13_22 = null; - @Pc(1508) Component local1508 = Static43.aClass13_11; - Static43.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 - WorldMap.component = null; - if (InterfaceList.topLevelInterface != -1) { - Static57.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) Static115.mediumPriorityRequests.removeHead(); - if (priorityRequest == null) { - while (true) { - do { - priorityRequest = (HookRequest) InterfaceList.lowPriorityRequests.removeHead(); - if (priorityRequest == null) { - if (WorldMap.component == null) { - Static137.anInt3337 = 0; - } - if (Static105.aClass13_14 != null) { - Static4.method28(); - } - if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static58.wheelRotation != 0) { - y = Player.level - Static58.wheelRotation; - if (y < 0) { - y = 0; - } else if (y > 3) { - y = 3; - } - // Cheat - Cheat.teleport(PlayerList.self.movementQueueX[0] + Static225.originX, PlayerList.self.movementQueueZ[0] + Static142.originZ, y); - } - if (LoginManager.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) { - if (Static56.anInt1742 != -1) { - Cheat.teleport(Static225.originX + Static56.anInt1742, Static142.originZ - -Static116.anInt2954, Player.level); - } - Static187.anInt4422 = 0; - Static125.anInt3096 = 0; - } else if (Static125.anInt3096 == 2) { - if (Static56.anInt1742 != -1) { - Protocol.outboundBuffer.p1isaac(131); - Protocol.outboundBuffer.p4me(Static98.anInt2512); - Protocol.outboundBuffer.p2add(Static225.originX + Static56.anInt1742); - Protocol.outboundBuffer.p2leadd(Static15.anInt506); - Protocol.outboundBuffer.p2add(Static116.anInt2954 + Static142.originZ); - Static70.type = 1; - Static17.milliseconds = 0; - Static25.y = Mouse.clickY; - Static122.x = Mouse.clickX; - } - Static125.anInt3096 = 0; - } else if (Static187.anInt4422 == 2) { - if (Static56.anInt1742 != -1) { - Protocol.outboundBuffer.p1isaac(179); - Protocol.outboundBuffer.p2(Static142.originZ + Static116.anInt2954); - Protocol.outboundBuffer.p2(Static56.anInt1742 + Static225.originX); - Static17.milliseconds = 0; - Static70.type = 1; - Static122.x = Mouse.clickX; - Static25.y = Mouse.clickY; - } - Static187.anInt4422 = 0; - } else if (Static56.anInt1742 != -1 && Static125.anInt3096 == 0 && Static187.anInt4422 == 0) { - @Pc(1871) boolean local1871 = Static102.method2075(PlayerList.self.movementQueueZ[0], 0, 0, true, 0, Static56.anInt1742, 0, 0, 0, Static116.anInt2954, PlayerList.self.movementQueueX[0]); - if (local1871) { - Static25.y = Mouse.clickY; - Static17.milliseconds = 0; - Static122.x = Mouse.clickX; - Static70.type = 1; - } - } - Static56.anInt1742 = -1; - Static7.method843(); - if (Static180.aClass13_22 != local1361) { - if (local1361 != null) { - Static43.redraw(local1361); - } - if (Static180.aClass13_22 != null) { - Static43.redraw(Static180.aClass13_22); - } - } - if (local1508 != Static43.aClass13_11 && Static191.anInt4504 == Static133.anInt5235) { - if (local1508 != null) { - Static43.redraw(local1508); - } - if (Static43.aClass13_11 != null) { - Static43.redraw(Static43.aClass13_11); - } - } - if (Static43.aClass13_11 == null) { - if (Static133.anInt5235 > 0) { - Static133.anInt5235--; - } - } else if (Static133.anInt5235 < Static191.anInt4504) { - Static133.anInt5235++; - if (Static191.anInt4504 == Static133.anInt5235) { - Static43.redraw(Static43.aClass13_11); - } - } - if (Static227.cameraType == 1) { - Static250.method4273(); - } else if (Static227.cameraType == 2) { - Static125.updateLockedCamera(); - } else { - Static40.updateLoginScreenCamera(); - } - for (y = 0; y < 5; y++) { - @Pc(2001) int local2001 = Static31.anIntArray76[y]++; - } - y = Static142.getIdleLoops(); // Mouse - x = Static195.getIdleLoops(); // Keyboard - if (y > 15000 && x > 15000) { - Static267.anInt5775 = 250; - Static48.setIdleLoops(14500); - Protocol.outboundBuffer.p1isaac(245); - } - if (Static33.openUrlRequest != null && Static33.openUrlRequest.status == 1) { - if (Static33.openUrlRequest.result != null) { - Static169.openUrl(Static175.url, Static164.newTab); - } - Static175.url = null; - Static33.openUrlRequest = null; - Static164.newTab = false; - } - Static131.anInt3251++; - Static82.anInt2252++; - Static143.anInt3486++; - if (Static143.anInt3486 > 500) { - Static143.anInt3486 = 0; - modelId = (int) (Math.random() * 8.0D); - if ((modelId & 0x4) == 4) { - Static230.anInt5161 += Static220.anInt4941; - } - if ((modelId & 0x2) == 2) { - Static206.anInt4774 += Static20.anInt659; - } - if ((modelId & 0x1) == 1) { - Static132.anInt3291 += Static248.anInt4229; - } - } - if (Static82.anInt2252 > 500) { - Static82.anInt2252 = 0; - modelId = (int) (Math.random() * 8.0D); - if ((modelId & 0x1) == 1) { - Static59.anInt1814 += Static263.anInt5755; - } - if ((modelId & 0x2) == 2) { - Static273.anInt4130 += Static179.anInt4262; - } - } - if (Static132.anInt3291 < -50) { - Static248.anInt4229 = 2; - } - if (Static59.anInt1814 < -60) { - Static263.anInt5755 = 2; - } - if (Static273.anInt4130 < -20) { - Static179.anInt4262 = 1; - } - if (Static206.anInt4774 < -55) { - Static20.anInt659 = 2; - } - if (Static206.anInt4774 > 55) { - Static20.anInt659 = -2; - } - if (Static230.anInt5161 < -40) { - Static220.anInt4941 = 1; - } - if (Static132.anInt3291 > 50) { - Static248.anInt4229 = -2; - } - if (Static230.anInt5161 > 40) { - Static220.anInt4941 = -1; - } - if (Static273.anInt4130 > 10) { - Static179.anInt4262 = -1; - } - if (Static59.anInt1814 > 60) { - Static263.anInt5755 = -2; - } - if (Static131.anInt3251 > 50) { - Protocol.outboundBuffer.p1isaac(93); - } - if (Static34.verifyIdChanged) { - Static71.transmitVerifyId(); - Static34.verifyIdChanged = false; - } - try { - if (Protocol.socket != null && Protocol.outboundBuffer.offset > 0) { - Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset); - Static131.anInt3251 = 0; - Protocol.outboundBuffer.offset = 0; - } - } catch (@Pc(2266) IOException local2266) { - Static175.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]); - Static82.method1767(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); - Static82.method1767(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); - Static82.method1767(priorityRequest); - } - } } diff --git a/client/src/main/java/Static82.java b/client/src/main/java/Static82.java index 541ecbd..895c095 100644 --- a/client/src/main/java/Static82.java +++ b/client/src/main/java/Static82.java @@ -8,7 +8,7 @@ public final class Static82 { @OriginalMember(owner = "client!gi", name = "a", descriptor = "(IIIIB)V") public static void method1760(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { - if (arg1 - arg0 >= Static172.anInt4164 && Static224.anInt5063 >= arg0 + arg1 && arg3 - arg0 >= Static267.anInt5773 && Static106.anInt2869 >= arg0 + arg3) { + if (arg1 - arg0 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg0 + arg1 && arg3 - arg0 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg0 + arg3) { Static49.method1206(arg1, arg0, arg2, arg3); } else { Static89.method1843(arg2, arg3, arg0, arg1); @@ -17,6 +17,6 @@ public final class Static82 { @OriginalMember(owner = "client!gi", name = "a", descriptor = "(ILclient!jl;)V") public static void method1767(@OriginalArg(1) HookRequest arg0) { - Static88.method1818(200000, arg0); + ScriptRunner.run(200000, arg0); } } diff --git a/client/src/main/java/Static83.java b/client/src/main/java/Static83.java index ce5cb76..81f274e 100644 --- a/client/src/main/java/Static83.java +++ b/client/src/main/java/Static83.java @@ -20,7 +20,7 @@ public final class Static83 { @OriginalMember(owner = "client!gj", name = "a", descriptor = "(III)Lclient!df;") public static WallDecor method435(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { - @Pc(7) Tile local7 = Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2]; + @Pc(7) Tile local7 = SceneGraph.tiles[arg0][arg1][arg2]; return local7 == null ? null : local7.aClass24_1; } diff --git a/client/src/main/java/Static84.java b/client/src/main/java/Static84.java index dded082..979709d 100644 --- a/client/src/main/java/Static84.java +++ b/client/src/main/java/Static84.java @@ -15,9 +15,6 @@ public final class Static84 { @OriginalMember(owner = "client!gk", name = "h", descriptor = "I") public static int anInt2255 = 0; - @OriginalMember(owner = "client!gk", name = "i", descriptor = "I") - public static int anInt2256 = 0; - @OriginalMember(owner = "client!gk", name = "b", descriptor = "(B)V") public static void method1771() { Static62.anIntArray150 = Static206.method3679(0.4F); diff --git a/client/src/main/java/Static86.java b/client/src/main/java/Static86.java index 165c814..7c977f9 100644 --- a/client/src/main/java/Static86.java +++ b/client/src/main/java/Static86.java @@ -1,5 +1,4 @@ import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static86 { @@ -17,31 +16,4 @@ public final class Static86 { Static222.instantScreenFade = true; } - @OriginalMember(owner = "client!gm", name = "h", descriptor = "(I)V") - public static void method1800() { - Protocol.extendedCount = 0; - Protocol.removedCount = 0; - Static49.method1202(); - Static278.method4645(); - Static234.method4014(); - @Pc(19) int local19; - for (local19 = 0; local19 < Protocol.removedCount; local19++) { - @Pc(30) int local30 = Protocol.removedIds[local19]; - if (Static175.npcs[local30].lastSeenLoop != client.loop) { - if (Static175.npcs[local30].type.hasAreaSound()) { - Static91.method1877(Static175.npcs[local30]); - } - Static175.npcs[local30].method2698(null); - Static175.npcs[local30] = null; - } - } - if (Protocol.length != Protocol.inboundBuffer.offset) { - throw new RuntimeException("gnp1 pos:" + Protocol.inboundBuffer.offset + " psize:" + Protocol.length); - } - for (local19 = 0; local19 < Static272.anInt5214; local19++) { - if (Static175.npcs[Static33.anIntArray79[local19]] == null) { - throw new RuntimeException("gnp2 pos:" + local19 + " size:" + Static272.anInt5214); - } - } - } } diff --git a/client/src/main/java/Static87.java b/client/src/main/java/Static87.java index b37f9c5..9e894d0 100644 --- a/client/src/main/java/Static87.java +++ b/client/src/main/java/Static87.java @@ -131,7 +131,7 @@ public final class Static87 { @Pc(114) int local114 = arg1 + local30.y; @Pc(117) int local117 = local30.anInt476; @Pc(123) int local123 = local30.x + arg2; - if (Static121.aBoolean154 && (Static36.method940(local30).anInt546 != 0 || local30.type == 0) && local117 > 127) { + if (Static121.aBoolean154 && (InterfaceList.getServerActiveProperties(local30).anInt546 != 0 || local30.type == 0) && local117 > 127) { local117 = 127; } @Pc(166) int local166; @@ -495,7 +495,7 @@ public final class Static87 { local270 = local30.anInt475; } } else { - local270 = local30.anInt474; + local270 = local30.color; if (local30 == Static180.aClass13_22 && local30.anInt480 != 0) { local270 = local30.anInt480; } @@ -528,7 +528,7 @@ public final class Static87 { if (local30.type == 4) { local1921 = local30.method491(Sprites.nameIcons); if (local1921 != null) { - @Pc(1934) JagString local1934 = local30.aClass100_84; + @Pc(1934) JagString local1934 = local30.text; if (Static154.method2926(local30)) { local276 = local30.anInt492; if (Static180.aClass13_22 == local30 && local30.anInt475 != 0) { @@ -538,7 +538,7 @@ public final class Static87 { local1934 = local30.aClass100_82; } } else { - local276 = local30.anInt474; + local276 = local30.color; if (Static180.aClass13_22 == local30 && local30.anInt480 != 0) { local276 = local30.anInt480; } @@ -554,7 +554,7 @@ public final class Static87 { } } if (Static39.aClass13_10 == local30) { - local276 = local30.anInt474; + local276 = local30.color; local1934 = LocalizedText.PLEASEWAIT; } if (!local30.aBoolean32) { @@ -663,7 +663,7 @@ public final class Static87 { if (local2587) { local276 = local30.anInt462; } else { - local276 = local30.anInt522; + local276 = local30.modelSeqId; } local503 = 0; if (local30.objId != -1) { @@ -680,7 +680,7 @@ public final class Static87 { } } else if (local30.modelType == 5) { if (local30.modelId == -1) { - local2589 = Static134.aClass59_2.method1954(null, -1, null, null, 0, -1, 0, -1, -1); + local2589 = PlayerAppearance.DEFAULT.method1954(null, -1, null, null, 0, -1, 0, -1, -1); } else { local514 = local30.modelId & 0x7FF; if (local514 == PlayerList.selfId) { @@ -784,11 +784,11 @@ public final class Static87 { local556 = local123 + local503 * (local30.anInt512 + 115); local545 = (local30.anInt516 + 12) * local468 + local114; if (local30.anInt460 == 0) { - local1921.method2857(local3159, local556, local545, local30.anInt474, local30.aBoolean28 ? 0 : -1); + local1921.method2857(local3159, local556, local545, local30.color, local30.aBoolean28 ? 0 : -1); } else if (local30.anInt460 == 1) { - local1921.renderCenter(local3159, local556 + 57, local545, local30.anInt474, local30.aBoolean28 ? 0 : -1); + local1921.renderCenter(local3159, local556 + 57, local545, local30.color, local30.aBoolean28 ? 0 : -1); } else { - local1921.renderRight(local3159, local556 + 115 - 1, local545, local30.anInt474, local30.aBoolean28 ? 0 : -1); + local1921.renderRight(local3159, local556 + 115 - 1, local545, local30.color, local30.aBoolean28 ? 0 : -1); } } local276++; @@ -798,7 +798,7 @@ public final class Static87 { if (local30.type == 8 && Static43.aClass13_11 == local30 && Static133.anInt5235 == Static191.anInt4504) { local276 = 0; local270 = 0; - @Pc(3297) JagString local3297 = local30.aClass100_84; + @Pc(3297) JagString local3297 = local30.text; @Pc(3299) Font local3299 = Fonts.p12Full; local3297 = Static127.method2465(local30, local3297); @Pc(3325) JagString local3325; @@ -837,7 +837,7 @@ public final class Static87 { SoftwareRaster.fillRect(local518, local556, local270, local276, 16777120); SoftwareRaster.drawRect(local518, local556, local270, local276, 0); } - local3297 = local30.aClass100_84; + local3297 = local30.text; local545 = local556 + local3299.lineHeight + 2; local3297 = Static127.method2465(local30, local3297); while (local3297.length() > 0) { @@ -865,14 +865,14 @@ public final class Static87 { } if (local30.anInt490 == 1) { if (GlRenderer.enabled) { - Static46.method1185(local123, local276, local468, local503, local30.anInt474); + Static46.method1185(local123, local276, local468, local503, local30.color); } else { - SoftwareRaster.method2500(local123, local276, local468, local503, local30.anInt474); + SoftwareRaster.method2500(local123, local276, local468, local503, local30.color); } } else if (GlRenderer.enabled) { - Static46.method1181(local123, local276, local468, local503, local30.anInt474, local30.anInt490); + Static46.method1181(local123, local276, local468, local503, local30.color, local30.anInt490); } else { - SoftwareRaster.method2494(local123, local276, local468, local503, local30.anInt474, local30.anInt490); + SoftwareRaster.method2494(local123, local276, local468, local503, local30.color, local30.anInt490); } } } diff --git a/client/src/main/java/Static89.java b/client/src/main/java/Static89.java index 110cda6..c7c37b0 100644 --- a/client/src/main/java/Static89.java +++ b/client/src/main/java/Static89.java @@ -5,9 +5,6 @@ import org.openrs2.deob.annotation.Pc; public final class Static89 { - @OriginalMember(owner = "client!ha", name = "i", descriptor = "Lclient!qf;") - public static Sprite aClass3_Sub2_Sub1_5; - @OriginalMember(owner = "client!ha", name = "k", descriptor = "[[Z") public static boolean[][] aBooleanArrayArray3; @@ -113,7 +110,7 @@ public final class Static89 { if (Static226.anInt3953 != 0) { Static155.anInt3751 = Static277.anInt5850; Static60.anInt1892 = Static280.anInt5895; - } else if (Static150.clickButton == 0) { + } else if (Mouse.clickButton == 0) { Static155.anInt3751 = Mouse.anInt4873; Static60.anInt1892 = Mouse.anInt5032; } else { @@ -204,8 +201,8 @@ public final class Static89 { @Pc(9) int local9 = arg2; @Pc(12) int local12 = -arg2; @Pc(14) int local14 = -1; - @Pc(22) int local22 = Static78.method1690(Static224.anInt5063, arg2 + arg3, Static172.anInt4164); - @Pc(30) int local30 = Static78.method1690(Static224.anInt5063, arg3 - arg2, Static172.anInt4164); + @Pc(22) int local22 = Static78.method1690(TextureOp29.anInt5063, arg2 + arg3, TextureOp29.anInt4164); + @Pc(30) int local30 = Static78.method1690(TextureOp29.anInt5063, arg3 - arg2, TextureOp29.anInt4164); Static131.method2576(Static71.anIntArrayArray10[arg1], local30, local22, arg0); while (local7 < local9) { local14 += 2; @@ -219,13 +216,13 @@ public final class Static89 { local58 = arg1 - local9; local12 -= local9 << 1; local68 = arg1 + local9; - if (local68 >= Static267.anInt5773 && local58 <= Static106.anInt2869) { - local84 = Static78.method1690(Static224.anInt5063, arg3 + local7, Static172.anInt4164); - local93 = Static78.method1690(Static224.anInt5063, arg3 - local7, Static172.anInt4164); - if (Static106.anInt2869 >= local68) { + if (local68 >= TextureOp29.anInt5773 && local58 <= TextureOp29.anInt2869) { + local84 = Static78.method1690(TextureOp29.anInt5063, arg3 + local7, TextureOp29.anInt4164); + local93 = Static78.method1690(TextureOp29.anInt5063, arg3 - local7, TextureOp29.anInt4164); + if (TextureOp29.anInt2869 >= local68) { Static131.method2576(Static71.anIntArrayArray10[local68], local93, local84, arg0); } - if (Static267.anInt5773 <= local58) { + if (TextureOp29.anInt5773 <= local58) { Static131.method2576(Static71.anIntArrayArray10[local58], local93, local84, arg0); } } @@ -233,13 +230,13 @@ public final class Static89 { local7++; local58 = arg1 - local7; local68 = local7 + arg1; - if (local68 >= Static267.anInt5773 && Static106.anInt2869 >= local58) { - local84 = Static78.method1690(Static224.anInt5063, arg3 + local9, Static172.anInt4164); - local93 = Static78.method1690(Static224.anInt5063, arg3 - local9, Static172.anInt4164); - if (local68 <= Static106.anInt2869) { + if (local68 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= local58) { + local84 = Static78.method1690(TextureOp29.anInt5063, arg3 + local9, TextureOp29.anInt4164); + local93 = Static78.method1690(TextureOp29.anInt5063, arg3 - local9, TextureOp29.anInt4164); + if (local68 <= TextureOp29.anInt2869) { Static131.method2576(Static71.anIntArrayArray10[local68], local93, local84, arg0); } - if (local58 >= Static267.anInt5773) { + if (local58 >= TextureOp29.anInt5773) { Static131.method2576(Static71.anIntArrayArray10[local58], local93, local84, arg0); } } diff --git a/client/src/main/java/Static9.java b/client/src/main/java/Static9.java index 188767e..a851721 100644 --- a/client/src/main/java/Static9.java +++ b/client/src/main/java/Static9.java @@ -7,9 +7,6 @@ public final class Static9 { @OriginalMember(owner = "client!al", name = "e", descriptor = "I") public static int anInt172; - @OriginalMember(owner = "client!al", name = "m", descriptor = "I") - public static int anInt178 = 0; - @OriginalMember(owner = "client!al", name = "r", descriptor = "Lclient!na;") public static final JagString aClass100_35 = JagString.parse("showVideoAd"); diff --git a/client/src/main/java/Static90.java b/client/src/main/java/Static90.java index 3a5e57c..fb9b343 100644 --- a/client/src/main/java/Static90.java +++ b/client/src/main/java/Static90.java @@ -6,13 +6,7 @@ public final class Static90 { @OriginalMember(owner = "client!hb", name = "t", descriptor = "[I") public static final int[] anIntArray215 = new int[] { 160, 192, 80, 96, 0, 144, 80, 48, 160 }; - @OriginalMember(owner = "client!hb", name = "b", descriptor = "(Lclient!na;I)V") - public static void method1853(@OriginalArg(0) JagString arg0) { - WorldMap.clear(false); - Static133.method4011(arg0); - } - - @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 && MapList.aBooleanArray130.length > arg0 ? MapList.aBooleanArray130[arg0] : false; } diff --git a/client/src/main/java/Static91.java b/client/src/main/java/Static91.java index b88afae..e7ac027 100644 --- a/client/src/main/java/Static91.java +++ b/client/src/main/java/Static91.java @@ -10,94 +10,7 @@ public final class Static91 { @OriginalMember(owner = "client!hc", name = "P", descriptor = "I") public static int anInt2428; - @OriginalMember(owner = "client!hc", name = "d", descriptor = "(I)I") - public static int method1874() { - if ((double) WorldMap.targetZoom == 3.0D) { - return 37; - } else if ((double) WorldMap.targetZoom == 4.0D) { - return 50; - } else if ((double) WorldMap.targetZoom == 6.0D) { - return 75; - } else if ((double) WorldMap.targetZoom == 8.0D) { - return 100; - } else { - return 200; - } - } - - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(IB)Lclient!qc;") - public static ClientScript getCs2ById(@OriginalArg(0) int arg0) { - @Pc(12) ClientScript local12 = (ClientScript) Static105.aClass54_9.get((long) arg0); - if (local12 != null) { - return local12; - } - @Pc(22) byte[] local22 = client.js5Archive12.getFile(arg0, 0); - if (local22 == null) { - return null; - } - local12 = new ClientScript(); - @Pc(42) Buffer local42 = new Buffer(local22); - local42.offset = local42.data.length - 2; - @Pc(53) int local53 = local42.g2(); - @Pc(63) int local63 = local42.data.length - local53 - 12 - 2; - local42.offset = local63; - @Pc(70) int local70 = local42.g4(); - local12.anInt4667 = local42.g2(); - local12.anInt4671 = local42.g2(); - local12.anInt4665 = local42.g2(); - local12.anInt4669 = local42.g2(); - @Pc(98) int local98 = local42.g1(); - @Pc(107) int local107; - @Pc(114) int local114; - if (local98 > 0) { - local12.aClass133Array1 = new HashTable[local98]; - for (local107 = 0; local107 < local98; local107++) { - local114 = local42.g2(); - @Pc(121) HashTable local121 = new HashTable(Static165.clp2(local114)); - local12.aClass133Array1[local107] = local121; - while (local114-- > 0) { - @Pc(136) int local136 = local42.g4(); - @Pc(140) int local140 = local42.g4(); - local121.put(new IntNode(local140), (long) local136); - } - } - } - local42.offset = 0; - local12.name = local42.gjstrFast(); - local12.opcodes = new int[local70]; - local12.stringOperands = new JagString[local70]; - local107 = 0; - local12.intOperands = new int[local70]; - while (local63 > local42.offset) { - local114 = local42.g2(); - if (local114 == 3) { - local12.stringOperands[local107] = local42.gjstr(); - } else if (local114 >= 100 || local114 == 21 || local114 == 38 || local114 == 39) { - local12.intOperands[local107] = local42.g1(); - } else { - local12.intOperands[local107] = local42.g4(); - } - local12.opcodes[local107++] = local114; - } - Static105.aClass54_9.put(local12, (long) arg0); - return local12; - } - - @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!km;Z)V") - public static void method1877(@OriginalArg(0) Npc arg0) { - for (@Pc(13) AreaSound local13 = (AreaSound) Static152.aClass69_87.method2289(); local13 != null; local13 = (AreaSound) Static152.aClass69_87.method2288()) { - if (arg0 == local13.npc) { - if (local13.primaryStream != null) { - client.soundStream.removeSubStream(local13.primaryStream); - local13.primaryStream = null; - } - local13.unlink(); - return; - } - } - } - - @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 (WorldMap.labels == null || arg0.length() == 0) { return -1; @@ -127,10 +40,10 @@ public final class Static91 { local6.anInt1394 = arg8; local6.anInt1392 = arg9; for (@Pc(46) int local46 = arg0; local46 >= 0; local46--) { - if (Static130.aClass3_Sub5ArrayArrayArray1[local46][arg1][arg2] == null) { - Static130.aClass3_Sub5ArrayArrayArray1[local46][arg1][arg2] = new Tile(local46, arg1, arg2); + if (SceneGraph.tiles[local46][arg1][arg2] == null) { + SceneGraph.tiles[local46][arg1][arg2] = new Tile(local46, arg1, arg2); } } - Static130.aClass3_Sub5ArrayArrayArray1[arg0][arg1][arg2].aClass24_1 = local6; + SceneGraph.tiles[arg0][arg1][arg2].aClass24_1 = local6; } } diff --git a/client/src/main/java/Static92.java b/client/src/main/java/Static92.java index 01623ab..9165854 100644 --- a/client/src/main/java/Static92.java +++ b/client/src/main/java/Static92.java @@ -7,12 +7,6 @@ public final class Static92 { @OriginalMember(owner = "client!hd", name = "e", descriptor = "Lclient!qf;") public static Sprite aClass3_Sub2_Sub1_6; - @OriginalMember(owner = "client!hd", name = "g", descriptor = "[J") - public static final long[] aLongArray3 = new long[200]; - - @OriginalMember(owner = "client!hd", name = "i", descriptor = "I") - public static int anInt2433 = 0; - @OriginalMember(owner = "client!hd", name = "l", descriptor = "Lclient!na;") public static final JagString aClass100_510 = JagString.parse("null"); diff --git a/client/src/main/java/Static93.java b/client/src/main/java/Static93.java index 4a75a88..3b1ab23 100644 --- a/client/src/main/java/Static93.java +++ b/client/src/main/java/Static93.java @@ -4,21 +4,9 @@ import org.openrs2.deob.annotation.Pc; public final class Static93 { - @OriginalMember(owner = "client!he", name = "Y", descriptor = "I") - public static volatile int anInt2467 = 0; - - @OriginalMember(owner = "client!he", name = "ab", descriptor = "Lclient!sc;") - public static final HashTable aClass133_7 = new HashTable(16); - - @OriginalMember(owner = "client!he", name = "bb", descriptor = "Lclient!ug;") - public static Mouse instance = new Mouse(); - @OriginalMember(owner = "client!he", name = "db", descriptor = "Lclient!na;") public static final JagString aClass100_517 = JagString.parse(""); - @OriginalMember(owner = "client!he", name = "eb", descriptor = "[I") - public static final int[] anIntArray219 = new int[1000]; - @OriginalMember(owner = "client!he", name = "gb", descriptor = "Lclient!na;") public static final JagString aClass100_518 = JagString.parse("www"); diff --git a/client/src/main/java/Static95.java b/client/src/main/java/Static95.java deleted file mode 100644 index ff67539..0000000 --- a/client/src/main/java/Static95.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.nio.ByteBuffer; -import org.openrs2.deob.annotation.OriginalMember; - -public final class Static95 { - - @OriginalMember(owner = "client!hg", name = "J", descriptor = "Ljava/nio/ByteBuffer;") - public static ByteBuffer aByteBuffer4; - - @OriginalMember(owner = "client!hg", name = "K", descriptor = "Lclient!wa;") - public static Buffer aClass3_Sub15_2; - - @OriginalMember(owner = "client!hg", name = "Q", descriptor = "Ljava/nio/ByteBuffer;") - public static ByteBuffer aByteBuffer5; - - @OriginalMember(owner = "client!hg", name = "U", descriptor = "Lclient!wa;") - public static Buffer aClass3_Sub15_3; - - @OriginalMember(owner = "client!hg", name = "a", descriptor = "()V") - public static void method1939() { - aClass3_Sub15_3 = null; - aClass3_Sub15_2 = null; - aByteBuffer5 = null; - aByteBuffer4 = null; - } -} diff --git a/client/src/main/java/Static96.java b/client/src/main/java/Static96.java index 34158dc..defa843 100644 --- a/client/src/main/java/Static96.java +++ b/client/src/main/java/Static96.java @@ -13,12 +13,6 @@ public final class Static96 { @OriginalMember(owner = "client!hh", name = "a", descriptor = "Lclient!na;") public static final JagString aClass100_520 = JagString.parse("(U4"); - @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 aClass100_522 = JagString.parse("::wm0"); - @OriginalMember(owner = "client!hh", name = "a", descriptor = "(II)V") public static void method1949(@OriginalArg(1) int arg0) { if (InterfaceList.load(arg0)) { diff --git a/client/src/main/java/Static97.java b/client/src/main/java/Static97.java index 9bc07be..3652399 100644 --- a/client/src/main/java/Static97.java +++ b/client/src/main/java/Static97.java @@ -95,7 +95,7 @@ public final class Static97 { @OriginalMember(owner = "client!hi", name = "a", descriptor = "(Lclient!be;B)Lclient!na;") public static JagString method1963(@OriginalArg(0) Component arg0) { - if (Static36.method940(arg0).method512() == 0) { + if (InterfaceList.getServerActiveProperties(arg0).getTargetMask() == 0) { return null; } else if (arg0.aClass100_86 == null || arg0.aClass100_86.trim().length() == 0) { return Static121.aBoolean154 ? Static143.aClass100_668 : null; diff --git a/client/src/main/java/Static98.java b/client/src/main/java/Static98.java index 5031cff..48eac48 100644 --- a/client/src/main/java/Static98.java +++ b/client/src/main/java/Static98.java @@ -1,29 +1,11 @@ import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalMember; -import org.openrs2.deob.annotation.Pc; public final class Static98 { @OriginalMember(owner = "client!hj", name = "e", descriptor = "I") public static int anInt2512; - @OriginalMember(owner = "client!hj", name = "a", descriptor = "(Lclient!na;B)Z") - public static boolean method1965(@OriginalArg(0) JagString arg0) { - if (arg0 == null) { - return false; - } - for (@Pc(12) int local12 = 0; local12 < Static9.anInt178; local12++) { - if (arg0.equalsIgnoreCase(Static122.aClass100Array92[local12])) { - return true; - } - } - if (arg0.equalsIgnoreCase(PlayerList.self.username)) { - return true; - } else { - return false; - } - } - @OriginalMember(owner = "client!hj", name = "a", descriptor = "(IJBLclient!na;ISLclient!na;I)V") public static void method1966(@OriginalArg(0) int arg0, @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 (Static60.aBoolean108 || Static231.anInt5204 >= 500) { diff --git a/client/src/main/java/Static99.java b/client/src/main/java/Static99.java index 436e0da..b65b22a 100644 --- a/client/src/main/java/Static99.java +++ b/client/src/main/java/Static99.java @@ -14,6 +14,4 @@ public final class Static99 { @OriginalMember(owner = "client!hk", name = "db", descriptor = "Lclient!na;") public static final JagString aClass100_529 = JagString.parse("::wm3"); - @OriginalMember(owner = "client!hk", name = "fb", descriptor = "[I") - public static final int[] anIntArray240 = new int[25]; } diff --git a/client/src/main/java/StockMarketManager.java b/client/src/main/java/StockMarketManager.java index c3e20a0..b1f5711 100644 --- a/client/src/main/java/StockMarketManager.java +++ b/client/src/main/java/StockMarketManager.java @@ -2,7 +2,7 @@ import org.openrs2.deob.annotation.OriginalMember; public class StockMarketManager { @OriginalMember(owner = "client!si", name = "X", descriptor = "[Lclient!sg;") - public static final StockMarketOffer[] aClass136Array1 = new StockMarketOffer[6]; + 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/StockMarketOffer.java b/client/src/main/java/StockMarketOffer.java index fc0fb18..b0edc75 100644 --- a/client/src/main/java/StockMarketOffer.java +++ b/client/src/main/java/StockMarketOffer.java @@ -9,19 +9,19 @@ public final class StockMarketOffer { private byte aByte17; @OriginalMember(owner = "client!sg", name = "f", descriptor = "I") - public int anInt5089; + public int completedCount; @OriginalMember(owner = "client!sg", name = "g", descriptor = "I") - public int anInt5090; + public int count; @OriginalMember(owner = "client!sg", name = "j", descriptor = "I") - public int anInt5092; + public int completedGold; @OriginalMember(owner = "client!sg", name = "m", descriptor = "I") - public int anInt5094; + public int item; @OriginalMember(owner = "client!sg", name = "s", descriptor = "I") - public int anInt5099; + public int price; @OriginalMember(owner = "client!sg", name = "", descriptor = "()V") public StockMarketOffer() { @@ -30,20 +30,20 @@ public final class StockMarketOffer { @OriginalMember(owner = "client!sg", name = "", descriptor = "(Lclient!wa;)V") public StockMarketOffer(@OriginalArg(0) Buffer arg0) { this.aByte17 = arg0.g1s(); - this.anInt5094 = arg0.g2(); - this.anInt5099 = arg0.g4(); - this.anInt5090 = arg0.g4(); - this.anInt5089 = arg0.g4(); - this.anInt5092 = arg0.g4(); + this.item = arg0.g2(); + this.price = arg0.g4(); + this.count = arg0.g4(); + this.completedCount = arg0.g4(); + this.completedGold = arg0.g4(); } @OriginalMember(owner = "client!sg", name = "a", descriptor = "(Z)I") - public final int method3904() { + public final int getStatus() { return this.aByte17 & 0x7; } @OriginalMember(owner = "client!sg", name = "b", descriptor = "(B)I") - public final int method3905() { + public final int getType() { return (this.aByte17 & 0x8) == 8 ? 1 : 0; } } diff --git a/client/src/main/java/Texture.java b/client/src/main/java/Texture.java index ba4cb42..c3c4ed5 100644 --- a/client/src/main/java/Texture.java +++ b/client/src/main/java/Texture.java @@ -6,6 +6,10 @@ import org.openrs2.deob.annotation.Pc; @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!jh", name = "f", descriptor = "D") + public static double brightness = -1.0D; @OriginalMember(owner = "client!lc", name = "k", descriptor = "[I") private final int[] anIntArray328; @@ -72,9 +76,21 @@ public final class Texture { this.aClass3_Sub1_2 = this.aClass3_Sub1Array22[arg0.g1()]; } + @OriginalMember(owner = "client!th", name = "a", descriptor = "(DI)V") + public static void setBrightness(@OriginalArg(0) double arg0) { + if (brightness == arg0) { + return; + } + for (@Pc(12) int local12 = 0; local12 < 256; local12++) { + @Pc(25) int local25 = (int) (Math.pow((double) local12 / 255.0D, arg0) * 255.0D); + brightnessMap[local12] = local25 > 255 ? 255 : local25; + } + brightness = 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) { - Static241.method4537(arg3); + setBrightness(arg3); Static37.anInterface1_1 = arg5; Static176.aClass153_76 = arg4; Static10.method348(arg0, arg2); @@ -122,7 +138,7 @@ public final class Texture { if (local136 < 0) { local136 = 0; } - local136 = Static103.anIntArray253[local136]; + local136 = brightnessMap[local136]; @Pc(159) int local159 = local105[local127] >> 4; @Pc(165) int local165 = local103[local127] >> 4; if (local165 > 255) { @@ -134,11 +150,11 @@ public final class Texture { if (local159 > 255) { local159 = 255; } - local165 = Static103.anIntArray253[local165]; + local165 = brightnessMap[local165]; if (local159 < 0) { local159 = 0; } - local159 = Static103.anIntArray253[local159]; + local159 = brightnessMap[local159]; local56[local76++] = (local136 << 16) + (local165 << 8) + local159; if (arg1) { local76 += arg2 - 1; @@ -154,7 +170,7 @@ public final class Texture { @OriginalMember(owner = "client!lc", name = "a", descriptor = "(IIZLclient!m;DILclient!ve;)[B") public final byte[] method2728(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) TextureProvider arg3, @OriginalArg(4) double arg4, @OriginalArg(6) Js5 arg5) { @Pc(8) byte[] local8 = new byte[arg1 * 4 * arg0]; - Static241.method4537(arg4); + setBrightness(arg4); Static176.aClass153_76 = arg5; Static37.anInterface1_1 = arg3; Static10.method348(arg0, arg1); @@ -204,15 +220,15 @@ public final class Texture { if (local167 > 255) { local167 = 255; } - local138 = Static103.anIntArray253[local138]; + local138 = brightnessMap[local138]; if (local167 < 0) { local167 = 0; } if (local154 < 0) { local154 = 0; } - local154 = Static103.anIntArray253[local154]; - local167 = Static103.anIntArray253[local167]; + local154 = brightnessMap[local154]; + local167 = brightnessMap[local167]; @Pc(220) int local220; if (local138 == 0 && local154 == 0 && local167 == 0) { local220 = 0; diff --git a/client/src/main/java/TextureOp15.java b/client/src/main/java/TextureOp15.java index dfd1379..83cf06c 100644 --- a/client/src/main/java/TextureOp15.java +++ b/client/src/main/java/TextureOp15.java @@ -6,7 +6,10 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!je") public final class TextureOp15 extends TextureOp { - @OriginalMember(owner = "client!je", name = "", descriptor = "()V") + @OriginalMember(owner = "client!hd", name = "i", descriptor = "I") + public static int anInt2433 = 0; + + @OriginalMember(owner = "client!je", name = "", descriptor = "()V") public TextureOp15() { super(1, false); } @@ -17,32 +20,32 @@ public final class TextureOp15 extends TextureOp { @Pc(17) int local17 = Static64.anIntArray153[arg0]; @Pc(28) float local28 = (float) Math.atan2((double) (local13 - 2048), (double) (local17 - 2048)); if ((double) local28 >= -3.141592653589793D && -2.356194490192345D >= (double) local28) { - Static92.anInt2433 = arg0; + anInt2433 = arg0; Static267.anInt5776 = arg1; } else if ((double) local28 <= -1.5707963267948966D && -2.356194490192345D <= (double) local28) { Static267.anInt5776 = arg0; - Static92.anInt2433 = arg1; + anInt2433 = arg1; } else if ((double) local28 <= -0.7853981633974483D && (double) local28 >= -1.5707963267948966D) { Static267.anInt5776 = Static189.anInt4457 - arg0; - Static92.anInt2433 = arg1; + anInt2433 = arg1; } else if (local28 <= 0.0F && (double) local28 >= -0.7853981633974483D) { Static267.anInt5776 = arg1; - Static92.anInt2433 = Static172.anInt4165 - arg0; + anInt2433 = Static172.anInt4165 - arg0; } else if (local28 >= 0.0F && (double) local28 <= 0.7853981633974483D) { Static267.anInt5776 = Static189.anInt4457 - arg1; - Static92.anInt2433 = Static172.anInt4165 - arg0; + anInt2433 = Static172.anInt4165 - arg0; } else if ((double) local28 >= 0.7853981633974483D && (double) local28 <= 1.5707963267948966D) { Static267.anInt5776 = Static189.anInt4457 - arg0; - Static92.anInt2433 = Static172.anInt4165 - arg1; + anInt2433 = Static172.anInt4165 - arg1; } else if ((double) local28 >= 1.5707963267948966D && (double) local28 <= 2.356194490192345D) { - Static92.anInt2433 = Static172.anInt4165 - arg1; + anInt2433 = Static172.anInt4165 - arg1; Static267.anInt5776 = arg0; } else if ((double) local28 >= 2.356194490192345D && (double) local28 <= 3.141592653589793D) { Static267.anInt5776 = Static189.anInt4457 - arg1; - Static92.anInt2433 = arg0; + anInt2433 = arg0; } Static267.anInt5776 &= Static34.anInt1060; - Static92.anInt2433 &= Static141.anInt3473; + anInt2433 &= Static141.anInt3473; } @OriginalMember(owner = "client!je", name = "a", descriptor = "(ILclient!wa;Z)V") @@ -60,7 +63,7 @@ public final class TextureOp15 extends TextureOp { if (this.aClass121_41.invalid) { for (@Pc(26) int local26 = 0; local26 < Static189.anInt4457; local26++) { this.method2382(arg0, local26); - @Pc(40) int[] local40 = this.method4624(0, Static92.anInt2433); + @Pc(40) int[] local40 = this.method4624(0, anInt2433); local19[local26] = local40[Static267.anInt5776]; } } @@ -77,7 +80,7 @@ public final class TextureOp15 extends TextureOp { @Pc(36) int[] local36 = local15[1]; for (@Pc(38) int local38 = 0; local38 < Static189.anInt4457; local38++) { this.method2382(arg0, local38); - @Pc(52) int[][] local52 = this.method4634(Static92.anInt2433, 0); + @Pc(52) int[][] local52 = this.method4634(anInt2433, 0); local28[local38] = local52[0][Static267.anInt5776]; local36[local38] = local52[1][Static267.anInt5776]; local32[local38] = local52[2][Static267.anInt5776]; diff --git a/client/src/main/java/TextureOp29.java b/client/src/main/java/TextureOp29.java index e0679a4..e01007f 100644 --- a/client/src/main/java/TextureOp29.java +++ b/client/src/main/java/TextureOp29.java @@ -6,6 +6,14 @@ import org.openrs2.deob.annotation.Pc; @OriginalClass("client!si") public final class TextureOp29 extends TextureOp { + @OriginalMember(owner = "client!sd", name = "S", descriptor = "I") + public static int anInt5063 = 100; + @OriginalMember(owner = "client!ic", name = "j", descriptor = "I") + public static int anInt2869 = 100; + @OriginalMember(owner = "client!nj", name = "i", descriptor = "I") + public static int anInt4164 = 0; + @OriginalMember(owner = "client!vl", name = "h", descriptor = "I") + public static int anInt5773 = 0; @OriginalMember(owner = "client!si", name = "U", descriptor = "[Lclient!kf;") private TextureOp29SubOp[] aClass18Array1; @@ -14,6 +22,14 @@ public final class TextureOp29 extends TextureOp { super(0, true); } + @OriginalMember(owner = "client!id", name = "a", descriptor = "(IIBII)V") + public static void method2263(@OriginalArg(3) int arg0, @OriginalArg(4) int arg1) { + anInt5063 = arg1; + anInt4164 = 0; + anInt5773 = 0; + anInt2869 = arg0; + } + @OriginalMember(owner = "client!si", name = "a", descriptor = "(IB)[I") @Override public final int[] method4626(@OriginalArg(0) int arg0) { @@ -29,7 +45,7 @@ public final class TextureOp29 extends TextureOp { @Pc(7) int local7 = Static172.anInt4165; @Pc(9) int local9 = Static189.anInt4457; Static81.method1751(arg0); - Static107.method2263(Static141.anInt3473, Static34.anInt1060); + method2263(Static141.anInt3473, Static34.anInt1060); if (this.aClass18Array1 == null) { return; } diff --git a/client/src/main/java/TextureOp29SubOp4.java b/client/src/main/java/TextureOp29SubOp4.java index 63976b1..6d9fa55 100644 --- a/client/src/main/java/TextureOp29SubOp4.java +++ b/client/src/main/java/TextureOp29SubOp4.java @@ -27,6 +27,61 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { this.anInt5244 = arg3; } + @OriginalMember(owner = "client!bl", name = "a", descriptor = "(IIIIIIII)V") + public static void method644(@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 (TextureOp29.anInt4164 <= arg6 && TextureOp29.anInt5063 >= arg5 && arg4 >= TextureOp29.anInt5773 && arg1 <= TextureOp29.anInt2869) { + method2907(arg3, arg4, arg1, arg2, arg0, arg5, arg6); + } else { + method4222(arg5, arg2, arg1, arg0, arg3, arg4, arg6); + } + } + + @OriginalMember(owner = "client!mc", name = "a", descriptor = "(IIIIIIII)V") + public static void method2907(@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(9) int local9 = arg4 + arg1; + @Pc(13) int local13 = arg4 + arg6; + @Pc(15) int local15; + for (local15 = arg1; local15 < local9; local15++) { + Static131.method2576(Static71.anIntArrayArray10[local15], arg6, arg5, arg0); + } + @Pc(34) int local34 = arg2 - arg4; + @Pc(39) int local39 = arg5 - arg4; + for (local15 = arg2; local15 > local34; local15--) { + Static131.method2576(Static71.anIntArrayArray10[local15], arg6, arg5, arg0); + } + for (local15 = local9; local15 <= local34; local15++) { + @Pc(72) int[] local72 = Static71.anIntArrayArray10[local15]; + Static131.method2576(local72, arg6, local13, arg0); + Static131.method2576(local72, local13, local39, arg3); + Static131.method2576(local72, local39, arg5, arg0); + } + } + + @OriginalMember(owner = "client!tl", name = "a", descriptor = "(IIIIIIII)V") + public static void method4222(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6) { + @Pc(11) int local11 = Static78.method1690(TextureOp29.anInt2869, arg5, TextureOp29.anInt5773); + @Pc(17) int local17 = Static78.method1690(TextureOp29.anInt2869, arg2, TextureOp29.anInt5773); + @Pc(23) int local23 = Static78.method1690(TextureOp29.anInt5063, arg6, TextureOp29.anInt4164); + @Pc(29) int local29 = Static78.method1690(TextureOp29.anInt5063, arg0, TextureOp29.anInt4164); + @Pc(37) int local37 = Static78.method1690(TextureOp29.anInt2869, arg3 + arg5, TextureOp29.anInt5773); + @Pc(46) int local46 = Static78.method1690(TextureOp29.anInt2869, arg2 - arg3, TextureOp29.anInt5773); + @Pc(48) int local48; + for (local48 = local11; local48 < local37; local48++) { + Static131.method2576(Static71.anIntArrayArray10[local48], local23, local29, arg4); + } + for (local48 = local17; local48 > local46; local48--) { + Static131.method2576(Static71.anIntArrayArray10[local48], local23, local29, arg4); + } + @Pc(94) int local94 = Static78.method1690(TextureOp29.anInt5063, arg3 + arg6, TextureOp29.anInt4164); + @Pc(103) int local103 = Static78.method1690(TextureOp29.anInt5063, arg0 - arg3, TextureOp29.anInt4164); + for (local48 = local37; local48 <= local46; local48++) { + @Pc(122) int[] local122 = Static71.anIntArrayArray10[local48]; + Static131.method2576(local122, local23, local94, arg4); + Static131.method2576(local122, local94, local103, arg1); + Static131.method2576(local122, local103, local29, arg4); + } + } + @OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZI)V") @Override public final void method4009(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { @@ -54,6 +109,6 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp { @Pc(21) int local21 = this.anInt5247 * arg0 >> 12; @Pc(28) int local28 = arg1 * this.anInt5238 >> 12; @Pc(35) int local35 = this.anInt5244 * arg0 >> 12; - Static22.method644(this.anInt5231, local35, this.anInt5228, this.anInt5229, local21, local28, local14); + method644(this.anInt5231, local35, this.anInt5228, this.anInt5229, local21, local28, local14); } } diff --git a/client/src/main/java/TextureOpSprite.java b/client/src/main/java/TextureOpSprite.java index 6306c8f..b0f68a5 100644 --- a/client/src/main/java/TextureOpSprite.java +++ b/client/src/main/java/TextureOpSprite.java @@ -34,7 +34,7 @@ public class TextureOpSprite extends TextureOp { local43.trim(); this.anInt3240 = local43.anInt1859; this.anInt3239 = local43.anInt1867; - this.anIntArray305 = local43.anIntArray20; + this.anIntArray305 = local43.pixels; return true; } } diff --git a/client/src/main/java/Tile.java b/client/src/main/java/Tile.java index 5d0fa13..3beaec6 100644 --- a/client/src/main/java/Tile.java +++ b/client/src/main/java/Tile.java @@ -15,7 +15,7 @@ public final class Tile extends Node { public boolean aBoolean46; @OriginalMember(owner = "client!bj", name = "B", descriptor = "Lclient!fg;") - public ShapedTile aClass43_1; + public ShapedTile shapedTile; @OriginalMember(owner = "client!bj", name = "C", descriptor = "I") public int anInt663; @@ -42,7 +42,7 @@ public final class Tile extends Node { public boolean aBoolean47; @OriginalMember(owner = "client!bj", name = "S", descriptor = "Lclient!rh;") - public PlainTile aClass131_1; + public PlainTile plainTile; @OriginalMember(owner = "client!bj", name = "T", descriptor = "I") public int anInt670; diff --git a/client/src/main/java/TitleScreen.java b/client/src/main/java/TitleScreen.java index 1ec8e2c..871dcc8 100644 --- a/client/src/main/java/TitleScreen.java +++ b/client/src/main/java/TitleScreen.java @@ -3,6 +3,9 @@ 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 aClass100_165 = JagString.parse("titlebg"); + @OriginalMember(owner = "client!oi", name = "a", descriptor = "(Lclient!ve;B)V") public static void load(@OriginalArg(0) Js5 archive) { if (Static18.loaded) { @@ -35,7 +38,7 @@ public class TitleScreen { @OriginalMember(owner = "client!nd", name = "a", descriptor = "(ILclient!ve;)V") public static void init(@OriginalArg(1) Js5 arg0) { - Static262.bgId = arg0.getGroupId(Static27.aClass100_165); + Static262.bgId = arg0.getGroupId(aClass100_165); Static136.logoId = arg0.getGroupId(Static165.aClass100_776); } diff --git a/client/src/main/java/VarcDomain.java b/client/src/main/java/VarcDomain.java index 0efd276..41db3f5 100644 --- a/client/src/main/java/VarcDomain.java +++ b/client/src/main/java/VarcDomain.java @@ -5,6 +5,10 @@ public class VarcDomain { 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") diff --git a/client/src/main/java/VorbisFloor.java b/client/src/main/java/VorbisFloor.java new file mode 100644 index 0000000..d3d6739 --- /dev/null +++ b/client/src/main/java/VorbisFloor.java @@ -0,0 +1,6 @@ +import org.openrs2.deob.annotation.OriginalMember; + +public class VorbisFloor { + @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 }; +} diff --git a/client/src/main/java/VorbisRange.java b/client/src/main/java/VorbisRange.java index 6a4c104..4daf42a 100644 --- a/client/src/main/java/VorbisRange.java +++ b/client/src/main/java/VorbisRange.java @@ -97,7 +97,7 @@ public final class VorbisRange { @Pc(22) int local22 = 0; @Pc(32) int local32 = local3 < 0 ? local18 - 1 : local18 + 1; @Pc(43) int local43 = local14 - (local18 < 0 ? -local18 : local18) * local7; - arg4[arg0] *= Static108.aFloatArray8[arg1]; + arg4[arg0] *= VorbisFloor.INVERSE_DB_TABLE[arg1]; if (arg2 > arg5) { arg2 = arg5; } @@ -109,7 +109,7 @@ public final class VorbisRange { } else { local20 += local18; } - arg4[local61] *= Static108.aFloatArray8[local20]; + arg4[local61] *= VorbisFloor.INVERSE_DB_TABLE[local20]; } } @@ -196,7 +196,7 @@ public final class VorbisRange { local27 = local53; } } - @Pc(193) float local193 = Static108.aFloatArray8[local27]; + @Pc(193) float local193 = VorbisFloor.INVERSE_DB_TABLE[local27]; for (local49 = local20; local49 < arg1; local49++) { arg0[local49] *= local193; } diff --git a/client/src/main/java/WorldList.java b/client/src/main/java/WorldList.java index 9dfa7d5..858089b 100644 --- a/client/src/main/java/WorldList.java +++ b/client/src/main/java/WorldList.java @@ -213,4 +213,9 @@ public class WorldList { } } } + + @OriginalMember(owner = "client!h", name = "a", descriptor = "(I)Lclient!ba;") + public static World getNextWorld() { + return sorted.length > Static51.worldPos ? sorted[Static51.worldPos++] : null; + } } diff --git a/client/src/main/java/WorldMap.java b/client/src/main/java/WorldMap.java index 3c89221..2bc7e8a 100644 --- a/client/src/main/java/WorldMap.java +++ b/client/src/main/java/WorldMap.java @@ -898,4 +898,52 @@ public class WorldMap { 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!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") + public static void method4011(@OriginalArg(0) JagString arg0) { + for (@Pc(15) Map local15 = (Map) MapList.aClass69_120.method2289(); local15 != null; local15 = (Map) MapList.aClass69_120.method2288()) { + if (local15.group.strEquals(arg0)) { + currentMap = local15; + return; + } + } + } + + @OriginalMember(owner = "client!me", name = "a", descriptor = "(IB)V") + public static void setTargetZoom(@OriginalArg(0) int arg0) { + anInt4901 = -1; + if (arg0 == 37) { + targetZoom = 3.0F; + } else if (arg0 == 50) { + targetZoom = 4.0F; + } else if (arg0 == 75) { + targetZoom = 6.0F; + } else if (arg0 == 100) { + targetZoom = 8.0F; + } else if (arg0 == 200) { + targetZoom = 16.0F; + } + anInt4901 = -1; + } } diff --git a/client/src/main/java/WorldMapFont.java b/client/src/main/java/WorldMapFont.java index 0babd2d..5b86893 100644 --- a/client/src/main/java/WorldMapFont.java +++ b/client/src/main/java/WorldMapFont.java @@ -15,8 +15,10 @@ public final class WorldMapFont { @OriginalMember(owner = "client!fd", name = "d", descriptor = "Ljava/lang/String;") public static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"£$%^&*()-_=+[{]};:'@#~,<.>/?\\| " + String.valueOf('Ä') + 'Ë' + 'Ï' + 'Ö' + 'Ü' + 'ä' + 'ë' + 'ï' + 'ö' + 'ü' + 'ÿ' + 'ß' + 'Á' + 'À' + 'É' + 'È' + 'Í' + 'Ì' + 'Ó' + 'Ò' + 'Ú' + 'Ù' + 'á' + 'à' + 'é' + 'è' + 'í' + 'ì' + 'ó' + 'ò' + 'ú' + 'ù' + 'Â' + 'Ê' + 'Î' + 'Ô' + 'Û' + 'â' + 'ê' + 'î' + 'ô' + 'û' + 'Æ' + 'æ'; + @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") @@ -40,26 +42,26 @@ public final class WorldMapFont { @OriginalMember(owner = "client!fd", name = "", descriptor = "(IZLjava/awt/Component;)V") public WorldMapFont(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) Component arg2) { - this.dataIndex = Static66.ALPHABET_SIZE * 9; + this.dataIndex = ALPHABET_SIZE * 9; this.grayscale = false; @Pc(30) Font local30 = new Font("Helvetica", 1, arg0); @Pc(34) FontMetrics local34 = arg2.getFontMetrics(local30); @Pc(36) int local36; - for (local36 = 0; local36 < Static66.ALPHABET_SIZE; local36++) { + for (local36 = 0; local36 < ALPHABET_SIZE; local36++) { this.preRenderGlyph(local30, local34, ALPHABET.charAt(local36), local36, false); } if (this.grayscale) { - this.dataIndex = Static66.ALPHABET_SIZE * 9; + this.dataIndex = ALPHABET_SIZE * 9; this.grayscale = false; local30 = new Font("Helvetica", 0, arg0); local34 = arg2.getFontMetrics(local30); - for (local36 = 0; local36 < Static66.ALPHABET_SIZE; local36++) { + for (local36 = 0; local36 < ALPHABET_SIZE; local36++) { this.preRenderGlyph(local30, local34, ALPHABET.charAt(local36), local36, false); } if (!this.grayscale) { - this.dataIndex = Static66.ALPHABET_SIZE * 9; + this.dataIndex = ALPHABET_SIZE * 9; this.grayscale = false; - for (local36 = 0; local36 < Static66.ALPHABET_SIZE; local36++) { + for (local36 = 0; local36 < ALPHABET_SIZE; local36++) { this.preRenderGlyph(local30, local34, ALPHABET.charAt(local36), local36, true); } } diff --git a/client/src/main/java/client.java b/client/src/main/java/client.java index 214e682..b52977f 100644 --- a/client/src/main/java/client.java +++ b/client/src/main/java/client.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.net.Socket; import java.util.Calendar; import java.util.GregorianCalendar; +import java.util.Random; import org.openrs2.deob.annotation.OriginalArg; import org.openrs2.deob.annotation.OriginalClass; @@ -18,7 +19,9 @@ public final class client extends GameShell { 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!jm", name = "A", descriptor = "Lclient!na;") + @OriginalMember(owner = "client!d", name = "S", descriptor = "Ljava/util/Random;") + public static final Random aRandom1 = new Random(); + @OriginalMember(owner = "client!jm", name = "A", descriptor = "Lclient!na;") static final JagString aClass100_603 = JagString.parse(""); @OriginalMember(owner = "client!jm", name = "z", descriptor = "Lclient!na;") public static JagString mainLoadSecondaryText = aClass100_603; @@ -182,8 +185,10 @@ public final class client extends GameShell { public static long prevGc = 0L; @OriginalMember(owner = "client!gj", name = "d", descriptor = "I") public static int loop = 0; + @OriginalMember(owner = "client!qi", name = "v", descriptor = "Z") + public static boolean applyTweening = GlobalConfig.USE_TWEENING; - @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 { if (arg0.length != 4) { @@ -394,7 +399,7 @@ public final class client extends GameShell { if (!GlRenderer.enabled) { ((Js5GlTextureProvider) Rasteriser.textureProvider).clear(); } - Static105.aClass54_9.clear(); + ClientScriptList.scripts.clear(); js5Archive0.method4499(); js5Archive1.method4499(); js5Archive3.method4499(); @@ -441,7 +446,178 @@ public final class client extends GameShell { arg0.pBytes(local15, 24); } - @OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V") + @OriginalMember(owner = "client!lb", name = "a", descriptor = "(Z)V") + public static void method2721() { + SceneGraph.clear(); + MiniMap.sprite = null; + Static107.anInt2875 = -1; + method3768(); + Static255.cache.clear(); + Static171.aClass139_1 = new Class139(); + ((Js5GlTextureProvider) Rasteriser.textureProvider).clear(); + LightingManager.lightCount = 0; + LightingManager.lights = new Light[255]; + GlModel.method4120(); + Static242.method4203(); + Static115.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) { + Static242.method4201(); + Static76.method1642(); + } + Fonts.load(js5Archive13, js5Archive8); + Sprites.load(js5Archive8); + Static204.aClass3_Sub2_Sub1_10 = null; + Static39.aClass3_Sub2_Sub1_1 = null; + Static92.aClass3_Sub2_Sub1_6 = null; + Static165.aClass3_Sub2_Sub1_8 = null; + Static181.aClass3_Sub2_Sub1_9 = null; + if (gameState == 5) { + TitleScreen.load(js5Archive8); + } + if (gameState == 10) { + Static73.method1596(false); + } + if (gameState == 30) { + setGameState(25); + } + } + + @OriginalMember(owner = "client!tk", name = "a", descriptor = "(Z)V") + public static void method4221() { + Protocol.anInt4762 = 0; + Static67.prevFocus = true; + Static183.prevClickTime = 0L; + MouseRecorder.instance.samples = 0; + focus = true; + Static114.method4625(); + Static49.opcode4 = -1; + Static5.opcode3 = -1; + Protocol.opcode = -1; + Static267.anInt5775 = 0; + Player.rebootTimer = 0; + Protocol.outboundBuffer.offset = 0; + Static230.opcode2 = -1; + Static201.anInt1862 = 0; + Protocol.inboundBuffer.offset = 0; + @Pc(3506) int local3506; + for (local3506 = 0; local3506 < Static143.aClass102Array1.length; local3506++) { + Static143.aClass102Array1[local3506] = null; + } + Static231.anInt5204 = 0; + Static60.aBoolean108 = false; + Static48.setIdleLoops(0); + for (local3506 = 0; local3506 < 100; local3506++) { + Chat.messages[local3506] = null; + } + Static260.anInt5014 = 0; + Static132.anInt3291 = (int) (Math.random() * 100.0D) - 50; + Static84.anInt2255 = 0; + Camera.yawTarget = (int) (Math.random() * 20.0D) - 10 & 0x7FF; + Static107.anInt2875 = -1; + PlayerList.size = 0; + Static270.anInt5795 = 0; + Static206.anInt4774 = (int) (Math.random() * 110.0D) - 55; + Static241.aBoolean302 = false; + Static273.anInt4130 = (int) (Math.random() * 30.0D) - 20; + SoundPlayer.anInt4451 = 0; + Static115.anInt2939 = 0; + Static59.anInt1814 = (int) (Math.random() * 120.0D) - 60; + Chat.size = 0; + Static230.anInt5161 = (int) (Math.random() * 80.0D) - 40; + Static272.anInt5214 = 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(); + Static99.aClass69_64.clear(); + if (Static159.aClass69ArrayArrayArray1 != 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++) { + Static159.aClass69ArrayArrayArray1[local3506][local3663][local3670] = null; + } + } + } + } + Static26.aClass69_27 = new LinkedList(); + FriendsList.state = 0; + FriendsList.size = 0; + Static8.method121(); + DelayedStateChange.clear(); + Static133.anInt5230 = 0; + Static233.anInt5217 = 0; + Static265.anInt5765 = 0; + Static231.anInt5203 = 0; + Static248.anInt4232 = 0; + Static245.anInt5375 = 0; + Static57.anInt1744 = 0; + Static251.anInt5449 = 0; + Static113.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) Class3_Sub31 local3755 = (Class3_Sub31) Static119.aClass133_9.head(); local3755 != null; local3755 = (Class3_Sub31) Static119.aClass133_9.next()) { + Static132.method2605(true, local3755); + } + InterfaceList.topLevelInterface = -1; + Static119.aClass133_9 = new HashTable(8); + InterfaceList.method1287(); + Static39.aClass13_10 = null; + Static60.aBoolean108 = false; + Static231.anInt5204 = 0; + PlayerAppearance.DEFAULT.method1950(new int[] { 0, 0, 0, 0, 0 }, -1, false, null, -1); + for (local3506 = 0; local3506 < 8; local3506++) { + Static160.aClass100Array121[local3506] = null; + Static1.aBooleanArray1[local3506] = false; + Static191.anIntArray388[local3506] = -1; + } + Static102.method2073(); + Static19.aBoolean43 = true; + for (local3506 = 0; local3506 < 100; local3506++) { + Static186.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) { + Static86.setInstantFade(); + } + Static197.aBoolean228 = true; + Protocol.verifyId = 0; + Static195.aClass100_859 = LocalizedText.WALKHERE; + Static127.neverRemoveRoofs = false; + aShortArray88 = aShortArray19 = aShortArray74 = aShortArray87 = new short[256]; + Static114.method4637(); + Static261.aBoolean298 = false; + Static59.method1373(); + } + + @OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V") @Override protected final void mainRedraw() { if (gameState == 1000) { @@ -714,7 +890,7 @@ public final class client extends GameShell { worldListDefaultPort = GlobalConfig.DEFAULT_PORT + worldListId; } if (game == 1) { - Static172.shiftClick = true; + Cheat.shiftClick = true; Static161.anInt3923 = 16777215; Static161.anInt3922 = 0; PlayerAppearance.aShortArrayArray2 = PlayerAppearance.aShortArrayArray4; @@ -734,7 +910,7 @@ public final class client extends GameShell { aShortArray88 = aShortArray19 = aShortArray74 = aShortArray87 = new short[256]; port = worldListPort; if ((SignLink.anInt5928 == 3 && modeWhere != 2) || GlobalConfig.SELECT_DEFAULT_WORLD) { - Static125.worldId = worldListId; + Player.worldId = worldListId; } Keyboard.init(); Keyboard.start(GameShell.canvas); @@ -798,7 +974,7 @@ public final class client extends GameShell { if (GlRenderer.enabled) { nextNpc: for (@Pc(57) int local57 = 0; local57 < 32768; local57++) { - @Pc(66) Npc local66 = Static175.npcs[local57]; + @Pc(66) Npc local66 = NpcList.npcs[local57]; if (local66 != null) { @Pc(73) byte local73 = local66.type.aByte10; if ((local73 & 0x2) > 0 && local66.movementQueueSize == 0 && Math.random() * 1000.0D < 10.0D) { @@ -1326,7 +1502,7 @@ public final class client extends GameShell { if (loop % 1000 == 1) { @Pc(24) GregorianCalendar gregorianCalendar = new GregorianCalendar(); Static60.gregorianDateSeed = gregorianCalendar.get(Calendar.HOUR_OF_DAY) * 600 + gregorianCalendar.get(Calendar.MINUTE) * 10 + gregorianCalendar.get(Calendar.SECOND) / 6; - Static39.aRandom1.setSeed(Static60.gregorianDateSeed); + aRandom1.setSeed(Static60.gregorianDateSeed); } this.js5NetworkLoop(); if (js5MasterIndex != null) { @@ -1358,7 +1534,7 @@ public final class client extends GameShell { LoginManager.loopAuto(); LoginManager.loop(); } else if (gameState == 30) { - Static81.method1756(); + Protocol.method1756(); } else if (gameState == 40) { LoginManager.loop(); if (LoginManager.reply != -3) {