
public class Class286 {

   int anInt3351;
   static final int anInt3352 = 0;
   int anInt3353;
   static final int anInt3354 = 2;
   static int[] anIntArray3355 = new int[4];
   int anInt3356;
   int anInt3357;
   int anInt3358;
   int anInt3359;
   boolean aBool3360;
   static final int anInt3361 = 512;
   int anInt3362;
   int anInt3363;
   int anInt3364;
   static Class568 aClass568_3365;
   int anInt3366;
   int anInt3367;
   Class171 aClass171_3368;
   int anInt3369;
   static final int anInt3370 = 16;
   int anInt3371;
   static final int anInt3372 = 24;
   static final int anInt3373 = 24;
   static final int anInt3374 = 192;
   static final int anInt3375 = 128;
   static final int anInt3376 = 13;
   int anInt3377;
   int anInt3378;
   static Class171 aClass171_3379;
   static Class171 aClass171_3380;
   static final int anInt3381 = 1;


   void method5241(Class545 var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
      if(this.aClass171_3368 != null) {
         float[] var12 = new float[3];
         float var13 = (float)(-(this.anInt3357 - var8 << 16));
         float var14 = (float)(this.anInt3369 - var9 << 15);
         float var15 = (float)(-(this.anInt3359 - var10 << 16));
         float[] var16 = new float[3];
         var1.method11498().method6012(var16);
         var13 += var16[0];
         var14 += var16[1];
         var15 += var16[2];
         var1.method11650(var13, var14, var15, var12);
         if(var12[2] >= 0.0F) {
            int var17 = (int)(var12[0] - (float)(this.anInt3367 / 2));
            int var18 = (int)(var12[1] - (float)(this.anInt3367 / 2));
            if(var18 < var5 && var18 + this.anInt3367 > 0 && var17 < var4 && var17 + this.anInt3367 > 0) {
               this.aClass171_3368.method2930(var17, var18, this.anInt3367, this.anInt3367, 0, var11 << 24 | 16777215, 1);
            }
         }

      }
   }

   void method5242(Class545 var1, Class286 var2) {
      method5260(var1);
      method5249(var1);
      var1.qa(anIntArray3355);
      var1.r(0, 0, this.anInt3366, this.anInt3366);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, -16777216 | this.anInt3353, 0);
      int var3 = 0;
      int var4 = 0;
      int var5 = 256;
      if(var2 != null) {
         if(var2.aBool3360) {
            var3 = -var2.anInt3357;
            var4 = -var2.anInt3369;
            var5 = -var2.anInt3359;
         } else {
            var3 = var2.anInt3357 - this.anInt3357;
            var4 = var2.anInt3369 - this.anInt3369;
            var5 = var2.anInt3359 - this.anInt3359;
         }
      }

