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

📄 game.java

📁 传说中的小蜜蜂游戏,回忆下小时候 WTK编译可运行,内有图
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
// 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 
// Source File Name:   Game.java

import com.nokia.mid.sound.Sound;
import java.io.*;
import java.util.Random;
import javax.microedition.lcdui.*;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;

public class Game
{

    static Main m;
    public static int a[] = new int[22];
    private static final int stock[] = {
        3, 4, 5, 6
    };
    private static final int extend[] = {
        1000, 1500
    };
    public static int timer_cnt2;
    public static int mode;
    public static int stage;
    public static int score;
    public static int hi_score;
    private static int m_x;
    private static int m_y;
    private static int u_x;
    private static int u_state;
    private static int u_time;
    private static int u_score;
    private static int u_score_p;
    public static int inv_type;
    public static int down6dot;
    public static boolean rdisp_flg;
    public static boolean bonus_flg;
    private static int add_x;
    public static int preStage;
    private static boolean isGet;
    private static int b_time;
    public static long old_time;
    public static long old_time1;
    public static long old_time2;
    private static long tmp_time;
    private static int inv_x[] = new int[50];
    private static int inv_y[] = new int[50];
    private static int inv_row[] = new int[50];
    private static int inv_state[] = new int[50];
    private static int inv_time[] = new int[50];
    private static int inv_score[] = new int[50];
    private static int inv_move[] = new int[5];
    private static int inv_shot[] = new int[50];
    private static int inv_kind[] = new int[50];
    private static int inv_nrx[] = new int[128];
    private static int inv_kaseki[] = new int[50];
    private static int kaseki_num;
    private static int kaseki_flg;
    private static int shield[][][] = new int[4][8][10];
    private static int inv_num;
    private static int inv_extend;
    private static int s;
    private static int inv_dir;
    private static int inv_cnt;
    public static int inv_left;
    public static int nokLeft;
    private static int e_x[] = new int[3];
    private static int e_y[] = new int[3];
    public static long sT[] = new long[6];
    public static long sT1[] = new long[6];
    public static long bTi[] = new long[6];
    public static long bTi1[] = new long[6];
    private static final int u_p[] = {
        50, 50, 100, 150, 100, 100, 50, 300, 100, 100, 
        100, 50, 150, 100, 100
    };
    private static final int inv_l[] = {
        4, 2, 2, 2, 2
    };
    private static final int inv_r[] = {
        8, 8, 8, 9, 9
    };
    private static final int C_sh[] = {
        7, 15, 31, 30, 28, 28, 28, 28
    };
    private RecordStore rStore;
    private static final int place1[][] = {
        {
            1, 1, 1, 1, 0, 0, 0, 1, 1, 1
        }, {
            1, 1, 1, 1, 1, 0, 0, 1, 1, 1
        }, {
            1, 1, 1, 0, 1, 1, 0, 1, 1, 1
        }, {
            1, 1, 1, 0, 0, 1, 1, 1, 1, 1
        }, {
            1, 1, 1, 0, 0, 0, 1, 1, 1, 1
        }
    };
    private static final int place2[][] = {
        {
            0, 0, 1, 1, 1, 1, 1, 1, 0, 0
        }, {
            0, 1, 1, 1, 0, 0, 1, 1, 1, 0
        }, {
            0, 1, 1, 1, 0, 0, 1, 1, 1, 0
        }, {
            0, 1, 1, 1, 0, 0, 1, 1, 1, 0
        }, {
            0, 0, 1, 1, 1, 1, 1, 1, 0, 0
        }
    };
    private static final int place3[][] = {
        {
            1, 1, 1, 0, 0, 1, 1, 1, 1, 1
        }, {
            1, 1, 1, 0, 1, 1, 1, 1, 1, 1
        }, {
            1, 1, 1, 1, 1, 1, 0, 0, 0, 0
        }, {
            1, 1, 1, 0, 1, 1, 1, 1, 1, 1
        }, {
            1, 1, 1, 0, 0, 1, 1, 1, 1, 1
        }
    };
    private static final int place4[][] = {
        {
            0, 0, 1, 1, 1, 1, 1, 1, 0, 0
        }, {
            0, 0, 0, 1, 1, 1, 1, 0, 0, 0
        }, {
            0, 0, 0, 1, 1, 1, 1, 0, 0, 0
        }, {
            0, 0, 0, 1, 1, 1, 1, 0, 0, 0
        }, {
            0, 0, 1, 1, 1, 1, 1, 1, 0, 0
        }
    };
    private static final int place5[][] = {
        {
            0, 0, 0, 0, 1, 1, 0, 0, 0, 0
        }, {
            0, 0, 0, 1, 1, 1, 1, 0, 0, 0
        }, {
            0, 0, 1, 1, 0, 0, 1, 1, 0, 0
        }, {
            0, 1, 1, 1, 1, 1, 1, 1, 1, 0
        }, {
            1, 1, 1, 0, 0, 0, 0, 1, 1, 1
        }
    };
    private static Random rnd = new Random();

    public Game(Main main, int i, int j)
    {
        rStore = null;
        m = main;
        a[0] = i;
        a[1] = j;
        a[2] = (a[0] - 128) / 2;
        a[3] = (a[1] - 119) / 2;
        try
        {
            rStore = RecordStore.openRecordStore("SIRS", true);
        }
        catch(Exception exception) { }
        loadData();
    }

