// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

import java.io.PrintStream;
import sign.signlink;

public class Class2
{

    public static void method153(Class11 class11, int i)
    {
        Class31_Sub3_Sub2 class31_sub3_sub2 = new Class31_Sub3_Sub2((byte)114, class11.method204("flo.dat", null));
        if(i < 5 || i > 5)
            anInt58 = 283;
        anInt59 = class31_sub3_sub2.method424();
        if(aClass2Array60 == null)
            aClass2Array60 = new Class2[anInt59];
        for(int j = 0; j < anInt59; j++)
        {
            if(aClass2Array60[j] == null)
                aClass2Array60[j] = new Class2();
            aClass2Array60[j].method154(class31_sub3_sub2, (byte)59);
        }

    }

    public void method154(Class31_Sub3_Sub2 class31_sub3_sub2, byte byte0)
    {
        if(byte0 != 59)
            throw new NullPointerException();
        do
        {
            int i = class31_sub3_sub2.method422();
            if(i == 0)
                return;
            if(i == 1)
            {
                anInt62 = class31_sub3_sub2.method426();
                method155(27771, anInt62);
            } else
            if(i == 2)
                anInt63 = class31_sub3_sub2.method422();
            else
            if(i == 3)
                aBoolean64 = true;
            else
            if(i == 5)
                aBoolean65 = false;
            else
            if(i == 6)
                aString61 = class31_sub3_sub2.method429();
            else
            if(i == 7)
            {
                int j = anInt66;
                int k = anInt67;
                int l = anInt68;
                int i1 = anInt69;
                int j1 = class31_sub3_sub2.method426();
                method155(27771, j1);
                anInt66 = j;
                anInt67 = k;
                anInt68 = l;
                anInt69 = i1;
                anInt70 = i1;
            } else
            {
                System.out.println("Error unrecognised config code: " + i);
            }
        } while(true);
    }

    public void method155(int i, int j)
    {
        if(j == 0xff00ff)
            j = 0;
        double d = (double)(j >> 16 & 0xff) / 256D;
        double d1 = (double)(j >> 8 & 0xff) / 256D;
        double d2 = (double)(j & 0xff) / 256D;
        double d3 = d;
        if(d1 < d3)
            d3 = d1;
        if(d2 < d3)
            d3 = d2;
        double d4 = d;
        if(i != 27771)
        {
            for(int k = 1; k > 0; k++);
        }
        if(d1 > d4)
            d4 = d1;
        if(d2 > d4)
            d4 = d2;
        double d5 = 0.0D;
        double d6 = 0.0D;
        double d7 = (d3 + d4) / 2D;
        if(d3 != d4)
        {
            if(d7 < 0.5D)
                d6 = (d4 - d3) / (d4 + d3);
            if(d7 >= 0.5D)
                d6 = (d4 - d3) / (2D - d4 - d3);
            if(d == d4)
                d5 = (d1 - d2) / (d4 - d3);
            else
            if(d1 == d4)
                d5 = 2D + (d2 - d) / (d4 - d3);
            else
            if(d2 == d4)
                d5 = 4D + (d - d1) / (d4 - d3);
        }
        d5 /= 6D;
        anInt66 = (int)(d5 * 256D);
        anInt67 = (int)(d6 * 256D);
        anInt68 = (int)(d7 * 256D);
        if(anInt67 < 0)
            anInt67 = 0;
        else
        if(anInt67 > 255)
            anInt67 = 255;
        if(anInt68 < 0)
            anInt68 = 0;
        else
        if(anInt68 > 255)
            anInt68 = 255;
        if(d7 > 0.5D)
            anInt70 = (int)((1.0D - d7) * d6 * 512D);
        else
            anInt70 = (int)(d7 * d6 * 512D);
        if(anInt70 < 1)
            anInt70 = 1;
        anInt69 = (int)(d5 * (double)anInt70);
        int l = (anInt66 + (int)(Math.random() * 16D)) - 8;
        if(l < 0)
            l = 0;
        else
        if(l > 255)
            l = 255;
        int i1 = (anInt67 + (int)(Math.random() * 48D)) - 24;
        if(i1 < 0)
            i1 = 0;
        else
        if(i1 > 255)
            i1 = 255;
        int j1 = (anInt68 + (int)(Math.random() * 48D)) - 24;
        if(j1 < 0)
            j1 = 0;
        else
        if(j1 > 255)
            j1 = 255;
        anInt71 = method156(l, i1, j1);
    }

    public int method156(int i, int j, int k)
    {
        if(k > 179)
            j /= 2;
        if(k > 192)
            j /= 2;
        if(k > 217)
            j /= 2;
        if(k > 243)
            j /= 2;
        int l = (i / 4 << 10) + (j / 32 << 7) + k / 2;
        return l;
    }

    public Class2()
    {
        anInt63 = -1;
        aBoolean64 = false;
        aBoolean65 = true;
    }

    public static int anInt58 = 558;
    public static int anInt59;
    public static Class2 aClass2Array60[];
    public String aString61;
    public int anInt62;
    public int anInt63;
    public boolean aBoolean64;
    public boolean aBoolean65;
    public int anInt66;
    public int anInt67;
    public int anInt68;
    public int anInt69;
    public int anInt70;
    public int anInt71;

}
