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) {
    }
  }
 public void method2038(int arg0, Stream arg1, boolean arg2) {
   anInt6372++;
   if (arg0 != 1) {
     if (arg0 == 2) anInt6374 = arg1.readUnsignedInt(-2);
     else if ((arg0 ^ 0xffffffff) == -6) aString6377 = arg1.readString(false);
   } else aChar6378 = Class214.method2782(60, arg1.readSignedByte((byte) 127));
   if (arg2 != false) aString6377 = null;
 }
  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 #4
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);
 }
  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];
    }
  }