Commit Graph

684 Commits

Author SHA1 Message Date
Kevin Shanahan
e27da6be75 world: merge remaining differences between world.h files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:44:29 +10:30
Kevin Shanahan
388f8fcacc world: remove unused function SV_TruePointContents
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:40:04 +10:30
Kevin Shanahan
5083ac05c2 world: remove unneeded client include from world.h
Fix chase.c to include client.h, previously had via world.h

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:36:11 +10:30
Kevin Shanahan
5b54008603 world: move SV_AddLinksToPmove to world.c
Removes visibility of the areadnode_t structure from world.h and makes
sv_areanodes private again.  pmove_mins and pmove_maxs no longer need to
be globals in sv_user.c either.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:25:30 +10:30
Kevin Shanahan
b8d76716fc world: remove AddLinksToPmove dependence on global pmove_mins/maxs
Apart from this function, sv_areanodes are private to world.c, so prepare
this function to be moved across.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:07:50 +10:30
Kevin Shanahan
db9f66ed5b progs: merge progs.h headers and move to include dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:22:48 +10:30
Kevin Shanahan
500e5325f4 progs: remove unneeded includes from qwsv progs.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:15:42 +10:30
Kevin Shanahan
d269f32cc6 progs: merge progdefs.h header and move to include directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:13:27 +10:30
Kevin Shanahan
8e2e532958 progs: move the qcc generated qw progs to progdefs-qw.h
Create the progdefs.h file similar to NQ.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:34:00 +10:30
Kevin Shanahan
6086ccbf40 progs: rename the q1 (id1) progs header
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:27:41 +10:30
Kevin Shanahan
1fac3cc2ee progs: remove unused q2 progs definitions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:23:31 +10:30
Kevin Shanahan
de501c4b8a model: better include stdint.h header here
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:18:24 +10:30
Kevin Shanahan
cb8d3fcf4b model: trivial cleanups
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:12:59 +10:30
Kevin Shanahan
e8b0931c03 model: conceptual correction in Mod_LoadTexInfo
Although this doesn't change the end result in memory, load the texinfo in
a way consistent with the layout of the vecs in the struct.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:10:18 +10:30
Kevin Shanahan
eb908191e0 model: calculate mipadjust in the same way as client
Not referenced by the server anyway, so just make the calculation
consistent.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:01:07 +10:30
Kevin Shanahan
7beeca27aa model: server bug fixes for loading huge maps
Import fixes related to signed/unsigned shorts from the client BSP model
loading code. Would in theory allow the QW server to load huge maps with
e.g. > 32767 marksurfaces or clipnodes.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:58:01 +10:30
Kevin Shanahan
0a84c30a7f model: consistently use the function name in error messages
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:56:36 +10:30
Kevin Shanahan
91a20cca52 model: import Mod_LoadBrushModel improvements into qwsv
Pull in improvements from the client code and minimise syntactic
differences.

- Tidy up the header byte swapping
- Tighter checks on lump sizes and bounds against each other and the size
  of the file
- Zero the flags field
- Calculate the model radius

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:48:30 +10:30
Kevin Shanahan
c9bd7334a2 gl: fix test to prevent player being drawn in full darkness
Also broken by 293084b (cl_visedicts handling). Doesn't seem to be any
other places where the same assumption about the entity pointer is made.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 16:42:04 +10:30
Kevin Shanahan
74a6903d8e gl: fix player colours in nq multiplayer
This broke with 293084b when I changed the handling of cl_visedicts. Kind
of a hackish workaround for now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 16:38:34 +10:30
Kevin Shanahan
e71e7cc26e net: Replace nq's qsockaddr with same netadr_t structure used in qw
The struct qsockaddr used in NQ assumes some things about the binary
comptibility with the OS struct sockaddr_in, which caused some problems
with the networking on at least OpenBSD.  Use the same netadr_t structure
that we currently have in QW.

