亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gamegame.java

?? J2ME的游戲原代碼!希望能幫助有需要幫助的師兄弟們!
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
    dos.writeByte(AttackWave);
    dos.writeByte(Vibrator);
    dos.writeByte(Sound);
  }

  public void unSerialize( DataInputStream dis ) throws IOException {
    Marker = dis.readChar();
    HighScoreListEntries.unSerialize(dis);
    Level = dis.readShort();
    Wave = dis.readByte();
    ValidHighScores = dis.readByte();
    Score = dis.readInt();
    Lives = dis.readByte();
    Bombs = dis.readByte();
    Difficulty = dis.readByte();
    Humans = dis.readByte();
    AttackWave = dis.readByte();
    Vibrator = dis.readByte();
    Sound = dis.readByte();
  }
}

class
DefEnemies_t {
  public DefKidnapper_t pKidnappers[ ] = new DefKidnapper_t [ 6 ];
  public DefBomber_t pBombers[ ] = new DefBomber_t [ 3 ];
  public DefSuperAlien_t pSuperAliens[ ] = new DefSuperAlien_t [ 4 ];
  public DefScout_t pScouts[ ] = new DefScout_t [ 6 ];

  public DefMine_t pMines[ ] = new DefMine_t [ 5 ];

  public byte enemyOrder[ ] = new byte [ ( 6 + 3 + 4 + 6 ) ];
  public byte enemyNr[ ] = new byte [ ( 6 + 3 + 4 + 6 ) ];

  public byte nrOfEnemies;

}

class
DefShots_t {
  public boolean newPlayerShot;
  public DefTheShot_t pPlayerShots[ ] = new DefTheShot_t [ 5 ];
  public DefTheShot_t pEnemyShots[ ] = new DefTheShot_t [ 16 ];
}

class
DefGameState_t {
  public short status;
  public short statusData;
  public DefWorld_t display = new DefWorld_t();

  public boolean VibratorStarted;

  public DefPlayer_t pPlayer = new DefPlayer_t();
  public DefTerrain_t pTerrain = new DefTerrain_t();
  public DefEnemies_t pEnemies = new DefEnemies_t();
  public DefShots_t pShots = new DefShots_t();

  public DefExplosion_t pExplosions[ ] = new DefExplosion_t [ 10 ];

  public DefHuman_t pHumans[ ] = new DefHuman_t [ 5 ];


  public DefAdvancedRadar_t pAdvancedRadar = new DefAdvancedRadar_t();


  public DefAnimation_t largeExplosionAnimation = new DefAnimation_t();
  public DefAnimation_t mediumExplosionAnimation = new DefAnimation_t();
  public DefAnimation_t smallExplosionAnimation = new DefAnimation_t();

  public DefAnimation_t kidnapperAnimation = new DefAnimation_t();
  public DefAnimation_t bomberAnimation = new DefAnimation_t();
  public DefAnimation_t superAlienAnimation = new DefAnimation_t();
  public DefAnimation_t scoutAnimation = new DefAnimation_t();
  public DefAnimation_t mineAnimation = new DefAnimation_t();
  public DefAnimation_t humanAnimation = new DefAnimation_t();
  public DefAppearance_t humanCarriedAppearance = new DefAppearance_t();

  public DefAppearance_t smartBomb = new DefAppearance_t();
  public DefAppearance_t shipLeft = new DefAppearance_t();

  public byte nrOfKidnappers;
  public byte nrOfBombers;
  public byte nrOfScouts;
  public byte nrOfSuperAliens;

  public byte nrOfBombs;
  public byte nrOfLives;
  public short levelNr;
  public byte difficultyLevel;
  public int score;

  public int scoreBase;
  public byte bombBase;
  public byte lifeBase;
  public byte humanBase;

  public boolean newScore;
  public boolean newLives;
  public boolean newBombs;
  public boolean gamePaused;

  public int scoreNextLife;

  public boolean specialLevel;

  public boolean droppedBomb;

  public byte currentAttackWave;

  public byte nrOfKidnappings;

  public byte kidnapperShoot;
  public byte kidnapperKidnap;
  public byte scoutShoot;
  public byte scoutSeek;
  public byte superAlienShoot;
  public byte superAlienSeek;
  public byte superAlienMadShoot;
  public byte superAlienMadSeek;

  public byte SplashTickCount;
}

