Commit Graph

484 Commits

Author SHA1 Message Date
Kevin Shanahan
7a9781d91e client: remove stufftext debugging printf
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-18 13:27:56 +10:30
Kevin Shanahan
bdef5d75ba screen: move screen.c file to common dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 08:55:52 +10:30
Kevin Shanahan
5a740d010c screen: merge differences between screen.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 08:55:05 +10:30
Kevin Shanahan
72f8fd974d screen: remove duplicate definition of sb_lines
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 08:18:22 +10:30
Kevin Shanahan
3fb9f56f03 screen: move gl_screen.c file to common dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-16 21:30:35 +10:30
Kevin Shanahan
47405f3b05 screen: merge differences between gl_screen.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-16 21:29:45 +10:30
Kevin Shanahan
731442d51a common: replace some use of SZ_Print with MSG_WriteString
SZ_Print is really meant for occasions where we need to build up a
string via strcat into the sizebuf - MSG_WriteString is more
appropriate in the cases fixed here, usually following a
MSG_WriteByte() anyway, so nothing to append to. Use the
MSG_WriteStringf variant where appropriate to reduce reliance on the
va() buffers.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-14 09:38:49 +10:30
Kevin Shanahan
2920f920bf trivial: add a couple of FIXME comments for later
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-13 15:54:54 +10:30
Kevin Shanahan
cb67d25fa4 qwsv: annotate SV_Error() with printf format attribute
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-13 15:54:54 +10:30
Kevin Shanahan
6ae4787957 common: make use of MSG_WriteString{,v}f
Gets rid of a few randomly sized intermediate buffers and potential
overruns.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-13 15:54:54 +10:30
Kevin Shanahan
e227a1da93 qw: get rid of simple_crypt obfuscation
Presumably a simple anti-cheat precaution to stop people running "strings"
on the binaries in the days before the source was available. The
de-obfuscated strings are sent over the wire in the net protocol anyway.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-13 07:08:46 +10:30
Kevin Shanahan
b2f52af711 menu: fix keybindings in menu
The menu files hadn't been updated for the now expanded keysets.

Reported-by: Sander van Dijk <a.h.vandijk@gmail.com>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-11 21:29:01 +10:30
Kevin Shanahan
a185e4e7d3 sys: actually move the sys_win.c file to the common dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-10 10:12:09 +10:30
Kevin Shanahan
4619518f32 sys: hack^Wmerge differences between NQ/QW sys_win.c files
Re-order things, and generally force this squarish peg into the round
hole. Will want to factor out some of the fundamental differences into
different files later to reduce the #ifdef tangles, but at least some
benefit to be gained by having the common code shared.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-10 10:06:37 +10:30
Kevin Shanahan
526cff6ec8 sys: actually move the QW sys_win.c file to common dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-09 21:27:54 +10:30
Kevin Shanahan
19f50bb7b0 sys: merge differences between QW client/server sys_win.c
Re-arrange order of functions, where functions are similar add a few
ifdefs to share common code and then add the client/server independent
bits to each file.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-09 20:58:05 +10:30
Kevin Shanahan
e4989d544b input: fix hang on "Are you sure you want to start a new game?" with sdl
When using SDL video/input, the game hangs when we select "New Game" from
the menu and the "Are you sure you want to start a new game?" prompt is
displayed, because we stop processing input events.

