private static void method494(char ac[][], Stream stream) {
    for (int j = 0; j < ac.length; j++) {
      char ac1[] = new char[stream.readUnsignedByte()];
      for (int k = 0; k < ac1.length; k++) ac1[k] = (char) stream.readUnsignedByte();

      ac[j] = ac1;
    }
  }
  public TextDrawingArea(boolean flag, String s, StreamLoader streamLoader) {
    try {
      int length = (s.equals("hit_full") || s.equals("critical_full")) ? 58 : 256;
      aByteArrayArray1491 = new byte[length][];
      anIntArray1492 = new int[length];
      anIntArray1493 = new int[length];
      anIntArray1494 = new int[length];
      anIntArray1495 = new int[length];
      anIntArray1496 = new int[length];
      aRandom1498 = new Random();
      aBoolean1499 = false;
      Stream stream = new Stream(streamLoader.getDataForName(s + ".dat"));
      Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));
      stream_1.currentOffset = stream.readUnsignedWord() + 4;
      int k = stream_1.readUnsignedByte();
      if (k > 0) stream_1.currentOffset += 3 * (k - 1);
      for (int l = 0; l < length; l++) {
        anIntArray1494[l] = stream_1.readUnsignedByte();
        anIntArray1495[l] = stream_1.readUnsignedByte();
        int i1 = anIntArray1492[l] = stream_1.readUnsignedWord();
        int j1 = anIntArray1493[l] = stream_1.readUnsignedWord();
        int k1 = stream_1.readUnsignedByte();
        int l1 = i1 * j1;
        aByteArrayArray1491[l] = new byte[l1];
        if (k1 == 0) {
          for (int i2 = 0; i2 < l1; i2++) aByteArrayArray1491[l][i2] = stream.readSignedByte();

        } else if (k1 == 1) {
          for (int j2 = 0; j2 < i1; j2++) {
            for (int l2 = 0; l2 < j1; l2++)
              aByteArrayArray1491[l][j2 + l2 * i1] = stream.readSignedByte();
          }
        }
        if (j1 > anInt1497 && l < 128) anInt1497 = j1;
        anIntArray1494[l] = 1;
        anIntArray1496[l] = i1 + 2;
        int k2 = 0;
        for (int i3 = j1 / 7; i3 < j1; i3++) k2 += aByteArrayArray1491[l][i3 * i1];
        if (k2 <= j1 / 7) {
          anIntArray1496[l]--;
          anIntArray1494[l] = 0;
        }
        k2 = 0;
        for (int j3 = j1 / 7; j3 < j1; j3++) k2 += aByteArrayArray1491[l][(i1 - 1) + j3 * i1];
        if (k2 <= j1 / 7) anIntArray1496[l]--;
      }
      if (flag) {
        anIntArray1496[32] = anIntArray1496[73];
      } else {
        anIntArray1496[32] = anIntArray1496[105];
      }
    } catch (Exception _ex) {
    }
  }
  private static void readTldList(Stream stream) {
    int i = stream.readDWord();
    aCharArrayArray624 = new char[i][];
    anIntArray625 = new int[i];
    for (int j = 0; j < i; j++) {
      anIntArray625[j] = stream.readUnsignedByte();
      char ac[] = new char[stream.readUnsignedByte()];
      for (int k = 0; k < ac.length; k++) ac[k] = (char) stream.readUnsignedByte();

      aCharArrayArray624[j] = ac;
    }
  }
  private static void method493(Stream stream, char ac[][], byte abyte0[][][]) {
    for (int j = 0; j < ac.length; j++) {
      char ac1[] = new char[stream.readUnsignedByte()];
      for (int k = 0; k < ac1.length; k++) ac1[k] = (char) stream.readUnsignedByte();

      ac[j] = ac1;
      byte abyte1[][] = new byte[stream.readUnsignedByte()][2];
      for (int l = 0; l < abyte1.length; l++) {
        abyte1[l][0] = (byte) stream.readUnsignedByte();
        abyte1[l][1] = (byte) stream.readUnsignedByte();
      }

      if (abyte1.length > 0) abyte0[j] = abyte1;
    }
  }
