Commit Graph

1035 Commits

Author SHA1 Message Date
Ozkan Sezer 4bc2b26e79 r_alias.c (GL_DrawAliasFrame): Initialize vert2 to vert1 when not lerping,
which avoids a bogus compiler warning.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@152 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 14:02:37 +00:00
Ozkan Sezer 0baa28dbee 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:47:19 +00:00
Ozkan Sezer adf384e8b9 r_alias.c (GL_DrawAliasFrame): Initialize blend and iblend to 0 when not
lerping, which avoids a bogus compiler warning.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:44:24 +00:00
Ozkan Sezer 4b4ee0cbe9 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@149 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:41:39 +00:00
Ozkan Sezer c7dc5d6cbf 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@148 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:37:56 +00:00
Ozkan Sezer 9f235e0013 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 13:33:07 +00:00
Ozkan Sezer d9bba8189a changed SDL conditional in input.h to SDL_MAJOR_VERSION
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 16:54:55 +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
Ozkan Sezer 8c2b5e909c Makefiles: tweaked+tidied the objects (based on uhexen2 makefile.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@143 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:55:02 +00:00
Ozkan Sezer eafcf39b85 renamed main.c to main_sdl.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@142 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 15:21:59 +00:00
Ozkan Sezer 986fd86c79 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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 14:50:18 +00:00
Ozkan Sezer 59e73c21f4 removed gl_test.c
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 13:55:00 +00:00
Ozkan Sezer 91d141ae1e updated to Steven's new icon.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:55:10 +00:00
Ozkan Sezer 3416a30557 renamed several Fitzquake.* files to QuakeSpasm.* and adjusted the places
where they are referenced.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:45:12 +00:00
Ozkan Sezer bcd8e3d332 deleted fitzquake.bmp, fitz_bmp.h and fitzquake.ico, removed their reference
from the relevant source files.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 12:21:14 +00:00
Ozkan Sezer 6f81045e9f gl_vidsdl.c, gl_vidnt.c: more sync'ing between gl_vidsdl.c and fitz-0.85
version of gl_vidnt.c.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@129 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:10:07 +00:00
Ozkan Sezer 8a9230a245 menu.c (M_AdjustSliders): Changed all of the second if conditions to else if.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-24 11:08:12 +00:00
Ozkan Sezer be8c131e1a gl_vidsdl.c: minor editing for a little less diff output against gl_vidnt.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@127 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 10:10:16 +00:00
Ozkan Sezer 0521495d86 gl_vidnt.c (GL_MTexCoord2fFunc, GL_SelectTextureFunc): these aren't externs
in this file. made it to look like gl_vidsdl.c.
glquake.h: removed commented out multitexture stuff.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:50:44 +00:00
Steven 4443dbc333 Change the "screen size" slider to a scale slider
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 09:25:13 +00:00
Ozkan Sezer a9b408d871 gl_vidsdl.c: fixed copy+paste error from rev. 119.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@123 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 07:25:39 +00:00
Ozkan Sezer b5e526686d gl_vidsdl.c (VID_Restart): make sure that scr_conscale.value is positive
in conwidth and conheight recalculation (fitzquake-0.85 change).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@122 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:55:20 +00:00
Ozkan Sezer cd19b2c7a9 gl_vidsdl.c (VID_Menu_RebuildBppList): if there are no valid fullscreen
bpps for this width/height, just pick one (fitzquake-0.85 change).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:52:27 +00:00
Ozkan Sezer 2fc9ed73e5 gl_vidsdl.c: Several Cvar_Set weirdness tidy-ups from fitzquake-0.85.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@120 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:48:36 +00:00
Ozkan Sezer cd31ebe1e5 gl_vidsdl.c: Several Con_Printf("WARNING: ....") to Con_Warning("....")
changes from fitzquake-0.85.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:43:24 +00:00
Ozkan Sezer 32335fa57b sv_main.c (localmodels): Bumped array size from 5 to 6 in order for it
to operate correctly with the raised limits of fitzquake-0.85.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-23 06:24:51 +00:00
Ozkan Sezer 317e2d4bd5 make the code to compile with -fno-common flag:
glquake.h (dev_stats): Add extern.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
(lightmap_textures): Likewise.
(gl_warpimagesize): Likewise.
(r_drawflat_cheatsafe): Likewise.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_texmgr.h (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants): Likewise.
gl_screen.c (sb_lines): Remove and make it live only in sbar.c.
(vid): Remove and make it live only in gl_vid*.c
gl_vidsdl.c (m_state): Remove and make it live only in menu.c.
gl_vidnt.c (m_state): Likewise.
net_dgrm.c (m_state): Remove extern declaration.
menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h.
Declared m_state as enum m_state_e.
menu.h (enum m_state_e): Moved from menu.c to here.
(m_state): Added extern declaration.
gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_warp.c (gl_warpimagesize): Likewise.
host.c (dev_stats): Likewise.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
gl_texmgr.c (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants[): Likewise.
r_brush.c (lightmap_textures): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
Ozkan Sezer 33a927c262 menu.c (M_Quit_Draw): updated the authors string and tweaked the string
length calculation by dropping some sprintf() and strlen() calls.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 18:32:26 +00:00
Steven 335ed556d4 Add OSX makefile
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:30:57 +00:00
Steven 03ebbd04c9 Make conspeed cvar persistent
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@113 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:27:14 +00:00
Steven 23f43b6685 A few QuakeSpasm name fixes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@112 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 00:25:31 +00:00
Ozkan Sezer f34affb0b0 New quakespasm icon from Steven.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@111 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-27 13:50:43 +00:00
Ozkan Sezer d1f28ddb43 sv_main.c (SV_SpawnServer): made the dummy array 8 bytes long.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:15:34 +00:00
Ozkan Sezer 088fb98279 Don't explicitly expose pr_strings to the whole engine, make it static
to pr_edict.c. Assign a static array of zeroes to sv.model_precache[0]
and sv.sound_precache[0], instead of pr_strings, in sv_main.c.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:11:10 +00:00
Ozkan Sezer e5df1b24be zone.c (Z_Realloc): Fixed the old_size value.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@108 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 12:03:08 +00:00
Ozkan Sezer b6fa239014 gl_vidsdl.c (VID_Init): Removed the gldir variable, not used anymore.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@107 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:35:39 +00:00
Ozkan Sezer 4df28fa92b gl_vidsdl.c (VID_Init): Removed creation of the 'glquake' directory. Not
used for quite some time.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@106 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-07 07:27:54 +00:00
Ozkan Sezer ea9f085b67 net_dgrm.c (Strip_Port): rewrote it to not modify its input string and
return its own copy, which I feel safer with. Adjusted its callers.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 21:03:03 +00:00
Ozkan Sezer 6a93cb2317 det_dgrm.c (_Datagram_Connect): Added error feedback when we could not
resolve the given host name.
(Test_f): Likewise.
(Test2_f): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:20:46 +00:00
Ozkan Sezer 2108aef8c6 det_dgrm.c (Strip_Port): New proc stripping off port from the given host
name and assining the new port number to net_hostport. based on ProQuake
code. This makes a command line like "+connect ip:port" work.
(Test_f): Call Strip_Port().
(Test2_f): Likewise.
(Datagram_Connect): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:10:37 +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 1018692eaa net_dgrm.c (_Datagram_Connect): fix the printf call in the CCREP_REJECT case.
manually null terminate the reason string buffer.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:48:18 +00:00
Ozkan Sezer 18422123df net_sdlnet.c (SDLN_GetAddrFromName): use net_hosport instead of hardcoded
26000 in the SDLNet_ResolveHost() call.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +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 6f43d5ca99 cl_main.c (CL_EstablishConnection): Send a clc_nop at the end of the function.
This has been referred to by Baker as the NAT fix of ProQuake. Applied upon
Steven's suggestion and it made me able to connect to bigfoot.quake1.net:26001
too.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
Ozkan Sezer baf95f8146 main.c (main): Block/Unblock sound upon focus loss/gain, implemented
under the SDL_ACTIVEEVENT case.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@97 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 23:10:13 +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 6feadde1c2 gl_screen.c (SCR_ScreenShot_f): Changed screenshot name to spasmXXXX.tga
as suggested by Piotr Szymaniak.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@94 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:35:28 +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 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 da2c24431a quakedef.h: incremented QuakeSpasm version to 0.2 (0.85.2)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@91 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:32:44 +00:00
Ozkan Sezer 4a68c9c35e host_cmd.c (ExtraMaps_Add): Fix the list sorting.
(Modlist_Add): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@90 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:03:22 +00:00
Ozkan Sezer b15b30ec6f host_cmd.c (Modlist_Init): fix the return value check for Q_strcasecmp().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@89 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:58:54 +00:00
Ozkan Sezer 28c4c3bfe5 host_cmd.c (Host_InitCommands): register Host_Mods_f as "games" too, as an
alias to the existing "mods" command. (this was unintentionally applied in
revision 87, sigh...)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@88 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:05:36 +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 b1881ba609 sys_sdl.c: implemented Sys_mkdir.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@86 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:47:16 +00:00
Ozkan Sezer b6ce0b16b3 sys_sdl.c: renamed filelength to Sys_filelength in order to avoid conflicts
when compiling for windows.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@85 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:45:12 +00:00
Ozkan Sezer 16b9fd13ea bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h,
d_ifacea.h, draw.h, gl_texmgr.h, glquake.h, image.h, input.h, keys.h, mathlib.h,
menu.h, modelgen.h, net.h, net_dgrm.h, net_loop.h, net_sdlnet.h, net_udp.h,
net_wins.h, platform.h, pr_comp.h, progdefs.h, progs.h, protocol.h, quakedef.h,
render.h, resource.h, sbar.h, screen.h, server.h, sound.h, spritegn.h, sys.h,
vid.h, view.h, wad.h, world.h, zone.h: added include guards to the headers.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +00:00
Ozkan Sezer 4cd210455d fitzquake.bmp: added new miage file (24 bit, 32*32, converted from
fitzquake.ico)
fitz_bmp.h: new header, dumped bytes from fitzquake.bmp.
pl_linux.c (PL_SetWindowIcon): implemented window icon.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@81 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:14:46 +00:00
Ozkan Sezer e65e0b8292 pl_linux.c (PL_ErrorDialog): print to stderr. append a '\n' to the message.
updated the todo note.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@80 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:04:29 +00:00
Ozkan Sezer 3399f519f6 made loading of embedded custom conback friendly with dynamic gamedirs:
gl_draw.c (Draw_CheckConback): new proc.
 (Draw_Init): moved mod-provided gfx/conback.lmp check form here to
Draw_CheckConback().
draw.h (Draw_CheckConback): added prototype.
gl_texmgr.c (TexMgr_NewGame): call Draw_CheckConback().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@78 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:55:32 +00:00
Ozkan Sezer f8f8da4933 gl_draw.c: search for a mod-provided conback image in Draw_Init time
and cache the result, instead of doing it everytime.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@77 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:30:14 +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 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 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 7a25ce8599 host_cmd.c (Host_Changelevel_f): activate mouse input upon changelevel.
(from Steven.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@72 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:20:45 +00:00
Ozkan Sezer 6bc3c41370 cl_main.c (CL_NextDemo): fix for an obscure bug when there are no demos
listed with startdemos: run the game, go into a savegame or start a new
game, type F3 and press Esc enough times to go back to normal view, bring
down the console and enter "timedemo demo1". when the demo ends, the only
thing I was able to *see* was the loading label, no other activity at all,
although I can still do F10 (quit) and blindly press Y to exit the game,
so the engine didn't crash. problem was that CL_NextDemo() didn't check
if an actual nextdemo exists before calling SCR_BeginLoadingPlaque() which
set scr_drawloading to true, so scr_drawloading still remained as true..
fixed thusly.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:10:18 +00:00
Ozkan Sezer b815a8c0d9 snd_mix.c (SND_InitScaletable): fixed the snd_scaletable init breakage with
gcc-4.1 and -O1 and higher From Kevin Shanahan (Tyrann). although the bug is
fixed in gcc, it is safer to have this workaround here.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@70 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:25:33 +00:00
Ozkan Sezer 18080769da gl_model.c (Mod_LoadModel): buf needn't be an unsigned int pointer, made
it into a byte pointer, extracted the mod type from the header by bit shifts.
also removed the unnecessary void pointer variable.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@69 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:20:08 +00:00
Ozkan Sezer 8e0638e867 gl_rmisc.c (R_Envmap_f): the envmap command can only be run when there's something
to render, ie. when connected to a server. besides, the refdef must be restored when
it is completed.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@68 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:05:14 +00:00
Ozkan Sezer a3bae85fe6 pr_exec.c (PR_Profile_f): the profile command can only be run when the server is active.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@67 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:00:40 +00:00
Ozkan Sezer cdfdf592bd cmd.c (Cbuf_Execute), net_dgrm.c (Datagram_GetMessage), net_loop.c (Loop_GetMessage):
replaced memcpy calls for overlapping areas with memmove().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@66 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 23:55:17 +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 9651def37b gl_vidsdl.c (VID_Toggle): removed extra failure message (left over from commit r62).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@63 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:18:24 +00:00
Ozkan Sezer 53f35947f9 gl_vidsdl.c (VID_Toggle): made it so that when SDL_WM_ToggleFullScreen() fails,
a VID_Restart will be attempted (hoping ~that~ will succeed..)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@62 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:03:45 +00:00
Ozkan Sezer 3365e343da use Steven's patch andallow for the 'demos' command to work in !fitzmod :
host_cmd.c (Host_Startdemos_f): reverted rev.50 change. when not fitzmode,
made it to directly go to the menu instead CL_NetxDemo().
menu.c (M_Main_Key): when not fitzmode, do not CL_NextDemo() for K_ESCAPE
case.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@61 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 13:32:21 +00:00
Ozkan Sezer 0c6f662e96 menu.c (OPTIONS_ITEMS): keep as 13 and don't define as 14 for windows,
because the SDL port seems to have removed the "use mouse" entry in the
options menu.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@58 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 11:55:21 +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 26ca68aa97 gl_draw.c: fixed several strict aliasing violations about glpic_t.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@56 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:11:26 +00:00
Ozkan Sezer 4adada3d85 Makefile.w32, Makefile.w64: now that net_sdlnet.c is properly cleaned up
and is not messing with socket api functions, windows versions no longer
need linking to wsock32.dll or ws2_32.dll.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@55 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:02:13 +00:00
Ozkan Sezer d6044da9bf net_sdlnet.c: cleanup and warning fixes: automatic changing of the "hostname"
cvar according to internet hostname has been removed. SDL_net doesn't provide
and equivalent of gethostname() and mixing APIs is not a good idea. servers
will be called "UNNAMED" if they don't set it themselves. Also removed the
inet_addr("127.0.0.1") call and replaced it with SDL_SwapBE32(INADDR_LOOPBACK).
defined INADDR_LOOPBACK as 0x7f000001 if not already defined. properly guarded
the AF_INET and MAXHOSTNAMELEN definitions to be on the safe side. replaced
all variables named 'socket' to 'socket_p' so as to avoid confusions with the
socket api. fixed two strict aliasing violations in SDLN_OpenSocket() and
SDLN_GetSocketAddr().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@54 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 21:56:10 +00:00
Ozkan Sezer 45b0f40128 gl_draw.c (Draw_ConbackPic): new proc for drawing the normal conback image
in fitzmode mode otherwise drawing the custom QuakeSpasm conback from memory.
(Draw_ConsoleBackground): use the new Draw_ConbackPic().
Makefile, Makefile.w32, Makefile.w64: added conback.c to the build.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@53 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:55:28 +00:00
Ozkan Sezer fa7aa93450 conback.c, conback.h: added new QuakeSpasm conback data.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@52 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:45:28 +00:00
Ozkan Sezer de9eca45e1 draw.h, gl_draw.c, gl_vidsdl.c: removed my recently added Draw_ClearMenuPicCache()
helper. not necessary at all.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@51 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 16:00:34 +00:00
Ozkan Sezer a5c45574d5 Steven's customizations:
host_cmd.c (Host_Startdemos_f): if not running in fitzmode, don't add demos
to the loop and set cls.demonum.to -1.
menu.c (M_Draw): if not running in fitzmode, quit immediately without the
dialog for the m_quit case.
sbar.c (Sbar_SoloScoreboard): restored the original behavior depending on
whether we are running in fitzmode.
Marked the code with /* QuakeSpasm customization: */ in those places.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@50 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:55:19 +00:00
Ozkan Sezer 0a26b3bc2d Makefile, Makefile.w32, Makefile.w64: renamed the binary name to quakespasm[.exe]
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@49 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 12:14:51 +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 0dce9ae100 in_sdl.c: made total_dx, total_dy and FilterMouseEvents() static. added
a boolean no_mouse. added check for '-nomouse' command line switch which
disables all mouse events.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@46 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 11:33:12 +00:00
Ozkan Sezer 04e31c1ac6 main.c (main): Fixed the utterly broken SDL active event mask usage. In
its original form, gcc rightfully considered that case a dead code even
when not optimizing. Commented out the contents of the case for now.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@45 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 10:33:33 +00:00
Ozkan Sezer 7a8705bc34 gl_vidsdl.c (VID_MenuKey): fixed a typo: cursor position 4 controls vid_vsync,
not vid_fullscreen.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@44 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:37:24 +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 9d9354165c Makefile.w32, Makefile.w64: make sure to link to the correct winsock
library, which must be what SDL_net.dll is already linked to, which is
wsock32.dll for win32, and ws2_32.dll for win64 (mingw-w64.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@42 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 19:23:00 +00:00
Ozkan Sezer afe632313d Makefile.w64: now that native amd64 builds work, added a Win64 makefile for
cross-compilation using mingw-w64.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@41 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 16:40:41 +00:00
Ozkan Sezer aa24149247 pl_win.c: Fixed for win64 (GCL_HICON is deprecated, use GCLP_HICON and
SetClassLongPtr.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@40 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 16:39:20 +00:00
Ozkan Sezer 222ea1945c Makefile, Makefile.w32: now that native amd64 builds work, adjusted for CPUFLAGS.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@39 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:25:25 +00:00
Ozkan Sezer 89e17301c9 64 bit compatibility effort, 4/nn: x86_64 works just fine now, yey!
the QuakeC interpreter used to use string pointer offsets from pr_strings
even when the pointers lead to engine data which is often well out of
32bit range on a 64bit architecture and they lead to crashes.  they now
go through the new PR_SetEngineString and PR_GetString functions which
turn any address outside the pr_strings area into an index into a table
of engine string addresses, adding new string addresses to the table as
needed. the engine strings table is allocated with 256 entries at first
(see the PR_STRING_ALLOCSLOTS definition in pr_edict.c) and its size is
incremented by 256 as needed and re-allocated on the zone. managing that
allocation and reallocation is accomplished by the recently added Z_Realloc
function. implementation based on the uhexen2 (hexen2: hammer of thyrion)
engine which, in turn, is loosely based on twilight and quakeforge engines.
pr_strings range check is from tyrquake.
pr_edict.c: added the new PR_SetEngineString, PR_GetString, PR_AllocString
public functions and the new private PR_AllocStringSlots function. made
ED_NewString private to pr_edict.c and reworked it to return an index to a
newly allocated string.
progs.h: added prototypes for the new public PR_SetEngineString, PR_GetString
and PR_AllocString functions.
host_cmd.c, pr_cmds.c, pr_edict.c, pr_exec.c, progs.h, sv_main.c, sv_phys.c:
modifed to use the new PR_SetEngineString and PR_GetString functions.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@38 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:04:50 +00:00
Ozkan Sezer 90d1f32d75 pr_cmds.c (pr_builtin): made static.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@37 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:05:24 +00:00
Ozkan Sezer bed9185cae pr_cmds.c: changed pr_string_temp to cycle between 16 static buffers in
order to handle many prints in ftos and vtos calls.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@36 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 11:03:34 +00:00
Ozkan Sezer 8899591d25 64 bit compatibility effort, 3/nn:
pr_edict.c (type_size): make it 1, not sizeof(void*)/4, because quake progs
is strictly 32 bits where sizeof(void*) is 4.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@35 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 07:28:44 +00:00
Ozkan Sezer f9928b24ac 64 bit compatibility effort, 2/nn: type correctness work in common.h,
gl_draw.c, gl_model.c, gl_sky.c, gl_texmgr.c, gl_texmgr.h, r_alias.c,
r_brush.c, r_part.c, r_world.c, snd_mem.c.  next step will be server
side (progs) work which is actually the heart of the problems.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@34 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 21:26:11 +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 a979425e69 host_cmd.c (Host_Changelevel_f): get rid of console or menu (key_dest = key_game).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@31 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 15:39:06 +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 a8182018bf quakedef.h (QUAKESPASM_VERSION): define as 0.1 for now.
(QUAKESPASM_VER_PATCH): define as 1 for now (helper to print a string like
0.85.1)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@29 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:45:40 +00:00
Ozkan Sezer a35284cfac sbar.c (Sbar_SoloScoreboard): modified to include the map name and
skill. (patch by Steven, modified to utilize cl.mapname by OZ.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@28 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 14:21:11 +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 243602a6e8 cd_sdl.c: replaced the stub with the implementation we have in the uhexen2 project.
cd_null.c: added new file.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@26 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:51:25 +00:00
Ozkan Sezer e755919a8f main.c (main): Print version information at startup.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@25 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:32:26 +00:00
Ozkan Sezer d857aff0f3 gl_sky.c, r_alias.c, r_part.c, r_world.c: added newline at the end of the files.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@24 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:24:38 +00:00
Ozkan Sezer 7411fe1a24 draw.h: Added prototype for the new Draw_ClearMenuPicCache().
gl_draw.c (Draw_ClearMenuPicCache): VID_Restart procedures does not seem to
clear the menu picture cache. Added this new tiny helper to do that job.
gl_vidsdl.c (VID_Restart): do call Draw_ClearMenuPicCache().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@23 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:16:07 +00:00
Ozkan Sezer 95f413d1ea main.c (main): The Shift+ESC console key bing is not restricted to LSHIFT
any more: changed the mask from KMOD_LSHIFT to KMOD_SHIFT.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@22 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:05:29 +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 9ec8a8a8bb gl_draw.c (scr_conalpha): write to config.cfg.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@20 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:16:20 +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 fce4227a91 cmd.c (Cmd_StuffCmds_f): fix logic so that it works properly with sdl/unix
port (on Unix, argv[0] is command name and is not empty).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@18 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 10:01:46 +00:00
Ozkan Sezer ebe2cd66d7 cl_demo.c (CL_PlayDemo_f): get rid of the menu and/or console when starting a demo.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@17 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:55:13 +00:00
Ozkan Sezer 359116f394 client.h (client_state_t): added mapname[128] as a new member to hold the
current map file name without path and extension.
cl_parse.c (CL_ParseServerInfo): copy the naked name of the map file to
the cl structure.
host_cmd.c (Host_Map_f): print the current map name if no arguments are
given. print help message if not connected.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@16 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:47:04 +00:00
Ozkan Sezer 566ead5ada main.c (DEFAULT_MEMORY): Changed default heap size from 32 to 64 MiB.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@15 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:12:35 +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 f6603bf20e gl_vidsdl.c (VID_Init): Changed default mode to windowed. Added -w as an
alternative to -window command line switch. added new -f and -fullscreen
command line switches. added comments about the problems being encountered
when default mode is fullscreen.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@13 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 09:01:53 +00:00
Ozkan Sezer be7f81ef84 gl_vidsdl.c (VID_InitDIB): change default width from 640 to 800. (Steven)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@12 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:53:20 +00:00
Ozkan Sezer 8309029808 several cvar tweaks by Steven:
gl_draw.c (scr_conalpha): change value from 1.0 to 0.5
gl_rmain.c (r_shadows): write to config.cfg.
gl_rmain.c (r_wateralpha): write to config.cfg.
gl_rmain.c (r_dynamic): write to config.cfg.
gl_rmain.c (r_novis): write to config.cfg.
gl_rmain.c (gl_flashblend): change to 0 (disable) and write to config.cfg.
gl_screen.c (scr_conspeed): change value from 300 to 500
gl_vidsdl.c (vid_fullscreen): change value to 0 (disable)
gl_vidsdl.c (vid_width): change value from 640 to 800
gl_vidsdl.c (vid_height): change value from 480 to 600


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@11 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:50:45 +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 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 097c46c8b2 added plain makefiles for native linux and cross-win32 builds.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@7 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 08:16:43 +00:00
Ozkan Sezer 5f028f87a3 snd_dma.c: added SNDDMA_LockBuffer() as a new API, needed for, well, proper buffer
locking.  removed simsound. removed unused S_AmbientOff() and S_AmbientOn(). other
multiple cleanups and fixes.
snd_sdl.c: replaced the old broken implementation which used to cause LRU failures
with the one adapted from the uhexen2 project.
sound.h: added missing prototypes, including the new SNDDMA_LockBuffer().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@6 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:45:06 +00:00
Ozkan Sezer 141b4836ac snd_mem.c (FindNextChunk): fixed segfaults due to bad wav files like some
of those in the arwop mod.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@5 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:37:38 +00:00
Ozkan Sezer 6b49181bfb net_sdlnet.c, pl_win.c, quakedef.h: fixed SDL header includes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@4 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:33:12 +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