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

📄 b.java

📁 大富翁手机游戏
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 

import java.io.*;
import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.rms.RecordStore;

public class b extends Canvas
    implements Runnable, CommandListener
{

    RichmanTaiwanMIDlet M;
    private static Command n;
    private static Command aa;
    public static int ab;
    public static int A[];
    public static int L;
    public static int g[][];
    public static int N[];
    public static int l;
    public static int R[];
    public static int E[];
    public static int ae[];
    public static int m;
    public static int H;
    public static int a;
    private int G;
    private boolean C;
    static int ad[];
    private final int U = 110;
    private final int K = 90;
    private final int c[] = {
        32, 64, 96
    };
    private final int f = 105;
    private final int Z = 30;
    private final int Q = 15;
    private final int e = 133;
    private String ac[] = {
        "孙小美", "阿土伯", "钱夫人"
    };
    private String j[] = {
        "购买违禁品收押两天", "中乐透得200元", "现金投资获利10%", "现金被小偷扒走10%", "报缴百分之五的所得税", "强烈地震侵袭本地", "火警特报", "投资房地产获额外收入200元"
    };
    private boolean r;
    private boolean s;
    private volatile Thread V;
    private Timer b;
    private boolean o[];
    private String t;
    int X;
    private Font h;
    private String p[] = {
        "回到游戏", "游戏说明", "声音设定", "结束游戏"
    };
    private int S[] = {
        35, 60, 85, 110
    };
    private String Y[] = {
        "开启", "关闭"
    };
    int k;
    int x;
    private int B;
    private int d;
    private int T;
    private int q;
    private int v;
    private int F;
    private int u;
    private Font O;
    private Vector J;
    public Image y;
    public Image z;
    public Image W;
    public static Image I[] = new Image[8];
    public static Image af[] = new Image[2];
    public static Image P;
    int D[] = {
        180, 250, 200, 0, 100, 90, 0, 80, 60, 0, 
        200, 90, 100, 80, 0, 100, 80, 0, 110, 90, 
        90, 0, 250, 150, 0, 70, 100, 70, 80
    };
    int w[][] = {
        {
            94, 24
        }, {
            70, 37
        }, {
            46, 50
        }, {
            20, 88
        }, {
            42, 101
        }, {
            66, 113
        }, {
            90, 138
        }, {
            64, 164
        }, {
            40, 176
        }, {
            20, 212
        }, {
            50, 231
        }, {
            74, 244
        }, {
            98, 256
        }, {
            122, 268
        }, {
            170, 294
        }, {
            212, 270
        }, {
            236, 258
        }, {
            270, 234
        }, {
            252, 208
        }, {
            228, 196
        }, {
            204, 184
        }, {
            170, 150
        }, {
            192, 126
        }, {
            216, 114
        }, {
            240, 100
        }, {
            226, 68
        }, {
            200, 56
        }, {
            176, 44
        }, {
            150, 32
        }, {
            116, 10
        }
    };
    int i[][] = {
        {
            57, 27
        }, {
            32, 39
        }, {
            8, 52
        }, {
            -50, 50
        }, {
            56, 102
        }, {
            81, 115
        }, {
            -50, 95
        }, {
            34, 164
        }, {
            9, 176
        }, {
            -50, 140
        }, {
            56, 228
        }, {
            82, 241
        }, {
            107, 254
        }, {
            133, 267
        }, {
            -50, 194
        }, {
            182, 266
        }, {
            206, 253
        }, {
            -50, 158
        }, {
            261, 205
        }, {
            235, 192
        }, {
            210, 179
        }, {
            -50, 104
        }, {
            159, 126
        }, {
            184, 113
        }, {
            -50, 59
        }, {
            234, 64
        }, {
            208, 52
        }, {
            181, 39
        }, {
            156, 26
        }, {
            -50, -50
        }
    };

    public b(RichmanTaiwanMIDlet richmantaiwanmidlet)
    {
        G = 0;
        C = true;
        r = false;
        s = false;
        V = null;
        o = new boolean[3];
        t = "";
        X = 0;
        k = 0;
        x = 0;
        B = 0;
        d = 51;
        T = 74;
        q = 20;
        v = 57;
        F = 62;
        u = 20;
        M = richmantaiwanmidlet;
        n = new Command("选择", 4, 1);
        addCommand(n);
        setCommandListener(this);
        A = new int[3];
        N = new int[3];
        ad = new int[3];
        g = new int[3][5];
        ae = new int[30];
        R = new int[3];
        E = new int[3];
        u();
        r();
        richmantaiwanmidlet.d = null;
        h = Font.getFont(0, 0, 0);
        b = new Timer();
        g[0][0] = 5;
        O = Font.getFont(0, 0, 8);
    }

    public void a(boolean flag)
    {
        ab = 0;
        G = 0;
        if(flag)
        {
            l = 2;
        } else
        {
            repaint();
            serviceRepaints();
            try
            {
                Thread.sleep(80L);
            }
            catch(Exception exception) { }
        }
        l++;
        l %= 3;
        if(l == 0)
        {
            i();
            if(M.j)
                M.g(0);
            else
                M.g(1);
            m++;
        }
        if(N[l] < 0)
        {
            l++;
            l %= 3;
        }
        if(N[0] < 0)
        {
            b(0);
            return;
        }
        if(N[1] < 0 && N[2] < 0)
        {
            b(1);
            return;
        }
        repaint();
        serviceRepaints();
        if(R[l] > 0)
        {
            if(a(l, 5))
            {
                R[l] = 0;
                c(400, 0);
            } else
            {
                G = 20;
                repaint();
                serviceRepaints();
                c(400, 0);
                R[l]--;
            }
        } else
        if(E[l] > 0)
        {
            G = 30;
            repaint();
            serviceRepaints();
            c(400, 0);
            E[l]--;
        } else
        if(l != 0)
            c(300, 1);
        else
            s = false;
    }

    public void keyPressed(int i1)
    {
        if(H == 2)
        {
            a();
            M.b(X);
        } else
        {
            if(H == 3)
            {
                e();
                return;
            }
            if(H != 1 && (l != 0 || s))
                return;
        }
        RichmanTaiwanMIDlet _tmp = M;
        if(!RichmanTaiwanMIDlet.l);
label0:
        switch(getGameAction(i1))
        {
        case 3: // '\003'
        case 4: // '\004'
        case 7: // '\007'
        default:
            break;

        case 6: // '\006'
            if(H != 1)
                break;
            if(B == 1)
                if(k < p.length - 1)
                    k++;
                else
                    k = 0;
            if(B != 2)
                break;
            if(x < Y.length - 1)
                x++;
            else
                x = 0;
            break;

        case 1: // '\001'
            if(H != 1)
                break;
            if(B == 1)
            {
                if(k > 0)
                    k--;
                else
                    k = p.length - 1;
                break;
            }
            if(B != 2)
                break;
            if(x > 0)
                x--;
            else
                x = Y.length - 1;
            break;

        case 5: // '\005'
            if(H != 1)
                ab = ab != 2 ? ++ab : 0;
            break;

        case 2: // '\002'
            if(H != 1)
                ab = ab != 0 ? --ab : 2;
            break;

        case 8: // '\b'
            if(H != 1)
            {
                switch(ab)
                {
                default:
                    break;

                case 0: // '\0'
                    a(e(5) + 1 + 5);
                    s = true;
                    break label0;

                case 1: // '\001'
                    if(g[l][0] == 16)
                        M.p();
                    else
                        M.c(0);
                    break label0;

                case 2: // '\002'
                    if(H != 1)
                        H = 1;
                    if(B == 0)
                    {
                        B = 1;
                        break label0;
                    }
                    if(B == 1)
                    {
                        B = 0;
                        H = 0;
                        break label0;
                    }
                    if(B == 2)
                        B = 1;
                    break;
                }
                break;
            }
            if(B == 1)
            {
                if(k == 0)
                {
                    B = 0;
                    H = 0;
                    break;
                }
                if(k == 1)
                {
                    M.b(false);
                    B = 0;
                    H = 0;
                    break;
                }
                if(k == 2)
                {
                    B = 2;
                    RichmanTaiwanMIDlet _tmp1 = M;
                    if(RichmanTaiwanMIDlet.l)
                        x = 0;
                    else
                        x = 1;
                    break;
                }
                if(k != 3)
                    break;
                i();
                if(n != null)
                    removeCommand(n);
                if(aa != null)
                    removeCommand(aa);
                e();
                repaint();
                serviceRepaints();
                break;
            }
            if(B != 2)
                break;
            if(x == 0)
            {
                RichmanTaiwanMIDlet _tmp2 = M;
                RichmanTaiwanMIDlet.l = true;
                RichmanTaiwanMIDlet _tmp3 = M;
                RichmanTaiwanMIDlet.n.a("/sound/02-bgm.mid", -1);
                M.i(1);
            } else
            {
                RichmanTaiwanMIDlet _tmp4 = M;
                RichmanTaiwanMIDlet.l = false;
                RichmanTaiwanMIDlet _tmp5 = M;
                RichmanTaiwanMIDlet.n.a();
                M.i(0);
            }
            B = 0;
            H = 0;
            break;
        }
        repaint();
        serviceRepaints();
    }

    public void paint(Graphics g1)
    {
        for(int j1 = 0; j1 < 5; j1++)
        {
            for(int k2 = 0; k2 < 6; k2++)
                g1.drawImage(W, 48 * j1, 48 * k2, 20);

        }

        g1.drawImage(y, 110 - w[A[l]][0], 90 - w[A[l]][1], 20);
        for(int k1 = 0; k1 < 29; k1++)
            if(ae[k1] != 0)
                g1.drawImage((Image)J.elementAt(17 + (ae[k1] >= 10 ? ae[k1] >= 100 ? ad[2] : ad[1] : ad[0])), (110 - w[A[l]][0]) + i[k1][0], (90 - w[A[l]][1]) + i[k1][1], 20);

        for(int l1 = 0; l1 < 29; l1++)
        {
            if(ae[l1] < 2 || ae[l1] == 10 || ae[l1] == 100)
                continue;
            int i1;
            for(i1 = ae[l1]; i1 > 9; i1 /= 10);
            g1.drawImage((Image)J.elementAt(12 + i1), (110 - w[A[l]][0]) + i[l1][0] + 11, (90 - w[A[l]][1]) + i[l1][1] + 16, 36);
        }

        for(int i2 = 0; i2 < 3; i2++)
            if(i2 != l && !o[ad[i2]])
                a(g1, i2);

        a(g1, l);
        g1.drawImage(z, 0, 133, 20);
        if(a < 6 && a != 0)
            g1.drawImage((Image)J.elementAt(a + 2), 47, 158, 20);
        if(ad[l] == 0)
            g1.setColor(255, 171, 82);
        else
        if(ad[l] == 1)
            g1.setColor(71, 140, 222);
        else
            g1.setColor(255, 42, 0);
        g1.fillRect(4, 142, 36, 39);
        g1.setColor(0, 0, 0);
        g1.drawRect(4, 142, 36, 39);
        g1.drawImage((Image)J.elementAt(ad[l] * 2 + 8), 8, 146, 20);
        if(ad[l] != 0)
            g1.drawImage((Image)J.elementAt(ad[l] - 1), 43, 139, 20);
        g1.setFont(h);
        int j2 = 0;
        if(ad[l] == 0)
            j2 = 0xffab52;
        else
        if(ad[l] == 1)
            j2 = 0x478cde;
        else
        if(ad[l] == 2)
            j2 = 0xff2a00;
        RichmanTaiwanMIDlet.a(g1, "" + N[l], 110, 137, j2, 0, 20);
        g1.setColor(255, 255, 0);
        if(ab < 3)
        {
            g1.drawRect(45 + 44 * ab, 157, 36, 23);
            g1.drawRect(46 + 44 * ab, 158, 34, 21);
        } else
        {
            g1.drawRect(149, 137, 16, 14);
            g1.drawRect(150, 138, 14, 12);
        }
        if(!o[ad[l]] && N[l] < 0)
        {
            o[ad[l]] = true;
            a(g1, ac[ad[l]] + "破产");
        } else
        if(G == 30)
            a(g1, "冬眠中");
        else
        if(G == 20)
            a(g1, "坐牢中");
        else
        if(G == 10)
            a(g1, "公园");
        else
        if(G > 0)
        {
            a(g1, "奖金$900");
            G = G != 4 ? ++G : 0;
        }
        try
        {
            if(H == 2)
            {
                g1.drawImage(Image.createImage("/richmant27.png"), 88, 84, 3);
                g1.setColor(252, 110, 4);
                g1.fillRoundRect(22, 98, 132, 22, 5, 5);
                g1.setColor(0, 0, 0);
                g1.drawString("按任意键可以返回", 88, 100, 17);
                i();
            } else
            if(H == 3)
            {
                g1.drawImage(Image.createImage("/richmant28.png"), 88, 84, 3);
                g1.setColor(252, 110, 4);
                g1.fillRoundRect(22, 98, 132, 22, 5, 5);
                g1.setColor(0, 0, 0);
                g1.drawString("按任意键可以返回", 88, 100, 17);

⌨️ 快捷键说明

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