Beispiel #5
0
 public final void method190(
     int i, Class11 aclass11[], int j, WorldController worldController, byte abyte0[]) {
   label0:
   {
     Stream stream = new Stream(abyte0);
     int l = -1;
     do {
       int i1 = stream.method422();
       if (i1 == 0) break label0;
       l += i1;
       int j1 = 0;
       do {
         int k1 = stream.method422();
         if (k1 == 0) break;
         j1 += k1 - 1;
         int l1 = j1 & 0x3f;
         int i2 = j1 >> 6 & 0x3f;
         int j2 = j1 >> 12;
         int k2 = stream.readUnsignedByte();
         int l2 = k2 >> 2;
         int i3 = k2 & 3;
         int j3 = i2 + i;
         int k3 = l1 + j;
         if (j3 > 0 && k3 > 0 && j3 < 103 && k3 < 103) {
           int l3 = j2;
           if ((aByteArrayArrayArray149[1][j3][k3] & 2) == 2) l3--;
           Class11 class11 = null;
           if (l3 >= 0) class11 = aclass11[l3];
           method175(k3, worldController, class11, l2, j2, j3, l, i3);
         }
       } while (true);
     } while (true);
   }
 }
Beispiel #6
0
 public static Class131_Sub2 method1917(int arg0, Stream arg1) {
   try {
     anInt4670++;
     arg1.readUnsignedByte(-36);
     int i = arg1.readUnsignedByte(-49);
     Class131_Sub2 class131_sub2 = Class131_Sub9.method1687((byte) 123, i);
     class131_sub2.anInt4090 = arg1.readUnsignedByte(arg0 + 85);
     int i_0_ = arg1.readUnsignedByte(106);
     for (int i_1_ = 0; (i_0_ ^ 0xffffffff) < (i_1_ ^ 0xffffffff); i_1_++) {
       int i_2_ = arg1.readUnsignedByte(arg0 + 82);
       class131_sub2.method1455(i_2_, (byte) -49, arg1);
     }
     class131_sub2.method1471(arg0 ^ arg0);
     return class131_sub2;
   } catch (RuntimeException runtimeexception) {
     throw Class131_Sub2_Sub6.method1495(
         runtimeexception, ("w.Q(" + arg0 + ',' + (arg1 != null ? "{...}" : "null") + ')'));
   }
 }
Beispiel #7
0
 private void method181(int i, int j, Stream stream, int k, int l, int i1, int k1) {
   if (k >= 0 && k < 104 && i >= 0 && i < 104) {
     aByteArrayArrayArray149[l][k][i] = 0;
     do {
       int l1 = stream.readUnsignedByte();
       if (l1 == 0)
         if (l == 0) {
           anIntArrayArrayArray129[0][k][i] = -method172(0xe3b7b + k + k1, 0x87cce + i + j) * 8;
           return;
         } else {
           anIntArrayArrayArray129[l][k][i] = anIntArrayArrayArray129[l - 1][k][i] - 240;
           return;
         }
       if (l1 == 1) {
         int j2 = stream.readUnsignedByte();
         if (j2 == 1) j2 = 0;
         if (l == 0) {
           anIntArrayArrayArray129[0][k][i] = -j2 * 8;
           return;
         } else {
           anIntArrayArrayArray129[l][k][i] = anIntArrayArrayArray129[l - 1][k][i] - j2 * 8;
           return;
         }
       }
       if (l1 <= 49) {
         aByteArrayArrayArray130[l][k][i] = stream.readSignedByte();
         aByteArrayArrayArray136[l][k][i] = (byte) ((l1 - 2) / 4);
         aByteArrayArrayArray148[l][k][i] = (byte) ((l1 - 2) + i1 & 3);
       } else if (l1 <= 81) aByteArrayArrayArray149[l][k][i] = (byte) (l1 - 49);
       else aByteArrayArrayArray142[l][k][i] = (byte) (l1 - 81);
     } while (true);
   }
   do {
     int i2 = stream.readUnsignedByte();
     if (i2 == 0) break;
     if (i2 == 1) {
       stream.readUnsignedByte();
       return;
     }
     if (i2 <= 49) stream.readUnsignedByte();
   } while (true);
 }
