11package jagex2 .client ;
22
3- import deob .* ;
3+ import deob .ObfuscatedName ;
44import jagex2 .datastruct .Linkable ;
55import jagex2 .graphics .Pix32 ;
66import jagex2 .graphics .PixMap ;
77
88import java .applet .Applet ;
9- import java .awt .Color ;
10- import java .awt .Component ;
11- import java .awt .Font ;
12- import java .awt .FontMetrics ;
13- import java .awt .Graphics ;
14- import java .awt .event .FocusEvent ;
15- import java .awt .event .FocusListener ;
16- import java .awt .event .KeyEvent ;
17- import java .awt .event .KeyListener ;
18- import java .awt .event .MouseEvent ;
19- import java .awt .event .MouseListener ;
20- import java .awt .event .MouseMotionListener ;
21- import java .awt .event .WindowEvent ;
22- import java .awt .event .WindowListener ;
9+ import java .awt .*;
10+ import java .awt .event .*;
2311
2412@ ObfuscatedName ("a" )
2513public class GameShell extends Applet implements Runnable , MouseListener , MouseMotionListener , KeyListener , FocusListener , WindowListener {
@@ -137,14 +125,14 @@ public class GameShell extends Applet implements Runnable, MouseListener, MouseM
137125
138126 @ ObfuscatedName ("a.a(IIB)V" )
139127 public final void method1 (int arg0 , int arg1 , byte arg2 ) {
140- if (arg2 != 7 ) {
141- return ;
142- }
128+ this .setPreferredSize (new Dimension (arg0 , arg1 ));
129+
143130 this .field13 = arg0 ;
144131 this .field14 = arg1 ;
145132 this .field18 = new ViewBox (false , this .field14 , this , this .field13 );
146133 this .field15 = this .method11 (0 ).getGraphics ();
147134 this .field16 = new PixMap (true , this .method11 (0 ), this .field13 , this .field14 );
135+
148136 this .method12 (this , 1 );
149137 }
150138
@@ -334,31 +322,51 @@ public final void paint(Graphics arg0) {
334322 public final void mousePressed (MouseEvent arg0 ) {
335323 int var2 = arg0 .getX ();
336324 int var3 = arg0 .getY ();
337- if (this .field18 != null ) {
338- var2 -= 4 ;
339- var3 -= 22 ;
340- }
325+
341326 this .field21 = 0 ;
342327 this .field26 = var2 ;
343328 this .field27 = var3 ;
344329 this .field28 = System .currentTimeMillis ();
345- if (arg0 .isMetaDown ()) {
346- this .field25 = 2 ;
347- this .field22 = 2 ;
348- } else {
349- this .field25 = 1 ;
350- this .field22 = 1 ;
351- }
352- if (InputTracking .field151 ) {
353- InputTracking .method49 (var2 , (byte ) 9 , var3 , arg0 .isMetaDown () ? 1 : 0 );
330+
331+ try {
332+ if (arg0 .getButton () == MouseEvent .BUTTON3 ) {
333+ this .field25 = 2 ;
334+ this .field22 = 2 ;
335+ } else {
336+ this .field25 = 1 ;
337+ this .field22 = 1 ;
338+ }
339+
340+ if (InputTracking .field151 ) {
341+ InputTracking .method49 (var2 , (byte ) 9 , var3 , arg0 .getButton () == MouseEvent .BUTTON3 ? 1 : 0 );
342+ }
343+ } catch (NoSuchMethodError ex ) {
344+ if (arg0 .isMetaDown ()) {
345+ this .field25 = 2 ;
346+ this .field22 = 2 ;
347+ } else {
348+ this .field25 = 1 ;
349+ this .field22 = 1 ;
350+ }
351+
352+ if (InputTracking .field151 ) {
353+ InputTracking .method49 (var2 , (byte ) 9 , var3 , arg0 .isMetaDown () ? 1 : 0 );
354+ }
354355 }
355356 }
356357
357358 public final void mouseReleased (MouseEvent arg0 ) {
358359 this .field21 = 0 ;
359360 this .field22 = 0 ;
360- if (InputTracking .field151 ) {
361- InputTracking .method50 (arg0 .isMetaDown () ? 1 : 0 , (byte ) 2 );
361+
362+ try {
363+ if (InputTracking .field151 ) {
364+ InputTracking .method50 (arg0 .getButton () == MouseEvent .BUTTON3 ? 1 : 0 , (byte ) 2 );
365+ }
366+ } catch (NoSuchMethodError ex ) {
367+ if (InputTracking .field151 ) {
368+ InputTracking .method50 (arg0 .isMetaDown () ? 1 : 0 , (byte ) 2 );
369+ }
362370 }
363371 }
364372
@@ -383,10 +391,6 @@ public final void mouseExited(MouseEvent arg0) {
383391 public final void mouseDragged (MouseEvent arg0 ) {
384392 int var2 = arg0 .getX ();
385393 int var3 = arg0 .getY ();
386- if (this .field18 != null ) {
387- var2 -= 4 ;
388- var3 -= 22 ;
389- }
390394 this .field21 = 0 ;
391395 this .field23 = var2 ;
392396 this .field24 = var3 ;
@@ -398,10 +402,6 @@ public final void mouseDragged(MouseEvent arg0) {
398402 public final void mouseMoved (MouseEvent arg0 ) {
399403 int var2 = arg0 .getX ();
400404 int var3 = arg0 .getY ();
401- if (this .field18 != null ) {
402- var2 -= 4 ;
403- var3 -= 22 ;
404- }
405405 this .field21 = 0 ;
406406 this .field23 = var2 ;
407407 this .field24 = var3 ;
@@ -601,10 +601,7 @@ public void method10(int arg0) {
601601
602602 @ ObfuscatedName ("a.c(I)Ljava/awt/Component;" )
603603 public Component method11 (int arg0 ) {
604- if (arg0 != 0 ) {
605- this .field1 = 353 ;
606- }
607- return this .field18 == null ? this : this .field18 ;
604+ return this ;
608605 }
609606
610607 @ ObfuscatedName ("a.a(Ljava/lang/Runnable;I)V" )
0 commit comments