Commit Graph

10 Commits

Author SHA1 Message Date
sezero 4710f5ae47 * net.h: separated the functions and data exported through net.h into two:
net.h now holds all public exports and the new net_defs.h holds the exports
only required by the net layer. besides the net_* files, host_cmd.c and
sv_main.c are the only reasonable foreign importers of net_defs.h: they
require accessing the qsocket_s structure members. The only one that does
not fit is menu.c needing some net exports, but it may be properly handled,
later on.
* net_defs.h: New header.
* host_cmd.c: Include net_defs.h.
* menu.c: Likewise.
* net_bsd.c: Likewise.
* net_dgrm.c: Likewise.
* net_loop.c: Likewise.
* net_main.c: Likewise.
* net_sdl.c: Likewise.
* net_sdlnet.c: Likewise.
* net_udp.c: Likewise.
* net_win.c: Likewise.
* net_wins.c: Likewise.
* net_wipx.c: Likewise.
* sv_main.c: Likewise.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 17:21:10 +00:00
sezero 77ac562f2d * net_sdlnet.c: Pass "localhost" instead of NULL to SDLNet_ResolveHost().
added some remarks about missing functionality in SDL_net.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@198 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 12:50:51 +00:00
sezero 57aa7ed713 * net_sdlnet.c: Added ASSERT_SOCKETID for paranoid debugging purposes,
disabled by default. Made socket_id() to work in two passes, once for
looking for a match and the next for looking for an empty slot in the
net_sockets[] array. Made it to Sys_Error if there are no empty slots.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@197 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 11:05:28 +00:00
sezero b8388f131e * gl_vidsdl.c, in_sdl.c, main_sdl.c, net_sdlnet.c, pl_linux.c, pl_osx.m,
pl_win.c, sys_sdl.c: Explicitly include SDL.h in the SDL source files. At
present, quakedef.h already includes SDL.h you may never know what would
happen in the future.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@195 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 22:50:48 +00:00
sezero e98269bbf5 net_udp.h: Renamed all function argument names as socket to socketid.
net_udp.c: Renamed all function argument names as socket to socketid.
Replaced the inet_addr("127.0.0.1") call with htonl(INADDR_LOOPBACK).
Replaced qboolean _true with int _true.
net.h: Renamed the OpenSocket and CloseSocket function pointers to
Open_Socket and Close_Socket.
net_dgrm.c: Adjusted for Open_Socket and Close_Socket change.
net_sdlnet.c: Made some functions static.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@191 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-19 18:20:22 +00:00
sezero 5d8209a874 net_sdlnet.c (SDLN_GetAddrFromName): use net_hosport instead of hardcoded
26000 in the SDLNet_ResolveHost() call.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@100 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-06 10:29:43 +00:00
sezero 28fe359668 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@54 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-18 21:56:10 +00:00
sezero ec3801107d 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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@43 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 23:32:04 +00:00
sezero dff23216cb net_sdlnet.c, pl_win.c, quakedef.h: fixed SDL header includes.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@4 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:33:12 +00:00
sezero c5c4e96d44 initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00