Skip to content

Commit f24107d

Browse files
committed
chore: Renamed everything in GameShell
1 parent 9b554f1 commit f24107d

3 files changed

Lines changed: 380 additions & 353 deletions

File tree

src/main/java/jagex2/client/Client.java

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ public void unload() {
17851785
SpotAnimType.field1297 = null;
17861786
SpotAnimType.field1309 = null;
17871787
VarpType.field1507 = null;
1788-
super.field952 = null;
1788+
super.drawArea = null;
17891789
ClientPlayer.field1683 = null;
17901790
Pix3D.unload();
17911791
World3D.unload();
@@ -1885,16 +1885,16 @@ public void updateOrbitCamera() {
18851885
if (this.field559 != var4) {
18861886
this.field559 += (var4 - this.field559) / 16;
18871887
}
1888-
if (super.field969[1] == 1) {
1888+
if (super.actionKey[1] == 1) {
18891889
this.field549 += (-24 - this.field549) / 2;
1890-
} else if (super.field969[2] == 1) {
1890+
} else if (super.actionKey[2] == 1) {
18911891
this.field549 += (24 - this.field549) / 2;
18921892
} else {
18931893
this.field549 /= 2;
18941894
}
1895-
if (super.field969[3] == 1) {
1895+
if (super.actionKey[3] == 1) {
18961896
this.field550 += (12 - this.field550) / 2;
1897-
} else if (super.field969[4] == 1) {
1897+
} else if (super.actionKey[4] == 1) {
18981898
this.field550 += (-12 - this.field550) / 2;
18991899
} else {
19001900
this.field550 /= 2;
@@ -2118,11 +2118,11 @@ public void updateGame() {
21182118
}
21192119

21202120
if (super.mouseClickButton != 0) {
2121-
long var13 = (super.field968 - this.field198) / 50L;
2121+
long var13 = (super.mouseClickTime - this.field198) / 50L;
21222122
if (var13 > 4095L) {
21232123
var13 = 4095L;
21242124
}
2125-
this.field198 = super.field968;
2125+
this.field198 = super.mouseClickTime;
21262126
int var15 = super.mouseClickY;
21272127
if (var15 < 0) {
21282128
var15 = 0;
@@ -2150,7 +2150,7 @@ public void updateGame() {
21502150
this.field560--;
21512151
}
21522152

2153-
if (super.field969[1] == 1 || super.field969[2] == 1 || super.field969[3] == 1 || super.field969[4] == 1) {
2153+
if (super.actionKey[1] == 1 || super.actionKey[2] == 1 || super.actionKey[3] == 1 || super.actionKey[4] == 1) {
21542154
this.field561 = true;
21552155
}
21562156

@@ -2164,15 +2164,15 @@ public void updateGame() {
21642164
this.out.p2_alt1(this.field548);
21652165
}
21662166

2167-
if (super.field956 && !this.field571) {
2167+
if (super.hasFocus && !this.field571) {
21682168
this.field571 = true;
21692169

21702170
// todo: applet focus
21712171
this.out.p1isaac(187);
21722172
this.out.p1(1);
21732173
}
21742174

2175-
if (!super.field956 && this.field571) {
2175+
if (!super.hasFocus && this.field571) {
21762176
this.field571 = false;
21772177

21782178
// todo: applet focus
@@ -4446,7 +4446,7 @@ public boolean tryMove(boolean arg0, boolean arg1, int arg2, int arg3, int arg4,
44464446
this.out.p1(var34 + var34 + 3);
44474447
}
44484448
this.out.p2_alt3(this.sceneBaseTileX + var35);
4449-
this.out.p1(super.field969[5] == 1 ? 1 : 0);
4449+
this.out.p1(super.actionKey[5] == 1 ? 1 : 0);
44504450
this.out.p2_alt3(this.sceneBaseTileZ + var36);
44514451
this.field416 = this.field419[0];
44524452
this.field417 = this.field420[0];
@@ -4498,7 +4498,7 @@ public String getHost(int arg0) {
44984498
this.ptype = this.in.g1();
44994499
}
45004500
if (signlink.mainapp == null) {
4501-
return super.field954 == null ? super.getDocumentBase().getHost().toLowerCase() : "runescape.com";
4501+
return super.frame == null ? super.getDocumentBase().getHost().toLowerCase() : "runescape.com";
45024502
} else {
45034503
return signlink.mainapp.getDocumentBase().getHost().toLowerCase();
45044504
}
@@ -5931,7 +5931,7 @@ public void loadTitle() {
59315931
if (this.field494 != null) {
59325932
return;
59335933
}
5934-
super.field952 = null;
5934+
super.drawArea = null;
59355935
this.field455 = null;
59365936
this.field453 = null;
59375937
this.field452 = null;
@@ -7020,15 +7020,15 @@ public void updateSequences(ClientEntity arg0) {
70207020

70217021
@ObfuscatedName("client.p(I)V")
70227022
public void drawGame() {
7023-
if (this.field349 != -1 && (this.sceneState == 2 || super.field952 != null)) {
7023+
if (this.field349 != -1 && (this.sceneState == 2 || super.drawArea != null)) {
70247024
if (this.sceneState == 2) {
70257025
this.updateInterfaceAnimation(this.sceneDelta, this.field349);
70267026
if (this.field256 != -1) {
70277027
this.updateInterfaceAnimation(this.sceneDelta, this.field256);
70287028
}
70297029
this.sceneDelta = 0;
70307030
this.prepareFullGame();
7031-
super.field952.bind();
7031+
super.drawArea.bind();
70327032
Pix3D.lineOffset = this.areaFullscreenOffset;
70337033
Pix2D.cls();
70347034
this.field342 = true;
@@ -7053,7 +7053,7 @@ public void drawGame() {
70537053
this.drawTooltip();
70547054
}
70557055
}
7056-
super.field952.draw(0, 0, super.graphics);
7056+
super.drawArea.draw(0, 0, super.graphics);
70577057
return;
70587058
}
70597059

@@ -7407,7 +7407,7 @@ public void init() {
74077407
} else {
74087408
membersWorld = true;
74097409
}
7410-
this.method267(765, 503);
7410+
this.initApplet(765, 503);
74117411
}
74127412

74137413
@ObfuscatedName("client.r(I)V")
@@ -7547,7 +7547,7 @@ public void login(String arg0, String arg1, boolean arg2) {
75477547
this.field198 = 0L;
75487548
this.field595 = 0;
75497549
this.mouseTracking.field99 = 0;
7550-
super.field956 = true;
7550+
super.hasFocus = true;
75517551
this.field571 = true;
75527552
this.ingame = true;
75537553
this.out.pos = 0;
@@ -8340,7 +8340,7 @@ public URL getCodeBase() {
83408340
return signlink.mainapp.getCodeBase();
83418341
}
83428342
try {
8343-
if (super.field954 != null) {
8343+
if (super.frame != null) {
83448344
return new URL("http://127.0.0.1:" + (portOffset + 80));
83458345
}
83468346
} catch (Exception var1) {
@@ -8715,7 +8715,7 @@ public void buildScene() {
87158715
} catch (Exception var61) {
87168716
}
87178717
LocType.field1633.clear();
8718-
if (super.field954 != null) {
8718+
if (super.frame != null) {
87198719
// todo: notifying the client is in a frame
87208720
this.out.p1isaac(78);
87218721
this.out.p4(1057001181);
@@ -9497,13 +9497,13 @@ public void draw3DEntityElements() {
94979497
short var2 = 507;
94989498
byte var3 = 20;
94999499
int var4 = 16776960;
9500-
if (super.field947 < 30 && lowMem) {
9500+
if (super.fps < 30 && lowMem) {
95019501
var4 = 16711680;
95029502
}
9503-
if (super.field947 < 20 && !lowMem) {
9503+
if (super.fps < 20 && !lowMem) {
95049504
var4 = 16711680;
95059505
}
9506-
this.fontPlain12.method243("Fps:" + super.field947, var4, var2, var3);
9506+
this.fontPlain12.method243("Fps:" + super.fps, var4, var2, var3);
95079507
int var13 = var3 + 15;
95089508
Runtime var5 = Runtime.getRuntime();
95099509
int var6 = (int) ((var5.totalMemory() - var5.freeMemory()) / 1024L);
@@ -9975,14 +9975,14 @@ public int getTopLevelCutscene() {
99759975
}
99769976

99779977
@ObfuscatedName("client.a(Ljava/lang/Runnable;I)V")
9978-
public void startThread(Runnable arg0, int arg1) {
9979-
if (arg1 > 10) {
9980-
arg1 = 10;
9978+
public void startThread(Runnable thread, int priority) {
9979+
if (priority > 10) {
9980+
priority = 10;
99819981
}
99829982
if (signlink.mainapp == null) {
9983-
super.startThread(arg0, arg1);
9983+
super.startThread(thread, priority);
99849984
} else {
9985-
signlink.startthread(arg0, arg1);
9985+
signlink.startthread(thread, priority);
99869986
}
99879987
}
99889988

@@ -11113,7 +11113,7 @@ public void prepareGame() {
1111311113
return;
1111411114
}
1111511115
this.unloadTitle();
11116-
super.field952 = null;
11116+
super.drawArea = null;
1111711117
this.field494 = null;
1111811118
this.field495 = null;
1111911119
this.field496 = null;
@@ -11143,7 +11143,7 @@ public void drawError() {
1114311143
Graphics var2 = this.getBaseComponent().getGraphics();
1114411144
var2.setColor(Color.black);
1114511145
var2.fillRect(0, 0, 765, 503);
11146-
this.method269(1);
11146+
this.setFramerate(1);
1114711147
if (this.errorLoading) {
1114811148
this.field539 = false;
1114911149
var2.setFont(new Font("Helvetica", 1, 16));
@@ -11234,8 +11234,8 @@ public void showPopupMessage(String arg1, String arg2) {
1123411234
this.fontPlain12.centreString(256, var4 - 1, 16777215, arg1);
1123511235
}
1123611236
this.areaViewport.draw(4, 4, super.graphics);
11237-
} else if (super.field952 != null) {
11238-
super.field952.bind();
11237+
} else if (super.drawArea != null) {
11238+
super.drawArea.bind();
1123911239
Pix3D.lineOffset = this.areaFullscreenOffset;
1124011240
int var5 = 251;
1124111241
short var6 = 300;
@@ -11252,7 +11252,7 @@ public void showPopupMessage(String arg1, String arg2) {
1125211252
this.fontPlain12.centreString(383, var5, 0, arg1);
1125311253
this.fontPlain12.centreString(382, var5 - 1, 16777215, arg1);
1125411254
}
11255-
super.field952.draw(0, 0, super.graphics);
11255+
super.drawArea.draw(0, 0, super.graphics);
1125611256
}
1125711257
}
1125811258

@@ -11945,7 +11945,7 @@ public void lag() {
1194511945
if (this.stream != null) {
1194611946
this.stream.method238();
1194711947
}
11948-
super.field948 = true;
11948+
super.debug = true;
1194911949
}
1195011950

1195111951
@ObfuscatedName("client.d(I)Ljava/awt/Component;")
@@ -11954,12 +11954,12 @@ public java.awt.Component getBaseComponent() {
1195411954
}
1195511955

1195611956
@ObfuscatedName("client.a(IZLjava/lang/String;)V")
11957-
public void drawProgress(int arg0, String arg2) {
11958-
this.lastProgressPercent = arg0;
11959-
this.lastProgressMessage = arg2;
11957+
public void drawProgress(int percent, String message) {
11958+
this.lastProgressPercent = percent;
11959+
this.lastProgressMessage = message;
1196011960
this.loadTitle();
1196111961
if (this.jagTitle == null) {
11962-
super.drawProgress(arg0, arg2);
11962+
super.drawProgress(percent, message);
1196311963
return;
1196411964
}
1196511965
this.field496.bind();
@@ -11970,9 +11970,9 @@ public void drawProgress(int arg0, String arg2) {
1197011970
int var7 = var5 / 2 - 18 - var6;
1197111971
Pix2D.drawRect(var7, 34, 9179409, var4 / 2 - 152, 304);
1197211972
Pix2D.drawRect(var7 + 1, 32, 0, var4 / 2 - 151, 302);
11973-
Pix2D.fillRect(30, var7 + 2, 9179409, arg0 * 3, var4 / 2 - 150);
11974-
Pix2D.fillRect(30, var7 + 2, 0, 300 - arg0 * 3, arg0 * 3 + (var4 / 2 - 150));
11975-
this.fontBold12.centreString(var4 / 2, var5 / 2 + 5 - var6, 16777215, arg2);
11973+
Pix2D.fillRect(30, var7 + 2, 9179409, percent * 3, var4 / 2 - 150);
11974+
Pix2D.fillRect(30, var7 + 2, 0, 300 - percent * 3, percent * 3 + (var4 / 2 - 150));
11975+
this.fontBold12.centreString(var4 / 2, var5 / 2 + 5 - var6, 16777215, message);
1197611976
this.field496.draw(171, 202, super.graphics);
1197711977
if (this.field342) {
1197811978
this.field342 = false;
@@ -12563,7 +12563,7 @@ public void handleMinimapInput() {
1256312563

1256412564
@ObfuscatedName("client.J(I)V")
1256512565
public void prepareFullGame() {
12566-
if (super.field952 != null) {
12566+
if (super.drawArea != null) {
1256712567
return;
1256812568
}
1256912569
this.unloadTitle();
@@ -12583,7 +12583,7 @@ public void prepareFullGame() {
1258312583
this.areaBackbase1 = null;
1258412584
this.field405 = null;
1258512585
this.field406 = null;
12586-
super.field952 = new PixMap(503, this.getBaseComponent(), 765);
12586+
super.drawArea = new PixMap(503, this.getBaseComponent(), 765);
1258712587
this.field342 = true;
1258812588
}
1258912589

@@ -12603,22 +12603,22 @@ public boolean isFriend(String arg1) {
1260312603
@ObfuscatedName("client.K(I)V")
1260412604
public void updateTitle() {
1260512605
if (this.field521 == 0) {
12606-
int var2 = super.field949 / 2 - 80;
12607-
int var3 = super.field950 / 2 + 20;
12606+
int var2 = super.canvasWidth / 2 - 80;
12607+
int var3 = super.canvasHeight / 2 + 20;
1260812608
int var14 = var3 + 20;
1260912609
if (super.mouseClickButton == 1 && super.mouseClickX >= var2 - 75 && super.mouseClickX <= var2 + 75 && super.mouseClickY >= var14 - 20 && super.mouseClickY <= var14 + 20) {
1261012610
this.field521 = 3;
1261112611
this.field273 = 0;
1261212612
}
12613-
int var4 = super.field949 / 2 + 80;
12613+
int var4 = super.canvasWidth / 2 + 80;
1261412614
if (super.mouseClickButton == 1 && super.mouseClickX >= var4 - 75 && super.mouseClickX <= var4 + 75 && super.mouseClickY >= var14 - 20 && super.mouseClickY <= var14 + 20) {
1261512615
this.field253 = "";
1261612616
this.field254 = "Enter your username & password.";
1261712617
this.field521 = 2;
1261812618
this.field273 = 0;
1261912619
}
1262012620
} else if (this.field521 == 2) {
12621-
int var5 = super.field950 / 2 - 40;
12621+
int var5 = super.canvasHeight / 2 - 40;
1262212622
int var15 = var5 + 30;
1262312623
int var16 = var15 + 25;
1262412624
if (super.mouseClickButton == 1 && super.mouseClickY >= var16 - 15 && super.mouseClickY < var16) {
@@ -12629,8 +12629,8 @@ public void updateTitle() {
1262912629
this.field273 = 1;
1263012630
}
1263112631
var5 += 15;
12632-
int var6 = super.field949 / 2 - 80;
12633-
int var7 = super.field950 / 2 + 50;
12632+
int var6 = super.canvasWidth / 2 - 80;
12633+
int var7 = super.canvasHeight / 2 + 50;
1263412634
int var17 = var7 + 20;
1263512635
if (super.mouseClickButton == 1 && super.mouseClickX >= var6 - 75 && super.mouseClickX <= var6 + 75 && super.mouseClickY >= var17 - 20 && super.mouseClickY <= var17 + 20) {
1263612636
this.field146 = 0;
@@ -12639,7 +12639,7 @@ public void updateTitle() {
1263912639
return;
1264012640
}
1264112641
}
12642-
int var8 = super.field949 / 2 + 80;
12642+
int var8 = super.canvasWidth / 2 + 80;
1264312643
if (super.mouseClickButton == 1 && super.mouseClickX >= var8 - 75 && super.mouseClickX <= var8 + 75 && super.mouseClickY >= var17 - 20 && super.mouseClickY <= var17 + 20) {
1264412644
this.field521 = 0;
1264512645
this.username = "";
@@ -12686,8 +12686,8 @@ public void updateTitle() {
1268612686
}
1268712687
}
1268812688
} else if (this.field521 == 3) {
12689-
int var12 = super.field949 / 2;
12690-
int var13 = super.field950 / 2 + 50;
12689+
int var12 = super.canvasWidth / 2;
12690+
int var13 = super.canvasHeight / 2 + 50;
1269112691
int var18 = var13 + 20;
1269212692
if (super.mouseClickButton == 1 && super.mouseClickX >= var12 - 75 && super.mouseClickX <= var12 + 75 && super.mouseClickY >= var18 - 20 && super.mouseClickY <= var18 + 20) {
1269312693
this.field521 = 0;

0 commit comments

Comments
 (0)