Commit Graph

49 Commits

Author SHA1 Message Date
svdijk 5a7a0715de rename the modestate_t enum items
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@805 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:07:19 +00:00
svdijk eea756eb80 remove "type" from "viddef_t", use "modestate" instead
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@804 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:01:26 +00:00
sezero aeb02aa793 updated arch_def.h and net_sys.h from uhexen2. adjusted users accordingly.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@793 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-01-07 17:30:17 +00:00
sezero 6af46c6962 renamed Key_ForceDest to Key_UpdateForDest. added M_Menu_Main_f()
prototype to menu.h. minor tidy-ups.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@775 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-23 08:44:20 +00:00
sezero 266705612d 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@773 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 11:33:10 +00:00
sezero 2d65a14aef 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@771 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 09:55:16 +00:00
svdijk cacff4c570 Another approach to fixing mouse grab/key_dest
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@770 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-15 19:53:07 +00:00
sezero baf09f0807 moved cfg_unbindall and its registration to cl_main.c. moved the
config.cfg write of unbindall to Key_WriteBindings().

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@768 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-12 07:33:11 +00:00
sezero 21e8ded7de removed unnecessary m_keys_bind_grab check from autorepeats.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@764 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-07 13:15:15 +00:00
svdijk 7a5b68f155 some more minor changes to accomodate r761
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@763 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-07 12:46:57 +00:00
svdijk fa38f61c39 gl_vidsdl.c: minor improvement to bpp list creation
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@752 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-30 21:11:39 +00:00
sezero fc8dec2080 further Key_Console() cleanup. made Shift-Ins to paste text like Ctrl-v.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@750 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-30 12:55:09 +00:00
svdijk 98032825ee Style
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@749 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-30 08:23:00 +00:00
sezero 727887e982 include arch_def.h in keys.c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@747 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-28 22:24:27 +00:00
sezero a5c054dd0d * keys.c: added K_COMMAND as a new key. added Cmd+V as a Mac special
case for paste request.
* keys.h: added K_COMMAND as a new key (170 for now).
* in_sdl.c (IN_SendKeyEvents): translate SDLK_LMETA/SDLK_RMETA as
  K_COMMAND. ignore unhandled SDLK_WORLD_* international characters.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@746 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-28 21:41:31 +00:00
sezero f68cb1dc27 moved clipboard pasting code into new PasteToConsole() helper procedure
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@744 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-27 14:00:12 +00:00
sezero d55d415911 keys.c (Key_Console): several cleanups from uhexen2. replaced in-place
strcpy() calls by proper memmove() calls. activated (and fixed) Ctrl-V
text pasting support from OS clipboard (only works on windows for now.)

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@742 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-27 13:11:36 +00:00
svdijk f133047b90 keys.c: don't be case-sensitive about ctrl-c
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@739 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-27 12:22:51 +00:00
svdijk 1f0243ffd1 Some history browsing fixes (partly from uhexen2)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@734 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-26 17:08:37 +00:00
svdijk 04bb30a48a Make the "unbindall" in config.cfg configurable (on by default)
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@722 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-12 20:14:20 +00:00
svdijk e68bacb376 keys.c:Key_WriteBindings(): Clear old bindings before setting new ones.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@715 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-08 13:46:18 +00:00
sezero e39b2ca3c8 * keys.h: renamed KP_* key macros to K_KP_*.
* key.c (Key_ClearStates): Instead of clearing all key's down state
  and repeat count, run KeyEvent(k,false) keys in down state, which
  will already clear those states for them. This also helps getting
  rid of several actions bound to keypad keys. Minor cleanups.
* gl_vidsdl.c (ClearAllStates): Removed code triggering every key
  with a release event, because we just changed Key_ClearStates() to
  do that for the necessary keys.
* in_sdl.c: Minor cleanups. Made K_KP_5 to send '5' when not in game
  mode, regardless of the numlock status. Moved prev_gamekey to top
  level and call SDL_EnableUNICODE() correctly.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@686 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 11:20:38 +00:00
svdijk ded49555b1 Re-introduce KP_* syms, but only "in-game".
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@683 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-08 19:27:12 +00:00
svdijk 133184d1ea keys.[ch]: comment out KP_* keys, since we map them to their K_* counterparts
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@663 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-23 18:01:47 +00:00
sezero 5fe60a036b changed the rowbytes, width, height, conwidth and conheight members of
viddef_t from unsigned to signed int. fixed the -Wsign-compare warnings
for NUM_GLMODES. fixed compilation using g++, by adding a missing type
cast.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@641 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-08 10:14:58 +00:00
sezero 9ef1ddb76b silenced -Wsign-compare warnings.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
sezero ba15eced3c changed many strcpy and strncpy into q_strlcpy
and strcat and strncat into q_strlcat

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@560 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 13:15:31 +00:00
sezero 7a7fe8f4c9 SDL input driver: updated from the uHexen2 project adding native keymap
and dead key support to the console, thanks to Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-16 14:11:37 +00:00
sezero 94117294f7 keys.c (History_Init): filter out '\r' and skip over to the first non-EOL
character. This allows using a windows-generated history.txt file on unix.
based on a patch from Sander van Dijk.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@523 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 21:41:48 +00:00
sezero c28e767afb keys.c (Key_Event): Allow autorepeats in message (chat) mode; based on a
patch from Sander van Dijk.  Rearrange the autorepeat condition checks a
bit, based on uhexen2.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 16:33:52 +00:00
sezero 51134643dd keys.c (History_Init, History_Shutdown): use host_parms->userdir.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@444 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 17:02:41 +00:00
sezero cd97cf2507 support for mouse buttons 4 and 5:
* keys.h: add KMOUSE4 and K_MOUSE5 defines after K_MWHEELDOWN
* keys.c: add KMOUSE4 and K_MOUSE5 to the keynames table.
* main_sdl.c: handle SDL_BUTTON_X1 and SDL_BUTTON_X2 for mouse
button events.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@407 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 16:10:53 +00:00
sezero 205cabbdc2 const correctness changes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
stevenaaus 630499ae8f History fixed - Ozkan's newline fix seems ok.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
stevenaaus 57484778cd Make some fixes for command line history now that history is persistent
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
stevenaaus 30d9246c7b There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
sezero b4ae05875e made MAXCMDLINE definition public through keys.h.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
stevenaaus c31e3d107a Enable messages and says to be 256 chars long, with a scrolling input line across top of screen. Allow tab button in demos.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
sezero cfee212570 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
sezero bd2385e5ea * keys.c (HISTORY_FILE_NAME): define simply as history.txt without
prefixing with a game directory, so that the history file would be
written into the basedir and not affected by dynamic game directory
changes.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
sezero 7383a1647b keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@230 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 00:15:22 +00:00
sezero 9154ed3539 * keys.c (History_Init): Make it static. Tidy-up its formatting.
(History_Shutdown): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
stevenaaus 819208b38c Add Bakers/Ezquakes persistent history feature
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
sezero f5986fba56 keys.c (Key_SetBinding): Avoid the C++ keyword "new".
pr_cmds.c (PF_normalize, PF_vlen): Likewise.
zone.c (Z_TagMalloc, Cache_Move, Cache_TryAlloc): Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
sezero 04ad6afa99 moved BuildKeyMaps(), Key_Map() and key_map[] from keys.c to in_sdl.c.
made key_map[] static to in_sdl.c. moved the relevant prototypes to
input.h for SDL builds only.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
stevenaaus ca0a5d999a S.A. history fixes
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
sezero 572e94ecdb chase.c, cl_input.c, cl_parse.c, client.h, common.c, common.h, console.h,
cvar.h, draw.h, gl_draw.c, gl_fog.c, gl_mesh.c, gl_model.c, gl_model.h,
gl_rmain.c, gl_rmisc.c, gl_screen.c, gl_sky.c, gl_texmgr.c, glquake.h,
host.c, keys.c, keys.h, main.c, menu.c, menu.h, pr_cmds.c, quakedef.h,
r_alias.c, r_brush.c, r_part.c, r_sprite.c, r_world.c, sbar.c, sbar.h,
screen.h, snd_dma.c, snd_mem.c, snd_mix.c, sv_main.c, sys_sdl.c, vid.h,
view.h, world.c, world.h:  Loads of warning fixes about missing function
prototypes, missing parens around &, missing braces leading to ambiguous
else statements and unused and uninitialized variables. There are still a
couple of unitialised variables here and there, but not much. The warnings
about strict aliasing violations need taking care of.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:01:07 +00:00
sezero 54a4da8977 gl_vidsdl.c (VID_Toggle): New proc for easy windowed-fullscreen toggling
using SDL. Works only under X11.
keys.c (Key_Event): Moved ALT-Enter windowed-fulscreen toggle handling to
main() in main.c so that it works properly for now.
main.c (main): Moved ALT-Enter windowed-fulscreen toggle handling from
keys.c to main() so that it works properly for now.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@14 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:10:43 +00:00
sezero c5c4e96d44 initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00