Commit Graph

182 Commits

Author SHA1 Message Date
Bill Currie ef574e67d0 [net] Remove client references from net_main
This is progress towards #23. There are still some references to
host_time and host_client (via nq's server.h), and a lot of references
to sv and svs, but this is definitely a step in the right direction.
2022-04-24 17:21:58 +09:00
Bill Currie ee51d06aa3 [renderer] Clean up a lot of recalc_refdef use
I think the widespread use of recalc_refdef (and force_fullscreen) was
the result of a rushed merge of the renderer and video code (I do seem
to remember sprinkling them around). This cleans the two out of the
client code.
2022-03-19 00:56:30 +09:00
Bill Currie 3414eb12a3 [renderer] Move r_ambient and r_drawflat to client code
It makes more sense for these cvars to be under client control via
r_refdef. Completely disabled in qw, and currently ignored in nq.
2022-03-09 22:51:21 +09:00
Bill Currie 45c3c6d7be [screen] Clean up some dead declarations 2022-03-05 14:35:56 +09:00
Bill Currie d69355f521 [renderer] Support multiple entity queues
While there's currently only the one still, this will allow the entities
to be multiply queued for multi-pass rendering (eg, shadows). As the
avoidance of putting an entity in the same queue more than once relies
on the entity id, all entities now come from the scene (which is stored
in cl_world in the client code for nq and qw), thus the extensive
changes in the clients.
2022-03-05 02:05:39 +09:00
Bill Currie 1859ff233d [client] Fix the chase cameras
They no longer spin like crazy. I don't know how, but I must have broken
something over the years as I'm sure Seth had the code working (and I
seem to remember seeing it working). In the process, clean up a lot of
the angle mess.
2022-03-01 14:44:53 +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 57dd4494cc [renderer] Pass in a camera transform
More r_data cleanup. Things could be better still, but this is a start.
2022-02-28 16:59:38 +09:00
Bill Currie 7d059a0b56 [client] Merge nq and qw cl_view
They've been near-identical for years, now they're only one. It proved
necessary to start merging the HUD code which for now is just a few cvar
declarations (not even init), but that should be a separate set of
commits.
2022-02-28 12:12:51 +09:00
Bill Currie aac9069d9f [nq,qw] Clean up cl_view's use of the client struct
This is a huge step towards merging cl_view.
2022-02-25 16:54:45 +09:00
Bill Currie deff95f490 [client] Merge chase camera and much of input
Handling of view angles is a little hacky at the moment, but this gets
the chase camera code and most of the common input code into one place,
which will make cleaning up the camera code much easier.
2022-02-22 15:51:28 +09:00
Bill Currie 2d109e615b [client] Clean up a stray reference to the renderer
Reaching into the renderer internals for r_worldmodel doesn't work when
the plugins are not static.
2021-12-24 06:45:13 +09:00
Bill Currie 8d2791752e [particles] Merge particle spawning into client
After yesterday's crazy marathon editing all the particles files, and
starting to do another big change to them today, I realized that I
really do need to merge them down. All the actual spawning is now in the
client library (though particle insertion will need to be moved). GLSL
particle rendering is semi-broken in that it now does only points (until
I come up with a way to select between points and quads (probably a
context object, which I need anyway for Vulkan)).
2021-12-24 06:45:13 +09:00
Bill Currie 5128029368 [nq,qw] Clear render state when leaving active state
This fixes a segfault caused by b0517e89293 that I had missed due to not
actually playing: ie, demo map changes were ok, but not in-game map
changes.
2021-12-24 06:45:13 +09:00
Bill Currie 84a24dbb34 [renderer] Make R_RenderView private
This is actually a better solution to the renderer directly accessing
client code than provided by 7e078c7f9c.

Essentially, V_RenderView should not have been calling R_RenderView, and
CL_UpdateScreen should have been calling V_RenderView directly. The
issue was that the renderers expected the world entity model to be valid
at all times. Now, R_RenderView checks the world entity model's validity
and immediately bails if it is not, and R_ClearState (which is called
whenever the client disconnects and thus no longer has a world to
render) clears the world entity model. Thus R_RenderView can (and is)
now called unconditionally from within the renderer, simplifying
renderer-specific variants.
2021-12-24 06:45:12 +09:00
Bill Currie 413cea6b4a [qw,nq] Connect up key_demo
And clean up some remaining keydest refs (still a few more to go).

Need to sort out default bindings for key_demo, though.
2021-11-26 20:27:42 +09:00
Bill Currie b892ce637a [input] Nuke IN_Move from orbit
gotta be sure :)

On a serious note, it was always a problem in that it had
client-specific code and concepts embedded in the libraries.
2021-11-19 08:58:02 +09:00
Bill Currie 15dbe443b0 [nq] Hook up the new input and config systems
This gets nq in line with qw (and highlights more places than need
merging, *sigh*)
2021-11-18 15:27:44 +09:00
Bill Currie 4898a44263 [console] Hook up new input system
This has smashed the keydest handling for many things, and bindings, but
seems to be a good start with the new input system: the console in
qw-client-x11 is usable (keyboard-only).

The button and axis values have been removed from the knum_t enum as
mouse events are separate from key events, and other button and axis
inputs will be handled separately.

