/* Class65_Sub1_Sub2 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class65_Sub1_Sub2 extends Class65_Sub1
{
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10937;
    Class118 aClass118_10938;
    public Class276 aClass276_10939 = new Class276();
    Class118 aClass118_10940;
    public int anInt10941;
    Class353 aClass353_10942;
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10943;
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10944;
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10945;
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10946;
    float[] aFloatArray10947;
    Class243_Sub41_Sub1 aClass243_Sub41_Sub1_10948;
    float[] aFloatArray10949;
    float aFloat10950;
    public Class276 aClass276_10951 = new Class276();
    public int anInt10952;
    public int anInt10953;
    public int anInt10954;
    
    public Class65_Sub1_Sub2(Class87_Sub2 class87_sub2, Class353 class353)
	throws Exception_Sub2 {
	super(class87_sub2);
	((Class65_Sub1_Sub2) this).aFloatArray10947 = new float[4];
	((Class65_Sub1_Sub2) this).aFloatArray10949 = new float[4];
	((Class65_Sub1_Sub2) this).aClass353_10942 = class353;
	if (((Class65_Sub1_Sub2) this).aClass353_10942.method6660()
	    && class87_sub2.method15416())
	    method16575("Waterfall");
    }
    
    boolean method16574() throws Exception_Sub2 {
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10944
	    = aClass37_10155.method1098("WorldMatrix", (byte) -70);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10937
	    = aClass37_10155.method1098("WVPMatrix", (byte) -43);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10946
	    = aClass37_10155.method1098("UGenerationPlane", (byte) -29);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10948
	    = aClass37_10155.method1098("VGenerationPlane", (byte) -81);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10943
	    = aClass37_10155.method1098("Time", (byte) -91);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10945
	    = aClass37_10155.method1098("billowSampler3D", (byte) -81);
	if (((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443) {
	    ((Class65_Sub1_Sub2) this).aClass118_10940
		= aClass37_10155.method1135("Waterfall3D", -2003168172);
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10940);
	} else {
	    ((Class65_Sub1_Sub2) this).aClass118_10938
		= aClass37_10155.method1135("Waterfall2D", 1138104408);
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10938);
	}
	return true;
    }
    
    public void method17469(byte i) {
	if (((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443)
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10940);
	else
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10938);
	aClass37_10155.method1164();
	if (((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443)
	    aClass37_10155.method1089((((Class65_Sub1_Sub2) this)
				       .aClass243_Sub41_Sub1_10945),
				      0,
				      (((Class65_Sub1_Sub2) this)
				       .aClass353_10942.anInterface38_5439),
				      624564269);
	aClass37_10155.method1177((((Class65_Sub1_Sub2) this)
				   .aClass243_Sub41_Sub1_10944),
				  aClass276_10951, -272875548);
	aClass37_10155.method1177((((Class65_Sub1_Sub2) this)
				   .aClass243_Sub41_Sub1_10937),
				  aClass276_10939, -272875548);
	aClass37_10155.method1084
	    (((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10946,
	     new Class260(((Class65_Sub1_Sub2) this).aFloatArray10947[0],
			  ((Class65_Sub1_Sub2) this).aFloatArray10947[1],
			  ((Class65_Sub1_Sub2) this).aFloatArray10947[2],
			  ((Class65_Sub1_Sub2) this).aFloatArray10947[3]),
	     (byte) 26);
	aClass37_10155.method1084
	    (((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10948,
	     new Class260(((Class65_Sub1_Sub2) this).aFloatArray10949[0],
			  ((Class65_Sub1_Sub2) this).aFloatArray10949[1],
			  ((Class65_Sub1_Sub2) this).aFloatArray10949[2],
			  ((Class65_Sub1_Sub2) this).aFloatArray10949[3]),
	     (byte) 98);
	aClass37_10155.method1084((((Class65_Sub1_Sub2) this)
				   .aClass243_Sub41_Sub1_10943),
				  new Class260((((Class65_Sub1_Sub2) this)
						.aFloat10950),
					       0.0F, 0.0F, 0.0F),
				  (byte) -59);
	aClass87_Sub2_809.method15421(Class311.aClass311_4588,
				      -466692853 * anInt10941,
				      anInt10952 * -1177965655,
				      14168501 * anInt10953,
				      anInt10954 * -1950790139);
    }
    
    public void method17470(int i, int i_0_, int i_1_) {
	float f = (float) ((i & 0x3) + 1) * -5.0E-4F;
	float f_2_ = (float) ((i >> 3 & 0x3) + 1) * 5.0E-4F;
	float f_3_ = (i & 0x40) == 0 ? 4.8828125E-4F : 9.765625E-4F;
	boolean bool = (i & 0x80) != 0;
	if (bool) {
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[0] = f_3_;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[1] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[2] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[3] = 0.0F;
	} else {
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[0] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[1] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[2] = f_3_;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[3] = 0.0F;
	}
	((Class65_Sub1_Sub2) this).aFloatArray10949[0] = 0.0F;
	((Class65_Sub1_Sub2) this).aFloatArray10949[1] = f_3_;
	((Class65_Sub1_Sub2) this).aFloatArray10949[2] = 0.0F;
	((Class65_Sub1_Sub2) this).aFloatArray10949[3]
	    = (float) aClass87_Sub2_809.anInt9271 * f % 1.0F;
	if (!((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443) {
	    int i_4_
		= (int) (16.0F * ((float) aClass87_Sub2_809.anInt9271 * f_2_));
	    aClass87_Sub2_809.method15448(((Class65_Sub1_Sub2) this)
					  .aClass353_10942
					  .anInterface40Array5438[i_4_ % 16]);
	} else
	    ((Class65_Sub1_Sub2) this).aFloat10950
		= (float) ((double) aClass87_Sub2_809.anInt9271 * (double) f_2_
			   % 1.0);
    }
    
    boolean method16577() throws Exception_Sub2 {
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10944
	    = aClass37_10155.method1098("WorldMatrix", (byte) -119);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10937
	    = aClass37_10155.method1098("WVPMatrix", (byte) -51);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10946
	    = aClass37_10155.method1098("UGenerationPlane", (byte) -35);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10948
	    = aClass37_10155.method1098("VGenerationPlane", (byte) -21);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10943
	    = aClass37_10155.method1098("Time", (byte) -2);
	((Class65_Sub1_Sub2) this).aClass243_Sub41_Sub1_10945
	    = aClass37_10155.method1098("billowSampler3D", (byte) -102);
	if (((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443) {
	    ((Class65_Sub1_Sub2) this).aClass118_10940
		= aClass37_10155.method1135("Waterfall3D", -1885049543);
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10940);
	} else {
	    ((Class65_Sub1_Sub2) this).aClass118_10938
		= aClass37_10155.method1135("Waterfall2D", 397324670);
	    aClass37_10155
		.method1075(((Class65_Sub1_Sub2) this).aClass118_10938);
	}
	return true;
    }
    
    public void method17471(int i, int i_5_) {
	float f = (float) ((i & 0x3) + 1) * -5.0E-4F;
	float f_6_ = (float) ((i >> 3 & 0x3) + 1) * 5.0E-4F;
	float f_7_ = (i & 0x40) == 0 ? 4.8828125E-4F : 9.765625E-4F;
	boolean bool = (i & 0x80) != 0;
	if (bool) {
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[0] = f_7_;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[1] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[2] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[3] = 0.0F;
	} else {
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[0] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[1] = 0.0F;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[2] = f_7_;
	    ((Class65_Sub1_Sub2) this).aFloatArray10947[3] = 0.0F;
	}
	((Class65_Sub1_Sub2) this).aFloatArray10949[0] = 0.0F;
	((Class65_Sub1_Sub2) this).aFloatArray10949[1] = f_7_;
	((Class65_Sub1_Sub2) this).aFloatArray10949[2] = 0.0F;
	((Class65_Sub1_Sub2) this).aFloatArray10949[3]
	    = (float) aClass87_Sub2_809.anInt9271 * f % 1.0F;
	if (!((Class65_Sub1_Sub2) this).aClass353_10942.aBool5443) {
	    int i_8_
		= (int) (16.0F * ((float) aClass87_Sub2_809.anInt9271 * f_6_));
	    aClass87_Sub2_809.method15448(((Class65_Sub1_Sub2) this)
					  .aClass353_10942
					  .anInterface40Array5438[i_8_ % 16]);
	} else
	    ((Class65_Sub1_Sub2) this).aFloat10950
		= (float) ((double) aClass87_Sub2_809.anInt9271 * (double) f_6_
			   % 1.0);
    }
}
