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

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

?? helper.java

?? 一款模擬飛行類游戲的Java源代碼
?? JAVA
字號:
/*  Bomber for Nokia Series 60 Phones    Copyright (C) 2003, 2004  While True, d.o.o.    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA	    For any info contact gorazd@whiletrue.com.*//*==========================================================================; * *  While True, d.o.o. *	 *  File:       Helper.java *  Content:    Helper class *  Created:    December 2002 *  Created by: gorazd breskvar * ****************************************************************************/package bomber;import javax.microedition.lcdui.*;// =========================================================================;//	Name:	Helper class (static functions only)//	Desc:	Contains helper methods, that are used in the code// ==========================================================================;public class Helper  {    private Helper(){}       // we cannot create instance of this object    private static int m_press_any_key_counter = 0;    final static public int PRESS_ANY_KEY_BLINK_RATE = 1000;    static private int g_text_blink = 1000;    static public BitmapFont font;    static public ResourceManager resource_manager;        // =========================================================================;//	Name:	void drawPressAnyKey(Graphics g, int y, int width, byte color)//	Desc:	draws (blinking) "press any key" string//              handlePressAnyKey must be called periodically for this//              method to work.    // ==========================================================================;        public static void drawPressAnyKey(Graphics g, int y, int width, byte color)    {            if (g_text_blink < PRESS_ANY_KEY_BLINK_RATE / 2)            {                font.setSubFont(color);                int px = -font.getStringWidth(Str.press_any_key)/2 + width/2;                font.drawString(g, px, y, Str.press_any_key);            }    }        public static void handlePressAnyKey(int delta)    {        g_text_blink = (int)(g_text_blink + delta) % PRESS_ANY_KEY_BLINK_RATE;    }    // =========================================================================;//	Name:	void resetClip(Graphics g)//	Desc:	Resets clipping to full screen. There are some bugs with//              clipping, for example on 7650    // ==========================================================================;        public static void resetFullScreenClip(Graphics g)    {                g.setClip(0, 0, ResourceManager.CANVAS_WIDTH, ResourceManager.CANVAS_HEIGHT);    }    // =========================================================================;//	Name:	void drawStringCenter(Graphics g, String s, int y, //              int width, byte color)//	Desc:	Draws string in specific color. String is displayed in the//              horizontal center of the screen    // ==========================================================================;          public static void drawStringCenter(Graphics g, String s, int y, int width, byte color)    {                font.setSubFont(color);                int px = -font.getStringWidth(s) / 2 + width/2;                font.drawString(g, px, y, s);    }    // =========================================================================;//	Name:	void drawStringLeft(Graphics g, String s, int x, //              int y, byte color)//	Desc:	Draws string in specific color. String is displayed left//              aligned    // ==========================================================================;          public static void drawStringLeft(Graphics g, String s, int x, int y, byte color)    {                font.setSubFont(color);                int px = x - font.getStringWidth(s);                font.drawString(g, px, y, s);    }        // =========================================================================;//	Name:	void drawMenu(Graphics g, String[] s, int y, //              int width, int selected)//	Desc:	Draws menu// ==========================================================================;          public static void drawMenu(Graphics g, String[] s, int x, int y, int selected)    {        for (int i = 0; i < s.length; i++)        {            //int color = 0xC0AD92;            int color = 0x808080;            if (i != selected)            {                drawString(g, s[i], x, y, ResourceManager.FONT_YELLOW);                            }            else            {                drawString(g, s[i], x, y, ResourceManager.FONT_GREEN);                color = ResourceManager.c_warm_colors[(i + 1) % ResourceManager.c_warm_colors.length];            }            drawBox(g, x - 14, y, color);                        y += font.getCharHeight() + 4;        }            }        // =========================================================================;//	Name:	void drawStringListCenter(Graphics g, String[] s, //              int y, int width, byte color)//	Desc:	Draws multiple lines of horizontally centered strings.// ==========================================================================;          public static void drawStringListCenter(Graphics g, String[] s, int y, int width, byte color)    {        font.setSubFont(color);        for (int i = 0; i < s.length; i++)        {            int px = -font.getStringWidth(s[i]) / 2 + width/2;            font.drawString(g, px, y, s[i]);            y += font.getCharHeight() + 2;        }    }    // =========================================================================;//	Name:	void drawText(Graphics g, String s, //              int x, int y, int width, int height)//	Desc:	draws text into given rectangle// ==========================================================================;          public static void drawText(Graphics g, Font f, String s, int x, int y, int width, int height, int scroll_y)    {        g.setFont(f);        g.setClip(x, y, width, height);        y -= scroll_y;        int orig_x = x;        int orig_y = y;        int pos = 0;        int next_pos;        int word_end = 0;        boolean flag = true;        boolean eol = false;        while (pos < s.length())        {            if (y > orig_y + height)             {                resetFullScreenClip(g);                return;            }            int tmp = s.indexOf(" ", pos);            if (tmp == -1)             {                word_end = s.length() - 1;                flag = true;            }            else word_end = tmp;            next_pos = word_end + 1;                        tmp = s.indexOf("\n", pos);            if (tmp != -1 && tmp < word_end)            {                eol = true;                word_end = tmp - 1;                next_pos = tmp + 1;            }                        tmp = f.substringWidth(s, pos, word_end - pos + 1);            if (x + tmp > orig_x + width)            {                x = orig_x;                y += f.getHeight() + 2;                eol = false;            }                        g.drawSubstring(s, pos, word_end - pos + 1, x, y, Graphics.TOP | Graphics.LEFT);            x += tmp;            if (eol)            {                x = orig_x;                y += f.getHeight() + 2;                eol = false;            }            pos = next_pos;        }        resetFullScreenClip(g);    }        // =========================================================================;//	Name:	void drawString(Graphics g, String s, //              int x, int y, byte color)//	Desc:	Draws string on specific position// ==========================================================================;              public static void drawString(Graphics g, String s, int x, int y, byte color)    {                font.setSubFont(color);                font.drawString(g, x, y, s);    } // =========================================================================;//	Name:	void drawString(Graphics g, String s, //              int x, int y, byte color)//	Desc:	Draws string on specific position// ==========================================================================;               public static void drawScoreBoard(Graphics g, int y, int score, int lives, int bombs)     {         resource_manager.getScoreBoard().drawImage(g, 0, 0, y);         y += 3;         drawScore(g, score, 3, y);                  for (int i = 0; i < 5; i++)         {             resource_manager.getScoreBoardSymbols().drawImage(g, i >= bombs ? 11 : 10, 60 + i * 10, y);         }         for (int i = 0; i < 5; i++)         {             resource_manager.getScoreBoardSymbols().drawImage(g, i >= lives ? 13 : 12, 126 + i * 10, y);         }     }    // =========================================================================;//	Name:	void drawScore(Graphics g, int score, //              int x, int y)//	Desc:	Displays score (max 5 digits) with specific score fonts.// ==========================================================================;           public static void drawScore(Graphics g, int score, int x, int y)    {         for (int i = 0; i < 5; i++)         {             int num = score % 10;             score /= 10;             resource_manager.getScoreBoardSymbols().drawImage(g, num, x + (4 - i) * 7, y);         }     }        public static void drawIconAboveObject(Graphics g, GameObject go, Drawable icon, int index, int x, int y)    {            icon.drawImage(g, index, Common.toInt(go.getPos().x - x), Common.toInt(go.getPos().y - y - go.getRadius()));    }            public static void drawIndicator(Graphics g, int x, int y, GameObject go, int s_x, int s_y, int s_x1, int s_y1)    {            int r = Common.ceilInt(go.getRadius());            int c_x = Common.toInt(go.getPos().x - x);            int c_y = Common.toInt(go.getPos().y - y);                        int d_x, d_y;                        byte x_index = 0;            byte y_index = 0;                                    if (c_x < s_x - r)             {                d_x = s_x;                x_index = (byte)-1;            }            else if (c_x > s_x1 + r)             {                d_x = s_x1;                x_index = (byte)1;            }            else d_x = c_x;                        if (c_y < s_y - r)             {                d_y = s_y;                y_index = (byte)-1;            }            else if (c_y > s_y1 + r)             {                d_y = s_y1;                y_index = (byte)1;            }            else d_y = c_y;                        int index;  // icon direction index            if (x_index == 0 && y_index == 0) return;   // object on screen            else if (x_index == 0 && y_index == 1) index = 2;            else if (x_index == 1 && y_index == 0) index = 0;            else if (x_index == 1 && y_index == 1) index = 1;            else if (x_index == 0 && y_index == -1) index = 6;            else if (x_index == -1 && y_index == 0) index = 4;            else if (x_index == -1 && y_index == -1) index = 5;            else if (x_index == 1 && y_index == -1) index = 7;            //else if (x_index == -1 && y_index == 1) index = 3;            else index = 3;                                                resource_manager.getIndicator().drawImage(g, index, d_x, d_y);    }             public static void drawNumber(Graphics g, int number, int x, int y, int fixed_places)    {        String s = Integer.toString(number);        fixed_places = Math.max(fixed_places - s.length(), 0);        Drawable symbols = resource_manager.getScoreBoardSymbols();        for (int i = 0; i < fixed_places; i++)         {             symbols.drawImage(g, 0, x, y);             x += symbols.getWidth(0);         }                  for (int i = 0; i < s.length(); i++)         {             int num = s.charAt(i) - '0';             symbols.drawImage(g, num, x, y);             x += symbols.getWidth(num);                      }     }                public static void drawBox(Graphics g, int x, int y, int color)    {        g.setColor(0);        g.drawRect(x,y, 10, 10);        g.setColor(color);        g.fillRect(x + 1, y + 1, 9, 9);    }            }    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产系列| 91精品国产高清一区二区三区| 日本电影亚洲天堂一区| 欧美成人video| 亚洲.国产.中文慕字在线| 福利视频网站一区二区三区| 6080午夜不卡| 亚洲女性喷水在线观看一区| 国产精品亚洲午夜一区二区三区| 欧美日韩一区二区三区四区| 国产精品成人网| 国产成人免费在线视频| 日韩欧美亚洲一区二区| 天堂午夜影视日韩欧美一区二区| av激情综合网| 日本一区二区三区四区在线视频| 麻豆精品在线播放| 69堂国产成人免费视频| 天堂成人国产精品一区| 欧美亚洲国产一区二区三区va| 亚洲欧美日韩国产一区二区三区| 丁香天五香天堂综合| 久久久久久夜精品精品免费| 蓝色福利精品导航| 日韩欧美高清dvd碟片| 麻豆成人免费电影| 欧美电视剧在线看免费| 麻豆国产精品777777在线| 日韩欧美一区在线| 久久激情综合网| 日韩一二三区不卡| 另类小说视频一区二区| 欧美一卡2卡三卡4卡5免费| 天天色综合天天| 欧美一区二区精美| 精品一区二区在线免费观看| 久久久久久亚洲综合影院红桃 | 午夜激情一区二区| 欧美喷水一区二区| 久久精品噜噜噜成人88aⅴ| 精品国产99国产精品| 国产乱码精品一区二区三区av| 久久久亚洲午夜电影| 成人动漫在线一区| 亚洲曰韩产成在线| 日韩色视频在线观看| 国产成人久久精品77777最新版本| 国产日本亚洲高清| 91免费国产在线| 五月婷婷欧美视频| 精品久久久久av影院| 丁香五精品蜜臀久久久久99网站| 亚洲欧美激情小说另类| 欧美一区二区大片| 成人av动漫网站| 午夜电影一区二区| 久久综合九色综合欧美亚洲| 99久久婷婷国产综合精品| 一二三四社区欧美黄| 精品国产亚洲在线| 99re这里都是精品| 久草中文综合在线| 亚洲欧美影音先锋| 日韩视频一区二区三区在线播放| av在线免费不卡| 日本视频中文字幕一区二区三区| 国产性色一区二区| 在线不卡欧美精品一区二区三区| 国产成人一区在线| 日韩影院在线观看| 综合激情网...| 2023国产精品自拍| 欧美性受极品xxxx喷水| 国产老肥熟一区二区三区| 亚洲va天堂va国产va久| 日本一区二区三区电影| 欧美一区二区三区免费大片| 99久久精品久久久久久清纯| 久久精品久久精品| 亚洲午夜久久久久久久久电影网| 久久先锋影音av| 3atv一区二区三区| 色综合久久中文综合久久牛| 国产一区二区三区免费| 日韩成人一级片| 亚洲在线一区二区三区| 中文字幕一区二区日韩精品绯色| 精品国产亚洲在线| 欧美一级黄色片| 欧美日韩国产片| 色视频欧美一区二区三区| 丰满亚洲少妇av| 狠狠色丁香婷婷综合| 日韩精品国产精品| 亚洲成人一二三| 亚洲高清免费在线| 亚洲精品乱码久久久久久| 国产精品麻豆视频| 国产欧美综合在线观看第十页| 精品日韩在线一区| 日韩午夜激情av| 日韩欧美电影一二三| 日韩欧美你懂的| 日韩欧美成人激情| 欧美成人综合网站| 精品少妇一区二区| 久久这里只有精品首页| www久久久久| 国产女人aaa级久久久级| 欧美精品一区二区三区蜜桃| 精品久久久久久久久久久久久久久久久 | 91精品国产色综合久久不卡电影| 色综合久久天天综合网| 一本色道久久加勒比精品| 99久久久久久99| 色婷婷综合久久久久中文| 91啪在线观看| 欧美日韩专区在线| 欧美精品乱码久久久久久按摩 | 久久国产精品免费| 九一九一国产精品| 国产在线精品一区二区三区不卡 | 精品一区二区三区免费毛片爱| 韩国女主播一区二区三区| 国产麻豆91精品| www.日韩av| 欧美特级限制片免费在线观看| 欧美久久久影院| 欧美一级日韩免费不卡| 亚洲精品一区二区三区在线观看| 久久精品欧美日韩精品| 中文欧美字幕免费| 一二三四社区欧美黄| 日韩精品91亚洲二区在线观看| 日本午夜一本久久久综合| 国产自产2019最新不卡| 97国产一区二区| 欧美精品高清视频| 亚洲国产精品成人综合 | 欧美人妇做爰xxxⅹ性高电影| 日韩亚洲欧美成人一区| 国产日韩精品一区二区三区| 亚洲情趣在线观看| 日韩精品91亚洲二区在线观看 | 一区二区三区四区激情| 日韩 欧美一区二区三区| 粉嫩在线一区二区三区视频| 欧美色偷偷大香| 精品国一区二区三区| 亚洲欧美色图小说| 蜜桃在线一区二区三区| 波多野结衣中文字幕一区| 欧美精品久久久久久久多人混战| 亚洲国产高清aⅴ视频| 亚洲福利视频导航| 粉嫩av亚洲一区二区图片| 欧美喷水一区二区| 日韩码欧中文字| 精品一区二区三区免费毛片爱| 在线精品视频免费播放| 欧美成人艳星乳罩| 亚洲一区二区三区小说| 国产精品一区二区三区网站| 欧美猛男超大videosgay| 中文字幕免费不卡在线| 激情综合网激情| 欧美乱妇23p| 亚洲精品成人在线| 成人avav影音| 久久精品在线免费观看| 日韩av不卡在线观看| 欧美性xxxxx极品少妇| 国产精品美女久久久久久久久| 蜜芽一区二区三区| 精品视频1区2区| 国产精品久久久久久久久快鸭| 极品少妇一区二区| 日韩一区二区三区在线视频| 亚洲成人自拍偷拍| 91影院在线免费观看| 中文字幕不卡一区| 国内成人自拍视频| 欧美精品一区二区三区在线| 青草av.久久免费一区| 欧美日韩亚洲国产综合| 一区二区日韩av| 欧美伊人精品成人久久综合97 | 亚洲视频一区在线观看| 成人av集中营| 日韩一区在线播放| 99久久99久久综合| 成人免费在线视频观看| jlzzjlzz亚洲日本少妇| 国产精品无遮挡| av一区二区久久| 亚洲视频资源在线| 91麻豆swag| 亚洲狠狠爱一区二区三区| 欧美在线观看一区| 亚洲成年人网站在线观看|