@Before public void setUp() throws Exception { rubentxuMock = new HeroManagerMock(); platformMock = new PlatformManagerMock(); worldController = new WorldController(game, new World()); worldController.setRubenManager(rubentxuMock); worldController.setPlatformManager(platformMock); }
private void renderGuiGameOverMessage(SpriteBatch batch) { float x = cameraGUI.viewportWidth / 2; float y = cameraGUI.viewportHeight / 2; if (worldController.isGameOver()) { BitmapFont fontGameOver = Assets.instance.fonts.defaultBig; fontGameOver.setColor(1, 0.75f, 0.25f, 1); fontGameOver.draw(batch, "GAME OVER", x, y, 0, 5, true); fontGameOver.setColor(1, 1, 1, 1); } }
private void method175( int i, WorldController worldController, Class11 class11, int j, int k, int l, int i1, int j1) { /*int mX = clientInstance.MapX - 6; int mY = clientInstance.MapY - 6; int actualX = mX * 8 + l; int actualY = mY * 8 + i; int actualH = k; if(!(actualX >= 2630 && actualX <= 2639 && actualY >= 4680 && actualY <= 4690)//castle at starting point && !(actualX >= 2640 && actualX <= 2643 && actualY >= 4680 && actualY <= 4689)//castle at starting point && !(actualX >= 2630 && actualX <= 2636 && actualY >= 4676 && actualY <= 4689)//castle at starting point && !(actualX >= 2629 && actualX <= 2637 && actualY >= 4679 && actualY <= 4685)//castle at starting point && !(actualX >= 2637 && actualX <= 2638 && actualY >= 4691 && actualY <= 4692)//castle at starting point && !(actualX == 2635 && actualY == 4693) && !(actualX == 2634 && actualY == 4693) ) {*/ if (lowMem && (aByteArrayArrayArray149[0][l][i] & 2) == 0) { if ((aByteArrayArrayArray149[k][l][i] & 0x10) != 0) return; if (method182(i, k, l) != anInt131) return; } if (k < anInt145) anInt145 = k; int k1 = anIntArrayArrayArray129[k][l][i]; int l1 = anIntArrayArrayArray129[k][l + 1][i]; int i2 = anIntArrayArrayArray129[k][l + 1][i + 1]; int j2 = anIntArrayArrayArray129[k][l][i + 1]; int k2 = k1 + l1 + i2 + j2 >> 2; ObjectDef class46 = ObjectDef.forID(i1); int l2 = l + (i << 7) + (i1 << 14) + 0x40000000; if (!class46.hasActions) l2 += 0x80000000; byte byte0 = (byte) ((j1 << 6) + j); if (j == 22) { if (lowMem && !class46.hasActions && !class46.aBoolean736) return; Object obj; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj = class46.method578(22, j1, k1, l1, i2, j2, -1); else obj = new Animable_Sub5(i1, j1, 22, l1, i2, k1, j2, class46.anInt781, true); worldController.method280(k, k2, i, ((Animable) (obj)), byte0, l2, l); if (class46.aBoolean767 && class46.hasActions && class11 != null) class11.method213(i, l); return; } if (j == 10 || j == 11) { Object obj1; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj1 = class46.method578(10, j1, k1, l1, i2, j2, -1); else obj1 = new Animable_Sub5(i1, j1, 10, l1, i2, k1, j2, class46.anInt781, true); if (obj1 != null) { int i5 = 0; if (j == 11) i5 += 256; int j4; int l4; if (j1 == 1 || j1 == 3) { j4 = class46.anInt761; l4 = class46.anInt744; } else { j4 = class46.anInt744; l4 = class46.anInt761; } if (worldController.method284(l2, byte0, k2, l4, ((Animable) (obj1)), j4, k, i5, i, l) && class46.aBoolean779) { Model model; if (obj1 instanceof Model) model = (Model) obj1; else model = class46.method578(10, j1, k1, l1, i2, j2, -1); if (model != null) { for (int j5 = 0; j5 <= j4; j5++) { for (int k5 = 0; k5 <= l4; k5++) { int l5 = model.anInt1650 / 4; if (l5 > 30) l5 = 30; if (l5 > aByteArrayArrayArray134[k][l + j5][i + k5]) aByteArrayArrayArray134[k][l + j5][i + k5] = (byte) l5; } } } } } if (class46.aBoolean767 && class11 != null) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, l, i, j1); return; } if (j >= 12) { Object obj2; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj2 = class46.method578(j, j1, k1, l1, i2, j2, -1); else obj2 = new Animable_Sub5(i1, j1, j, l1, i2, k1, j2, class46.anInt781, true); worldController.method284(l2, byte0, k2, 1, ((Animable) (obj2)), 1, k, 0, i, l); if (j >= 12 && j <= 17 && j != 13 && k > 0) anIntArrayArrayArray135[k][l][i] |= 0x924; if (class46.aBoolean767 && class11 != null) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, l, i, j1); return; } if (j == 0) { Object obj3; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj3 = class46.method578(0, j1, k1, l1, i2, j2, -1); else obj3 = new Animable_Sub5(i1, j1, 0, l1, i2, k1, j2, class46.anInt781, true); worldController.method282( anIntArray152[j1], ((Animable) (obj3)), l2, i, byte0, l, null, k2, 0, k); if (j1 == 0) { if (class46.aBoolean779) { aByteArrayArrayArray134[k][l][i] = 50; aByteArrayArrayArray134[k][l][i + 1] = 50; } if (class46.aBoolean764) anIntArrayArrayArray135[k][l][i] |= 0x249; } else if (j1 == 1) { if (class46.aBoolean779) { aByteArrayArrayArray134[k][l][i + 1] = 50; aByteArrayArrayArray134[k][l + 1][i + 1] = 50; } if (class46.aBoolean764) anIntArrayArrayArray135[k][l][i + 1] |= 0x492; } else if (j1 == 2) { if (class46.aBoolean779) { aByteArrayArrayArray134[k][l + 1][i] = 50; aByteArrayArrayArray134[k][l + 1][i + 1] = 50; } if (class46.aBoolean764) anIntArrayArrayArray135[k][l + 1][i] |= 0x249; } else if (j1 == 3) { if (class46.aBoolean779) { aByteArrayArrayArray134[k][l][i] = 50; aByteArrayArrayArray134[k][l + 1][i] = 50; } if (class46.aBoolean764) anIntArrayArrayArray135[k][l][i] |= 0x492; } if (class46.aBoolean767 && class11 != null) class11.method211(i, j1, l, j, class46.aBoolean757); if (class46.anInt775 != 16) worldController.method290(i, class46.anInt775, l, k); return; } if (j == 1) { Object obj4; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj4 = class46.method578(1, j1, k1, l1, i2, j2, -1); else obj4 = new Animable_Sub5(i1, j1, 1, l1, i2, k1, j2, class46.anInt781, true); worldController.method282( anIntArray140[j1], ((Animable) (obj4)), l2, i, byte0, l, null, k2, 0, k); if (class46.aBoolean779) if (j1 == 0) aByteArrayArrayArray134[k][l][i + 1] = 50; else if (j1 == 1) aByteArrayArrayArray134[k][l + 1][i + 1] = 50; else if (j1 == 2) aByteArrayArrayArray134[k][l + 1][i] = 50; else if (j1 == 3) aByteArrayArrayArray134[k][l][i] = 50; if (class46.aBoolean767 && class11 != null) class11.method211(i, j1, l, j, class46.aBoolean757); return; } if (j == 2) { int i3 = j1 + 1 & 3; Object obj11; Object obj12; if (class46.anInt781 == -1 && class46.childrenIDs == null) { obj11 = class46.method578(2, 4 + j1, k1, l1, i2, j2, -1); obj12 = class46.method578(2, i3, k1, l1, i2, j2, -1); } else { obj11 = new Animable_Sub5(i1, 4 + j1, 2, l1, i2, k1, j2, class46.anInt781, true); obj12 = new Animable_Sub5(i1, i3, 2, l1, i2, k1, j2, class46.anInt781, true); } worldController.method282( anIntArray152[j1], ((Animable) (obj11)), l2, i, byte0, l, ((Animable) (obj12)), k2, anIntArray152[i3], k); if (class46.aBoolean764) if (j1 == 0) { anIntArrayArrayArray135[k][l][i] |= 0x249; anIntArrayArrayArray135[k][l][i + 1] |= 0x492; } else if (j1 == 1) { anIntArrayArrayArray135[k][l][i + 1] |= 0x492; anIntArrayArrayArray135[k][l + 1][i] |= 0x249; } else if (j1 == 2) { anIntArrayArrayArray135[k][l + 1][i] |= 0x249; anIntArrayArrayArray135[k][l][i] |= 0x492; } else if (j1 == 3) { anIntArrayArrayArray135[k][l][i] |= 0x492; anIntArrayArrayArray135[k][l][i] |= 0x249; } if (class46.aBoolean767 && class11 != null) class11.method211(i, j1, l, j, class46.aBoolean757); if (class46.anInt775 != 16) worldController.method290(i, class46.anInt775, l, k); return; } if (j == 3) { Object obj5; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj5 = class46.method578(3, j1, k1, l1, i2, j2, -1); else obj5 = new Animable_Sub5(i1, j1, 3, l1, i2, k1, j2, class46.anInt781, true); worldController.method282( anIntArray140[j1], ((Animable) (obj5)), l2, i, byte0, l, null, k2, 0, k); if (class46.aBoolean779) if (j1 == 0) aByteArrayArrayArray134[k][l][i + 1] = 50; else if (j1 == 1) aByteArrayArrayArray134[k][l + 1][i + 1] = 50; else if (j1 == 2) aByteArrayArrayArray134[k][l + 1][i] = 50; else if (j1 == 3) aByteArrayArrayArray134[k][l][i] = 50; if (class46.aBoolean767 && class11 != null) class11.method211(i, j1, l, j, class46.aBoolean757); return; } if (j == 9) { Object obj6; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj6 = class46.method578(j, j1, k1, l1, i2, j2, -1); else obj6 = new Animable_Sub5(i1, j1, j, l1, i2, k1, j2, class46.anInt781, true); worldController.method284(l2, byte0, k2, 1, ((Animable) (obj6)), 1, k, 0, i, l); if (class46.aBoolean767 && class11 != null) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, l, i, j1); return; } if (class46.aBoolean762) if (j1 == 1) { int j3 = j2; j2 = i2; i2 = l1; l1 = k1; k1 = j3; } else if (j1 == 2) { int k3 = j2; j2 = l1; l1 = k3; k3 = i2; i2 = k1; k1 = k3; } else if (j1 == 3) { int l3 = j2; j2 = k1; k1 = l1; l1 = i2; i2 = l3; } if (j == 4) { Object obj7; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj7 = class46.method578(4, 0, k1, l1, i2, j2, -1); else obj7 = new Animable_Sub5(i1, 0, 4, l1, i2, k1, j2, class46.anInt781, true); worldController.method283( l2, i, j1 * 512, k, 0, k2, ((Animable) (obj7)), l, byte0, 0, anIntArray152[j1]); return; } if (j == 5) { int i4 = 16; int k4 = worldController.method300(k, l, i); if (k4 > 0) i4 = ObjectDef.forID(k4 >> 14 & 0x7fff).anInt775; Object obj13; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj13 = class46.method578(4, 0, k1, l1, i2, j2, -1); else obj13 = new Animable_Sub5(i1, 0, 4, l1, i2, k1, j2, class46.anInt781, true); worldController.method283( l2, i, j1 * 512, k, anIntArray137[j1] * i4, k2, ((Animable) (obj13)), l, byte0, anIntArray144[j1] * i4, anIntArray152[j1]); return; } if (j == 6) { Object obj8; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj8 = class46.method578(4, 0, k1, l1, i2, j2, -1); else obj8 = new Animable_Sub5(i1, 0, 4, l1, i2, k1, j2, class46.anInt781, true); worldController.method283(l2, i, j1, k, 0, k2, ((Animable) (obj8)), l, byte0, 0, 256); return; } if (j == 7) { Object obj9; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj9 = class46.method578(4, 0, k1, l1, i2, j2, -1); else obj9 = new Animable_Sub5(i1, 0, 4, l1, i2, k1, j2, class46.anInt781, true); worldController.method283(l2, i, j1, k, 0, k2, ((Animable) (obj9)), l, byte0, 0, 512); return; } if (j == 8) { Object obj10; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj10 = class46.method578(4, 0, k1, l1, i2, j2, -1); else obj10 = new Animable_Sub5(i1, 0, 4, l1, i2, k1, j2, class46.anInt781, true); worldController.method283(l2, i, j1, k, 0, k2, ((Animable) (obj10)), l, byte0, 0, 768); } // } }
public static void method188( WorldController worldController, int i, int j, int k, int l, Class11 class11, int ai[][][], int i1, int j1, int k1) { int l1 = ai[l][i1][j]; int i2 = ai[l][i1 + 1][j]; int j2 = ai[l][i1 + 1][j + 1]; int k2 = ai[l][i1][j + 1]; int l2 = l1 + i2 + j2 + k2 >> 2; ObjectDef class46 = ObjectDef.forID(j1); int i3 = i1 + (j << 7) + (j1 << 14) + 0x40000000; if (!class46.hasActions) i3 += 0x80000000; byte byte1 = (byte) ((i << 6) + k); if (k == 22) { Object obj; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj = class46.method578(22, i, l1, i2, j2, k2, -1); else obj = new Animable_Sub5(j1, i, 22, i2, j2, l1, k2, class46.anInt781, true); worldController.method280(k1, l2, j, ((Animable) (obj)), byte1, i3, i1); if (class46.aBoolean767 && class46.hasActions) class11.method213(j, i1); return; } if (k == 10 || k == 11) { Object obj1; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj1 = class46.method578(10, i, l1, i2, j2, k2, -1); else obj1 = new Animable_Sub5(j1, i, 10, i2, j2, l1, k2, class46.anInt781, true); if (obj1 != null) { int j5 = 0; if (k == 11) j5 += 256; int k4; int i5; if (i == 1 || i == 3) { k4 = class46.anInt761; i5 = class46.anInt744; } else { k4 = class46.anInt744; i5 = class46.anInt761; } worldController.method284(i3, byte1, l2, i5, ((Animable) (obj1)), k4, k1, j5, j, i1); } if (class46.aBoolean767) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, i1, j, i); return; } if (k >= 12) { Object obj2; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj2 = class46.method578(k, i, l1, i2, j2, k2, -1); else obj2 = new Animable_Sub5(j1, i, k, i2, j2, l1, k2, class46.anInt781, true); worldController.method284(i3, byte1, l2, 1, ((Animable) (obj2)), 1, k1, 0, j, i1); if (class46.aBoolean767) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, i1, j, i); return; } if (k == 0) { Object obj3; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj3 = class46.method578(0, i, l1, i2, j2, k2, -1); else obj3 = new Animable_Sub5(j1, i, 0, i2, j2, l1, k2, class46.anInt781, true); worldController.method282( anIntArray152[i], ((Animable) (obj3)), i3, j, byte1, i1, null, l2, 0, k1); if (class46.aBoolean767) class11.method211(j, i, i1, k, class46.aBoolean757); return; } if (k == 1) { Object obj4; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj4 = class46.method578(1, i, l1, i2, j2, k2, -1); else obj4 = new Animable_Sub5(j1, i, 1, i2, j2, l1, k2, class46.anInt781, true); worldController.method282( anIntArray140[i], ((Animable) (obj4)), i3, j, byte1, i1, null, l2, 0, k1); if (class46.aBoolean767) class11.method211(j, i, i1, k, class46.aBoolean757); return; } if (k == 2) { int j3 = i + 1 & 3; Object obj11; Object obj12; if (class46.anInt781 == -1 && class46.childrenIDs == null) { obj11 = class46.method578(2, 4 + i, l1, i2, j2, k2, -1); obj12 = class46.method578(2, j3, l1, i2, j2, k2, -1); } else { obj11 = new Animable_Sub5(j1, 4 + i, 2, i2, j2, l1, k2, class46.anInt781, true); obj12 = new Animable_Sub5(j1, j3, 2, i2, j2, l1, k2, class46.anInt781, true); } worldController.method282( anIntArray152[i], ((Animable) (obj11)), i3, j, byte1, i1, ((Animable) (obj12)), l2, anIntArray152[j3], k1); if (class46.aBoolean767) class11.method211(j, i, i1, k, class46.aBoolean757); return; } if (k == 3) { Object obj5; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj5 = class46.method578(3, i, l1, i2, j2, k2, -1); else obj5 = new Animable_Sub5(j1, i, 3, i2, j2, l1, k2, class46.anInt781, true); worldController.method282( anIntArray140[i], ((Animable) (obj5)), i3, j, byte1, i1, null, l2, 0, k1); if (class46.aBoolean767) class11.method211(j, i, i1, k, class46.aBoolean757); return; } if (k == 9) { Object obj6; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj6 = class46.method578(k, i, l1, i2, j2, k2, -1); else obj6 = new Animable_Sub5(j1, i, k, i2, j2, l1, k2, class46.anInt781, true); worldController.method284(i3, byte1, l2, 1, ((Animable) (obj6)), 1, k1, 0, j, i1); if (class46.aBoolean767) class11.method212(class46.aBoolean757, class46.anInt744, class46.anInt761, i1, j, i); return; } if (class46.aBoolean762) if (i == 1) { int k3 = k2; k2 = j2; j2 = i2; i2 = l1; l1 = k3; } else if (i == 2) { int l3 = k2; k2 = i2; i2 = l3; l3 = j2; j2 = l1; l1 = l3; } else if (i == 3) { int i4 = k2; k2 = l1; l1 = i2; i2 = j2; j2 = i4; } if (k == 4) { Object obj7; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj7 = class46.method578(4, 0, l1, i2, j2, k2, -1); else obj7 = new Animable_Sub5(j1, 0, 4, i2, j2, l1, k2, class46.anInt781, true); worldController.method283( i3, j, i * 512, k1, 0, l2, ((Animable) (obj7)), i1, byte1, 0, anIntArray152[i]); return; } if (k == 5) { int j4 = 16; int l4 = worldController.method300(k1, i1, j); if (l4 > 0) j4 = ObjectDef.forID(l4 >> 14 & 0x7fff).anInt775; Object obj13; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj13 = class46.method578(4, 0, l1, i2, j2, k2, -1); else obj13 = new Animable_Sub5(j1, 0, 4, i2, j2, l1, k2, class46.anInt781, true); worldController.method283( i3, j, i * 512, k1, anIntArray137[i] * j4, l2, ((Animable) (obj13)), i1, byte1, anIntArray144[i] * j4, anIntArray152[i]); return; } if (k == 6) { Object obj8; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj8 = class46.method578(4, 0, l1, i2, j2, k2, -1); else obj8 = new Animable_Sub5(j1, 0, 4, i2, j2, l1, k2, class46.anInt781, true); worldController.method283(i3, j, i, k1, 0, l2, ((Animable) (obj8)), i1, byte1, 0, 256); return; } if (k == 7) { Object obj9; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj9 = class46.method578(4, 0, l1, i2, j2, k2, -1); else obj9 = new Animable_Sub5(j1, 0, 4, i2, j2, l1, k2, class46.anInt781, true); worldController.method283(i3, j, i, k1, 0, l2, ((Animable) (obj9)), i1, byte1, 0, 512); return; } if (k == 8) { Object obj10; if (class46.anInt781 == -1 && class46.childrenIDs == null) obj10 = class46.method578(4, 0, l1, i2, j2, k2, -1); else obj10 = new Animable_Sub5(j1, 0, 4, i2, j2, l1, k2, class46.anInt781, true); worldController.method283(i3, j, i, k1, 0, l2, ((Animable) (obj10)), i1, byte1, 0, 768); } }
public final void method171(Class11 aclass11[], WorldController worldController) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 104; k++) { for (int i1 = 0; i1 < 104; i1++) if ((aByteArrayArrayArray149[j][k][i1] & 1) == 1) { int k1 = j; if ((aByteArrayArrayArray149[1][k][i1] & 2) == 2) k1--; if (k1 >= 0) aclass11[k1].method213(i1, k); } } } anInt123 += (int) (Math.random() * 5D) - 2; if (anInt123 < -8) anInt123 = -8; if (anInt123 > 8) anInt123 = 8; anInt133 += (int) (Math.random() * 5D) - 2; if (anInt133 < -16) anInt133 = -16; if (anInt133 > 16) anInt133 = 16; for (int l = 0; l < 4; l++) { byte abyte0[][] = aByteArrayArrayArray134[l]; byte byte0 = 96; char c = '\u0300'; byte byte1 = -50; byte byte2 = -10; byte byte3 = -50; int j3 = (int) Math.sqrt(byte1 * byte1 + byte2 * byte2 + byte3 * byte3); int l3 = c * j3 >> 8; for (int j4 = 1; j4 < anInt147 - 1; j4++) { for (int j5 = 1; j5 < anInt146 - 1; j5++) { int k6 = anIntArrayArrayArray129[l][j5 + 1][j4] - anIntArrayArrayArray129[l][j5 - 1][j4]; int l7 = anIntArrayArrayArray129[l][j5][j4 + 1] - anIntArrayArrayArray129[l][j5][j4 - 1]; int j9 = (int) Math.sqrt(k6 * k6 + 0x10000 + l7 * l7); int k12 = (k6 << 8) / j9; int l13 = 0x10000 / j9; int j15 = (l7 << 8) / j9; int j16 = byte0 + (byte1 * k12 + byte2 * l13 + byte3 * j15) / l3; int j17 = (abyte0[j5 - 1][j4] >> 2) + (abyte0[j5 + 1][j4] >> 3) + (abyte0[j5][j4 - 1] >> 2) + (abyte0[j5][j4 + 1] >> 3) + (abyte0[j5][j4] >> 1); anIntArrayArray139[j5][j4] = j16 - j17; } } for (int k5 = 0; k5 < anInt147; k5++) { anIntArray124[k5] = 0; anIntArray125[k5] = 0; anIntArray126[k5] = 0; anIntArray127[k5] = 0; anIntArray128[k5] = 0; } for (int l6 = -5; l6 < anInt146 + 5; l6++) { for (int i8 = 0; i8 < anInt147; i8++) { int k9 = l6 + 5; if (k9 >= 0 && k9 < anInt146) { int l12 = aByteArrayArrayArray142[l][k9][i8] & 0xff; if (l12 > 0) { Flo flo = Flo.cache[l12 - 1]; anIntArray124[i8] += flo.anInt397; anIntArray125[i8] += flo.anInt395; anIntArray126[i8] += flo.anInt396; anIntArray127[i8] += flo.anInt398; anIntArray128[i8]++; } } int i13 = l6 - 5; if (i13 >= 0 && i13 < anInt146) { int i14 = aByteArrayArrayArray142[l][i13][i8] & 0xff; if (i14 > 0) { Flo flo_1 = Flo.cache[i14 - 1]; anIntArray124[i8] -= flo_1.anInt397; anIntArray125[i8] -= flo_1.anInt395; anIntArray126[i8] -= flo_1.anInt396; anIntArray127[i8] -= flo_1.anInt398; anIntArray128[i8]--; } } } if (l6 >= 1 && l6 < anInt146 - 1) { int l9 = 0; int j13 = 0; int j14 = 0; int k15 = 0; int k16 = 0; for (int k17 = -5; k17 < anInt147 + 5; k17++) { int j18 = k17 + 5; if (j18 >= 0 && j18 < anInt147) { l9 += anIntArray124[j18]; j13 += anIntArray125[j18]; j14 += anIntArray126[j18]; k15 += anIntArray127[j18]; k16 += anIntArray128[j18]; } int k18 = k17 - 5; if (k18 >= 0 && k18 < anInt147) { l9 -= anIntArray124[k18]; j13 -= anIntArray125[k18]; j14 -= anIntArray126[k18]; k15 -= anIntArray127[k18]; k16 -= anIntArray128[k18]; } if (k17 >= 1 && k17 < anInt147 - 1 && (!lowMem || (aByteArrayArrayArray149[0][l6][k17] & 2) != 0 || (aByteArrayArrayArray149[l][l6][k17] & 0x10) == 0 && method182(k17, l, l6) == anInt131)) { if (l < anInt145) anInt145 = l; int l18 = aByteArrayArrayArray142[l][l6][k17] & 0xff; int i19 = aByteArrayArrayArray130[l][l6][k17] & 0xff; if (l18 > 0 || i19 > 0) { int j19 = anIntArrayArrayArray129[l][l6][k17]; int k19 = anIntArrayArrayArray129[l][l6 + 1][k17]; int l19 = anIntArrayArrayArray129[l][l6 + 1][k17 + 1]; int i20 = anIntArrayArrayArray129[l][l6][k17 + 1]; int j20 = anIntArrayArray139[l6][k17]; int k20 = anIntArrayArray139[l6 + 1][k17]; int l20 = anIntArrayArray139[l6 + 1][k17 + 1]; int i21 = anIntArrayArray139[l6][k17 + 1]; int j21 = -1; int k21 = -1; if (l18 > 0) { int l21 = (l9 * 256) / k15; int j22 = j13 / k16; int l22 = j14 / k16; j21 = method177(l21, j22, l22); l21 = l21 + anInt123 & 0xff; l22 += anInt133; if (l22 < 0) l22 = 0; else if (l22 > 255) l22 = 255; k21 = method177(l21, j22, l22); } if (l > 0) { boolean flag = true; if (l18 == 0 && aByteArrayArrayArray136[l][l6][k17] != 0) flag = false; if (i19 > 0 && !Flo.cache[i19 - 1].aBoolean393) flag = false; if (flag && j19 == k19 && j19 == l19 && j19 == i20) anIntArrayArrayArray135[l][l6][k17] |= 0x924; } int i22 = 0; if (j21 != -1) i22 = Texture.anIntArray1482[method187(k21, 96)]; if (i19 == 0) { worldController.method279( l, l6, k17, 0, 0, -1, j19, k19, l19, i20, method187(j21, j20), method187(j21, k20), method187(j21, l20), method187(j21, i21), 0, 0, 0, 0, i22, 0); } else { int k22 = aByteArrayArrayArray136[l][l6][k17] + 1; byte byte4 = aByteArrayArrayArray148[l][l6][k17]; Flo flo_2 = Flo.cache[i19 - 1]; int i23 = flo_2.anInt391; int j23; int k23; if (i23 >= 0) { k23 = Texture.method369(i23); j23 = -1; } else if (flo_2.anInt390 == 0xff00ff) { k23 = 0; j23 = -2; i23 = -1; } else if (flo_2.anInt390 == 0x333333) { k23 = Texture.anIntArray1482[method185(flo_2.anInt399, 96)]; j23 = -2; i23 = -1; } else { j23 = method177(flo_2.anInt394, flo_2.anInt395, flo_2.anInt396); k23 = Texture.anIntArray1482[method185(flo_2.anInt399, 96)]; } worldController.method279( l, l6, k17, k22, byte4, i23, j19, k19, l19, i20, method187(j21, j20), method187(j21, k20), method187(j21, l20), method187(j21, i21), method185(j23, j20), method185(j23, k20), method185(j23, l20), method185(j23, i21), i22, k23); } } } } } } for (int j8 = 1; j8 < anInt147 - 1; j8++) { for (int i10 = 1; i10 < anInt146 - 1; i10++) worldController.method278(l, i10, j8, method182(j8, l, i10)); } } worldController.method305(-10, -50, -50); for (int j1 = 0; j1 < anInt146; j1++) { for (int l1 = 0; l1 < anInt147; l1++) if ((aByteArrayArrayArray149[1][j1][l1] & 2) == 2) worldController.method276(l1, j1); } int i2 = 1; int j2 = 2; int k2 = 4; for (int l2 = 0; l2 < 4; l2++) { if (l2 > 0) { i2 <<= 3; j2 <<= 3; k2 <<= 3; } for (int i3 = 0; i3 <= l2; i3++) { for (int k3 = 0; k3 <= anInt147; k3++) { for (int i4 = 0; i4 <= anInt146; i4++) { if ((anIntArrayArrayArray135[i3][i4][k3] & i2) != 0) { int k4 = k3; int l5 = k3; int i7 = i3; int k8 = i3; for (; k4 > 0 && (anIntArrayArrayArray135[i3][i4][k4 - 1] & i2) != 0; k4--) ; for (; l5 < anInt147 && (anIntArrayArrayArray135[i3][i4][l5 + 1] & i2) != 0; l5++) ; label0: for (; i7 > 0; i7--) { for (int j10 = k4; j10 <= l5; j10++) if ((anIntArrayArrayArray135[i7 - 1][i4][j10] & i2) == 0) break label0; } label1: for (; k8 < l2; k8++) { for (int k10 = k4; k10 <= l5; k10++) if ((anIntArrayArrayArray135[k8 + 1][i4][k10] & i2) == 0) break label1; } int l10 = ((k8 + 1) - i7) * ((l5 - k4) + 1); if (l10 >= 8) { char c1 = '\360'; int k14 = anIntArrayArrayArray129[k8][i4][k4] - c1; int l15 = anIntArrayArrayArray129[i7][i4][k4]; WorldController.method277( l2, i4 * 128, l15, i4 * 128, l5 * 128 + 128, k14, k4 * 128, 1); for (int l16 = i7; l16 <= k8; l16++) { for (int l17 = k4; l17 <= l5; l17++) anIntArrayArrayArray135[l16][i4][l17] &= ~i2; } } } if ((anIntArrayArrayArray135[i3][i4][k3] & j2) != 0) { int l4 = i4; int i6 = i4; int j7 = i3; int l8 = i3; for (; l4 > 0 && (anIntArrayArrayArray135[i3][l4 - 1][k3] & j2) != 0; l4--) ; for (; i6 < anInt146 && (anIntArrayArrayArray135[i3][i6 + 1][k3] & j2) != 0; i6++) ; label2: for (; j7 > 0; j7--) { for (int i11 = l4; i11 <= i6; i11++) if ((anIntArrayArrayArray135[j7 - 1][i11][k3] & j2) == 0) break label2; } label3: for (; l8 < l2; l8++) { for (int j11 = l4; j11 <= i6; j11++) if ((anIntArrayArrayArray135[l8 + 1][j11][k3] & j2) == 0) break label3; } int k11 = ((l8 + 1) - j7) * ((i6 - l4) + 1); if (k11 >= 8) { char c2 = '\360'; int l14 = anIntArrayArrayArray129[l8][l4][k3] - c2; int i16 = anIntArrayArrayArray129[j7][l4][k3]; WorldController.method277( l2, l4 * 128, i16, i6 * 128 + 128, k3 * 128, l14, k3 * 128, 2); for (int i17 = j7; i17 <= l8; i17++) { for (int i18 = l4; i18 <= i6; i18++) anIntArrayArrayArray135[i17][i18][k3] &= ~j2; } } } if ((anIntArrayArrayArray135[i3][i4][k3] & k2) != 0) { int i5 = i4; int j6 = i4; int k7 = k3; int i9 = k3; for (; k7 > 0 && (anIntArrayArrayArray135[i3][i4][k7 - 1] & k2) != 0; k7--) ; for (; i9 < anInt147 && (anIntArrayArrayArray135[i3][i4][i9 + 1] & k2) != 0; i9++) ; label4: for (; i5 > 0; i5--) { for (int l11 = k7; l11 <= i9; l11++) if ((anIntArrayArrayArray135[i3][i5 - 1][l11] & k2) == 0) break label4; } label5: for (; j6 < anInt146; j6++) { for (int i12 = k7; i12 <= i9; i12++) if ((anIntArrayArrayArray135[i3][j6 + 1][i12] & k2) == 0) break label5; } if (((j6 - i5) + 1) * ((i9 - k7) + 1) >= 4) { int j12 = anIntArrayArrayArray129[i3][i5][k7]; WorldController.method277( l2, i5 * 128, j12, j6 * 128 + 128, i9 * 128 + 128, j12, k7 * 128, 4); for (int k13 = i5; k13 <= j6; k13++) { for (int i15 = k7; i15 <= i9; i15++) anIntArrayArrayArray135[i3][k13][i15] &= ~k2; } } } } } } } }