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: Holger Z. <hz...@us...> - 2005-07-01 14:21:06
|
Update of /cvsroot/jake2/jake2/src/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30655/src/jake2 Modified Files: Jake2.java Log Message: remove timer hack and use new Timer classes Index: Jake2.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/Jake2.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Jake2.java 12 May 2005 12:52:50 -0000 1.7 --- Jake2.java 1 Jul 2005 14:20:53 -0000 1.8 *************** *** 26,32 **** package jake2; - import jake2.client.SCR; import jake2.qcommon.*; ! import jake2.sys.Sys; import java.util.Locale; --- 26,31 ---- package jake2; import jake2.qcommon.*; ! import jake2.sys.Timer; import java.util.Locale; *************** *** 62,80 **** Globals.nostdout = Cvar.Get("nostdout", "0", 0); ! int oldtime = Sys.Milliseconds(); int newtime; int time; while (true) { // find time spending rendering last frame ! newtime = Sys.Milliseconds(); time = newtime - oldtime; - // TODO this is a timer hack for Win2000 - // System.currentTimeMillis() resolution bug - if (time == 0 - && (Globals.cl_timedemo.value != 0 || SCR.fps.value != 0)) { - time++; - } - if (time > 0) Qcommon.Frame(time); --- 61,72 ---- Globals.nostdout = Cvar.Get("nostdout", "0", 0); ! int oldtime = Timer.Milliseconds(); int newtime; int time; while (true) { // find time spending rendering last frame ! newtime = Timer.Milliseconds(); time = newtime - oldtime; if (time > 0) Qcommon.Frame(time); |
From: Holger Z. <hz...@us...> - 2005-07-01 14:11:10
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26140/src/jake2/sys Added Files: NanoTimer.java StandardTimer.java HighPrecisionTimer.java Timer.java Log Message: different Timers implementing Milliseconds() --- NEW FILE: HighPrecisionTimer.java --- /* * HighPrecisionTimer.java * Copyright (C) 2005 * * $Id: HighPrecisionTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $ */ package jake2.sys; import sun.misc.Perf; class HighPrecisionTimer extends Timer { private Perf perf = Perf.getPerf(); private double f = 1000.0 / perf.highResFrequency(); private long base; HighPrecisionTimer() { base = perf.highResCounter(); } public long currentTimeMillis() { long time = perf.highResCounter(); long delta = time - base; if (delta < 0) { delta += Long.MAX_VALUE + 1; } return (long)(delta * f); } } --- NEW FILE: Timer.java --- /* * Timer.java * Copyright (C) 2005 * * $Id: Timer.java,v 1.1 2005/07/01 14:11:01 hzi Exp $ */ package jake2.sys; import jake2.Globals; public abstract class Timer { abstract public long currentTimeMillis(); private static long time = 0; static Timer t; static { try { t = new NanoTimer(); } catch (Throwable e) { try { t = new HighPrecisionTimer(); } catch (Throwable e1) { t = new StandardTimer(); } } System.out.println("using " + t.getClass().getName()); } public static int Milliseconds() { return Globals.curtime = (int)(t.currentTimeMillis()); } } --- NEW FILE: StandardTimer.java --- /* * StandardTimer.java * Copyright (C) 2005 * * $Id: StandardTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $ */ package jake2.sys; class StandardTimer extends Timer { private long base; StandardTimer() { base = System.currentTimeMillis(); } public long currentTimeMillis() { long time = System.currentTimeMillis(); long delta = time - base; if (delta < 0) { delta += Long.MAX_VALUE + 1; } return delta; } } --- NEW FILE: NanoTimer.java --- /* * NanoTimer.java * Copyright (C) 2005 * * $Id: NanoTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $ */ package jake2.sys; public class NanoTimer extends Timer { private long base; NanoTimer() { base = System.nanoTime(); } public long currentTimeMillis() { long time = System.nanoTime(); long delta = time - base; if (delta < 0) { delta += Long.MAX_VALUE + 1; } return (long)(delta * 0.000001); } } |
From: Holger Z. <hz...@us...> - 2005-06-30 20:18:01
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28905/webstart Modified Files: jake2_jogl11.jnlp jake2_jogl11ATI.jnlp Log Message: the new jogl links should guarantee a stable API Index: jake2_jogl11ATI.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11ATI.jnlp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** jake2_jogl11ATI.jnlp 26 May 2005 16:56:32 -0000 1.12 --- jake2_jogl11ATI.jnlp 30 Jun 2005 20:17:51 -0000 1.13 *************** *** 22,26 **** <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="true"/> ! <extension href="https://jogl.dev.java.net/webstart/jogl.jnlp" name="jogl"/> </resources> --- 22,26 ---- <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="true"/> ! <extension href="https://jogl.dev.java.net/webstart/jogl-1-1.jnlp" name="jogl"/> </resources> Index: jake2_jogl11.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11.jnlp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** jake2_jogl11.jnlp 26 May 2005 16:56:32 -0000 1.11 --- jake2_jogl11.jnlp 30 Jun 2005 20:17:51 -0000 1.12 *************** *** 22,26 **** <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="false"/> ! <extension href="https://jogl.dev.java.net/webstart/jogl.jnlp" name="jogl"/> </resources> --- 22,26 ---- <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="false"/> ! <extension href="https://jogl.dev.java.net/webstart/jogl-1-1.jnlp" name="jogl"/> </resources> |
From: Holger Z. <hz...@us...> - 2005-06-30 08:36:32
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25578/src/jake2/client Modified Files: Console.java Log Message: make sure not to exceed max line size in Console fixes bug 1230166 Index: Console.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Console.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Console.java 28 Oct 2004 23:41:27 -0000 1.6 --- Console.java 30 Jun 2005 08:36:22 -0000 1.7 *************** *** 174,177 **** --- 174,178 ---- int width = (Globals.viddef.width >> 3) - 2; + if (width > Defines.MAXCMDLINE) width = Defines.MAXCMDLINE; if (width == Globals.con.linewidth) |
From: Holger Z. <hz...@us...> - 2005-06-28 08:41:33
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22693/src/jake2/qcommon Modified Files: Qcommon.java Log Message: do not overwrite baseq2 dir Index: Qcommon.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Qcommon.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Qcommon.java 26 May 2005 16:56:32 -0000 1.17 --- Qcommon.java 28 Jun 2005 08:41:19 -0000 1.18 *************** *** 244,247 **** --- 244,248 ---- static void reconfigure(boolean clear) { + String dir = Cvar.Get("cddir", "", CVAR_ARCHIVE).string; Cbuf.AddText("exec default.cfg\n"); Cbuf.AddText("bind MWHEELUP weapnext\n"); *************** *** 256,260 **** Cbuf.AddEarlyCommands(clear); ! Cbuf.Execute(); } } --- 257,262 ---- Cbuf.AddEarlyCommands(clear); ! Cbuf.Execute(); ! if (!("".equals(dir))) Cvar.Set("cddir", dir); } } |
From: Holger Z. <hz...@us...> - 2005-06-28 07:01:19
|
Update of /cvsroot/jake2/jake2/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5056/scripts Modified Files: Jake2_lwjgl.sh Jake2.sh Log Message: automatically change to Jake2 dir Index: Jake2_lwjgl.sh =================================================================== RCS file: /cvsroot/jake2/jake2/scripts/Jake2_lwjgl.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jake2_lwjgl.sh 26 May 2005 16:56:31 -0000 1.2 --- Jake2_lwjgl.sh 28 Jun 2005 07:01:09 -0000 1.3 *************** *** 1,4 **** --- 1,6 ---- #!/bin/bash + cd `dirname $0` + export LD_LIBRARY_PATH=lib/linux/lwjgl CP=lib/jake2.jar:lib/lwjgl.jar:lib/lwjgl_util.jar Index: Jake2.sh =================================================================== RCS file: /cvsroot/jake2/jake2/scripts/Jake2.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jake2.sh 26 May 2005 16:56:31 -0000 1.5 --- Jake2.sh 28 Jun 2005 07:01:10 -0000 1.6 *************** *** 1,4 **** --- 1,6 ---- #!/bin/bash + cd `dirname $0` + export LD_LIBRARY_PATH=lib/linux CP=lib/jake2.jar:lib/jogl.jar:lib/linux/joal.jar |
From: Holger Z. <hz...@us...> - 2005-06-27 08:46:24
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4861/src/jake2/sound Modified Files: WaveLoader.java Log Message: fix out of bounds exception in getWavinfo() Index: WaveLoader.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/WaveLoader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WaveLoader.java 26 Apr 2005 22:16:34 -0000 1.4 --- WaveLoader.java 27 Jun 2005 08:46:15 -0000 1.5 *************** *** 260,269 **** FindNextChunk("LIST"); if (data_p != 0) { ! s = new String(data_b, data_p + 28, 4); ! if (s.equals("MARK")) { // this is not a proper parse, but it works with cooledit... ! data_p += 24; ! i = GetLittleLong(); // samples in loop ! info.samples = info.loopstart + i; ! // Com_Printf("looped length: %i\n", i); } } --- 260,272 ---- FindNextChunk("LIST"); if (data_p != 0) { ! if (data_b.length >= data_p + 32) { ! s = new String(data_b, data_p + 28, 4); ! if (s.equals("MARK")) { // this is not a proper parse, but ! // it works with cooledit... ! data_p += 24; ! i = GetLittleLong(); // samples in loop ! info.samples = info.loopstart + i; ! // Com_Printf("looped length: %i\n", i); ! } } } *************** *** 284,290 **** if (samples < info.samples) Com.Error(Defines.ERR_DROP, "Sound " + name + " has a bad loop length"); ! } else info.samples = samples; ! info.dataofs = data_p; --- 287,295 ---- if (samples < info.samples) Com.Error(Defines.ERR_DROP, "Sound " + name + " has a bad loop length"); ! } else { info.samples = samples; ! if (info.loopstart > 0) info.samples -= info.loopstart; ! } ! info.dataofs = data_p; |
From: Holger Z. <hz...@us...> - 2005-06-26 09:17:46
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19526/src/jake2/sys Modified Files: NET.java Log Message: parseInt/Long may throw an exception Index: NET.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/NET.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NET.java 20 Feb 2005 18:33:16 -0000 1.7 --- NET.java 26 Jun 2005 09:17:33 -0000 1.8 *************** *** 28,35 **** import jake2.Globals; import jake2.game.cvar_t; ! import jake2.qcommon.*; import java.io.IOException; ! import java.net.*; import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; --- 28,42 ---- import jake2.Globals; import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.netadr_t; ! import jake2.qcommon.sizebuf_t; ! import jake2.util.Lib; import java.io.IOException; ! import java.net.DatagramSocket; ! import java.net.InetAddress; ! import java.net.InetSocketAddress; ! import java.net.SocketAddress; import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; *************** *** 141,145 **** a.type = Defines.NA_IP; if (address.length == 2) ! a.port = Integer.parseInt(address[1]); return true; } catch (Exception e) { --- 148,152 ---- a.type = Defines.NA_IP; if (address.length == 2) ! a.port = Lib.atoi(address[1]); return true; } catch (Exception e) { |
From: Holger Z. <hz...@us...> - 2005-06-26 09:17:45
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19526/src/jake2/client Modified Files: CL_input.java Log Message: parseInt/Long may throw an exception Index: CL_input.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_input.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_input.java 7 Jun 2005 12:57:21 -0000 1.6 --- CL_input.java 26 Jun 2005 09:17:33 -0000 1.7 *************** *** 142,146 **** int k; String c; ! long uptime; c = Cmd.Argv(1); --- 142,146 ---- int k; String c; ! int uptime; c = Cmd.Argv(1); *************** *** 169,173 **** // save timestamp c = Cmd.Argv(2); ! uptime = Long.parseLong(c); if (uptime != 0) b.msec += uptime - b.downtime; --- 169,173 ---- // save timestamp c = Cmd.Argv(2); ! uptime = Lib.atoi(c); if (uptime != 0) b.msec += uptime - b.downtime; |
From: Holger Z. <hz...@us...> - 2005-06-26 08:51:27
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6061/src/jake2/render Modified Files: JoglBase.java Log Message: last change deleted too much... Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** JoglBase.java 24 Jun 2005 06:24:34 -0000 1.14 --- JoglBase.java 26 Jun 2005 08:51:19 -0000 1.15 *************** *** 208,211 **** --- 208,212 ---- canvas.setNoAutoRedrawMode(true); + canvas.setAutoSwapBufferMode(false); canvas.addGLEventListener(this); *************** *** 308,311 **** --- 309,313 ---- protected void GLimp_EndFrame() { gl.glFlush(); + canvas.swapBuffers(); } protected void GLimp_BeginFrame(float camera_separation) { |
From: Holger Z. <hz...@us...> - 2005-06-24 06:24:48
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18443/src/jake2/render Modified Files: JoglBase.java Log Message: jogl-1.0 is not supported anymore Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** JoglBase.java 14 Dec 2004 00:11:09 -0000 1.13 --- JoglBase.java 24 Jun 2005 06:24:34 -0000 1.14 *************** *** 28,37 **** import jake2.Defines; ! import jake2.client.*; import jake2.game.cvar_t; import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; import jake2.sys.JOGLKBD; - import jake2.sys.KBD; import java.awt.*; --- 28,37 ---- import jake2.Defines; ! import jake2.client.VID; ! import jake2.client.viddef_t; import jake2.game.cvar_t; import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; import jake2.sys.JOGLKBD; import java.awt.*; *************** *** 96,102 **** protected static final int rserr_invalid_mode = 2; protected static final int rserr_unknown = 3; ! ! private boolean swap = false; ! public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); --- 96,100 ---- protected static final int rserr_invalid_mode = 2; protected static final int rserr_unknown = 3; ! public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); *************** *** 210,218 **** canvas.setNoAutoRedrawMode(true); - - if (net.java.games.jogl.Version.getVersion().startsWith("1.1")) { - swap=true; - canvas.setAutoSwapBufferMode(false); - } canvas.addGLEventListener(this); --- 208,211 ---- *************** *** 315,321 **** protected void GLimp_EndFrame() { gl.glFlush(); - - // swap buffer - if (swap) canvas.swapBuffers(); } protected void GLimp_BeginFrame(float camera_separation) { --- 308,311 ---- |
From: Carsten W. <ca...@us...> - 2005-06-11 19:43:57
|
Update of /cvsroot/jake2/jake2/test/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30157/test/jake2/render Modified Files: DancingQueens.java TestRenderer.java Log Message: code cleanup Index: TestRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestRenderer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestRenderer.java 14 Dec 2004 01:08:32 -0000 1.6 --- TestRenderer.java 11 Jun 2005 19:43:48 -0000 1.7 *************** *** 6,27 **** */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, [...1426 lines suppressed...] ! * V_AddParticle ! */ ! void AddParticle(float[] org, int color, float alpha) { ! if (r_numparticles >= Defines.MAX_PARTICLES) ! return; ! ! int i = r_numparticles++; ! ! int c = particle_t.colorTable[color]; ! c |= (int) (alpha * 255) << 24; ! particle_t.colorArray.put(i, c); ! ! i *= 3; ! FloatBuffer vertexBuf = particle_t.vertexArray; ! vertexBuf.put(i, org[0]); ! vertexBuf.put(i + 1, org[1]); ! vertexBuf.put(i + 2, org[2]); ! } ! } \ No newline at end of file Index: DancingQueens.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/DancingQueens.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DancingQueens.java 9 Feb 2005 09:21:10 -0000 1.7 --- DancingQueens.java 11 Jun 2005 19:43:48 -0000 1.8 *************** *** 6,27 **** */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render; --- 6,27 ---- */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render; *************** *** 30,243 **** import jake2.client.*; import jake2.game.Cmd; - import jake2.game.cvar_t; import jake2.qcommon.*; import jake2.sys.IN; import jake2.sys.KBD; import jake2.util.Math3D; - import jake2.util.Vargs; - import java.awt.Dimension; import java.util.Arrays; - /** * DancingQueens ! * * @author cwei */ ! public class DancingQueens ! { ! String[] args; ! ! refexport_t re; ! viddef_t viddef; ! int framecount = 0; ! ! public DancingQueens(String[] args) { ! this.args = args; ! } ! ! public static void main(String[] args) { ! ! DancingQueens test = new DancingQueens(args); ! test.init(); ! test.run(); ! } ! ! KBD kbd; ! ! void init() { ! ! Qcommon.Init(new String[] {"DancingQueens", "+set", "s_initsound", "0", "+set", "vid_ref", "lwjgl"}); ! // sehr wichtig !!! ! VID.Shutdown(); ! ! String[] names = Renderer.getDriverNames(); ! System.out.println("Registered Drivers: " + Arrays.asList(names)); ! ! this.re = Renderer.getDriver("lwjgl"); ! ! System.out.println("Use driver: " + re); ! System.out.println(); ! ! re.Init(0, 0); ! kbd = re.getKeyboardHandler(); ! kbd.Init(); ! ! Cmd.AddCommand("togglemouse", togglemouse); ! Cbuf.AddText("bind t togglemouse"); ! Cbuf.Execute(); ! Globals.cls.key_dest = Defines.key_game; ! Globals.cls.state = Defines.ca_active; ! ! viddef = Globals.viddef; ! fov_y = Math3D.CalcFov(fov_x, viddef.width, viddef.height); ! } ! ! float fps = 0.0f; ! long start = 0; ! ! void updateScreen() ! { ! re.BeginFrame(0.0f); ! ! if (framecount % 500 == 0) ! { ! long time = System.currentTimeMillis(); ! fps = 500000.0f / (time - start); ! start = time; ! } ! String text = fps + " fps"; ! ! testModel(); ! ! drawString(10, viddef.height - 16, text); ! ! re.EndFrame(); ! framecount++; ! } ! ! long startTime; ! ! void run() ! { ! startTime = System.currentTimeMillis(); ! xcommand_t callback = new xcommand_t() { ! public void execute() { ! updateScreen(); ! } ! }; ! while (true) ! { ! re.updateScreen(callback); ! kbd.Update(); ! Cbuf.Execute(); ! } ! } ! ! // =================================================================== ! ! private float yaw = 0; ! private entity_t[] models; ! ! private final static String[] skinNames = { ! "players/female/athena", ! "players/female/lotus", ! "players/female/venus", ! "players/female/voodoo", ! "players/female/cobalt", ! "players/female/lotus", ! "players/female/brianna" ! }; ! ! private float fov_x = 50; ! private float fov_y; ! ! private void testModel() { ! ! refdef_t refdef = new refdef_t(); ! ! refdef.x = 0; ! refdef.y = 0; ! refdef.width = viddef.width; ! refdef.height = viddef.height; ! refdef.fov_x = fov_x; ! refdef.fov_y = fov_y; ! refdef.time = 1.0f * 0.001f; ! ! if (models == null) { ! models = new entity_t[12]; // model count ! entity_t m = null; ! for (int i = 0; i < models.length; i++) ! { ! m = getModel(skinNames[i % skinNames.length]); ! m.origin[0] += 30 * i; ! m.origin[1] += ((i % 4)) * 30 - 20; ! models[i] = m; ! } ! } ! ! ! yaw = time() * 0.1f; ! if (yaw > 360) ! yaw -= 360; ! if (yaw < 0) ! yaw += 360; ! ! for (int i = 0; i < models.length; i++) ! { ! models[i].frame = (time() / 70) % models[i].model.numframes; ! models[i].angles[1] = yaw; ! models[i].origin[0] += KBD.my; ! models[i].origin[1] += KBD.mx; ! ! } ! ! refdef.areabits = null; ! refdef.num_entities = models.length; ! refdef.entities = models; ! ! refdef.lightstyles = null; ! refdef.rdflags = Defines.RDF_NOWORLDMODEL; ! ! re.RenderFrame(refdef); ! } ! ! private entity_t getModel(String name) { ! entity_t entity = new entity_t(); ! String modelName = "players/female/tris.md2"; ! String modelSkin = name +".pcx"; ! ! entity.model = re.RegisterModel(modelName); ! entity.skin = re.RegisterSkin(modelSkin); ! entity.flags = Defines.RF_FULLBRIGHT; ! entity.origin[0] = 80; ! entity.origin[1] = 0; ! entity.origin[2] = 0; ! Math3D.VectorCopy(entity.origin, entity.oldorigin); ! entity.frame = 0; ! entity.oldframe = 0; ! entity.backlerp = 0.0f; ! return entity; ! } ! ! ! private void drawString(int x, int y, String text) ! { ! for (int i = 0; i < text.length(); i++) ! { ! re.DrawChar(x + 8 * i, y, (int) text.charAt(i)); ! } ! } ! ! private final int time() ! { ! return (int) (System.currentTimeMillis() - startTime); ! } ! ! static xcommand_t togglemouse = new xcommand_t() { ! public void execute() { ! IN.toggleMouse(); ! } ! }; } \ No newline at end of file --- 30,228 ---- import jake2.client.*; import jake2.game.Cmd; import jake2.qcommon.*; import jake2.sys.IN; import jake2.sys.KBD; import jake2.util.Math3D; import java.util.Arrays; /** * DancingQueens ! * * @author cwei */ ! public class DancingQueens { ! String[] args; ! ! refexport_t re; ! ! viddef_t viddef; ! ! int framecount = 0; ! ! public DancingQueens(String[] args) { ! this.args = args; ! } ! ! public static void main(String[] args) { ! ! DancingQueens test = new DancingQueens(args); ! test.init(); ! test.run(); ! } ! ! KBD kbd; ! ! void init() { ! ! Qcommon.Init(new String[] { "DancingQueens", "+set", "gl_mode", "5", ! "+set", "vid_fullscreen", "0" }); ! // sehr wichtig !!! ! VID.Shutdown(); ! ! String[] names = Renderer.getDriverNames(); ! System.out.println("Registered Drivers: " + Arrays.asList(names)); ! ! this.re = Renderer.getDriver("fastjogl"); ! ! System.out.println("Use driver: " + re); ! System.out.println(); ! ! re.Init(0, 0); ! kbd = re.getKeyboardHandler(); ! kbd.Init(); ! ! Cmd.AddCommand("togglemouse", togglemouse); ! Cbuf.AddText("bind t togglemouse"); ! Cbuf.Execute(); ! Globals.cls.key_dest = Defines.key_game; ! Globals.cls.state = Defines.ca_active; ! ! viddef = Globals.viddef; ! fov_y = Math3D.CalcFov(fov_x, viddef.width, viddef.height); ! } ! ! float fps = 0.0f; ! ! long start = 0; ! ! void updateScreen() { ! re.BeginFrame(0.0f); ! ! if (framecount % 500 == 0) { ! long time = System.currentTimeMillis(); ! fps = 500000.0f / (time - start); ! start = time; ! } ! String text = ((int)(fps + 0.5f)) + " fps"; ! ! testModel(); ! ! drawString(10, viddef.height - 16, text); ! ! re.EndFrame(); ! framecount++; ! } ! ! long startTime; ! ! void run() { ! startTime = System.currentTimeMillis(); ! xcommand_t callback = new xcommand_t() { ! public void execute() { ! updateScreen(); ! } ! }; ! while (true) { ! re.updateScreen(callback); ! kbd.Update(); ! Cbuf.Execute(); ! } ! } ! ! // =================================================================== ! ! private float yaw = 0; ! ! private entity_t[] models; ! ! private final static String[] skinNames = { "players/female/athena", ! "players/female/lotus", "players/female/venus", ! "players/female/voodoo", "players/female/cobalt", ! "players/female/lotus", "players/female/brianna" }; ! ! private float fov_x = 50; ! ! private float fov_y; ! ! private void testModel() { ! ! refdef_t refdef = new refdef_t(); ! ! refdef.x = 0; ! refdef.y = 0; ! refdef.width = viddef.width; ! refdef.height = viddef.height; ! refdef.fov_x = fov_x; ! refdef.fov_y = fov_y; ! refdef.time = 1.0f * 0.001f; ! ! if (models == null) { ! models = new entity_t[12]; // model count ! entity_t m = null; ! for (int i = 0; i < models.length; i++) { ! m = getModel(skinNames[i % skinNames.length]); ! m.origin[0] += 30 * i; ! m.origin[1] += ((i % 4)) * 30 - 20; ! models[i] = m; ! } ! } ! ! yaw = time() * 0.1f; ! if (yaw > 360) ! yaw -= 360; ! if (yaw < 0) ! yaw += 360; ! ! for (int i = 0; i < models.length; i++) { ! models[i].frame = (time() / 70) % models[i].model.numframes; ! models[i].angles[1] = yaw; ! models[i].origin[0] += KBD.my; ! models[i].origin[1] += KBD.mx; ! ! } ! ! refdef.areabits = null; ! refdef.num_entities = models.length; ! refdef.entities = models; ! ! refdef.lightstyles = null; ! refdef.rdflags = Defines.RDF_NOWORLDMODEL; ! ! re.RenderFrame(refdef); ! } ! ! private entity_t getModel(String name) { ! entity_t entity = new entity_t(); ! String modelName = "players/female/tris.md2"; ! String modelSkin = name + ".pcx"; ! ! entity.model = re.RegisterModel(modelName); ! entity.skin = re.RegisterSkin(modelSkin); ! entity.flags = Defines.RF_FULLBRIGHT; ! entity.origin[0] = 80; ! entity.origin[1] = 0; ! entity.origin[2] = 0; ! Math3D.VectorCopy(entity.origin, entity.oldorigin); ! entity.frame = 0; ! entity.oldframe = 0; ! entity.backlerp = 0.0f; ! return entity; ! } ! ! private void drawString(int x, int y, String text) { ! for (int i = 0; i < text.length(); i++) { ! re.DrawChar(x + 8 * i, y, (int) text.charAt(i)); ! } ! } ! ! private final int time() { ! return (int) (System.currentTimeMillis() - startTime); ! } ! ! static xcommand_t togglemouse = new xcommand_t() { ! public void execute() { ! IN.toggleMouse(); ! } ! }; } \ No newline at end of file |
From: Carsten W. <ca...@us...> - 2005-06-09 08:00:09
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22350/src/jake2/render/fastjogl Modified Files: Mesh.java Log Message: sorry, wrong offset Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Mesh.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Mesh.java 8 Jun 2005 21:27:09 -0000 1.11 --- Mesh.java 9 Jun 2005 07:59:58 -0000 1.12 *************** *** 207,211 **** color.put(j + 1, l * shadelight[1]); color.put(j + 2, l * shadelight[2]); ! color.put(j + 4, alpha); j += 4; } --- 207,211 ---- color.put(j + 1, l * shadelight[1]); color.put(j + 2, l * shadelight[2]); ! color.put(j + 3, alpha); j += 4; } |
From: Carsten W. <ca...@us...> - 2005-06-08 21:27:18
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15958/src/jake2/render/lwjgl Modified Files: Surf.java Mesh.java Log Message: JVM executes this code faster, than the "i++" one. Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Mesh.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Mesh.java 7 May 2005 23:44:37 -0000 1.7 --- Mesh.java 8 Jun 2005 21:27:10 -0000 1.8 *************** *** 87,91 **** { float[] normal; ! int j = -1; for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { --- 87,91 ---- { float[] normal; ! int j = 0; for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { *************** *** 93,104 **** normal = r_avertexnormals[(vv >>> 24 ) & 0xFF]; ovv = ov[i]; ! lerp.put(++j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF) * frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(++j, move[1] + ((ovv >>> 8) & 0xFF) * backv[1] + ((vv >>> 8) & 0xFF) * frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(++j, move[2] + ((ovv >>> 16) & 0xFF) * backv[2] + ((vv >>> 16) & 0xFF) * frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); } } else { ! int j = -1; for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { --- 93,105 ---- normal = r_avertexnormals[(vv >>> 24 ) & 0xFF]; ovv = ov[i]; ! lerp.put(j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF) * frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 1, move[1] + ((ovv >>> 8) & 0xFF) * backv[1] + ((vv >>> 8) & 0xFF) * frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 2, move[2] + ((ovv >>> 16) & 0xFF) * backv[2] + ((vv >>> 16) & 0xFF) * frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); ! j += 3; } } else { ! int j = 0; for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { *************** *** 106,112 **** vv = v[i]; ! lerp.put(++j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF)*frontv[0]); ! lerp.put(++j, move[1] + ((ovv >>> 8) & 0xFF)* backv[1] + ((vv >>> 8) & 0xFF)*frontv[1]); ! lerp.put(++j, move[2] + ((ovv >>> 16) & 0xFF)* backv[2] + ((vv >>> 16) & 0xFF)*frontv[2]); } } --- 107,114 ---- vv = v[i]; ! lerp.put(j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF)*frontv[0]); ! lerp.put(j + 1, move[1] + ((ovv >>> 8) & 0xFF)* backv[1] + ((vv >>> 8) & 0xFF)*frontv[1]); ! lerp.put(j + 2, move[2] + ((ovv >>> 16) & 0xFF)* backv[2] + ((vv >>> 16) & 0xFF)*frontv[2]); ! j += 3; } } *************** *** 192,205 **** // FloatBuffer color = colorArrayBuf; - int j = -1; float l; int size = paliashdr.num_xyz; for (int i = 0; i < size; i++ ) { l = shadedots[(verts[i] >>> 24) & 0xFF]; ! color.put(++j, l * shadelight[0]); ! color.put(++j, l * shadelight[1]); ! color.put(++j, l * shadelight[2]); ! color.put(++j, alpha); } } --- 194,208 ---- // FloatBuffer color = colorArrayBuf; float l; int size = paliashdr.num_xyz; + int j = 0; for (int i = 0; i < size; i++ ) { l = shadedots[(verts[i] >>> 24) & 0xFF]; ! color.put(j, l * shadelight[0]); ! color.put(j + 1, l * shadelight[1]); ! color.put(j + 2, l * shadelight[2]); ! color.put(j + 3, alpha); ! j += 4; } } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Surf.java 1 Feb 2005 16:55:28 -0000 1.8 --- Surf.java 8 Jun 2005 21:27:10 -0000 1.9 *************** *** 941,950 **** vis = Mod_ClusterPVS(r_viewcluster2, r_worldmodel); c = (r_worldmodel.numleafs + 31) >> 5; ! int k = -1; ! for (i=0 ; i<c ; i++) { ! fatvis[++k] |= vis[k]; ! fatvis[++k] |= vis[k]; ! fatvis[++k] |= vis[k]; ! fatvis[++k] |= vis[k]; } --- 941,950 ---- vis = Mod_ClusterPVS(r_viewcluster2, r_worldmodel); c = (r_worldmodel.numleafs + 31) >> 5; ! c <<= 2; ! for (int k=0 ; k<c ; k+=4) { ! fatvis[k] |= vis[k]; ! fatvis[k + 1] |= vis[k + 1]; ! fatvis[k + 2] |= vis[k + 2]; ! fatvis[k + 3] |= vis[k + 3]; } |
From: Carsten W. <ca...@us...> - 2005-06-08 21:27:18
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15958/src/jake2/render/fastjogl Modified Files: Mesh.java Surf.java Log Message: JVM executes this code faster, than the "i++" one. Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Mesh.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Mesh.java 7 May 2005 23:44:38 -0000 1.10 --- Mesh.java 8 Jun 2005 21:27:09 -0000 1.11 *************** *** 82,86 **** | Defines.RF_SHELL_DOUBLE | Defines.RF_SHELL_HALF_DAM)) != 0) { float[] normal; ! int j = -1; for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { --- 82,86 ---- | Defines.RF_SHELL_DOUBLE | Defines.RF_SHELL_HALF_DAM)) != 0) { float[] normal; ! int j = 0; for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { *************** *** 88,105 **** normal = r_avertexnormals[(vv >>> 24 ) & 0xFF]; ovv = ov[i]; ! lerp.put(++j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF) * frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(++j, move[1] + ((ovv >>> 8) & 0xFF) * backv[1] + ((vv >>> 8) & 0xFF) * frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(++j, move[2] + ((ovv >>> 16) & 0xFF) * backv[2] + ((vv >>> 16) & 0xFF) * frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); } } else { ! int j = -1; ! for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { ovv = ov[i]; vv = v[i]; ! lerp.put(++j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF)*frontv[0]); ! lerp.put(++j, move[1] + ((ovv >>> 8) & 0xFF)* backv[1] + ((vv >>> 8) & 0xFF)*frontv[1]); ! lerp.put(++j, move[2] + ((ovv >>> 16) & 0xFF)* backv[2] + ((vv >>> 16) & 0xFF)*frontv[2]); } } --- 88,107 ---- normal = r_avertexnormals[(vv >>> 24 ) & 0xFF]; ovv = ov[i]; ! lerp.put(j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF) * frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 1, move[1] + ((ovv >>> 8) & 0xFF) * backv[1] + ((vv >>> 8) & 0xFF) * frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 2, move[2] + ((ovv >>> 16) & 0xFF) * backv[2] + ((vv >>> 16) & 0xFF) * frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); ! j += 3; } } else { ! int j = 0; ! for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { ovv = ov[i]; vv = v[i]; ! lerp.put(j, move[0] + (ovv & 0xFF)* backv[0] + (vv & 0xFF)*frontv[0]); ! lerp.put(j + 1, move[1] + ((ovv >>> 8) & 0xFF)* backv[1] + ((vv >>> 8) & 0xFF)*frontv[1]); ! lerp.put(j + 2, move[2] + ((ovv >>> 16) & 0xFF)* backv[2] + ((vv >>> 16) & 0xFF)*frontv[2]); ! j +=3; } } *************** *** 202,209 **** for (int i = 0; i < paliashdr.num_xyz; i++) { l = shadedots[(verts[i] >>> 24 ) & 0xFF]; ! color.put(j++, l * shadelight[0]); ! color.put(j++, l * shadelight[1]); ! color.put(j++, l * shadelight[2]); ! color.put(j++, alpha); } } --- 204,212 ---- for (int i = 0; i < paliashdr.num_xyz; i++) { l = shadedots[(verts[i] >>> 24 ) & 0xFF]; ! color.put(j, l * shadelight[0]); ! color.put(j + 1, l * shadelight[1]); ! color.put(j + 2, l * shadelight[2]); ! color.put(j + 4, alpha); ! j += 4; } } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Surf.java 17 Jan 2005 23:50:50 -0000 1.9 --- Surf.java 8 Jun 2005 21:27:09 -0000 1.10 *************** *** 925,937 **** System .arraycopy(vis, 0, fatvis, 0, ! (r_worldmodel.numleafs + 7) / 8); vis = Mod_ClusterPVS(r_viewcluster2, r_worldmodel); ! c = (r_worldmodel.numleafs + 31) / 32; ! int k = 0; ! for (i = 0; i < c; i++) { ! fatvis[k] |= vis[k++]; ! fatvis[k] |= vis[k++]; ! fatvis[k] |= vis[k++]; ! fatvis[k] |= vis[k++]; } --- 925,937 ---- System .arraycopy(vis, 0, fatvis, 0, ! (r_worldmodel.numleafs + 7) >> 3); vis = Mod_ClusterPVS(r_viewcluster2, r_worldmodel); ! c = (r_worldmodel.numleafs + 31) >> 5; ! c <<= 2; ! for (int k = 0; k < c; k+=4) { ! fatvis[k] |= vis[k]; ! fatvis[k + 1] |= vis[k + 1]; ! fatvis[k + 2] |= vis[k + 2]; ! fatvis[k + 3] |= vis[k + 3]; } |
From: Carsten W. <ca...@us...> - 2005-06-08 21:25:04
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14609/src/jake2/render/lwjgl Modified Files: Base.java Log Message: code cleanup Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Base.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Base.java 16 Dec 2004 19:53:41 -0000 1.3 --- Base.java 8 Jun 2005 21:24:52 -0000 1.4 *************** *** 6,295 **** */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render.lwjgl; - import org.lwjgl.opengl.GL11; /** * Base ! * * @author dsanders/cwei */ public abstract class Base extends LWJGLBase { ! ! static final int GL_COLOR_INDEX8_EXT = GL11.GL_COLOR_INDEX; ! static final String REF_VERSION = "GL 0.01"; ! ! // up / down ! static final int PITCH = 0; ! // left / right ! static final int YAW = 1; ! // fall over ! static final int ROLL = 2; ! ! /* ! skins will be outline flood filled and mip mapped ! pics and sprites with alpha will be outline flood filled ! pic won't be mip mapped ! ! model skin ! sprite frame ! wall texture ! pic ! */ ! // enum imagetype_t ! static final int it_skin = 0; ! static final int it_sprite = 1; ! static final int it_wall = 2; ! static final int it_pic = 3; ! static final int it_sky = 4; ! ! // enum modtype_t ! static final int mod_bad = 0; ! static final int mod_brush = 1; ! static final int mod_sprite = 2; ! static final int mod_alias = 3; ! ! static final int TEXNUM_LIGHTMAPS = 1024; ! static final int TEXNUM_SCRAPS = 1152; ! static final int TEXNUM_IMAGES = 1153; ! ! static final int MAX_GLTEXTURES = 1024; ! ! // =================================================================== ! ! // ! // #include "gl_model.h" ! // ! // void GL_BeginRendering (int *x, int *y, int *width, int *height); ! // void GL_EndRendering (void); ! // ! // void GL_SetDefaultState( void ); ! // void GL_UpdateSwapInterval( void ); ! ! static class glvert_t { ! float x, y, z; ! float s, t; ! float r, g, b; ! } ! ! static final int MAX_LBM_HEIGHT = 480; ! ! static final float BACKFACE_EPSILON = 0.01f; ! ! // ==================================================== ! // ! // void R_TranslatePlayerSkin (int playernum); ! // void GL_Bind (int texnum); ! // void GL_MBind( GLenum target, int texnum ); ! // void GL_TexEnv( GLenum value ); ! // void GL_EnableMultitexture( qboolean enable ); ! // void GL_SelectTexture( GLenum ); ! // ! // void R_LightPoint (vec3_t p, vec3_t color); ! // void R_PushDlights (void); ! // ! ! // ==================================================================== ! // ! // extern int registration_sequence; ! // ! // ! // void V_AddBlend (float r, float g, float b, float a, float *v_blend); ! // ! // int R_Init( void *hinstance, void *hWnd ); ! // void R_Shutdown( void ); ! // ! // void R_RenderView (refdef_t *fd); ! // void GL_ScreenShot_f (void); ! // void R_DrawAliasModel (entity_t *e); ! // void R_DrawBrushModel (entity_t *e); ! // void R_DrawSpriteModel (entity_t *e); ! // void R_DrawBeam( entity_t *e ); ! // void R_DrawWorld (void); ! // void R_RenderDlights (void); ! // void R_DrawAlphaSurfaces (void); ! // void R_RenderBrushPoly (msurface_t *fa); ! // void R_InitParticleTexture (void); ! // void Draw_InitLocal (void); ! // void GL_SubdivideSurface (msurface_t *fa); ! // qboolean R_CullBox (vec3_t mins, vec3_t maxs); ! // void R_RotateForEntity (entity_t *e); ! // void R_MarkLeaves (void); ! // ! // glpoly_t *WaterWarpPolyVerts (glpoly_t *p); ! // void EmitWaterPolys (msurface_t *fa); ! // void R_AddSkySurface (msurface_t *fa); ! // void R_ClearSkyBox (void); ! // void R_DrawSkyBox (void); ! // void R_MarkLights (dlight_t *light, int bit, mnode_t *node); ! // ! // ! // void COM_StripExtension (char *in, char *out); ! // ! // void Draw_GetPicSize (int *w, int *h, char *name); ! // void Draw_Pic (int x, int y, char *name); ! // void Draw_StretchPic (int x, int y, int w, int h, char *name); ! // void Draw_Char (int x, int y, int c); ! // void Draw_TileClear (int x, int y, int w, int h, char *name); ! // void Draw_Fill (int x, int y, int w, int h, int c); ! // void Draw_FadeScreen (void); ! // void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data); ! // ! // void R_BeginFrame( float camera_separation ); ! // void R_SwapBuffers( int ); ! // void R_SetPalette ( const unsigned char *palette); ! // ! // int Draw_GetPalette (void); ! // ! // void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight); ! // ! // struct image_s *R_RegisterSkin (char *name); ! // ! // void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height); ! // image_t *GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits); ! // image_t *GL_FindImage (char *name, imagetype_t type); ! // void GL_TextureMode( char *string ); ! // void GL_ImageList_f (void); ! // ! // void GL_SetTexturePalette( unsigned palette[256] ); ! // ! // void GL_InitImages (void); ! // void GL_ShutdownImages (void); ! // ! // void GL_FreeUnusedImages (void); ! // ! // void GL_TextureAlphaMode( char *string ); ! // void GL_TextureSolidMode( char *string ); ! // ! // /* ! // ** GL extension emulation functions ! // */ ! // void GL_DrawParticles( int n, const particle_t particles[], const unsigned colortable[768] ); ! // ! ! /* ! ** GL config stuff ! */ ! static final int GL_RENDERER_VOODOO = 0x00000001; ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! static final int GL_RENDERER_3DFX = 0x0000000F; ! ! static final int GL_RENDERER_PCX1 = 0x00000010; ! static final int GL_RENDERER_PCX2 = 0x00000020; ! static final int GL_RENDERER_PMX = 0x00000040; ! static final int GL_RENDERER_POWERVR = 0x00000070; ! ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! ! static final int GL_RENDERER_REALIZM = 0x00001000; ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! ! static final int GL_RENDERER_3DPRO = 0x00004000; ! static final int GL_RENDERER_REAL3D = 0x00008000; ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! static final int GL_RENDERER_DYPIC = 0x00020000; ! ! static final int GL_RENDERER_V1000 = 0x00040000; ! static final int GL_RENDERER_V2100 = 0x00080000; ! static final int GL_RENDERER_V2200 = 0x00100000; ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! ! static final int GL_RENDERER_O2 = 0x00100000; ! static final int GL_RENDERER_IMPACT = 0x00200000; ! static final int GL_RENDERER_RE = 0x00400000; ! static final int GL_RENDERER_IR = 0x00800000; ! static final int GL_RENDERER_SGI = 0x00F00000; ! ! static final int GL_RENDERER_MCD = 0x01000000; ! static final int GL_RENDERER_OTHER = 0x80000000; ! ! ! // typedef struct ! // { ! // int renderer; ! // const char *renderer_string; ! // const char *vendor_string; ! // const char *version_string; ! // const char *extensions_string; ! // ! // qboolean allow_cds; ! // } glconfig_t; ! // ! // typedef struct ! // { ! // float inverse_intensity; ! // qboolean fullscreen; ! // ! // int prev_mode; ! // ! // unsigned char *d_16to8table; ! // ! // int lightmap_textures; ! // ! // int currenttextures[2]; ! // int currenttmu; ! // ! // float camera_separation; ! // qboolean stereo_enabled; ! // ! // unsigned char originalRedGammaTable[256]; ! // unsigned char originalGreenGammaTable[256]; ! // unsigned char originalBlueGammaTable[256]; ! // } glstate_t; ! // ! // /* ! // ==================================================================== ! // ! // IMPORTED FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // extern refimport_t ri; ! // ! // ! // /* ! // ==================================================================== ! // ! // IMPLEMENTATION SPECIFIC FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // void GLimp_BeginFrame( float camera_separation ); ! // void GLimp_EndFrame( void ); ! // int GLimp_Init( void *hinstance, void *hWnd ); ! // void GLimp_Shutdown( void ); ! // int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen ); ! // void GLimp_AppActivate( qboolean active ); ! // void GLimp_EnableLogging( qboolean enable ); ! // void GLimp_LogNewFrame( void ); ! // ! ! } --- 6,154 ---- */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render.lwjgl; import org.lwjgl.opengl.GL11; /** * Base ! * * @author dsanders/cwei */ public abstract class Base extends LWJGLBase { ! ! static final int GL_COLOR_INDEX8_EXT = GL11.GL_COLOR_INDEX; ! ! static final String REF_VERSION = "GL 0.01"; ! ! // up / down ! static final int PITCH = 0; ! ! // left / right ! static final int YAW = 1; ! ! // fall over ! static final int ROLL = 2; ! ! /* ! * skins will be outline flood filled and mip mapped pics and sprites with ! * alpha will be outline flood filled pic won't be mip mapped ! * ! * model skin sprite frame wall texture pic ! */ ! // enum imagetype_t ! static final int it_skin = 0; ! ! static final int it_sprite = 1; ! ! static final int it_wall = 2; ! ! static final int it_pic = 3; ! ! static final int it_sky = 4; ! ! // enum modtype_t ! static final int mod_bad = 0; ! ! static final int mod_brush = 1; ! ! static final int mod_sprite = 2; ! ! static final int mod_alias = 3; ! ! static final int TEXNUM_LIGHTMAPS = 1024; ! ! static final int TEXNUM_SCRAPS = 1152; ! ! static final int TEXNUM_IMAGES = 1153; ! ! static final int MAX_GLTEXTURES = 1024; ! ! static final int MAX_LBM_HEIGHT = 480; ! ! static final float BACKFACE_EPSILON = 0.01f; ! ! /* ! * * GL config stuff ! */ ! static final int GL_RENDERER_VOODOO = 0x00000001; ! ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! ! static final int GL_RENDERER_3DFX = 0x0000000F; ! ! static final int GL_RENDERER_PCX1 = 0x00000010; ! ! static final int GL_RENDERER_PCX2 = 0x00000020; ! ! static final int GL_RENDERER_PMX = 0x00000040; ! ! static final int GL_RENDERER_POWERVR = 0x00000070; ! ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! ! static final int GL_RENDERER_REALIZM = 0x00001000; ! ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! ! static final int GL_RENDERER_3DPRO = 0x00004000; ! ! static final int GL_RENDERER_REAL3D = 0x00008000; ! ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! ! static final int GL_RENDERER_DYPIC = 0x00020000; ! ! static final int GL_RENDERER_V1000 = 0x00040000; ! ! static final int GL_RENDERER_V2100 = 0x00080000; ! ! static final int GL_RENDERER_V2200 = 0x00100000; ! ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! ! static final int GL_RENDERER_O2 = 0x00100000; ! ! static final int GL_RENDERER_IMPACT = 0x00200000; ! ! static final int GL_RENDERER_RE = 0x00400000; ! ! static final int GL_RENDERER_IR = 0x00800000; ! ! static final int GL_RENDERER_SGI = 0x00F00000; ! ! static final int GL_RENDERER_MCD = 0x01000000; ! ! static final int GL_RENDERER_OTHER = 0x80000000; ! } \ No newline at end of file |
From: Carsten W. <ca...@us...> - 2005-06-08 20:43:22
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25317/src/jake2/render/fastjogl Modified Files: Base.java Log Message: code cleanup Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Base.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Base.java 15 Jul 2004 14:37:33 -0000 1.2 --- Base.java 8 Jun 2005 20:43:07 -0000 1.3 *************** *** 6,27 **** */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render.fastjogl; --- 6,27 ---- */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ package jake2.render.fastjogl; *************** *** 31,295 **** /** * Base ! * * @author cwei */ public abstract class Base extends JoglBase { ! ! static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; ! static final String REF_VERSION = "GL 0.01"; ! ! // up / down ! static final int PITCH = 0; ! // left / right ! static final int YAW = 1; ! // fall over ! static final int ROLL = 2; ! ! /* ! skins will be outline flood filled and mip mapped ! pics and sprites with alpha will be outline flood filled ! pic won't be mip mapped ! ! model skin ! sprite frame ! wall texture ! pic ! */ ! // enum imagetype_t ! static final int it_skin = 0; ! static final int it_sprite = 1; ! static final int it_wall = 2; ! static final int it_pic = 3; ! static final int it_sky = 4; ! ! // enum modtype_t ! static final int mod_bad = 0; ! static final int mod_brush = 1; ! static final int mod_sprite = 2; ! static final int mod_alias = 3; ! ! static final int TEXNUM_LIGHTMAPS = 1024; ! static final int TEXNUM_SCRAPS = 1152; ! static final int TEXNUM_IMAGES = 1153; ! ! static final int MAX_GLTEXTURES = 1024; ! ! // =================================================================== ! ! // ! // #include "gl_model.h" ! // ! // void GL_BeginRendering (int *x, int *y, int *width, int *height); ! // void GL_EndRendering (void); ! // ! // void GL_SetDefaultState( void ); ! // void GL_UpdateSwapInterval( void ); ! ! static class glvert_t { ! float x, y, z; ! float s, t; ! float r, g, b; ! } ! ! static final int MAX_LBM_HEIGHT = 480; ! ! static final float BACKFACE_EPSILON = 0.01f; ! ! // ==================================================== ! // ! // void R_TranslatePlayerSkin (int playernum); ! // void GL_Bind (int texnum); ! // void GL_MBind( GLenum target, int texnum ); ! // void GL_TexEnv( GLenum value ); ! // void GL_EnableMultitexture( qboolean enable ); ! // void GL_SelectTexture( GLenum ); ! // ! // void R_LightPoint (vec3_t p, vec3_t color); ! // void R_PushDlights (void); ! // ! ! // ==================================================================== ! // ! // extern int registration_sequence; ! // ! // ! // void V_AddBlend (float r, float g, float b, float a, float *v_blend); ! // ! // int R_Init( void *hinstance, void *hWnd ); ! // void R_Shutdown( void ); ! // ! // void R_RenderView (refdef_t *fd); ! // void GL_ScreenShot_f (void); ! // void R_DrawAliasModel (entity_t *e); ! // void R_DrawBrushModel (entity_t *e); ! // void R_DrawSpriteModel (entity_t *e); ! // void R_DrawBeam( entity_t *e ); ! // void R_DrawWorld (void); ! // void R_RenderDlights (void); ! // void R_DrawAlphaSurfaces (void); ! // void R_RenderBrushPoly (msurface_t *fa); ! // void R_InitParticleTexture (void); ! // void Draw_InitLocal (void); ! // void GL_SubdivideSurface (msurface_t *fa); ! // qboolean R_CullBox (vec3_t mins, vec3_t maxs); ! // void R_RotateForEntity (entity_t *e); ! // void R_MarkLeaves (void); ! // ! // glpoly_t *WaterWarpPolyVerts (glpoly_t *p); ! // void EmitWaterPolys (msurface_t *fa); ! // void R_AddSkySurface (msurface_t *fa); ! // void R_ClearSkyBox (void); ! // void R_DrawSkyBox (void); ! // void R_MarkLights (dlight_t *light, int bit, mnode_t *node); ! // ! // ! // void COM_StripExtension (char *in, char *out); ! // ! // void Draw_GetPicSize (int *w, int *h, char *name); ! // void Draw_Pic (int x, int y, char *name); ! // void Draw_StretchPic (int x, int y, int w, int h, char *name); ! // void Draw_Char (int x, int y, int c); ! // void Draw_TileClear (int x, int y, int w, int h, char *name); ! // void Draw_Fill (int x, int y, int w, int h, int c); ! // void Draw_FadeScreen (void); ! // void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data); ! // ! // void R_BeginFrame( float camera_separation ); ! // void R_SwapBuffers( int ); ! // void R_SetPalette ( const unsigned char *palette); ! // ! // int Draw_GetPalette (void); ! // ! // void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight); ! // ! // struct image_s *R_RegisterSkin (char *name); ! // ! // void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height); ! // image_t *GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits); ! // image_t *GL_FindImage (char *name, imagetype_t type); ! // void GL_TextureMode( char *string ); ! // void GL_ImageList_f (void); ! // ! // void GL_SetTexturePalette( unsigned palette[256] ); ! // ! // void GL_InitImages (void); ! // void GL_ShutdownImages (void); ! // ! // void GL_FreeUnusedImages (void); ! // ! // void GL_TextureAlphaMode( char *string ); ! // void GL_TextureSolidMode( char *string ); ! // ! // /* ! // ** GL extension emulation functions ! // */ ! // void GL_DrawParticles( int n, const particle_t particles[], const unsigned colortable[768] ); ! // ! ! /* ! ** GL config stuff ! */ ! static final int GL_RENDERER_VOODOO = 0x00000001; ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! static final int GL_RENDERER_3DFX = 0x0000000F; ! ! static final int GL_RENDERER_PCX1 = 0x00000010; ! static final int GL_RENDERER_PCX2 = 0x00000020; ! static final int GL_RENDERER_PMX = 0x00000040; ! static final int GL_RENDERER_POWERVR = 0x00000070; ! ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! ! static final int GL_RENDERER_REALIZM = 0x00001000; ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! ! static final int GL_RENDERER_3DPRO = 0x00004000; ! static final int GL_RENDERER_REAL3D = 0x00008000; ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! static final int GL_RENDERER_DYPIC = 0x00020000; ! ! static final int GL_RENDERER_V1000 = 0x00040000; ! static final int GL_RENDERER_V2100 = 0x00080000; ! static final int GL_RENDERER_V2200 = 0x00100000; ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! ! static final int GL_RENDERER_O2 = 0x00100000; ! static final int GL_RENDERER_IMPACT = 0x00200000; ! static final int GL_RENDERER_RE = 0x00400000; ! static final int GL_RENDERER_IR = 0x00800000; ! static final int GL_RENDERER_SGI = 0x00F00000; ! ! static final int GL_RENDERER_MCD = 0x01000000; ! static final int GL_RENDERER_OTHER = 0x80000000; ! ! ! // typedef struct ! // { ! // int renderer; ! // const char *renderer_string; ! // const char *vendor_string; ! // const char *version_string; ! // const char *extensions_string; ! // ! // qboolean allow_cds; ! // } glconfig_t; ! // ! // typedef struct ! // { ! // float inverse_intensity; ! // qboolean fullscreen; ! // ! // int prev_mode; ! // ! // unsigned char *d_16to8table; ! // ! // int lightmap_textures; ! // ! // int currenttextures[2]; ! // int currenttmu; ! // ! // float camera_separation; ! // qboolean stereo_enabled; ! // ! // unsigned char originalRedGammaTable[256]; ! // unsigned char originalGreenGammaTable[256]; ! // unsigned char originalBlueGammaTable[256]; ! // } glstate_t; ! // ! // /* ! // ==================================================================== ! // ! // IMPORTED FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // extern refimport_t ri; ! // ! // ! // /* ! // ==================================================================== ! // ! // IMPLEMENTATION SPECIFIC FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // void GLimp_BeginFrame( float camera_separation ); ! // void GLimp_EndFrame( void ); ! // int GLimp_Init( void *hinstance, void *hWnd ); ! // void GLimp_Shutdown( void ); ! // int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen ); ! // void GLimp_AppActivate( qboolean active ); ! // void GLimp_EnableLogging( qboolean enable ); ! // void GLimp_LogNewFrame( void ); ! // ! ! } --- 31,155 ---- /** * Base ! * * @author cwei */ public abstract class Base extends JoglBase { ! ! static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; ! ! static final String REF_VERSION = "GL 0.01"; ! ! // up / down ! static final int PITCH = 0; ! ! // left / right ! static final int YAW = 1; ! ! // fall over ! static final int ROLL = 2; ! ! /* ! * skins will be outline flood filled and mip mapped pics and sprites with ! * alpha will be outline flood filled pic won't be mip mapped ! * ! * model skin sprite frame wall texture pic ! */ ! // enum imagetype_t ! static final int it_skin = 0; ! ! static final int it_sprite = 1; ! ! static final int it_wall = 2; ! ! static final int it_pic = 3; ! ! static final int it_sky = 4; ! ! // enum modtype_t ! static final int mod_bad = 0; ! ! static final int mod_brush = 1; ! ! static final int mod_sprite = 2; ! ! static final int mod_alias = 3; ! ! static final int TEXNUM_LIGHTMAPS = 1024; ! ! static final int TEXNUM_SCRAPS = 1152; ! ! static final int TEXNUM_IMAGES = 1153; ! ! static final int MAX_GLTEXTURES = 1024; ! ! static final int MAX_LBM_HEIGHT = 480; ! ! static final float BACKFACE_EPSILON = 0.01f; ! ! /* ! * * GL config stuff ! */ ! static final int GL_RENDERER_VOODOO = 0x00000001; ! ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! ! static final int GL_RENDERER_3DFX = 0x0000000F; ! ! static final int GL_RENDERER_PCX1 = 0x00000010; ! ! static final int GL_RENDERER_PCX2 = 0x00000020; ! ! static final int GL_RENDERER_PMX = 0x00000040; ! ! static final int GL_RENDERER_POWERVR = 0x00000070; ! ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! ! static final int GL_RENDERER_REALIZM = 0x00001000; ! ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! ! static final int GL_RENDERER_3DPRO = 0x00004000; ! ! static final int GL_RENDERER_REAL3D = 0x00008000; ! ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! ! static final int GL_RENDERER_DYPIC = 0x00020000; ! ! static final int GL_RENDERER_V1000 = 0x00040000; ! ! static final int GL_RENDERER_V2100 = 0x00080000; ! ! static final int GL_RENDERER_V2200 = 0x00100000; ! ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! ! static final int GL_RENDERER_O2 = 0x00100000; ! ! static final int GL_RENDERER_IMPACT = 0x00200000; ! ! static final int GL_RENDERER_RE = 0x00400000; ! ! static final int GL_RENDERER_IR = 0x00800000; ! ! static final int GL_RENDERER_SGI = 0x00F00000; ! ! static final int GL_RENDERER_MCD = 0x01000000; ! ! static final int GL_RENDERER_OTHER = 0x80000000; ! } \ No newline at end of file |
From: Holger Z. <hz...@us...> - 2005-06-07 12:57:50
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19653/src/jake2/client Modified Files: CL.java Key.java CL_input.java Log Message: replace Integer.parseInt() to prevent exceptions Index: Key.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Key.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Key.java 7 Jun 2005 08:43:11 -0000 1.10 --- Key.java 7 Jun 2005 12:57:21 -0000 1.11 *************** *** 288,292 **** * Called by the system between frames for both key up and key down events. */ ! public static void Event(int key, boolean down, long time) { String kb; String cmd; --- 288,292 ---- * Called by the system between frames for both key up and key down events. */ ! public static void Event(int key, boolean down, int time) { String kb; String cmd; Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CL.java 14 May 2005 10:10:44 -0000 1.21 --- CL.java 7 Jun 2005 12:57:21 -0000 1.22 *************** *** 852,856 **** // challenge from the server we are connecting to if (c.equals("challenge")) { ! Globals.cls.challenge = Integer.parseInt(Cmd.Argv(1)); SendConnectPacket(); return; --- 852,856 ---- // challenge from the server we are connecting to if (c.equals("challenge")) { ! Globals.cls.challenge = Lib.atoi(Cmd.Argv(1)); SendConnectPacket(); return; Index: CL_input.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_input.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CL_input.java 21 Jan 2005 01:10:09 -0000 1.5 --- CL_input.java 7 Jun 2005 12:57:21 -0000 1.6 *************** *** 33,36 **** --- 33,37 ---- import jake2.qcommon.*; import jake2.sys.IN; + import jake2.util.Lib; import jake2.util.Math3D; *************** *** 110,114 **** c = Cmd.Argv(1); if (c.length() > 0) ! k = Integer.parseInt(c); else k = -1; // typed manually at the console for continuous down --- 111,115 ---- c = Cmd.Argv(1); if (c.length() > 0) ! k = Lib.atoi(c); else k = -1; // typed manually at the console for continuous down *************** *** 131,135 **** // save timestamp c = Cmd.Argv(2); ! b.downtime = Long.parseLong(c); if (b.downtime == 0) b.downtime = Globals.sys_frame_time - 100; --- 132,136 ---- // save timestamp c = Cmd.Argv(2); ! b.downtime = Lib.atoi(c); if (b.downtime == 0) b.downtime = Globals.sys_frame_time - 100; *************** *** 145,149 **** c = Cmd.Argv(1); if (c.length() > 0) ! k = Integer.parseInt(c); else { // typed manually at the console, assume for unsticking, so clear --- 146,150 ---- c = Cmd.Argv(1); if (c.length() > 0) ! k = Lib.atoi(c); else { // typed manually at the console, assume for unsticking, so clear *************** *** 299,303 **** static void IN_Impulse() { ! in_impulse = Integer.parseInt(Cmd.Argv(1)); } --- 300,304 ---- static void IN_Impulse() { ! in_impulse = Lib.atoi(Cmd.Argv(1)); } |
From: Holger Z. <hz...@us...> - 2005-06-07 08:50:20
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17187 Modified Files: build.xml Log Message: disable proguard Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** build.xml 26 May 2005 16:56:31 -0000 1.25 --- build.xml 7 Jun 2005 08:50:12 -0000 1.26 *************** *** 139,148 **** <!-- jar --> <target name="jar" depends="compile,copyres"> ! <jar destfile="jake2.jar" basedir="${build}"> <include name="jake2/**"/> <include name="*.png"/> <include name="mirrors"/> </jar> ! <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> <injar name="jake2.jar"/> --- 139,148 ---- <!-- jar --> <target name="jar" depends="compile,copyres"> ! <jar destfile="${dist}/lib/jake2.jar" basedir="${build}"> <include name="jake2/**"/> <include name="*.png"/> <include name="mirrors"/> </jar> ! <!-- proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> <injar name="jake2.jar"/> *************** *** 153,157 **** <method name="main(java.lang.String[])"/> </keep> ! </proguard> </target> --- 153,157 ---- <method name="main(java.lang.String[])"/> </keep> ! </proguard --> </target> *************** *** 237,246 **** <fileset dir="${dist}/lib"> <include name="**/*.jar"/> - <exclude name="jake2.jar"/> <exclude name="jogl.jar"/> </fileset> <fileset dir="."> <include name="patch.jar"/> - <include name="jake2.jar"/> </fileset> </copy> --- 237,244 ---- |
From: Holger Z. <hz...@us...> - 2005-06-07 08:43:54
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14136/src/jake2/sys Modified Files: LWJGLKBD.java Log Message: simulate keyboard repeats Index: LWJGLKBD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/LWJGLKBD.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** LWJGLKBD.java 20 Feb 2005 13:55:26 -0000 1.8 --- LWJGLKBD.java 7 Jun 2005 08:43:43 -0000 1.9 *************** *** 2,5 **** --- 2,6 ---- import jake2.Defines; + import jake2.Globals; import jake2.client.Key; import jake2.qcommon.Cbuf; *************** *** 15,18 **** --- 16,20 ---- private char[] lwjglKeycodeMap = null; + private int pressed[] = null; private boolean mouseHasTwoButtons = false; *************** *** 30,36 **** --- 32,40 ---- if (lwjglKeycodeMap == null) lwjglKeycodeMap = new char[256]; + if (pressed == null) pressed = new int[256]; mouseHasTwoButtons = (Mouse.getButtonCount() == 2); + lastRepeat = Sys.Milliseconds(); } catch (Exception e) {;} } *************** *** 46,49 **** --- 50,54 ---- // free the memory for GC lwjglKeycodeMap = null; + pressed = null; } *************** *** 66,74 **** // this is needed because the getEventCharacter() returns \0 if a key is released // keycode is correct but the charachter value is not ! if (down) lwjglKeycodeMap[key] = ch; ! Do_Key_Event(XLateKey(key,ch), down); } if (IN.mouse_active) { --- 71,86 ---- // this is needed because the getEventCharacter() returns \0 if a key is released // keycode is correct but the charachter value is not ! if (down) { ! lwjglKeycodeMap[key] = ch; ! pressed[key] = Globals.sys_frame_time; ! } else { ! pressed[key] = 0; ! } ! Do_Key_Event(XLateKey(key,ch), down); } + generateRepeats(); + if (IN.mouse_active) { *************** *** 99,102 **** --- 111,126 ---- } + private static int lastRepeat; + private void generateRepeats() { + int time = Globals.sys_frame_time; + if (time - lastRepeat > 50) { + for (int i = 0; i < pressed.length; i++) { + if (pressed[i] > 0 && time - pressed[i] > 500) + Do_Key_Event(XLateKey(i, lwjglKeycodeMap[i]), true); + } + lastRepeat = time; + } + } + private int XLateKey(int code, int ch) { |
From: Holger Z. <hz...@us...> - 2005-06-07 08:43:20
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13845/src/jake2/client Modified Files: Key.java Log Message: handling of keyboard repeats depends now on game state Index: Key.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Key.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Key.java 6 Jun 2005 18:22:20 -0000 1.9 --- Key.java 7 Jun 2005 08:43:11 -0000 1.10 *************** *** 302,312 **** if (down) { key_repeats[key]++; ! if (key != K_BACKSPACE ! && key != K_PAUSE ! && key != K_PGUP ! && key != K_KP_PGUP ! && key != K_PGDN ! && key != K_KP_PGDN ! && key_repeats[key] > 1) return; // ignore most autorepeats --- 302,308 ---- if (down) { key_repeats[key]++; ! if (key_repeats[key] > 1 ! && Globals.cls.key_dest == Defines.key_game ! && !(Globals.cls.state == Defines.ca_disconnected)) return; // ignore most autorepeats |
From: Holger Z. <hz...@us...> - 2005-06-06 18:22:58
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26525/src/jake2/sys Modified Files: InputListener.java Log Message: handle characters with AltGr properly Index: InputListener.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/InputListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InputListener.java 6 Jun 2005 13:30:37 -0000 1.5 --- InputListener.java 6 Jun 2005 18:22:20 -0000 1.6 *************** *** 53,57 **** public void keyPressed(KeyEvent e) { ! addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); } --- 53,59 ---- public void keyPressed(KeyEvent e) { ! if (!((e.getModifiersEx() & InputEvent.ALT_GRAPH_DOWN_MASK) != 0)) { ! addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); ! } } *************** *** 63,66 **** --- 65,69 ---- if ((e.getModifiersEx() & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); + addEvent(new Jake2InputEvent(Jake2InputEvent.KeyRelease, e)); } } |
From: Holger Z. <hz...@us...> - 2005-06-06 18:22:32
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26525/src/jake2/client Modified Files: Key.java Log Message: handle characters with AltGr properly Index: Key.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Key.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Key.java 6 Jun 2005 13:30:40 -0000 1.8 --- Key.java 6 Jun 2005 18:22:20 -0000 1.9 *************** *** 425,433 **** case Defines.key_message : Key.Message(key); - key_repeats[key] = 0; break; case Defines.key_menu : Menu.Keydown(key); - key_repeats[key] = 0; break; --- 425,431 ---- *************** *** 435,439 **** case Defines.key_console : Key.Console(key); - key_repeats[key] = 0; break; default : --- 433,436 ---- |
From: Holger Z. <hz...@us...> - 2005-06-06 13:32:16
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11858/src/jake2/sys Modified Files: JOGLKBD.java Log Message: handle keys with AltGr properly Index: JOGLKBD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/JOGLKBD.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** JOGLKBD.java 6 Jun 2005 13:30:38 -0000 1.6 --- JOGLKBD.java 6 Jun 2005 13:32:06 -0000 1.7 *************** *** 198,206 **** default: ! // if ((ev.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK)) != 0) { ! // key = ev.getKeyCode(); ! // } else { ! key = ev.getKeyChar(); ! // } if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; --- 198,203 ---- default: ! key = ev.getKeyChar(); ! if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; |
From: Holger Z. <hz...@us...> - 2005-06-06 13:31:33
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11288/src/jake2/sys Modified Files: InputListener.java JOGLKBD.java Log Message: handle keys with AltGr properly Index: InputListener.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/InputListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InputListener.java 14 Dec 2004 00:11:01 -0000 1.4 --- InputListener.java 6 Jun 2005 13:30:37 -0000 1.5 *************** *** 61,64 **** --- 61,67 ---- public void keyTyped(KeyEvent e) { + if ((e.getModifiersEx() & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { + addEvent(new Jake2InputEvent(Jake2InputEvent.KeyPress, e)); + } } Index: JOGLKBD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/JOGLKBD.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JOGLKBD.java 20 Feb 2005 14:39:23 -0000 1.5 --- JOGLKBD.java 6 Jun 2005 13:30:38 -0000 1.6 *************** *** 198,206 **** default: ! if ((ev.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK)) != 0) { ! key = ev.getKeyCode(); ! } else { key = ev.getKeyChar(); ! } if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; --- 198,206 ---- default: ! // if ((ev.getModifiers() & (InputEvent.ALT_MASK | InputEvent.CTRL_MASK)) != 0) { ! // key = ev.getKeyCode(); ! // } else { key = ev.getKeyChar(); ! // } if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; |