This is a bit of a hackish workaround, but will try to untangle this a bit
more later.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-08 07:04:13 +10:30
Kevin Shanahan
d94d220399 client: store topcolor and bottomcolor separately in NQ player_info struct
Simplifies access to the player colors later. Update the sbar usage of
colors to be consistent between NQ/QW as well.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-06 06:10:32 +10:30
Kevin Shanahan
22862ed021 trivial: whitespace - fix some poorly chosen line breaks
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-04 10:16:26 +10:30
Kevin Shanahan
3ee8a28ede sys: return a proper value from main() routines
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-03 20:10:24 +10:30
Kevin Shanahan
49230d2685 sys: move sys_linux.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-02 15:49:15 +10:30
Kevin Shanahan
a0ec7135f1 sys: prepare sys_linux.c files for merging
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-02 15:47:32 +10:30
Kevin Shanahan
10c8aab1c6 sys: remove unused Sys_LineRefresh()
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-02 15:04:24 +10:30
Kevin Shanahan
f2df706e27 keys: make global keybindings[] strings const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-29 09:14:13 +10:30
Kevin Shanahan
0d3ecc861f keys: make Key_KeynumToString return value const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-29 09:04:16 +10:30
Kevin Shanahan
7173e0191a keys: move Key_KeynumToString to keys.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-29 09:03:14 +10:30
Kevin Shanahan
ea6e63220c common: move common.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 20:23:33 +10:30
Kevin Shanahan
ea0171a76d common: prepare common.c for merging
A big chunk of stuff here is QW only... to be moved later.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 20:22:04 +10:30
Kevin Shanahan
a11dca8d24 common: use consistent filehandle name f in COM_LoadFile
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 19:37:32 +10:30
Kevin Shanahan
da63c11562 common: remove -cachedir option from NQ
Used only during development of the game when working over slow
connections remotely  - doesn't seem relevant to doing development
today.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 19:30:30 +10:30
Kevin Shanahan
b0720156b8 common: create unified version of COM_Parse for merging
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 17:37:16 +10:30
Kevin Shanahan
9574035063 common: fix possible access outside sizebuf in SZ_Print
Bug fixed in QW, copy fix over the NQ and tidy up both functions.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 17:05:18 +10:30
Kevin Shanahan
05b99087b9 common: move common.h to shared include directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 16:52:51 +10:30
Kevin Shanahan
f65962caba common: prepare common.h for merging
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 16:52:05 +10:30
Kevin Shanahan
e3fdf97b12 common: make SZ_GetSpace static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 15:48:08 +10:30
Kevin Shanahan
3f535f8856 common: constify COM_Parse and everything that follows...
...which is a lot! This ended up touching a lot of code, especially
when it spread to Cmd_Argv, etc. Mostly just propogating the correct
const qualifiers on pointers, but in some cases it was appropriate to
copy the buffer to e.g. lowercase filename in SV_BeginDownload_f or
re-write parts of functions where the buffer modifications was not
strictly needed (e.g. the *Say* functions).

I guess of note is that I now accept a const pointer into Z_Free,
which shouldn't be a problem since it doesn't modify the data pointed
to at all, just marks it as free.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 09:46:42 +10:30
Kevin Shanahan
055aec1f1c common: constify common.[ch] function prototypes
Make as many arguments to functions in common.h as possible const so
the compiler knows we shouldn't be modifying some buffers/strings
passed down here.

Also fixed (but not tested) the COM_BlockSequenceCheckByte function in
QW/common/common.c which has been #if 0'd for a while. Probably won't
keep it around, but fixed for completeness.

I skipped COM_Parse in this patch, will be constified in the following
patch.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-28 07:27:59 +10:30
Kevin Shanahan
fe81ad30b9 sbar: copy qw check for negative sb_weapons array index to nq
Use the qmax macro to clamp the negative values in both cases.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-27 12:01:26 +10:30
Kevin Shanahan
e7839fa7db mathlib: make vector math macros more robust
Wrap the vector macros that don't return a value in do {} while (0)
and fix a couple of missing semicolons detected in the process.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-27 11:03:16 +10:30
Kevin Shanahan
9e1d471f02 entities: clean up long lines and comments in CL_ParsePacketEntities
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-26 20:50:41 +10:30
Kevin Shanahan
18a2aec115 entities: tidy up multi-line ternary experssions in CL_ParsePacketEntities
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-26 20:49:29 +10:30
Kevin Shanahan
a475651b54 entities: push down constness of entities where possible
Pass over the source and make as many references to entities as possible
const. This makes it much more obvious where we are actually making
modifications to the entity_t structure.

Mostly trivial, the only place where I did something other than add the
keyword "const" was in R_DrawBrushModel where we were working around the
reversed pitch bug.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 15:49:46 +10:30
Kevin Shanahan
01631f879d entities: only save origins of visedicts for QW object trails
QW was saving the whole visedicts list to scan for origins of objects
during the previous frame so that particle trails can be placed correctly
behind rockets, grenades, etc.