Beispiel #8
0
 public static Class13_Sub1 method1598(int i, Stream class68_sub14) {
   if (i != -20084) aRSString_2317 = null;
   anInt2301++;
   return new Class13_Sub1(
       class68_sub14.method957(i + -2405),
       class68_sub14.method957(i + -2405),
       class68_sub14.method957(-22489),
       class68_sub14.method957(-22489),
       class68_sub14.method921((byte) -58),
       class68_sub14.method921((byte) -124),
       class68_sub14.readUnsignedByte(-6677));
 }
Beispiel #9
0
  public Sprite(StreamLoader streamLoader, String s, int i) {
    Stream stream = new Stream(streamLoader.getDataForName(s + ".dat"));
    Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));
    stream_1.currentOffset = stream.readUnsignedWord();
    anInt1444 = stream_1.readUnsignedWord();
    anInt1445 = stream_1.readUnsignedWord();
    int j = stream_1.readUnsignedByte();
    int ai[] = new int[j];
    for (int k = 0; k < j - 1; k++) {
      ai[k + 1] = stream_1.read3Bytes();
      if (ai[k + 1] == 0) ai[k + 1] = 1;
    }

    for (int l = 0; l < i; l++) {
      stream_1.currentOffset += 2;
      stream.currentOffset += stream_1.readUnsignedWord() * stream_1.readUnsignedWord();
      stream_1.currentOffset++;
    }

    anInt1442 = stream_1.readUnsignedByte();
    anInt1443 = stream_1.readUnsignedByte();
    myWidth = stream_1.readUnsignedWord();
    myHeight = stream_1.readUnsignedWord();
    int i1 = stream_1.readUnsignedByte();
    int j1 = myWidth * myHeight;
    myPixels = new int[j1];
    if (i1 == 0) {
      for (int k1 = 0; k1 < j1; k1++) myPixels[k1] = ai[stream.readUnsignedByte()];
      setTransparency(255, 0, 255);
      return;
    }
    if (i1 == 1) {
      for (int l1 = 0; l1 < myWidth; l1++) {
        for (int i2 = 0; i2 < myHeight; i2++)
          myPixels[l1 + i2 * myWidth] = ai[stream.readUnsignedByte()];
      }
    }
    setTransparency(255, 0, 255);
  }
Beispiel #10
0
 public static boolean method189(
     int i, byte[] is, int i_250_) // xxx bad method, decompiled with JODE
     {
   boolean bool = true;
   Stream stream = new Stream(is);
   int i_252_ = -1;
   for (; ; ) {
     int i_253_ = stream.method422();
     if (i_253_ == 0) break;
     i_252_ += i_253_;
     int i_254_ = 0;
     boolean bool_255_ = false;
     for (; ; ) {
       if (bool_255_) {
         int i_256_ = stream.method422();
         if (i_256_ == 0) break;
         stream.readUnsignedByte();
       } else {
         int i_257_ = stream.method422();
         if (i_257_ == 0) break;
         i_254_ += i_257_ - 1;
         int i_258_ = i_254_ & 0x3f;
         int i_259_ = i_254_ >> 6 & 0x3f;
         int i_260_ = stream.readUnsignedByte() >> 2;
         int i_261_ = i_259_ + i;
         int i_262_ = i_258_ + i_250_;
         if (i_261_ > 0 && i_262_ > 0 && i_261_ < 103 && i_262_ < 103) {
           ObjectDef class46 = ObjectDef.forID(i_252_);
           if (i_260_ != 22 || !lowMem || class46.hasActions || class46.aBoolean736) {
             bool &= class46.method579();
             bool_255_ = true;
           }
         }
       }
     }
   }
   return bool;
 }
 public void method2039(Stream arg0, byte arg1) {
   try {
     for (; ; ) {
       int i = arg0.readUnsignedByte(-72);
       if (i == 0) break;
       method2038(i, arg0, false);
     }
     if (arg1 < 109) method2042(-87, -2, -108);
     anInt6376++;
   } catch (RuntimeException runtimeexception) {
     throw Class131_Sub2_Sub6.method1495(
         runtimeexception, ("pd.C(" + (arg0 != null ? "{...}" : "null") + ',' + arg1 + ')'));
   }
 }
