Commit graph

918 commits

Author SHA1 Message Date
Bill Currie
f800e79a38 Make the init process more dependency based.
Most subsystems that depend on other subsystems now call the init functions
themselves. This makes for much cleaner client initialization (more work
needs to be done for the server).
2012-02-01 21:52:47 +09:00
Bill Currie
5efc78b920 Move the call to R_Particles_Init_Cvars into R_Init_Cvars. 2012-02-01 20:05:11 +09:00
Bill Currie
4b390909f2 Move r_gravity to it's rightful home.
r_part.c makes much more sense.
2012-02-01 20:03:16 +09:00
Bill Currie
fa0ff96533 Clean up the mess with host_basepal and vid_colormap.
Libs should not be reaching into the exe :P
2012-02-01 19:52:13 +09:00
Bill Currie
57f920b9e9 Fix some inverted logic.
Oops.
2012-01-28 21:01:19 +09:00
Bill Currie
7e078c7f9c Revamp cshifts and implement in glsl.
The renderer should now be free of any direct access to client code. Even
3d rendering is now done via a function pointer.

The cshift code is done as a 2d screen function.
2012-01-28 20:45:14 +09:00
Bill Currie
ca2c861671 Fix team colors in GL NQ. 2012-01-26 13:53:52 +09:00
Bill Currie
ae4a30089e Remove skin.c from nq.
I forgot to zap it earlier.
2012-01-26 13:48:20 +09:00
Bill Currie
8448a8f332 Minimize the skin calls in nq. 2012-01-24 11:59:49 +09:00
Bill Currie
fb2568e681 Fix team colors in glsl for nq.
I forgot to ensure Skin_Init was called in nq. Doing things with texture 0
doesn't work too well.
2012-01-24 11:49:42 +09:00
Bill Currie
7bfddd7ffe Gut most of the old skin code.
Custom skins are smashed on most targets. Player colors don't work, etc.
However, this will let me do a much cleaner implementation.
2012-01-23 16:16:30 +09:00
Bill Currie
6fe557b407 Ensure the beam entitys' angles get set.
This fixes the incorrectly oriented beam entities.
2012-01-21 16:18:20 +09:00
Bill Currie
ffa79eed01 Don't lie about the number of models.
The renderer being told there were 2048 models when there were only ~160
was a bit of an unpleasant surprise :P
2012-01-09 16:22:39 +09:00
Bill Currie
423e08ce21 Add demo to "movie" conversion.
It currently writes a series of png files (QF/qfmvNNNNNN.png), at a fixed
rate of 30fps, with no sound recording.
2012-01-05 19:19:37 +09:00
Bill Currie
297a4e2756 Put the D_FlushCaches mess back.
It turns out that when it is called is highly timing sensitive :(
However, the rest of R_ClearState remains.
2012-01-05 15:50:20 +09:00
Bill Currie
53d89bf85a Clean up the mess around D_FlushCaches.
Create an R_ClearState and call that from the clients. It calls any
necessary functions itself.
2011-12-23 12:51:47 +09:00
Bill Currie
497461b4c2 Make a start on making a pure GLSL renderer.
For now, only nq-glslx will be built, but as there is no actual code, it
doesn't link. However, this gets the glsl stuff into the build system.
2011-12-23 12:19:13 +09:00
Bill Currie
890963423b Big cleanup of Host_Init.
Eventually, all init functions will chain to their dependencies.
2011-12-22 16:54:22 +09:00
Bill Currie
0086fee233 Rename host_skin.c to cl_skin.c.
I don't know why I thost host was a good idea.
2011-12-22 16:54:22 +09:00
Bill Currie
29306f7799 Merge nq and qw sv_phys.c
sv_move and world are now identical between the two directories.
2011-12-22 16:54:22 +09:00
Bill Currie
2bec1ae1d9 Make qw's push/block handing the same as nq's.
NQ's handling seems to be more correct. The only likely problems are if
something is pushed into (eg) a button, and things will be a little slower.
2011-12-22 16:54:22 +09:00
Bill Currie
d1be716031 Tidy up the corpse related code in SV_Push. 2011-12-22 16:54:22 +09:00
Bill Currie
4ade879674 Make SV_PushEntity easier to read. 2011-12-22 16:54:22 +09:00
Bill Currie
b54f0587d1 Bring qw's entity-in-solid check into nq's SV_Push. 2011-12-22 16:54:22 +09:00
Bill Currie
7243de0d90 Remove entorg from nq's SV_Push ().
It's been redundant since the moved_* arrays came in.
2011-12-22 16:54:22 +09:00
Bill Currie
64115d3331 Clean up sv_phys.c a little before merging.
Add some comments and make the code a little more readable so I know
what's going on.
2011-12-22 16:54:22 +09:00
Bill Currie
d441dc9027 Sort the cvar declarations.
The diff is still messy, but now it includes only new/old cvars, not moved
cvars.
2011-12-22 16:54:21 +09:00
Bill Currie
cba27bc745 Allow NQ's SV_RunThink to loop.
This brings NQ's physics a little closer to QW's. After studying both the
original WinQuake source and the progs source, this change should be
harmless, making very little difference. However, it does allow an
entity's think function to be called multiple times in the same frame (for
when the entity needs more time to think, but it would cause runaway loop
errors). Maybe need a "runaway think" check.
2011-12-22 16:54:21 +09:00
Bill Currie
c598ce4b50 Remove more of the fitzquake lerp code.
Missed this bit ealier.
2011-12-22 16:54:21 +09:00
Bill Currie
3eb859a88f Move the entity transform setup into the clients.
This has several benifits:
  o The silly issue with alias model pitches being backwards is kept out
    of the renderer (it's a quakec thing: entites do their pitch
    backwards, but originally, only alias models were rotated. Hipnotic
    did brush entity rotations in the correct direction).
  o Angle to frame vector conversions are done only when the entity's
    angles vector changes, rather than every frame. This avoids a lot of
    unnecessary trig function calls.
  o Once transformed, an entity's frame vectors are always available.
    However, the vectors are left handed rather than right handed (ie,
    forward/left/up instead of forward/right/up): just a matter of
    watching the sign. This avoids even more trig calls (flag models in
    qw).
  o This paves the way for merging brush entity surface rendering with the
    world model surface rendering (the actual goal of this patch).
  o This also paves the way for using quaternions to represent entity
    orientation, as that would be a protocol change.
