changed VID_InitMode to take a viddef_mode_t structure which contains the desired parameters, and allows it to modify them (previously only width/height could be modified) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9552 d7cf8633-e32d-0410-b094-e92efae38249
glx, sdl, wgl: autodetect all supported video modes, override the Quake menu's list by it git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9089 d7cf8633-e32d-0410-b094-e92efae38249
more fullscreen cleanup git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8688 d7cf8633-e32d-0410-b094-e92efae38249
renamed VID_GrabMouse to VID_SetMouse as it now takes 3 parameters (fullscreengrab, relative, hidecursor), this required reworking all the implementations and the calls, but gives the correct behavior in all cases git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8296 d7cf8633-e32d-0410-b094-e92efae38249
renamed IN_Activate to VID_GrabMouse and made it a public function in the VID API, this removed some shared logic from each VID_Finish implementation, and allows disabling the mouse grab at the beginning of a loading screen git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8284 d7cf8633-e32d-0410-b094-e92efae38249
implemented vid_samples cvar (antialiasing samples per pixel) oh and for the record, Windows multisample buffer setup is awful. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8090 d7cf8633-e32d-0410-b094-e92efae38249
move two #defined to quakedef.h, and always include quakedef.h first before any other includes, even system headers. This is to make compilation with gcc -combine work. Also, fix some type mismatches between source files. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7689 d7cf8633-e32d-0410-b094-e92efae38249
audited all Sys_Quit calls and gave them return values indicating whether the game quit normally, so shell scripts get a useful value git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7165 d7cf8633-e32d-0410-b094-e92efae38249
added vid_stereobuffer cvar based on patch from syschuck on the alientrap forums git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6604 d7cf8633-e32d-0410-b094-e92efae38249
modified gamma handling, now VID_UpdateGamma is only called from VID_Finish, and VID_SetGamma/VID_GetGamma/VID_UpdateGamma take rampsize parameters VID_UpdateGamma now supports ramp sizes other than 256, and automatically allocates memory accordingly, this allows hardware gamma on X11 to work on Quadro cards (which report 1024 gamma entries according to div0), and allows any other platform to do whatever it wishes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6200 d7cf8633-e32d-0410-b094-e92efae38249
changed VID_Finish to take an allowmousegrab parameter, this avoids mousegrab on the initial loading screen (before +vid_mouse 1 on commandline is executed) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6103 d7cf8633-e32d-0410-b094-e92efae38249
implemented vid_refreshrate cvar to specify display refresh rate in windows added vid_minwidth/vid_minheight for use by menu, this lets a mod specify minimum acceptable resolution git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5854 d7cf8633-e32d-0410-b094-e92efae38249
replaced all references to vid.conwidth and vid.conheight with vid_conwidth.integer and vid_conheight.integer replaced all references to vid.realx/vid.realy with 0 replaced all references to vid.realwidth and vid.realheight with vid.width and vid.height replaced current_vid_* variables with vid. fields (vid.width, vid.height, vid.bitsperpixel, vid.fullscreen) vid_glx.c: replaced scr_width/height with vid.width/height vid_wgl.c: replaced window_center_x/y with calculations as needed, and replaced window_width/height with vid.width/height, and some other minor cleanups removed VID_GetWindowSize function git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5284 d7cf8633-e32d-0410-b094-e92efae38249
major cleanup of input code - CL_Move replaces most of IN_Move, IN_Commands, many internal platform functions refactored to clean up platform code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5256 d7cf8633-e32d-0410-b094-e92efae38249
various printf/fprintf calls are now Con_Printf, and some other minor cleanups git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5246 d7cf8633-e32d-0410-b094-e92efae38249
Removed GL_OpenLibrary and GL_CloseLibrary from "vid.h" and "vid_null.c" git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5134 d7cf8633-e32d-0410-b094-e92efae38249
implemented PRYDON_CLIENTCURSOR extension (clientside mouse pointer that feeds back information to the QuakeC) added DP_BUTTONUSE extension (+use/-use button) added DP_BUTTONCHAT extension (true while input is not focused on the game) reimplemented DP_ENT_COLORMOD extension due to popular request, and changed its definition to allow colors above '1 1 1' for brightening effects implemented PROTOCOL_DARKPLACES6 protocol, featuring delta compression of ammo counts and other properties (using generic svc_updatestat and svc_updatestatubyte messages), precaching models and sounds during the game (svc_precache). removed cmd parameter from a lot of input code (now uses cl.cmd. instead of cmd->) added sv_gameplayfix_setmodelrealbox to allow disabling of the setmodel real model bounding box on alias models (may improve mod compatibility if set to 0, thus performing a setsize (self, '-16 -16 -16', '16 16 16') instead of the real alias model box). added SV_ModelIndex and SV_SoundIndex functions to clean up the server's precaching and model lookup processes (code reduction/maintenance reduction). changed sv.model_precache and sv.sound_precache to be real char arrays rather than pointers, so precache names no longer need to be constants as they're now copied. added some modelindex bounds checks to a few pieces of code. the dpfields array is now sorted and matches the supported fields list (added the missing ones). client now acknowledges the last 3 frames in each input packet to reduce packet loss issues. renamed clc_ackentities to clc_ackframe as it is now used for compressing stats as well as entities in PROTOCOL_DARKPLACES6, this also means it always produces a packet for every frame even if there's no changed entities (or room under the rate limit for that matter) PROTOCOL_DARKPLACES5 and 6 now perform a non-harmful serverside packetlog reset (marking all packets as lost) if the packetlog fills up, this should eliminate choked-to-death cases where the client lost everything for a few seconds. MAX_CL_STATS expanded from 32 to 256 (just incase more stats are added, this prevents protocol breakage on too many unknown extra stats) fixed a bug with the worst case rtlight rendering (the color array was disabled, oops). some cl.* fields converted to cl.stats elements (STAT_ITEMS for instance) to accomodate the PROTOCOL_DARKPLACES6 stats updates git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4801 d7cf8633-e32d-0410-b094-e92efae38249
cd audio now tied to sound system sound system now tied to video system because DirectSound needs a window to work at all (thank you Windows for another useless obstacle) sound system can now restart (snd_restart command) vid_stencil cvar removed (now tied to 32bit color) vid_bitsperpixel now defaults to 32 r_shadow_shadows cvar added (default 1) for stencil shadows on dlights (since vid_stencil is gone) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3548 d7cf8633-e32d-0410-b094-e92efae38249
Fix for win32 dedicated servers (oh it still doesn't compile, other problems remain with sys_win.c, but this one thing has been annoying me long enough) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2858 d7cf8633-e32d-0410-b094-e92efae38249
menu.c - changed M_DrawSlider to take a value and a min/max range, now prints the current value of the cvar as well menu.c, menu.h, gl_draw.c - added new color control options menu (the gl_draw.c change is merely adding a "ditherpattern" texture) menu.c - added "Delay refresh (faster)" to options menu (gl_delayfinish cvar) menu.c - added "Game Speed" to options menu (slowmo cvar) vid_wgl.c, vid_glx.c, vid_null.c, vid_shared.c, vid.h, palette.c, palette.h, host.c - gamma system redesigned (VID_SetGamma now takes ramps, VID_GetGamma added, other cruft removed), moved VID_UpdateGamma to vid_shared.c, gamma is now turned off when darkplaces is minimized in X11 (unmapped), and when it's window is not active in Windows as well vid_wgl.c - trailing whitespace fixed vid_shared.c - added v_color_enable, v_color_black_[rgb], v_color_grey_[rgb], and v_color_white_[rgb] cvars as another way to adjust color settings gl_draw.c - added support for v_color_* cvars, removed support for darkening screen (not possible to do in color) vid_glx.c - got rid of unfinished X11 colormap based gamma code (using XF86 VidMode extension instead) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2813 d7cf8633-e32d-0410-b094-e92efae38249