亚洲欧美第一页_禁久久精品乱码_粉嫩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;
      }
   }

}


















?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产普通话99 | 亚洲欧洲韩国日本视频| 亚洲人成影院在线观看| 六月婷婷色综合| 色综合婷婷久久| 久久一留热品黄| 亚洲同性同志一二三专区| 喷水一区二区三区| 日本丰满少妇一区二区三区| 久久久久久久久久久电影| 香蕉成人啪国产精品视频综合网| 国产iv一区二区三区| 91精品国产全国免费观看| 亚洲欧美二区三区| 国产成人精品一区二| 日韩欧美国产电影| 亚洲国产人成综合网站| 91黄视频在线| 日韩美女久久久| 波多野结衣中文字幕一区| 久久久国产精品不卡| 久久精品久久久精品美女| 欧美午夜在线观看| 一区二区三区不卡视频在线观看| 成人高清免费在线播放| 欧美激情中文不卡| 丰满少妇久久久久久久| 久久综合久久综合久久综合| 另类成人小视频在线| 日韩视频在线永久播放| 婷婷综合久久一区二区三区| 欧美日产国产精品| 亚洲成精国产精品女| 欧美日本韩国一区| 日韩在线一区二区| 欧美精品vⅰdeose4hd| 肉色丝袜一区二区| 日韩色视频在线观看| 秋霞成人午夜伦在线观看| 日韩精品一区二区三区三区免费| 热久久一区二区| 精品欧美一区二区在线观看 | 欧美成人性战久久| 日韩va欧美va亚洲va久久| 制服视频三区第一页精品| 男人操女人的视频在线观看欧美| 欧美一区二区三区男人的天堂| 日韩影院精彩在线| 久久久久久久久久美女| 国产99精品在线观看| 综合婷婷亚洲小说| 一本色道**综合亚洲精品蜜桃冫| 亚洲视频免费在线| 欧美电影影音先锋| 精品午夜一区二区三区在线观看| 国产日韩欧美制服另类| av在线不卡电影| 一级精品视频在线观看宜春院 | 欧美制服丝袜第一页| 视频一区二区不卡| 国产亚洲欧美一级| 91浏览器在线视频| 日韩影视精彩在线| 国产喷白浆一区二区三区| 色美美综合视频| 精品一二三四区| **网站欧美大片在线观看| 欧美日本免费一区二区三区| 国产美女精品人人做人人爽| 亚洲色图在线播放| 日韩精品专区在线影院观看| 成人福利视频在线看| 天天爽夜夜爽夜夜爽精品视频| 久久欧美中文字幕| 欧美伊人久久久久久午夜久久久久| kk眼镜猥琐国模调教系列一区二区| 亚洲精品视频观看| 久久毛片高清国产| 欧美日本一道本| 成人av在线影院| 蜜桃精品视频在线| 一区二区三区美女| 久久精品欧美一区二区三区麻豆| 欧美视频一区在线| 成人午夜免费电影| 久久成人av少妇免费| 亚洲黄色av一区| 国产欧美视频一区二区| 日韩一区二区三区免费看| 91首页免费视频| 国产成人日日夜夜| 久久福利视频一区二区| 亚洲一区电影777| 中文字幕一区二区三区在线播放| 欧美mv和日韩mv的网站| 欧美日韩一区不卡| 91在线一区二区三区| 国产成人综合视频| 久久成人久久爱| 美腿丝袜亚洲综合| 污片在线观看一区二区| 亚洲乱码日产精品bd| 中文字幕中文字幕在线一区| 久久九九影视网| 欧美不卡123| 日韩视频在线一区二区| 欧美精选一区二区| 欧美日韩在线电影| 欧美亚洲高清一区二区三区不卡| 97se亚洲国产综合在线| 成a人片国产精品| 成人高清av在线| av网站免费线看精品| youjizz久久| www.欧美色图| 97久久精品人人爽人人爽蜜臀| 福利91精品一区二区三区| 风间由美中文字幕在线看视频国产欧美| 国产在线视频一区二区三区| 久久99国产精品成人| 国产原创一区二区三区| 国产在线看一区| 国产传媒日韩欧美成人| av网站一区二区三区| 色视频欧美一区二区三区| 一本久久综合亚洲鲁鲁五月天 | 26uuu精品一区二区| 久久久久久久久久看片| 亚洲国产精品激情在线观看| 亚洲欧洲精品一区二区精品久久久 | 日韩三级视频中文字幕| 日韩精品影音先锋| 久久精子c满五个校花| 中文在线一区二区 | 欧美日韩一区二区三区视频| 欧美精品v日韩精品v韩国精品v| 日韩午夜电影av| 中文字幕av在线一区二区三区| 亚洲欧美精品午睡沙发| 日本中文在线一区| 国产一区二区三区四区五区入口| 福利视频网站一区二区三区| 欧美性xxxxx极品少妇| 欧美大片一区二区三区| 久久久久久久久97黄色工厂| 国产精品美女久久久久久| 一区二区成人在线视频 | 久久精工是国产品牌吗| 国产一区日韩二区欧美三区| 91麻豆国产福利在线观看| 欧美精品三级在线观看| 久久久99精品久久| 亚洲一区二区三区视频在线 | 国产女人18水真多18精品一级做| 亚洲乱码国产乱码精品精98午夜 | 亚洲国产精品一区二区久久| 国产一区二区三区久久悠悠色av| 色婷婷精品大在线视频| 欧美精品一区二区三区高清aⅴ | 在线免费精品视频| 2019国产精品| 日韩电影免费在线看| 成人一区二区三区中文字幕| 欧美中文字幕一区| 久久蜜桃av一区二区天堂| 国产精品久久久久久久久果冻传媒| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲影院在线观看| 久久99精品久久久| 国产一区二区在线视频| 欧美日韩一区二区在线观看视频| 日韩免费在线观看| 中文字幕中文字幕在线一区 | 亚洲午夜久久久久中文字幕久| 日本aⅴ精品一区二区三区| 一本色道久久综合狠狠躁的推荐 | 99国产欧美久久久精品| 欧美精品三级在线观看| 中文字幕亚洲成人| 蜜桃久久av一区| 色噜噜狠狠一区二区三区果冻| 在线亚洲高清视频| 亚洲欧洲99久久| 久久精品99国产精品| 91麻豆国产福利在线观看| 国产精品久久毛片a| 免费成人在线影院| 欧美视频一区二| 国产亚洲综合av| 国产精品原创巨作av| 欧美高清hd18日本| 亚洲伦在线观看| 在线观看91精品国产入口| 国产女同互慰高潮91漫画| 免费xxxx性欧美18vr| 欧美疯狂做受xxxx富婆| 亚洲乱码国产乱码精品精98午夜| 高清成人免费视频| 久久先锋影音av鲁色资源| 亚洲国产精品久久人人爱|