亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
首页国产欧美久久| 日韩欧美一区电影| 成人91在线观看| 精品在线免费观看| 精东粉嫩av免费一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 国产成人免费在线观看| 国产91综合一区在线观看| 国产精品亚洲专一区二区三区| 久久er精品视频| 国产成人在线影院| 欧美在线看片a免费观看| 色综合久久久网| 欧美无砖专区一中文字| 欧美一级专区免费大片| 日韩欧美国产午夜精品| 国产欧美日韩精品在线| 亚洲一线二线三线久久久| 日本少妇一区二区| 国产馆精品极品| 91精品国产麻豆| 在线视频欧美精品| 在线观看视频一区| 欧美一区二区在线视频| 久久精品欧美日韩| 亚洲大片免费看| 成人性视频网站| 日韩欧美国产午夜精品| 亚洲午夜三级在线| 波多野结衣在线aⅴ中文字幕不卡| 在线观看一区日韩| 国产精品网站导航| 国产综合久久久久久鬼色| 懂色av一区二区夜夜嗨| 欧美大白屁股肥臀xxxxxx| 亚洲精品免费看| 欧美在线观看视频在线| 精品乱人伦一区二区三区| 国产欧美日韩亚州综合| 午夜成人免费电影| 精品视频在线免费| 亚洲超碰精品一区二区| 欧美日韩亚洲综合一区二区三区| 一区二区欧美精品| 国产成人在线电影| 国产欧美精品在线观看| 成人午夜在线视频| 国产欧美一二三区| 成人激情黄色小说| 一区二区免费在线| 51精品久久久久久久蜜臀| 日本va欧美va欧美va精品| 日韩欧美色综合网站| 国产毛片精品一区| 国产精品久久久久久久午夜片| 欧美日韩视频专区在线播放| 精品无码三级在线观看视频| 国产精品精品国产色婷婷| 国产乱子伦视频一区二区三区 | 丰满亚洲少妇av| 亚洲色图视频免费播放| 91精品久久久久久久99蜜桃| 另类人妖一区二区av| 国产精品―色哟哟| 欧美欧美午夜aⅴ在线观看| 日韩 欧美一区二区三区| 久久九九久精品国产免费直播| 成人福利在线看| 五月激情六月综合| 亚洲视频一区二区免费在线观看| 日韩欧美视频一区| 欧美精品乱码久久久久久按摩| 成人黄色av电影| 国内一区二区视频| 亚洲成av人片在线| 精品久久一二三区| 欧美视频一区在线| 亚洲色图第一区| 久久精品亚洲麻豆av一区二区| 欧美日韩高清不卡| 在线观看精品一区| 777午夜精品免费视频| 欧美日韩一级片在线观看| 欧美三级中文字| 欧美日韩免费电影| 91国偷自产一区二区使用方法| 韩国三级中文字幕hd久久精品| 奇米在线7777在线精品| 丝袜美腿亚洲色图| 精品一二三四区| 国产盗摄一区二区| 99精品视频在线免费观看| 91丨porny丨蝌蚪视频| 欧美日本乱大交xxxxx| 欧美精品久久天天躁| 日本高清无吗v一区| 91一区在线观看| 欧美久久久一区| 日韩亚洲欧美综合| 久久久国际精品| 亚洲精品国产品国语在线app| 亚洲一区二区三区四区在线| 丝瓜av网站精品一区二区| 国产一区二区三区最好精华液| 成人激情文学综合网| 欧美军同video69gay| 日韩一级黄色片| 亚洲欧洲99久久| 一区二区三区四区在线播放| 亚洲一区电影777| 久久丁香综合五月国产三级网站| 成人av电影免费观看| 日韩一级免费观看| 国产精品久久看| 免费一级片91| 不卡av免费在线观看| 欧美精品久久久久久久多人混战 | 亚洲女女做受ⅹxx高潮| 91精品国产综合久久久久久漫画| 欧洲av在线精品| 日韩毛片精品高清免费| 日韩av高清在线观看| 99久久99久久久精品齐齐| 日韩精品一区二区三区蜜臀| 亚洲午夜三级在线| 色综合久久中文综合久久97| 国产精品久久毛片| 91一区二区三区在线观看| 亚洲视频你懂的| 久久精品国产成人一区二区三区| 欧美三级日韩在线| 中文字幕一区二区三区av| 国产精品一二三四| 精品国产一区二区国模嫣然| 天天色天天操综合| 欧美日韩久久久一区| 婷婷亚洲久悠悠色悠在线播放| 91精品国产色综合久久久蜜香臀| 午夜视频在线观看一区| 日韩欧美一区在线| 国产一区二区三区电影在线观看| 国产欧美日韩另类视频免费观看| 麻豆国产精品一区二区三区| 日韩欧美国产电影| 成人免费高清在线| 一区二区三区蜜桃| 4438x成人网最大色成网站| 国产剧情一区二区三区| 亚洲视频一区在线| 欧美怡红院视频| 久久精品99久久久| 亚洲精品国产无天堂网2021 | 国产欧美日韩亚州综合| 欧美亚洲综合一区| 美女www一区二区| 亚洲伦在线观看| 国产亚洲一区二区三区四区| 欧美综合亚洲图片综合区| 福利一区福利二区| 日一区二区三区| 亚洲欧洲另类国产综合| 日韩美一区二区三区| 99久久国产综合精品色伊| 午夜视频在线观看一区二区三区 | 丝袜亚洲精品中文字幕一区| 中文子幕无线码一区tr| 7777女厕盗摄久久久| 色悠久久久久综合欧美99| 国产一区 二区| 国产一区二区调教| 国产精品资源网站| 精品在线播放午夜| 激情五月激情综合网| 麻豆91在线观看| 美女视频一区二区| 激情综合网最新| 福利电影一区二区| 国模少妇一区二区三区| 国内成人精品2018免费看| 久久精品99国产精品日本| 蜜臀a∨国产成人精品| 午夜精品久久久久久久| 亚洲精品一二三| 亚洲婷婷综合久久一本伊一区| 欧美大片国产精品| 久久综合99re88久久爱| 精品国产一区二区三区不卡| 日韩免费成人网| 国产亚洲精品aa午夜观看| 国产精品激情偷乱一区二区∴| **欧美大码日韩| 日韩黄色小视频| 国产a视频精品免费观看| 色婷婷av一区二区三区大白胸 | 国产日韩精品一区二区浪潮av| 亚洲天堂福利av| 免费观看成人鲁鲁鲁鲁鲁视频| 国产风韵犹存在线视精品| 成人免费av在线| 欧美一卡二卡三卡|