Save the origins and keynums in a simpler struct and remove the double
buffering of the cl_visedicts array.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 14:08:20 +10:30
Kevin Shanahan
62d2945013 trivial: whitespace change in cl_pred.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 12:45:33 +10:30
Kevin Shanahan
472ca8b59b view: fix weapon position with qw style sbar
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 11:10:49 +10:30
Kevin Shanahan
090e2f4c6b screen: make screenshot message consistent
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 06:41:22 +10:30
Kevin Shanahan
6f414bc844 screen: remove duplicated max viewsize check
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 06:25:02 +10:30
Kevin Shanahan
1d336ef01c screen: remove duplicated viewsize check
oldscr_viewsize was a duplicated check for changes in the scr_viewsize
cvar. Remove it and make the check consistent across all screen.c files.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-25 06:09:08 +10:30
Kevin Shanahan
c2abd3df01 client: remove unused bitcounts profiling data
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-24 11:40:37 +10:30
Kevin Shanahan
6a2940940b entities: fix for handling of lightning/beam temp entities
Unintended re-use of loop variable 'i'.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-23 09:00:43 +10:30
Kevin Shanahan
acfc75321e model: remove gl_model.h and use model.h everywhere
Gets rid of a bunch of conditionals throughout the .c files as well.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-19 13:22:30 +10:30
Kevin Shanahan
344cc52e52 model: hand off skin data loading to helper
Have the helper struct do the renderer specific alias model skin
processing. Will probably want to relocate the code to a more appropraite
place later, but just get the factoring done for now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-19 05:50:04 +10:30
Kevin Shanahan
1a128ddfbf model: create a model loading helper
Create a model loader structure which can be used to pass callbacks down
from the renderer code. This will allow us to have the render do some
processing on the loaded data at appropriate points and let us make the
actual loading code generic.

In the first instance, pass down the aliashdr_t padding value required by
the renderer.

Note that to remove a circular dependency introduced in the headers, I had
to stop including render.h in model.h/gl_model.h and that change
propogated some more changes to includes across the tree...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-18 18:32:30 +10:30
Kevin Shanahan
ea72041593 trivial: remove whitespace between type and varable for casts
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-16 12:59:49 +10:30
Kevin Shanahan
2cf6c1576f common: make COM_LoadFile static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-16 09:09:26 +10:30
Kevin Shanahan
77f4bb3da3 build: allow qwsv to use x86 optimised assembly routines
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-14 17:57:19 +10:30
Kevin Shanahan
d3c4dff990 trivial: remove unaligned defs since not used anymore
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-14 16:09:17 +10:30
Kevin Shanahan
c62496f9e8 trivial: remove 'UNUSED' macro
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-14 15:40:06 +10:30
Kevin Shanahan
76fadf6fe4 create helper macros for cache aligning pointers/arrays
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-14 14:45:31 +10:30
Kevin Shanahan
09d0542f3b model: remove the qwsv specific model.c file
Update comment in the Makefile - one aspect fixed... now to tackle the
duplication between model.c and gl_model.c...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 13:18:27 +10:30
Kevin Shanahan
7ff23f9704 model: hack around remaining client/server differences
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 13:14:21 +10:30
Kevin Shanahan
205bcef939 model: add leaf overflow check to QWSV
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 12:53:52 +10:30
Kevin Shanahan
e74e08e909 world: move world.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:27:45 +10:30
Kevin Shanahan
55d20d27b5 world: hack around remaining world.c differences
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:27:12 +10:30
Kevin Shanahan
ffd6dd4590 world: copy paranoid check into QWSV code
Update the comment while I still remember what that was (probably) about.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:17:26 +10:30
Kevin Shanahan
d33296695c world: re-order header includes for merging
Also include the correct model file for SW vs. GL.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:14:05 +10:30
Kevin Shanahan
79a44f2fd3 world: fake SV_Error so we can share NQ/QWSV code
Also update one error string on the QWSV side - makes all error messages
identical.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 08:53:04 +10:30
Kevin Shanahan
e63df56984 progs: move pr_edict.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 16:31:21 +10:30
Kevin Shanahan
4afe9347b6 progs: hack around the remaining differences in pr_edict.c
PR_LoadProgs got a bit messy, but there's still plenty of common code to
make this worthwhile.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 16:30:01 +10:30
Kevin Shanahan
c139514d85 progs: carry over NQ fix for keynames with trailing spaces
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:51:05 +10:30
Kevin Shanahan
c41d98ca6e progs: fix arg check in ED_PrintEdict_f
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:48:15 +10:30
Kevin Shanahan
c0d8595212 progs: cleanup QWSV edict print debug code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:36:42 +10:30
Kevin Shanahan
8667c0e907 progs: reorder includes in pr_edict.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:29:23 +10:30
Kevin Shanahan
6158521300 progs: normalise error strings in pr_edict.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:10:12 +10:30
Kevin Shanahan
02795c7686 progs: update an old comment about type_size
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:02:17 +10:30
Kevin Shanahan
6fc65c506e progs: NUM_FOR_EDICT's argument can be const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 13:58:32 +10:30
Kevin Shanahan
49ffa951e0 world: remove some #if 0'd debugging code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 12:00:11 +10:30
Kevin Shanahan
b29d95b927 world: check for overflow of sv_areanodes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:51:45 +10:30
Kevin Shanahan
8585d004ad world: move world.h to shared include directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:46:38 +10:30
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
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
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
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
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
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
6fab3eb423 model: merge modelgen.h files and fix #include fallout
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 16:47:27 +10:30
Kevin Shanahan
41b71e27a5 model: pass loadmodel down into GL_SubdivideSurface
Last external user of loadmodel, so can mark it static

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 11:59:02 +10:30
Kevin Shanahan
c43e6e594e model: mark a whole bunch of functions/globals static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 11:50:17 +10:30
Kevin Shanahan
3917847936 sys: Make Win32 SleepUntilInput function static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 09:10:20 +10:30
Kevin Shanahan
845f993b2b sys: remove now unused Sys_File* functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:34:14 +10:30
Kevin Shanahan
2f5771dfd8 common: remove handle member from pack_t struct
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:20:14 +10:30
Kevin Shanahan
457d823b4b trivial: rename a file handle variable
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:05:02 +10:30
Kevin Shanahan
dcd2dd68f0 common: convert COM_FindFile to COM_FOpenFile
COM_FindFile now just calls COM_FOpenFile, so rename it and get rid of
the former. Remove use of Sys_FileOpen integer handles and use FILE *
instead. Fix the comment above the funcion in both nq and qw.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 06:59:05 +10:30
Kevin Shanahan
c544ac402c common: convert COM_CopyFile to FILE * APIs 2012-10-26 13:53:23 +10:30
Kevin Shanahan
57fc9dab14 common: Replace COM_Open/CloseFile with standard FILE * operations
Instead of interger handles from sys_*, use standard C FILE * operations,
same as we do for qw already.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-26 13:40:26 +10:30
Kevin Shanahan
5a8ddb7577 common: re-order some includes / declarations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-26 08:08:10 +10:30
Kevin Shanahan
21b78472c9 common: add -dibonly to qw safe argvs
It's the same video drivers anyway...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-26 08:06:48 +10:30
Kevin Shanahan
caf91335fb trivial: properly encode non-ascii characters in string
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 18:37:13 +10:30
Kevin Shanahan
e833a57537 trivial: another couple of missed trigraphs
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 18:25:55 +10:30
Kevin Shanahan
6904db836d common: STRUCT_FROM_LINK is just container_of()
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 14:18:52 +10:30
Kevin Shanahan
0d9124f631 common: Fix circular include dependency and remove forward declaration
No problem with circular dependency anymore. Also folded in some whitespace
changes to reduce the QW/NQ diff.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 14:10:34 +10:30
Kevin Shanahan
c025057452 common: move MAX_NUM_ARGVS define to common.h
Remove the definition from QW/common/common.c and add it to common.h and
include the header. Remove the definitions from quakedef.h files.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 13:51:18 +10:30
Kevin Shanahan
ad6ee08925 fix warnings about printf style format strings
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:50:37 +10:30
Kevin Shanahan
899bd1ba83 console: add cvar completion support for QW skins
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 18:50:39 +10:30
Kevin Shanahan
48a0621852 common: Check paths correctly when scanning pak files
Previous implementation of COM_ScanDirPak completely ignored any path
component in the pak filename. Switch to snprintf in COM_ScanDir as well
while we're at it.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 18:50:38 +10:30
Kevin Shanahan
0697ae6dc3 gl: move gl_rmisc.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 09:06:17 +10:30
Kevin Shanahan
b079d4c699 gl: Eliminate remaining differences between the gl_rmisc.c implementations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 09:03:06 +10:30
Kevin Shanahan
57aebdcd64 gl: Rename some variables to improve readability
Improve readability and consistency with the NQ function:
  inwidth -> instride
  tinwidth -> inwidth
  tinheight -> inheight

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 08:44:07 +10:30
Kevin Shanahan
d56610dc51 gl: factor out gl texture resampling for skins
Factor out the texture resampling routines for the player skins. QW
needs the extra "stride" parameter because it only uses a
sub-rectangle of the full skin texture.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 08:38:44 +10:30
Kevin Shanahan
d2c2c6059c Implement a type-checking clamp macro
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 14:27:57 +10:30
Kevin Shanahan
25b7b14943 Use qmin macro to clamp size of player skin
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 13:04:46 +10:30
Kevin Shanahan
017cdf3369 Remove unused code from R_TranslatePlayerSkin
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 13:03:57 +10:30
Kevin Shanahan
4351d34924 qw: Simplify early-return test in R_TranslatePlayerSkin
Reduces the indentation of the rest of the function by one tab stop
and makes it easier to see the real differences between the qw and nq
implementations.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 12:21:28 +10:30
Kevin Shanahan
8840d2873c move r_main.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 18:20:31 +10:30
Kevin Shanahan
6c544900a8 merge trivial differences between r_main implementations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 18:19:58 +10:30
Kevin Shanahan
d8781b30d2 qw: Hide the buffered edicts list in cl_ent.c
The structures used to buffer the edict info which enables the QW
prediction logic can be hidden away inside cl_ent.c.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 15:39:49 +10:30
Kevin Shanahan
7007067318 particles: move r_part.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 14:36:52 +10:30
Kevin Shanahan
ac28564bc2 particles: Merge difference between QW/NQ r_part.c
Again, quite a few silly "hacks" in there but can start to shake out some
of the differences as we go along.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 14:35:00 +10:30
Kevin Shanahan
8bf8cad032 particles: Refactor R_RocketTrail to use switch statement
Make the QW version more similar to the NQ version in structure. Once
re-ordered, the small differences are clear.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 18:15:29 +10:30
Kevin Shanahan
24af3dfe7b qw: fix pointfile loading
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:41:26 +10:30
Kevin Shanahan
23d81d22d7 Move r_shared.h to common include dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:20:56 +10:30
Kevin Shanahan
7764670a2c Merge trivial differences between r_shared.h files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:17:55 +10:30
Kevin Shanahan
e3a0d0cac9 vid: Bump MAXWIDTH and MAXHEIGHT
Actually, MAXWIDTH is never used at all...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:05:29 +10:30
Kevin Shanahan
fdd7c65242 trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 10:12:03 +10:30
Kevin Shanahan
489ada1caa win: Unify Sys_Doubletime across NQ/QW/QWSV
NQ always used the high-precision timer API, and since I added a fallback
mode it should be fine to try for high precision first on all platforms
and fall back if necessary.

Also fixes some incorrect math in the timer wraparound case which
previously existed in QW client (wrong operator precedence).

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-19 21:59:27 +10:30
Kevin Shanahan
c9e6f37822 trivial: static variables, unused definitions/declarations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-14 17:26:27 +10:30
Kevin Shanahan
b80bdb0fed qw: Fix simulation rate limiting
Remove this seemingly harmless check for something silly like time going
backwards - it happens a lot. Very confusing because it doesn't happen on
debug builds, but only when code optimisation is enabled.

It's very possible for a time arguement of zero to be passed in here.
However, when opimisation is enabled the FP math gets a bit looser and
ordering of operations can shift such that the float passed in is a very
small negative number.

When that happens and we reset the oldrealtime, we get tricked into
running too many simulation frames and the game speed gets screwed up.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-14 17:02:31 +10:30
Kevin Shanahan
7fd94cc773 draw: clean up declarations of draw_chars
QW/client/gl_ngraph.c was declaring the extern, but it's already in draw.h
QW/client/gl_screen.c was defining a second copy! Not sure how we never
triggered duplicate symbol errors in the linker with that one...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-10 20:29:06 +10:30
Kevin Shanahan
5c2fc5d703 screen: Merge some cosmetic differences between gl/sw in QW
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-10 19:18:53 +10:30
Kevin Shanahan
9be4ed6008 screen: Make WritePCXfile static
Function is local to this file only.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-10 19:03:21 +10:30
Kevin Shanahan
2499f82bb6 screen: Set PCX palette type to 1
While trying to fix a bug with screenshots (which I now cannot reproduce),
I noticed that the palette type in the PCX spec file says '1' represents
Colour/BW and '2' represents Grayscale. Seems Quake was doing the opposite
- although changing this made no difference to viewing the images in Gimp.

