import jaggl.OpenGL;

public class Class141_Sub3 extends Class141 {

   boolean aBool9880;
   static final String aString9881 = "!!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 aString9882 = "!!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 aString9883 = "!!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 aBool9884;
   static final String aString9885 = "!!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 aBool9886;
   boolean aBool9887 = false;
   Class147_Sub4 aClass147_Sub4_9888;
   static float[] aFloatArray9889 = new float[]{0.0F, -1.0F, 0.0F, 0.0F};
   Class132 aClass132_9890;
   Class132 aClass132_9891;
   Class132 aClass132_9892;
   Class132 aClass132_9893;


   void method15423() {
      Class317 var1 = this.aClass545_Sub1_1628.aClass317_9184;
      if(this.aBool9886) {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9893.anInt1567:this.aClass132_9890.anInt1567);
      } else {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9892.anInt1567:this.aClass132_9891.anInt1567);
      }

      float var2 = (float)this.aClass545_Sub1_1628.anInt9164;
      float var3 = var1.aFloatArray4000[4] * var2 + var1.aFloatArray4000[12];
      float var4 = var1.aFloatArray4000[5] * var2 + var1.aFloatArray4000[13];
      float var5 = var1.aFloatArray4000[6] * var2 + var1.aFloatArray4000[14];
      aFloatArray9889[0] = -var1.aFloatArray4000[4];
      aFloatArray9889[1] = -var1.aFloatArray4000[5];
      aFloatArray9889[2] = -var1.aFloatArray4000[6];
      aFloatArray9889[3] = -(aFloatArray9889[0] * var3 + aFloatArray9889[1] * var4 + aFloatArray9889[2] * var5);
      OpenGL.glProgramLocalParameter4fARB('\u8620', 1, aFloatArray9889[0], aFloatArray9889[1], aFloatArray9889[2], aFloatArray9889[3]);
      OpenGL.glEnable('\u8620');
      this.aBool9880 = true;
      this.method15425();
   }

   boolean method2633() {
      return this.aBool9884;
   }

   boolean method2626() {
      return this.aBool9884;
   }

   void method2636(boolean var1) {}

   void method2630() {
      if(this.aBool9880) {
         OpenGL.glBindProgramARB('\u8620', 0);
         OpenGL.glDisable('\u8804');
         OpenGL.glDisable('\u8620');
         this.aBool9880 = false;
      }

      this.aClass545_Sub1_1628.method14641(1);
      this.aClass545_Sub1_1628.method14725((Class147)null);
      this.aClass545_Sub1_1628.method14553(8448, 8448);
      this.aClass545_Sub1_1628.method14679(0, 5890, 768);
      this.aClass545_Sub1_1628.method14679(2, '\u8576', 770);
      this.aClass545_Sub1_1628.method14630(0, 5890, 770);
      this.aClass545_Sub1_1628.method14641(0);
      if(this.aBool9887) {
         this.aClass545_Sub1_1628.method14679(0, 5890, 768);
         this.aClass545_Sub1_1628.method14630(0, 5890, 770);
         this.aBool9887 = false;
      }

   }

   void method15424() {
      if(this.aBool9880) {
         float var1 = this.aClass545_Sub1_1628.aFloat9111;
         float var2 = this.aClass545_Sub1_1628.aFloat9197;
         float var3 = var1 - (var1 - var2) * 0.125F;
         float var4 = var1 - (var1 - var2) * 0.25F;
         OpenGL.glProgramLocalParameter4fARB('\u8620', 0, var4, var3, 256.0F / (float)(this.aClass545_Sub1_1628.aClass153_9157.anInt1731 * -663176343), (float)(this.aClass545_Sub1_1628.aClass153_9157.anInt1725 * 495453869) / 255.0F);
         this.aClass545_Sub1_1628.method14641(1);
         this.aClass545_Sub1_1628.method14603(this.aClass545_Sub1_1628.aClass153_9157.anInt1727 * 1679980725);
         this.aClass545_Sub1_1628.method14641(0);
      }

   }

   void method15425() {
      if(this.aBool9880) {
         float var1 = this.aClass545_Sub1_1628.aFloat9111;
         float var2 = this.aClass545_Sub1_1628.aFloat9197;
         float var3 = var1 - (var1 - var2) * 0.125F;
         float var4 = var1 - (var1 - var2) * 0.25F;
         OpenGL.glProgramLocalParameter4fARB('\u8620', 0, var4, var3, 256.0F / (float)(this.aClass545_Sub1_1628.aClass153_9157.anInt1731 * -663176343), (float)(this.aClass545_Sub1_1628.aClass153_9157.anInt1725 * 495453869) / 255.0F);
         this.aClass545_Sub1_1628.method14641(1);
         this.aClass545_Sub1_1628.method14603(this.aClass545_Sub1_1628.aClass153_9157.anInt1727 * 1679980725);
         this.aClass545_Sub1_1628.method14641(0);
      }

   }

   void method2628(Class147 var1, int var2) {
      if(var1 == null) {
         if(!this.aBool9887) {
            this.aClass545_Sub1_1628.method14725(this.aClass545_Sub1_1628.aClass147_Sub4_9254);
            this.aClass545_Sub1_1628.method14591(1);
            this.aClass545_Sub1_1628.method14679(0, '\u8578', 768);
            this.aClass545_Sub1_1628.method14630(0, '\u8578', 770);
            this.aBool9887 = true;
         }
      } else {
         if(this.aBool9887) {
            this.aClass545_Sub1_1628.method14679(0, 5890, 768);
            this.aClass545_Sub1_1628.method14630(0, 5890, 770);
            this.aBool9887 = false;
         }

         this.aClass545_Sub1_1628.method14725(var1);
         this.aClass545_Sub1_1628.method14591(var2);
      }

   }

   void method2627(int var1, int var2) {}

   void method2639(int var1, int var2) {}

   boolean method2629() {
      return this.aBool9884;
   }

   Class141_Sub3(Class545_Sub1 var1) {
      super(var1);
      if(this.aClass545_Sub1_1628.aBool9279) {
         this.aClass132_9892 = Class132.method2496(this.aClass545_Sub1_1628, '\u8620', "!!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");
         this.aClass132_9893 = Class132.method2496(this.aClass545_Sub1_1628, '\u8620', "!!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");
         this.aClass132_9891 = Class132.method2496(this.aClass545_Sub1_1628, '\u8620', "!!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");
         this.aClass132_9890 = Class132.method2496(this.aClass545_Sub1_1628, '\u8620', "!!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(this.aClass132_9892 != null & this.aClass132_9893 != null & this.aClass132_9891 != null & this.aClass132_9890 != null) {
            this.aClass147_Sub4_9888 = new Class147_Sub4(var1, 3553, Class98.aClass98_987, Class91.aClass91_897, 2, 1, false, new byte[]{(byte)0, (byte)-1}, Class98.aClass98_987, false);
            this.aClass147_Sub4_9888.method15463(false, false);
            this.aBool9884 = true;
         } else {
            this.aBool9884 = false;
         }
      } else {
         this.aBool9884 = false;
      }

   }

   void method2631(boolean var1) {
      this.aBool9886 = var1;
      this.aClass545_Sub1_1628.method14641(1);
      this.aClass545_Sub1_1628.method14725(this.aClass147_Sub4_9888);
      this.aClass545_Sub1_1628.method14553('\u8575', 7681);
      this.aClass545_Sub1_1628.method14679(0, '\u8576', 768);
      this.aClass545_Sub1_1628.method14679(2, 5890, 770);
      this.aClass545_Sub1_1628.method14630(0, '\u8578', 770);
      this.aClass545_Sub1_1628.method14641(0);
      this.method15427();
   }

   void method2632() {
      if(this.aBool9880) {
         OpenGL.glBindProgramARB('\u8620', 0);
         OpenGL.glDisable('\u8804');
         OpenGL.glDisable('\u8620');
         this.aBool9880 = false;
      }

      this.aClass545_Sub1_1628.method14641(1);
      this.aClass545_Sub1_1628.method14725((Class147)null);
      this.aClass545_Sub1_1628.method14553(8448, 8448);
      this.aClass545_Sub1_1628.method14679(0, 5890, 768);
      this.aClass545_Sub1_1628.method14679(2, '\u8576', 770);
      this.aClass545_Sub1_1628.method14630(0, 5890, 770);
      this.aClass545_Sub1_1628.method14641(0);
      if(this.aBool9887) {
         this.aClass545_Sub1_1628.method14679(0, 5890, 768);
         this.aClass545_Sub1_1628.method14630(0, 5890, 770);
         this.aBool9887 = false;
      }

   }

   void method15426() {
      Class317 var1 = this.aClass545_Sub1_1628.aClass317_9184;
      if(this.aBool9886) {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9893.anInt1567:this.aClass132_9890.anInt1567);
      } else {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9892.anInt1567:this.aClass132_9891.anInt1567);
      }

      float var2 = (float)this.aClass545_Sub1_1628.anInt9164;
      float var3 = var1.aFloatArray4000[4] * var2 + var1.aFloatArray4000[12];
      float var4 = var1.aFloatArray4000[5] * var2 + var1.aFloatArray4000[13];
      float var5 = var1.aFloatArray4000[6] * var2 + var1.aFloatArray4000[14];
      aFloatArray9889[0] = -var1.aFloatArray4000[4];
      aFloatArray9889[1] = -var1.aFloatArray4000[5];
      aFloatArray9889[2] = -var1.aFloatArray4000[6];
      aFloatArray9889[3] = -(aFloatArray9889[0] * var3 + aFloatArray9889[1] * var4 + aFloatArray9889[2] * var5);
      OpenGL.glProgramLocalParameter4fARB('\u8620', 1, aFloatArray9889[0], aFloatArray9889[1], aFloatArray9889[2], aFloatArray9889[3]);
      OpenGL.glEnable('\u8620');
      this.aBool9880 = true;
      this.method15425();
   }

   void method15427() {
      Class317 var1 = this.aClass545_Sub1_1628.aClass317_9184;
      if(this.aBool9886) {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9893.anInt1567:this.aClass132_9890.anInt1567);
      } else {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9892.anInt1567:this.aClass132_9891.anInt1567);
      }

      float var2 = (float)this.aClass545_Sub1_1628.anInt9164;
      float var3 = var1.aFloatArray4000[4] * var2 + var1.aFloatArray4000[12];
      float var4 = var1.aFloatArray4000[5] * var2 + var1.aFloatArray4000[13];
      float var5 = var1.aFloatArray4000[6] * var2 + var1.aFloatArray4000[14];
      aFloatArray9889[0] = -var1.aFloatArray4000[4];
      aFloatArray9889[1] = -var1.aFloatArray4000[5];
      aFloatArray9889[2] = -var1.aFloatArray4000[6];
      aFloatArray9889[3] = -(aFloatArray9889[0] * var3 + aFloatArray9889[1] * var4 + aFloatArray9889[2] * var5);
      OpenGL.glProgramLocalParameter4fARB('\u8620', 1, aFloatArray9889[0], aFloatArray9889[1], aFloatArray9889[2], aFloatArray9889[3]);
      OpenGL.glEnable('\u8620');
      this.aBool9880 = true;
      this.method15425();
   }

   void method2625(boolean var1) {
      this.aBool9886 = var1;
      this.aClass545_Sub1_1628.method14641(1);
      this.aClass545_Sub1_1628.method14725(this.aClass147_Sub4_9888);
      this.aClass545_Sub1_1628.method14553('\u8575', 7681);
      this.aClass545_Sub1_1628.method14679(0, '\u8576', 768);
      this.aClass545_Sub1_1628.method14679(2, 5890, 770);
      this.aClass545_Sub1_1628.method14630(0, '\u8578', 770);
      this.aClass545_Sub1_1628.method14641(0);
      this.method15427();
   }

   void method2634(int var1, int var2) {}

   void method2637(boolean var1) {}

   void method2635(Class147 var1, int var2) {
      if(var1 == null) {
         if(!this.aBool9887) {
            this.aClass545_Sub1_1628.method14725(this.aClass545_Sub1_1628.aClass147_Sub4_9254);
            this.aClass545_Sub1_1628.method14591(1);
            this.aClass545_Sub1_1628.method14679(0, '\u8578', 768);
            this.aClass545_Sub1_1628.method14630(0, '\u8578', 770);
            this.aBool9887 = true;
         }
      } else {
         if(this.aBool9887) {
            this.aClass545_Sub1_1628.method14679(0, 5890, 768);
            this.aClass545_Sub1_1628.method14630(0, 5890, 770);
            this.aBool9887 = false;
         }

         this.aClass545_Sub1_1628.method14725(var1);
         this.aClass545_Sub1_1628.method14591(var2);
      }

   }

   void method2624(boolean var1) {}

   void method2623() {
      if(this.aBool9880) {
         OpenGL.glBindProgramARB('\u8620', 0);
         OpenGL.glDisable('\u8804');
         OpenGL.glDisable('\u8620');
         this.aBool9880 = false;
      }

      this.aClass545_Sub1_1628.method14641(1);
      this.aClass545_Sub1_1628.method14725((Class147)null);
      this.aClass545_Sub1_1628.method14553(8448, 8448);
      this.aClass545_Sub1_1628.method14679(0, 5890, 768);
      this.aClass545_Sub1_1628.method14679(2, '\u8576', 770);
      this.aClass545_Sub1_1628.method14630(0, 5890, 770);
      this.aClass545_Sub1_1628.method14641(0);
      if(this.aBool9887) {
         this.aClass545_Sub1_1628.method14679(0, 5890, 768);
         this.aClass545_Sub1_1628.method14630(0, 5890, 770);
         this.aBool9887 = false;
      }

   }

   void method15428() {
      Class317 var1 = this.aClass545_Sub1_1628.aClass317_9184;
      if(this.aBool9886) {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9893.anInt1567:this.aClass132_9890.anInt1567);
      } else {
         OpenGL.glBindProgramARB('\u8620', this.aClass545_Sub1_1628.anInt9164 == Integer.MAX_VALUE?this.aClass132_9892.anInt1567:this.aClass132_9891.anInt1567);
      }

      float var2 = (float)this.aClass545_Sub1_1628.anInt9164;
      float var3 = var1.aFloatArray4000[4] * var2 + var1.aFloatArray4000[12];
      float var4 = var1.aFloatArray4000[5] * var2 + var1.aFloatArray4000[13];
      float var5 = var1.aFloatArray4000[6] * var2 + var1.aFloatArray4000[14];
      aFloatArray9889[0] = -var1.aFloatArray4000[4];
      aFloatArray9889[1] = -var1.aFloatArray4000[5];
      aFloatArray9889[2] = -var1.aFloatArray4000[6];
      aFloatArray9889[3] = -(aFloatArray9889[0] * var3 + aFloatArray9889[1] * var4 + aFloatArray9889[2] * var5);
      OpenGL.glProgramLocalParameter4fARB('\u8620', 1, aFloatArray9889[0], aFloatArray9889[1], aFloatArray9889[2], aFloatArray9889[3]);
      OpenGL.glEnable('\u8620');
      this.aBool9880 = true;
      this.method15425();
   }

   void method2638(boolean var1) {}
}
