import jaggl.OpenGL;

public class Class171_Sub2 extends Class171 {

   int anInt9924 = 0;
   Class545_Sub1 aClass545_Sub1_9925;
   boolean aBool9926 = false;
   int anInt9927 = 0;
   Class147_Sub4_Sub1 aClass147_Sub4_Sub1_9928;
   Class147_Sub4_Sub1 aClass147_Sub4_Sub1_9929;
   int anInt9930 = 0;
   int anInt9931 = 0;
   int anInt9932 = 0;


   public int method2963() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365;
   }

   Class171_Sub2(Class545_Sub1 var1, int var2, int var3, int var4, int var5) {
      this.aClass545_Sub1_9925 = var1;
      this.aClass147_Sub4_Sub1_9928 = Class147_Sub4_Sub1.method15948(var1, var2, var3, var4, var5);
   }

   Class171_Sub2(Class545_Sub1 var1, int var2, int var3, int[] var4, int var5, int var6) {
      this.aClass545_Sub1_9925 = var1;
      this.aClass147_Sub4_Sub1_9928 = Class147_Sub4_Sub1.method15945(var1, var2, var3, false, var4, var6, var5);
   }

   public void method2918(int var1, int var2, int var3, int var4) {
      this.anInt9927 = var1;
      this.anInt9930 = var2;
      this.anInt9932 = var3;
      this.anInt9931 = var4;
      this.aBool9926 = this.anInt9927 != 0 || this.anInt9930 != 0 || this.anInt9932 != 0 || this.anInt9931 != 0;
   }

   public void method2919(int[] var1) {
      var1[0] = this.anInt9927;
      var1[1] = this.anInt9930;
      var1[2] = this.anInt9932;
      var1[3] = this.anInt9931;
   }

   public int method2944() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364;
   }

   public int method94() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364 + this.anInt9927 + this.anInt9932;
   }

   public int method2964() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365;
   }

   void method2975(float var1, float var2, float var3, float var4, float var5, float var6, int var7, int var8, int var9, int var10) {
      float var11;
      float var12;
      if(this.aBool9926) {
         var11 = (float)this.method94();
         var12 = (float)this.method2969();
         float var13 = (var3 - var1) / var11;
         float var14 = (var4 - var2) / var11;
         float var15 = (var5 - var1) / var12;
         float var16 = (var6 - var2) / var12;
         float var17 = var15 * (float)this.anInt9930;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var13 * (float)this.anInt9927;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = -var13 * (float)this.anInt9932;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9931;
         float var24 = -var16 * (float)this.anInt9931;
         var1 = var1 + var19 + var17;
         var2 = var2 + var20 + var18;
         var3 = var3 + var21 + var17;
         var4 = var4 + var22 + var18;
         var5 = var5 + var19 + var23;
         var6 = var6 + var20 + var24;
      }

      var11 = var5 + (var3 - var1);
      var12 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var10 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var9);
      this.aClass545_Sub1_9925.method14591(var7);
      OpenGL.glColor4ub((byte)(var8 >> 16), (byte)(var8 >> 8), (byte)var8, (byte)(var8 >> 24));
      OpenGL.glBegin(7);
      OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glTexCoord2f(0.0F, 0.0F);
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glVertex2f(var11, var12);
      OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
   }

   public Interface7 method2948() {
      return this.aClass147_Sub4_Sub1_9928.method15466(0);
   }

   public void method2924(int var1, int var2, int var3, int var4, int var5, int var6) {
      if(this.aClass545_Sub1_9925.aBool9262) {
         int[] var7 = this.aClass545_Sub1_9925.ay(var5, var6, var3, var4);
         if(var7 != null) {
            for(int var8 = 0; var8 < var7.length; ++var8) {
               var7[var8] |= -16777216;
            }

            this.method15440(var1, var2, var3, var4, var7, 0, var3);
         }
      } else {
         this.aClass147_Sub4_Sub1_9928.method15460(var1, var2, var3, var4, var5, var6);
      }

   }

   public void method2925(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   void method15440(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7) {
      this.aClass147_Sub4_Sub1_9928.method15464(var1, var2, var3, var4, var5, var6, var7, true);
   }

   public void method2962(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   void method15441() {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14553(8448, 8448);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
      this.aClass545_Sub1_9925.method14630(0, 5890, 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
   }

   public void method2927(int var1, int var2, int var3, int var4, int var5) {
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14602(var5);
      OpenGL.glColor4ub((byte)(var4 >> 16), (byte)(var4 >> 8), (byte)var4, (byte)(var4 >> 24));
      var1 += this.anInt9927;
      var2 += this.anInt9930;
      if(this.aClass147_Sub4_Sub1_9929 == null) {
         this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
         this.aClass545_Sub1_9925.method14591(var3);
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
         OpenGL.glEnd();
      } else {
         this.method15443(var3);
         this.aClass147_Sub4_Sub1_9929.method2694(false);
         OpenGL.glBegin(7);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
         OpenGL.glEnd();
         this.method15441();
      }

   }

   public int method2961() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364;
   }

   void method2931(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      this.aClass147_Sub4_Sub1_9928.method2694((var8 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14602(var7);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aBool9926) {
         float var9 = (float)var3 / (float)this.method94();
         float var10 = (float)var4 / (float)this.method2969();
         float var11 = (float)var1 + (float)this.anInt9927 * var9;
         float var12 = (float)var2 + (float)this.anInt9930 * var10;
         float var13 = var11 + (float)this.aClass147_Sub4_Sub1_9928.anInt10364 * var9;
         float var14 = var12 + (float)this.aClass147_Sub4_Sub1_9928.anInt10365 * var10;
         if(this.aClass147_Sub4_Sub1_9929 == null) {
            this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
            this.aClass545_Sub1_9925.method14591(var5);
            OpenGL.glBegin(7);
            OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var11, var12);
            OpenGL.glTexCoord2f(0.0F, 0.0F);
            OpenGL.glVertex2f(var11, var14);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glVertex2f(var13, var14);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var13, var12);
            OpenGL.glEnd();
         } else {
            this.method15443(var5);
            this.aClass147_Sub4_Sub1_9929.method2694(true);
            OpenGL.glBegin(7);
            OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var11, var12);
            OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
            OpenGL.glTexCoord2f(0.0F, 0.0F);
            OpenGL.glVertex2f(var11, var14);
            OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glVertex2f(var13, var14);
            OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var13, var12);
            OpenGL.glEnd();
            this.method15441();
         }
      } else if(this.aClass147_Sub4_Sub1_9929 == null) {
         this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
         this.aClass545_Sub1_9925.method14591(var5);
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + var4);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + var3, var2 + var4);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + var3, var2);
         OpenGL.glEnd();
      } else {
         this.method15443(var5);
         this.aClass147_Sub4_Sub1_9929.method2694(true);
         OpenGL.glBegin(7);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + var4);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + var3, var2 + var4);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + var3, var2);
         OpenGL.glEnd();
         this.method15441();
      }

   }

   public Interface7 method2951() {
      return this.aClass147_Sub4_Sub1_9928.method15466(0);
   }

   void method2928(float var1, float var2, float var3, float var4, float var5, float var6, int var7, int var8, int var9, int var10) {
      float var11;
      float var12;
      if(this.aBool9926) {
         var11 = (float)this.method94();
         var12 = (float)this.method2969();
         float var13 = (var3 - var1) / var11;
         float var14 = (var4 - var2) / var11;
         float var15 = (var5 - var1) / var12;
         float var16 = (var6 - var2) / var12;
         float var17 = var15 * (float)this.anInt9930;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var13 * (float)this.anInt9927;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = -var13 * (float)this.anInt9932;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9931;
         float var24 = -var16 * (float)this.anInt9931;
         var1 = var1 + var19 + var17;
         var2 = var2 + var20 + var18;
         var3 = var3 + var21 + var17;
         var4 = var4 + var22 + var18;
         var5 = var5 + var19 + var23;
         var6 = var6 + var20 + var24;
      }

      var11 = var5 + (var3 - var1);
      var12 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var10 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var9);
      this.aClass545_Sub1_9925.method14591(var7);
      OpenGL.glColor4ub((byte)(var8 >> 16), (byte)(var8 >> 8), (byte)var8, (byte)(var8 >> 24));
      OpenGL.glBegin(7);
      OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glTexCoord2f(0.0F, 0.0F);
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glVertex2f(var11, var12);
      OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
   }

   void method2942(float var1, float var2, float var3, float var4, float var5, float var6, int var7, Class496 var8, int var9, int var10) {
      Class147_Sub4_Sub1 var11 = ((Class496_Sub3)var8).aClass147_Sub4_Sub1_9955;
      float var12;
      float var13;
      float var14;
      float var15;
      if(this.aBool9926) {
         var12 = (float)this.method94();
         var13 = (float)this.method2969();
         var14 = (var3 - var1) / var12;
         var15 = (var4 - var2) / var12;
         float var16 = (var5 - var1) / var13;
         float var17 = (var6 - var2) / var13;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var17 * (float)this.anInt9930;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = var15 * (float)this.anInt9927;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9932;
         float var24 = -var16 * (float)this.anInt9931;
         float var25 = -var17 * (float)this.anInt9931;
         var1 = var1 + var20 + var18;
         var2 = var2 + var21 + var19;
         var3 = var3 + var22 + var18;
         var4 = var4 + var23 + var19;
         var5 = var5 + var20 + var24;
         var6 = var6 + var21 + var25;
      }

      var12 = var5 + (var3 - var1);
      var13 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var7 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var11);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var14 = var11.aFloat10363 / (float)var11.anInt10364;
      var15 = var11.aFloat10366 / (float)var11.anInt10365;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var1 - (float)var9), var11.aFloat10366 - var15 * (var2 - (float)var10));
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var5 - (float)var9), var11.aFloat10366 - var15 * (var6 - (float)var10));
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var12 - (float)var9), var11.aFloat10366 - var15 * (var13 - (float)var10));
      OpenGL.glVertex2f(var12, var13);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var3 - (float)var9), var11.aFloat10366 - var15 * (var4 - (float)var10));
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   Class171_Sub2(Class545_Sub1 var1, int var2, int var3, boolean var4) {
      this.aClass545_Sub1_9925 = var1;
      this.aClass147_Sub4_Sub1_9928 = Class147_Sub4_Sub1.method15952(var1, var4?Class98.aClass98_992:Class98.aClass98_994, Class91.aClass91_897, var2, var3);
   }

   public void method2968(int var1, int var2, int var3, int var4, int var5, int var6) {
      if(this.aClass545_Sub1_9925.aBool9262) {
         int[] var7 = this.aClass545_Sub1_9925.ay(var5, var6, var3, var4);
         if(var7 != null) {
            for(int var8 = 0; var8 < var7.length; ++var8) {
               var7[var8] |= -16777216;
            }

            this.method15440(var1, var2, var3, var4, var7, 0, var3);
         }
      } else {
         this.aClass147_Sub4_Sub1_9928.method15460(var1, var2, var3, var4, var5, var6);
      }

   }

   public void method2956(int var1, int var2, int var3, int var4) {
      this.anInt9927 = var1;
      this.anInt9930 = var2;
      this.anInt9932 = var3;
      this.anInt9931 = var4;
      this.aBool9926 = this.anInt9927 != 0 || this.anInt9930 != 0 || this.anInt9932 != 0 || this.anInt9931 != 0;
   }

   public void method2946(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   public void method2947(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   void method15442(int var1) {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14553(this.aClass545_Sub1_9925.method14621(var1), 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8577', 768);
      this.aClass545_Sub1_9925.method14630(0, '\u8578', 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9929);
      this.aClass545_Sub1_9925.method14553('\u86af', 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8576', 768);
      if(this.anInt9924 == 0) {
         this.aClass545_Sub1_9925.method14596(1.0F, 0.5F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 1) {
         this.aClass545_Sub1_9925.method14596(0.5F, 1.0F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 2) {
         this.aClass545_Sub1_9925.method14596(0.5F, 0.5F, 1.0F, 0.0F);
      } else if(this.anInt9924 == 3) {
         this.aClass545_Sub1_9925.method14596(128.5F, 128.5F, 128.5F, 0.0F);
      }

   }

   public int method2965() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365;
   }

   public Interface7 method2950() {
      return this.aClass147_Sub4_Sub1_9928.method15466(0);
   }

   public Interface7 method2945() {
      return this.aClass147_Sub4_Sub1_9928.method15466(0);
   }

   public void method2999(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      int var8 = var1 + var3;
      int var9 = var2 + var4;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var7);
      this.aClass545_Sub1_9925.method14591(var5);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aClass147_Sub4_Sub1_9928.aBool10367 && !this.aBool9926) {
         float var19 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)var4 / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
         float var18 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)var3 / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, var19);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var9);
         OpenGL.glTexCoord2f(var18, 0.0F);
         OpenGL.glVertex2i(var8, var9);
         OpenGL.glTexCoord2f(var18, var19);
         OpenGL.glVertex2i(var8, var2);
         OpenGL.glEnd();
      } else {
         OpenGL.glPushMatrix();
         OpenGL.glTranslatef((float)this.anInt9927, (float)this.anInt9930, 0.0F);
         int var10 = this.method94();
         int var11 = this.method2969();
         int var12 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
         OpenGL.glBegin(7);

         int var13;
         int var14;
         for(var13 = var2; var12 <= var9; var12 += var11) {
            var14 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            int var15;
            for(var15 = var1; var14 <= var8; var15 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
               OpenGL.glVertex2i(var14, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               var14 += var10;
            }

            if(var15 < var8) {
               float var16 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var15) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(var16, 0.0F);
               OpenGL.glVertex2i(var8, var12);
               OpenGL.glTexCoord2f(var16, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }

            var13 += var11;
         }

         if(var13 < var9) {
            float var21 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)(this.aClass147_Sub4_Sub1_9928.anInt10365 - (var9 - var13)) / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
            int var20 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            for(var14 = var1; var20 <= var8; var14 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, var21);
               OpenGL.glVertex2i(var20, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var20, var13);
               var20 += var10;
            }

            if(var14 < var8) {
               float var17 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var14) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(var17, var21);
               OpenGL.glVertex2i(var8, var9);
               OpenGL.glTexCoord2f(var17, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }
         }

         OpenGL.glEnd();
         OpenGL.glPopMatrix();
      }

   }

   public int method2966() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365;
   }

   public void method2970(int var1, int var2, Class496 var3, int var4, int var5) {
      Class496_Sub3 var6 = (Class496_Sub3)var3;
      Class147_Sub4_Sub1 var7 = var6.aClass147_Sub4_Sub1_9955;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var7);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var1 += this.anInt9927;
      var2 += this.anInt9930;
      int var8 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;
      int var9 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
      float var10 = var7.aFloat10363 / (float)var7.anInt10364;
      float var11 = var7.aFloat10366 / (float)var7.anInt10365;
      float var12 = (float)(var1 - var4) * var10;
      float var13 = (float)(var8 - var4) * var10;
      float var14 = var7.aFloat10366 - (float)(var2 - var5) * var11;
      float var15 = var7.aFloat10366 - (float)(var9 - var5) * var11;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var12, var14);
      OpenGL.glVertex2i(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var12, var15);
      OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var13, var15);
      OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var13, var14);
      OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   void method2954(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      this.aClass147_Sub4_Sub1_9928.method2694((var8 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14602(var7);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aBool9926) {
         float var9 = (float)var3 / (float)this.method94();
         float var10 = (float)var4 / (float)this.method2969();
         float var11 = (float)var1 + (float)this.anInt9927 * var9;
         float var12 = (float)var2 + (float)this.anInt9930 * var10;
         float var13 = var11 + (float)this.aClass147_Sub4_Sub1_9928.anInt10364 * var9;
         float var14 = var12 + (float)this.aClass147_Sub4_Sub1_9928.anInt10365 * var10;
         if(this.aClass147_Sub4_Sub1_9929 == null) {
            this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
            this.aClass545_Sub1_9925.method14591(var5);
            OpenGL.glBegin(7);
            OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var11, var12);
            OpenGL.glTexCoord2f(0.0F, 0.0F);
            OpenGL.glVertex2f(var11, var14);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glVertex2f(var13, var14);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var13, var12);
            OpenGL.glEnd();
         } else {
            this.method15443(var5);
            this.aClass147_Sub4_Sub1_9929.method2694(true);
            OpenGL.glBegin(7);
            OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var11, var12);
            OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
            OpenGL.glTexCoord2f(0.0F, 0.0F);
            OpenGL.glVertex2f(var11, var14);
            OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
            OpenGL.glVertex2f(var13, var14);
            OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
            OpenGL.glVertex2f(var13, var12);
            OpenGL.glEnd();
            this.method15441();
         }
      } else if(this.aClass147_Sub4_Sub1_9929 == null) {
         this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
         this.aClass545_Sub1_9925.method14591(var5);
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + var4);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + var3, var2 + var4);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + var3, var2);
         OpenGL.glEnd();
      } else {
         this.method15443(var5);
         this.aClass147_Sub4_Sub1_9929.method2694(true);
         OpenGL.glBegin(7);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + var4);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + var3, var2 + var4);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + var3, var2);
         OpenGL.glEnd();
         this.method15441();
      }

   }

   public void method2955(int var1, int var2, int var3, int var4) {
      this.anInt9927 = var1;
      this.anInt9930 = var2;
      this.anInt9932 = var3;
      this.anInt9931 = var4;
      this.aBool9926 = this.anInt9927 != 0 || this.anInt9930 != 0 || this.anInt9932 != 0 || this.anInt9931 != 0;
   }

   void method15443(int var1) {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14553(this.aClass545_Sub1_9925.method14621(var1), 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8577', 768);
      this.aClass545_Sub1_9925.method14630(0, '\u8578', 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9929);
      this.aClass545_Sub1_9925.method14553('\u86af', 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8576', 768);
      if(this.anInt9924 == 0) {
         this.aClass545_Sub1_9925.method14596(1.0F, 0.5F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 1) {
         this.aClass545_Sub1_9925.method14596(0.5F, 1.0F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 2) {
         this.aClass545_Sub1_9925.method14596(0.5F, 0.5F, 1.0F, 0.0F);
      } else if(this.anInt9924 == 3) {
         this.aClass545_Sub1_9925.method14596(128.5F, 128.5F, 128.5F, 0.0F);
      }

   }

   public int method2921() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365;
   }

   public void method2958(int[] var1) {
      var1[0] = this.anInt9927;
      var1[1] = this.anInt9930;
      var1[2] = this.anInt9932;
      var1[3] = this.anInt9931;
   }

   public void method2959(int[] var1) {
      var1[0] = this.anInt9927;
      var1[1] = this.anInt9930;
      var1[2] = this.anInt9932;
      var1[3] = this.anInt9931;
   }

   public void method2940(int var1, int var2, int var3, int var4, int var5, int var6) {
      if(this.aClass545_Sub1_9925.aBool9262) {
         int[] var7 = this.aClass545_Sub1_9925.ay(var5, var6, var3, var4);
         if(var7 != null) {
            for(int var8 = 0; var8 < var7.length; ++var8) {
               var7[var8] |= -16777216;
            }

            this.method15440(var1, var2, var3, var4, var7, 0, var3);
         }
      } else {
         this.aClass147_Sub4_Sub1_9928.method15460(var1, var2, var3, var4, var5, var6);
      }

   }

   void method2974(float var1, float var2, float var3, float var4, float var5, float var6, int var7, Class496 var8, int var9, int var10) {
      Class147_Sub4_Sub1 var11 = ((Class496_Sub3)var8).aClass147_Sub4_Sub1_9955;
      float var12;
      float var13;
      float var14;
      float var15;
      if(this.aBool9926) {
         var12 = (float)this.method94();
         var13 = (float)this.method2969();
         var14 = (var3 - var1) / var12;
         var15 = (var4 - var2) / var12;
         float var16 = (var5 - var1) / var13;
         float var17 = (var6 - var2) / var13;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var17 * (float)this.anInt9930;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = var15 * (float)this.anInt9927;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9932;
         float var24 = -var16 * (float)this.anInt9931;
         float var25 = -var17 * (float)this.anInt9931;
         var1 = var1 + var20 + var18;
         var2 = var2 + var21 + var19;
         var3 = var3 + var22 + var18;
         var4 = var4 + var23 + var19;
         var5 = var5 + var20 + var24;
         var6 = var6 + var21 + var25;
      }

      var12 = var5 + (var3 - var1);
      var13 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var7 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var11);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var14 = var11.aFloat10363 / (float)var11.anInt10364;
      var15 = var11.aFloat10366 / (float)var11.anInt10365;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var1 - (float)var9), var11.aFloat10366 - var15 * (var2 - (float)var10));
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var5 - (float)var9), var11.aFloat10366 - var15 * (var6 - (float)var10));
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var12 - (float)var9), var11.aFloat10366 - var15 * (var13 - (float)var10));
      OpenGL.glVertex2f(var12, var13);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var3 - (float)var9), var11.aFloat10366 - var15 * (var4 - (float)var10));
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   public void method2952(int var1, int var2, int var3, int var4, int var5) {
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14602(var5);
      OpenGL.glColor4ub((byte)(var4 >> 16), (byte)(var4 >> 8), (byte)var4, (byte)(var4 >> 24));
      var1 += this.anInt9927;
      var2 += this.anInt9930;
      if(this.aClass147_Sub4_Sub1_9929 == null) {
         this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
         this.aClass545_Sub1_9925.method14591(var3);
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
         OpenGL.glEnd();
      } else {
         this.method15443(var3);
         this.aClass147_Sub4_Sub1_9929.method2694(false);
         OpenGL.glBegin(7);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glMultiTexCoord2f('\u84c1', 0.0F, 0.0F);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
         OpenGL.glMultiTexCoord2f('\u84c1', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
         OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
         OpenGL.glEnd();
         this.method15441();
      }

   }

   public void method2917(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   public void method2981(int var1, int var2, Class496 var3, int var4, int var5) {
      Class496_Sub3 var6 = (Class496_Sub3)var3;
      Class147_Sub4_Sub1 var7 = var6.aClass147_Sub4_Sub1_9955;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var7);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var1 += this.anInt9927;
      var2 += this.anInt9930;
      int var8 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;
      int var9 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
      float var10 = var7.aFloat10363 / (float)var7.anInt10364;
      float var11 = var7.aFloat10366 / (float)var7.anInt10365;
      float var12 = (float)(var1 - var4) * var10;
      float var13 = (float)(var8 - var4) * var10;
      float var14 = var7.aFloat10366 - (float)(var2 - var5) * var11;
      float var15 = var7.aFloat10366 - (float)(var9 - var5) * var11;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var12, var14);
      OpenGL.glVertex2i(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var12, var15);
      OpenGL.glVertex2i(var1, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var13, var15);
      OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2 + this.aClass147_Sub4_Sub1_9928.anInt10365);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var13, var14);
      OpenGL.glVertex2i(var1 + this.aClass147_Sub4_Sub1_9928.anInt10364, var2);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   public void method2941(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      int var8 = var1 + var3;
      int var9 = var2 + var4;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var7);
      this.aClass545_Sub1_9925.method14591(var5);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aClass147_Sub4_Sub1_9928.aBool10367 && !this.aBool9926) {
         float var19 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)var4 / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
         float var18 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)var3 / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, var19);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var9);
         OpenGL.glTexCoord2f(var18, 0.0F);
         OpenGL.glVertex2i(var8, var9);
         OpenGL.glTexCoord2f(var18, var19);
         OpenGL.glVertex2i(var8, var2);
         OpenGL.glEnd();
      } else {
         OpenGL.glPushMatrix();
         OpenGL.glTranslatef((float)this.anInt9927, (float)this.anInt9930, 0.0F);
         int var10 = this.method94();
         int var11 = this.method2969();
         int var12 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
         OpenGL.glBegin(7);

         int var13;
         int var14;
         for(var13 = var2; var12 <= var9; var12 += var11) {
            var14 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            int var15;
            for(var15 = var1; var14 <= var8; var15 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
               OpenGL.glVertex2i(var14, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               var14 += var10;
            }

            if(var15 < var8) {
               float var16 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var15) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(var16, 0.0F);
               OpenGL.glVertex2i(var8, var12);
               OpenGL.glTexCoord2f(var16, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }

            var13 += var11;
         }

         if(var13 < var9) {
            float var21 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)(this.aClass147_Sub4_Sub1_9928.anInt10365 - (var9 - var13)) / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
            int var20 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            for(var14 = var1; var20 <= var8; var14 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, var21);
               OpenGL.glVertex2i(var20, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var20, var13);
               var20 += var10;
            }

            if(var14 < var8) {
               float var17 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var14) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(var17, var21);
               OpenGL.glVertex2i(var8, var9);
               OpenGL.glTexCoord2f(var17, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }
         }

         OpenGL.glEnd();
         OpenGL.glPopMatrix();
      }

   }

   public int method2960() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364;
   }

   public int method243() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364 + this.anInt9927 + this.anInt9932;
   }

   public int method244() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364 + this.anInt9927 + this.anInt9932;
   }

   public int method2953() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365 + this.anInt9930 + this.anInt9931;
   }

   public void method2967(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      int var8 = var1 + var3;
      int var9 = var2 + var4;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var7);
      this.aClass545_Sub1_9925.method14591(var5);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aClass147_Sub4_Sub1_9928.aBool10367 && !this.aBool9926) {
         float var19 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)var4 / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
         float var18 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)var3 / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, var19);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var9);
         OpenGL.glTexCoord2f(var18, 0.0F);
         OpenGL.glVertex2i(var8, var9);
         OpenGL.glTexCoord2f(var18, var19);
         OpenGL.glVertex2i(var8, var2);
         OpenGL.glEnd();
      } else {
         OpenGL.glPushMatrix();
         OpenGL.glTranslatef((float)this.anInt9927, (float)this.anInt9930, 0.0F);
         int var10 = this.method94();
         int var11 = this.method2969();
         int var12 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
         OpenGL.glBegin(7);

         int var13;
         int var14;
         for(var13 = var2; var12 <= var9; var12 += var11) {
            var14 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            int var15;
            for(var15 = var1; var14 <= var8; var15 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
               OpenGL.glVertex2i(var14, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               var14 += var10;
            }

            if(var15 < var8) {
               float var16 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var15) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(var16, 0.0F);
               OpenGL.glVertex2i(var8, var12);
               OpenGL.glTexCoord2f(var16, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }

            var13 += var11;
         }

         if(var13 < var9) {
            float var21 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)(this.aClass147_Sub4_Sub1_9928.anInt10365 - (var9 - var13)) / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
            int var20 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            for(var14 = var1; var20 <= var8; var14 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, var21);
               OpenGL.glVertex2i(var20, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var20, var13);
               var20 += var10;
            }

            if(var14 < var8) {
               float var17 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var14) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(var17, var21);
               OpenGL.glVertex2i(var8, var9);
               OpenGL.glTexCoord2f(var17, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }
         }

         OpenGL.glEnd();
         OpenGL.glPopMatrix();
      }

   }

   public int method2943() {
      return this.aClass147_Sub4_Sub1_9928.anInt10364;
   }

   public void method2938(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      int var8 = var1 + var3;
      int var9 = var2 + var4;
      this.aClass147_Sub4_Sub1_9928.method2694(false);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14602(var7);
      this.aClass545_Sub1_9925.method14591(var5);
      OpenGL.glColor4ub((byte)(var6 >> 16), (byte)(var6 >> 8), (byte)var6, (byte)(var6 >> 24));
      if(this.aClass147_Sub4_Sub1_9928.aBool10367 && !this.aBool9926) {
         float var19 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)var4 / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
         float var18 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)var3 / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
         OpenGL.glBegin(7);
         OpenGL.glTexCoord2f(0.0F, var19);
         OpenGL.glVertex2i(var1, var2);
         OpenGL.glTexCoord2f(0.0F, 0.0F);
         OpenGL.glVertex2i(var1, var9);
         OpenGL.glTexCoord2f(var18, 0.0F);
         OpenGL.glVertex2i(var8, var9);
         OpenGL.glTexCoord2f(var18, var19);
         OpenGL.glVertex2i(var8, var2);
         OpenGL.glEnd();
      } else {
         OpenGL.glPushMatrix();
         OpenGL.glTranslatef((float)this.anInt9927, (float)this.anInt9930, 0.0F);
         int var10 = this.method94();
         int var11 = this.method2969();
         int var12 = var2 + this.aClass147_Sub4_Sub1_9928.anInt10365;
         OpenGL.glBegin(7);

         int var13;
         int var14;
         for(var13 = var2; var12 <= var9; var12 += var11) {
            var14 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            int var15;
            for(var15 = var1; var14 <= var8; var15 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
               OpenGL.glVertex2i(var14, var12);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               var14 += var10;
            }

            if(var15 < var8) {
               float var16 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var15) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var15, var13);
               OpenGL.glTexCoord2f(0.0F, 0.0F);
               OpenGL.glVertex2i(var15, var12);
               OpenGL.glTexCoord2f(var16, 0.0F);
               OpenGL.glVertex2i(var8, var12);
               OpenGL.glTexCoord2f(var16, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }

            var13 += var11;
         }

         if(var13 < var9) {
            float var21 = this.aClass147_Sub4_Sub1_9928.aFloat10366 * (float)(this.aClass147_Sub4_Sub1_9928.anInt10365 - (var9 - var13)) / (float)this.aClass147_Sub4_Sub1_9928.anInt10365;
            int var20 = var1 + this.aClass147_Sub4_Sub1_9928.anInt10364;

            for(var14 = var1; var20 <= var8; var14 += var10) {
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, var21);
               OpenGL.glVertex2i(var20, var9);
               OpenGL.glTexCoord2f(this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var20, var13);
               var20 += var10;
            }

            if(var14 < var8) {
               float var17 = this.aClass147_Sub4_Sub1_9928.aFloat10363 * (float)(var8 - var14) / (float)this.aClass147_Sub4_Sub1_9928.anInt10364;
               OpenGL.glTexCoord2f(0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var14, var13);
               OpenGL.glTexCoord2f(0.0F, var21);
               OpenGL.glVertex2i(var14, var9);
               OpenGL.glTexCoord2f(var17, var21);
               OpenGL.glVertex2i(var8, var9);
               OpenGL.glTexCoord2f(var17, this.aClass147_Sub4_Sub1_9928.aFloat10366);
               OpenGL.glVertex2i(var8, var13);
            }
         }

         OpenGL.glEnd();
         OpenGL.glPopMatrix();
      }

   }

   void method2973(float var1, float var2, float var3, float var4, float var5, float var6, int var7, Class496 var8, int var9, int var10) {
      Class147_Sub4_Sub1 var11 = ((Class496_Sub3)var8).aClass147_Sub4_Sub1_9955;
      float var12;
      float var13;
      float var14;
      float var15;
      if(this.aBool9926) {
         var12 = (float)this.method94();
         var13 = (float)this.method2969();
         var14 = (var3 - var1) / var12;
         var15 = (var4 - var2) / var12;
         float var16 = (var5 - var1) / var13;
         float var17 = (var6 - var2) / var13;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var17 * (float)this.anInt9930;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = var15 * (float)this.anInt9927;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9932;
         float var24 = -var16 * (float)this.anInt9931;
         float var25 = -var17 * (float)this.anInt9931;
         var1 = var1 + var20 + var18;
         var2 = var2 + var21 + var19;
         var3 = var3 + var22 + var18;
         var4 = var4 + var23 + var19;
         var5 = var5 + var20 + var24;
         var6 = var6 + var21 + var25;
      }

      var12 = var5 + (var3 - var1);
      var13 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var7 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var11);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var14 = var11.aFloat10363 / (float)var11.anInt10364;
      var15 = var11.aFloat10366 / (float)var11.anInt10365;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var1 - (float)var9), var11.aFloat10366 - var15 * (var2 - (float)var10));
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var5 - (float)var9), var11.aFloat10366 - var15 * (var6 - (float)var10));
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var12 - (float)var9), var11.aFloat10366 - var15 * (var13 - (float)var10));
      OpenGL.glVertex2f(var12, var13);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var3 - (float)var9), var11.aFloat10366 - var15 * (var4 - (float)var10));
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   void method2989(float var1, float var2, float var3, float var4, float var5, float var6, int var7, Class496 var8, int var9, int var10) {
      Class147_Sub4_Sub1 var11 = ((Class496_Sub3)var8).aClass147_Sub4_Sub1_9955;
      float var12;
      float var13;
      float var14;
      float var15;
      if(this.aBool9926) {
         var12 = (float)this.method94();
         var13 = (float)this.method2969();
         var14 = (var3 - var1) / var12;
         var15 = (var4 - var2) / var12;
         float var16 = (var5 - var1) / var13;
         float var17 = (var6 - var2) / var13;
         float var18 = var16 * (float)this.anInt9930;
         float var19 = var17 * (float)this.anInt9930;
         float var20 = var14 * (float)this.anInt9927;
         float var21 = var15 * (float)this.anInt9927;
         float var22 = -var14 * (float)this.anInt9932;
         float var23 = -var15 * (float)this.anInt9932;
         float var24 = -var16 * (float)this.anInt9931;
         float var25 = -var17 * (float)this.anInt9931;
         var1 = var1 + var20 + var18;
         var2 = var2 + var21 + var19;
         var3 = var3 + var22 + var18;
         var4 = var4 + var23 + var19;
         var5 = var5 + var20 + var24;
         var6 = var6 + var21 + var25;
      }

      var12 = var5 + (var3 - var1);
      var13 = var4 + (var6 - var2);
      this.aClass147_Sub4_Sub1_9928.method2694((var7 & 1) != 0);
      this.aClass545_Sub1_9925.method14587();
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14591(1);
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(var11);
      this.aClass545_Sub1_9925.method14553(7681, 8448);
      this.aClass545_Sub1_9925.method14679(0, '\u8578', 768);
      this.aClass545_Sub1_9925.method14602(1);
      var14 = var11.aFloat10363 / (float)var11.anInt10364;
      var15 = var11.aFloat10366 / (float)var11.anInt10365;
      OpenGL.glBegin(7);
      OpenGL.glColor3f(1.0F, 1.0F, 1.0F);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var1 - (float)var9), var11.aFloat10366 - var15 * (var2 - (float)var10));
      OpenGL.glVertex2f(var1, var2);
      OpenGL.glMultiTexCoord2f('\u84c0', 0.0F, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var5 - (float)var9), var11.aFloat10366 - var15 * (var6 - (float)var10));
      OpenGL.glVertex2f(var5, var6);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, 0.0F);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var12 - (float)var9), var11.aFloat10366 - var15 * (var13 - (float)var10));
      OpenGL.glVertex2f(var12, var13);
      OpenGL.glMultiTexCoord2f('\u84c0', this.aClass147_Sub4_Sub1_9928.aFloat10363, this.aClass147_Sub4_Sub1_9928.aFloat10366);
      OpenGL.glMultiTexCoord2f('\u84c1', var14 * (var3 - (float)var9), var11.aFloat10366 - var15 * (var4 - (float)var10));
      OpenGL.glVertex2f(var3, var4);
      OpenGL.glEnd();
      this.aClass545_Sub1_9925.method14679(0, 5890, 768);
      this.aClass545_Sub1_9925.method14591(0);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14641(0);
   }

   void method15444() {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14553(8448, 8448);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
      this.aClass545_Sub1_9925.method14630(0, 5890, 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
   }

   void method15445(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7) {
      this.aClass147_Sub4_Sub1_9928.method15464(var1, var2, var3, var4, var5, var6, var7, true);
   }

   void method15446(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7) {
      this.aClass147_Sub4_Sub1_9928.method15464(var1, var2, var3, var4, var5, var6, var7, true);
   }

   void method15447(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7) {
      this.aClass147_Sub4_Sub1_9928.method15464(var1, var2, var3, var4, var5, var6, var7, true);
   }

   void method15448(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7) {
      this.aClass147_Sub4_Sub1_9928.method15464(var1, var2, var3, var4, var5, var6, var7, true);
   }

   void method15449(int var1) {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9928);
      this.aClass545_Sub1_9925.method14553(this.aClass545_Sub1_9925.method14621(var1), 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8577', 768);
      this.aClass545_Sub1_9925.method14630(0, '\u8578', 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14725(this.aClass147_Sub4_Sub1_9929);
      this.aClass545_Sub1_9925.method14553('\u86af', 7681);
      this.aClass545_Sub1_9925.method14679(1, '\u8576', 768);
      if(this.anInt9924 == 0) {
         this.aClass545_Sub1_9925.method14596(1.0F, 0.5F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 1) {
         this.aClass545_Sub1_9925.method14596(0.5F, 1.0F, 0.5F, 0.0F);
      } else if(this.anInt9924 == 2) {
         this.aClass545_Sub1_9925.method14596(0.5F, 0.5F, 1.0F, 0.0F);
      } else if(this.anInt9924 == 3) {
         this.aClass545_Sub1_9925.method14596(128.5F, 128.5F, 128.5F, 0.0F);
      }

   }

   public void method2949(int var1, int var2, int var3) {
      OpenGL.glPixelTransferf(3348, 0.5F);
      OpenGL.glPixelTransferf(3349, 0.499F);
      OpenGL.glPixelTransferf(3352, 0.5F);
      OpenGL.glPixelTransferf(3353, 0.499F);
      OpenGL.glPixelTransferf(3354, 0.5F);
      OpenGL.glPixelTransferf(3355, 0.499F);
      this.aClass147_Sub4_Sub1_9929 = Class147_Sub4_Sub1.method15948(this.aClass545_Sub1_9925, var1, var2, this.aClass147_Sub4_Sub1_9928.anInt10364, this.aClass147_Sub4_Sub1_9928.anInt10365);
      this.anInt9924 = var3;
      OpenGL.glPixelTransferf(3348, 1.0F);
      OpenGL.glPixelTransferf(3349, 0.0F);
      OpenGL.glPixelTransferf(3352, 1.0F);
      OpenGL.glPixelTransferf(3353, 0.0F);
      OpenGL.glPixelTransferf(3354, 1.0F);
      OpenGL.glPixelTransferf(3355, 0.0F);
   }

   public int method2969() {
      return this.aClass147_Sub4_Sub1_9928.anInt10365 + this.anInt9930 + this.anInt9931;
   }

   void method15450() {
      this.aClass545_Sub1_9925.method14641(1);
      this.aClass545_Sub1_9925.method14725((Class147)null);
      this.aClass545_Sub1_9925.method14553(8448, 8448);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
      this.aClass545_Sub1_9925.method14630(0, 5890, 770);
      this.aClass545_Sub1_9925.method14641(0);
      this.aClass545_Sub1_9925.method14679(1, '\u8578', 768);
   }

   public void method2957(int var1, int var2, int var3, int var4) {
      this.anInt9927 = var1;
      this.anInt9930 = var2;
      this.anInt9932 = var3;
      this.anInt9931 = var4;
      this.aBool9926 = this.anInt9927 != 0 || this.anInt9930 != 0 || this.anInt9932 != 0 || this.anInt9931 != 0;
   }
}
