Bill Currie
c0df07b607
Enable loading of iqm models in gl.
...
They don't render yet, but the engine doesn't segfault.
The vertex blend indices are rewritten with blend palette indices.
2012-05-17 15:55:38 +09:00
Bill Currie
23284536b5
Move IQM freeing into common code.
2012-05-16 18:09:44 +09:00
Bill Currie
111377f1be
Use buffer objects for iqm vertex arrays and elements.
2012-05-15 21:08:47 +09:00
Bill Currie
5740dba467
Mark iqm models as need-load when clearing.
...
This fixes the segfault on map change.
2012-05-15 21:08:47 +09:00
Bill Currie
1375c3cf03
Finally, load textures for iqm :)
2012-05-15 21:08:47 +09:00
Bill Currie
202ab04572
Ensure the rotation quats are normalized.
...
Doesn't make any noticeable difference, but it doesn't hurt.
2012-05-15 21:08:46 +09:00
Bill Currie
31d89782ef
Use the correct index variable when byteswapping the arrays.
...
Not the cause of the broken animations :(
2012-05-15 21:08:46 +09:00
Bill Currie
7cda91a879
Temporarily disable dual quaternions.
...
The animation data isn't getting loaded or used properly (not sure yet).
This helps ensure it's not something I've done wrong with dual quats.
2012-05-15 21:08:46 +09:00
Bill Currie
551dfc47fb
Build the iqm vertex arrays in the correct order.
...
They need to be built in ascending type order (makes life easier in the
renderer).
2012-05-15 21:08:45 +09:00
Bill Currie
2e98c31175
Check the corrent bits when reading scale frame data.
...
Fixes the invalid reads when loading an iqm (at least for mrfixit).
2012-05-15 21:08:45 +09:00
Bill Currie
a880f33152
Set the model type for iqm.
...
Forgot this rather important step :P
2012-05-15 21:08:45 +09:00
Bill Currie
078cb10caf
Add a stride field to iqm_t.
...
Since iqm vertex arrays are variable, and I don't want to calculate the
stride every time I render a model, cached the value used when building the
arrays.
2012-05-15 21:08:45 +09:00
Bill Currie
6ab3bd45e5
Implement IQM animation loading.
...
Bone poses are converted to dual quaternions + shear + scale for nice
skinning. Will likely be slow for software skinning, but too bad.
2012-05-15 21:08:45 +09:00
Bill Currie
bf38e6073e
Implement iqm joint loading.
2012-05-15 21:08:44 +09:00
Bill Currie
52ab4f64f9
Add code for loading vertex colors.
...
And correct an oopsie in bledweights.
2012-05-15 21:08:44 +09:00
Bill Currie
1be9384f10
Load the iqm vertex and triangle data.
...
Still have the meshes, joints and animations to go.
2012-05-15 21:08:43 +09:00
Bill Currie
26a878da48
Stub out the iqm loader.
2012-05-15 21:08:43 +09:00
Bill Currie
95cef4a73e
Correct a spelling error.
2012-04-24 14:12:54 +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
878764f79d
Fix some segfaults in nq-server.
2012-04-15 15:11:16 +09:00
Bill Currie
6f026e9116
Fix some segfaults in server model loading.
...
I'd forgotten to test the servers when I did the vid_plugin changes.
2012-04-15 14:12:00 +09:00
Bill Currie
1d864521e9
Fix the sprite model loader for plugins.
2012-04-11 14:58:55 +09:00
Bill Currie
cbdbfdd12f
Fix the alias model loader for plugins.
2012-04-11 14:58:55 +09:00
Bill Currie
52e518bb1b
Fix skin functions for plugins.
2012-04-11 14:58:55 +09:00
Bill Currie
d445b4ef88
Rename the glsl qfgl functions to qfegl.
...
Keep them separate from the gl renderer :)
2012-04-11 14:58:54 +09:00
Bill Currie
e991c1fed3
Make a bit of progress cleaning up vid for plugins.
2012-04-11 14:58:54 +09:00
Bill Currie
8530959752
Link the model libs to the render plugins.
2012-04-11 14:58:53 +09:00
Bill Currie
8e91fb7bc1
Get the basics linking.
...
Still, nothing will work: no plugins are loaded and they're all broken
anyway.
glx, sgl, glslx etc are going away, just the basics will be built: fbdev
(probably go away eventually), sdl, x11 and hopefully someday win. That's
actually the only reason anything links.
2012-04-11 14:58:53 +09:00
Bill Currie
a4c280f2b2
Take the first step towards render plugins.
...
No clients link. Even if they did, nothing would work.
2012-04-11 14:58:53 +09:00
Bill Currie
39e1ccc506
Don't try to process skins in GL without a player model.
...
If the client receives a skin updated message from the server before having
loaded the player model (shouldn't happen, but some servers have very
strange programmers), no skin data is avaible for updating, so just bail
out.
2012-03-14 16:08:48 +09:00
Bill Currie
ef37ed39a9
Clean up global symbols for the glsl renderer.
...
Where possible, symbols have been made static, prefixed with glsl_/GLSL_ or
moved into the code shared by all renderers. This will make doing plugins
easier but done now for link testing. The moving was done via the gl
commit.
2012-02-18 11:48:52 +09:00
Bill Currie
447ff2f2f5
Clean up global symbols for the gl renderer.
...
Where possible, symbols have been made static, prefixed with gl_/GL_ or
moved into the code shared by all renderers. This will make doing plugins
easier but done now for link testing.
2012-02-18 11:48:52 +09:00
Bill Currie
4707706f5d
Use QF_NEED for the renderer and model libraries.
...
This breaks RPM building, but I can fix that later.
2012-02-10 13:29:45 +09:00
Bill Currie
9fbff2f4d5
Do an audit of the Makefile.am files.
...
o All instances of LIBADD/LDADD have a corresponding DEPENDENCIES
specificatiion.
o libraries now use a lib_ldflags macro to keep things consistent
o duplication of source/lib names has been minimized (particularly in
the libraries; more work needs to be done for the executables)
o automake spec blocks have been organized (again, more work needs to be
done for the executables)
2012-02-07 16:04:19 +09:00
Bill Currie
201532ea7e
Fix missing library references when linking.
2012-02-05 14:25:22 +09:00
Bill Currie
1052bd2624
Fix the segfault on leaving e1m2.
...
Problem and solution found by Deek, reason by me.
2012-01-31 09:51:44 +09:00
Bill Currie
497718cc40
Plug the memory/texture/vbo leaks.
...
QF still leaks about 3MB/run on demo1, but even 100 runs didn't show any
render issues.
2012-01-29 22:32:35 +09:00
Bill Currie
8ac9ff0134
Link libQFmodels* agains libQFimage.
...
This is the correct fix for server linking wrt LoadPCX. Sort of. Really, it
would be better to disconnect the dependencies.
2012-01-27 19:55:30 +09:00
Bill Currie
03c7441265
Fix server linking wrt skin stuff.
2012-01-27 17:37:52 +09:00
Bill Currie
ca2c861671
Fix team colors in GL NQ.
2012-01-26 13:53:52 +09:00
Bill Currie
5dcaeae97b
Fix custom skins in GL for QW.
2012-01-26 12:50:37 +09:00
Bill Currie
df87cffe15
Start working on the new GL skin code.
2012-01-24 23:06:07 +09:00
Bill Currie
6df8867d69
Implement custom skins for glsl.
2012-01-24 10:27:05 +09:00
Bill Currie
d6683711f4
Clean up some redundant defines.
2012-01-24 09:37:46 +09:00
Bill Currie
19dc579a5a
Fix custom player skins for the sw renderers.
2012-01-23 23:38:32 +09:00
Bill Currie
3dbb5724db
Rename Skin_SetColormap_ to Skin_SetupSkin.
2012-01-23 21:40:12 +09:00
Bill Currie
08990ebb5a
Make top/bottom color work for GLSL.
...
Works quite nicely (love those colormaps).
2012-01-23 19:24:12 +09:00
Bill Currie
9a4b065eaf
Fix top/bottom colors for the SW renderers.
2012-01-23 17:33:19 +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
3669e3aa2e
Make alias model caching optional.
...
For now, only the glsl loader disables caching, but it stores the frame
vertices in GL memory, so its hunk usage is relatively lower (and will be
lower still when I get skins sorted out).
2012-01-17 19:31:50 +09:00
Bill Currie
fb428f8067
Rename mod_flood.c to floodfill.c
2012-01-17 19:31:50 +09:00
Bill Currie
7ba7130f42
Load the sky texture as two separate textures.
...
The sky texture is normally 256x128, with each 128 wide side being the two
layers of the sky.
2012-01-11 21:09:57 +09:00
Bill Currie
b43d03a98b
Let the render specific texture loader decide on sky texture loading.
...
This is necessary to allow the glsl texture loader to process the sky
textures.
2012-01-11 21:08:04 +09:00
Bill Currie
aa27a3f49c
Load bsp model textures as repeating mipmaps.
2012-01-07 18:05:54 +09:00
Bill Currie
204c1aba03
Don't use the miptex_t after converting to texture_t.
2012-01-07 17:08:07 +09:00
Bill Currie
6f18035c12
Fix up alias-16 support.
...
After getting in contact with serplord, I now know that the sw alias
loading was correct. Turns out the gl loaders was mostly correct, just a
mistaken subtract rather than add. And with that, I can implement alias-16
support in glsl. better yet, since all the work is done in the loader, the
renderer doesn't know anything about it :) However, I need to create some
16-bit models for testing.
2012-01-05 12:52:12 +09:00
Bill Currie
add5440ad1
Upload the normals with the vertex data.
...
Not all hardware can access a texture sampler from the vertex shader, and I
don't want multiple paths this early in the game. Now, vertex normals are
uploaded as shorts. Should be 14 bytes per vertex (was 10, could have been
8 if I had put the normal index with the vertex rather than st).
2012-01-04 09:42:00 +09:00
Bill Currie
2a3151cecd
Hook in alias model drawing.
...
Nothing is visible yet.
2012-01-02 20:28:40 +09:00
Bill Currie
540bccbc27
Load all the alias vertex data as bytes.
...
I had forgotten I wanted to do it this way.
2012-01-02 13:41:12 +09:00
Bill Currie
2ad5aa7aed
Unbind the array and element array buffers when done.
...
Not doing so wreaked havoc on my 2d rendering (what's he doing here, and
why's he messing with my redering? ;)
2012-01-02 10:08:56 +09:00
Bill Currie
f3884c659c
Finish alias skin loading and load vertex data into GL.
2012-01-01 23:55:27 +09:00
Bill Currie
edb05fdfce
Rename Vector3Scale and QuatCompScale.
...
They are now VectorCompMult and QuatCompMult.
2011-12-30 20:04:55 +09:00
Bill Currie
bcdcd7b36d
Implement sprint glsl loading.
...
That was... easy.
2011-12-30 09:36:57 +09:00
Bill Currie
91afdcf064
Don't call init_box when not doing a box trace.
...
I took the opportunity to pass qf through callgrind. init_box was
surprisingly expensive, especially considering its results were never used.
2011-12-25 17:11:48 +09:00
Bill Currie
2894689f71
Clean up mod_lightmap_bytes.
...
Just how many definitions do we need?
2011-12-25 13:02:26 +09:00
Bill Currie
dcf2b14188
Implement alias model skin loading for glsl.
2011-12-25 13:02:26 +09:00
Bill Currie
e62eb23f67
And do the real merge.
...
That drastically simplifies the processes of alias model loading for glsl :)
2011-12-25 11:04:03 +09:00
Bill Currie
c0d37ddc1e
Pseudo merge gl and sw Mod_LoadAliasGroup.
...
Interestingly, this didn't break gl alias model renderering (but then, it
does weird things to the data anyway).
2011-12-25 10:53:53 +09:00
Bill Currie
1f8db5fe3a
Pseudo merge gl and sw Mod_LoadAliasFrame.
2011-12-25 10:34:29 +09:00
Bill Currie
59ef1eae9d
Split out the floodfile code into its own file.
2011-12-23 19:01:31 +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
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
8aa5a8139c
Split out the portal sanity tests.
...
With this, the portal code can be tested separately, including the freeing
of the portal information.
2011-12-08 14:59:35 +09:00
Bill Currie
f9877ce0e0
Add a function to free a hull's portal information.
2011-12-08 14:58:08 +09:00
Bill Currie
fceed07d0b
Tidy up my diagrams.
2011-12-08 08:45:53 +09:00
Bill Currie
9f32004599
Add a fixme.
...
I've had enough of this for the moment, but I'm pretty sure the test needs
some more consideration, and I'll probably forget about it if I don't mark
it.
2011-12-07 17:27:13 +09:00
Bill Currie
2a27db146e
Use a bit of epsilon in trace_contents().
...
All tests pass again.
2011-12-07 15:35:19 +09:00
Bill Currie
66dffef936
Get trace_to_leaf working a little better.
...
I think the recursion decision needs a little more work, but this gets the
current tests working (though there's still a failure due to fp math).
2011-12-07 15:31:33 +09:00
Bill Currie
ccbc69a7f5
Carve out some more cave and add some more tests.
...
One of them even breaks the code :)
2011-12-07 13:31:21 +09:00
Bill Currie
4ed8b69e24
Check the cross product length before testing its direction.
...
This fixes the bogus portal crossings.
2011-12-07 12:20:04 +09:00
Bill Currie
5af88d33fe
Trace to the current portal rather than the portal's plane.
2011-12-07 12:17:51 +09:00
Bill Currie
9d2914474c
Fix the edge vectors when bounding the portal points.
2011-12-07 12:16:58 +09:00
Bill Currie
6a4021517b
Move the box face info into trace_state and init only once.
...
Then clean up the mess of excess function paramenters.
2011-12-07 10:54:37 +09:00
Bill Currie
fc14826cd6
Reorganize the code a little.
2011-12-07 10:42:39 +09:00
Bill Currie
4f13d19b7e
Optimize edges_intersect().
...
I found wolfram's line-line intersection page and noticed their equation
for the time of intersection was rather different to mine. After analyzing
the differences, it turns out they produce exactly the same results (when
the lines are coplanar), but their method allows me to eliminate one dot
product (4->3). Not only that, but it turns out that their method works
equally well for skew lines (ie, non-coplanar).
mine:
CxA.CxA
-------
CxA.AxB
theirs:
CxA.AxB
-------
AxB.AxB
2011-12-07 10:35:58 +09:00
Bill Currie
ff693a956a
Avoid missed portals in trace_to_leaf().
2011-12-06 22:09:40 +09:00
Bill Currie
8c840a7003
Sanitize trace_hits_plane().
...
While unit normals aren't needed, they were too big for sane math. Now
epsilon can be used for the distance tests. One of the two new tests passes
now :).
2011-12-06 22:06:25 +09:00
Bill Currie
2b65f81b72
Use a saner "infinity".
...
8e6 is just too big for reasonable floating point.
This fixes the bogus portals.
2011-12-06 20:50:09 +09:00
Bill Currie
632817fed5
Fail properly when the portals are bogus.
2011-12-06 20:48:31 +09:00
Bill Currie
f496f4d260
Whee, more tests that break things :)
2011-12-06 20:47:57 +09:00
Bill Currie
8fe703d747
Trace to adjoining leafs when necessary.
...
When the trace stradles a plane in the current leaf, check the other side
of the portal, too, as it is possible that leaf will restrict the movement
of the trace.
All current tests pass! However, I can think of some situations (and I
already have a solution) where things will fail, but that's next.
2011-12-06 17:27:05 +09:00
Bill Currie
4c17ca9583
Break out trace_hits_portal() from trace_enters_leaf().
2011-12-06 08:46:04 +09:00
Bill Currie
9a9079a2b3
Correct the start-solid in a corner test.
...
It turns out that the box trace CAN get out of the solid from that location
(though a similar point trace can not). This is because of my decision to
allow non-points to touch a plane from either side without crossing the
plane, whereas a point touching a plane is always considered to be on the
front side of the plane as there is no further information to disambiguate
on which side of the plane the point is.
2011-12-05 22:11:58 +09:00
Bill Currie
4419d4c4ad
Move the trace into the leaf before testing the contents.
...
The trace is moved as far into the leaf as possible without leaving the
other side of the leaf. This ensures that trace_contents is started from a
good location. There is currently a problem with traces that stradle a
plane getting, but this has cleared up all the current contents related
tests.
2011-12-05 22:11:58 +09:00
Bill Currie
c588d28b96
Clear contents flags before calling trace_contents.
2011-12-05 22:11:58 +09:00
Bill Currie
8307d9f233
Rename check_in_leaf to trace_enters_leaf.
2011-12-05 22:11:58 +09:00
Bill Currie
3bd029d599
Make the contents flags clear.
...
I got tired of not being able to remember which flag was which in the
output.
2011-12-05 22:11:47 +09:00
Bill Currie
8e512a087c
More failing contents tests.
...
However, I have a plan :)
2011-12-05 09:03:04 +09:00
Bill Currie
b4a497baab
Correctly restore the saved start point.
...
This fixes the point test failures.
2011-12-04 21:12:12 +09:00
Bill Currie
7da6df9dfb
Use the "real" contents of the trace's location when visiting a leaf.
...
When visiting a leaf in box mode, use trace_contents() to get the highest
priority contents of any leafs touched by the box in the current location.
I'm now down to one failing test case, and it's an "allsolid" issue that
might be an incorrect assumption in my test case.
2011-12-04 19:14:35 +09:00
Bill Currie
053d801e92
Break out the leaf visit code into its own funciton.
2011-12-04 18:52:17 +09:00
Bill Currie
4e76aa3025
Don't split on a plane parallel to the motion.
...
This seems to improve the start/all solid cases a little, and it should
speed things up a little by avoiding unnecessary polygon tests.
2011-12-04 12:46:22 +09:00
Bill Currie
ed8e09608a
Fix the negative fractions coming from edge_portal_dist().
...
I have a better fix in the works, but I wanted edge_portal_dist() to be
correct.
2011-12-04 12:11:27 +09:00
Bill Currie
e5903a60ff
Put the mistaken test case back in.
2011-12-04 11:00:38 +09:00
Bill Currie
eb5d2720e4
Avoid a segfault when there's no split plane.
2011-12-04 10:55:46 +09:00
Bill Currie
cdfc922bce
Fix a silly test case error.
2011-12-04 10:47:52 +09:00
Bill Currie
487a6b20ab
Test collisions with a ridge smaller than the box.
...
Whee, found a failing test case :)
2011-12-04 09:02:12 +09:00
Bill Currie
55eb88b52c
Create some tests for MOD_HullContents.
2011-12-03 22:18:43 +09:00
Bill Currie
581972c905
More file splitting for code reuse.
2011-12-03 21:13:01 +09:00
Bill Currie
dadfb78992
Split out the hull data so it can be used in other tests.
2011-12-03 20:23:42 +09:00
Bill Currie
9ad298a716
Check whether the portal and box intersect.
...
Now on to creating tests for MOD_HullContents :)
2011-12-03 19:59:12 +09:00
Bill Currie
d9a641c600
Avoid a segfault when the hull hasn't been portalized.
...
Serves me right for forgetting to test the main engine :P
2011-12-03 09:06:57 +09:00
Bill Currie
27642a080a
Avoid infinite recursion.
2011-12-01 12:57:06 +09:00
Bill Currie
f9d56f2941
Add MOD_HullContents().
...
If trace is null or point type, or the hull doesn't have portals, or the
first node is a leaf, MOD_HullContents operates in point mode (exactly the
same way as SV_HullPointContents()). However, in box mode, all leafs
touched by the trace are checked for their contents. The contents field of
trace (a bit field) will indicate the contents type of all touched leafs.
The returned contents value indicates the most important contents:
solid > lava > slime > water > empty
The one's complement value of the contents type is the bit number of the
contents bit field. I'm not sure how useful this will be as getting the
amount of overlap is currently not supported.
2011-12-01 12:26:33 +09:00
Bill Currie
7ee31dd475
Allow the trace start to be in multiple leafs.
...
This fixes a couple of in-solid tests, but something better is needed.
2011-11-28 20:56:21 +09:00
Bill Currie
13d37f4838
Add a bunch of in-solid tests.
...
Tests where the box is only partially in a solid tend to fail (particularly
when the solid is on the back side of the split plane).
2011-11-28 20:56:21 +09:00
Bill Currie
50b08c98fa
Add some snug-fit tests and fix the uncovered bugs.
...
The tests involve the box fitting into a hole with zero slop (this would be
impossible with point clipping).
2011-11-28 20:56:21 +09:00
Bill Currie
985667ecba
Fix plane touching box backsideness.
...
Because a box has size, even when touching a plane, the side on which the
box is can be determined (unlike a point).
2011-11-28 20:56:21 +09:00
Bill Currie
869cd19260
Box traces can now graze a corner.
2011-11-28 20:56:21 +09:00
Bill Currie
45d55d7e9a
Test the simple wedge.
2011-11-28 20:56:21 +09:00
Bill Currie
2c9b07b257
Scale the box edge vectors.
...
Now they represent the lengths of the edges as expected by the edge/polygon
code.
2011-11-28 20:56:20 +09:00
Bill Currie
60dbc0e342
Fix the last few bugs breaking the distance code.
...
The code itself seems to work now. There are still some problems: the box
faces are using unit vectors for the edges, or I should go back to unit
vectors for the portal edges; starting in a solid corner won't always work;
etc. However, that's just mopping up: the main algorithm seems to be
working.
2011-11-28 20:56:20 +09:00
Bill Currie
996859c367
Correct the projection code.
...
That needed to be the intersection of two coplanar lines.
2011-11-28 20:56:20 +09:00
Bill Currie
ab2ec644d6
Clip the portals when running the test cases.
...
When the portals are too big, floats break down and break the tests. This
might not be much of an issue in real maps, but my tests use "infinite"
planes.
2011-11-28 20:56:20 +09:00
Bill Currie
2abff68089
Fix some more silly bugs.
...
The target test now works, but some others have broken due to getting
negative fractions.
2011-11-28 20:56:20 +09:00
Bill Currie
a1da8ecdd0
Fix some silly errors that broke most of the box tests.
...
Uninitialized variables and crossed signs. Oops :/
2011-11-28 20:56:20 +09:00
Bill Currie
8fc99566ab
Add code to clip the motion of the box to the leaf's portals.
...
Unfortunately, something is broken (all box tests fail due to 0 fraction).
2011-11-28 20:56:20 +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
174f381125
Add some more tests for the ramp.
...
These tests pass, but show the basic polygon testing working (just not the
collision handling and thus fraction determination).
2011-11-28 20:56:20 +09:00
Bill Currie
750b5ba0ed
Be a little more lenient with float comparisons.
...
Unfortunately, Pythagorus and binary don't play well together, so rounding
errors are inevetible when testing with a slope. However, 1e-6 seems to be
a good epsilon (printf's %g hides it nicely :).
2011-11-28 20:56:20 +09:00
Bill Currie
73b93ffd74
Clean up the in_leaf test line.
2011-11-28 20:54:35 +09:00
Bill Currie
e3d8394b7a
Use the split_plane for the in-leaf test.
...
This seems to work better (all previously working tests pass again), but
the target test is still broken.
2011-11-28 20:54:35 +09:00
Bill Currie
7b59eaf0cd
Use the correct vector for the plane distance.
...
Oops :)
2011-11-28 20:54:35 +09:00
Bill Currie
cde0bbb807
For now, don't use box clipping for point traces.
...
Until I figure out how I want to handle zero sized boxes, don't test them.
2011-11-28 20:54:35 +09:00
Bill Currie
fd5aee1d5e
Use the portals to check leaf validity.
...
If the trace hits a portal on the plane that brought us to the leaf, then
we actually are in the leaf (otherwise, we shouldn't be here and thus
should ignore the leaf). At least, that's my thinking.
Many point tests fail (but they're really using box clipping with a zero
sized box) and two box tests fail.
2011-11-28 20:54:35 +09:00
Bill Currie
297275e3de
Create edge information for the portals.
2011-11-28 20:54:35 +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
e41da2f579
Store the start fraction and position in the right stack slot.
...
Oops. Yay, valgrind.
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
2f23cfa4d0
Add a new (failing) test case.
...
This one demonstrates the need for more information in the bsp tree
(surface polygons). When the box collides with a corner where one side is
flat and the other angled, but there's a partition plane cutting the two,
the box can instead collide with the angled side before it hits the corner.
2011-11-28 20:54:34 +09:00
Bill Currie
7a1faee460
Bail out when the trace advances past the nearest collision.
2011-11-28 20:54:34 +09:00
Bill Currie
a943cdf2c4
Handle dual collisions.
...
When the trace collides with something on both sides of a plane, the nearer
collision is required. The code now correctly checks both sides and keeps
the nearer collision.
2011-11-28 20:54:34 +09:00
Bill Currie
0cf5dec5bb
Fix the covered step tests.
...
However, there is still a problem with moves where the box is always cut
by the plane: both sides need to be tested (done), but when the first side
checked allows longer motion than the second, but still collides, only the
first side is checked. The shorter motion is required.
2011-11-28 20:54:34 +09:00
Bill Currie
8cc320b7ef
Move the start point to the near side of the crossed plane.
...
I'm not sure the end point needs to be moved at all, but I'll leave it
alone for now. I have a couple of failing test cases that seem to be caused
by not handling moves where the box is always cut by the plane.
2011-11-28 20:54:34 +09:00
Bill Currie
fa6390a46a
Correct the sign for the shift in frac.
...
However, this is not entirely correct as the new start point when testing
the other side of the plane also needs to be calculated.
2011-11-28 20:54:34 +09:00
Bill Currie
b82d9f5894
Another test, another bug.
...
Fix an incorrect test using offset (forgot to negate).
2011-11-28 20:54:34 +09:00
Bill Currie
9984a2e87a
Fix some missing usages of offset.
...
This fixes my one failing box clip test. Now I need to find more broken
cases. At least now, they should be real tests.
2011-11-28 20:54:33 +09:00
Bill Currie
9d63298032
Tweak a fixme comment.
...
The code is potentially slow, especially on big maps, but I haven't noticed
any issues yet.
2011-11-28 20:54:33 +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
b4da9241f6
Make a fresh start on box clipping.
...
I even have a failing test to fix :)
2011-11-28 20:54:33 +09:00
Bill Currie
940476dce1
Do some renaming to make things a little clearer.
2011-10-02 15:07:36 +09:00
Bill Currie
a356ce6572
Assume the trace will be allsolid.
...
Rather than setting allsolid when the trace fails to leave solid space,
clear it when the trace enters non-solid space. This is necessary because
the trace might visit only one node and thus the failure to leave solid
space will not be detected. This fixes the problem with hipnotic's bobbing
water.
2011-09-27 17:14:42 +09:00
Bill Currie
9c6693d567
Correct hull3 and its tests.
...
I'd gotten the solid/empty parts backwards.
2011-09-27 17:11:57 +09:00
Bill Currie
3e74aa5303
Add trace-qf-bad.c to Makefile.am and testclip.c.
2011-09-27 17:09:04 +09:00
Bill Currie
e23ee07b6f
Ensure id's trace is properly initialized.
2011-09-27 15:38:28 +09:00
Bill Currie
32ff639bf3
Add an old qf version of trace.c
...
This version is broken (it's the one "fixed" by commit 981622f9
), but it
does behave correctly for hipnotic's bobbing water. The question is, why?
2011-09-27 13:00:19 +09:00
Bill Currie
9daa0b7bde
Rename the empty and solid flags, and use them correctly.
...
seen_empty and seen_solid much better reflect their meanings, and also use
them correctly (eg, visiting an empty node does not clear seen_solid).
Hipnotic's bobbing water is still broken, though.
2011-09-27 12:33:50 +09:00
Bill Currie
a7482570b6
Document the geometry in the tests.
2011-09-27 12:30:21 +09:00
Bill Currie
aa6b7ef7e8
Add some water based tests.
...
Unfortunatly, they haven't uncovered the bug.
2011-09-26 21:02:54 +09:00
Bill Currie
800e8cb3da
Make the id trace code more readily usable in the engine.
2011-09-26 19:56:00 +09:00
Bill Currie
ae0dc6f06b
Disable the "shouldn't happen" code.
...
It causes the tests to fail, and doesn't affect the problem I'm currently
facing.
2011-09-26 19:56:00 +09:00
Bill Currie
baf9b7c181
Make the test nodes a little easier to read.
2011-09-26 19:56:00 +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
Antti Harri
358a844a42
Implement --version-info configure switch to override QuakeForge
...
library versioning. From Lasse Collin, thanks!
2011-07-09 01:23:36 +03:00
Bill Currie
b18ff4ed3e
Move test-qfs.c into a test directory.
...
Same as before: avoiding -prefic-pic issues.
Also, catch some minor snafus found in the previous commit. With this, make
distcheck passes again :)
2011-06-12 16:34:15 +09:00
Bill Currie
c522726021
Move the testclip program into its own directory.
...
Same as with the audio test program, this is to avoid issues with
-prefer-pic.
2011-06-12 16:12:52 +09:00
Bill Currie
74a7e07dfc
Use AM_CFLAGS instead of CFLAGS.
...
CFLAGS is meant to be reserved for the user.
2011-05-10 12:44:44 +09:00
Bill Currie
981622f969
Make MOD_TraceLine behave "correctly".
...
MOD_TraceLine now behaves the same as id's SV_RecursiveHullCheck (from
WinQuake). This means that even if the trace would escape from solid space
into non-solid space, the trace is treated as allsolid if it crosses from
one solid space to another before hitting the empty space.
trace-id.c is used only for establishing the behaviour of id's code.
2010-12-06 15:30:56 +09:00
Bill Currie
c2af7896bd
Revert "make droptofloor continue the trace if it starts solid"
...
This reverts commit 10232acdfe
.
The problem was really in the trace code, but it got fixed by "accident"
when I had similar problems in hipnotic a couple of years later. Now to
figure out just what the trace could really should be doing.
2010-12-05 14:56:32 +09:00
Bill Currie
31640dd1b9
Clean out the last traces of my boxclip code.
...
I've been experiencing funny trace issues while playing Soul of Evil. While
I think the boxclip dregs shouldn't be causing problems, it's probably best
to clean them out properly before trying to fix anything.
2010-12-05 14:52:20 +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
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
92f84e97a4
Unlimited loaded models.
2010-11-26 16:19:25 +09:00
Bill Currie
9a30968c87
type size correctness
2010-10-13 20:52:06 +09:00
Bill Currie
cd159e1cc1
Use LoadBSPMem to load brush models.
...
Now that Mod_LoadBrushModel uses bspfile.[ch], the engine uses the same
code as the tools to work with bsp files.
2010-10-13 20:52:05 +09:00
Bill Currie
2185a3dcd0
Remove almost all of my boxclip developement.
...
This is to prevent others accidently getting headaches from my code.
2010-08-20 14:13:23 +09:00
Bill Currie
0dfff8fd58
ignore stuff
2010-08-07 10:42:09 +00:00
Bill Currie
3e0aaea535
more build fixes from Despair (parallel make, this time)
2010-05-28 13:37:51 +00:00
Bill Currie
51932ee433
--enable-boxclip configure option and some more tweaks, I guess (been too long)
2009-12-19 04:45:01 +00:00
Bill Currie
a26cd68ea9
more tests, more progress. just need to fix a regression that popped up while fixing the new test (18)
2009-03-22 00:31:44 +00:00
Bill Currie
dd27143f62
finally got the failing test I wanted
2009-03-20 15:01:18 +00:00
Bill Currie
21c12ad7d5
damn, it failing was because I was using the wrong hull. now, why does the engine fail here?
2009-03-20 11:57:36 +00:00
Bill Currie
7dae886b93
label "expect" and "got" lines
2009-03-20 11:55:47 +00:00
Bill Currie
1f1375fdbb
add another (currently failing) testcase
2009-03-20 11:51:59 +00:00
Bill Currie
384ad30df8
correct the last 4 edges. all existing testcases now pass.
2009-03-20 11:38:04 +00:00
Bill Currie
fea4189150
complete rewrite of validate_solid. also, put the trace points on the other side of the split plane. Just one more set of related tests to fix.
2009-03-20 11:20:59 +00:00
Bill Currie
0ff4165149
why didn't I do this earlier?
2009-03-20 03:40:30 +00:00
Bill Currie
f59f2dc7b9
some more progress with box clipping and much a saner test harness
2009-03-20 03:33:03 +00:00
Bill Currie
e992edaf31
that fixed the test case (why isn't sgn a standard function? :P)
2009-03-19 04:56:44 +00:00
Bill Currie
3be88c3e1d
still disabled since it's still broken, but progress has been made. Fortunately, some of the breakage shows up as a regression in the testcases.
2009-03-19 03:16:24 +00:00
Bill Currie
2b81eaea6c
console.h include cleanup
2007-11-06 12:40:38 +00:00
Bill Currie
d66934942d
nuke Con_Printf and Con_DPrintf and use Sys_* instead
2007-11-06 10:17:14 +00:00
Bill Currie
e15fae264a
well, it finally seems to work, but q1 maps (especially start's ramp to e3) are not such that they're particulary playable due to being designed for point clipping. so still disabled until something can be sorted out.
2007-09-29 23:28:41 +00:00
Bill Currie
0ee9e1cf3e
more accurate expects and don't recurse for non-crossings
2007-09-23 08:33:26 +00:00
Bill Currie
3d79256653
closer still. have problems with allsolid traces and flags in general
2007-09-23 05:41:17 +00:00
Bill Currie
973a30bce0
show inwater as well (though irrelevant for test map)
2007-09-23 05:40:08 +00:00
Bill Currie
9f7018685e
a little easier to see what's expected
2007-09-23 04:07:39 +00:00