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);
  }
Beispiel #2
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");
 }
Beispiel #3
0
 private void readValues(Buffer stream, int i) {
   do {
     int opcode = stream.getUnsignedByte();
     if (opcode == 0) return;
     if (opcode == 1) stream.getUnsignedByte();
     else if (opcode == 2) stream.getUnsignedByte();
     else if (opcode == 3) anIntArray703[anInt702++] = i;
     else if (opcode == 4) {
     } // dummy
     else if (opcode == 5) type = stream.getUnsignedLEShort();
     else if (opcode == 6) {
     } // dummy
     else if (opcode == 7) stream.getInt();
     else if (opcode == 8) aBoolean713 = true;
     else if (opcode == 10) stream.getString();
     else if (opcode == 11) aBoolean713 = true;
     else if (opcode == 12) stream.getInt();
     else if (opcode == 13) {
     } // dummy
     else System.out.println("Error unrecognised config code: " + opcode);
   } while (true);
 }