    public static void init()
    {
        if(m.GameThre == null)
            m.StartGameThread();
        Main.gOx = 90;
        a[6] = stock[Main.selst - 24];
        inv_extend = extend[Main.selex - 32];
        stage = 0;
        score = 0;
        newStage();
        old_time = System.currentTimeMillis();
        old_time1 = System.currentTimeMillis();
    }

    private static void newStage()
    {
        a[4] = 0;
        a[7] = 0;
        mode = 0;
        a[5] = 0;
        if(score < inv_extend)
            isGet = false;
        a[10] = 10;
        a[11] = 0;
        m_x = -999;
        m_y = 0;
        u_x = -999;
        u_state = 0;
        u_time = 0;
        for(int i = 0; i < 128; i++)
            inv_nrx[i] = -999;

        int j3 = 0;
        for(int j = 0; j < 5; j++)
        {
            for(int k1 = 0; k1 < 10; k1++)
            {
                inv_shot[j3] = 0;
                inv_kaseki[j3] = 0;
                j3++;
            }

        }

        kaseki_flg = 0;
        a[18] = 0;
        nokLeft = 0;
        int l2 = 0;
        if(Main.gaM == 0)
        {
            for(int k = 0; k < 5; k++)
            {
                for(int l1 = 0; l1 < 10; l1++)
                {
                    inv_x[l2] = 11 * l1;
                    inv_y[l2] = (34 - k) + down6dot + 9 * k;
                    inv_time[l2] = 0;
                    inv_row[l2] = k;
                    inv_kaseki[l2] = 0;
                    inv_shot[l2] = 1;
                    if(k == 0)
                        inv_state[l2] = 0;
                    else
                    if(k == 1 || k == 2)
                        inv_state[l2] = 2;
                    else
                        inv_state[l2] = 4;
                    if(k == 0)
                        inv_score[l2] = 30;
                    else
                    if(k == 1 || k == 2)
                        inv_score[l2] = 20;
                    else
                        inv_score[l2] = 10;
                    l2++;
                }

            }

        } else
        {
            for(int l = 0; l < 5; l++)
            {
                for(int i2 = 0; i2 < 10; i2++)
                    switch(stage)
                    {
                    case 5: // '\005'
                    case 6: // '\006'
                    case 7: // '\007'
                    case 8: // '\b'
                    case 9: // '\t'
                    default:
                        break;

                    case 0: // '\0'
                        if(place1[l][i2] == 1)
                            l2 = a(l, i2, l2);
                        else
                            l2 = m(l, i2, l2);
                        break;

                    case 1: // '\001'
                        if(place2[l][i2] == 1)
                            l2 = a(l, i2, l2);
                        else
                            l2 = m(l, i2, l2);
                        break;

                    case 2: // '\002'
                        if(place3[l][i2] == 1)
                            l2 = a(l, i2, l2);
                        else
                            l2 = m(l, i2, l2);
                        break;

                    case 3: // '\003'
                        if(place4[l][i2] == 1)
                            l2 = a(l, i2, l2);
                        else
                            l2 = m(l, i2, l2);
                        break;

                    case 4: // '\004'
                        if(place5[l][i2] == 1)
                            l2 = a(l, i2, l2);
                        else
                            l2 = m(l, i2, l2);
                        break;

                    case 10: // '\n'
                        nokLeft = 7;
                        inv_num = 7;
                        inv_x[0] = 0;
                        inv_y[0] = 19;
                        inv_state[0] = 15;
                        inv_kind[0] = 0;
                        inv_x[1] = 100;
                        inv_y[1] = 31;
                        inv_state[1] = 15;
                        inv_kind[1] = 0;
                        inv_x[2] = 40;
                        inv_y[2] = 31;
                        inv_state[2] = 15;
                        inv_kind[2] = 0;
                        inv_x[3] = 70;
                        inv_y[3] = 49;
                        inv_state[3] = 15;
                        inv_kind[3] = 0;
                        inv_x[4] = 0;
                        inv_y[4] = 49;
                        inv_state[4] = 15;
                        inv_kind[4] = 0;
                        inv_x[5] = 20;
                        inv_y[5] = 67;
                        inv_state[5] = 15;
                        inv_kind[5] = 0;
                        inv_x[6] = 90;
                        inv_y[6] = 67;
                        inv_state[6] = 15;
                        inv_kind[6] = 0;
                        break;
                    }

            }

        }
        inv_dir = 2;
        inv_left = l2;
        inv_num = l2;
        a[20] = 2;
        a[21] = 6;
        if(bonus_flg)
            a[21] = 3;
        inv_cnt = a[21];
        for(int i1 = 0; i1 < 3; i1++)
            e_x[i1] = -999;

        for(int j1 = 0; j1 < 4; j1++)
        {
            for(int j2 = 0; j2 < 8; j2++)
            {
                int i3 = C_sh[j2];
                for(int k2 = 0; k2 < 5; k2++)
                {
                    shield[j1][j2][4 - k2] = (byte)(i3 & 0x1);
                    shield[j1][j2][5 + k2] = (byte)(i3 & 0x1);
                    i3 >>= 1;
                }

            }

        }

⌨️ 快捷键说明

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