Commit graph

104 commits

Author SHA1 Message Date
sezero
66a046a809 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@105 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 21:03:03 +00:00
sezero
50df0eeb00 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@104 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:20:46 +00:00
sezero
08a2938f65 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@103 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 14:10:37 +00:00
sezero
f81bcce75c 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@102 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 13:35:05 +00:00
sezero
ef5d5481aa 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@101 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:48:18 +00:00
sezero
b40b2f958b net_sdlnet.c (SDLN_GetAddrFromName): use net_hosport instead of hardcoded
26000 in the SDLNet_ResolveHost() call.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +00:00
stevenaaus
15d39fa705 S.A. history fixes
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@99 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 22:12:23 +00:00
sezero
9f4bb6b578 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
sezero
d5d508397c main.c (main): Block/Unblock sound upon focus loss/gain, implemented
under the SDL_ACTIVEEVENT case.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@97 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 23:10:13 +00:00
sezero
c5bcfbcda0 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@96 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 12:50:12 +00:00
sezero
bd586a0fc9 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@95 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:55:13 +00:00
sezero
dce9ca86e1 gl_screen.c (SCR_ScreenShot_f): Changed screenshot name to spasmXXXX.tga
as suggested by Piotr Szymaniak.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@94 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 11:35:28 +00:00
sezero
38cc82bde7 console.c (BuildMapList, Con_TabComplete): fix sporadic erratic behaviour
with map name completion. from Steven.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@93 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:44:59 +00:00
sezero
73b3628feb 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@92 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-01 10:28:12 +00:00
sezero
cc68abd0eb quakedef.h: incremented QuakeSpasm version to 0.2 (0.85.2)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@91 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:32:44 +00:00
sezero
6348504f6c host_cmd.c (ExtraMaps_Add): Fix the list sorting.
(Modlist_Add): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@90 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 09:03:22 +00:00
sezero
544a98a675 host_cmd.c (Modlist_Init): fix the return value check for Q_strcasecmp().
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@89 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:58:54 +00:00
sezero
0b9e24ba9f 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@88 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:05:36 +00:00
sezero
62b24bc1ba common.c (Q_strncasecmp): fix it so that it properly returns negative and
positive values.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@87 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 08:00:57 +00:00
sezero
38a5823de7 sys_sdl.c: implemented Sys_mkdir.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@86 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:47:16 +00:00
sezero
7d6a47a0f2 sys_sdl.c: renamed filelength to Sys_filelength in order to avoid conflicts
when compiling for windows.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@85 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-27 07:45:12 +00:00
sezero
d1e09241f3 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +00:00
sezero
cd36e9182e 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@82 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:23:09 +00:00
sezero
3122477389 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@81 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:14:46 +00:00
sezero
3c9ee9e095 pl_linux.c (PL_ErrorDialog): print to stderr. append a '\n' to the message.
updated the todo note.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@80 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 21:04:29 +00:00
sezero
1f4c235e45 gray_big.bmp, gray_big.lmp: added custom conback image files for QuakeSpasm.
mk_header.c : added tiny C source to generate conback.h header from the lmp.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@79 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 12:01:01 +00:00
sezero
c8af0b7fe4 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@78 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:55:32 +00:00
sezero
e69e898ff6 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@77 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 09:30:14 +00:00
sezero
e3b1a1c237 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@76 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:50:31 +00:00
sezero
fdd49b4337 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@75 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:29:48 +00:00
sezero
6a4f6a681b common.c (COM_FindFile): commented out the debug messages about finding
and not finding a file.


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


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@73 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 08:14:30 +00:00
sezero
d1a5ffa5f4 host_cmd.c (Host_Changelevel_f): activate mouse input upon changelevel.
(from Steven.)


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@72 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:20:45 +00:00
sezero
3664b17504 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:10:18 +00:00
sezero
e4f5aa6caa 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@70 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:25:33 +00:00
sezero
cc83310a03 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@69 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:20:08 +00:00
sezero
0cdc5fc146 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@68 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:05:14 +00:00
sezero
e8d7acd267 pr_exec.c (PR_Profile_f): the profile command can only be run when the server is active.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@67 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:00:40 +00:00
sezero
e7d7be3f77 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@66 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 23:55:17 +00:00
sezero
69558f7bea 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@65 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:35:13 +00:00
sezero
76e99b804e 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@64 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:28:41 +00:00
sezero
e33c4e7b37 gl_vidsdl.c (VID_Toggle): removed extra failure message (left over from commit r62).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@63 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:18:24 +00:00
sezero
c04767d2de 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@62 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 16:03:45 +00:00
sezero
48ca117b82 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@61 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 13:32:21 +00:00
sezero
33a17e97f0 updated the copyleft file from ftp://ftp.gnu.org/gnu/Licenses/COPYING-2.0
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@60 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 12:40:45 +00:00
sezero
2b4f0a8373 removed the 9.5 MB Icon.psd file.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@59 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 12:20:09 +00:00
sezero
55bbdd2162 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@58 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 11:55:21 +00:00
sezero
bf5dab9359 console.c (Con_TabComplete): check for key_tabpartial[0] instead of strlen(key_tabpartial).
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@57 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-19 09:15:23 +00:00
sezero
f21aed26a8 gl_draw.c: fixed several strict aliasing violations about glpic_t.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@56 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:11:26 +00:00
sezero
705eda52a1 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@55 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 22:02:13 +00:00