Would have been nice to split this into smaller sub-patches, but it just
got messy each time I tried to do that.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 13:34:49 +10:30
Kevin Shanahan
c1ed8eecf4 net: remove unused StringToAddr functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Kevin Shanahan
f4b25a0d94 net: remove Connect from the landriver operations struct
All our LAN protocols (just IPv4 UDP) are connectionless, so remove the
connect operation completely from the code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Kevin Shanahan
ce2dc9ecf7 snd: Add OpenBSD sndio sound driver
Add a sound driver for the OpenBSD sndio API. A copy of this driver was
sent to me by Toni Spets <toni.spets@gmail.com>, but with credit to Jacob
Meuser <jakemsr@sdf.lonestar.org> for writing the driver code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-05 17:59:59 +10:30
Kevin Shanahan
e069e1332e build: fix missing sys_wina.o dependency on x86 unix
Looks like this has been broken for a while now...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-04 12:59:21 +10:30
Kevin Shanahan
d60c98112d build: fix use of LOCALBASE include and lib dirs
Was missing the /include on the end of the include directory and hadn't
added the LFLAGS at all!

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-04 10:43:58 +10:30
Kevin Shanahan
1d748f806f model: remove some unused code from both model.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-03 20:55:31 +10:30
Kevin Shanahan
cb4b8c13ed build: rework CPPFLAGS handling similar to new LIBS/OBJS
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-03 20:43:09 +10:30
Kevin Shanahan
cb8073e20a build: fix lib order for vid_win driver
Also remove unnecessary library ddraw. Hopefully not something that was
needed on WinXP or something even older, but doesn't make sense that we
only ever used it in NQ and not QW when the video drivers are identical.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-03 20:39:38 +10:30
Kevin Shanahan
89163b4a6b build: Change from X11BASE to LOCALBASE
It seems X11BASE is now obsolete (in FreeBSD ports, which is where it
originally came from here). Switch to using LOCALBASE as an extra
include/lib directory instead.

Still do some searching for X11 files as necessary and add similar logic
for SDL files.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-03 13:07:33 +10:30
Kevin Shanahan
fdcba79b65 remove unused file cd_audio.c
Looks like a DOS cd audio driver as far as I can tell.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:57:02 +10:30
Kevin Shanahan
e51c621703 work around "possibly unintialised variable" warning in gl_draw.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:53:21 +10:30
Kevin Shanahan
90f92ef6e9 snd: properly fix the signedness warning in snd_mix.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:52:13 +10:30
Kevin Shanahan
726e4365c1 fix strict aliasing issue with mathlib.h IS_NAN() macro
I assume the memcpy will be nicely optimised away, but not really critical
anyway.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:40:42 +10:30
Kevin Shanahan
352565504c fix strict aliasing issues in r_sky.c
Should also eliminate the unaligned access issues.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:39:39 +10:30
Kevin Shanahan
b37ed7266d fix strict aliasing issues in gl_mesh.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:39:09 +10:30
Kevin Shanahan
95864c0f14 fix strict aliasing issue in gl_draw.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:38:34 +10:30
Kevin Shanahan
04aa23d727 build: substantial rewrite of Makefile
After running into complexity problems trying to enable myself to specify
some extra driver options (e.g. the SDL video driver) I decided a
significant re-organisation of the main Makefile was necessary.

Tested on OS X x64/ppc32, Win32, Linux x64.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:34:13 +10:30
Kevin Shanahan
de5511f77a remove two unused assembly files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:34:03 +10:30
Kevin Shanahan
ca53ed9827 build: TOPDIR is the same on all supported build platforms
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-30 15:01:44 +10:30
Kevin Shanahan
f9fd2cb594 build: update Makefile comment
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-30 14:42:02 +10:30
Kevin Shanahan
c4443197be vid: fix vid_x build break due to modelgen.h merge
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-30 06:39:09 +10:30
Kevin Shanahan
521c33c8aa vid: check for vid_mode changes in sdl target
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 21:12:19 +10:30
Kevin Shanahan
10198aa574 vid: always start windowed on Win32
Avoid unsightly mode changes in case you just wanted to play windowed
anyway. Mode changes are pretty slow and ugly these days, at least on
my test system. Might be better if we weren't using the ancient MGL.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 21:00:52 +10:30
Kevin Shanahan
f045210581 Revert "[PATCH] Fixed signedness warning in snd_mix.c"
Tracked this back to some sound corruption happening during testing. The
compiler warning is back after reverting, but the sound is fixed. Will
need to audit the code and get the signedness handling correct.

This reverts commit 924c3deb23.
2012-10-29 20:54:20 +10:30
Kevin Shanahan
16696c266a mm: make a "hunk print" console command
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 18:07:57 +10:30
Kevin Shanahan
6cb119d17d model: roll maliasgroupframedesc_t into maliasgroup_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 17:22:26 +10:30
Kevin Shanahan
be303f8138 model: create separate fuction for loading aliasgroup frames
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 17:12:36 +10:30
Kevin Shanahan
dbb0437a14 model: remove never referenced bbox data from aliasgroup frames
No need to keep a copy of the bbox info for every aliasgroup frame as it
is never referenced by the engine.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 16:52:38 +10:30
Kevin Shanahan
e88216be62 model: remove unused structures from gl_model.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-29 16:41:56 +10:30