⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maincanvas.java

📁 超精典手机版Call of Duty(使命的召唤)
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
// FrontEnd Plus GUI for JAD
// DeCompiled : mainCanvas.class
import com.nokia.mid.sound.Sound;
import com.nokia.mid.ui.FullCanvas;
import java.io.*;
import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreNotFoundException;

class mainCanvas extends FullCanvas
{

    private COD cod;
    private static final short LEFT_SOFTKEY = -6;
    private static final short RIGHT_SOFTKEY = -7;
    private static final int pagemargin = 4;
    private static final int ROWMAX = 128;
    private static final int COLMAX = 11;
    private static final int MAP_HEIGHT = 2048;
    private static final int MAP_WIDTH = 176;
    private static final int SCREEN_MARGIN = 55;
    private static final int SCREEN_SPEED_MAX = 6;
    private static final int PLAYER_MAX = 3;
    private static final int OPPONENT_MAX = 42;
    private static final int SPECIAL_MAX = 40;
    private static final int SQUARE_MAX = 30;
    private static final int PROJECTILE_MAX = 40;
    private static final int PROJECTILE_TIME_MAX_BULLET = 16;
    private static final int PROJECTILE_TIME_MAX_GRENADE = 8;
    private static final int PROJECTILE_TIME_MAX_EXPLOSIVES = 38;
    private static final int PROJECTILE_TIME_MAX_RIFLE = 2;
    private static final int EXPLOSION_FRAMES = 4;
    private static final int SMOKE_FRAMES = 14;
    private static final int DEATH_FRAMES = 30;
    private static final int SHOT_DELAY_AXIS = 20;
    private static final int SHOT_DELAY_AI = 10;
    private static final int SHOT_DELAY_GRENADE = 10;
    private static final int SHOT_DELAY_RIFLE = 10;
    private static final int SHOT_DELAY_EXPLOSIVES = 10;
    private static final int HEALING_DELAY = 60;
    private static final int FLAK_JACKET_TIME = 180;
    private static final int INITIAL_AMMO[] = {
        10, 5, 5
    };
    private static final int INITIAL_HEALTH[] = {
        2, 1, 3, 2, 3
    };
    private static final int SHOW_STATUS_TIME = 60;
    private static final int STATUS_BAR_WIDTH = 66;
    private static final int STATUS_BAR_HEIGHT = 14;
    private static final int SHOW_ORDERS_TIME = 50;
    private static final int INVISIBILITY_TIME = 180;
    private static final short screen_splash = 0;
    private static final short screen_menu = 1;
    private static final short screen_play = 2;
    private static final short screen_rules_menu = 3;
    private static final short screen_options = 4;
    private static final short screen_options_ingame = 5;
    private static final short screen_mission = 6;
    private static final short screen_briefing = 7;
    private static final short screen_briefing_no_back = 8;
    private static final short screen_squad_select = 9;
    private static final short screen_squad_confirm = 10;
    private static final short screen_end_level = 11;
    private static final short screen_player_dead = 12;
    private static final short screen_reset_confirm = 13;
    private static final short screen_exit = 14;
    private static final short timer_loop = 0;
    private static final short timer_splash = 1;
    private static final short timer_menu_anim = 2;
    private static final short timer_suspend_key_presses = 3;
    private static final int DELAY_LOOP = 50;
    private static final int DELAY_SPLASH_ACTIVISION = 2500;
    private static final int DELAY_SPLASH_NGAME = 2000;
    private static final int DELAY_SPLASH_TITLE = 3000;
    private static final int DELAY_ANIM = 100;
    private static final int DELAY_SUSPEND = 750;
    private static final int TEXTURE_GRASS = 0;
    private static final int TEXTURE_TREE_TOP = 26;
    private static final int TEXTURE_WINDOW = 28;
    private int height;
    private int width;
    private int halfHeight;
    private int halfWidth;
    private short fontHeight;
    private short largeFontHeight;
    private Font font;
    private Font largeFont;
    private Timer timer;
    private SimpleTimerTask simpletimertask;
    private short screenType;
    private int missionNumberCurrent;
    private byte missionNumberMax;
    private static final int MISSION_COUNT = 9;
    private boolean endLevel;
    private Image tilesImage;
    private Image unitImage;
    private Image enemyImage;
    private Image screenImage;
    private Image specialImage;
    private Image craterImage;
    private Image smokeImage;
    private Image explosionImage;
    private Image symbolsImage;
    private Image statusBar;
    private Image splashImage;
    private Image titleImage;
    private Image selectImage;
    private Image arrowsImage;
    private Image menuImage;
    private short menuStart;
    private short menuLines;
    private short menuGraphicHeight;
    private short menuLineHeight;
    private short menuLength;
    private short menuSelection;
    private String menuStringArray[];
    private Graphics screenImageGraphics;
    private int screenImageLeft;
    private int screenImageTop;
    private int screenImageHeight;
    private int screenSplit;
    private int screenImageDiscontinuity;
    private int projectileArrayNext[];
    private int projectileArrayUsedStart;
    private int projectileArrayUnusedStart;
    private int projectileX[];
    private int projectileY[];
    private int projectileDirection[];
    private int projectileTime[];
    private int projectileType[];
    private int opponentArrayStart;
    private int playerArrayNext[];
    private int playerArrayStart;
    private int currentPlayer;
    private boolean takeCover;
    private int playerX[];
    private int playerY[];
    private int playerDirection[];
    private boolean playerMoving[];
    private int playerHealth[];
    private int playerNextShot[];
    private int playerAimX[];
    private int playerAimY[];
    private int playerType[];
    private int playerSpecial[];
    private int playerProtected[];
    private boolean playerInBuilding[];
    private int playerShowStatus[];
    private int specialArrayNext[];
    private int specialArrayPrevious[];
    private int specialArrayStart;
    private int specialArrayExplodableStart;
    private int specialX[];
    private int specialY[];
    private int specialType[];
    private int specialDamage[];
    private int squarePlayer[];
    private int squareRow[];
    private int squareCol[];
    private int squareMax;
    private int currentKeyCode;
    private int nextKeyCode;
    private int frameCount;
    private int clockTicks;
    private int showOrders;
    private boolean soundOn;
    private boolean allowKeyPresses;
    private Random random;
    private byte soundWAV[];
    private Sound sound;
    private int missionTime[];
    private long startTime;
    private final boolean is3650 = getGameAction(35) == 8;
    private final int CHANGE_ORDERS;
    private int MapData[][];
    private int TileTextureData[];
    private int TileBlockData[];
    private int TileSpecialData[];
    private static final int PLAYER_INFANTRY = 0;
    private static final int PLAYER_SNIPER = 1;
    private static final int PLAYER_ENGINEER = 2;
    private static final int PLAYER_COMMANDO = 3;
    private static final int PLAYER_MEDIC = 4;
    private static final int SPECIAL_TANK = 0;
    private static final int SPECIAL_JEEP = 1;
    private static final int SPECIAL_V2 = 2;
    private static final int SPECIAL_GENERATOR = 3;
    private static final int SPECIAL_DOOR = 4;
    private static final int SPECIAL_FLAK_JACKET = 5;
    private static final int SPECIAL_MEDIPACK = 6;
    private static final int SPECIAL_AMMUNITION = 7;
    private static final int SPECIAL_END = 8;
    private static final int SPECIAL_BACK_DOOR = 9;
    private static final int SPECIAL_GFX_X[] = {
        0, 0, 32, 80, 80, 0, 16, 32
    };
    private static final int SPECIAL_GFX_Y[] = {
        0, 32, 32, 0, 64, 64, 64, 64
    };
    private static final int SPECIAL_GFX_W[] = {
        64, 32, 16, 64, 32, 16, 16, 16, 16, 32
    };
    private static final int SPECIAL_GFX_H[] = {
        32, 32, 32, 64, 16, 16, 16, 16, 16, 16
    };
    private static final int CRATER_GFX_X[] = {
        0, 0, 32, 0, 32
    };
    private static final int CRATER_GFX_Y[] = {
        0, 32, 48, 0, 32
    };
    private static final int CRATER_GFX_W[] = {
        64, 32, 16, 64, 32
    };
    private static final int CRATER_GFX_H[] = {
        32, 32, 32, 32, 16
    };
    private static final int CRATER_DRAW_Y[] = {
        0, 0, 16, 23, 0
    };
    private static final int EXPLOSIVES_GFX_X = 48;
    private static final int EXPLOSIVES_GFX_Y = 32;
    private static final int FLAG_GFX_X = 48;
    private static final int FLAG_GFX_Y = 48;
    private static final int SECONDARY_GFX_X = 64;
    private static final int FLAK_JACKET_GFX_X = 82;
    private static final int DAGGER_GFX_X = 72;
    private static final int DAGGER_GFX_Y = 6;
    private static final int GUNFLARE_GFX_X = 74;
    private static final int GUNFLARE_GFX_Y = 15;
    private static final int PROJECTILE_BULLET = 99;
    private static final int PROJECTILE_GRENADE = 0;
    private static final int PROJECTILE_RIFLE = 1;
    private static final int PROJECTILE_EXPLOSIVES = 2;
    private static final int PROJECTILE_EXPLOSION = 10;
    private static final int PROJECTILE_SMOKE = 11;
    private static final int DAMAGE_BULLET = 1;
    private static final int DAMAGE_RIFLE = 2;
    private static final int DAMAGE_EXPLOSION = 2;
    private static final int TILE_BLOCKED_IMPASSABLE = 0;
    private static final int TILE_BLOCKED_DOOR = 1;
    private static final int TILE_BLOCKED_WALK_UNDER = 2;
    private static final int TILE_BLOCKED_WATER = 3;
    private static final int TILE_BLOCKED_CLEAR = 4;
    private static final int TILE_BLOCKED_BACK_DOOR = 5;
    private static final int WEAPON_TYPE[] = {
        0, 1, 2, 0, -1
    };
    private static final int bulletDeltaX[] = {
        -4, 0, 4, -6, 0, 6, -4, 0, 4
    };
    private static final int bulletDeltaY[] = {
        -4, -6, -4, 0, 0, 0, 4, 6, 4
    };
    private static final int bulletClipDeltaX[] = {
        11, 1, 0, 13, 0, 0, 11, 1, 0
    };
    private static final int bulletClipDeltaY[] = {
        11, 13, 11, 1, 0, 1, 0, 0, 0
    };
    private static final int bulletImageDeltaX[] = {
        69, 54, 66, 61, 0, 48, 77, 54, 58
    };
    private static final int bulletImageDeltaY[] = {
        80, 77, 80, 70, 0, 70, 69, 64, 69
    };
    private static final int bulletClipWidth[] = {
        11, 3, 11, 13, 0, 13, 11, 3, 11
    };
    private static final int bulletClipHeight[] = {
        11, 13, 11, 3, 0, 3, 11, 13, 11
    };
    private static final int bulletEndDeltaX[] = {
        -11, 0, 11, -13, 0, 13, -11, 0, 11
    };
    private static final int bulletEndDeltaY[] = {
        -11, -13, -11, 0, 0, 0, 11, 13, 11
    };
    private static final int gunFlareX[] = {
        0, 8, 15, 0, 0, 15, 0, 8, 15
    };
    private static final int gunFlareY[] = {
        5, 0, 5, 9, 0, 9, 10, 11, 10
    };

