aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-10-04 12:50:38 +0000
committerHolger Zickner <[email protected]>2004-10-04 12:50:38 +0000
commit8ad645f69e8aea3d8a8a4b601e3f940165ad9041 (patch)
treec5f537537e7cc1cad865111ab4307ffefecc307c /src/jake2
parent8d9a3e9d9db1adce0afd2e01062651d035d56db8 (diff)
remove Lib.linesplit()
Diffstat (limited to 'src/jake2')
-rw-r--r--src/jake2/Defines.java4
-rw-r--r--src/jake2/client/CL.java9
-rw-r--r--src/jake2/client/CL_newfx.java3
-rw-r--r--src/jake2/client/CL_pred.java7
-rw-r--r--src/jake2/client/CL_tent.java6
-rw-r--r--src/jake2/client/Menu.java8
-rw-r--r--src/jake2/util/Lib.java21
7 files changed, 15 insertions, 43 deletions
diff --git a/src/jake2/Defines.java b/src/jake2/Defines.java
index 5a7cf29..245b309 100644
--- a/src/jake2/Defines.java
+++ b/src/jake2/Defines.java
@@ -19,14 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
-// $Id: Defines.java,v 1.5 2004-09-22 19:22:14 salomo Exp $
+// $Id: Defines.java,v 1.6 2004-10-04 12:50:38 hzi Exp $
/** Contains the definitions for the game engine. */
package jake2;
-import jake2.game.pmove_t;
-import jake2.util.*;
public class Defines {
diff --git a/src/jake2/client/CL.java b/src/jake2/client/CL.java
index dcdf7db..2eb20f0 100644
--- a/src/jake2/client/CL.java
+++ b/src/jake2/client/CL.java
@@ -2,7 +2,7 @@
* CL.java
* Copyright (C) 2004
*
- * $Id: CL.java,v 1.11 2004-09-22 19:22:08 salomo Exp $
+ * $Id: CL.java,v 1.12 2004-10-04 12:50:37 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -29,13 +29,10 @@ import jake2.Defines;
import jake2.Globals;
import jake2.game.*;
import jake2.qcommon.*;
-import jake2.qcommon.qfiles.dmdl_t;
import jake2.server.SV_MAIN;
-import jake2.sound.*;
+import jake2.sound.S;
import jake2.sys.*;
-import jake2.util.Lib;
-import jake2.util.Math3D;
-import jake2.util.Vargs;
+import jake2.util.*;
import java.io.IOException;
import java.io.RandomAccessFile;
diff --git a/src/jake2/client/CL_newfx.java b/src/jake2/client/CL_newfx.java
index 690cd57..fa83c7b 100644
--- a/src/jake2/client/CL_newfx.java
+++ b/src/jake2/client/CL_newfx.java
@@ -2,7 +2,7 @@
* CL_newfx.java
* Copyright (C) 2004
*
- * $Id: CL_newfx.java,v 1.4 2004-09-22 19:22:08 salomo Exp $
+ * $Id: CL_newfx.java,v 1.5 2004-10-04 12:50:37 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -29,7 +29,6 @@ package jake2.client;
import jake2.Defines;
import jake2.Globals;
-import jake2.client.CL_fx.cdlight_t;
import jake2.util.Lib;
import jake2.util.Math3D;
diff --git a/src/jake2/client/CL_pred.java b/src/jake2/client/CL_pred.java
index 4b07099..dd44a30 100644
--- a/src/jake2/client/CL_pred.java
+++ b/src/jake2/client/CL_pred.java
@@ -2,7 +2,7 @@
* CL_pred.java
* Copyright (C) 2004
*
- * $Id: CL_pred.java,v 1.5 2004-09-22 19:22:08 salomo Exp $
+ * $Id: CL_pred.java,v 1.6 2004-10-04 12:50:37 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -27,11 +27,6 @@ package jake2.client;
import jake2.Defines;
import jake2.Globals;
-import jake2.Defines;
-import jake2.game.pmove_t.PointContentsAdapter;
-import jake2.game.pmove_t.TraceAdapter;
-
-import jake2.Globals;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.util.Math3D;
diff --git a/src/jake2/client/CL_tent.java b/src/jake2/client/CL_tent.java
index 132fa4a..cb05e12 100644
--- a/src/jake2/client/CL_tent.java
+++ b/src/jake2/client/CL_tent.java
@@ -2,7 +2,7 @@
* java
* Copyright (C) 2004
*
- * $Id: CL_tent.java,v 1.5 2004-09-22 19:22:08 salomo Exp $
+ * $Id: CL_tent.java,v 1.6 2004-10-04 12:50:37 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -27,12 +27,12 @@ package jake2.client;
import jake2.Defines;
import jake2.Globals;
-import jake2.client.cl_sustain_t.ThinkAdapter;
import jake2.game.player_state_t;
import jake2.qcommon.Com;
import jake2.qcommon.MSG;
import jake2.render.model_t;
-import jake2.sound.*;
+import jake2.sound.S;
+import jake2.sound.sfx_t;
import jake2.util.Lib;
import jake2.util.Math3D;
diff --git a/src/jake2/client/Menu.java b/src/jake2/client/Menu.java
index 787296f..ab3199f 100644
--- a/src/jake2/client/Menu.java
+++ b/src/jake2/client/Menu.java
@@ -2,7 +2,7 @@
* Menu.java
* Copyright (C) 2004
*
- * $Id: Menu.java,v 1.10 2004-09-27 19:47:26 salomo Exp $
+ * $Id: Menu.java,v 1.11 2004-10-04 12:50:37 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -1909,7 +1909,7 @@ public final class Menu extends Key {
if (b != null) {
creditsBuffer = new String(b);
- String line[] = Lib.linesplit(creditsBuffer);
+ String line[] = creditsBuffer.split("\r\n");
for (n = 0; n < line.length; n++) {
creditsIndex[n] = line[n];
@@ -2724,7 +2724,7 @@ public final class Menu extends Key {
}
s = new String(buffer);
- String lines[] = Lib.linesplit(s);
+ String lines[] = s.split("\r\n");
nummaps = lines.length;
@@ -4492,7 +4492,7 @@ public final class Menu extends Key {
if ((cbd = Sys.GetClipboardData()) != null) {
//strtok(cbd, "\n\r\b");
- String lines[] = Lib.linesplit(cbd);
+ String lines[] = cbd.split("\r\n");
if (lines.length > 0 && lines[0].length() != 0) {
//strncpy(f.buffer, cbd, f.length - 1);
f.buffer = new StringBuffer(lines[0]);
diff --git a/src/jake2/util/Lib.java b/src/jake2/util/Lib.java
index ab3a40e..ab0d4ae 100644
--- a/src/jake2/util/Lib.java
+++ b/src/jake2/util/Lib.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 09.12.2003 by RST.
-// $Id: Lib.java,v 1.6 2004-09-22 19:22:13 salomo Exp $
+// $Id: Lib.java,v 1.7 2004-10-04 12:50:38 hzi Exp $
package jake2.util;
@@ -30,7 +30,6 @@ import jake2.qcommon.FS;
import java.io.*;
import java.nio.*;
-import java.util.StringTokenizer;
import net.java.games.jogl.util.BufferUtils;
@@ -238,23 +237,7 @@ public class Lib {
return in.substring(0, pos);
return "";
}
- public static String[] linesplit(String in) {
-
- StringTokenizer tk = new StringTokenizer(in, "\r\n");
-
- int count = tk.countTokens();
- if (count == 0)
- return new String[] {
- };
-
- String result[] = new String[count];
-
- for (int i = 0; tk.hasMoreTokens(); i++) {
- result[i] = tk.nextToken();
- }
-
- return result;
- }
+
public static int rename(String oldn, String newn) {
try {
File f1 = new File(oldn);