⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yosamabin_n60.java

📁 拉登采矿
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    this.m1visible = (this.m2visible = this.hit = this.up = this.down = this.left = this.right = this.explosion = 0);
    this.yosamax = 65;
    this.yosamay = 150;
    this.sanim = -6;
    this.janim = (this.danim = this.wanim = 0);
    this.stone1x = (this.stone2x = this.stone3x = this.parax = 0);
    this.stone1y = (this.stone2y = this.stone3y = this.paray = h);
    this.pieces = 0;
    this.gcounter = (this.wait1 = this.wait2 = 0);
    this.man1x = (w + 1);
    this.man2x = (w + 1);
    this.man1y = 185;
    this.man2y = 148;
    this.bullet1x = -50;
    this.bullet2x = -50;
    this.bullet1y = 193;
    this.bullet2y = 153;
    this.gap = 0;
    this.jumpx = (this.duckx = this.yosamax);
    this.jumpy = (this.ducky = this.yosamay);
    this.dir = 1;
    this.hitcount = 0;
    this.levelchanged = false;
    this.maround = false;
    this.fireanim = 0;
    this.side = 1;
    this.pboundry = 6;
    this.pdir = (this.dside = 1);
    this.pointx = (this.pointy = this.points = this.pcount = this.dropsanim = 0);
  }

  void restartGame(String paramString)
  {
    try
    {
      this.str[0] = paramString.substring(0, paramString.indexOf(64));
      this.scr[0] = Integer.parseInt(paramString.substring(paramString.indexOf(64) + 1, paramString.indexOf(47)));
      this.str[1] = paramString.substring(paramString.indexOf(47) + 1, paramString.indexOf(42));
      this.scr[1] = Integer.parseInt(paramString.substring(paramString.indexOf(42) + 1, paramString.indexOf(126)));
      this.str[2] = paramString.substring(paramString.indexOf(126) + 1, paramString.indexOf(94));
      this.scr[2] = Integer.parseInt(paramString.substring(paramString.indexOf(94) + 1, paramString.indexOf(40)));
      this.str[3] = paramString.substring(paramString.indexOf(40) + 1, paramString.indexOf(41));
      this.scr[3] = Integer.parseInt(paramString.substring(paramString.indexOf(41) + 1, paramString.indexOf(33)));
      this.str[4] = paramString.substring(paramString.indexOf(33) + 1, paramString.indexOf(35));
      this.scr[4] = Integer.parseInt(paramString.substring(paramString.indexOf(35) + 1, paramString.indexOf(37)));
      this.str[5] = paramString.substring(paramString.indexOf(37) + 1, paramString.indexOf(38));
      this.scr[5] = Integer.parseInt(paramString.substring(paramString.indexOf(38) + 1, paramString.length()));
    }
    catch (Exception localException)
    {
      System.out.println("Here is an exception in reading Game settings" + localException);
    }
  }

  public void startApp()
  {
    this.store = SaveGame.getGameData();
    restartGame(this.store);
    this.ianim = 0;
    level = 1;
    this.lives = 5;
    this.won = false;
    this.textscr = 30;
    this.weight = 0;
    this.motion = 4;
    this.stand = new Image[8];
    this.standbr = new Image[10];
    this.jump = new Image[6];
    this.walk = new Image[6];
    this.stone = new Image[4];
    this.sol = new Image[6];
    this.bend = new Image[9];
    this.exp = new Image[5];
    this.drops = new Image[7];
    this.rd = new Random();
    try
    {
      this.imintro = Image.createImage("/intro.jpg");
      this.immenu = Image.createImage("/menu.gif");
      this.arrowl = Image.createImage("/arrowl.png");
      this.arrowr = Image.createImage("/arrowr.png");
      this.arrowd = Image.createImage("/arrowd.png");
      this.arrowu = Image.createImage("/arrowu.png");
      this.bg = Image.createImage("/bg.jpg");
      this.intro1 = Image.createImage("/intro1.gif");
      this.intro2 = Image.createImage("/intro2.gif");
      this.introhand1 = Image.createImage("/introhand1.gif");
      this.introhand2 = Image.createImage("/introhand2.gif");
      this.introhand3 = Image.createImage("/introhand3.gif");
      this.imhit = Image.createImage("/hit.gif");
      this.para = Image.createImage("/para.gif");
      this.over = Image.createImage("/Gameover.gif");
      this.imscore = Image.createImage("/score.gif");
      this.loading = Image.createImage("/loading.gif");
    }
    catch (Exception localException1)
    {
    }
    i = 1;
    while (i <= 9)
    {
      try
      {
        this.standbr[i] = Image.createImage("/standbr" + i + ".gif");
        if (i <= 7)
          this.stand[i] = Image.createImage("/stand" + i + ".gif");
        if (i <= 5)
        {
          this.jump[i] = Image.createImage("/jump" + i + ".gif");
          this.walk[i] = Image.createImage("/walk" + i + ".gif");
          this.sol[i] = Image.createImage("/sol" + i + ".gif");
        }
        if (i <= 3)
          this.stone[i] = Image.createImage("/stone" + i + ".gif");
        if ((i >= 2) && (i < 9))
          this.bend[i] = Image.createImage("/bend" + i + ".gif");
        if (i <= 4)
          this.exp[i] = Image.createImage("/exp" + i + ".gif");
        if (i <= 6)
          this.drops[i] = Image.createImage("/drops" + i + ".gif");
      }
      catch (Exception localException2)
      {
      }
      i += 1;
    }
    levelch();
    YosamaBin_N60.FieldMover localFieldMover = new YosamaBin_N60.FieldMover(this);
    Timer localTimer = new Timer();
    localTimer.schedule(localFieldMover, 0L, 80L);
    this.display.setCurrent(this.intro);
  }

  public void pauseApp()
  {
  }

  public void destroyApp(boolean paramBoolean)
  {
  }

  static Player[] access$000()
  {
    return snd;
  }

  class FieldMover extends TimerTask
  {
    private final YosamaBin_N60 this$0;

    FieldMover()
    {
      this.this$0 = paramYosamaBin_N60;
    }

    public void run()
    {
      if (YosamaBin_N60.a == 20)
        this.this$0.obj.scroll();
      else if (YosamaBin_N60.a == 11)
        this.this$0.subPts.scroll();
      else if (YosamaBin_N60.a == 12)
        this.this$0.shwScr.scroll();
      else
        this.this$0.intro.scroll1();
    }
  }

  class ShowScore extends Form
  implements CommandListener
  {
    private String[][] score;
    private String str;
    private Command cmBack;
    private Alert altErr;
    int cnt;
    HttpConnection c;
    public static final int TOP = 10;
    public static final int ROW = 10;
    public static final int COL = 2;
    private final YosamaBin_N60 this$0;

    ShowScore()
    {
      super("Hall of fame");
      this.this$0 = paramYosamaBin_N60;
      this.cmBack = new Command("Back", 2, 1);
      this.altErr = new Alert("Connection Error");
      this.altErr.setString("Couldn't retrieve data from the server.");
      this.altErr.setType(AlertType.ERROR);
      this.altErr.setTimeout(1000);
      setCommandListener(this);
    }

    public void scroll()
    {
      if (this.cnt == 1)
      {
        super.append("Please wait while retrieving online scores...");
        getScore();
      }
      if (this.cnt > 0)
        this.cnt += 1;
    }

    // ERROR //
    public void getScore()
    {
      // Byte code:
      //   0: aload_0
      //   1: aconst_null
      //   2: putfield 22	YosamaBin_N60$ShowScore:score	[[Ljava/lang/String;
      //   5: aload_0
      //   6: bipush 11
      //   8: iconst_2
      //   9: multianewarray 23 2
      //   13: putfield 22	YosamaBin_N60$ShowScore:score	[[Ljava/lang/String;
      //   16: aload_0
      //   17: ldc 24
      //   19: putfield 25	YosamaBin_N60$ShowScore:str	Ljava/lang/String;
      //   22: ldc 26
      //   24: astore_1
      //   25: aload_0
      //   26: aload_1
      //   27: invokestatic 27	javax/microedition/io/Connector:open	(Ljava/lang/String;)Ljavax/microedition/io/Connection;
      //   30: checkcast 28	javax/microedition/io/HttpConnection
      //   33: putfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   36: aload_0
      //   37: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   40: invokeinterface 30 1 0
      //   45: astore_2
      //   46: aload_0
      //   47: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   50: invokeinterface 31 1 0
      //   55: astore_3
      //   56: aload_0
      //   57: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   60: invokeinterface 32 1 0
      //   65: l2i
      //   66: istore 4
      //   68: aload_0
      //   69: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   72: invokeinterface 33 1 0
      //   77: istore 5
      //   79: iload 4
      //   81: ifle +94 -> 175
      //   84: iload 4
      //   86: newarray byte
      //   88: astore 6
      //   90: aload_2
      //   91: aload 6
      //   93: invokevirtual 34	java/io/InputStream:read	([B)I
      //   96: istore 7
      //   98: iconst_0
      //   99: istore 8
      //   101: goto +36 -> 137
      //   104: aload_0
      //   105: new 35	java/lang/StringBuffer
      //   108: dup
      //   109: invokespecial 36	java/lang/StringBuffer:<init>	()V
      //   112: aload_0
      //   113: getfield 25	YosamaBin_N60$ShowScore:str	Ljava/lang/String;
      //   116: invokevirtual 37	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   119: aload 6
      //   121: iload 8
      //   123: baload
      //   124: i2c
      //   125: invokevirtual 38	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
      //   128: invokevirtual 39	java/lang/StringBuffer:toString	()Ljava/lang/String;
      //   131: putfield 25	YosamaBin_N60$ShowScore:str	Ljava/lang/String;
      //   134: iinc 8 1
      //   137: iload 8
      //   139: aload 6
      //   141: arraylength
      //   142: if_icmplt -38 -> 104
      //   145: goto +41 -> 186
      //   148: aload_0
      //   149: new 35	java/lang/StringBuffer
      //   152: dup
      //   153: invokespecial 36	java/lang/StringBuffer:<init>	()V
      //   156: aload_0
      //   157: getfield 25	YosamaBin_N60$ShowScore:str	Ljava/lang/String;
      //   160: invokevirtual 37	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   163: iload 6
      //   165: i2c
      //   166: invokevirtual 38	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
      //   169: invokevirtual 39	java/lang/StringBuffer:toString	()Ljava/lang/String;
      //   172: putfield 25	YosamaBin_N60$ShowScore:str	Ljava/lang/String;
      //   175: aload_2
      //   176: invokevirtual 40	java/io/InputStream:read	()I
      //   179: dup
      //   180: istore 6
      //   182: iconst_m1
      //   183: if_icmpne -35 -> 148
      //   186: aload_0
      //   187: invokespecial 41	YosamaBin_N60$ShowScore:formatScore	()V
      //   190: aload_0
      //   191: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   194: ifnull +20 -> 214
      //   197: aload_0
      //   198: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   201: invokeinterface 50 1 0
      //   206: goto +8 -> 214
      //   209: astore 11
      //   211: goto +3 -> 214
      //   214: goto +119 -> 333
      //   217: astore_1
      //   218: iconst_2
      //   219: putstatic 43	YosamaBin_N60:a	I
      //   222: aload_0
      //   223: getfield 3	YosamaBin_N60$ShowScore:this$0	LYosamaBin_N60;
      //   226: getfield 44	YosamaBin_N60:display	Ljavax/microedition/lcdui/Display;
      //   229: aload_0
      //   230: getfield 11	YosamaBin_N60$ShowScore:altErr	Ljavax/microedition/lcdui/Alert;
      //   233: invokevirtual 45	javax/microedition/lcdui/Display:setCurrent	(Ljavax/microedition/lcdui/Displayable;)V
      //   236: aload_0
      //   237: getfield 3	YosamaBin_N60$ShowScore:this$0	LYosamaBin_N60;
      //   240: getfield 44	YosamaBin_N60:display	Ljavax/microedition/lcdui/Display;
      //   243: aload_0
      //   244: getfield 3	YosamaBin_N60$ShowScore:this$0	LYosamaBin_N60;
      //   247: getfield 46	YosamaBin_N60:intro	LYosamaBin_N60$Intro;
      //   250: invokevirtual 45	javax/microedition/lcdui/Display:setCurrent	(Ljavax/microedition/lcdui/Displayable;)V
      //   253: goto +13 -> 266
      //   256: aload_0
      //   257: aload_0
      //   258: invokevirtual 47	javax/microedition/lcdui/Form:size	()I
      //   261: iconst_1
      //   262: isub
      //   263: invokevirtual 48	javax/microedition/lcdui/Form:delete	(I)V
      //   266: aload_0
      //   267: invokevirtual 47	javax/microedition/lcdui/Form:size	()I
      //   270: ifgt -14 -> 256
      //   273: aload_1
      //   274: invokevirtual 49	java/lang/Throwable:printStackTrace	()V
      //   277: aload_0
      //   278: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   281: ifnull +20 -> 301
      //   284: aload_0
      //   285: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   288: invokeinterface 50 1 0
      //   293: goto +8 -> 301
      //   296: astore 11
      //   298: goto +3 -> 301
      //   301: goto +32 -> 333
      //   304: astore 9
      //   306: aload_0
      //   307: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;
      //   310: ifnull +20 -> 330
      //   313: aload_0
      //   314: getfield 29	YosamaBin_N60$ShowScore:c	Ljavax/microedition/io/HttpConnection;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -