Commit Graph

45 Commits

Author SHA1 Message Date
Bill Currie dbd3d6502a Nuke qboolean from orbit
I never liked it, but with C2x coming out, it's best to handle bools
properly. I haven't gone through all the uses of int as bool (I'll leave
that for fixing when I encounter them), but this gets QF working with
both c2x (really, gnu2x because of raw strings).
2023-06-13 18:06:11 +09:00
Bill Currie dd1554aed3 [qw] Set cl.viewstate.time when setting cl.time
Fixes cshifts not fading. I'm sure there is a better fix, but this at
least gets qw mostly usable (for testing, at least: something is wonky
with roll).
2022-10-22 14:15:36 +09:00
Bill Currie 12c84046f3 [cvar] Make cvars properly typed
This is an extremely extensive patch as it hits every cvar, and every
usage of the cvars. Cvars no longer store the value they control,
instead, they use a cexpr value object to reference the value and
specify the value's type (currently, a null type is used for strings).
Non-string cvars are passed through cexpr, allowing expressions in the
cvars' settings. Also, cvars have returned to an enhanced version of the
original (id quake) registration scheme.

As a minor benefit, relevant code having direct access to the
cvar-controlled variables is probably a slight optimization as it
removed a pointer dereference, and the variables can be located for data
locality.

The static cvar descriptors are made private as an additional safety
layer, though there's nothing stopping external modification via
Cvar_FindVar (which is needed for adding listeners).

While not used yet (partly due to working out the design), cvars can
have a validation function.

Registering a cvar allows a primary listener (and its data) to be
specified: it will always be called first when the cvar is modified. The
combination of proper listeners and direct access to the controlled
variable greatly simplifies the more complex cvar interactions as much
less null checking is required, and there's no need for one cvar's
callback to call another's.

nq-x11 is known to work at least well enough for the demos. More testing
will come.
2022-04-24 19:15:22 +09:00
Bill Currie 43a329dcb5 [client] Get the basic chase camera working
The more advanced modes are rather broken (continuous spinning), but
they may have been for a while. The bulk of the various changes were due
to renaming viewstate's origin and angles to make their meaning more
explicit.
2022-03-01 11:43:23 +09:00
Bill Currie dc7cb97481 [qw] Remove viewangles from client state
Other than the one line in cl_pred.c, it's redundant, but it looks to be
just a redundant copy from ancient times.
2021-03-20 02:24:47 +09:00
Bill Currie 5cf1da7c25 [client] Finish moving onground to viewstate
Missed this in the entity cleanup (really, should have been separate
commits, but oh well).
2021-03-20 00:58:37 +09:00
Bill Currie 5bf21931c7 [renderer] Remove more old fields from entity_t
The only transform related field remaining is old_origin. This also
brings the renderer closer to using simd (lots of stuff to fix still,
though).
2021-03-20 00:08:21 +09:00
Bill Currie 8466de2325 [client] Use vec4_t in entity_state_t
And clean up the mess (sort of:P)
2021-03-11 16:19:49 +09:00
Bill Currie ca38f9b616 [qw] Use entity_state_t as a base for player_state_t
This will, in the long run, help clean up a lot of the differences in
the handling of entities in the clients.
2021-03-11 14:27:36 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie 6fe32103ea Do a bit of bound() usage auditing.
While these seem to be mostly harmless, having function calls in the
bounded value can be nasty.
2012-07-12 19:33:51 +09:00
Bill Currie d561d5587d Move the simangles hack out of cl_view.
The places that will need to be fixed are now three, but cl_view.c now
doesn't mess with values it shouldn't alter.
2012-06-15 22:02:16 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie 659d95221e hopefully fix both the "get stuck waiting for 3d" bug and the null worldmodel bug. 2007-03-18 03:37:37 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie a409ea4a74 spawn code complete 2005-05-08 08:04:50 +00:00
Bill Currie cd2f9434fc proxy now stays connected :) also gets the server data packet. most changes
due to move of pmove.h
2005-05-02 04:09:15 +00:00
Bill Currie d308d324cc o misc little cleanups
o add plent_state_t, packet_players_t and delta_t in preparation for
    re-worked delta compression code.
  o use plent_state_t in the client.
