aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/qcommon
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-07-12 20:47:02 +0000
committerHolger Zickner <[email protected]>2004-07-12 20:47:02 +0000
commit4dca2574fe978cb98a9320f6db8176ee77973e91 (patch)
tree6cd1d23b2136f4f3817de7a0ba71c6f0d9ff52d3 /src/jake2/qcommon
parent25252922d19cd51c8bf7a3544d6b2a82c8a26fff (diff)
cleanups
Diffstat (limited to 'src/jake2/qcommon')
-rw-r--r--src/jake2/qcommon/CM.java10
-rw-r--r--src/jake2/qcommon/Cbuf.java5
-rw-r--r--src/jake2/qcommon/Netchan.java15
3 files changed, 13 insertions, 17 deletions
diff --git a/src/jake2/qcommon/CM.java b/src/jake2/qcommon/CM.java
index 1c3a756..a75cf05 100644
--- a/src/jake2/qcommon/CM.java
+++ b/src/jake2/qcommon/CM.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 02.01.2004 by RST.
-// $Id: CM.java,v 1.3 2004-07-09 06:50:50 hzi Exp $
+// $Id: CM.java,v 1.4 2004-07-12 20:47:00 hzi Exp $
package jake2.qcommon;
@@ -1703,7 +1703,7 @@ public class CM extends Game {
public static byte[] CM_ClusterPVS(int cluster) {
if (cluster == -1)
- Lib.memset(pvsrow, (byte) 0, (numclusters + 7) >> 3);
+ Arrays.fill(pvsrow, 0, (numclusters + 7) >> 3, (byte)0);
else
CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][DVIS_PVS], pvsrow);
return pvsrow;
@@ -1711,7 +1711,7 @@ public class CM extends Game {
public static byte[] CM_ClusterPHS(int cluster) {
if (cluster == -1)
- Lib.memset(phsrow, (byte) 0, (numclusters + 7) >> 3);
+ Arrays.fill(phsrow, 0, (numclusters + 7) >> 3, (byte)0);
else
CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][Defines.DVIS_PHS], phsrow);
return phsrow;
@@ -1822,10 +1822,10 @@ public class CM extends Game {
bytes = (numareas + 7) >> 3;
if (map_noareas.value != 0) { // for debugging, send everything
- Lib.memset(buffer, 255, bytes);
+ Arrays.fill(buffer, 0, bytes, (byte)255);
}
else {
- Lib.memset(buffer, 0, bytes);
+ Arrays.fill(buffer, 0, bytes, (byte)0);
floodnum = map_areas[area].floodnum;
for (i = 0; i < numareas; i++) {
if (map_areas[i].floodnum == floodnum || area == 0)
diff --git a/src/jake2/qcommon/Cbuf.java b/src/jake2/qcommon/Cbuf.java
index 5281081..84dea9c 100644
--- a/src/jake2/qcommon/Cbuf.java
+++ b/src/jake2/qcommon/Cbuf.java
@@ -2,7 +2,7 @@
* Cbuf.java
* Copyright (C) 2003
*
- * $Id: Cbuf.java,v 1.2 2004-07-08 15:58:46 hzi Exp $
+ * $Id: Cbuf.java,v 1.3 2004-07-12 20:47:00 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -28,7 +28,6 @@ package jake2.qcommon;
import jake2.Defines;
import jake2.Globals;
import jake2.game.Cmd;
-import jake2.util.Lib;
/**
* Cbuf
@@ -229,7 +228,7 @@ public final class Cbuf {
============
*/
public static void CopyToDefer() {
- Lib.memcpy(Globals.defer_text_buf, Globals.cmd_text_buf, Globals.cmd_text.cursize);
+ System.arraycopy(Globals.cmd_text_buf, 0, Globals.defer_text_buf, 0, Globals.cmd_text.cursize);
Globals.defer_text_buf[Globals.cmd_text.cursize] = 0;
Globals.cmd_text.cursize = 0;
}
diff --git a/src/jake2/qcommon/Netchan.java b/src/jake2/qcommon/Netchan.java
index 31699c3..3331646 100644
--- a/src/jake2/qcommon/Netchan.java
+++ b/src/jake2/qcommon/Netchan.java
@@ -2,7 +2,7 @@
* NetChannel.java
* Copyright (C) 2003
*
- * $Id: Netchan.java,v 1.2 2004-07-08 15:58:46 hzi Exp $
+ * $Id: Netchan.java,v 1.3 2004-07-12 20:47:00 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -25,15 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.qcommon;
-import sun.applet.resources.MsgAppletViewer;
-import jake2.*;
-import jake2.client.*;
-import jake2.game.*;
-import jake2.render.*;
-import jake2.server.*;
+import jake2.Defines;
+import jake2.Globals;
+import jake2.game.cvar_t;
+import jake2.server.SV_MAIN;
import jake2.sys.NET;
import jake2.sys.Sys;
-import jake2.util.Lib;
/**
* Netchan
@@ -224,7 +221,7 @@ public final class Netchan extends SV_MAIN {
send_reliable = Netchan_NeedReliable(chan) ? 1 : 0;
if (chan.reliable_length == 0 && chan.message.cursize != 0) {
- Lib.memcpy(chan.reliable_buf, chan.message_buf, chan.message.cursize);
+ System.arraycopy(chan.message_buf, 0, chan.reliable_buf, 0, chan.message.cursize);
chan.reliable_length = chan.message.cursize;
chan.message.cursize = 0;
chan.reliable_sequence ^= 1;