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

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

?? tools.java

?? 大量j2me源代碼
?? JAVA
字號:
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Graphics;
import java.util.Random;

/**
 * A bunch of static tools.
 * @author Martin J. Wells
 */
public final class Tools
{
   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;
   }

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

   /**
   * 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 (SLOW)
    */
   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;
   }

   /**
    * Returns true if point p is wholly within rectangle (x, y, w, h)
    */
   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一区二区三区免费野_久草精品视频
欧美欧美午夜aⅴ在线观看| 国产三级一区二区| 亚洲精品你懂的| 99re这里只有精品6| 国产日韩v精品一区二区| 精品一区二区免费在线观看| 在线播放91灌醉迷j高跟美女| 亚洲乱码精品一二三四区日韩在线| 国产一区二区精品久久91| 久久美女艺术照精彩视频福利播放| 老司机免费视频一区二区| 日韩精品一区在线观看| 奇米精品一区二区三区四区| 91精品国产综合久久久久久久久久| 亚洲国产精品欧美一二99| 欧美二区三区91| 开心九九激情九九欧美日韩精美视频电影| 777色狠狠一区二区三区| 久久se精品一区精品二区| 亚洲国产经典视频| 欧美三日本三级三级在线播放| 亚洲午夜久久久久| 26uuu精品一区二区| 97精品久久久久中文字幕| 五月天亚洲精品| 国产欧美日韩中文久久| 欧美高清一级片在线| 国产电影一区在线| 日韩精品免费视频人成| 中文字幕成人av| 欧美本精品男人aⅴ天堂| 成人av网在线| 国产剧情av麻豆香蕉精品| 亚洲国产精品欧美一二99| 国产女人水真多18毛片18精品视频| 日本精品一区二区三区四区的功能| 麻豆精品一区二区综合av| 亚洲伦理在线精品| 国产精品久久久久一区| 欧美成人a在线| 91精品国产高清一区二区三区蜜臀| 成人中文字幕合集| 裸体在线国模精品偷拍| 亚洲午夜精品久久久久久久久| 亚洲国产高清在线观看视频| 精品久久一二三区| 日韩女优av电影在线观看| 在线成人免费观看| 欧美精品三级日韩久久| 欧美日韩一级二级| 欧美丝袜丝交足nylons图片| 91免费国产在线| 99久久精品国产观看| 97久久人人超碰| 欧洲亚洲精品在线| 欧美群妇大交群的观看方式| 在线观看亚洲成人| 欧美日韩精品一区二区| 欧美日韩一区二区三区四区五区 | 成人免费在线视频| 亚洲激情在线播放| 亚欧色一区w666天堂| 调教+趴+乳夹+国产+精品| 日本不卡一区二区三区 | 国产精品综合一区二区| 成人一区二区三区视频在线观看| 成人中文字幕在线| 欧美片在线播放| 亚洲精品在线网站| 亚洲视频一二三| 午夜精品福利一区二区三区蜜桃| 国模娜娜一区二区三区| a亚洲天堂av| 欧美一区二区三区日韩视频| 精品成人私密视频| 亚洲国产精品一区二区久久恐怖片 | 欧洲视频一区二区| 日韩一级片在线观看| 国产精品久久久99| 亚洲成人在线网站| 91亚洲精华国产精华精华液| 欧美一区二区人人喊爽| 亚洲欧美日韩在线播放| 国精产品一区一区三区mba视频 | 欧美精品亚洲二区| 中文字幕一区二区三| 麻豆传媒一区二区三区| 在线观看av一区二区| 国产精品青草综合久久久久99| 亚洲午夜成aⅴ人片| 色婷婷久久久亚洲一区二区三区| 精品国产电影一区二区| 日韩激情一区二区| 欧美老女人在线| 亚洲丝袜精品丝袜在线| 不卡视频一二三四| 国产三级精品三级| 国产乱理伦片在线观看夜一区| 日韩免费福利电影在线观看| 亚洲成人三级小说| 欧美日韩一本到| 国产不卡视频在线播放| 91精品国产综合久久香蕉的特点| 一区二区三区在线视频免费观看| 91论坛在线播放| 亚洲女爱视频在线| 欧美日韩一区小说| 日本欧美一区二区三区乱码| 日韩一区二区在线免费观看| 日本在线不卡一区| 国产欧美一区二区三区网站| 国产精品主播直播| 亚洲青青青在线视频| 欧美乱熟臀69xxxxxx| 捆绑紧缚一区二区三区视频| 2017欧美狠狠色| 91色九色蝌蚪| 欧美aaa在线| 国产三级一区二区三区| 91农村精品一区二区在线| 洋洋成人永久网站入口| 日韩一区二区三区精品视频| 国产乱码精品一品二品| 亚洲大片精品永久免费| 久久综合九色综合97婷婷| 欧美中文字幕一区二区三区| 久久色成人在线| 天天色 色综合| 69精品人人人人| 久久精品国产99久久6| 中文字幕乱码日本亚洲一区二区| 91色九色蝌蚪| 国产**成人网毛片九色| 日本亚洲视频在线| 亚洲欧洲日韩一区二区三区| 日韩精品中文字幕在线不卡尤物| a4yy欧美一区二区三区| 国产精品一区二区在线播放| 亚洲第一精品在线| 1024成人网色www| 久久日韩粉嫩一区二区三区| 这里只有精品电影| 欧美久久久久久久久中文字幕| 91在线观看下载| 成人午夜视频网站| 丁香激情综合国产| 粉嫩一区二区三区性色av| 极品少妇一区二区| 久久av中文字幕片| 国产一区二区网址| 久久99久久精品欧美| 激情综合亚洲精品| 国模冰冰炮一区二区| 不卡一区在线观看| 91视频一区二区| 欧美三区在线观看| 欧美一二三四区在线| 日韩精品专区在线| 国产午夜精品美女毛片视频| 亚洲国产激情av| 亚洲精品亚洲人成人网 | 欧美美女激情18p| 欧美一级午夜免费电影| 久久亚洲精华国产精华液| 欧美高清在线精品一区| 亚洲日本欧美天堂| 日本成人超碰在线观看| 国产成人免费视频一区| 色香色香欲天天天影视综合网| 欧美酷刑日本凌虐凌虐| 国产日产亚洲精品系列| 亚洲精品国产无天堂网2021| 久久国产精品99久久久久久老狼 | 激情图区综合网| 欧美最猛性xxxxx直播| 久久综合狠狠综合久久激情| 综合中文字幕亚洲| 国产九色精品成人porny| 欧美视频你懂的| 国产精品久久久久毛片软件| 琪琪久久久久日韩精品| 在线视频欧美精品| 国产精品情趣视频| 九色porny丨国产精品| 欧美在线999| 亚洲图片自拍偷拍| 99久久精品99国产精品| 日本一区二区三区dvd视频在线| 水蜜桃久久夜色精品一区的特点| 国产精品88av| 久久午夜免费电影| 蜜桃视频一区二区三区 | 色婷婷av一区二区三区大白胸| 精品国精品自拍自在线| 日本中文字幕不卡| 欧美日韩精品欧美日韩精品| 亚洲一区在线视频| 欧美色图在线观看| 欧美a级理论片| 欧美精品一区二区蜜臀亚洲|