Bill Currie
0c81364da8
Fix scr_copyeverything in gl and glsl.
...
Now the gl renderers unconditionally set it to 1. This is required because
the screen is cleared every frame.
2013-01-13 17:23:00 +09:00
Bill Currie
4a95f89760
Correct the handling of r_viewsize and lineadj.
...
r_viewsize is meant to be clamped to 100, but not limit linadj.
2013-01-13 16:53:22 +09:00
Bill Currie
86b95629cf
Complete the move of some vars into vid_render_data.
...
scr_fullupdate and scr_copyeverything were missed. Possibly others too, but
this is enough for the moment.
2013-01-13 16:46:41 +09:00
Bill Currie
9c812f39ce
Apply some wart remover.
...
hungarian notation... *twitch*
2013-01-13 16:07:11 +09:00
Bill Currie
ed8b289315
Make sdl's VID_SetPalette only queue a palette change.
...
It seems that SDL_SetColors causes a page flip, so VID_SetPalette only
queue a palette change (by checking for the need to change and storing the
requested palete) and VID_Update now checks for a queued palette change and
updates SDL's palette if required. This fixes the flickering console in sw
-sdl introduced by the cshift/centerprint change.
2013-01-13 14:55:15 +09:00
Bill Currie
82a6861233
Move the call to VID_Update out of the if blocks.
...
This makes it obvious that VID_Update is unconditionally called when
SCR_UpdateScreen is called.
2013-01-13 14:43:19 +09:00
Bill Currie
5bbb76194f
Use stdlib.h instead of alloca.h.
...
While the manpage does say alloca.h, that's not very portable, it seems.
stdlib.h seems to be better (at least for mingw, anyway)
2013-01-10 21:54:37 +09:00
Bill Currie
6b97967a68
Use g instead of e for the fp values.
...
Need to up the precision by one due to the difference between g and e, but
much prettier. Might need to rename that function :P I wish I'd thought to
check if g would work, but thanks to divVerent for the suggestion.
2013-01-08 20:15:24 +09:00
Bill Currie
b096a0242e
Write fp values to saved games with enough precision.
...
That is, enough precision to uniquely identify the fp values. No drifts!
2013-01-08 18:50:44 +09:00
Bill Currie
d6bb5bec86
Use the already calculated string length.
...
No point doing it twice.
2013-01-08 18:10:27 +09:00
Bill Currie
9155338404
Add support for int and quaternion values in saved games.
2013-01-08 18:09:22 +09:00
Bill Currie
3e2a40684c
Use dstring in PR_UglyValueString().
...
I should have done this a long time ago:P. This removes the really silly
255 char limit from strings in saved games (and thus fixes books in ITS).
2013-01-08 17:20:58 +09:00
Bill Currie
a4714ac9b5
Correctly parse octal escapes for plist strings.
...
It seems the code expected octal escapes to always start with 0. This is
not the case. Also, octal escapes are limited to 3 digits (and hex to 2).
This fixes the garbled bold text in ITS.
2013-01-08 16:54:23 +09:00
Bill Currie
febb615580
Create a test for octal chars in plist strings.
...
Both reading and writing.
2013-01-08 16:32:57 +09:00
Bill Currie
751417ffb2
Rename R_RecursiveWorldNode to R_VisitWorldNodes.
...
Finally, the name reflects its actual purpose.
2013-01-07 19:59:49 +09:00
Bill Currie
a852eeb711
Remove the recursive versions of R_RecursiveWorldNode.
...
They seem to not be needed any more.
2013-01-07 19:57:21 +09:00
Bill Currie
9758302023
Fix sw and sw32's R_RecursiveWorldNode node stack.
...
I guess I had forgotten to make the node stack dynamically allocated for
these renderers. Now ITS works in all four renderers.
2013-01-07 19:51:36 +09:00
Bill Currie
43702580f5
Clear the texture element chain after drawing.
...
It was properly cleared after drawing water chains and sky chains, but I
had missed normal surfaces. It took the use of the same texture for both
normal surfaces and water surfaces to trigger the bug. Thanks go to Simon
'Sock' O'Callaghan and his In The Shadows mod.
2013-01-06 20:05:59 +09:00
Bill Currie
49d07ce452
Implement MH's version of Sys_DoubleTime for windows.
...
From http://forums.inside3d.com/viewtopic.php?p=36239
2013-01-05 17:52:54 +09:00
Bill Currie
e0e69ac71a
Fix some signed/unsigned comparison warnings.
...
It seems mingw's gcc treats pointer subtraction differently to how linux's
gcc does.
2013-01-05 17:52:48 +09:00
Bill Currie
7206756952
Produce a vidmode list for developer output.
...
vidmode is starting to show its age. Modern X doesn't need a config file,
and when one is not available, the list of available resolutions is quite
strange. Time to look into randr support.
2013-01-01 15:13:27 +09:00
Bill Currie
9d6954efb7
Fixup extended bsp when loading the file.
...
It turns out the tools need the node conversions too, so doing it in
bspfile seems to be best as it is used by everything that reads a bsp file.
2012-12-30 13:29:24 +09:00
Bill Currie
7a86ea2d41
Do not use the bsp2 header when byteswapping the header.
...
The bsp2 header is not necessarily correct (or even present), but the bsp29
header is: it was setup via set_bsp32_write. This fixes the bsp corruption
when vising a map (and, I expect, any problems with qfbsp on a big-endian
machine).
2012-12-29 20:57:55 +09:00
Bill Currie
a4d95f3f53
Move Mod_FindClipDepth and recurse_clip_tree into clip_hull.c.
...
Since the hull depth needs to be set for the hull to be useful, it makes
sense to move the code into the same place that allocates new hulls (to me,
anyway).
2012-12-29 16:25:47 +09:00
Bill Currie
3b63c31b5d
Use pr_return for the null pointer check.
...
The params come after the return slot :P. Getting a null pointer exception
for movep from .return wasn't very funny.
2012-12-26 11:47:53 +09:00
Bill Currie
1fdc32bb39
Check for null VM pointer accesses.
...
Currently only four words of "null pointer protection" are available, but
it's a start.
2012-12-22 14:24:11 +09:00
Bill Currie
6eb6b6c0ba
Change pointer_t to unsigned and clean up the mess.
...
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie
84a68b139e
Rename set_iter_t's value to element.
...
Correct terminology and all :)
2012-12-21 14:09:00 +09:00
Bill Currie
427d52511c
Fix an uninitialized variable warning.
...
It's a false positive, but best to be safe.
2012-12-19 17:13:32 +09:00
Bill Currie
7b38b0b339
Make S_Init safe to use with a null viewentity.
...
Current work in qwaq doesn't need 3d spacialization, so it wants to pass
null for the viewentity pointer.
2012-12-17 15:07:49 +09:00
Bill Currie
e17d8ac9db
Add ruamoko wrappers for the set api.
...
This includes both normal functions and a Set class (and SetIterator
class). Most of the methods are implemented as builtins.
2012-12-16 13:48:36 +09:00
Bill Currie
3a9fe196b6
Get the return param right for messages to nil.
...
R_INT(pr) = R_(INT)(pr); is not exactly what I had intended :P
2012-12-16 13:39:59 +09:00
Bill Currie
f631f514e9
Fix the obj_error family of functions.
...
It seems they were written before quaternion support was added and were not
updated to take into account the variable size of parameters. Now at least
Object's -error: works.
2012-12-16 13:19:31 +09:00
Bill Currie
11b991cf9d
Print the error message before the state dump.
...
Normally, the order doesn't matter, but when tracing code, it becomes very
difficult to tell where the trace ends and the dump begins. Printing the
message first puts the message between the trace and the dump: much easier
:)
2012-12-16 12:27:15 +09:00
Bill Currie
101ca22b5a
Fix a couple of warnings found by the mxe gcc.
...
Finally, a recent gcc for our mingw builds :)
2012-12-14 17:07:53 +09:00
Bill Currie
3e38c4aa48
Merge branch 'qfcc-cse'
...
qfcc now does local common subexpression elimination. It seems to work, but
is optional (default off): use -O to enable. Also, uninitialized variable
detection is finally back :)
The progs engine now has very basic valgrind-like functionality for
checking pointer accesses. Enable with pr_boundscheck 2
2012-12-13 20:17:28 +09:00
Bill Currie
95c249e8b9
Scale the glsl crosshairs to match gl.
2012-12-12 22:34:49 +09:00
Bill Currie
2ce65d931e
Use exact texture coords for 2d pics in glsl.
...
Moving the texture coordinates in 1/4 pixel made a mess of the 2d pics
(very noticable on the round crosshair).
2012-12-12 22:34:43 +09:00
Bill Currie
cb259823af
Scale the glsl crosshairs to match gl.
2012-12-12 21:37:55 +09:00
Bill Currie
f71affdfba
Use exact texture coords for 2d pics in glsl.
...
Moving the texture coordinates in 1/4 pixel made a mess of the 2d pics
(very noticable on the round crosshair).
2012-12-12 21:34:37 +09:00
Bill Currie
a372efee5c
Add a new crosshair.
...
Now all 4 slots of the crosshair table are used :)
Also, fix the offset for pic based crosshairs in glsl, and use just one
func for them.
2012-12-12 19:36:50 +09:00
Bill Currie
814f902e88
Add a new crosshair.
...
Now all 4 slots of the crosshair table are used :)
Also, fix the offset for pic based crosshairs in glsl, and use just one
func for them.
2012-12-12 19:36:18 +09:00
Bill Currie
6473951daa
Make the set notation more correct.
...
The empty set is now {}, the set of everything is now {...} and the rest
now have {} around the members.
2012-12-09 22:17:55 +09:00
Bill Currie
061e2be5d4
Re-write the set testing code.
...
Getting everything right with an enum proved to be too difficult if not
impossible. Also use better tests for equivalence and intersection.
Many more tests have been added. All pass :)
2012-12-09 13:52:48 +09:00
Bill Currie
94e804d786
Make some more set_test fixes.
...
Two inverted sets can never be disjoint.
2012-12-07 22:25:36 +09:00
Bill Currie
56956fc370
Rewrite the intersection tests.
...
The early bailout proved to be difficult to get right, so don't bother.
2012-12-07 22:16:51 +09:00
Bill Currie
98c9e4f8c0
White space.
2012-12-07 22:16:22 +09:00
Bill Currie
f3328a61c7
More tests and update a comment.
2012-12-07 22:16:07 +09:00
Bill Currie
b053edee17
Fix the handling of size in set_expand.
...
It was correct for set_add, but not for other ops :/ (out by 1)
2012-12-07 20:44:09 +09:00
Bill Currie
770a40cef0
Add a bunch more tests.
...
Even found some bugs :)
2012-12-07 20:43:11 +09:00