Skip to content

Commit c38dbe0

Browse files
committed
Merging in hallow's changes and resolving conflicts
2 parents 94e44f6 + 2e57f85 commit c38dbe0

File tree

85 files changed

+2251
-2142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2251
-2142
lines changed

src/main/java/com/jagex/runescape/Class17.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ public class Class17 {
2323
public static int anInt464 = 0;
2424
public static int[] anIntArray466 = new int[256];
2525

26-
public static void method273(GameSocket arg0, boolean arg2) {
27-
if(Class57.gameSocket != null) {
26+
public static void handleUpdateServerConnection(GameSocket updateServerSocket, boolean arg2) {
27+
if(Class57.updateServerSocket != null) {
2828
try {
29-
Class57.gameSocket.method1009();
29+
Class57.updateServerSocket.kill();
3030
} catch(Exception exception) {
3131
exception.printStackTrace();
3232
/* empty */
3333
}
34-
Class57.gameSocket = null;
34+
Class57.updateServerSocket = null;
3535
}
36-
Class57.gameSocket = arg0;
37-
GameShell.method19(arg2, 24041);
36+
Class57.updateServerSocket = updateServerSocket;
37+
GameShell.method19(arg2);
3838
LinkedList.aClass40_Sub1_1081.currentPosition = 0;
3939
Class40_Sub5_Sub13.aClass40_Sub1_2752 = null;
4040
Landscape.anInt1157 = 0;
@@ -53,7 +53,7 @@ public static void method273(GameSocket arg0, boolean arg2) {
5353
break;
5454
InteractiveObject.aNodeQueue_485.unshift(class40_sub5_sub13);
5555
GameObjectDefinition.aClass23_2545.put(class40_sub5_sub13.key, class40_sub5_sub13);
56-
Class42.anInt1006--;
56+
MovedStatics.anInt1006--;
5757
MovedStatics.anInt554++;
5858
}
5959
if(Class8.aByte302 != 0) {
@@ -62,16 +62,16 @@ public static void method273(GameSocket arg0, boolean arg2) {
6262
class40_sub1.putByte(4);
6363
class40_sub1.putByte(Class8.aByte302);
6464
class40_sub1.putShortBE(0);
65-
Class57.gameSocket.method1010(4, 0, class40_sub1.buffer);
65+
Class57.updateServerSocket.sendDataFromBuffer(4, 0, class40_sub1.buffer);
6666
} catch(java.io.IOException ioexception) {
6767
ioexception.printStackTrace();
6868
try {
69-
Class57.gameSocket.method1009();
69+
Class57.updateServerSocket.kill();
7070
} catch(Exception exception) {
7171
exception.printStackTrace();
7272
/* empty */
7373
}
74-
Class57.gameSocket = null;
74+
Class57.updateServerSocket = null;
7575
MovedStatics.anInt2278++;
7676
}
7777
}
@@ -87,11 +87,11 @@ public static int method274(boolean arg0) {
8787

8888
public static void method275(long arg1) {
8989
if(arg1 != 0L) {
90-
if(Class42.anInt1008 >= 100)
90+
if(MovedStatics.anInt1008 >= 100)
9191
ChatBox.addChatMessage("", English.yourIgnoreListIsFull.toString(), 0);
9292
else {
9393
String class1 = TextUtils.formatName(TextUtils.longToName(arg1));
94-
for(int i = 0; i < Class42.anInt1008; i++) {
94+
for(int i = 0; i < MovedStatics.anInt1008; i++) {
9595
if(arg1 == Player.ignores[i]) {
9696
ChatBox.addChatMessage("", class1 + English.suffixIsAlreadyOnYourIgnoreList, 0);
9797
return;
@@ -104,7 +104,7 @@ public static void method275(long arg1) {
104104
}
105105
}
106106
if(!class1.equals(Player.localPlayer.playerName)) {
107-
Player.ignores[Class42.anInt1008++] = arg1;
107+
Player.ignores[MovedStatics.anInt1008++] = arg1;
108108
GameInterface.redrawTabArea = true;
109109
SceneCluster.packetBuffer.putPacket(251);
110110
SceneCluster.packetBuffer.putLongBE(arg1);
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.jagex.runescape;
22

33
public class Class18 {
4-
public static void method278(byte[] arg0, int arg1, byte[] arg2, int arg3, int arg4) {
5-
if(arg0 == arg2) {
4+
public static void method278(byte[] arg0, int arg1, byte[] buffer, int arg3, int arg4) {
5+
if(arg0 == buffer) {
66
if(arg1 == arg3)
77
return;
88
if(arg3 > arg1 && arg3 < arg1 + arg4) {
@@ -12,35 +12,35 @@ public static void method278(byte[] arg0, int arg1, byte[] arg2, int arg3, int a
1212
arg4 = arg1 - arg4;
1313
arg4 += 7;
1414
while(arg1 >= arg4) {
15-
arg2[arg3--] = arg0[arg1--];
16-
arg2[arg3--] = arg0[arg1--];
17-
arg2[arg3--] = arg0[arg1--];
18-
arg2[arg3--] = arg0[arg1--];
19-
arg2[arg3--] = arg0[arg1--];
20-
arg2[arg3--] = arg0[arg1--];
21-
arg2[arg3--] = arg0[arg1--];
22-
arg2[arg3--] = arg0[arg1--];
15+
buffer[arg3--] = arg0[arg1--];
16+
buffer[arg3--] = arg0[arg1--];
17+
buffer[arg3--] = arg0[arg1--];
18+
buffer[arg3--] = arg0[arg1--];
19+
buffer[arg3--] = arg0[arg1--];
20+
buffer[arg3--] = arg0[arg1--];
21+
buffer[arg3--] = arg0[arg1--];
22+
buffer[arg3--] = arg0[arg1--];
2323
}
2424
arg4 -= 7;
2525
while(arg1 >= arg4)
26-
arg2[arg3--] = arg0[arg1--];
26+
buffer[arg3--] = arg0[arg1--];
2727
return;
2828
}
2929
}
3030
arg4 += arg1;
3131
arg4 -= 7;
3232
while(arg1 < arg4) {
33-
arg2[arg3++] = arg0[arg1++];
34-
arg2[arg3++] = arg0[arg1++];
35-
arg2[arg3++] = arg0[arg1++];
36-
arg2[arg3++] = arg0[arg1++];
37-
arg2[arg3++] = arg0[arg1++];
38-
arg2[arg3++] = arg0[arg1++];
39-
arg2[arg3++] = arg0[arg1++];
40-
arg2[arg3++] = arg0[arg1++];
33+
buffer[arg3++] = arg0[arg1++];
34+
buffer[arg3++] = arg0[arg1++];
35+
buffer[arg3++] = arg0[arg1++];
36+
buffer[arg3++] = arg0[arg1++];
37+
buffer[arg3++] = arg0[arg1++];
38+
buffer[arg3++] = arg0[arg1++];
39+
buffer[arg3++] = arg0[arg1++];
40+
buffer[arg3++] = arg0[arg1++];
4141
}
4242
arg4 += 7;
4343
while(arg1 < arg4)
44-
arg2[arg3++] = arg0[arg1++];
44+
buffer[arg3++] = arg0[arg1++];
4545
}
4646
}

src/main/java/com/jagex/runescape/Class22.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ public static void method309(int varPlayerIndex) {
157157
if(varPlayerValue == 4)
158158
i_22_ = 0;
159159
if(i_22_ != RSCanvas.musicVolume) {
160-
if(RSCanvas.musicVolume != 0 || MouseHandler.anInt1457 == -1) {
160+
if(RSCanvas.musicVolume != 0 || MouseHandler.currentSongId == -1) {
161161
if(i_22_ == 0) {
162162
Class33.method402(false);
163163
Class35.songTimeout = 0;
164164
} else
165165
MovedStatics.method456(i_22_);
166166
} else {
167-
Class33.method414(false, 0, MouseHandler.anInt1457, i_22_, 0, CacheArchive.musicCacheArchive);
167+
Class33.method414(false, 0, MouseHandler.currentSongId, i_22_, 0, CacheArchive.musicCacheArchive);
168168
Class35.songTimeout = 0;
169169
}
170170
RSCanvas.musicVolume = i_22_;

src/main/java/com/jagex/runescape/Class22_Sub1.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Class22_Sub1 extends Class22 {
1919
public static long aLong1841;
2020
public static int[] anIntArray1846 = new int[5];
2121
public static int[] anIntArray1847 = new int[2000];
22-
public static CacheArchive aCacheArchive_1855;
22+
public static CacheArchive musicCacheArchive;
2323
public static int anInt1856;
2424

2525
public boolean aBoolean1835;
@@ -117,8 +117,8 @@ public void method303(byte arg0) {
117117
}
118118

119119
public void method302(int arg0) {
120-
if(aSignlinkNode_1836 != null && aSignlinkNode_1836.anInt434 != 0) {
121-
if(aSignlinkNode_1836.anInt434 == 1) {
120+
if(aSignlinkNode_1836 != null && aSignlinkNode_1836.status != 0) {
121+
if(aSignlinkNode_1836.status == 1) {
122122
SizedAccessFile sizedAccessFile = (SizedAccessFile) aSignlinkNode_1836.value;
123123
try {
124124
sizedAccessFile.write(aByteArray1866, 0, aByteArray1866.length);
@@ -139,7 +139,7 @@ public void method302(int arg0) {
139139
}
140140
aSignlinkNode_1836 = null;
141141
if(arg0 != 0)
142-
aCacheArchive_1855 = null;
142+
musicCacheArchive = null;
143143
}
144144
}
145145

src/main/java/com/jagex/runescape/Class22_Sub2.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.jagex.runescape.cache.def.ActorDefinition;
44
import com.jagex.runescape.cache.def.ItemDefinition;
5-
import com.jagex.runescape.cache.def.UnderlayDefinition;
5+
import com.jagex.runescape.cache.def.SpotAnimDefinition;
66
import com.jagex.runescape.cache.media.ImageRGB;
77
import com.jagex.runescape.cache.media.IndexedImage;
88
import com.jagex.runescape.cache.media.gameInterface.GameInterface;
@@ -20,8 +20,8 @@ public abstract class Class22_Sub2 extends Class22 {
2020

2121

2222
public static IndexedImage[] method315() {
23-
IndexedImage[] class40_sub5_sub14_sub2s = new IndexedImage[UnderlayDefinition.anInt2581];
24-
for(int i = 0; UnderlayDefinition.anInt2581 > i; i++) {
23+
IndexedImage[] class40_sub5_sub14_sub2s = new IndexedImage[MovedStatics.anInt2581];
24+
for(int i = 0; MovedStatics.anInt2581 > i; i++) {
2525
IndexedImage class40_sub5_sub14_sub2 = class40_sub5_sub14_sub2s[i] = new IndexedImage();
2626
class40_sub5_sub14_sub2.maxWidth = ItemDefinition.anInt2846;
2727
class40_sub5_sub14_sub2.maxHeight = GameShell.anInt31;
@@ -36,16 +36,11 @@ public static IndexedImage[] method315() {
3636
return class40_sub5_sub14_sub2s;
3737
}
3838

39-
public static void method316() {
40-
Class43.aClass9_1014.clear();
41-
MovedStatics.aClass9_851.clear();
42-
}
43-
4439
public static ImageRGB[] method319(byte arg0) {
45-
ImageRGB[] class40_sub5_sub14_sub4s = new ImageRGB[UnderlayDefinition.anInt2581];
40+
ImageRGB[] class40_sub5_sub14_sub4s = new ImageRGB[MovedStatics.anInt2581];
4641
if(arg0 != -62)
4742
return null;
48-
for(int i = 0; i < UnderlayDefinition.anInt2581; i++) {
43+
for(int i = 0; i < MovedStatics.anInt2581; i++) {
4944
ImageRGB class40_sub5_sub14_sub4 = class40_sub5_sub14_sub4s[i] = new ImageRGB();
5045
class40_sub5_sub14_sub4.maxWidth = ItemDefinition.anInt2846;
5146
class40_sub5_sub14_sub4.maxHeight = GameShell.anInt31;

src/main/java/com/jagex/runescape/Class22_Sub2_Sub2.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Class22_Sub2_Sub2(Signlink arg0, Runnable_Impl1 arg1) {
2020
this.method321((byte) 109, (long) anInt2226);
2121
aRunnable_Impl1_2223.method2(anIntArray2227, anInt2229);
2222
anInt2229 = 0;
23-
arg0.createCanvasNode(10, this);
23+
arg0.createThreadNode(10, this);
2424
}
2525

2626
public static void method325() {
@@ -107,7 +107,7 @@ public void run() {
107107
}
108108
method302(0);
109109
}
110-
Class43.sleep(100L);
110+
Class43.threadSleep(100L);
111111
}
112112
} catch(Exception exception) {
113113
MovedStatics.printException(null, exception);
@@ -125,7 +125,7 @@ public void method306(byte arg0) {
125125
if(!aBoolean2224)
126126
break;
127127
}
128-
Class43.sleep(20L);
128+
Class43.threadSleep(20L);
129129
}
130130
if(arg0 >= 100)
131131
aRunnable_Impl1_2223.method4(26534);

src/main/java/com/jagex/runescape/Class29.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
import com.jagex.runescape.scene.util.CollisionMap;
55

66
public class Class29 {
7-
public static GameSocket gameSocket;
7+
public static GameSocket updateServerSocket;
88

9-
public static boolean isHovering(int areaId, int arg2) {
10-
if(areaId == 0 && ItemDefinition.anInt2850 == arg2)
9+
public static boolean isHovering(int areaId, int widgetChildId) {
10+
if(areaId == 0 && ItemDefinition.anInt2850 == widgetChildId)
1111
return true;
1212

13-
if(areaId == 1 && arg2 == CollisionMap.anInt163)
13+
if(areaId == 1 && widgetChildId == CollisionMap.currentHoveredWidgetChildId)
1414
return true;
1515

16-
if((areaId == 2 || areaId == 3) && Class55.anInt1296 == arg2)
16+
if((areaId == 2 || areaId == 3) && Class55.currentHoveredChatboxWidgetChildId == widgetChildId)
1717
return true;
1818

1919
return false;

src/main/java/com/jagex/runescape/Class33.java

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.jagex.runescape.input.MouseHandler;
44
import com.jagex.runescape.io.Buffer;
55
import com.jagex.runescape.net.PacketBuffer;
6-
import com.jagex.runescape.node.NodeCache;
76
import com.jagex.runescape.cache.CacheArchive;
87
import com.jagex.runescape.cache.def.*;
98
import com.jagex.runescape.cache.media.AnimationSequence;
@@ -20,7 +19,6 @@
2019
import com.jagex.runescape.scene.tile.FloorDecoration;
2120

2221
public class Class33 {
23-
public static NodeCache aClass9_778 = new NodeCache(64);
2422
public static int anInt784 = 0;
2523
public static int[] selectedMenuActions = new int[500];
2624

@@ -29,21 +27,21 @@ public static synchronized void method402(boolean arg0) {
2927
if(Class24.method340()) {
3028
Class22.method308();
3129
Class26.aBoolean618 = arg0;
32-
Class22_Sub1.aCacheArchive_1855 = null;
30+
Class22_Sub1.musicCacheArchive = null;
3331
}
3432
}
3533

36-
public static synchronized void method403(int arg0, boolean arg1, int arg2, int arg3, CacheArchive arg4, int arg5, int arg6, boolean arg7) {
34+
public static synchronized void method403(int arg0, boolean arg1, int arg2, int songId, CacheArchive cacheArchive, int arg5, int arg6, boolean arg7) {
3735
if(Class24.method340()) {
3836
Main.aBoolean1790 = arg7;
3937
MovedStatics.anInt255 = arg2;
4038
Class40_Sub5_Sub17_Sub1.anInt3004 = arg5;
4139
Class26.aBoolean618 = arg1;
42-
Class22_Sub1.aCacheArchive_1855 = arg4;
40+
Class22_Sub1.musicCacheArchive = cacheArchive;
4341
MovedStatics.anInt1806 = -1;
4442
OverlayDefinition.anInt2342 = arg0;
4543
MovedStatics.anInt2110 = arg6;
46-
Class8.anInt289 = arg3;
44+
Class8.anInt289 = songId;
4745
}
4846
}
4947

@@ -75,7 +73,7 @@ else if(i < Player.localPlayerCount)
7573
if(Player.headIconDrawType == 1 && HuffmanEncoding.anInt1545 == Player.npcIds[-Player.localPlayerCount + i] && MovedStatics.pulseCycle % 20 < 10) {
7674
FloorDecoration.method342(15 + actor.anInt3117, actor);
7775
if(ISAAC.anInt522 > -1)
78-
UnderlayDefinition.aClass40_Sub5_Sub14_Sub4Array2567[0].drawImage(ISAAC.anInt522 + -12, Class44.anInt1048 + -28);
76+
MovedStatics.aClass40_Sub5_Sub14_Sub4Array2567[0].drawImage(ISAAC.anInt522 + -12, Class44.anInt1048 + -28);
7977
}
8078
} else {
8179
Player class40_sub5_sub17_sub4_sub1 = (Player) actor;
@@ -96,7 +94,7 @@ else if(i < Player.localPlayerCount)
9694
if(i >= 0 && Player.headIconDrawType == 10 && ProducingGraphicsBuffer.anInt1623 == Player.trackedPlayerIndices[i]) {
9795
FloorDecoration.method342(actor.anInt3117 + 15, actor);
9896
if(ISAAC.anInt522 > -1)
99-
UnderlayDefinition.aClass40_Sub5_Sub14_Sub4Array2567[1].drawImage(-12 + ISAAC.anInt522, Class44.anInt1048 + -i_0_);
97+
MovedStatics.aClass40_Sub5_Sub14_Sub4Array2567[1].drawImage(-12 + ISAAC.anInt522, Class44.anInt1048 + -i_0_);
10098
}
10199
}
102100
if(actor.forcedChatMessage != null && (i >= Player.localPlayerCount || ChatBox.publicChatMode == 0 || ChatBox.publicChatMode == 3 || ChatBox.publicChatMode == 1 && Player.hasFriend(((Player) actor).playerName))) {
@@ -248,16 +246,6 @@ else if(i_11_ < 150)
248246
}
249247
}
250248

251-
public static synchronized void method405(int arg0, int arg1) {
252-
if(Class24.method340()) {
253-
OverlayDefinition.method557(arg1);
254-
Class22_Sub1.aCacheArchive_1855 = null;
255-
Class26.aBoolean618 = false;
256-
if(arg0 != 16969)
257-
method414(false, -11, -36, -55, 122, null);
258-
}
259-
}
260-
261249
public static void method406(int arg0, int arg1, int arg2, int arg3) {
262250
if(arg1 == 1) {
263251
SceneCluster.packetBuffer.putPacket(111);
@@ -310,7 +298,7 @@ public static void method406(int arg0, int arg1, int arg2, int arg3) {
310298
SceneCluster.packetBuffer.putShortBE(arg0);
311299
}
312300
if(arg3 > -112)
313-
aClass9_778 = null;
301+
OverlayDefinition.overlayDefinitionCache = null;
314302
}
315303

316304
public static synchronized void method407(boolean arg0) {
@@ -364,17 +352,17 @@ public static synchronized void method412(boolean arg0, CacheArchive arg1, int a
364352
public static synchronized void method413(byte arg0) {
365353
if(Class24.method340()) {
366354
if(Class26.aBoolean618) {
367-
byte[] is = RSString.method74(Class40_Sub5_Sub17_Sub1.anInt3004, Class22_Sub1.aCacheArchive_1855, Class8.anInt289, MovedStatics.anInt2110);
355+
byte[] is = RSString.method74(Class40_Sub5_Sub17_Sub1.anInt3004, Class22_Sub1.musicCacheArchive, Class8.anInt289, MovedStatics.anInt2110);
368356
if(is != null) {
369357
if(MovedStatics.anInt255 < 0) {
370358
if(MovedStatics.anInt1806 < 0)
371359
RSString.method56(Main.aBoolean1790, is, OverlayDefinition.anInt2342);
372360
else
373361
method566(OverlayDefinition.anInt2342, Main.aBoolean1790, MovedStatics.anInt1806, is);
374362
} else
375-
Class42.method886(0, OverlayDefinition.anInt2342, Main.aBoolean1790, is, MovedStatics.anInt255);
363+
MovedStatics.method886(0, OverlayDefinition.anInt2342, Main.aBoolean1790, is, MovedStatics.anInt255);
376364
Class26.aBoolean618 = false;
377-
Class22_Sub1.aCacheArchive_1855 = null;
365+
Class22_Sub1.musicCacheArchive = null;
378366
}
379367
}
380368
Class59.method984(0);
@@ -392,7 +380,7 @@ public static synchronized void method414(boolean arg0, int arg1, int songid, in
392380
Class40_Sub5_Sub17_Sub1.anInt3004 = arg4;
393381
Main.aBoolean1790 = arg0;
394382
MovedStatics.anInt2110 = arg1;
395-
Class22_Sub1.aCacheArchive_1855 = arg5;
383+
Class22_Sub1.musicCacheArchive = arg5;
396384
Class8.anInt289 = songid;
397385
}
398386
}

0 commit comments

Comments
 (0)