mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Refactored Keyboard class
This commit is contained in:
parent
ed473ddd96
commit
5711fb89c0
35 changed files with 251 additions and 239 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import java.awt.Component;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
|
@ -10,93 +11,205 @@ import org.openrs2.deob.annotation.Pc;
|
|||
@OriginalClass("client!uf")
|
||||
public final class Keyboard implements KeyListener, FocusListener {
|
||||
|
||||
public static final int KEY_CTRL = 80;
|
||||
public static final int KEY_SHIFT = 81;
|
||||
public static final int KEY_ALT = 86;
|
||||
public static final int KEY_LEFT = 96;
|
||||
public static final int KEY_RIGHT = 97;
|
||||
public static final int KEY_UP = 98;
|
||||
public static final int KEY_DOWN = 99;
|
||||
|
||||
@OriginalMember(owner = "client!bg", name = "A", descriptor = "[I")
|
||||
public static final int[] eventQueue = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!pl", name = "c", descriptor = "[I")
|
||||
public static final int[] CODE_MAP = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, 85, 80, 84, -1, 91, -1, -1, -1, 81, 82, 86, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, 83, 104, 105, 103, 102, 96, 98, 97, 99, -1, -1, -1, -1, -1, -1, -1, 25, 16, 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, 48, 68, 66, 50, 34, 51, 52, 53, 39, 54, 55, 56, 70, 69, 40, 41, 32, 35, 49, 36, 38, 67, 33, 65, 37, 64, -1, -1, -1, -1, -1, 228, 231, 227, 233, 224, 219, 225, 230, 226, 232, 89, 87, -1, 88, 229, 90, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, 101, -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, 100, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
|
||||
|
||||
@OriginalMember(owner = "client!s", name = "e", descriptor = "[I")
|
||||
public static final int[] typedCodeQueue = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!vh", name = "u", descriptor = "[I")
|
||||
public static final int[] typedCharQueue = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!pb", name = "q", descriptor = "[Z")
|
||||
public static final boolean[] pressedKeys = new boolean[112];
|
||||
|
||||
@OriginalMember(owner = "client!j", name = "L", descriptor = "I")
|
||||
public static int eventQueueWriterIndex = 0;
|
||||
|
||||
@OriginalMember(owner = "client!sg", name = "c", descriptor = "I")
|
||||
public static int eventQueueReaderIndex = 0;
|
||||
|
||||
@OriginalMember(owner = "client!ec", name = "q", descriptor = "I")
|
||||
public static int typedQueueWriterIndex = 0;
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "V", descriptor = "I")
|
||||
public static int typedQueueReaderIndex = 0;
|
||||
|
||||
@OriginalMember(owner = "client!an", name = "ab", descriptor = "Lclient!uf;")
|
||||
public static Keyboard instance = new Keyboard();
|
||||
|
||||
@OriginalMember(owner = "client!si", name = "eb", descriptor = "I")
|
||||
public static volatile int idleLoops = 0;
|
||||
|
||||
@OriginalMember(owner = "client!sh", name = "h", descriptor = "I")
|
||||
public static int prevTypedQueueWriterIndex = 0;
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "Z", descriptor = "I")
|
||||
public static int keyCode;
|
||||
|
||||
@OriginalMember(owner = "client!pi", name = "Y", descriptor = "I")
|
||||
public static int keyChar;
|
||||
|
||||
@OriginalMember(owner = "client!ch", name = "a", descriptor = "(Ljava/awt/Component;I)V")
|
||||
public static void stop(@OriginalArg(0) Component component) {
|
||||
component.removeKeyListener(instance);
|
||||
component.removeFocusListener(instance);
|
||||
eventQueueWriterIndex = -1;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!fc", name = "b", descriptor = "(I)V")
|
||||
public static void loop() {
|
||||
@Pc(12) Keyboard keyboard = instance;
|
||||
synchronized (instance) {
|
||||
typedQueueReaderIndex = prevTypedQueueWriterIndex;
|
||||
idleLoops++;
|
||||
@Pc(23) int key;
|
||||
if (eventQueueWriterIndex < 0) {
|
||||
for (key = 0; key < 112; key++) {
|
||||
pressedKeys[key] = false;
|
||||
}
|
||||
eventQueueWriterIndex = eventQueueReaderIndex;
|
||||
} else {
|
||||
while (eventQueueWriterIndex != eventQueueReaderIndex) {
|
||||
key = eventQueue[eventQueueReaderIndex];
|
||||
eventQueueReaderIndex = eventQueueReaderIndex + 1 & 0x7F;
|
||||
if (key >= 0) {
|
||||
pressedKeys[key] = true;
|
||||
} else {
|
||||
pressedKeys[~key] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
prevTypedQueueWriterIndex = typedQueueWriterIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!c", name = "d", descriptor = "(I)Z")
|
||||
public static boolean nextKey() {
|
||||
@Pc(6) Keyboard local6 = instance;
|
||||
synchronized (instance) {
|
||||
if (prevTypedQueueWriterIndex == typedQueueReaderIndex) {
|
||||
return false;
|
||||
} else {
|
||||
keyCode = typedCodeQueue[typedQueueReaderIndex];
|
||||
keyChar = typedCharQueue[typedQueueReaderIndex];
|
||||
typedQueueReaderIndex = typedQueueReaderIndex + 1 & 0x7F;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!kk", name = "a", descriptor = "(ZLjava/awt/event/KeyEvent;)I")
|
||||
public static int getKeyChar(@OriginalArg(1) KeyEvent event) {
|
||||
@Pc(6) int c = event.getKeyChar();
|
||||
if (c == 8364) {
|
||||
return 128;
|
||||
} else {
|
||||
if (c <= 0 || c >= 256) {
|
||||
c = -1;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "keyPressed", descriptor = "(Ljava/awt/event/KeyEvent;)V")
|
||||
@Override
|
||||
public final synchronized void keyPressed(@OriginalArg(0) KeyEvent arg0) {
|
||||
if (Static10.aClass149_1 == null) {
|
||||
public final synchronized void keyPressed(@OriginalArg(0) KeyEvent event) {
|
||||
if (instance == null) {
|
||||
return;
|
||||
}
|
||||
Static229.anInt5140 = 0;
|
||||
@Pc(7) int local7 = arg0.getKeyCode();
|
||||
if (local7 >= 0 && Static196.anIntArray407.length > local7) {
|
||||
local7 = Static196.anIntArray407[local7];
|
||||
if ((local7 & 0x80) != 0) {
|
||||
local7 = -1;
|
||||
|
||||
idleLoops = 0;
|
||||
@Pc(7) int code = event.getKeyCode();
|
||||
if (code >= 0 && CODE_MAP.length > code) {
|
||||
code = CODE_MAP[code];
|
||||
if ((code & 0x80) != 0) {
|
||||
code = -1;
|
||||
}
|
||||
} else {
|
||||
local7 = -1;
|
||||
code = -1;
|
||||
}
|
||||
if (Static114.anInt5844 >= 0 && local7 >= 0) {
|
||||
Static17.anIntArray53[Static114.anInt5844] = local7;
|
||||
Static114.anInt5844 = Static114.anInt5844 + 1 & 0x7F;
|
||||
if (Static114.anInt5844 == Static227.anInt5087) {
|
||||
Static114.anInt5844 = -1;
|
||||
if (eventQueueWriterIndex >= 0 && code >= 0) {
|
||||
eventQueue[eventQueueWriterIndex] = code;
|
||||
eventQueueWriterIndex = eventQueueWriterIndex + 1 & 0x7F;
|
||||
if (eventQueueWriterIndex == eventQueueReaderIndex) {
|
||||
eventQueueWriterIndex = -1;
|
||||
}
|
||||
}
|
||||
@Pc(68) int local68;
|
||||
if (local7 >= 0) {
|
||||
local68 = Static53.anInt1708 + 1 & 0x7F;
|
||||
if (local68 != Static102.anInt2678) {
|
||||
Static221.anIntArray375[Static53.anInt1708] = local7;
|
||||
Static264.anIntArray413[Static53.anInt1708] = -1;
|
||||
Static53.anInt1708 = local68;
|
||||
if (code >= 0) {
|
||||
@Pc(68) int index = typedQueueWriterIndex + 1 & 0x7F;
|
||||
if (index != typedQueueReaderIndex) {
|
||||
typedCodeQueue[typedQueueWriterIndex] = code;
|
||||
typedCharQueue[typedQueueWriterIndex] = -1;
|
||||
typedQueueWriterIndex = index;
|
||||
}
|
||||
}
|
||||
local68 = arg0.getModifiers();
|
||||
if ((local68 & 0xA) != 0 || local7 == 85 || local7 == 10) {
|
||||
arg0.consume();
|
||||
int modifiers = event.getModifiers();
|
||||
if ((modifiers & 0xA) != 0 || code == 85 || code == 10) {
|
||||
event.consume();
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "keyTyped", descriptor = "(Ljava/awt/event/KeyEvent;)V")
|
||||
@Override
|
||||
public final void keyTyped(@OriginalArg(0) KeyEvent arg0) {
|
||||
if (Static10.aClass149_1 != null) {
|
||||
@Pc(9) int local9 = Static136.method2650(arg0);
|
||||
if (local9 >= 0) {
|
||||
@Pc(21) int local21 = Static53.anInt1708 + 1 & 0x7F;
|
||||
if (Static102.anInt2678 != local21) {
|
||||
Static221.anIntArray375[Static53.anInt1708] = -1;
|
||||
Static264.anIntArray413[Static53.anInt1708] = local9;
|
||||
Static53.anInt1708 = local21;
|
||||
public final void keyTyped(@OriginalArg(0) KeyEvent event) {
|
||||
if (instance != null) {
|
||||
@Pc(9) int c = getKeyChar(event);
|
||||
if (c >= 0) {
|
||||
@Pc(21) int index = typedQueueWriterIndex + 1 & 0x7F;
|
||||
if (typedQueueReaderIndex != index) {
|
||||
typedCodeQueue[typedQueueWriterIndex] = -1;
|
||||
typedCharQueue[typedQueueWriterIndex] = c;
|
||||
typedQueueWriterIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
arg0.consume();
|
||||
event.consume();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "focusLost", descriptor = "(Ljava/awt/event/FocusEvent;)V")
|
||||
@Override
|
||||
public final synchronized void focusLost(@OriginalArg(0) FocusEvent arg0) {
|
||||
if (Static10.aClass149_1 != null) {
|
||||
Static114.anInt5844 = -1;
|
||||
public final synchronized void focusLost(@OriginalArg(0) FocusEvent event) {
|
||||
if (instance != null) {
|
||||
eventQueueWriterIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "keyReleased", descriptor = "(Ljava/awt/event/KeyEvent;)V")
|
||||
@Override
|
||||
public final synchronized void keyReleased(@OriginalArg(0) KeyEvent arg0) {
|
||||
if (Static10.aClass149_1 != null) {
|
||||
Static229.anInt5140 = 0;
|
||||
@Pc(11) int local11 = arg0.getKeyCode();
|
||||
if (local11 >= 0 && Static196.anIntArray407.length > local11) {
|
||||
local11 = Static196.anIntArray407[local11] & 0xFFFFFF7F;
|
||||
public final synchronized void keyReleased(@OriginalArg(0) KeyEvent event) {
|
||||
if (instance != null) {
|
||||
idleLoops = 0;
|
||||
@Pc(11) int c = event.getKeyCode();
|
||||
if (c >= 0 && CODE_MAP.length > c) {
|
||||
c = CODE_MAP[c] & 0xFFFFFF7F;
|
||||
} else {
|
||||
local11 = -1;
|
||||
c = -1;
|
||||
}
|
||||
if (Static114.anInt5844 >= 0 && local11 >= 0) {
|
||||
Static17.anIntArray53[Static114.anInt5844] = ~local11;
|
||||
Static114.anInt5844 = Static114.anInt5844 + 1 & 0x7F;
|
||||
if (Static227.anInt5087 == Static114.anInt5844) {
|
||||
Static114.anInt5844 = -1;
|
||||
if (eventQueueWriterIndex >= 0 && c >= 0) {
|
||||
eventQueue[eventQueueWriterIndex] = ~c;
|
||||
eventQueueWriterIndex = eventQueueWriterIndex + 1 & 0x7F;
|
||||
if (eventQueueReaderIndex == eventQueueWriterIndex) {
|
||||
eventQueueWriterIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
arg0.consume();
|
||||
event.consume();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "focusGained", descriptor = "(Ljava/awt/event/FocusEvent;)V")
|
||||
@Override
|
||||
public final void focusGained(@OriginalArg(0) FocusEvent arg0) {
|
||||
public final void focusGained(@OriginalArg(0) FocusEvent event) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@ import org.openrs2.deob.annotation.Pc;
|
|||
|
||||
public final class Static10 {
|
||||
|
||||
@OriginalMember(owner = "client!an", name = "ab", descriptor = "Lclient!uf;")
|
||||
public static Keyboard aClass149_1 = new Keyboard();
|
||||
|
||||
@OriginalMember(owner = "client!an", name = "db", descriptor = "S")
|
||||
public static short aShort9 = 205;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,9 @@ import org.openrs2.deob.annotation.Pc;
|
|||
|
||||
public final class Static102 {
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "Z", descriptor = "I")
|
||||
public static int keyCode;
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "K", descriptor = "Ljava/util/Calendar;")
|
||||
public static final Calendar aCalendar2 = Calendar.getInstance();
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "V", descriptor = "I")
|
||||
public static int anInt2678 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!hn", name = "W", descriptor = "Lclient!na;")
|
||||
public static JagString aClass100_545 = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public final class Static103 {
|
|||
if (local36 == 0) {
|
||||
Static113.method3556(Static55.level, local15, local19);
|
||||
} else if (local36 == 1) {
|
||||
if (Static191.staffModLevel > 0 && Static187.pressedKeys[82] && Static187.pressedKeys[81]) {
|
||||
if (Static191.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) {
|
||||
Static61.teleport(Static225.originX + local15, Static142.originZ + local19, Static55.level);
|
||||
} else if (Static102.method2075(Static173.self.movementQueueZ[0], 0, 0, true, 0, local15, 0, 0, 1, local19, Static173.self.movementQueueX[0])) {
|
||||
Static6.outboundBuffer.p1(Static1.anInt5);
|
||||
|
|
@ -665,7 +665,7 @@ public final class Static103 {
|
|||
if (local36 == 0) {
|
||||
Static187.anInt4422 = 1;
|
||||
Static113.method3556(Static55.level, local15, local19);
|
||||
} else if (Static191.staffModLevel > 0 && Static187.pressedKeys[82] && Static187.pressedKeys[81]) {
|
||||
} else if (Static191.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) {
|
||||
Static61.teleport(local15 + Static225.originX, Static142.originZ - -local19, Static55.level);
|
||||
} else {
|
||||
Static6.outboundBuffer.p1isaac(179);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class Static111 {
|
||||
|
||||
@OriginalMember(owner = "client!ii", name = "a", descriptor = "I")
|
||||
public static int anInt2900;
|
||||
public static int cameraZ;
|
||||
|
||||
@OriginalMember(owner = "client!ii", name = "l", descriptor = "I")
|
||||
public static int anInt2905;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@ public final class Static114 {
|
|||
@OriginalMember(owner = "client!j", name = "K", descriptor = "I")
|
||||
public static int anInt5843 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!j", name = "L", descriptor = "I")
|
||||
public static int anInt5844 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!j", name = "M", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_1100 = Static28.parse("::replacecanvas");
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class Static13 {
|
|||
local32 = Static34.concatenate(new JagString[] { LocalizedText.USE, LocalizedText.MINISEPARATOR, Static34.aClass100_203, Static225.aClass100_961 });
|
||||
} else if (Static241.aBoolean302 && Static231.anInt5204 < 2) {
|
||||
local32 = Static34.concatenate(new JagString[] { Static102.aClass100_545, LocalizedText.MINISEPARATOR, Static78.aClass100_466, Static225.aClass100_961 });
|
||||
} else if (Static172.shiftClick && Static187.pressedKeys[81] && Static231.anInt5204 > 2) {
|
||||
} else if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) {
|
||||
local32 = Static269.method2228(Static231.anInt5204 - 2);
|
||||
} else {
|
||||
local32 = Static269.method2228(Static231.anInt5204 - 1);
|
||||
|
|
|
|||
|
|
@ -24,19 +24,6 @@ public final class Static136 {
|
|||
local4.intArg1 = arg0;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!kk", name = "a", descriptor = "(ZLjava/awt/event/KeyEvent;)I")
|
||||
public static int method2650(@OriginalArg(1) KeyEvent arg0) {
|
||||
@Pc(6) int local6 = arg0.getKeyChar();
|
||||
if (local6 == 8364) {
|
||||
return 128;
|
||||
} else {
|
||||
if (local6 <= 0 || local6 >= 256) {
|
||||
local6 = -1;
|
||||
}
|
||||
return local6;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!kk", name = "b", descriptor = "(Lclient!wa;I)V")
|
||||
public static void method2654(@OriginalArg(0) Buffer arg0) {
|
||||
if (arg0.data.length - arg0.offset < 1) {
|
||||
|
|
|
|||
|
|
@ -118,37 +118,37 @@ public final class Static156 {
|
|||
@OriginalMember(owner = "client!mf", name = "e", descriptor = "(I)V")
|
||||
public static void init() {
|
||||
if (SignLink.javaVendor.toLowerCase().indexOf("microsoft") != -1) {
|
||||
Static196.anIntArray407[187] = 27;
|
||||
Static196.anIntArray407[223] = 28;
|
||||
Static196.anIntArray407[221] = 43;
|
||||
Static196.anIntArray407[188] = 71;
|
||||
Static196.anIntArray407[222] = 59;
|
||||
Static196.anIntArray407[192] = 58;
|
||||
Static196.anIntArray407[191] = 73;
|
||||
Static196.anIntArray407[219] = 42;
|
||||
Static196.anIntArray407[190] = 72;
|
||||
Static196.anIntArray407[186] = 57;
|
||||
Static196.anIntArray407[220] = 74;
|
||||
Static196.anIntArray407[189] = 26;
|
||||
Keyboard.CODE_MAP[187] = 27;
|
||||
Keyboard.CODE_MAP[223] = 28;
|
||||
Keyboard.CODE_MAP[221] = 43;
|
||||
Keyboard.CODE_MAP[188] = 71;
|
||||
Keyboard.CODE_MAP[222] = 59;
|
||||
Keyboard.CODE_MAP[192] = 58;
|
||||
Keyboard.CODE_MAP[191] = 73;
|
||||
Keyboard.CODE_MAP[219] = 42;
|
||||
Keyboard.CODE_MAP[190] = 72;
|
||||
Keyboard.CODE_MAP[186] = 57;
|
||||
Keyboard.CODE_MAP[220] = 74;
|
||||
Keyboard.CODE_MAP[189] = 26;
|
||||
return;
|
||||
}
|
||||
if (SignLink.setFocusTraversalKeysEnabled == null) {
|
||||
Static196.anIntArray407[192] = 58;
|
||||
Static196.anIntArray407[222] = 59;
|
||||
Keyboard.CODE_MAP[192] = 58;
|
||||
Keyboard.CODE_MAP[222] = 59;
|
||||
} else {
|
||||
Static196.anIntArray407[222] = 58;
|
||||
Static196.anIntArray407[192] = 28;
|
||||
Static196.anIntArray407[520] = 59;
|
||||
Keyboard.CODE_MAP[222] = 58;
|
||||
Keyboard.CODE_MAP[192] = 28;
|
||||
Keyboard.CODE_MAP[520] = 59;
|
||||
}
|
||||
Static196.anIntArray407[45] = 26;
|
||||
Static196.anIntArray407[61] = 27;
|
||||
Static196.anIntArray407[91] = 42;
|
||||
Static196.anIntArray407[59] = 57;
|
||||
Static196.anIntArray407[93] = 43;
|
||||
Static196.anIntArray407[44] = 71;
|
||||
Static196.anIntArray407[92] = 74;
|
||||
Static196.anIntArray407[46] = 72;
|
||||
Static196.anIntArray407[47] = 73;
|
||||
Keyboard.CODE_MAP[45] = 26;
|
||||
Keyboard.CODE_MAP[61] = 27;
|
||||
Keyboard.CODE_MAP[91] = 42;
|
||||
Keyboard.CODE_MAP[59] = 57;
|
||||
Keyboard.CODE_MAP[93] = 43;
|
||||
Keyboard.CODE_MAP[44] = 71;
|
||||
Keyboard.CODE_MAP[92] = 74;
|
||||
Keyboard.CODE_MAP[46] = 72;
|
||||
Keyboard.CODE_MAP[47] = 73;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mf", name = "a", descriptor = "()V")
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ public final class Static17 {
|
|||
@OriginalMember(owner = "client!bg", name = "z", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_101 = Static28.parse("k");
|
||||
|
||||
@OriginalMember(owner = "client!bg", name = "A", descriptor = "[I")
|
||||
public static final int[] anIntArray53 = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!bg", name = "M", descriptor = "I")
|
||||
public static int milliseconds = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@ import org.openrs2.deob.annotation.Pc;
|
|||
|
||||
public final class Static187 {
|
||||
|
||||
@OriginalMember(owner = "client!pb", name = "q", descriptor = "[Z")
|
||||
public static final boolean[] pressedKeys = new boolean[112];
|
||||
|
||||
@OriginalMember(owner = "client!pb", name = "x", descriptor = "[[[I")
|
||||
@OriginalMember(owner = "client!pb", name = "x", descriptor = "[[[I")
|
||||
public static final int[][][] anIntArrayArrayArray18 = new int[4][13][13];
|
||||
|
||||
@OriginalMember(owner = "client!pb", name = "Q", descriptor = "I")
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public final class Static19 {
|
|||
} catch (@Pc(25) Throwable local25) {
|
||||
}
|
||||
}
|
||||
arg0.addKeyListener(Static10.aClass149_1);
|
||||
arg0.addFocusListener(Static10.aClass149_1);
|
||||
arg0.addKeyListener(Keyboard.instance);
|
||||
arg0.addFocusListener(Keyboard.instance);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ public final class Static193 {
|
|||
@OriginalMember(owner = "client!pi", name = "U", descriptor = "I")
|
||||
public static int anInt4539;
|
||||
|
||||
@OriginalMember(owner = "client!pi", name = "Y", descriptor = "I")
|
||||
public static int keyChar;
|
||||
|
||||
@OriginalMember(owner = "client!pi", name = "P", descriptor = "J")
|
||||
public static long aLong147 = 0L;
|
||||
|
||||
|
|
@ -295,7 +292,7 @@ public final class Static193 {
|
|||
Static6.outboundBuffer.p1isaac(77);
|
||||
Static6.outboundBuffer.p1(local13 + local13 + 3);
|
||||
}
|
||||
Static6.outboundBuffer.p1a(Static187.pressedKeys[82] ? 1 : 0);
|
||||
Static6.outboundBuffer.p1a(Keyboard.pressedKeys[Keyboard.KEY_CTRL] ? 1 : 0);
|
||||
Static6.outboundBuffer.p2(Static225.originX + local23);
|
||||
Static6.outboundBuffer.p2add(Static142.originZ + local27);
|
||||
Static84.anInt2255 = Static84.anIntArray209[0];
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class Static195 {
|
|||
|
||||
@OriginalMember(owner = "client!pk", name = "f", descriptor = "(B)I")
|
||||
public static int getIdleLoops() {
|
||||
return Static229.anInt5140;
|
||||
return Keyboard.idleLoops;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!pk", name = "i", descriptor = "(I)V")
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ public final class Static196 {
|
|||
@OriginalMember(owner = "client!pl", name = "a", descriptor = "[Lclient!ba;")
|
||||
public static World[] aClass10_Sub1Array2;
|
||||
|
||||
@OriginalMember(owner = "client!pl", name = "c", descriptor = "[I")
|
||||
public static final int[] anIntArray407 = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, 85, 80, 84, -1, 91, -1, -1, -1, 81, 82, 86, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, 83, 104, 105, 103, 102, 96, 98, 97, 99, -1, -1, -1, -1, -1, -1, -1, 25, 16, 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, 48, 68, 66, 50, 34, 51, 52, 53, 39, 54, 55, 56, 70, 69, 40, 41, 32, 35, 49, 36, 38, 67, 33, 65, 37, 64, -1, -1, -1, -1, -1, 228, 231, 227, 233, 224, 219, 225, 230, 226, 232, 89, 87, -1, 88, 229, 90, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, 101, -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, 100, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
|
||||
|
||||
@OriginalMember(owner = "client!pl", name = "e", descriptor = "[I")
|
||||
public static final int[] anIntArray408 = new int[500];
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public final class Static197 {
|
|||
GameShell.canvasHeight = 503;
|
||||
}
|
||||
if (arg0) {
|
||||
Static31.method847(GameShell.canvas);
|
||||
Keyboard.stop(GameShell.canvas);
|
||||
Static223.method3866(GameShell.canvas);
|
||||
if (Static71.mouseWheel != null) {
|
||||
Static71.mouseWheel.method3291(GameShell.canvas);
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ public final class Static221 {
|
|||
@OriginalMember(owner = "client!s", name = "d", descriptor = "I")
|
||||
public static int anInt4364 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!s", name = "e", descriptor = "[I")
|
||||
public static final int[] anIntArray375 = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!s", name = "g", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_821 = Static28.parse("document)3cookie=(R");
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@ public final class Static227 {
|
|||
@OriginalMember(owner = "client!sg", name = "b", descriptor = "[I")
|
||||
public static final int[] anIntArray446 = new int[25];
|
||||
|
||||
@OriginalMember(owner = "client!sg", name = "c", descriptor = "I")
|
||||
public static int anInt5087 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!sg", name = "e", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_966 = Static28.parse("settings");
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ public final class Static228 {
|
|||
@OriginalMember(owner = "client!sh", name = "f", descriptor = "I")
|
||||
public static int anInt5103 = -1;
|
||||
|
||||
@OriginalMember(owner = "client!sh", name = "h", descriptor = "I")
|
||||
public static int anInt5105 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!sh", name = "i", descriptor = "[[I")
|
||||
public static final int[][] anIntArrayArray35 = new int[][] { { 0, 128, 0, 0, 128, 0, 128, 128 }, { 0, 128, 0, 0, 128, 0 }, { 0, 0, 64, 128, 0, 128 }, { 128, 128, 64, 128, 128, 0 }, { 0, 0, 128, 0, 128, 128, 64, 128 }, { 0, 128, 0, 0, 128, 0, 64, 128 }, { 64, 128, 0, 128, 0, 0, 64, 0 }, { 0, 0, 64, 0, 0, 64 }, { 128, 0, 128, 128, 0, 128, 0, 64, 64, 0 }, { 0, 128, 0, 0, 32, 64, 64, 96, 128, 128 }, { 0, 0, 128, 0, 128, 128, 64, 96, 32, 64 }, { 0, 0, 128, 0, 96, 32, 32, 32 } };
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,6 @@ public final class Static229 {
|
|||
@OriginalMember(owner = "client!si", name = "Z", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_972 = Static28.parse("<col=ffb000>");
|
||||
|
||||
@OriginalMember(owner = "client!si", name = "eb", descriptor = "I")
|
||||
public static volatile int anInt5140 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!si", name = "gb", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_974 = Static28.parse("<br>(X");
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public final class Static235 {
|
|||
|
||||
@OriginalMember(owner = "client!tb", name = "h", descriptor = "(I)I")
|
||||
public static int method4044() {
|
||||
return Static172.shiftClick && Static187.pressedKeys[81] && Static231.anInt5204 > 2 ? Static190.anIntArray382[Static231.anInt5204 - 2] : Static190.anIntArray382[Static231.anInt5204 - 1];
|
||||
return Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2 ? Static190.anIntArray382[Static231.anInt5204 - 2] : Static190.anIntArray382[Static231.anInt5204 - 1];
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!tb", name = "b", descriptor = "(IB)Lclient!bc;")
|
||||
|
|
|
|||
|
|
@ -17,21 +17,6 @@ public final class Static25 {
|
|||
@OriginalMember(owner = "client!c", name = "hb", descriptor = "Z")
|
||||
public static boolean aBoolean57 = false;
|
||||
|
||||
@OriginalMember(owner = "client!c", name = "d", descriptor = "(I)Z")
|
||||
public static boolean nextKey() {
|
||||
@Pc(6) Keyboard local6 = Static10.aClass149_1;
|
||||
synchronized (Static10.aClass149_1) {
|
||||
if (Static228.anInt5105 == Static102.anInt2678) {
|
||||
return false;
|
||||
} else {
|
||||
Static102.keyCode = Static221.anIntArray375[Static102.anInt2678];
|
||||
Static193.keyChar = Static264.anIntArray413[Static102.anInt2678];
|
||||
Static102.anInt2678 = Static102.anInt2678 + 1 & 0x7F;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!c", name = "a", descriptor = "(Ljava/awt/Frame;ZLsignlink!ll;)V")
|
||||
public static void method714(@OriginalArg(0) Frame arg0, @OriginalArg(2) SignLink arg1) {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -35,42 +35,42 @@ public final class Static250 {
|
|||
|
||||
@OriginalMember(owner = "client!uf", name = "a", descriptor = "(B)V")
|
||||
public static void method4273() {
|
||||
@Pc(14) int local14 = Static173.self.anInt3412 + Static132.anInt3291;
|
||||
@Pc(20) int local20 = Static173.self.anInt3421 + Static206.anInt4774;
|
||||
if (Static81.anInt2223 - local14 < -500 || Static81.anInt2223 - local14 > 500 || Static111.anInt2900 - local20 < -500 || Static111.anInt2900 - local20 > 500) {
|
||||
Static81.anInt2223 = local14;
|
||||
Static111.anInt2900 = local20;
|
||||
@Pc(14) int playerX = Static173.self.anInt3412 + Static132.anInt3291;
|
||||
@Pc(20) int playerZ = Static173.self.anInt3421 + Static206.anInt4774;
|
||||
if (Static81.cameraX - playerX < -500 || Static81.cameraX - playerX > 500 || Static111.cameraZ - playerZ < -500 || Static111.cameraZ - playerZ > 500) {
|
||||
Static81.cameraX = playerX;
|
||||
Static111.cameraZ = playerZ;
|
||||
}
|
||||
if (Static111.anInt2900 != local20) {
|
||||
Static111.anInt2900 += (local20 - Static111.anInt2900) / 16;
|
||||
if (Static111.cameraZ != playerZ) {
|
||||
Static111.cameraZ += (playerZ - Static111.cameraZ) / 16;
|
||||
}
|
||||
if (Static81.anInt2223 != local14) {
|
||||
Static81.anInt2223 += (local14 - Static81.anInt2223) / 16;
|
||||
if (Static81.cameraX != playerX) {
|
||||
Static81.cameraX += (playerX - Static81.cameraX) / 16;
|
||||
}
|
||||
if (Static33.aBoolean63) {
|
||||
for (@Pc(93) int local93 = 0; local93 < Static182.keyQueueSize; local93++) {
|
||||
@Pc(104) int local104 = Static227.keyCodes[local93];
|
||||
if (local104 == 98) {
|
||||
@Pc(104) int code = Static227.keyCodes[local93];
|
||||
if (code == Keyboard.KEY_UP) {
|
||||
Static72.pitchTarget = Static72.pitchTarget + 47 & 0xFFFFFFF0;
|
||||
} else if (local104 == 99) {
|
||||
} else if (code == Keyboard.KEY_DOWN) {
|
||||
Static72.pitchTarget = Static72.pitchTarget - 17 & 0xFFFFFFF0;
|
||||
} else if (local104 == 96) {
|
||||
} else if (code == Keyboard.KEY_LEFT) {
|
||||
Static57.yawTarget = Static57.yawTarget - 65 & 0xFFFFFF80;
|
||||
} else if (local104 == 97) {
|
||||
} else if (code == Keyboard.KEY_RIGHT) {
|
||||
Static57.yawTarget = Static57.yawTarget + 191 & 0xFFFFFF80;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Static187.pressedKeys[98]) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_UP]) {
|
||||
Static56.anInt1743 += (12 - Static56.anInt1743) / 2;
|
||||
} else if (Static187.pressedKeys[99]) {
|
||||
} else if (Keyboard.pressedKeys[Keyboard.KEY_DOWN]) {
|
||||
Static56.anInt1743 += (-Static56.anInt1743 - 12) / 2;
|
||||
} else {
|
||||
Static56.anInt1743 /= 2;
|
||||
}
|
||||
if (Static187.pressedKeys[96]) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_LEFT]) {
|
||||
Static38.anInt1203 += (-Static38.anInt1203 - 24) / 2;
|
||||
} else if (Static187.pressedKeys[97]) {
|
||||
} else if (Keyboard.pressedKeys[Keyboard.KEY_RIGHT]) {
|
||||
Static38.anInt1203 += (24 - Static38.anInt1203) / 2;
|
||||
} else {
|
||||
Static38.anInt1203 /= 2;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public final class Static253 {
|
|||
if (Static176.aBooleanArray95[4] && Static276.anIntArray564[4] + 128 > local59) {
|
||||
local59 = Static276.anIntArray564[4] + 128;
|
||||
}
|
||||
Static18.method555(Static81.anInt2223, arg0, Static207.method3685(Static55.level, Static173.self.anInt3412, Static173.self.anInt3421) - 50, 600 - -(local59 * 3), local57, Static111.anInt2900, local59);
|
||||
Static18.method555(Static81.cameraX, arg0, Static207.method3685(Static55.level, Static173.self.anInt3412, Static173.self.anInt3421) - 50, 600 - -(local59 * 3), local57, Static111.cameraZ, local59);
|
||||
}
|
||||
local57 = Static5.anInt40;
|
||||
local59 = Static138.renderX;
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@ public final class Static264 {
|
|||
@OriginalMember(owner = "client!vh", name = "s", descriptor = "I")
|
||||
public static int mouseRecorderPrevX = 0;
|
||||
|
||||
@OriginalMember(owner = "client!vh", name = "u", descriptor = "[I")
|
||||
public static final int[] anIntArray413 = new int[128];
|
||||
|
||||
@OriginalMember(owner = "client!vh", name = "a", descriptor = "(ILclient!wa;)Lclient!bd;")
|
||||
public static Class12 method3568(@OriginalArg(1) Buffer arg0) {
|
||||
@Pc(3) Class12 local3 = new Class12();
|
||||
|
|
|
|||
|
|
@ -35,13 +35,6 @@ public final class Static31 {
|
|||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!ch", name = "a", descriptor = "(Ljava/awt/Component;I)V")
|
||||
public static void method847(@OriginalArg(0) Component arg0) {
|
||||
arg0.removeKeyListener(Static10.aClass149_1);
|
||||
arg0.removeFocusListener(Static10.aClass149_1);
|
||||
Static114.anInt5844 = -1;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!ch", name = "b", descriptor = "(B)V")
|
||||
public static void method848() {
|
||||
if (Static219.anInt4937 == 0) {
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ public final class Static36 {
|
|||
@Pc(322) int local322;
|
||||
if (local9.aByteArray8 != null) {
|
||||
for (local243 = 0; local243 < local9.aByteArray8.length; local243++) {
|
||||
if (Static187.pressedKeys[local9.aByteArray8[local243]]) {
|
||||
if (Keyboard.pressedKeys[local9.aByteArray8[local243]]) {
|
||||
if (local9.anIntArray49 == null || Static83.loop >= local9.anIntArray49[local243]) {
|
||||
@Pc(279) byte local279 = local9.aByteArray7[local243];
|
||||
if (local279 == 0 || ((local279 & 0x2) == 0 || Static187.pressedKeys[86]) && ((local279 & 0x1) == 0 || Static187.pressedKeys[82]) && ((local279 & 0x4) == 0 || Static187.pressedKeys[81])) {
|
||||
if (local279 == 0 || ((local279 & 0x2) == 0 || Keyboard.pressedKeys[Keyboard.KEY_ALT]) && ((local279 & 0x1) == 0 || Keyboard.pressedKeys[Keyboard.KEY_CTRL]) && ((local279 & 0x4) == 0 || Keyboard.pressedKeys[Keyboard.KEY_SHIFT])) {
|
||||
Static263.method4512(Static186.EMPTY_FILE, -1, local243 + 1, local9.id);
|
||||
local322 = local9.anIntArray46[local243];
|
||||
if (local9.anIntArray49 == null) {
|
||||
|
|
@ -189,7 +189,7 @@ public final class Static36 {
|
|||
if (local9.anInt453 == 1400) {
|
||||
Static24.component = local9;
|
||||
if (local221) {
|
||||
if (Static187.pressedKeys[82] && Static191.staffModLevel > 0) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Static191.staffModLevel > 0) {
|
||||
local243 = (int) ((double) (Static7.clickX - local50 - local9.anInt445 / 2) * 2.0D / (double) Static83.aFloat3);
|
||||
local508 = (int) ((double) (Static60.clickY - local55 - local9.anInt459 / 2) * 2.0D / (double) Static83.aFloat3);
|
||||
local322 = Static13.anInt435 + local243;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ public final class Static53 {
|
|||
@OriginalMember(owner = "client!ec", name = "n", descriptor = "Z")
|
||||
public static boolean highDetailTextures = true;
|
||||
|
||||
@OriginalMember(owner = "client!ec", name = "q", descriptor = "I")
|
||||
public static int anInt1708 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!ec", name = "B", descriptor = "[[I")
|
||||
public static final int[][] anIntArrayArray8 = new int[][] { new int[0], { 128, 0, 128, 128, 0, 128 }, { 0, 0, 128, 0, 128, 128, 64, 128 }, { 0, 128, 0, 0, 128, 0, 64, 128 }, { 0, 0, 64, 128, 0, 128 }, { 128, 128, 64, 128, 128, 0 }, { 64, 0, 128, 0, 128, 128, 64, 128 }, { 128, 0, 128, 128, 0, 128, 0, 64, 64, 0 }, { 0, 0, 64, 0, 0, 64 }, { 0, 0, 128, 0, 128, 128, 64, 96, 32, 64 }, { 0, 128, 0, 0, 32, 64, 64, 96, 128, 128 }, { 0, 128, 0, 0, 32, 32, 96, 32, 128, 0, 128, 128 } };
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import org.openrs2.deob.annotation.OriginalArg;
|
|||
import org.openrs2.deob.annotation.OriginalMember;
|
||||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public final class Static59 {
|
||||
|
||||
@OriginalMember(owner = "client!ej", name = "X", descriptor = "I")
|
||||
|
|
@ -21,7 +23,7 @@ public final class Static59 {
|
|||
if (Static162.anInt3953 == 2) {
|
||||
if (Static155.anInt3751 == Static277.anInt5850 && Static60.anInt1892 == Static280.anInt5895) {
|
||||
Static162.anInt3953 = 0;
|
||||
if (Static172.shiftClick && Static187.pressedKeys[81] && Static231.anInt5204 > 2) {
|
||||
if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) {
|
||||
Static103.method2232(Static231.anInt5204 - 2);
|
||||
} else {
|
||||
Static103.method2232(Static231.anInt5204 - 1);
|
||||
|
|
@ -29,7 +31,7 @@ public final class Static59 {
|
|||
}
|
||||
} else if (Static155.anInt3751 == Static7.clickX && Static60.anInt1892 == Static60.clickY) {
|
||||
Static162.anInt3953 = 0;
|
||||
if (Static172.shiftClick && Static187.pressedKeys[81] && Static231.anInt5204 > 2) {
|
||||
if (Static172.shiftClick && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static231.anInt5204 > 2) {
|
||||
Static103.method2232(Static231.anInt5204 - 2);
|
||||
} else {
|
||||
Static103.method2232(Static231.anInt5204 - 1);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ public final class Static6 {
|
|||
|
||||
@OriginalMember(owner = "client!ag", name = "h", descriptor = "(I)V")
|
||||
public static void method82() {
|
||||
if (Static10.aClass149_1 != null) {
|
||||
@Pc(4) Keyboard local4 = Static10.aClass149_1;
|
||||
synchronized (Static10.aClass149_1) {
|
||||
Static10.aClass149_1 = null;
|
||||
if (Keyboard.instance != null) {
|
||||
@Pc(4) Keyboard local4 = Keyboard.instance;
|
||||
synchronized (Keyboard.instance) {
|
||||
Keyboard.instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,30 +71,4 @@ public final class Static65 {
|
|||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!fc", name = "b", descriptor = "(I)V")
|
||||
public static void handleKeyboard() {
|
||||
@Pc(12) Keyboard local12 = Static10.aClass149_1;
|
||||
synchronized (Static10.aClass149_1) {
|
||||
Static102.anInt2678 = Static228.anInt5105;
|
||||
Static229.anInt5140++;
|
||||
@Pc(23) int local23;
|
||||
if (Static114.anInt5844 < 0) {
|
||||
for (local23 = 0; local23 < 112; local23++) {
|
||||
Static187.pressedKeys[local23] = false;
|
||||
}
|
||||
Static114.anInt5844 = Static227.anInt5087;
|
||||
} else {
|
||||
while (Static114.anInt5844 != Static227.anInt5087) {
|
||||
local23 = Static17.anIntArray53[Static227.anInt5087];
|
||||
Static227.anInt5087 = Static227.anInt5087 + 1 & 0x7F;
|
||||
if (local23 >= 0) {
|
||||
Static187.pressedKeys[local23] = true;
|
||||
} else {
|
||||
Static187.pressedKeys[~local23] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Static228.anInt5105 = Static53.anInt1708;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public final class Static81 {
|
|||
public static Js5 aClass153_34;
|
||||
|
||||
@OriginalMember(owner = "client!gg", name = "bb", descriptor = "I")
|
||||
public static int anInt2223;
|
||||
public static int cameraX;
|
||||
|
||||
@OriginalMember(owner = "client!gg", name = "U", descriptor = "I")
|
||||
public static int modeWhat = 0;
|
||||
|
|
@ -236,7 +236,7 @@ public final class Static81 {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (Static187.pressedKeys[96] || Static187.pressedKeys[97] || Static187.pressedKeys[98] || Static187.pressedKeys[99]) {
|
||||
} 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) {
|
||||
|
|
@ -481,9 +481,9 @@ public final class Static81 {
|
|||
Static180.aClass13_22 = null;
|
||||
@Pc(1508) Component local1508 = Static43.aClass13_11;
|
||||
Static43.aClass13_11 = null;
|
||||
while (Static25.nextKey() && Static182.keyQueueSize < 128) {
|
||||
Static227.keyCodes[Static182.keyQueueSize] = Static102.keyCode;
|
||||
Static205.keyChars[Static182.keyQueueSize] = Static193.keyChar;
|
||||
while (Keyboard.nextKey() && Static182.keyQueueSize < 128) {
|
||||
Static227.keyCodes[Static182.keyQueueSize] = Keyboard.keyCode;
|
||||
Static205.keyChars[Static182.keyQueueSize] = Keyboard.keyChar;
|
||||
Static182.keyQueueSize++;
|
||||
}
|
||||
// WorldMap.component
|
||||
|
|
@ -513,7 +513,7 @@ public final class Static81 {
|
|||
if (Static105.aClass13_14 != null) {
|
||||
Static4.method28();
|
||||
}
|
||||
if (Static191.staffModLevel > 0 && Static187.pressedKeys[82] && Static187.pressedKeys[81] && Static58.wheelRotation != 0) {
|
||||
if (Static191.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT] && Static58.wheelRotation != 0) {
|
||||
y = Static55.level - Static58.wheelRotation;
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
|
|
@ -523,7 +523,7 @@ public final class Static81 {
|
|||
// Cheat
|
||||
Static61.teleport(Static173.self.movementQueueX[0] + Static225.originX, Static173.self.movementQueueZ[0] + Static142.originZ, y);
|
||||
}
|
||||
if (Static191.staffModLevel > 0 && Static187.pressedKeys[82] && Static187.pressedKeys[81]) {
|
||||
if (Static191.staffModLevel > 0 && Keyboard.pressedKeys[Keyboard.KEY_CTRL] && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) {
|
||||
if (Static56.anInt1742 != -1) {
|
||||
Static61.teleport(Static225.originX + Static56.anInt1742, Static142.originZ - -Static116.anInt2954, Static55.level);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -901,9 +901,9 @@ public final class Static87 {
|
|||
Static72.pitchTarget = 383;
|
||||
}
|
||||
Static57.yawTarget &= 0x7FF;
|
||||
@Pc(33) int local33 = Static81.anInt2223 >> 7;
|
||||
@Pc(37) int local37 = Static111.anInt2900 >> 7;
|
||||
@Pc(43) int local43 = Static207.method3685(Static55.level, Static81.anInt2223, Static111.anInt2900);
|
||||
@Pc(33) int local33 = Static81.cameraX >> 7;
|
||||
@Pc(37) int local37 = Static111.cameraZ >> 7;
|
||||
@Pc(43) int local43 = Static207.method3685(Static55.level, Static81.cameraX, Static111.cameraZ);
|
||||
@Pc(45) int local45 = 0;
|
||||
@Pc(64) int local64;
|
||||
if (local33 > 3 && local37 > 3 && local33 < 100 && local37 < 100) {
|
||||
|
|
|
|||
|
|
@ -2619,7 +2619,7 @@ public final class Static88 {
|
|||
}
|
||||
} else if (opcode < 5200) {
|
||||
if (opcode == 5100) {
|
||||
if (Static187.pressedKeys[86]) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_ALT]) {
|
||||
Static254.intStack[isp++] = 1;
|
||||
} else {
|
||||
Static254.intStack[isp++] = 0;
|
||||
|
|
@ -2627,7 +2627,7 @@ public final class Static88 {
|
|||
continue;
|
||||
}
|
||||
if (opcode == 5101) {
|
||||
if (Static187.pressedKeys[82]) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_CTRL]) {
|
||||
Static254.intStack[isp++] = 1;
|
||||
} else {
|
||||
Static254.intStack[isp++] = 0;
|
||||
|
|
@ -2635,7 +2635,7 @@ public final class Static88 {
|
|||
continue;
|
||||
}
|
||||
if (opcode == 5102) {
|
||||
if (Static187.pressedKeys[81]) {
|
||||
if (Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) {
|
||||
Static254.intStack[isp++] = 1;
|
||||
} else {
|
||||
Static254.intStack[isp++] = 0;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ public final class client extends GameShell {
|
|||
Static124.socket.close();
|
||||
Static124.socket = null;
|
||||
}
|
||||
Static31.method847(GameShell.canvas);
|
||||
Keyboard.stop(GameShell.canvas);
|
||||
Static223.method3866(GameShell.canvas);
|
||||
if (Static71.mouseWheel != null) {
|
||||
Static71.mouseWheel.method3291(GameShell.canvas);
|
||||
|
|
@ -420,9 +420,9 @@ public final class client extends GameShell {
|
|||
|
||||
@OriginalMember(owner = "client!client", name = "d", descriptor = "(B)V")
|
||||
private void method943() {
|
||||
for (Static182.keyQueueSize = 0; Static25.nextKey() && Static182.keyQueueSize < 128; Static182.keyQueueSize++) {
|
||||
Static227.keyCodes[Static182.keyQueueSize] = Static102.keyCode;
|
||||
Static205.keyChars[Static182.keyQueueSize] = Static193.keyChar;
|
||||
for (Static182.keyQueueSize = 0; Keyboard.nextKey() && Static182.keyQueueSize < 128; Static182.keyQueueSize++) {
|
||||
Static227.keyCodes[Static182.keyQueueSize] = Keyboard.keyCode;
|
||||
Static205.keyChars[Static182.keyQueueSize] = Keyboard.keyChar;
|
||||
}
|
||||
Static178.anInt4247++;
|
||||
if (Static154.topLevelInterface != -1) {
|
||||
|
|
@ -634,10 +634,10 @@ public final class client extends GameShell {
|
|||
if (!Static164.safeMode) {
|
||||
noSafeMode: while (true) {
|
||||
do {
|
||||
if (!Static25.nextKey()) {
|
||||
if (!Keyboard.nextKey()) {
|
||||
break noSafeMode;
|
||||
}
|
||||
} while (Static193.keyChar != 115 && Static193.keyChar != 83);
|
||||
} while (Keyboard.keyChar != 115 && Keyboard.keyChar != 83);
|
||||
Static164.safeMode = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -967,7 +967,7 @@ public final class client extends GameShell {
|
|||
}
|
||||
Static230.method3948();
|
||||
Static107.method2261();
|
||||
Static65.handleKeyboard();
|
||||
Keyboard.loop();
|
||||
Static111.handleMouse();
|
||||
if (GlRenderer.enabled) {
|
||||
Static63.process();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue