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...> - 2004-07-23 10:07:26
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10900/src/jake2/game Modified Files: M_Flyer.java Cmd.java GameSpawn.java Log Message: replace Lib functions Index: M_Flyer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/M_Flyer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** M_Flyer.java 8 Jul 2004 15:58:44 -0000 1.2 --- M_Flyer.java 23 Jul 2004 10:07:14 -0000 1.3 *************** *** 24,29 **** package jake2.game; ! import jake2.util.*; ! import jake2.util.*; public class M_Flyer extends M_Player { --- 24,29 ---- package jake2.game; ! import jake2.util.Lib; ! import jake2.util.Math3D; public class M_Flyer extends M_Player { *************** *** 761,765 **** // fix a map bug in jail5.bsp ! if (0 == Lib.stricmp(level.mapname, "jail5") && (self.s.origin[2] == -104)) { self.targetname= self.target; self.target= null; --- 761,765 ---- // fix a map bug in jail5.bsp ! if (level.mapname.equalsIgnoreCase("jail5") && (self.s.origin[2] == -104)) { self.targetname= self.target; self.target= null; Index: GameSpawn.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameSpawn.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GameSpawn.java 9 Jul 2004 06:50:49 -0000 1.3 --- GameSpawn.java 23 Jul 2004 10:07:14 -0000 1.4 *************** *** 24,30 **** package jake2.game; ! import jake2.Defines; ! import jake2.util.*; ! import jake2.qcommon.*; public class GameSpawn extends GameSave { --- 24,29 ---- package jake2.game; ! import jake2.qcommon.Com; ! import jake2.util.Lib; public class GameSpawn extends GameSave { *************** *** 596,600 **** if (item.classname == null) continue; ! if (0 == Lib.stricmp(item.classname, ent.classname)) { // found it SpawnItem(ent, item); return; --- 595,599 ---- if (item.classname == null) continue; ! if (item.classname.equalsIgnoreCase(ent.classname)) { // found it SpawnItem(ent, item); return; *************** *** 603,607 **** for (i=0; (s = spawns[i]) !=null && s.name != null; i++) { ! if (0 == Lib.stricmp(s.name, ent.classname)) { // found it if (s.spawn == null) --- 602,606 ---- for (i=0; (s = spawns[i]) !=null && s.name != null; i++) { ! if (s.name.equalsIgnoreCase(ent.classname)) { // found it if (s.spawn == null) Index: Cmd.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/Cmd.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Cmd.java 9 Jul 2004 06:50:49 -0000 1.3 --- Cmd.java 23 Jul 2004 10:07:14 -0000 1.4 *************** *** 396,400 **** for (cmd= cmd_functions; cmd != null; cmd= cmd.next) { ! if (0 == strcmp(cmd_name, cmd.name)) return true; } --- 396,400 ---- for (cmd= cmd_functions; cmd != null; cmd= cmd.next) { ! if (cmd.name.equals(cmd_name)) return true; } *************** *** 1198,1204 **** if (arg0) { ! strcat(text, gi.argv(0)); ! strcat(text, " "); ! strcat(text, gi.args()); } else --- 1198,1204 ---- if (arg0) { ! text += gi.argv(0); ! text += " "; ! text += gi.args(); } else *************** *** 1225,1229 **** text= text.substring(0, 150); ! strcat(text, "\n"); if (flood_msgs.value != 0) --- 1225,1229 ---- text= text.substring(0, 150); ! text += "\n"; if (flood_msgs.value != 0) |
From: Holger Z. <hz...@us...> - 2004-07-23 10:03:01
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10345/src/jake2/client Modified Files: Menu.java Key.java Log Message: replace Lib functions Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Menu.java 9 Jul 2004 06:50:50 -0000 1.4 --- Menu.java 23 Jul 2004 10:02:49 -0000 1.5 *************** *** 2532,2536 **** // ignore if duplicated for (i = 0; i < m_num_servers; i++) ! if (0 == strcmp(x, local_server_names[i])) return; --- 2532,2536 ---- // ignore if duplicated for (i = 0; i < m_num_servers; i++) ! if (x.equals(local_server_names[i])) return; *************** *** 3925,3929 **** for (s = 0, k = 0; k < npcxfiles - 1; k++) { ! if (!strstr(pcxnames[k], "_i.pcx")) { if (IconOfSkinExists(pcxnames[k], pcxnames, npcxfiles - 1)) { a = pcxnames[k].lastIndexOf('/'); --- 3925,3929 ---- for (s = 0, k = 0; k < npcxfiles - 1; k++) { ! if (pcxnames[k].indexOf("_i.pcx") < 0) { if (IconOfSkinExists(pcxnames[k], pcxnames, npcxfiles - 1)) { a = pcxnames[k].lastIndexOf('/'); Index: Key.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Key.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Key.java 9 Jul 2004 06:50:50 -0000 1.4 --- Key.java 23 Jul 2004 10:02:49 -0000 1.5 *************** *** 616,620 **** if (history_line == Globals.edit_line) history_line = (Globals.edit_line + 1) & 31; ! Lib.strcpy(Globals.key_lines[Globals.edit_line], Globals.key_lines[history_line]); Globals.key_linepos = Lib.strlen(Globals.key_lines[Globals.edit_line]); return; --- 616,621 ---- if (history_line == Globals.edit_line) history_line = (Globals.edit_line + 1) & 31; ! //Lib.strcpy(Globals.key_lines[Globals.edit_line], Globals.key_lines[history_line]); ! System.arraycopy(Globals.key_lines[history_line], 0, Globals.key_lines[Globals.edit_line], 0, Globals.key_lines[Globals.edit_line].length); Globals.key_linepos = Lib.strlen(Globals.key_lines[Globals.edit_line]); return; *************** *** 633,637 **** } else { ! Lib.strcpy(Globals.key_lines[Globals.edit_line], Globals.key_lines[history_line]); Globals.key_linepos = Lib.strlen(Globals.key_lines[Globals.edit_line]); } --- 634,639 ---- } else { ! //Lib.strcpy(Globals.key_lines[Globals.edit_line], Globals.key_lines[history_line]); ! System.arraycopy(Globals.key_lines[history_line], 0, Globals.key_lines[Globals.edit_line], 0, Globals.key_lines[Globals.edit_line].length); Globals.key_linepos = Lib.strlen(Globals.key_lines[Globals.edit_line]); } |
From: Carsten W. <ca...@us...> - 2004-07-20 16:14:47
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31526/src/jake2/game Modified Files: PlayerHud.java Log Message: hack removed Index: PlayerHud.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/PlayerHud.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PlayerHud.java 9 Jul 2004 06:50:49 -0000 1.3 --- PlayerHud.java 20 Jul 2004 16:14:37 -0000 1.4 *************** *** 99,113 **** level.intermissiontime = level.time; ! ! // TODO: BIG HACK TO IGNORE CINEMATIC ! ! String xxx = targ.map; ! int pos = xxx.indexOf(".cin"); ! if (pos != -1) ! level.changemap = xxx.substring(pos + 5); // including "+" ! else ! level.changemap = xxx; ! // ------------------------ ! //level.changemap = targ.map; if (level.changemap.indexOf('*') > -1) { if (coop.value != 0) { --- 99,104 ---- level.intermissiontime = level.time; ! level.changemap = targ.map; ! if (level.changemap.indexOf('*') > -1) { if (coop.value != 0) { |
From: Holger Z. <hz...@us...> - 2004-07-20 11:02:34
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9624/src/jake2/qcommon Modified Files: Cvar.java Log Message: replace atof() Index: Cvar.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Cvar.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Cvar.java 7 Jul 2004 19:59:30 -0000 1.1.1.1 --- Cvar.java 20 Jul 2004 11:02:24 -0000 1.2 *************** *** 133,137 **** var.string = value; ! var.value = Lib.atof(var.string); var.flags = flags; --- 133,142 ---- var.string = value; ! try { ! var.value = Float.parseFloat(var.string); ! } catch (Exception e) { ! var.value = 0.0f; ! } ! var.flags = flags; *************** *** 187,197 **** if (Com.ServerState() != 0) { Com.Printf(var_name + " will be changed for next game.\n"); - //var.latched_string = CopyString(value); var.latched_string = value; } else { - //var.string = CopyString(value); var.string = value; ! var.value = Lib.atof(var.string); if (var.name.equals("game")) { FS.SetGamedir(var.string); --- 192,204 ---- if (Com.ServerState() != 0) { Com.Printf(var_name + " will be changed for next game.\n"); var.latched_string = value; } else { var.string = value; ! try { ! var.value = Float.parseFloat(var.string); ! } catch (Exception e) { ! var.value = 0.0f; ! } if (var.name.equals("game")) { FS.SetGamedir(var.string); *************** *** 217,225 **** Globals.userinfo_modified = true; // transmit at next oportunity - //Z_Free(var.string); // free the old value string - - //var.string = CopyString(value); var.string = value; ! var.value = Lib.atof(var.string); return var; --- 224,233 ---- Globals.userinfo_modified = true; // transmit at next oportunity var.string = value; ! try { ! var.value = Float.parseFloat(var.string); ! } catch (Exception e) { ! var.value = 0.0f; ! } return var; *************** *** 312,316 **** if (var == null) return 0; ! return Lib.atof(var.string); } --- 320,328 ---- if (var == null) return 0; ! float val = 0.0f; ! try { ! val = Float.parseFloat(var.string); ! } catch (Exception e) {} ! return val; } |
From: Holger Z. <hz...@us...> - 2004-07-19 19:40:08
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4704/src/jake2/render/fastjogl Modified Files: Image.java Mesh.java Model.java Surf.java Main.java Light.java Log Message: profiling Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Model.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Model.java 16 Jul 2004 10:11:35 -0000 1.3 --- Model.java 19 Jul 2004 19:39:57 -0000 1.4 *************** *** 1085,1089 **** { buffer.get(nameBuf); ! skinNames[i] = new String(nameBuf).trim(); mod.skins[i] = GL_FindImage(skinNames[i], it_skin); } --- 1085,1093 ---- { buffer.get(nameBuf); ! skinNames[i] = new String(nameBuf); ! int n = skinNames[i].indexOf('\0'); ! if (n > -1) { ! skinNames[i] = skinNames[i].substring(0, n); ! } mod.skins[i] = GL_FindImage(skinNames[i], it_skin); } Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Main.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Main.java 16 Jul 2004 10:11:35 -0000 1.3 --- Main.java 19 Jul 2004 19:39:57 -0000 1.4 *************** *** 503,511 **** color = sourceColors.get(i); gl.glColor4ub( ! (byte)((color >> 0) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)((color >> 16) & 0xFF), ! (byte)((color >> 24) & 0xFF) ); // first vertex --- 503,512 ---- color = sourceColors.get(i); + gl.glColor4ub( ! (byte)((color) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)((color >> 16) & 0xFF), ! (byte)((color >>> 24)) ); // first vertex *************** *** 719,735 **** */ void R_SetupGL() { - float screenaspect; - int x, x2, y2, y, w, h; // // set up viewport // ! x = (int) Math.floor(r_newrefdef.x * vid.width / vid.width); ! x2 = (int) Math.ceil((r_newrefdef.x + r_newrefdef.width) * vid.width / vid.width); ! y = (int) Math.floor(vid.height - r_newrefdef.y * vid.height / vid.height); ! y2 = (int) Math.ceil(vid.height - (r_newrefdef.y + r_newrefdef.height) * vid.height / vid.height); ! w = x2 - x; ! h = y - y2; gl.glViewport(x, y2, w, h); --- 720,738 ---- */ void R_SetupGL() { // // set up viewport // ! //int x = (int) Math.floor(r_newrefdef.x * vid.width / vid.width); ! int x = r_newrefdef.x; ! //int x2 = (int) Math.ceil((r_newrefdef.x + r_newrefdef.width) * vid.width / vid.width); ! int x2 = r_newrefdef.x + r_newrefdef.width; ! //int y = (int) Math.floor(vid.height - r_newrefdef.y * vid.height / vid.height); ! int y = vid.height - r_newrefdef.y; ! //int y2 = (int) Math.ceil(vid.height - (r_newrefdef.y + r_newrefdef.height) * vid.height / vid.height); ! int y2 = vid.height - (r_newrefdef.y + r_newrefdef.height); ! int w = x2 - x; ! int h = y - y2; gl.glViewport(x, y2, w, h); *************** *** 738,742 **** // set up projection matrix // ! screenaspect = (float) r_newrefdef.width / r_newrefdef.height; gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); --- 741,745 ---- // set up projection matrix // ! float screenaspect = (float) r_newrefdef.width / r_newrefdef.height; gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); *************** *** 1169,1176 **** } - // #ifdef __linux__ - Cvar.SetValue("gl_finish", 1); - // #endif - // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { --- 1172,1175 ---- Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Surf.java 16 Jul 2004 10:11:35 -0000 1.3 --- Surf.java 19 Jul 2004 19:39:57 -0000 1.4 *************** *** 974,981 **** void R_MarkLeaves() { ! byte[] vis; //byte[] fatvis = new byte[Defines.MAX_MAP_LEAFS / 8]; ! Arrays.fill(fatvis, (byte)0); mnode_t node; --- 974,981 ---- void R_MarkLeaves() { ! //byte[] vis; //byte[] fatvis = new byte[Defines.MAX_MAP_LEAFS / 8]; ! //Arrays.fill(fatvis, (byte)0); mnode_t node; *************** *** 1006,1010 **** } ! vis = Mod_ClusterPVS(r_viewcluster, r_worldmodel); // may have to combine two clusters because of solid water boundaries if (r_viewcluster2 != r_viewcluster) --- 1006,1010 ---- } ! byte[] vis = Mod_ClusterPVS(r_viewcluster, r_worldmodel); // may have to combine two clusters because of solid water boundaries if (r_viewcluster2 != r_viewcluster) Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Image.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Image.java 16 Jul 2004 10:11:35 -0000 1.4 --- Image.java 19 Jul 2004 19:39:57 -0000 1.5 *************** *** 1466,1476 **** image_t GL_FindImage(String name, int type) { image_t image = null; ! ! // TODO loest das grossschreibungs problem ! name = name.toLowerCase(); ! // bughack for bad strings (fuck \0) ! int index = name.indexOf('\0'); ! if (index != -1) ! name = name.substring(0, index); if (name == null || name.length() < 5) --- 1466,1476 ---- image_t GL_FindImage(String name, int type) { image_t image = null; ! ! // // TODO loest das grossschreibungs problem ! // name = name.toLowerCase(); ! // // bughack for bad strings (fuck \0) ! // int index = name.indexOf('\0'); ! // if (index != -1) ! // name = name.substring(0, index); if (name == null || name.length() < 5) *************** *** 1492,1495 **** --- 1492,1496 ---- // load the pic from disk // + image = null; byte[] pic = null; Dimension dim = new Dimension(); *************** *** 1518,1523 **** } - else - return null; return image; --- 1519,1522 ---- Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Light.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Light.java 16 Jul 2004 10:11:35 -0000 1.5 --- Light.java 19 Jul 2004 19:39:57 -0000 1.6 *************** *** 571,575 **** // memset( s_blocklights, 0, sizeof( s_blocklights[0] ) * size * 3 ); ! Arrays.fill(s_blocklights, 0, size * 3, 0.0f); for (maps = 0 ; maps < Defines.MAXLIGHTMAPS && surf.styles[maps] != (byte)255 ; --- 571,575 ---- // memset( s_blocklights, 0, sizeof( s_blocklights[0] ) * size * 3 ); ! //Arrays.fill(s_blocklights, 0, size * 3, 0.0f); for (maps = 0 ; maps < Defines.MAXLIGHTMAPS && surf.styles[maps] != (byte)255 ; Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Mesh.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Mesh.java 16 Jul 2004 10:11:35 -0000 1.4 --- Mesh.java 19 Jul 2004 19:39:57 -0000 1.5 *************** *** 69,76 **** 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; --- 69,74 ---- float[] shadedots = r_avertexnormal_dots[0]; ! void GL_LerpVerts(int nverts, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, float[] move, float[] frontv, float[] backv ) { int[] ovv; int[] vv; *************** *** 86,95 **** 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; } } --- 84,92 ---- normal = r_avertexnormals[verts[i].lightnormalindex]; ovv = ov[i].v; ! vv = verts[i].v; ! lerp.put(j++, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); ! lerp.put(j++, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); ! lerp.put(j++, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); } } *************** *** 100,109 **** { 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; } } --- 97,105 ---- { ovv = ov[i].v; ! vv = verts[i].v; ! lerp.put(j++, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0]); ! lerp.put(j++, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1]); ! lerp.put(j++, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2]); } } *************** *** 130,159 **** void GL_DrawAliasFrameLerp(qfiles.dmdl_t paliashdr, float backlerp) { - float l; - qfiles.daliasframe_t frame, oldframe; - qfiles.dtrivertx_t[] v, ov, verts; - - int[] order; - int orderIndex = 0; int count; - - float frontlerp; float alpha; ! float[] move = {0, 0, 0}; // vec3_t ! float[] frontv = {0, 0, 0}; // vec3_t float[] backv = {0, 0, 0}; // vec3_t ! int i; ! int index_xyz; ! ! frame = paliashdr.aliasFrames[currententity.frame]; ! verts = v = frame.verts; ! oldframe = paliashdr.aliasFrames[currententity.oldframe]; ! ov = oldframe.verts; if ((currententity.flags & Defines.RF_TRANSLUCENT) != 0) --- 126,143 ---- void GL_DrawAliasFrameLerp(qfiles.dmdl_t paliashdr, float backlerp) { int count; float alpha; ! float[] move = {0, 0, 0}; // vec3_t float[] frontv = {0, 0, 0}; // vec3_t float[] backv = {0, 0, 0}; // vec3_t ! qfiles.daliasframe_t frame = paliashdr.aliasFrames[currententity.frame]; ! qfiles.dtrivertx_t[] verts = frame.verts; ! qfiles.daliasframe_t oldframe = paliashdr.aliasFrames[currententity.oldframe]; ! qfiles.dtrivertx_t[] ov = oldframe.verts; if ((currententity.flags & Defines.RF_TRANSLUCENT) != 0) *************** *** 166,170 **** gl.glDisable( GL.GL_TEXTURE_2D ); ! frontlerp = 1.0f - backlerp; // move should be the delta back to the previous frame * backlerp --- 150,154 ---- gl.glDisable( GL.GL_TEXTURE_2D ); ! float frontlerp = 1.0f - backlerp; // move should be the delta back to the previous frame * backlerp *************** *** 178,182 **** Math3D.VectorAdd (move, oldframe.translate, move); ! for (i=0 ; i<3 ; i++) { move[i] = backlerp*move[i] + frontlerp*frame.translate[i]; --- 162,166 ---- Math3D.VectorAdd (move, oldframe.translate, move); ! for (int i=0 ; i<3 ; i++) { move[i] = backlerp*move[i] + frontlerp*frame.translate[i]; *************** *** 187,191 **** // ab hier wird optimiert ! GL_LerpVerts( paliashdr.num_xyz, v, ov, verts, move, frontv, backv ); //gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); --- 171,175 ---- // ab hier wird optimiert ! GL_LerpVerts( paliashdr.num_xyz, ov, verts, move, frontv, backv ); //gl.glEnableClientState( GL.GL_VERTEX_ARRAY ); *************** *** 207,211 **** FloatBuffer color = colorArrayBuf; int j = 0; ! for ( i = 0; i < paliashdr.num_xyz; i++ ) { l = shadedots[verts[i].lightnormalindex]; --- 191,196 ---- FloatBuffer color = colorArrayBuf; int j = 0; ! float l; ! for (int i = 0; i < paliashdr.num_xyz; i++ ) { l = shadedots[verts[i].lightnormalindex]; *************** *** 242,259 **** srcIndexBuf = paliashdr.indexElements[j]; ! size = (count < 0) ? -count + pos : count + pos; for (int k = pos; k < size; k++) { - srcIndex = 2 * k; dstIndex = 2 * srcIndexBuf.get(k-pos); ! dstTextureCoords.put(dstIndex, srcTextureCoords.get(srcIndex)); ! dstTextureCoords.put(dstIndex + 1, srcTextureCoords.get(srcIndex + 1)); } ! if (count < 0) { ! count = -count; ! gl.glDrawElements(GL.GL_TRIANGLE_FAN, count, GL.GL_UNSIGNED_INT, srcIndexBuf); ! } else { ! gl.glDrawElements(GL.GL_TRIANGLE_STRIP, count, GL.GL_UNSIGNED_INT, srcIndexBuf); ! } pos += count; } --- 227,245 ---- srcIndexBuf = paliashdr.indexElements[j]; ! int mode = GL.GL_TRIANGLE_STRIP; ! if (count < 0) { ! mode = GL.GL_TRIANGLE_FAN; ! count = -count; ! } ! size = count + pos; ! srcIndex = 2 * pos; for (int k = pos; k < size; k++) { dstIndex = 2 * srcIndexBuf.get(k-pos); ! dstTextureCoords.put(dstIndex++, srcTextureCoords.get(srcIndex++)); ! dstTextureCoords.put(dstIndex, srcTextureCoords.get(srcIndex++)); } ! gl.glDrawElements(mode, count, GL.GL_UNSIGNED_INT, srcIndexBuf); ! pos += count; } *************** *** 337,355 **** */ // TODO sync with jogl renderer. hoz ! boolean R_CullAliasModel(entity_t e) ! { ! float[] mins = {0, 0, 0}; ! float[] maxs = {0, 0, 0}; ! ! qfiles.dmdl_t paliashdr = (qfiles.dmdl_t)currentmodel.extradata; ! if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) ! { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } ! if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) ! { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } --- 323,338 ---- */ // TODO sync with jogl renderer. hoz ! boolean R_CullAliasModel(entity_t e) { ! float[] mins = { 0, 0, 0 }; ! float[] maxs = { 0, 0, 0 }; ! qfiles.dmdl_t paliashdr = (qfiles.dmdl_t) currentmodel.extradata; ! ! if ((e.frame >= paliashdr.num_frames) || (e.frame < 0)) { ! VID.Printf(Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such frame " + e.frame + '\n'); e.frame = 0; } ! if ((e.oldframe >= paliashdr.num_frames) || (e.oldframe < 0)) { ! VID.Printf(Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } *************** *** 361,395 **** ** compute axially aligned mins and maxs */ ! if ( pframe == poldframe ) ! { ! for ( int i = 0; i < 3; i++ ) ! { mins[i] = pframe.translate[i]; ! maxs[i] = mins[i] + pframe.scale[i]*255; } ! } ! else ! { ! //float[] thismins = {0, 0, 0}; ! //float[] oldmins = {0, 0, 0}; ! float[] thismaxs = {0, 0, 0}; ! float[] oldmaxs = {0, 0, 0}; ! for ( int i = 0; i < 3; i++ ) ! { ! //thismins[i] = pframe.translate[i]; ! thismaxs[i] = pframe.translate[i] + pframe.scale[i]*255; ! //oldmins[i] = poldframe.translate[i]; ! oldmaxs[i] = poldframe.translate[i] + poldframe.scale[i]*255; ! if ( pframe.translate[i] < poldframe.translate[i] ) mins[i] = pframe.translate[i]; else mins[i] = poldframe.translate[i]; ! if ( thismaxs[i] > oldmaxs[i] ) ! maxs[i] = thismaxs[i]; else ! maxs[i] = oldmaxs[i]; } } --- 344,368 ---- ** compute axially aligned mins and maxs */ ! if (pframe == poldframe) { ! for (int i = 0; i < 3; i++) { mins[i] = pframe.translate[i]; ! maxs[i] = mins[i] + pframe.scale[i] * 255; } ! } else { ! float thismaxs, oldmaxs; ! for (int i = 0; i < 3; i++) { ! thismaxs = pframe.translate[i] + pframe.scale[i] * 255; ! oldmaxs = poldframe.translate[i] + poldframe.scale[i] * 255; ! if (pframe.translate[i] < poldframe.translate[i]) mins[i] = pframe.translate[i]; else mins[i] = poldframe.translate[i]; ! if (thismaxs > oldmaxs) ! maxs[i] = thismaxs; else ! maxs[i] = oldmaxs; } } *************** *** 398,421 **** ** compute a full bounding box */ ! float[] tmp = {0, 0, 0}; ! for ( int i = 0; i < 8; i++ ) ! { ! ! if ( (i & 1) != 0 ) tmp[0] = mins[0]; else tmp[0] = maxs[0]; ! if ( (i & 2) != 0) tmp[1] = mins[1]; else tmp[1] = maxs[1]; ! if ( (i & 4) != 0) tmp[2] = mins[2]; else tmp[2] = maxs[2]; - - Math3D.VectorCopy( tmp, bbox[i] ); } --- 371,391 ---- ** compute a full bounding box */ ! float[] tmp; ! for (int i = 0; i < 8; i++) { ! tmp = bbox[i]; ! if ((i & 1) != 0) tmp[0] = mins[0]; else tmp[0] = maxs[0]; ! if ((i & 2) != 0) tmp[1] = mins[1]; else tmp[1] = maxs[1]; ! if ((i & 4) != 0) tmp[2] = mins[2]; else tmp[2] = maxs[2]; } *************** *** 423,456 **** ** rotate the bounding box */ ! //float[] angles = {0, 0, 0}; ! Math3D.VectorCopy( e.angles, tmp ); tmp[YAW] = -tmp[YAW]; ! Math3D.AngleVectors( tmp, vectors[0], vectors[1], vectors[2] ); ! for ( int i = 0; i < 8; i++ ) ! { ! Math3D.VectorCopy( bbox[i], tmp ); ! bbox[i][0] = Math3D.DotProduct( vectors[0], tmp ); ! bbox[i][1] = -Math3D.DotProduct( vectors[1], tmp ); ! bbox[i][2] = Math3D.DotProduct( vectors[2], tmp ); ! Math3D.VectorAdd( e.origin, bbox[i], bbox[i] ); } int f, mask; int aggregatemask = ~0; // 0xFFFFFFFF ! ! for ( int p = 0; p < 8; p++ ) ! { mask = 0; ! for ( f = 0; f < 4; f++ ) ! { ! float dp = Math3D.DotProduct( frustum[f].normal, bbox[p] ); ! if ( ( dp - frustum[f].dist ) < 0 ) ! { ! mask |= ( 1 << f ); } } --- 393,422 ---- ** rotate the bounding box */ ! tmp = mins; ! Math3D.VectorCopy(e.angles, tmp); tmp[YAW] = -tmp[YAW]; ! Math3D.AngleVectors(tmp, vectors[0], vectors[1], vectors[2]); ! for (int i = 0; i < 8; i++) { ! Math3D.VectorCopy(bbox[i], tmp); ! bbox[i][0] = Math3D.DotProduct(vectors[0], tmp); ! bbox[i][1] = -Math3D.DotProduct(vectors[1], tmp); ! bbox[i][2] = Math3D.DotProduct(vectors[2], tmp); ! Math3D.VectorAdd(e.origin, bbox[i], bbox[i]); } int f, mask; int aggregatemask = ~0; // 0xFFFFFFFF ! ! for (int p = 0; p < 8; p++) { mask = 0; ! for (f = 0; f < 4; f++) { ! float dp = Math3D.DotProduct(frustum[f].normal, bbox[p]); ! if ((dp - frustum[f].dist) < 0) { ! mask |= (1 << f); } } *************** *** 459,464 **** } ! if ( aggregatemask != 0 ) ! { return true; } --- 425,429 ---- } ! if (aggregatemask != 0) { return true; } |
From: Holger Z. <hz...@us...> - 2004-07-19 19:32:24
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3109/src/jake2/util Modified Files: Math3D.java Log Message: profiling Index: Math3D.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Math3D.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Math3D.java 8 Jul 2004 20:56:54 -0000 1.4 --- Math3D.java 19 Jul 2004 19:32:12 -0000 1.5 *************** *** 316,334 **** public static void ProjectPointOnPlane(float[] dst, float[] p, float[] normal) { - float d; - float[] n = { 0.0f, 0.0f, 0.0f }; - float inv_denom; ! inv_denom = 1.0F / Math3D.DotProduct(normal, normal); ! d = Math3D.DotProduct(normal, p) * inv_denom; ! n[0] = normal[0] * inv_denom; ! n[1] = normal[1] * inv_denom; ! n[2] = normal[2] * inv_denom; ! dst[0] = p[0] - d * n[0]; ! dst[1] = p[1] - d * n[1]; ! dst[2] = p[2] - d * n[2]; } --- 316,331 ---- public static void ProjectPointOnPlane(float[] dst, float[] p, float[] normal) { ! float inv_denom = 1.0F / Math3D.DotProduct(normal, normal); ! float d = Math3D.DotProduct(normal, p) * inv_denom; ! dst[0] = normal[0] * inv_denom; ! dst[1] = normal[1] * inv_denom; ! dst[2] = normal[2] * inv_denom; ! dst[0] = p[0] - d * dst[0]; ! dst[1] = p[1] - d * dst[1]; ! dst[2] = p[2] - d * dst[2]; } *************** *** 362,366 **** durch Entfernung und Senkrechten-Normale gegeben ist. erste Version mit vec3_t... */ - public static final int BoxOnPlaneSide(float emins[], float emaxs[], cplane_t p) { --- 359,362 ---- *************** *** 428,432 **** return sides; ! } // this is the slow, general version --- 424,428 ---- return sides; ! } // this is the slow, general version *************** *** 457,473 **** public static void AngleVectors(float[] angles, float[] forward, float[] right, float[] up) { - float angle; - float sr, sp, sy, cr, cp, cy; ! cr = 2.0f * piratio; ! angle = (float) (angles[Defines.YAW] * (cr)); ! sy = (float) Math.sin(angle); ! cy = (float) Math.cos(angle); angle = (float) (angles[Defines.PITCH] * (cr)); ! sp = (float) Math.sin(angle); ! cp = (float) Math.cos(angle); ! angle = (float) (angles[Defines.ROLL] * (cr)); ! sr = (float) Math.sin(angle); ! cr = (float) Math.cos(angle); if (forward != null) { --- 453,464 ---- public static void AngleVectors(float[] angles, float[] forward, float[] right, float[] up) { ! float cr = 2.0f * piratio; ! float angle = (float) (angles[Defines.YAW] * (cr)); ! float sy = (float) Math.sin(angle); ! float cy = (float) Math.cos(angle); angle = (float) (angles[Defines.PITCH] * (cr)); ! float sp = (float) Math.sin(angle); ! float cp = (float) Math.cos(angle); if (forward != null) { *************** *** 476,488 **** forward[2] = -sp; } ! if (right != null) { ! right[0] = (-sr * sp * cy + cr * sy); ! right[1] = (-sr * sp * sy + -cr * cy); ! right[2] = -sr * cp; ! } ! if (up != null) { ! up[0] = (cr * sp * cy + -sr * -sy); ! up[1] = (cr * sp * sy + -sr * cy); ! up[2] = cr * cp; } } --- 467,486 ---- forward[2] = -sp; } ! ! if (right != null || up != null) { ! angle = (float) (angles[Defines.ROLL] * (cr)); ! float sr = (float) Math.sin(angle); ! cr = (float) Math.cos(angle); ! ! if (right != null) { ! right[0] = (-sr * sp * cy + cr * sy); ! right[1] = (-sr * sp * sy + -cr * cy); ! right[2] = -sr * cp; ! } ! if (up != null) { ! up[0] = (cr * sp * cy + sr * sy); ! up[1] = (cr * sp * sy + -sr * cy); ! up[2] = cr * cp; ! } } } |
From: Holger Z. <hz...@us...> - 2004-07-19 19:23:07
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1366/src/jake2/sys Modified Files: InputListener.java Sys.java IN.java Log Message: profiling Index: InputListener.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/InputListener.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** InputListener.java 7 Jul 2004 19:59:51 -0000 1.1.1.1 --- InputListener.java 19 Jul 2004 19:22:57 -0000 1.2 *************** *** 44,52 **** static Jake2InputEvent nextEvent() { ! Jake2InputEvent ev = null; synchronized (eventQueue) { ! try { ! ev = (Jake2InputEvent)eventQueue.removeFirst(); ! } catch (Exception e) {} } return ev; --- 44,50 ---- static Jake2InputEvent nextEvent() { ! Jake2InputEvent ev; synchronized (eventQueue) { ! ev = (!eventQueue.isEmpty())?(Jake2InputEvent)eventQueue.removeFirst():null; } return ev; Index: IN.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/IN.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IN.java 8 Jul 2004 15:58:46 -0000 1.2 --- IN.java 19 Jul 2004 19:22:57 -0000 1.3 *************** *** 91,95 **** public static void toggleMouse() { ! if (mouse_active) { mouse_avail=false; DeactivateMouse(); --- 91,95 ---- public static void toggleMouse() { ! if (mouse_avail) { mouse_avail=false; DeactivateMouse(); Index: Sys.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/Sys.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Sys.java 9 Jul 2004 06:50:47 -0000 1.4 --- Sys.java 19 Jul 2004 19:22:57 -0000 1.5 *************** *** 26,43 **** package jake2.sys; - import java.io.File; - import java.io.FilenameFilter; - import java.util.regex.Pattern; - import java.util.regex.PatternSyntaxException; - import jake2.Defines; import jake2.Globals; import jake2.client.CL; - import jake2.game.Game; - import jake2.game.game_export_t; - import jake2.game.game_import_t; import jake2.qcommon.Com; import jake2.util.Lib; /** * Sys --- 26,40 ---- package jake2.sys; import jake2.Defines; import jake2.Globals; import jake2.client.CL; import jake2.qcommon.Com; import jake2.util.Lib; + import java.io.File; + import java.io.FilenameFilter; + import java.util.regex.Pattern; + import java.util.regex.PatternSyntaxException; + /** * Sys *************** *** 188,200 **** } ! private static long secbase = 0; public static int Milliseconds() { ! if (secbase == 0) { ! secbase = System.currentTimeMillis(); ! return 0; ! } ! ! return Globals.curtime = (int) (System.currentTimeMillis() - secbase); ! } --- 185,191 ---- } ! private static long secbase = System.currentTimeMillis(); public static int Milliseconds() { ! return Globals.curtime = (int) (System.currentTimeMillis() - secbase); } |
From: Holger Z. <hz...@us...> - 2004-07-19 19:20:35
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv720/src/jake2/client Modified Files: CL_pred.java Console.java Log Message: profiling Index: Console.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Console.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Console.java 8 Jul 2004 15:58:42 -0000 1.2 --- Console.java 19 Jul 2004 19:20:22 -0000 1.3 *************** *** 168,175 **** */ public static void CheckResize() { ! int i, j, width, oldwidth, oldtotallines, numlines, numchars; ! byte[] tbuf = new byte[Defines.CON_TEXTSIZE]; ! ! width = (Globals.viddef.width >> 3) - 2; if (width == Globals.con.linewidth) --- 168,173 ---- */ public static void CheckResize() { ! ! int width = (Globals.viddef.width >> 3) - 2; if (width == Globals.con.linewidth) *************** *** 183,205 **** } else { ! oldwidth = Globals.con.linewidth; Globals.con.linewidth = width; ! oldtotallines = Globals.con.totallines; Globals.con.totallines = Defines.CON_TEXTSIZE / Globals.con.linewidth; ! numlines = oldtotallines; if (Globals.con.totallines < numlines) numlines = Globals.con.totallines; ! numchars = oldwidth; if (Globals.con.linewidth < numchars) numchars = Globals.con.linewidth; ! System.arraycopy(Globals.con.text, 0, tbuf, 0, Defines.CON_TEXTSIZE); Arrays.fill(Globals.con.text, (byte)' '); ! for (i=0 ; i<numlines ; i++) { ! for (j=0 ; j<numchars ; j++) { Globals.con.text[(Globals.con.totallines - 1 - i) * Globals.con.linewidth + j] = tbuf[((Globals.con.current - i + oldtotallines) % oldtotallines) * oldwidth + j]; --- 181,204 ---- } else { ! int oldwidth = Globals.con.linewidth; Globals.con.linewidth = width; ! int oldtotallines = Globals.con.totallines; Globals.con.totallines = Defines.CON_TEXTSIZE / Globals.con.linewidth; ! int numlines = oldtotallines; if (Globals.con.totallines < numlines) numlines = Globals.con.totallines; ! int numchars = oldwidth; if (Globals.con.linewidth < numchars) numchars = Globals.con.linewidth; ! ! byte[] tbuf = new byte[Defines.CON_TEXTSIZE]; System.arraycopy(Globals.con.text, 0, tbuf, 0, Defines.CON_TEXTSIZE); Arrays.fill(Globals.con.text, (byte)' '); ! for (int i=0 ; i<numlines ; i++) { ! for (int j=0 ; j<numchars ; j++) { Globals.con.text[(Globals.con.totallines - 1 - i) * Globals.con.linewidth + j] = tbuf[((Globals.con.current - i + oldtotallines) % oldtotallines) * oldwidth + j]; Index: CL_pred.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_pred.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CL_pred.java 8 Jul 2004 20:24:28 -0000 1.3 --- CL_pred.java 19 Jul 2004 19:20:22 -0000 1.4 *************** *** 244,248 **** }; ! PMove.pm_airaccelerate = atof(cl.configstrings[CS_AIRACCEL]); // bugfix (rst) yeah !!!!!!!! found the solution to the B E W E G U N G S P R O B L E M. --- 244,252 ---- }; ! try { ! PMove.pm_airaccelerate = Float.parseFloat(cl.configstrings[CS_AIRACCEL]); ! } catch (Exception e) { ! PMove.pm_airaccelerate = 0; ! } // bugfix (rst) yeah !!!!!!!! found the solution to the B E W E G U N G S P R O B L E M. |
From: Carsten W. <ca...@us...> - 2004-07-16 12:12:38
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28648/src/jake2/render Modified Files: JoglBase.java Log Message: this will solve the flickering bug on "Loading" (but only with a new JOGL-release) Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JoglBase.java 16 Jul 2004 10:11:34 -0000 1.4 --- JoglBase.java 16 Jul 2004 12:12:29 -0000 1.5 *************** *** 200,203 **** --- 200,206 ---- canvas.setNoAutoRedrawMode(true); + // TODO this and a new JOGL-release solves the flickering bug (Loading) + // change also GLimp_EndFrame() + // canvas.setAutoSwapBufferMode(false); canvas.addGLEventListener(this); *************** *** 294,298 **** gl.glFlush(); // swap buffer ! // but jogl has no method to swap } protected void GLimp_BeginFrame(float camera_separation) { --- 297,302 ---- gl.glFlush(); // swap buffer ! // TODO this and a new JOGL-release solves the flickering bug (Loading) ! // canvas.swapBuffers(); } protected void GLimp_BeginFrame(float camera_separation) { |
From: Carsten W. <ca...@us...> - 2004-07-16 10:11:51
|
Update of /cvsroot/jake2/jake2/test/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/test/jake2/render Modified Files: DebugCulling.java TestRenderer.java DancingQueens.java TestMap.java Log Message: refimport_t deleted Index: TestMap.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestMap.java 15 Jul 2004 14:38:40 -0000 1.4 --- TestMap.java 16 Jul 2004 10:11:36 -0000 1.5 *************** *** 54,58 **** refexport_t re; - refimport_t ri; viddef_t viddef; int framecount = 0; --- 54,57 ---- *************** *** 74,187 **** { - // only for testing - // a simple refimport_t implementation - ri = new refimport_t() - { - public void Sys_Error(int err_level, String str) - { - Com.Error(err_level, str, null); - } - - public void Sys_Error(int err_level, String str, Vargs vargs) - { - Com.Error(err_level, str, vargs); - } - - public void Cmd_AddCommand(String name, xcommand_t cmd) - { - Cmd.AddCommand(name, cmd); - } - - public void Cmd_RemoveCommand(String name) - { - Cmd.RemoveCommand(name); - } - - public int Cmd_Argc() - { - return Cmd.Argc(); - } - - public String Cmd_Argv(int i) - { - return Cmd.Argv(i); - } - - public void Cmd_ExecuteText(int exec_when, String text) - { - Cbuf.ExecuteText(exec_when, text); - } - - public void Con_Printf(int print_level, String str) - { - VID.Printf(print_level, str, null); - } - - public void Con_Printf(int print_level, String str, Vargs vargs) - { - VID.Printf(print_level, str, vargs); - } - - public byte[] FS_LoadFile(String name) - { - return FS.LoadFile(name); - } - - public int FS_FileLength(String name) - { - return FS.FileLength(name); - } - - public void FS_FreeFile(byte[] buf) - { - FS.FreeFile(buf); - } - - public String FS_Gamedir() - { - return FS.Gamedir(); - } - - public cvar_t Cvar_Get(String name, String value, int flags) - { - return Cvar.Get(name, value, flags); - } - - public cvar_t Cvar_Set(String name, String value) - { - return Cvar.Set(name, value); - } - - public void Cvar_SetValue(String name, float value) - { - Cvar.SetValue(name, value); - } - - public boolean Vid_GetModeInfo(Dimension dim, int mode) - { - return VID.GetModeInfo(dim, mode); - } - - public void Vid_MenuInit() - { - VID.MenuInit(); - } - - public void Vid_NewWindow(int width, int height) - { - VID.NewWindow(width, height); - } - - public void updateScreenCallback() - { - TestMap.this.updateScreen(); - } - }; - Qcommon.Init(new String[] { "TestMap $Id$" }); // sehr wichtig !!! VID.Shutdown(); ! this.re = Renderer.getDriver("jogl", ri); re.Init(0, 0); --- 73,81 ---- { Qcommon.Init(new String[] { "TestMap $Id$" }); // sehr wichtig !!! VID.Shutdown(); ! this.re = Renderer.getDriver("jogl"); re.Init(0, 0); Index: DebugCulling.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/DebugCulling.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebugCulling.java 15 Jul 2004 14:38:40 -0000 1.2 --- DebugCulling.java 16 Jul 2004 10:11:36 -0000 1.3 *************** *** 51,55 **** refexport_t re; - refimport_t ri; viddef_t viddef; int framecount = 0; --- 51,54 ---- *************** *** 71,184 **** { - // only for testing - // a simple refimport_t implementation - ri = new refimport_t() - { - public void Sys_Error(int err_level, String str) - { - Com.Error(err_level, str, null); - } - - public void Sys_Error(int err_level, String str, Vargs vargs) - { - Com.Error(err_level, str, vargs); - } - - public void Cmd_AddCommand(String name, xcommand_t cmd) - { - Cmd.AddCommand(name, cmd); - } - - public void Cmd_RemoveCommand(String name) - { - Cmd.RemoveCommand(name); - } - - public int Cmd_Argc() - { - return Cmd.Argc(); - } - - public String Cmd_Argv(int i) - { - return Cmd.Argv(i); - } - - public void Cmd_ExecuteText(int exec_when, String text) - { - Cbuf.ExecuteText(exec_when, text); - } - - public void Con_Printf(int print_level, String str) - { - VID.Printf(print_level, str, null); - } - - public void Con_Printf(int print_level, String str, Vargs vargs) - { - VID.Printf(print_level, str, vargs); - } - - public byte[] FS_LoadFile(String name) - { - return FS.LoadFile(name); - } - - public int FS_FileLength(String name) - { - return FS.FileLength(name); - } - - public void FS_FreeFile(byte[] buf) - { - FS.FreeFile(buf); - } - - public String FS_Gamedir() - { - return FS.Gamedir(); - } - - public cvar_t Cvar_Get(String name, String value, int flags) - { - return Cvar.Get(name, value, flags); - } - - public cvar_t Cvar_Set(String name, String value) - { - return Cvar.Set(name, value); - } - - public void Cvar_SetValue(String name, float value) - { - Cvar.SetValue(name, value); - } - - public boolean Vid_GetModeInfo(Dimension dim, int mode) - { - return VID.GetModeInfo(dim, mode); - } - - public void Vid_MenuInit() - { - VID.MenuInit(); - } - - public void Vid_NewWindow(int width, int height) - { - VID.NewWindow(width, height); - } - - public void updateScreenCallback() - { - DebugCulling.this.updateScreen(); - } - }; - Qcommon.Init(new String[] { "$Id$" }); // sehr wichtig !!! VID.Shutdown(); ! this.re = Renderer.getDriver("jogl", ri); re.Init(0, 0); --- 70,78 ---- { Qcommon.Init(new String[] { "$Id$" }); // sehr wichtig !!! VID.Shutdown(); ! this.re = Renderer.getDriver("jogl"); re.Init(0, 0); *************** *** 318,322 **** if (fov_x < 1 || fov_x > 179) ! ri.Sys_Error(Defines.ERR_DROP, "Bad fov: " + fov_x); x = width / Math.tan(fov_x / 360 * Math.PI); --- 212,216 ---- if (fov_x < 1 || fov_x > 179) ! Com.Error(Defines.ERR_DROP, "Bad fov: " + fov_x); x = width / Math.tan(fov_x / 360 * Math.PI); Index: TestRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestRenderer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestRenderer.java 15 Jul 2004 14:38:40 -0000 1.4 --- TestRenderer.java 16 Jul 2004 10:11:36 -0000 1.5 *************** *** 49,53 **** refexport_t re; - refimport_t ri; viddef_t viddef; int framecount = 0; --- 49,52 ---- *************** *** 67,155 **** void init() { - // only for testing - // a simple refimport_t implementation - ri = new refimport_t() { - public void Sys_Error(int err_level, String str) { - Com.Error(err_level, str, null); - } - - public void Sys_Error(int err_level, String str, Vargs vargs) { - Com.Error(err_level, str, vargs); - } - - public void Cmd_AddCommand(String name, xcommand_t cmd) { - Cmd.AddCommand(name, cmd); - } - - public void Cmd_RemoveCommand(String name) { - Cmd.RemoveCommand(name); - } - - public int Cmd_Argc() { - return Cmd.Argc(); - } - - public String Cmd_Argv(int i) { - return Cmd.Argv(i); - } - - public void Cmd_ExecuteText(int exec_when, String text) { - Cbuf.ExecuteText(exec_when, text); - } - - public void Con_Printf(int print_level, String str) { - VID.Printf(print_level, str, null); - } - - public void Con_Printf(int print_level, String str, Vargs vargs) { - VID.Printf(print_level, str, vargs); - } - - public byte[] FS_LoadFile(String name) { - return FS.LoadFile(name); - } - - public int FS_FileLength(String name) { - return FS.FileLength(name); - } - - public void FS_FreeFile(byte[] buf) { - FS.FreeFile(buf); - } - - public String FS_Gamedir() { - return FS.Gamedir(); - } - - public cvar_t Cvar_Get(String name, String value, int flags) { - return Cvar.Get(name, value, flags); - } - - public cvar_t Cvar_Set(String name, String value) { - return Cvar.Set(name, value); - } - - public void Cvar_SetValue(String name, float value) { - Cvar.SetValue(name, value); - } - - public boolean Vid_GetModeInfo(Dimension dim, int mode) { - return VID.GetModeInfo(dim, mode); - } - - public void Vid_MenuInit() { - VID.MenuInit(); - } - - public void Vid_NewWindow(int width, int height) { - VID.NewWindow(width, height); - } - - public void updateScreenCallback() { - TestRenderer.this.updateScreen(); - } - }; - - Qcommon.Init(new String[] {"TestRenderer"}); // sehr wichtig !!! --- 66,69 ---- *************** *** 159,163 **** System.out.println("Registered Drivers: " + Arrays.asList(names)); ! this.re = Renderer.getDriver("jogl", ri); System.out.println("Use driver: " + re); --- 73,77 ---- System.out.println("Registered Drivers: " + Arrays.asList(names)); ! this.re = Renderer.getDriver("jogl"); System.out.println("Use driver: " + re); Index: DancingQueens.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/DancingQueens.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DancingQueens.java 15 Jul 2004 14:38:40 -0000 1.4 --- DancingQueens.java 16 Jul 2004 10:11:36 -0000 1.5 *************** *** 51,55 **** refexport_t re; - refimport_t ri; viddef_t viddef; int framecount = 0; --- 51,54 ---- *************** *** 68,156 **** void init() { - // only for testing - // a simple refimport_t implementation - ri = new refimport_t() { - public void Sys_Error(int err_level, String str) { - Com.Error(err_level, str, null); - } - - public void Sys_Error(int err_level, String str, Vargs vargs) { - Com.Error(err_level, str, vargs); - } - - public void Cmd_AddCommand(String name, xcommand_t cmd) { - Cmd.AddCommand(name, cmd); - } - - public void Cmd_RemoveCommand(String name) { - Cmd.RemoveCommand(name); - } - - public int Cmd_Argc() { - return Cmd.Argc(); - } - - public String Cmd_Argv(int i) { - return Cmd.Argv(i); - } - - public void Cmd_ExecuteText(int exec_when, String text) { - Cbuf.ExecuteText(exec_when, text); - } - - public void Con_Printf(int print_level, String str) { - VID.Printf(print_level, str, null); - } - - public void Con_Printf(int print_level, String str, Vargs vargs) { - VID.Printf(print_level, str, vargs); - } - - public byte[] FS_LoadFile(String name) { - return FS.LoadFile(name); - } - - public int FS_FileLength(String name) { - return FS.FileLength(name); - } - - public void FS_FreeFile(byte[] buf) { - FS.FreeFile(buf); - } - - public String FS_Gamedir() { - return FS.Gamedir(); - } - - public cvar_t Cvar_Get(String name, String value, int flags) { - return Cvar.Get(name, value, flags); - } - - public cvar_t Cvar_Set(String name, String value) { - return Cvar.Set(name, value); - } - - public void Cvar_SetValue(String name, float value) { - Cvar.SetValue(name, value); - } - - public boolean Vid_GetModeInfo(Dimension dim, int mode) { - return VID.GetModeInfo(dim, mode); - } - - public void Vid_MenuInit() { - VID.MenuInit(); - } - - public void Vid_NewWindow(int width, int height) { - VID.NewWindow(width, height); - } - - public void updateScreenCallback() { - DancingQueens.this.updateScreen(); - } - }; - - Qcommon.Init(new String[] {"DancingQueens"}); // sehr wichtig !!! --- 67,70 ---- *************** *** 160,164 **** System.out.println("Registered Drivers: " + Arrays.asList(names)); ! this.re = Renderer.getDriver("fastjogl", ri); System.out.println("Use driver: " + re); --- 74,78 ---- System.out.println("Registered Drivers: " + Arrays.asList(names)); ! this.re = Renderer.getDriver("fastjogl"); System.out.println("Use driver: " + re); |
From: Carsten W. <ca...@us...> - 2004-07-16 10:11:51
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/src/jake2/render/fastjogl Modified Files: Light.java Image.java Misc.java Mesh.java Draw.java Surf.java Model.java Warp.java Main.java Log Message: refimport_t deleted Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Model.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Model.java 12 Jul 2004 22:08:02 -0000 1.2 --- Model.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.game.cplane_t; import jake2.game.cvar_t; *************** *** 75,79 **** if (model == null || model.nodes == null) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node --- 76,80 ---- if (model == null || model.nodes == null) ! Com.Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node *************** *** 172,176 **** total = 0; ! ri.Con_Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { --- 173,177 ---- total = 0; ! VID.Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { *************** *** 179,186 **** continue; ! ri.Con_Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! ri.Con_Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } --- 180,187 ---- continue; ! VID.Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! VID.Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } *************** *** 214,218 **** if (name == null || name.length() == 0) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // --- 215,219 ---- if (name == null || name.length() == 0) ! Com.Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // *************** *** 223,227 **** i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! ri.Sys_Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } --- 224,228 ---- i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! Com.Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } *************** *** 253,257 **** { if (mod_numknown == MAX_MOD_KNOWN) ! ri.Sys_Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; --- 254,258 ---- { if (mod_numknown == MAX_MOD_KNOWN) ! Com.Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; *************** *** 263,272 **** // load the file // ! fileBuffer = ri.FS_LoadFile(name); if (fileBuffer == null) { if (crash) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; --- 264,273 ---- // load the file // ! fileBuffer = FS.LoadFile(name); if (fileBuffer == null) { if (crash) ! Com.Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; *************** *** 303,307 **** break; default: ! ri.Sys_Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } --- 304,308 ---- break; default: ! Com.Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } *************** *** 385,389 **** if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; --- 386,390 ---- if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; *************** *** 432,436 **** if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; --- 433,437 ---- if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; *************** *** 472,476 **** if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; --- 473,477 ---- if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; *************** *** 505,509 **** if ((l.filelen % texinfo_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; --- 506,510 ---- if ((l.filelen % texinfo_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; *************** *** 535,539 **** out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } --- 536,540 ---- out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! VID.Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } *************** *** 617,621 **** if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; --- 618,622 ---- if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; *************** *** 651,655 **** ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; --- 652,656 ---- ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; *************** *** 723,727 **** if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; --- 724,728 ---- if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; *************** *** 780,784 **** if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; --- 781,785 ---- if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; *************** *** 825,829 **** if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); --- 826,830 ---- if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); *************** *** 840,844 **** j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; --- 841,845 ---- j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! Com.Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; *************** *** 858,866 **** if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; --- 859,867 ---- if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; *************** *** 890,894 **** if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; --- 891,895 ---- if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; *************** *** 933,937 **** loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! ri.Sys_Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); --- 934,938 ---- loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! Com.Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); *************** *** 939,943 **** i = header.version; if (i != Defines.BSPVERSION) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; --- 940,944 ---- i = header.version; if (i != Defines.BSPVERSION) ! Com.Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; *************** *** 973,977 **** starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! ri.Sys_Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); --- 974,978 ---- starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! Com.Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); *************** *** 1011,1034 **** if (pheader.version != qfiles.ALIAS_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! ri.Sys_Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // --- 1012,1035 ---- if (pheader.version != qfiles.ALIAS_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! Com.Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! Com.Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // *************** *** 1125,1133 **** if (sprout.version != qfiles.SPRITE_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! ri.Sys_Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); --- 1126,1134 ---- if (sprout.version != qfiles.SPRITE_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! Com.Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); *************** *** 1164,1168 **** // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = ri.Cvar_Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); --- 1165,1169 ---- // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = Cvar.Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Main.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Main.java 15 Jul 2004 14:37:33 -0000 1.2 --- Main.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 29,34 **** --- 29,36 ---- import jake2.Globals; import jake2.client.*; + import jake2.game.*; import jake2.game.cplane_t; import jake2.game.cvar_t; + import jake2.qcommon.*; import jake2.qcommon.qfiles; import jake2.qcommon.xcommand_t; *************** *** 421,425 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 423,427 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 455,459 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 457,461 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 827,835 **** // included by cwei if (r_newrefdef == null) { ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { --- 829,837 ---- // included by cwei if (r_newrefdef == null) { ! Com.Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! Com.Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { *************** *** 864,868 **** if (r_speeds.value != 0.0f) { ! ri.Con_Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", --- 866,870 ---- if (r_speeds.value != 0.0f) { ! VID.Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", *************** *** 931,1002 **** protected void R_Register() { ! r_lefthand = ri.Cvar_Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = ri.Cvar_Get("r_norefresh", "0", 0); ! r_fullbright = ri.Cvar_Get("r_fullbright", "0", 0); ! r_drawentities = ri.Cvar_Get("r_drawentities", "1", 0); ! r_drawworld = ri.Cvar_Get("r_drawworld", "1", 0); ! r_novis = ri.Cvar_Get("r_novis", "0", 0); ! r_nocull = ri.Cvar_Get("r_nocull", "0", 0); ! r_lerpmodels = ri.Cvar_Get("r_lerpmodels", "1", 0); ! r_speeds = ri.Cvar_Get("r_speeds", "0", 0); ! r_lightlevel = ri.Cvar_Get("r_lightlevel", "1", 0); ! gl_nosubimage = ri.Cvar_Get("gl_nosubimage", "0", 0); ! gl_allow_software = ri.Cvar_Get("gl_allow_software", "0", 0); ! gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = ri.Cvar_Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = ri.Cvar_Get("gl_log", "0", 0); ! gl_bitdepth = ri.Cvar_Get("gl_bitdepth", "0", 0); ! gl_mode = ri.Cvar_Get("gl_mode", "3", Globals.CVAR_ARCHIVE); // 640x480 ! gl_lightmap = ri.Cvar_Get("gl_lightmap", "0", 0); ! gl_shadows = ri.Cvar_Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = ri.Cvar_Get("gl_dynamic", "1", 0); ! gl_nobind = ri.Cvar_Get("gl_nobind", "0", 0); ! gl_round_down = ri.Cvar_Get("gl_round_down", "1", 0); ! gl_picmip = ri.Cvar_Get("gl_picmip", "0", 0); ! gl_skymip = ri.Cvar_Get("gl_skymip", "0", 0); ! gl_showtris = ri.Cvar_Get("gl_showtris", "0", 0); ! gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0); ! gl_finish = ri.Cvar_Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = ri.Cvar_Get("gl_clear", "0", 0); ! gl_cull = ri.Cvar_Get("gl_cull", "1", 0); ! gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0); ! gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0); ! gl_playermip = ri.Cvar_Get("gl_playermip", "0", 0); ! gl_monolightmap = ri.Cvar_Get("gl_monolightmap", "0", 0); ! gl_driver = ri.Cvar_Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = ri.Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = ri.Cvar_Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = ri.Cvar_Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = ri.Cvar_Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = ri.Cvar_Get("gl_vertex_arrays", "1", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = ri.Cvar_Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = ri.Cvar_Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = ri.Cvar_Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = ri.Cvar_Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = ri.Cvar_Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = ri.Cvar_Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = ri.Cvar_Get("gl_swapinterval", "0", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = ri.Cvar_Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = ri.Cvar_Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = ri.Cvar_Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = ri.Cvar_Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = ri.Cvar_Get("vid_ref", "fastjogl", Globals.CVAR_ARCHIVE); ! ri.Cmd_AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); --- 933,1004 ---- protected void R_Register() { ! r_lefthand = Cvar.Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = Cvar.Get("r_norefresh", "0", 0); ! r_fullbright = Cvar.Get("r_fullbright", "0", 0); ! r_drawentities = Cvar.Get("r_drawentities", "1", 0); ! r_drawworld = Cvar.Get("r_drawworld", "1", 0); ! r_novis = Cvar.Get("r_novis", "0", 0); ! r_nocull = Cvar.Get("r_nocull", "0", 0); ! r_lerpmodels = Cvar.Get("r_lerpmodels", "1", 0); ! r_speeds = Cvar.Get("r_speeds", "0", 0); ! r_lightlevel = Cvar.Get("r_lightlevel", "1", 0); ! gl_nosubimage = Cvar.Get("gl_nosubimage", "0", 0); ! gl_allow_software = Cvar.Get("gl_allow_software", "0", 0); ! gl_particle_min_size = Cvar.Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = Cvar.Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = Cvar.Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = Cvar.Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = Cvar.Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = Cvar.Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = Cvar.Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = Cvar.Get("gl_log", "0", 0); ! gl_bitdepth = Cvar.Get("gl_bitdepth", "0", 0); ! gl_mode = Cvar.Get("gl_mode", "3", Globals.CVAR_ARCHIVE); // 640x480 ! gl_lightmap = Cvar.Get("gl_lightmap", "0", 0); ! gl_shadows = Cvar.Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = Cvar.Get("gl_dynamic", "1", 0); ! gl_nobind = Cvar.Get("gl_nobind", "0", 0); ! gl_round_down = Cvar.Get("gl_round_down", "1", 0); ! gl_picmip = Cvar.Get("gl_picmip", "0", 0); ! gl_skymip = Cvar.Get("gl_skymip", "0", 0); ! gl_showtris = Cvar.Get("gl_showtris", "0", 0); ! gl_ztrick = Cvar.Get("gl_ztrick", "0", 0); ! gl_finish = Cvar.Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = Cvar.Get("gl_clear", "0", 0); ! gl_cull = Cvar.Get("gl_cull", "1", 0); ! gl_polyblend = Cvar.Get("gl_polyblend", "1", 0); ! gl_flashblend = Cvar.Get("gl_flashblend", "0", 0); ! gl_playermip = Cvar.Get("gl_playermip", "0", 0); ! gl_monolightmap = Cvar.Get("gl_monolightmap", "0", 0); ! gl_driver = Cvar.Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = Cvar.Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = Cvar.Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = Cvar.Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = Cvar.Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = Cvar.Get("gl_vertex_arrays", "1", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = Cvar.Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = Cvar.Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = Cvar.Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = Cvar.Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = Cvar.Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = Cvar.Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = Cvar.Get("gl_swapinterval", "0", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = Cvar.Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = Cvar.Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = Cvar.Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = Cvar.Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = Cvar.Get("vid_ref", "fastjogl", Globals.CVAR_ARCHIVE); ! Cmd.AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); *************** *** 1004,1018 **** }); ! ri.Cmd_AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! ri.Cmd_AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! ri.Cmd_AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); --- 1006,1020 ---- }); ! Cmd.AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! Cmd.AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! Cmd.AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); *************** *** 1032,1037 **** // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // ri.Con_Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // ri.Cvar_SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } --- 1034,1039 ---- // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // VID.Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // Cvar.SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } *************** *** 1049,1067 **** else { if (err == rserr_invalid_fullscreen) { ! ri.Cvar_SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! ri.Cvar_SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } --- 1051,1069 ---- else { if (err == rserr_invalid_fullscreen) { ! Cvar.SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! Cvar.SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } *************** *** 1086,1090 **** } ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); --- 1088,1092 ---- } ! VID.Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); *************** *** 1097,1101 **** // create the window and set up the context if (!R_SetMode()) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } --- 1099,1103 ---- // create the window and set up the context if (!R_SetMode()) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } *************** *** 1104,1108 **** protected boolean R_Init2() { ! ri.Vid_MenuInit(); /* --- 1106,1110 ---- protected boolean R_Init2() { ! VID.MenuInit(); /* *************** *** 1110,1120 **** */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); --- 1112,1122 ---- */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); *************** *** 1147,1158 **** if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! ri.Cvar_Set("gl_monolightmap", "A"); ! ri.Con_Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("gl_monolightmap", "0"); } else { ! ri.Cvar_Set("gl_monolightmap", "0"); } } --- 1149,1160 ---- if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! Cvar.Set("gl_monolightmap", "A"); ! VID.Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("gl_monolightmap", "0"); } else { ! Cvar.Set("gl_monolightmap", "0"); } } *************** *** 1161,1177 **** // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("scr_drawall", "1"); } else { ! ri.Cvar_Set("scr_drawall", "0"); } // #ifdef __linux__ ! ri.Cvar_SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! ri.Cvar_SetValue("gl_finish", 1); } --- 1163,1179 ---- // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("scr_drawall", "1"); } else { ! Cvar.Set("scr_drawall", "0"); } // #ifdef __linux__ ! Cvar.SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! Cvar.SetValue("gl_finish", 1); } *************** *** 1187,1193 **** if (gl_config.allow_cds) ! ri.Con_Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! ri.Con_Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* --- 1189,1195 ---- if (gl_config.allow_cds) ! VID.Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! VID.Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* *************** *** 1196,1200 **** if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) --- 1198,1202 ---- if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! VID.Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) *************** *** 1206,1210 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); qglLockArraysEXT = false; } --- 1208,1212 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); qglLockArraysEXT = false; } *************** *** 1212,1219 **** if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! ri.Con_Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } --- 1214,1221 ---- if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! VID.Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! VID.Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } *************** *** 1223,1234 **** qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } --- 1225,1236 ---- qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } *************** *** 1238,1242 **** // if ( gl_ext_palettedtexture->value ) // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; --- 1240,1244 ---- // if ( gl_ext_palettedtexture->value ) // { ! // VID.Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; *************** *** 1244,1253 **** // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif --- 1246,1255 ---- // else // { ! // VID.Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // VID.Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif *************** *** 1257,1274 **** && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); qglActiveTextureARB = true; GL_TEXTURE0 = GL.GL_TEXTURE0_ARB; --- 1259,1276 ---- && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); qglActiveTextureARB = true; GL_TEXTURE0 = GL.GL_TEXTURE0_ARB; *************** *** 1276,1280 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); } --- 1278,1282 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); } *************** *** 1291,1295 **** int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! ri.Con_Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", --- 1293,1297 ---- int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! VID.Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", *************** *** 1305,1312 **** */ protected void R_Shutdown() { ! ri.Cmd_RemoveCommand("modellist"); ! ri.Cmd_RemoveCommand("screenshot"); ! ri.Cmd_RemoveCommand("imagelist"); ! ri.Cmd_RemoveCommand("gl_strings"); Mod_FreeAll(); --- 1307,1314 ---- */ protected void R_Shutdown() { ! Cmd.RemoveCommand("modellist"); ! Cmd.RemoveCommand("screenshot"); ! Cmd.RemoveCommand("imagelist"); ! Cmd.RemoveCommand("gl_strings"); Mod_FreeAll(); *************** *** 1336,1340 **** cvar_t ref; ! ref = ri.Cvar_Get("vid_ref", "fastjogl", 0); ref.modified = true; } --- 1338,1342 ---- cvar_t ref; ! ref = Cvar.Get("vid_ref", "fastjogl", 0); ref.modified = true; } *************** *** 1369,1373 **** putenv( envbuffer ); */ ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } --- 1371,1375 ---- putenv( envbuffer ); */ ! VID.Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Surf.java 12 Jul 2004 18:19:42 -0000 1.2 --- Surf.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- import jake2.client.*; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Lib; *************** *** 1106,1110 **** gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! ri.Sys_Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); --- 1107,1111 ---- gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! Com.Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); *************** *** 1259,1263 **** if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! ri.Sys_Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } --- 1260,1264 ---- if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! Com.Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Image.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Image.java 12 Jul 2004 22:08:02 -0000 1.3 --- Image.java 16 Jul 2004 10:11:35 -0000 1.4 *************** *** 27,32 **** --- 27,34 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.particle_t; import jake2.game.cvar_t; + import jake2.qcommon.*; import jake2.qcommon.longjmpException; import jake2.qcommon.qfiles; *************** *** 246,250 **** if (i == NUM_GL_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } --- 248,252 ---- if (i == NUM_GL_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } *************** *** 280,284 **** if (i == NUM_GL_ALPHA_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } --- 282,286 ---- if (i == NUM_GL_ALPHA_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } *************** *** 300,304 **** if (i == NUM_GL_SOLID_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } --- 302,306 ---- if (i == NUM_GL_SOLID_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } *************** *** 318,322 **** final String[] palstrings = { "RGB", "PAL" }; ! ri.Con_Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; --- 320,324 ---- final String[] palstrings = { "RGB", "PAL" }; ! VID.Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; *************** *** 329,349 **** switch (image.type) { case it_skin : ! ri.Con_Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! ri.Con_Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! ri.Con_Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! ri.Con_Printf(Defines.PRINT_ALL, "P"); break; default : ! ri.Con_Printf(Defines.PRINT_ALL, " "); break; } ! ri.Con_Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", --- 331,351 ---- switch (image.type) { case it_skin : ! VID.Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! VID.Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! VID.Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! VID.Printf(Defines.PRINT_ALL, "P"); break; default : ! VID.Printf(Defines.PRINT_ALL, " "); break; } ! VID.Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", *************** *** 351,355 **** image.name)); } ! ri.Con_Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } --- 353,357 ---- image.name)); } ! VID.Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } *************** *** 447,454 **** // load the file // ! byte[] raw = ri.FS_LoadFile(filename); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } --- 449,456 ---- // load the file // ! byte[] raw = FS.LoadFile(filename); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } *************** *** 466,470 **** || pcx.ymax >= 480) { ! ri.Con_Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } --- 468,472 ---- || pcx.ymax >= 480) { ! VID.Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } *************** *** 542,550 **** // load the file // ! raw = ri.FS_LoadFile (name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } --- 544,552 ---- // load the file // ! raw = FS.LoadFile(name); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } *************** *** 553,560 **** if (targa_header.image_type != 2 && targa_header.image_type != 10) ! ri.Sys_Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! ri.Sys_Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; --- 555,562 ---- if (targa_header.image_type != 2 && targa_header.image_type != 10) ! Com.Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! Com.Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; *************** *** 1089,1093 **** if (scaled_width * scaled_height > 256 * 256) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha --- 1091,1095 ---- if (scaled_width * scaled_height > 256 * 256) ! Com.Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha *************** *** 1107,1111 **** comp = gl_tex_alpha_format; else { ! ri.Con_Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } --- 1109,1113 ---- comp = gl_tex_alpha_format; else { ! VID.Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } *************** *** 1249,1253 **** if (s > trans.length) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { --- 1251,1255 ---- if (s > trans.length) ! Com.Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { *************** *** 1316,1320 **** { if (numgltextures == MAX_GLTEXTURES) ! ri.Sys_Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; --- 1318,1322 ---- { if (numgltextures == MAX_GLTEXTURES) ! Com.Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; *************** *** 1323,1327 **** if (name.length() > Defines.MAX_QPATH) ! ri.Sys_Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; --- 1325,1329 ---- if (name.length() > Defines.MAX_QPATH) ! Com.Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; *************** *** 1439,1445 **** image_t image = null; ! byte[] raw = ri.FS_LoadFile(name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } --- 1441,1447 ---- image_t image = null; ! byte[] raw = FS.LoadFile(name); if (raw == null) { ! VID.Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } *************** *** 1473,1478 **** if (name == null || name.length() < 5) ! return null; // ri.Sys_Error (ERR_DROP, "GL_FindImage: NULL name"); ! // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it --- 1475,1480 ---- if (name == null || name.length() < 5) ! return null; // Com.Error (ERR_DROP, "GL_FindImage: NULL name"); ! // Com.Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it *************** *** 1582,1586 **** if (palette[0] == null || palette[0].length != 768) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; --- 1584,1588 ---- if (palette[0] == null || palette[0].length != 768) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; *************** *** 1612,1619 **** // init intensity conversions ! intensity = ri.Cvar_Get("intensity", "2", 0); if (intensity.value <= 1) ! ri.Cvar_Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; --- 1614,1621 ---- // init intensity conversions ! intensity = Cvar.Get("intensity", "2", 0); if (intensity.value <= 1) ! Cvar.Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; *************** *** 1622,1628 **** if (qglColorTableEXT) { ! gl_state.d_16to8table = ri.FS_LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } --- 1624,1630 ---- if (qglColorTableEXT) { ! gl_state.d_16to8table = FS.LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Light.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Light.java 12 Jul 2004 22:08:02 -0000 1.4 --- Light.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- import jake2.game.GameBase; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.qcommon.longjmpException; import jake2.render.*; *************** *** 492,496 **** if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! ri.Sys_Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); int smax = (surf.extents[0] >> 4) + 1; --- 493,497 ---- if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! Com.Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); int smax = (surf.extents[0] >> 4) + 1; *************** *** 498,502 **** int size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! ri.Sys_Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { --- 499,503 ---- int size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! Com.Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Warp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Warp.java 12 Jul 2004 22:08:02 -0000 1.2 --- Warp.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 28,31 **** --- 28,32 ---- import jake2.Defines; import jake2.Globals; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Math3D; *************** *** 129,133 **** if (numverts > 60) ! ri.Sys_Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); --- 130,134 ---- if (numverts > 60) ! Com.Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); *************** *** 464,468 **** if (nump > MAX_CLIP_VERTS-2) ! ri.Sys_Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it --- 465,469 ---- if (nump > MAX_CLIP_VERTS-2) ! Com.Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Mesh.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Mesh.java 12 Jul 2004 22:08:02 -0000 1.3 --- Mesh.java 16 Jul 2004 10:11:35 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.entity_t; import jake2.qcommon.qfiles; *************** *** 345,354 **** if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } --- 346,355 ---- if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } *************** *** 684,688 **** || (currententity.frame < 0) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 685,689 ---- || (currententity.frame < 0) ) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; *************** *** 692,696 **** || (currententity.oldframe < 0)) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 693,697 ---- || (currententity.oldframe < 0)) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Draw.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Draw.java 15 Jul 2004 14:37:33 -0000 1.2 --- Draw.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 27,30 **** --- 27,32 ---- import jake2.Defines; + import jake2.client.VID; + import jake2.qcommon.Com; import jake2.render.image_t; *************** *** 137,141 **** if (image == null) { ! ri.Con_Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } --- 139,143 ---- if (image == null) { ! VID.Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } *************** *** 176,180 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } --- 178,182 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } *************** *** 216,220 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } --- 218,222 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } *************** *** 250,254 **** if ( colorIndex > 255) ! ri.Sys_Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); --- 252,256 ---- if ( colorIndex > 255) ! Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); Index: Misc.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Misc.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Misc.java 9 Jul 2004 06:50:48 -0000 1.1 --- Misc.java 16 Jul 2004 10:11:35 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- import jake2.Defines; + import jake2.client.VID; /** *************** *** 144,148 **** // if (i==100) // { ! // ri.Con_Printf (PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n"); // return; // } --- 145,149 ---- // if (i==100) // { ! // VID.Printf (PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n"); // return; // } *************** *** 174,178 **** // // free (buffer); ! // ri.Con_Printf (PRINT_ALL, "Wrote %s\n", picname); } --- 175,179 ---- // // free (buffer); ! // VID.Printf (PRINT_ALL, "Wrote %s\n", picname); } *************** *** 181,188 **** */ void GL_Strings_f() { ! ri.Con_Printf (Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! ri.Con_Printf (Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! ri.Con_Printf (Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! ri.Con_Printf (Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); } --- 182,189 ---- */ void GL_Strings_f() { ! VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); } |
From: Carsten W. <ca...@us...> - 2004-07-16 10:11:48
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/src/jake2/render/jogl Modified Files: Main.java Surf.java Draw.java Warp.java Image.java Misc.java Model.java Mesh.java Light.java Log Message: refimport_t deleted Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Model.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Model.java 12 Jul 2004 22:08:03 -0000 1.3 --- Model.java 16 Jul 2004 10:11:35 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.game.cplane_t; import jake2.game.cvar_t; *************** *** 73,77 **** if (model == null || model.nodes == null) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node --- 74,78 ---- if (model == null || model.nodes == null) ! Com.Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node *************** *** 170,174 **** total = 0; ! ri.Con_Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { --- 171,175 ---- total = 0; ! VID.Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { *************** *** 177,184 **** continue; ! ri.Con_Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! ri.Con_Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } --- 178,185 ---- continue; ! VID.Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! VID.Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } *************** *** 212,216 **** if (name == null || name.length() == 0) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // --- 213,217 ---- if (name == null || name.length() == 0) ! Com.Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // *************** *** 221,225 **** i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! ri.Sys_Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } --- 222,226 ---- i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! Com.Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } *************** *** 251,255 **** { if (mod_numknown == MAX_MOD_KNOWN) ! ri.Sys_Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; --- 252,256 ---- { if (mod_numknown == MAX_MOD_KNOWN) ! Com.Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; *************** *** 261,270 **** // load the file // ! fileBuffer = ri.FS_LoadFile(name); if (fileBuffer == null) { if (crash) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; --- 262,271 ---- // load the file // ! fileBuffer = FS.LoadFile(name); if (fileBuffer == null) { if (crash) ! Com.Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; *************** *** 301,305 **** break; default: ! ri.Sys_Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } --- 302,306 ---- break; default: ! Com.Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } *************** *** 383,387 **** if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; --- 384,388 ---- if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; *************** *** 430,434 **** if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; --- 431,435 ---- if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; *************** *** 470,474 **** if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; --- 471,475 ---- if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; *************** *** 503,507 **** if ((l.filelen % texinfo_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; --- 504,508 ---- if ((l.filelen % texinfo_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; *************** *** 533,537 **** out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } --- 534,538 ---- out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! VID.Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } *************** *** 615,619 **** if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; --- 616,620 ---- if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; *************** *** 649,653 **** ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; --- 650,654 ---- ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; *************** *** 721,725 **** if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; --- 722,726 ---- if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; *************** *** 778,782 **** if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; --- 779,783 ---- if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; *************** *** 823,827 **** if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); --- 824,828 ---- if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); *************** *** 838,842 **** j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; --- 839,843 ---- j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! Com.Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; *************** *** 856,864 **** if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; --- 857,865 ---- if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; *************** *** 888,892 **** if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; --- 889,893 ---- if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; *************** *** 931,935 **** loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! ri.Sys_Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); --- 932,936 ---- loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! Com.Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); *************** *** 937,941 **** i = header.version; if (i != Defines.BSPVERSION) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; --- 938,942 ---- i = header.version; if (i != Defines.BSPVERSION) ! Com.Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; *************** *** 971,975 **** starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! ri.Sys_Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); --- 972,976 ---- starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! Com.Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); *************** *** 1009,1032 **** if (pheader.version != qfiles.ALIAS_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! ri.Sys_Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // --- 1010,1033 ---- if (pheader.version != qfiles.ALIAS_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! Com.Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! Com.Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // *************** *** 1121,1129 **** if (sprout.version != qfiles.SPRITE_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! ri.Sys_Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); --- 1122,1130 ---- if (sprout.version != qfiles.SPRITE_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! Com.Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); *************** *** 1157,1161 **** // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = ri.Cvar_Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); --- 1158,1162 ---- // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = Cvar.Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.java 15 Jul 2004 14:37:34 -0000 1.4 --- Main.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import jake2.Globals; import jake2.client.*; + import jake2.game.*; import jake2.game.cplane_t; import jake2.game.cvar_t; *************** *** 420,424 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 421,425 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 454,458 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 455,459 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 826,834 **** // included by cwei if (r_newrefdef == null) { ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { --- 827,835 ---- // included by cwei if (r_newrefdef == null) { ! Com.Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! Com.Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { *************** *** 863,867 **** if (r_speeds.value != 0.0f) { ! ri.Con_Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", --- 864,868 ---- if (r_speeds.value != 0.0f) { ! VID.Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", *************** *** 930,1001 **** protected void R_Register() { ! r_lefthand = ri.Cvar_Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = ri.Cvar_Get("r_norefresh", "0", 0); ! r_fullbright = ri.Cvar_Get("r_fullbright", "0", 0); ! r_drawentities = ri.Cvar_Get("r_drawentities", "1", 0); ! r_drawworld = ri.Cvar_Get("r_drawworld", "1", 0); ! r_novis = ri.Cvar_Get("r_novis", "0", 0); ! r_nocull = ri.Cvar_Get("r_nocull", "0", 0); ! r_lerpmodels = ri.Cvar_Get("r_lerpmodels", "1", 0); ! r_speeds = ri.Cvar_Get("r_speeds", "0", 0); ! r_lightlevel = ri.Cvar_Get("r_lightlevel", "1", 0); ! gl_nosubimage = ri.Cvar_Get("gl_nosubimage", "0", 0); ! gl_allow_software = ri.Cvar_Get("gl_allow_software", "0", 0); ! gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = ri.Cvar_Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = ri.Cvar_Get("gl_log", "0", 0); ! gl_bitdepth = ri.Cvar_Get("gl_bitdepth", "0", 0); ! gl_mode = ri.Cvar_Get("gl_mode", "1", Globals.CVAR_ARCHIVE); ! gl_lightmap = ri.Cvar_Get("gl_lightmap", "0", 0); ! gl_shadows = ri.Cvar_Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = ri.Cvar_Get("gl_dynamic", "1", 0); ! gl_nobind = ri.Cvar_Get("gl_nobind", "0", 0); ! gl_round_down = ri.Cvar_Get("gl_round_down", "1", 0); ! gl_picmip = ri.Cvar_Get("gl_picmip", "0", 0); ! gl_skymip = ri.Cvar_Get("gl_skymip", "0", 0); ! gl_showtris = ri.Cvar_Get("gl_showtris", "0", 0); ! gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0); ! gl_finish = ri.Cvar_Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = ri.Cvar_Get("gl_clear", "0", 0); ! gl_cull = ri.Cvar_Get("gl_cull", "1", 0); ! gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0); ! gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0); ! gl_playermip = ri.Cvar_Get("gl_playermip", "0", 0); ! gl_monolightmap = ri.Cvar_Get("gl_monolightmap", "0", 0); ! gl_driver = ri.Cvar_Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = ri.Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = ri.Cvar_Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = ri.Cvar_Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = ri.Cvar_Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = ri.Cvar_Get("gl_vertex_arrays", "0", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = ri.Cvar_Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = ri.Cvar_Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = ri.Cvar_Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = ri.Cvar_Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = ri.Cvar_Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = ri.Cvar_Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = ri.Cvar_Get("gl_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = ri.Cvar_Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = ri.Cvar_Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = ri.Cvar_Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = ri.Cvar_Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = ri.Cvar_Get("vid_ref", "jogl", Globals.CVAR_ARCHIVE); ! ri.Cmd_AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); --- 931,1002 ---- protected void R_Register() { ! r_lefthand = Cvar.Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = Cvar.Get("r_norefresh", "0", 0); ! r_fullbright = Cvar.Get("r_fullbright", "0", 0); ! r_drawentities = Cvar.Get("r_drawentities", "1", 0); ! r_drawworld = Cvar.Get("r_drawworld", "1", 0); ! r_novis = Cvar.Get("r_novis", "0", 0); ! r_nocull = Cvar.Get("r_nocull", "0", 0); ! r_lerpmodels = Cvar.Get("r_lerpmodels", "1", 0); ! r_speeds = Cvar.Get("r_speeds", "0", 0); ! r_lightlevel = Cvar.Get("r_lightlevel", "1", 0); ! gl_nosubimage = Cvar.Get("gl_nosubimage", "0", 0); ! gl_allow_software = Cvar.Get("gl_allow_software", "0", 0); ! gl_particle_min_size = Cvar.Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = Cvar.Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = Cvar.Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = Cvar.Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = Cvar.Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = Cvar.Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = Cvar.Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = Cvar.Get("gl_log", "0", 0); ! gl_bitdepth = Cvar.Get("gl_bitdepth", "0", 0); ! gl_mode = Cvar.Get("gl_mode", "1", Globals.CVAR_ARCHIVE); ! gl_lightmap = Cvar.Get("gl_lightmap", "0", 0); ! gl_shadows = Cvar.Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = Cvar.Get("gl_dynamic", "1", 0); ! gl_nobind = Cvar.Get("gl_nobind", "0", 0); ! gl_round_down = Cvar.Get("gl_round_down", "1", 0); ! gl_picmip = Cvar.Get("gl_picmip", "0", 0); ! gl_skymip = Cvar.Get("gl_skymip", "0", 0); ! gl_showtris = Cvar.Get("gl_showtris", "0", 0); ! gl_ztrick = Cvar.Get("gl_ztrick", "0", 0); ! gl_finish = Cvar.Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = Cvar.Get("gl_clear", "0", 0); ! gl_cull = Cvar.Get("gl_cull", "1", 0); ! gl_polyblend = Cvar.Get("gl_polyblend", "1", 0); ! gl_flashblend = Cvar.Get("gl_flashblend", "0", 0); ! gl_playermip = Cvar.Get("gl_playermip", "0", 0); ! gl_monolightmap = Cvar.Get("gl_monolightmap", "0", 0); ! gl_driver = Cvar.Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = Cvar.Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = Cvar.Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = Cvar.Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = Cvar.Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = Cvar.Get("gl_vertex_arrays", "0", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = Cvar.Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = Cvar.Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = Cvar.Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = Cvar.Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = Cvar.Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = Cvar.Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = Cvar.Get("gl_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = Cvar.Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = Cvar.Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = Cvar.Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = Cvar.Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = Cvar.Get("vid_ref", "jogl", Globals.CVAR_ARCHIVE); ! Cmd.AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); *************** *** 1003,1017 **** }); ! ri.Cmd_AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! ri.Cmd_AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! ri.Cmd_AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); --- 1004,1018 ---- }); ! Cmd.AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! Cmd.AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! Cmd.AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); *************** *** 1031,1036 **** // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // ri.Con_Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // ri.Cvar_SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } --- 1032,1037 ---- // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // VID.Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // Cvar.SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } *************** *** 1048,1066 **** else { if (err == rserr_invalid_fullscreen) { ! ri.Cvar_SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! ri.Cvar_SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } --- 1049,1067 ---- else { if (err == rserr_invalid_fullscreen) { ! Cvar.SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! Cvar.SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } *************** *** 1085,1089 **** } ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); --- 1086,1090 ---- } ! VID.Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); *************** *** 1096,1100 **** // create the window and set up the context if (!R_SetMode()) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } --- 1097,1101 ---- // create the window and set up the context if (!R_SetMode()) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } *************** *** 1103,1107 **** protected boolean R_Init2() { ! ri.Vid_MenuInit(); /* --- 1104,1108 ---- protected boolean R_Init2() { ! VID.MenuInit(); /* *************** *** 1109,1119 **** */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); --- 1110,1120 ---- */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); *************** *** 1146,1157 **** if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! ri.Cvar_Set("gl_monolightmap", "A"); ! ri.Con_Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("gl_monolightmap", "0"); } else { ! ri.Cvar_Set("gl_monolightmap", "0"); } } --- 1147,1158 ---- if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! Cvar.Set("gl_monolightmap", "A"); ! VID.Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("gl_monolightmap", "0"); } else { ! Cvar.Set("gl_monolightmap", "0"); } } *************** *** 1160,1176 **** // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("scr_drawall", "1"); } else { ! ri.Cvar_Set("scr_drawall", "0"); } // #ifdef __linux__ ! ri.Cvar_SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! ri.Cvar_SetValue("gl_finish", 1); } --- 1161,1177 ---- // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("scr_drawall", "1"); } else { ! Cvar.Set("scr_drawall", "0"); } // #ifdef __linux__ ! Cvar.SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! Cvar.SetValue("gl_finish", 1); } *************** *** 1186,1192 **** if (gl_config.allow_cds) ! ri.Con_Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! ri.Con_Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* --- 1187,1193 ---- if (gl_config.allow_cds) ! VID.Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! VID.Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* *************** *** 1195,1199 **** if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) --- 1196,1200 ---- if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! VID.Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) *************** *** 1205,1217 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); } if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! ri.Con_Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } --- 1206,1218 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); } if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! VID.Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! VID.Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } *************** *** 1221,1232 **** qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } --- 1222,1233 ---- qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } *************** *** 1236,1240 **** // if ( gl_ext_palettedtexture->value ) // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; --- 1237,1241 ---- // if ( gl_ext_palettedtexture->value ) // { ! // VID.Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; *************** *** 1242,1251 **** // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif --- 1243,1252 ---- // else // { ! // VID.Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // VID.Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif *************** *** 1255,1273 **** && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { if (gl_ext_multitexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" ); // qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" ); --- 1256,1274 ---- && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { if (gl_ext_multitexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" ); // qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" ); *************** *** 1280,1289 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); Cvar.SetValue("r_fullbright", 0); } --- 1281,1290 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); Cvar.SetValue("r_fullbright", 0); } *************** *** 1291,1298 **** if (gl_config.extensions_string.indexOf("GL_SGIS_multitexture") >= 0) { if (qglActiveTextureARB) { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 1); } else if (gl_ext_multitexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_SGIS_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" ); // qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" ); --- 1292,1299 ---- if (gl_config.extensions_string.indexOf("GL_SGIS_multitexture") >= 0) { if (qglActiveTextureARB) { ! VID.Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 1); } else if (gl_ext_multitexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_SGIS_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" ); // qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" ); *************** *** 1303,1312 **** // //GL_TEXTURE1 = GL.GL_TEXTURE1_SGIS; } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture not found\n"); if (!qglActiveTextureARB) Cvar.SetValue("r_fullbright", 0); --- 1304,1313 ---- // //GL_TEXTURE1 = GL.GL_TEXTURE1_SGIS; } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture not found\n"); if (!qglActiveTextureARB) Cvar.SetValue("r_fullbright", 0); *************** *** 1322,1326 **** int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! ri.Con_Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", --- 1323,1327 ---- int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! VID.Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", *************** *** 1336,1343 **** */ protected void R_Shutdown() { ! ri.Cmd_RemoveCommand("modellist"); ! ri.Cmd_RemoveCommand("screenshot"); ! ri.Cmd_RemoveCommand("imagelist"); ! ri.Cmd_RemoveCommand("gl_strings"); Mod_FreeAll(); --- 1337,1344 ---- */ protected void R_Shutdown() { ! Cmd.RemoveCommand("modellist"); ! Cmd.RemoveCommand("screenshot"); ! Cmd.RemoveCommand("imagelist"); ! Cmd.RemoveCommand("gl_strings"); Mod_FreeAll(); *************** *** 1367,1371 **** cvar_t ref; ! ref = ri.Cvar_Get("vid_ref", "jogl", 0); ref.modified = true; } --- 1368,1372 ---- cvar_t ref; ! ref = Cvar.Get("vid_ref", "jogl", 0); ref.modified = true; } *************** *** 1400,1404 **** putenv( envbuffer ); */ ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } --- 1401,1405 ---- putenv( envbuffer ); */ ! VID.Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Surf.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Surf.java 12 Jul 2004 18:19:42 -0000 1.4 --- Surf.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import jake2.client.*; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Lib; *************** *** 425,429 **** if ( !LM_AllocBlock( smax, tmax, lightPos) ) { ! ri.Sys_Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax + "," + tmax + ") failed (dynamic)\n"); } --- 426,430 ---- if ( !LM_AllocBlock( smax, tmax, lightPos) ) { ! Com.Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax + "," + tmax + ") failed (dynamic)\n"); } *************** *** 1406,1410 **** gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! ri.Sys_Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); --- 1407,1411 ---- gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! Com.Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); *************** *** 1557,1561 **** if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! ri.Sys_Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } --- 1558,1562 ---- if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! Com.Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Image.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Image.java 12 Jul 2004 22:08:03 -0000 1.4 --- Image.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 27,32 **** --- 27,34 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.particle_t; import jake2.game.cvar_t; + import jake2.qcommon.*; import jake2.qcommon.longjmpException; import jake2.qcommon.qfiles; *************** *** 264,268 **** if (i == NUM_GL_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } --- 266,270 ---- if (i == NUM_GL_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } *************** *** 298,302 **** if (i == NUM_GL_ALPHA_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } --- 300,304 ---- if (i == NUM_GL_ALPHA_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } *************** *** 318,322 **** if (i == NUM_GL_SOLID_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } --- 320,324 ---- if (i == NUM_GL_SOLID_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } *************** *** 336,340 **** final String[] palstrings = { "RGB", "PAL" }; ! ri.Con_Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; --- 338,342 ---- final String[] palstrings = { "RGB", "PAL" }; ! VID.Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; *************** *** 347,367 **** switch (image.type) { case it_skin : ! ri.Con_Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! ri.Con_Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! ri.Con_Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! ri.Con_Printf(Defines.PRINT_ALL, "P"); break; default : ! ri.Con_Printf(Defines.PRINT_ALL, " "); break; } ! ri.Con_Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", --- 349,369 ---- switch (image.type) { case it_skin : ! VID.Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! VID.Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! VID.Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! VID.Printf(Defines.PRINT_ALL, "P"); break; default : ! VID.Printf(Defines.PRINT_ALL, " "); break; } ! VID.Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", *************** *** 369,373 **** image.name)); } ! ri.Con_Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } --- 371,375 ---- image.name)); } ! VID.Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } *************** *** 465,472 **** // load the file // ! byte[] raw = ri.FS_LoadFile(filename); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } --- 467,474 ---- // load the file // ! byte[] raw = FS.LoadFile(filename); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } *************** *** 484,488 **** || pcx.ymax >= 480) { ! ri.Con_Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } --- 486,490 ---- || pcx.ymax >= 480) { ! VID.Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } *************** *** 560,568 **** // load the file // ! raw = ri.FS_LoadFile (name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } --- 562,570 ---- // load the file // ! raw = FS.LoadFile (name); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } *************** *** 571,578 **** if (targa_header.image_type != 2 && targa_header.image_type != 10) ! ri.Sys_Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! ri.Sys_Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; --- 573,580 ---- if (targa_header.image_type != 2 && targa_header.image_type != 10) ! Com.Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! Com.Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; *************** *** 1102,1106 **** if (scaled_width * scaled_height > 256 * 256) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha --- 1104,1108 ---- if (scaled_width * scaled_height > 256 * 256) ! Com.Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha *************** *** 1120,1124 **** comp = gl_tex_alpha_format; else { ! ri.Con_Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } --- 1122,1126 ---- comp = gl_tex_alpha_format; else { ! VID.Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } *************** *** 1263,1267 **** if (s > trans.length) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { --- 1265,1269 ---- if (s > trans.length) ! Com.Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { *************** *** 1330,1334 **** { if (numgltextures == MAX_GLTEXTURES) ! ri.Sys_Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; --- 1332,1336 ---- { if (numgltextures == MAX_GLTEXTURES) ! Com.Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; *************** *** 1337,1341 **** if (name.length() > Defines.MAX_QPATH) ! ri.Sys_Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; --- 1339,1343 ---- if (name.length() > Defines.MAX_QPATH) ! Com.Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; *************** *** 1453,1459 **** image_t image = null; ! byte[] raw = ri.FS_LoadFile(name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } --- 1455,1461 ---- image_t image = null; ! byte[] raw = FS.LoadFile(name); if (raw == null) { ! VID.Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } *************** *** 1487,1492 **** if (name == null || name.length() < 5) ! return null; // ri.Sys_Error (ERR_DROP, "GL_FindImage: NULL name"); ! // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it --- 1489,1494 ---- if (name == null || name.length() < 5) ! return null; // Com.Error (ERR_DROP, "GL_FindImage: NULL name"); ! // Com.Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it *************** *** 1596,1600 **** if (palette[0] == null || palette[0].length != 768) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; --- 1598,1602 ---- if (palette[0] == null || palette[0].length != 768) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; *************** *** 1626,1633 **** // init intensity conversions ! intensity = ri.Cvar_Get("intensity", "2", 0); if (intensity.value <= 1) ! ri.Cvar_Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; --- 1628,1635 ---- // init intensity conversions ! intensity = Cvar.Get("intensity", "2", 0); if (intensity.value <= 1) ! Cvar.Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; *************** *** 1636,1642 **** if (qglColorTableEXT) { ! gl_state.d_16to8table = ri.FS_LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } --- 1638,1644 ---- if (qglColorTableEXT) { ! gl_state.d_16to8table = FS.LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Light.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Light.java 12 Jul 2004 22:08:04 -0000 1.5 --- Light.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 32,35 **** --- 32,36 ---- import jake2.game.GameBase; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.qcommon.longjmpException; import jake2.render.*; *************** *** 504,508 **** if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! ri.Sys_Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); smax = (surf.extents[0] >> 4) + 1; --- 505,509 ---- if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! Com.Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); smax = (surf.extents[0] >> 4) + 1; *************** *** 510,514 **** size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! ri.Sys_Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { --- 511,515 ---- size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! Com.Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Warp.java 12 Jul 2004 22:08:03 -0000 1.5 --- Warp.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- import jake2.Defines; import jake2.Globals; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Math3D; *************** *** 126,130 **** if (numverts > 60) ! ri.Sys_Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); --- 127,131 ---- if (numverts > 60) ! Com.Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); *************** *** 455,459 **** if (nump > MAX_CLIP_VERTS-2) ! ri.Sys_Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it --- 456,460 ---- if (nump > MAX_CLIP_VERTS-2) ! Com.Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Mesh.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Mesh.java 12 Jul 2004 22:08:03 -0000 1.5 --- Mesh.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.entity_t; import jake2.qcommon.qfiles; *************** *** 475,484 **** if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } --- 476,485 ---- if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } *************** *** 810,814 **** || (currententity.frame < 0) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 811,815 ---- || (currententity.frame < 0) ) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; *************** *** 818,822 **** || (currententity.oldframe < 0)) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 819,823 ---- || (currententity.oldframe < 0)) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Draw.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Draw.java 15 Jul 2004 14:37:34 -0000 1.4 --- Draw.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 27,30 **** --- 27,32 ---- import jake2.Defines; + import jake2.client.VID; + import jake2.qcommon.Com; import jake2.render.image_t; *************** *** 137,141 **** if (image == null) { ! ri.Con_Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } --- 139,143 ---- if (image == null) { ! VID.Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } *************** *** 176,180 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } --- 178,182 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } *************** *** 216,220 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } --- 218,222 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } *************** *** 250,254 **** if ( colorIndex > 255) ! ri.Sys_Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); --- 252,256 ---- if ( colorIndex > 255) ! Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); Index: Misc.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Misc.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Misc.java 9 Jul 2004 06:50:48 -0000 1.2 --- Misc.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import net.java.games.jogl.GL; import net.java.games.jogl.WGL; *************** *** 146,150 **** // if (i==100) // { ! // ri.... [truncated message content] |
From: Carsten W. <ca...@us...> - 2004-07-16 10:11:48
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/src/jake2/render Modified Files: Renderer.java JoglBase.java Ref.java JoglRenderer.java FastJoglRenderer.java Log Message: refimport_t deleted Index: JoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglRenderer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JoglRenderer.java 15 Jul 2004 14:37:35 -0000 1.4 --- JoglRenderer.java 16 Jul 2004 10:11:34 -0000 1.5 *************** *** 299,304 **** } ! public refexport_t GetRefAPI(refimport_t rimp) { ! this.ri = rimp; return this; } --- 299,303 ---- } ! public refexport_t GetRefAPI() { return this; } Index: FastJoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/FastJoglRenderer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FastJoglRenderer.java 15 Jul 2004 14:37:35 -0000 1.2 --- FastJoglRenderer.java 16 Jul 2004 10:11:34 -0000 1.3 *************** *** 301,306 **** } ! public refexport_t GetRefAPI(refimport_t rimp) { ! this.ri = rimp; return this; } --- 301,305 ---- } ! public refexport_t GetRefAPI() { return this; } Index: Ref.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Ref.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Ref.java 7 Jul 2004 19:59:34 -0000 1.1.1.1 --- Ref.java 16 Jul 2004 10:11:34 -0000 1.2 *************** *** 27,31 **** import jake2.client.refexport_t; - import jake2.client.refimport_t; /** --- 27,30 ---- *************** *** 39,43 **** // extensions (cwei) // ============================================================================ ! refexport_t GetRefAPI(refimport_t rimp); String getName(); } --- 38,42 ---- // extensions (cwei) // ============================================================================ ! refexport_t GetRefAPI(); String getName(); } Index: Renderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Renderer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Renderer.java 9 Jul 2004 06:50:47 -0000 1.2 --- Renderer.java 16 Jul 2004 10:11:34 -0000 1.3 *************** *** 29,33 **** import jake2.client.refexport_t; - import jake2.client.refimport_t; /** --- 29,32 ---- *************** *** 66,72 **** * @return refexport_t (Renderer singleton) */ ! public static refexport_t getDriver(String driverName, refimport_t rimp) { ! if (rimp == null) ! throw new IllegalArgumentException("refimport_t can't be null"); // find a driver Ref driver = null; --- 65,69 ---- * @return refexport_t (Renderer singleton) */ ! public static refexport_t getDriver(String driverName) { // find a driver Ref driver = null; *************** *** 75,79 **** driver = (Ref) drivers.get(i); if (driver.getName().equals(driverName)) { ! return driver.GetRefAPI(rimp); } } --- 72,76 ---- driver = (Ref) drivers.get(i); if (driver.getName().equals(driverName)) { ! return driver.GetRefAPI(); } } Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JoglBase.java 15 Jul 2004 16:33:24 -0000 1.3 --- JoglBase.java 16 Jul 2004 10:11:34 -0000 1.4 *************** *** 28,34 **** import jake2.Defines; ! import jake2.client.refimport_t; ! import jake2.client.viddef_t; import jake2.game.cvar_t; import jake2.qcommon.xcommand_t; import jake2.sys.KBD; --- 28,34 ---- import jake2.Defines; ! import jake2.client.*; import jake2.game.cvar_t; + import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; import jake2.sys.KBD; *************** *** 50,55 **** // IMPORTED FUNCTIONS - protected refimport_t ri = null; - protected GraphicsDevice device; protected DisplayMode oldDisplayMode; --- 50,53 ---- *************** *** 81,85 **** // if (!post_init) { ! ri.Con_Printf(Defines.PRINT_ALL, "Missing multi-texturing for FastJOGL renderer\n"); } --- 79,83 ---- // if (!post_init) { ! VID.Printf(Defines.PRINT_ALL, "Missing multi-texturing for FastJOGL renderer\n"); } *************** *** 170,176 **** Dimension newDim = new Dimension(); ! ri.Con_Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); ! ri.Con_Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":"); /* --- 168,174 ---- Dimension newDim = new Dimension(); ! VID.Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); ! VID.Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":"); /* *************** *** 184,193 **** } ! if (!ri.Vid_GetModeInfo(newDim, mode)) { ! ri.Con_Printf(Defines.PRINT_ALL, " invalid mode\n"); return rserr_invalid_mode; } ! ri.Con_Printf(Defines.PRINT_ALL, " " + newDim.width + " " + newDim.height + '\n'); // destroy the existing window --- 182,191 ---- } ! if (!VID.GetModeInfo(newDim, mode)) { ! VID.Printf(Defines.PRINT_ALL, " invalid mode\n"); return rserr_invalid_mode; } ! VID.Printf(Defines.PRINT_ALL, " " + newDim.width + " " + newDim.height + '\n'); // destroy the existing window *************** *** 211,215 **** window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { ! ri.Cmd_ExecuteText(Defines.EXEC_APPEND, "quit"); } }); --- 209,213 ---- window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { ! Cbuf.ExecuteText(Defines.EXEC_APPEND, "quit"); } }); *************** *** 239,243 **** canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); ! ri.Con_Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { --- 237,241 ---- canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); ! VID.Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { *************** *** 261,265 **** // let the sound and input subsystems know about the new window ! ri.Vid_NewWindow(vid.width, vid.height); return rserr_ok; --- 259,263 ---- // let the sound and input subsystems know about the new window ! VID.NewWindow(vid.width, vid.height); return rserr_ok; |
From: Carsten W. <ca...@us...> - 2004-07-16 10:11:48
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/src/jake2/client Modified Files: VID.java Removed Files: refimport_t.java Log Message: refimport_t deleted --- refimport_t.java DELETED --- Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** VID.java 15 Jul 2004 16:16:24 -0000 1.7 --- VID.java 16 Jul 2004 10:11:36 -0000 1.8 *************** *** 32,36 **** import jake2.qcommon.*; import jake2.render.Renderer; ! import jake2.sound.*; import jake2.sys.IN; import jake2.sys.KBD; --- 32,36 ---- import jake2.qcommon.*; import jake2.render.Renderer; ! import jake2.sound.S; import jake2.sys.IN; import jake2.sys.KBD; *************** *** 79,82 **** --- 79,86 ---- */ + public static void Printf(int print_level, String fmt) { + Printf(print_level, fmt, null); + } + public static void Printf(int print_level, String fmt, Vargs vargs) { // static qboolean inupdate; *************** *** 189,271 **** Com.Printf( "LoadLibrary(\"" + name +"\")\n" ); ! refimport_t ri = new refimport_t() { ! public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); ! } ! ! public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); ! } ! ! public void Cmd_AddCommand(String name, xcommand_t cmd) { ! Cmd.AddCommand(name, cmd); ! } ! ! public void Cmd_RemoveCommand(String name) { ! Cmd.RemoveCommand(name); ! } ! ! public int Cmd_Argc() { ! return Cmd.Argc(); ! } ! ! public String Cmd_Argv(int i) { ! return Cmd.Argv(i); ! } ! ! public void Cmd_ExecuteText(int exec_when, String text) { ! Cbuf.ExecuteText(exec_when, text); ! } ! ! public void Con_Printf(int print_level, String str) { ! VID.Printf(print_level, str, null); ! } ! ! public void Con_Printf(int print_level, String str, Vargs vargs) { ! VID.Printf(print_level, str, vargs); ! } ! ! public byte[] FS_LoadFile(String name) { ! return FS.LoadFile(name); ! } ! ! public int FS_FileLength(String name) { ! return FS.FileLength(name); ! } ! ! public void FS_FreeFile(byte[] buf) { ! FS.FreeFile(buf); ! } ! ! public String FS_Gamedir() { ! return FS.Gamedir(); ! } ! ! public cvar_t Cvar_Get(String name, String value, int flags) { ! return Cvar.Get(name, value, flags); ! } ! ! public cvar_t Cvar_Set(String name, String value) { ! return Cvar.Set(name, value); ! } ! ! public void Cvar_SetValue(String name, float value) { ! Cvar.SetValue(name, value); ! } ! ! public boolean Vid_GetModeInfo(Dimension dim, int mode) { ! return VID.GetModeInfo(dim, mode); ! } ! ! public void Vid_MenuInit() { ! VID.MenuInit(); ! } ! ! public void Vid_NewWindow(int width, int height) { ! VID.NewWindow(width, height); ! } ! }; ! ! Globals.re = Renderer.getDriver( name, ri ); if (Globals.re == null) --- 193,197 ---- Com.Printf( "LoadLibrary(\"" + name +"\")\n" ); ! Globals.re = Renderer.getDriver(name); if (Globals.re == null) |
From: Holger Z. <hz...@us...> - 2004-07-15 16:33:39
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4358/src/jake2/render Modified Files: JoglBase.java Log Message: show all fullscreen modes in menu Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JoglBase.java 15 Jul 2004 16:16:23 -0000 1.2 --- JoglBase.java 15 Jul 2004 16:33:24 -0000 1.3 *************** *** 112,120 **** for (j = 0; j < l.size(); j++) { ml = (DisplayMode)l.get(j); ! if (ml.getWidth() >= m.getWidth()) break; } if (j == l.size()) { l.addLast(m); ! } else if (ml.getWidth() > m.getWidth()) { l.add(j, m); } else if (m.getRefreshRate() > ml.getRefreshRate()){ --- 112,121 ---- for (j = 0; j < l.size(); j++) { ml = (DisplayMode)l.get(j); ! if (ml.getWidth() > m.getWidth()) break; ! if (ml.getWidth() == m.getWidth() && ml.getHeight() >= m.getHeight()) break; } if (j == l.size()) { l.addLast(m); ! } else if (ml.getWidth() > m.getWidth() || ml.getHeight() > m.getHeight()) { l.add(j, m); } else if (m.getRefreshRate() > ml.getRefreshRate()){ *************** *** 137,141 **** for (int i = 0; i < modes.length; i++) { m = modes[i]; ! if (m.getWidth() == w) { mode = m; break; --- 138,142 ---- for (int i = 0; i < modes.length; i++) { m = modes[i]; ! if (m.getWidth() == w && m.getHeight() == h) { mode = m; break; |
From: Holger Z. <hz...@us...> - 2004-07-15 16:16:33
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv716/src/jake2/client Modified Files: VID.java Log Message: fullscreen modes work again Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** VID.java 15 Jul 2004 14:37:35 -0000 1.6 --- VID.java 15 Jul 2004 16:16:24 -0000 1.7 *************** *** 122,125 **** --- 122,127 ---- public static boolean GetModeInfo(Dimension dim, int mode) { + if (fs_modes == null) initModeList(); + vidmode_t[] modes = vid_modes; if (vid_fullscreen.value != 0.0f) modes = fs_modes; *************** *** 665,669 **** */ public static void MenuInit() { - if (fs_resolutions == null) initModeList(); if ( gl_driver == null ) --- 667,670 ---- |
From: Holger Z. <hz...@us...> - 2004-07-15 16:16:32
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv716/src/jake2/render Modified Files: JoglBase.java Log Message: fullscreen modes work again Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JoglBase.java 15 Jul 2004 14:37:34 -0000 1.1 --- JoglBase.java 15 Jul 2004 16:16:23 -0000 1.2 *************** *** 172,175 **** --- 172,185 ---- ri.Con_Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":"); + + /* + * fullscreen handling + */ + GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); + device = env.getDefaultScreenDevice(); + + if (oldDisplayMode == null) { + oldDisplayMode = device.getDisplayMode(); + } if (!ri.Vid_GetModeInfo(newDim, mode)) { *************** *** 193,199 **** canvas.addGLEventListener(this); ! //window.getContentPane().add(canvas); ! //canvas.setSize(newDim.width, newDim.height); // register event listener --- 203,209 ---- canvas.addGLEventListener(this); ! window.getContentPane().add(canvas); ! canvas.setSize(newDim.width, newDim.height); // register event listener *************** *** 209,223 **** canvas.addMouseListener(KBD.listener); canvas.addMouseMotionListener(KBD.listener); ! ! /* ! * fullscreen handling ! */ ! GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! device = env.getDefaultScreenDevice(); ! ! if (oldDisplayMode == null) { ! oldDisplayMode = device.getDisplayMode(); ! } ! if (fullscreen) { --- 219,223 ---- canvas.addMouseListener(KBD.listener); canvas.addMouseMotionListener(KBD.listener); ! if (fullscreen) { *************** *** 227,247 **** newDim.height = displayMode.getHeight(); window.setUndecorated(true); - window.setSize(displayMode.getWidth(), displayMode.getHeight()); window.setResizable(false); - window.getContentPane().add(canvas); device.setFullScreenWindow(window); ! if (!displayMode.equals(oldDisplayMode)) device.setDisplayMode(displayMode); window.setLocation(0, 0); ri.Con_Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { window.setLocation(window_xpos, window_ypos); ! window.setSize(newDim.width, newDim.height); window.setResizable(false); - window.getContentPane().add(canvas); window.setVisible(true); } --- 227,247 ---- newDim.height = displayMode.getHeight(); window.setUndecorated(true); window.setResizable(false); device.setFullScreenWindow(window); ! if (device.isFullScreenSupported()) device.setDisplayMode(displayMode); window.setLocation(0, 0); + window.setSize(displayMode.getWidth(), displayMode.getHeight()); + canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); + ri.Con_Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { window.setLocation(window_xpos, window_ypos); ! window.pack(); window.setResizable(false); window.setVisible(true); } *************** *** 268,272 **** if (oldDisplayMode != null && device.getFullScreenWindow() != null) { try { ! if (!device.getDisplayMode().equals(oldDisplayMode)) device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); --- 268,272 ---- if (oldDisplayMode != null && device.getFullScreenWindow() != null) { try { ! if (device.isFullScreenSupported()) device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); |
From: Holger Z. <hz...@us...> - 2004-07-15 14:38:51
|
Update of /cvsroot/jake2/jake2/test/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14916/test/jake2/render Modified Files: DancingQueens.java TestMap.java DebugCulling.java TestRenderer.java Log Message: update demos Index: TestMap.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestMap.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestMap.java 9 Jul 2004 06:50:51 -0000 1.3 --- TestMap.java 15 Jul 2004 14:38:40 -0000 1.4 *************** *** 80,89 **** public void Sys_Error(int err_level, String str) { ! VID.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! VID.Error(err_level, str, vargs); } --- 80,89 ---- public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); } Index: DebugCulling.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/DebugCulling.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DebugCulling.java 7 Jul 2004 19:59:58 -0000 1.1.1.1 --- DebugCulling.java 15 Jul 2004 14:38:40 -0000 1.2 *************** *** 28,58 **** import jake2.Defines; import jake2.Globals; ! import jake2.client.VID; ! import jake2.client.cparticle_t; ! import jake2.client.entity_t; ! import jake2.client.lightstyle_t; ! import jake2.client.particle_t; ! import jake2.client.refdef_t; ! import jake2.client.refexport_t; ! import jake2.client.refimport_t; ! import jake2.client.viddef_t; import jake2.game.Cmd; import jake2.game.cvar_t; ! import jake2.qcommon.Cbuf; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.FS; ! import jake2.qcommon.Qcommon; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.xcommand_t; import jake2.sys.KBD; - import jake2.util.Lib; - import jake2.util.Math3D; import jake2.util.Vargs; import java.awt.Dimension; - import java.util.Arrays; - import java.util.Iterator; - import java.util.LinkedList; - import java.util.Vector; /** --- 28,39 ---- import jake2.Defines; import jake2.Globals; ! import jake2.client.*; import jake2.game.Cmd; import jake2.game.cvar_t; ! import jake2.qcommon.*; import jake2.sys.KBD; import jake2.util.Vargs; import java.awt.Dimension; /** *************** *** 96,105 **** public void Sys_Error(int err_level, String str) { ! VID.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! VID.Error(err_level, str, vargs); } --- 77,86 ---- public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); } Index: TestRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestRenderer.java 9 Jul 2004 06:50:51 -0000 1.3 --- TestRenderer.java 15 Jul 2004 14:38:40 -0000 1.4 *************** *** 26,36 **** package jake2.render; - import java.awt.Dimension; - import java.nio.FloatBuffer; - import java.util.Arrays; - import java.util.Iterator; - import java.util.LinkedList; - import java.util.Vector; - import jake2.Defines; import jake2.Globals; --- 26,29 ---- *************** *** 40,47 **** import jake2.qcommon.*; import jake2.sys.KBD; ! import jake2.sys.Sys; ! import jake2.util.Lib; ! import jake2.util.Math3D; ! import jake2.util.Vargs; /** --- 33,41 ---- import jake2.qcommon.*; import jake2.sys.KBD; ! import jake2.util.*; ! ! import java.awt.Dimension; ! import java.nio.FloatBuffer; ! import java.util.*; /** *************** *** 77,85 **** ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! VID.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! VID.Error(err_level, str, vargs); } --- 71,79 ---- ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); } Index: DancingQueens.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/DancingQueens.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DancingQueens.java 9 Jul 2004 06:50:51 -0000 1.3 --- DancingQueens.java 15 Jul 2004 14:38:40 -0000 1.4 *************** *** 72,80 **** ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! VID.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! VID.Error(err_level, str, vargs); } --- 72,80 ---- ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); } |
From: Holger Z. <hz...@us...> - 2004-07-15 14:37:45
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14706/src/jake2/client Modified Files: VID.java refexport_t.java Log Message: show fullscreen modes in video menu move common renderer code to JoglBase Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** VID.java 9 Jul 2004 06:50:50 -0000 1.5 --- VID.java 15 Jul 2004 14:37:35 -0000 1.6 *************** *** 38,41 **** --- 38,42 ---- import java.awt.Dimension; + import java.awt.DisplayMode; /** *************** *** 86,95 **** } - public static void Error(int err_level, String fmt, Vargs vargs) - { - //static qboolean inupdate; - Com.Error(err_level, fmt, vargs); - } - // ========================================================================== --- 87,90 ---- *************** *** 124,136 **** new vidmode_t("Mode 9: 1600x1200", 1600, 1200, 9), new vidmode_t("Mode 10: 2048x1536", 2048, 1536, 10)}; ! ! static final int NUM_MODES = vid_modes.length; public static boolean GetModeInfo(Dimension dim, int mode) { ! if (mode < 0 || mode >= NUM_MODES) return false; ! dim.width = vid_modes[mode].width; ! dim.height = vid_modes[mode].height; return true; } --- 119,133 ---- new vidmode_t("Mode 9: 1600x1200", 1600, 1200, 9), new vidmode_t("Mode 10: 2048x1536", 2048, 1536, 10)}; ! static vidmode_t fs_modes[]; public static boolean GetModeInfo(Dimension dim, int mode) { ! vidmode_t[] modes = vid_modes; ! if (vid_fullscreen.value != 0.0f) modes = fs_modes; ! ! if (mode < 0 || mode >= modes.length) return false; ! dim.width = modes[mode].width; ! dim.height = modes[mode].height; return true; } *************** *** 192,200 **** refimport_t ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! VID.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! VID.Error(err_level, str, vargs); } --- 189,197 ---- refimport_t ri = new refimport_t() { public void Sys_Error(int err_level, String str) { ! Com.Error(err_level, str, null); } public void Sys_Error(int err_level, String str, Vargs vargs) { ! Com.Error(err_level, str, vargs); } *************** *** 281,290 **** } - /* Init IN (Mouse) */ - // in_state.IN_CenterView_fp = IN_CenterView; - // in_state.Key_Event_fp = Do_Key_Event; - // in_state.viewangles = cl.viewangles; - // in_state.in_strafe_state = &in_strafe.state; - IN.Real_IN_Init(); --- 278,281 ---- *************** *** 414,430 **** // ========================================================================== - // #define REF_SOFT 0 - // #define REF_SOFTX11 1 - // #define REF_MESA3D 2 - // #define REF_3DFXGL 3 - // #define REF_OPENGLX 4 static final int REF_OPENGL_JOGL = 0; static final int REF_OPENGL_FASTJOGL =1; - // #define REF_MESA3DGLX 5 - - // extern cvar_t *vid_ref; - // extern cvar_t *vid_fullscreen; - // extern cvar_t *vid_gamma; - // extern cvar_t *scr_viewsize; static cvar_t gl_mode; --- 405,410 ---- *************** *** 633,636 **** --- 613,620 ---- null }; + static String[] fs_resolutions; + static int last_fs; + static int last_win; + static final String[] refs = { *************** *** 652,662 **** }; /* ** VID_MenuInit */ ! public static void MenuInit() ! { ! int i; ! if ( gl_driver == null ) gl_driver = Cvar.Get( "gl_driver", "jogl", 0 ); --- 636,670 ---- }; + static void initModeList() { + DisplayMode[] modes = re.getModeList(); + fs_resolutions = new String[modes.length + 1]; + fs_modes = new vidmode_t[modes.length]; + for (int i = 0; i < modes.length; i++) { + DisplayMode m = modes[i]; + StringBuffer sb = new StringBuffer(18); + sb.append('['); + sb.append(m.getWidth()); + sb.append(' '); + sb.append(m.getHeight()); + while (sb.length() < 10) sb.append(' '); + sb.append(']'); + fs_resolutions[i] = sb.toString(); + sb.setLength(0); + sb.append("Mode "); + sb.append(i); + sb.append(':'); + sb.append(m.getWidth()); + sb.append('x'); + sb.append(m.getHeight()); + fs_modes[i] = new vidmode_t(sb.toString(), m.getWidth(), m.getHeight(), i); + } + } + /* ** VID_MenuInit */ ! public static void MenuInit() { ! if (fs_resolutions == null) initModeList(); ! if ( gl_driver == null ) gl_driver = Cvar.Get( "gl_driver", "jogl", 0 ); *************** *** 678,681 **** --- 686,702 ---- s_mode_list[SOFTWARE_MENU].curvalue = (int)sw_mode.value; s_mode_list[OPENGL_MENU].curvalue = (int)gl_mode.value; + if (vid_fullscreen.value != 0.0f) { + s_mode_list[OPENGL_MENU].itemnames = fs_resolutions; + if (s_mode_list[OPENGL_MENU].curvalue >= fs_resolutions.length - 1) { + s_mode_list[OPENGL_MENU].curvalue = 0; + } + last_fs = s_mode_list[OPENGL_MENU].curvalue; + } else { + s_mode_list[OPENGL_MENU].itemnames = resolutions; + if (s_mode_list[OPENGL_MENU].curvalue >= resolutions.length - 1) { + s_mode_list[OPENGL_MENU].curvalue = 0; + } + last_win = s_mode_list[OPENGL_MENU].curvalue; + } if ( SCR.scr_viewsize == null ) *************** *** 727,731 **** s_opengl_menu.nitems = 0; ! for ( i = 0; i < 2; i++ ) { s_ref_list[i].type = MTYPE_SPINCONTROL; --- 748,752 ---- s_opengl_menu.nitems = 0; ! for (int i = 0; i < 2; i++ ) { s_ref_list[i].type = MTYPE_SPINCONTROL; *************** *** 744,748 **** s_mode_list[i].x = 0; s_mode_list[i].y = 10; - s_mode_list[i].itemnames = resolutions; s_screensize_slider[i].type = MTYPE_SLIDER; --- 765,768 ---- *************** *** 776,779 **** --- 796,811 ---- s_fs_box[i].itemnames = yesno_names; s_fs_box[i].curvalue = (int)vid_fullscreen.value; + s_fs_box[i].callback = new Menu.mcallback() { + public void execute(Object o) { + int fs = ((Menu.menulist_s)o).curvalue; + if (fs == 0) { + s_mode_list[1].itemnames = resolutions; + s_mode_list[1].curvalue = last_win; + } else { + s_mode_list[1].itemnames = fs_resolutions; + s_mode_list[1].curvalue = last_fs; + } + } + }; s_defaults_action[i].type = MTYPE_ACTION; Index: refexport_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/refexport_t.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** refexport_t.java 7 Jul 2004 19:58:52 -0000 1.1.1.1 --- refexport_t.java 15 Jul 2004 14:37:35 -0000 1.2 *************** *** 32,35 **** --- 32,36 ---- import java.awt.Dimension; + import java.awt.DisplayMode; /** *************** *** 105,107 **** --- 106,110 ---- int apiVersion(); + + DisplayMode[] getModeList(); } |
From: Holger Z. <hz...@us...> - 2004-07-15 14:37:45
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14706/src/jake2/render Modified Files: JoglRenderer.java FastJoglRenderer.java Added Files: JoglBase.java Log Message: show fullscreen modes in video menu move common renderer code to JoglBase Index: JoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JoglRenderer.java 9 Jul 2004 06:50:47 -0000 1.3 --- JoglRenderer.java 15 Jul 2004 14:37:35 -0000 1.4 *************** *** 29,33 **** import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.jogl.Impl; import java.awt.Dimension; --- 29,33 ---- import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.jogl.Misc; import java.awt.Dimension; *************** *** 38,42 **** * @author cwei */ ! final class JoglRenderer extends Impl implements refexport_t, Ref { static { --- 38,44 ---- * @author cwei */ ! final class JoglRenderer extends Misc implements refexport_t, Ref { ! ! public static final String DRIVER_NAME = "jogl"; static { Index: FastJoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/FastJoglRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FastJoglRenderer.java 9 Jul 2004 06:50:47 -0000 1.1 --- FastJoglRenderer.java 15 Jul 2004 14:37:35 -0000 1.2 *************** *** 29,33 **** import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.fastjogl.Impl; import java.awt.Dimension; --- 29,33 ---- import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.fastjogl.Misc; import java.awt.Dimension; *************** *** 38,43 **** * @author cwei */ ! final class FastJoglRenderer extends Impl implements refexport_t, Ref { ! static { Renderer.register(new FastJoglRenderer()); --- 38,45 ---- * @author cwei */ ! final class FastJoglRenderer extends Misc implements refexport_t, Ref { ! ! public static final String DRIVER_NAME = "fastjogl"; ! static { Renderer.register(new FastJoglRenderer()); --- NEW FILE: JoglBase.java --- /* * JoglCommon.java * Copyright (C) 2004 * * $Id: JoglBase.java,v 1.1 2004/07/15 14:37:34 hzi Exp $ */ /* 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; import jake2.Defines; import jake2.client.refimport_t; import jake2.client.viddef_t; import jake2.game.cvar_t; import jake2.qcommon.xcommand_t; import jake2.sys.KBD; import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.LinkedList; import javax.swing.JFrame; import net.java.games.jogl.*; import net.java.games.jogl.util.GLUT; /** * JoglCommon */ public abstract class JoglBase implements GLEventListener { // IMPORTED FUNCTIONS protected refimport_t ri = null; protected GraphicsDevice device; protected DisplayMode oldDisplayMode; protected GLCanvas canvas; JFrame window; protected GL gl; protected GLU glu; protected GLUT glut = new GLUT(); // window position on the screen int window_xpos, window_ypos; protected viddef_t vid = new viddef_t(); // handles the post initialization with JoglRenderer protected boolean post_init = false; protected boolean contextInUse = false; protected abstract boolean R_Init2(); protected final xcommand_t INIT_CALLBACK = new xcommand_t() { public void execute() { // only used for the first run (initialization) // clear the screen gl.glClearColor(0, 0, 0, 0); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // // check the post init process // if (!post_init) { ri.Con_Printf(Defines.PRINT_ALL, "Missing multi-texturing for FastJOGL renderer\n"); } GLimp_EndFrame(); } }; protected xcommand_t callback = INIT_CALLBACK; protected cvar_t vid_fullscreen; // enum rserr_t protected static final int rserr_ok = 0; protected static final int rserr_invalid_fullscreen = 1; protected static final int rserr_invalid_mode = 2; protected static final int rserr_unknown = 3; public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); LinkedList l = new LinkedList(); l.add(oldDisplayMode); for (int i = 0; i < modes.length; i++) { DisplayMode m = modes[i]; if (m.getBitDepth() != oldDisplayMode.getBitDepth()) continue; if (m.getRefreshRate() > oldDisplayMode.getRefreshRate()) continue; int j = 0; DisplayMode ml = null; for (j = 0; j < l.size(); j++) { ml = (DisplayMode)l.get(j); if (ml.getWidth() >= m.getWidth()) break; } if (j == l.size()) { l.addLast(m); } else if (ml.getWidth() > m.getWidth()) { l.add(j, m); } else if (m.getRefreshRate() > ml.getRefreshRate()){ l.remove(j); l.add(j, m); } } DisplayMode[] ma = new DisplayMode[l.size()]; l.toArray(ma); return ma; } DisplayMode findDisplayMode(Dimension dim) { DisplayMode mode = null; DisplayMode m = null; DisplayMode[] modes = getModeList(); int w = dim.width; int h = dim.height; for (int i = 0; i < modes.length; i++) { m = modes[i]; if (m.getWidth() == w) { mode = m; break; } } if (mode == null) mode = oldDisplayMode; return mode; } String getModeString(DisplayMode m) { StringBuffer sb = new StringBuffer(); sb.append(m.getWidth()); sb.append('x'); sb.append(m.getHeight()); sb.append('x'); sb.append(m.getBitDepth()); sb.append('@'); sb.append(m.getRefreshRate()); sb.append("Hz"); return sb.toString(); } /** * @param dim * @param mode * @param fullscreen * @return enum rserr_t */ protected int GLimp_SetMode(Dimension dim, int mode, boolean fullscreen) { Dimension newDim = new Dimension(); ri.Con_Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); ri.Con_Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":"); if (!ri.Vid_GetModeInfo(newDim, mode)) { ri.Con_Printf(Defines.PRINT_ALL, " invalid mode\n"); return rserr_invalid_mode; } ri.Con_Printf(Defines.PRINT_ALL, " " + newDim.width + " " + newDim.height + '\n'); // destroy the existing window GLimp_Shutdown(); window = new JFrame("Jake2"); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); // TODO Use debug pipeline //canvas.setGL(new DebugGL(canvas.getGL())); canvas.setNoAutoRedrawMode(true); canvas.addGLEventListener(this); //window.getContentPane().add(canvas); //canvas.setSize(newDim.width, newDim.height); // register event listener window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { ri.Cmd_ExecuteText(Defines.EXEC_APPEND, "quit"); } }); // D I F F E R E N T J A K E 2 E V E N T P R O C E S S I N G window.addComponentListener(KBD.listener); canvas.addKeyListener(KBD.listener); canvas.addMouseListener(KBD.listener); canvas.addMouseMotionListener(KBD.listener); /* * fullscreen handling */ GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); device = env.getDefaultScreenDevice(); if (oldDisplayMode == null) { oldDisplayMode = device.getDisplayMode(); } if (fullscreen) { DisplayMode displayMode = findDisplayMode(newDim); newDim.width = displayMode.getWidth(); newDim.height = displayMode.getHeight(); window.setUndecorated(true); window.setSize(displayMode.getWidth(), displayMode.getHeight()); window.setResizable(false); window.getContentPane().add(canvas); device.setFullScreenWindow(window); if (!displayMode.equals(oldDisplayMode)) device.setDisplayMode(displayMode); window.setLocation(0, 0); ri.Con_Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { window.setLocation(window_xpos, window_ypos); window.setSize(newDim.width, newDim.height); window.setResizable(false); window.getContentPane().add(canvas); window.setVisible(true); } while (!canvas.isDisplayable()) { try { Thread.sleep(50); } catch (InterruptedException e) {} } canvas.requestFocus(); this.canvas = canvas; vid.width = newDim.width; vid.height = newDim.height; // let the sound and input subsystems know about the new window ri.Vid_NewWindow(vid.width, vid.height); return rserr_ok; } protected void GLimp_Shutdown() { if (oldDisplayMode != null && device.getFullScreenWindow() != null) { try { if (!device.getDisplayMode().equals(oldDisplayMode)) device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); } catch (Exception e) { e.printStackTrace(); } } if (this.window != null) { window.dispose(); } post_init = false; callback = INIT_CALLBACK; } /** * @return true */ protected boolean GLimp_Init(int xpos, int ypos) { // do nothing window_xpos = xpos; window_ypos = ypos; return true; } protected void GLimp_EndFrame() { gl.glFlush(); // swap buffer // but jogl has no method to swap } protected void GLimp_BeginFrame(float camera_separation) { // do nothing } protected void GLimp_AppActivate(boolean activate) { // do nothing } protected void GLimp_EnableLogging(boolean enable) { // doesn't need jogl logging // do nothing } protected void GLimp_LogNewFrame() { // doesn't need jogl logging // do nothing } /* * @see jake2.client.refexport_t#updateScreen() */ public void updateScreen() { this.callback = INIT_CALLBACK; canvas.display(); } public void updateScreen(xcommand_t callback) { this.callback = callback; canvas.display(); } // ============================================================================ // GLEventListener interface // ============================================================================ /* * @see net.java.games.jogl.GLEventListener#init(net.java.games.jogl.GLDrawable) */ public void init(GLDrawable drawable) { this.gl = drawable.getGL(); this.glu = drawable.getGLU(); // this is a hack to run R_init() in gl context post_init = R_Init2(); } /* * @see net.java.games.jogl.GLEventListener#display(net.java.games.jogl.GLDrawable) */ public void display(GLDrawable drawable) { this.gl = drawable.getGL(); this.glu = drawable.getGLU(); contextInUse = true; callback.execute(); contextInUse = false; } /* * @see net.java.games.jogl.GLEventListener#displayChanged(net.java.games.jogl.GLDrawable, boolean, boolean) */ public void displayChanged(GLDrawable drawable, boolean arg1, boolean arg2) { // do nothing } /* * @see net.java.games.jogl.GLEventListener#reshape(net.java.games.jogl.GLDrawable, int, int, int, int) */ public void reshape(GLDrawable drawable, int x, int y, int width, int height) { // do nothing } } |
From: Holger Z. <hz...@us...> - 2004-07-15 14:37:43
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14706/src/jake2/render/jogl Modified Files: Main.java Base.java Draw.java Removed Files: Impl.java Log Message: show fullscreen modes in video menu move common renderer code to JoglBase Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Base.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Base.java 7 Jul 2004 19:59:36 -0000 1.1.1.1 --- Base.java 15 Jul 2004 14:37:34 -0000 1.2 *************** *** 26,29 **** --- 26,30 ---- package jake2.render.jogl; + import jake2.render.JoglBase; import net.java.games.jogl.GL; *************** *** 33,37 **** * @author cwei */ ! public class Base { static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; --- 34,38 ---- * @author cwei */ ! public abstract class Base extends JoglBase { static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; *************** *** 76,85 **** // =================================================================== - // enum rserr_t - static final int rserr_ok = 0; - static final int rserr_invalid_fullscreen = 1; - static final int rserr_invalid_mode = 2; - static final int rserr_unknown = 3; - // // #include "gl_model.h" --- 77,80 ---- --- Impl.java DELETED --- Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Main.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Main.java 9 Jul 2004 06:50:47 -0000 1.3 --- Main.java 15 Jul 2004 14:37:34 -0000 1.4 *************** *** 26,36 **** package jake2.render.jogl; ! import jake2.*; import jake2.client.*; import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.xcommand_t; import jake2.render.*; import jake2.util.Math3D; --- 26,35 ---- package jake2.render.jogl; ! import jake2.Defines; ! import jake2.Globals; import jake2.client.*; import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.*; import jake2.render.*; import jake2.util.Math3D; *************** *** 42,48 **** import net.java.games.jogl.GL; - import net.java.games.jogl.GLU; - import net.java.games.jogl.util.BufferUtils; - import net.java.games.jogl.util.GLUT; /** --- 41,44 ---- *************** *** 53,60 **** public abstract class Main extends Base { - GL gl; - GLU glu; - GLUT glut = new GLUT(); - public static int[] d_8to24table = new int[256]; --- 49,52 ---- *************** *** 87,99 **** abstract mleaf_t Mod_PointInLeaf(float[] point, model_t model); - abstract boolean QGL_Init(String dll_name); - abstract void QGL_Shutdown(); - abstract boolean GLimp_Init(int xpos, int ypos); - abstract void GLimp_BeginFrame(float camera_separation); - abstract int GLimp_SetMode(Dimension dim, int mode, boolean fullscreen); - abstract void GLimp_Shutdown(); - abstract void GLimp_EnableLogging(boolean enable); - abstract void GLimp_LogNewFrame(); - abstract void GL_SetDefaultState(); --- 79,82 ---- *************** *** 129,140 **** */ - // IMPORTED FUNCTIONS - protected refimport_t ri = null; - int GL_TEXTURE0 = GL.GL_TEXTURE0; int GL_TEXTURE1 = GL.GL_TEXTURE1; - viddef_t vid = new viddef_t(); - model_t r_worldmodel; --- 112,118 ---- *************** *** 239,243 **** cvar_t gl_3dlabs_broken; - cvar_t vid_fullscreen; cvar_t vid_gamma; cvar_t vid_ref; --- 217,220 ---- *************** *** 1114,1130 **** R_Register(); - // initialize our QGL dynamic bindings - if (!QGL_Init(gl_driver.string)) { - QGL_Shutdown(); - ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not load \"" + gl_driver.string + "\"\n"); - return false; - } - - // initialize OS-specific parts of OpenGL - if (!GLimp_Init(vid_xpos, vid_ypos)) { - QGL_Shutdown(); - return false; - } - // set our "safe" modes gl_state.prev_mode = 3; --- 1091,1094 ---- *************** *** 1132,1136 **** // create the window and set up the context if (!R_SetMode()) { - QGL_Shutdown(); ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; --- 1096,1099 ---- *************** *** 1139,1143 **** } ! boolean R_Init2() { ri.Vid_MenuInit(); --- 1102,1106 ---- } ! protected boolean R_Init2() { ri.Vid_MenuInit(); *************** *** 1386,1394 **** */ GLimp_Shutdown(); - - /* - * shutdown our QGL subsystem - */ - QGL_Shutdown(); } --- 1349,1352 ---- Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Draw.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Draw.java 9 Jul 2004 06:50:48 -0000 1.3 --- Draw.java 15 Jul 2004 14:37:34 -0000 1.4 *************** *** 27,31 **** import jake2.Defines; - import jake2.Globals; import jake2.render.image_t; --- 27,30 ---- *************** *** 33,37 **** import net.java.games.jogl.GL; - import net.java.games.jogl.util.GLUT; /** --- 32,35 ---- |
From: Holger Z. <hz...@us...> - 2004-07-15 14:37:43
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14706/src/jake2/render/fastjogl Modified Files: Draw.java Base.java Main.java Removed Files: Impl.java Log Message: show fullscreen modes in video menu move common renderer code to JoglBase Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Base.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Base.java 9 Jul 2004 06:50:49 -0000 1.1 --- Base.java 15 Jul 2004 14:37:33 -0000 1.2 *************** *** 26,29 **** --- 26,30 ---- package jake2.render.fastjogl; + import jake2.render.JoglBase; import net.java.games.jogl.GL; *************** *** 33,37 **** * @author cwei */ ! public class Base { static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; --- 34,38 ---- * @author cwei */ ! public abstract class Base extends JoglBase { static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; *************** *** 76,85 **** // =================================================================== - // enum rserr_t - static final int rserr_ok = 0; - static final int rserr_invalid_fullscreen = 1; - static final int rserr_invalid_mode = 2; - static final int rserr_unknown = 3; - // // #include "gl_model.h" --- 77,80 ---- --- Impl.java DELETED --- Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Main.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.java 9 Jul 2004 06:50:49 -0000 1.1 --- Main.java 15 Jul 2004 14:37:33 -0000 1.2 *************** *** 26,30 **** package jake2.render.fastjogl; ! import jake2.*; import jake2.client.*; import jake2.game.cplane_t; --- 26,31 ---- package jake2.render.fastjogl; ! import jake2.Defines; ! import jake2.Globals; import jake2.client.*; import jake2.game.cplane_t; *************** *** 41,47 **** import net.java.games.jogl.GL; - import net.java.games.jogl.GLU; - import net.java.games.jogl.util.BufferUtils; - import net.java.games.jogl.util.GLUT; /** --- 42,45 ---- *************** *** 52,58 **** public abstract class Main extends Base { - GL gl; - GLU glu; - GLUT glut = new GLUT(); public static int[] d_8to24table = new int[256]; --- 50,53 ---- *************** *** 84,96 **** abstract mleaf_t Mod_PointInLeaf(float[] point, model_t model); - abstract boolean QGL_Init(String dll_name); - abstract void QGL_Shutdown(); - abstract boolean GLimp_Init(int xpos, int ypos); - abstract void GLimp_BeginFrame(float camera_separation); - abstract int GLimp_SetMode(Dimension dim, int mode, boolean fullscreen); - abstract void GLimp_Shutdown(); - abstract void GLimp_EnableLogging(boolean enable); - abstract void GLimp_LogNewFrame(); - abstract void GL_SetDefaultState(); --- 79,82 ---- *************** *** 126,136 **** */ - // IMPORTED FUNCTIONS - protected refimport_t ri = null; - int GL_TEXTURE0 = GL.GL_TEXTURE0; int GL_TEXTURE1 = GL.GL_TEXTURE1; - viddef_t vid = new viddef_t(); model_t r_worldmodel; --- 112,118 ---- *************** *** 236,240 **** cvar_t gl_3dlabs_broken; - cvar_t vid_fullscreen; cvar_t vid_gamma; cvar_t vid_ref; --- 218,221 ---- *************** *** 1111,1127 **** R_Register(); - // initialize our QGL dynamic bindings - if (!QGL_Init(gl_driver.string)) { - QGL_Shutdown(); - ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not load \"" + gl_driver.string + "\"\n"); - return false; - } - - // initialize OS-specific parts of OpenGL - if (!GLimp_Init(vid_xpos, vid_ypos)) { - QGL_Shutdown(); - return false; - } - // set our "safe" modes gl_state.prev_mode = 3; --- 1092,1095 ---- *************** *** 1129,1133 **** // create the window and set up the context if (!R_SetMode()) { - QGL_Shutdown(); ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; --- 1097,1100 ---- *************** *** 1136,1140 **** } ! boolean R_Init2() { ri.Vid_MenuInit(); --- 1103,1107 ---- } ! protected boolean R_Init2() { ri.Vid_MenuInit(); *************** *** 1351,1359 **** */ GLimp_Shutdown(); - - /* - * shutdown our QGL subsystem - */ - QGL_Shutdown(); } --- 1318,1321 ---- Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Draw.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Draw.java 9 Jul 2004 06:50:49 -0000 1.1 --- Draw.java 15 Jul 2004 14:37:33 -0000 1.2 *************** *** 27,31 **** import jake2.Defines; - import jake2.Globals; import jake2.render.image_t; --- 27,30 ---- *************** *** 33,37 **** import net.java.games.jogl.GL; - import net.java.games.jogl.util.GLUT; /** --- 32,35 ---- |
From: Carsten W. <ca...@us...> - 2004-07-14 15:34:34
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21926/src/jake2/server Modified Files: SV_CCMDS.java Log Message: deprecated java.util.Date replaced Index: SV_CCMDS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_CCMDS.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SV_CCMDS.java 9 Jul 2004 06:50:49 -0000 1.3 --- SV_CCMDS.java 14 Jul 2004 15:34:24 -0000 1.4 *************** *** 33,37 **** import java.io.*; ! import java.util.Date; public class SV_CCMDS extends SV_ENTS { --- 33,37 ---- import java.io.*; ! import java.util.Calendar; public class SV_CCMDS extends SV_ENTS { *************** *** 434,442 **** //time( aclock); //newtime = localtime( aclock); ! Date newtime = new Date(); comment = Com.sprintf( "%2i:%2i %2i/%2i ", ! new Vargs().add(newtime.getHours()).add(newtime.getMinutes()).add(newtime.getMonth() + 1).add(newtime.getDay())); comment += sv.configstrings[CS_NAME]; } --- 434,446 ---- //time( aclock); //newtime = localtime( aclock); ! Calendar c = Calendar.getInstance(); comment = Com.sprintf( "%2i:%2i %2i/%2i ", ! new Vargs() ! .add(c.get(Calendar.HOUR_OF_DAY)) ! .add(c.get(Calendar.MINUTE)) ! .add(c.get(Calendar.MONTH) + 1) ! .add(c.get(Calendar.DAY_OF_MONTH))); comment += sv.configstrings[CS_NAME]; } |
From: Carsten W. <ca...@us...> - 2004-07-14 15:34:33
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21926/src/jake2/game Modified Files: GameMiscAdapters.java Log Message: deprecated java.util.Date replaced Index: GameMiscAdapters.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameMiscAdapters.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GameMiscAdapters.java 8 Jul 2004 20:24:29 -0000 1.2 --- GameMiscAdapters.java 14 Jul 2004 15:34:24 -0000 1.3 *************** *** 30,34 **** import jake2.util.Math3D; ! import java.util.Date; public class GameMiscAdapters --- 30,34 ---- import jake2.util.Math3D; ! import java.util.Calendar; public class GameMiscAdapters *************** *** 879,884 **** else { ! Date d = new Date(); ! self.message = "" + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds(); /* --- 879,884 ---- else { ! Calendar c = Calendar.getInstance(); ! self.message = "" + c.get(Calendar.HOUR_OF_DAY) + ":" + c.get(Calendar.MINUTE) + ":" + c.get(Calendar.SECOND); /* |
From: Carsten W. <ca...@us...> - 2004-07-13 11:20:39
|
Update of /cvsroot/jake2/jake2/src/jake2/sound/joal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17083/src/jake2/sound/joal Modified Files: JOALSoundImpl.java Log Message: experimental EAX2.0 support (today only win32 is supported) Index: JOALSoundImpl.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/joal/JOALSoundImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JOALSoundImpl.java 9 Jul 2004 06:50:52 -0000 1.1 --- JOALSoundImpl.java 13 Jul 2004 11:20:28 -0000 1.2 *************** *** 7,11 **** package jake2.sound.joal; - import jake2.Defines; import jake2.Globals; --- 7,10 ---- *************** *** 14,25 **** import jake2.qcommon.*; import jake2.sound.*; ! import jake2.util.Math3D; ! import jake2.util.Vargs; import java.io.IOException; import java.io.RandomAccessFile; import java.util.*; import net.java.games.joal.*; /** --- 13,26 ---- import jake2.qcommon.*; import jake2.sound.*; ! import jake2.util.*; import java.io.IOException; import java.io.RandomAccessFile; + import java.nio.IntBuffer; import java.util.*; import net.java.games.joal.*; + import net.java.games.joal.eax.EAX; + import net.java.games.joal.eax.EAXFactory; /** *************** *** 34,37 **** --- 35,39 ---- static AL al; static ALC alc; + static EAX eax; cvar_t s_volume; *************** *** 43,51 **** private int[] sources = new int[MAX_CHANNELS]; private Channel[] channels = null; private JOALSoundImpl() { } - /* (non-Javadoc) * @see jake2.sound.SoundImpl#Init() --- 45,54 ---- private int[] sources = new int[MAX_CHANNELS]; private Channel[] channels = null; + private int num_channels = 0; + // singleton private JOALSoundImpl() { } /* (non-Javadoc) * @see jake2.sound.SoundImpl#Init() *************** *** 57,73 **** al = ALFactory.getAL(); checkError(); } catch (OpenALException e) { Com.Printf(e.getMessage() + '\n'); return false; } - - checkError(); al.alGenBuffers(MAX_SFX, buffers); - al.alGenSources(MAX_CHANNELS, sources); - checkError(); s_volume = Cvar.Get("s_volume", "0.7", Defines.CVAR_ARCHIVE); initChannels(); al.alDistanceModel(AL.AL_INVERSE_DISTANCE_CLAMPED); - // al.alDistanceModel(AL.AL_INVERSE_DISTANCE); Cmd.AddCommand("play", new xcommand_t() { public void execute() { --- 60,72 ---- al = ALFactory.getAL(); checkError(); + initOpenALExtensions(); } catch (OpenALException e) { Com.Printf(e.getMessage() + '\n'); return false; } al.alGenBuffers(MAX_SFX, buffers); s_volume = Cvar.Get("s_volume", "0.7", Defines.CVAR_ARCHIVE); initChannels(); al.alDistanceModel(AL.AL_INVERSE_DISTANCE_CLAMPED); Cmd.AddCommand("play", new xcommand_t() { public void execute() { *************** *** 125,128 **** --- 124,138 ---- } + private void initOpenALExtensions() throws OpenALException { + if (al.alIsExtensionPresent("EAX2.0")) { + Com.Printf("... using EAX2.0\n"); + eax = EAXFactory.getEAX(); + } else { + Com.Printf("... EAX2.0 not found\n"); + eax = null; + } + } + + void exitOpenAL() { // Get the current context. *************** *** 143,149 **** int sourceId; for (int i = 0; i < MAX_CHANNELS; i++) { ! sourceId = sources[i]; channels[i] = new Channel(sourceId); // set default values for AL sources --- 153,170 ---- int sourceId; + int[] tmp = {0}; + int error; for (int i = 0; i < MAX_CHANNELS; i++) { ! ! al.alGenSources(1, tmp); ! sourceId = tmp[0]; ! ! //if ((error = al.alGetError()) != AL.AL_NO_ERROR) break; ! if (sourceId <= 0) break; ! ! sources[i] = sourceId; ! channels[i] = new Channel(sourceId); + num_channels++; // set default values for AL sources *************** *** 157,160 **** --- 178,182 ---- al.alSourcef (sourceId, AL.AL_MAX_GAIN, 1.0f); } + Com.Printf("... using " + num_channels + " channels\n"); } *************** *** 163,168 **** * @see jake2.sound.SoundImpl#RegisterSound(jake2.sound.sfx_t) */ ! private void initBuffer(sfx_t sfx) ! { if (sfx.cache == null ) { //System.out.println(sfx.name + " " + sfx.cache.length+ " " + sfx.cache.loopstart + " " + sfx.cache.speed + " " + sfx.cache.stereo + " " + sfx.cache.width); --- 185,189 ---- * @see jake2.sound.SoundImpl#RegisterSound(jake2.sound.sfx_t) */ ! private void initBuffer(sfx_t sfx) { if (sfx.cache == null ) { //System.out.println(sfx.name + " " + sfx.cache.length+ " " + sfx.cache.loopstart + " " + sfx.cache.speed + " " + sfx.cache.stereo + " " + sfx.cache.width); *************** *** 175,205 **** int size = data.length; ! // if (buffers[sfx.id] != 0) ! // al.alDeleteBuffers(1, new int[] {buffers[sfx.id] }); ! // ! // int[] bid = new int[1]; ! // al.alBufferData( bid[0], format, data, size, freq); ! // buffers[sfx.id] = bid[0]; ! // al.alBufferData( bid[0], format, data, size, freq); ! ! al.alBufferData( buffers[sfx.id], format, data, size, freq); ! // int error; ! // if ((error = al.alGetError()) != AL.AL_NO_ERROR) { ! // String message; ! // switch(error) { ! // case AL.AL_INVALID_OPERATION: message = "invalid operation"; break; ! // case AL.AL_INVALID_VALUE: message = "invalid value"; break; ! // case AL.AL_INVALID_ENUM: message = "invalid enum"; break; ! // case AL.AL_INVALID_NAME: message = "invalid name"; break; ! // default: message = "" + error; ! // } ! // Com.DPrintf("Error Buffer " + sfx.id + ": " + sfx.name + " (" + size + ") --> " + message + '\n'); ! // } } private void checkError() { int error; if ((error = al.alGetError()) != AL.AL_NO_ERROR) { - String message; switch(error) { case AL.AL_INVALID_OPERATION: message = "invalid operation"; break; --- 196,210 ---- int size = data.length; ! al.alBufferData( buffers[sfx.bufferId], format, data, size, freq); } private void checkError() { + Com.DPrintf("AL Error: " + alErrorString() +'\n'); + } + + private String alErrorString(){ int error; + String message = ""; if ((error = al.alGetError()) != AL.AL_NO_ERROR) { switch(error) { case AL.AL_INVALID_OPERATION: message = "invalid operation"; break; *************** *** 209,217 **** default: message = "" + error; } - Com.DPrintf("AL Error: " + message +'\n'); } } - /* (non-Javadoc) * @see jake2.sound.SoundImpl#Shutdown() --- 214,221 ---- default: message = "" + error; } } + return message; } /* (non-Javadoc) * @see jake2.sound.SoundImpl#Shutdown() *************** *** 222,226 **** al.alDeleteBuffers(buffers.length, buffers); exitOpenAL(); ! //ALut.alutExit(); Cmd.RemoveCommand("play"); Cmd.RemoveCommand("stopsound"); --- 226,230 ---- al.alDeleteBuffers(buffers.length, buffers); exitOpenAL(); ! Cmd.RemoveCommand("play"); Cmd.RemoveCommand("stopsound"); *************** *** 235,238 **** --- 239,243 ---- } num_sfx = 0; + num_channels = 0; } *************** *** 258,262 **** attenuation *= 0.5f; ! Channel ch = pickChannel(entnum, entchannel, buffers[sfx.id], attenuation); if (ch == null) return; --- 263,267 ---- attenuation *= 0.5f; ! Channel ch = pickChannel(entnum, entchannel, buffers[sfx.bufferId], attenuation); if (ch == null) return; *************** *** 277,281 **** int i; ! for (i = 0; i < MAX_CHANNELS; i++) { ch = channels[i]; --- 282,286 ---- int i; ! for (i = 0; i < num_channels; i++) { ch = channels[i]; *************** *** 295,299 **** } ! if (i == MAX_CHANNELS) return null; --- 300,304 ---- } ! if (i == num_channels) return null; *************** *** 313,316 **** --- 318,330 ---- private float[] listenerOrigin = {0, 0, 0}; private float[] listenerOrientation = {0, 0, 0, 0, 0, 0}; + private IntBuffer eaxEnv = Lib.newIntBuffer(1); + private int currentEnv = -1; + private boolean changeEnv = true; + + // TODO workaround for JOAL-bug + // should be EAX.LISTENER + private final static int EAX_LISTENER = 0; + // should be EAX.SOURCE + private final static int EAX_SOURCE = 1; /* (non-Javadoc) *************** *** 325,333 **** al.alListenerfv(AL.AL_ORIENTATION, listenerOrientation); AddLoopSounds(origin); playChannels(listenerOrigin); } ! Map looptable = new Hashtable(2 * MAX_CHANNELS); /* --- 339,368 ---- al.alListenerfv(AL.AL_ORIENTATION, listenerOrientation); + if (eax != null) { + // workaround for environment initialisation + if (currentEnv == -1) { + eaxEnv.put(0, EAX.EAX_ENVIRONMENT_UNDERWATER); + eax.EAXSet(EAX_LISTENER, EAX.DSPROPERTY_EAXLISTENER_ENVIRONMENT | EAX.DSPROPERTY_EAXLISTENER_DEFERRED, 0, eaxEnv, 4); + changeEnv = true; + } + + if ((Game.gi.pointcontents.pointcontents(origin)& Defines.MASK_WATER)!= 0) { + changeEnv = currentEnv != EAX.EAX_ENVIRONMENT_UNDERWATER; + currentEnv = EAX.EAX_ENVIRONMENT_UNDERWATER; + } else { + changeEnv = currentEnv != EAX.EAX_ENVIRONMENT_GENERIC; + currentEnv = EAX.EAX_ENVIRONMENT_GENERIC; + } + if (changeEnv) { + eaxEnv.put(0, currentEnv); + eax.EAXSet(EAX_LISTENER, EAX.DSPROPERTY_EAXLISTENER_ENVIRONMENT | EAX.DSPROPERTY_EAXLISTENER_DEFERRED, 0, eaxEnv, 4); + } + } + AddLoopSounds(origin); playChannels(listenerOrigin); } ! Map looptable = new Hashtable(MAX_CHANNELS); /* *************** *** 391,395 **** // allocate a channel ! ch = pickChannel(0, 0, buffers[sfx.id], 6); if (ch == null) break; --- 426,430 ---- // allocate a channel ! ch = pickChannel(0, 0, buffers[sfx.bufferId], 6); if (ch == null) break; *************** *** 428,432 **** int state; ! for (int i = 0; i < MAX_CHANNELS; i++) { ch = channels[i]; if (ch.active) { --- 463,467 ---- int state; ! for (int i = 0; i < num_channels; i++) { ch = channels[i]; if (ch.active) { *************** *** 467,471 **** } } - /* (non-Javadoc) --- 502,505 ---- *************** *** 473,477 **** */ public void StopAllSounds() { ! for (int i = 0; i < MAX_CHANNELS; i++) { al.alSourceStop(sources[i]); al.alSourcei(sources[i], AL.AL_BUFFER, 0); --- 507,511 ---- */ public void StopAllSounds() { ! for (int i = 0; i < num_channels; i++) { al.alSourceStop(sources[i]); al.alSourcei(sources[i], AL.AL_BUFFER, 0); *************** *** 562,565 **** --- 596,600 ---- // determine what model the client is using + // TODO configstrings for player male and female are wrong String model = "male"; int n = Globals.CS_PLAYERSKINS + ent.number - 1; *************** *** 598,608 **** } else { // no, revert to the male sound in the pak0.pak - //Com_sprintf (maleFilename, sizeof(maleFilename), "player/%s/%s", "male", base+1); String maleFilename = "player/male/" + base.substring(1); sfx = AliasName(sexedFilename, maleFilename); } } - - //System.out.println(sfx.name); return sfx; } --- 633,640 ---- *************** *** 653,658 **** sfx.name = name; sfx.registration_sequence = s_registration_sequence; ! // cwei ! sfx.id = i; return sfx; --- 685,689 ---- sfx.name = name; sfx.registration_sequence = s_registration_sequence; ! sfx.bufferId = i; return sfx; *************** *** 690,695 **** sfx.registration_sequence = s_registration_sequence; sfx.truename = s; ! // cwei ! sfx.id = i; return sfx; --- 721,726 ---- sfx.registration_sequence = s_registration_sequence; sfx.truename = s; ! // set the AL bufferId ! sfx.bufferId = i; return sfx; |