Example #1
0
 public static void load(Archive archive) {
   Buffer stream = new Buffer(archive.decompressFile("varp.dat"));
   anInt702 = 0;
   int cacheSize = stream.getUnsignedLEShort();
   if (cache == null) cache = new Varp[cacheSize];
   if (anIntArray703 == null) anIntArray703 = new int[cacheSize];
   for (int j = 0; j < cacheSize; j++) {
     if (cache[j] == null) cache[j] = new Varp();
     cache[j].readValues(stream, j);
   }
   if (stream.position != stream.buffer.length) System.out.println("varptype load mismatch");
 }
Example #2
0
  public void start(Archive streamLoader, Client client1) {
    String as[] = {"model_version", "anim_version", "midi_version", "map_version"};
    for (int i = 0; i < 4; i++) {
      byte abyte0[] = streamLoader.decompressFile(as[i]);
      int j = abyte0.length / 2;
      Buffer stream = new Buffer(abyte0);
      versions[i] = new int[j];
      filePriorities[i] = new byte[j];
      for (int l = 0; l < j; l++) versions[i][l] = stream.getUnsignedLEShort();
    }

    String as1[] = {"model_crc", "anim_crc", "midi_crc", "map_crc"};
    for (int k = 0; k < 4; k++) {
      byte abyte1[] = streamLoader.decompressFile(as1[k]);
      int i1 = abyte1.length / 4;
      Buffer stream_1 = new Buffer(abyte1);
      crcs[k] = new int[i1];
      for (int l1 = 0; l1 < i1; l1++) crcs[k][l1] = stream_1.getInt();
    }

    byte abyte2[] = streamLoader.decompressFile("model_index");
    int j1 = versions[0].length;
    modelIndices = new byte[j1];
    for (int k1 = 0; k1 < j1; k1++)
      if (k1 < abyte2.length) modelIndices[k1] = abyte2[k1];
      else modelIndices[k1] = 0;

    abyte2 = streamLoader.decompressFile("map_index");
    Buffer stream2 = new Buffer(abyte2);
    j1 = abyte2.length / 7;
    mapIndices1 = new int[j1];
    mapIndices2 = new int[j1];
    mapIndices3 = new int[j1];
    mapIndices4 = new int[j1];
    for (int i2 = 0; i2 < j1; i2++) {
      mapIndices1[i2] = stream2.getUnsignedLEShort();
      mapIndices2[i2] = stream2.getUnsignedLEShort();
      mapIndices3[i2] = stream2.getUnsignedLEShort();
      mapIndices4[i2] = stream2.getUnsignedByte();
    }

    abyte2 = streamLoader.decompressFile("anim_index");
    stream2 = new Buffer(abyte2);
    j1 = abyte2.length / 2;
    anIntArray1360 = new int[j1];
    for (int j2 = 0; j2 < j1; j2++) anIntArray1360[j2] = stream2.getUnsignedLEShort();

    abyte2 = streamLoader.decompressFile("midi_index");
    stream2 = new Buffer(abyte2);
    j1 = abyte2.length;
    anIntArray1348 = new int[j1];
    for (int k2 = 0; k2 < j1; k2++) anIntArray1348[k2] = stream2.getUnsignedByte();

    clientInstance = client1;
    running = true;
    clientInstance.startRunnable(this, 2);
  }