Beispiel #12
0
  private void readValues(Stream stream) {
    int i;
    while ((i = stream.readUnsignedByte()) != 0) {
      if (i == 1) {
        anInt352 = stream.readUnsignedWord();
        anIntArray353 = new int[anInt352];
        anIntArray354 = new int[anInt352];
        anIntArray355 = new int[anInt352];
        for (int j = 0; j < anInt352; j++) {
          anIntArray353[j] = stream.readDWord();
          anIntArray354[j] = -1;
        }

        for (int j = 0; j < anInt352; j++) anIntArray355[j] = stream.readUnsignedByte();

      } else if (i == 2) anInt356 = stream.readUnsignedWord();
      else if (i == 3) {
        int k = stream.readUnsignedByte();
        anIntArray357 = new int[k + 1];
        for (int l = 0; l < k; l++) anIntArray357[l] = stream.readUnsignedByte();
        anIntArray357[k] = 9999999;
      } else if (i == 4) aBoolean358 = true;
      else if (i == 5) anInt359 = stream.readUnsignedByte();
      else if (i == 6) anInt360 = stream.readUnsignedWord();
      else if (i == 7) anInt361 = stream.readUnsignedWord();
      else if (i == 8) anInt362 = stream.readUnsignedByte();
      else if (i == 9) anInt363 = stream.readUnsignedByte();
      else if (i == 10) anInt364 = stream.readUnsignedByte();
      else if (i == 11) anInt365 = stream.readUnsignedByte();
      else if (i == 12) stream.readDWord();
      else System.out.println("Error unrecognised seq config code: " + i);
    }
    if (anInt352 == 0) {
      anInt352 = 1;
      anIntArray353 = new int[1];
      anIntArray353[0] = -1;
      anIntArray354 = new int[1];
      anIntArray354[0] = -1;
      anIntArray355 = new int[1];
      anIntArray355[0] = -1;
    }
    if (anInt363 == -1)
      if (anIntArray357 != null) anInt363 = 2;
      else anInt363 = 0;
    if (anInt364 == -1) {
      if (anIntArray357 != null) {
        anInt364 = 2;
        return;
      }
      anInt364 = 0;
    }
  }
 public void method700(Stream class68_sub14, int i, int i_0_) {
   anInt4059++;
   int i_1_ = i;
   while_173_:
   do {
     while_172_:
     do {
       while_171_:
       do {
         while_170_:
         do {
           while_169_:
           do {
             do {
               if ((i_1_ ^ 0xffffffff) != -1) {
                 if ((i_1_ ^ 0xffffffff) != -2) {
                   if (i_1_ != 2) {
                     if (i_1_ != 3) {
                       if ((i_1_ ^ 0xffffffff) != -5) {
                         if (i_1_ != 5) {
                           if ((i_1_ ^ 0xffffffff) == -7) break while_172_;
                           break while_173_;
                         }
                       } else break while_170_;
                       break while_171_;
                     }
                   } else break;
                   break while_169_;
                 }
               } else {
                 aBoolean4052 = (class68_sub14.readUnsignedByte(-6677) ^ 0xffffffff) == -2;
                 break while_173_;
               }
               anInt4057 = class68_sub14.readUnsignedByte(i_0_ ^ 0x1a14);
               break while_173_;
             } while (false);
             anInt4058 = class68_sub14.method957(i_0_ ^ 0x57d8);
             if ((anInt4058 ^ 0xffffffff) > -1) {
               aShortArray4051 = new short[anInt4057];
               for (i_1_ = 0; i_1_ < anInt4057; i_1_++)
                 aShortArray4051[i_1_] = (short) (class68_sub14.method957(i_0_ + -22488));
             }
             break while_173_;
           } while (false);
           anInt4071 = anInt4070 = class68_sub14.readUnsignedByte(-6677);
           break while_173_;
         } while (false);
         anInt4076 = class68_sub14.readUnsignedByte(-6677);
         break while_173_;
       } while (false);
       anInt4071 = class68_sub14.readUnsignedByte(i_0_ ^ 0x1a14);
       break while_173_;
     } while (false);
     anInt4070 = class68_sub14.readUnsignedByte(-6677);
   } while (false);
   if (i_0_ != -1) method889(-85, -47);
 }
  public Background(StreamLoader streamLoader, String s, int i) {
    Stream stream =
        new Stream(
            streamLoader.getDataForName((new StringBuilder()).append(s).append(".dat").toString()));
    Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat"));
    stream_1.currentOffset = stream.readUnsignedWord();
    anInt1456 = stream_1.readUnsignedWord();
    anInt1457 = stream_1.readUnsignedWord();
    int j = stream_1.readUnsignedByte();
    anIntArray1451 = new int[j];
    for (int k = 0; k < j - 1; k++) anIntArray1451[k + 1] = stream_1.read3Bytes();

    for (int l = 0; l < i; l++) {
      stream_1.currentOffset += 2;
      stream.currentOffset += stream_1.readUnsignedWord() * stream_1.readUnsignedWord();
      stream_1.currentOffset++;
    }

    anInt1454 = stream_1.readUnsignedByte();
    anInt1455 = stream_1.readUnsignedByte();
    anInt1452 = stream_1.readUnsignedWord();
    anInt1453 = stream_1.readUnsignedWord();
    int i1 = stream_1.readUnsignedByte();
    int j1 = anInt1452 * anInt1453;
    aByteArray1450 = new byte[j1];
    if (i1 == 0) {
      for (int k1 = 0; k1 < j1; k1++) aByteArray1450[k1] = stream.readSignedByte();

      return;
    }
    if (i1 == 1) {
      for (int l1 = 0; l1 < anInt1452; l1++) {
        for (int i2 = 0; i2 < anInt1453; i2++)
          aByteArray1450[l1 + i2 * anInt1452] = stream.readSignedByte();
      }
    }
  }
Beispiel #15
0
 public void method634(byte arg0, Stream arg1) {
   try {
     if (arg0 > 120) {
       anInt756++;
       for (; ; ) {
         int i = arg1.readUnsignedByte(-109);
         if ((i ^ 0xffffffff) == -1) break;
         method631(arg1, i, false);
       }
     }
   } catch (RuntimeException runtimeexception) {
     throw Class131_Sub2_Sub6.method1495(
         runtimeexception, ("fp.F(" + arg0 + ',' + (arg1 != null ? "{...}" : "null") + ')'));
   }
 }
Beispiel #16
0
 public final void method183(
     Class11 aclass11[],
     WorldController worldController,
     int i,
     int j,
     int k,
     int l,
     byte abyte0[],
     int i1,
     int j1,
     int k1) {
   label0:
   {
     Stream stream = new Stream(abyte0);
     int l1 = -1;
     do {
       int i2 = stream.method422();
       if (i2 == 0) break label0;
       l1 += i2;
       int j2 = 0;
       do {
         int k2 = stream.method422();
         if (k2 == 0) break;
         j2 += k2 - 1;
         int l2 = j2 & 0x3f;
         int i3 = j2 >> 6 & 0x3f;
         int j3 = j2 >> 12;
         int k3 = stream.readUnsignedByte();
         int l3 = k3 >> 2;
         int i4 = k3 & 3;
         if (j3 == i && i3 >= i1 && i3 < i1 + 8 && l2 >= k && l2 < k + 8) {
           ObjectDef class46 = ObjectDef.forID(l1);
           int j4 = j + Class4.method157(j1, class46.anInt761, i3 & 7, l2 & 7, class46.anInt744);
           int k4 = k1 + Class4.method158(l2 & 7, class46.anInt761, j1, class46.anInt744, i3 & 7);
           if (j4 > 0 && k4 > 0 && j4 < 103 && k4 < 103) {
             int l4 = j3;
             if ((aByteArrayArrayArray149[1][j4][k4] & 2) == 2) l4--;
             Class11 class11 = null;
             if (l4 >= 0) class11 = aclass11[l4];
             method175(k4, worldController, class11, l3, l, j4, l1, i4 + j1 & 3);
           }
         }
       } while (true);
     } while (true);
   }
 }
Beispiel #17
0
 public static Class110_Sub1 method128(int arg0, Stream arg1) {
   try {
     if (arg0 < 36) return null;
     anInt3584++;
     return new Class110_Sub1(
         arg1.readSignedShort(1625554944),
         arg1.readSignedShort(1625554944),
         arg1.readSignedShort(1625554944),
         arg1.readSignedShort(1625554944),
         arg1.read3Bytes(false),
         arg1.read3Bytes(false),
         arg1.readUnsignedByte(-115));
   } catch (RuntimeException runtimeexception) {
     throw Class131_Sub2_Sub6.method1495(
         runtimeexception, ("uc.L(" + arg0 + ',' + (arg1 != null ? "{...}" : "null") + ')'));
   }
 }
Beispiel #18
0
 public static void method173(Stream stream, OnDemandFetcher class42_sub1) {
   label0:
   {
     int i = -1;
     do {
       int j = stream.method422();
       if (j == 0) break label0;
       i += j;
       ObjectDef class46 = ObjectDef.forID(i);
       class46.method574(class42_sub1);
       do {
         int k = stream.method422();
         if (k == 0) break;
         stream.readUnsignedByte();
       } while (true);
     } while (true);
   }
 }
Beispiel #19
0
 public static byte[] method1612(byte[] is, boolean bool) {
   anInt2284++;
   if (bool != true) return null;
   Stream class68_sub14 = new Stream(is);
   int i = class68_sub14.readUnsignedByte(-6677);
   int i_101_ = class68_sub14.readDWord();
   if (i_101_ < 0
       || ((Class68_Sub13_Sub11.anInt3621 ^ 0xffffffff) != -1
           && i_101_ > Class68_Sub13_Sub11.anInt3621)) throw new RuntimeException();
   if ((i ^ 0xffffffff) != -1) {
     int i_102_ = class68_sub14.readDWord();
     if (i_102_ < 0
         || ((Class68_Sub13_Sub11.anInt3621 ^ 0xffffffff) != -1
             && Class68_Sub13_Sub11.anInt3621 < i_102_)) throw new RuntimeException();
     byte[] is_103_ = new byte[i_102_];
     if (i == 1) Class73.method1376(is_103_, i_102_, is, i_101_, 9);
     else Class68_Sub13_Sub33.aClass114_3999.method1688(class68_sub14, 115, is_103_);
     return is_103_;
   }
   byte[] is_104_ = new byte[i_101_];
   class68_sub14.method938(0, 0, i_101_, is_104_);
   return is_104_;
 }
