Commit Graph

10 Commits

Author SHA1 Message Date
Sander van Dijk 7926cc5bf3 - Rename the "Reset defaults" menu option to "Reset config".
- Make it reset only those cvar's that are saved to config.cfg.
- Make it as the user for confirmation.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@609 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-17 08:25:07 +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 b09ee296a7 more cvar cleanups: Added Cvar_LockVar, Cvar_UnlockVar, Cvar_UnlockAll and
Cvar_FindVarAfter. Don't expose cvar_vars directly and use Cvar_FindVarAfter
instead.  several typo fixes, etc.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@570 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 12:28:21 +00:00
Ozkan Sezer 5938fe8c3e some more cvar work: made Cvar_RegisterVariable() to only link the variable in
and set some basic flags, but then let functions to set it. Added Cvar_SetQuick
and Cvar_SetValueQuick which accept a cvar pointer instead of a var name, but
identical to the non-Quick versions otherwise. Made Cvar_SetValue to print the
value as an integer if the float value is the same when cast to an int; if not,
made it to strip the trailing zeroes in the string.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@569 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 09:37:28 +00:00
Ozkan Sezer 1928f2e1b8 * first shot at cvar flag system and cvar layer clean-ups :
- removed the archive and server members of cvar_t structure
  which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
  and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to 
  set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
  remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
  as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
  string buffer if nothing is changed, nor does it run the
  var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
  so that the users can't change it using the console.  (and
  with 'registered' flagged as CVAR_ROM, the 'static_registered'
  thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
  evil...
- more to follow later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:01:33 +00:00
Ozkan Sezer 42e55b3377 changed cvar callback functions to accept a cvar_t pointer arg. I may
have a use for that later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@545 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 14:04:01 +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
Ozkan Sezer b034275af4 cvar.c (Cvar_RegisterVariable): change the callback function argument type
to cvarcallback_t.
cvar.h (Cvar_RegisterVariable): adjust prototype.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 08:01:29 +00:00
Ozkan Sezer c24d592580 host_cmd.c, console.c, gl_draw.c, image.c, gl_model.c, r_sprite.c, cl_parse.c,
gl_warp.c, host.c, gl_mesh.c, gl_sky.c, gl_texmgr.c, cvar.c, sv_main.c, cvar.h,
gl_screen.c, r_brush.c, gl_vidsdl.c, zone.c, cl_main.c, cmd.c, snd_dma.c,
snd_mem.c, common.c, sv_phys.c: Added explicit casts to eliminate -Wc++-compat
warnings.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +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