A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
0

Configure Feed

Select the types of activity you want to include in your feed.

Game: Refactored Method method81 -> calculateFlamePositions

+38 -36
+38 -36
src/com/jagex/runescape/Game.java
··· 857 857 while (aBoolean1243) { 858 858 anInt1101++; 859 859 860 - method81((byte) 1); 861 - method81((byte) 1); 860 + calculateFlamePositions(); 861 + calculateFlamePositions(); 862 862 method98(47); 863 863 864 864 if (++cycle > 10) { ··· 6698 6698 return true; 6699 6699 } 6700 6700 6701 - public void method81(byte byte0) { 6702 - char c = '\u0100'; 6703 - for (int i = 10; i < 117; i++) { 6704 - int j = (int) (Math.random() * 100D); 6705 - if (j < 50) 6706 - anIntArray1084[i + (c - 2 << 7)] = 255; 6701 + private void calculateFlamePositions() { //TODO: Needs more refactoring 6702 + int c = 256; 6703 + 6704 + for (int x = 10; x < 117; x++) { 6705 + int rand = (int) (Math.random() * 100D); 6706 + 6707 + if (rand < 50) 6708 + anIntArray1084[x + (c - 2 << 7)] = 255; 6707 6709 } 6708 6710 6709 - for (int k = 0; k < 100; k++) { 6710 - int l = (int) (Math.random() * 124D) + 2; 6711 - int j1 = (int) (Math.random() * 128D) + 128; 6712 - int j2 = l + (j1 << 7); 6713 - anIntArray1084[j2] = 192; 6711 + for (int i = 0; i < 100; i++) { 6712 + int x = (int) (Math.random() * 124D) + 2; 6713 + int y = (int) (Math.random() * 128D) + 128; 6714 + int pixel = x + (y << 7); 6715 + anIntArray1084[pixel] = 192; 6714 6716 } 6715 6717 6716 - for (int i1 = 1; i1 < c - 1; i1++) { 6717 - for (int k1 = 1; k1 < 127; k1++) { 6718 - int k2 = k1 + (i1 << 7); 6719 - anIntArray1085[k2] = (anIntArray1084[k2 - 1] + anIntArray1084[k2 + 1] + anIntArray1084[k2 - 128] + anIntArray1084[k2 + 128]) / 4; 6718 + for (int y = 1; y < c - 1; y++) { 6719 + for (int x = 1; x < 127; x++) { 6720 + int pixel = x + (y << 7); 6721 + anIntArray1085[pixel] = (anIntArray1084[pixel - 1] + anIntArray1084[pixel + 1] + anIntArray1084[pixel - 128] + anIntArray1084[pixel + 128]) / 4; 6720 6722 } 6721 - 6722 6723 } 6723 6724 6724 6725 anInt1238 += 128; 6726 + 6725 6727 if (anInt1238 > anIntArray1176.length) { 6726 6728 anInt1238 -= anIntArray1176.length; 6727 - int l1 = (int) (Math.random() * 12D); 6728 - method83(titleFlameEmblem[l1], 0); 6729 + int rand = (int) (Math.random() * 12D); 6730 + 6731 + method83(titleFlameEmblem[rand], 0); 6729 6732 } 6730 - for (int i2 = 1; i2 < c - 1; i2++) { 6731 - for (int l2 = 1; l2 < 127; l2++) { 6732 - int k3 = l2 + (i2 << 7); 6733 - int i4 = anIntArray1085[k3 + 128] - anIntArray1176[k3 + anInt1238 & anIntArray1176.length - 1] / 5; 6733 + 6734 + for (int y = 1; y < c - 1; y++) { 6735 + for (int x = 1; x < 127; x++) { 6736 + int pixel = x + (y << 7); 6737 + int i4 = anIntArray1085[pixel + 128] - anIntArray1176[pixel + anInt1238 & anIntArray1176.length - 1] / 5; 6738 + 6734 6739 if (i4 < 0) 6735 6740 i4 = 0; 6736 - anIntArray1084[k3] = i4; 6737 - } 6738 6741 6742 + anIntArray1084[pixel] = i4; 6743 + } 6739 6744 } 6740 6745 6741 - if (byte0 == 1) { 6742 - byte0 = 0; 6743 - } else { 6744 - for (int i3 = 1; i3 > 0; i3++); 6745 - } 6746 - for (int j3 = 0; j3 < c - 1; j3++) 6747 - anIntArray1166[j3] = anIntArray1166[j3 + 1]; 6746 + for (int i = 0; i < c - 1; i++) 6747 + anIntArray1166[i] = anIntArray1166[i + 1]; 6748 6748 6749 6749 anIntArray1166[c - 1] = (int) (Math.sin((double) pulseCycle / 14D) * 16D + Math.sin((double) pulseCycle / 15D) 6750 6750 * 14D + Math.sin((double) pulseCycle / 16D) * 12D); 6751 + 6751 6752 if (anInt1047 > 0) 6752 6753 anInt1047 -= 4; 6753 6754 if (anInt1048 > 0) 6754 6755 anInt1048 -= 4; 6755 6756 if (anInt1047 == 0 && anInt1048 == 0) { 6756 - int l3 = (int) (Math.random() * 2000D); 6757 - if (l3 == 0) 6757 + int rand = (int) (Math.random() * 2000D); 6758 + 6759 + if (rand == 0) 6758 6760 anInt1047 = 1024; 6759 - if (l3 == 1) 6761 + if (rand == 1) 6760 6762 anInt1048 = 1024; 6761 6763 } 6762 6764 }