Skip to content

Commit 8f64d72

Browse files
committed
chore: Combing through datastruct
1 parent 5ef1c1e commit 8f64d72

Some content is hidden

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

43 files changed

+460
-405
lines changed

src/main/java/jagex3/client/Client.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,8 +2247,8 @@ public static void loginDone() {
22472247
}
22482248
}
22492249

2250-
for (SubInterface var12 = (SubInterface) subinterfaces.first(); var12 != null; var12 = (SubInterface) subinterfaces.findnext()) {
2251-
closeSubInterface(var12, true);
2250+
for (SubInterface sub = (SubInterface) subinterfaces.search(); sub != null; sub = (SubInterface) subinterfaces.findnext()) {
2251+
closeSubInterface(sub, true);
22522252
}
22532253

22542254
toplevelinterface = -1;
@@ -7515,7 +7515,7 @@ public static void componentUpdated(IfType arg0) {
75157515
// jag::oldscape::Client::LegacyUpdated
75167516
@ObfuscatedName("g.fn(B)V")
75177517
public static void legacyUpdated() {
7518-
for (SubInterface sub = (SubInterface) subinterfaces.first(); sub != null; sub = (SubInterface) subinterfaces.findnext()) {
7518+
for (SubInterface sub = (SubInterface) subinterfaces.search(); sub != null; sub = (SubInterface) subinterfaces.findnext()) {
75197519
int id = sub.id;
75207520

75217521
if (IfType.openInterface(id)) {
@@ -8288,7 +8288,7 @@ public static void friendsChatLeaveChat() {
82888288
// jag::oldscape::Client::PurgeServerActive
82898289
@ObfuscatedName("s.gt(II)V")
82908290
public static void purgeServerActive(int comId) {
8291-
for (ServerActive active = (ServerActive) serverActive.first(); active != null; active = (ServerActive) serverActive.findnext()) {
8291+
for (ServerActive active = (ServerActive) serverActive.search(); active != null; active = (ServerActive) serverActive.findnext()) {
82928292
if ((long) comId == (active.key >> 48 & 0xFFFFL)) {
82938293
active.unlink();
82948294
}
@@ -9653,7 +9653,7 @@ public static boolean tcpIn() {
96539653
}
96549654
var185.field1599 = true;
96559655
}
9656-
for (SubInterface var186 = (SubInterface) subinterfaces.first(); var186 != null; var186 = (SubInterface) subinterfaces.findnext()) {
9656+
for (SubInterface var186 = (SubInterface) subinterfaces.search(); var186 != null; var186 = (SubInterface) subinterfaces.findnext()) {
96579657
if (var186.field1599) {
96589658
var186.field1599 = false;
96599659
} else {
@@ -12026,7 +12026,7 @@ public static void closeModal() {
1202612026
// CLOSE_MODAL
1202712027
out.p1Enc(129);
1202812028

12029-
for (SubInterface sub = (SubInterface) subinterfaces.first(); sub != null; sub = (SubInterface) subinterfaces.findnext()) {
12029+
for (SubInterface sub = (SubInterface) subinterfaces.search(); sub != null; sub = (SubInterface) subinterfaces.findnext()) {
1203012030
if (sub.type == 0 || sub.type == 3) {
1203112031
closeSubInterface(sub, true);
1203212032
}

src/main/java/jagex3/client/ui/IfType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ public Pix32 getGraphic(boolean arg0) {
926926
}
927927

928928
long var3 = ((long) this.graphicshadow << 40) + ((this.hflip ? 1L : 0L) << 39) + ((this.vflip ? 1L : 0L) << 38) + ((long) this.outline << 36) + (long) var2;
929-
Pix32 var5 = (Pix32) spriteCache.get(var3);
929+
Pix32 var5 = (Pix32) spriteCache.find(var3);
930930
if (var5 != null) {
931931
return var5;
932932
}
@@ -975,7 +975,7 @@ public SoftwareFont getFont() {
975975
if (this.font == -1) {
976976
return null;
977977
}
978-
SoftwareFont var1 = (SoftwareFont) fontCache.get((long) this.font);
978+
SoftwareFont var1 = (SoftwareFont) fontCache.find((long) this.font);
979979
if (var1 != null) {
980980
return var1;
981981
}
@@ -1008,7 +1008,7 @@ public Pix32 getInvBackground(int arg0) {
10081008
if (var2 == -1) {
10091009
return null;
10101010
}
1011-
Pix32 var3 = (Pix32) spriteCache.get((long) var2);
1011+
Pix32 var3 = (Pix32) spriteCache.find((long) var2);
10121012
if (var3 != null) {
10131013
return var3;
10141014
}
@@ -1046,7 +1046,7 @@ public ModelLit getTempModel(SeqType arg0, int arg1, boolean arg2, PlayerModel p
10461046
} else if (type == 1 && id == -1) {
10471047
return null;
10481048
} else {
1049-
ModelLit var7 = (ModelLit) modelCache.get((long) ((type << 16) + id));
1049+
ModelLit var7 = (ModelLit) modelCache.find((long) ((type << 16) + id));
10501050
if (var7 == null) {
10511051
if (type == 1) {
10521052
ModelUnlit var8 = ModelUnlit.load(models, id, 0);

src/main/java/jagex3/config/EnumType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package jagex3.config;
22

33
import deob.ObfuscatedName;
4-
import jagex3.datastruct.DoublyLinkable;
4+
import jagex3.datastruct.Linkable2;
55
import jagex3.datastruct.LruCache;
66
import jagex3.io.Packet;
77
import jagex3.js5.Js5;
88
import jagex3.js5.Js5Loader;
99

1010
// jag::oldscape::configdecoder::EnumType
1111
@ObfuscatedName("fe")
12-
public class EnumType extends DoublyLinkable {
12+
public class EnumType extends Linkable2 {
1313

1414
// jag::oldscape::configdecoder::EnumType::m_pConfigClient
1515
@ObfuscatedName("fe.n")
@@ -45,7 +45,7 @@ public class EnumType extends DoublyLinkable {
4545

4646
@ObfuscatedName("ek.z(II)Lfe;")
4747
public static EnumType list(int id) {
48-
EnumType cached = (EnumType) recentUse.get(id);
48+
EnumType cached = (EnumType) recentUse.find(id);
4949
if (cached != null) {
5050
return cached;
5151
}

src/main/java/jagex3/config/FloType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package jagex3.config;
22

33
import deob.ObfuscatedName;
4-
import jagex3.datastruct.DoublyLinkable;
4+
import jagex3.datastruct.Linkable2;
55
import jagex3.datastruct.LruCache;
66
import jagex3.io.Packet;
77
import jagex3.js5.Js5;
88

99
// jag::oldscape::configdecoder::FloType
1010
@ObfuscatedName("fb")
11-
public class FloType extends DoublyLinkable {
11+
public class FloType extends Linkable2 {
1212

1313
// jag::oldscape::configdecoder::FloType::m_pConfigClient
1414
@ObfuscatedName("by.n")
@@ -50,7 +50,7 @@ public class FloType extends DoublyLinkable {
5050
// jag::oldscape::configdecoder::FloType::List
5151
@ObfuscatedName("cj.z(II)Lfb;")
5252
public static FloType list(int id) {
53-
FloType cached = (FloType) recentUse.get(id);
53+
FloType cached = (FloType) recentUse.find(id);
5454
if (cached != null) {
5555
return cached;
5656
}

src/main/java/jagex3/config/FluType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package jagex3.config;
22

33
import deob.ObfuscatedName;
4-
import jagex3.datastruct.DoublyLinkable;
4+
import jagex3.datastruct.Linkable2;
55
import jagex3.datastruct.LruCache;
66
import jagex3.io.Packet;
77
import jagex3.js5.Js5;
88

99
// jag::oldscape::configdecoder::FluType
1010
@ObfuscatedName("ec")
11-
public class FluType extends DoublyLinkable {
11+
public class FluType extends Linkable2 {
1212

1313
// jag::oldscape::configdecoder::FluType::m_pConfigClient
1414
@ObfuscatedName("ec.n")
@@ -41,7 +41,7 @@ public static void init(Js5 config) {
4141
// jag::oldscape::configdecoder::FluType::List
4242
@ObfuscatedName("bf.g(IB)Lec;")
4343
public static FluType list(int id) {
44-
FluType cached = (FluType) recentUse.get(id);
44+
FluType cached = (FluType) recentUse.find(id);
4545
if (cached != null) {
4646
return cached;
4747
}

src/main/java/jagex3/config/IdkType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import deob.ObfuscatedName;
44
import jagex3.dash3d.ModelUnlit;
5-
import jagex3.datastruct.DoublyLinkable;
5+
import jagex3.datastruct.Linkable2;
66
import jagex3.datastruct.LruCache;
77
import jagex3.io.Packet;
88
import jagex3.js5.Js5;
99

1010
// jag::oldscape::configdecoder::IdkType
1111
@ObfuscatedName("fd")
12-
public class IdkType extends DoublyLinkable {
12+
public class IdkType extends Linkable2 {
1313

1414
// jag::oldscape::configdecoder::IdkType::m_pConfigClient
1515
@ObfuscatedName("fd.n")
@@ -63,7 +63,7 @@ public static void init(Js5 config, Js5 model) {
6363
// jag::oldscape::configdecoder::IdkType::List
6464
@ObfuscatedName("p.g(II)Lfd;")
6565
public static IdkType list(int arg0) {
66-
IdkType cached = (IdkType) recentUse.get(arg0);
66+
IdkType cached = (IdkType) recentUse.find(arg0);
6767
if (cached != null) {
6868
return cached;
6969
}

src/main/java/jagex3/config/InvType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package jagex3.config;
22

33
import deob.ObfuscatedName;
4-
import jagex3.datastruct.DoublyLinkable;
4+
import jagex3.datastruct.Linkable2;
55
import jagex3.datastruct.LruCache;
66
import jagex3.io.Packet;
77
import jagex3.js5.Js5;
88
import jagex3.js5.Js5Loader;
99

1010
// jag::oldscape::configdecoder::InvType
1111
@ObfuscatedName("fp")
12-
public class InvType extends DoublyLinkable {
12+
public class InvType extends Linkable2 {
1313

1414
// jag::oldscape::configdecoder::InvType::m_pConfigClient
1515
@ObfuscatedName("fp.n")
@@ -45,7 +45,7 @@ public void decode(Packet buf, int code) {
4545

4646
// jag::oldscape::configdecoder::InvType::List
4747
public static InvType list(int id) {
48-
InvType cached = (InvType) recentUse.get(id);
48+
InvType cached = (InvType) recentUse.find(id);
4949
if (cached != null) {
5050
return cached;
5151
}

src/main/java/jagex3/config/LocType.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
import jagex3.dash3d.ModelLit;
66
import jagex3.dash3d.ModelSource;
77
import jagex3.dash3d.ModelUnlit;
8-
import jagex3.datastruct.DoublyLinkable;
8+
import jagex3.datastruct.Linkable2;
99
import jagex3.datastruct.LruCache;
1010
import jagex3.io.Packet;
1111
import jagex3.js5.Js5;
1212
import jagex3.jstring.Text;
1313

1414
// jag::oldscape::configdecoder::LocType
1515
@ObfuscatedName("ey")
16-
public class LocType extends DoublyLinkable {
16+
public class LocType extends Linkable2 {
1717

1818
// jag::oldscape::configdecoder::LocType::m_lowMem
1919
@ObfuscatedName("ey.n")
@@ -186,7 +186,7 @@ public static void init(Js5 config, Js5 model, boolean lowmem) {
186186
// jag::oldscape::configdecoder::LocType::List
187187
@ObfuscatedName("fj.g(IB)Ley;")
188188
public static LocType list(int id) {
189-
LocType cached = (LocType) recentUse.get(id);
189+
LocType cached = (LocType) recentUse.find(id);
190190
if (cached != null) {
191191
return cached;
192192
}
@@ -442,7 +442,7 @@ public final ModelSource getModel(int arg0, int arg1, int[][] arg2, int arg3, in
442442
} else {
443443
var7 = (this.id << 10) + (arg0 << 3) + arg1;
444444
}
445-
ModelSource var9 = (ModelSource) mc2.get(var7);
445+
ModelSource var9 = (ModelSource) mc2.find(var7);
446446
if (var9 == null) {
447447
ModelUnlit var10 = this.buildModel(arg0, arg1);
448448
if (var10 == null) {
@@ -480,7 +480,7 @@ public final ModelLit getModelLit(int arg0, int arg1, int[][] arg2, int arg3, in
480480
} else {
481481
var7 = (this.id << 10) + (arg0 << 3) + arg1;
482482
}
483-
ModelLit var9 = (ModelLit) mc3.get(var7);
483+
ModelLit var9 = (ModelLit) mc3.find(var7);
484484
if (var9 == null) {
485485
ModelUnlit var10 = this.buildModel(arg0, arg1);
486486
if (var10 == null) {
@@ -504,7 +504,7 @@ public final ModelLit getTempModel(int arg0, int arg1, int[][] arg2, int arg3, i
504504
} else {
505505
var9 = (this.id << 10) + (arg0 << 3) + arg1;
506506
}
507-
ModelLit var11 = (ModelLit) mc3.get(var9);
507+
ModelLit var11 = (ModelLit) mc3.find(var9);
508508
if (var11 == null) {
509509
ModelUnlit var12 = this.buildModel(arg0, arg1);
510510
if (var12 == null) {
@@ -549,7 +549,7 @@ public final ModelUnlit buildModel(int arg0, int arg1) {
549549
if (var4) {
550550
var7 += 65536;
551551
}
552-
var3 = (ModelUnlit) mc1.get((long) var7);
552+
var3 = (ModelUnlit) mc1.find((long) var7);
553553
if (var3 == null) {
554554
var3 = ModelUnlit.load(models, var7 & 0xFFFF, 0);
555555
if (var3 == null) {
@@ -583,7 +583,7 @@ public final ModelUnlit buildModel(int arg0, int arg1) {
583583
if (var11) {
584584
var10 += 65536;
585585
}
586-
var3 = (ModelUnlit) mc1.get((long) var10);
586+
var3 = (ModelUnlit) mc1.find((long) var10);
587587
if (var3 == null) {
588588
var3 = ModelUnlit.load(models, var10 & 0xFFFF, 0);
589589
if (var3 == null) {

src/main/java/jagex3/config/NpcType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
import jagex3.client.VarCache;
55
import jagex3.dash3d.ModelLit;
66
import jagex3.dash3d.ModelUnlit;
7-
import jagex3.datastruct.DoublyLinkable;
7+
import jagex3.datastruct.Linkable2;
88
import jagex3.datastruct.LruCache;
99
import jagex3.io.Packet;
1010
import jagex3.js5.Js5;
1111
import jagex3.jstring.Text;
1212

1313
// jag::oldscape::configdecoder::NpcType
1414
@ObfuscatedName("em")
15-
public class NpcType extends DoublyLinkable {
15+
public class NpcType extends Linkable2 {
1616

1717
// jag::oldscape::configdecoder::NpcType::m_pConfigClient
1818
@ObfuscatedName("em.n")
@@ -133,7 +133,7 @@ public static void init(Js5 config, Js5 model) {
133133
// jag::oldscape::configdecoder::NpcType::List
134134
@ObfuscatedName("f.g(IB)Lem;")
135135
public static NpcType list(int id) {
136-
NpcType cached = (NpcType) recentUse.get(id);
136+
NpcType cached = (NpcType) recentUse.find(id);
137137
if (cached != null) {
138138
return cached;
139139
}
@@ -277,7 +277,7 @@ public final ModelLit getTempModel(SeqType primaryAnim, int arg1, SeqType second
277277
return npc == null ? null : npc.getTempModel(primaryAnim, arg1, secondaryAnim, arg3);
278278
}
279279

280-
ModelLit cached = (ModelLit) modelCache.get(this.index);
280+
ModelLit cached = (ModelLit) modelCache.find(this.index);
281281
if (cached == null) {
282282
boolean needsModel = false;
283283
for (int i = 0; i < this.model.length; i++) {

src/main/java/jagex3/config/ObjType.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import jagex3.dash3d.ModelLit;
55
import jagex3.dash3d.ModelUnlit;
66
import jagex3.dash3d.Pix3D;
7-
import jagex3.datastruct.DoublyLinkable;
7+
import jagex3.datastruct.Linkable2;
88
import jagex3.datastruct.LruCache;
99
import jagex3.graphics.Pix2D;
1010
import jagex3.graphics.Pix32;
@@ -16,7 +16,7 @@
1616

1717
// jag::oldscape::configdecoder::ObjType
1818
@ObfuscatedName("fj")
19-
public class ObjType extends DoublyLinkable {
19+
public class ObjType extends Linkable2 {
2020

2121
// jag::oldscape::configdecoder::ObjType::m_pConfigClient
2222
@ObfuscatedName("fj.n")
@@ -166,7 +166,7 @@ public class ObjType extends DoublyLinkable {
166166
// jag::oldscape::configdecoder::ObjType::List
167167
@ObfuscatedName("bb.z(II)Lfj;")
168168
public static ObjType list(int id) {
169-
ObjType cached = (ObjType) recentUse.get(id);
169+
ObjType cached = (ObjType) recentUse.find(id);
170170
if (cached != null) {
171171
return cached;
172172
}
@@ -392,7 +392,7 @@ public final ModelLit getModelLit(int count) {
392392
}
393393
}
394394

395-
ModelLit cached = (ModelLit) modelCache.get(this.index);
395+
ModelLit cached = (ModelLit) modelCache.find(this.index);
396396
if (cached != null) {
397397
return cached;
398398
}
@@ -448,7 +448,7 @@ public ObjType getStackSizeAlt(int count) {
448448
public static Pix32 getSprite(int id, int count, int arg2, int arg3, boolean outlineRgb) {
449449
long key = ((long) arg3 << 40) + ((long) arg2 << 38) + ((long) count << 16) + (long) id;
450450
if (!outlineRgb) {
451-
Pix32 cached = (Pix32) spriteCache.get(key);
451+
Pix32 cached = (Pix32) spriteCache.find(key);
452452
if (cached != null) {
453453
return cached;
454454
}

0 commit comments

Comments
 (0)