class
DefGlobalState_t {

  public short timerDelay;

  public DefGameState_t GameState = new DefGameState_t();


}

DefGlobalState_t DefGlobalState_p = null;

DefFrameworkStateStruct_t DefState = new DefFrameworkStateStruct_t();

static DefSaveData_t DefSaveData_p = null;
static GAPI_HighscoreList_t DefHighScoreList_p = null;

/**
  * A few constants deferred from the original unprocessed source code.
  */
static final short DEF_YOFFSET = 9; // 8 + 1
static final short DEF_ERASE_PLAYGROUND_HEIGHT = 53; // 53





/**
  *
  *
  *
  * @param pPlayer
  */
void
DefInitPlayer(DefPlayer_t pPlayer)
{
  DefAllocatePlayer();
}










/**
  * Draw all shots.
  *
  */
void
DefDrawShots(DefTheShot_t[] pShots,
short nrOfShots,
DefWorld_t pWorld,
boolean IsPlayer)
{
  byte ix;
  short xpos;

  for (ix = 0; ix < nrOfShots; ix++)
  {
    if (pShots[ix].shot.timeToLive > 0)
    {
      if (IsPlayer)
      {
        xpos = (short) ((pWorld.width + pShots[ix].shot.object.xpos - pWorld.xpos) % pWorld.width);

        if ((xpos > DISPLAY_WIDTH) || ((xpos + pShots[ix].shot.object.pAppearance.width) < 0))
        {
          pShots[ix].shot.timeToLive = 0;
        }
        else
        {
          DefDrawObject(pShots[ix].shot.object, pWorld);
        }
      }
      else
      {
        DefDrawObject(pShots[ix].shot.object, pWorld);
      }
    }
  }
} 



/**
  * Initializes all shots, by setting timeToLive to 0.
  *
  */
void
DefInitShots(DefTheShot_t[] pShots,
short nrOfShots)
{
  byte ix;

  for (ix = 0; ix < nrOfShots; ix++)
  {
    pShots[ix].shot.timeToLive = 0;
  }
}



/**
  * Update all PlayerShots.
  *
  * @param pShots  pointer to the shots
  * @param nrOfShots the number of shots
  * @param pWorld  pointer to the world which contains the current offset
  *
  */
void
DefUpdatePlayerShots(DefTheShot_t[] pShots,
short nrOfShots,
DefWorld_t pWorld)
{
  byte ix;

  for (ix = 0; ix < nrOfShots; ix++)
  {
    if (pShots[ix].shot.timeToLive > 0)
    {
      pShots[ix].shot.timeToLive--;

      pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos + pShots[ix].xspeed);

      if (pShots[ix].shot.object.xpos < 0)
      {
        pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos + pWorld.width);
      }

      pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos % pWorld.width);

    }
  }
} 






/**
  *
  *
  *
  * @param pShots
  * @param nrOfShots
  * @param pWorld
  */
void
DefUpdateEnemyShots(DefTheShot_t[] pShots,
short nrOfShots,
DefWorld_t pWorld)
{
  byte ix;

  for (ix = 0; ix < nrOfShots; ix++)
  {
    if (pShots[ix].shot.timeToLive > 0)
    {
      pShots[ix].shot.timeToLive--;
      pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos + pShots[ix].xspeed);
      pShots[ix].shot.object.ypos = (short) (pShots[ix].shot.object.ypos + pShots[ix].yspeed);

      if (pShots[ix].shot.object.xpos < 0)
      {
        pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos + pWorld.width);
        if (pShots[ix].shot.object.xpos < 0)
        {
          pShots[ix].shot.object.xpos = 0;
        }
      }

      if (pShots[ix].shot.object.xpos >= pWorld.width)
      {
        pShots[ix].shot.object.xpos = (short) (pShots[ix].shot.object.xpos - pWorld.width);
      }

      if (pShots[ix].shot.object.ypos < 0)
      {
        pShots[ix].shot.timeToLive = 0;
      }

      if (pShots[ix].shot.object.ypos >= pWorld.height)
      {
        pShots[ix].shot.timeToLive = 0;
      }

    }
  }
} 





/**
  *
  *
  *
  * @param pHumans
  * @param nrOfHumans
  * @param pWorld
  *
  * @returns
  */
byte
DefUpdateHumans(DefHuman_t[] pHumans,
		short nrOfHumans,
		DefWorld_t pWorld)
{
  byte ix;
  byte nrOfHumansLeft;

  nrOfHumansLeft = 0;

  for (ix = 0; ix < nrOfHumans; ix++)
  {

    switch (pHumans[ix].status)
    {


      case  2 :
      {
        DefEnemy_t P;

        P = (DefEnemy_t) pHumans[ix].CarriedBy;
        nrOfHumansLeft++;
        pHumans[ix].reflectable.collidable.object.ypos = (short)(P.ypos + P.reflectable.collidable.object.pAppearance.height);
      }
      break;


      case  3 :
      {
        DefPlayer_t P;

        P = (DefPlayer_t) pHumans[ix].CarriedBy;
        nrOfHumansLeft++;
        pHumans[ix].reflectable.collidable.object.xpos = (short)(P.xpos + 3);
        pHumans[ix].reflectable.collidable.object.ypos = (short)(P.ypos + 5);
      }
      break;


      case  1 :
      nrOfHumansLeft++;
      pHumans[ix].FrameDelayCnt++;
      if (pHumans[ix].FrameDelayCnt >= pHumans[ix].FrameDelay)
      {
        pHumans[ix].FrameDelayCnt = 0;
        pHumans[ix].FrameIx = (byte)((pHumans[ix].FrameIx + 1) % pHumans[ix].pAnim.nrOfFrames);
        pHumans[ix].reflectable.collidable.object.pAppearance = pHumans[ix].pAnim.pAppearance[pHumans[ix].FrameIx];
      }
      break;


      case  4 :
      nrOfHumansLeft++;

      pHumans[ix].FrameDelayCnt++;
      if (pHumans[ix].FrameDelayCnt >= pHumans[ix].FrameDelay)
      {
        pHumans[ix].FrameDelayCnt = 0;
        pHumans[ix].FrameIx = (byte)((pHumans[ix].FrameIx + 1) % pHumans[ix].pAnim.nrOfFrames);

        pHumans[ix].reflectable.collidable.object.pAppearance = pHumans[ix].pAnim.pAppearance[pHumans[ix].FrameIx];

      }
      pHumans[ix].FallSpeedCnt++;
      if (pHumans[ix].FallSpeedCnt >= pHumans[ix].FallSpeed)
      {
        pHumans[ix].reflectable.collidable.object.ypos++;
      }
      if (pHumans[ix].reflectable.collidable.object.ypos + pHumans[ix].reflectable.collidable.object.pAppearance.height >= pWorld.height)
      {

        if (pHumans[ix].reflectable.collidable.object.ypos - pHumans[ix].fallFrom >= 10)
        {

          DefAddExplosion(pHumans[ix].reflectable.collidable );

          pHumans[ix].Valid = false;
          pHumans[ix].status =  0 ;
          pHumans[ix].reflectable.radarAppearance = RA_Not_Available;
          nrOfHumansLeft--;
        }
        else
        {

          pHumans[ix].status =  1 ;
        }
      }
      break;
    }
  }
  return nrOfHumansLeft;
}






/**
  *
  *
  *
  * @param pHumans
  * @param nrOfHumans
  * @param pWorld
  */
/*void
DefDrawHumans(DefHuman_t pHumans,
short nrOfHumans,
DefWorld_t pWorld)
{
  byte ix;

  for (ix = 0; ix < nrOfHumans; ix++)
  {
    if (pHumans.status !=  0 )
    {
      DefDrawObject(pHumans.reflectable.collidable.object, pWorld);
    }
    pHumans++;
  }
} */








/**
  * Updates the worlds position depending on the 
  * players position and the direction of the player.
  *
  * @param pPlayer Pointer to the player
  * @param pWorld pointer to the world that should be moved
  *
  *
  */
void
DefUpdateWorldPosition(DefPlayer_t pPlayer,
DefWorld_t pWorld)
{
  short TargetX;
  short Dist;
  short Temp;
  short Temp2;

  if (pPlayer.headingLeft)
  {
    TargetX = pPlayer.xpos;
    TargetX += (3 * (pPlayer.collidable.object.pAppearance.width / 2));
    TargetX -= DISPLAY_WIDTH;
  }
  else
  {
    TargetX = (short) (pPlayer.xpos - (pPlayer.collidable.object.pAppearance.width / 2));
  }

  TargetX += pWorld.width; 
  TargetX = (short) (TargetX % pWorld.width);

  Dist = (short) (TargetX - pWorld.xpos);
  if (Math.abs(Dist) > (pWorld.width / 2))
  {
    if (Dist < 0)
    {
      Dist += pWorld.width;
    }
    else
    {
      Dist -= pWorld.width;
    }
  }
  Dist = (short)Math.abs(Dist);

  Temp = DefPlayer_t.PLAYER_MAX_X_SPEED; // FLOAT: ((int) (( (( float ) (( 8.2f ))) )))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美怡红院| 精品一区二区免费在线观看| 日日夜夜精品视频天天综合网| 激情深爱一区二区| 在线观看成人小视频| 日韩视频123| 一区二区三区欧美日韩| 国产麻豆91精品| 欧美一区二区在线视频| 一区二区三区中文字幕在线观看| 激情综合色播激情啊| 欧美日韩精品欧美日韩精品一| 国产午夜精品美女毛片视频| 日韩专区一卡二卡| 欧美性欧美巨大黑白大战| 亚洲欧美一区二区三区国产精品 | av亚洲产国偷v产偷v自拍| 3d动漫精品啪啪一区二区竹菊| 国产精品久久久久一区二区三区| 久久国产夜色精品鲁鲁99| 欧美日韩在线电影| 亚洲另类色综合网站| 粉嫩aⅴ一区二区三区四区| 日韩精品一区二区在线| 日韩精品久久理论片| 欧美午夜电影网| 亚洲免费观看高清完整| 99精品久久只有精品| 国产精品美女久久福利网站 | 日韩av高清在线观看| 欧美日韩中字一区| 夜夜夜精品看看| 在线观看91视频| 五月婷婷激情综合网| 欧美精品乱人伦久久久久久| 亚洲成年人网站在线观看| 欧美日韩一级片网站| 天天影视色香欲综合网老头| 欧美日韩一区二区三区在线| 日精品一区二区三区| 欧美一区二区高清| 九一九一国产精品| 国产性色一区二区| 丁香婷婷深情五月亚洲| 中文字幕在线不卡一区二区三区| 北条麻妃国产九九精品视频| 亚洲欧美日韩国产成人精品影院 | 综合久久一区二区三区| 99riav久久精品riav| 亚洲伊人色欲综合网| 欧美色精品天天在线观看视频| 亚洲成人自拍网| 欧美一级黄色片| 成人精品一区二区三区四区| 一区二区三区在线影院| 91精品国产91久久久久久最新毛片 | 日本中文一区二区三区| 久久综合久久久久88| 粉嫩一区二区三区在线看| 自拍偷在线精品自拍偷无码专区| 在线精品国精品国产尤物884a| 三级久久三级久久久| 国产欧美日韩一区二区三区在线观看| 大陆成人av片| 日韩av一区二区三区四区| 久久九九全国免费| 欧美性受xxxx| 国产不卡视频在线观看| 一区二区三区欧美亚洲| 久久婷婷成人综合色| 欧日韩精品视频| 国产中文一区二区三区| 亚洲午夜激情av| 久久久.com| 在线成人午夜影院| av亚洲产国偷v产偷v自拍| 国产1区2区3区精品美女| 一区2区3区在线看| 国产欧美日韩中文久久| 91精品国模一区二区三区| 99视频在线精品| 蓝色福利精品导航| 有码一区二区三区| 久久噜噜亚洲综合| 欧美日本视频在线| 91视频在线看| 国产成人av一区二区三区在线观看| 一区二区三区视频在线看| 久久精品欧美一区二区三区不卡| 欧美中文一区二区三区| 成人精品国产一区二区4080| 麻豆精品在线播放| 亚洲国产美国国产综合一区二区| 欧美激情在线看| 久久在线观看免费| 日韩一区二区电影在线| 欧美性高清videossexo| thepron国产精品| 高清国产午夜精品久久久久久| 日韩高清一区二区| 水蜜桃久久夜色精品一区的特点| 亚洲美女免费在线| 中文字幕视频一区| 国产精品嫩草99a| 国产欧美精品一区二区色综合朱莉| 91精品国产一区二区三区蜜臀| 欧洲av在线精品| 在线观看亚洲成人| 欧美性淫爽ww久久久久无| 色诱亚洲精品久久久久久| 99精品视频在线观看| 成人h动漫精品| 成人av电影观看| 99久久99久久综合| 色婷婷av久久久久久久| 色88888久久久久久影院野外 | 69堂精品视频| 欧美日韩一区二区三区免费看 | 暴力调教一区二区三区| 成人免费毛片a| 成人h版在线观看| 色婷婷精品久久二区二区蜜臂av| 色综合咪咪久久| 欧美中文字幕一区二区三区亚洲| 色94色欧美sute亚洲线路一ni | 91丨九色丨尤物| av电影在线不卡| 在线观看日韩毛片| 9191久久久久久久久久久| 欧美理论电影在线| 日韩精品一区二区三区四区| 久久久天堂av| 中文字幕日本不卡| 一区二区欧美视频| 免费观看久久久4p| 国产91精品一区二区| 9久草视频在线视频精品| 在线免费精品视频| 69堂成人精品免费视频| 久久精品人人做人人爽人人| 国产精品国产三级国产专播品爱网| 一区二区三区四区不卡在线| 天堂一区二区在线免费观看| 丰满白嫩尤物一区二区| 在线视频欧美精品| 亚洲精品一区二区三区福利| 欧美高清在线精品一区| 亚洲动漫第一页| 国产精品综合在线视频| 91丝袜国产在线播放| 欧美一级片在线观看| 国产精品进线69影院| 日韩专区欧美专区| 成人美女在线观看| 69成人精品免费视频| 国产精品色哟哟| 日本不卡一区二区| jizzjizzjizz欧美| 欧美一区二区三区免费在线看| 久久久久久电影| 天涯成人国产亚洲精品一区av| 国产激情91久久精品导航| 欧美性猛交xxxxxx富婆| 国产精品日日摸夜夜摸av| 免费在线看成人av| eeuss影院一区二区三区| 日韩一区二区免费高清| 亚洲女同一区二区| 国产精品888| 日韩三级中文字幕| 亚洲永久免费av| av男人天堂一区| 久久久久久黄色| 久久国产福利国产秒拍| 欧美日韩一区国产| 中文字幕在线观看一区| 国产乱人伦偷精品视频不卡| 欧美一卡二卡三卡| 亚洲v精品v日韩v欧美v专区| 91美女视频网站| 国产精品久久久久永久免费观看 | 欧美tickle裸体挠脚心vk| 一区二区三区日韩在线观看| 成人中文字幕合集| 国产亚洲欧美激情| 国内精品嫩模私拍在线| 欧美老年两性高潮| 夜夜嗨av一区二区三区| 99久久99久久精品国产片果冻| 国产欧美精品国产国产专区| 美国毛片一区二区三区| 7777精品伊人久久久大香线蕉的 | 国产精品不卡一区| 国产盗摄精品一区二区三区在线| 欧美电影免费观看完整版 | 亚洲高清一区二区三区| 色视频成人在线观看免| 亚洲伦在线观看| 在线观看亚洲a| 午夜欧美在线一二页|