2011-12-15 17:09:01 +09:00
Bill Currie
4b515a961b Back out the fitzquake lerp changes.
That's not the direction I wish to take the renderer.
2011-12-13 17:01:15 +09:00
Bill Currie
60c9d05d47 Hipnotic/Rogue weapon mask comments and cleanup.
This too has been sitting around for a while. Taken from fitzquake.
2011-12-12 17:08:22 +09:00
Antti Harri
cc937828b8 Propagate flags set in pthread.m4 to nq and qw sources. Removes the need
to have -pthread in CFLAGS on OpenBSD.
2011-12-10 13:33:20 +02:00
Bill Currie
c3d41326b3 Do key dest changing properly.
key_demo wasn't so well thought out. This seems to be much better (and nq
is known to be working nicely).
2011-12-10 16:14:25 +09:00
Bill Currie
16c8b2a18d Use the new demo imt.
There are some problems with menus and the console messing up the key_dest
state (they assume console/menu or game, nothing else), but otherwise
things seem to work.
2011-12-10 15:18:50 +09:00
Bill Currie
054e52528e Revive the loading plaque.
At the request of scar3crow.
2011-12-09 18:41:52 +09:00
Bill Currie
91e65b6c80 Rename mplane_t to plane_t and clean up the mess.
I got rather tired of there being multiple definitions of mostly compatible
plane types (and I need a common type anyway). dplane_t still exists for
now because I want to be careful when messing with the actual bsp format.
2011-11-28 20:54:34 +09:00
Bill Currie
03abb3b27d Add support for ellipsoids.
Not that boxes work yet, but the fix is the same.
2011-11-28 20:54:33 +09:00
Bill Currie
5029fde3e1 Fix the bogus frags on death.
I'd missed some casts in the MSG_ReadShort change.
2011-09-11 17:49:24 +09:00
Bill Currie
e7f845ece1 Fix the accidentally broken model precaching.
This fixes the explodebox bug reported by scar3crow (thanks!), caused by a
subtle difference between nq and qw precaching (nasty).
2011-09-11 17:07:41 +09:00
Bill Currie
cb9a30e949 Fix registered game detection.
registered detection needs qfs to be initted, but qfs needs game to be
inited... so move the qfs init into game init before the registered check.
2011-09-11 15:40:36 +09:00
Bill Currie
d9ab3a1f54 Move the config file/command line parsing into qargs.c
I don't like the COM prefix, but it will do for now.
2011-09-11 14:57:05 +09:00
Bill Currie
a71acc9ae5 Move the essential init code into Sys_Init(). 2011-09-11 14:56:47 +09:00
Bill Currie
f921005a5d Nuke com.c.
It's contents have been moved into game.c and massaged appropriately.
2011-09-11 14:55:13 +09:00
Bill Currie
8bab548d16 Make the hud type configurable via dirconf.
Currently only "id", "hipnotic" and "rogue" are supported (anything else is
treated as "id"). Has no effect in quakeworld (good thing too: changing
gamedirs is a little broken).
2011-09-11 08:13:26 +09:00
Bill Currie
1f4a6daafb Fixes for win32.
I'd forgotten why SDL_main had such a lame prototype.
It turns out my previous mingw testing wasing testing SDL :(
2011-09-10 17:47:38 +09:00
Bill Currie
89ec14e0fc Make very tiny movements no-ops.
This affects pushers in their think code. This makes NQ a little more like
QW, but doesn't really seem to change much.
2011-09-07 09:41:05 +09:00
Bill Currie
9bd4bbee52 Make sure tossed entities with upward velocity can always move.
If a tossed entity has ONGROUND set, it won't move, but if it has an upward
velocity, it can't possibly be ONGROUND, so clear the flag if the entity is
moving upwards.
2011-09-07 09:41:05 +09:00
Bill Currie
e1b6f50345 Clean up the diffs a bit between qw and nq sv_pr_cmds
Add some missing functions to nq.
In qw, Sys_Printf is mapped to SV_Printf, so no harm there.
2011-09-07 09:41:05 +09:00
Bill Currie
dcbe23b3d3 Abandon the runequake stuff for now. 2011-09-04 20:32:57 +09:00