You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(34) |
Sep
(99) |
Oct
(110) |
Nov
(21) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(117) |
Feb
(90) |
Mar
(1) |
Apr
(22) |
May
(96) |
Jun
(25) |
Jul
(22) |
Aug
|
Sep
|
Oct
(18) |
Nov
(43) |
Dec
(71) |
2006 |
Jan
(20) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(60) |
Nov
(63) |
Dec
(35) |
2007 |
Jan
(18) |
Feb
(40) |
Mar
(14) |
Apr
(18) |
May
(33) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(25) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Carsten W. <ca...@us...> - 2005-12-18 16:34:24
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23988/src/jake2/util Modified Files: Lib.java Log Message: convert a java string to byte[] with 8bit latin 1. avoid String.getBytes() because it is using system specific character encoding. Network messages can fail, see rcon on a linux system. Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Lib.java 16 Dec 2005 21:19:42 -0000 1.16 --- Lib.java 18 Dec 2005 16:34:13 -0000 1.17 *************** *** 302,305 **** --- 302,319 ---- return out; } + + /** + * convert a java string to byte[] with 8bit latin 1 + * + * avoid String.getBytes() because it is using system specific character encoding. + */ + public static byte[] stringToBytes(String value) { + try { + return value.getBytes("ISO-8859-1"); + } catch (UnsupportedEncodingException e) { + // can't happen: Latin 1 is a standard encoding + return null; + } + } /** Helper method that savely handles the null termination of old C String data. */ |
From: Rene S. <sa...@us...> - 2005-12-17 20:32:40
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14510/src/jake2/game Modified Files: GameItems.java Log Message: npe fix in Touch_Items Index: GameItems.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameItems.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GameItems.java 20 Nov 2005 22:18:33 -0000 1.2 --- GameItems.java 17 Dec 2005 20:32:29 -0000 1.3 *************** *** 1291,1296 **** csurface_t surf) { boolean taken; ! ! if (other.client == null) return; if (other.health < 1) --- 1291,1297 ---- csurface_t surf) { boolean taken; ! ! // freed edicts have not items. ! if (other.client == null || ent.item == null) return; if (other.health < 1) |
From: Rene S. <sa...@us...> - 2005-12-17 20:32:11
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14358/src/jake2/server Modified Files: SV_USER.java Log Message: npe fix in SV_BeginDownload_f Index: SV_USER.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_USER.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SV_USER.java 16 Nov 2005 22:24:53 -0000 1.9 --- SV_USER.java 17 Dec 2005 20:32:01 -0000 1.10 *************** *** 418,421 **** --- 418,428 ---- SV_MAIN.sv_client.download = FS.LoadFile(name); + + // rst: this handles loading errors, no message yet visible + if (SV_MAIN.sv_client.download == null) + { + return; + } + SV_MAIN.sv_client.downloadsize = SV_MAIN.sv_client.download.length; SV_MAIN.sv_client.downloadcount = offset; *************** *** 427,431 **** // came from a pak file, don't // allow ! // download ZOID || (name.startsWith("maps/") && FS.file_from_pak != 0)) { Com.DPrintf("Couldn't download " + name + " to " --- 434,438 ---- // came from a pak file, don't // allow ! // download ZOID || (name.startsWith("maps/") && FS.file_from_pak != 0)) { Com.DPrintf("Couldn't download " + name + " to " |
From: Rene S. <sa...@us...> - 2005-12-16 21:19:54
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4701/src/jake2/util Modified Files: Lib.java Log Message: bugfix Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Lib.java 13 Dec 2005 00:03:41 -0000 1.15 --- Lib.java 16 Dec 2005 21:19:42 -0000 1.16 *************** *** 319,323 **** if (old.length == 0 || old[0] == 0) return ""; int i; ! for (i = offset; old[i] != 0 && (i - offset) < maxLenght; i++); return new String(old, offset, i - offset); } --- 319,323 ---- if (old.length == 0 || old[0] == 0) return ""; int i; ! for (i = offset; (i - offset) < maxLenght && old[i] != 0; i++); return new String(old, offset, i - offset); } |
From: Rene S. <sa...@us...> - 2005-12-16 21:18:34
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4488/src/jake2/server Modified Files: SV_SEND.java Log Message: lots of bugfixes in redirection Index: SV_SEND.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_SEND.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SV_SEND.java 17 Jan 2005 23:09:41 -0000 1.8 --- SV_SEND.java 16 Dec 2005 21:18:23 -0000 1.9 *************** *** 31,34 **** --- 31,35 ---- import jake2.qcommon.*; import jake2.render.*; + import jake2.util.Lib; import jake2.util.Math3D; *************** *** 42,50 **** */ ! public static byte sv_outputbuf[] = new byte[Defines.SV_OUTPUTBUF_LENGTH]; public static void SV_FlushRedirect(int sv_redirected, byte outputbuf[]) { if (sv_redirected == Defines.RD_PACKET) { ! String s = ("print\n" + outputbuf); Netchan.Netchan_OutOfBand(Defines.NS_SERVER, Globals.net_from, s.length(), s.getBytes()); } --- 43,51 ---- */ ! public static StringBuffer sv_outputbuf = new StringBuffer(); public static void SV_FlushRedirect(int sv_redirected, byte outputbuf[]) { if (sv_redirected == Defines.RD_PACKET) { ! String s = ("print\n" + Lib.CtoJava(outputbuf)); Netchan.Netchan_OutOfBand(Defines.NS_SERVER, Globals.net_from, s.length(), s.getBytes()); } |
From: Rene S. <sa...@us...> - 2005-12-16 21:18:00
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4361/src/jake2/server Modified Files: SV_MAIN.java Log Message: bugfixes in remote command execution Index: SV_MAIN.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_MAIN.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SV_MAIN.java 1 Jul 2005 14:20:55 -0000 1.11 --- SV_MAIN.java 16 Dec 2005 21:17:51 -0000 1.12 *************** *** 437,454 **** } ! /* ! * =============== SVC_RemoteCommand ! * * A client issued an rcon command. Shift down the remaining args Redirect ! * all printfs =============== */ public static void SVC_RemoteCommand() { int i; - //char remaining[1024]; String remaining; i = Rcon_Validate(); ! String msg = new String(Globals.net_message.data, 4, -1); if (i == 0) --- 437,451 ---- } ! /** * A client issued an rcon command. Shift down the remaining args Redirect ! * all printfs fromt hte server to the client. */ public static void SVC_RemoteCommand() { int i; String remaining; i = Rcon_Validate(); ! String msg = Lib.CtoJava(Globals.net_message.data, 4, 1024); if (i == 0) *************** *** 461,466 **** Com.BeginRedirect(Defines.RD_PACKET, SV_SEND.sv_outputbuf, Defines.SV_OUTPUTBUF_LENGTH, new Com.RD_Flusher() { ! public void rd_flush(int target, byte[] buffer) { ! SV_SEND.SV_FlushRedirect(target, buffer); } }); --- 458,463 ---- Com.BeginRedirect(Defines.RD_PACKET, SV_SEND.sv_outputbuf, Defines.SV_OUTPUTBUF_LENGTH, new Com.RD_Flusher() { ! public void rd_flush(int target, StringBuffer buffer) { ! SV_SEND.SV_FlushRedirect(target, buffer.toString().getBytes()); } }); |
From: Rene S. <sa...@us...> - 2005-12-16 21:17:18
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4272/src/jake2/qcommon Modified Files: Com.java Log Message: lots of bugfixes in redirection Index: Com.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Com.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Com.java 13 Nov 2005 13:36:00 -0000 1.13 --- Com.java 16 Dec 2005 21:17:08 -0000 1.14 *************** *** 52,64 **** public abstract static class RD_Flusher { ! public abstract void rd_flush(int target, byte[] buffer); } static int rd_target; ! static byte[] rd_buffer; static int rd_buffersize; static RD_Flusher rd_flusher; ! public static void BeginRedirect(int target, byte[] buffer, int buffersize, RD_Flusher flush) { if (0 == target || null == buffer || 0 == buffersize || null == flush) --- 52,64 ---- public abstract static class RD_Flusher { ! public abstract void rd_flush(int target, StringBuffer buffer); } static int rd_target; ! static StringBuffer rd_buffer; static int rd_buffersize; static RD_Flusher rd_flusher; ! public static void BeginRedirect(int target, StringBuffer buffer, int buffersize, RD_Flusher flush) { if (0 == target || null == buffer || 0 == buffersize || null == flush) *************** *** 70,74 **** rd_flusher= flush; ! rd_buffer= null; } --- 70,74 ---- rd_flusher= flush; ! rd_buffer.setLength(0); } *************** *** 124,138 **** } return 0; - // // faster than if - // try - // { - // return data[index]; - // } - // catch (Exception e) - // { - // data= null; - // // last char - // return 0; - // } } --- 124,127 ---- *************** *** 145,161 **** } return 0; - // try - // { - // index++; - // return data[index]; - // } - // catch (Exception e) - // { - // data= null; - // // avoid int wraps; - // index--; - // // last char - // return 0; - // } } --- 134,137 ---- *************** *** 367,385 **** } public static void Printf(String fmt, Vargs vargs) { - // Com.Printf is for testing only. String msg= sprintf(_debugContext + fmt, vargs); - if (rd_target != 0) { ! if ((msg.length() + Lib.strlen(rd_buffer)) > (rd_buffersize - 1)) { rd_flusher.rd_flush(rd_target, rd_buffer); ! // *rd_buffer = 0; ! rd_buffer[rd_buffersize]= '\0'; } ! // TODO handle rd_buffer ! // strcat(rd_buffer, msg); return; } --- 343,358 ---- } + /** Prints out messages, which can also be redirected to a remote client. */ public static void Printf(String fmt, Vargs vargs) { String msg= sprintf(_debugContext + fmt, vargs); if (rd_target != 0) { ! if ((msg.length() + rd_buffer.length()) > (rd_buffersize - 1)) { rd_flusher.rd_flush(rd_target, rd_buffer); ! rd_buffer.setLength(0); } ! rd_buffer.append(msg); return; } |
From: Rene S. <sa...@us...> - 2005-12-16 21:16:04
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4061/src/jake2/game Modified Files: GameBase.java Log Message: bugfix in end dm level when choosing next map from sv_maplist Index: GameBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameBase.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GameBase.java 16 Nov 2005 22:24:52 -0000 1.11 --- GameBase.java 16 Dec 2005 21:15:50 -0000 1.12 *************** *** 504,531 **** f = null; StringTokenizer tk = new StringTokenizer(s, seps); ! t = tk.nextToken(); ! //t = strtok(s, seps); ! while (t != null) { ! if (Lib.Q_stricmp(t, level.mapname) == 0) { // it's in the list, go to the next one ! t = tk.nextToken(); ! if (t == null) { // end of list, go to first one if (f == null) // there isn't a first one, same level ! PlayerHud ! .BeginIntermission(CreateTargetChangeLevel(level.mapname)); else ! PlayerHud ! .BeginIntermission(CreateTargetChangeLevel(f)); } else ! PlayerHud.BeginIntermission(CreateTargetChangeLevel(t)); return; } - if (f == null) - f = t; - t = tk.nextToken(); } - } if (level.nextmap.length() > 0) // go to a specific map PlayerHud.BeginIntermission(CreateTargetChangeLevel(level.nextmap)); --- 504,531 ---- f = null; StringTokenizer tk = new StringTokenizer(s, seps); ! ! while (tk.hasMoreTokens()){ ! t = tk.nextToken(); ! ! // store first map ! if (f == null) ! f = t; ! ! if (t.equalsIgnoreCase(level.mapname)) { // it's in the list, go to the next one ! if (!tk.hasMoreTokens()) { ! // end of list, go to first one if (f == null) // there isn't a first one, same level ! PlayerHud.BeginIntermission(CreateTargetChangeLevel(level.mapname)); else ! PlayerHud.BeginIntermission(CreateTargetChangeLevel(f)); } else ! PlayerHud.BeginIntermission(CreateTargetChangeLevel(tk.nextToken())); return; } } } + //not in the map list if (level.nextmap.length() > 0) // go to a specific map PlayerHud.BeginIntermission(CreateTargetChangeLevel(level.nextmap)); *************** *** 536,541 **** // changelevel, // so create a fake ent that goes back to the same level ! PlayerHud ! .BeginIntermission(CreateTargetChangeLevel(level.mapname)); return; } --- 536,540 ---- // changelevel, // so create a fake ent that goes back to the same level ! PlayerHud.BeginIntermission(CreateTargetChangeLevel(level.mapname)); return; } |
From: Rene S. <sa...@us...> - 2005-12-16 21:14:44
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3877/src/jake2/client Modified Files: CL.java Log Message: fix - printf does not like zero length strings Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CL.java 6 Dec 2005 14:37:43 -0000 1.26 --- CL.java 16 Dec 2005 21:14:36 -0000 1.27 *************** *** 814,818 **** if (c.equals("print")) { s = MSG.ReadString(Globals.net_message); ! Com.Printf(s); return; } --- 814,819 ---- if (c.equals("print")) { s = MSG.ReadString(Globals.net_message); ! if (s.length() > 0) ! Com.Printf(s); return; } |
From: Rene S. <sa...@us...> - 2005-12-16 21:13:50
|
Update of /cvsroot/jake2/jake2/src/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3773/src/jake2 Modified Files: Defines.java Log Message: support for long maplists Index: Defines.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/Defines.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Defines.java 4 Oct 2004 12:50:38 -0000 1.6 --- Defines.java 16 Dec 2005 21:13:42 -0000 1.7 *************** *** 65,69 **** public final static int MAX_STRING_CHARS = 1024; // max length of a string passed to Cmd_TokenizeString public final static int MAX_STRING_TOKENS = 80; // max tokens resulting from Cmd_TokenizeString ! public final static int MAX_TOKEN_CHARS = 128; // max length of an individual token public final static int MAX_QPATH = 64; // max length of a quake game pathname --- 65,69 ---- public final static int MAX_STRING_CHARS = 1024; // max length of a string passed to Cmd_TokenizeString public final static int MAX_STRING_TOKENS = 80; // max tokens resulting from Cmd_TokenizeString ! public final static int MAX_TOKEN_CHARS = 1024; // max length of an individual token public final static int MAX_QPATH = 64; // max length of a quake game pathname |
From: Rene S. <sa...@us...> - 2005-12-14 21:08:14
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22748/src/jake2/game Modified Files: GameTrigger.java Log Message: bugfix in trigger counter use, sequence was completed too early, some cosmetic done. Index: GameTrigger.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameTrigger.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GameTrigger.java 20 Nov 2005 22:18:33 -0000 1.6 --- GameTrigger.java 14 Dec 2005 21:08:03 -0000 1.7 *************** *** 394,406 **** }; ! /* ! * ============================================================================== ! * ! * trigger_counter ! * ! * ============================================================================== ! */ ! ! /* * QUAKED trigger_counter (.5 .5 .5) ? nomessage Acts as an intermediary for * an action that takes multiple inputs. --- 394,398 ---- }; ! /** * QUAKED trigger_counter (.5 .5 .5) ? nomessage Acts as an intermediary for * an action that takes multiple inputs. *************** *** 421,425 **** self.count--; ! if (self.count == 0) { if (0 == (self.spawnflags & 1)) { GameBase.gi.centerprintf(activator, self.count --- 413,417 ---- self.count--; ! if (self.count != 0) { if (0 == (self.spawnflags & 1)) { GameBase.gi.centerprintf(activator, self.count *************** *** 480,492 **** }; - /* - * ============================================================================== - * - * trigger_hurt - * - * ============================================================================== - */ ! /* * QUAKED trigger_hurt (.5 .5 .5) ? START_OFF TOGGLE SILENT NO_PROTECTION * SLOW Any entity that touches this will be hurt. --- 472,477 ---- }; ! /** * QUAKED trigger_hurt (.5 .5 .5) ? START_OFF TOGGLE SILENT NO_PROTECTION * SLOW Any entity that touches this will be hurt. |
From: Rene S. <sa...@us...> - 2005-12-13 00:03:49
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3069/src/jake2/util Modified Files: Lib.java Log Message: applied almost final beautification Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Lib.java 12 Dec 2005 21:50:02 -0000 1.14 --- Lib.java 13 Dec 2005 00:03:41 -0000 1.15 *************** *** 34,72 **** ! /* ! ============= ! VectorToString ! ! This is just a convenience function ! for printing vectors ! ============= ! */ public static String vtos(float[] v) { return (int) v[0] + " " + (int) v[1] + " " + (int) v[2]; } public static String vtofs(float[] v) { return v[0] + " " + v[1] + " " + v[2]; } public static String vtofsbeaty(float[] v) { return Com.sprintf("%8.2f %8.2f %8.2f", new Vargs().add(v[0]).add(v[1]).add(v[2])); } public static short rand() { - //return (short) (Math.random() * 0x8000); return (short)Globals.rnd.nextInt(Short.MAX_VALUE+1); } public static float crandom() { return (Globals.rnd.nextFloat() - 0.5f) * 2.0f; - //return (float) (Math.random() - 0.5) * 2.0f; } public static float random() { return Globals.rnd.nextFloat(); } public static float crand() { return (Globals.rnd.nextFloat() - 0.5f) * 2.0f; } public static int strcmp(String in1, String in2) { return in1.compareTo(in2); } public static float atof(String in) { float res = 0; --- 34,78 ---- ! /** Converts a vector to a string. */ public static String vtos(float[] v) { return (int) v[0] + " " + (int) v[1] + " " + (int) v[2]; } + + /** Converts a vector to a string. */ public static String vtofs(float[] v) { return v[0] + " " + v[1] + " " + v[2]; } + + /** Converts a vector to a beatiful string. */ public static String vtofsbeaty(float[] v) { return Com.sprintf("%8.2f %8.2f %8.2f", new Vargs().add(v[0]).add(v[1]).add(v[2])); } + + /** Like in libc. */ public static short rand() { return (short)Globals.rnd.nextInt(Short.MAX_VALUE+1); } + + /** Like in libc. */ public static float crandom() { return (Globals.rnd.nextFloat() - 0.5f) * 2.0f; } + + /** Like in libc. */ public static float random() { return Globals.rnd.nextFloat(); } + + /** Like in libc. */ public static float crand() { return (Globals.rnd.nextFloat() - 0.5f) * 2.0f; } + + /** Like in libc. */ public static int strcmp(String in1, String in2) { return in1.compareTo(in2); } + /** Like in libc. */ public static float atof(String in) { float res = 0; *************** *** 80,88 **** return res; } public static int Q_stricmp(String in1, String in2) { return in1.compareToIgnoreCase(in2); } - // ================================================================================= public static int atoi(String in) { try { --- 86,96 ---- return res; } + + /** Like in quake2. */ public static int Q_stricmp(String in1, String in2) { return in1.compareToIgnoreCase(in2); } + /** Like in libc. */ public static int atoi(String in) { try { *************** *** 98,101 **** --- 106,110 ---- } + /** Converts a string to a vector. Needs improvement. */ public static float[] atov(String v) { float[] res = { 0, 0, 0 }; *************** *** 108,111 **** --- 117,121 ---- } + /** Like in libc. */ public static int strlen(char in[]) { for (int i = 0; i < in.length; i++) *************** *** 115,118 **** --- 125,129 ---- } + /** Like in libc. */ public static int strlen(byte in[]) { for (int i = 0; i < in.length; i++) *************** *** 122,125 **** --- 133,137 ---- } + /** Converts memory to a memory dump string. */ public static String hexdumpfile(ByteBuffer bb, int len) throws IOException { *************** *** 133,137 **** } ! // dump data as hexstring public static String hexDump(byte data1[], int len, boolean showAddress) { StringBuffer result = new StringBuffer(); --- 145,149 ---- } ! /** Converts memory to a memory dump string. */ public static String hexDump(byte data1[], int len, boolean showAddress) { StringBuffer result = new StringBuffer(); *************** *** 167,175 **** return result.toString(); } ! //formats an hex byte public static String hex2(int i) { String val = Integer.toHexString(i & 0xff); ! return ("00".substring(0, 2 - val.length()) + val).toUpperCase(); } public static char readableChar(int i) { if ((i < 0x20) || (i > 0x7f)) --- 179,190 ---- return result.toString(); } ! ! /** Formats an hex byte. */ public static String hex2(int i) { String val = Integer.toHexString(i & 0xff); ! return ("00".substring(0, 2 - val.length()) + val).toUpperCase(); } + + /** Returns true if the char is alphanumeric. */ public static char readableChar(int i) { if ((i < 0x20) || (i > 0x7f)) *************** *** 178,181 **** --- 193,198 ---- return (char) i; } + + /** Prints a vector to the quake console. */ public static void printv(String in, float arr[]) { for (int n = 0; n < arr.length; n++) { *************** *** 183,187 **** --- 200,207 ---- } } + static final byte nullfiller[] = new byte[8192]; + + /** Like in libc. */ public static void fwriteString(String s, int len, RandomAccessFile f) throws IOException { if (s == null) *************** *** 196,199 **** --- 216,221 ---- f.write(s.getBytes(), 0, len); } + + /** Like in libc */ public static RandomAccessFile fopen(String name, String mode) { try { *************** *** 205,208 **** --- 227,232 ---- } } + + /** Like in libc */ public static void fclose(RandomAccessFile f) { try { *************** *** 212,215 **** --- 236,241 ---- } } + + /** Like in libc */ public static String freadString(RandomAccessFile f, int len) { byte buffer[] = new byte[len]; *************** *** 218,221 **** --- 244,249 ---- return Lib.CtoJava(buffer); } + + /** Returns the right part of the string from the last occruence of c. */ public static String rightFrom(String in, char c) { int pos = in.lastIndexOf(c); *************** *** 226,229 **** --- 254,259 ---- return ""; } + + /** Returns the left part of the string from the last occruence of c. */ public static String leftFrom(String in, char c) { int pos = in.lastIndexOf(c); *************** *** 235,238 **** --- 265,269 ---- } + /** Renames a file. */ public static int rename(String oldn, String newn) { try { *************** *** 246,249 **** --- 277,282 ---- } } + + /** Converts an int to 4 bytes java representation. */ public static byte[] getIntBytes(int c) { byte b[] = new byte[4]; *************** *** 254,260 **** --- 287,297 ---- return b; } + + /** Converts an 4 bytes java int representation to an int. */ public static int getInt(byte b[]) { return (b[0] & 0xff) | ((b[1] & 0xff) << 8) | ((b[2] & 0xff) << 16) | ((b[3] & 0xff) << 24); } + + /** Duplicates a float array. */ public static float[] clone(float in[]) { float out[] = new float[in.length]; *************** *** 266,269 **** --- 303,307 ---- } + /** Helper method that savely handles the null termination of old C String data. */ public static String CtoJava(String old) { int index = old.indexOf('\0'); *************** *** 272,279 **** --- 310,319 ---- } + /** Helper method that savely handles the null termination of old C String data. */ public static String CtoJava(byte[] old) { return CtoJava(old, 0, old.length); } + /** Helper method that savely handles the null termination of old C String data. */ public static String CtoJava(byte[] old, int offset, int maxLenght) { if (old.length == 0 || old[0] == 0) return ""; *************** *** 284,290 **** ! /* ! * java.nio.* Buffer util functions ! */ public static final int SIZEOF_FLOAT = 4; --- 324,328 ---- ! /* java.nio.* Buffer util functions */ public static final int SIZEOF_FLOAT = 4; |
From: Rene S. <sa...@us...> - 2005-12-13 00:03:04
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2436/src/jake2/sound Modified Files: WaveLoader.java Log Message: arbitrary kHz support patch - banned javax.sound, bugfix for large sample crash and some beatification Index: WaveLoader.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/WaveLoader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WaveLoader.java 27 Jun 2005 08:46:15 -0000 1.5 --- WaveLoader.java 13 Dec 2005 00:02:52 -0000 1.6 *************** *** 41,59 **** public class WaveLoader { ! private static AudioFormat sampleFormat; ! static { ! if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) { ! sampleFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 22050, 16, 1, 2, 22050, false); ! } else { ! sampleFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 22050, 16, 1, 2, 22050, true); ! } ! ! } ! ! /* ! ============== ! S_LoadSound ! ============== ! */ public static sfxcache_t LoadSound(sfx_t s) { if (s.name.charAt(0) == '*') --- 41,60 ---- public class WaveLoader { ! /** ! * The ResampleSfx can squeeze and stretch samples to a default sample rate. ! * Since Joal and lwjgl sound drivers support this, we don't need it and the samples ! * can keep their original sample rate. Use this switch for reactivating resampling. ! */ ! private static boolean DONT_DO_A_RESAMPLING_FOR_JOAL_AND_LWJGL = true; ! ! /** ! * This is the maximum sample length in bytes which has to be replaced by ! * a configurable variable. ! */ ! private static int maxsamplebytes = 2048 * 1024; ! ! /** ! * Loads a sound from a wav file. ! */ public static sfxcache_t LoadSound(sfx_t s) { if (s.name.charAt(0) == '*') *************** *** 84,115 **** return null; } int size = data.length; wavinfo_t info = GetWavinfo(s.name, data, size); ! ! AudioInputStream in = null; ! AudioInputStream out = null; ! try { ! in = AudioSystem.getAudioInputStream(new ByteArrayInputStream(data)); ! if (in.getFormat().getSampleSizeInBits() == 8) { ! in = convertTo16bit(in); ! } ! out = AudioSystem.getAudioInputStream(sampleFormat, in); ! int l = (int)out.getFrameLength(); ! sc = s.cache = new sfxcache_t(l*2); ! sc.length = l; ! int c = out.read(sc.data, 0, l * 2); ! out.close(); ! in.close(); ! } catch (Exception e) { ! Com.Printf("Couldn't load " + namebuffer + "\n"); return null; } ! sc.loopstart = info.loopstart * ((int)sampleFormat.getSampleRate() / info.rate); ! sc.speed = (int)sampleFormat.getSampleRate(); ! sc.width = sampleFormat.getSampleSizeInBits() / 8; ! sc.stereo = 0; data = null; --- 85,124 ---- return null; } + int size = data.length; wavinfo_t info = GetWavinfo(s.name, data, size); ! ! if (info.channels != 1) ! { ! Com.Printf(s.name + " is a stereo sample - ignoring\n"); return null; } + + float stepscale; + if (DONT_DO_A_RESAMPLING_FOR_JOAL_AND_LWJGL) + stepscale = 1; + else + stepscale = (float)info.rate / S.getDefaultSampleRate(); ! int len = (int) (info.samples / stepscale); ! len = len * info.width * info.channels; ! ! // TODO: handle max sample bytes with a cvar ! if (len >= maxsamplebytes) ! { ! Com.Printf(s.name + " is too long: " + len + " bytes?! ignoring.\n"); ! return null; ! } + sc = s.cache = new sfxcache_t(len); + + sc.length = info.samples; + sc.loopstart = info.loopstart; + sc.speed = info.rate; + sc.width = info.width; + sc.stereo = info.channels; + + ResampleSfx(s, sc.speed, sc.width, data, info.dataofs); data = null; *************** *** 117,142 **** } - static AudioInputStream convertTo16bit(AudioInputStream in) throws IOException { - AudioFormat format = in.getFormat(); - int length = (int)in.getFrameLength(); - byte[] samples = new byte[2*length]; - - for (int i = 0; i < length; i++) { - in.read(samples, 2*i+1, 1); - samples[2*i+1] -= 128; - } - in.close(); ! AudioFormat newformat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, format.getSampleRate(), 16, format.getChannels(), 2, format.getFrameRate(), false); ! return new AudioInputStream(new ByteArrayInputStream(samples), newformat, length); ! } ! ! /* ! =============================================================================== ! WAV loading - =============================================================================== - */ static byte[] data_b; --- 126,196 ---- } ! /** ! * Converts sample data with respect to the endianess and adjusts ! * the sample rate of a loaded sample, see flag DONT_DO_A_RESAMPLING_FOR_JOAL_AND_LWJGL. ! */ ! public static void ResampleSfx (sfx_t sfx, int inrate, int inwidth, byte data[], int offset) ! { ! int outcount; ! int srcsample; ! int i; ! int sample, samplefrac, fracstep; ! sfxcache_t sc; ! ! sc = sfx.cache; ! ! if (sc == null) ! return; ! // again calculate the stretching factor. ! // this is usually 0.5, 1, or 2 ! ! float stepscale; ! if (DONT_DO_A_RESAMPLING_FOR_JOAL_AND_LWJGL) ! stepscale = 1; ! else ! stepscale = (float)inrate / S.getDefaultSampleRate(); ! outcount = (int) (sc.length/stepscale); ! sc.length = outcount; ! ! if (sc.loopstart != -1) ! sc.loopstart = (int) (sc.loopstart / stepscale); ! ! // if resampled, sample has now the default sample rate ! if (DONT_DO_A_RESAMPLING_FOR_JOAL_AND_LWJGL == false) ! sc.speed = S.getDefaultSampleRate(); ! ! sc.width = inwidth; ! sc.stereo = 0; ! samplefrac = 0; ! fracstep = (int) (stepscale * 256); ! ! for (i=0 ; i<outcount ; i++) ! { ! srcsample = samplefrac >> 8; ! samplefrac += fracstep; ! ! if (inwidth == 2) ! { ! sample = (int) ((data[offset + srcsample * 2] & 0xff) + (data[offset + srcsample * 2 + 1] << 8)); ! } ! else ! { ! sample = ((data[offset + srcsample] &0xff) - 128) << 8; ! } ! ! if (sc.width == 2) ! { ! sc.data[i*2] = (byte) (sample & 0xff); ! sc.data[i*2+1] = (byte) ((sample>>>8) & 0xff); ! } ! else ! { ! sc.data[i] = (byte) (sample >> 8); ! } ! } ! } static byte[] data_b; |
From: Rene S. <sa...@us...> - 2005-12-13 00:00:36
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv962/src/jake2/sound Modified Files: S.java Log Message: lot of beatification and getDefaultSampleRate() added Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** S.java 4 Dec 2005 17:26:14 -0000 1.12 --- S.java 13 Dec 2005 00:00:25 -0000 1.13 *************** *** 43,47 **** static Vector drivers = new Vector(3); ! static { // dummy driver (no sound) --- 43,50 ---- static Vector drivers = new Vector(3); ! ! /** ! * Searches for and initializes all known sound drivers. ! */ static { // dummy driver (no sound) *************** *** 74,77 **** --- 77,83 ---- }; + /** + * Registers a new Sound Implementor. + */ public static void register(Sound driver) { if (driver == null) { *************** *** 83,86 **** --- 89,95 ---- } + /** + * Switches to the specific sound driver. + */ public static void useDriver(String driverName) { Sound driver = null; *************** *** 97,100 **** --- 106,112 ---- } + /** + * Initializes the sound module. + */ public static void Init() { *************** *** 133,216 **** } ! /* ! ===================== ! S_BeginRegistration ! ===================== ! */ public static void BeginRegistration() { impl.BeginRegistration(); } ! /* ! ===================== ! S_RegisterSound ! ===================== ! */ public static sfx_t RegisterSound(String sample) { return impl.RegisterSound(sample); } ! /* ! ===================== ! S_EndRegistration ! ===================== ! */ public static void EndRegistration() { impl.EndRegistration(); } ! /* ! ================== ! S_StartLocalSound ! ================== ! */ public static void StartLocalSound(String sound) { impl.StartLocalSound(sound); } ! /* ! ==================== ! S_StartSound ! ! Validates the parms and ques the sound up ! if pos is NULL, the sound will be dynamically sourced from the entity ! Entchannel 0 will never override a playing sound ! ==================== ! */ public static void StartSound(float[] origin, int entnum, int entchannel, sfx_t sfx, float fvol, float attenuation, float timeofs) { impl.StartSound(origin, entnum, entchannel, sfx, fvol, attenuation, timeofs); } ! /* ! ============ ! S_Update ! ! Called once each time through the main loop ! ============ ! */ public static void Update(float[] origin, float[] forward, float[] right, float[] up) { impl.Update(origin, forward, right, up); } ! /* ! ============ ! S_RawSamples ! ! Cinematic streaming and voice over network ! ============ ! */ public static void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data) { impl.RawSamples(samples, rate, width, channels, data); } public static void disableStreaming() { impl.disableStreaming(); } ! /* ! ================== ! S_StopAllSounds ! ================== ! */ public static void StopAllSounds() { impl.StopAllSounds(); --- 145,210 ---- } ! /** ! * Called before the sounds are to be loaded and registered. ! */ public static void BeginRegistration() { impl.BeginRegistration(); } ! /** ! * Registers and loads a sound. ! */ public static sfx_t RegisterSound(String sample) { return impl.RegisterSound(sample); } ! /** ! * Called after all sounds are registered and loaded. ! */ public static void EndRegistration() { impl.EndRegistration(); } ! /** ! * Starts a local sound. ! */ public static void StartLocalSound(String sound) { impl.StartLocalSound(sound); } ! /** ! * StartSound - Validates the parms and ques the sound up ! * if pos is NULL, the sound will be dynamically sourced from the entity ! * Entchannel 0 will never override a playing sound ! */ public static void StartSound(float[] origin, int entnum, int entchannel, sfx_t sfx, float fvol, float attenuation, float timeofs) { impl.StartSound(origin, entnum, entchannel, sfx, fvol, attenuation, timeofs); } ! /** ! * Updates the sound renderer according to the changes in the environment, ! * called once each time through the main loop. ! */ public static void Update(float[] origin, float[] forward, float[] right, float[] up) { impl.Update(origin, forward, right, up); } ! /** ! * Cinematic streaming and voice over network. ! */ public static void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data) { impl.RawSamples(samples, rate, width, channels, data); } + /** + * Switches off the sound streaming. + */ public static void disableStreaming() { impl.disableStreaming(); } ! /** ! * Stops all sounds. ! */ public static void StopAllSounds() { impl.StopAllSounds(); *************** *** 221,224 **** --- 215,221 ---- } + /** + * Returns a string array containing all sound driver names. + */ public static String[] getDriverNames() { String[] names = new String[drivers.size()]; *************** *** 228,230 **** --- 225,237 ---- return names; } + + /** + * This is used, when resampling to this default sampling rate is activated + * in the wavloader. It is placed here that sound implementors can override + * this one day. + */ + public static int getDefaultSampleRate() + { + return 44100; + } } \ No newline at end of file |
From: Rene S. <sa...@us...> - 2005-12-12 21:50:12
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3566/src/jake2/util Modified Files: Lib.java Log Message: bugfix in atov and some beatification Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Lib.java 26 May 2005 16:56:31 -0000 1.13 --- Lib.java 12 Dec 2005 21:50:02 -0000 1.14 *************** *** 97,112 **** } } public static float[] atov(String v) { float[] res = { 0, 0, 0 }; ! ! int i1 = v.indexOf(" "); ! int i2 = v.indexOf(" ", i1 + 1); ! ! res[0] = atof(v.substring(0, i1)); ! res[1] = atof(v.substring(i1 + 1, i2)); ! res[2] = atof(v.substring(i2 + 1, v.length())); ! return res; } public static int strlen(char in[]) { for (int i = 0; i < in.length; i++) --- 97,111 ---- } } + public static float[] atov(String v) { float[] res = { 0, 0, 0 }; ! String strres[] = v.split(" "); ! for (int n=0; n < 3 && n < strres.length; n++) ! { ! res[n] = atof(strres[n]); ! } return res; } + public static int strlen(char in[]) { for (int i = 0; i < in.length; i++) *************** *** 115,118 **** --- 114,118 ---- return in.length; } + public static int strlen(byte in[]) { for (int i = 0; i < in.length; i++) *************** *** 132,135 **** --- 132,136 ---- return hexDump(buf, len, false); } + // dump data as hexstring public static String hexDump(byte data1[], int len, boolean showAddress) { |
From: Rene S. <sa...@us...> - 2005-12-12 21:49:05
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3388 Modified Files: Jake2.sh Log Message: recovered carstens bugfix. it was lost because of an eclipse3.2 problem? Index: Jake2.sh =================================================================== RCS file: /cvsroot/jake2/jake2/Jake2.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jake2.sh 10 Dec 2005 22:10:03 -0000 1.3 --- Jake2.sh 12 Dec 2005 21:48:55 -0000 1.4 *************** *** 5,10 **** cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Dlib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 --- 5,10 ---- cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux:lib/lwjgl/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Djava.library.path=lib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 $* |
From: Rene S. <sa...@us...> - 2005-12-12 21:47:39
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3076/src/jake2/game Modified Files: GameSpawn.java Log Message: better bugfix for gravity problem Index: GameSpawn.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameSpawn.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** GameSpawn.java 11 Dec 2005 00:02:07 -0000 1.15 --- GameSpawn.java 12 Dec 2005 21:47:30 -0000 1.16 *************** *** 205,209 **** GameBase.gi.imageindex("help"); GameBase.gi.imageindex("field_3"); ! if (GameBase.st.gravity == "") GameBase.gi.cvar_set("sv_gravity", "800"); else --- 205,209 ---- GameBase.gi.imageindex("help"); GameBase.gi.imageindex("field_3"); ! if ("".equals(GameBase.st.gravity)) GameBase.gi.cvar_set("sv_gravity", "800"); else |
From: Rene S. <sa...@us...> - 2005-12-11 00:02:18
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21051/src/jake2/game Modified Files: GameSpawn.java Log Message: fix gravity bug Index: GameSpawn.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameSpawn.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GameSpawn.java 20 Nov 2005 22:18:33 -0000 1.14 --- GameSpawn.java 11 Dec 2005 00:02:07 -0000 1.15 *************** *** 205,209 **** GameBase.gi.imageindex("help"); GameBase.gi.imageindex("field_3"); ! if (GameBase.st.gravity != null) GameBase.gi.cvar_set("sv_gravity", "800"); else --- 205,209 ---- GameBase.gi.imageindex("help"); GameBase.gi.imageindex("field_3"); ! if (GameBase.st.gravity == "") GameBase.gi.cvar_set("sv_gravity", "800"); else |
From: Rene S. <sa...@us...> - 2005-12-10 22:45:13
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5090/src/jake2/game Modified Files: GameCombat.java Log Message: bugfix with non decreasing armor Index: GameCombat.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameCombat.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GameCombat.java 16 Nov 2005 22:24:53 -0000 1.1 --- GameCombat.java 10 Dec 2005 22:45:01 -0000 1.2 *************** *** 241,245 **** client = ent.client; ! if (client != null) return 0; --- 241,245 ---- client = ent.client; ! if (client == null) return 0; |
From: Rene S. <sa...@us...> - 2005-12-10 22:10:11
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30242 Modified Files: Jake2.sh Log Message: added version information Index: Jake2.sh =================================================================== RCS file: /cvsroot/jake2/jake2/Jake2.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jake2.sh 6 Dec 2005 14:56:55 -0000 1.2 --- Jake2.sh 10 Dec 2005 22:10:03 -0000 1.3 *************** *** 1,8 **** #!/bin/bash cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux:lib/lwjgl/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Djava.library.path=lib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 --- 1,10 ---- #!/bin/bash + # $Id$ + cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Dlib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 |
From: Carsten W. <ca...@us...> - 2005-12-06 14:57:08
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15217 Modified Files: Jake2.sh Log Message: bugfix: script was wrong :-( Index: Jake2.sh =================================================================== RCS file: /cvsroot/jake2/jake2/Jake2.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jake2.sh 28 Nov 2005 07:19:43 -0000 1.1 --- Jake2.sh 6 Dec 2005 14:56:55 -0000 1.2 *************** *** 3,8 **** cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Dlib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 --- 3,8 ---- cd `dirname $0` ! export LD_LIBRARY_PATH=lib/joal/linux:lib/lwjgl/linux CP=build:resources:lib/jogl/jogl.jar:lib/joal/linux/joal.jar:lib/lwjgl/lwjgl.jar:lib/lwjgl/lwjgl_util.jar ! exec java -Xmx100M -Djava.library.path=lib/jogl/linux:lib/joal/linux:lib/lwjgl/linux -cp $CP jake2.Jake2 |
From: Carsten W. <ca...@us...> - 2005-12-06 14:37:54
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12171/src/jake2/client Modified Files: CL.java Log Message: stop cinematics while disconnect; code cleanup; javadoc comments; Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CL.java 3 Dec 2005 19:41:20 -0000 1.25 --- CL.java 6 Dec 2005 14:37:43 -0000 1.26 *************** *** 33,37 **** import jake2.sound.S; import jake2.sys.*; ! import jake2.util.*; import java.io.IOException; --- 33,39 ---- import jake2.sound.S; import jake2.sys.*; ! import jake2.util.Lib; ! import jake2.util.Math3D; ! import jake2.util.Vargs; import java.io.IOException; *************** *** 57,65 **** public static final int PLAYER_MULT = 5; - /* - * ================== CL_FixCvarCheats - * - * ================== - */ public static class cheatvar_t { String name; --- 59,62 ---- *************** *** 90,97 **** static int numcheatvars; ! /* ! * ==================== CL_Stop_f * ! * stop recording a demo ==================== */ static xcommand_t Stop_f = new xcommand_t() { --- 87,94 ---- static int numcheatvars; ! /** ! * Stop_f * ! * Stop recording a demo. */ static xcommand_t Stop_f = new xcommand_t() { *************** *** 118,130 **** }; - /* - * ==================== CL_Record_f - * - * record <demoname> - * - * Begins recording a demo from the current position ==================== - */ static entity_state_t nullstate = new entity_state_t(null); static xcommand_t Record_f = new xcommand_t() { public void execute() { --- 115,126 ---- }; static entity_state_t nullstate = new entity_state_t(null); + /** + * Record_f + * + * record <demoname> + * Begins recording a demo from the current position. + */ static xcommand_t Record_f = new xcommand_t() { public void execute() { *************** *** 234,239 **** }; ! /* ! * ================== CL_ForwardToServer_f ================== */ static xcommand_t ForwardToServer_f = new xcommand_t() { --- 230,235 ---- }; ! /** ! * ForwardToServer_f */ static xcommand_t ForwardToServer_f = new xcommand_t() { *************** *** 254,259 **** }; ! /* ! * ================== CL_Pause_f ================== */ static xcommand_t Pause_f = new xcommand_t() { --- 250,255 ---- }; ! /** ! * Pause_f */ static xcommand_t Pause_f = new xcommand_t() { *************** *** 271,276 **** }; ! /* ! * ================== CL_Quit_f ================== */ static xcommand_t Quit_f = new xcommand_t() { --- 267,272 ---- }; ! /** ! * Quit_f */ static xcommand_t Quit_f = new xcommand_t() { *************** *** 281,288 **** }; ! /* ! * ================ CL_Connect_f ! * ! * ================ */ static xcommand_t Connect_f = new xcommand_t() { --- 277,282 ---- }; ! /** ! * Connect_f */ static xcommand_t Connect_f = new xcommand_t() { *************** *** 316,324 **** }; ! /* ! * ===================== CL_Rcon_f * * Send the rest of the command line over as an unconnected command. - * ===================== */ static xcommand_t Rcon_f = new xcommand_t() { --- 310,317 ---- }; ! /** ! * Rcon_f * * Send the rest of the command line over as an unconnected command. */ static xcommand_t Rcon_f = new xcommand_t() { *************** *** 382,390 **** }; ! /* ! * ================= CL_Changing_f * ! * Just sent as a hint to the client that they should drop to full console ! * ================= */ static xcommand_t Changing_f = new xcommand_t() { --- 375,382 ---- }; ! /** ! * Changing_f * ! * Just sent as a hint to the client that they should drop to full console. */ static xcommand_t Changing_f = new xcommand_t() { *************** *** 404,411 **** }; ! /* ! * ================= CL_Reconnect_f * ! * The server is changing levels ================= */ static xcommand_t Reconnect_f = new xcommand_t() { --- 396,403 ---- }; ! /** ! * Reconnect_f * ! * The server is changing levels. */ static xcommand_t Reconnect_f = new xcommand_t() { *************** *** 440,445 **** }; ! /* ! * ================= CL_PingServers_f ================= */ static xcommand_t PingServers_f = new xcommand_t() { --- 432,437 ---- }; ! /** ! * PingServers_f */ static xcommand_t PingServers_f = new xcommand_t() { *************** *** 499,506 **** }; ! /* ! * ================= CL_Skins_f * ! * Load or download any custom player skins and models ================= */ static xcommand_t Skins_f = new xcommand_t() { --- 491,498 ---- }; ! /** ! * Skins_f * ! * Load or download any custom player skins and models. */ static xcommand_t Skins_f = new xcommand_t() { *************** *** 521,526 **** }; ! /* ! * ============== CL_Userinfo_f ============== */ static xcommand_t Userinfo_f = new xcommand_t() { --- 513,518 ---- }; ! /** ! * Userinfo_f */ static xcommand_t Userinfo_f = new xcommand_t() { *************** *** 531,539 **** }; ! /* ! * ================= CL_Snd_Restart_f * * Restart the sound subsystem so it can pick up new parameters and flush ! * all sounds ================= */ static xcommand_t Snd_Restart_f = new xcommand_t() { --- 523,531 ---- }; ! /** ! * Snd_Restart_f * * Restart the sound subsystem so it can pick up new parameters and flush ! * all sounds. */ static xcommand_t Snd_Restart_f = new xcommand_t() { *************** *** 581,607 **** }; - /* - * ================== CL_Frame - * - * ================== - */ private static int extratime; // ============================================================================ ! /* ! * =============== CL_Shutdown * * FIXME: this is a callback from Sys_Quit and Com_Error. It would be better * to run quit through here before the final handoff to the sys code. - * =============== */ static boolean isdown = false; ! /* ! * ==================== CL_WriteDemoMessage * * Dumps the current net message, prefixed by the length - * ==================== */ static void WriteDemoMessage() { --- 573,592 ---- }; private static int extratime; // ============================================================================ ! /** ! * Shutdown * * FIXME: this is a callback from Sys_Quit and Com_Error. It would be better * to run quit through here before the final handoff to the sys code. */ static boolean isdown = false; ! /** ! * WriteDemoMessage * * Dumps the current net message, prefixed by the length */ static void WriteDemoMessage() { *************** *** 619,627 **** } ! /* ! * ======================= CL_SendConnectPacket * * We have gotten a challenge from the server, so try and connect. - * ====================== */ static void SendConnectPacket() { --- 604,611 ---- } ! /** ! * SendConnectPacket * * We have gotten a challenge from the server, so try and connect. */ static void SendConnectPacket() { *************** *** 646,653 **** } ! /* ! * ================= CL_CheckForResend * ! * Resend a connect message if the last one has timed out ================= */ static void CheckForResend() { --- 630,637 ---- } ! /** ! * CheckForResend * ! * Resend a connect message if the last one has timed out. */ static void CheckForResend() { *************** *** 678,686 **** } if (adr.port == 0) - // adr.port = BigShort(PORT_SERVER); adr.port = Defines.PORT_SERVER; ! Globals.cls.connect_time = Globals.cls.realtime; // for retransmit ! // requests Com.Printf("Connecting to " + Globals.cls.servername + "...\n"); --- 662,669 ---- } if (adr.port == 0) adr.port = Defines.PORT_SERVER; ! // for retransmit requests ! Globals.cls.connect_time = Globals.cls.realtime; Com.Printf("Connecting to " + Globals.cls.servername + "...\n"); *************** *** 689,698 **** } ! /* ! * ===================== CL_ClearState * - * ===================== */ - static void ClearState() { S.StopAllSounds(); --- 672,679 ---- } ! /** ! * ClearState * */ static void ClearState() { S.StopAllSounds(); *************** *** 710,721 **** } ! /* ! * ===================== CL_Disconnect * * Goes from a connected state to full screen console state Sends a * disconnect message to the server This is also called on Com_Error, so it ! * shouldn't cause any errors ===================== */ - static void Disconnect() { --- 691,701 ---- } ! /** ! * Disconnect * * Goes from a connected state to full screen console state Sends a * disconnect message to the server This is also called on Com_Error, so it ! * shouldn't cause any errors. */ static void Disconnect() { *************** *** 738,743 **** Math3D.VectorClear(Globals.cl.refdef.blend); ! // TODO: Carsten, check re.CinematicSetPalette ! //re.CinematicSetPalette(null); Menu.ForceMenuOff(); --- 718,722 ---- Math3D.VectorClear(Globals.cl.refdef.blend); ! Globals.re.CinematicSetPalette(null); Menu.ForceMenuOff(); *************** *** 745,750 **** Globals.cls.connect_time = 0; ! // TODO: Carsten, check SCR.StopCinematic(); ! // SCR.StopCinematic(); if (Globals.cls.demorecording) --- 724,728 ---- Globals.cls.connect_time = 0; ! SCR.StopCinematic(); if (Globals.cls.demorecording) *************** *** 763,768 **** Lib.fclose(Globals.cls.download); Globals.cls.download = null; - // fclose(cls.download); - // cls.download = NULL; } --- 741,744 ---- *************** *** 770,777 **** } ! /* ! * ================= CL_ParseStatusMessage * ! * Handle a reply from a ping ================= */ static void ParseStatusMessage() { --- 746,753 ---- } ! /** ! * ParseStatusMessage * ! * Handle a reply from a ping. */ static void ParseStatusMessage() { *************** *** 784,791 **** } ! /* ! * ================= CL_ConnectionlessPacket * ! * Responses to broadcasts, etc ================= */ static void ConnectionlessPacket() { --- 760,767 ---- } ! /** ! * ConnectionlessPacket * ! * Responses to broadcasts, etc */ static void ConnectionlessPacket() { *************** *** 866,871 **** ! /* ! * ================= CL_ReadPackets ================= */ static void ReadPackets() { --- 842,847 ---- ! /** ! * ReadPackets */ static void ReadPackets() { *************** *** 926,931 **** // ============================================================================= ! /* ! * ============== CL_FixUpGender_f ============== */ static void FixUpGender() { --- 902,907 ---- // ============================================================================= ! /** ! * FixUpGender_f */ static void FixUpGender() { *************** *** 1270,1275 **** } ! /* ! * ================= CL_InitLocal ================= */ public static void InitLocal() { --- 1246,1251 ---- } ! /** ! * InitLocal */ public static void InitLocal() { *************** *** 1420,1427 **** } ! /* ! * =============== CL_WriteConfiguration * ! * Writes key bindings and archived cvars to config.cfg =============== */ public static void WriteConfiguration() { --- 1396,1403 ---- } ! /** ! * WriteConfiguration * ! * Writes key bindings and archived cvars to config.cfg. */ public static void WriteConfiguration() { *************** *** 1453,1456 **** --- 1429,1435 ---- } + /** + * FixCvarCheats + */ public static void FixCvarCheats() { int i; *************** *** 1481,1490 **** } ! // ============================================================================ ! /* ! * ================== CL_SendCommand ! * ! * ================== */ public static void SendCommand() { --- 1460,1467 ---- } ! // ============================================================= ! /** ! * SendCommand */ public static void SendCommand() { *************** *** 1510,1513 **** --- 1487,1493 ---- // private static int lasttimecalled; + /** + * Frame + */ public static void Frame(int msec) { *************** *** 1584,1587 **** --- 1564,1570 ---- } + /** + * Shutdown + */ public static void Shutdown() { *************** *** 1600,1604 **** /** ! * initialize client subsystem */ public static void Init() { --- 1583,1587 ---- /** ! * Initialize client subsystem. */ public static void Init() { |
From: Rene S. <sa...@us...> - 2005-12-05 00:11:57
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24013/src/jake2/server Modified Files: SV_INIT.java Log Message: fixed bug with ending server in coop mode (always tried to load base1) Index: SV_INIT.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_INIT.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SV_INIT.java 4 Dec 2005 23:35:20 -0000 1.15 --- SV_INIT.java 5 Dec 2005 00:11:47 -0000 1.16 *************** *** 392,395 **** --- 392,397 ---- } + private static String firstmap = ""; + /* * ====================== SV_Map *************** *** 432,437 **** int c = level.indexOf('+'); if (c != -1) { ! Cvar.Set("nextserver", "gamemap \"" + level.substring(c + 1) ! + "\""); level = level.substring(0, c); } else { --- 434,438 ---- int c = level.indexOf('+'); if (c != -1) { ! Cvar.Set("nextserver", "gamemap \"" + level.substring(c + 1) + "\""); level = level.substring(0, c); } else { *************** *** 439,455 **** } ! // rst: base1 works for full, damo1 works for demo, so we need to check the ! // dedicated_start variable ! String nextlevel = "base1"; ! String dedicated_start = Cvar.VariableString("dedicated_start"); ! ! String tmp[] = dedicated_start.split(" "); ! ! if (tmp.length == 2) ! nextlevel = tmp[1]; //ZOID special hack for end game screen in coop mode if (Cvar.VariableValue("coop") != 0 && level.equals("victory.pcx")) ! Cvar.Set("nextserver", "gamemap \"*" + nextlevel + "\""); // if there is a $, use the remainder as a spawnpoint --- 440,456 ---- } ! // rst: base1 works for full, damo1 works for demo, so we need to store first map. ! if (firstmap.length() == 0) ! { ! if (!levelstring.endsWith(".cin") && !levelstring.endsWith(".pcx") && !levelstring.endsWith(".dm2")) ! { ! int pos = levelstring.indexOf('+'); ! firstmap = levelstring.substring(pos + 1); ! } ! } //ZOID special hack for end game screen in coop mode if (Cvar.VariableValue("coop") != 0 && level.equals("victory.pcx")) ! Cvar.Set("nextserver", "gamemap \"*" + firstmap + "\""); // if there is a $, use the remainder as a spawnpoint |
From: Rene S. <sa...@us...> - 2005-12-04 23:35:31
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11196/src/jake2/server Modified Files: SV_INIT.java Log Message: fixed bug with ending server in coop mode (always tried to load base1) Index: SV_INIT.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_INIT.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SV_INIT.java 3 Dec 2005 19:46:41 -0000 1.14 --- SV_INIT.java 4 Dec 2005 23:35:20 -0000 1.15 *************** *** 438,445 **** Cvar.Set("nextserver", ""); } //ZOID special hack for end game screen in coop mode if (Cvar.VariableValue("coop") != 0 && level.equals("victory.pcx")) ! Cvar.Set("nextserver", "gamemap \"*base1\""); // if there is a $, use the remainder as a spawnpoint --- 438,455 ---- Cvar.Set("nextserver", ""); } + + // rst: base1 works for full, damo1 works for demo, so we need to check the + // dedicated_start variable + String nextlevel = "base1"; + String dedicated_start = Cvar.VariableString("dedicated_start"); + + String tmp[] = dedicated_start.split(" "); + + if (tmp.length == 2) + nextlevel = tmp[1]; //ZOID special hack for end game screen in coop mode if (Cvar.VariableValue("coop") != 0 && level.equals("victory.pcx")) ! Cvar.Set("nextserver", "gamemap \"*" + nextlevel + "\""); // if there is a $, use the remainder as a spawnpoint |
From: Carsten W. <ca...@us...> - 2005-12-04 21:00:26
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10859/src/jake2/qcommon Modified Files: CM.java Log Message: debug message removed. Index: CM.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/CM.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CM.java 3 Dec 2005 19:44:40 -0000 1.11 --- CM.java 4 Dec 2005 21:00:17 -0000 1.12 *************** *** 1441,1447 **** trace_trace.surface = nullsurface.c; ! if (numnodes == 0) // map not loaded ! { ! Com.DPrintf("dummy trace zurueck, da map not loaded!\n"); return trace_trace; } --- 1441,1446 ---- trace_trace.surface = nullsurface.c; ! if (numnodes == 0) { ! // map not loaded return trace_trace; } |