      int var6;
      int var7;
      int var8;
      if(this.anInt3363 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3363];
         var7 = Class312.anIntArray3956[this.anInt3363];
         var8 = var4 * var7 - var5 * var6 >> 14;
         var5 = var4 * var6 + var5 * var7 >> 14;
         var4 = var8;
      }

      if(this.anInt3362 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3362];
         var7 = Class312.anIntArray3956[this.anInt3362];
         var8 = var5 * var6 + var3 * var7 >> 14;
         var5 = var5 * var7 - var3 * var6 >> 14;
         var3 = var8;
      }

      Class568 var13 = aClass568_3365.method12060((byte)0, '\uc800', true);
      var13.W((short)0, (short)this.anInt3356);
      var1.IA(1.0F);
      var1.m(16777215, 1.0F, 1.0F, (float)var3, (float)var4, (float)var5);
      var7 = 1024 * this.anInt3366 / (var13.ya() - var13.RA());
      if(this.anInt3353 != 0) {
         var7 = var7 * 13 / 16;
      }

      Class317 var14 = var1.method11501();
      Class317 var9 = var1.method11467();
      var9.method5626((float)(this.anInt3366 / 2), (float)(this.anInt3366 / 2), (float)var7, (float)var7, 50.0F, 50000.0F, (float)var1.method11482((byte)14).method2741(), (float)var1.method11482((byte)14).method2742(), 1024.0F);
      var1.method11500(var9);
      var1.method11603(new Class328());
      Class328 var10 = new Class328();
      var10.method6038(0.0F, 0.0F, (float)(50 - var13.AA()));
      var13.method12069(var10, (Class89)null, 1);
      int var11 = this.anInt3366 * 13 / 16;
      int var12 = (this.anInt3366 - var11) / 2;
      aClass171_3379.method2930(var12, var12, var11, var11, 0, -16777216 | this.anInt3353, 1);
      this.aClass171_3368 = var1.method11484(0, 0, this.anInt3366, this.anInt3366, true);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, 0, 0);
      aClass171_3380.method2930(0, 0, this.anInt3366, this.anInt3366, 1, 0, 0);
      this.aClass171_3368.method2925(0, 0, 3);
      var1.method11500(var14);
      var1.r(anIntArray3355[0], anIntArray3355[1], anIntArray3355[2], anIntArray3355[3]);
   }

   boolean method5243(int var1, int var2, int var3, int var4) {
      int var5;
      int var6;
      int var7;
      if(!this.aBool3360) {
         var5 = this.anInt3357 - var1;
         var6 = this.anInt3369 - var2;
         var7 = this.anInt3359 - var3;
         this.anInt3358 = (int)Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7));
         if(this.anInt3358 == 0) {
            this.anInt3358 = 1;
         }

         var5 = (var5 << 8) / this.anInt3358;
         var6 = (var6 << 8) / this.anInt3358;
         var7 = (var7 << 8) / this.anInt3358;
      } else {
         this.anInt3358 = 1073741823;
         var5 = this.anInt3357;
         var6 = this.anInt3369;
         var7 = this.anInt3359;
      }

      int var8 = (int)(Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7)) * 256.0D);
      if(var8 > 128) {
         var5 = (var5 << 16) / var8;
         var6 = (var6 << 16) / var8;
         var7 = (var7 << 16) / var8;
         this.anInt3367 = this.anInt3377 * var4 / (this.aBool3360?1024:this.anInt3358);
      } else {
         this.anInt3367 = 0;
      }

      if(this.anInt3367 < 8) {
         this.aClass171_3368 = null;
         return false;
      } else {
         int var9 = Class468.method7880(this.anInt3367, (byte)-53);
         if(var9 > var4) {
            var9 = Class526.method11090(var4, (byte)84);
         }

         if(var9 > 512) {
            var9 = 512;
         }

         if(var9 != this.anInt3366) {
            this.anInt3366 = var9;
         }

         this.anInt3363 = (int)(Math.asin((double)((float)var6 / 256.0F)) * 2607.5945876176133D) & 16383;
         this.anInt3362 = (int)(Math.atan2((double)var5, (double)(-var7)) * 2607.5945876176133D) & 16383;
         this.aClass171_3368 = null;
         return true;
      }
   }

   boolean method5244(Class545 var1, Class286 var2) {
      return this.aClass171_3368 != null || this.method5246(var1, var2);
   }

   static void method5245() {
      aClass568_3365 = null;
      aClass171_3380 = null;
   }

   boolean method5246(Class545 var1, Class286 var2) {
      if(this.aClass171_3368 == null) {
         if(this.anInt3364 == 0) {
            if(Class573.anInterface24_7593.method119(this.anInt3356, Class557.aClass557_7471, 0.7F, this.anInt3366, this.anInt3366, false, 1002378134)) {
               int[] var3 = Class573.anInterface24_7593.method115(this.anInt3356, 0.7F, this.anInt3366, this.anInt3366, false, (short)1729);
               this.aClass171_3368 = var1.method11599(var3, 0, this.anInt3366, this.anInt3366, this.anInt3366, 98312473);
            }
         } else if(this.anInt3364 == 2) {
            this.method5247(var1, var2);
         } else if(this.anInt3364 == 1) {
            this.method5248(var1, var2);
         }
      }

      return this.aClass171_3368 != null;
   }

   void method5247(Class545 var1, Class286 var2) {
      Class96 var3 = Class96.method1867(Class264.aClass253_3072, this.anInt3356, 0);
      if(var3 != null) {
         var1.qa(anIntArray3355);
         var1.r(0, 0, this.anInt3366, this.anInt3366);
         var1.ba(2, 0);
         var1.B(0, 0, this.anInt3366, this.anInt3366, 0, 0);
         int var4 = 0;
         int var5 = 0;
         int var6 = 256;
         if(var2 != null) {
            if(var2.aBool3360) {
               var4 = -var2.anInt3357;
               var5 = -var2.anInt3369;
               var6 = -var2.anInt3359;
            } else {
               var4 = this.anInt3357 - var2.anInt3357;
               var5 = this.anInt3369 - var2.anInt3369;
               var6 = this.anInt3359 - var2.anInt3359;
            }
         }

         int var7;
         int var8;
         int var9;
         int var10;
         if(this.anInt3363 != 0) {
            var7 = -this.anInt3363 & 16383;
            var8 = Class312.anIntArray3943[var7];
            var9 = Class312.anIntArray3956[var7];
            var10 = var5 * var9 - var6 * var8 >> 14;
            var6 = var5 * var8 + var6 * var9 >> 14;
            var5 = var10;
         }

         if(this.anInt3362 != 0) {
            var7 = -this.anInt3362 & 16383;
            var8 = Class312.anIntArray3943[var7];
            var9 = Class312.anIntArray3956[var7];
            var10 = var6 * var8 + var4 * var9 >> 14;
            var6 = var6 * var9 - var4 * var8 >> 14;
            var4 = var10;
         }

         var1.IA(1.0F);
         var1.m(this.anInt3353, 1.0F, 1.0F, (float)var4, (float)var5, (float)var6);
         var3.method1885(this.anInt3351 & 16383, this.anInt3378 & 16383, this.anInt3371 & 16383);
         Class568 var16 = var1.method11493(var3, 2048, 0, 64, 768);
         var8 = var16.ya() - var16.RA();
         var9 = var16.o() - var16.YA();
         var10 = var8 > var9?var8:var9;
         int var11 = 1024 * this.anInt3366 / var10;
         Class317 var12 = var1.method11501();
         Class317 var13 = var1.method11467();
         var13.method5626((float)(this.anInt3366 / 2), (float)(this.anInt3366 / 2), (float)var11, (float)var11, 50.0F, 50000.0F, (float)var1.method11482((byte)14).method2741(), (float)var1.method11482((byte)14).method2742(), 1024.0F);
         var1.method11500(var13);
         Class328 var14 = new Class328();
         var1.method11603(var14);
         Class328 var15 = var1.method11491();
         var15.method6038(0.0F, 0.0F, (float)(50 - var16.AA()));
         var16.method12069(var15, (Class89)null, 1);
         this.aClass171_3368 = var1.method11484(0, 0, this.anInt3366, this.anInt3366, true);
         this.aClass171_3368.method2925(0, 0, 3);
         var1.method11500(var12);
         var1.r(anIntArray3355[0], anIntArray3355[1], anIntArray3355[2], anIntArray3355[3]);
      }
   }

   void method5248(Class545 var1, Class286 var2) {
      method5260(var1);
      method5249(var1);
      var1.qa(anIntArray3355);
      var1.r(0, 0, this.anInt3366, this.anInt3366);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, -16777216 | this.anInt3353, 0);
      int var3 = 0;
      int var4 = 0;
      int var5 = 256;
      if(var2 != null) {
         if(var2.aBool3360) {
            var3 = -var2.anInt3357;
            var4 = -var2.anInt3369;
            var5 = -var2.anInt3359;
         } else {
            var3 = var2.anInt3357 - this.anInt3357;
            var4 = var2.anInt3369 - this.anInt3369;
            var5 = var2.anInt3359 - this.anInt3359;
         }
      }

      int var6;
      int var7;
      int var8;
      if(this.anInt3363 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3363];
         var7 = Class312.anIntArray3956[this.anInt3363];
         var8 = var4 * var7 - var5 * var6 >> 14;
         var5 = var4 * var6 + var5 * var7 >> 14;
         var4 = var8;
      }

      if(this.anInt3362 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3362];
         var7 = Class312.anIntArray3956[this.anInt3362];
         var8 = var5 * var6 + var3 * var7 >> 14;
         var5 = var5 * var7 - var3 * var6 >> 14;
         var3 = var8;
      }

      Class568 var13 = aClass568_3365.method12060((byte)0, '\uc800', true);
      var13.W((short)0, (short)this.anInt3356);
      var1.IA(1.0F);
      var1.m(16777215, 1.0F, 1.0F, (float)var3, (float)var4, (float)var5);
      var7 = 1024 * this.anInt3366 / (var13.ya() - var13.RA());
      if(this.anInt3353 != 0) {
         var7 = var7 * 13 / 16;
      }

      Class317 var14 = var1.method11501();
      Class317 var9 = var1.method11467();
      var9.method5626((float)(this.anInt3366 / 2), (float)(this.anInt3366 / 2), (float)var7, (float)var7, 50.0F, 50000.0F, (float)var1.method11482((byte)14).method2741(), (float)var1.method11482((byte)14).method2742(), 1024.0F);
      var1.method11500(var9);
      var1.method11603(new Class328());
      Class328 var10 = new Class328();
      var10.method6038(0.0F, 0.0F, (float)(50 - var13.AA()));
      var13.method12069(var10, (Class89)null, 1);
      int var11 = this.anInt3366 * 13 / 16;
      int var12 = (this.anInt3366 - var11) / 2;
      aClass171_3379.method2930(var12, var12, var11, var11, 0, -16777216 | this.anInt3353, 1);
      this.aClass171_3368 = var1.method11484(0, 0, this.anInt3366, this.anInt3366, true);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, 0, 0);
      aClass171_3380.method2930(0, 0, this.anInt3366, this.anInt3366, 1, 0, 0);
      this.aClass171_3368.method2925(0, 0, 3);
      var1.method11500(var14);
      var1.r(anIntArray3355[0], anIntArray3355[1], anIntArray3355[2], anIntArray3355[3]);
   }

   public Class286(int var1, int var2, int var3, int var4, int var5, int var6, int var7, boolean var8, int var9, int var10, int var11) {
      this.anInt3357 = var3;
      this.anInt3369 = var4;
      this.anInt3359 = var5;
      this.aBool3360 = var8;
      this.anInt3356 = var2;
      this.anInt3353 = var7;
      this.anInt3377 = var6;
      this.anInt3364 = var1;
      this.anInt3351 = var9;
      this.anInt3378 = var10;
      this.anInt3371 = var11;
   }

   static void method5249(Class545 var0) {
      if(aClass171_3380 == null) {
         int[] var1 = new int[16384];
         int[] var2 = new int[16384];

         for(int var3 = 0; var3 < 64; ++var3) {
            int var4 = 64 - var3;
            var4 *= var4;
            int var5 = 128 - var3 - 1;
            int var6 = var3 * 128;
            int var7 = var5 * 128;

            for(int var8 = 0; var8 < 64; ++var8) {
               int var9 = 64 - var8;
               var9 *= var9;
               int var10 = 128 - var8 - 1;
               int var11 = 256 - (var9 + var4 << 8) / 4096;
               var11 = var11 * 3072 / 1536;
               if(var11 < 0) {
                  var11 = 0;
               } else if(var11 > 255) {
                  var11 = 255;
               }

               int var12 = var11 / 2;
               var2[var6 + var8] = var2[var6 + var10] = var2[var7 + var8] = var2[var7 + var10] = -16777216 | var11 << 16;
               var1[var6 + var8] = var1[var6 + var10] = var1[var7 + var8] = var1[var7 + var10] = 127 - var12 << 24 | 16777215;
            }
         }

         aClass171_3380 = var0.method11599(var2, 0, 128, 128, 128, 98312473);
         aClass171_3379 = var0.method11599(var1, 0, 128, 128, 128, 98312473);
      }

   }

   void method5250(Class545 var1, Class286 var2) {
      method5260(var1);
      method5249(var1);
      var1.qa(anIntArray3355);
      var1.r(0, 0, this.anInt3366, this.anInt3366);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, -16777216 | this.anInt3353, 0);
      int var3 = 0;
      int var4 = 0;
      int var5 = 256;
      if(var2 != null) {
         if(var2.aBool3360) {
            var3 = -var2.anInt3357;
            var4 = -var2.anInt3369;
            var5 = -var2.anInt3359;
         } else {
            var3 = var2.anInt3357 - this.anInt3357;
            var4 = var2.anInt3369 - this.anInt3369;
            var5 = var2.anInt3359 - this.anInt3359;
         }
      }

      int var6;
      int var7;
      int var8;
      if(this.anInt3363 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3363];
         var7 = Class312.anIntArray3956[this.anInt3363];
         var8 = var4 * var7 - var5 * var6 >> 14;
         var5 = var4 * var6 + var5 * var7 >> 14;
         var4 = var8;
      }

      if(this.anInt3362 != 0) {
         var6 = Class312.anIntArray3943[this.anInt3362];
         var7 = Class312.anIntArray3956[this.anInt3362];
         var8 = var5 * var6 + var3 * var7 >> 14;
         var5 = var5 * var7 - var3 * var6 >> 14;
         var3 = var8;
      }

      Class568 var13 = aClass568_3365.method12060((byte)0, '\uc800', true);
      var13.W((short)0, (short)this.anInt3356);
      var1.IA(1.0F);
      var1.m(16777215, 1.0F, 1.0F, (float)var3, (float)var4, (float)var5);
      var7 = 1024 * this.anInt3366 / (var13.ya() - var13.RA());
      if(this.anInt3353 != 0) {
         var7 = var7 * 13 / 16;
      }

      Class317 var14 = var1.method11501();
      Class317 var9 = var1.method11467();
      var9.method5626((float)(this.anInt3366 / 2), (float)(this.anInt3366 / 2), (float)var7, (float)var7, 50.0F, 50000.0F, (float)var1.method11482((byte)14).method2741(), (float)var1.method11482((byte)14).method2742(), 1024.0F);
      var1.method11500(var9);
      var1.method11603(new Class328());
      Class328 var10 = new Class328();
      var10.method6038(0.0F, 0.0F, (float)(50 - var13.AA()));
      var13.method12069(var10, (Class89)null, 1);
      int var11 = this.anInt3366 * 13 / 16;
      int var12 = (this.anInt3366 - var11) / 2;
      aClass171_3379.method2930(var12, var12, var11, var11, 0, -16777216 | this.anInt3353, 1);
      this.aClass171_3368 = var1.method11484(0, 0, this.anInt3366, this.anInt3366, true);
      var1.ba(2, 0);
      var1.B(0, 0, this.anInt3366, this.anInt3366, 0, 0);
      aClass171_3380.method2930(0, 0, this.anInt3366, this.anInt3366, 1, 0, 0);
      this.aClass171_3368.method2925(0, 0, 3);
      var1.method11500(var14);
      var1.r(anIntArray3355[0], anIntArray3355[1], anIntArray3355[2], anIntArray3355[3]);
   }

   static void method5251(Class545 var0) {
      if(aClass568_3365 == null) {
         Class96 var1 = new Class96(580, 1104, 1);
         var1.method1857((short)0, (short)32767, (short)0, (short)1024, (short)1024, (short)1024, (byte)0, (byte)0, (byte)0);
         var1.method1854(0, 128, 0);
         var1.method1854(0, -128, 0);

         for(int var2 = 0; var2 <= 24; ++var2) {
            int var3 = var2 * 8192 / 24;
            int var4 = Class312.anIntArray3943[var3];
            int var5 = Class312.anIntArray3956[var3];

            int var6;
            int var7;
            int var8;
            int var9;
            int var10;
            for(var6 = 1; var6 < 24; ++var6) {
               var7 = var6 * 8192 / 24;
               var8 = Class312.anIntArray3956[var7] >> 7;
               var9 = Class312.anIntArray3943[var7] * var4 >> 21;
               var10 = Class312.anIntArray3943[var7] * var5 >> 21;
               var1.method1854(var10, var8, -var9);
            }

            if(var2 > 0) {
               var6 = var2 * 23 + 2;
               var7 = var6 - 23;
               var1.method1855(0, var7, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);

               for(var8 = 1; var8 < 23; ++var8) {
                  var9 = var7 + 1;
                  var10 = var6 + 1;
                  var1.method1855(var7, var9, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
                  var1.method1855(var9, var10, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
                  var7 = var9;
                  var6 = var10;
               }

               var1.method1855(var6, var7, 1, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
            }
         }

         var1.anInt946 = var1.anInt962;
         var1.anIntArray944 = null;
         var1.anIntArray950 = null;
         var1.aByteArray978 = null;
         aClass568_3365 = var0.method11493(var1, '\uc800', 33, 64, 768);
      }

   }

   boolean method5252(int var1, int var2, int var3, int var4) {
      int var5;
      int var6;
      int var7;
      if(!this.aBool3360) {
         var5 = this.anInt3357 - var1;
         var6 = this.anInt3369 - var2;
         var7 = this.anInt3359 - var3;
         this.anInt3358 = (int)Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7));
         if(this.anInt3358 == 0) {
            this.anInt3358 = 1;
         }

         var5 = (var5 << 8) / this.anInt3358;
         var6 = (var6 << 8) / this.anInt3358;
         var7 = (var7 << 8) / this.anInt3358;
      } else {
         this.anInt3358 = 1073741823;
         var5 = this.anInt3357;
         var6 = this.anInt3369;
         var7 = this.anInt3359;
      }

      int var8 = (int)(Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7)) * 256.0D);
      if(var8 > 128) {
         var5 = (var5 << 16) / var8;
         var6 = (var6 << 16) / var8;
         var7 = (var7 << 16) / var8;
         this.anInt3367 = this.anInt3377 * var4 / (this.aBool3360?1024:this.anInt3358);
      } else {
         this.anInt3367 = 0;
      }

      if(this.anInt3367 < 8) {
         this.aClass171_3368 = null;
         return false;
      } else {
         int var9 = Class468.method7880(this.anInt3367, (byte)-67);
         if(var9 > var4) {
            var9 = Class526.method11090(var4, (byte)39);
         }

         if(var9 > 512) {
            var9 = 512;
         }

         if(var9 != this.anInt3366) {
            this.anInt3366 = var9;
         }

         this.anInt3363 = (int)(Math.asin((double)((float)var6 / 256.0F)) * 2607.5945876176133D) & 16383;
         this.anInt3362 = (int)(Math.atan2((double)var5, (double)(-var7)) * 2607.5945876176133D) & 16383;
         this.aClass171_3368 = null;
         return true;
      }
   }

   boolean method5253(int var1, int var2, int var3, int var4) {
      int var5;
      int var6;
      int var7;
      if(!this.aBool3360) {
         var5 = this.anInt3357 - var1;
         var6 = this.anInt3369 - var2;
         var7 = this.anInt3359 - var3;
         this.anInt3358 = (int)Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7));
         if(this.anInt3358 == 0) {
            this.anInt3358 = 1;
         }

         var5 = (var5 << 8) / this.anInt3358;
         var6 = (var6 << 8) / this.anInt3358;
         var7 = (var7 << 8) / this.anInt3358;
      } else {
         this.anInt3358 = 1073741823;
         var5 = this.anInt3357;
         var6 = this.anInt3369;
         var7 = this.anInt3359;
      }

      int var8 = (int)(Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7)) * 256.0D);
      if(var8 > 128) {
         var5 = (var5 << 16) / var8;
         var6 = (var6 << 16) / var8;
         var7 = (var7 << 16) / var8;
         this.anInt3367 = this.anInt3377 * var4 / (this.aBool3360?1024:this.anInt3358);
      } else {
         this.anInt3367 = 0;
      }

      if(this.anInt3367 < 8) {
         this.aClass171_3368 = null;
         return false;
      } else {
         int var9 = Class468.method7880(this.anInt3367, (byte)-67);
         if(var9 > var4) {
            var9 = Class526.method11090(var4, (byte)-3);
         }

         if(var9 > 512) {
            var9 = 512;
         }

         if(var9 != this.anInt3366) {
            this.anInt3366 = var9;
         }

         this.anInt3363 = (int)(Math.asin((double)((float)var6 / 256.0F)) * 2607.5945876176133D) & 16383;
         this.anInt3362 = (int)(Math.atan2((double)var5, (double)(-var7)) * 2607.5945876176133D) & 16383;
         this.aClass171_3368 = null;
         return true;
      }
   }

   void method5254(Class545 var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
      if(this.aClass171_3368 != null) {
         float[] var12 = new float[3];
         float var13 = (float)(-(this.anInt3357 - var8 << 16));
         float var14 = (float)(this.anInt3369 - var9 << 15);
         float var15 = (float)(-(this.anInt3359 - var10 << 16));
         float[] var16 = new float[3];
         var1.method11498().method6012(var16);
         var13 += var16[0];
         var14 += var16[1];
         var15 += var16[2];
         var1.method11650(var13, var14, var15, var12);
         if(var12[2] >= 0.0F) {
            int var17 = (int)(var12[0] - (float)(this.anInt3367 / 2));
            int var18 = (int)(var12[1] - (float)(this.anInt3367 / 2));
            if(var18 < var5 && var18 + this.anInt3367 > 0 && var17 < var4 && var17 + this.anInt3367 > 0) {
               this.aClass171_3368.method2930(var17, var18, this.anInt3367, this.anInt3367, 0, var11 << 24 | 16777215, 1);
            }
         }

      }
   }

   void method5255(Class545 var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
      if(this.aClass171_3368 != null) {
         float[] var12 = new float[3];
         float var13 = (float)(-(this.anInt3357 - var8 << 16));
         float var14 = (float)(this.anInt3369 - var9 << 15);
         float var15 = (float)(-(this.anInt3359 - var10 << 16));
         float[] var16 = new float[3];
         var1.method11498().method6012(var16);
         var13 += var16[0];
         var14 += var16[1];
         var15 += var16[2];
         var1.method11650(var13, var14, var15, var12);
         if(var12[2] >= 0.0F) {
            int var17 = (int)(var12[0] - (float)(this.anInt3367 / 2));
            int var18 = (int)(var12[1] - (float)(this.anInt3367 / 2));
            if(var18 < var5 && var18 + this.anInt3367 > 0 && var17 < var4 && var17 + this.anInt3367 > 0) {
               this.aClass171_3368.method2930(var17, var18, this.anInt3367, this.anInt3367, 0, var11 << 24 | 16777215, 1);
            }
         }

      }
   }

   boolean method5256(int var1, int var2, int var3, int var4) {
      int var5;
      int var6;
      int var7;
      if(!this.aBool3360) {
         var5 = this.anInt3357 - var1;
         var6 = this.anInt3369 - var2;
         var7 = this.anInt3359 - var3;
         this.anInt3358 = (int)Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7));
         if(this.anInt3358 == 0) {
            this.anInt3358 = 1;
         }

         var5 = (var5 << 8) / this.anInt3358;
         var6 = (var6 << 8) / this.anInt3358;
         var7 = (var7 << 8) / this.anInt3358;
      } else {
         this.anInt3358 = 1073741823;
         var5 = this.anInt3357;
         var6 = this.anInt3369;
         var7 = this.anInt3359;
      }

      int var8 = (int)(Math.sqrt((double)(var5 * var5 + var6 * var6 + var7 * var7)) * 256.0D);
      if(var8 > 128) {
         var5 = (var5 << 16) / var8;
         var6 = (var6 << 16) / var8;
         var7 = (var7 << 16) / var8;
         this.anInt3367 = this.anInt3377 * var4 / (this.aBool3360?1024:this.anInt3358);
      } else {
         this.anInt3367 = 0;
      }

      if(this.anInt3367 < 8) {
         this.aClass171_3368 = null;
         return false;
      } else {
         int var9 = Class468.method7880(this.anInt3367, (byte)-74);
         if(var9 > var4) {
            var9 = Class526.method11090(var4, (byte)-78);
         }

         if(var9 > 512) {
            var9 = 512;
         }

         if(var9 != this.anInt3366) {
            this.anInt3366 = var9;
         }

         this.anInt3363 = (int)(Math.asin((double)((float)var6 / 256.0F)) * 2607.5945876176133D) & 16383;
         this.anInt3362 = (int)(Math.atan2((double)var5, (double)(-var7)) * 2607.5945876176133D) & 16383;
         this.aClass171_3368 = null;
         return true;
      }
   }

   boolean method5257(Class545 var1, Class286 var2) {
      if(this.aClass171_3368 == null) {
         if(this.anInt3364 == 0) {
            if(Class573.anInterface24_7593.method119(this.anInt3356, Class557.aClass557_7471, 0.7F, this.anInt3366, this.anInt3366, false, -584980721)) {
               int[] var3 = Class573.anInterface24_7593.method115(this.anInt3356, 0.7F, this.anInt3366, this.anInt3366, false, (short)-28963);
               this.aClass171_3368 = var1.method11599(var3, 0, this.anInt3366, this.anInt3366, this.anInt3366, 98312473);
            }
         } else if(this.anInt3364 == 2) {
            this.method5247(var1, var2);
         } else if(this.anInt3364 == 1) {
            this.method5248(var1, var2);
         }
      }

      return this.aClass171_3368 != null;
   }

   void method5258(Class545 var1, Class286 var2) {
      Class96 var3 = Class96.method1867(Class264.aClass253_3072, this.anInt3356, 0);
      if(var3 != null) {
         var1.qa(anIntArray3355);
         var1.r(0, 0, this.anInt3366, this.anInt3366);
         var1.ba(2, 0);
         var1.B(0, 0, this.anInt3366, this.anInt3366, 0, 0);
         int var4 = 0;
         int var5 = 0;
         int var6 = 256;
         if(var2 != null) {
            if(var2.aBool3360) {
               var4 = -var2.anInt3357;
               var5 = -var2.anInt3369;
               var6 = -var2.anInt3359;
            } else {
               var4 = this.anInt3357 - var2.anInt3357;
               var5 = this.anInt3369 - var2.anInt3369;
               var6 = this.anInt3359 - var2.anInt3359;
            }
         }

         int var7;
         int var8;
         int var9;
         int var10;
         if(this.anInt3363 != 0) {
            var7 = -this.anInt3363 & 16383;
            var8 = Class312.anIntArray3943[var7];
            var9 = Class312.anIntArray3956[var7];
            var10 = var5 * var9 - var6 * var8 >> 14;
            var6 = var5 * var8 + var6 * var9 >> 14;
            var5 = var10;
         }

         if(this.anInt3362 != 0) {
            var7 = -this.anInt3362 & 16383;
            var8 = Class312.anIntArray3943[var7];
            var9 = Class312.anIntArray3956[var7];
            var10 = var6 * var8 + var4 * var9 >> 14;
            var6 = var6 * var9 - var4 * var8 >> 14;
            var4 = var10;
         }

         var1.IA(1.0F);
         var1.m(this.anInt3353, 1.0F, 1.0F, (float)var4, (float)var5, (float)var6);
         var3.method1885(this.anInt3351 & 16383, this.anInt3378 & 16383, this.anInt3371 & 16383);
         Class568 var16 = var1.method11493(var3, 2048, 0, 64, 768);
         var8 = var16.ya() - var16.RA();
         var9 = var16.o() - var16.YA();
         var10 = var8 > var9?var8:var9;
         int var11 = 1024 * this.anInt3366 / var10;
         Class317 var12 = var1.method11501();
         Class317 var13 = var1.method11467();
         var13.method5626((float)(this.anInt3366 / 2), (float)(this.anInt3366 / 2), (float)var11, (float)var11, 50.0F, 50000.0F, (float)var1.method11482((byte)14).method2741(), (float)var1.method11482((byte)14).method2742(), 1024.0F);
         var1.method11500(var13);
         Class328 var14 = new Class328();
         var1.method11603(var14);
         Class328 var15 = var1.method11491();
         var15.method6038(0.0F, 0.0F, (float)(50 - var16.AA()));
         var16.method12069(var15, (Class89)null, 1);
         this.aClass171_3368 = var1.method11484(0, 0, this.anInt3366, this.anInt3366, true);
         this.aClass171_3368.method2925(0, 0, 3);
         var1.method11500(var12);
         var1.r(anIntArray3355[0], anIntArray3355[1], anIntArray3355[2], anIntArray3355[3]);
      }
   }

   boolean method5259(Class545 var1, Class286 var2) {
      return this.aClass171_3368 != null || this.method5246(var1, var2);
   }

   static void method5260(Class545 var0) {
      if(aClass568_3365 == null) {
         Class96 var1 = new Class96(580, 1104, 1);
         var1.method1857((short)0, (short)32767, (short)0, (short)1024, (short)1024, (short)1024, (byte)0, (byte)0, (byte)0);
         var1.method1854(0, 128, 0);
         var1.method1854(0, -128, 0);

         for(int var2 = 0; var2 <= 24; ++var2) {
            int var3 = var2 * 8192 / 24;
            int var4 = Class312.anIntArray3943[var3];
            int var5 = Class312.anIntArray3956[var3];

            int var6;
            int var7;
            int var8;
            int var9;
            int var10;
            for(var6 = 1; var6 < 24; ++var6) {
               var7 = var6 * 8192 / 24;
               var8 = Class312.anIntArray3956[var7] >> 7;
               var9 = Class312.anIntArray3943[var7] * var4 >> 21;
               var10 = Class312.anIntArray3943[var7] * var5 >> 21;
               var1.method1854(var10, var8, -var9);
            }

            if(var2 > 0) {
               var6 = var2 * 23 + 2;
               var7 = var6 - 23;
               var1.method1855(0, var7, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);

               for(var8 = 1; var8 < 23; ++var8) {
                  var9 = var7 + 1;
                  var10 = var6 + 1;
                  var1.method1855(var7, var9, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
                  var1.method1855(var9, var10, var6, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
                  var7 = var9;
                  var6 = var10;
               }

               var1.method1855(var6, var7, 1, (byte)0, (byte)0, (short)127, (byte)0, (short)0);
            }
         }

         var1.anInt946 = var1.anInt962;
         var1.anIntArray944 = null;
         var1.anIntArray950 = null;
         var1.aByteArray978 = null;
         aClass568_3365 = var0.method11493(var1, '\uc800', 33, 64, 768);
      }

   }

   void method5261(Class545 var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
      if(this.aClass171_3368 != null) {
         float[] var12 = new float[3];
         float var13 = (float)(-(this.anInt3357 - var8 << 16));
         float var14 = (float)(this.anInt3369 - var9 << 15);
         float var15 = (float)(-(this.anInt3359 - var10 << 16));
         float[] var16 = new float[3];
         var1.method11498().method6012(var16);
         var13 += var16[0];
         var14 += var16[1];
         var15 += var16[2];
         var1.method11650(var13, var14, var15, var12);
         if(var12[2] >= 0.0F) {
            int var17 = (int)(var12[0] - (float)(this.anInt3367 / 2));
            int var18 = (int)(var12[1] - (float)(this.anInt3367 / 2));
            if(var18 < var5 && var18 + this.anInt3367 > 0 && var17 < var4 && var17 + this.anInt3367 > 0) {
               this.aClass171_3368.method2930(var17, var18, this.anInt3367, this.anInt3367, 0, var11 << 24 | 16777215, 1);
            }
         }

      }
   }

   static void method5262(Class545 var0) {
      if(aClass171_3380 == null) {
         int[] var1 = new int[16384];
         int[] var2 = new int[16384];

         for(int var3 = 0; var3 < 64; ++var3) {
            int var4 = 64 - var3;
            var4 *= var4;
            int var5 = 128 - var3 - 1;
            int var6 = var3 * 128;
            int var7 = var5 * 128;

            for(int var8 = 0; var8 < 64; ++var8) {
               int var9 = 64 - var8;
               var9 *= var9;
               int var10 = 128 - var8 - 1;
               int var11 = 256 - (var9 + var4 << 8) / 4096;
               var11 = var11 * 3072 / 1536;
               if(var11 < 0) {
                  var11 = 0;
               } else if(var11 > 255) {
                  var11 = 255;
               }

               int var12 = var11 / 2;
               var2[var6 + var8] = var2[var6 + var10] = var2[var7 + var8] = var2[var7 + var10] = -16777216 | var11 << 16;
               var1[var6 + var8] = var1[var6 + var10] = var1[var7 + var8] = var1[var7 + var10] = 127 - var12 << 24 | 16777215;
            }
         }

         aClass171_3380 = var0.method11599(var2, 0, 128, 128, 128, 98312473);
         aClass171_3379 = var0.method11599(var1, 0, 128, 128, 128, 98312473);
      }

   }

   static void method5263(Class545 var0) {
      if(aClass171_3380 == null) {
         int[] var1 = new int[16384];
         int[] var2 = new int[16384];

         for(int var3 = 0; var3 < 64; ++var3) {
            int var4 = 64 - var3;
            var4 *= var4;
            int var5 = 128 - var3 - 1;
            int var6 = var3 * 128;
            int var7 = var5 * 128;

            for(int var8 = 0; var8 < 64; ++var8) {
               int var9 = 64 - var8;
               var9 *= var9;
               int var10 = 128 - var8 - 1;
               int var11 = 256 - (var9 + var4 << 8) / 4096;
               var11 = var11 * 3072 / 1536;
               if(var11 < 0) {
                  var11 = 0;
               } else if(var11 > 255) {
                  var11 = 255;
               }

               int var12 = var11 / 2;
               var2[var6 + var8] = var2[var6 + var10] = var2[var7 + var8] = var2[var7 + var10] = -16777216 | var11 << 16;
               var1[var6 + var8] = var1[var6 + var10] = var1[var7 + var8] = var1[var7 + var10] = 127 - var12 << 24 | 16777215;
            }
         }

         aClass171_3380 = var0.method11599(var2, 0, 128, 128, 128, 98312473);
         aClass171_3379 = var0.method11599(var1, 0, 128, 128, 128, 98312473);
      }

   }
}
