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

📄 areaa.java

📁 威恩应该是个地名吧游戏的风格黑怪异
💻 JAVA
字号:
// 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:   AreaA.java

package falcofinder.Wien;

import java.util.Vector;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;

// Referenced classes of package falcofinder.Wien:
//            Bag

public class AreaA
{

    protected int section;
    protected boolean pause;
    protected String status;
    protected int width;
    protected int height;
    protected int centrox;
    protected int centroy;
    protected int posTrainx;
    protected int posTrainy;
    protected int posFlowersx;
    protected int posFlowersy;
    protected int sectionFlowers;
    protected int posBonex;
    protected int posBoney;
    protected int sectionBone;
    protected int posLeadx;
    protected int posLeady;
    protected int sectionLead;
    protected int posOfficex;
    protected int posOfficey;
    protected int posDogx;
    protected int posDogy;
    protected int sectionDog;
    protected int posBaloonx;
    protected int posBaloony;
    protected int sectionBaloon;
    protected boolean baloonFollowsKid;
    protected boolean dogIsAngry;
    protected boolean dogIsEating;
    protected boolean dogFollowsKid;
    protected boolean trainHalts;
    private int arf;
    protected boolean flowers;
    protected boolean bone;
    protected boolean lead;
    protected int sectiontrain;
    protected final int widthTrain = 50;
    protected final int heightTrain = 25;
    protected Bag objects;

    public AreaA(int width, int height)
    {
        section = 0;
        pause = false;
        status = "play";
        flowers = true;
        bone = true;
        lead = true;
        sectiontrain = 7;
        this.width = width;
        this.height = height;
        posOfficex = width - 40;
        sectionBone = 8;
        posOfficey = 0;
        centrox = Integer.parseInt("" + width / 2);
        centroy = Integer.parseInt("" + height / 2);
        posTrainy = height - 28;
        posTrainx = 10;
        posDogx = centrox;
        posDogy = centroy;
        sectionDog = 5;
        posBaloonx = width - 23;
        posBaloony = height - 38;
        sectionBaloon = 4;
        trainHalts = false;
        arf = 4;
        objects = new Bag(this);
    }

