Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.19 KB | None | 0 0
  1.     public final void method22() {
  2.         try {
  3.             anInt985 = -1;
  4.             aClass19_1056.removeAll();
  5.             aClass19_1013.removeAll();
  6.             Texture.method366();
  7.             unlinkMRUNodes();
  8.             worldController.initToNull();
  9.             System.gc();
  10.             for (int i = 0; i < 4; i++)
  11.                 collision_maps[i].method210();
  12.             for (int l = 0; l < 4; l++) {
  13.                 for (int k1 = 0; k1 < 104; k1++) {
  14.                     for (int j2 = 0; j2 < 104; j2++)
  15.                         byteGroundArray[l][k1][j2] = 0;
  16.                 }
  17.             }
  18.             ObjectManager objectManager = new ObjectManager(byteGroundArray, intGroundArray);
  19.             int k2 = aByteArrayArray1183.length;
  20.             int k18 = 62;
  21.             for (int A = 0; A < k2; A++) {
  22.                 for (int B = 0; B < 2000; B++) {
  23.                     if (mapLocation[A] == positions[B]) {
  24.                         floorMap[A] = landScapes[B];
  25.                         objectMap[A] = objects[B];
  26.                     }
  27.                 }
  28.             }
  29.             stream.createFrame(0);
  30.             if (!aBoolean1159) {
  31.                 for (int i3 = 0; i3 < k2; i3++) {
  32.                     int i4 = (mapLocation[i3] >> 8) * 64 - baseX;
  33.                     int k5 = (mapLocation[i3] & 0xff) * 64 - baseY;
  34.                     byte abyte0[] = aByteArrayArray1183[i3];
  35.                     if (FileOperations.FileExists(signlink.findcachedir()
  36.                             + "rsmap/" + floorMap[i3] + ".dat")) {
  37.                         abyte0 = FileOperations.ReadFile(signlink
  38.                                 .findcachedir()
  39.                                 + "rsmap/"
  40.                                 + floorMap[i3]
  41.                                 + ".dat");
  42.                         System.out.println("Read floor data: " + floorMap[i3]);
  43.                     }
  44.                     if (abyte0 != null) {
  45.                         objectManager.method180(abyte0, k5, i4,
  46.                                 (anInt1069 - 6) * 8, (anInt1070 - 6) * 8,
  47.                                 collision_maps);
  48.                         // pushMessage("floorMap: " + floorMap[i3], 0, "");
  49.                         // DataUtils.writeFile(new File(signlink.findcachedir()
  50.                         // + floorMap[i3] + ".dat"), abyte0);
  51.                     }
  52.  
  53.                 }
  54.                 for (int j4 = 0; j4 < k2; j4++) {
  55.                     int l5 = (mapLocation[j4] >> 8) * k18 - baseX;
  56.                     int k7 = (mapLocation[j4] & 0xff) * k18 - baseY;
  57.                     byte abyte2[] = aByteArrayArray1183[j4];
  58.                     if (abyte2 == null && anInt1070 < 800)
  59.                         objectManager.method174(k7, 64, 64, l5);
  60.                 }
  61.                 anInt1097++;
  62.                 if (anInt1097 > 160) {
  63.                     anInt1097 = 0;
  64.                     stream.createFrame(238);
  65.                     stream.writeByte(96);
  66.                 }
  67.                 stream.createFrame(0);
  68.                 for (int i6 = 0; i6 < k2; i6++) {
  69.                     try {
  70.                         byte abyte1[] = aByteArrayArray1247[i6];
  71.                         if (FileOperations.FileExists(signlink.findcachedir()
  72.                                 + "rsmap/" + objectMap[i6] + ".dat")) {
  73.                             abyte1 = FileOperations.ReadFile(signlink
  74.                                     .findcachedir()
  75.                                     + "rsmap/"
  76.                                     + objectMap[i6]
  77.                                     + ".dat");
  78.                             System.out.println("Read object data: "
  79.                                     + objectMap[i6]);
  80.                         }
  81.                         if (abyte1 != null) {
  82.                             int l8 = (mapLocation[i6] >> 8) * 64 - baseX;
  83.                             int k9 = (mapLocation[i6] & 0xff) * 64 - baseY;
  84.                             objectManager.method190(l8, collision_maps, k9,
  85.                                     worldController, abyte1);
  86.                             // pushMessage("objectMap: " + objectMap[i6], 0,
  87.                             // "");
  88.                             // DataUtils.writeFile(new
  89.                             // File(signlink.findcachedir() + objectMap[i6] +
  90.                             // ".dat"), abyte1);
  91.                         }
  92.                     } catch (Exception e) {
  93.                         e.printStackTrace();
  94.                     }
  95.                 }
  96.             }
  97.             if (aBoolean1159) {
  98.                 for (int j3 = 0; j3 < 4; j3++) {
  99.                     for (int k4 = 0; k4 < 13; k4++) {
  100.                         for (int j6 = 0; j6 < 13; j6++) {
  101.                             int l7 = anIntArrayArrayArray1129[j3][k4][j6];
  102.                             if (l7 != -1) {
  103.                                 int i9 = l7 >> 24 & 3;
  104.                                 int l9 = l7 >> 1 & 3;
  105.                                 int j10 = l7 >> 14 & 0x3ff;
  106.                                 int l10 = l7 >> 3 & 0x7ff;
  107.                                 int j11 = (j10 / 8 << 8) + l10 / 8;
  108.                                 for (int l11 = 0; l11 < mapLocation.length; l11++) {
  109.                                     if (mapLocation[l11] != j11
  110.                                             || aByteArrayArray1183[l11] == null)
  111.                                         continue;
  112.                                     objectManager.method179(i9, l9,
  113.                                             collision_maps, k4 * 8,
  114.                                             (j10 & 7) * 8,
  115.                                             aByteArrayArray1183[l11],
  116.                                             (l10 & 7) * 8, j3, j6 * 8);
  117.                                     break;
  118.                                 }
  119.  
  120.                             }
  121.                         }
  122.  
  123.                     }
  124.  
  125.                 }
  126.                 for (int l4 = 0; l4 < 13; l4++) {
  127.                     for (int k6 = 0; k6 < 13; k6++) {
  128.                         int i8 = anIntArrayArrayArray1129[0][l4][k6];
  129.                         if (i8 == -1)
  130.                             objectManager.method174(k6 * 8, 8, 8, l4 * 8);
  131.                     }
  132.                 }
  133.                 stream.createFrame(0);
  134.                 for (int l6 = 0; l6 < 4; l6++) {
  135.                     for (int j8 = 0; j8 < 13; j8++) {
  136.                         for (int j9 = 0; j9 < 13; j9++) {
  137.                             int i10 = anIntArrayArrayArray1129[l6][j8][j9];
  138.                             if (i10 != -1) {
  139.                                 int k10 = i10 >> 24 & 3;
  140.                                 int i11 = i10 >> 1 & 3;
  141.                                 int k11 = i10 >> 14 & 0x3ff;
  142.                                 int i12 = i10 >> 3 & 0x7ff;
  143.                                 int j12 = (k11 / 8 << 8) + i12 / 8;
  144.                                 for (int k12 = 0; k12 < mapLocation.length; k12++) {
  145.                                     if (mapLocation[k12] != j12
  146.                                             || aByteArrayArray1247[k12] == null)
  147.                                         continue;
  148.                                     byte abyte0[] = aByteArrayArray1247[k12];
  149.                                     objectManager.method183(collision_maps,
  150.                                             worldController, k10, j8 * 8,
  151.                                             (i12 & 7) * 8, l6,
  152.                                             aByteArrayArray1247[k12],
  153.                                             (k11 & 7) * 8, i11, j9 * 8);
  154.                                     break;
  155.                                 }
  156.                             }
  157.                         }
  158.                     }
  159.                 }
  160.             }
  161.             stream.createFrame(0);
  162.             objectManager.method171(collision_maps, worldController);
  163.             gameScreenIP.initDrawingArea();
  164.             stream.createFrame(0);
  165.             int k3 = ObjectManager.anInt145;
  166.             if (k3 > floor_level)
  167.                 k3 = floor_level;
  168.             if (k3 < floor_level - 1)
  169.                 k3 = floor_level - 1;
  170.             if (lowMem)
  171.                 worldController.method275(ObjectManager.anInt145);
  172.             else
  173.                 worldController.method275(0);
  174.             for (int i5 = 0; i5 < 104; i5++) {
  175.                 for (int i7 = 0; i7 < 104; i7++)
  176.                     spawnGroundItem(i5, i7);
  177.             }
  178.             anInt1051++;
  179.             if (anInt1051 > 98) {
  180.                 anInt1051 = 0;
  181.                 stream.createFrame(150);
  182.             }
  183.             method63();
  184.         } catch (Exception exception) {
  185.         }
  186.         ObjectDef.mruNodes1.unlinkAll();
  187.         if (super.gameFrame != null) {
  188.             stream.createFrame(210);
  189.             stream.writeDWord(0x3f008edd);
  190.         }
  191.         System.gc();
  192.         Texture.method367();
  193.         onDemandFetcher.method566();
  194.         int k = (anInt1069 - 6) / 8 - 1;
  195.         int j1 = (anInt1069 + 6) / 8 + 1;
  196.         int i2 = (anInt1070 - 6) / 8 - 1;
  197.         int l2 = (anInt1070 + 6) / 8 + 1;
  198.         if (aBoolean1141) {
  199.             k = 49;
  200.             j1 = 50;
  201.             i2 = 49;
  202.             l2 = 50;
  203.         }
  204.         for (int l3 = k; l3 <= j1; l3++) {
  205.             for (int j5 = i2; j5 <= l2; j5++)
  206.                 if (l3 == k || l3 == j1 || j5 == i2 || j5 == l2) {
  207.                     int j7 = onDemandFetcher.method562(0, j5, l3);
  208.                     if (j7 != -1)
  209.                         onDemandFetcher.method560(j7, 3);
  210.                     int k8 = onDemandFetcher.method562(1, j5, l3);
  211.                     if (k8 != -1)
  212.                         onDemandFetcher.method560(k8, 3);
  213.                 }
  214.         }
  215.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement