Commit graph

1178 commits

Author SHA1 Message Date
sezero
e5953b445c renamed cvar variable volume to sfxvolume in order to avoid shadowing.
(console name is still volume, no changes to that.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@180 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:38:22 +00:00
sezero
48ecd3b74b snd_mix.c: General whitespace and formatting tidy up.
(DWORD): Deleted macro.
(S_TransferStereo16): Removed unnecessary pbuf pointer and used shm-> buffer
directly.
(S_TransferPaintBuffer): Removed unnecessary pbuf pointer and used shm-> buffer
directly. Removed the shadowing instance of snd_vol and used the global var.
(S_PaintChannels): Replaced Q_memset with memset.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@179 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-03 16:28:30 +00:00
sezero
ad73b2d75a gl_model.c (Mod_LoadTextures): Don't use "min" or "max" as a var name.
net_dgrm.c (Net_Test_f): Likewise.
pr_cmds.c (SetMinMaxSize, PF_setsize): Likewise.
pr_exec.c (PR_Profile_f): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 12:10:49 +00:00
sezero
da11e5c84f gl_rmain.c, gl_rmisc.c, cl_tent.c, quakedef.h: removed leftovers from GLTEST.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@177 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 10:55:40 +00:00
sezero
a9c3e4d9e4 common.h: tweak the qboolean and NULL definitions for __cplusplus. from uhexen2.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@176 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 12:10:25 +00:00
sezero
4da670cd2c mathlib.h (max, min): The min and max were declared as inline but
were never defined. Moved them from mathlib.c to here as static
inline functions q_min and q_max. Define min and max as q_min and
q_max.
mathlib.c (max, min): Moved to mathlib.h as q_max and q_min static
inlines.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@175 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:56:27 +00:00
sezero
3c237ac3d7 quakedef.h: Define inline as __inline if !__cplusplus && _MSC_VER
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@174 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:55:59 +00:00
sezero
fbffcfa3b9 menu.c (m_return_state, m_quit_prevstate): fixed typo.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@173 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 10:12:00 +00:00
sezero
faef222404 menu.c (m_return_state): changed type to m_state_e
(m_quit_prevstate): Likewise.
menu.h (m_return_state): added extern declaration.
net_dgrm.c (m_return_state): removed extern declaration.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@172 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 09:15:50 +00:00
sezero
cff54a63a6 cvar.c (Cvar_RegisterVariable): change the callback function argument type
to cvarcallback_t.
cvar.h (Cvar_RegisterVariable): adjust prototype.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 08:01:29 +00:00
sezero
6d3f3f2081 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
sezero
cc80c805b4 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:39:09 +00:00
sezero
73c8c176f0 gl_mesh.c: Change the type of used[] array from qboolean to int, because
it is assigned not just true or false values but other integers like "2"
as well, and it would cause a mess if compiled as a C++ source.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@168 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 06:27:56 +00:00
sezero
562e37c468 MacOSX/QuakeSpasm.xcodeproj/
Updated XCode project files from Levent Yavas.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@167 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-21 19:03:17 +00:00
sezero
2bb4a6625e sys_sdl.c (Sys_Error): Call Host_Shutdown().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@166 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-18 14:15:19 +00:00
sezero
0c4c7bf1a9 quakedef.h: bumped QuakeSpasm version to 3 (0.85.3) for further development
and future releases.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@165 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-03 15:28:18 +00:00
stevenaaus
d1c21ccd0e Fix mouse release issue after toggling fullscreen
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@163 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-02 02:22:24 +00:00
sezero
775d00d580 host_cmd.c (Host_Startdemos_f): Add missing linefeed in Cbuf_InsertText() call.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@162 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-28 06:42:09 +00:00
sezero
4ecfa98178 gl_vidnt.c, gl_vidsdl.c: if 0'ed out unused CheckArrayExtensions().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@161 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:40:19 +00:00
sezero
eab6d09c2a sys.h, sys_sdl.c: Removed unused Sys_MakeCodeWriteable and Sys_DebugLog.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@160 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 12:37:20 +00:00
sezero
390db7c153 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@159 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 08:24:13 +00:00
sezero
c5ab356b4d 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-27 07:15:19 +00:00
sezero
f761ea4b28 host_cmd.c (Host_Mapname_f): Simplified map name retrieval.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 21:16:50 +00:00
sezero
016b5860ab zone.c: A little whitespace tidy-up here and there.
(hunk_t): Increased name array length to 24. Fixed the strncpy() calls
into that field so that it will be null terminated.
(cache_system_t): Increased name array length to 32.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@156 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 20:40:18 +00:00
sezero
b8052f88bd sys_sdl.c (Sys_Error): made text3, text4 and text5 into const char arrays.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@155 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:55:14 +00:00
sezero
5bd3fccecd 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
sezero
268b5a3e90 mathlib.h (VectorNormalizeFast): Use a float/int union instead of type
punning to avoid strict aliasing violations. the compiler used to emit
a warning from rsprite.c:R_DrawSpriteModel() where the macro is used.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:11:48 +00:00
sezero
9aa55ecbed r_alias.c (GL_DrawAliasFrame): Initialize vert2 to vert1 when not lerping,
which avoids a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@152 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:02:37 +00:00
sezero
7dd3951cff gl_model.c (Mod_LoadTextures): If lump->filelen == 0, initialize m to NULL
in order to avoid a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:47:19 +00:00
sezero
42d4e43d5f r_alias.c (GL_DrawAliasFrame): Initialize blend and iblend to 0 when not
lerping, which avoids a bogus compiler warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:44:24 +00:00
sezero
9a75b0a989 gl_vidnt.c (VID_SetMode): Initialize stat to false to avoid a compiler warning.
Some whitespace tidy-ups all over.
gl_vidsdl.c (VID_SetMode): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:41:39 +00:00
sezero
68aa123a2c gl_vidsdl.c (VID_Init): If -height is not specified on the command line,
initialize height to width*3/4 which avoids a compiler warning.
gl_vidnt.c (VID_Init): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:37:56 +00:00
sezero
6d761aafe8 gl_vidsdl.c (VID_SetMode): If mode setting failed, error out before doing
anything else unnecessary in between.
gl_vidnt.c (VID_SetMode): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:33:07 +00:00
sezero
fa0abdefdf removed net_udp.* from XCode project files. added conback.h to them.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@146 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 21:27:36 +00:00
sezero
29e7ef959d changed SDL conditional in input.h to SDL_MAJOR_VERSION
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:54:55 +00:00
sezero
eefe96b000 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@144 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:25:08 +00:00
sezero
4295ad9f9b Makefiles: tweaked+tidied the objects (based on uhexen2 makefile.)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:55:02 +00:00
sezero
24d7cbe9de renamed main.c to main_sdl.c.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:21:59 +00:00
sezero
fd2f95586d Makefiles: do not rely on /bin/true. define do_strip as a macro for debug and
non-debug cases and use it, instead. (adapted from tyrquake makefile.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:50:18 +00:00
sezero
3381b05750 added conback to windows codeblocks project file. removed gl_test from
codeblocks project files.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@140 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:01:52 +00:00
sezero
4dd3d91a86 added conback.c to XCode project files.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@139 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:15 +00:00
sezero
cd1b95ad90 removed gl_test.c
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:00 +00:00
sezero
2cdc2146b6 removed macmini.* from the MacOSX XCode project directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@137 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:47:52 +00:00
sezero
fe91b2680f added fitzquake085.txt as a reference doc. split fitzquake080.txt into
the original fitzquake080.txt and fitzquake080sdl.txt.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@136 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:32:50 +00:00
sezero
dc1d341a73 updated to Steven's new icon.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:55:10 +00:00
sezero
03761c9528 deleted fitzquake512.tga
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@134 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:50:52 +00:00
sezero
7798b0b5e2 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@133 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:48:09 +00:00
sezero
ec070a1f40 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:45:12 +00:00
sezero
dd4f1dd96a deleted Fitzquake.depend from the codeblocks project directories.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@131 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:22:25 +00:00
sezero
aa8d0efbf2 deleted fitzquake.bmp, fitz_bmp.h and fitzquake.ico, removed their reference
from the relevant source files.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:21:14 +00:00