Also allowed some code formatting changes to creep in - at least the
function is as consistent as possible between QW/NQ and GL/SW now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-10 18:56:19 +10:30
Kevin Shanahan
d71439deeb screen: Add show_fps feature to NQ
Same as available in QW, activate with cvar show_fps.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-07 15:53:00 +10:30
Kevin Shanahan
158129ae37 vid: Make modestate static in the windows vid drivers
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-28 22:03:47 +09:30
Kevin Shanahan
913cefac02 Move extern declaration from sv_ccmds.c to cmd.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-21 16:44:38 +09:30
Kevin Shanahan
48a12a1b68 Move extern declaration from sv_ccmds.c to server.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-21 16:44:17 +09:30
Kevin Shanahan
7d7be32729 Move extern declarations from sv_user.c to server.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-21 16:26:54 +09:30
Kevin Shanahan
4f9477793d trivial: remove unused bool nomaster and Master_Connect_f()
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-01-08 09:36:02 +10:30
Kevin Shanahan
5100ec397f trivial: make server_version static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-01-08 09:33:42 +10:30
Kevin Shanahan
e4dfc8b94e Mark PR_RunError() with attribute noreturn
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-01-08 09:22:27 +10:30
Kevin Shanahan
dc24b64418 Save stack context in Host_Init() before flushing the command buffer.
In case one of the command's execution fails and causes a longjmp()
call such as by way of a Host_Error(), we would segfault because we
haven't saved the stack context/environment. This was the case with a
command line like "tyr-quake +connect localhost" without any servers
running. So, added a setjmp() call before Cbuf_Execute().

While we're at it, set host_initialized to true before exec of
quake.rc and we'll rename host_abortserver in NQ to host_abort, in
line with QW.

Modified version of patch by O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-01-08 09:15:00 +10:30
Tyrann
f566f01598 trivial: reduce diff between NQ/QW Host_Frame functions
They are still quite different, but remove a few cosmetic points of
difference so it's easier to see the real differences.

NQ/host.c::_Host_Frame() vs. QW/client/cl_main.c::Host_Frame()
2012-01-05 11:48:26 +10:30
Tyrann
61ef48e728 Fix strict aliasing warning on netadr_t 2012-01-03 20:24:06 +10:30
Tyrann
18020f7213 move gl_rmain.c to the common directory 2012-01-01 11:34:10 +10:00
Tyrann
db23612f88 Merge differences between gl_rmain.c files
Quite a few #ifdefs in there, but manageable.
2012-01-01 11:31:09 +10:00
Tyrann
1984cd1587 fix strict-aliasing warning in byte swap tests 2011-12-31 15:12:07 +10:00
Tyrann
64f6e7da98 sv_send.c: make some local variables/functions static 2011-12-31 14:42:24 +10:00
Tyrann
940b5b48a2 sv_ents.c: move some more declarations to server.h 2011-12-31 14:41:16 +10:00
Tyrann
2f2fb6e5d0 sv_main.c: make local variables/functions static 2011-12-31 14:27:12 +10:00
Tyrann
cf7d8ba2b4 Move a couple of cvar declarations to server.h 2011-12-31 14:20:02 +10:00
Tyrann
72613cde44 qwsv: ip filter/ban list improvements
Allow netmask to be specified for greater control, e.g.:

  addip 10.128.0.0/9
  addip 172.16.192/18

Also fixed a couple of "dereferencing type-punned pointer will break
strict-aliasing rules" warnings.
2011-12-31 07:26:10 +10:00
Tyrann
5b84b0a343 Move render.h to the common include directory 2011-12-30 09:44:42 +10:00
Tyrann
4489d24ab8 Merge differences in render.h files
A bit messy with the differences in entity_t, but otherwise getting
pretty close.
2011-12-30 09:40:57 +10:00
Tyrann
84d04bd34b Remove unneeded declaration of colormap from QW/client/render.h
Assembly files get this from quakeasm.h
2011-12-30 09:37:57 +10:00
Tyrann
5fe07628a7 Move r_misc.c to the common directory 2011-12-29 18:12:35 +10:00
Tyrann
12ad6131be Eliminate differences between r_misc.c files
* Setup includes to be identical
* Add color enhancements to NQ version for R_LineGraph
* Hack around other minor differences with #ifdef for now
2011-12-29 18:02:41 +10:00
Tyrann
f9365c5791 Fix timegraph and make it look like netgraph
Timegraph was not displaying anything for me so fix it, making it look
like netgraph. Graph rendering times in milliseconds. It looks like
this was a function used to quickly hack in different graph measures
during development, so perhaps make this more generic at some point?
2011-12-29 17:39:46 +10:00
Tyrann
0afb906180 qport is ignored by QW server
Contrary to the comments, the QW server ignores the qport supplied by
the client. Make a note in the code in case I want to correct the code
or comments at a later stage...
2011-12-28 12:38:22 +10:00
Tyrann
bf2e190e82 Missile speed parameter to PF_aim is ignored
clang revealed that the speed parameter to the aim function is never
used. Add comment to that effect and don't bother reading the
parameter in.
2011-12-28 12:10:29 +10:00
Tyrann
05fdf8ca3c Remove some unneeded variables
clang pointed out a number of "unused" variables. These are "used" in
the sense that we do assign things to them, but the results are never
looked at.

