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...> - 2004-07-13 11:20:37
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17083/src/jake2/sound Modified Files: sfx_t.java Log Message: experimental EAX2.0 support (today only win32 is supported) Index: sfx_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/sfx_t.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sfx_t.java 8 Jul 2004 20:56:49 -0000 1.1 --- sfx_t.java 13 Jul 2004 11:20:27 -0000 1.2 *************** *** 29,41 **** package jake2.sound; - public class sfx_t { ! public String name; //mem public int registration_sequence; ! public sfxcache_t cache; //ptr ! public String truename; //ptr ! // cwei ! public int id = -1; public void clear() { --- 29,40 ---- package jake2.sound; public class sfx_t { ! public String name; public int registration_sequence; ! public sfxcache_t cache; ! public String truename; ! // is used for AL buffers ! public int bufferId = -1; public void clear() { *************** *** 43,49 **** cache = null; registration_sequence = 0; ! ! // cwei ! id = -1; } } --- 42,46 ---- cache = null; registration_sequence = 0; ! bufferId = -1; } } |
From: Holger Z. <hz...@us...> - 2004-07-13 11:10:05
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15525/src/jake2/client Modified Files: CL_fx.java Log Message: small optimizations Index: CL_fx.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_fx.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CL_fx.java 8 Jul 2004 20:56:50 -0000 1.4 --- CL_fx.java 13 Jul 2004 11:09:55 -0000 1.5 *************** *** 46,54 **** float radius; float die; // stop lighting after this time ! float decay; // drop this each second float minlight; // don't add when contributing less void clear() { ! radius = ! decay = die = minlight = color[0] = color[1] = color[2] = origin[0] = origin[1] = origin[2] = key = 0; } } --- 46,53 ---- float radius; float die; // stop lighting after this time ! //float decay; // drop this each second float minlight; // don't add when contributing less void clear() { ! radius = minlight = color[0] = color[1] = color[2] = 0; } } *************** *** 101,122 **** */ static void RunLightStyles() { ! int ofs; ! int i; ! clightstyle_t[] ls; ! ofs = cl.time / 100; if (ofs == lastofs) return; lastofs = ofs; ! ls = cl_lightstyle; ! for (i = 0; i < ls.length; i++) { ! if (ls[i].length == 0) { ! ls[i].value[0] = ls[i].value[1] = ls[i].value[2] = 1.0f; continue; } if (ls.length == 1) ! ls[i].value[0] = ls[i].value[1] = ls[i].value[2] = ls[i].map[0]; else ! ls[i].value[0] = ls[i].value[1] = ls[i].value[2] = ls[i].map[ofs % ls[i].length]; } } --- 100,120 ---- */ static void RunLightStyles() { ! clightstyle_t ls; ! int ofs = cl.time / 100; if (ofs == lastofs) return; lastofs = ofs; ! ! for (int i = 0; i < cl_lightstyle.length; i++) { ! ls = cl_lightstyle[i]; ! if (ls.length == 0) { ! ls.value[0] = ls.value[1] = ls.value[2] = 1.0f; continue; } if (ls.length == 1) ! ls.value[0] = ls.value[1] = ls.value[2] = ls.map[0]; else ! ls.value[0] = ls.value[1] = ls.value[2] = ls.map[ofs % ls.length]; } } *************** *** 144,153 **** */ static void AddLightStyles() { ! int i; ! clightstyle_t[] ls; ! ls = cl_lightstyle; ! for (i = 0; i < ls.length; i++) ! V.AddLightStyle(i, ls[i].value[0], ls[i].value[1], ls[i].value[2]); } --- 142,151 ---- */ static void AddLightStyles() { ! clightstyle_t ls; ! for (int i = 0; i < cl_lightstyle.length; i++) { ! ls = cl_lightstyle[i]; ! V.AddLightStyle(i, ls.value[0], ls.value[1], ls.value[2]); ! } } *************** *** 186,200 **** static cdlight_t AllocDlight(int key) { int i; ! cdlight_t[] dl; // first look for an exact key match ! if (key != 0) { ! dl = cl_dlights; for (i = 0; i < MAX_DLIGHTS; i++) { ! if (dl[i].key == key) { //memset (dl, 0, sizeof(*dl)); ! dl[i].clear(); ! dl[i].key = key; ! return dl[i]; } } --- 184,198 ---- static cdlight_t AllocDlight(int key) { int i; ! cdlight_t dl; // first look for an exact key match ! if (key != 0) { for (i = 0; i < MAX_DLIGHTS; i++) { ! dl = cl_dlights[i]; ! if (dl.key == key) { //memset (dl, 0, sizeof(*dl)); ! dl.clear(); ! dl.key = key; ! return dl; } } *************** *** 202,212 **** // then look for anything else - dl = cl_dlights; for (i = 0; i < MAX_DLIGHTS; i++) { ! if (dl[i].die < cl.time) { //memset (dl, 0, sizeof(*dl)); ! dl[i].clear(); ! dl[i].key = key; ! return dl[i]; } } --- 200,210 ---- // then look for anything else for (i = 0; i < MAX_DLIGHTS; i++) { ! dl = cl_dlights[i]; ! if (dl.die < cl.time) { //memset (dl, 0, sizeof(*dl)); ! dl.clear(); ! dl.key = key; ! return dl; } } *************** *** 214,220 **** //dl = &cl_dlights[0]; //memset (dl, 0, sizeof(*dl)); ! dl[0].clear(); ! dl[0].key = key; ! return dl[0]; } --- 212,219 ---- //dl = &cl_dlights[0]; //memset (dl, 0, sizeof(*dl)); ! dl = cl_dlights[0]; ! dl.clear(); ! dl.key = key; ! return dl; } *************** *** 242,259 **** */ static void RunDLights() { ! cdlight_t[] dl; - dl = cl_dlights; for (int i = 0; i < MAX_DLIGHTS; i++) { ! if (dl[i].radius == 0.0f) continue; ! if (dl[i].die < cl.time) { ! dl[i].radius = 0; return; } ! dl[i].radius -= cls.frametime * dl[i].decay; ! if (dl[i].radius < 0) ! dl[i].radius = 0; } } --- 241,258 ---- */ static void RunDLights() { ! cdlight_t dl; for (int i = 0; i < MAX_DLIGHTS; i++) { ! dl = cl_dlights[i]; ! if (dl.radius == 0.0f) continue; ! if (dl.die < cl.time) { ! dl.radius = 0.0f; return; } ! //dl[i].radius -= cls.frametime * dl[i].decay; ! //if (dl[i].radius < 0) ! // dl[i].radius = 0; } } *************** *** 954,982 **** */ static void AddDLights() { ! int i; ! ! cdlight_t[] dl = cl_dlights; // ===== // PGM if (vidref_val == VIDREF_GL) { ! for (i = 0; i < MAX_DLIGHTS; i++) { ! if (dl[i].radius == 0.0f) continue; ! V.AddLight(dl[i].origin, dl[i].radius, dl[i].color[0], dl[i].color[1], dl[i].color[2]); } } else { ! for (i = 0; i < MAX_DLIGHTS; i++) { ! if (dl[i].radius == 0.0f) continue; // negative light in software. only black allowed ! if ((dl[i].color[0] < 0) || (dl[i].color[1] < 0) || (dl[i].color[2] < 0)) { ! dl[i].radius = - (dl[i].radius); ! dl[i].color[0] = 1; ! dl[i].color[1] = 1; ! dl[i].color[2] = 1; } ! V.AddLight(dl[i].origin, dl[i].radius, dl[i].color[0], dl[i].color[1], dl[i].color[2]); } } --- 953,981 ---- */ static void AddDLights() { ! cdlight_t dl; // ===== // PGM if (vidref_val == VIDREF_GL) { ! for (int i = 0; i < MAX_DLIGHTS; i++) { ! dl = cl_dlights[i]; ! if (dl.radius == 0.0f) continue; ! V.AddLight(dl.origin, dl.radius, dl.color[0], dl.color[1], dl.color[2]); } } else { ! for (int i = 0; i < MAX_DLIGHTS; i++) { ! dl = cl_dlights[i]; ! if (dl.radius == 0.0f) continue; // negative light in software. only black allowed ! if ((dl.color[0] < 0) || (dl.color[1] < 0) || (dl.color[2] < 0)) { ! dl.radius = - (dl.radius); ! dl.color[0] = 1; ! dl.color[1] = 1; ! dl.color[2] = 1; } ! V.AddLight(dl.origin, dl.radius, dl.color[0], dl.color[1], dl.color[2]); } } *************** *** 1508,1515 **** float[] move = new float[3]; float[] vec = new float[3]; - float len; - int j; cparticle_t p; - float dec; float orgscale; float velscale; --- 1507,1511 ---- *************** *** 1517,1523 **** VectorCopy(start, move); VectorSubtract(end, start, vec); ! len = VectorNormalize(vec); ! dec = 0.5f; VectorScale(vec, dec, vec); --- 1513,1519 ---- VectorCopy(start, move); VectorSubtract(end, start, vec); ! float len = VectorNormalize(vec); ! float dec = 0.5f; VectorScale(vec, dec, vec); *************** *** 1553,1557 **** p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.4f); p.color = 0xe8 + (rand() & 7); ! for (j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; --- 1549,1553 ---- p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.4f); p.color = 0xe8 + (rand() & 7); ! for (int j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; *************** *** 1563,1567 **** p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.4f); p.color = 0xdb + (rand() & 7); ! for (j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; --- 1559,1563 ---- p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.4f); p.color = 0xdb + (rand() & 7); ! for (int j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; *************** *** 1573,1577 **** p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.2f); p.color = 4 + (rand() & 7); ! for (j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; --- 1569,1573 ---- p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.2f); p.color = 4 + (rand() & 7); ! for (int j = 0; j < 3; j++) { p.org[j] = move[j] + crand() * orgscale; p.vel[j] = crand() * velscale; |
From: Holger Z. <hz...@us...> - 2004-07-12 22:08:18
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28123/src/jake2/render/fastjogl Modified Files: Image.java Mesh.java Warp.java Model.java Light.java Log Message: small optimizations Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Light.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Light.java 9 Jul 2004 16:44:01 -0000 1.3 --- Light.java 12 Jul 2004 22:08:02 -0000 1.4 *************** *** 224,234 **** float[] lightspot = {0, 0, 0}; // vec3_t - // TODO sync with jogl renderer. hoz int RecursiveLightPoint (mnode_t node, float[] start, float[] end) { ! float front, back, frac; ! boolean side; ! int sideIndex; ! cplane_t plane; msurface_t surf; int s, t, ds, dt; --- 224,232 ---- float[] lightspot = {0, 0, 0}; // vec3_t int RecursiveLightPoint (mnode_t node, float[] start, float[] end) { ! if (node.contents != -1) ! return -1; // didn't hit anything ! msurface_t surf; int s, t, ds, dt; *************** *** 237,259 **** ByteBuffer lightmap; int maps; - int r; float[] mid = {0, 0, 0}; - - if (node.contents != -1) - return -1; // didn't hit anything // calculate mid point // FIXME: optimize for axial ! plane = node.plane; ! front = Math3D.DotProduct (start, plane.normal) - plane.dist; ! back = Math3D.DotProduct (end, plane.normal) - plane.dist; ! side = (front < 0); ! sideIndex = (side) ? 1 : 0; if ( (back < 0) == side) return RecursiveLightPoint (node.children[sideIndex], start, end); ! frac = front / (front-back); mid[0] = start[0] + (end[0] - start[0])*frac; mid[1] = start[1] + (end[1] - start[1])*frac; --- 235,253 ---- ByteBuffer lightmap; int maps; float[] mid = {0, 0, 0}; // calculate mid point // FIXME: optimize for axial ! cplane_t plane = node.plane; ! float front = Math3D.DotProduct (start, plane.normal) - plane.dist; ! float back = Math3D.DotProduct (end, plane.normal) - plane.dist; ! boolean side = (front < 0); ! int sideIndex = (side) ? 1 : 0; if ( (back < 0) == side) return RecursiveLightPoint (node.children[sideIndex], start, end); ! float frac = front / (front-back); mid[0] = start[0] + (end[0] - start[0])*frac; mid[1] = start[1] + (end[1] - start[1])*frac; *************** *** 261,265 **** // go down front side ! r = RecursiveLightPoint (node.children[sideIndex], start, mid); if (r >= 0) return r; // hit something --- 255,259 ---- // go down front side ! int r = RecursiveLightPoint (node.children[sideIndex], start, mid); if (r >= 0) return r; // hit something *************** *** 342,350 **** float[] end = {0, 0, 0}; - float r; - int lnum; dlight_t dl; - float light; - float[] dist = {0, 0, 0}; float add; --- 336,340 ---- *************** *** 359,363 **** end[2] = p[2] - 2048; ! r = RecursiveLightPoint(r_worldmodel.nodes[0], p, end); if (r == -1) --- 349,353 ---- end[2] = p[2] - 2048; ! float r = RecursiveLightPoint(r_worldmodel.nodes[0], p, end); if (r == -1) *************** *** 373,383 **** // add dynamic lights // ! light = 0; ! for (lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++) { dl = r_newrefdef.dlights[lnum]; ! Math3D.VectorSubtract (currententity.origin, dl.origin, dist); ! add = dl.intensity - Math3D.VectorLength(dist); add *= (1.0f/256); if (add > 0) --- 363,372 ---- // add dynamic lights // ! for (int lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++) { dl = r_newrefdef.dlights[lnum]; ! Math3D.VectorSubtract (currententity.origin, dl.origin, end); ! add = dl.intensity - Math3D.VectorLength(end); add *= (1.0f/256); if (add > 0) *************** *** 390,394 **** } - // =================================================================== --- 379,382 ---- Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Warp.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Warp.java 9 Jul 2004 06:50:49 -0000 1.1 --- Warp.java 12 Jul 2004 22:08:02 -0000 1.2 *************** *** 26,38 **** package jake2.render.fastjogl; - import java.nio.FloatBuffer; - import jake2.Defines; import jake2.Globals; ! import jake2.game.GameBase; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; import net.java.games.jogl.GL; --- 26,36 ---- package jake2.render.fastjogl; import jake2.Defines; import jake2.Globals; ! import jake2.render.*; import jake2.util.Math3D; + + import java.nio.FloatBuffer; + import net.java.games.jogl.GL; *************** *** 126,130 **** float[] dist = new float[64]; float frac; - glpoly_t poly; float s, t; float[] total = {0, 0, 0}; --- 124,127 ---- *************** *** 195,199 **** // init polys ! poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; --- 192,196 ---- // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Mesh.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Mesh.java 9 Jul 2004 10:25:29 -0000 1.2 --- Mesh.java 12 Jul 2004 22:08:02 -0000 1.3 *************** *** 68,78 **** float[] shadedots = r_avertexnormal_dots[0]; ! void GL_LerpVerts( int nverts, qfiles.dtrivertx_t[] v, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, FloatBuffer lerp, float[] move, float[] frontv, float[] backv ) { - int i; int lerpIndex = 0; int[] ovv; int[] vv; //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM --- 68,78 ---- float[] shadedots = r_avertexnormal_dots[0]; ! void GL_LerpVerts( int nverts, qfiles.dtrivertx_t[] v, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, float[] move, float[] frontv, float[] backv ) { int lerpIndex = 0; int[] ovv; int[] vv; + FloatBuffer lerp = vertexArrayBuf; //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM *************** *** 81,85 **** float[] normal; int j = 0; ! for (i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { normal = r_avertexnormals[verts[i].lightnormalindex]; --- 81,85 ---- float[] normal; int j = 0; ! for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { normal = r_avertexnormals[verts[i].lightnormalindex]; *************** *** 96,100 **** { int j = 0; ! for (i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { ovv = ov[i].v; --- 96,100 ---- { int j = 0; ! for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { ovv = ov[i].v; *************** *** 141,145 **** float[] move = {0, 0, 0}; // vec3_t - float[] delta = {0, 0, 0}; // vec3_t float[] frontv = {0, 0, 0}; // vec3_t --- 141,144 ---- *************** *** 169,178 **** // move should be the delta back to the previous frame * backlerp ! Math3D.VectorSubtract (currententity.oldorigin, currententity.origin, delta); Math3D.AngleVectors (currententity.angles, vectors[0], vectors[1], vectors[2]); ! move[0] = Math3D.DotProduct (delta, vectors[0]); // forward ! move[1] = -Math3D.DotProduct (delta, vectors[1]); // left ! move[2] = Math3D.DotProduct (delta, vectors[2]); // up Math3D.VectorAdd (move, oldframe.translate, move); --- 168,177 ---- // move should be the delta back to the previous frame * backlerp ! Math3D.VectorSubtract (currententity.oldorigin, currententity.origin, frontv); Math3D.AngleVectors (currententity.angles, vectors[0], vectors[1], vectors[2]); ! move[0] = Math3D.DotProduct (frontv, vectors[0]); // forward ! move[1] = -Math3D.DotProduct (frontv, vectors[1]); // left ! move[2] = Math3D.DotProduct (frontv, vectors[2]); // up Math3D.VectorAdd (move, oldframe.translate, move); *************** *** 181,188 **** { move[i] = backlerp*move[i] + frontlerp*frame.translate[i]; - } - - for (i=0 ; i<3 ; i++) - { frontv[i] = frontlerp*frame.scale[i]; backv[i] = backlerp*oldframe.scale[i]; --- 180,183 ---- *************** *** 191,195 **** // ab hier wird optimiert ! GL_LerpVerts( paliashdr.num_xyz, v, ov, verts, vertexArrayBuf, move, frontv, backv ); //gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); --- 186,190 ---- // ab hier wird optimiert ! GL_LerpVerts( paliashdr.num_xyz, v, ov, verts, move, frontv, backv ); //gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Image.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Image.java 9 Jul 2004 10:22:28 -0000 1.2 --- Image.java 12 Jul 2004 22:08:02 -0000 1.3 *************** *** 751,755 **** } // TODO check this: R_FloodFillSkin( byte[] skin, int skinwidth, int skinheight) - // TODO sync with jogl renderer. hoz void R_FloodFillSkin(byte[] skin, int skinwidth, int skinheight) { // byte fillcolor = *skin; // assume this is the pixel to fill --- 751,754 ---- Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Model.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Model.java 9 Jul 2004 06:50:49 -0000 1.1 --- Model.java 12 Jul 2004 22:08:02 -0000 1.2 *************** *** 561,567 **** float val; ! int i, j, e; mvertex_t v; - mtexinfo_t tex; int[] bmins = {0, 0}; int[] bmaxs = {0, 0}; --- 561,566 ---- float val; ! int j, e; mvertex_t v; int[] bmins = {0, 0}; int[] bmaxs = {0, 0}; *************** *** 570,576 **** maxs[0] = maxs[1] = -99999; ! tex = s.texinfo; ! for (i=0 ; i<s.numedges ; i++) { e = loadmodel.surfedges[s.firstedge+i]; --- 569,575 ---- maxs[0] = maxs[1] = -99999; ! mtexinfo_t tex = s.texinfo; ! for (int i=0 ; i<s.numedges ; i++) { e = loadmodel.surfedges[s.firstedge+i]; *************** *** 593,597 **** } ! for (i=0 ; i<2 ; i++) { bmins[i] = (int)Math.floor(mins[i]/16); --- 592,596 ---- } ! for (int i=0 ; i<2 ; i++) { bmins[i] = (int)Math.floor(mins[i]/16); |
From: Holger Z. <hz...@us...> - 2004-07-12 22:08:18
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28123/src/jake2/render/jogl Modified Files: Image.java Warp.java Model.java Mesh.java Light.java Log Message: small optimizations Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Light.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Light.java 9 Jul 2004 06:50:48 -0000 1.4 --- Light.java 12 Jul 2004 22:08:04 -0000 1.5 *************** *** 231,239 **** int RecursiveLightPoint (mnode_t node, float[] start, float[] end) { ! float front, back, frac; ! boolean side; ! int sideIndex; ! cplane_t plane; ! float[] mid = {0, 0, 0}; msurface_t surf; int s, t, ds, dt; --- 231,237 ---- int RecursiveLightPoint (mnode_t node, float[] start, float[] end) { ! if (node.contents != -1) ! return -1; // didn't hit anything ! msurface_t surf; int s, t, ds, dt; *************** *** 242,263 **** ByteBuffer lightmap; int maps; ! int r; ! ! if (node.contents != -1) ! return -1; // didn't hit anything // calculate mid point // FIXME: optimize for axial ! plane = node.plane; ! front = Math3D.DotProduct (start, plane.normal) - plane.dist; ! back = Math3D.DotProduct (end, plane.normal) - plane.dist; ! side = (front < 0); ! sideIndex = (side) ? 1 : 0; if ( (back < 0) == side) return RecursiveLightPoint (node.children[sideIndex], start, end); ! frac = front / (front-back); mid[0] = start[0] + (end[0] - start[0])*frac; mid[1] = start[1] + (end[1] - start[1])*frac; --- 240,258 ---- ByteBuffer lightmap; int maps; ! float[] mid = {0, 0, 0}; // calculate mid point // FIXME: optimize for axial ! cplane_t plane = node.plane; ! float front = Math3D.DotProduct (start, plane.normal) - plane.dist; ! float back = Math3D.DotProduct (end, plane.normal) - plane.dist; ! boolean side = (front < 0); ! int sideIndex = (side) ? 1 : 0; if ( (back < 0) == side) return RecursiveLightPoint (node.children[sideIndex], start, end); ! float frac = front / (front-back); mid[0] = start[0] + (end[0] - start[0])*frac; mid[1] = start[1] + (end[1] - start[1])*frac; *************** *** 265,269 **** // go down front side ! r = RecursiveLightPoint (node.children[sideIndex], start, mid); if (r >= 0) return r; // hit something --- 260,264 ---- // go down front side ! int r = RecursiveLightPoint (node.children[sideIndex], start, mid); if (r >= 0) return r; // hit something *************** *** 277,280 **** --- 272,276 ---- int surfIndex = node.firstsurface; + float[] scale = {0, 0, 0}; for (i=0 ; i<node.numsurfaces ; i++, surfIndex++) { *************** *** 310,320 **** if (lightmap != null) { ! float[] scale = {0, 0, 0}; lightmapIndex += 3 * (dt * ((surf.extents[0] >> 4) + 1) + ds); for (maps = 0 ; maps < Defines.MAXLIGHTMAPS && surf.styles[maps] != (byte)255; maps++) { ! for (i=0 ; i<3 ; i++) ! scale[i] = gl_modulate.value * r_newrefdef.lightstyles[surf.styles[maps] & 0xFF].rgb[i]; pointcolor[0] += (lightmap.get(lightmapIndex + 0) & 0xFF) * scale[0] * (1.0f/255); --- 306,319 ---- if (lightmap != null) { ! //float[] scale = {0, 0, 0}; ! float[] rgb; lightmapIndex += 3 * (dt * ((surf.extents[0] >> 4) + 1) + ds); for (maps = 0 ; maps < Defines.MAXLIGHTMAPS && surf.styles[maps] != (byte)255; maps++) { ! rgb = r_newrefdef.lightstyles[surf.styles[maps] & 0xFF].rgb; ! scale[0] = gl_modulate.value * rgb[0]; ! scale[1] = gl_modulate.value * rgb[1]; ! scale[2] = gl_modulate.value * rgb[2]; pointcolor[0] += (lightmap.get(lightmapIndex + 0) & 0xFF) * scale[0] * (1.0f/255); *************** *** 326,329 **** --- 325,329 ---- return 1; } + // go down back side return RecursiveLightPoint (node.children[1 - sideIndex], mid, end); *************** *** 341,349 **** float[] end = {0, 0, 0}; - float r; - int lnum; dlight_t dl; - float light; - float[] dist = {0, 0, 0}; float add; --- 341,345 ---- *************** *** 358,362 **** end[2] = p[2] - 2048; ! r = RecursiveLightPoint(r_worldmodel.nodes[0], p, end); if (r == -1) --- 354,358 ---- end[2] = p[2] - 2048; ! float r = RecursiveLightPoint(r_worldmodel.nodes[0], p, end); if (r == -1) *************** *** 372,382 **** // add dynamic lights // ! light = 0; ! for (lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++) { dl = r_newrefdef.dlights[lnum]; ! Math3D.VectorSubtract (currententity.origin, dl.origin, dist); ! add = dl.intensity - Math3D.VectorLength(dist); add *= (1.0f/256); if (add > 0) --- 368,377 ---- // add dynamic lights // ! for (int lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++) { dl = r_newrefdef.dlights[lnum]; ! Math3D.VectorSubtract (currententity.origin, dl.origin, end); ! add = dl.intensity - Math3D.VectorLength(end); add *= (1.0f/256); if (add > 0) *************** *** 389,393 **** } - // =================================================================== --- 384,387 ---- Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Warp.java 9 Jul 2004 06:50:48 -0000 1.4 --- Warp.java 12 Jul 2004 22:08:03 -0000 1.5 *************** *** 28,35 **** import jake2.Defines; import jake2.Globals; ! import jake2.game.GameBase; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; import net.java.games.jogl.GL; --- 28,32 ---- import jake2.Defines; import jake2.Globals; ! import jake2.render.*; import jake2.util.Math3D; import net.java.games.jogl.GL; *************** *** 118,122 **** float m; float[] v = {0, 0, 0}; ! float[][] front = new float[64][3]; float[][] back = new float[64][3]; --- 115,119 ---- float m; float[] v = {0, 0, 0}; ! float[][] front = new float[64][3]; float[][] back = new float[64][3]; *************** *** 124,128 **** float[] dist = new float[64]; float frac; - glpoly_t poly; float s, t; float[] total = {0, 0, 0}; --- 121,124 ---- *************** *** 193,197 **** // init polys ! poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; --- 189,193 ---- // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Mesh.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Mesh.java 9 Jul 2004 06:50:48 -0000 1.4 --- Mesh.java 12 Jul 2004 22:08:03 -0000 1.5 *************** *** 26,36 **** package jake2.render.jogl; - import java.nio.FloatBuffer; - - import net.java.games.gluegen.runtime.BufferFactory; - import net.java.games.jogl.GL; - import net.java.games.jogl.util.BufferUtils; import jake2.Defines; - import jake2.Globals; import jake2.client.entity_t; import jake2.qcommon.qfiles; --- 26,30 ---- *************** *** 38,41 **** --- 32,40 ---- import jake2.util.Math3D; + import java.nio.FloatBuffer; + + import net.java.games.jogl.GL; + import net.java.games.jogl.util.BufferUtils; + /** * Mesh *************** *** 101,109 **** } ! void GL_LerpVerts( int nverts, qfiles.dtrivertx_t[] v, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, FloatBuffer lerp, float[] move, float[] frontv, float[] backv ) { - int i; int lerpIndex = 0; //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM if ( (currententity.flags & ( Defines.RF_SHELL_RED | Defines.RF_SHELL_GREEN | Defines.RF_SHELL_BLUE | Defines.RF_SHELL_DOUBLE | Defines.RF_SHELL_HALF_DAM)) != 0 ) --- 100,111 ---- } ! void GL_LerpVerts( int nverts, qfiles.dtrivertx_t[] v, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, float[] move, float[] frontv, float[] backv ) { int lerpIndex = 0; + int[] ovv; + int[] vv; + FloatBuffer lerp = vertexArrayBuf; + //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM if ( (currententity.flags & ( Defines.RF_SHELL_RED | Defines.RF_SHELL_GREEN | Defines.RF_SHELL_BLUE | Defines.RF_SHELL_DOUBLE | Defines.RF_SHELL_HALF_DAM)) != 0 ) *************** *** 111,121 **** float[] normal; int j = 0; ! for (i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { normal = r_avertexnormals[verts[i].lightnormalindex]; ! ! lerp.put(j++, move[0] + ov[i].v[0]*backv[0] + v[i].v[0]*frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(j++, move[1] + ov[i].v[1]*backv[1] + v[i].v[1]*frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(j++, move[2] + ov[i].v[2]*backv[2] + v[i].v[2]*frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); } } --- 113,126 ---- float[] normal; int j = 0; ! for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { normal = r_avertexnormals[verts[i].lightnormalindex]; ! ovv = ov[i].v; ! vv = v[i].v; ! ! lerp.put(j, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 1, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(j + 2, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); ! j+=3; } } *************** *** 123,132 **** { int j = 0; ! for (i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { ! lerp.put(j++, move[0] + ov[i].v[0]*backv[0] + v[i].v[0]*frontv[0]); ! lerp.put(j++, move[1] + ov[i].v[1]*backv[1] + v[i].v[1]*frontv[1]); ! lerp.put(j++, move[2] + ov[i].v[2]*backv[2] + v[i].v[2]*frontv[2]); } } --- 128,140 ---- { int j = 0; ! for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { + ovv = ov[i].v; + vv = v[i].v; ! lerp.put(j, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0]); ! lerp.put(j + 1, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1]); ! lerp.put(j + 2, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2]); ! j+=3; } } *************** *** 160,164 **** float[] move = {0, 0, 0}; // vec3_t - float[] delta = {0, 0, 0}; // vec3_t float[][] vectors = { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} // 3 mal vec3_t --- 168,171 ---- *************** *** 194,203 **** // move should be the delta back to the previous frame * backlerp ! Math3D.VectorSubtract (currententity.oldorigin, currententity.origin, delta); Math3D.AngleVectors (currententity.angles, vectors[0], vectors[1], vectors[2]); ! move[0] = Math3D.DotProduct (delta, vectors[0]); // forward ! move[1] = -Math3D.DotProduct (delta, vectors[1]); // left ! move[2] = Math3D.DotProduct (delta, vectors[2]); // up Math3D.VectorAdd (move, oldframe.translate, move); --- 201,210 ---- // move should be the delta back to the previous frame * backlerp ! Math3D.VectorSubtract (currententity.oldorigin, currententity.origin, frontv); Math3D.AngleVectors (currententity.angles, vectors[0], vectors[1], vectors[2]); ! move[0] = Math3D.DotProduct(frontv, vectors[0]); // forward ! move[1] = -Math3D.DotProduct(frontv, vectors[1]); // left ! move[2] = Math3D.DotProduct(frontv, vectors[2]); // up Math3D.VectorAdd (move, oldframe.translate, move); *************** *** 206,213 **** { move[i] = backlerp*move[i] + frontlerp*frame.translate[i]; - } - - for (i=0 ; i<3 ; i++) - { frontv[i] = frontlerp*frame.scale[i]; backv[i] = backlerp*oldframe.scale[i]; --- 213,216 ---- *************** *** 216,220 **** if ( gl_vertex_arrays.value != 0.0f ) { ! GL_LerpVerts( paliashdr.num_xyz, v, ov, verts, vertexArrayBuf, move, frontv, backv ); gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); --- 219,223 ---- if ( gl_vertex_arrays.value != 0.0f ) { ! GL_LerpVerts( paliashdr.num_xyz, v, ov, verts, move, frontv, backv ); gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Image.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Image.java 9 Jul 2004 06:50:48 -0000 1.3 --- Image.java 12 Jul 2004 22:08:03 -0000 1.4 *************** *** 762,779 **** // else if (pos[off] != 255) fdc = pos[off]; // } ! // TODO check this: R_FloodFillSkin( byte[] skin, int skinwidth, int skinheight) void R_FloodFillSkin(byte[] skin, int skinwidth, int skinheight) { // byte fillcolor = *skin; // assume this is the pixel to fill int fillcolor = skin[0] & 0xff; - floodfill_t[] fifo = new floodfill_t[FLOODFILL_FIFO_SIZE]; int inpt = 0, outpt = 0; int filledcolor = -1; int i; - for (int j = 0; j < fifo.length; j++) { - fifo[j] = new floodfill_t(); - } - if (filledcolor == -1) { filledcolor = 0; --- 762,779 ---- // else if (pos[off] != 255) fdc = pos[off]; // } ! static floodfill_t[] fifo = new floodfill_t[FLOODFILL_FIFO_SIZE]; ! static { ! for (int j = 0; j < fifo.length; j++) { ! fifo[j] = new floodfill_t(); ! } ! } // TODO check this: R_FloodFillSkin( byte[] skin, int skinwidth, int skinheight) void R_FloodFillSkin(byte[] skin, int skinwidth, int skinheight) { // byte fillcolor = *skin; // assume this is the pixel to fill int fillcolor = skin[0] & 0xff; int inpt = 0, outpt = 0; int filledcolor = -1; int i; if (filledcolor == -1) { filledcolor = 0; Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Model.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Model.java 9 Jul 2004 06:50:48 -0000 1.2 --- Model.java 12 Jul 2004 22:08:03 -0000 1.3 *************** *** 26,51 **** package jake2.render.jogl; - import java.nio.ByteBuffer; - import java.nio.ByteOrder; - import java.util.Arrays; - import java.util.Vector; - import jake2.Defines; import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.lump_t; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.texinfo_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mmodel_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; ! import jake2.render.mvertex_t; import jake2.util.Math3D; import jake2.util.Vargs; /** * Model --- 26,41 ---- package jake2.render.jogl; import jake2.Defines; import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.*; ! import jake2.render.*; import jake2.util.Math3D; import jake2.util.Vargs; + import java.nio.ByteBuffer; + import java.nio.ByteOrder; + import java.util.Arrays; + /** * Model *************** *** 569,575 **** float val; ! int i, j, e; mvertex_t v; - mtexinfo_t tex; int[] bmins = {0, 0}; int[] bmaxs = {0, 0}; --- 559,564 ---- float val; ! int j, e; mvertex_t v; int[] bmins = {0, 0}; int[] bmaxs = {0, 0}; *************** *** 578,584 **** maxs[0] = maxs[1] = -99999; ! tex = s.texinfo; ! for (i=0 ; i<s.numedges ; i++) { e = loadmodel.surfedges[s.firstedge+i]; --- 567,573 ---- maxs[0] = maxs[1] = -99999; ! mtexinfo_t tex = s.texinfo; ! for (int i=0 ; i<s.numedges ; i++) { e = loadmodel.surfedges[s.firstedge+i]; *************** *** 601,605 **** } ! for (i=0 ; i<2 ; i++) { bmins[i] = (int)Math.floor(mins[i]/16); --- 590,594 ---- } ! for (int i=0 ; i<2 ; i++) { bmins[i] = (int)Math.floor(mins[i]/16); |
From: Holger Z. <hz...@us...> - 2004-07-12 20:47:19
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12643/src/jake2/game Modified Files: client_respawn_t.java game_locals_t.java trace_t.java client_persistant_t.java Log Message: cleanups Index: trace_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/trace_t.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trace_t.java 8 Jul 2004 20:24:29 -0000 1.3 --- trace_t.java 12 Jul 2004 20:47:01 -0000 1.4 *************** *** 24,28 **** package jake2.game; ! import jake2.util.Lib; //a trace is returned when a box is swept through the world --- 24,28 ---- package jake2.game; ! import jake2.util.Math3D; //a trace is returned when a box is swept through the world *************** *** 45,49 **** startsolid = from.allsolid; fraction = from.fraction; ! endpos = Lib.clone(from.endpos); plane.set(from.plane); surface = from.surface; --- 45,49 ---- startsolid = from.allsolid; fraction = from.fraction; ! Math3D.VectorCopy(from.endpos, endpos); plane.set(from.plane); surface = from.surface; *************** *** 51,66 **** ent = from.ent; } - - // ============= - // public trace_t getClone() { - // trace_t out = null; - // try { - // out = (trace_t) this.clone(); - // out.plane = plane.getClone(); - // out.endpos = Lib.clone(endpos); - // } - // catch (CloneNotSupportedException e) { - // } - // return out; - // } } --- 51,53 ---- Index: game_locals_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/game_locals_t.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** game_locals_t.java 8 Jul 2004 15:58:44 -0000 1.2 --- game_locals_t.java 12 Jul 2004 20:47:01 -0000 1.3 *************** *** 28,32 **** import jake2.util.Lib; - import java.io.IOException; import java.nio.ByteBuffer; --- 28,31 ---- *************** *** 61,65 **** public boolean autosaved; ! public void load(ByteBuffer bb) throws IOException { String date = Lib.readString(bb, 16); --- 60,64 ---- public boolean autosaved; ! public void load(ByteBuffer bb) { String date = Lib.readString(bb, 16); Index: client_respawn_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/client_respawn_t.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** client_respawn_t.java 8 Jul 2004 20:24:29 -0000 1.3 --- client_respawn_t.java 12 Jul 2004 20:47:01 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- import jake2.qcommon.Com; import jake2.util.Lib; + import jake2.util.Math3D; import java.io.IOException; *************** *** 43,47 **** enterframe = from.enterframe; score = from.score; ! cmd_angles = Lib.clone(from.cmd_angles); spectator = from.spectator; } --- 44,48 ---- enterframe = from.enterframe; score = from.score; ! Math3D.VectorCopy(from.cmd_angles, cmd_angles); spectator = from.spectator; } *************** *** 53,57 **** enterframe = 0; score = 0; ! cmd_angles = new float[3]; spectator = false; } --- 54,58 ---- enterframe = 0; score = 0; ! Math3D.VectorClear(cmd_angles); spectator = false; } Index: client_persistant_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/client_persistant_t.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** client_persistant_t.java 8 Jul 2004 20:24:29 -0000 1.3 --- client_persistant_t.java 12 Jul 2004 20:47:01 -0000 1.4 *************** *** 27,43 **** import jake2.util.Lib; - import java.io.IOException; import java.nio.ByteBuffer; ! public class client_persistant_t implements Cloneable { ! ! // public client_persistant_t getClone() { ! // try { ! // return (client_persistant_t) this.clone(); ! // } ! // catch (CloneNotSupportedException e) { ! // return null; ! // } ! // } public void set(client_persistant_t from) --- 27,33 ---- import jake2.util.Lib; import java.nio.ByteBuffer; ! public class client_persistant_t { public void set(client_persistant_t from) *************** *** 52,56 **** selected_item = from.selected_item; System.arraycopy(from.inventory, 0, inventory, 0, inventory.length); - //inventory = Lib.clone(from.inventory); max_bullets = from.max_bullets; max_shells = from.max_shells; --- 42,45 ---- *************** *** 101,105 **** boolean spectator; // client is a spectator ! public void load(ByteBuffer bb) throws IOException { // client persistant_t --- 90,94 ---- boolean spectator; // client is a spectator ! public void load(ByteBuffer bb) { // client persistant_t |
From: Holger Z. <hz...@us...> - 2004-07-12 20:47:19
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12643/src/jake2/util Modified Files: Lib.java Log Message: cleanups Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Lib.java 9 Jul 2004 06:50:51 -0000 1.3 --- Lib.java 12 Jul 2004 20:47:01 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- package jake2.util; + import jake2.Defines; import jake2.Globals; import jake2.qcommon.Com; *************** *** 30,36 **** import java.io.*; import java.nio.*; - import java.nio.ByteBuffer; - import java.nio.FloatBuffer; - import java.util.Arrays; import java.util.StringTokenizer; --- 31,34 ---- *************** *** 159,173 **** } ! public static String readString(RandomAccessFile file, int len) throws IOException { ! byte buf[] = new byte[len]; ! ! file.read(buf, 0, len); ! return new String(buf, 0, strlen(buf)); ! } ! ! public static String readString(ByteBuffer bb, int len) throws IOException { ! byte buf[] = new byte[len]; ! bb.get(buf); ! return new String(buf, 0, strlen(buf)); } --- 157,164 ---- } ! static byte[] buffer = new byte[Defines.MAX_INFO_STRING]; ! public static String readString(ByteBuffer bb, int len) { ! bb.get(buffer, 0, len); ! return new String(buffer, 0, len); } *************** *** 237,253 **** } ! public static void memset(byte[] dest, byte c, int len) { ! Arrays.fill(dest, 0, len, c); ! } ! ! public static void memset(byte[] dest, int c, int len) { ! Arrays.fill(dest, 0, len, (byte) c); ! } ! ! public static void memcpy(byte[] bs, byte[] bs2, int i) { ! System.arraycopy(bs2, 0, bs, 0, i); ! } ! ! static byte nullfiller[] = new byte[8192]; public static void fwriteString(String s, int len, RandomAccessFile f) throws IOException { --- 228,232 ---- } ! static final byte nullfiller[] = new byte[8192]; public static void fwriteString(String s, int len, RandomAccessFile f) throws IOException { *************** *** 367,415 **** } - public static long[] clone(long in[]) { - long out[] = new long[in.length]; - - if (in.length != 0) - System.arraycopy(in, 0, out, 0, in.length); - - return out; - } - - public static boolean[] clone(boolean in[]) { - boolean out[] = new boolean[in.length]; - - if (in.length != 0) - System.arraycopy(in, 0, out, 0, in.length); - - return out; - } - - public static int[] clone(int in[]) { - int out[] = new int[in.length]; - - if (in.length != 0) - System.arraycopy(in, 0, out, 0, in.length); - - return out; - } - - public static double[] clone(double in[]) { - double out[] = new double[in.length]; - - if (in.length != 0) - System.arraycopy(in, 0, out, 0, in.length); - - return out; - } - - // this works with Strings also. - public static String[] clone(String in[]) { - String out[] = new String[in.length]; - if (in.length != 0) - System.arraycopy(in, 0, out, 0, in.length); - - return out; - } - /* * java.nio.* Buffer util functions --- 346,349 ---- |
From: Holger Z. <hz...@us...> - 2004-07-12 20:47:19
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12643/src/jake2/qcommon Modified Files: CM.java Netchan.java Cbuf.java Log Message: cleanups Index: Cbuf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Cbuf.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Cbuf.java 8 Jul 2004 15:58:46 -0000 1.2 --- Cbuf.java 12 Jul 2004 20:47:00 -0000 1.3 *************** *** 29,33 **** import jake2.Globals; import jake2.game.Cmd; - import jake2.util.Lib; /** --- 29,32 ---- *************** *** 230,234 **** */ public static void CopyToDefer() { ! Lib.memcpy(Globals.defer_text_buf, Globals.cmd_text_buf, Globals.cmd_text.cursize); Globals.defer_text_buf[Globals.cmd_text.cursize] = 0; Globals.cmd_text.cursize = 0; --- 229,233 ---- */ public static void CopyToDefer() { ! System.arraycopy(Globals.cmd_text_buf, 0, Globals.defer_text_buf, 0, Globals.cmd_text.cursize); Globals.defer_text_buf[Globals.cmd_text.cursize] = 0; Globals.cmd_text.cursize = 0; Index: Netchan.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Netchan.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Netchan.java 8 Jul 2004 15:58:46 -0000 1.2 --- Netchan.java 12 Jul 2004 20:47:00 -0000 1.3 *************** *** 26,38 **** package jake2.qcommon; ! import sun.applet.resources.MsgAppletViewer; ! import jake2.*; ! import jake2.client.*; ! import jake2.game.*; ! import jake2.render.*; ! import jake2.server.*; import jake2.sys.NET; import jake2.sys.Sys; - import jake2.util.Lib; /** --- 26,35 ---- package jake2.qcommon; ! import jake2.Defines; ! import jake2.Globals; ! import jake2.game.cvar_t; ! import jake2.server.SV_MAIN; import jake2.sys.NET; import jake2.sys.Sys; /** *************** *** 225,229 **** if (chan.reliable_length == 0 && chan.message.cursize != 0) { ! Lib.memcpy(chan.reliable_buf, chan.message_buf, chan.message.cursize); chan.reliable_length = chan.message.cursize; chan.message.cursize = 0; --- 222,226 ---- if (chan.reliable_length == 0 && chan.message.cursize != 0) { ! System.arraycopy(chan.message_buf, 0, chan.reliable_buf, 0, chan.message.cursize); chan.reliable_length = chan.message.cursize; chan.message.cursize = 0; Index: CM.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/CM.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CM.java 9 Jul 2004 06:50:50 -0000 1.3 --- CM.java 12 Jul 2004 20:47:00 -0000 1.4 *************** *** 1704,1708 **** public static byte[] CM_ClusterPVS(int cluster) { if (cluster == -1) ! Lib.memset(pvsrow, (byte) 0, (numclusters + 7) >> 3); else CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][DVIS_PVS], pvsrow); --- 1704,1708 ---- public static byte[] CM_ClusterPVS(int cluster) { if (cluster == -1) ! Arrays.fill(pvsrow, 0, (numclusters + 7) >> 3, (byte)0); else CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][DVIS_PVS], pvsrow); *************** *** 1712,1716 **** public static byte[] CM_ClusterPHS(int cluster) { if (cluster == -1) ! Lib.memset(phsrow, (byte) 0, (numclusters + 7) >> 3); else CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][Defines.DVIS_PHS], phsrow); --- 1712,1716 ---- public static byte[] CM_ClusterPHS(int cluster) { if (cluster == -1) ! Arrays.fill(phsrow, 0, (numclusters + 7) >> 3, (byte)0); else CM_DecompressVis(map_visibility, map_vis.bitofs[cluster][Defines.DVIS_PHS], phsrow); *************** *** 1823,1830 **** if (map_noareas.value != 0) { // for debugging, send everything ! Lib.memset(buffer, 255, bytes); } else { ! Lib.memset(buffer, 0, bytes); floodnum = map_areas[area].floodnum; for (i = 0; i < numareas; i++) { --- 1823,1830 ---- if (map_noareas.value != 0) { // for debugging, send everything ! Arrays.fill(buffer, 0, bytes, (byte)255); } else { ! Arrays.fill(buffer, 0, bytes, (byte)0); floodnum = map_areas[area].floodnum; for (i = 0; i < numareas; i++) { |
From: Holger Z. <hz...@us...> - 2004-07-12 20:47:19
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12643/src/jake2/client Modified Files: CL_ents.java CL_parse.java Log Message: cleanups Index: CL_ents.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_ents.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CL_ents.java 9 Jul 2004 06:50:50 -0000 1.4 --- CL_ents.java 12 Jul 2004 20:47:01 -0000 1.5 *************** *** 235,239 **** entity_state_t oldstate=null; ! int oldindex, oldnum; newframe.parse_entities = cl.parse_entities; --- 235,239 ---- entity_state_t oldstate=null; ! int oldnum; newframe.parse_entities = cl.parse_entities; *************** *** 241,254 **** // delta from the entities present in oldframe ! oldindex = 0; if (oldframe == null) oldnum = 99999; else { ! if (oldindex >= oldframe.num_entities) ! oldnum = 99999; ! else { oldstate = cl_parse_entities[(oldframe.parse_entities + oldindex) & (MAX_PARSE_ENTITIES - 1)]; oldnum = oldstate.number; ! } } --- 241,255 ---- // delta from the entities present in oldframe ! int oldindex = 0; if (oldframe == null) oldnum = 99999; else { ! // oldindex == 0. hoz ! // if (oldindex >= oldframe.num_entities) ! // oldnum = 99999; ! // else { oldstate = cl_parse_entities[(oldframe.parse_entities + oldindex) & (MAX_PARSE_ENTITIES - 1)]; oldnum = oldstate.number; ! // } } Index: CL_parse.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_parse.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CL_parse.java 9 Jul 2004 06:50:50 -0000 1.5 --- CL_parse.java 12 Jul 2004 20:47:01 -0000 1.6 *************** *** 219,223 **** if (cls.download != null) { // if here, we tried to resume a file but the server said no ! fclose(cls.download); cls.download = null; } --- 219,225 ---- if (cls.download != null) { // if here, we tried to resume a file but the server said no ! try { ! cls.download.close(); ! } catch (IOException e) {} cls.download = null; } *************** *** 263,267 **** // Com.Printf ("100%%\n"); ! fclose(cls.download); // rename the temp file to it's final name --- 265,271 ---- // Com.Printf ("100%%\n"); ! try { ! cls.download.close(); ! } catch (IOException e) {} // rename the temp file to it's final name *************** *** 694,698 **** if (cls.download != null) { //ZOID, close download ! fclose(cls.download); cls.download = null; } --- 698,704 ---- if (cls.download != null) { //ZOID, close download ! try { ! cls.download.close(); ! } catch (IOException e) {} cls.download = null; } |
From: Holger Z. <hz...@us...> - 2004-07-12 20:47:15
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12643/src/jake2/server Modified Files: SV_ENTS.java Removed Files: scrap.jpage Log Message: cleanups Index: SV_ENTS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_ENTS.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SV_ENTS.java 8 Jul 2004 15:58:45 -0000 1.2 --- SV_ENTS.java 12 Jul 2004 20:47:02 -0000 1.3 *************** *** 24,35 **** package jake2.server; - import java.io.IOException; - - import jake2.*; - import jake2.client.*; import jake2.game.*; import jake2.qcommon.*; ! import jake2.render.*; ! import jake2.util.Vargs; public class SV_ENTS extends SV_USER { --- 24,31 ---- package jake2.server; import jake2.game.*; import jake2.qcommon.*; ! ! import java.io.IOException; public class SV_ENTS extends SV_USER { *************** *** 384,388 **** leafs[i] = CM.CM_LeafCluster(leafs[i]); ! memcpy(fatpvs, CM.CM_ClusterPVS(leafs[0]), longs << 2); // or in all the other leaf bits for (i = 1; i < count; i++) { --- 380,384 ---- leafs[i] = CM.CM_LeafCluster(leafs[i]); ! System.arraycopy(CM.CM_ClusterPVS(leafs[0]), 0, fatpvs, 0, longs << 2); // or in all the other leaf bits for (i = 1; i < count; i++) { --- scrap.jpage DELETED --- |
From: Holger Z. <hz...@us...> - 2004-07-12 18:19:52
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12605/src/jake2/render/fastjogl Modified Files: Surf.java Log Message: fix nullpointer exception when first starting with: r_drawworld 0 r_drawentities 0 Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Surf.java 9 Jul 2004 06:50:48 -0000 1.1 --- Surf.java 12 Jul 2004 18:19:42 -0000 1.2 *************** *** 912,915 **** --- 912,918 ---- { entity_t ent = new entity_t(); + // auto cycle the world frame for texture animation + ent.frame = (int)(r_newrefdef.time*2); + currententity = ent; if (r_drawworld.value == 0) *************** *** 923,931 **** Math3D.VectorCopy(r_newrefdef.vieworg, modelorg); - // auto cycle the world frame for texture animation - // memset (&ent, 0, sizeof(ent)); - ent.frame = (int)(r_newrefdef.time*2); - currententity = ent; - gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; --- 926,929 ---- |
From: Holger Z. <hz...@us...> - 2004-07-12 18:19:52
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12605/src/jake2/render/jogl Modified Files: Surf.java Log Message: fix nullpointer exception when first starting with: r_drawworld 0 r_drawentities 0 Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Surf.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Surf.java 9 Jul 2004 06:50:48 -0000 1.3 --- Surf.java 12 Jul 2004 18:19:42 -0000 1.4 *************** *** 1205,1209 **** { entity_t ent = new entity_t(); ! if (r_drawworld.value == 0) return; --- 1205,1212 ---- { entity_t ent = new entity_t(); ! // auto cycle the world frame for texture animation ! ent.frame = (int)(r_newrefdef.time*2); ! currententity = ent; ! if (r_drawworld.value == 0) return; *************** *** 1216,1224 **** Math3D.VectorCopy(r_newrefdef.vieworg, modelorg); - // auto cycle the world frame for texture animation - // memset (&ent, 0, sizeof(ent)); - ent.frame = (int)(r_newrefdef.time*2); - currententity = ent; - gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; --- 1219,1222 ---- |
From: Holger Z. <hz...@us...> - 2004-07-11 20:22:20
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23092 Modified Files: README_DE Log Message: *** keyword substitution change *** |
From: Holger Z. <hz...@us...> - 2004-07-09 16:44:09
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7220/src/jake2/render/fastjogl Modified Files: Light.java Log Message: moving out mid was to optimistic Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Light.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Light.java 9 Jul 2004 10:24:32 -0000 1.2 --- Light.java 9 Jul 2004 16:44:01 -0000 1.3 *************** *** 223,227 **** cplane_t lightplane; // used as shadow plane float[] lightspot = {0, 0, 0}; // vec3_t - float[] mid = {0, 0, 0}; // TODO sync with jogl renderer. hoz --- 223,226 ---- *************** *** 239,243 **** int maps; int r; ! if (node.contents != -1) return -1; // didn't hit anything --- 238,243 ---- int maps; int r; ! float[] mid = {0, 0, 0}; ! if (node.contents != -1) return -1; // didn't hit anything |