/* Class150_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jaggl.OpenGL;

public class Class150_Sub1 extends Class150
{
    Class149 aClass149_9423;
    static final String aString9424
	= "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iNormal      = vertex.normal;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   tMatrix[4]   = { state.matrix.texture[0] };\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nTEMP    viewPos, viewNormal, fogFactor, colour, ndotl;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nMAD   fogFactor.y, iTexCoord.z, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMUL   fogFactor.x, fogFactor.x, fogFactor.y;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, iTexCoord.z;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nDP3   viewNormal.x, mvMatrix[0], iNormal;\nDP3   viewNormal.y, mvMatrix[1], iNormal;\nDP3   viewNormal.z, mvMatrix[2], iNormal;\nDP3   ndotl.x, viewNormal, state.light[0].position;\nDP3   ndotl.y, viewNormal, state.light[1].position;\nMAX   ndotl, ndotl, 0;\nMOV   colour, state.lightmodel.ambient;\nMAD   colour, state.light[0].diffuse, ndotl.xxxx, colour;\nMAD   colour, state.light[1].diffuse, ndotl.yyyy, colour;\nMUL   oColour, iColour, colour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP3   oTexCoord0.x, tMatrix[0], iTexCoord;\nDP3   oTexCoord0.y, tMatrix[1], iTexCoord;\nMOV   oTexCoord0.zw, iTexCoord;\nEND\n";
    static final String aString9425
	= "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nPARAM   texMatrix[4] = { state.matrix.texture[0] };\nTEMP    viewPos, fogFactor, depth;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nDP4   depth, waterPlane, viewPos;\nMAD   fogFactor.y, -depth, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, -depth;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nMOV   oColour, iColour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP4   oTexCoord0.x, texMatrix[0], iTexCoord;\nDP4   oTexCoord0.y, texMatrix[1], iTexCoord;\nDP4   oTexCoord0.z, texMatrix[2], iTexCoord;\nMOV   oTexCoord0.w, 1;\nEND\n";
    static final String aString9426
	= "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iNormal      = vertex.normal;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nPARAM   texMatrix[4] = { state.matrix.texture[0] };\nTEMP    viewPos, viewNormal, fogFactor, depth, colour, ndotl;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nDP4   depth, waterPlane, viewPos;\nMAD   fogFactor.y, -depth, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, -depth;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nDP3   viewNormal.x, mvMatrix[0], iNormal;\nDP3   viewNormal.y, mvMatrix[1], iNormal;\nDP3   viewNormal.z, mvMatrix[2], iNormal;\nDP3   ndotl.x, viewNormal, state.light[0].position;\nDP3   ndotl.y, viewNormal, state.light[1].position;\nMAX   ndotl, ndotl, 0;\nMOV   colour, state.lightmodel.ambient;\nMAD   colour, state.light[0].diffuse, ndotl.xxxx, colour;\nMAD   colour, state.light[1].diffuse, ndotl.yyyy, colour;\nMUL   oColour, iColour, colour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP4   oTexCoord0.x, texMatrix[0], iTexCoord;\nDP4   oTexCoord0.y, texMatrix[1], iTexCoord;\nDP4   oTexCoord0.z, texMatrix[2], iTexCoord;\nMOV   oTexCoord0.w, 1;\nEND\n";
    boolean aBool9427;
    boolean aBool9428;
    Class149 aClass149_9429;
    static final String aString9430
	= "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   tMatrix[4]   = { state.matrix.texture[0] };\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nTEMP    viewPos, fogFactor;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nMAD   fogFactor.y, iTexCoord.z, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMUL   fogFactor.x, fogFactor.x, fogFactor.y;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, iTexCoord.z;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nMOV   oColour, iColour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP3   oTexCoord0.x, tMatrix[0], iTexCoord;\nDP3   oTexCoord0.y, tMatrix[1], iTexCoord;\nMOV   oTexCoord0.zw, iTexCoord;\nEND\n";
    boolean aBool9431;
    boolean aBool9432 = false;
    Class149 aClass149_9433;
    Class141_Sub3 aClass141_Sub3_9434;
    Class149 aClass149_9435;
    static float[] aFloatArray9436 = { 0.0F, -1.0F, 0.0F, 0.0F };
    
    void method3539(boolean bool) {
	((Class150_Sub1) this).aBool9431 = bool;
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742
	    .method15019(((Class150_Sub1) this).aClass141_Sub3_9434);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(34165, 7681);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34166, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	method15815();
    }
    
    boolean method3545() {
	return ((Class150_Sub1) this).aBool9427;
    }
    
    boolean method3553() {
	return ((Class150_Sub1) this).aBool9427;
    }
    
    void method3538() {
	if (((Class150_Sub1) this).aBool9428) {
	    OpenGL.glBindProgramARB(34336, 0);
	    OpenGL.glDisable(34820);
	    OpenGL.glDisable(34336);
	    ((Class150_Sub1) this).aBool9428 = false;
	}
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15019(null);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(8448, 8448);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 34166, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	if (((Class150_Sub1) this).aBool9432) {
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								  768);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								  770);
	    ((Class150_Sub1) this).aBool9432 = false;
	}
    }
    
    boolean method3544() {
	return ((Class150_Sub1) this).aBool9427;
    }
    
    void method15811() {
	if (((Class150_Sub1) this).aBool9428) {
	    float f
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8839);
	    float f_0_
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8858);
	    float f_1_ = f - (f - f_0_) * 0.125F;
	    float f_2_ = f - (f - f_0_) * 0.25F;
	    OpenGL.glProgramLocalParameter4fARB
		(34336, 0, f_2_, f_1_,
		 256.0F / (float) ((((Class87_Sub1)
				     ((Class150_Sub1) this).aClass87_Sub1_1742)
				    .aClass105_8970.anInt1249)
				   * 1583747099),
		 (float) ((((Class87_Sub1)
			    ((Class150_Sub1) this).aClass87_Sub1_1742)
			   .aClass105_8970.anInt1247)
			  * 761101399) / 255.0F);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15025
		((((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		  .aClass105_8970.anInt1248) * 869322779);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	}
    }
    
    void method15812() {
	if (((Class150_Sub1) this).aBool9428) {
	    float f
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8839);
	    float f_3_
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8858);
	    float f_4_ = f - (f - f_3_) * 0.125F;
	    float f_5_ = f - (f - f_3_) * 0.25F;
	    OpenGL.glProgramLocalParameter4fARB
		(34336, 0, f_5_, f_4_,
		 256.0F / (float) ((((Class87_Sub1)
				     ((Class150_Sub1) this).aClass87_Sub1_1742)
				    .aClass105_8970.anInt1249)
				   * 1583747099),
		 (float) ((((Class87_Sub1)
			    ((Class150_Sub1) this).aClass87_Sub1_1742)
			   .aClass105_8970.anInt1247)
			  * 761101399) / 255.0F);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15025
		((((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		  .aClass105_8970.anInt1248) * 869322779);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	}
    }
    
    void method3543(Class141 class141, int i) {
	if (class141 == null) {
	    if (!((Class150_Sub1) this).aBool9432) {
		((Class150_Sub1) this).aClass87_Sub1_1742.method15019
		    (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		     .aClass141_Sub3_8967);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15020(1);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34168,
								      768);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168,
								      770);
		((Class150_Sub1) this).aBool9432 = true;
	    }
	} else {
	    if (((Class150_Sub1) this).aBool9432) {
		((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								      768);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								      770);
		((Class150_Sub1) this).aBool9432 = false;
	    }
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15019(class141);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15020(i);
	}
    }
    
    void method15813() {
	if (((Class150_Sub1) this).aBool9428) {
	    float f
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8839);
	    float f_6_
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8858);
	    float f_7_ = f - (f - f_6_) * 0.125F;
	    float f_8_ = f - (f - f_6_) * 0.25F;
	    OpenGL.glProgramLocalParameter4fARB
		(34336, 0, f_8_, f_7_,
		 256.0F / (float) ((((Class87_Sub1)
				     ((Class150_Sub1) this).aClass87_Sub1_1742)
				    .aClass105_8970.anInt1249)
				   * 1583747099),
		 (float) ((((Class87_Sub1)
			    ((Class150_Sub1) this).aClass87_Sub1_1742)
			   .aClass105_8970.anInt1247)
			  * 761101399) / 255.0F);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15025
		((((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		  .aClass105_8970.anInt1248) * 869322779);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	}
    }
    
    void method15814() {
	if (((Class150_Sub1) this).aBool9428) {
	    float f
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8839);
	    float f_9_
		= (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		   .aFloat8858);
	    float f_10_ = f - (f - f_9_) * 0.125F;
	    float f_11_ = f - (f - f_9_) * 0.25F;
	    OpenGL.glProgramLocalParameter4fARB
		(34336, 0, f_11_, f_10_,
		 256.0F / (float) ((((Class87_Sub1)
				     ((Class150_Sub1) this).aClass87_Sub1_1742)
				    .aClass105_8970.anInt1249)
				   * 1583747099),
		 (float) ((((Class87_Sub1)
			    ((Class150_Sub1) this).aClass87_Sub1_1742)
			   .aClass105_8970.anInt1247)
			  * 761101399) / 255.0F);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15025
		((((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		  .aClass105_8970.anInt1248) * 869322779);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	}
    }
    
    void method3542(int i, int i_12_) {
	/* empty */
    }
    
    boolean method3546() {
	return ((Class150_Sub1) this).aBool9427;
    }
    
    void method3547() {
	if (((Class150_Sub1) this).aBool9428) {
	    OpenGL.glBindProgramARB(34336, 0);
	    OpenGL.glDisable(34820);
	    OpenGL.glDisable(34336);
	    ((Class150_Sub1) this).aBool9428 = false;
	}
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15019(null);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(8448, 8448);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 34166, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	if (((Class150_Sub1) this).aBool9432) {
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								  768);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								  770);
	    ((Class150_Sub1) this).aBool9432 = false;
	}
    }
    
    void method3548() {
	if (((Class150_Sub1) this).aBool9428) {
	    OpenGL.glBindProgramARB(34336, 0);
	    OpenGL.glDisable(34820);
	    OpenGL.glDisable(34336);
	    ((Class150_Sub1) this).aBool9428 = false;
	}
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15019(null);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(8448, 8448);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 34166, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	if (((Class150_Sub1) this).aBool9432) {
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								  768);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								  770);
	    ((Class150_Sub1) this).aBool9432 = false;
	}
    }
    
    void method3549() {
	if (((Class150_Sub1) this).aBool9428) {
	    OpenGL.glBindProgramARB(34336, 0);
	    OpenGL.glDisable(34820);
	    OpenGL.glDisable(34336);
	    ((Class150_Sub1) this).aBool9428 = false;
	}
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15019(null);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(8448, 8448);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 34166, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	if (((Class150_Sub1) this).aBool9432) {
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								  768);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								  770);
	    ((Class150_Sub1) this).aBool9432 = false;
	}
    }
    
    void method3537() {
	if (((Class150_Sub1) this).aBool9428) {
	    OpenGL.glBindProgramARB(34336, 0);
	    OpenGL.glDisable(34820);
	    OpenGL.glDisable(34336);
	    ((Class150_Sub1) this).aBool9428 = false;
	}
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15019(null);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(8448, 8448);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 34166, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	if (((Class150_Sub1) this).aBool9432) {
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								  768);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								  770);
	    ((Class150_Sub1) this).aBool9432 = false;
	}
    }
    
    void method3551(int i, int i_13_) {
	/* empty */
    }
    
    void method3552(Class141 class141, int i) {
	if (class141 == null) {
	    if (!((Class150_Sub1) this).aBool9432) {
		((Class150_Sub1) this).aClass87_Sub1_1742.method15019
		    (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
		     .aClass141_Sub3_8967);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15020(1);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34168,
								      768);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168,
								      770);
		((Class150_Sub1) this).aBool9432 = true;
	    }
	} else {
	    if (((Class150_Sub1) this).aBool9432) {
		((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 5890,
								      768);
		((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 5890,
								      770);
		((Class150_Sub1) this).aBool9432 = false;
	    }
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15019(class141);
	    ((Class150_Sub1) this).aClass87_Sub1_1742.method15020(i);
	}
    }
    
    void method3540(boolean bool) {
	((Class150_Sub1) this).aBool9431 = bool;
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742
	    .method15019(((Class150_Sub1) this).aClass141_Sub3_9434);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(34165, 7681);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34166, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	method15815();
    }
    
    void method3550(boolean bool) {
	((Class150_Sub1) this).aBool9431 = bool;
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742
	    .method15019(((Class150_Sub1) this).aClass141_Sub3_9434);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(34165, 7681);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34166, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	method15815();
    }
    
    void method3555(boolean bool) {
	((Class150_Sub1) this).aBool9431 = bool;
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(1);
	((Class150_Sub1) this).aClass87_Sub1_1742
	    .method15019(((Class150_Sub1) this).aClass141_Sub3_9434);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15022(34165, 7681);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(0, 34166, 768);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15023(2, 5890, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15024(0, 34168, 770);
	((Class150_Sub1) this).aClass87_Sub1_1742.method15018(0);
	method15815();
    }
    
    void method3556(boolean bool) {
	/* empty */
    }
    
    void method3557(boolean bool) {
	/* empty */
    }
    
    void method3554(boolean bool) {
	/* empty */
    }
    
    void method3541(boolean bool) {
	/* empty */
    }
    
    Class150_Sub1(Class87_Sub1 class87_sub1) {
	super(class87_sub1);
	if (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
	    .aBool8992) {
	    ((Class150_Sub1) this).aClass149_9429
		= (Class149.method3533
		   (((Class150_Sub1) this).aClass87_Sub1_1742, 34336,
		    "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   tMatrix[4]   = { state.matrix.texture[0] };\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nTEMP    viewPos, fogFactor;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nMAD   fogFactor.y, iTexCoord.z, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMUL   fogFactor.x, fogFactor.x, fogFactor.y;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, iTexCoord.z;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nMOV   oColour, iColour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP3   oTexCoord0.x, tMatrix[0], iTexCoord;\nDP3   oTexCoord0.y, tMatrix[1], iTexCoord;\nMOV   oTexCoord0.zw, iTexCoord;\nEND\n"));
	    ((Class150_Sub1) this).aClass149_9423
		= (Class149.method3533
		   (((Class150_Sub1) this).aClass87_Sub1_1742, 34336,
		    "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iNormal      = vertex.normal;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   tMatrix[4]   = { state.matrix.texture[0] };\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nTEMP    viewPos, viewNormal, fogFactor, colour, ndotl;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nMAD   fogFactor.y, iTexCoord.z, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMUL   fogFactor.x, fogFactor.x, fogFactor.y;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, iTexCoord.z;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nDP3   viewNormal.x, mvMatrix[0], iNormal;\nDP3   viewNormal.y, mvMatrix[1], iNormal;\nDP3   viewNormal.z, mvMatrix[2], iNormal;\nDP3   ndotl.x, viewNormal, state.light[0].position;\nDP3   ndotl.y, viewNormal, state.light[1].position;\nMAX   ndotl, ndotl, 0;\nMOV   colour, state.lightmodel.ambient;\nMAD   colour, state.light[0].diffuse, ndotl.xxxx, colour;\nMAD   colour, state.light[1].diffuse, ndotl.yyyy, colour;\nMUL   oColour, iColour, colour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP3   oTexCoord0.x, tMatrix[0], iTexCoord;\nDP3   oTexCoord0.y, tMatrix[1], iTexCoord;\nMOV   oTexCoord0.zw, iTexCoord;\nEND\n"));
	    ((Class150_Sub1) this).aClass149_9435
		= (Class149.method3533
		   (((Class150_Sub1) this).aClass87_Sub1_1742, 34336,
		    "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nPARAM   texMatrix[4] = { state.matrix.texture[0] };\nTEMP    viewPos, fogFactor, depth;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nDP4   depth, waterPlane, viewPos;\nMAD   fogFactor.y, -depth, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, -depth;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nMOV   oColour, iColour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP4   oTexCoord0.x, texMatrix[0], iTexCoord;\nDP4   oTexCoord0.y, texMatrix[1], iTexCoord;\nDP4   oTexCoord0.z, texMatrix[2], iTexCoord;\nMOV   oTexCoord0.w, 1;\nEND\n"));
	    ((Class150_Sub1) this).aClass149_9433
		= (Class149.method3533
		   (((Class150_Sub1) this).aClass87_Sub1_1742, 34336,
		    "!!ARBvp1.0\nATTRIB  iPos         = vertex.position;\nATTRIB  iNormal      = vertex.normal;\nATTRIB  iColour      = vertex.color;\nATTRIB  iTexCoord    = vertex.texcoord[0];\nOUTPUT  oPos         = result.position;\nOUTPUT  oColour      = result.color;\nOUTPUT  oTexCoord0   = result.texcoord[0];\nOUTPUT  oTexCoord1   = result.texcoord[1];\nOUTPUT  oFogCoord    = result.fogcoord;\nPARAM   fogParams    = program.local[0];\nPARAM   waterPlane   = program.local[1];\nPARAM   pMatrix[4]   = { state.matrix.projection };\nPARAM   mvMatrix[4]  = { state.matrix.modelview };\nPARAM   texMatrix[4] = { state.matrix.texture[0] };\nTEMP    viewPos, viewNormal, fogFactor, depth, colour, ndotl;\nDP4   viewPos.x, mvMatrix[0], iPos;\nDP4   viewPos.y, mvMatrix[1], iPos;\nDP4   viewPos.z, mvMatrix[2], iPos;\nDP4   viewPos.w, mvMatrix[3], iPos;\nSUB   fogFactor.x, viewPos.z, fogParams.x;\nMUL   fogFactor.x, fogFactor.x, 0.001953125;\nDP4   depth, waterPlane, viewPos;\nMAD   fogFactor.y, -depth, fogParams.z, fogParams.w;\nSUB   fogFactor.z, viewPos.z, fogParams.y;\nMUL   fogFactor.z, fogFactor.z, 0.00390625;\nMIN   fogFactor, fogFactor, 1;\nMAX   fogFactor, fogFactor, 0;\nMUL   fogFactor.z, fogFactor.z, -depth;\nMAD   viewPos.xyz, waterPlane.xyzw, fogFactor.zzzz, viewPos.xyzw;\nMAX   oTexCoord1.xyz, fogFactor.xxxx, fogFactor.yyyy;\nMOV   oTexCoord1.w, 1;\nDP3   viewNormal.x, mvMatrix[0], iNormal;\nDP3   viewNormal.y, mvMatrix[1], iNormal;\nDP3   viewNormal.z, mvMatrix[2], iNormal;\nDP3   ndotl.x, viewNormal, state.light[0].position;\nDP3   ndotl.y, viewNormal, state.light[1].position;\nMAX   ndotl, ndotl, 0;\nMOV   colour, state.lightmodel.ambient;\nMAD   colour, state.light[0].diffuse, ndotl.xxxx, colour;\nMAD   colour, state.light[1].diffuse, ndotl.yyyy, colour;\nMUL   oColour, iColour, colour;\nDP4   oPos.x, pMatrix[0], viewPos;\nDP4   oPos.y, pMatrix[1], viewPos;\nDP4   oPos.z, pMatrix[2], viewPos;\nDP4   oPos.w, pMatrix[3], viewPos;\nMOV   oFogCoord.x, viewPos.z;\nDP4   oTexCoord0.x, texMatrix[0], iTexCoord;\nDP4   oTexCoord0.y, texMatrix[1], iTexCoord;\nDP4   oTexCoord0.z, texMatrix[2], iTexCoord;\nMOV   oTexCoord0.w, 1;\nEND\n"));
	    if (((Class150_Sub1) this).aClass149_9429 != null
		& ((Class150_Sub1) this).aClass149_9423 != null
		& ((Class150_Sub1) this).aClass149_9435 != null
		& ((Class150_Sub1) this).aClass149_9433 != null) {
		((Class150_Sub1) this).aClass141_Sub3_9434
		    = new Class141_Sub3(class87_sub1, 3553,
					Class173.aClass173_2127,
					Class90.aClass90_1040, 2, 1, false,
					new byte[] { 0, -1 },
					Class173.aClass173_2127, false);
		((Class150_Sub1) this).aClass141_Sub3_9434.method16841(false,
								       false);
		((Class150_Sub1) this).aBool9427 = true;
	    } else
		((Class150_Sub1) this).aBool9427 = false;
	} else
	    ((Class150_Sub1) this).aBool9427 = false;
    }
    
    void method15815() {
	Class276 class276
	    = (((Class87_Sub1) ((Class150_Sub1) this).aClass87_Sub1_1742)
	       .aClass276_8897);
	if (((Class150_Sub1) this).aBool9431)
	    OpenGL.glBindProgramARB(34336,
				    ((((Class87_Sub1) (((Class150_Sub1) this)
						       .aClass87_Sub1_1742))
				      .anInt8980) == 2147483647
				     ? ((Class149) (((Class150_Sub1) this)
						    .aClass149_9423)).anInt1738
				     : (((Class149)
					 ((Class150_Sub1) this).aClass149_9433)
					.anInt1738)));
	else
	    OpenGL.glBindProgramARB(34336,
				    ((((Class87_Sub1) (((Class150_Sub1) this)
						       .aClass87_Sub1_1742))
				      .anInt8980) == 2147483647
				     ? ((Class149) (((Class150_Sub1) this)
						    .aClass149_9429)).anInt1738
				     : (((Class149)
					 ((Class150_Sub1) this).aClass149_9435)
					.anInt1738)));
	float f = (float) ((Class87_Sub1) (((Class150_Sub1) this)
					   .aClass87_Sub1_1742)).anInt8980;
	float f_14_
	    = class276.aFloatArray4141[4] * f + class276.aFloatArray4141[12];
	float f_15_
	    = class276.aFloatArray4141[5] * f + class276.aFloatArray4141[13];
	float f_16_
	    = class276.aFloatArray4141[6] * f + class276.aFloatArray4141[14];
	aFloatArray9436[0] = -class276.aFloatArray4141[4];
	aFloatArray9436[1] = -class276.aFloatArray4141[5];
	aFloatArray9436[2] = -class276.aFloatArray4141[6];
	aFloatArray9436[3]
	    = -(aFloatArray9436[0] * f_14_ + aFloatArray9436[1] * f_15_
		+ aFloatArray9436[2] * f_16_);
	OpenGL.glProgramLocalParameter4fARB(34336, 1, aFloatArray9436[0],
					    aFloatArray9436[1],
					    aFloatArray9436[2],
					    aFloatArray9436[3]);
	OpenGL.glEnable(34336);
	((Class150_Sub1) this).aBool9428 = true;
	method15812();
    }
}
