Commit graph

1105 commits

Author SHA1 Message Date
Sander van Dijk
8dfabe4e7f gl_vidsdl.c, vid.h: cleanup some modestate related stuff (requires a clean build)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@819 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-24 13:42:23 +00:00
Sander van Dijk
3aa34cba34 gl_vidsdl.c: remove modelist[0] special treatment, some cleanup
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@818 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-24 13:33:30 +00:00
Sander van Dijk
9f59c863f1 gl_vidsdl.c: make VID_Init independent from modelist
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@817 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-24 13:23:26 +00:00
Sander van Dijk
8872f4df63 gl_vidsdl.c: some cleanup
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@816 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-21 19:35:21 +00:00
Sander van Dijk
ca18412bac gl_vidsdl.c: fix ValidMode(), bpp < 16 is problematic on windows
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@815 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-21 19:17:18 +00:00
Ozkan Sezer
6c23dcd91f comment cleanup
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@814 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-20 06:22:42 +00:00
Ozkan Sezer
204c6290b2 convert our GL_RGB lightmaps to GL_RGBA which gives considerable
performance boost on some systems. add GL_BGRA as an option, thanks
to Kristian Duske. the format is hardcoded as GL_RGBA for now,
need a way to make it configurable later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@813 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-20 06:01:10 +00:00
Sander van Dijk
00a3f7659b gl_vidsdl.c: make VID_Restart independent from modelist
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@812 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-19 19:20:17 +00:00
Sander van Dijk
88b0694432 gl_vidsdl.c: make VID_Test independent from modelist
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@811 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-19 19:00:19 +00:00
Sander van Dijk
5c09de09ee gl_vidsdl.c: some cleanup
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@810 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-19 18:18:38 +00:00
Sander van Dijk
dd40be29eb gl_vidsdl.c: make VID_SetMode independent from "modelist"
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@809 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-18 19:19:32 +00:00
Sander van Dijk
083c27abce gl_vidsdl.c: don't depend on "modelist" for current mode info
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@808 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-17 18:12:00 +00:00
Sander van Dijk
0a7c6f77de gl_vidsdl.c: get rid of "modenum"
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@807 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-17 17:58:05 +00:00
Sander van Dijk
2f19420417 gl_vidsdl.c: fix windowed mode
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@806 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-14 20:46:42 +00:00
Sander van Dijk
64f3091f05 rename the modestate_t enum items
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@805 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:07:19 +00:00
Sander van Dijk
103f041614 remove "type" from "viddef_t", use "modestate" instead
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@804 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:01:26 +00:00
Sander van Dijk
ea0b236563 gl_vidsdl.c: remove "modenum" from vmode_t
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@803 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-11 18:13:09 +00:00
Sander van Dijk
148386cc03 gl_vidsdl.c: remove "modedesc" from vmode_t
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@802 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-11 18:03:14 +00:00
Sander van Dijk
a958e33054 gl_vidsdl.c: get rid of obsolete "badmode"
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@801 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-10 17:30:40 +00:00
Sander van Dijk
ba5c538d27 gl_vidsdl.c: Simplification of some functions
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@800 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-09 16:10:23 +00:00
Sander van Dijk
1703e4b04a Some "slowkey" tuning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@799 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-03 17:22:59 +00:00
Sander van Dijk
dbaa3fec52 gl_vidsdl.c: Remove "halfscreen" stuff.
AFAICS this is not needed for SDL, and it in fact
breaks weird widescreen resolutions such as 1280x600.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@798 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-01 20:44:25 +00:00
Sander van Dijk
a86fc9a175 Make the "speedkey" act as "slowkey" when "always run" is on.
A bit of a hack, this should really be controlled by a
separate "cl_alwaysrun" cvar, but lets stick to this for
backward compatibility for now.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@797 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-01 20:06:52 +00:00
Sander van Dijk
48e884e8fe Rename the fov_adaptive cvar to fov_adapt.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@796 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-31 20:03:23 +00:00
Ozkan Sezer
3011dbfe35 fix quoted strings when EOF is reached before the closing '\"' and
support for C-style /*..*/ comments in COM_Parse(). some whitespace
tidy-up.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@795 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-16 19:02:23 +00:00
Ozkan Sezer
c26d43f07f snd_mix.c (SND_InitScaletable): fixed an off-by-one mistake in the
signed char conversion.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@794 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-11 20:58:08 +00:00
Ozkan Sezer
9ea0212280 updated arch_def.h and net_sys.h from uhexen2. adjusted users accordingly.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@793 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-07 17:30:17 +00:00
Ozkan Sezer
5311e29e65 relaxed PF_VarString() warnings a little.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@792 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-06 12:05:34 +00:00
Ozkan Sezer
260a72b033 pr_edict.c (PR_ValueString, PR_UglyValueString, PR_GlobalString,
PR_GlobalStringNoContents): increase static line buffer size to
512, so that excessively long global strings don't cause a crash.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@791 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-12-11 10:11:22 +00:00
Sander van Dijk
d91f083ee4 Remove more dead code.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@790 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-28 19:10:52 +00:00
Sander van Dijk
011ca12117 gl_vidsdl.c: Remove some dead code.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@789 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-22 18:58:45 +00:00
Ozkan Sezer
1f6e608267 pr_cmds.c, pr_exec.c, pr_edict.c, sv_main.c: Changed several Sys_Error()
calls to Host_Error(). ED_PrintEdict_f(),ED_PrintEdicts() and ED_Count()
require an active server to print any infos. ED_PrintEdict_f cannot work
with a negative argument.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@788 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-15 17:30:43 +00:00
Sander van Dijk
7b155bc6cc Really fix vsync saving/loading (finally...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@787 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-11 17:35:43 +00:00
Ozkan Sezer
a9f5180540 gl_model.c (Mod_LoadTexinfo): although the end result in memory
doesn't change, load the texinfo in a way consistent with the
layout of the vecs in the mtexinfo_t struct. from a recent commit
in tyr-quake git repo.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@786 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-11 09:55:55 +00:00
Ozkan Sezer
860a6007e8 regenerate gl_extensions_nice everytime the extensions string is retrieved
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@785 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-07 12:44:30 +00:00
Ozkan Sezer
c66e78f53d move GL_Init(), TexMgr_ReloadImages() and GL_SetupState() calls from
VID_SetMode() to VID_Restart() so they aren't called twice at startup.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@784 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-07 12:27:39 +00:00
Ozkan Sezer
bf64fd2d1a better parse for opengl extensions list (from quakeforge.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@783 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-07 07:51:41 +00:00
Ozkan Sezer
b3d2bb6884 host.c (Host_ShutdownServer): no need to clear the sv structure, because
ServerSpawn already do this by Host_ClearMemory.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@782 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-06 08:56:09 +00:00
Ozkan Sezer
7ce7ce71ca made GL_Init() to be called every time a video mode is changed. we may
need to kill device and rendering contexts too, will see to that later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@781 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-06 08:50:45 +00:00
Sander van Dijk
d15e823ab7 Fix vsync saving/loading (take three...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@780 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-02 22:16:08 +00:00
Sander van Dijk
a138b55fbe Fix vsync saving/loading (take two...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@779 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-02 20:04:26 +00:00
Sander van Dijk
1777d5a49b Fix vsync saving/loading (hopefully...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@778 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-01 17:34:40 +00:00
Sander van Dijk
f755ad47a3 Adaptive FOV (Hor+). Patch by and thanks to rg3. Added cvar and clamping.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@777 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-31 07:30:36 +00:00
Ozkan Sezer
f8f0cecb4a added -Werror to compiler option checking so I don't have to edit
the Makefile whenever I want to use clang.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@776 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-25 11:15:15 +00:00
Ozkan Sezer
cf30d683d0 renamed Key_ForceDest to Key_UpdateForDest. added M_Menu_Main_f()
prototype to menu.h. minor tidy-ups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@775 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-23 08:44:20 +00:00
Ozkan Sezer
5de9f199ae deleted QuakeSpasm_Prefix.pch, doesn't seem to be used.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@774 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-22 07:10:13 +00:00
Ozkan Sezer
9f8b2dfc0d added IN_UpdateForKeydest() as a new helper who does stuff if the
key_dest changes matter to the keyboard driver, e.g. sending KP_
key decisions, or SDL unicode stuff. we run it every frame either
before Sys_SendKeyEvents() or from within Key_ForceDest() for now.
(merged from uhexen2.)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@773 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 11:33:10 +00:00
Ozkan Sezer
2a42d766a3 r_part.c: fixed pointfile loading.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@772 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 11:02:48 +00:00
Ozkan Sezer
9a78c9e829 some merges from uhexen2: clean up some crap in long chat line support.
do not set messagemode when not really connected. made chat_buffer[] and
chat_bufferlen static to keys.c. console.c uses new Key_GetChatBuffer()
and Key_GetChatMsgLen() accessor functions. renamed team_message global
to chat_team as in qw/q2. added Key_EndChat() as a new helper. called
Key_EndChat() from within CL_Disconnect() to not get stuck in chat mode.
now that key_message is guaranteed to be set only in game mode, removed
its cases from Key_ForceDest(). several other cleanups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@771 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 09:55:16 +00:00
Sander van Dijk
73aee2dd56 Another approach to fixing mouse grab/key_dest
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@770 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-15 19:53:07 +00:00