Commit Graph

874 Commits

Author SHA1 Message Date
Ozkan Sezer ed0eeb149f sync a few minor stuff with uhexen2 svn
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-30 18:00:06 +00:00
Ozkan Sezer 472bd01fce bump version to 0.90.1
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1131 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 20:05:08 +00:00
Eric Wasylishen b694b513ec Tweak the MH dynamic lighting speedup to be more correct: upload the lightmaps from the current frame instead of the previous frame.
It was possible, but unlikely, to see artifacts from the previous code in some circumstances, e.g. "host_maxfps 10" and spin around quickly near a flashing light e1m1, you may see a surface drawn with an out-of-date lightmap for one frame.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 19:27:42 +00:00
Ozkan Sezer 25b8df20a7 minor tidy-ups
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 17:00:34 +00:00
Sander van Dijk bc30c6278c sdl: Make our error checking for SDL_Init(SubSystem) consistent with the SDL wiki/test programs.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 16:33:01 +00:00
Ozkan Sezer ce78a2ea51 run SDL_Quit() at exit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 11:20:14 +00:00
Eric Wasylishen 53288141e7 sys_sdl_win: Sys_SetDPIAware: only call GetProcAddress on a non-NULL library handle
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 00:15:49 +00:00
Eric Wasylishen f244f82c64 sys_sdl_win.c: Sys_SetDPIAware: call SetProcessDPIAwareness / SetProcessDPIAware
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-16 23:01:43 +00:00
Sander van Dijk 5438f83b08 keys.c: Add keynames BACKQUOTE and TILDE, to facilitate (un)binding them from the console.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 17:32:40 +00:00
Sander van Dijk e06f197879 keys: K_ALT is not a consolekey (it was accidentally added in r1112).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:18:29 +00:00
Sander van Dijk 25d630c1b8 console.c: When toggling the fullscreen console off, clear the current line.
This is consistent with toggling the in-game console off, and fixes stray '`' or '~' (or '^' or '\' or ..., depending on the keyboard layout) characters.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:06:18 +00:00
Sander van Dijk b2222b0a62 keys.c: Ignore control characters in Char_Event(), to prevent text input when pressing ctrl-c/ctrl-v.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1115 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 05:58:54 +00:00
Eric Wasylishen f607f1b4eb in_sdl: change DBEUG_INPUT preprocessor check to an "in_debugkeys" cvar to make it easier to debug unusual keyboards
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 18:31:49 +00:00
Sander van Dijk 81daee8fcf input: Minor fix in Char_Event().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 17:13:03 +00:00
Sander van Dijk 13cfd00787 input: Remove some of stuff obsoleted by r1110.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 17:10:34 +00:00
Eric Wasylishen 3cb6f871f1 in_sdl.c: make key debug logging more verbose
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 04:03:16 +00:00
Eric Wasylishen 1b6abd0e04 in_sdl.c, key.c: Fixes agreed on with Sander:
1. Remove Key_IgnoreTextInput(), and simple always send a Char_Event when
we receive TEXTINPUT (SDL2) or the unicode field of a KEYDOWN event is
filled (SDL1.).
2. Remove handling of K_KP_* in the menu/console, since they cannot be
relied on to not also send text (see issue described above). The handling
of K_KP_ENTER can stay, since we do know that it never sends text.
3. Remove the interpretation hack for the numpad, since it will no longer
be needed (and doesn't currently work for SDL2 anyway); if a numpad key
generates text we will handle it (because of "1"), if not then it will
simply be if ignored (because of "2”).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 03:30:44 +00:00
Eric Wasylishen aeb4ed86d2 in_sdl: remove lastKeyDown hack
was no longer needed and was causing issues typing underscores (US keyboard layout) on Linux/SDL2 where SDL_TEXTINPUT is delivered before the SDL_KEYDOWN.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-13 03:21:47 +00:00
Eric Wasylishen bd07399747 in_sdl: add some debug logging for key events (only if DEBUG_INPUT is defined)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-13 03:21:40 +00:00
Ozkan Sezer 5678106819 fix sdl2-msvc build
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-12 11:20:34 +00:00
Ozkan Sezer 039fdaad6f minor whitespace adjustments
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 19:11:40 +00:00
Sander van Dijk 6ae9f2e37e keys: Simplify r1097.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1098 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 11:47:05 +00:00
Sander van Dijk 3ecdc28743 keys: Rework the specialkeys[]/consolekeys[] initialization a bit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1097 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 11:22:53 +00:00
Sander van Dijk 1440636ec6 input: Move fullscreen and console toggle from in_sdl.c to keys.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1096 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-11 08:49:45 +00:00
Sander van Dijk 42c708a1e1 in_sdl.c: rewrite TEXTINPUT handling a bit again.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1094 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-08 20:03:05 +00:00
Sander van Dijk db68976877 in_sdl: Remove commented-out m_filter code and a misleading comment.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1093 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-08 18:57:55 +00:00
Sander van Dijk c23a0197d6 Rename some (recently added) functions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1092 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-08 18:30:17 +00:00
Sander van Dijk 5e73eb18a4 in_sdl.c: Workaround for broken SDL2 numlock state.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1091 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-07 06:15:16 +00:00
Sander van Dijk eaa33b20b6 in_sdl.c: Fix numpad translation with SDL 1.2.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1090 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-06 20:47:35 +00:00
Sander van Dijk 745c643ef2 input: Some more tuning.
* in_sdl.c: Remove the over-zealous "no events for unknown keys" checks introduced in r1085. Events for unknown keys can be useful for "press any key" situations.
* keys.c: In input grab mode, update the "lastkey" member only for key down events.
* keys.c/console.c: Adapt input grab mode to properly support catching "any key" presses.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1089 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-06 06:09:42 +00:00
Sander van Dijk 045cf968de in_sdl.c: Inline IN_IsNumpadKey().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1088 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 21:02:25 +00:00
Sander van Dijk 0c28e5a03e keys.c: Allow SetBinding() to really clear a key, instead of binding it to the empty string.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1087 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 20:48:27 +00:00
Sander van Dijk 5ca58d55b0 input: Minor tuning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1086 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 19:03:48 +00:00
Sander van Dijk 14f5275a2c input: Implement numpad translation in text input mode.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1085 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 18:21:58 +00:00
Sander van Dijk f6d44a3a10 Fix SDL2 fallback when no FSAA is available.
On my old laptop, when running "./quakespasm -fsaa 2", quakespasm would error out with a "Couldn't create window" message. Our "no FSAA available" fallback was applied at OpenGL context creation time, but according to the SDL2 wiki FSAA settings should be done before creation of the window (see https://wiki.libsdl.org/SDL_GLattr#multisample). Moved it there.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1084 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 17:06:35 +00:00
Sander van Dijk 4b011d6285 input: Remove unneeded key_repeats array, some input grab tuning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1083 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 16:35:59 +00:00
Sander van Dijk f605137b02 menu: Add M_Quit_InputtingText() for consistency.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1082 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 15:32:45 +00:00
Sander van Dijk e4575839a9 input: Fix SDL2 mouse wheel up/down behaviour.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1081 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 15:25:31 +00:00
Eric Wasylishen 749ed362e7 gl_vidsdl.c: for OpenGL versions below 1.5, assume "-novbo" (attempting to avoid old, broken VBO implementations).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1080 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-03 18:31:58 +00:00
Sander van Dijk 2c177df399 input: Minor addition to r1077.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1079 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:34:33 +00:00
Sander van Dijk 1ab2cbde9b input: Support for "plain" numpad keys in the menu/console (still todo: numpad translation).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1078 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:21:52 +00:00
Sander van Dijk 8d0cb0086a input: More text input restructuring.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1077 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:00:42 +00:00
Sander van Dijk 856f94fac8 input: Some text input restructuring in preparation of numpad translation support.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1075 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-30 19:29:58 +00:00
Sander van Dijk ad7ac7caf6 Revert r1073.
I read that comment as "bindings for these keys won't execute when in the menu", but it should be read as "no new bindings can be made for these keys through the bindings sub-menu", which is actually correct.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1074 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-30 06:18:31 +00:00
Sander van Dijk ddf7f188d1 keys.c: Correct a typo in a comment.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1073 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-29 18:33:20 +00:00
Sander van Dijk f30f590ec7 keys.c: Remove shift interpretation.
This never really belonged in keys.c (should have been handled in the backend instead), but now that we have separated Key_Event()/Char_Event() this no longer serves any purpose at all.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1072 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-29 18:31:41 +00:00
Eric Wasylishen 26c1b63c00 sv_main: Second part of fixing the MAX_ENT_LEAFS issue (after bumping MAX_ENT_LEAFS to 32 in r967).
If an entity is visilbe from MAX_ENT_LEAFS (32) or more leafs, don't try to vis-cull it, just send it to the client.
This should completely eliminate any flickering entities, no matter how many leafs they're visible from.

This could potentially increase packet sizes a bit.. but ent->num_leafs == 32 never happens in id1 epsiode 1, so it will not cause any increase on those maps.
hip1m1 has one entity (a rotator) that is caught by this change and will be always sent.

see e.g.
http://forums.inside3d.com/viewtopic.php?f=1&t=5554
http://www.celephais.net/board/view_thread.php?id=60452&start=1235

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1069 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-28 19:02:27 +00:00
Sander van Dijk cebef615e5 input: Rework the text/non-text input mode handling.
Before, "gamekey" was the special case, now "textmode" is. We are now more precise about when we activate "textmode", e.g. we only do this when the console, messagemode, or a textfield in the menu are active. The trigger for doing this was this line on the "SDL_StartTextInput" page of the SDL2 wiki: "On some platforms using this function activates the screen keyboard.". Although we currenly support no such platform, it's good te be prepared, and what we do now is more correct anyway.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1066 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 19:10:02 +00:00
Sander van Dijk c8da3f1f61 Rename some functions for consistency.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1064 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 02:19:57 +00:00
Sander van Dijk 46e003557a in_sdl.c: rewrite TEXTINPUT handling a bit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1063 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 02:15:46 +00:00