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

📄 ccc.java

📁 飞机1942的游戏代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   DashOC7489
package airplane;
import javax.microedition.lcdui.*;

public abstract class Ccc extends Canvas
    implements CommandListener
{

    public boolean a;
    public String b;
    public int c;
    public int d;
    public static Image e = null;
    public static Image f = null;
    public Graphics g;
    public Graphics h;
    public static int i;
    public static int j;
    public static int k;
    public static int l;
    public static int m = 146;
    public static int n = 153;
    public Image o[];
    public boolean p;

    public Ccc()
    {
        a = false;
        b = "*#0000#";
        c = 0;
        o = null;
        l = getWidth();
        k = getHeight();
        c(l, k);
        g = a();
        i = 15;
        j = 15;
        g.setColor(0);
        g.fillRect(0, 0, l, k);
        g.translate(i, j);
        if(f == null)
        {
            f = Image.createImage(l + 24, 48);
            h = f.getGraphics();
        }
        p = false;
    }

    private Graphics a()
    {
        if(e == null)
            c(getWidth(), getHeight());
        return e.getGraphics();
    }

    public final int g()
    {
        int i1 = d;
        if((d & 0x40) != 0)
        {
            d &= 0xffffffbf;
            b(1, 64);
        }
        if((d & 0x80) != 0)
        {
            d &= 0xffffff7f;
            b(1, 128);
        }
        return i1;
    }

    public final void h()
    {
        d = 0;
    }

    public void paint(Graphics g1)
    {
        if(e == null)
            c(getWidth(), getHeight());
        else
            g1.drawImage(e, 0, 0, 20);
    }

    public final void keyPressed(int i1)
    {
        a(i1, true);
    }

    public final void keyReleased(int i1)
    {
        a(i1, false);
    }

    private void a(int i1, boolean flag)
    {
        int j1 = 0;
        int k1 = 0;
        boolean flag1 = false;
        try
        {
            k1 = getGameAction(i1);
        }
        catch(Exception exception) { }
        switch(k1)
        {
        case 1: // '\001'
            j1 = 1;
            break;

        case 6: // '\006'
            j1 = 2;
            break;

        case 2: // '\002'
            j1 = 4;
            break;

        case 5: // '\005'
            j1 = 8;
            break;

        case 8: // '\b'
            j1 = 16;
            break;
        }
        switch(i1)
        {
        case 48: // '0'
            j1 |= 0x20;
            a('0', flag);
            flag1 = true;
            break;

        case 50: // '2'
            j1 |= 1;
            break;

        case 49: // '1'
            j1 |= 5;
            break;

        case 51: // '3'
            j1 |= 9;
            break;

        case 52: // '4'
            j1 |= 4;
            break;

        case 53: // '5'
            j1 |= 0x10;
            break;

        case 54: // '6'
            j1 |= 8;
            break;

        case 55: // '7'
            j1 |= 6;
            break;

        case 56: // '8'
            j1 |= 2;
            break;

        case 57: // '9'
            j1 |= 0xa;
            break;

        case 42: // '*'
            j1 |= 0x100;
            a('*', flag);
            flag1 = true;
            break;

        case 35: // '#'
            j1 |= 0x200;
            a('#', flag);
            flag1 = true;
            break;
        }
        if(flag)
            d |= j1;
        else
            d &= ~j1;
        if(!flag1)
            c = 0;
    }

    public void a(char c1, boolean flag)
    {
        if(flag)
            if(b.charAt(c++) == c1)
            {
                if(c == b.length())
                {
                    a = !a;
                    c = 0;
                }
            } else
            {
                c = 0;
            }
    }

    public void b(int i1, int j1)
    {
    }

    public void c(int i1, int j1)
    {
        e = Image.createImage(i1, j1);
    }

    public void a(int i1, int j1, int k1)
    {
        g.drawImage(o[i1], (100 * j1) / 100, (100 * k1) / 100, 20);
    }

    public void b(int i1, int j1, int k1)
    {
        a(i1, j1, k1);
    }

    public void c(int i1, int j1, int k1)
    {
        if(f == null)
            f = Image.createImage(l + 24, 48);
        h.drawImage(o[i1], j1, k1, 20);
    }

    public void a(int i1, int j1, int k1, int l1, int i2, int j2)
    {
        if(f == null)
            f = Image.createImage(l + 24, 48);
        for(int k2 = 0; k2 < l1 / 48 + 1; k2++)
            g.drawImage(f, i2 - i1, (j2 - j1) + k2 * 48, 20);

    }

    public abstract void commandAction(Command command, Displayable displayable);

}

⌨️ 快捷键说明

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