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'); } |