Commit Graph

22 Commits

Author SHA1 Message Date
Ozkan Sezer 0c82fbc646 console.c (LOG_Init): Removed the O_APPEND flag when opening the log file.
It was a legacy from Quake who used to open and close the log file on every
write. Commented out the unlink() call and added O_TRUNC to the open flags.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@476 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-08-03 19:30:37 +00:00
Ozkan Sezer 250fa2b7ce check for arguments to several command line options. patch from Sander van Dijk.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@446 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 18:29:41 +00:00
Ozkan Sezer 945262b863 min/max macros: renamed them to q_min and q_max, moved them common.h.
removed the inline versions which only handled integers.  moved CLAMP
macro to common.h.  Adjusted all places for the renamed macros.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 10:35:40 +00:00
Ozkan Sezer 7aa88b97a4 * console.c, sbar.c: fixed a few format string issues.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-09-20 08:27:20 +00:00
Ozkan Sezer e08d6cf1e3 replaced all usess of vsprintf by q_vsnprintf
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +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 d8779f7d0d MS Visual Studio support:
* Quake/console.c, net_udp.c: replace snprintf by q_snprintf.
* Quake/common.h: Define q_snprintf as _snprintf for windows and as
snprintf for all others. Likewise for q_vsnprintf. Disable several
MSVC warnings. Define fmin and fmax as min and max macros for MSVC.
* Windows/quakespasm.vcproj, quakespasm.sln: Add Visual Studio 2005
project files.
* Windows/SDL_x64.zip: Add SDL x64 import libraries for MSVC.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@281 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-20 02:25:22 +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
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 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 c2c768f028 console.c: Added LOG_Init() and LOG_Close() as two new procedures, adapted
from uhexen2. Moved debug log initialization from Con_Init() to LOG_Init().
Made Con_DebugLog() to operate without varargs stuff. Log file is written
into host_parms->basedir now, not into a gamedir.
console.h: Added prototypes for LOG_Init() and LOG_Close().
host.c (Host_Init): Added LOG_Init().
(Host_Shutdown): Added LOG_Close().
quakedef.h (quakeparms_t): Moved the typedef to an earlier place before
any of the other quake headers are included.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 08:24:13 +00:00
Ozkan Sezer 53746a85c9 Constified Con_DebugLog, Con_Print, Con_Printf, Con_Warning, Con_DPrintf,
Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, Con_LogCenterPrint,
Con_NotifyBox, PL_ErrorDialog, PR_RunError, Host_EndGame, Host_Error,
SV_ClientPrintf, SV_BroadcastPrintf, Host_ClientCommands, Sys_DebugLog,
Sys_Error, Sys_Printf, BOPS_Error and va. Added noreturn attribute to
Sys_Error, Sys_Quit, BOPS_Error, PR_RunError, Host_EndGame and Host_Error.
Added format printf attribute to Con_DebugLog, Con_Printf, Con_Warning,
Con_DPrintf, Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, PL_ErrorDialog,
PR_RunError, Host_EndGame, Host_Error, SV_ClientPrintf, SV_BroadcastPrintf,
Host_ClientCommands, Sys_DebugLog, Sys_Error, Sys_Printf and va. Adjusted
Host_Status_f and NET_Ban_f for the new attributes. Fixed broken format
strings in Con_Dump_f, Mod_LoadTexinfo, PR_AllocStringSlots and FloorDivMod.
Defined __attribute__ macros in quakedef.h so that we don't break non-gcc
compilers.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
Ozkan Sezer e0cb1c601d console.c (BuildMapList, Con_TabComplete): fix sporadic erratic behaviour
with map name completion. from Steven.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@93 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:44:59 +00:00
Ozkan Sezer ba628ca477 console.c (Con_TabComplete): added a workaround after the weirdness that has
been happening with the argument completion for the changelevel command after
the completion changes. from Steven.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@75 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:29:48 +00:00
Ozkan Sezer 24fc57ac86 console.c: Steven's patch adding argument completion to map and changelevel
commands.  this is not a true argument completion, only a tiny hack for the
two aforementioned commands.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@65 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:35:13 +00:00
Ozkan Sezer cb6a0bcaaf console.c: Steven's patch making console command completion display a little
more like bash, showing the maximum matching partial at the first time instead
of auto-completing to the first match.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@64 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:28:41 +00:00
Ozkan Sezer cd68be3496 console.c (Con_TabComplete): check for key_tabpartial[0] instead of strlen(key_tabpartial).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@57 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 09:15:23 +00:00
Ozkan Sezer 6c7d3d7205 console.c, gl_vidsdl.c, host_cmd.c, in_sdl.c, main.c, menu.c, net_sdl.c,
net_sdlnet.c, sys_sdl.c: a lot of space-to-tab whitespace tidy-ups in the
files created or touched by the SDL port. no actual code change.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@43 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:32:04 +00:00
Ozkan Sezer 054914f7bf console.c (Con_DrawConsole): Change engine/version string to QuakeSpasm,
use the QUAKESPASM_VER_PATCH to append to the FITZQUAKE_VERSION.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@30 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:48:23 +00:00
Ozkan Sezer 3e255ca4a6 console.c (Con_DrawConsole): Added SDL to the version string.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@10 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:42:58 +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