11
11
12
12
import java .awt .*;
13
13
import java .awt .event .*;
14
- import java .io .IOException ;
15
14
import java .lang .reflect .Method ;
16
15
import java .net .InetAddress ;
17
16
import java .net .URL ;
@@ -139,39 +138,16 @@ public synchronized void closeGameShell() {
139
138
}
140
139
}
141
140
142
- public void stop () {
143
- if (this == currentGameShell && !closedClient )
144
- exitTimeInMillis = System .currentTimeMillis () + 4000L ;
145
- }
146
-
147
- public boolean verifyHost (int arg0 ) {
148
- String string = getDocumentBase ().getHost ().toLowerCase ();
149
- if (arg0 != 31 )
150
- return false ;
151
- if (string .endsWith ("127.0.0.1" ))
152
- return true ;
153
- for (/**/ ; string .length () > 0 && string .charAt (string .length () - 1 ) >= '0' && string .charAt (string .length () + -1 ) <= 57 ; string = string .substring (0 , string .length () - 1 )) {
154
- /* empty */
155
- }
156
- if (string .endsWith ("192.168.1." ))
157
- return true ;
158
- openErrorPage ("invalidhost" );
159
- return false ;
160
- }
161
-
162
141
public void windowOpened (WindowEvent arg0 ) {
163
142
}
164
143
165
144
public void openErrorPage (String gameError ) {
145
+ // Previously opened an error page in a browser
146
+ // getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
166
147
if (!gameShellError ) {
167
148
gameShellError = true ;
168
149
System .out .println ("error_game_" + gameError );
169
- try {
170
- // getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
171
- } catch (Exception exception ) {
172
- }
173
150
}
174
-
175
151
}
176
152
177
153
public void start () {
@@ -216,27 +192,6 @@ public URL getDocumentBase() {
216
192
}
217
193
return null ;
218
194
}
219
-
220
- public void displayClientFrame (int clientVersion , int width , int height , int fileStoreId ) {
221
- if (currentGameShell != null ) {
222
- openErrorPage ("alreadyloaded" );
223
- return ;
224
- }
225
- MovedStatics .width = height ;
226
- Game .clientVersion = clientVersion ;
227
- MovedStatics .height = width ;
228
- currentGameShell = this ;
229
- if (Game .signlink == null ) {
230
- try {
231
- MovedStatics .signlink = Game .signlink = new Signlink (false , this , InetAddress .getByName (getCodeBase ().getHost ()), fileStoreId , null , 0 );
232
- } catch (IOException e ) {
233
- e .printStackTrace ();
234
- }
235
- }
236
- Game .signlink .createThreadNode (1 , this );
237
- windowActivated (null );
238
- }
239
-
240
195
public void windowIconified (WindowEvent arg0 ) {
241
196
}
242
197
@@ -276,14 +231,6 @@ public void runAfterGameLoop() {
276
231
this .game .updateStatusText ();
277
232
}
278
233
279
- // public AppletContext getAppletContext() {
280
- // if(Class35.aFrame1732 != null)
281
- // return null;
282
- // if(ISAAC.aClass31_521 != null && ISAAC.aClass31_521.anApplet740 != this)
283
- // return ISAAC.aClass31_521.anApplet740.getAppletContext();
284
- // return super.getAppletContext();
285
- // }
286
-
287
234
public void openClientApplet (String cacheFolder , int cacheIndexes , int fileStoreId , InetAddress inetAddress , int clientVersion ) {
288
235
try {
289
236
int height = 503 ;
@@ -294,7 +241,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
294
241
currentGameShell = this ;
295
242
clientFrame = new Frame ();
296
243
clientFrame .setTitle (Configuration .SERVER_DISPLAY_NAME );
297
- // Class35.aFrame1732.setResizable(false);
298
244
ScreenController .frameMode (ScreenMode .FIXED );
299
245
clientFrame .setPreferredSize (new Dimension (width , height ));
300
246
clientFrame .setResizable (ScreenController .frameMode == ScreenMode .RESIZABLE );
@@ -303,7 +249,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
303
249
clientFrame .toFront ();
304
250
Insets insets = clientFrame .getInsets ();
305
251
clientFrame .setSize (insets .right + width + insets .left , insets .bottom + insets .top + height );
306
- // Class35.aFrame1732.setLocationRelativeTo(null);
307
252
MovedStatics .signlink = Game .signlink = new Signlink (true , null , inetAddress , fileStoreId , cacheFolder , cacheIndexes );
308
253
Game .signlink .createThreadNode (1 , this );
309
254
} catch (Exception exception ) {
@@ -323,21 +268,11 @@ public void windowClosing(WindowEvent windowEvent) {
323
268
destroy ();
324
269
}
325
270
326
- // public String getParameter(String parameter) {
327
- // if(Class35.aFrame1732 != null)
328
- // return null;
329
- // if(ISAAC.aClass31_521 != null && this != ISAAC.aClass31_521.anApplet740)
330
- // return ISAAC.aClass31_521.anApplet740.getParameter(parameter);
331
- // return super.getParameter(parameter);
332
- // }
333
-
334
271
public void windowDeactivated (WindowEvent windowEvent ) {
335
272
}
336
273
337
274
public synchronized void setCanvas () {
338
275
Container container = clientFrame ;
339
- // else
340
- // container = ISAAC.aClass31_521.anApplet740;
341
276
if (Game .gameCanvas != null ) {
342
277
Game .gameCanvas .removeFocusListener (this );
343
278
container .remove (Game .gameCanvas );
0 commit comments