Skip to content

Commit 641a3cb

Browse files
authored
Merge pull request #127 from StenAL/features
More deobfuscation for chat and input-related classes
2 parents 93d3977 + bff0b3f commit 641a3cb

28 files changed

+1391
-1854
lines changed

client/src/main/java/agolf/GameApplet.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public void defineImages(ImageManager imageManager, String var2) {
7373
imageManager.defineSharedImage("ranking-icons.gif"); // TODO
7474
imageManager.defineSharedImage("language-flags.png"); // TODO
7575
imageManager.defineSharedImage("credit-background.jpg"); // TODO
76-
imageManager.defineSharedImage("bigtext.gif"); // TODO
7776
imageManager.defineSharedImage("tf-background.gif"); // TODO
7877

7978
for (int i = 0; i < GameBackgroundCanvas.trackAdvertSize; ++i) {
@@ -211,7 +210,7 @@ protected void setGameState(int activePanel, int lobbyId, int lobbyExtra) {
211210
}
212211
}
213212

214-
this.gameContainer.lobbyPanel.method395();
213+
this.gameContainer.lobbyPanel.init();
215214
this.addToContent(this.gameContainer.lobbyPanel);
216215
}
217216

@@ -231,11 +230,12 @@ protected void setGameState(int activePanel, int lobbyId, int lobbyExtra) {
231230
}
232231
}
233232

234-
protected void setGameSettings(boolean emailUnconfirmed, int var2, boolean useBadWordFilter, boolean var4) {
233+
protected void setGameSettings(
234+
boolean emailUnconfirmed, int playerElevationLevel, boolean useBadWordFilter, boolean disableGuestChat) {
235235
this.syncUnknownBool = new SynchronizedBool(emailUnconfirmed);
236-
this.syncPlayerAccessLevel = new SynchronizedInteger(var2);
236+
this.syncPlayerAccessLevel = new SynchronizedInteger(playerElevationLevel);
237237
this.gameContainer.badWordFilter = useBadWordFilter ? new BadWordFilter(super.textManager) : null;
238-
this.disableGuestChat = var4;
238+
this.disableGuestChat = disableGuestChat;
239239
}
240240

241241
protected void trackTestLogin(String username, String password) {

client/src/main/java/agolf/lobby/LobbyChatPanel.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import agolf.GameApplet;
44
import agolf.GameContainer;
55
import com.aapeli.multiuser.ChatLobby;
6-
import com.aapeli.multiuser.GlobalChatListener;
76
import com.aapeli.multiuser.Languages;
7+
import com.aapeli.multiuser.MultiLanguageChatListener;
88
import com.aapeli.multiuser.User;
99

10-
class LobbyChatPanel extends ChatLobby implements GlobalChatListener {
10+
class LobbyChatPanel extends ChatLobby implements MultiLanguageChatListener {
1111

1212
private static boolean aBoolean3712 = true;
1313
private static boolean aBoolean3713 = true;
@@ -36,7 +36,7 @@ protected LobbyChatPanel(GameContainer gameContainer, int width, int height, int
3636
this.disableChatInput(2);
3737
}
3838

39-
this.setOutputToGlobal(Languages.getLanguageId(gameContainer.params.getChatLocale()));
39+
this.addChatWithLanguage(Languages.getLanguageId(gameContainer.params.getChatLocale()));
4040
this.addChatListener(this);
4141
}
4242

@@ -232,7 +232,7 @@ protected boolean handlePacket(String[] args) {
232232

233233
System.arraycopy(args, 2, users, 0, i);
234234

235-
this.setFullUserList(users);
235+
this.setUserList(users);
236236
return true;
237237
} else if (args[1].equals("ownjoin")) {
238238
this.localUserJoin(args[2]);

client/src/main/java/agolf/lobby/LobbyDualPlayerPanel.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public void actionPerformed(ActionEvent evt) {
373373
/*if(isUsingCustomServer) {
374374
this.trackCategory = this.choicerTrackCategory.getSelectedIndex();
375375
}*/
376-
this.update(1);
376+
this.setState(1);
377377
this.gameContainer.lobbyPanel.writeData("challenge\t"
378378
+ this.opponentName
379379
+ "\t"
@@ -399,7 +399,7 @@ public void actionPerformed(ActionEvent evt) {
399399
} else if (evtSource == this.buttonCancel) {
400400
synchronized (synchronizedObject) {
401401
if (this.currentState == 1) {
402-
this.update(0);
402+
this.setState(0);
403403
this.gameContainer.lobbyPanel.writeData("cancel\t" + this.opponentName);
404404
return;
405405
}
@@ -442,7 +442,7 @@ protected boolean handlePacket(String[] args) {
442442
/*if(isUsingCustomServer) {
443443
this.trackCategory = Integer.parseInt(args[11]);
444444
}*/
445-
this.update(2);
445+
this.setState(2);
446446
}
447447

448448
if (this.checkboxBeep.getState()) {
@@ -453,7 +453,7 @@ protected boolean handlePacket(String[] args) {
453453
} else if (args[1].equals("cancel")) {
454454
synchronized (synchronizedObject) {
455455
if (this.currentState == 2) {
456-
this.update(0);
456+
this.setState(0);
457457
return true;
458458
}
459459

@@ -465,7 +465,7 @@ protected boolean handlePacket(String[] args) {
465465
return true;
466466
}
467467

468-
this.update(0);
468+
this.setState(0);
469469
}
470470

471471
if (args[2].equals("nouser")) {
@@ -496,7 +496,7 @@ protected boolean handlePacket(String[] args) {
496496
return true;
497497
}
498498

499-
this.update(0);
499+
this.setState(0);
500500
}
501501

502502
this.extraText = this.gameContainer.textManager.getGame("LobbyReal_ChallengedLeft");
@@ -507,7 +507,7 @@ protected boolean handlePacket(String[] args) {
507507
}
508508
}
509509

510-
protected void update(int state) {
510+
protected void setState(int state) {
511511
this.extraText = null;
512512
if (state == this.currentState) {
513513
this.repaint();
@@ -600,7 +600,7 @@ private void create() {
600600
private void accept() {
601601
synchronized (synchronizedObject) {
602602
if (this.currentState == 2) {
603-
this.update(-1);
603+
this.setState(-1);
604604
this.gameContainer.lobbyPanel.writeData("accept\t" + this.opponentName);
605605
return;
606606
}
@@ -610,7 +610,7 @@ private void accept() {
610610
private void refuse() {
611611
synchronized (synchronizedObject) {
612612
if (this.currentState == 2) {
613-
this.update(0);
613+
this.setState(0);
614614
this.gameContainer.lobbyPanel.writeData("cfail\t" + this.opponentName + "\trefuse");
615615
return;
616616
}

client/src/main/java/agolf/lobby/LobbyPanel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ public void selectLobby(int lobbyId, int lobbyExtra) {
124124
this.setVisible(true);
125125
}
126126

127-
public void method395() {
127+
public void init() {
128128
if (this.activeLobby == 1) {
129129
this.lobbySinglePlayerPanel.requestTrackSetList();
130130
}
131131

132132
if (this.activeLobby == 2) {
133-
this.lobbyDualPlayerPanel.update(0);
133+
this.lobbyDualPlayerPanel.setState(0);
134134
this.lobbyDualPlayerPanel.allowChallenges();
135135
}
136136

0 commit comments

Comments
 (0)