    public void drawSection(Graphics g)
    {
        if(section == 0)
        {
            g.setColor(255, 255, 255);
            g.drawRect(posOfficex, posOfficey, 39, 22);
            g.drawString("Ticket", posOfficex + 2, 1, 20);
            g.drawString("Office", posOfficex + 2, 11, 20);
            g.setColor(255, 255, 0);
        }
        if(section == sectionFlowers)
        {
            flowers = true;
            for(int i = 0; i < objects.size(); i++)
                if(objects.elementAt(i).equals("Flowers"))
                    flowers = false;

            if(flowers)
                drawFlowers(g);
        }
        if(section == 1)
        {
            g.setColor(255, 255, 255);
            g.drawString("U4", width - 30, 1, 20);
            g.drawString("Wien", width - 30, 9, 20);
            g.setColor(255, 255, 0);
            g.drawRect(width - 35, 0, 39, 22);
        }
        if(section == 2)
        {
            g.fillRect((width - 25) + 5, (height - 50) + 8, 2, 8);
            g.drawLine((width - 25) + 5, (height - 50) + 14, (width - 25) + 2, (height - 50) + 17);
            g.drawLine((width - 25) + 6, (height - 50) + 14, (width - 25) + 9, (height - 50) + 17);
            g.drawLine((width - 25) + 6, (height - 50) + 10, (width - 25) + 9, (height - 50) + 12);
            g.drawLine((width - 25) + 6, (height - 50) + 11, (width - 25) + 9, (height - 50) + 13);
            g.setColor(255, 200, 200);
            g.fillArc(width - 25, height - 50, 10, 10, 0, 360);
            g.setColor(255, 255, 255);
            g.drawArc(width - 25, height - 50, 10, 10, 0, 360);
            g.setColor(52, 159, 255);
            g.fillArc((width - 25) + 6, (height - 50) + 4, 3, 2, 45, 325);
            g.setColor(125, 90, 0);
            g.fillArc(width - 25, height - 50, 11, 11, 45, 180);
            g.setColor(125, 90, 0);
            g.fillRoundRect(width - 42, height - 56, 15, 15, 10, 10);
            g.setColor(255, 255, 255);
            g.fillRoundRect(width - 36, height - 50, 2, 13, 10, 10);
            g.setColor(255, 200, 200);
            g.fillArc(width - 40, height - 55, 11, 11, 0, 360);
            g.setColor(255, 255, 255);
            g.drawArc(width - 40, height - 55, 10, 10, 0, 360);
            g.setColor(255, 0, 0);
            g.drawLine(width - 36, height - 47, width - 34, height - 47);
            g.setColor(52, 159, 255);
            g.drawLine(width - 37, height - 52, width - 37, height - 52);
            g.drawLine(width - 33, height - 52, width - 33, height - 52);
            g.setColor(255, 255, 255);
            g.drawLine(width - 36, height - 45, width - 40, height - 40);
            g.drawLine(width - 35, height - 45, width - 29, height - 40);
            g.drawLine(width - 36, height - 40, width - 40, height - 33);
            g.drawLine(width - 35, height - 40, width - 29, height - 33);
        }
        if(section == sectionBone)
        {
            bone = true;
            for(int i = 0; i < objects.size(); i++)
                if(objects.elementAt(i).equals("Bone"))
                    bone = false;

            g.setColor(255, 255, 255);
            if(bone)
                drawBone(g);
        }
        if(section == 4)
        {
            g.setColor(255, 255, 255);
            g.drawString("KARLSPLATZ", centrox, centroy, 65);
            g.setColor(199, 199, 199);
            g.fillRoundRect(width - 14, height - 24, 2, 15, 10, 10);
            g.setColor(255, 200, 200);
            g.fillArc(width - 18, height - 29, 11, 11, 0, 360);
            g.setColor(255, 200, 200);
            g.drawArc(width - 18, height - 29, 10, 10, 0, 360);
            g.setColor(255, 0, 0);
            g.drawLine(width - 14, height - 21, width - 12, height - 21);
            g.setColor(199, 199, 199);
            g.fillRect(width - 18, height - 30, 10, 3);
            g.setColor(0, 0, 0);
            g.fillArc(width - 17, height - 26, 5, 5, 0, 360);
            g.fillArc(width - 13, height - 26, 5, 5, 0, 360);
            g.setColor(199, 199, 199);
            g.drawLine(width - 16, height - 22, width - 20, height - 15);
            g.drawLine(width - 16, height - 22, width - 9, height - 14);
            g.drawLine(width - 13, height - 20, width - 13, height - 7);
            g.drawLine(width - 15, height - 20, width - 15, height - 7);
            g.setColor(255, 255, 255);
            g.drawLine(width - 9, height - 14, width - 9, height - 7);
        }
        if(section == sectionBaloon)
            drawBaloon(g);
        if(section == sectionDog)
            drawDog(g);
        if(section == 6)
        {
            g.setColor(255, 255, 255);
            g.drawLine(0, height - 20, width, height - 20);
            g.drawLine(0, height - 10, width, height - 10);
        }
        if(section == 7)
        {
            g.setColor(255, 255, 255);
            g.drawLine(0, height - 20, width, height - 20);
            g.drawLine(0, height - 10, width, height - 10);
            g.setFont(Font.getFont(32, 0, 8));
            g.drawRect(centrox - 22, centroy, 64, 15);
            g.drawString("Haltestelle", centrox - 20, centroy, 20);
        }
        if(section == 8)
        {
            g.setColor(255, 255, 255);
            g.drawLine(0, height - 20, width, height - 20);
            g.drawLine(0, height - 10, width, height - 10);
        }
        if(section == sectionLead)
        {
            lead = true;
            for(int i = 0; i < objects.size(); i++)
                if(objects.elementAt(i).equals("Lead"))
                    lead = false;

            if(lead)
                drawLead(g);
        }
    }

