Bill Currie
433d9d138b
Hook up the pointfile loader in glsl.
...
I was always wondering what that was for (never bothered looking at the
command registration, I guess :P).
2012-09-12 09:54:24 +09:00
Bill Currie
45c48a6215
Fix bsp2 loading.
...
Just some problems with the handling of extended bsp29 files. I'm not
quite happy with the code, but it will do for now.
2012-09-08 09:41:00 +09:00
Bill Currie
cfb856b9cf
Fix byteswapping of a node's firstface/numfaces.
...
I'd forgotten to fix this.
2012-09-08 09:38:22 +09:00
Bill Currie
beb0b9e0fc
Fix a segfault when no interfaces are available.
2012-09-08 09:37:48 +09:00
Bill Currie
0ce32a793e
Return the correct size for set_bsp*_write().
...
Need to subtract the size of the bsp_t/bsp29_t struct. Now old and new
qfbsp produce identical bsps (so long as they're both unoptimized, or
(probably) both optimized).
2012-09-07 20:42:04 +09:00
Bill Currie
2d30cddc66
Implement bsp2/bsp29 writing.
...
It's ugly, inefficient, and untested, but it should work.
2012-09-07 18:27:20 +09:00
Bill Currie
3df85a6abe
Fix reading bsp29 files.
2012-09-07 17:37:46 +09:00
Bill Currie
a37c5465e1
First step for BSP2 support. DOES NOT WORK!
...
All of the nastiness is hidden in bspfile.c (including the old bsp29
specific data types). However, the conversions between bsp29 and bsp2 are
implemented but not yet hooked up properly. This commit just gets the data
structures in place and the obvious changes necessary to the rest of the
engine to get it to compile, plus a few obvious "make it work" changes.
2012-09-07 16:09:24 +09:00
Bill Currie
69fb78278f
Remove the redundant endian conversions from bsp loading.
...
It's obvious that it's been a very long time since anybody's tried playing
QF on a big-endian machine: double converting data isn't good :/
2012-09-07 15:45:59 +09:00
Bill Currie
6ba6959205
Allow any NxN or 2NxN sky texture for glsl.
...
Maps that specify a skybox often use a fake sky texture, sometimes 16x16.
Having a hardcoded requiredment of 256x128 is a tad inappropriate.
2012-09-05 14:02:44 +09:00
Bill Currie
d6a1daaf30
Force a refdef update when nearclip or farclip change.
2012-08-29 09:55:17 +09:00
Bill Currie
abc81cee85
Avoid building unneeded libs.
...
Having better dependency info in build_control.m4 would be nice, but this
works well enough for now.
2012-08-20 14:12:20 +09:00
Bill Currie
9bfcdad35a
Fix some type-size safety issues.
...
Expecting int to be 32 bits is a little dangerous, and the function
versions of swap/noswap should be unsigned rather than signed.
2012-08-19 13:37:06 +09:00
Bill Currie
0bd613b73d
Disable vorbisfile's static callbacks.
...
Since we use callbacks anyway, they're not needed, and this fixes the
warnings/errors when using ps3toolchain.
2012-08-19 08:05:50 +09:00
Bill Currie
bf41851bd9
Check for ioctl availability.
...
This gets networking compiling. Now the build gets all the way to qfcc,
where it dies with waidpid/execvp errors :P
2012-08-18 22:02:02 +09:00
Bill Currie
575693e4a0
A bunch of networking compile fixes.
...
This isn't everything needed to get networking compiling, but it's pretty
close.
2012-08-18 21:49:30 +09:00
Bill Currie
78f7604efc
Evil hack to handle duplicated sdl key syms.
2012-08-18 21:44:51 +09:00
Bill Currie
9250eb83bf
Yet more char index issues.
...
Should be getting near the end of these as qfcc tries to link in my hacked
up tree :)
2012-08-18 21:42:49 +09:00
Bill Currie
7f805c2527
Use pkg-config for zlib.
...
Helps cope with zlib being in weird places (eg, ps3toolchain)
2012-08-18 21:41:33 +09:00
Bill Currie
3b047a3cc1
Check for getuid and cope when it's not there.
...
The ps3toolchain doesn't have getuid or getpwent. Nor does it have
timeGetTime, so use Sys_DoubleTime instead.
2012-08-18 21:37:54 +09:00
Bill Currie
6200d35109
Don't include SDL_byteorder.h
...
We don't need it and it's not always available.
2012-08-18 21:35:24 +09:00
Bill Currie
6f484ee757
Add support and tests for 3x3 matrices.
2012-08-18 16:29:57 +09:00
Bill Currie
cc35209f86
Yet more char index issues :P
2012-08-18 12:20:08 +09:00
Bill Currie
ee27c49e70
Separate the checks for building dirent.c and fnmatch.c.
...
ps3's libc has opendir and friends, but not fnmatch.
2012-08-18 12:12:45 +09:00
Bill Currie
5613b272da
Whee, another char index issue.
2012-08-18 11:50:35 +09:00
Bill Currie
d074f4a983
Hack in a fake version of "access".
...
It seems access is unimplemented in the ps3 toolchain.
2012-08-18 11:45:26 +09:00
Bill Currie
62face768f
Fix some char index issues.
2012-08-18 11:02:52 +09:00
Bill Currie
7928274b6e
Test for and include sys/select.h.
2012-08-18 10:57:42 +09:00
Bill Currie
6e1f043719
Clean up some unused or local functions.
2012-08-18 09:36:43 +09:00
Bill Currie
a1a2060583
Yet another ps3 plugin fix.
...
Returning an uninitialized pointer... ouch. Hopefully the last one.
2012-08-17 10:24:41 +09:00
Bill Currie
cbaad33638
Fix a couple more ps3 plugin related warnings.
...
Whee :P
2012-08-17 10:20:35 +09:00
Bill Currie
41876e8c37
Some compile fixes for when dlopen is not available.
...
It seems the ps3 gameos build env is... not what we've come to take for
granted.
2012-08-17 09:18:00 +09:00
Bill Currie
5b054dd98b
Add "slow grav" for smoke.
...
Removes one more set of hard codings from particle types.
2012-08-12 11:42:18 +09:00
Bill Currie
5a5b31bae4
Correct the direction of pt_fire particles.
...
sub_grav() was accelerating the particle in the wrong direction. Down being
+ve gravity caused a bit of confusion (though it was a c&p error).
2012-08-10 13:56:01 +09:00
Bill Currie
31dead3dcd
Fix 16-bit mdl loading for glsl.
...
The extra precision verts are offset by numverts, not numposes :P
2012-08-07 17:06:01 +09:00
Bill Currie
1406cf13de
Mask the QFS_Rename message with SYS_FS.
...
It really should have been masked all along, but I guess developer 1 was
too noisy back then.
2012-07-21 22:34:10 +09:00
Bill Currie
372defc1be
Support up to 128 dlights.
...
More or less as per MH's tut, but really just finishing something that
should have been done years ago.
2012-07-21 13:58:54 +09:00
Bill Currie
106257d6e9
Allow reconstructed builtins to be found by name.
...
Certain versions of qcc (fteqcc comes to mind :P) strip the names from
builtin functions. This breaks saved games that happen to have a builtin
function in a saved function variable. The earlier builtin name
reconstruction patch happened to fix the writing of save games for such
progs, and this one fixes the reading.
2012-07-20 16:17:26 +09:00
Bill Currie
15484956f7
Make con_speed 0 instant.
...
Nice for recording, and should give more accurate timedemos.
2012-07-18 14:50:49 +09:00
Bill Currie
d73b5045d8
Do not do any contents evaluation if not printing contents.
...
Fixes a segfault when tracing progs caused by the recent entity number
change.
2012-07-18 10:46:59 +09:00
Bill Currie
8691a2fbd1
Dump a stack trace when running out of edicts.
2012-07-18 10:30:58 +09:00
Bill Currie
7d8b0f96d6
Correct the fog distance calculations.
...
It turns out the pixel's z coord is correctly obtailed by
gl_FragCoord.z/gl_FragCoord.w.
2012-07-17 19:10:10 +09:00
Bill Currie
c4309e7abc
Correct the fog blend calculation for transparency.
...
The incoming pixel's alpha should not be affected by fog. This fixes the
ugly square smoke particles in foggy maps.
2012-07-17 19:08:36 +09:00
Bill Currie
c66e437ebe
Enable shadows for grenades.
...
Now that shadevector is correctly transformed, grenade shadows aren't quite
so silly.
2012-07-17 17:12:34 +09:00
Bill Currie
a7327acb80
Set up shadevector for gl alias models.
...
The setup had been lost at some stage, thus shadows were always directly
under the entity. Unlike the original quake shadow code, the vector is
correctly transformed into the entity's space.
2012-07-17 17:10:48 +09:00
Bill Currie
fbc0ad59df
Implement gl shadows for pure triangle alias models.
...
I finally found the cause of Despair's gl shadows non-rendering+segfault...
the shadow code expected triangle fans and strips but was getting simple
triangles. Oops.
2012-07-17 16:11:42 +09:00
Sander van Dijk
3c04de1116
Better default vid_gamma value.
2012-07-17 06:30:01 +09:00
Bill Currie
134f9b0e9e
Force pr_keys.c to get linked in.
...
Nothing in the main program currently uses Key_Progs_Init, so the object
file wasn't getting pulled into the link. However, it's quite necessary for
the client console plugin :/
2012-07-16 18:18:13 +09:00
Bill Currie
8333e6578c
Fix non-static sw renderer for 32bit x86.
...
Yet another undefined symbol caused by iqm support. This time caused by
asm/not asm.
2012-07-15 22:34:00 +09:00
Bill Currie
0f34ab8762
Move pr_keys.c from console to video/targets.
...
It wasn't very accessible/usable in the client console plugin.
2012-07-15 07:39:50 +09:00
Bill Currie
f9c6eacb84
Really fix sw32 renderer loading.
...
It seems I never tested the sw32 renderer in a non-static build since I put
in IQM support.
2012-07-15 07:30:17 +09:00
Bill Currie
fd6b5edb73
Don't set triangle draw type in sw32 iqm renderer.
...
It's not used and causes link errors (I never noticed on my system).
2012-07-14 19:48:57 +09:00
Bill Currie
fcf7150c62
Remove some old renderer specific files.
2012-07-14 07:32:53 +09:00
Bill Currie
a9adc94aa8
Force builtin function descriptors to have a name.
...
That is, the descriptors loaded from the progs file. Some compilers (eg,
fteqcc :P) strip builtin names from the progs, which makes debugging
difficult.
2012-07-13 10:22:25 +09:00
Bill Currie
6fe32103ea
Do a bit of bound() usage auditing.
...
While these seem to be mostly harmless, having function calls in the
bounded value can be nasty.
2012-07-12 19:33:51 +09:00
Bill Currie
a822a683cd
Fix the inverted lighting for sw32.
...
LordHavoc had made lighting positive for sw32, but I had done something in
the plugin code that broke that (probably something to do with the
colormap loading). Going back to id's original code fixes the issue.
2012-07-12 18:15:45 +09:00
Bill Currie
12319cfcdf
Revert "Slightly reducde the number of calls to glUniformMatrix4fv."
...
This reverts commit e170f4ee75
.
It turns out I messed up something in the patch. I noticed the problem
while playing digs04.bsp: many sub-model surfaces, particularly those with
animated textures, were not being transformed correctly. As this patch did
not make a large performance difference, it's probably better to just
revert it. I might revisit it later.
2012-07-11 08:12:57 +09:00
Bill Currie
ede65fb28c
Use the correct source for the backtile width/height.
...
Yay, no more garbage on the screen :)
2012-07-09 15:56:51 +09:00
Bill Currie
5014825b39
Fix the backtile for glsl.
...
Since the backtile is loaded into a scrap and used as a subtexture, we
can't use GL's texture wrapping, thus do the wrapping ourselves. There are
some minor issues with the wrong part of the scrap being drawn: need to
investigate where the bug is (vrect, make_quad, etc).
2012-07-09 15:11:03 +09:00
Bill Currie
6e0907a6b1
Delay the "too many entities" check.
...
Rather than checking the raw edict count in the entities file against the
progs' max_edicts, check the allocated entity's number. This allows loading
of sophisticated maps (eg, digs04) that prune many of their entities.
2012-07-09 15:07:34 +09:00
Bill Currie
ce16750b04
Cache the max_edicts value in the progs struct.
...
Makes checks a little easier.
2012-07-09 15:06:42 +09:00
Bill Currie
e91b06a144
Better name for the edict count parameter to PR_LoadProgsFile.
2012-07-09 15:02:49 +09:00
Bill Currie
37260018a2
Acutally use the vertex colors for alias models.
...
Thanks to Spirit trying QF on nvidia drivers, the missing attributes were
found. Now he shouldn't get gl errors :)
2012-07-08 16:52:13 +09:00
Bill Currie
a6d9f5d931
Fix a parallel make issue.
2012-07-06 12:35:50 +09:00
Bill Currie
dbbd6f4535
Fix a couple of missing particle function pointers.
...
Discovered while getting the location markers working again.
2012-07-06 10:18:05 +09:00
Bill Currie
428d57b7e1
Don't attemt fullbright processing for an unavailable skin.
...
In the end, it turns out this is the correct fix for the gl seg on
overkill, because build_skin will correctly use the fully setup player skin
if the glskin doesn't have a texture associated with it.
2012-07-05 10:30:41 +09:00
Bill Currie
80bc0e9fb8
Make nq and qw use the new entity state struct.
...
This isn't really the best solution, but it does get things being shared
with the minimum of fuss.
2012-07-05 09:39:16 +09:00
Bill Currie
dea2f48477
Move entity_state_t into client/entities.h
...
Also, start working on the shared entity manager.
2012-07-05 09:39:16 +09:00
Bill Currie
b65c41efcb
Move the colormod lookup table into a new lib.
...
libQFclient is now here :) The first shared code is the lookup table.
2012-07-05 09:39:16 +09:00
Bill Currie
ef9e8d05c4
Avoid some unnecessary state changes.
...
Doesn't make much difference but it doesn't hurt.
2012-07-03 18:20:32 +09:00
Bill Currie
ee1cb24e3d
Move the call to R_SetFrustum to gl_R_SetupFrame.
...
This was meant to be part of the previous commit, but I forgot to write the
file :P
2012-07-03 16:08:12 +09:00
Bill Currie
a8e0bcabf9
Call R_SetFrustum in all renderers.
...
It turns out glsl, sw and sw32 weren't getting any benefit from R_CullBox
because the frustum wasn't setup :P. Get another 8% out of bigass1
(174->184fps). bigass1 now runs 2x as fast as it did before I started this
optimisation run :)
2012-07-03 15:57:33 +09:00
Bill Currie
e58cd75660
Bound r_maxdlights properly.
...
QF's implementation doesn't support more than 32 dlights (32 bit int).
2012-07-03 15:27:48 +09:00
Bill Currie
eefefb79b0
Rename char_queue to draw_queue.
2012-07-03 14:45:16 +09:00
Bill Currie
b25de4d995
Rewrite the 2d code to use a scrap.
...
This severely reduces the calles to BindTexture, and more importantly,
glUseProgram, EnableVertexAttribArray etc. The biggest changes are:
o icons and text are all in the one giant texture
o icons and text are mixed in the one queue
This gave ~9% speedup for bigass1 (159->174fps).
2012-07-03 13:38:35 +09:00
Bill Currie
df35b22af4
Parameterize the linear filtering of scrap textures.
2012-07-03 12:10:24 +09:00
Bill Currie
e170f4ee75
Slightly reducde the number of calls to glUniformMatrix4fv.
...
It doesn't make a big difference to bigass1 (yet ?), but it does clean up
apitrace a little.
2012-07-03 10:57:35 +09:00
Bill Currie
1a6b56b0a2
Call glTexSubImage2D only once per frame.
...
Instead of once per surface... ouch. Gives about 20% speed boost on demo1
(154.7->185.7)
2012-07-02 20:01:28 +09:00
Bill Currie
8fa92bf206
Add 32 button support to sdl and win as well.
...
The world isn't x11 (much as I'd like it to be)
2012-07-02 16:51:14 +09:00
Bill Currie
7cd8806ec0
Add support for up to 32 mouse buttons.
...
My new mouse reports only up to 9 (skipping 6 and 9, it seems), but I
/have/ seen 32 button mice...
2012-07-02 16:33:57 +09:00
Bill Currie
4da3be5cd6
Get a minor speed gain in glsl bsp rendering.
...
About 4% (99.5 to 104.4) from not calling VertexAttrib4fv or BindTexture
when not necessary.
2012-06-29 22:13:20 +09:00
Bill Currie
603fe92cba
Add a callback for when key_dest is set.
2012-06-29 18:00:21 +09:00
Bill Currie
3406cad99a
Many distcheck fixes.
...
Yay, bitrot :P
2012-06-29 10:49:21 +09:00
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