As far as I can tell, all the cases included in this commit don't
point to any subtle bugs and should be safe to remove.
2011-12-28 11:51:25 +10:00
Tyrann
9d25ce27c2 trivial: remove various redundant variable assignments
clang found a number of places where we redundantly set a variable to
some value and never read it back (before it is assigned
again). Remove those cases. A couple were cases of trying to silence
the compiler, but modern versions of gcc seem to have made some of
these unneccessary.
2011-12-28 11:41:14 +10:00
Tyrann
aa8a8728bb Unchecked return values reading demo file
clang correctly points out that we store the return value from our
fread calls, but never check for success/failure. Don't bother storing
it for now, but go back and fix this later...
2011-12-28 11:15:04 +10:00
Tyrann
97f26433eb Remove unused floating point exception handling code 2011-12-28 10:58:05 +10:00
Tyrann
1bb07a24a0 Remove unneeded alpha parameter to GL_Upload8_EXT 2011-12-28 10:48:15 +10:00
Tyrann
2ee8c94948 Fix 64-bit compiler warning
Structure member offset is never going to overflow an integer, but may
as well clean up the compiler warning.
2011-12-28 10:18:50 +10:00
Tyrann
59471f9841 [PATCH] Remove a few cosmetic differnces between the view.c files 2009-09-13 17:12:07 +09:30
Tyrann
a342b0708d [PATCH] Remove old (and broken) support for stereoscopic shutter glasses 2009-09-13 13:37:16 +09:30
Tyrann
8557d125e6 [PATCH] Remove unneeded extern declaration
scr_vrect is not referenced anywhere in this file.
2009-09-13 13:36:24 +09:30
Tyrann
2d07433378 [PATCH] Fix a few 32/64 bit warnings
Signed-off-by: Tyrann <tyrann@disenchant.net>
2009-07-05 15:10:55 +09:30
Tyrann
094e9ff554 [PATCH] qwsv: Fix execution of command line parameters
Quakeworld server command line parameters were not getting executed because by
calling the Cmd_StuffCmds() function directly, the cmd_argc variable was not
getting set correctly - causing Cmd_StuffCmds to just print the help text!

Thanks to Frank Haeseler <cryptus@cryptus.de> for reporting the breakage.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2009-01-11 16:34:26 +10:30
Tyrann
4a513d70f6 [PATCH] Fix "end titles" bug in software renderer
Fix a bug in the software renderer where we write past the end of the
rendering context if the end of episode text extends off the bottom of the
screen. The bug had actually been fixed in QW but not NQ, so this patch fixes
both consistently. Thanks to Sander van Dijk <a.h.vandijk@gmail.com> for both
reporting the problem and finding the cause.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-06-09 20:56:23 +09:30
Tyrann
27126992b1 [PATCH] pr_cmds.c static functions and variables
Most functions and variables in the {NQ,QW/server}/pr_cmds.c files don't need
to be in the global scope.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-04-26 18:38:34 +09:30
Tyrann
7b6a5da600 [PATCH] Mark Host_Error and Host_Endgame with noreturn attribute
Host_Error and Host_Endgame never return, so mark them as such and cleanup a
few unnecessary statements previously used to quiet compiler warnings.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-04-26 18:38:34 +09:30
Tyrann
440d9d3d17 [PATCH] __func__ cleanups (cl_parse.c, cl_ents.c)
Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-04-26 18:38:34 +09:30
Ozkan Sezer
968abce535 [PATCH] vid only lives in vid_* files.
viddef_t vid resides in vid_* files and since it's a global it is *not*
supposed to live in multiple files. fixed that stupidity.

Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-04-21 19:20:36 +09:30
Tyrann
e91ce02db8 [PATCH] Increase MAX_MOD_KNOWN consistently
MAX_MOD_KNOWN had already been raised from 256 -> 512 in glquake, but not in
the software renderer or in qwsv. Some maps/mods hit the 256 limit these days
(Contract Revoked was reported to have problems - thanks Sander).

