亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
六月丁香婷婷久久| 亚洲欧洲在线观看av| 成人永久aaa| 午夜不卡av在线| 久久久高清一区二区三区| 欧美专区日韩专区| 九色综合狠狠综合久久| 亚洲综合免费观看高清完整版在线 | 美女网站色91| 亚洲免费av观看| 精品国产91洋老外米糕| 欧美在线视频不卡| 国产高清成人在线| 久久成人免费电影| 图片区小说区国产精品视频| 亚洲人成精品久久久久| 国产欧美精品一区二区三区四区| 欧美日本高清视频在线观看| 91免费视频网址| 懂色av一区二区三区免费观看| 免费三级欧美电影| 亚洲第四色夜色| 亚洲乱码中文字幕| 中文字幕一区二区三区四区不卡| 久久综合中文字幕| 精品国产乱码久久久久久久| 91精品国产高清一区二区三区| 在线观看亚洲精品视频| 一本一道综合狠狠老| 成人午夜免费视频| 精品在线一区二区| 亚洲一级在线观看| 国产精品欧美一级免费| 亚洲精品一线二线三线无人区| 日本二三区不卡| 成人国产精品视频| 国内外成人在线视频| 亚洲成人激情自拍| 亚洲免费观看高清完整版在线观看熊 | 亚洲h动漫在线| 一区在线观看免费| 国产清纯白嫩初高生在线观看91| 在线不卡的av| 精品视频在线免费| 日本韩国一区二区| 92国产精品观看| 大胆欧美人体老妇| 国产精品88av| 国模冰冰炮一区二区| 激情国产一区二区| 免费在线观看成人| 美女网站色91| 美女网站色91| 久久国产精品色| 蜜臀av在线播放一区二区三区 | 久久se这里有精品| 日本成人超碰在线观看| 欧美aaa在线| 精品一区二区综合| 麻豆免费精品视频| 午夜精品福利在线| 另类小说图片综合网| 麻豆91在线播放| 久久99精品久久只有精品| 久久成人羞羞网站| www.欧美亚洲| 欧美日韩一区二区三区免费看| 欧美色精品在线视频| 91精品国产手机| 日韩免费福利电影在线观看| 欧美电影免费观看高清完整版在线观看| 在线成人午夜影院| 欧美电影免费观看高清完整版在线| 精品少妇一区二区三区在线播放 | 《视频一区视频二区| 亚洲丝袜另类动漫二区| 一区二区高清免费观看影视大全 | 7777精品久久久大香线蕉| 欧美一区在线视频| 精品国产不卡一区二区三区| 日韩一区二区三区在线| 91精品国产色综合久久久蜜香臀| 日韩精品一区二区三区swag| 亚洲图片激情小说| 亚洲一区二区免费视频| 亚洲一二三四区| 精品一二三四区| 欧美一区二区三区免费大片| 日韩一区中文字幕| 亚洲不卡一区二区三区| 久久91精品国产91久久小草| 国产成a人亚洲精| 欧美伊人久久久久久午夜久久久久| 欧美老人xxxx18| 久久综合久色欧美综合狠狠| 国产精品无遮挡| 日本美女一区二区| 成人91在线观看| 欧美老人xxxx18| 国产欧美一区二区精品婷婷| 亚洲精品中文在线| 久久精品国内一区二区三区| 丁香五精品蜜臀久久久久99网站| 欧美在线观看视频一区二区| 久久综合九色综合欧美就去吻| 亚洲欧美偷拍卡通变态| 麻豆极品一区二区三区| 91小视频免费观看| 日韩欧美精品在线视频| 亚洲欧美乱综合| 青青草国产精品亚洲专区无| 成人精品视频一区二区三区尤物| 欧美日韩成人综合在线一区二区| 久久蜜桃一区二区| 亚洲永久免费视频| 国产高清成人在线| 777亚洲妇女| 亚洲人精品午夜| 国产专区欧美精品| 欧美在线免费观看亚洲| 国产精品嫩草久久久久| 久久av中文字幕片| 欧美午夜宅男影院| 久久先锋资源网| 亚洲一区二区美女| 99久久亚洲一区二区三区青草| 欧美电影在线免费观看| 成人免费小视频| 国产成人综合网| 欧美va亚洲va国产综合| 亚洲二区在线视频| 91污片在线观看| 精品第一国产综合精品aⅴ| 一区二区日韩电影| 国产成人精品影视| 欧美在线影院一区二区| 亚洲综合免费观看高清完整版在线| 国产91精品露脸国语对白| 日韩视频免费观看高清完整版| 亚洲已满18点击进入久久| 99re6这里只有精品视频在线观看| 久久久噜噜噜久久中文字幕色伊伊| 日韩精品一级二级| 欧美色图片你懂的| 樱花草国产18久久久久| 欧美性色综合网| 五月激情综合网| 欧美理论片在线| 三级成人在线视频| 欧美老女人第四色| 亚洲一区二区三区四区中文字幕| 色婷婷国产精品| 一个色综合网站| 色菇凉天天综合网| 一级女性全黄久久生活片免费| 91丝袜高跟美女视频| 亚洲天堂a在线| 一本久道中文字幕精品亚洲嫩 | 国产精品99久| 国产亚洲综合在线| 男女男精品视频网| 2022国产精品视频| 国产成人精品网址| 国产精品乱人伦| 91色porny蝌蚪| 国产精品久久久久一区| 色综合久久九月婷婷色综合| 一区二区三区不卡视频| 一本大道综合伊人精品热热| 一区二区在线观看av| 精品污污网站免费看| 天天免费综合色| 欧美精品乱码久久久久久按摩| 亚洲成av人在线观看| 欧美一级高清大全免费观看| 九九九久久久精品| 国产亚洲va综合人人澡精品| 成人免费高清视频在线观看| 亚洲三级电影网站| 欧美在线999| 日韩影院免费视频| 欧美大片在线观看一区二区| 韩国欧美国产1区| 国产精品热久久久久夜色精品三区| 91视频你懂的| 婷婷中文字幕一区三区| 欧美mv日韩mv亚洲| 国内精品免费**视频| 中文字幕一区二区三区四区不卡| 欧美视频一区在线| 九九国产精品视频| 亚洲美女少妇撒尿| 久久夜色精品国产欧美乱极品| 国产成人午夜视频| 日韩综合小视频| 国产蜜臀av在线一区二区三区| 欧美色网一区二区| 国产99精品视频| 五月婷婷欧美视频| 久久久久久一级片|