📄 sevenyearitch.java
字号:
import com.nokia.mid.sound.Sound;
import com.nokia.mid.sound.SoundListener;
import com.nokia.mid.ui.DirectGraphics;
import com.nokia.mid.ui.DirectUtils;
import com.nokia.mid.ui.FullCanvas;
import java.io.DataInputStream;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.MIDlet;
import javax.microedition.rms.InvalidRecordIDException;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
public class SevenYearItch extends MIDlet
implements SoundListener
{
Display display;
SevenYearItch.Intro intro;
SevenYearItch.GameCanvas obj;
SevenYearItch.Gameover gameover;
SevenYearItch.FieldMover mover;
Timer timer;
static final String DBNAME = "Test";
public boolean highscorecheck;
public boolean highscoretext;
public int gamePaint;
public boolean checkPause;
int level;
int ap;
int bgx;
int bgy;
int sel;
private Random mRandom;
public Image imgintro;
public Image bg;
public Image tryagain;
public Image imgmenu;
public Image imggameover;
public Image bullet;
int gameend;
int game;
int again;
int right;
boolean press;
int a;
int count;
int introcnt;
int j;
int selectx;
int selecty;
int selectno;
int up;
int down;
int fire;
int sound;
int no;
int score;
int xy;
int xyI;
byte[] abyte0;
Sound intros;
Sound overs;
Sound sc;
Sound hurt;
int scroll_exceed;
int scroll_exceed1;
int scroll_exceed2;
int arrowcnt;
int points;
int w;
int h;
int kpuser_movesR;
int user_x;
int user_y;
int opp_x;
int opp_y;
int oppmR;
int posy;
int posx;
int tarR;
int vessu;
int vesso;
int hit;
int oppth;
int opp_anim;
int rand_g;
int user_anim;
int tar_anim;
int turn;
int vess;
int sel_img_u;
int sel_img_o;
int lev;
int fircount;
int start;
int bbb;
int abb;
int timerR;
int dran;
int go_matchopp;
int opp_thro;
int opponent;
int user;
int userth;
int timerO;
int hran;
int index_x;
int index_y;
int oppcnt;
int oppx1;
int oppx2;
int oppx3;
int oppx4;
int oppx5;
int oppx6;
int oppx7;
int oppx8;
int oppy1;
int oppy2;
int oppy3;
int oppy4;
int oppy5;
int oppy6;
int oppy7;
int oppy8;
int usrx1;
int usrx2;
int usrx3;
int usrx4;
int usrx5;
int usrx6;
int usrx7;
int usrx8;
int usry1;
int usry2;
int usry3;
int usry4;
int usry5;
int usry6;
int usry7;
int usry8;
int user_blink;
int opp_blink;
int dncounter;
int index_user_x;
int index_user_y;
int rem;
int shots;
int items;
int co1;
int co2;
int vess2;
int vess1;
int aaaa;
int dn_load;
int usercnt;
int dncnt;
int ccc;
int variable;
int ux;
int uy;
int lives;
int animflag;
int temposx;
int temposy;
int tri;
public Image[][] img;
public Image[][] choose;
public Image sel1;
public Image sel2;
public Image target;
public Image loading;
public SevenYearItch()
{
this.mover = new SevenYearItch.FieldMover(this);
this.timer = new Timer();
this.highscorecheck = true;
this.highscoretext = false;
this.press = false;
this.sound = 0;
this.abyte0 = new byte[200];
this.intros = a(this, "/intro.ott", this.abyte0);
this.overs = a(this, "/over.ott", this.abyte0);
this.sc = a(this, "/score.ott", this.abyte0);
this.hurt = a(this, "/hurt.ott", this.abyte0);
this.img = new Image[7][4];
this.choose = new Image[4][5];
this.intro = new SevenYearItch.Intro(this);
this.obj = new SevenYearItch.GameCanvas(this);
this.display = Display.getDisplay(this);
}
public void End()
{
this.gameover = new SevenYearItch.Gameover(this);
this.display.setCurrent(this.gameover);
}
public void PlayAgain()
{
this.imggameover = null;
try
{
this.bg = Image.createImage("/bg.png");
}
catch (Exception localException)
{
}
killimages();
Init();
}
public void Init()
{
this.timerO = 0;
this.go_matchopp = 0;
this.tri = 0;
this.animflag = 0;
this.highscoretext = false;
this.highscorecheck = true;
this.start = 0;
this.sel = 0;
this.w = 128;
this.h = 128;
this.vessu = 0;
this.again = 0;
this.points = 0;
this.gameend = 0;
this.press = false;
this.right = 0;
this.ap = 2;
this.bgx = 0;
this.bgy = 0;
this.kpuser_movesR = 2;
this.fire = 0;
this.items = 0;
this.shots = 0;
this.rem = 11;
this.oppx8 = 200;
this.dncounter = 0;
this.opp_x = 0;
this.usrx8 = 200;
this.abb = 0;
this.hit = 0;
this.turn = 1;
this.userth = 0;
this.user_x = -23;
this.user_y = 72;
this.opp_x = 27;
this.opp_y = 9;
this.opp_thro = 0;
this.dncounter = 0;
this.aaaa = 0;
this.lev = 1;
this.ccc = 0;
this.tar_anim = 3;
this.fircount = 0;
this.vess = 0;
this.vess2 = 0;
this.bbb = 0;
this.opp_blink = 0;
this.user_blink = 0;
this.user_anim = 1;
this.opp_anim = 1;
this.vesso = 0;
this.variable = 0;
this.index_user_x = 0;
this.index_user_y = 0;
this.index_x = 0;
this.index_y = 0;
this.ux = 0;
this.uy = 0;
this.lives = 5;
this.down = 0;
}
public static byte[] a(String paramString)
{
paramString.toUpperCase();
byte[] arrayOfByte = new byte[paramString.length() / 2];
int i = 0;
int k = 0;
for (int l = paramString.length() / 2; l > 0; --l)
{
int i1;
if ((paramString.charAt(k) >= '0') && (paramString.charAt(k) <= '9'))
i1 = paramString.charAt(k) - '0';
else
i1 = paramString.charAt(k) - 'A' + 10;
i1 *= 16;
if ((paramString.charAt(k + 1) >= '0') && (paramString.charAt(k + 1) <= '9'))
i1 += paramString.charAt(k + 1) - '0';
else
i1 += paramString.charAt(k + 1) - 'A' + 10;
arrayOfByte[i] = (byte)i1;
k += 2;
++i;
}
return arrayOfByte;
}
public static Sound a(MIDlet paramMIDlet, String paramString, byte[] paramArrayOfByte)
{
DataInputStream localDataInputStream;
try
{
localDataInputStream = new DataInputStream(paramMIDlet.getClass().getResourceAsStream(paramString));
int i = localDataInputStream.read(paramArrayOfByte);
byte[] arrayOfByte = new byte[i];
System.arraycopy(paramArrayOfByte, 0, arrayOfByte, 0, arrayOfByte.length);
Sound localSound = new Sound(arrayOfByte, 1);
localDataInputStream.close();
return localSound;
}
catch (Exception localException)
{
localException.printStackTrace();
}
return null;
}
public boolean HighScore(int paramInt)
{
RecordStore localRecordStore = null;
byte[] arrayOfByte1 = new byte[1];
try
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -