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

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

?? tools.java

?? 大量j2me源代碼
?? JAVA
字號:
/**
 * A bunch of static tools
 * @author Martin J. Wells
 */

//#ifdef nokia
import com.nokia.mid.ui.DeviceControl;
//#endif
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Graphics;
import java.util.Random;

public final class Tools
{
   /**
    * Commonly used so we precalc it.
    */
   public static final int GRAPHICS_TOP_LEFT = Graphics.LEFT | Graphics.TOP;

   private static final Random randomizer = new Random();

   /**
    * A method to obtain a random number between a miniumum and maximum
    * range.
    * @param min The minimum number of the range
    * @param max The maximum number of the range
    * @return
    */
   public static final int getRand(int min, int max)
   {
      int r = Math.abs(randomizer.nextInt());
      return (r % ((max - min + 1))) + min;
   }

   /**
   * Test for a collision between two rectangles using plane exclusion.
   * @return True if the rectangle for from the b coordinates intersects those
   * of a.
   */
   public static final boolean isIntersectingRect(int ax, int ay,
                        int aw, int ah,
                        int bx, int by,
                        int bw, int bh)
   {
      if (by + bh < ay || // is the bottom b above the top of a?
          by > ay + ah || // is the top of b below bottom of a?
          bx + bw < ax || // is the right of b to the left of a?
          bx > ax + aw)   // is the left of b to the right of a?
         return false;

      return true;
   }

   /**
    * Returns true if rectangle b is wholly within rectangle a
    */
   public static final boolean isRectWithinRect(int ax, int ay, int aw, int ah,
                                                int bx, int by, int bw, int bh)
   {
      if (isPointInRect(bx, by, ax, ay, aw, ah) &&
              isPointInRect(bx + bw, by, ax, ay, aw, ah) &&
              isPointInRect(bx, by + bh, ax, ay, aw, ah) &&
              isPointInRect(bx + bw, by + bh, ax, ay, aw, ah))
         return true;
      return false;
   }


   public static final boolean isPointInRect(int px, int py, int x, int y, int w, int h)
   {
      if (px < x) return false;
      if (px > x + w) return false;
      if (py < y) return false;
      if (py > y + h) return false;
      return true;
   }


   /**
    * Take an array of existing objects and expand it's size by a given number
    * of elements.
    * @param oldArray The array to expand.
    * @param expandBy The number of elements to expand the array by.
    * @return A new array (which is a copy of the original with space for more
    * elements.
    */
   public final static int[] expandArray(int[] oldArray, int expandBy)
   {
      int[] newArray = new int[oldArray.length + expandBy];
      System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
      return newArray;
   }

   /**
    * Take a 2D array of existing objects and expand it's size by a given number
    * of elements.
    * @param oldArray The array to expand.
    * @param expandBy The number of elements to expand the array by.
    * @return A new array (which is a copy of the original with space for more
    * elements.
    */
   public final static Image[][] expandArray(Image[][] oldArray, int expandBy)
   {
      Image[][] newArray = new Image[oldArray.length + expandBy][];
      System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
      return newArray;
   }

   private static Image[] smallStarImages;
   private static final int MAX_STAR_WIDTH = 3;
   private static final int MAX_STAR_HEIGHT = 3;

   /**
    * Draws a background star field using little star images (ranging in size
    * from 1 to 3 pixel square; loaded from the general.png image file). The
    * field is drawn as a 256 by 256 pixel map of stars using a simple
    * placement method of incrementing a value to give an impression of
    * distribution of stars across the map.
    * @param graphics The graphics context upon which to draw.
    * @param offsetX The relative x offset of the current view port.
    * @param offsetY The relative y offset of the current view port.
    * @param viewWidth The width of the current view port.
    * @param viewHeight The height of the current view port.
    */
   public final static void drawStarField(Graphics graphics,
                                          int offsetX, int offsetY,
                                          int viewWidth, int viewHeight)
   {
      // Load the static star graphics inmageset.
      if (smallStarImages == null)
         smallStarImages = ImageSet.extractFrames(ImageSet.loadClippedImage(
                 "/general.png", 0, 0), 0, 6, 4, 2, 3, 3);

      // Draw the stars on the background by running through all the positions
      // in the 256 by 256 star map jumping in different increments to give
      // a scatterred but consistent distribution of stars.
      int jumpBy = 160;
      for (int i = 0; i < (256 * 256); i += jumpBy)
      {
         int starX = i / 256 - (offsetX);
         int starY = i % 256 - (offsetY);

         // Check whether the star image will fit on the current view and then
         // draw a frame relative to the position in the map.
         if (starX > -MAX_STAR_WIDTH && starX < viewWidth &&
             starY > -MAX_STAR_HEIGHT && starY < viewHeight)
            graphics.drawImage(smallStarImages[i % smallStarImages.length],
                               starX, starY, Graphics.TOP | Graphics.LEFT);

         // Change the jump value increment to randomise the distribution
         // somewhat.
         jumpBy += 33;
      }
   }

   public final static void vibrate(int strength, int time)
   {
      if (StarAssault.getApp().isOptionVibrate())
      {
         //#ifdef nokia
         DeviceControl.startVibra(strength, time);
         //#endif
      }
   }

}


















?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品这里都是精品| 亚洲免费电影在线| 久久久精品国产99久久精品芒果| 正在播放亚洲一区| 4438亚洲最大| 欧美一区二区不卡视频| 日韩午夜小视频| 日韩一卡二卡三卡四卡| 精品国产1区二区| 久久这里只有精品首页| 欧美激情一区二区三区在线| 国产精品女主播av| 亚洲精品国产成人久久av盗摄| 一区二区三区**美女毛片| 亚洲图片欧美一区| 日韩电影在线观看一区| 久久av资源站| 色哦色哦哦色天天综合| 欧美日韩一级片在线观看| 欧美一级高清片| 久久日韩精品一区二区五区| 国产午夜精品一区二区三区嫩草 | 精品福利在线导航| 久久久电影一区二区三区| 中文字幕亚洲区| 亚洲自拍偷拍图区| 男女性色大片免费观看一区二区 | 亚洲一区二区三区四区的| 亚洲伊人伊色伊影伊综合网| 日韩精品视频网| 国产精品18久久久久久久久久久久| 丰满白嫩尤物一区二区| 日本韩国欧美三级| 欧美一级片免费看| 日本一区二区三区在线观看| 亚洲乱码国产乱码精品精小说| 日本最新不卡在线| 不卡一区二区三区四区| 欧美日本高清视频在线观看| 久久免费国产精品| 亚洲国产精品天堂| 国产精品白丝jk白祙喷水网站| 91麻豆国产精品久久| 91精品国产91久久综合桃花 | 午夜日韩在线观看| 国产一区二区三区高清播放| 色国产综合视频| 精品久久久久久久一区二区蜜臀| 亚洲视频一区二区在线| 久久se这里有精品| 欧美性猛交xxxxxxxx| 久久久精品中文字幕麻豆发布| 亚洲午夜电影在线| 懂色av一区二区在线播放| 欧美日韩国产高清一区二区三区| 日本一区二区电影| 日韩不卡一区二区三区| 不卡的av电影| 欧美成人性福生活免费看| 亚洲美女一区二区三区| 国内精品伊人久久久久av一坑| 欧洲一区在线观看| 中文字幕免费观看一区| 久久99精品国产.久久久久| 91成人在线观看喷潮| 国产情人综合久久777777| 蜜桃一区二区三区在线| 欧美日韩在线直播| 亚洲欧洲三级电影| 国产精品亚洲人在线观看| 日韩一区二区三区在线视频| 亚洲欧美国产高清| 成人久久视频在线观看| 欧美不卡视频一区| 日日欢夜夜爽一区| 欧美色综合天天久久综合精品| 国产精品热久久久久夜色精品三区| 蜜臀av一区二区三区| 欧美性一级生活| 亚洲欧洲日韩女同| 国产成人午夜精品5599| 久久中文娱乐网| 九九**精品视频免费播放| 欧美精品乱码久久久久久按摩| 亚洲精品免费在线| 一本一本久久a久久精品综合麻豆| 国产亚洲午夜高清国产拍精品| 久久精品国产一区二区| 9191国产精品| 亚洲成a天堂v人片| 欧美日韩精品系列| 天堂蜜桃一区二区三区| 欧美日韩国产高清一区二区| 亚洲综合色婷婷| 色婷婷综合五月| 亚洲另类在线制服丝袜| 色综合久久综合网97色综合 | 激情综合网最新| 日韩精品一区二| 毛片一区二区三区| 精品国产伦一区二区三区观看方式 | 色av一区二区| 亚洲精品自拍动漫在线| 色综合久久久久综合99| 伊人一区二区三区| 在线中文字幕不卡| 亚洲国产精品久久一线不卡| 欧美日韩一级黄| 全部av―极品视觉盛宴亚洲| 欧美一级片在线看| 激情都市一区二区| 国产色爱av资源综合区| 成人听书哪个软件好| 国产精品卡一卡二| 一本大道久久a久久综合| 亚洲午夜久久久| 国产精品视频免费看| 不卡的av中国片| 亚洲五码中文字幕| 精品久久久久久最新网址| 国产不卡视频一区二区三区| 国产精品国产三级国产aⅴ中文 | 国产成人久久精品77777最新版本| 国产日韩欧美a| 91麻豆福利精品推荐| 午夜精品久久久久久久99水蜜桃| 日韩一区二区免费电影| 国产高清不卡一区二区| 亚洲欧美福利一区二区| 884aa四虎影成人精品一区| 国产一区二区三区在线观看免费| 亚洲欧洲av另类| 欧美日韩精品专区| 国产精品综合一区二区三区| 亚洲精品高清视频在线观看| 欧美一区二区三区四区高清 | 欧美高清在线精品一区| 在线精品视频一区二区三四| 免费成人性网站| 国产精品嫩草99a| 欧美日韩精品福利| 国产美女精品在线| 亚洲一区在线电影| 亚洲精品在线观| 日本国产一区二区| 韩国女主播一区| 亚洲黄色免费电影| 久久久亚洲精品一区二区三区| 91色九色蝌蚪| 激情av综合网| 一个色妞综合视频在线观看| 欧美大黄免费观看| 94色蜜桃网一区二区三区| 日本欧美韩国一区三区| 国产精品国产三级国产普通话三级 | 国产精品久久久久久户外露出| 欧美性淫爽ww久久久久无| 国产精品12区| 七七婷婷婷婷精品国产| 日韩毛片在线免费观看| 欧美精品一区二区三区久久久| 色8久久人人97超碰香蕉987| 国产成人自拍网| 肉色丝袜一区二区| 亚洲欧美日韩中文播放 | 国产精品一卡二卡| 日本中文字幕一区二区有限公司| 中文字幕人成不卡一区| 精品处破学生在线二十三| 欧美日韩国产高清一区| 色综合久久天天综合网| 国产精品538一区二区在线| 日韩国产在线观看| 一区二区三区四区国产精品| 国产午夜精品理论片a级大结局| 欧美一区二区三区精品| 欧美日韩一区精品| 91麻豆6部合集magnet| 懂色av噜噜一区二区三区av| 欧洲一区二区三区免费视频| 成人禁用看黄a在线| 国产精品一区在线观看乱码 | 成人国产精品免费网站| 久久国产精品99久久久久久老狼| 亚洲综合色噜噜狠狠| ...xxx性欧美| 国产精品色哟哟网站| 国产亚洲精品免费| 久久久一区二区三区捆绑**| 精品少妇一区二区三区日产乱码 | 国产精品理论片在线观看| 国产色产综合产在线视频| 久久毛片高清国产| 久久久一区二区| 久久久久久久久久久久久久久99 | 7799精品视频| 欧美军同video69gay| 欧美日韩国产电影| 宅男噜噜噜66一区二区66| 这里只有精品电影|