import jaggl.OpenGL;

public class Class147_Sub4 extends Class147 {

   int anInt9953;
   int anInt9954;


   Interface7 method15459(int var1) {
      return new Class156(this, var1);
   }

   void method15460(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   Class147_Sub4(Class545_Sub1 var1, int var2, Class98 var3, Class91 var4, int var5, int var6) {
      super(var1, var2, var3, var4, var5 * var6, false);
      this.anInt9953 = var5;
      this.anInt9954 = var6;
      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glTexImage2Dub(this.anInt1702, 0, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), var5, var6, 0, Class545_Sub1.method14567(this.aClass98_1707), 5121, (byte[])null, 0);
      this.method2694(true);
   }

   void method15461(int var1, int var2, int var3, int var4, byte[] var5, Class98 var6, int var7, int var8, boolean var9) {
      if(var8 == 0) {
         var8 = var3;
      }

      if(var9) {
         int var10 = var6.anInt996 * 1946169797;
         int var11 = var10 * var3;
         int var12 = var10 * var8;
         byte[] var13 = new byte[var11 * var4];

         for(int var14 = 0; var14 < var4; ++var14) {
            int var15 = var14 * var11;
            int var16 = (var4 - var14 - 1) * var12 + var7;

            for(int var17 = 0; var17 < var11; ++var17) {
               var13[var15++] = var5[var16++];
            }
         }

         var5 = var13;
      }

      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glPixelStorei(3317, 1);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, var8);
      }

      OpenGL.glTexSubImage2Dub(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, Class545_Sub1.method14567(var6), 5121, var5, var7);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, 0);
      }

      OpenGL.glPixelStorei(3317, 4);
   }

   Interface8 method15462(int var1) {
      return new Class156(this, var1);
   }

   void method15463(boolean var1, boolean var2) {
      if(this.anInt1702 == 3553) {
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glTexParameteri(this.anInt1702, 10242, var1?10497:'\u812f');
         OpenGL.glTexParameteri(this.anInt1702, 10243, var2?10497:'\u812f');
      }

   }

   Class147_Sub4(Class545_Sub1 var1, int var2, Class98 var3, Class91 var4, int var5, int var6, boolean var7, float[] var8, Class98 var9) {
      super(var1, var2, var3, var4, var5 * var6, var7);
      this.anInt9953 = var5;
      this.anInt9954 = var6;
      this.aClass545_Sub1_1704.method14725(this);
      if(var7 && this.anInt1702 != '\u84f5') {
         method2704(var2, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), var5, var6, var9, var8);
         this.method2697(true);
      } else {
         OpenGL.glTexImage2Df(this.anInt1702, 0, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), this.anInt9953, this.anInt9954, 0, Class545_Sub1.method14567(var9), 5126, var8, 0);
         this.method2697(false);
      }

      this.method2694(true);
   }

   void method15464(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7, boolean var8) {
      if(var7 == 0) {
         var7 = var3;
      }

      if(var8) {
         int[] var9 = new int[var3 * var4];

         for(int var10 = 0; var10 < var4; ++var10) {
            int var11 = var10 * var3;
            int var12 = (var4 - var10 - 1) * var7 + var6;

            for(int var13 = 0; var13 < var3; ++var13) {
               var9[var11++] = var5[var12++];
            }
         }

         var5 = var9;
      }

      this.aClass545_Sub1_1704.method14725(this);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, var7);
      }

      OpenGL.glTexSubImage2Di(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, '\u80e1', this.aClass545_Sub1_1704.anInt9283, var5, var6);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, 0);
      }

   }

   Class147_Sub4(Class545_Sub1 var1, int var2, Class98 var3, Class91 var4, int var5, int var6, boolean var7, byte[] var8, Class98 var9, boolean var10) {
      super(var1, var2, var3, var4, var5 * var6, var7);
      this.anInt9953 = var5;
      this.anInt9954 = var6;
      if(var10) {
         byte[] var11 = new byte[var8.length];

         for(int var12 = 0; var12 < var6; ++var12) {
            int var13 = var12 * var5;
            int var14 = (var6 - var12 - 1) * var5;

            for(int var15 = 0; var15 < var5; ++var15) {
               var11[var13++] = var8[var14++];
            }
         }

         var8 = var11;
      }

      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glPixelStorei(3317, 1);
      if(var7 && this.anInt1702 != '\u84f5') {
         method2703(var2, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), var5, var6, var9, var8);
         this.method2697(true);
      } else {
         OpenGL.glTexImage2Dub(this.anInt1702, 0, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), this.anInt9953, this.anInt9954, 0, Class545_Sub1.method14567(var9), 5121, var8, 0);
         this.method2697(false);
      }

      OpenGL.glPixelStorei(3317, 4);
      this.method2694(true);
   }

   Interface8 method15465(int var1) {
      return new Class156(this, var1);
   }

   Interface7 method15466(int var1) {
      return new Class156(this, var1);
   }

   void method15467(int var1, int var2, int var3, int var4, byte[] var5, Class98 var6, int var7, int var8, boolean var9) {
      if(var8 == 0) {
         var8 = var3;
      }

      if(var9) {
         int var10 = var6.anInt996 * 1946169797;
         int var11 = var10 * var3;
         int var12 = var10 * var8;
         byte[] var13 = new byte[var11 * var4];

         for(int var14 = 0; var14 < var4; ++var14) {
            int var15 = var14 * var11;
            int var16 = (var4 - var14 - 1) * var12 + var7;

            for(int var17 = 0; var17 < var11; ++var17) {
               var13[var15++] = var5[var16++];
            }
         }

         var5 = var13;
      }

      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glPixelStorei(3317, 1);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, var8);
      }

      OpenGL.glTexSubImage2Dub(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, Class545_Sub1.method14567(var6), 5121, var5, var7);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, 0);
      }

      OpenGL.glPixelStorei(3317, 4);
   }

   void method15468(int var1, int var2, int var3, int var4, byte[] var5, Class98 var6, int var7, int var8, boolean var9) {
      if(var8 == 0) {
         var8 = var3;
      }

      if(var9) {
         int var10 = var6.anInt996 * 1946169797;
         int var11 = var10 * var3;
         int var12 = var10 * var8;
         byte[] var13 = new byte[var11 * var4];

         for(int var14 = 0; var14 < var4; ++var14) {
            int var15 = var14 * var11;
            int var16 = (var4 - var14 - 1) * var12 + var7;

            for(int var17 = 0; var17 < var11; ++var17) {
               var13[var15++] = var5[var16++];
            }
         }

         var5 = var13;
      }

      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glPixelStorei(3317, 1);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, var8);
      }

      OpenGL.glTexSubImage2Dub(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, Class545_Sub1.method14567(var6), 5121, var5, var7);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, 0);
      }

      OpenGL.glPixelStorei(3317, 4);
   }

   void method15469(int var1, int var2, int var3, int var4, byte[] var5, Class98 var6, int var7, int var8, boolean var9) {
      if(var8 == 0) {
         var8 = var3;
      }

      if(var9) {
         int var10 = var6.anInt996 * 1946169797;
         int var11 = var10 * var3;
         int var12 = var10 * var8;
         byte[] var13 = new byte[var11 * var4];

         for(int var14 = 0; var14 < var4; ++var14) {
            int var15 = var14 * var11;
            int var16 = (var4 - var14 - 1) * var12 + var7;

            for(int var17 = 0; var17 < var11; ++var17) {
               var13[var15++] = var5[var16++];
            }
         }

         var5 = var13;
      }

      this.aClass545_Sub1_1704.method14725(this);
      OpenGL.glPixelStorei(3317, 1);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, var8);
      }

      OpenGL.glTexSubImage2Dub(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, Class545_Sub1.method14567(var6), 5121, var5, var7);
      if(var8 != var3) {
         OpenGL.glPixelStorei(3314, 0);
      }

      OpenGL.glPixelStorei(3317, 4);
   }

   void method15470(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7, boolean var8) {
      if(var7 == 0) {
         var7 = var3;
      }

      if(var8) {
         int[] var9 = new int[var3 * var4];

         for(int var10 = 0; var10 < var4; ++var10) {
            int var11 = var10 * var3;
            int var12 = (var4 - var10 - 1) * var7 + var6;

            for(int var13 = 0; var13 < var3; ++var13) {
               var9[var11++] = var5[var12++];
            }
         }

         var5 = var9;
      }

      this.aClass545_Sub1_1704.method14725(this);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, var7);
      }

      OpenGL.glTexSubImage2Di(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, '\u80e1', this.aClass545_Sub1_1704.anInt9283, var5, var6);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, 0);
      }

   }

   Interface7 method15471(int var1) {
      return new Class156(this, var1);
   }

   void method15472(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   void method15473(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   void method15474(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   void method15475(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   void method15476(int var1, int var2, int var3, int var4, int var5, int var6) {
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var6 + var4);
         this.aClass545_Sub1_1704.method14725(this);
         OpenGL.glCopyTexSubImage2D(this.anInt1702, 0, var1, this.anInt9954 - (var2 + var4), var5, var8, var3, var4);
         OpenGL.glFlush();
      }

   }

   Class147_Sub4(Class545_Sub1 var1, int var2, int var3, int var4, int var5, int var6) {
      super(var1, var2, Class98.aClass98_994, Class91.aClass91_897, var5 * var6, false);
      this.anInt9953 = var5;
      this.anInt9954 = var6;
      this.aClass545_Sub1_1704.method14725(this);
      Class151 var7 = this.aClass545_Sub1_1704.method11482((byte)14);
      if(var7 != null) {
         int var8 = var7.method2742() - (var4 + var6);
         int var9 = Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703);
         OpenGL.glCopyTexImage2D(this.anInt1702, 0, var9, var3, var8, var5, var6, 0);
      }

      this.method2694(true);
   }

   void method15477(int var1, int var2, int var3, int var4, int[] var5, int var6, int var7, boolean var8) {
      if(var7 == 0) {
         var7 = var3;
      }

      if(var8) {
         int[] var9 = new int[var3 * var4];

         for(int var10 = 0; var10 < var4; ++var10) {
            int var11 = var10 * var3;
            int var12 = (var4 - var10 - 1) * var7 + var6;

            for(int var13 = 0; var13 < var3; ++var13) {
               var9[var11++] = var5[var12++];
            }
         }

         var5 = var9;
      }

      this.aClass545_Sub1_1704.method14725(this);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, var7);
      }

      OpenGL.glTexSubImage2Di(this.anInt1702, 0, var1, this.anInt9954 - var2 - var4, var3, var4, '\u80e1', this.aClass545_Sub1_1704.anInt9283, var5, var6);
      if(var3 != var7) {
         OpenGL.glPixelStorei(3314, 0);
      }

   }

   Interface7 method15478(int var1) {
      return new Class156(this, var1);
   }

   Class147_Sub4(Class545_Sub1 var1, int var2, int var3, int var4, boolean var5, int[] var6, int var7, int var8, boolean var9) {
      super(var1, var2, Class98.aClass98_992, Class91.aClass91_897, var3 * var4, var5);
      this.anInt9953 = var3;
      this.anInt9954 = var4;
      if(var9) {
         int[] var10 = new int[var6.length];

         for(int var11 = 0; var11 < var4; ++var11) {
            int var12 = var11 * var3;
            int var13 = (var4 - var11 - 1) * var3;

            for(int var14 = 0; var14 < var3; ++var14) {
               var10[var12++] = var6[var13++];
            }
         }

         var6 = var10;
      }

      this.aClass545_Sub1_1704.method14725(this);
      if(this.anInt1702 != '\u84f5' && var5 && var7 == 0 && var8 == 0) {
         method2723(this.anInt1702, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), this.anInt9953, this.anInt9954, '\u80e1', this.aClass545_Sub1_1704.anInt9283, var6);
         this.method2697(true);
      } else {
         OpenGL.glPixelStorei(3314, var7);
         OpenGL.glTexImage2Di(this.anInt1702, 0, Class545_Sub1.method14609(this.aClass98_1707, this.aClass91_1703), this.anInt9953, this.anInt9954, 0, '\u80e1', this.aClass545_Sub1_1704.anInt9283, var6, var8 * 4);
         OpenGL.glPixelStorei(3314, 0);
         this.method2697(false);
      }

      this.method2694(true);
   }
}
