亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91麻豆精品国产91久久久久久久久| 在线一区二区视频| 蜜臀va亚洲va欧美va天堂 | 中文字幕在线一区免费| 欧美亚日韩国产aⅴ精品中极品| 国产麻豆精品theporn| 亚洲午夜一二三区视频| 一区在线观看免费| 国产人妖乱国产精品人妖| 日韩一区二区影院| 欧美精品久久久久久久多人混战| 91丨porny丨首页| 成人午夜电影小说| 老司机免费视频一区二区三区| 午夜激情一区二区三区| 亚洲一区二区三区免费视频| 中文字幕视频一区| 久久久久久久久岛国免费| 欧美大片一区二区三区| 这里只有精品视频在线观看| 欧美丝袜丝交足nylons图片| 欧美在线观看一区| 91蜜桃网址入口| av一二三不卡影片| 99久久精品情趣| av电影在线不卡| 99久久精品国产麻豆演员表| 国产中文一区二区三区| 国模娜娜一区二区三区| 国产美女主播视频一区| 国产一区二区电影| 成人污视频在线观看| www.在线欧美| 99精品欧美一区二区蜜桃免费| 99视频一区二区| 91成人网在线| 99精品久久只有精品| 色88888久久久久久影院野外| 91片黄在线观看| 欧美综合色免费| 欧美精品在欧美一区二区少妇| 欧美精品国产精品| 日韩三级伦理片妻子的秘密按摩| 欧美一区二区国产| 久久久久久久久久美女| 国产成人免费视频网站高清观看视频| 自拍偷拍欧美激情| 一区二区成人在线视频| 亚洲地区一二三色| 欧美96一区二区免费视频| 精品一区二区三区香蕉蜜桃 | 欧美自拍丝袜亚洲| 在线区一区二视频| 在线观看不卡一区| 在线影视一区二区三区| 91精品国产综合久久香蕉的特点 | 一区二区成人在线观看| 首页欧美精品中文字幕| 国产乱码精品一区二区三区忘忧草 | 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲视频 欧洲视频| 亚洲一线二线三线视频| 亚洲国产裸拍裸体视频在线观看乱了| 日本亚洲三级在线| 成人综合在线网站| 欧美日韩二区三区| 久久久久国产精品麻豆ai换脸| 久久―日本道色综合久久| 中文字幕在线观看不卡视频| 亚洲成人av一区二区三区| 精品一区二区三区av| 91丨porny丨户外露出| 日韩精品中文字幕一区二区三区| 中文字幕一区免费在线观看| 日韩精品欧美精品| 99久久精品免费精品国产| 日韩亚洲欧美一区二区三区| 国产精品美女久久久久av爽李琼| 亚洲高清视频的网址| 国产不卡免费视频| 欧美久久久一区| 亚洲欧洲av在线| 亚洲国产va精品久久久不卡综合| 国产中文字幕精品| 欧美久久久影院| 亚洲免费观看在线视频| 国产一区二区三区免费| 欧美日韩精品电影| 成人免费在线视频观看| 久久 天天综合| 成人免费av在线| 欧美tickling网站挠脚心| 亚洲一区自拍偷拍| 99国产精品99久久久久久| 精品成a人在线观看| 亚洲国产va精品久久久不卡综合| 99久久综合99久久综合网站| 日韩欧美你懂的| 日韩精品免费专区| 3atv一区二区三区| 亚洲国产精品人人做人人爽| 色综合久久久久网| 一区二区三区在线视频观看58| 91视频在线看| 1区2区3区国产精品| 99久久精品国产一区| 日韩一区日韩二区| 99久久免费视频.com| 亚洲欧洲99久久| 97精品国产露脸对白| 一区二区中文视频| 成人91在线观看| 自拍偷自拍亚洲精品播放| 日本韩国欧美在线| 亚洲一区二区欧美日韩| 欧美高清激情brazzers| 日韩国产一区二| 日韩精品一区二区三区蜜臀| 黄色成人免费在线| 久久精品视频免费观看| 国产成人免费9x9x人网站视频| 国产精品私房写真福利视频| kk眼镜猥琐国模调教系列一区二区 | 国产欧美va欧美不卡在线| 国产精品一级二级三级| 国产精品久久看| www.视频一区| 一区二区三区在线视频观看| 欧美色倩网站大全免费| 日本午夜一本久久久综合| 欧美大片在线观看一区二区| 国产真实乱偷精品视频免| 国产精品久久久久久妇女6080| 99国产精品视频免费观看| 亚洲亚洲人成综合网络| 欧美精品第1页| 韩日av一区二区| 欧美激情一区二区在线| 日本高清无吗v一区| 奇米精品一区二区三区四区| 久久亚洲春色中文字幕久久久| 成人网在线播放| 亚洲不卡一区二区三区| 欧美一区中文字幕| 国产高清不卡一区| 亚洲一区二区在线观看视频| 日韩你懂的在线播放| 粉嫩嫩av羞羞动漫久久久| 亚洲综合丁香婷婷六月香| 日韩一区二区麻豆国产| 懂色一区二区三区免费观看| 亚洲福利一区二区三区| 精品不卡在线视频| 在线免费观看日本欧美| 国内精品自线一区二区三区视频| 最新国产精品久久精品| 欧美一区二区三区四区视频| 成人免费看视频| 水蜜桃久久夜色精品一区的特点| 国产欧美一二三区| 欧美日本在线播放| 福利一区二区在线| 日韩中文欧美在线| 中文字幕一区二区三区不卡在线| 欧美一区日韩一区| 日本精品一区二区三区四区的功能| 日本不卡一区二区三区高清视频| 国产精品国产三级国产普通话99 | 成人免费视频一区二区| 亚洲超碰精品一区二区| 国产精品欧美久久久久无广告 | 欧美视频一区在线观看| 国产不卡免费视频| 奇米一区二区三区av| 樱桃视频在线观看一区| 久久你懂得1024| 777奇米四色成人影色区| 91麻豆成人久久精品二区三区| 视频一区国产视频| 伊人婷婷欧美激情| 国产精品沙发午睡系列990531| 欧美一区二区在线观看| 欧美视频日韩视频在线观看| 成人a区在线观看| 国模冰冰炮一区二区| 日韩影院在线观看| 亚洲在线视频网站| 中文字幕在线观看不卡视频| 国产亚洲欧美一级| 日韩色在线观看| 在线成人小视频| 日本大香伊一区二区三区| 成人午夜视频网站| 国产麻豆视频精品| 六月丁香婷婷久久| 青青青爽久久午夜综合久久午夜| 亚洲福利国产精品| 亚洲影视在线播放| 一区二区三区在线高清| 亚洲精品一卡二卡|