keys.c has been disabled in the build as it is obsolute (thus much of
the breakage).
2021-11-08 11:20:04 +09:00
Bill Currie 665790f562 [video] Remove libQFjs
It is now redundant with the libQFinput, though nothing actually works yet.
2021-11-01 12:30:45 +09:00
Bill Currie 40a26e4bc8 [scene] Rename libQFentity to libQFscene
And start working on scene management.
2021-07-24 14:20:59 +09:00
Bill Currie 1e9329ccf6 [nq,qw] Stop wring to config.cfg
QF now uses its own configuration file (quakeforge.cfg for now) rather
than overwriting config.cfg so that people trying out QF in their normal
quake installs don't trash their config.cfg for other quake clients. If
quakeforge.cfg is present, all other config files are ignored except
that quake.rc is scanned for a startdemos command and that is executed.
2021-04-12 22:09:09 +09:00
Bill Currie 5f93c115ff [util] Make developer flag names easier to manage
They're now an enum, and the flag part of the name is all lowercase, but
now the flag definitions and names list will never get out of sync.
2021-03-29 22:38:47 +09:00
Bill Currie a754dbca37 [util] Make va return const char *
And clean up the resulting mess.

I don't know why it wasn't doing so, but it certainly should have been.
2021-03-29 17:24:30 +09:00
Bill Currie 5d703c1f3e First stab at keydest sanitization 2021-03-27 20:43:51 +09:00
Bill Currie c9f1d770e0 Merge master into csqc-improvements
That was a mess
2021-03-25 22:01:31 +09:00
Bill Currie 7e2fcd1fbd Rename nq's cl.last_received_message to cl.last_servermessage.
And make it double rather than float because absolute time should not be
stored in a float.
2021-03-25 18:16:00 +09:00
Bill Currie 13677bc5d3 Rename nq's cl.scores to cl.players. 2021-03-25 18:15:12 +09:00
Bill Currie 52b714ea57 Move qw's player_info_t to client/state.h
And use it instead of scoreboard_t in nq.
2021-03-25 18:14:53 +09:00
Bill Currie a3c1b2e992 [util] Rename qfplist.[ch]
The name is a hold-over from before the current quakeforge tree and the
QF include directory.
2021-03-21 16:13:03 +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 2015474468 Move and clean up clview.h
Redundant or dead prototypes deleted, and the client/view.h seems a good
place for the file.
2021-03-12 11:48:53 +09:00
Bill Currie 098ceed5ff [client] Merge nq and qw temp entity handling
This finally gets cl_tent merged away.
2021-03-10 18:04:18 +09:00
Bill Currie fbc1bd9f6e [renderer] Clean up entity_t to a certain extent
This is the first step towards component-based entities.

There's still some transform-related stuff in the struct that needs to
be moved, but it's all entirely client related (rather than renderer)
and will probably go into a "client" component. Also, the current
components are directly included structs rather than references as I
didn't want to deal with the object management at this stage.

As part of the process (because transforms use simd) this also starts
the process of moving QF to using simd for vectors and matrices. There's
now a mess of simd and sisd code mixed together, but it works
surprisingly well together.
2021-03-10 00:01:41 +09:00
Bill Currie bb6c6963d2 [model] Clean up the globals around model loading
Covers only the generic load code (alias etc to follow), but this should
take care of a lot of issues in the future.
2021-02-01 14:39:00 +09:00
Bill Currie 7970525ef4 [util] Make va thread-safe
It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
2021-01-31 16:05:48 +09:00
Bill Currie 86b5b30b45 Merge branch 'master' into vulkan 2020-06-25 14:03:52 +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 4e4d1b99b4 Clean up all the system shutdown calls
I added Sys_RegisterShutdown years ago and never really did anything
with it: now any system that needs to be shutdown can ensure it gets
shutdown on program exit, and in the correct order (ie, reverse to init
order).
2019-07-12 23:15:26 +09:00
Bill Currie 3e1520c246 Move vid callback access into vid
The plan is to move the callbacks into a "private" struct.
2019-07-08 12:46:22 +09:00
Bill Currie 3efb0c538f Separate file search from loading.
QFS_LoadFile (and its wrappers) now  take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Johnny on Flame 637d751aa7 Saves axes behaviours on the config file. 2013-01-27 13:17:12 +09:00
Bill Currie 068bc7a627 Potential client state fix ala Baker.
I'm not sure it's really relevant to QF, but applying it doesn't hurt.
2012-07-21 17:53:49 +09:00
Bill Currie 543c4b2442 Don't force the console for ca_connected.
It's valid not to draw the console in ca_connected when changing levels.
2012-07-21 16:37:14 +09:00
Bill Currie d4f4e450e6 Fix the bogus loading plaque when disconnected (nq). 2012-07-06 10:44:29 +09:00
Bill Currie f128aca207 Nuke a FIXME.
That was a rather evil hack, but what's worse is when I finally fixed the
problem, I didn't fix the fixme :P
2012-06-28 07:22:28 +09:00
Bill Currie 9cb7e00946 FIx the segfault on changing levels caused by ca_active changes.
Host_Reconnect_f only set cls.signon to 0, so finding it as a place to
tweak was not so trivial :P Now it calls CL_SetState to do the job properly
:)
2012-06-24 11:22:37 +09:00
Bill Currie aa2a8e8909 Mostly "merge" cl_screen.c.
Down to protocol/networking differences.
2012-06-15 22:02:17 +09:00
Bill Currie 3fd279ea6c Use info strings for scoreboard names in nq.
Nukes a strcpy and a buffer, and is one step closer to merged client data.
2012-06-15 22:02:15 +09:00
Bill Currie b20daaf611 Nuke mapstring and spawnparms from client_static_t.
They're completely useless. Even though spawnparms was sent over the
network, the server ignored it. mapstring was never read anywhere.
2012-06-15 22:02:13 +09:00