    public void drawBaloon(Graphics g)
    {
        g.drawLine(posBaloonx + 3, posBaloony + 23, posBaloonx + 3, posBaloony + 3);
        g.setColor(255, 255, 255);
        g.fillArc(posBaloonx, posBaloony, 6, 6, 0, 360);
    }

    public void drawDog(Graphics g)
    {
        String dogSay = "";
        g.setColor(255, 255, 255);
        g.fillArc(posDogx, posDogy, 5, 3, 0, 360);
        g.fillRoundRect(posDogx + 5, posDogy, 20, 5, 20, 20);
        g.drawLine(posDogx + 25, posDogy + 1, posDogx + 28, posDogy - 5);
        g.drawLine(posDogx + 5, posDogy + 1, posDogx + 2, posDogy - 2);
        g.drawLine(posDogx + 5, posDogy + 1, posDogx + 2, posDogy - 2);
        g.drawLine(posDogx + 6, posDogy + 1, posDogx + 6, posDogy + 10);
        g.drawLine(posDogx + 8, posDogy + 1, posDogx + 8, posDogy + 10);
        g.drawLine(posDogx + 22, posDogy + 1, posDogx + 22, posDogy + 10);
        g.drawLine(posDogx + 24, posDogy + 1, posDogx + 24, posDogy + 10);
        if(dogIsAngry)
            dogSay = "ARF!";
        else
        if(dogIsEating)
            dogSay = "Gnam..";
        else
        if(dogIsEating)
            dogSay = "I am hungry...";
        if(arf == 12)
        {
            arf = arf - 4;
            g.setFont(Font.getFont(0, 0, 16));
        } else
        if(arf == 8)
        {
            arf = arf - 4;
            g.setFont(Font.getFont(0, 0, 0));
        } else
        {
            arf = arf + 4;
            g.setFont(Font.getFont(0, 0, 8));
        }
        g.drawString(dogSay, posDogx - arf, posDogy - arf, 20);
    }

    public void drawLead(Graphics g)
    {
        g.setColor(255, 255, 255);
        g.drawLine(posLeadx + 13, posLeady + 2, posLeadx + 2, posLeady);
        g.drawArc(posLeadx, posLeady, 6, 6, 0, 360);
    }

    private void drawFlowers(Graphics g)
    {
        g.setColor(255, 0, 0);
        g.fillArc(posFlowersx, posFlowersy, 3, 3, 0, 360);
        g.setColor(0, 255, 0);
        g.fillArc(posFlowersx + 5, posFlowersy, 3, 3, 0, 360);
        g.setColor(255, 255, 255);
        g.drawLine(posFlowersx + 3, posFlowersy + 4, posFlowersx, posFlowersy);
        g.drawLine(posFlowersx + 3, posFlowersy + 4, posFlowersx + 5, posFlowersy);
        g.drawLine(posFlowersx + 4, posFlowersy + 4, posFlowersx + 2, posFlowersy + 4);
        g.drawLine(posFlowersx + 2, posFlowersy + 4, posFlowersx + 1, posFlowersy + 8);
        g.drawLine(posFlowersx + 5, posFlowersy + 8, posFlowersx + 1, posFlowersy + 8);
        g.drawLine(posFlowersx + 5, posFlowersy + 8, posFlowersx + 4, posFlowersy + 4);
    }

    private void drawBone(Graphics g)
    {
        g.setColor(255, 255, 255);
        g.fillRect(posBonex + 1, posBoney + 2, 10, 3);
        g.fillRect(posBonex, posBoney, 2, 3);
        g.fillRect(posBonex, posBoney + 4, 2, 3);
        g.fillRect(posBonex + 11, posBoney, 2, 3);
        g.fillRect(posBonex + 11, posBoney + 4, 2, 3);
    }
}

⌨️ 快捷键说明

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