Beispiel #20
0
  public static void method529(byte abyte0[]) {
    Stream stream = new Stream(abyte0);
    stream.currentOffset = abyte0.length - 8;
    int i = stream.readUnsignedWord();
    int j = stream.readUnsignedWord();
    int k = stream.readUnsignedWord();
    int l = stream.readUnsignedWord();
    int i1 = 0;
    Stream stream_1 = new Stream(abyte0);
    stream_1.currentOffset = i1;
    i1 += i + 2;
    Stream stream_2 = new Stream(abyte0);
    stream_2.currentOffset = i1;
    i1 += j;
    Stream stream_3 = new Stream(abyte0);
    stream_3.currentOffset = i1;
    i1 += k;
    Stream stream_4 = new Stream(abyte0);
    stream_4.currentOffset = i1;
    i1 += l;
    Stream stream_5 = new Stream(abyte0);
    stream_5.currentOffset = i1;
    Class18 class18 = new Class18(stream_5);
    int k1 = stream_1.readUnsignedWord();
    int ai[] = new int[500];
    int ai1[] = new int[500];
    int ai2[] = new int[500];
    int ai3[] = new int[500];
    for (int l1 = 0; l1 < k1; l1++) {
      int i2 = stream_1.readUnsignedWord();
      Class36 class36 = aClass36Array635[i2] = new Class36();
      class36.anInt636 = stream_4.readUnsignedByte();
      class36.aClass18_637 = class18;
      int j2 = stream_1.readUnsignedByte();
      int k2 = -1;
      int l2 = 0;
      for (int i3 = 0; i3 < j2; i3++) {
        int j3 = stream_2.readUnsignedByte();
        if (j3 > 0) {
          if (class18.anIntArray342[i3] != 0) {
            for (int l3 = i3 - 1; l3 > k2; l3--) {
              if (class18.anIntArray342[l3] != 0) continue;
              ai[l2] = l3;
              ai1[l2] = 0;
              ai2[l2] = 0;
              ai3[l2] = 0;
              l2++;
              break;
            }
          }
          ai[l2] = i3;
          char c = '\0';
          if (class18.anIntArray342[i3] == 3) c = '\200';
          if ((j3 & 1) != 0) ai1[l2] = stream_3.method421();
          else ai1[l2] = c;
          if ((j3 & 2) != 0) ai2[l2] = stream_3.method421();
          else ai2[l2] = c;
          if ((j3 & 4) != 0) ai3[l2] = stream_3.method421();
          else ai3[l2] = c;
          k2 = i3;
          l2++;
          if (class18.anIntArray342[i3] == 5) aBooleanArray643[i2] = false;
        }
      }

      class36.anInt638 = l2;
      class36.anIntArray639 = new int[l2];
      class36.anIntArray640 = new int[l2];
      class36.anIntArray641 = new int[l2];
      class36.anIntArray642 = new int[l2];
      for (int k3 = 0; k3 < l2; k3++) {
        class36.anIntArray639[k3] = ai[k3];
        class36.anIntArray640[k3] = ai1[k3];
        class36.anIntArray641[k3] = ai2[k3];
        class36.anIntArray642[k3] = ai3[k3];
      }
    }
  }
  public RSFont(boolean TypeFont, String s, StreamLoader archive) {
    fontPixels = new byte[256][];
    characterWidths = new int[256];
    characterHeights = new int[256];
    characterDrawXOffsets = new int[256];
    characterDrawYOffsets = new int[256];
    characterScreenWidths = new int[256];
    Stream stream = new Stream(archive.getDataForName(s + ".dat"));
    Stream stream_1 = new Stream(archive.getDataForName("index.dat"));
    stream_1.currentOffset = stream.readUnsignedWord() + 4;
    int k = stream_1.readUnsignedByte();
    if (k > 0) {
      stream_1.currentOffset += 3 * (k - 1);
    }
    for (int l = 0; l < 256; l++) {
      characterDrawXOffsets[l] = stream_1.readUnsignedByte();
      characterDrawYOffsets[l] = stream_1.readUnsignedByte();
      int i1 = characterWidths[l] = stream_1.readUnsignedWord();
      int j1 = characterHeights[l] = stream_1.readUnsignedWord();
      int k1 = stream_1.readUnsignedByte();
      int l1 = i1 * j1;
      fontPixels[l] = new byte[l1];
      if (k1 == 0) {
        for (int i2 = 0; i2 < l1; i2++) {
          fontPixels[l][i2] = stream.readSignedByte();
        }

      } else if (k1 == 1) {
        for (int j2 = 0; j2 < i1; j2++) {
          for (int l2 = 0; l2 < j1; l2++) {
            fontPixels[l][j2 + l2 * i1] = stream.readSignedByte();
          }
        }
      }
      if (j1 > baseCharacterHeight && l < 128) {
        baseCharacterHeight = j1;
      }
      characterDrawXOffsets[l] = 1;
      characterScreenWidths[l] = i1 + 2;
      int k2 = 0;
      for (int i3 = j1 / 7; i3 < j1; i3++) {
        k2 += fontPixels[l][i3 * i1];
      }

      if (k2 <= j1 / 7) {
        characterScreenWidths[l]--;
        characterDrawXOffsets[l] = 0;
      }
      k2 = 0;
      for (int j3 = j1 / 7; j3 < j1; j3++) {
        k2 += fontPixels[l][(i1 - 1) + j3 * i1];
      }

      if (k2 <= j1 / 7) {
        characterScreenWidths[l]--;
      }
    }

    if (TypeFont) {
      characterScreenWidths[32] = characterScreenWidths[73];
    } else {
      characterScreenWidths[32] = characterScreenWidths[105];
    }
  }