Bill Currie
415decb983
Use memmove instead of strcpy when deleting chars.
...
It seems recent(?) 64-bit strcpy implementations of strcpy don't work
properly for overlapping regions even when moving down. Quite the
surprise, as I thought that would always work. *shrug*
2012-06-23 20:54:55 +09:00
Bill Currie
7b231bc70e
Add support for /*..*/ comments to idparse
2012-06-23 19:43:22 +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
b2290d92c9
Nuke UNALIGNED_OK.
...
It's not really necessary (and was effectively dead anyway).
2012-06-15 22:02:17 +09:00
Bill Currie
e730608dd7
Implement r_flatlightstyles from fitzquake.
2012-06-15 22:02:14 +09:00
Bill Currie
b4ad695e16
Make info_t opaque.
...
I didn't like the way client/server code was poking around at the
implementation. Instead, provide a couple of accessor functions for the
same information.
2012-06-14 22:46:23 +09:00
Bill Currie
ac1bf2a158
Don't save unnamed fields.
...
There will normally be only one unnamed field (if any), and it's always the
null field. This will put an eventual end to the "'' is not a field"
messages.
2012-06-10 20:56:22 +09:00
Bill Currie
7d84800250
Remove an unnecessary if.
...
It needed during initial development of the patch, but with the refactoring
of s_init, it became redundant.
2012-05-28 07:58:11 +09:00
Bill Currie
01fb4f265d
Attempt to reconnect to jack on loss of connection.
2012-05-28 07:46:22 +09:00
Bill Currie
dbc203b625
And a few more bits of whitespace.
2012-05-23 08:21:27 +09:00
Bill Currie
23a38738fc
Massive whitespace cleanup.
...
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie
85da69a96a
Transform normals wrt bones in sw and sw32.
...
Better lighting :), though any scaling/shearing will produce funny results,
and sw32's lighting is broken in general.
2012-05-20 15:21:25 +09:00
Bill Currie
b5add680f7
Add Mat4as3MultVec.
...
to transform a vertex without the translation (eg, for normals) without
having to have separate matrices.
2012-05-20 15:20:18 +09:00
Bill Currie
0fbaa2a88a
Add sw32 support for iqm models.
...
That was easy :)
2012-05-20 14:23:41 +09:00
Bill Currie
3087e685cc
Convert texcoords to fixed point.
...
Bah, another weekend wasted on an oversight :( However, Mr. Fixit looks
quite alright in the quake palette.
2012-05-20 10:02:44 +09:00
Bill Currie
f0285e5a08
Correct the texcoord conversion.
...
1.0 is to represent the last pixel, not one past it.
2012-05-20 08:51:15 +09:00
Bill Currie
e2db2dcb63
Support static iqm models.
...
Segging on a model with no animations is not nice :P
2012-05-19 21:26:11 +09:00
Bill Currie
d25f39cc7d
Remove pskindesc from affinetridesc_t.
...
It's never used after being set.
2012-05-19 09:29:05 +09:00
Bill Currie
c1eb3e77c3
Process each vertex texcoord only once.
...
Double converting texcoords results in 0,0 for all affected texcoords. Mr
Fixit was looking rather ill. Now he looks weird (something wrong in the
renderer?).
2012-05-19 09:15:26 +09:00
Bill Currie
d41bf32d91
Hopefully fix color conversion.
...
Hard to tell because the triangle rendering is still messed up. However,
storing negative values in bytes doesn't work :)
2012-05-19 09:14:07 +09:00
Bill Currie
be9c0697a2
Give sw iqm its own transform setup.
...
IQMs don't need to be scaled or offset. This fixes iqms not rendering,
though they actually were: just super tiny.
2012-05-19 00:43:26 +09:00
Bill Currie
c0517b1d97
Factor out the blend palette creation.
...
gl, sw and sw32 use blend palettes, so share the code. This also abandons
the optimization for transforming verts in sw (had all sorts of problems
anyway). sw still doesn't work, though.
2012-05-19 00:34:15 +09:00
Bill Currie
e069757ceb
Refactor the skin setup code.
2012-05-19 00:18:03 +09:00
Bill Currie
fb10f38fd4
SW now tries (but fails miserably) to render iqm models.
...
Something seems to be very wrong with the transforms.
2012-05-18 23:31:14 +09:00
Bill Currie
da87ac0ce5
Remove some unused parameters.
2012-05-17 21:33:22 +09:00
Bill Currie
da313cfae7
Load iqm models in the sw renderers.
...
sw32 loses 32 bit textures :/
loading is /slow/ (converting rgb(a) to 8bit palette... ouch.
2012-05-17 21:17:48 +09:00
Bill Currie
7637f35616
Remove the test scaling.
...
Heh, forgot to remove it again :)
2012-05-17 16:02:13 +09:00
Bill Currie
c3801d46e5
Render iqm models in GL.
...
There are still many issues to sort out, but the basics are working.
Problems:
rendered fullbright (no lighting done)
normals are ignored
extra textures (glow etc) not used/loaded
4 models on the screen don't seem to be a problem.
2012-05-17 15:58:29 +09:00
Bill Currie
f958afad53
Optionally allocate extra data for iqm blend frames.
...
Also, correct the blend parameter type (int->float. oops).
2012-05-17 15:57:07 +09:00
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
041d63c828
Move the frame blending into common code.
2012-05-16 17:44:18 +09:00
Bill Currie
8ada7c02a3
Remove the vertex scaling.
...
It was there only because mrfixit is rather small (8qu?) and it made
finding him easier :). Anyway, any scaling should be done in the engine.
2012-05-16 08:13:59 +09:00
Bill Currie
9984925fe8
Correct a comment.
2012-05-15 21:08:47 +09:00
Bill Currie
31772afd13
Add in some ambient light for iqm models.
...
Though the bsp loader doesn't yet support colored lighting, the ambient
light will be colored when it does. With this, I guess iqm model support is
done for glsl until I figure out how I want to do dual quaternion support.
2012-05-15 21:08:47 +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
0fd2b01665
Update the shader to work as it should :)
...
I always thought it whould be "light - point" :P. Also, in normal maps, 127
is 0.
2012-05-15 21:08:47 +09:00
Bill Currie
c454b96d2a
Translate lights into entity space.
...
Finally, lights work "properly". Probably the nicest lighting we've ever
had :) (still have to put in ambient, though).
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
a032aa5adf
Get the lights working (as such).
...
They work nicely now when the normal map and texture are bypassed (don't
know what texture is getting used currently).
2012-05-15 21:08:47 +09:00
Bill Currie
8c5e278bf8
Implement frame blending for iqm.
...
Now that I have things working... :)
2012-05-15 21:08:47 +09:00
Bill Currie
a938c7fb14
Almost fix the animations.
...
There's still a problem with his finger tips and feet, but the rest of his
limbs seem to be working well. Much thanks to Spike for encouraging me to
do a dump of the matices that are actually sent to the card.
It turns out that animated joints remain relative right up to the last
moment.
2012-05-15 21:08:46 +09:00
Bill Currie
4ba69b511b
Make quat_origin the right type.
...
It's quat_t, not vec3_t :P.
2012-05-15 21:08:46 +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
4b38048a5c
Create functions for rotation and translation.
2012-05-15 21:08:46 +09:00
Bill Currie
5b4fdd2a93
Use the correct position for light calcs.
...
I should have remembered that gl_FragCoord wasn't right.
2012-05-15 21:08:46 +09:00
Bill Currie
2080c337d7
Avoid using malloc/free every model/frame.
2012-05-15 21:08:46 +09:00