Skip to content

Commit 679e6ef

Browse files
committed
Remove some dead code from GameShell
1 parent d90342a commit 679e6ef

File tree

1 file changed

+2
-69
lines changed

1 file changed

+2
-69
lines changed

src/main/java/org/runejs/client/GameShell.java

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import org.runejs.client.frame.ScreenController;
44
import org.runejs.client.frame.ScreenMode;
5-
import org.runejs.client.language.Native;
6-
import org.runejs.client.media.renderable.actor.Player;
75
import org.runejs.client.scene.SceneCluster;
86
import org.runejs.client.util.Signlink;
97
import org.runejs.client.util.Timer;
@@ -12,7 +10,6 @@
1210

1311
import java.awt.*;
1412
import java.awt.event.*;
15-
import java.io.IOException;
1613
import java.lang.reflect.Method;
1714
import java.net.InetAddress;
1815
import java.net.URL;
@@ -140,39 +137,16 @@ public synchronized void closeGameShell() {
140137
}
141138
}
142139

143-
public void stop() {
144-
if (this == currentGameShell && !closedClient)
145-
exitTimeInMillis = System.currentTimeMillis() + 4000L;
146-
}
147-
148-
public boolean verifyHost(int arg0) {
149-
String string = getDocumentBase().getHost().toLowerCase();
150-
if (arg0 != 31)
151-
return false;
152-
if (string.endsWith("127.0.0.1"))
153-
return true;
154-
for (/**/; string.length() > 0 && string.charAt(string.length() - 1) >= '0' && string.charAt(string.length() + -1) <= 57; string = string.substring(0, string.length() - 1)) {
155-
/* empty */
156-
}
157-
if (string.endsWith("192.168.1."))
158-
return true;
159-
openErrorPage("invalidhost");
160-
return false;
161-
}
162-
163140
public void windowOpened(WindowEvent arg0) {
164141
}
165142

166143
public void openErrorPage(String gameError) {
144+
// Previously opened an error page in a browser
145+
// getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
167146
if (!gameShellError) {
168147
gameShellError = true;
169148
System.out.println("error_game_" + gameError);
170-
try {
171-
// getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
172-
} catch (Exception exception) {
173-
}
174149
}
175-
176150
}
177151

178152
public void start() {
@@ -217,27 +191,6 @@ public URL getDocumentBase() {
217191
}
218192
return null;
219193
}
220-
221-
public void displayClientFrame(int clientVersion, int width, int height, int fileStoreId) {
222-
if (currentGameShell != null) {
223-
openErrorPage("alreadyloaded");
224-
return;
225-
}
226-
MovedStatics.width = height;
227-
Game.clientVersion = clientVersion;
228-
MovedStatics.height = width;
229-
currentGameShell = this;
230-
if (Game.signlink == null) {
231-
try {
232-
MovedStatics.signlink = Game.signlink = new Signlink(false, this, InetAddress.getByName(getCodeBase().getHost()), fileStoreId, null, 0);
233-
} catch (IOException e) {
234-
e.printStackTrace();
235-
}
236-
}
237-
Game.signlink.createThreadNode(1, this);
238-
windowActivated(null);
239-
}
240-
241194
public void windowIconified(WindowEvent arg0) {
242195
}
243196

@@ -277,14 +230,6 @@ public void runAfterGameLoop() {
277230
this.game.updateStatusText();
278231
}
279232

280-
// public AppletContext getAppletContext() {
281-
// if(Class35.aFrame1732 != null)
282-
// return null;
283-
// if(ISAAC.aClass31_521 != null && ISAAC.aClass31_521.anApplet740 != this)
284-
// return ISAAC.aClass31_521.anApplet740.getAppletContext();
285-
// return super.getAppletContext();
286-
// }
287-
288233
public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStoreId, InetAddress inetAddress, int clientVersion) {
289234
try {
290235
int height = 503;
@@ -295,7 +240,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
295240
currentGameShell = this;
296241
clientFrame = new Frame();
297242
clientFrame.setTitle(Configuration.SERVER_DISPLAY_NAME);
298-
// Class35.aFrame1732.setResizable(false);
299243
ScreenController.frameMode(ScreenMode.FIXED);
300244
clientFrame.setPreferredSize(new Dimension(width, height));
301245
clientFrame.setResizable(ScreenController.frameMode == ScreenMode.RESIZABLE);
@@ -304,7 +248,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
304248
clientFrame.toFront();
305249
Insets insets = clientFrame.getInsets();
306250
clientFrame.setSize(insets.right + width + insets.left, insets.bottom + insets.top + height);
307-
// Class35.aFrame1732.setLocationRelativeTo(null);
308251
MovedStatics.signlink = Game.signlink = new Signlink(true, null, inetAddress, fileStoreId, cacheFolder, cacheIndexes);
309252
Game.signlink.createThreadNode(1, this);
310253
} catch (Exception exception) {
@@ -324,21 +267,11 @@ public void windowClosing(WindowEvent windowEvent) {
324267
destroy();
325268
}
326269

327-
// public String getParameter(String parameter) {
328-
// if(Class35.aFrame1732 != null)
329-
// return null;
330-
// if(ISAAC.aClass31_521 != null && this != ISAAC.aClass31_521.anApplet740)
331-
// return ISAAC.aClass31_521.anApplet740.getParameter(parameter);
332-
// return super.getParameter(parameter);
333-
// }
334-
335270
public void windowDeactivated(WindowEvent windowEvent) {
336271
}
337272

338273
public synchronized void setCanvas() {
339274
Container container = clientFrame;
340-
// else
341-
// container = ISAAC.aClass31_521.anApplet740;
342275
if (Game.gameCanvas != null) {
343276
Game.gameCanvas.removeFocusListener(this);
344277
container.remove(Game.gameCanvas);

0 commit comments

Comments
 (0)