Commit Graph

21 Commits

Author SHA1 Message Date
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 65a7f903e5 main_sdl.c (main): Remove leading linefeed from the init message.
common.c (COM_InitArgv): Move the leading linefeed to the end of message.

Index: main_sdl.c
===================================================================
--- main_sdl.c	(revision 157)
+++ main_sdl.c	(working copy)
@@ -58,7 +58,7 @@
 	if (!parms.membase)
 		Sys_Error ("Not enough memory free; check disk space\n");
 
-	Con_Printf("\nFitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
+	Con_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
 	Con_Printf("SDL port (c) Sleepwalkr, Baker\n");
 	Con_Printf("QuakeSpasm %1.2f.%d (c) Ozkan Sezer, Stevenaaus\n", FITZQUAKE_VERSION, QUAKESPASM_VER_PATCH);
 
Index: common.c
===================================================================
--- common.c	(revision 157)
+++ common.c	(working copy)
@@ -1150,7 +1150,7 @@
 	if (n > 0 && com_cmdline[n-1] == ' ')
 		com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space
 
-	Con_Printf("\nCommand line: %s",com_cmdline);
+	Con_Printf("Command line: %s\n", com_cmdline);
 
 	safe = false;
 


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 07:15:19 +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 610567cb8a common.c (COM_Parse): commented out the check for ':' in regular word parsing
so that a command line like "+connect ip:port2 works.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 13:35:05 +00:00
Ozkan Sezer 14a1493f73 quakedef.h (quakeparms_t): removed the cachedir member which doesn't serve
any purpose for quite some time. added userdir as a new member, user's
directory on UNIX platforms. if user directories are enabled, basedir
and userdir will point to different memory locations, otherwise to the same.
this member will be enabled/used later.
common.c: removed all references to cachedir and com_cachedir which don't
serve any purpose for quite some time.
main (main): removed assingment to cachedir member.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@96 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 12:50:12 +00:00
Ozkan Sezer 3724ddbb02 common.c (com_basedir): added new global char array.
(COM_InitFilesystem): used global com_basedir instead of the automatic
basedir variable.
common.h (com_basedir): added extern.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@95 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:55:13 +00:00
Ozkan Sezer 0f91628b0d common.c (va): made va() to cycle between four static buffers so that we
can call it one after another. will be needed later.
(get_va_buffer): new helper for va().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@92 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:28:12 +00:00
Ozkan Sezer f0c318cafe common.c (Q_strncasecmp): fix it so that it properly returns negative and
positive values.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@87 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:00:57 +00:00
Ozkan Sezer eb9e15a9b3 the custom embedded comback image is intended to replace the id1 image ..
* .. when running in fitz-compatibility mode (-fitz command line switch)
* .. or when the mods themselves did not provide their own conback image
themselves, ie. the "Q" conback image of id1 is just not wanted. So, just
modify/corrupt the gfx/conback.lmp filename in the id1/pak0.pak file list,
achieving the intention that way.
common.c (kill_id1_conback): new QuakeSpasm customization helper.
 (COM_InitFilesystem): call kill_id1_conback() just after adding the id1
directory to the search path when not running in fitzmode.
gl_draw.c (Draw_ConbackPic): when not running in fitzmode, do search for
the gfx/conback.lmp file before loading the embedded custom image to see
whether the mod provided its own conback image.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@76 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:50:31 +00:00
Ozkan Sezer e3d6b98d8b common.c (COM_FindFile): commented out the debug messages about finding
and not finding a file.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@74 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:20:20 +00:00
Ozkan Sezer c31e8931a8 common.c (COM_Init): move the -fitz command line switch check before the
filesystem initialization.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@73 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:14:30 +00:00
Ozkan Sezer 4065ce7280 common.c (COM_Init): updated endianism check.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@48 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:00:31 +00:00
Ozkan Sezer 44ad29724b common.c, common.h: added check for '-fitz' command line switch which, if true,
makes quakespasm to run in fitzquake mode and disable custom quakespasm hacks.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@47 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:45:18 +00:00
Ozkan Sezer 9e861e3102 64 bit compatibility effort, 1/nn: type correctness work in common.c,
common.h, gl_vidsdl.c, mathlib.h, zone.c, zone.h. added Z_Realloc as a
new function (will be used later.) next step will be type correctness
work in opengl stuff.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@33 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:22:20 +00:00
Ozkan Sezer 8f3d2c5c7b common.c, common.h: constified the replacement string library functions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@27 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 13:02:22 +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 73aef81aca common.c (COM_InitArgv): remove the trailing whitespace added at the end
of cmdline string only if there is one. print out the command line as an
informational message.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@19 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:10:58 +00:00
Ozkan Sezer 3a5b43816d common.c (COM_FindFile): Made PackFile debug message prints into Con_DPrintf so
that they don't spam the console.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@9 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:40:26 +00:00
Ozkan Sezer 5c023d21ad common.c (COM_LoadFile): Commented out the Draw_BeginDisc call. It causes core
dumps when called excessively in big mods.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@8 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:25:33 +00:00
Ozkan Sezer 383e3900ea common.c (COM_FileBase): fix an old quake bug where it can start hunting
whole memory for the nul terminator.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@3 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:30:23 +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