@@ -30,19 +30,19 @@ public class GameShell extends Applet implements Runnable, MouseListener, MouseM
3030 public boolean debug = false ;
3131
3232 @ ObfuscatedName ("a.m" )
33- public int field13 ;
33+ public int canvasWidth ;
3434
3535 @ ObfuscatedName ("a.n" )
36- public int field14 ;
36+ public int canvasHeight ;
3737
3838 @ ObfuscatedName ("a.o" )
3939 public Graphics graphics ;
4040
4141 @ ObfuscatedName ("a.p" )
42- public PixMap field16 ;
42+ public PixMap drawArea ;
4343
4444 @ ObfuscatedName ("a.q" )
45- public Pix32 [] field17 = new Pix32 [6 ];
45+ public Pix32 [] temp = new Pix32 [6 ];
4646
4747 @ ObfuscatedName ("a.r" )
4848 public ViewBox frame ;
@@ -95,34 +95,31 @@ public class GameShell extends Applet implements Runnable, MouseListener, MouseM
9595 @ ObfuscatedName ("a.J" )
9696 public int keyQueueWritePos ;
9797
98- @ ObfuscatedName ("a.K" )
99- public static int field37 ;
100-
10198 @ ObfuscatedName ("a.B" )
10299 public long nextMouseClickTime ;
103100
104101 @ ObfuscatedName ("a.F" )
105102 public long mouseClickTime ;
106103
107104 @ ObfuscatedName ("a.a(IIB)V" )
108- public final void initApplication (int arg0 , int arg1 ) {
105+ public void initApplication (int arg0 , int arg1 ) {
109106 this .setPreferredSize (new Dimension (arg0 , arg1 ));
110107
111- this .field13 = arg0 ;
112- this .field14 = arg1 ;
113- this .frame = new ViewBox (false , this .field14 , this , this .field13 );
108+ this .canvasWidth = arg0 ;
109+ this .canvasHeight = arg1 ;
110+ this .frame = new ViewBox (false , this .canvasHeight , this , this .canvasWidth );
114111 this .graphics = this .getBaseComponent ().getGraphics ();
115- this .field16 = new PixMap (this .getBaseComponent (), this .field13 , this .field14 );
112+ this .drawArea = new PixMap (this .getBaseComponent (), this .canvasWidth , this .canvasHeight );
116113
117114 this .startThread (this , 1 );
118115 }
119116
120117 @ ObfuscatedName ("a.a(III)V" )
121- public final void initApplet (int arg1 , int arg2 ) {
122- this .field13 = arg2 ;
123- this .field14 = arg1 ;
118+ public void initApplet (int arg1 , int arg2 ) {
119+ this .canvasWidth = arg2 ;
120+ this .canvasHeight = arg1 ;
124121 this .graphics = this .getBaseComponent ().getGraphics ();
125- this .field16 = new PixMap (this .getBaseComponent (), this .field13 , this .field14 );
122+ this .drawArea = new PixMap (this .getBaseComponent (), this .canvasWidth , this .canvasHeight );
126123 this .startThread (this , 1 );
127124 }
128125
@@ -229,7 +226,7 @@ public void run() {
229226 }
230227
231228 @ ObfuscatedName ("a.a(Z)V" )
232- public final void shutdown (boolean arg0 ) {
229+ public void shutdown (boolean arg0 ) {
233230 this .state = -2 ;
234231 this .unload ();
235232 if (this .frame != null ) {
@@ -245,25 +242,23 @@ public final void shutdown(boolean arg0) {
245242 }
246243
247244 @ ObfuscatedName ("a.a(II)V" )
248- public final void setFramerate (int arg0 , int arg1 ) {
249- if (arg0 == 0 ) {
250- this .deltime = 1000 / arg1 ;
251- }
245+ public void setFramerate (int arg1 ) {
246+ this .deltime = 1000 / arg1 ;
252247 }
253248
254- public final void start () {
249+ public void start () {
255250 if (this .state >= 0 ) {
256251 this .state = 0 ;
257252 }
258253 }
259254
260- public final void stop () {
255+ public void stop () {
261256 if (this .state >= 0 ) {
262257 this .state = 4000 / this .deltime ;
263258 }
264259 }
265260
266- public final void destroy () {
261+ public void destroy () {
267262 this .state = -1 ;
268263 try {
269264 Thread .sleep (5000L );
@@ -274,23 +269,23 @@ public final void destroy() {
274269 }
275270 }
276271
277- public final void update (Graphics arg0 ) {
272+ public void update (Graphics arg0 ) {
278273 if (this .graphics == null ) {
279274 this .graphics = arg0 ;
280275 }
281276 this .redrawScreen = true ;
282277 this .refresh ();
283278 }
284279
285- public final void paint (Graphics arg0 ) {
280+ public void paint (Graphics arg0 ) {
286281 if (this .graphics == null ) {
287282 this .graphics = arg0 ;
288283 }
289284 this .redrawScreen = true ;
290285 this .refresh ();
291286 }
292287
293- public final void mousePressed (MouseEvent arg0 ) {
288+ public void mousePressed (MouseEvent arg0 ) {
294289 int var2 = arg0 .getX ();
295290 int var3 = arg0 .getY ();
296291
@@ -326,7 +321,7 @@ public final void mousePressed(MouseEvent arg0) {
326321 }
327322 }
328323
329- public final void mouseReleased (MouseEvent arg0 ) {
324+ public void mouseReleased (MouseEvent arg0 ) {
330325 this .idleCycles = 0 ;
331326 this .mouseButton = 0 ;
332327
@@ -341,16 +336,16 @@ public final void mouseReleased(MouseEvent arg0) {
341336 }
342337 }
343338
344- public final void mouseClicked (MouseEvent arg0 ) {
339+ public void mouseClicked (MouseEvent arg0 ) {
345340 }
346341
347- public final void mouseEntered (MouseEvent arg0 ) {
342+ public void mouseEntered (MouseEvent arg0 ) {
348343 if (InputTracking .active ) {
349344 InputTracking .mouseEntered ();
350345 }
351346 }
352347
353- public final void mouseExited (MouseEvent arg0 ) {
348+ public void mouseExited (MouseEvent arg0 ) {
354349 this .idleCycles = 0 ;
355350 this .mouseX = -1 ;
356351 this .mouseY = -1 ;
@@ -359,7 +354,7 @@ public final void mouseExited(MouseEvent arg0) {
359354 }
360355 }
361356
362- public final void mouseDragged (MouseEvent arg0 ) {
357+ public void mouseDragged (MouseEvent arg0 ) {
363358 int var2 = arg0 .getX ();
364359 int var3 = arg0 .getY ();
365360 this .idleCycles = 0 ;
@@ -370,7 +365,7 @@ public final void mouseDragged(MouseEvent arg0) {
370365 }
371366 }
372367
373- public final void mouseMoved (MouseEvent arg0 ) {
368+ public void mouseMoved (MouseEvent arg0 ) {
374369 int var2 = arg0 .getX ();
375370 int var3 = arg0 .getY ();
376371 this .idleCycles = 0 ;
@@ -381,7 +376,7 @@ public final void mouseMoved(MouseEvent arg0) {
381376 }
382377 }
383378
384- public final void keyPressed (KeyEvent arg0 ) {
379+ public void keyPressed (KeyEvent arg0 ) {
385380 this .idleCycles = 0 ;
386381 int var2 = arg0 .getKeyCode ();
387382 int var3 = arg0 .getKeyChar ();
@@ -442,7 +437,7 @@ public final void keyPressed(KeyEvent arg0) {
442437 }
443438 }
444439
445- public final void keyReleased (KeyEvent arg0 ) {
440+ public void keyReleased (KeyEvent arg0 ) {
446441 this .idleCycles = 0 ;
447442 int var2 = arg0 .getKeyCode ();
448443 char var3 = arg0 .getKeyChar ();
@@ -484,11 +479,11 @@ public final void keyReleased(KeyEvent arg0) {
484479 }
485480 }
486481
487- public final void keyTyped (KeyEvent arg0 ) {
482+ public void keyTyped (KeyEvent arg0 ) {
488483 }
489484
490485 @ ObfuscatedName ("a.a(B)I" )
491- public final int pollKey () {
486+ public int pollKey () {
492487 int var2 = -1 ;
493488 if (this .keyQueueWritePos != this .keyQueueReadPos ) {
494489 var2 = this .keyQueue [this .keyQueueReadPos ];
@@ -497,7 +492,7 @@ public final int pollKey() {
497492 return var2 ;
498493 }
499494
500- public final void focusGained (FocusEvent arg0 ) {
495+ public void focusGained (FocusEvent arg0 ) {
501496 this .hasFocus = true ;
502497 this .redrawScreen = true ;
503498 this .refresh ();
@@ -506,33 +501,33 @@ public final void focusGained(FocusEvent arg0) {
506501 }
507502 }
508503
509- public final void focusLost (FocusEvent arg0 ) {
504+ public void focusLost (FocusEvent arg0 ) {
510505 this .hasFocus = false ;
511506 if (InputTracking .active ) {
512507 InputTracking .focusLost ();
513508 }
514509 }
515510
516- public final void windowActivated (WindowEvent arg0 ) {
511+ public void windowActivated (WindowEvent arg0 ) {
517512 }
518513
519- public final void windowClosed (WindowEvent arg0 ) {
514+ public void windowClosed (WindowEvent arg0 ) {
520515 }
521516
522- public final void windowClosing (WindowEvent arg0 ) {
517+ public void windowClosing (WindowEvent arg0 ) {
523518 this .destroy ();
524519 }
525520
526- public final void windowDeactivated (WindowEvent arg0 ) {
521+ public void windowDeactivated (WindowEvent arg0 ) {
527522 }
528523
529- public final void windowDeiconified (WindowEvent arg0 ) {
524+ public void windowDeiconified (WindowEvent arg0 ) {
530525 }
531526
532- public final void windowIconified (WindowEvent arg0 ) {
527+ public void windowIconified (WindowEvent arg0 ) {
533528 }
534529
535- public final void windowOpened (WindowEvent arg0 ) {
530+ public void windowOpened (WindowEvent arg0 ) {
536531 }
537532
538533 @ ObfuscatedName ("a.a()V" )
@@ -586,18 +581,18 @@ public void drawProgress(String arg1, int arg2) {
586581 FontMetrics plainMetrics = this .getBaseComponent ().getFontMetrics (var6 );
587582 if (this .redrawScreen ) {
588583 this .graphics .setColor (Color .black );
589- this .graphics .fillRect (0 , 0 , this .field13 , this .field14 );
584+ this .graphics .fillRect (0 , 0 , this .canvasWidth , this .canvasHeight );
590585 this .redrawScreen = false ;
591586 }
592587 Color var7 = new Color (140 , 17 , 17 );
593- int var8 = this .field14 / 2 - 18 ;
588+ int var8 = this .canvasHeight / 2 - 18 ;
594589 this .graphics .setColor (var7 );
595- this .graphics .drawRect (this .field13 / 2 - 152 , var8 , 304 , 34 );
596- this .graphics .fillRect (this .field13 / 2 - 150 , var8 + 2 , arg2 * 3 , 30 );
590+ this .graphics .drawRect (this .canvasWidth / 2 - 152 , var8 , 304 , 34 );
591+ this .graphics .fillRect (this .canvasWidth / 2 - 150 , var8 + 2 , arg2 * 3 , 30 );
597592 this .graphics .setColor (Color .black );
598- this .graphics .fillRect (this .field13 / 2 - 150 + arg2 * 3 , var8 + 2 , 300 - arg2 * 3 , 30 );
593+ this .graphics .fillRect (this .canvasWidth / 2 - 150 + arg2 * 3 , var8 + 2 , 300 - arg2 * 3 , 30 );
599594 this .graphics .setFont (var4 );
600595 this .graphics .setColor (Color .white );
601- this .graphics .drawString (arg1 , (this .field13 - var5 .stringWidth (arg1 )) / 2 , var8 + 22 );
596+ this .graphics .drawString (arg1 , (this .canvasWidth - var5 .stringWidth (arg1 )) / 2 , var8 + 22 );
602597 }
603598}
0 commit comments