Reported-by: Sander van Dijk <a.h.vandijk@gmail.com>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-09 10:32:39 +10:30
Ozkan Sezer
d2ae079f8a [PATCH] Neater fix for Sys_ConsoleInput
Since we're resetting len to 0, may as well shorten the string in the text
buffer too. Patch from O.Sezer <sezero@users.sourceforge.net>.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-09 10:32:19 +10:30
Tyrann
be99f34793 [PATCH] More careful checking of model name buffers
Do some more careful checking on model names string length.
Based on a patch from O.Sezer <sezero@users.sourceforge.net>.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-21 19:04:00 +09:30
Ozkan Sezer
d61b29ce1b [PATCH] Fix possible buffer overrun in Sys_ConsoleInput()
Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-21 19:03:34 +09:30
Tyrann
bc4eefac61 [PATCH] Remove some dead code in QW sys_{win,linux}.c
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-02 05:35:15 +09:30
Tyrann
2e2b43826b [PATCH] Printf format/usage fixes
Fix a bunch of incorrect uses and type mismatches in our printf-like functions,
revealed by the previous gcc attribute patches.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:39 +09:30
Tyrann
be6880b044 [PATCH] Add gcc "format" attribute to our printf style functions
Annotate our varargs "printf" style functions with the gcc "format" attribute.
This shows up a whole bunch of incorrect usage in our code, so we'll start to
clean that up in subsequent patches. We've also constified the format string
arguments here.

Based on a patch from O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Tyrann
3e70a0279b [PATCH] Use Con_Printf from console.h for QW server
Seems silly to have the Con_{D,}Printf functions duplicated in different
headers, so just use the definition from console.h. QW server actually
implements the functions in sv_send.c, so this is a little messy, but I still
see it as a small improvement.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Tyrann
b9ef6b0793 [PATCH] Add gcc "noreturn" attribute to a few functions
Annotate a few functions (BOPS_Error, Sys_Error, Sys_Quit and SV_Error) with
the gcc attribute "noreturn" and clean up a few lines of dead code which were
only there previously to quiet the corresponding compiler warnings.

Based on a patch from O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Tyrann
508265836f [PATCH] Merge and move pr_exec.c files into common dir
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 16:17:46 +09:30
Tyrann
671b49e4e6 [PATCH] Resolve trivial differences in pr_exec.c files
Prepare pr_exec.c for merging - all differences are either trivial whitespace
or just differences in the error functions called.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 16:17:46 +09:30
Tyrann
41f4854b20 [PATCH] Grow progs strings table dynamically
Use the new Z_Realloc function to grow the progs string table dynamically as
needed. Some large maps need significantly more than the 2048 entries I had
allocated statically before.

Based on the uHexenII implementation.
Thanks to O.Sezer <sezero@users.sourceforge.net>.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:49 +09:30
Tyrann
25f8800333 [PATCH] Rename min/max macros to qmin/qmax and move to common dir
min/max clashes with another macro in the mingw headers, so just rename ours
to qmin/qmax. Move the definitions to mathlib.h so they can be shared between
QW and NQ.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:48 +09:30
Tyrann
950999685a [PATCH] Hide progs string table internals
Hide the internal workings of the progs string table so we can play with the
implementation.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:48 +09:30
Tyrann
cd64a4ecea [PATCH] Remove nonsensical use of num_prstr from SV_Status output
What possible relevance could this ever have had???

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:48 +09:30
Tyrann
4129f62e63 [PATCH] Merge vid_win.c files and move to common dir
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-09 22:07:41 +09:30
Tyrann
e7d7697f62 [PATCH] Add old "Intellimouse" wheel compat code to NQ
AFAICT this little snippet of code is for compatability with the first
"Intellimouse" drivers, back when mouse wheels were just new. There still
seems to be something wrong with mouse wheel handling in NQ during gameplay
(works in the menu for setting the bindings and on the console for scrolling
the text - just not in the game...)

Anyway, with this patch both vid_win.c files are identical, ready for
merging...

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-09 22:07:34 +09:30