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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? map.java

?? 斜45度游戲《NetIntruder》
?? JAVA
字號:
package isoj2me;import java.io.*;/** * <p>isoj2me: Character</p> * This class manages Maps with load functions to read ascii map files.</p> * <p>Copyright: Copyright (c) 2006</p> * <p>License: Lesser GPL (http://www.gnu.org)</p> * <p>Company: <a href=http://www.mondonerd.com target="_blank">Mondonerd.com</a></p> * @author Massimo Maria Avvisati * @version 0.5 */public class Map {    public int[][] layers;    private int height;    private int width;    public int numberOfLayers;    public short basic_ch = 48; //This is the value used when creating empty    // layer    /**     * This method load the map files and put them into the layers array. <br>     * The filenames of a layers should be like <b>baseFilenmae <i>0 </i> </b>,     * <b>baseFilenmae <i>1 </i> </b>, ..., <b>baseFilenmae <i>numberOfLayers     * </i> </b>     *      * @param baseFilename     *            name for the map files     * @param numberOfLayers     *            number of layers to load     */    public Map(String baseFilename, int numberOfLayers) {        int[] size = getFileShape(baseFilename + "0");        this.width = size[0];        this.height = size[1];        this.numberOfLayers = numberOfLayers;        layers = new int[numberOfLayers][width * height];        for (int i = 0; i < numberOfLayers; i++) {            load(baseFilename + i, i);        }    }    /**     * Return the value stored in the map array at given position     *      * @param layer     *            layer to seek (z)     * @param x     *            x     * @param y     *            y     * @return value stored (tile)     */    public int getCell(int layer, int x, int y) {        int tile = -1;        if (layer < 0) {            layer = 0;        }        if (layer >= numberOfLayers) {            layer = numberOfLayers - 1;        }        if (layers[layer] != null) {            if (y * width + x < height * width && y * width + x >= 0) {                tile = layers[layer][y * width + x];            }        }        return tile;    }    /**     * Set the value of a cell in the layer specified     *      * @param layer     *            layer (z)     * @param x     *            x     * @param y     *            y     * @param tile     *            number that identify the tile     * @throws java.lang.Exception     */    public void setCell(int layer, int x, int y, int tile) {        if (layer < 0) {            layer = 0;        }        if (layer > numberOfLayers) {            layer = numberOfLayers - 1;        }        if (layers[layer] != null) {            if (y * width + x <= height * width && y * width + x >= 0) {                layers[layer][y * width + x] = tile;            }        }    }    /**     * This load a layer reading it from an ascii file and store it into the     * layers array     *      * @param filename     *            file to load     * @param layer     *            layer index where to store it     */    private void load(String filename, int layer) {        int ch;        int counter = 0;        Class c = this.getClass();        InputStream is = c.getResourceAsStream(filename);        try {            //InputStreamReader isr = new InputStreamReader(is);            while ((ch = is.read()) > -1) { //It read all the map file                if (ch != 10) { //If the char is not \n it store it in the map                    // array                    layers[layer][counter] = (short) ch; //The char is stored                    // as a short value                    counter++; //The next map index                }            }        } catch (Exception ex) {        	// TODO manage exception            System.out.println("Cannot read layer " + layer + ":" + ex);            for (int i = 0; i < height * width; i++) {                layers[layer][i] = basic_ch;            }        }    }    /**     * Print a readeable map of all the layers     *      * @return string to print     */    public String toString() {        String result = "(";        for (int i = 0; i < numberOfLayers; i++) {            for (int j = 0; j < (width * height); j++) {                if (j % width == 0) {                    result = result + "\n";                }                result = result + layers[i][j] + " ";            }            result = result + "-----\n";        }        result = result + ")";        return result;    } // end toString    /**     * Simply return the map width     *      * @return width     */    public int getWidth() {        return width;    }    /**     * Simply return the map height     *      * @return height     */    public int getHeight() {        return height;    }    /**     * This is a method to see the "shape" of a map     *      * @param filename     *            file to analyze     * @return an array of (width, height)     */    private int[] getFileShape(String filename) {        int counter = 0;        int counter2 = 0;        int ch = 0;        int[] size = new int[2];        Class c = this.getClass();        InputStream is = c.getResourceAsStream(filename);        try {            //InputStreamReader isr = new InputStreamReader(is);            while ((ch = is.read()) > -1) { //It read all the map file                if (ch != 10) {                    counter++; //Increments the number of chars                } else {                    counter2++; //Increments the number of lines                }            }        } catch (Exception ex) {        }        counter2++; //The last line has no break line...        size[0] = counter / counter2; //This is the "width" of the map        size[1] = counter2; //This is the "height" of the map        return size;    }    /**     * This method set null a layer. This layer will not be painted at all.     *      * @param layerNumber The layer to clear     */    public void clearLayer(int layerNumber) {        if (layerNumber > 0 && layerNumber < this.numberOfLayers) {            for (int i = 0; i < height * width; i++) {                layers[layerNumber][i] = basic_ch;            }        }    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩美女视频在线| 久久综合狠狠综合久久综合88| 国产·精品毛片| 韩国女主播成人在线| 国产在线一区二区综合免费视频| 另类成人小视频在线| 蜜臀久久久99精品久久久久久| 日韩有码一区二区三区| 午夜视频一区二区三区| 婷婷夜色潮精品综合在线| 亚洲成人tv网| 全部av―极品视觉盛宴亚洲| 美日韩黄色大片| 狠狠色狠狠色合久久伊人| 国产一区二区成人久久免费影院| 国产伦精一区二区三区| 国产成人免费高清| 99久久免费国产| 91久久国产最好的精华液| 欧美乱妇15p| 欧美不卡一区二区| 亚洲国产精品精华液ab| 亚洲免费观看高清完整版在线观看熊 | 亚洲综合精品久久| 亚洲一区二区美女| 免费观看在线色综合| 国产资源精品在线观看| 成人av免费观看| 欧美性三三影院| 日韩欧美色综合| 欧美激情艳妇裸体舞| 亚洲黄色小说网站| 蜜桃在线一区二区三区| 国产成人在线看| 色拍拍在线精品视频8848| 欧美日本韩国一区| 精品国产亚洲在线| 亚洲色图欧洲色图婷婷| 天天色天天爱天天射综合| 极品美女销魂一区二区三区| 99久久精品免费观看| 精品视频免费看| 2021久久国产精品不只是精品 | 久久99国产精品久久99果冻传媒| 国产精品12区| 欧美性猛片xxxx免费看久爱| 精品人伦一区二区色婷婷| 国产白丝精品91爽爽久久 | 国产香蕉久久精品综合网| 国产精品传媒入口麻豆| 日韩主播视频在线| 成人午夜在线视频| 制服丝袜亚洲精品中文字幕| 日本一区二区电影| 天堂va蜜桃一区二区三区漫画版| 风间由美一区二区av101| 欧美三级韩国三级日本三斤 | 亚洲一区免费视频| 国产在线精品视频| 欧美日韩一区二区在线观看| 国产午夜精品理论片a级大结局| 亚洲国产日韩av| 丁香啪啪综合成人亚洲小说| 91精品国产综合久久久久久久久久| 国产精品剧情在线亚洲| 久久国产精品色婷婷| 91传媒视频在线播放| 国产免费观看久久| 久久国产精品第一页| 欧美午夜理伦三级在线观看| 中文字幕在线一区免费| 久草中文综合在线| 欧美日韩国产成人在线免费| 日韩理论片一区二区| 国产一区二区福利| 日韩一区二区电影在线| 亚洲国产精品自拍| 99久久婷婷国产综合精品电影| 2024国产精品视频| 美女免费视频一区| 欧美卡1卡2卡| 亚洲国产综合人成综合网站| av不卡在线播放| 国产欧美精品一区二区色综合 | 麻豆免费精品视频| 欧美肥妇毛茸茸| 一区二区成人在线| 99久久精品免费看| 中文字幕av一区二区三区高| 精品一区二区三区视频| 日韩一区二区三区免费观看| 亚洲午夜国产一区99re久久| 日本丶国产丶欧美色综合| 综合欧美亚洲日本| 91亚洲精品久久久蜜桃网站| 国产精品网站在线| 国产91精品在线观看| 久久久久国产精品麻豆ai换脸| 狠狠色丁香久久婷婷综| 亚洲精品在线观看视频| 麻豆成人久久精品二区三区红 | 日韩高清欧美激情| 欧美日韩国产精选| 日日夜夜一区二区| 日韩欧美高清dvd碟片| 日本一区中文字幕| 欧美一区午夜视频在线观看| 美女诱惑一区二区| 欧美videos大乳护士334| 蜜桃视频在线一区| 欧美xxxxxxxx| 国产美女在线精品| 国产午夜精品久久| 不卡的av在线| 亚洲主播在线播放| 欧美日韩久久久久久| 日韩激情视频在线观看| 日韩一二三区视频| 国产一区二区三区日韩| 国产色产综合色产在线视频| 国产成人自拍网| 国产精品久久久久久久久免费樱桃 | 久久亚区不卡日本| 国产成人日日夜夜| 国产精品二区一区二区aⅴ污介绍| av欧美精品.com| 亚洲综合色自拍一区| 91精品国产综合久久久久久漫画 | 欧美蜜桃一区二区三区| 九九视频精品免费| 国产精品成人午夜| 欧美日韩另类一区| 国产在线精品免费| 国产精品久久久久aaaa| 欧美三级视频在线| 狠狠色丁香婷综合久久| 成人免费在线视频| 91精品国产综合久久蜜臀| 国产精品资源网站| 亚洲欧美色一区| 欧美一级国产精品| 成人小视频在线| 婷婷综合久久一区二区三区| 久久精品人人做人人爽97| 色噜噜狠狠成人中文综合| 麻豆精品一二三| 日韩美女久久久| 日韩欧美一区中文| 成人av先锋影音| 日本欧美加勒比视频| 国产精品入口麻豆原神| 在线播放中文一区| 高清在线成人网| 日本视频中文字幕一区二区三区| 国产欧美一区二区三区鸳鸯浴| 欧美在线观看视频一区二区三区 | 亚洲精品一区二区在线观看| 国产精品免费视频网站| 欧美日韩国产一级片| 岛国精品在线播放| 日日夜夜免费精品| 亚洲欧洲av另类| 日韩欧美精品三级| 91丝袜美腿高跟国产极品老师| 奇米精品一区二区三区在线观看| 国产欧美精品一区| 欧美顶级少妇做爰| 91一区二区在线| 国产精华液一区二区三区| 亚洲第一成人在线| 日韩一区中文字幕| 26uuu亚洲| 在线不卡中文字幕| 色综合色综合色综合色综合色综合 | 日本特黄久久久高潮| 亚洲免费观看高清完整版在线观看 | 欧美精品久久久久久久多人混战 | 国产精品视频yy9299一区| 日韩一区二区免费视频| 色拍拍在线精品视频8848| 福利视频网站一区二区三区| 久久成人久久爱| 日韩成人免费看| 夜夜爽夜夜爽精品视频| 国产精品国产自产拍高清av| 2020国产精品久久精品美国| 日韩一区二区三区观看| 欧美日韩性生活| 在线影视一区二区三区| 91蜜桃网址入口| 成人av电影观看| 国产成人免费视频网站高清观看视频| 久久不见久久见中文字幕免费| 亚洲一二三区视频在线观看| 亚洲欧美日韩一区| 中文成人综合网| 国产精品久久久一本精品 | 精品99久久久久久| 精品少妇一区二区三区| 日韩一区和二区|