1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
/* */ package NET.worlds.scape;
/* */
/* */ import NET.worlds.core.Std;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class EventQueue
/* */ {
/* */ private static final int keyDown = 1;
/* */ private static final int keyUp = 2;
/* */ private static final int keyChar = 3;
/* */ private static final int mouseDown = 4;
/* */ private static final int mouseUp = 5;
/* */ private static final int mouseMove = 6;
/* */ private static final int mouseDelta = 7;
/* */ private static final int mouseEnter = 8;
/* */ private static final int mouseExit = 9;
/* */ private static final int teleport = 10;
/* */ private char key;
/* */ private int type;
/* */ private int time;
/* */ private int x;
/* */ private int y;
/* */
/* */ public static void pollForEvents(Camera eventEater)
/* */ {
/* 58 */ if (eventEater != null)
/* */ {
/* */
/* */
/* */
/* 63 */ int eventCount = getEventCount();
/* */ Event e;
/* 65 */ while ((eventCount-- > 0) && ((e = dequeueInfo.dequeue()) != null)) { Event e;
/* 66 */ if (e.target == null)
/* 67 */ e.target = eventEater;
/* 68 */ eventEater.deliver(e);
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */ public static boolean redirectDrivingKeys(java.awt.Event e)
/* */ {
/* */ boolean press;
/* */
/* */
/* */
/* 82 */ if (((press = e.id == 403 ? 1 : 0) != 0) || (e.id == 404)) { char newKey;
/* */ char newKey;
/* 84 */ char newKey; char newKey; char newKey; char newKey; char newKey; char newKey; char newKey; switch (e.key) {
/* */ case 1004:
/* 86 */ newKey = 58150;
/* 87 */ break;
/* */ case 1005:
/* 89 */ newKey = 58152;
/* 90 */ break;
/* */ case 1006:
/* 92 */ newKey = 58149;
/* 93 */ break;
/* */ case 1007:
/* 95 */ newKey = 58151;
/* 96 */ break;
/* */ case 1002:
/* 98 */ newKey = 58145;
/* 99 */ break;
/* */ case 1003:
/* 101 */ newKey = 58146;
/* 102 */ break;
/* */ case 1000:
/* 104 */ newKey = 58148;
/* 105 */ break;
/* */ case 1001:
/* 107 */ newKey = 58147;
/* 108 */ break;
/* */ case 27:
/* 110 */ newKey = 58139;
/* 111 */ break;
/* */ default:
/* 113 */ return false; }
/* */ char newKey;
/* 115 */ addEvent(newKey, press ? 1 : 2,
/* 116 */ Std.getTimeZero() + Std.getRealTime(),
/* 117 */ e.x, e.y);
/* 118 */ return true;
/* */ }
/* 120 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 151 */ private static EventQueue dequeueInfo = new EventQueue();
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private Event dequeue()
/* */ {
/* 170 */ if (getNextEvent())
/* */ {
/* */
/* */
/* 174 */ this.time -= Std.getTimeZero();
/* */
/* 176 */ switch (this.type) {
/* */ case 1:
/* 178 */ return new KeyDownEvent(this.time, null, this.key);
/* */ case 2:
/* 180 */ return new KeyUpEvent(this.time, null, this.key);
/* */ case 3:
/* 182 */ return new KeyCharEvent(this.time, null, this.key);
/* */ case 4:
/* 184 */ return new MouseDownEvent(this.time, null, this.key, this.x, this.y);
/* */ case 5:
/* 186 */ return new MouseUpEvent(this.time, null, this.key, this.x, this.y);
/* */ case 6:
/* 188 */ return new MouseMoveEvent(this.time, null, this.x, this.y);
/* */ case 7:
/* 190 */ return new MouseDeltaEvent(this.time, null, this.x, this.y);
/* */ case 8:
/* 192 */ return new MouseEnterEvent(this.time, null, this.x, this.y);
/* */ case 9:
/* 194 */ return new MouseExitEvent(this.time, null, this.x, this.y);
/* */ }
/* 196 */ throw new Error("Illegal internal event type");
/* */ }
/* */
/* 199 */ return null;
/* */ }
/* */
/* */ static
/* */ {
/* 204 */ nativeInit();
/* */ }
/* */
/* */ public static native void nativeInit();
/* */
/* */ private native boolean getNextEvent();
/* */
/* */ private static native int getEventCount();
/* */
/* */ private static native void addEvent(char paramChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4);
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EventQueue.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|