home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 64 / CDPRO64.iso / JUEGOS / java / pang / pang.jar / q.class (.txt) < prev    next >
Encoding:
Java Class File  |  2003-02-16  |  3.6 KB  |  219 lines

  1. import javax.microedition.lcdui.Canvas;
  2. import javax.microedition.lcdui.Graphics;
  3. import javax.microedition.lcdui.Image;
  4.  
  5. // $FF: renamed from: q
  6. public class class_0 extends Canvas implements Runnable, g {
  7.    // $FF: renamed from: n java.lang.Thread
  8.    private volatile Thread field_0;
  9.    // $FF: renamed from: d Main
  10.    private Main field_1;
  11.    // $FF: renamed from: o n
  12.    private n field_2;
  13.    // $FF: renamed from: i javax.microedition.lcdui.Image
  14.    private Image field_3;
  15.    // $FF: renamed from: h javax.microedition.lcdui.Image
  16.    private Image field_4;
  17.    // $FF: renamed from: g javax.microedition.lcdui.Image
  18.    private Image field_5;
  19.    // $FF: renamed from: l boolean
  20.    private boolean field_6;
  21.    // $FF: renamed from: c boolean
  22.    private boolean field_7;
  23.    // $FF: renamed from: b boolean
  24.    private boolean field_8;
  25.    // $FF: renamed from: a boolean
  26.    private boolean field_9;
  27.    // $FF: renamed from: k boolean
  28.    private boolean field_10;
  29.    // $FF: renamed from: m boolean
  30.    private boolean field_11;
  31.    // $FF: renamed from: f int
  32.    private int field_12;
  33.    // $FF: renamed from: e java.lang.StringBuffer
  34.    private StringBuffer field_13;
  35.    // $FF: renamed from: j int
  36.    private int field_14;
  37.  
  38.    public class_0(Main var1) {
  39.       this.field_1 = var1;
  40.       this.field_3 = var1.b(31);
  41.       this.field_4 = var1.b(32);
  42.       this.field_5 = var1.b(33);
  43.       this.field_2 = new n();
  44.       this.field_6 = true;
  45.    }
  46.  
  47.    public class_0(Main var1, boolean var2, int var3, int var4) {
  48.       this(var1);
  49.       this.field_12 = this.field_2.a(var3, var4);
  50.       this.field_6 = var2;
  51.       if (!this.field_6) {
  52.          if (this.field_12 == -1) {
  53.             this.field_6 = true;
  54.          } else {
  55.             this.field_13 = new StringBuffer("AAAAA");
  56.             this.field_2.b[this.field_12] = this.field_13.toString();
  57.             this.field_14 = 0;
  58.          }
  59.       }
  60.  
  61.    }
  62.  
  63.    // $FF: renamed from: a () void
  64.    public synchronized void method_0() {
  65.       if (!this.field_6) {
  66.          this.field_0 = new Thread(this);
  67.          this.field_0.start();
  68.       }
  69.  
  70.    }
  71.  
  72.    // $FF: renamed from: c () void
  73.    public synchronized void method_1() {
  74.       this.field_0 = null;
  75.    }
  76.  
  77.    protected void keyRepeated(int var1) {
  78.       this.keyPressed(var1);
  79.    }
  80.  
  81.    protected void keyPressed(int var1) {
  82.       if (!this.field_6) {
  83.          switch (((Canvas)this).getGameAction(var1)) {
  84.             case 1:
  85.                this.field_7 = true;
  86.                return;
  87.             case 2:
  88.                this.field_9 = true;
  89.                return;
  90.             case 3:
  91.             case 4:
  92.             case 7:
  93.             default:
  94.                return;
  95.             case 5:
  96.                this.field_10 = true;
  97.                return;
  98.             case 6:
  99.                this.field_8 = true;
  100.                return;
  101.             case 8:
  102.                this.field_11 = true;
  103.          }
  104.       }
  105.    }
  106.  
  107.    protected void keyReleased(int var1) {
  108.       if (this.field_6) {
  109.          if (((Canvas)this).getGameAction(var1) == 8) {
  110.             this.method_1();
  111.             this.field_1.a(new c(this.field_1));
  112.          }
  113.  
  114.       } else {
  115.          switch (((Canvas)this).getGameAction(var1)) {
  116.             case 1:
  117.                this.field_7 = false;
  118.                return;
  119.             case 2:
  120.                this.field_9 = false;
  121.                return;
  122.             case 3:
  123.             case 4:
  124.             case 7:
  125.             default:
  126.                return;
  127.             case 5:
  128.                this.field_10 = false;
  129.                return;
  130.             case 6:
  131.                this.field_8 = false;
  132.                return;
  133.             case 8:
  134.                this.field_11 = false;
  135.          }
  136.       }
  137.    }
  138.  
  139.    public void run() {
  140.       Thread var1 = Thread.currentThread();
  141.  
  142.       try {
  143.          while(this.field_0 == var1) {
  144.             if (this.field_7) {
  145.                char var2 = this.field_13.charAt(this.field_14);
  146.                if (var2 < 'Z') {
  147.                   ++var2;
  148.                }
  149.  
  150.                this.field_13.setCharAt(this.field_14, var2);
  151.                ((Canvas)this).repaint();
  152.             } else if (this.field_8) {
  153.                char var6 = this.field_13.charAt(this.field_14);
  154.                if (var6 > 'A') {
  155.                   --var6;
  156.                }
  157.  
  158.                this.field_13.setCharAt(this.field_14, var6);
  159.                ((Canvas)this).repaint();
  160.             } else if (this.field_9) {
  161.                if (this.field_14 > 0) {
  162.                   --this.field_14;
  163.                }
  164.  
  165.                ((Canvas)this).repaint();
  166.             } else if (this.field_10) {
  167.                if (this.field_14 < this.field_13.length() - 1) {
  168.                   ++this.field_14;
  169.                }
  170.  
  171.                ((Canvas)this).repaint();
  172.             } else if (this.field_11) {
  173.                this.field_2.b[this.field_12] = this.field_13.toString();
  174.                this.field_2.c();
  175.                this.field_6 = true;
  176.                ((Canvas)this).repaint();
  177.                this.field_11 = false;
  178.                return;
  179.             }
  180.  
  181.             synchronized(this) {
  182.                this.wait(150L);
  183.             }
  184.          }
  185.  
  186.       } catch (Exception var5) {
  187.       }
  188.    }
  189.  
  190.    public void paint(Graphics var1) {
  191.       var1.setColor(0, 0, 0);
  192.       var1.fillRect(0, 0, ((Canvas)this).getWidth(), ((Canvas)this).getHeight());
  193.       byte var2 = 8;
  194.       int var3 = (((Canvas)this).getWidth() - 104) / 2;
  195.       int var4 = (((Canvas)this).getHeight() - this.field_2.c.length * 8) / 2;
  196.  
  197.       for(int var5 = 0; var5 < this.field_2.c.length; ++var5) {
  198.          int var7 = !this.field_6 && this.field_12 == var5 ? 1 : 0;
  199.          f.a(this.field_3, this.field_4, this.field_5, this, var1, Integer.toString(var5 + 1), var3, var4, var7, 0);
  200.          int var6 = var3 + 16;
  201.          f.a(this.field_3, this.field_4, this.field_5, this, var1, Integer.toString(this.field_2.c[var5]), var6, var4, var7, 0);
  202.          var6 += 48;
  203.          if (!this.field_6 && this.field_12 == var5) {
  204.             for(int var8 = 0; var8 < this.field_13.length(); ++var8) {
  205.                var7 = this.field_14 == var8 ? 1 : 0;
  206.                char var9 = this.field_13.charAt(var8);
  207.                f.a(this.field_3, this.field_4, this.field_5, this, var1, String.valueOf(var9), var6, var4, var7, 0);
  208.                var6 += 8;
  209.             }
  210.          } else {
  211.             f.a(this.field_3, this.field_4, this.field_5, this, var1, this.field_2.b[var5], var6, var4, 0, 0);
  212.          }
  213.  
  214.          var4 += var2;
  215.       }
  216.  
  217.    }
  218. }
  219.