Bill Currie
a7ad6c03f5
Add some defines and functions I need for glsl.
...
There will be more coming as I need them.
2011-12-25 11:24:57 +09:00
Bill Currie
ce8c2e717a
Add some more vector/quat component macros.
2011-12-24 20:10:37 +09:00
Bill Currie
cc5140e3a1
Move min/max/bound and field_offset into better locations.
...
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +09:00
Bill Currie
59ef1eae9d
Split out the floodfile code into its own file.
2011-12-23 19:01:31 +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
33c5320c0e
Create stubs for most of the required render functions.
...
nq-glslx almost links. Just some suspicious references in host.c I want to
check before doing anything more.
2011-12-23 12:19:50 +09:00
Bill Currie
8b78aeb666
Add component-wise vector and quaternion comparison macros.
...
Also, re-implement VectorCompare and QuatCompare using the new macros.
VectorCompCompare and QuatCompCompare take a parameter specifying the
comparison operator to use. All component-wise comparisons must be true
for the whole comparison to be true.
2011-12-22 16:54:21 +09:00
Bill Currie
858d95de58
Add a bunch more keys to the X11 clients.
...
Now, QF does something reasonable for every key on my keyboar for which X
gives us a keycode.
2011-12-19 16:37:48 +09:00
Bill Currie
52d9269867
Merge brush model with world model rendering.
...
With this, non-mtex global fog now works properly :).
2011-12-18 08:09:55 +09:00
Bill Currie
87b78e5533
Move the surface chain links out of the surfaces.
...
The links are now in "instance surfaces". For non-instanced models (world,
doors, plats etc (ie, world and its sub-models)), there will be one
instance surface per model surface. However, for instanced models (ammo
boxes etc), there will be many, dynamically allocated (not yet
implemented). This commit gets the static instance surfaces working.
2011-12-17 19:14:14 +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
b38cb1e221
Create some nicer docs for AngleVectors.
2011-12-13 14:15:03 +09: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
81a16c925b
Add IMT_DEMO for demo playback bindings.
...
This will allow special key bindings for use during demo playback without
interfering with normal keys.
2011-12-10 14:21:12 +09:00
Bill Currie
14d8e8669f
Rework the legacy bind/unbind commands.
...
in_bind_imt is now gone. I guess mercury was right in that it was a poor
design. However, it was (and still is necessary) to support "bind" and
"unbind". Now, instead, they work only with the IMT_MOD table. IMT_MOD sits
below IMT_0 in the imt hierarchy. If the key is not bound in IMT_0+, then
IMT_MOD will be checked. This way, "bind" and "unbind" can never mess with
a user's more sophisticated binding setup.
2011-12-10 13:56:02 +09:00
Bill Currie
d9d56760e1
Add cvars to control the keys for menus and console.
...
The backquote is not always usable for toggling the console, and the new
bind system doesn't automatically bind a key to both game and console imts
(by design). Thus create a cvar that allows the "always works" console
toggle to be specified in eg $fs_globalcfg. While I'm at it, do one for the
menus, too.
2011-12-10 13:24:32 +09:00
Bill Currie
5ee552ea5b
Don't normalize the portal edge vectors.
...
This simplifies the collision handling code.
2011-11-28 20:56:20 +09:00
Bill Currie
3a386293fc
Add Vector3Scale macro.
...
Vector3Scale individually scales the components of one vector by the
components of another vector.
2011-11-28 20:56:19 +09:00
Bill Currie
4044f9d8e2
Shrink the default winding size.
...
The minimum number of points on a valid winding is 3, and the most common
will be 4 (especially useful for static structures).
2011-11-28 20:56:19 +09:00
Bill Currie
662c04dfdc
Add a function to obtain the unit vectors of a winding's edges.
2011-11-28 20:54:35 +09:00
Bill Currie
d61cb25a44
Add code to rebuild the bsp brushes.
...
Names and locations of declarations are still up in the air, but things
seem to be working assuming my test code is correct.
2011-11-28 20:54:35 +09:00
Bill Currie
853bf13d9e
Move the winding code into libQFmodels.
2011-11-28 20:54:35 +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
268e732b90
Add a Quat_t union.
...
It isn't used yet, but it might make messing with quaternions a little
easier.
2011-11-28 09:36:09 +09:00
Bill Currie
683adf1850
Print the name and texture number for model skins.
...
Use SYS_GLT (1024) for gl texture debugging.
2011-09-26 13:03:53 +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
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
5914bb6208
QFS doc update and cleanup.
2011-09-09 17:40:15 +09:00
Bill Currie
1e827485ef
Do some work on the user documentation.
...
Also document part of the cvar api.
2011-09-07 21:08:37 +09:00
Bill Currie
94362cc010
Add macros to ease printing of vectors and quaternions.
...
I got sick of having to pass all those parameters to printf. Let the
compiler do it for me.
2011-09-07 09:41:06 +09:00
Bill Currie
6b5b2a1622
Specified the endianess of the reads.
2011-09-04 09:58:13 +09:00
Bill Currie
deddb5cb6a
Partially document the message api.
2011-09-04 09:58:12 +09:00
Bill Currie
12e238f806
Add a function to convert quake angles to a quaternion.
...
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie
eb205d73fd
Add a function to convert a quaternion to a rotation matrix.
2011-09-04 09:58:12 +09:00
Bill Currie
a59fee5346
Add the QuatSet macro.
...
Same as the VectorSet macro.
2011-09-04 09:58:11 +09:00
Jeff Teunissen
a56f6b2e37
Docs: switch to SVG for the .fig files, add borders around imgs
...
Self-explanatory, really.
2011-08-23 01:39:40 -04:00
Bill Currie
6268bd2965
Tweak the property list docs a little.
2011-08-20 19:23:31 +09:00
Bill Currie
a759a5a376
Make the property-list documentation useful for users.
2011-08-20 16:29:59 +09:00
Bill Currie
5feb0454ca
Add and use SYS_SND for both sound and cd debug prints.
2011-08-11 17:20:33 +09:00
Bill Currie
ff857a9c71
Permit control of single character tokens.
2011-08-11 14:22:27 +09:00
Bill Currie
07d5b114bc
Clean out some dead code and variables.
...
We haven't had serial or ipx support for a long time.
2011-07-29 10:11:14 +09:00
Bill Currie
1e3f321070
Do some doc work on progs.
2011-07-29 09:04:09 +09:00
Bill Currie
ca817fafc2
Fix a typo.
2011-07-26 11:34:17 +09:00
Jeff Teunissen
6fad9bc777
Misc. doc sanitation
...
Slightly document some of the vector types, and fix some typos.
2011-07-25 17:22:44 -04:00
Jeff Teunissen
49b5940cd5
VM doc cleanups
...
Clarify that the "return value" macros all access the same location in
memory, and are just casting it (after a fashion) to the desired type.
2011-07-25 17:22:44 -04:00
Bill Currie
8ac5079ada
Get inputlines mostly working.
...
It should be only behind-the-scenes updates that are still a problem.
2011-07-09 21:16:38 +09:00
Bill Currie
c30e2956f2
Correct the pointer declarations in the docs.
2011-07-09 09:41:30 +09:00
Bill Currie
6114156b49
Add Cvar_RemoveAlias.
...
Now aliases can be deleted (needed for menus).
2011-07-05 21:59:47 +09:00
Bill Currie
a7291943f7
Fix up Cvar_MakeAlias's error checking.
2011-07-05 21:51:38 +09:00
Bill Currie
d2894a6f68
Rename Cvar_AliasGet to Cvar_MakeAliase.
2011-07-05 20:28:57 +09:00
Jeff Teunissen
85617586af
PCX: display some information on bad PCX files
...
also, minor whitespace on <QF/image.h>
2011-06-14 13:31:30 -04:00
Bill Currie
d638fdce83
Add a PlaneFlip macro.
2011-05-07 19:29:03 +09:00
Bill Currie
55cc0f9206
Bring back the unsigned type (PROGS version bump)
...
This is only low-level support (the unsigned keyword still does not work),
but sufficient to make switch statements using jump tables work.
2011-04-09 10:07:47 +09:00
Bill Currie
2bacfdabf2
Interpret func fields as selectors for entities with objects.
2011-03-30 20:19:31 +09:00
Bill Currie
c8e1d7b45a
Fix the API for inputline->enter().
...
Pass the inputline object rather than the input text, allowing access to
both user_data and the input text.
2011-03-27 08:03:39 +09:00
Bill Currie
84afc458fa
Allow the menus to overide the Escape key.
2011-03-25 18:02:59 +09:00
Bill Currie
bce3935ea6
Add a void address instruction.
2011-03-10 19:28:03 +09:00
Bill Currie
90de6b0499
Add a movepi instruction to support indirect moves of fixed size.
2011-03-09 10:29:24 +09:00
Bill Currie
18005cc80d
Rename move to movei.
2011-03-09 10:28:40 +09:00
Bill Currie
4432bc0bef
Make the offset in zone dumps more useful.
2011-03-08 22:44:56 +09:00
Bill Currie
ca6dd204b3
Use the right type for VM pointers.
...
Probably more of these hiding in the code.
2011-02-18 09:03:04 +09:00
Bill Currie
f54ce02725
Macros for quaterion access in progs memory.
2011-02-12 22:57:37 +09:00
Bill Currie
cac2e04b18
Avoid namespace issues with dstatements.
2011-01-19 11:35:34 +09:00
Bill Currie
33db650161
Add QuatInverse to calculate 1/q.
...
There's still no direct quaternion division because I don't know if the
definition of q1/q2 is (1/q2)*q1 or q1*(1/q2) (it does make a difference).
2011-01-18 22:22:18 +09:00
Bill Currie
3c9991364b
Add a "void return" instruction.
...
I got fed up with always having to explicty return something.
2011-01-13 00:29:56 +09:00
Bill Currie
13503198e5
Add quat_origin convenience constant.
...
Same as vec3_origin in that all elements are zero.
2011-01-11 08:41:40 +09:00
Bill Currie
cb0bc7229a
Resurect the debugging messages in rua_obj.c
...
Yet another debug flag: SYS_RUA_OBJ
2011-01-10 12:26:10 +09:00
Bill Currie
75ec6bf244
Clean out some unnecessary types from the progs engine and clean up the mess.
...
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie
2b539ee4ae
Add include for stdlib.h
...
This is needed for size_t when hash.h is the first file included.
2011-01-10 12:25:30 +09:00
Jeff Teunissen
d764ef80d0
write "color" PCX files (stupid bug)
2011-01-09 04:34:35 -05:00
Jeff Teunissen
68b5db87b2
Document PCX read/write functions & struct
2011-01-09 04:06:50 -05:00
Jeff Teunissen
4090674fa5
LoadPCX(): Turn convert argument into a qboolean.
2011-01-09 04:05:57 -05:00
Jeff Teunissen
9e0575313e
Net debugging
...
Add a SYS_NET developer mask for debugging network, and use it.
2010-12-30 05:01:58 -05:00
Bill Currie
6e18c3df85
Make qfs developer prints a little more controllable.
2010-12-28 09:08:51 +09:00
Bill Currie
90fcbefaff
Don't use entity_t's next for linking static enitities.
2010-12-25 19:59:34 +09:00
Jeff Teunissen
bbc8154ec7
joystick fixes
...
Make /dev/input/js0 the default joy_device, and temporarily bump max
buttons to 18 (until I kill the maximums entirely)
2010-12-24 05:03:32 -05:00
Bill Currie
4ab92c03e3
fix a bogus parameter name
2010-12-13 18:01:21 +09:00
Bill Currie
ce96e6b055
The beginnings of fog support.
...
gl_fog.c is taken from fitzquake with only minor modifications to get it
into QF. Other than worldspawn/network parsing, it's not used yet.
2010-12-10 17:17:30 +09:00
Bill Currie
8e557e81b6
Break out the guts of Ed_LoadFromFile into ED_Parse.
...
ED_Parse does not support progs privided parsing (at this stage, anyway),
but this will allow clients to easily get at the entities in a map.
2010-12-10 17:17:29 +09:00
Bill Currie
3ae2ef8d11
Remove non-progs data from edict_t.
...
All data that is irrelevant to the progs engine itself has been removed
from edict_t and moved into the sv_progs code.
2010-12-09 17:24:37 +09:00
Bill Currie
9deb178e21
Some documentation fixups.
2010-12-09 13:35:11 +09:00
Bill Currie
31cf4b0d78
Use a linked list for the leafs in which the entity is positioned.
...
This allows the pvs to be used on an antity no matter how many leafs the
entity is touching. Seems to work nicely, but it will leak memory every
time a map is loaded.
2010-12-08 08:44:52 +09:00
Bill Currie
a0828ddd06
Clean up bsp limits.
...
Delete all bogus bsp limits, fixing the code that depended on them.
Document those limits that are dictated by the format.
2010-12-07 17:58:09 +09:00
Bill Currie
0bd960d6cc
Move IDPAKHEADER to where it belongs.
...
It's not used anywhere, but it doesn't belong with the bsp types.
2010-12-07 13:54:54 +09:00
Bill Currie
a4b97e9e2e
Dynamic entity allocation. Unlimited static entities.
...
Entities can now be allocated dynamically. They are freed whenever a new
map is loaded.
Use the dynamic entities for static entities.
2010-12-03 21:01:52 +09:00
Bill Currie
a6941e27ef
Eliminate MAX_VISEDICTS. Unlimited visible entities.
...
The renderer can now render as many entities as can be crammed into the
currently visible set of nodes.
2010-12-03 14:59:02 +09:00
Bill Currie
0e737cae15
Fix some "a" -> "an".
2010-11-29 12:54:26 +09:00
Bill Currie
8831a109a4
Create and use mclipnode_t.
...
I didn't realize this was a critical part of fitzquake's large map
support. This should fix the non-solid brush entities in Conflagrant
Rodent.
2010-11-29 09:36:21 +09:00
Bill Currie
85c693d2b8
whitespace
2010-11-29 09:34:11 +09:00
Bill Currie
763ae71335
Remove the hull_t defines.
...
Nothing uses them...
2010-11-29 09:05:20 +09:00
Bill Currie
995a8d3e4e
Don't use assembly code for SV_HullPointContents.
...
This is the only assembly code dependent on the size of dclipnode_t.
Removing it paves the way for fixing clipnodes in large maps.
2010-11-29 08:51:29 +09:00
Jeff Teunissen
b0217bf0cf
Merge branch 'master' into forge
2010-11-28 03:05:30 -05:00
Bill Currie
f31595781c
Add and used SYS_VID for video/targets masked prints.
2010-11-27 08:48:00 +09:00
Bill Currie
cacd2fb895
FiztQuake's lerping system.
...
Seems to be mostly working. I get some funny results for zombies, but that
might be moving and turning at the same time causing issues.
2010-11-26 16:20:05 +09:00
Bill Currie
31c13d92a2
Protocol 666/large map support from FitzQuake.
...
Alpha and lerping aren't implemented yet, but things seem to be working. I
can load and play oms2.bsp (Conflagrant Rodent).
2010-11-26 16:20:05 +09:00
Bill Currie
8c4fe2f844
Rename Sys_DPrintf to Sys_MaskPrintf.
...
We now have finer runtime control over what gets printed. Need to do a
SYS_DEV audit, creating new masks as apropriate.
2010-11-26 16:19:26 +09:00
Bill Currie
abc17c1d91
New cvar commands from fitzquake.
2010-11-26 16:19:25 +09:00
Bill Currie
763cec3838
Some spelling/grammar corrections.
2010-11-24 17:01:18 +09:00
Bill Currie
ef7958d680
Lots of const correctness.
2010-10-13 20:52:08 +09:00