    public mainCanvas(COD cod1)
    {
        projectileArrayNext = new int[40];
        projectileX = new int[40];
        projectileY = new int[40];
        projectileDirection = new int[40];
        projectileTime = new int[40];
        projectileType = new int[40];
        playerArrayNext = new int[45];
        playerX = new int[45];
        playerY = new int[45];
        playerDirection = new int[45];
        playerMoving = new boolean[45];
        playerHealth = new int[45];
        playerNextShot = new int[45];
        playerAimX = new int[2];
        playerAimY = new int[2];
        playerType = new int[3];
        playerSpecial = new int[3];
        playerProtected = new int[3];
        playerInBuilding = new boolean[3];
        playerShowStatus = new int[3];
        specialArrayNext = new int[40];
        specialArrayPrevious = new int[40];
        specialX = new int[40];
        specialY = new int[40];
        specialType = new int[40];
        specialDamage = new int[40];
        squarePlayer = new int[30];
        squareRow = new int[30];
        squareCol = new int[30];
        allowKeyPresses = true;
        random = new Random();
        soundWAV = new byte[0x1782c];
        missionTime = new int[10];
        CHANGE_ORDERS = is3650 ? 54 : 48;
        MapData = new int[128][11];
        cod = cod1;
        font = Font.getFont(0, 0, 8);
        fontHeight = (short)font.getHeight();
        largeFont = Font.getFont(64, 1, 0);
        largeFontHeight = (short)largeFont.getHeight();
        width = getWidth();
        height = getHeight();
        halfWidth = width >> 1;
        halfHeight = height >> 1;
        missionNumberCurrent = 0;
        missionNumberMax = 0;
        soundOn = true;
        for(int i = 0; i <= 9; i++)
            missionTime[i] = 0;

        try
        {
            if(RecordStore.listRecordStores() == null)
                writeRecords();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -