Commit Graph

30 Commits

Author SHA1 Message Date
Sander van Dijk 8d4edcc03b Make the "unbindall" in config.cfg configurable (on by default)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@722 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-12 20:14:20 +00:00
Sander van Dijk 30b7d757ca keys.c:Key_WriteBindings(): Clear old bindings before setting new ones.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@715 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-08 13:46:18 +00:00
Ozkan Sezer 5a2a7d96a7 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@686 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-25 11:20:38 +00:00
Sander van Dijk 13b3ce9f25 Re-introduce KP_* syms, but only "in-game".
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@683 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-08 19:27:12 +00:00
Sander van Dijk f76bf8765a keys.[ch]: comment out KP_* keys, since we map them to their K_* counterparts
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@663 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-23 18:01:47 +00:00
Ozkan Sezer 88a4c92ef5 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@641 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-03-08 10:14:58 +00:00
Ozkan Sezer 19953bd399 silenced -Wsign-compare warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
Ozkan Sezer fb2f45126e changed many strcpy and strncpy into q_strlcpy
and strcat and strncat into q_strlcat

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@560 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 13:15:31 +00:00
Ozkan Sezer 9d809a3687 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-16 14:11:37 +00:00
Ozkan Sezer a02adcf4c1 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@523 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 21:41:48 +00:00
Ozkan Sezer 9155f744d6 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 16:33:52 +00:00
Ozkan Sezer 8dc5750acc keys.c (History_Init, History_Shutdown): use host_parms->userdir.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@444 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 17:02:41 +00:00
Ozkan Sezer 69bdb0855e 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@407 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-10 16:10:53 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Steven 6a79b12f88 History fixed - Ozkan's newline fix seems ok.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:50:27 +00:00
Steven f303df4d82 Make some fixes for command line history now that history is persistent
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-28 07:08:16 +00:00
Steven 66cafbd197 There seems bugs in the command-line code. Revert this "blank newline" fix first, then look for more
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-27 21:45:33 +00:00
Ozkan Sezer e69a106d3d made MAXCMDLINE definition public through keys.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-25 10:36:14 +00:00
Steven e9192f232a 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-07-23 20:55:11 +00:00
Ozkan Sezer c6a63edca2 keys.c (History_Shutdown): Don't let it write an empty string to history.txt
if no console commands were used.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 10:50:40 +00:00
Ozkan Sezer 8126ad58a8 * 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-26 07:56:28 +00:00
Ozkan Sezer d96f32d4b8 keys.c (History_Init): Made global again.
(History_Shutdown): Likewise.
keys.h: Added prototypes for History_Init and History_Shutdown.


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


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@229 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 23:55:41 +00:00
Steven 5a273f0a99 Add Bakers/Ezquakes persistent history feature
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-25 13:32:49 +00:00
Ozkan Sezer def1c058f4 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
Ozkan Sezer bbcb0caaaa 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
Steven 72fe89e17c S.A. history fixes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
Ozkan Sezer 68fc38c3a6 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:01:07 +00:00
Ozkan Sezer 0be5bbf691 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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@14 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:10:43 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00