2005-04-30 03:59:23 +00:00
Ragnvald Maartmann-Moe IV 5fb8aa07f3 Code style, people. Love it or leave it! 2003-03-21 21:25:44 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie a6318a3baf enhanced no_pogo_stick control 2002-09-13 04:30:18 +00:00
Ragnvald Maartmann-Moe IV 4d74b80a38 Dead code removal. 2002-07-27 02:50:41 +00:00
Ragnvald Maartmann-Moe IV 227491d929 Remove cl_predict_static, it doesn't need a cvar to control it anymore. Also some minor related cleanups. 2002-07-27 00:44:54 +00:00
Bill Currie 81af9b14e9 move the VID_SetCaption call into CL_SetState where it belongs and fix
CL_SetState for when connecting to the server (dunno how I mangled that one)
2002-07-26 20:50:53 +00:00
Ragnvald Maartmann-Moe IV 0d95bc71ff Fix cl_predict_static default! 2002-07-15 09:29:50 +00:00
Ragnvald Maartmann-Moe IV 00d72be48d Whitespace. 2002-06-26 06:33:00 +00:00
Bill Currie a83ecbd23a make sure we don't get stuck in the console when the server is in
intermission mode. As far as I can tell, it's pure luck wether the
svc_intermission comes before or after the first pass through the prediction
code, and if it comes before, the prediction code will never run and thus
never realise that it's ok to start rendering, so force the issue if in
intermission mode.
2002-06-21 05:15:16 +00:00
Ragnvald Maartmann-Moe IV 2da6bd4907 Rename cl_nopred to cl_predict, cl_nostatpred to cl_predict_static, and disable prediction of static players by default. 2002-06-12 04:45:21 +00:00
Bill Currie 78a3e398d5 * taniwha gets medieval on extern 2001-10-28 04:23:37 +00:00
Bill Currie b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie def8bb3cd5 LordHavoc's VectorIsNull changes from 0.3 but as VectorIsZero (no such thing
as a `null' vector) plus a couple of other bits from his patch.
2001-09-11 05:18:15 +00:00
Ragnvald Maartmann-Moe IV 05d3aaa0bb Whitespace. 2001-09-10 17:32:22 +00:00
Ragnvald Maartmann-Moe IV ade99607cc header/whitespace sweep continues. 2001-08-28 23:05:45 +00:00
Bill Currie 7aa7bb663a centralize client state setting so ancilliary operations can be guaranteed
to happen (eg, key binding table selection for console).
2001-08-19 03:51:52 +00:00
Zephaniah E. Hull 80696badc7 kgt->imt, and imt now displays the current IMT. 2001-08-17 07:06:01 +00:00
Zephaniah E. Hull 20adccc9e4 A few things, first is that I removed the (rather broken) serial
networking support.

Second, I moves keys.c from qw and nq to libs/video/targets when I did
the next thing.

Existing user configs which do binds, sledge hammer. Sledge hammer,
existing user configs which do binds. *WHACK* *WHACK* *WHACK*

See, much nicer now.

Someone should document it, and fix all targets which don't use SDL for
input. (I honestly don't expect svgalib and the like to ever be fixed.)
2001-08-16 09:19:36 +00:00
Bill Currie ba0d0c755c do key_dest right 2001-05-15 05:27:14 +00:00
Ragnvald Maartmann-Moe IV 28d3937399 Some more whitespace, and fixes for disappearing cvars. 2001-05-14 05:16:59 +00:00
Ragnvald Maartmann-Moe IV 91200a862d Whitespace. 2001-05-14 03:08:24 +00:00
Joseph Carter 2bc55b7828 Cvar cleanups.. NULL is now used in place of 0 for callbacks, this should
make Cvar_Get's a lot easier to read.
2001-04-10 23:39:30 +00:00
Bill Currie a96536c896 nuke commdef.h and clean up the results by putting its contents where they
belong.
also, merge model.h and friends (MINUS render.h). this needed moving efrags_t
from render.h to model.h.
2001-04-10 06:55:28 +00:00
Bill Currie e939ccc40a cvars now sport a callback function that gets called whenever the cvar changes
or on initial get.
2001-03-31 01:02:52 +00:00
Bill Currie f78b973978 move the api headers into include/QF and clean up (most of) the resulting mess.
target specific files that I don't build won't compile yet. just put QF/
infront of the offending headers.

Also move ver_check into libqfutils
2001-03-27 20:33:07 +00:00
Bill Currie 87854e1a0c initial checkin of most recent newtree and nuq(?) source 2001-02-19 21:15:25 +00:00